<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Populating IDOC child segment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-idoc-child-segment/m-p/2449644#M548906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;   I am using HRMD_A message Type IDOC type HRMD_A06.I have added a child segment under Segment E1P0105.&lt;/P&gt;&lt;P&gt;I want to populate the  child segment with data from z field in PA0105.&lt;/P&gt;&lt;P&gt;Please tell me how do I do this?&lt;/P&gt;&lt;P&gt;In which user exit do i write the required code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2007 16:21:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-05T16:21:08Z</dc:date>
    <item>
      <title>Populating IDOC child segment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-idoc-child-segment/m-p/2449644#M548906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;   I am using HRMD_A message Type IDOC type HRMD_A06.I have added a child segment under Segment E1P0105.&lt;/P&gt;&lt;P&gt;I want to populate the  child segment with data from z field in PA0105.&lt;/P&gt;&lt;P&gt;Please tell me how do I do this?&lt;/P&gt;&lt;P&gt;In which user exit do i write the required code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 16:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-idoc-child-segment/m-p/2449644#M548906</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T16:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Populating IDOC child segment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-idoc-child-segment/m-p/2449645#M548907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For inbound IDoc, you can use user exits EXIT_SAPLRHA0_003 of FM IDOC_INPUT_HRMD.&lt;/P&gt;&lt;P&gt;For outbound IDoc, you can use user exits EXIT_SAPLRHA0_001 of FM RH_MASTER_IDOC_DISTRIBUTE_HRMD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try something like this for inbound IDoc.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...

DATA: WA_E1P0105 LIKE E1P0105,
      L_IDX TYPE i.

CHECK IDOC_CONTRL-DOCTYP = 'HRMD_A06'.

LOOP AT IDOC_DATA.
  CASE IDOC_DATA-SEGNAM.
    WHEN ' E1P0105'.
      MOVE: IDOC_DATA-SDATA TO WA_E1P0105,
            &amp;lt;zfield&amp;gt; TO WA_E1P0105-&amp;lt;segment name&amp;gt;,
            WA_E1P0105 TO IDOC_DATA-SDATA.
      DESCRIBE TABLE IDOC_DATA LINES L_IDX.
      MODIFY IDOC_DATA INDEX L_IDX.
  ENDCASE. 
ENDLOOP.

...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For outbound IDoc, please replace IDOC_CONTRL with T_COMM_CONTROL and IDOC_DATA with T_IDOC_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 17:33:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-idoc-child-segment/m-p/2449645#M548907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T17:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Populating IDOC child segment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-idoc-child-segment/m-p/2449646#M548908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;First you have to add the child segement to the idoc type.&lt;/P&gt;&lt;P&gt;For this go to we30 and go to the idoc type required.&lt;/P&gt;&lt;P&gt;Then place the cursor on the segment for which you want to create the child segement and press the &amp;lt;b&amp;gt;create&amp;lt;/b&amp;gt; icon then select the radio button add &amp;lt;b&amp;gt;segment type as child&amp;lt;/b&amp;gt;.In this way you can add child segement to your segement.&lt;/P&gt;&lt;P&gt;In idoc after every segement filling we have a user-exit.You have to find the user-exit and in this user-exit you have to write the code to fill the child segement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;shyla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 03:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-idoc-child-segment/m-p/2449646#M548908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T03:35:19Z</dc:date>
    </item>
  </channel>
</rss>

