咨询:同网络两SAP系统间复制BUCHK=789指定行数据的方案
Absolutely, there are several practical approaches to tackle this requirement, tailored to your constraints (small data volumes, infrequent syncs, same network, read-only target system). Let’s break down the best options:
1. Custom ABAP Program + RFC (Most Recommended for Your Case)
Since you’re dealing with only 10 tables (each with ≤20 rows) and low change frequency, a custom ABAP program is straightforward, flexible, and easy to maintain. Here’s how to set it up:
- Step 1: Build the extraction logic in SAP-1
Write an ABAP program that runsSELECTqueries on each target table, filtering forBUCHK = '789'. To keep things efficient, add logic to track the last sync timestamp (store it in a custom table) so you only replicate new/updated rows instead of full loads every time. - Step 2: Set up RFC connectivity
Create a Remote Function Module (RFM) in SAP-2 that accepts the extracted data and inserts it into the corresponding tables. Since SAP-2 is read-only, the RFM should only handleINSERToperations (no updates/deletes). Configure an RFC destination in SAP-1 pointing to SAP-2 (since they’re on the same network, this is just a matter of setting up connection parameters and testing access). - Step 3: Schedule the sync
Wrap the extraction + RFC call logic in a background job in SAP-1, scheduling it to run daily or every 12 hours. Add logging to track successful syncs, skipped rows (e.g., duplicates), and any errors for troubleshooting.
Pros: Full control over filtering and data consistency; minimal resource usage; easy to adjust if your table list or criteria change.
Cons: Requires basic ABAP development skills (but it’s simple code for small datasets).
2. SAP Landscape Transformation (SLT) Server (Low-Code, Official Tool)
If you have access to an SLT server (or can deploy a lightweight instance), this is SAP’s native solution for cross-system replication, perfect for your scenario:
- Step 1: Configure SLT connections
Set up SLT to connect to both SAP-1 (source) and SAP-2 (target). Since they’re on the same network, network configuration is trivial. - Step 2: Define replication rules
Select the 10 target tables, then add a filter conditionBUCHK = '789'to replicate only those rows. Configure the replication mode to scheduled delta sync (daily/12 hours) instead of real-time, since your changes are infrequent. - Step 3: Lock down target access
Ensure SLT is set to run one-way replication (SAP-1 → SAP-2 only) and that the target system’s tables are marked as read-only to prevent accidental modifications.
Pros: No custom code needed; built-in monitoring and error handling; stable and supported by SAP.
Cons: Requires SLT server resources (though lightweight instances are available for small workloads).
3. Manual Export/Import + Script Automation (No-Code Alternative)
If you want to avoid development entirely, use SAP’s built-in data export/import tools, paired with simple scripts for automation:
- Step 1: Extract data from SAP-1
UseSE16NorSQVIto run filtered queries forBUCHK=789on each table, then export the results to CSV files (save them to a shared network directory accessible to both systems). - Step 2: Import to SAP-2
UseSE16N(with edit mode) orLSMWto load the CSV files into the corresponding tables in SAP-2. - Step 3: Automate the workflow
Write a simple shell/PowerShell script to trigger the exports, transfer files (if needed), and run imports. Schedule this script via your OS’s task scheduler or SAP’s background job tools.
Pros: No coding required; quick to set up for one-off or very infrequent syncs.
Cons: Prone to formatting/encoding issues; less reliable for automated syncs compared to ABAP/SLT.
Final Recommendation
For your specific needs (small datasets, scheduled syncs, read-only target), the custom ABAP + RFC approach is the best balance of control, reliability, and simplicity. If you have SLT available, that’s a close second for low-code ease of use.
内容的提问来源于stack exchange,提问作者guettli

