<?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 Sample file data for bapi_salesorder_createfromdat2 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-file-data-for-bapi-salesorder-createfromdat2/m-p/6016076#M1346947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hi all,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have written a zprogam which calls bapi_salesorder_createfromdat2  to create sales order.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While running it shows the error as&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VP   Enter Ship-to-party or Sold-to-party&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;can anyone give me file format with real time data  for this bapi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Senthil&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Aug 2009 01:15:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-15T01:15:10Z</dc:date>
    <item>
      <title>Sample file data for bapi_salesorder_createfromdat2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-file-data-for-bapi-salesorder-createfromdat2/m-p/6016076#M1346947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hi all,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have written a zprogam which calls bapi_salesorder_createfromdat2  to create sales order.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While running it shows the error as&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VP   Enter Ship-to-party or Sold-to-party&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;can anyone give me file format with real time data  for this bapi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Senthil&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2009 01:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-file-data-for-bapi-salesorder-createfromdat2/m-p/6016076#M1346947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-15T01:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sample file data for bapi_salesorder_createfromdat2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-file-data-for-bapi-salesorder-createfromdat2/m-p/6016077#M1346948</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;This is code have a look at it it help you to create a file.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT lt_temp1 INTO wa_temp1.
   headerx-doc_type    = 'X'.
    header-sales_org    = wa_temp1-vkorg.
    headerx-sales_org   = 'X'.
    header-purch_no     = wa_temp1-bstnk.
    header-distr_chan   = wa_temp1-vtweg.
    headerx-distr_chan  = 'X'.
    header-division     = wa_temp1-spart.
    header-purch_no_s   = wa_temp1-bstnk.
    headerx-division    = 'X'.
    wa_partner-partn_role = 'AG'.
    wa_partner-partn_numb = wa_temp1-kunnr.
    APPEND wa_partner TO it_partner.
    wa_partner-partn_role = 'WE'.
    wa_partner-partn_numb = wa_temp1-kunnr.
    APPEND wa_partner TO it_partner.
    CLEAR: wa_partner.
    LOOP AT lt_temp2 INTO wa_temp2 WHERE kunnr = wa_temp1-kunnr.
      "AND matnr = wa_temp1-matnr.
*wa_item-itm_number = wa_temp2-posnr .
      wa_item-material   = wa_temp2-matnr.
      wa_item-plant      = wa_temp2-werks.
      wa_item-req_qty    = wa_temp2-fkimg * 1000.
      wa_item-target_qty = wa_temp2-fkimg * 1000.
      APPEND wa_item TO it_item.
    ENDLOOP.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
      EXPORTING
        order_header_in       = header
*   WITHOUT_COMMIT            = ' '
*   CONVERT_PARVW_AUART       = ' '
     IMPORTING
       salesdocument          = v_vbeln
*   SOLD_TO_PARTY             =
*   SHIP_TO_PARTY             =
*   BILLING_PARTY             =
       return                 = return
      TABLES
       order_items_in         = it_item
       order_partners         = it_partner.
    IF v_vbeln ne space.
      wa_vbeln-vbeln = v_vbeln.
      APPEND wa_vbeln TO lt_vbeln.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      HIDE wa_vbeln-vbeln.
      CLEAR: wa_partner,header,v_vbeln, wa_temp2.
      REFRESH: it_partner,it_item.
    ELSE.
*    LOOP AT return .
      it_error-srno = idx.
      it_error-err_msg = return-message.
      APPEND it_error.
*    ENDLOOP.
    ENDIF.
    idx = idx + 1.
  ENDLOOP.
ENDFORM.                    " CREAT_BAPI&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2009 06:32:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-file-data-for-bapi-salesorder-createfromdat2/m-p/6016077#M1346948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-15T06:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sample file data for bapi_salesorder_createfromdat2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-file-data-for-bapi-salesorder-createfromdat2/m-p/6016078#M1346949</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;Just have a look at some at the data present in the VBAK and VBAP table. Try to find the correlations and make data out of it. &lt;/P&gt;&lt;P&gt;Give the same data for both Ship to party and Sold to party. These are your partner details here. &lt;/P&gt;&lt;P&gt;You can use the code as given by Nilesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2009 06:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-file-data-for-bapi-salesorder-createfromdat2/m-p/6016078#M1346949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-15T06:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sample file data for bapi_salesorder_createfromdat2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-file-data-for-bapi-salesorder-createfromdat2/m-p/6016079#M1346950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have one  more doubt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regarding partner roles  in which table we can find partner role data  'AG'  and 'WE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;senthil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 07:02:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-file-data-for-bapi-salesorder-createfromdat2/m-p/6016079#M1346950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T07:02:08Z</dc:date>
    </item>
  </channel>
</rss>

