on 02-04-2014 8:22 AM
Hope this is a simple question. I have a remote enabled ECC function module that has import parameters and a list of items. But when I import this RFC into SAP PI repository the request/response part of the message are not what I expect. The list of items in only appears as a list of unbounded items in the response part.
Z_PO_CREATE
CUSTOMER_ID
CUSTOMER_ORDERNO
ORDERITEMS
item (unbounded)
MATERIALID
QTY
MEINS
The message mapping will of course only allow me to select either the Request part of the RFC or the Response part of the RFC. The Request part does not have ORDERITEMS.item as unbounded list. The Response part only contains the ORDERITEMS.item unbounded list.
I need to pass into SAP ECC the Customer#, CustomerOrder# and a list of Items. How do I do this with an RFC?
Hi
yes should have also said that I have done the mapping and can map the ORDERITEMS.items
But the problem I see is when the items are passed to the SAP ECC RFC they appear empty.
I have unit tested the message mapping and it prepares message correctly.
<?xml version="1.0" encoding="UTF-8"?>
<ns1:ZRH_TESTHARNESS_PO_CREATE xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
<CUSTOMER_ID>0004567890</CUSTOMER_ID>
<CUSTOMER_ORDERNO>TEST412</CUSTOMER_ORDERNO>
<VENDOR>Vendor1</VENDOR>
<ORDERITEMS>
<item>
<MATERIALID>Bike</MATERIALID>
<QTY>1</QTY>
<MEINS>EA</MEINS>
</item>
<item>
<MATERIALID>Bus</MATERIALID>
<QTY>1</QTY>
<MEINS>EA</MEINS>
</item>
</ORDERITEMS>
</ns1:ZRH_TESTHARNESS_PO_CREATE>
I have set a session debug in SAP ECC and when I use my SAP PI ICO scenario to actually call this I can see in SAP ECC debug mode and the items are empty !. Why do you think is happening ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
the ABAP RFC only has ORDERITEMS. The loop is correct. In any case I can see that it is empty.
(The RFC adapter should look after moving the XML message ORDERITEMS.item into the appropriate ABAP function module "format" - that is into the import table of ORDERITEMS.)
So why the ORDERITEMS in the called RFC is empty is a mystery that needs solving.
Hi Jonny,
I've noticed that you are using a ZRFC, have you included the tables metadata lately?, sometimes the PI caches the last metadata used, have you tried to clear the cpa cache? (http://host:50000/CPACache/refresh?mode=full with pidiruser)
Regards.
Hi Jonny - The default view doesn't show the occurence field of the RFC.
However you can go to WSDL tab and search for the field "item", you'll able to find the below..
<xsd:element name="item" type="ZRH_TH_ORDERITEM" minOccurs="0" maxOccurs="unbounded" />
So you can use the request structure without any issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonny,
I think it is only a visualization problem because in the request you are not showing the occurrences column. When you import a variable in Tables tab the PI always takes this variable tab like unbounded. Please, try now to use the Request RFC in a message mapping and you will see OrdersItem will be unbounded. Also, the item tag in the RFC metadata is a clue, because PI create automatically the item tag to deal with tables (unbounded max occurrences).
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.