<?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 Re: IDOC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2340167#M515654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;supriya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get custom fields on IDOC you need to add custom segment on IDOC and for that you have to create a extension IDOC with reference to Basic IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do that as explain below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here for example you have basic idoc ORDERS05 and you want to add additional segments at header level - ZE1EDK01 and line item level ZE1EDP01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. TCode - WE31 : Create custom segments ZE1EDK01 and ZE1EDP01 with the fields you want and release these segments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. TCode - WE30 : Create extension IDOC&lt;/P&gt;&lt;P&gt;- In WE20 enter extension IDOC name - ZORDERS05, select "Extension" option and hit "create" button. When it gives pop-up, select "create new" and enterd linked basis type as "ORDERS05". Enter proper description and save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. On the next screen of WE30, select the segment under which you want to add your additional segment. Save everything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. TCode - WE82. Here you link extension idoc to basic idoc and message type.&lt;/P&gt;&lt;P&gt;- Go into change mode. Hit "New entries button" Enter Message type = "ORDERS", basic type = "ORDERS05" and extension type = "ZORDERS05". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can populate this segment and fields you want using the user-exit available in that perticular IDOC processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some common user-exits are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Purchase Order IDOC: ORDERS05&lt;/P&gt;&lt;P&gt;Enhancement: MM06E001 - User exits for EDI inbound and outbound purchasing documents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Quotation IDOC: ORDERS05&lt;/P&gt;&lt;P&gt;Enhancement: VEDE0001 - SD EDI Outbound quotation (customer enhancement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Invoice IDOC ( bill. doc): INVOIC02&lt;/P&gt;&lt;P&gt;Enhancement: LVEDF001 - User exit for IDOC_OUTPUT_INVOICE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know what message type, process code, idoc type you are using and i will tell you what user-exit you can use for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~~Guduri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2007 13:00:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-19T13:00:11Z</dc:date>
    <item>
      <title>IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2340165#M515652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the USER &amp;lt;b&amp;gt;EXIT EXIT_SAPLVEDF_002&amp;lt;/b&amp;gt; I want to add 2 fields to a &amp;lt;b&amp;gt;Segment&amp;lt;/b&amp;gt;.Can someone tell e how to do that??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 15:07:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2340165#M515652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T15:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2340166#M515653</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;Please check this sample codes from other thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*----------------------------------------------------------------------*
* INCLUDE ZXEDFU02 *
*----------------------------------------------------------------------*
data: ls_ka1 like e1edka1,
ls_edidd like edidd,
l_lines type i.

describe table int_edidd lines l_lines.

check l_lines ne 0.

read table int_edidd into ls_edidd index l_lines.

check ls_edidd-segnam eq 'E1EDKA1' and
ls_edidd-sdata(2) eq 'RS'.

ls_ka1-parvw = 'ZC'.

case xvbdkr-bukrs.
when '1000'.
ls_ka1-lifnr = '41010005823845840'.
when others.

exit.
endcase.

ls_edidd-sdata = ls_ka1.
append ls_edidd to int_edidd. 
&lt;/CODE&gt;&lt;/PRE&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>Mon, 18 Jun 2007 15:10:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2340166#M515653</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-06-18T15:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2340167#M515654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;supriya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get custom fields on IDOC you need to add custom segment on IDOC and for that you have to create a extension IDOC with reference to Basic IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do that as explain below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here for example you have basic idoc ORDERS05 and you want to add additional segments at header level - ZE1EDK01 and line item level ZE1EDP01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. TCode - WE31 : Create custom segments ZE1EDK01 and ZE1EDP01 with the fields you want and release these segments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. TCode - WE30 : Create extension IDOC&lt;/P&gt;&lt;P&gt;- In WE20 enter extension IDOC name - ZORDERS05, select "Extension" option and hit "create" button. When it gives pop-up, select "create new" and enterd linked basis type as "ORDERS05". Enter proper description and save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. On the next screen of WE30, select the segment under which you want to add your additional segment. Save everything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. TCode - WE82. Here you link extension idoc to basic idoc and message type.&lt;/P&gt;&lt;P&gt;- Go into change mode. Hit "New entries button" Enter Message type = "ORDERS", basic type = "ORDERS05" and extension type = "ZORDERS05". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can populate this segment and fields you want using the user-exit available in that perticular IDOC processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some common user-exits are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Purchase Order IDOC: ORDERS05&lt;/P&gt;&lt;P&gt;Enhancement: MM06E001 - User exits for EDI inbound and outbound purchasing documents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Quotation IDOC: ORDERS05&lt;/P&gt;&lt;P&gt;Enhancement: VEDE0001 - SD EDI Outbound quotation (customer enhancement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Invoice IDOC ( bill. doc): INVOIC02&lt;/P&gt;&lt;P&gt;Enhancement: LVEDF001 - User exit for IDOC_OUTPUT_INVOICE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know what message type, process code, idoc type you are using and i will tell you what user-exit you can use for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~~Guduri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 13:00:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc/m-p/2340167#M515654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T13:00:11Z</dc:date>
    </item>
  </channel>
</rss>

