Skip to Content
0
Former Member
Jun 04, 2008 at 07:38 AM

BAPI_SCHEDULE_MAINTAIN - Not updating Schedule lines -PLease help

849 Views

Hi All,

I am using this Bapi(BAPI_SCHEDULE_MAINTAIN) to Update Schedule lines for the Items in the Schedule Agreement(Purchase Document) in the ME38 Tcode.

But i am unable to update as it always gives this message in the Return structure..

1. Instance PurchSchedAgreement of object type 550000031 cannot be changed.

2. Enter Creation Profile .

My Code:

*Purchase Document

l_v_purdoc = wa_kit-ebeln.

*Populating Schedule line item

wa_schedule-item_no = wa_ekpo_tmp-ebelp. "item

wa_schedule-sched_line = wa_eket_tmp_copy-lin + 001.

wa_schedule-delivery_date = sy-datum .

wa_schedule-quantity = wa_kit-menge.

APPEND wa_schedule TO i_schedule.

CLEAR wa_schedule.

wa_schedulex-item_no = wa_ekpo_tmp-ebelp.

wa_schedulex-item_nox = c_x.

wa_schedulex-sched_line = wa_eket_tmp_copy-lin + 001.

wa_schedulex-sched_linex = c_x.

wa_schedulex-quantity = c_x.

wa_schedulex-DELIVERY_DATE = c_x.

APPEND wa_schedulex TO i_schedulex.

CLEAR wa_schedulex.

CALL FUNCTION 'BAPI_SCHEDULE_MAINTAIN'

EXPORTING

purchasingdocument = l_v_purdoc

  • IMPORTING

  • EXP_HEADER =

TABLES

schedule = i_schedule

schedulex = i_schedulex

return = i_return

PLease Help me out, Points Rewarded for Response . Thanks in advance