on 10-05-2009 7:17 PM
Hi Guys,
I have a filr to rfc scenario..
I created a Z table with ITAB in import tab and field names and then a BAPi using se37...
The BAPI source code is just one line
Modify Ztable from ITAB
I first tried wth input file having one record, and in scenario runs successfully to update the Z table, checked in se 16
Now when the input file has more than one record, but ZBAPI has just 1..1 ITAB tab
Ho can I do multiple inserts using the same rfc/bapi??
Regards,
Teja
Hi,
As Prateek suggested 2 opionts, so I think option 2 is best for your otherwise option 1 can lead into performance issues.
Make sure that you have declard your internal table ITAB as standard table of ztable. e.g.
DATA: ITAB type standard table of ztable,
WA_ITAB type ztable.
if you do like this and import the BAPI in XI then you can see the occurence of target has been changed as 0..unbounded
Finally, when you have multiple records in your internal table then loop on it and update the table. e.g.
Loop at itab into wa_itab.
Modify Ztable from WA_ITAB.
Clear:wa_itab.
Endloop.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to do an implicit commit in BAPI.
If there are multiple call of BAPI using RFC Adapter, all calls are made together and RFC adapter cannot COMMIT.
Check point *10: What's about BAPIs? *
in Note 730870 - FAQ XI 3.0/ PI 7.0/ PI 7.1/ PI 7.11/ PI 7.2 RFC Adapter
Regards
Suraj
Edited by: S.R.Suraj on Oct 6, 2009 9:29 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In your RFC i guess you have defined the ITAB as import structure...... Instead try having this as a table.
Reimport the RFC in XI and then do mapping. Here you can map the row node of your file structure to table node of RFC.
Hope this helps.
Regards,
Siddhesh S.Tawate
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Two ways:
1. If it is a text file and you use FCC, you may use option "Recordset per message'. If you specify 1, then each record will become a new message and RFC would be called multiple times.
2. To reduce number of RFC calls, you may use multimapping logic. Export RFC to local system as XSD, change the occurrence of root node and reimport it. Then you may map the occurrence of record to the RFC root node.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.