cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping File to IDOC

Former Member
0 Kudos

Hi Guys,

               I am mapping an xml file to ORDERS05 IDOC.

When I am mapping to Items segment E1EDP01, how to count no. of line items in a order and also how to count no. orders in a xml file.

I have to map the item number to E1EDP01-POSEX in an increasing order.. like 10.. 20.. ...

if you have any documents for IDOC mapping.. please send to me.

Cheers

Sam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I have to map the item number to E1EDP01-POSEX in an increasing order.. like 10.. 20.. ...

that is very simple by using Standard function "Counter" of Arithmetic function group

Item ->  E1EDP01

Counter -> POSEX

In Counter  -> Initial value 10 and incremental value 10

Former Member
0 Kudos

do I also has to assign the number of records count to E1EDP01 ?!

Former Member
0 Kudos

not required, map direclty orders node to DK01, items node to DP01

Former Member
0 Kudos

do I also has to assign the number of records count to E1EDP01 ?!

no need to map the count to  E1EDP01.

just simply map  what was i posted early .

Item ->  E1EDP01

Counter -> POSEX

In Counter  -> Initial value 10 and incremental value 10

Answers (2)

Answers (2)

Former Member
0 Kudos

line item node in XML --> E1EDP01

line item node in XML --> INDEX function (set initial value and increment to 10) --> E1EDP01-POSEX

rajasekhar_reddy14
Active Contributor
0 Kudos

it depends on how your XML document strcutured, based on that only you can complete the mapping.

Better to get only sample payload from source system people based on that you can define mapping logic.

request functional team to provide mappig document.

Former Member
0 Kudos

Well.. say a xml file has 2 orders and each one has 10 items, in that case do I directly map the orders and items into IDOC structure or I have to count no. of orders and assign it to the segment header say E1EDK01 and items to E1EDP01. or I use count function.

The xml structure is pretty simple..

<Orders>

    <OrderNo>..

      ......

       <Items>

           <ItemDetails>

           ......