Skip to Content

Mapping element to node and make it repeat

hello,

I have to map from IDOC to xsd schema.

I have repeating segment in IDOC and I have repeating field in target structure (ReferenceID).

I have been told to map the repeating segment as well as other fields in the idoc to this repeating field.

Also I need to map the field value to the node and field name to the type attribute as shown.

I have done that but the idoc segments are not repeating in the target side.

Should I try node functions like SplitbyValue?

I have not mapped the repeat segment name , in this case, ZZCHARACTERISTICS 0...9999 to any node in the target structure. how will the target get all the values of this repeating segment ?

mapping.jpg (235.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 02, 2017 at 07:22 AM

    Hi,

    Just use removeContext for ZCHAR. Something like this:

    Test

    Regards,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 01, 2017 at 07:46 AM

    Can you provide a sample XML and expected output.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 01, 2017 at 05:51 PM

    IDOC INPUT-----------------

    <?xml version="1.0" encoding="UTF-8"?>
    <ZCREMAS05>
    <IDOC BEGIN="">
    <EDI_DC40 SEGMENT="">
    </EDI_DC40>
    <E1LFA1M SEGMENT="">
    <MSGFN>a</MSGFN>
    <LIFNR>a</LIFNR>
    <ANRED/>
    <BAHNS/>
    <BBBNR/>
    <BBSNR/>
    <BEGRU/>
    <LAND1>a</LAND1>
    <LNRZA/>
    <LOEVM>a</LOEVM>
    <NAME1>a</NAME1>
    <NAME2>a</NAME2>
    <NAME3>a</NAME3>
    <NAME4>a</NAME4>
    <ORT01>a</ORT01>
    <ORT02/>
    <PFACH/>
    <PSTL2/>
    <PSTLZ>a</PSTLZ>
    <REGIO/>
    <SORTL/>
    <SPERR/>
    <ZZCHARACTERISTICS SEGMENT="">
    <ZCLASS/>
    <ZCHAR>1.1</ZCHAR>
    <ZVALUE>1.2</ZVALUE>
    <ZDESCRIPTION/>
    </ZZCHARACTERISTICS>
    <ZZCHARACTERISTICS SEGMENT="">
    <ZCLASS/>
    <ZCHAR>2.1</ZCHAR>
    <ZVALUE>2.2</ZVALUE>
    <ZDESCRIPTION/>
    </ZZCHARACTERISTICS>
    </E1LFA1M>
    </IDOC>
    </ZCREMAS05>
    Current Output -------------------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:PACCARSupplier xmlns:ns0="paccar.procure-to-pay.supplier-management.supplier.v1.0">
    <ns0:ID>a</ns0:ID>
    <ns0:VATID/>
    <ns0:ReferenceID type="1.1">1.2</ns0:ReferenceID>
    <ns0:ReferenceID type="PurchashingBlockInd">a</ns0:ReferenceID>
    <ns0:ReferenceID type="SupplierName2">a</ns0:ReferenceID>
    <ns0:ReferenceID type="SupplierName3">a</ns0:ReferenceID>
    <ns0:ReferenceID type="SupplierName4">a</ns0:ReferenceID>
    <ns0:ReferenceID type="DeletionFlag">a</ns0:ReferenceID>
    <ns0:ReferenceID type="CreateChangeInd">a</ns0:ReferenceID>
    <ns0:ReferenceID type="CurrencyCd"/>
    <ns0:ReferenceID type="PaymentTerms"/>
    <ns0:ReferenceID type="ContractDeliveryTerms"/>
    <ns0:ReferenceID type="QualityApprvalInd"/>
    <ns0:Name>a</ns0:Name>
    <ns0:CoCNumber city="a">default</ns0:CoCNumber>
    <ns0:Language>a</ns0:Language>
    <ns0:WebSite>Website not available</ns0:WebSite>
    </ns0:PACCARSupplier>
    Requried Output ---------------------------------------------------------
    second record of ZZCHARACTERISTICS Segment should be seen
    -------------------------------------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:PACCARSupplier xmlns:ns0="paccar.procure-to-pay.supplier-management.supplier.v1.0">
    <ns0:ID>a</ns0:ID>
    <ns0:VATID/>
    <ns0:ReferenceID type="1.1">1.2</ns0:ReferenceID>
    <ns0:ReferenceID type="2.1">2.2</ns0:ReferenceID>
    <ns0:ReferenceID type="PurchashingBlockInd">a</ns0:ReferenceID>
    <ns0:ReferenceID type="SupplierName2">a</ns0:ReferenceID>
    <ns0:ReferenceID type="SupplierName3">a</ns0:ReferenceID>
    <ns0:ReferenceID type="SupplierName4">a</ns0:ReferenceID>
    <ns0:ReferenceID type="DeletionFlag">a</ns0:ReferenceID>
    <ns0:ReferenceID type="CreateChangeInd">a</ns0:ReferenceID>
    <ns0:ReferenceID type="CurrencyCd"/>
    <ns0:ReferenceID type="PaymentTerms"/>
    <ns0:ReferenceID type="ContractDeliveryTerms"/>
    <ns0:ReferenceID type="QualityApprvalInd"/>
    <ns0:Name>a</ns0:Name>
    <ns0:CoCNumber city="a">default</ns0:CoCNumber>
    <ns0:Language>a</ns0:Language>
    <ns0:WebSite>Website not available</ns0:WebSite>
    </ns0:PACCARSupplier>

    Add comment
    10|10000 characters needed characters exceeded