Application Development 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: 

Problem in delivery date in BAPI_OUTB_DELIVERY_CREATE_SLS

Former Member
0 Kudos
874

Hi,

I am trying to create sales delivery by using BAPI_OUTB_DELIVERY_CREATE_SLS. It creates outbound delivery order from multiple sales orders but, it dose not update delivery date field in delivery order.

DATA : due_date TYPE bapidlvcreateheader-due_date.

due_date   = sy-datum.

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATE_SLS'

       EXPORTING

         ship_point              = ship_point

         due_date                = due_date

*   DEBUG_FLG               =

         no_dequeue              = ' '

       IMPORTING

         delivery                = deliv_numb

*   NUM_DELIVERIES          =

        TABLES

          sales_order_items       = delivery_items

*   SERIAL_NUMBERS          =

*   EXTENSION_IN            =

*   DELIVERIES              =

*   CREATED_ITEMS           =

*   EXTENSION_OUT           =

         return                  = err_msg

                .

      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

        EXPORTING

          wait = 'X'.

* IMPORTING

*   RETURN        =

from above code delivery date will be system date but it takes delivery date from schedule delivery date(vdatu) of vbak table. Would you tell me how can I solve it?

Thanks

Mahabub

1 ACCEPTED SOLUTION

Former Member
0 Kudos
414

Due to delivery types rescheduling field("No Reschedule") it occurs. After changed rescheduling field to "Reschedule if the deadline are in past" it works

2 REPLIES 2

Former Member
0 Kudos
415

Due to delivery types rescheduling field("No Reschedule") it occurs. After changed rescheduling field to "Reschedule if the deadline are in past" it works

eduardo_hinojosa
Active Contributor
0 Kudos
414

Hi

Check if you are using the requirement 101 (include FV50B101) in your copy rules (tcode VTLA). In this VOFM you have this coding

* Check the batch of the order if there is one specified and if set for
* the item type
   if not cvbap-charg is initial.
     perform tvlp_select(sapmv50a) using cvbap-pstyv
                                         sy-subrc.
     if tvlp-chpkz ne charx.
       bp_datbi = sy-datlo.
       if cvbak-vdatu gt bp_datbi.
         bp_datbi = cvbak-vdatu.
       endif.

I hope this helps you

Regards

Eduardo