Deleting deliveries and sales orders using BAPI

10-11  Source: Network gathering  Views:2 

Advertisement
Hello all...I am making some changes to the existing program which uses call transaction to VL02 and VA02 doe deleting deliveries and sales orders. This program is running for ever. So I want to use BAPI BAPI_OUTB_DELIVERY_CHANGE and BAPI_SALESORDER_CHANGE instead of call transaction. I just want to now what values should the input tables contain or please guide where I will find documentation over this. Please give me a little insight how to use these BAPI's in my program.
Thanks,
Hello,
I got the following error when tried to execute my program with the BAPI function module.
The field "LT_DELIVERY" specified here has a different
field
type.        
I am posting some part of my code here. Please help.
CONSTANTS: c_X TYPE c VALUE 'X'.
DATA: lt_header LIKE bapiobdlvhdrchg OCCURS 0 WITH HEADER LINE,
      lt_control LIKE bapiobdlvhdrctrlchg OCCURS 0 WITH HEADER LINE,
      lt_delivery LIKE bapiobdlvhdrchg OCCURS 0 WITH HEADER LINE,
      lt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
lt_header-deliv_numb = sdel-vbeln.
    lt_delivery-deliv_numb = sdel-vbeln.
    lt_control-dlv_del = c_X.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
  EXPORTING
    HEADER_DATA               = lt_header
    HEADER_CONTROL            = lt_control
    DELIVERY                  = lt_delivery
  TECHN_CONTROL             =
  TABLES
  HEADER_PARTNER            =
  HEADER_PARTNER_ADDR       =
  HEADER_DEADLINES          =
  ITEM_DATA                 =
  ITEM_CONTROL              =
  ITEM_SERIAL_NO            =
  SUPPLIER_CONS_DATA        =
  EXTENSION1                =
  EXTENSION2                =
    RETURN                    = lt_return
  TOKENREFERENCE            =
IF sy-subrc EQ 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
  WAIT          =
IMPORTING
  RETURN        =
