Skip to Content
0
Former Member
Dec 06, 2007 at 12:56 PM

BAPI_PO_CREATE1 I cannot change the delivery date

209 Views

I want to create a PO from a pur. requisition. The delivery date should be changed. But it doesn't work. But the state-date can be changed, Why ?

wa_poschedule-po_item = wa_ebxn-bnfpo.

wa_poschedulex-po_item = wa_ebxn-bnfpo.

wa_poschedulex-po_itemx = 'X'.

wa_poschedule-sched_line = 1.

wa_poschedulex-sched_line = 1.

wa_poschedulex-sched_linex = 'X'.

  • wa_poschedule-preq_no = wa_ebxn-banfn.

  • wa_poschedulex-preq_no = 'X'.

  • wa_poschedule-preq_item = wa_ebxn-bnfpo.

  • wa_poschedulex-preq_item = 'X'.

wa_poschedule-del_datcat_ext = 'T'.

wa_poschedulex-del_datcat_ext = 'X'.

wa_poschedule-stat_date = wa_ebxn-lfdat.

wa_poschedulex-stat_date = 'X'.

wa_poschedule-delivery_date = wa_ebxn-lfdat.

wa_poschedulex-delivery_date = 'X'.

APPEND wa_poschedule TO it_poschedule.

APPEND wa_poschedulex TO it_poschedulex.

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

poheader = is_poheader

poheaderx = is_poheaderx

IMPORTING

exppurchaseorder = i_ebeln

expheader = is_poheader

TABLES

return = it_return

poitem = it_poitem

poitemx = it_poitemx

poaddrdelivery = it_poaddrdelivery

poschedule = it_poschedule

poschedulex = it_poschedulex

extensionin = it_ext_in.