<?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 TRIGGERING THE IDOC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/triggering-the-idoc/m-p/3014764#M712482</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;    I have one Zxxx table.. that contain some master data  details... now  i want to send these details to external systems... i created one custom IDoc and  Message type.. every thing...  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  but for triggering the idoc what we need to do.. for  example..  for predefined data we have option   like BD10, BD12, BD14...  these executable programs.. or  Chnage pointers(RBDMIDOC) we can trigger the idoc for predifined data..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; but for user defind  data tables.. what can we do for triggering the idocs.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;BABU&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2007 09:36:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-30T09:36:05Z</dc:date>
    <item>
      <title>TRIGGERING THE IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/triggering-the-idoc/m-p/3014764#M712482</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;    I have one Zxxx table.. that contain some master data  details... now  i want to send these details to external systems... i created one custom IDoc and  Message type.. every thing...  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  but for triggering the idoc what we need to do.. for  example..  for predefined data we have option   like BD10, BD12, BD14...  these executable programs.. or  Chnage pointers(RBDMIDOC) we can trigger the idoc for predifined data..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; but for user defind  data tables.. what can we do for triggering the idocs.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;BABU&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 09:36:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/triggering-the-idoc/m-p/3014764#M712482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T09:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: TRIGGERING THE IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/triggering-the-idoc/m-p/3014765#M712483</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;You have to send the IDocs manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM MASTER_IDOC_DISTRIBUTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps (please reward me if it does).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 09:39:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/triggering-the-idoc/m-p/3014765#M712483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T09:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: TRIGGERING THE IDOC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/triggering-the-idoc/m-p/3014766#M712484</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;check the below sample code for triggering the idoc..The same thing u can do for ur requirement..slect all then data from ur custom table and finally call the FM&lt;/P&gt;&lt;P&gt;"MASTER_IDOC_DISTRIBUTE".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report ZZ_Program_To_Create_Idoc &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zz_program_to_create_idoc .&lt;/P&gt;&lt;P&gt;tables: ekko,ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen skip 3.&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1 with frame title titl.&lt;/P&gt;&lt;P&gt;selection-screen skip.&lt;/P&gt;&lt;P&gt;select-options s_ebeln for ekko-ebeln.&lt;/P&gt;&lt;P&gt;selection-screen skip.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: header_segment_name like edidd-segnam value 'Z1EKKO',&lt;/P&gt;&lt;P&gt;item_segment_name like edidd-segnam value 'Z1EKPO',&lt;/P&gt;&lt;P&gt;idoc_name like edidc-idoctp value 'Z19838IDOC1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: header_segment_data like z1ekko,&lt;/P&gt;&lt;P&gt;item_segment_data like z1ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: control_record like edidc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: messagetyp like edmsg-msgtyp value 'ZZ9838MESG1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: i_communication like edidc occurs 0 with header line,&lt;/P&gt;&lt;P&gt;i_data like edidd occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of i_ekko occurs 0,&lt;/P&gt;&lt;P&gt;ebeln like ekko-ebeln,&lt;/P&gt;&lt;P&gt;aedat like ekko-aedat,&lt;/P&gt;&lt;P&gt;bukrs like ekko-bukrs,&lt;/P&gt;&lt;P&gt;bsart like ekko-bsart,&lt;/P&gt;&lt;P&gt;lifnr like ekko-lifnr,&lt;/P&gt;&lt;P&gt;end of i_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of i_ekpo occurs 0,&lt;/P&gt;&lt;P&gt;ebelp like ekpo-ebelp,&lt;/P&gt;&lt;P&gt;matnr like ekpo-matnr,&lt;/P&gt;&lt;P&gt;menge like ekpo-menge,&lt;/P&gt;&lt;P&gt;meins like ekpo-meins,&lt;/P&gt;&lt;P&gt;netpr like ekpo-netpr,&lt;/P&gt;&lt;P&gt;end of i_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln aedat bukrs bsart lifnr from ekko&lt;/P&gt;&lt;P&gt;into table i_ekko where ebeln in s_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebelp&lt;/P&gt;&lt;P&gt;matnr&lt;/P&gt;&lt;P&gt;menge&lt;/P&gt;&lt;P&gt;meins&lt;/P&gt;&lt;P&gt;netpr&lt;/P&gt;&lt;P&gt;from ekpo&lt;/P&gt;&lt;P&gt;into table i_ekpo&lt;/P&gt;&lt;P&gt;where ebeln in s_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;control_record-mestyp = messagetyp.&lt;/P&gt;&lt;P&gt;control_record-rcvprt = 'LS'.&lt;/P&gt;&lt;P&gt;control_record-idoctp = idoc_name.&lt;/P&gt;&lt;P&gt;control_record-rcvprn = '0MART800'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_ekko.&lt;/P&gt;&lt;P&gt;header_segment_data-ebeln = i_ekko-ebeln.&lt;/P&gt;&lt;P&gt;header_segment_data-aedat = i_ekko-aedat.&lt;/P&gt;&lt;P&gt;header_segment_data-bukrs = i_ekko-bukrs.&lt;/P&gt;&lt;P&gt;header_segment_data-bsart = i_ekko-bsart.&lt;/P&gt;&lt;P&gt;header_segment_data-lifnr = i_ekko-lifnr.&lt;/P&gt;&lt;P&gt;i_data-segnam = header_segment_name.&lt;/P&gt;&lt;P&gt;i_data-sdata = header_segment_data.&lt;/P&gt;&lt;P&gt;append i_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebelp&lt;/P&gt;&lt;P&gt;matnr&lt;/P&gt;&lt;P&gt;menge&lt;/P&gt;&lt;P&gt;meins&lt;/P&gt;&lt;P&gt;netpr&lt;/P&gt;&lt;P&gt;from ekpo&lt;/P&gt;&lt;P&gt;into table i_ekpo&lt;/P&gt;&lt;P&gt;where ebeln = i_ekko-ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_ekpo.&lt;/P&gt;&lt;P&gt;item_segment_data-ebelp = i_ekpo-ebelp.&lt;/P&gt;&lt;P&gt;item_segment_data-matnr = i_ekpo-matnr.&lt;/P&gt;&lt;P&gt;item_segment_data-menge = i_ekpo-menge.&lt;/P&gt;&lt;P&gt;item_segment_data-meins = i_ekpo-meins.&lt;/P&gt;&lt;P&gt;item_segment_data-netpr = i_ekpo-netpr.&lt;/P&gt;&lt;P&gt;i_data-segnam = item_segment_name.&lt;/P&gt;&lt;P&gt;i_data-sdata = item_segment_data.&lt;/P&gt;&lt;P&gt;append i_data.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;clear i_ekpo.&lt;/P&gt;&lt;P&gt;refresh i_ekpo.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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_record&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 = i_communication&lt;/P&gt;&lt;P&gt;master_idoc_data = i_data&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;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_communication.&lt;/P&gt;&lt;P&gt;write: 'IDOC GENERATED', i_communication-docnum.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;titl = 'ENTER THE PURCHASE ORDER NUMBER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if hlpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 09:40:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/triggering-the-idoc/m-p/3014766#M712484</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-10-30T09:40:41Z</dc:date>
    </item>
  </channel>
</rss>

