Skip to Content
avatar image
Former Member

How to generate a new segment in IDoc for multiple occurance of Control Num

Hi Experts,

In my scenario, i need to generate a new segment in IDoc(Target Structure) based on Control Number Field in the Source Structure.

The segment need to be created for multiple occurance of the Control Number.

Ex:

Control Number - 100 appears 5 times in Source Structure.This control Number is mapped to one of the Field in the Segment of IDoc.

Now my requirement is to generate the Segment 5 times with respective to this Control Number.

please help me out to resolve this issue.

Thanks,

Kish.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 30, 2007 at 09:44 AM

    Hi,

    At the target structure you can right click and say dublicate structure and create it 5 time and mapped the control no to that 5 structure.

    This is what you wanted.

    Thanks,

    Chirag Gohil

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Here is the XML Structure of my Source:

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

      <ns0:GoodsReceipt_MT xmlns:ns0="urn:WOL-com:XI:data:HJ:10">

      <row>

      <CONTROL_NUMBER>111</CONTROL_NUMBER>

      <LINE_NUMBER>1111</LINE_NUMBER>

      <CONTROL_NUMBER_2/>

      <OUTSIDE_ID/>

      <WH_ID>111111</WH_ID>

      <LOCATION_ID/>

      <HU_ID>11111</HU_ID>

      <NUM_ITEMS/>

      <ITEM_NUMBER>111111</ITEM_NUMBER>

      <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>

      <LOT_NUMBER>11111</LOT_NUMBER>

      <UOM>11111</UOM>

      </row>

      <row>

      <CONTROL_NUMBER>111</CONTROL_NUMBER>

      <LINE_NUMBER>12222</LINE_NUMBER>

      <CONTROL_NUMBER_2/>

      <OUTSIDE_ID/>

      <WH_ID>12222</WH_ID>

      <LOCATION_ID/>

      <HU_ID>1222</HU_ID>

      <NUM_ITEMS/>

      <ITEM_NUMBER>112222</ITEM_NUMBER>

      <TRAN_QTY>112222</TRAN_QTY>

      <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>

      <LOT_NUMBER>12222</LOT_NUMBER>

      <UOM>1122222</UOM>

      </row>

      <row>

      <CONTROL_NUMBER>222</CONTROL_NUMBER>

      <LINE_NUMBER>2222</LINE_NUMBER>

      <CONTROL_NUMBER_2/>

      <OUTSIDE_ID/>

      <WH_ID>22222</WH_ID>

      <LOCATION_ID/>

      <HU_ID>222222</HU_ID>

      <NUM_ITEMS/>

      <ITEM_NUMBER>2222222</ITEM_NUMBER>

      <TRAN_QTY>22222222</TRAN_QTY>

      <LOCATION_ID_2>33333333</LOCATION_ID_2>

      <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>

      <LOT_NUMBER>22222</LOT_NUMBER>

      <UOM>22222</UOM>

      </row>

      <row>

      <CONTROL_NUMBER>333</CONTROL_NUMBER>

      <LINE_NUMBER>3333</LINE_NUMBER>

      <CONTROL_NUMBER_2/>

      <OUTSIDE_ID/>

      <WH_ID>33333</WH_ID>

      <LOCATION_ID/>

      <HU_ID>33333</HU_ID>

      <NUM_ITEMS/>

      <ITEM_NUMBER>333333</ITEM_NUMBER>

      <TRAN_QTY>33333333</TRAN_QTY>

      <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>

      <LOT_NUMBER>33333</LOT_NUMBER>

      <UOM>333333</UOM>

      </row>

      </ns0:GoodsReceipt_MT>

      Now Control_Number 111 occurs 2 times, 222 & 333 occurs 1 time.

      Now one IDoc for 111,222 & 333 should be generated.

      But Control_number 111 appears 2 times.

      Now the data in the 2 rows should be passed to Single IDoc by repeating the segments inside the IDoc.

      As u said i changed the Occurance of IDoc to 0...unbound and imported as External Definition. I have done upto Generating IDoc for each unique Control_Number.

      I stuck up at repeating the Segments in the IDoc.

      So please help me out.

      Thanks,

      Kish.

  • avatar image
    Former Member
    Nov 30, 2007 at 09:46 AM

    Hello Kish

    Make use of standard message mapping function useOneAsMany.

    This will solve your problem.

    Good Luck

    Vijendra

    Add comment
    10|10000 characters needed characters exceeded