01-09-2007 4:04 AM
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
01-09-2007 4:13 AM
it has to something with the parameters which u r providing to BAPI..
please check if the input arguments u r supplying to the BAPI FM are correct and record exists for them..
amit
01-09-2007 4:30 AM
Hi,
when you are trying to change the sales order, may be the Payment which is already been entered in the sales order T050 is not defined in customizing for that customer or sales area.
Regards,
Raghavendra
01-12-2007 2:55 AM