<?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: How to generate idoc after creating a bapi? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792303#M1122453</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;Here i need to explicitly goto va02 and issue the output. That is not my requirement. In se38 i have written a program by calling a bapi function module. Thru bapi inserted all data. In the same program once the sales orders are created and saved thru bapi and idoc shud be generated. Code shud be return in the same se38 program. So for this do i need to to create Custom idoc???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz ans me...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Nov 2008 16:21:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-21T16:21:52Z</dc:date>
    <item>
      <title>How to generate idoc after creating a bapi?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792299#M1122449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used the bapi_salesorder_createfromdat1 function module to create sales orders. Now how can i generate an idoc of the sales orders created and send it to other system. Please give a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Shakti on Nov 19, 2008 3:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2008 14:29:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792299#M1122449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-19T14:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate idoc after creating a bapi?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792300#M1122450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after your bapi do the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_edidc-rcvprt = gc_ls. "Partner Type of Receiver&lt;/P&gt;&lt;P&gt;  wa_edidc-direct = 1.     "Outbound&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Port is with simialr name of logical system&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF sy-sysid EQ gc_ert.&lt;/P&gt;&lt;P&gt;    CONCATENATE: gc_xit gc_clt gc_200 INTO wa_edidc-rcvpor.&lt;/P&gt;&lt;P&gt;  ELSEIF sy-sysid EQ gc_erq.&lt;/P&gt;&lt;P&gt;    CONCATENATE: gc_xiq gc_clt gc_300 INTO wa_edidc-rcvpor.&lt;/P&gt;&lt;P&gt;  ELSEIF sy-sysid EQ gc_erp.&lt;/P&gt;&lt;P&gt;    CONCATENATE: gc_xip gc_clt gc_400 INTO wa_edidc-rcvpor.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;XIT only 200 client No, XIQ always only 300 and XIP always only 400 - Confirmed by Markus/ Erik&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF sy-sysid EQ gc_ert.&lt;/P&gt;&lt;P&gt;    CONCATENATE: gc_xit gc_clt gc_200 INTO wa_edidc-rcvprn.&lt;/P&gt;&lt;P&gt;  ELSEIF sy-sysid EQ gc_erq.&lt;/P&gt;&lt;P&gt;    CONCATENATE: gc_xiq gc_clt gc_300 INTO wa_edidc-rcvprn.&lt;/P&gt;&lt;P&gt;  ELSEIF sy-sysid EQ gc_erp.&lt;/P&gt;&lt;P&gt;    CONCATENATE: gc_xip gc_clt gc_400 INTO wa_edidc-rcvprn.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_edidc-mestyp = gc_ymtspa01.  "Message Type&lt;/P&gt;&lt;P&gt;  wa_edidc-idoctp = gc_ywhspa01.  "IDoc Type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move data records from internal table to the edidd structure.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check Whether Invoice is already sent or not to AGCONet&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF NOT gt_final_sp2[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT *&lt;/P&gt;&lt;P&gt;      FROM ysmk_invoice01&lt;/P&gt;&lt;P&gt;      INTO TABLE gt_invoice01&lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN gt_final_sp2&lt;/P&gt;&lt;P&gt;    WHERE vbeln EQ gt_final_sp2-vbeln_vf.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0 .&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT gt_final_sp2 INTO wa_final_sp2.&lt;/P&gt;&lt;P&gt;      CLEAR : wa_invoice01,gv_index.&lt;/P&gt;&lt;P&gt;      gv_index = sy-tabix.&lt;/P&gt;&lt;P&gt;      READ TABLE gt_invoice01 INTO wa_invoice01 WITH KEY vbeln = wa_final_sp2-vbeln_vf.&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        IF wa_invoice01-process EQ 'X'.&lt;/P&gt;&lt;P&gt;          IF p_check NE 'X'.         " To Ignore previously processed Orders&lt;/P&gt;&lt;P&gt;            DELETE gt_final_sp2 INDEX gv_index.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      CLEAR : wa_final_sp2.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF gt_final_sp2[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    MESSAGE s222.&lt;/P&gt;&lt;P&gt;    LEAVE TO LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT gt_final_sp2 INTO wa_final_sp2.&lt;/P&gt;&lt;P&gt;    wa_sdata_sp2-chas_ser_num = wa_final_sp2-qausp.&lt;/P&gt;&lt;P&gt;    wa_sdata_sp2-mat_num = wa_final_sp2-matnr.&lt;/P&gt;&lt;P&gt;    wa_sdata_sp2-bill_doc = wa_final_sp2-vbeln_vf.&lt;/P&gt;&lt;P&gt;    wa_sdata_sp2-bill_type = wa_final_sp2-fkart.&lt;/P&gt;&lt;P&gt;    wa_sdata_sp2-cust_num = wa_final_sp2-kunnr.&lt;/P&gt;&lt;P&gt;    wa_sdata_sp2-fkdat = wa_final_sp2-fkdat.&lt;/P&gt;&lt;P&gt;    wa_sdata_sp2-kzwi5 = wa_final_sp2-kzwi5.&lt;/P&gt;&lt;P&gt;    wa_sdata_sp2-netwr = wa_final_sp2-netwr.&lt;/P&gt;&lt;P&gt;    wa_sdata_sp2-aedat = wa_final_sp2-aedat.&lt;/P&gt;&lt;P&gt;    wa_edidd-segnam = gc_z1whspf2."Segment Name.&lt;/P&gt;&lt;P&gt;    wa_edidd-sdata = wa_sdata_sp2.&lt;/P&gt;&lt;P&gt;    APPEND wa_edidd TO gt_edidd.&lt;/P&gt;&lt;P&gt;    CLEAR wa_edidd.&lt;/P&gt;&lt;P&gt;    wa_invoice01-vbeln = wa_final_sp2-vbeln_vf.&lt;/P&gt;&lt;P&gt;    wa_invoice01-process = 'X'.&lt;/P&gt;&lt;P&gt;    MODIFY ysmk_invoice01 FROM wa_invoice01.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT gt_edidd[] IS INITIAL.&lt;/P&gt;&lt;P&gt;*---Function module to trigger the IDOC explicitly&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            = wa_edidc&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        communication_idoc_control     = gt_edidc&lt;/P&gt;&lt;P&gt;        master_idoc_data               = gt_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 NE 0.&lt;/P&gt;&lt;P&gt;&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;*Commit work used if the Function module is executed successfully&lt;/P&gt;&lt;P&gt;      COMMIT WORK.&lt;/P&gt;&lt;P&gt;      READ TABLE gt_edidc INTO wa_edidc INDEX 1.&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        WRITE:/ wa_edidc-docnum, text-003.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;*---Clearing the internal table and work area for Data structures&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    r_mestyp-low     = gc_ymtspa01.&lt;/P&gt;&lt;P&gt;    r_mestyp-sign    = gc_i.&lt;/P&gt;&lt;P&gt;    r_mestyp-option  = gc_eq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND  r_mestyp TO r_mestyp.&lt;/P&gt;&lt;P&gt;    CLEAR:  r_mestyp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    r_docnum-low     = wa_edidc-docnum.&lt;/P&gt;&lt;P&gt;    r_docnum-sign    = gc_i.&lt;/P&gt;&lt;P&gt;    r_docnum-option  = gc_eq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND  r_docnum TO r_docnum.&lt;/P&gt;&lt;P&gt;    CLEAR:  r_docnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   SUBMIT rbdmoind WITH p_credat = sy-datum&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WITH p_step = 100 AND RETURN.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SUBMIT rseout00 WITH docnum  IN r_docnum&lt;/P&gt;&lt;P&gt;                    WITH mestyp  IN r_mestyp&lt;/P&gt;&lt;P&gt;                    WITH p_compl = 'Y'&lt;/P&gt;&lt;P&gt;                    WITH p_rcvpor = 'XITCLT200'&lt;/P&gt;&lt;P&gt;                    WITH p_rcvprt = 'LS' AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR: wa_edidc,wa_edidd.&lt;/P&gt;&lt;P&gt;    REFRESH: gt_edidc,gt_edidd.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 13:34:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792300#M1122450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T13:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate idoc after creating a bapi?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792301#M1122451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello sir.&lt;/P&gt;&lt;P&gt;Thank you for replying me. &lt;/P&gt;&lt;P&gt;So do we need to create message type and idoc type is it??? and wat is this (ysmk_invoice01). Is it a ztable?Sir if you dnt mind please be a bit more clear. Im not that gud in idocs. Can u please explain...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be very thankful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Shakti on Nov 20, 2008 5:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 16:13:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792301#M1122451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T16:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate idoc after creating a bapi?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792302#M1122452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Shakti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Display the sales order (transaction VA02) and choose menu &lt;EM&gt;Extras -&amp;gt; Output -&amp;gt; Header -&amp;gt; Edit.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can define an ORDRSP (order response) as EDI output (mode = '6'). If you have created appropriate partner profiles (WE20) and ALE/IDoc ports (WE21) the IDoc will be automatically forwarded to another SAP system or e.g. SAP-XI (for EDI conversion).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 20:30:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792302#M1122452</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-11-20T20:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate idoc after creating a bapi?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792303#M1122453</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;Here i need to explicitly goto va02 and issue the output. That is not my requirement. In se38 i have written a program by calling a bapi function module. Thru bapi inserted all data. In the same program once the sales orders are created and saved thru bapi and idoc shud be generated. Code shud be return in the same se38 program. So for this do i need to to create Custom idoc???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz ans me...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2008 16:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-generate-idoc-after-creating-a-bapi/m-p/4792303#M1122453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-21T16:21:52Z</dc:date>
    </item>
  </channel>
</rss>

