Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_OUTB_DELIVERY_CHANGE

former_member599326
Participant
0 Likes
1,031

Hi,


I am executing BAPI_OUTB_DELIVERY_CHANGE, but it throws error.  and in return table there is no message comes. only 1 line with error no and no description.


Can you please tell what is missing in below coding so that BAPI_OUTB_DELIVERY_CHANGE will execute properly.

 


   CLEAR gs_header_data.

   gs_header_data-deliv_numb = <fs_ekbe>-ebeln.

   CLEAR gs_header_control.

   gs_header_control-deliv_numb = <fs_ekbe>-ebeln.

   gs_header_control-dlv_del    = gc_x.

   CLEAR gs_delivery.

   gs_delivery = <fs_ekbe>-ebeln.

   REFRESH gt_return.

   CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'

     EXPORTING

       header_data    = gs_header_data

       header_control = gs_header_control

       delivery       = gs_delivery

     TABLES

       item_data      = gt_item_data

       item_control   = gt_item_control

       return         = gt_return.

Hi,


I am executing BAPI_OUTB_DELIVERY_CHANGE, but it throws error.  and in return table there is no message comes. only 1 line with error no and no description.


Can you please tell what is missing in below coding so that BAPI_OUTB_DELIVERY_CHANGE will execute properly.

 


   CLEAR gs_header_data.

   gs_header_data-deliv_numb = <fs_ekbe>-ebeln.

   CLEAR gs_header_control.

   gs_header_control-deliv_numb = <fs_ekbe>-ebeln.

   gs_header_control-dlv_del    = gc_x.

   CLEAR gs_delivery.

   gs_delivery = <fs_ekbe>-ebeln.

   REFRESH gt_return.

   CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'

     EXPORTING

       header_data    = gs_header_data

       header_control = gs_header_control

       delivery       = gs_delivery

     TABLES

       item_data      = gt_item_data

       item_control   = gt_item_control

       return         = gt_return.

3 REPLIES 3
Read only

former_member599326
Participant
0 Likes
927

I want to delete the delivery.

Read only

sandroramos
Active Participant
0 Likes
927

Hi, seems like you are passing Purchase Number(ekbe-ebeln) instead of Delivery Number, check it out.

To delete delivery try creating a batch input execution, i'm not sure bapi will work because documentation says:


  • Delete delivery
    • You can only delete deliveries in the decentralized system and copy this deletion to the central SAP ERP system, if the decentralized WMS is an external system. For this, set the HeaderControl parameter.

    Sandro Ramos

    Read only

    SimoneMilesi
    Active Contributor
    0 Likes
    927

    As stated by You are passing the Purchase order instead of the delivery.

    If the BAPI doesn't work for your scenario, you can always use FM WS_DELIVERY_UPDATE_2