<?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 bapi_commit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/2602537#M596271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;1.i want the details about bapi_commit &lt;/P&gt;&lt;P&gt;2.how do we create bapi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Jul 2007 10:27:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-28T10:27:01Z</dc:date>
    <item>
      <title>bapi_commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/2602537#M596271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;1.i want the details about bapi_commit &lt;/P&gt;&lt;P&gt;2.how do we create bapi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 10:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/2602537#M596271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-28T10:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/2602538#M596272</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_COMMIT is used to commit the changes to the Database tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI stands for Business API(Application Program Interface).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..&lt;/P&gt;&lt;P&gt;You can make your function module remotely enabled in attributes of Function module but&lt;/P&gt;&lt;P&gt;A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following standardized BAPIs are provided: &lt;/P&gt;&lt;P&gt;Reading instances of SAP business objects &lt;/P&gt;&lt;P&gt;GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BAPI GetList() is a class method. &lt;/P&gt;&lt;P&gt;GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create( ) and CreateFromData! ( ) &lt;/P&gt;&lt;P&gt;The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change( ) &lt;/P&gt;&lt;P&gt;The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add&amp;lt;subobject&amp;gt; ( ) and Remove&amp;lt;subobject&amp;gt; ( ) The BAPI Add&amp;lt;subobject&amp;gt; adds a subobject to an existing object inst! ance and the BAPI and Remove&amp;lt;subobject&amp;gt; removes a subobject from an object instance. These BAPIs are instance methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI-step by step&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/bapi/example.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/bapi/example.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;list of all bapis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.planetsap.com/LIST_ALL_BAPIs.htm" target="test_blank"&gt;http://www.planetsap.com/LIST_ALL_BAPIs.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for BAPI's&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/bapiintro.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/bapiintro.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/bapiprg.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/bapiprg.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/bapiactx.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/bapiactx.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/bapilst.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/bapilst.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/bapiexer.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/bapiexer.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://service.sap.com/ale" target="test_blank"&gt;http://service.sap.com/ale&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://service.sap.com/bapi" target="test_blank"&gt;http://service.sap.com/bapi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.planetsap.com/Bapi_main_page.htm" target="test_blank"&gt;http://www.planetsap.com/Bapi_main_page.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.topxml.com/sap/sap_idoc_xml.asp" target="test_blank"&gt;http://www.topxml.com/sap/sap_idoc_xml.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/" target="test_blank"&gt;http://www.sapdevelopment.co.uk/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf" target="test_blank"&gt;http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also refer to the following links..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com/bapi.htm" target="test_blank"&gt;www.sap-img.com/bapi.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com/abap/bapi-conventions.htm" target="test_blank"&gt;www.sap-img.com/abap/bapi-conventions.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.planetsap.com/Bapi_main_page.htm" target="test_blank"&gt;www.planetsap.com/Bapi_main_page.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sapgenie.com/abap/bapi/index.htm" target="test_blank"&gt;www.sapgenie.com/abap/bapi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checkout !!&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://techrepublic.com.com/5100-6329-1051160.html#" target="test_blank"&gt;http://techrepublic.com.com/5100-6329-1051160.html#&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U need to give the step_nr, item_nr, cond_count and cond_type so the correct conditon will be updated. If no condition exists for the given parameters, a new condition will be created.&lt;/P&gt;&lt;P&gt;U can find these parameters for a particular condition type in table KONV.&lt;/P&gt;&lt;P&gt;&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; Form saveTransactionJOCR&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM saveTransactionJOCR .&lt;/P&gt;&lt;P&gt;data: salesdocument like BAPIVBELN-VBELN,&lt;/P&gt;&lt;P&gt;order_header_inx like bapisdh1x,&lt;/P&gt;&lt;P&gt;order_header_in like bapisdh1,&lt;/P&gt;&lt;P&gt;return type standard table of bapiret2 with header line,&lt;/P&gt;&lt;P&gt;conditions_in type standard table of bapicond with header line,&lt;/P&gt;&lt;P&gt;conditions_inx type standard table of bapicondx with header line,&lt;/P&gt;&lt;P&gt;logic_switch like BAPISDLS,&lt;/P&gt;&lt;P&gt;step_nr like conditions_in-cond_st_no,&lt;/P&gt;&lt;P&gt;item_nr like conditions_in-itm_number,&lt;/P&gt;&lt;P&gt;cond_count like conditions_in-cond_count,&lt;/P&gt;&lt;P&gt;cond_type like conditions_in-cond_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;salesdocument = wa_order_information-VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOGIC_SWITCH-COND_HANDL = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;order_header_inx-updateflag = 'U'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;conditions&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear conditions_in[].&lt;/P&gt;&lt;P&gt;clear conditions_inx[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: step_nr,&lt;/P&gt;&lt;P&gt;item_nr,&lt;/P&gt;&lt;P&gt;cond_count,&lt;/P&gt;&lt;P&gt;cond_type.&lt;/P&gt;&lt;P&gt;step_nr = '710'.&lt;/P&gt;&lt;P&gt;item_nr = '000000'.&lt;/P&gt;&lt;P&gt;cond_count = '01'.&lt;/P&gt;&lt;P&gt;cond_type = 'ZCP2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDITIONS_IN-ITM_NUMBER = item_nr.&lt;/P&gt;&lt;P&gt;conditions_in-cond_st_no = step_nr.&lt;/P&gt;&lt;P&gt;CONDITIONS_IN-COND_COUNT = cond_count.&lt;/P&gt;&lt;P&gt;CONDITIONS_IN-COND_TYPE = cond_type.&lt;/P&gt;&lt;P&gt;CONDITIONS_IN-COND_VALUE = 666.&lt;/P&gt;&lt;P&gt;CONDITIONS_IN-CURRENCY = 'EUR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append conditions_in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDITIONS_INX-ITM_NUMBER = item_nr.&lt;/P&gt;&lt;P&gt;conditions_inx-cond_st_no = step_nr.&lt;/P&gt;&lt;P&gt;CONDITIONS_INX-COND_COUNT = cond_count.&lt;/P&gt;&lt;P&gt;CONDITIONS_INX-COND_TYPE = cond_type.&lt;/P&gt;&lt;P&gt;CONDITIONS_INX-UPDATEFLAG = 'U'.&lt;/P&gt;&lt;P&gt;CONDITIONS_INX-COND_VALUE = 'X'.&lt;/P&gt;&lt;P&gt;CONDITIONS_INX-CURRENCY = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append conditions_inx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SALESORDER_CHANGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;SALESDOCUMENT = salesdocument&lt;/P&gt;&lt;P&gt;ORDER_HEADER_IN = order_header_in&lt;/P&gt;&lt;P&gt;ORDER_HEADER_INX = order_header_inx&lt;/P&gt;&lt;P&gt;LOGIC_SWITCH = logic_switch&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;RETURN = return&lt;/P&gt;&lt;P&gt;CONDITIONS_IN = conditions_in&lt;/P&gt;&lt;P&gt;CONDITIONS_INX = conditions_inx&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if return-type ne 'E'.&lt;/P&gt;&lt;P&gt;commit work and wait.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " saveTransactionJOCR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bdc to Bapi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps to be followed are :&lt;/P&gt;&lt;P&gt;1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).&lt;/P&gt;&lt;P&gt;[for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]&lt;/P&gt;&lt;P&gt;2. Create a Z program and call the BAPi (same as a Funtion module call).&lt;/P&gt;&lt;P&gt;2. Now, if you see this BAPi, it has &lt;/P&gt;&lt;P&gt;-&amp;gt; Importing structures. &lt;/P&gt;&lt;P&gt;eg: SALESDOCUMENT: this will take the Sales order header data as input.&lt;/P&gt;&lt;P&gt;-&amp;gt; Tables parameters: &lt;/P&gt;&lt;P&gt;eg: ORDER_ITEM_IN: this will take the line item data as input. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note :&lt;/P&gt;&lt;P&gt;Only specify fields that should be changed&lt;/P&gt;&lt;P&gt;Select these fields by entering an X in the checkboxes&lt;/P&gt;&lt;P&gt;Enter a U in the UPDATEFLAG field&lt;/P&gt;&lt;P&gt;Always specify key fields when changing the data, including in the checkboxes&lt;/P&gt;&lt;P&gt;The configuration is an exception here. If this needs to be changed, you need to complete it again fully.&lt;/P&gt;&lt;P&gt;Maintain quantities and dates in the schedule line data&lt;/P&gt;&lt;P&gt;Possible UPDATEFLAGS:&lt;/P&gt;&lt;P&gt;U = change&lt;/P&gt;&lt;P&gt;D = delete&lt;/P&gt;&lt;P&gt;I = add&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;1. Delete the whole order&lt;/P&gt;&lt;P&gt;2. Delete order items&lt;/P&gt;&lt;P&gt;3. Change the order&lt;/P&gt;&lt;P&gt;4. Change the configuration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes&lt;/P&gt;&lt;P&gt;1. Minimum entry:&lt;/P&gt;&lt;P&gt;You must enter the order number in the SALESDOCUMENT structure.&lt;/P&gt;&lt;P&gt;You must always enter key fields for changes.&lt;/P&gt;&lt;P&gt;You must always specify the update indicator in the ORDER_HEADER_INX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Commit control:&lt;/P&gt;&lt;P&gt;The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For further details... refer to the Function Module documentation for the BAPi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bapi to VB(Visual Basic)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Long back I had used the following flow structure to acheive the same.&lt;/P&gt;&lt;P&gt;Report -&amp;gt; SM59 RFC destination -&amp;gt; COM4ABAP -&amp;gt; VB.exe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my report uses the rfc destination to create a COM session with com4abap. com4abap calls the vb.exe and manages the flow of data between sap and vb exe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to have com4abap.exe&lt;/P&gt;&lt;P&gt;If com4abap is installed you will find it in sapgui installatin directory , C:\Program Files\SAPpc\sapgui\RFCSDK\com4abap.&lt;/P&gt;&lt;P&gt;else refer OSS note 419822 for installation of com4abap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after making the settings in com4abap to point to the vb program and setting up rfc destination in sm59 to point to com4abap session , you can use the following function modules to call the vb code. &lt;/P&gt;&lt;P&gt;for setting up com4abap and rfc destination please refer to the documentation for com4abap.&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;Invoke NEW DCOM session&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'BEGIN_COM_SESSION'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;service_dest = service_dest "(this will be a RFC destination created in SM59)&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;worker_dest = worker_dest&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;connect_to_dcom_service_failed = 1&lt;/P&gt;&lt;P&gt;connect_to_dcom_worker_failed = 2&lt;/P&gt;&lt;P&gt;others = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'create_com_instance' destination worker_dest&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;clsid = g_c_clsid&lt;/P&gt;&lt;P&gt;typelib = g_c_typelib&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;instid = g_f_oid&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;communication_failure = 1 message g_f_msg&lt;/P&gt;&lt;P&gt;system_failure = 2 message g_f_msg&lt;/P&gt;&lt;P&gt;invalid_instance_id = 3&lt;/P&gt;&lt;P&gt;others = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'com_invoke' destination worker_dest&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;%instid = g_f_oid&lt;/P&gt;&lt;P&gt;%method = 'UpdatePDF'&lt;/P&gt;&lt;P&gt;sntemp = g_v_const_filent&lt;/P&gt;&lt;P&gt;snsysid = sy-sysid&lt;/P&gt;&lt;P&gt;snflag = 'N'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;rssaptable = g_t_pdfdetail1&lt;/P&gt;&lt;P&gt;%return = g_t_pdfdetail1 "t_test&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;communication_failure = 1 message g_f_msg&lt;/P&gt;&lt;P&gt;system_failure = 2 message g_f_msg&lt;/P&gt;&lt;P&gt;invalid_instance_id = 3&lt;/P&gt;&lt;P&gt;others = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then close the com session , using&lt;/P&gt;&lt;P&gt;FM delete_com_instance&lt;/P&gt;&lt;P&gt;FM END_COM_SESSION &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the sample code for BAPI&lt;/P&gt;&lt;P&gt;************SALES ORDER INPUT CREATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_auart TYPE auart OBLIGATORY.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_spart TYPE vtweg OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_sold TYPE kunnr OBLIGATORY.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_ship TYPE kunnr OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ITEM&lt;/P&gt;&lt;P&gt;PARAMETERS: p_matnr TYPE matnr OBLIGATORY.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_plant TYPE werks_d OBLIGATORY.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_itcat TYPE pstyv OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DATA DECLARATIONS.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: v_vbeln LIKE vbak-vbeln.&lt;/P&gt;&lt;P&gt;DATA: header LIKE bapisdhead1.&lt;/P&gt;&lt;P&gt;DATA: headerx LIKE bapisdhead1x.&lt;/P&gt;&lt;P&gt;DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;HEADER DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;header-doc_type = p_auart.&lt;/P&gt;&lt;P&gt;headerx-doc_type = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;header-sales_org = p_vkorg.&lt;/P&gt;&lt;P&gt;headerx-sales_org = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;header-distr_chan = p_vtweg.&lt;/P&gt;&lt;P&gt;headerx-distr_chan = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;header-division = p_spart.&lt;/P&gt;&lt;P&gt;headerx-division = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;headerx-updateflag = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PARTNER DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;partner-partn_role = 'AG'.&lt;/P&gt;&lt;P&gt;partner-partn_numb = p_sold.&lt;/P&gt;&lt;P&gt;APPEND partner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;partner-partn_role = 'WE'.&lt;/P&gt;&lt;P&gt;partner-partn_numb = p_ship.&lt;/P&gt;&lt;P&gt;APPEND partner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ITEM DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;itemx-updateflag = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;itemx-itm_number = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item-material = p_matnr.&lt;/P&gt;&lt;P&gt;itemx-material = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item-plant = p_plant.&lt;/P&gt;&lt;P&gt;itemx-plant = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item-target_qty = p_menge.&lt;/P&gt;&lt;P&gt;itemx-target_qty = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item-target_qu = 'EA'.&lt;/P&gt;&lt;P&gt;itemx-target_qu = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item-item_categ = p_itcat.&lt;/P&gt;&lt;P&gt;itemx-item_categ = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND item.&lt;/P&gt;&lt;P&gt;APPEND itemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill schedule lines&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;lt_schedules_in-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;lt_schedules_in-sched_line = '0001'.&lt;/P&gt;&lt;P&gt;lt_schedules_in-req_qty = p_menge.&lt;/P&gt;&lt;P&gt;APPEND lt_schedules_in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill schedule line flags&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;lt_schedules_inx-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;lt_schedules_inx-sched_line = '0001'.&lt;/P&gt;&lt;P&gt;lt_schedules_inx-updateflag = 'X'.&lt;/P&gt;&lt;P&gt;lt_schedules_inx-req_qty = 'X'.&lt;/P&gt;&lt;P&gt;APPEND lt_schedules_inx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the BAPI&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;sales_header_in = header&lt;/P&gt;&lt;P&gt;sales_header_inx = headerx&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;salesdocument_ex = v_vbeln&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;return = return&lt;/P&gt;&lt;P&gt;sales_items_in = item&lt;/P&gt;&lt;P&gt;sales_items_inx = itemx&lt;/P&gt;&lt;P&gt;sales_schedules_in = lt_schedules_in&lt;/P&gt;&lt;P&gt;sales_schedules_inx = lt_schedules_inx&lt;/P&gt;&lt;P&gt;sales_partners = partner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check the return table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT return WHERE type = 'E' OR type = 'A'.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'Error in creating document'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'Document ', v_vbeln, ' created'.&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;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 10:38:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/2602538#M596272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-28T10:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/2602539#M596273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;realy good explanation&lt;/P&gt;&lt;P&gt;i need one more thing i.e. how to create dynamic internal tables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 10:46:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/2602539#M596273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-28T10:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/2602540#M596274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to be able to commit or rollback database modifications as a unity they must be in the same logical unit of work. Two SAP transactions (CALL TRANSACTION aaa followed by CALL TRANSACTION bbb) have their own LUW because they are part of separate sessions. However, two BAPI's can be part of the same LUW, so one BAPI_COMMIT can refer to more than one CALL FUNCTION BAPI_... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example program&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZBAPI_SALESORDER_CREATE LINE-SIZE 132 MESSAGE-ID ZMMBAPI .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       Internal table definition                                     *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Communication Fields: Sales and Distribution Document Header&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;DATA: GT_ORDER_HEADER_IN LIKE BAPISDHD1,&lt;/P&gt;&lt;P&gt;*******&amp;lt;&amp;lt;&amp;lt;Checkbox Fields for Sales and Distribution Document Header&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;      GT_ORDER_HEADER_INX  LIKE    BAPISDHD1X,&lt;/P&gt;&lt;P&gt;*****&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Return Parameter&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;      GT_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE,  " Return Messages&lt;/P&gt;&lt;P&gt;*********&amp;lt;&amp;lt;&amp;lt;Communication Fields: Sales and Distribution Document Item&amp;lt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;      GT_ORDER_ITEMS_IN LIKE BAPISDITM OCCURS 0 WITH HEADER LINE, " Item Data&lt;/P&gt;&lt;P&gt;*********&amp;lt;&amp;lt;&amp;lt;Communication Fields: Sales and Distribution Document Item&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;      GT_ORDER_ITEMS_INX LIKE BAPISDITMX OCCURS 0 WITH HEADER LINE, "Item Data Checkbox&lt;/P&gt;&lt;P&gt;*********&amp;lt;&amp;lt;&amp;lt;Communication Fields: Sales and Distribution Document Item&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;      GT_SALESDOCUMENT LIKE BAPIVBELN-VBELN , "Number of Generated Document&lt;/P&gt;&lt;P&gt;*********&amp;lt;&amp;lt;&amp;lt;Communications Fields: SD Document Partner: WWW&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;      GT_ORDER_PARTNERS  LIKE BAPIPARNR OCCURS 0 WITH HEADER LINE, "Document Partner&lt;/P&gt;&lt;P&gt;********&amp;lt;&amp;lt;&amp;lt;&amp;lt;Communications Fields: SD Document Partner: WWW&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;      GT_ORDER_SCHEDULES_IN LIKE BAPISCHDL OCCURS 0 WITH HEADER LINE, "Schedule Line Data&lt;/P&gt;&lt;P&gt;****&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Checkbox List for Maintaining Sales Document Schedule Line&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;      GT_ORDER_SCHEDULES_INX LIKE BAPISCHDLX OCCURS 0 WITH HEADER LINE, " Checkbox Schedule Line Data&lt;/P&gt;&lt;P&gt;*******Communication Fields for Maintaining Conditions in the Order&lt;/P&gt;&lt;P&gt;      GT_ORDER_CONDITIONS_IN  LIKE BAPICOND OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;******Communication Fields for Maintaining Conditions in the Order&lt;/P&gt;&lt;P&gt;      GT_ORDER_CONDITIONS_INX LIKE BAPICONDX OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       Data definition                                               *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&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;&lt;/P&gt;&lt;P&gt;DATA:  BEGIN OF GT_FT_SALES OCCURS 0,&lt;/P&gt;&lt;P&gt;       DOC_TYPE(4)  ,        "Sales Document Type&lt;/P&gt;&lt;P&gt;       SALES_ORG(4) ,        "Sales Organization&lt;/P&gt;&lt;P&gt;       DISTR_CHAN(2)  ,      "Distribution Channel&lt;/P&gt;&lt;P&gt;       DIVISION(2)   ,       "DIVISION(2)&lt;/P&gt;&lt;P&gt;       SALES_DIST(6)  ,      "Sales district&lt;/P&gt;&lt;P&gt;       INCOTERMS1(3)  ,      "Incoterms (part 1)&lt;/P&gt;&lt;P&gt;       INCOTERMS2(28)  ,     "Incoterms (part 2)&lt;/P&gt;&lt;P&gt;       PMNTTRMS(4)  ,        "Terms of payment key&lt;/P&gt;&lt;P&gt;       PRICE_DATE(8) ,       "Date for pricing and exchange rate&lt;/P&gt;&lt;P&gt;       PURCH_NO_C(35)  ,     "Customer purchase order number&lt;/P&gt;&lt;P&gt;       PURCH_NO_S(35)  ,     "Ship-to Party's Purchase Order Number&lt;/P&gt;&lt;P&gt;       EXCHG_RATE(8)  ,      "Directly quoted exchange rate for pricing and statistics&lt;/P&gt;&lt;P&gt;       CURRENCY(5) ,         "SD document currency&lt;/P&gt;&lt;P&gt;       MATERIAL(18),         "MATERIAL&lt;/P&gt;&lt;P&gt;       TARGET_QTY(13)  ,     "Target quantity in sales units&lt;/P&gt;&lt;P&gt;       ITEM_CATEG(4)  ,      "Sales document item category&lt;/P&gt;&lt;P&gt;       MATL_GROUP(8)  ,      "Material Group&lt;/P&gt;&lt;P&gt;       PURCH_NO_C1(35),      "Customer purchase order number&lt;/P&gt;&lt;P&gt;       SALES_DIST1(6)  ,     "Sales district&lt;/P&gt;&lt;P&gt;       INCOTERMS11(3)  ,     "Incoterms (part 1)&lt;/P&gt;&lt;P&gt;       INCOTERMS21(28),     "Incoterms (part 2)&lt;/P&gt;&lt;P&gt;       PMNTTRMS1(4)  ,     "Terms of payment key&lt;/P&gt;&lt;P&gt;       EXCHG_RATE1(8) ,    "Directly quoted exchange rate for pricing and statistics&lt;/P&gt;&lt;P&gt;       PRICE_DATE1(8) ,    "Date for pricing and exchange rate&lt;/P&gt;&lt;P&gt;       TRG_QTY_NO(5)    , "Factor for converting sales units to base units (target qty)&lt;/P&gt;&lt;P&gt;       DIVISION1(2)     ,                                   "DIVISION1&lt;/P&gt;&lt;P&gt;       SALQTYNUM(5)     , "Numerator (factor) for conversion of sales quantity into SKU&lt;/P&gt;&lt;P&gt;       GROSS_WGHT(3)    , "Gross Weight of the Item&lt;/P&gt;&lt;P&gt;       NET_WEIGHT(15)    , "Net Weight of the Item&lt;/P&gt;&lt;P&gt;       UNTOF_WGHT(3)    ,"Weight Unit&lt;/P&gt;&lt;P&gt;       PARTN_ROLE(2)   ,"Partner function&lt;/P&gt;&lt;P&gt;       PARTN_NUMB(10)   ,"Customer Number 1&lt;/P&gt;&lt;P&gt;********&amp;lt;&amp;lt;&amp;lt;&amp;lt;Communications Fields: SD Document Partner: WWW&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;       ITM_NUMBER(6) ,"Item number of the SD document&lt;/P&gt;&lt;P&gt;       REQ_QTY(8)  , "Schedule line date&lt;/P&gt;&lt;P&gt;       DLV_DATE(8)  , "Schedule line date&lt;/P&gt;&lt;P&gt;       MS_DATE(8)  , "Material availability date&lt;/P&gt;&lt;P&gt;       LOAD_DATE(8) , "Loading time (local time with reference to a shipping point)&lt;/P&gt;&lt;P&gt;       GI_DATE(8), "Time of goods issue (local DATE, with reference to a plant)&lt;/P&gt;&lt;P&gt;       TP_DATE(8)  , "Transportation planning -time (local w/ref. to shipping pnt)&lt;/P&gt;&lt;P&gt;       ITM_NUMBER2(6) , "Condition item number&lt;/P&gt;&lt;P&gt;END OF GT_FT_SALES,&lt;/P&gt;&lt;P&gt;       MSG(240) TYPE  C,  " Return Message&lt;/P&gt;&lt;P&gt;       E_REC(8) TYPE C,    " Error Records Counter&lt;/P&gt;&lt;P&gt;       REC_NO(8) TYPE C, " Records Number Indicator&lt;/P&gt;&lt;P&gt;       S_REC(8) TYPE C,   " Successful Records Counter&lt;/P&gt;&lt;P&gt;       T_REC(8) TYPE C.   " Total Records Counter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;selection block for EXCEL UPLOAD FILE&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.&lt;/P&gt;&lt;P&gt;  PARAMETERS FILE TYPE  IBIPPARMS-PATH OBLIGATORY.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B1.&lt;/P&gt;&lt;P&gt;*&amp;lt;&amp;lt;&amp;lt;&amp;lt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      PROGRAM_NAME  = SYST-CPROG&lt;/P&gt;&lt;P&gt;      DYNPRO_NUMBER = SYST-DYNNR&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      FILE_NAME     = FILE.&lt;/P&gt;&lt;P&gt;**&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;START-OF-SELECTION.&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_UPLOAD'                                 "#EC *&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FILENAME                = FILE&lt;/P&gt;&lt;P&gt;      FILETYPE                = 'DAT'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DATA_TAB                = GT_FT_SALES&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      CONVERSION_ERROR        = 1&lt;/P&gt;&lt;P&gt;      FILE_OPEN_ERROR         = 2&lt;/P&gt;&lt;P&gt;      FILE_READ_ERROR         = 3&lt;/P&gt;&lt;P&gt;      INVALID_TYPE            = 4&lt;/P&gt;&lt;P&gt;      NO_BATCH                = 5&lt;/P&gt;&lt;P&gt;      UNKNOWN_ERROR           = 6&lt;/P&gt;&lt;P&gt;      INVALID_TABLE_WIDTH     = 7&lt;/P&gt;&lt;P&gt;      GUI_REFUSE_FILETRANSFER = 8&lt;/P&gt;&lt;P&gt;      CUSTOMER_ERROR          = 9&lt;/P&gt;&lt;P&gt;      NO_AUTHORITY            = 10&lt;/P&gt;&lt;P&gt;      OTHERS                  = 11.&lt;/P&gt;&lt;P&gt;  IF  SY-SUBRC &amp;lt;&amp;gt; 0  .&lt;/P&gt;&lt;P&gt;    MESSAGE E000.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SKIP 3.&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_HEADING INVERSE ON.&lt;/P&gt;&lt;P&gt;    WRITE 40 TEXT-001.&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_HEADING INVERSE OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SKIP 1.&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_NEGATIVE INVERSE ON.&lt;/P&gt;&lt;P&gt;    WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; TEXT-002, 13 SY-MANDT , 104 TEXT-003, 111 SY-UNAME,&lt;/P&gt;&lt;P&gt;              / TEXT-004, 13 SY-DATUM , 104 TEXT-005, 111 SY-UZEIT.&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_NEGATIVE INVERSE OFF.&lt;/P&gt;&lt;P&gt;  SKIP 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT GT_FT_SALES.&lt;/P&gt;&lt;P&gt;      PERFORM SLALE_UPLOAD_DATA.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  T_REC = E_REC + S_REC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SKIP 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_TOTAL INVERSE ON.&lt;/P&gt;&lt;P&gt;    WRITE: /38 TEXT-007, T_REC.&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_TOTAL INVERSE OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_NEGATIVE INVERSE ON.&lt;/P&gt;&lt;P&gt;    WRITE: /38 TEXT-008, E_REC.&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_NEGATIVE INVERSE OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_TOTAL INVERSE ON.&lt;/P&gt;&lt;P&gt;    WRITE: /38 TEXT-009, S_REC.&lt;/P&gt;&lt;P&gt;  FORMAT COLOR COL_TOTAL INVERSE OFF.&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;      Form  SLALE_UPLOAD_DATA&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM SLALE_UPLOAD_DATA .&lt;/P&gt;&lt;P&gt;*******&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Communication Fields: Sales and Distribution Document Header&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-DOC_TYPE =    'TA'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-SALES_ORG =  GT_FT_SALES-SALES_ORG . "'0001'&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-DISTR_CHAN = GT_FT_SALES-DISTR_CHAN. "'01'&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-DIVISION  =   GT_FT_SALES-DIVISION.  " '01'&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-SALES_DIST = GT_FT_SALES-SALES_DIST ."'000001'&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-INCOTERMS1 = GT_FT_SALES-INCOTERMS1.  "'CFR'&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-INCOTERMS2 = GT_FT_SALES-INCOTERMS2 . "'HAMBURG'&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-PMNTTRMS = GT_FT_SALES-PMNTTRMS .    "'0001'&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-PRICE_DATE = GT_FT_SALES-PRICE_DATE ."'20060818'&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-PURCH_NO_C =  '32'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-PURCH_NO_S =   '32'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-EXCHG_RATE =  GT_FT_SALES-EXCHG_RATE ."'1.00000'&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_IN-CURRENCY = GT_FT_SALES-CURRENCY . " 'EUR'&lt;/P&gt;&lt;P&gt;********&amp;lt;&amp;lt;&amp;lt;Checkbox Fields for Sales and Distribution Document Header&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-DOC_TYPE   = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-SALES_ORG  = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-DISTR_CHAN = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-DIVISION   = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-SALES_DIST = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-INCOTERMS1 = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-INCOTERMS2 = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-PMNTTRMS =   'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-PRICE_DATE = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-PURCH_NO_C = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-PURCH_NO_S = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-EXCHG_RATE =  'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_HEADER_INX-CURRENCY = 'X'.&lt;/P&gt;&lt;P&gt;*****&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Communication Fields: Sales and Distribution Document Item&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-ITM_NUMBER = '000010'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-MATERIAL  =  GT_FT_SALES-MATERIAL .&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-PO_ITM_NO = '32'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-CUST_MAT22 = 'AGNI-IV'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-BILL_DATE = '20060808'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-PLANT = '0001'.&lt;/P&gt;&lt;P&gt;*GT_ORDER_ITEMS_IN-STORE_LOC = '0001'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-TARGET_QTY = GT_FT_SALES-TARGET_QTY . "'1000'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-ITEM_CATEG = GT_FT_SALES-ITEM_CATEG . "'TAN'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-MATL_GROUP = GT_FT_SALES-MATL_GROUP . "'01'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-PURCH_NO_C = GT_FT_SALES-PURCH_NO_C . "'32'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-SALES_DIST = GT_FT_SALES-SALES_DIST . "'000001'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-INCOTERMS1 = GT_FT_SALES-INCOTERMS1 . "'CFR'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-INCOTERMS2 = GT_FT_SALES-INCOTERMS2 . "'HAMBURG'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-PMNTTRMS = GT_FT_SALES-PMNTTRMS  .    "'0001'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-EXCHG_RATE = GT_FT_SALES-EXCHG_RATE . "'1.00000'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-PRICE_DATE = GT_FT_SALES-PRICE_DATE . "'20060808'&lt;/P&gt;&lt;P&gt;*GT_ORDER_ITEMS_IN-SALES_UNIT = 'DZ'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-TRG_QTY_NO = GT_FT_SALES-TRG_QTY_NO . "'23'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-DIVISION = GT_FT_SALES-DIVISION   .   "'01'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-SALQTYNUM = GT_FT_SALES-SALQTYNUM .   "'32'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-GROSS_WGHT = GT_FT_SALES-GROSS_WGHT.  " ' 25272000'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-NET_WEIGHT = GT_FT_SALES-NET_WEIGHT.  "'24464000'&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_IN-UNTOF_WGHT = GT_FT_SALES-UNTOF_WGHT . " 'KG'&lt;/P&gt;&lt;P&gt;*GT_ORDER_ITEMS_IN-CURRENCY = 'EUR'.&lt;/P&gt;&lt;P&gt;    APPEND  GT_ORDER_ITEMS_IN.&lt;/P&gt;&lt;P&gt;****&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Communication Fields: Sales and Distribution Document Item&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-ITM_NUMBER = '000010'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-MATERIAL = 'X'.&lt;/P&gt;&lt;P&gt;*GT_ORDER_ITEMS_INX-PO_ITM_NO = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-CUST_MAT22 = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-BILL_DATE = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-PLANT = 'X'.&lt;/P&gt;&lt;P&gt;*GT_ORDER_ITEMS_INX-STORE_LOC = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-TARGET_QTY = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-ITEM_CATEG = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-MATL_GROUP = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-PURCH_NO_C = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-SALES_DIST = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-INCOTERMS1 = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-INCOTERMS2 = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-PMNTTRMS = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-EXCHG_RATE = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-PRICE_DATE = 'X'.&lt;/P&gt;&lt;P&gt;*GT_ORDER_ITEMS_INX-SALES_UNIT = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-TRG_QTY_NO = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-DIVISION = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-SALQTYNUM = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-GROSS_WGHT =  'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-NET_WEIGHT = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_ITEMS_INX-UNTOF_WGHT = 'X'.&lt;/P&gt;&lt;P&gt;*GT_ORDER_ITEMS_IN-CURRENCY = 'x'.&lt;/P&gt;&lt;P&gt;    APPEND  GT_ORDER_ITEMS_INX.&lt;/P&gt;&lt;P&gt;*****&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Communications Fields: SD Document Partner: WWW&lt;/P&gt;&lt;P&gt;    GT_ORDER_PARTNERS-PARTN_ROLE =   'WE'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_PARTNERS-PARTN_NUMB =  '0000000057'.&lt;/P&gt;&lt;P&gt;***GT_ORDER_PARTNERS-ITM_NUMBER = GT_FT_SALES-ITM_NUMBER . " '000010'.&lt;/P&gt;&lt;P&gt;    APPEND  GT_ORDER_PARTNERS.&lt;/P&gt;&lt;P&gt;*********&amp;lt;&amp;lt;&amp;lt;&amp;lt;Communications Fields: SD Document Partner: WWW&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_IN-ITM_NUMBER = GT_FT_SALES-ITM_NUMBER." '000010'&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_IN-REQ_QTY = GT_FT_SALES-REQ_QTY .   "'234'&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_IN-DLV_DATE = GT_FT_SALES-DLV_DATE  ."  '20060824'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_IN-MS_DATE =  GT_FT_SALES-MS_DATE .  "'20060808'&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_IN-LOAD_DATE = GT_FT_SALES-LOAD_DATE.  " '20060822'&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_IN-GI_DATE = GT_FT_SALES-GI_DATE . " '20060823'&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_IN-TP_DATE = GT_FT_SALES-TP_DATE .   "'20060821'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND  gt_ORDER_SCHEDULES_IN.&lt;/P&gt;&lt;P&gt;*********&amp;lt;&amp;lt;&amp;lt;&amp;lt;Communications Fields: SD Document Partner: WWW FLAG&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_INX-ITM_NUMBER = '000010'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_INX-REQ_QTY = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_INX-DLV_DATE = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_INX-MS_DATE = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_INX-LOAD_DATE = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_INX-GI_DATE = 'X'.&lt;/P&gt;&lt;P&gt;    GT_ORDER_SCHEDULES_INX-DLV_DATE = 'X'.&lt;/P&gt;&lt;P&gt;    APPEND  gt_ORDER_SCHEDULES_INX.&lt;/P&gt;&lt;P&gt;********Communication Fields for Maintaining Conditions in the Order&lt;/P&gt;&lt;P&gt;    GT_ORDER_CONDITIONS_IN-ITM_NUMBER = GT_FT_SALES-ITM_NUMBER ." '000010'&lt;/P&gt;&lt;P&gt;    APPEND GT_ORDER_CONDITIONS_IN.&lt;/P&gt;&lt;P&gt;***Communication Fields for Maintaining Conditions in the Order&lt;/P&gt;&lt;P&gt;    GT_ORDER_CONDITIONS_INX-ITM_NUMBER = '000010'.&lt;/P&gt;&lt;P&gt;    APPEND GT_ORDER_CONDITIONS_INX.&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               = GT_ORDER_HEADER_IN&lt;/P&gt;&lt;P&gt;        ORDER_HEADER_INX              = GT_ORDER_HEADER_INX&lt;/P&gt;&lt;UL&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                  = GT_SALESDOCUMENT&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;       RETURN                         = GT_RETURN&lt;/P&gt;&lt;P&gt;        ORDER_ITEMS_IN                = GT_ORDER_ITEMS_IN&lt;/P&gt;&lt;P&gt;        ORDER_ITEMS_INX               = GT_ORDER_ITEMS_INX&lt;/P&gt;&lt;P&gt;        ORDER_PARTNERS                = GT_ORDER_PARTNERS&lt;/P&gt;&lt;P&gt;       ORDER_SCHEDULES_IN            =  GT_ORDER_SCHEDULES_IN&lt;/P&gt;&lt;P&gt;       ORDER_SCHEDULES_INX           =  GT_ORDER_SCHEDULES_INX&lt;/P&gt;&lt;P&gt;       ORDER_CONDITIONS_IN           =  GT_ORDER_CONDITIONS_IN&lt;/P&gt;&lt;P&gt;       ORDER_CONDITIONS_INX          =  GT_ORDER_CONDITIONS_INX&lt;/P&gt;&lt;UL&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;    IF GT_RETURN-TYPE EQ 'E' .&lt;/P&gt;&lt;P&gt;      E_REC = E_REC + 1.&lt;/P&gt;&lt;P&gt;      READ TABLE GT_RETURN WITH KEY ID = 'V1'.&lt;/P&gt;&lt;P&gt;      FORMAT COLOR COL_NEGATIVE INVERSE ON.&lt;/P&gt;&lt;P&gt;      REC_NO = E_REC + S_REC.&lt;/P&gt;&lt;P&gt;          CONCATENATE TEXT-006 REC_NO ':'&lt;/P&gt;&lt;P&gt;          GT_RETURN-MESSAGE INTO MSG SEPARATED BY SPACE .&lt;/P&gt;&lt;P&gt;          CONDENSE MSG.&lt;/P&gt;&lt;P&gt;          WRITE: / MSG.&lt;/P&gt;&lt;P&gt;      FORMAT COLOR COL_NEGATIVE INVERSE OFF.&lt;/P&gt;&lt;P&gt;  ELSEIF GT_RETURN-TYPE EQ 'S'.&lt;/P&gt;&lt;P&gt;      S_REC = S_REC + 1.&lt;/P&gt;&lt;P&gt;      FORMAT COLOR COL_POSITIVE INVERSE ON.&lt;/P&gt;&lt;P&gt;          MSG = GT_RETURN-MESSAGE.&lt;/P&gt;&lt;P&gt;          CONDENSE MSG.&lt;/P&gt;&lt;P&gt;          WRITE: / MSG .&lt;/P&gt;&lt;P&gt;      FORMAT COLOR COL_POSITIVE INVERSE OFF.&lt;/P&gt;&lt;P&gt;     PERFORM COMMIT_MM.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;      CLEAR:  GT_RETURN[], MSG.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " SLALE_UPLOAD_DATA&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;      Form  COMMIT_MM&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM COMMIT_MM .&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   = 'X'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        RETURN = GT_RETURN.&lt;/P&gt;&lt;P&gt;  clear:      GT_ORDER_ITEMS_IN[],GT_ORDER_CONDITIONS_IN[].&lt;/P&gt;&lt;P&gt;ENDFORM.                    " COMMIT_MM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 11:06:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/2602540#M596274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-28T11:06:25Z</dc:date>
    </item>
  </channel>
</rss>

