on ‎2007 Apr 17 2:54 AM
I need to call an SAP FM and pass it a table as an input. How is this done??
Message was edited by:
David Tompkins
Request clarification before answering.
I am still having difficulty. I am not trying to send a table to an xMII transaction, rather I am trying to pass a table to SAP from an xMII transaction. I tried creating an xMII document and populating it with the ROW action and a repeater. When I called the JCO action I appended the document's /Rowsets/Rowset/Row xml to the /L_INV_COUNT_EXT/TABLES/S_LINV/item xml. I used the Append After XML link type. It did not work. Both document have the same column names but the xMII document contains a subset of the FM columns.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do you intend to call this xMII transaction? A Web Page using an Xacute Query? If that is the case then the thread Srinivas pointed you to should help .
Instead of the Illum Doc you need to build an xml structure which looks like
<S_LINV>
<Item>
<>
</item>
<Item>
<>
</Item>
</S_LINV>.
This structure can be built on your web page using Java Script Functions.
Once you have this structure ready you can follow the sequence -
1. Call the BAPI (Do not execute/commit) so that you have the blank schema of the BAPI request/response xml.
2. Use an assignment block use "remove XML" and link remove xml to the <S_LINV> node of the request xml ( JCO Action).
3. Use a second assignment to "append XML" to the <TABLES> node of the request xml . Here you would be appending the xml structure that I mentioned above.
4. Use a new JCO Action (calling the same BAPI) [this is the one that would execute]. Link the Request of the earlier JCO Action (mentioned in sequence 1) to the Request of the new JCO Action and you are done.
Your current approach is not working as the two xml schemas you are dealing with are very different and hence you are not able to find the right mix even after doing an append/append after XML.
Hope this is helpful.
This is exactly the type of thing I am trying to do -- it makes sense in theory but I am having trouble with the implementation. One difference is that I am not using a JCO connector. I am using a business connector block in xMII 11.0. Will this technique still work? If so, I am not sure how to have a BC action that doesn't execute. If it would help to know exactly what I am calling, it is the rfc BAPI_PBSRVAPS_GETDETAIL2 in the APO system and I am trying to pass multiple GROUP BY characteristics. If I can get this technique to work for that, I will also apply it to a few other inputs. Thanks much!
I have never had a chance to use the BC action but I think what you can do is use the SAP Interface Repository action [is this available in 11.0?] to build the Reference and then follow the same steps as above.
Even if this is unavailable then you can follow the same steps as above - in the Incoming tab of the Link editor for the BC Action first remove the required XML node and as a second step append the built XML structure. I am sure it'll behave the same.
I was able to get this working in 11.5 but am really struggling in 11.0 since I can't find an option anywhere that allows you to indicate that the BC action should not execute. Even when I allow the first BC action to execute anyway, when I get to the second BC action, where I've assigned the request from the first action to the second action, I get an error attempting to connect to SAP. Any suggestion on where to go from here? Thanks!
I don't recall seeing an interface repository action. Yes, you can assign a reference document but those are pretty much dictated for us. But, I did get this working in 11.0. I just set the timeout for the first BC action to zero. The steps for removing and then appending the XML work the same as does the final step where you link the request from the first BC action to the second BC action. We are working on our upgrade to 11.5 but we have several issues to work through there. Thanks very much for getting me on track.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
David,
You can create a table structure internally in your transaction using the Illum Doc.
Configure the Doc with column, and add rows using Illum Row that references the Doc you have created.
In case of multiple rows, have a repeater that is configured to each row of the Doc Output XML
Now make your BAPI call and map the repeater output to appropriate columns in BAPI
In case you are passing a table at run time from a html page, this thread has information about it...
Hope this helps you...
Regards,
Ajitha
Reward points if you find the answers helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Retrieve the table parameters by query, call the SAP FM RFC/BAPI and map the params to the BAPI input with commit activated.
Also please specify your issue more specific
Regards
Guru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
You can call SAP FM through RFC call.
Find out particular BAPI for this transaction and once you identify than you can map table parameters to BAPI fiels.
Table can be saved in XML format using following action blocks.
XML DOC ,ROW,DATA and Repeater.
Regards
Ramshanker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.