Application Development and Automation 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: 
Read only

BAPI_SALESORDER_CHANGE for Requested delivery date & Schedule line date

Former Member
0 Likes
4,464

Hi,

Can any one pl give me hint for changing of Requested delivery date & Schedule line date in Sales Order through BAPI (BAPI_SALESORDER_CHANGE) or other Object(FM/OO).

I tried below code:

wa_salesorder = '0000000302'.

wa_order_header_in-sales_org = '1100'.

wa_order_header_in-distr_chan = 'O1'.

wa_order_header_in-division = '03'.

wa_order_header_inx-updateflag = 'U'.

wa_schedule_lines-itm_number = '000010'.

wa_schedule_lines-sched_line = '0001'.

wa_schedule_lines-req_date = '20070802'.

WA_SCHEDULE_LINES-DLV_DATE = '20070802'.

wa_schedule_lines-date_type = '1'.

wa_schedule_lines-req_qty = '1'.

append wa_schedule_lines.

clear wa_schedule_lines.

wa_schedule_linesx-itm_number = '000010'.

wa_schedule_linesx-sched_line = '0001'.

*WA_SCHEDULE_LINESX-REQ_DATE = 'X'.

*WA_SCHEDULE_LINESX-DLV_DATE = 'X'.

**WA_SCHEDULE_LINESX-REQ_QTY = 'X'.

append wa_schedule_linesx.

clear wa_schedule_linesx.

call function 'BAPI_SALESORDER_CHANGE'

exporting

salesdocument = wa_salesorder

order_header_in = wa_order_header_in

order_header_inx = wa_order_header_inx

tables

return = wa_return

schedule_lines = wa_schedule_lines

schedule_linesx = wa_schedule_linesx.

I want to change only above dates not quantity. I tried above code with Req.Qty & with result to add new Schedule line. Which Don't want.Without Quantity data it is not working.

How is it possible to change only Requested delivery date & Schedule line date without Quantity.

Thanks,

Hi,

Can any one pl give me hint for changing of Requested delivery date & Schedule line date in Sales Order through BAPI (BAPI_SALESORDER_CHANGE) or other Object(FM/OO).

I tried below code:

wa_salesorder = '0000000302'.

wa_order_header_in-sales_org = '1100'.

wa_order_header_in-distr_chan = 'O1'.

wa_order_header_in-division = '03'.

wa_order_header_inx-updateflag = 'U'.

wa_schedule_lines-itm_number = '000010'.

wa_schedule_lines-sched_line = '0001'.

wa_schedule_lines-req_date = '20070802'.

WA_SCHEDULE_LINES-DLV_DATE = '20070802'.

wa_schedule_lines-date_type = '1'.

wa_schedule_lines-req_qty = '1'.

append wa_schedule_lines.

clear wa_schedule_lines.

wa_schedule_linesx-itm_number = '000010'.

wa_schedule_linesx-sched_line = '0001'.

*WA_SCHEDULE_LINESX-REQ_DATE = 'X'.

*WA_SCHEDULE_LINESX-DLV_DATE = 'X'.

**WA_SCHEDULE_LINESX-REQ_QTY = 'X'.

append wa_schedule_linesx.

clear wa_schedule_linesx.

call function 'BAPI_SALESORDER_CHANGE'

exporting

salesdocument = wa_salesorder

order_header_in = wa_order_header_in

order_header_inx = wa_order_header_inx

tables

return = wa_return

schedule_lines = wa_schedule_lines

schedule_linesx = wa_schedule_linesx.

I want to change only above dates not quantity. I tried above code with Req.Qty & with result to add new Schedule line. Which Don't want.Without Quantity data it is not working.

How is it possible to change only Requested delivery date & Schedule line date without Quantity.

Thanks,

2 REPLIES 2
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,694

Hello Abhay

If you set the IMPORTING parameter <b>LOGIC_SWITCH-SCHEDULING = 'X'</b> it should work.

If you search the <i>ABAP Development</i> forums for <b>LOGIC_SWITCH</b> you will find plenty of threads about the different flags of this parameter.

Regards

Uwe

Read only

Former Member
0 Likes
1,694

Hi Abhay,

Please checkout these links

<b>http://sap4.com/wiki/index.php?title=BAPI_SALESORDER_CHANGE</b>

Previous posting may help you...

Regards, ABY