Skip to Content
avatar image
Former Member

File to Idoc Nodes mapping

My sender File structure is like this..

MT_Sender

-Recordset 0 to Unbound

--Header 1 to 1

---field1

---field2

---fieldx

--GL_Account 0 to Unbound

---field1

---field2

---fieldx

---Cust_Item 0 to Unbound

-


field1

-


field2

-


fieldx

-


Curr_Item 0 to Unbound

-


field1

-


field2

-


fieldx

and I am mapping it to Idoc segments..

Here my confusion is for Header segment in Idoc I am mapping Header in my structure ..but it is giving mapping conversion error.

I tried node to node and Recordset to node both are giving error.

Can any one clear it NODE level mapping to IDOC structute.

ACC_document

IDOC

Begin

NODE1

NODE2

NODE3

NODEx

Regards,

Ramesh.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 15, 2009 at 10:04 AM

    If you tell us your mapping requirement then we can tell you how to map.

    try to Map Recordset to Idoc and Header to Node1

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi fatima,

      my requirement is to map

      Header to node1

      gl_acc to node2

      cust_item to node3

      curr_item to nodex

      also I mapped

      recordset to Idoc

      But it is giving error like this

      <SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_TEST1_: RuntimeException in Message-Mapping transformatio~</SAP:Stack>

      <SAP:Retry>M</SAP:Retry>

      Do you think it is relevent to node level mapping Error

      or something else..related with data.( but test data which iam using is creating Idoc in r3 manually)

      in mapping test XML recordset is coming like this

      <?xml version="1.0" encoding="UTF-8" ?>

      - xyz.com">

      - <Recordset>

      - <Header>

      BUT in Sxmb_moni payload is like this ...Is it fine

      <?xml version="1.0" encoding="utf-8" ?>

      - xyz.com">

      - xyz.com">

      - <Header>

      Regards,

      Ramesh.

  • avatar image
    Former Member
    Oct 15, 2009 at 11:27 AM

    ..Any inputs on it

    This info from sxmb_moni

    com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ACC_DOCUMENT03/IDOC. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at

    com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:406) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMapp.....

    SXMB_MONI payload is

    <?xml version="1.0" encoding="utf-8" ?>

    - xyz.com">

    - xyz.com">

    - <Header>

    <USERNAME>OBTE-MM</USERNAME>

    <COMP_CODE>2000</COMP_CODE>

    <DOC_DATE>20091015</DOC_DATE>

    <PSTNG_DATE>20091015</PSTNG_DATE>

    <DOC_TYPE>DR</DOC_TYPE>

    <REF_DOC_NO_LONG>7578</REF_DOC_NO_LONG>

    </Header>

    - <GL_account_item>

    <ITEMNO_ACC>0000000001</ITEMNO_ACC>

    <GL_ACCOUNT>0003101110</GL_ACCOUNT>

    <ACCT_TYPE>S</ACCT_TYPE>

    <DOC_TYPE>DR</DOC_TYPE>

    <COMP_CODE>2000</COMP_CODE>

    <FISC_YEAR>2009</FISC_YEAR>

    <PROFIT_CTR>0000002002</PROFIT_CTR>

    <DE_CRE_IND>H</DE_CRE_IND>

    </GL_account_item>

    - <Customer_Item>

    <ITEMNO_ACC>0000000002</ITEMNO_ACC>

    <CUSTOMER>0000000092</CUSTOMER>

    <COMP_CODE>2000</COMP_CODE>

    </Customer_Item>

    - <GL_Currency_Items>

    <ITEMNO_ACC>0000000001</ITEMNO_ACC>

    <CURR_TYPE>00</CURR_TYPE>

    <CURRENCY>INR</CURRENCY>

    <AMT_DOCCUR>6000</AMT_DOCCUR>

    </GL_Currency_Items>

    </ns:Recordset>

    </ns:MT_FI_SENDER>

    Regards,

    Ramesh.

    Edited by: Sreeramoju Ramesh on Oct 15, 2009 1:28 PM

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Ramesh, testing mapping will be tedious for you if you try it under sxmb_moni and every time you retrigger the message.

      Best way is to test the mapiing via test tab in message mapping.

      Now regarding your issue here I can see the sender data type has header which is mandate (1 to 1) map that to Acc_doc (also if the IDOC is customised ,we need to know the occurence of the IDOC as well), initial understading shows you are mapping header (1 to 1) to node 1, what about ACC_DOC (what is the occurence, is that a mandate field) , and check for occurence of fields in IDOC

  • avatar image
    Former Member
    Oct 15, 2009 at 12:07 PM

    I think you are not mapping source Message type to Target IDoc type as

     MT_Sender -----> ACC_document
    Recordset--->IDOC
    
    Header ------>NODE1
    GL_Account ---->NODE2
    Cust_Item --->NODE3
    Curr_Item---->NODEx
    

    that error occures when a mandatory element is not mapped properly.

    you have field1,field2,fieldx in each of the node(Header,GL_Account,Cust_Item,Curr_Item) and what about the fields in NODE1,NODE2,NODE3,NODEX.How are you mapping these fields?

    test you Mapping using test tab if you still get the error let me Know.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      The problem was I am maintained namespace for Recordset which is deviating the actual sturcture.

      Once I removed that scenario is working fine.

      Thanks for your inputs..

      Regards,

      Ramesh.