Skip to Content
author's profile photo Former Member
Former Member

jCo RFC Structure

I am attempting to call a custom RFC fm from MII using the jCo interface action block. The request structure/document for the RFC is shown below as a trace of the jCo request document

<Z_MM_PO_RECEIPT2>

<INPUT>

<COMMENTS>comments go here</COMMENTS>

<DELIVERY_NOTE>tick num</DELIVERY_NOTE>

<DOC_HDR_TXT>orign wgt cert</DOC_HDR_TXT>

<INTERN_ERROR_HANDLE/>

<MII_USER_ID>SCOTTL</MII_USER_ID>

<PHYS_RECV_PLANT>F100</PHYS_RECV_PLANT>

<POST_DATE>2014-01-03</POST_DATE>

<PO_NUMBER>4800012342</PO_NUMBER>

<PO_RECEIPT>

<item>

<PO_LINE_ITEM>00001</PO_LINE_ITEM>

<MATNR>126186</MATNR>

<COM_QTY>

<item>

<QUANTITY>1</QUANTITY>

<LOT_NUMBER/>

<EXPIRATION_DATE>1900-01-01</EXPIRATION_DATE>

</item>

</COM_QTY>

<COM_UOM>LB</COM_UOM>

<COM_STORAGE_LOC>B1</COM_STORAGE_LOC>

<PHYS_QTY>

<item>

<QUANTITY>1</QUANTITY>

<STORAGE_LOC>B1</STORAGE_LOC>

<LOT_NUMBER/>

<EXPIRATION_DATE>1900-01-01</EXPIRATION_DATE>

</item>

</PHYS_QTY>

<PHYS_UOM>LB</PHYS_UOM>

<INFO_QTY>

<item>

<QUANTITY>1</QUANTITY>

<STORAGE_LOC>B1</STORAGE_LOC>

<LOT_NUMBER/>

<EXPIRATION_DATE>1900-01-01</EXPIRATION_DATE>

</item>

</INFO_QTY>

<INFO_UOM>LB</INFO_UOM>

</item>

</PO_RECEIPT>

<PO_RECV_PLANT>F100</PO_RECV_PLANT>

<SIMULATE/>

</INPUT>

</Z_MM_PO_RECEIPT2>

When I execute this function the response document indicates I didn't pass in any data for sub structures <COM_QTY>, <PHYS_QTY> and <INFO_QTY>. Trace of response document below

<Z_MM_PO_RECEIPT2>

<INPUT>

<COMMENTS>comments go here</COMMENTS>

<DELIVERY_NOTE>tick num</DELIVERY_NOTE>

<DOC_HDR_TXT>orign wgt cert</DOC_HDR_TXT>

<INTERN_ERROR_HANDLE>X</INTERN_ERROR_HANDLE>

<MII_USER_ID>SCOTTL</MII_USER_ID>

<PHYS_RECV_PLANT>F100</PHYS_RECV_PLANT>

<POST_DATE>2014-01-03</POST_DATE>

<PO_NUMBER>4800012342</PO_NUMBER>

<PO_RECEIPT>

<item>

<PO_LINE_ITEM>00001</PO_LINE_ITEM>

<MATNR>126186</MATNR>

<COM_QTY/>

<COM_UOM>LB</COM_UOM>

<COM_STORAGE_LOC>B1</COM_STORAGE_LOC>

<PHYS_QTY/>

<PHYS_UOM>LB</PHYS_UOM>

<INFO_QTY/>

<INFO_UOM>LB</INFO_UOM>

</item>

</PO_RECEIPT>

<PO_RECV_PLANT>F100</PO_RECV_PLANT>

<SIMULATE/>

</INPUT>

<OUTPUT>

<MATDOC_LIST/>

<MESSAGES>

<item>

<TYPE>E</TYPE>

<ID>Z1</ID>

<NUMBER>999</NUMBER>

<MESSAGE>Fail: Missing origin quantity.</MESSAGE>

<LOG_NO/>

<LOG_MSG_NO>000000</LOG_MSG_NO>

<MESSAGE_V1>Fail: Missing origin quantity.</MESSAGE_V1>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4/>

<PARAMETER/>

<ROW>0</ROW>

<FIELD/>

<SYSTEM/>

</item>

</MESSAGES>

<STATUS>F</STATUS>

</OUTPUT>

</Z_MM_PO_RECEIPT2>

I've seen a few threads where people said they had trouble with complex input structures when using custom RFC's. Is this something that should be possible? If so can anyone provide some insight as to what I am doing wrong?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Jan 08, 2014 at 09:40 PM

    I don't think you are doing anything wrong. I don't know if it is at the xMII level or the underlying JCo level but at this time that functionality seems to not be supported. I haven't personally tried complex or table type inputs in version 14 yet though.

    Regards,
    Christian

    Add a comment
    10|10000 characters needed characters exceeded

    • Lucas, Passing deep structure to an RFC is not a problem at all. It works fine.

      May be you need to check on other things about data type or length of the structure or table defined in RFC.

      Can check your below fields work fine when you execute RFC with test data in ERP?

      <COM_QTY>, <PHYS_QTY> and <INFO_QTY>

      Also If you are changing structure or any fields of RFC it wont reflect until you do an restart of MII.

      May be if you see this SAP note 0001479970 or check below thread

  • Posted on Jan 09, 2014 at 07:20 AM

    Hi Lucas,

    Which version of MII are you using?

    As I can see from your request document, all the 3 items that have problem are complex 'Tables' containing nested 'Structure' nodes.

    A bug fix for complex nested structures and tables was made in MII 14.0 SP2 Patch1, where the issue was similar to your case. Please try upgrading to that version and let me know if that helps.

    Regards,

    Rutika Bodas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2014 at 06:10 AM

    Hi Lucas,

    As per trace information, custom RFC FM has designed such way like, if one of quantity missing then it has to return error message as below.

    <item>

    <TYPE>E</TYPE>

    <ID>Z1</ID>

    <NUMBER>999</NUMBER>

    <MESSAGE>Fail: Missing origin quantity.</MESSAGE>

    <LOG_NO/>

    <LOG_MSG_NO>000000</LOG_MSG_NO>

    <MESSAGE_V1>Fail: Missing origin quantity.</MESSAGE_V1>

    So ask SAP Technical Consultant (Abaper) about what validation he has keep in Custom FM and pass accordingly.

    And there wont be any problem from SAP end as of my knowledge, because XML will generate based on RFC FM Import, Export and Table Parameters.

    Onemore important point regarding RFC FM is

    1. FM Import & table Parameters are visible as Request in Jco Action block

    2. FM Export & table Parameters are visible as Response in Jco Action block

    Regards,

    Praveen Reddy

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2014 at 04:59 PM

    Thanks all for the info.

    We are using MII version 12.2 and don't have any immediate plans to upgrade to 14.0.

    The function module works fine in ECC se37 when executing with the same data and I have verified with the abap programmer that all required fields were sent.

    I also cleared the jCo cache using http://<IP>:<PORT>/XMII/JCOProxy?Mode=Reset

    We have decided to re-design the custom RFC to not use nested structures.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.