Please suggest how to proceed.
Thanks,
Naren
Related articles
  • Deleting deliveries and sales orders using BAPI 10-11

    Hello all...I am making some changes to the existing program which uses call transaction to VL02 and VA02 doe deleting deliveries and sales orders. This program is running for ever. So I want to use BAPI BAPI_OUTB_DELIVERY_CHANGE and BAPI_SALESORDER_

  • Deleting deliveries , Batches from STO  Using BAPI 11-30

    Hi, I want to  delete outbound delivery for particular shipment number and this should be done using BAPI or a FM not using the tcode VL02N. I  wld  be very grateful Please List out  the BAPI 's or FM that can be  used for to perform these listed , w

  • Change of open sales order : using BAPI 10-11

    Hi    this  is ravi                   can any one help me on this  topic         1)change of open sales order  using BAPI .With appropriate reason( like header level reason)                    thanks & regardshI,     chk this FM BAPI_SALESORDER_PROXY

  • Problem regarding the creation of sales order using bapi. 10-11

    Hai all, I am creating sales order using bapi but i am, get following error messages : TYPE ID  NUMBER MESSAGE E       VP   112       Please enter sold-to party or ship-to party E       V4   219       Sales document  was not changed I have entered al

  • How to create the sales order using BAPI's ....? 10-11

    Hi Guru's, could you please provide how to create the sales order using BAPI's .....i need step by step process and please provide the details from scratch....basically  i don't have basic knowledge on this....please provide required inputs ....:) th

  • ISSUE ON CREATE SALES ORDER USING BAPI 10-11

    Hi,    I am creating a sales order using bapi BAPI_SALESORDER_CREATEFROMDAT2.But it it fails to create a sales order abd below is my code pls check and correct me to create a sales order. LOOP AT DATA_TAB. clear: l_order_header_in,        l_salesdocu

  • Creating sales order using bapi 10-11

    while creating sales order using bapi serial no is added in dat but its not saving. plz replyHi See tha sample code for sales order creation SALES ORDER INPUT CREATION. PARAMETERS: p_auart TYPE auart OBLIGATORY. PARAMETERS: p_vkorg TYPE vkorg OBLIGAT

  • Upload the data for sales order using BAPI 10-11

    hi experts, how to upload the data for sales order using BAPI. what is the FM? it would be much helpful if i have the sample code as i am very new to BAPI. thanks and Regards ShyamHi  Shyam Its very useful for u BAPISDORDER_GETDETAILEDLIST BAPI_ACC_S

  • How to Create Sales Order using BAPI with Variant configurations 11-30

    Hi All, I need to create a sales order using BAPI BAPI_SALESORDER_CREATEFROMDAT2 with Varaint confiugartions. I will get Header ITEM and variant configuration items in the flat file. Kindly help me in this regard. One more thing, is there any way to

  • Sale Order Item Quantity Not Populating When Create A Sale Order Using BAPI 10-11

    I am having a problem when creating a sale order using BAPI BAPI_SALESORDER_CREATEFROMDAT2 Problem is that sale order item quantity field is not populating code is as follows ORDER_ITEMS_IN-ITM_NUMBER = '0010'. ORDER_ITEMS_IN-MATERIAL = '000000000010

  • Creation of sale order using bapi in webdynpro using table control 10-11

    only first row is getting updated when checked in va03, the line items are not getting replaced, only first row is committed.. Here is the code for table control i used... http://www.scribd.com/doc/51879492/creation-of-sale-order-using-bapi-in-webdyn

  • Setting user specific contract data while creating sales order using BAPI 10-11

    Hi all, I am creating sales order using BAPI - BAPI_SALESORDER_CREATEFROMDAT2. Now my problem is that there is no structure for contract data (i.e. VEDA), system automatically set contract data using customization values. I am doing some validations

  • How to create a sales order using bapi 11-30

    hi     i need to create a sales order using bapi. can any one help meDo NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete! Use BAPI_SALESORDER_CREATEFROMDAT1 . To build a reference to your contract you have to supply ORDER_HEADER_IN. Here´s

  • Issue in creating sales order using BAPI's...? 10-11

    Hi Guru's, i had generated the sales order using the BAPI..but could please guide me how to declare the data declaratin same fields as globally and how to move internal table and how to append .... thanks in advance... REPORT z_bapi_salesorder_create

  • Creating Billing Plan data for sales order using BAPI 10-11

    Hello, Someone ones if there is any way to create a sales order (BAPI) and then create a billing plan (by means of another BAPI)? Or is there any way to create both at the same time? Kind Regards.Hi David and Nisha here is the code for creating sales

  • Creating sales order using BAPI, through BSP using 2 pages. one for input 10-11

    Hi Friends, i have a Requirement that.... i want to create a BSP pages, in first page i have to give input data (in input fields) which is required to create a sales order through BAPI function module (BAPI_SALESORDER_CREATEFROMDAT1). in the second p

  • How to create sales order using BAPI. 10-11

    Hi all, I am trying to create sales order using standard BAPI "BAPI_SALESORDER_CREATEFROMDAT2". But, even I had entered all mandatory fields, I am unable to create sales order sucessfully. I had gone through the documentaion of this BAPI and ent

  • How to Change a Sales Order using BAPI 11-30

    Hi All How can we change the sales document using BAPI as the requirement is --> First we create a Sales order using a BAPI. --> If the sales order is changed then we get the changed order information alonge with the old order data in a CSV file. he

  • Problem while creating sales order using BAPI 10-11

    Hi all, i am creating a sales order from the purchase order data. when my client will send a PO in EDI format, my 3rd party edi tool will convert that edi formatted PO to text format. then i will upload that text formatted PO to my program then i wil

  • Create a Sales order with reference to another sales order  using BAPI 10-11

    Dear All, Can any one tell me what are all the parameters required to create a Sales order with reference to another sales order using BAPI_SALESORDER_CREATEFROMDAT2.... Thanks in advanceHi Madhan Thanks a lot for your reply. However, I would like to