2013 Apr 29 4:06 PM
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
2013 Apr 30 10:31 AM
Due to delivery types rescheduling field("No Reschedule") it occurs. After changed rescheduling field to "Reschedule if the deadline are in past" it works
2013 Apr 30 10:31 AM
Due to delivery types rescheduling field("No Reschedule") it occurs. After changed rescheduling field to "Reschedule if the deadline are in past" it works
2013 Apr 30 11:03 AM
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