Skip to Content
0
Former Member
Jun 16, 2008 at 09:18 AM

Problem with BAPI_PO_CREATE1: Delivery Date

44 Views

Hi everyone,

I am using the fm BAPI_PO_CREATE1 to create my PO's. The problem is, I keep getting the following error messages:

Purchase order item 00100 still contains faulty schedule lines

Delivery date is in the past

Can delivery date be met? (Realistic delivery date: 17.06.2008)

Deliv. date outside period covered by logistics calendar CH

I populate the delivery date like this:

      wa_poschedule-po_item       = wa_poitem-po_item.
      v_date = SY-DATUM.
      PERFORM convert_date USING v_date
                        CHANGING wa_poschedule-delivery_date.
      wa_poschedule-sched_line    = '0001'.
      APPEND wa_poschedule TO i_poschedule.

      wa_poschedulex-po_item       = wa_poitem-po_item.
      wa_poschedulex-po_itemx      = 'X'.
      wa_poschedulex-delivery_date = 'X'.
      wa_poschedulex-sched_line    = '0001'.
      wa_poschedulex-sched_linex   = 'X'.
      APPEND wa_poschedulex TO i_poschedulex.

Does anyone have any idea what I am might be doing wrong?

Thanks