<?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: extending an idoc in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208424#M764824</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanjana,&lt;/P&gt;&lt;P&gt;   Here is the link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi Kanth Talagana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Dec 2007 00:23:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-27T00:23:12Z</dc:date>
    <item>
      <title>extending an idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208422#M764822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus,&lt;/P&gt;&lt;P&gt;there is standard idoc type orders05&lt;/P&gt;&lt;P&gt;but how do i make a customized idoc out of it.&lt;/P&gt;&lt;P&gt;i need to create an idoc with type orders05 with added functionality, how do i do this.&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2007 20:34:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208422#M764822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-26T20:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: extending an idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208423#M764823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sanjana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you trying to do? Do you want to extend an IDOC or Create a brand new IDOC based on an existing one and add new fields to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to take different routes for both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually enhancement takes place when the content in IDocs provided by SAP are not sufficient for the business process. IDoc extension can take place whenever dictionary table has a new structure appended required by the business process.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In brief IDoc extension takes place when extra fields are required for the business process. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are creating a new IDOC.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create segment (WE31)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course it will have naming convention for different company. Here are some tips:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you copy from existing or std segment eg: Z1E1EDP01_01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not you can just put Z1&amp;#133;.but this is only the example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Create IDOC Types (WE30)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Create message type (WE81)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Link message type with basic type (WE82)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Create FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the FM all the attributes should be the same for Inbound or Outbound. Basically you can get an example from the std FM eg: Inbound - IDOC_INPUT_DELVRY&lt;/P&gt;&lt;P&gt;Outbound - IDOC_OUTPUT_SHPMNT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6) Create Process Code (Inbound - WE41/ Outbound - WE42)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTANT: Before you key in the FM, you are required to add the FM in this table V_TBD51.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7) Link FM with Basic Type&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;le'me know if you need more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinodh Balakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2007 20:53:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208423#M764823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-26T20:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: extending an idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208424#M764824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanjana,&lt;/P&gt;&lt;P&gt;   Here is the link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi Kanth Talagana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2007 00:23:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208424#M764824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-27T00:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: extending an idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208425#M764825</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;plz check these links ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter transaction WE30 (ALE-&amp;gt;Extension-&amp;gt; IDOC types-&amp;gt;Maintain Idoc type)&lt;/P&gt;&lt;P&gt;- Type in your name of the extended IDOC type (usually starting with 'Z') and click on the Basic IDoc type, click the create icon. &lt;/P&gt;&lt;P&gt;- Click on Create new and enter a description and press enter.&lt;/P&gt;&lt;P&gt;- Click on ZIDOCTYPE01 and then on the Create icon.&lt;/P&gt;&lt;P&gt;- Enter ZIDOCTYPE as the segment type, click on Segment Editor.&lt;/P&gt;&lt;P&gt;- Enter a description for your segment type and create.&lt;/P&gt;&lt;P&gt;- Enter a description for your segment, enter each field required in your IDoc and press enter to validate.&lt;/P&gt;&lt;P&gt;- Save and generate, press back&lt;/P&gt;&lt;P&gt;- To release the segment choose Goto, Release from the menu.&lt;/P&gt;&lt;P&gt;- Check the box on the line of your segment.&lt;/P&gt;&lt;P&gt;- Save, back and enter.&lt;/P&gt;&lt;P&gt;- Your Idoc type structure should be displayed with your new segment.&lt;/P&gt;&lt;P&gt;- Save and back.&lt;/P&gt;&lt;P&gt;- To release the Idoc type choose Extras, Release type from the menu and Yes.&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;Sana.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points for helpful answers..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2007 04:20:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208425#M764825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-27T04:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: extending an idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208426#M764826</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;we can extende the idoc by using the segments. in these segemnt we add the data fields. go to the tcode WE31.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here we can extend the idoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can crete the custom idoc like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aim: Transfer the data from one system to another using user customized IDOC. &lt;/P&gt;&lt;P&gt;Sender System:  &lt;/P&gt;&lt;P&gt;Server: 172.25.8.185 &lt;/P&gt;&lt;P&gt;Client: 200 &lt;/P&gt;&lt;P&gt;Data from Z table: zsach1  &lt;/P&gt;&lt;P&gt;ReceiverSystem: &lt;/P&gt;&lt;P&gt;Server: 172.25.9.198 &lt;/P&gt;&lt;P&gt;Client: 800 &lt;/P&gt;&lt;P&gt;Data from Z table: zsach1  &lt;/P&gt;&lt;P&gt;Data is fetched from Z table on the sender system and inserted it in the Z table of Receiver system using ALE/IDOC.  &lt;/P&gt;&lt;P&gt;Settings on the Sender End  &lt;/P&gt;&lt;P&gt;Table Creation T &amp;#150; Code SE11. The table contains data that is to be sent to Receiver.  &lt;/P&gt;&lt;P&gt;ALE Configuration  &lt;/P&gt;&lt;P&gt;T-Code &amp;#150; SALE  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining Logical System  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;200 is our sender &lt;/P&gt;&lt;P&gt;800 is our receiver  &lt;/P&gt;&lt;P&gt;Assigning Client to Logical System  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;200 is our sender &lt;/P&gt;&lt;P&gt;800 is our receiver  &lt;/P&gt;&lt;P&gt;Defining Target System for RFC Calls (Tcode &amp;#150; SM59) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on R/3 Connections and then Create TAB  &lt;/P&gt;&lt;P&gt;Step 1  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save and test the connection.  &lt;/P&gt;&lt;P&gt;Defining Port  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The sender system is connected to the receiver system through this Port.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining Partner Profiles  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The partner for client 200(Sender) is the client 800 (Receiver)  &lt;/P&gt;&lt;P&gt;Since this is a sender we have to define only Outbound Parameters in this case. &lt;/P&gt;&lt;P&gt;Here you can see the Message type is Z message type.   &lt;/P&gt;&lt;P&gt;2.                   Maintaining Distribution Model (TCode BD64 )  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create new Distribution Model  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Add Message Type  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now Distribute this Model View   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Distribute it from Edit à Model View à Distribute&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining the Z Segment type &lt;/P&gt;&lt;P&gt;Tcode &amp;#150; WE31  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Defining the Basic Type &lt;/P&gt;&lt;P&gt;T Code WE30  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on New  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will take you to next screen as follows  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you have connected the basic type to the segment type. &lt;/P&gt;&lt;P&gt; Enter again and this will take you to screen as follows   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This shows the relation between the basic and the segment types.  &lt;/P&gt;&lt;P&gt;Next you need to make the entry of the segment in the system table. &lt;/P&gt;&lt;P&gt;Tcode : WE81  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next is the following entry which is required.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you are specifying the message type and the basic type and the release version.  &lt;/P&gt;&lt;P&gt;This is all about the configuration you need to do on the sender side. &lt;/P&gt;&lt;P&gt;Now on the sender side you also need a program that will fetch the required data, couple it in the IDOC format and post it.  &lt;/P&gt;&lt;P&gt;Here is a small piece of code that could be useful.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZSACH_CUST_IDOC                                             *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;report  zsach_cust_idoc                         .&lt;/P&gt;&lt;P&gt;parameters :            p_logsys like tbdlst-logsys.&lt;/P&gt;&lt;P&gt;data : gen_segment like edidd-segnam value 'ZSACH'.&lt;/P&gt;&lt;P&gt;data : control_dat like edidc,&lt;/P&gt;&lt;P&gt;      gen_data like z1hdr .&lt;/P&gt;&lt;P&gt;tables :zsach1.&lt;/P&gt;&lt;P&gt;data: begin of inttab occurs 0,&lt;/P&gt;&lt;P&gt;        lname type z1hdr-lname,&lt;/P&gt;&lt;P&gt;        fname type z1hdr-fname,&lt;/P&gt;&lt;P&gt;      end of inttab.&lt;/P&gt;&lt;P&gt;data :&lt;/P&gt;&lt;P&gt;      int_edidd like edidd occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      int_edidc like edidc occurs 0 with header line.&lt;/P&gt;&lt;P&gt;select * from zsach1 into corresponding fields of table inttab.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;  message 'no data' type 'I'.&lt;/P&gt;&lt;P&gt;  exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;control_dat-mestyp = 'ZSACH'.&lt;/P&gt;&lt;P&gt;control_dat-idoctp = 'ZSACH'.&lt;/P&gt;&lt;P&gt;control_dat-rcvprt = 'LS'.&lt;/P&gt;&lt;P&gt;control_dat-rcvprn =  p_logsys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at inttab.&lt;/P&gt;&lt;P&gt;  gen_data-lname = inttab-lname.&lt;/P&gt;&lt;P&gt;  gen_data-fname = inttab-fname.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; GEN_DATA-SSN = INTTAB-SSN.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; GEN_DATA-DOB = INTTAB-DOB.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  int_edidd-segnam = gen_segment.&lt;/P&gt;&lt;P&gt;  int_edidd-sdata = gen_data.&lt;/P&gt;&lt;P&gt;  append int_edidd.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;call function 'MASTER_IDOC_DISTRIBUTE'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    master_idoc_control                  = control_dat&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OBJ_TYPE                             = ''&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CHNUM                                = ''&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    communication_idoc_control           = int_edidc&lt;/P&gt;&lt;P&gt;    master_idoc_data                     = int_edidd&lt;/P&gt;&lt;P&gt; exceptions&lt;/P&gt;&lt;P&gt;   error_in_idoc_control                = 1&lt;/P&gt;&lt;P&gt;   error_writing_idoc_status            = 2&lt;/P&gt;&lt;P&gt;   error_in_idoc_data                   = 3&lt;/P&gt;&lt;P&gt;   sending_logical_system_unknown       = 4&lt;/P&gt;&lt;P&gt;   others                               = 5&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  message id sy-msgid type sy-msgty number sy-msgno.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  loop at int_edidc.&lt;/P&gt;&lt;P&gt;    write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'IDOC GENERATED',int_edidc-docnum.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  commit work.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Settings on the receiver side.  &lt;/P&gt;&lt;P&gt;The ALE configuration is same as we did it on the sender side. Please refer to earlier pages.  &lt;/P&gt;&lt;P&gt;The receiver specific differences are mentioned below.  &lt;/P&gt;&lt;P&gt;T-Code &amp;#150; SALE  &lt;/P&gt;&lt;P&gt;200 is our sender &lt;/P&gt;&lt;P&gt;800 is our receiver  &lt;/P&gt;&lt;P&gt;Steps   &lt;/P&gt;&lt;P&gt;Defining Logical System (Same as sender) &lt;/P&gt;&lt;P&gt;Assigning Client to Logical System (Same as sender) &lt;/P&gt;&lt;P&gt;Defining Target System for RFC Calls (Tcode &amp;#150; SM59) (Same as sender) &lt;/P&gt;&lt;P&gt;Defining Port(Same as sender)  &lt;/P&gt;&lt;P&gt;Defining Partner Profiles &amp;#150; Here we are accepting the data from Sender system. Hence we need to configure it as Inbound.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on the   sign above to go to next screen.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the message type is to be created again as it was created on the sender side. &lt;/P&gt;&lt;P&gt;The following steps are repeated, as done on the sender side, on the receiver end  &lt;/P&gt;&lt;P&gt;Tcode WE30 &lt;/P&gt;&lt;P&gt;Tcode WE31 &lt;/P&gt;&lt;P&gt;Tcode WE82 &lt;/P&gt;&lt;P&gt;Tcode WE81 &lt;/P&gt;&lt;P&gt;Here on the receiver end, we need to specify a process code at the time of defining the partner profile. &lt;/P&gt;&lt;P&gt;Process code is something that has the logic defined about what to be done after receiving the IDOC.  &lt;/P&gt;&lt;P&gt;In our case, on receipt of the IDOC, we are updating the Z Table. i.e Inserting the data from the IDOC into the Z Table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating a Process Code &lt;/P&gt;&lt;P&gt;Tcode &amp;#150; WE42   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic associated is coded in the Function Module which is specified in the Identification Field above.  &lt;/P&gt;&lt;P&gt;Also the processing type is selected as Processing by Function Module as above.  &lt;/P&gt;&lt;P&gt;The function Module is specified in the following screen.  &lt;/P&gt;&lt;P&gt;To have your function Module in the above drop down list, the entry is to be made using the following transaction  &lt;/P&gt;&lt;P&gt;TCode &amp;#150; BD51  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the entry is done here, the function module appears in the drop down list in the previous stage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it is important to make the following entry &lt;/P&gt;&lt;P&gt;Tcode WE57  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Module will look something as below:  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Source Code&lt;/P&gt;&lt;P&gt;function z_idoc_input_sach .&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD&lt;/P&gt;&lt;P&gt;*"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC&lt;/P&gt;&lt;P&gt;*"     VALUE(NO_APPLICATION_LOG) LIKE  SY-DATAR OPTIONAL&lt;/P&gt;&lt;P&gt;*"     VALUE(MASSSAVEINFOS) LIKE  MASSSAVINF STRUCTURE  MASSSAVINF&lt;/P&gt;&lt;P&gt;*"       OPTIONAL&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(WORKFLOW_RESULT) LIKE  BDWF_PARAM-RESULT&lt;/P&gt;&lt;P&gt;*"     VALUE(APPLICATION_VARIABLE) LIKE  BDWF_PARAM-APPL_VAR&lt;/P&gt;&lt;P&gt;*"     VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK&lt;/P&gt;&lt;P&gt;*"     VALUE(CALL_TRANSACTION_DONE) LIKE  BDWFAP_PAR-CALLTRANS&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      IDOC_CONTRL STRUCTURE  EDIDC&lt;/P&gt;&lt;P&gt;*"      IDOC_DATA STRUCTURE  EDIDD&lt;/P&gt;&lt;P&gt;*"      IDOC_STATUS STRUCTURE  BDIDOCSTAT&lt;/P&gt;&lt;P&gt;*"      RETURN_VARIABLES STRUCTURE  BDWFRETVAR&lt;/P&gt;&lt;P&gt;*"      SERIALIZATION_INFO STRUCTURE  BDI_SER&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      WRONG_FUNCTION_CALLED&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;  include mbdconwf.&lt;/P&gt;&lt;P&gt;  data : it_emp_data like zsach1 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;  data : gen_data like zsach1 .&lt;/P&gt;&lt;P&gt;  workflow_result = c_wf_result_ok.&lt;/P&gt;&lt;P&gt;data : counter type int4.&lt;/P&gt;&lt;P&gt;select count( * ) from zsach1 into counter.&lt;/P&gt;&lt;P&gt;counter = counter + 1.&lt;/P&gt;&lt;P&gt;  loop at idoc_contrl.&lt;/P&gt;&lt;P&gt;    if idoc_contrl-mestyp ne 'ZSACH'.&lt;/P&gt;&lt;P&gt;      raise wrong_function_called.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    clear gen_data.&lt;/P&gt;&lt;P&gt;    refresh it_emp_data.&lt;/P&gt;&lt;P&gt;    loop at idoc_data where docnum eq idoc_contrl-docnum.&lt;/P&gt;&lt;P&gt;      if idoc_data-segnam = 'ZSACH'.&lt;/P&gt;&lt;P&gt;        gen_data = idoc_data-sdata.&lt;/P&gt;&lt;P&gt;          it_emp_data-mandt = counter.&lt;/P&gt;&lt;P&gt;          it_emp_data-lname = gen_data-lname.&lt;/P&gt;&lt;P&gt;          it_emp_data-fname = gen_data-fname.&lt;/P&gt;&lt;P&gt;          counter = counter + 1.&lt;/P&gt;&lt;P&gt;        append it_emp_data.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        message 'ERROR' type 'I'.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;insert zsach1 from table it_emp_data.&lt;/P&gt;&lt;P&gt;*****&lt;/P&gt;&lt;P&gt;call function 'EDI_DOCUMENT_OPEN_FOR_EDIT'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    document_number               = idoc_data-docnum&lt;/P&gt;&lt;P&gt;  importing&lt;/P&gt;&lt;P&gt;    idoc_control                  = idoc_contrl&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    idoc_data                     = idoc_data&lt;/P&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    document_foreign_lock         = 1&lt;/P&gt;&lt;P&gt;    document_not_exist            = 2&lt;/P&gt;&lt;P&gt;    document_not_open             = 3&lt;/P&gt;&lt;P&gt;    status_is_unable_for_changing = 4&lt;/P&gt;&lt;P&gt;    others                        = 5.&lt;/P&gt;&lt;P&gt;call function 'EDI_CHANGE_DATA_SEGMENTS'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    idoc_changed_data_range = idoc_data&lt;/P&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    idoc_not_open           = 1&lt;/P&gt;&lt;P&gt;    data_record_not_exist   = 2&lt;/P&gt;&lt;P&gt;    others                  = 3.&lt;/P&gt;&lt;P&gt;data t_itab_edids40 like edi_ds40 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;clear t_itab_edids40.&lt;/P&gt;&lt;P&gt;t_itab_edids40-docnum      = idoc_data-docnum.&lt;/P&gt;&lt;P&gt;t_itab_edids40-status      = '51'.&lt;/P&gt;&lt;P&gt;t_itab_edids40-repid       = sy-repid.&lt;/P&gt;&lt;P&gt;t_itab_edids40-tabnam      = 'EDI_DS'.&lt;/P&gt;&lt;P&gt;t_itab_edids40-mandt       = sy-mandt.&lt;/P&gt;&lt;P&gt;t_itab_edids40-stamqu      = 'SAP'.&lt;/P&gt;&lt;P&gt;t_itab_edids40-stamid      = 'B1'.&lt;/P&gt;&lt;P&gt;t_itab_edids40-stamno      = '999'.&lt;/P&gt;&lt;P&gt;t_itab_edids40-stapa1      = 'Sold to changed to '.&lt;/P&gt;&lt;P&gt;*t_itab_edids40-stapa2      = t_new_kunnr.&lt;/P&gt;&lt;P&gt;t_itab_edids40-logdat      = sy-datum.&lt;/P&gt;&lt;P&gt;t_itab_edids40-logtim      = sy-uzeit.&lt;/P&gt;&lt;P&gt;append t_itab_edids40.&lt;/P&gt;&lt;P&gt;call function 'EDI_DOCUMENT_CLOSE_EDIT'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    document_number  = idoc_data-docnum&lt;/P&gt;&lt;P&gt;    do_commit        = 'X'&lt;/P&gt;&lt;P&gt;    do_update        = 'X'&lt;/P&gt;&lt;P&gt;    write_all_status = 'X'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    status_records   = t_itab_edids40&lt;/P&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    idoc_not_open    = 1&lt;/P&gt;&lt;P&gt;    db_error         = 2&lt;/P&gt;&lt;P&gt;    others           = 3.&lt;/P&gt;&lt;P&gt;endfunction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the Application  &lt;/P&gt;&lt;P&gt;Sender system &lt;/P&gt;&lt;P&gt;Execute the program we created earlier  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking the IDOC  &lt;/P&gt;&lt;P&gt;T Code WE02  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking the data on the Receiver end  &lt;/P&gt;&lt;P&gt;Tcode: WE02  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The IDOC has arrived here  &lt;/P&gt;&lt;P&gt;Checking the Data   &lt;/P&gt;&lt;P&gt;Double click on the IDOC   &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Checking the Database  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way, the data has come to the receiver end successfully.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please reward points,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;satish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2007 04:23:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208426#M764826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-27T04:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: extending an idoc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208427#M764827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;for this u need to extend ur idoc type Orders 05.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;cretae ur zsegment in we31 with ur custom fiedls.&lt;/P&gt;&lt;P&gt;--&amp;gt; go to we30 , enter ZIDOC and selcet Extension , it will ask for Basic Idoc type , here u eneter ORDERS05.&lt;/P&gt;&lt;P&gt;And then add ur Zsegmant to Zidoc type.&lt;/P&gt;&lt;P&gt;--&amp;gt; Cretae ur Zmessage in We81&lt;/P&gt;&lt;P&gt;--&amp;gt; Assign ur Zmessage to ZIDOC type in WE82.&lt;/P&gt;&lt;P&gt;--&amp;gt; As this ZIDOC type is extension of ORDERS05, this idoc will be populated by message control.&lt;/P&gt;&lt;P&gt;So ME10 (idoc_output_orders)&lt;/P&gt;&lt;P&gt; and Me11(idoc_output_ordchg)  is the Prcocess Code which will points to Function Module.&lt;/P&gt;&lt;P&gt;--&amp;gt; Now add ur own functionality to fill th eZSEGMENT in the cUstome exit of th eFunction Modules..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thses are the things which u need to do ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert back  if any issues,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2007 04:41:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extending-an-idoc/m-p/3208427#M764827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-27T04:41:34Z</dc:date>
    </item>
  </channel>
</rss>

