<?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: BAPI_SALESORDER_CREATEFROMDAT1 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003373#M709591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Davis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; try using 'CONVERSION_EXIT_ALPHA_OUTPUT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Nov 2007 20:43:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-09T20:43:20Z</dc:date>
    <item>
      <title>BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003372#M709590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run this BAPI with the following item table the item quantity, in the sales order, is always 0.  What could be wrong?  wa_item-quantity holds the correct quantity and so does item-target_qty but they aren't being transfered to the order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; LOOP AT it_item INTO wa_item.
    item_number = item_number + 10.
    itemx-updateflag = 'I'.
    item-itm_number = item_number.
    itemx-itm_number = 'X'.
    item-material = wa_item-matnr.
    itemx-material = 'X'.
    item-plant = '0010'.
    itemx-plant = 'X'.
    item-target_qty = wa_item-quantity.
    itemx-target_qty = 'X'.
    item-target_qu = 'ROL'.
    itemx-target_qu = 'X'.
    item-sales_unit = 'ROL'.
    itemx-sales_unit = 'X'.
*    item-item_categ = 'NORM'.
*    itemx-item_categ = 'X'.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = item-target_qty
      IMPORTING
        output = item-target_qty.

    APPEND item.
    APPEND itemx.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 20:39:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003372#M709590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T20:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003373#M709591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Davis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; try using 'CONVERSION_EXIT_ALPHA_OUTPUT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 20:43:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003373#M709591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T20:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003374#M709592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Satish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That didn't do anything, thanks though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 20:46:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003374#M709592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T20:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003375#M709593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the CREATEFROMDAT1 to accept the quantity you have to pass in the qty on the schedule line level, then it is put into the sales order. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case I didn't want to pass in schedule line information therefore I used BAPI 'BAPI_SALESDOCU_CREATEFROMDATA'. This accepts the qty on item level (req_qty). The only thin is you have to multiply the qty. by 1000 because the BAPI divides it by 1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use 'BUS2032' as business object. This is for Sales Orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 20:48:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003375#M709593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T20:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003376#M709594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks but that didn't seem to work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 20:56:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003376#M709594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T20:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003377#M709595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is every piece of code that touches the data in question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_item,
  matnr LIKE vbap-matnr,
  size(5) TYPE c,
  quantity LIKE bapiitemin-target_qty,
 END OF ty_item.

DATA: it_item TYPE TABLE OF ty_item,
      wa_item LIKE LINE OF it_item.

...

* this is in a loop
SPLIT filestring AT character INTO: wa_item-matnr wa_item-size quantity.
        wa_item-quantity = quantity.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = wa_item-matnr
          IMPORTING
            output = wa_item-matnr.

        APPEND wa_item TO it_item.
* end loop

...

FORM fillitems .

  DATA: item_number TYPE i VALUE 0.

  CLEAR: wa_item, item, itemx.
  REFRESH: item, itemx.

  LOOP AT it_item INTO wa_item.
    item_number = item_number + 10.
    itemx-updateflag = 'I'.
    item-itm_number = item_number.
    itemx-itm_number = 'X'.
    item-material = wa_item-matnr.
    itemx-material = 'X'.
    item-plant = '0010'.
    itemx-plant = 'X'.
    wa_item-quantity = wa_item-quantity * 1000.
    item-target_qty = wa_item-quantity.
    itemx-target_qty = 'X'.
    item-target_qu = 'ROL'.
    itemx-target_qu = 'X'.
    item-sales_unit = 'ROL'.
    itemx-sales_unit = 'X'.
*    item-item_categ = 'NORM'.
*    itemx-item_categ = 'X'.

*    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
*      EXPORTING
*        input  = item-target_qty
*      IMPORTING
*        output = item-target_qty.


*    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
*      EXPORTING
*        input  = item-target_qty
*      IMPORTING
*        output = item-target_qty.

    APPEND item.
    APPEND itemx.
  ENDLOOP.

...

  CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA'
    EXPORTING
      order_header_in           = header
      business_object           = 'BUS2032'
*     WITHOUT_COMMIT            = ' '
*     CONVERT_PARVW_AUART       = ' '
   IMPORTING
     salesdocument             = z_vbeln
*     SOLD_TO_PARTY             =
*     SHIP_TO_PARTY             =
*     BILLING_PARTY             =
     return                    = return
    TABLES
      order_items_in            = item
      order_partners            = partner
