Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi salesorder change problem

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks!