Topic
1 reply Latest Post - ‏2008-01-02T17:49:49Z by csaba
brittany_lazarski
brittany_lazarski
1 Post
ACCEPTED ANSWER

Pinned topic Need help with RFC call sending a table!!

‏2007-12-06T18:01:05Z |
We are making an RFC call from Portlet Factory, however, we are not getting back the output we expect. We are able to connect to the RFC successfully because we are getting a return message from the RFC in the Exports stating "Connection was successful". Portlet Factory generated the variables from the RFC schema (one of which is a Tables variable since the RFC expects a table). Below shows the schema that is generated.

<xsd:element name="Tables">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="sap:IN_DETAIL" minOccurs="1" maxOccurs="1" />
<xsd:element ref="sap:OUT_DETAIL" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="IN_DETAIL">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="sap:ZPAMARGIN_IN" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ZPAMARGIN_IN">
<xsd:complexType>
<xsd:sequence>
<xsd:element type="xsd:string" name="MATNR" />
<xsd:element type="xsd:string" name="VKORG" />
<xsd:element type="xsd:string" name="SPART" />
<xsd:element type="xsd:string" name="VTWEG" />
<xsd:element type="xsd:string" name="REQ_PRICE" />
<xsd:element type="xsd:string" name="COST" />
<xsd:element type="xsd:string" name="PRICE2" />
<xsd:element type="xsd:string" name="MIN_GM" />
<xsd:element type="xsd:string" name="WAERS" />
<xsd:element type="xsd:string" name="UNID" />
<xsd:element type="xsd:string" name="OVR_FLG" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="OUT_DETAIL">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="sap:ZPAMARGIN_OUT" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ZPAMARGIN_OUT">
<xsd:complexType>
<xsd:sequence>
<xsd:element type="xsd:string" name="STATUS" />
<xsd:element type="xsd:string" name="GRS_MARGIN" />
<xsd:element type="xsd:string" name="MIN_GM" />
<xsd:element type="xsd:string" name="COST" />
<xsd:element type="xsd:string" name="PRICE2" />
<xsd:element type="xsd:string" name="UNID" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
We are setting the Tables variable (called getGrossMarginData_Tables) to this value below and then executing:
<Tables>
<IN_DETAIL><item>
<ZPAMARGIN_IN>
<MATNR>Y123</MATNR>
<VKORG>10</VKORG>
<SPART>2</SPART>
<VTWEG>99</VTWEG>
<REQ_PRICE>4.25</REQ_PRICE>
<COST>3.00</COST>
<PRICE2></PRICE2>
<MIN_GM>5.00</MIN_GM>
<WAERS>USD</WAERS>
<UNID>12341234123412341234123412341234</UNID>
<OVR_FLG>1</OVR_FLG>
</ZPAMARGIN_IN></item>
</IN_DETAIL>
<OUT_DETAIL />
</Tables>
</transaction>

In return, we expect to get "OUT_DETAIL" within the Tables variable filled in with data. However, we are just getting back: <Tables><IN_DETAIL /><OUT_DETAIL /></Tables>.

We are able to call this RFC with the same XML data via another tool we have, and we get the OUT_DETAIL filled in with data, so we are wondering if this issue is related to Portlet Factory. We are wondering if there is a tag that we are missing or a different structure we are supposed to be using when calling an RFC from here.
Updated on 2008-01-02T17:49:49Z at 2008-01-02T17:49:49Z by csaba
  • csaba
    csaba
    1 Post
    ACCEPTED ANSWER

    Re: Need help with RFC call sending a table!!

    ‏2008-01-02T17:49:49Z  in response to brittany_lazarski
    Make sure you check "Use Table as Input" in the SAP builder.