*     ORDER_ITEMS_OUT           =
*     ORDER_CFGS_REF            =
*     ORDER_CFGS_INST           =
*     ORDER_CFGS_PART_OF        =
*     ORDER_CFGS_VALUE          =
*     ORDER_CFGS_BLOB           =
*     ORDER_CCARD               =
*     ORDER_SCHEDULE_EX         =
            .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 20:59:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003377#M709595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T20:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003378#M709596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Davis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you use SAP BAPI_SALESORDER_CREATEFROMDAT2 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is your version is older than 4.6C  ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the sample code on BAPI_SALESORDER_CREATEFROMDAT2 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZSO_TEST no standard page heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data  so_header like bapisdhd1. " sales doc header&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data  so_item like bapisditm occurs 0 with header line. " sales doc item&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data so_partnr like bapiparnr occurs 0 with header line." partner detail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data so_return like bapiret2 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data : g_vbeln like bapivbeln-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*filling the header details .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so_header-doc_type = 'TA'.&lt;/P&gt;&lt;P&gt;so_header-sales_org = '1000'.&lt;/P&gt;&lt;P&gt;so_header-distr_chan = '01'.&lt;/P&gt;&lt;P&gt;so_header-division = '01'.&lt;/P&gt;&lt;P&gt;so_header-CREATED_BY = 'DEV09'.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;so_header_PURCH_NO_C = '&lt;/STRONG&gt;'.&lt;/P&gt;&lt;P&gt;break-point.&lt;/P&gt;&lt;P&gt;*filling the item data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so_item-material = 'H10002000'.&lt;/P&gt;&lt;P&gt;so_item-target_qty = '10'.&lt;/P&gt;&lt;P&gt;so_item-target_qu = 'EA'.&lt;/P&gt;&lt;P&gt;so_item-PURCH_NO_C = '*'.&lt;/P&gt;&lt;P&gt;append so_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*filling the partner details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so_partnr-PARTN_ROLE = 'AG'.&lt;/P&gt;&lt;P&gt;so_partnr-PARTN_NUMB = '0000000457'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append so_partnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*calling the bapi function module .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SALESDOCUMENTIN               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    order_header_in               = so_header&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_HEADER_INX              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SENDER                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BINARY_RELATIONSHIPTYPE       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INT_NUMBER_ASSIGNMENT         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BEHAVE_WHEN_ERROR             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LOGIC_SWITCH                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TESTRUN                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONVERT                       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   SALESDOCUMENT                 = g_vbeln&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;   RETURN                        = so_return&lt;/P&gt;&lt;P&gt;   ORDER_ITEMS_IN                = so_item&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_ITEMS_INX               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    order_partners                = so_partnr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_SCHEDULES_IN            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_SCHEDULES_INX           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CONDITIONS_IN           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_REF                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_INST               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_PART_OF            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_VALUE              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_BLOB               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_VK                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_REFINST            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CCARD                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_TEXT                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_KEYS                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSIONIN                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PARTNERADDRESSES              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   WAIT          = space&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RETURN        = so_return&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 21:01:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003378#M709596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T21:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003379#M709597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Davis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; one more try...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; can u declare a variable as like wa_item-matnr and pass the value to that variable before calling the FM CONVERSION_EXIT_*. use same variable for I/P &amp;amp; O/P.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is just a try i am not sure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 21:04:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003379#M709597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T21:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003380#M709598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to fill the structure BAPISDHEDU  ,field name REQ_QTY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 21:04:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003380#M709598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T21:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003381#M709599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I pass the qty. in the field req_qty. I am on ECC6.0 and the orders are created without any problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code for the item table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT x_upload ASSIGNING &amp;lt;fs_upload&amp;gt;.&lt;/P&gt;&lt;P&gt;    ls_item-material = &amp;lt;fs_upload&amp;gt;-matnr.&lt;/P&gt;&lt;P&gt;    ls_item-req_qty  = &amp;lt;fs_upload&amp;gt;-quantity.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  process the quantity, it needs to be three decimals, because it&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  will be moved into a string in the BAPI and divided by 1000 before&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  it is moved back into a number field (1.500 =&amp;gt; 001500 =&amp;gt; 1.5)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ls_item-req_qty = ls_item-req_qty * 1000.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  truncate remaining decimal places if exist (1.2525 =&amp;gt; 1252.5 =&amp;gt; 1252 =&amp;gt; 1.252)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ls_item-req_qty = trunc( ls_item-req_qty ).&lt;/P&gt;&lt;P&gt;    ls_item-item_categ = ls_screen-item_cat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   append ls_item to lt_item.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  now we can get rid of the entry and save memory&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    DELETE x_upload.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      order_header_in           = ls_header&lt;/P&gt;&lt;P&gt;      business_object           = gc_bus_obj&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      SALESDOCUMENT             = lv_vbeln&lt;/P&gt;&lt;P&gt;      RETURN                    = ls_return&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      order_items_in            = lt_item&lt;/P&gt;&lt;P&gt;      order_partners            = lt_partner.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 21:08:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003381#M709599</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T21:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003382#M709600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, I am using the wrong field for the quantity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 21:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat1/m-p/3003382#M709600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-09T21:11:09Z</dc:date>
    </item>
  </channel>
</rss>

