Skip to Content
0
Former Member
Jan 09, 2007 at 04:04 AM

Bapi salesorder change problem

22 Views

Hello Gurus,

I had written a program to change the schedule line delivery date but i am getting an error 'Terms of payment T050 are not defined' in the return code of the bapi. please help.

loop at itab.

hdr_x-UPDATEFLAG = 'U'.

schedl-ITM_NUMBER = i_data-posnr.

schedl-SCHED_LINE = i_data-etenr.

schedl-REQ_DATE = sy-datum.

APPEND schedl.

schedl_x-ITM_NUMBER = i_data-posnr.

schedl_x-SCHED_LINE = i_data-etenr.

schedl_x-UPDATEFLAG = 'U'.

schedl_x-REQ_DATE = 'X'.

APPEND schedl_x.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

SALESDOCUMENT = i_data-vbeln

ORDER_HEADER_INX = hdr_x

TABLES

RETURN = rcode

SCHEDULE_LINES = schedl

SCHEDULE_LINESX = schedl_x.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

refresh schedl.

refresh schedl_x.

endloop.

Thanks,

KB