07-25-2014 2:33 AM
Hi, everyone:
I use BAPI: BAPI_PO_CREATE1 to create PO, and I specify the delivery date as following codes. But the system ignored my delivery date and give another one.
"{Schedule line
CLEAR POSCHEDULE.
POSCHEDULE-PO_ITEM = EBELP.
POSCHEDULE-SCHED_LINE = '0001'.
POSCHEDULE-DEL_DATCAT_EXT = 'D'.
POSCHEDULE-DELIVERY_DATE = SY-DATUM.
POSCHEDULE-QUANTITY = IT_ITEM-MENGE.
POSCHEDULE-STAT_DATE = SY-DATUM.
POSCHEDULE-PO_DATE = SY-DATUM.
APPEND POSCHEDULE.
CLEAR POSCHEDULEX.
POSCHEDULEX-PO_ITEM = EBELP.
POSCHEDULEX-SCHED_LINE = '0001'.
POSCHEDULEX-PO_ITEMX = 'X'.
POSCHEDULEX-SCHED_LINEX = 'X'.
POSCHEDULEX-DEL_DATCAT_EXT = 'X'.
POSCHEDULEX-DELIVERY_DATE = 'X'.
POSCHEDULEX-QUANTITY = 'X'.
POSCHEDULEX-STAT_DATE = 'X'.
POSCHEDULEX-PO_DATE = 'X'.
APPEND POSCHEDULEX.
"}
What causes this problem?
Thanks in advance.
07-28-2014 1:00 AM
As the date category is maintained in your example, the BAPI will expect a delivery date in external format (cf. OSS Note 858316).
You should clear the date category (field POSCHEDULE-DEL_DATCAT_EXT) to let the BAPI handle the internal date correctly.
regards,
JNN
07-25-2014 10:57 AM
Hi,
Remove the PO Date from schedule line and then create PO.
If this doesn't work, then try passing sy-datum in COM_DATE of schedule line.
Regards,
Shweta
07-25-2014 1:02 PM
Hello ,
This works fine for us :
ls_poschedule-po_item = ls_ekpo-ebelp.
ls_poschedule-delivery_date = id_delivery_date.
APPEND ls_poschedule TO lt_poschedule.
ls_poschedulex-po_item = ls_ekpo-ebelp.
ls_poschedulex-po_itemx = 'X'.
ls_poschedulex-delivery_date = 'X'.
APPEND ls_poschedulex TO lt_poschedulex.
Regards,
Didier
06-29-2020 10:24 PM
Hello didier.deschepper
I am also facing the same issue. This is worked for me
07-27-2014 12:03 PM
Hi
Can you try with only with follwing parameters -PO_ITEM, SCHED_LINE, DELIVERY_DATE, QUANTITY for the parameters - POSCHEDULE and POSCHEDULEX of BAPI_PO_CREATE1.
Also check if any enhancement has been added in the system for PO specific to Delivery Date.
07-28-2014 1:00 AM
As the date category is maintained in your example, the BAPI will expect a delivery date in external format (cf. OSS Note 858316).
You should clear the date category (field POSCHEDULE-DEL_DATCAT_EXT) to let the BAPI handle the internal date correctly.
regards,
JNN
07-29-2014 7:04 AM
But the problem only occurs in PRD, DEV and QAS are the same as PRD, the codes are also same. I pass the same parameters for schedule lines in another function, and that function performs well (no such a problem).
07-29-2014 7:37 AM
Hi Donnie,
Looks like your coding is fine.Ensure as mentioned by Jacques POSCHEDULE-DEL_DATCAT_EXT is cleared.Also check your factory calender settings via SCAL as scheduling is based o the above setting.You can compare it with Q and see any discrepancies.
Regards,
Kannan