on 06-09-2021 6:24 PM
Hi All,
I am working on POC to execute call to BAPI from data services.
SCENARIO: For this scenario the source is a text file with 8 lines representing 8 unique records that need to eventually update a custom( Y) table in SAP via BAPI.
DETAILS:
This is how the Data Flow looks like.
This is the source file with 8 records
The first Query Transform (QUERY_NEST). This is just creating a dummy table structure with one to one mapping to the data coming from the file ( source).
Next Query transform maps the table data from QUERY_NEST to table input I_MISC_SETTING_RECS of BAPI ( YDSF_LOAD_SETTINGS.
RFC: Only TABLE parameters defined no IMPORT/EXPORT
The RETURN structure from BAPI call query transport is mapped to another Query transform ( QUERY_UNNEST) to map data to another dummy structure which is eventually pushed to a flat file.
ISSUE: In this POC the BAPI is getting executed 8 times ( corresponding to the number of rows in the source file ) when the DATA FLOW (DF) executes from data services.
I have looked at below blog but still don't know where i am going wrong.
https://blogs.sap.com/2012/07/23/calling-rfc-bapi-within-sap-data-services/
Thanks in advance.
Vivek
Try using the Row_Generation transform to generate a single row under which you nest the input from your flat file. Then execute the BAPI in a subsequent query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Rich,
That resolved my issue. Below are steps i took to make this work.
1. Add a row generation transform with starting row = 1.
2. Updated the QUERY_NEST transform to nest the input from source file under ROW_ID column. Here i was struggling with restricting the row generation to work ( increment from 1 to n ) finally got it working by only selection 'Row_Generation' as the source under FROM tab.
3. Set a WHERE restriction to only execute the JOB for ROW_ID = 1
User | Count |
---|---|
68 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.