<?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 create sales order using bapi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827119#M920323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  BAPI &lt;STRONG&gt;BAPI_SALESORDER_CREATEFROMDAT2&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the sample code&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi&lt;/A&gt;&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;Kiran Sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 May 2008 10:09:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-13T10:09:27Z</dc:date>
    <item>
      <title>how to create sales order using bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827117#M920321</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;can anyone suggest me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to create sales order using bapi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&amp;amp;regards&lt;/P&gt;&lt;P&gt;mark.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 10:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827117#M920321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T10:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to create sales order using bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827118#M920322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use BAPI 'BAPI&lt;STRONG&gt;SALESORDER&lt;/STRONG&gt;CREATE&lt;STRONG&gt;FROM&lt;/STRONG&gt;DATA*. Don't know the exact name, and have a look at the documentation. of the BAPI.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 10:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827118#M920322</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-05-13T10:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to create sales order using bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827119#M920323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  BAPI &lt;STRONG&gt;BAPI_SALESORDER_CREATEFROMDAT2&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the sample code&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi&lt;/A&gt;&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;Kiran Sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 10:09:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827119#M920323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T10:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to create sales order using bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827120#M920324</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 can use the bapi &lt;STRONG&gt;BAPI_SALESORDER_CREATEFROMDAT2&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There mandatory fields are below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Header:&lt;/STRONG&gt; ORDER_HEADER_IN&lt;/P&gt;&lt;P&gt;Sales order type&lt;/P&gt;&lt;P&gt;Sales organisation&lt;/P&gt;&lt;P&gt;Distribution channel&lt;/P&gt;&lt;P&gt;Division&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Item:&lt;/STRONG&gt; ORDER_ITEMS_IN&lt;/P&gt;&lt;P&gt;Material number (with leading zeros)&lt;/P&gt;&lt;P&gt;Quantity&lt;/P&gt;&lt;P&gt;plant &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Partner:&lt;/STRONG&gt; ORDER_PARTNERS&lt;/P&gt;&lt;P&gt;SP, sold-to party&lt;/P&gt;&lt;P&gt;Customer number (with leading zeros)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 10:12:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827120#M920324</guid>
      <dc:creator>asik_shameem</dc:creator>
      <dc:date>2008-05-13T10:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to create sales order using bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827121#M920325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TABLES: VBAK,VBAP,VBEP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ORDER_HEADER LIKE BAPISDHEAD,&lt;/P&gt;&lt;P&gt;      " Sales and Distribution Document Header&lt;/P&gt;&lt;P&gt;      ORDERPARTNER LIKE BAPIPARTNR OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      " SD Document Partner&lt;/P&gt;&lt;P&gt;      ORDER_ITEM_IN LIKE BAPIITEMIN OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      " Create SD Document Item&lt;/P&gt;&lt;P&gt;      HEADER_IND LIKE BAPISDHEADX,&lt;/P&gt;&lt;P&gt;      " Checkbox Fields for Sales and Distribution Document Header&lt;/P&gt;&lt;P&gt;      RETURN LIKE BAPIRETURN1 OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      " Return Parameter&lt;/P&gt;&lt;P&gt;      W_ORDER LIKE BAPIVBELN-VBELN&lt;/P&gt;&lt;P&gt;     ." Sales Document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Define Parameters.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PARAMETERS : G_DOC_TY LIKE BAPISDHEAD-DOC_TYPE,             "= 'TA'&lt;/P&gt;&lt;P&gt;             G_SA_ORG LIKE BAPISDHEAD-SALES_ORG,            "= '5555'&lt;/P&gt;&lt;P&gt;             G_DIS_CH LIKE BAPISDHEAD-DISTR_CHAN,           "= '55'&lt;/P&gt;&lt;P&gt;             G_DIVIS  LIKE BAPISDHEAD-DIVISION,             "= '55'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             G_P_NUMB LIKE BAPIPARTNR-PARTN_NUMB,        "= '0000003002'&lt;/P&gt;&lt;P&gt;             G_P_ROLE LIKE BAPIPARTNR-PARTN_ROLE,        "= 'SP'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             G_MAT LIKE BAPIITEMIN-MATERIAL,                "= 'MAT1'&lt;/P&gt;&lt;P&gt;             G_R_QTY LIKE BAPIITEMIN-REQ_QTY.               "= '2.000'&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;Pass the Parameters into ORDER-HEADER.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ORDER_HEADER-DOC_TYPE   = G_DOC_TY.&lt;/P&gt;&lt;P&gt;ORDER_HEADER-SALES_ORG  = G_SA_ORG.&lt;/P&gt;&lt;P&gt;ORDER_HEADER-DISTR_CHAN = G_DIS_CH.&lt;/P&gt;&lt;P&gt;ORDER_HEADER-DIVISION   = G_DIVIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill the internal table orderpartner.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ORDERPARTNER-PARTN_NUMB = G_P_NUMB.&lt;/P&gt;&lt;P&gt;ORDERPARTNER-PARTN_ROLE = G_P_ROLE.&lt;/P&gt;&lt;P&gt;APPEND ORDERPARTNER.&lt;/P&gt;&lt;P&gt;CLEAR ORDERPARTNER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill the internal table order_item_in.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ORDER_ITEM_IN-MATERIAL = G_MAT.&lt;/P&gt;&lt;P&gt;ORDER_ITEM_IN-REQ_QTY  = G_R_QTY.&lt;/P&gt;&lt;P&gt;APPEND ORDER_ITEM_IN.&lt;/P&gt;&lt;P&gt;CLEAR ORDER_ITEM_IN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call function &lt;STRONG&gt;BAPI_SALESORDER_CREATEFROMDAT1&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    ORDER_HEADER_IN     = ORDER_HEADER&lt;/P&gt;&lt;P&gt;    CONVERT_PARVW_AUART = 'X'&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    SALESDOCUMENT       = W_ORDER&lt;/P&gt;&lt;P&gt;    RETURN              = RETURN&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    ORDER_ITEMS_IN      = ORDER_ITEM_IN&lt;/P&gt;&lt;P&gt;    ORDER_PARTNERS      = ORDERPARTNER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Commit BAPI's process&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    WAIT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE RETURN WITH KEY TYPE = 'E'.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  WRITE: 'Sales order not created' .&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  WRITE: '    Sales order NO.',W_ORDER COLOR 7, 'created successfully'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Alok Vishnoi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 12:06:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-sales-order-using-bapi/m-p/3827121#M920325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T12:06:10Z</dc:date>
    </item>
  </channel>
</rss>

