<?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 issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814512#M348922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where will you assign a function module to your idoc type ,which transcation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jan 2007 00:14:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-11T00:14:39Z</dc:date>
    <item>
      <title>idoc issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814510#M348920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can create a custom idoc in SAP , my question is how can i post these idoc,&lt;/P&gt;&lt;P&gt;for example , for standard idoc type you can trigger and post these idoc with&lt;/P&gt;&lt;P&gt;function module IDOC_WRITE_AND_START_INBOUND OR some tcode, but&lt;/P&gt;&lt;P&gt;if i create a custom IDOC ,how i will be able to post these using above function&lt;/P&gt;&lt;P&gt;module IDOC_WRITE_AND_START_INBOUND&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2007 23:56:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814510#M348920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-10T23:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: idoc issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814511#M348921</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;Populate the Control records and the data records and call the FM &lt;/P&gt;&lt;P&gt;IDOC_INBOUND_ASYNCHRONOUS which will create the IDOC and post..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2007 23:59:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814511#M348921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-10T23:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: idoc issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814512#M348922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where will you assign a function module to your idoc type ,which transcation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 00:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814512#M348922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T00:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: idoc issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814513#M348923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanju,&lt;/P&gt;&lt;P&gt;if you cannot use a standard idoc then you´ll need to create a custom one starting from the segment (WE31) where you can create an Idoc segment starting from your own Z table structure using the wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you´ll need to also create the idoc type (WE30) and link the segment to the IDoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you´ll need to create a message type and link the message type to the Idoc type (WE81, WE82).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you´´ll use RFC "MASTER_IDOC_DISTRIBUTE" to populate the IDOC and send the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a sample code just to give you an idea:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
Z_SEGNAME(7) TYPE C VALUE 'SEGMENT',
Z_MESTYPE(9) TYPE C VALUE 'MESSAGE',
Z_IDOC_TYPE(8) TYPE C VALUE 'IDOC'.


DATA:
 IDOC_CONTROL LIKE EDIDC,
 T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
 IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE.

*Reads data from Z table
SELECT *
FROM ZTABLE
INTO TABLE L_ZTABLE.

*Set the control data info required for the distribution
IDOC_CONTROL-MESTYP = Z_MESTYPE.
IDOC_CONTROL-DOCTYP = Z_IDOC_TYPE.


*Populate the IDoc
LOOP AT L_ZTABLE.
 CLEAR IDOC_DATA.
 IDOC_DATA-SEGNAM = Z_SEGNAME.
 IDOC_DATA-SDATA = ZTABLE.
 APPEND IDOC_DATA.
ENDLOOP.


*Deliver the IDOC as defined in distribution model/partner profile
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' IN UPDATE TASK
 EXPORTING
  MASTER_IDOC_CONTROL = IDOC_CONTROL
 TABLES
  COMMUNICATION_IDOC_CONTROL = T_COMM_CONTROL
  MASTER_IDOC_DATA = IDOC_DATA
 EXCEPTIONS
  ERROR_IN_IDOC_CONTROL = 1
  ERROR_WRITING_IDOC_STATUS = 2
  ERROR_IN_IDOC_DATA = 3
  SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
  OTHERS = 5.

IF sy-subrc = 0.
 COMMIT WORK.
ENDIF. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can insert this code in your FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Sergio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 00:50:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814513#M348923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T00:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: idoc issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814514#M348924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sanju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are 2 types 1. Through message control 2.Stand alone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.    You have to add this FM to process code .Process will attached to apllication .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex : Purchase order  &lt;/P&gt;&lt;P&gt;  Whenever you create PO automatically process code will get trigger and IDOC will created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.You have schedule your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 03:22:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814514#M348924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T03:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: idoc issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814515#M348925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post the IDOC using FM MASTER_IDOC_DISTRIBUTE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 06:02:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-issue/m-p/1814515#M348925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T06:02:35Z</dc:date>
    </item>
  </channel>
</rss>

