Skip to Content
avatar image
Former Member

Mapping from File to IDoc with multiple Idocs and multiple line items?

Hi All,

Need some help with mapping, requirement as below: I have a flat file with multiple records, need to create multiple idocs per each separate order in flat file with as many line items.

Order_1 field-1 field-2 field-3 field-4

Order_1 field-1 field-2 field-3 field-4

Order_2 field-1 field-2 field-3 field-4

Order_2 field-1 field-2 field-3 field-4

Order_3 field-1 field-2 field-3 field-4

Order_3 field-1 field-2 field-3 field-4

I have imported IDoc changed to 1:Unbounded, able to create multiple Idocs based on separate order from flat file.

Order_No - removeContexts - splitByValue(ValueChanged) - collapseContexts - exists - creatIf - IDOC

Now I am having hard time creating a line item segment E1EDP01. I want to have Idoc created below way:

IDoc-1 (Order_1)

E1EDP01

E1EDP01

IDoc-2 (Order_2)

E1EDP01

E1EDP01

IDoc-3 (Order_3)

E1EDP01

E1EDP01

I am getting multiple IDocs created. Please help me to create mutlieple line items under each Idoc. Please be speficic about the node funtions to be used, because I tried many times with different combinations, didn't work.

Regards,

N@v!n

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 29, 2010 at 03:56 AM

    Hi Navin,

    Create your source structure like below

    <Order>1 to unbounded

    <Order_No>

    <field1>

    <field2>

    <field3>

    <field4>

    </oder>

    to create mutiple IDocs based on order number,use below logic

    Order_No-->removecontexts--->sort--->splitbyvalue(Valuechange)--->collapsecontext-->Idoc

    use below logic for E1EDPO1,

    Order----->removecontexts------>
                                                                                    formatByexample------>E1EDP01
     Order_No-->removecontexts--->sort--->splitbyvalue(Valuechange)-------->

    try above logic and let me know if you any issues.

    Regards,

    Raj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 28, 2010 at 09:42 PM

    HI,

    Any help on this would be appreciated. Need to create a multiple Idocs (ORDERS05) based on order number change in source file, and mutiple line item segments (E1EDP01) for each order number in the source file.

    Please let me know node funtions that I could use to generate multiple line item segments.....

    Regards,

    N@v!n

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 29, 2010 at 05:31 AM

    Hi,

    You can create an intermediate structure and then map it to Idoc. Like this::

    <SingleOrderData> // 0 .... unbounded

    <OrderNo/> // Header Fields

    <LineItem> // 0...unbounded LineItem Fields which can be mapped to E1EDP01

    .

    .

    </LineItem>

    </SingleOrderData>

    So you will have to create 2 mappings.

    1. Source to IntermediateStructure

    2. Intermediate to Target(Idoc)

    Your Operation mapping will contain these 2 mappings in the same order.

    Add comment
    10|10000 characters needed characters exceeded