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 Sales Order Change

Former Member
0 Likes
1,326

Hi Guys,

Does any one know what the structure LOGIC_SWITCH field in the BAPI_SALESORDER_CHANGE is used for?

we are trying to get the changes of delivery date at the header get reflected onto the schedule lines at item level.we cannot use the schedule line structures at line item as the legacy system we interface with wont provide us with line items.is there a way thru the BAPI that a change in the header delivery date gets reflected onto schedule line date at line item?

Thanks

Hi Guys,

Does any one know what the structure LOGIC_SWITCH field in the BAPI_SALESORDER_CHANGE is used for?

we are trying to get the changes of delivery date at the header get reflected onto the schedule lines at item level.we cannot use the schedule line structures at line item as the legacy system we interface with wont provide us with line items.is there a way thru the BAPI that a change in the header delivery date gets reflected onto schedule line date at line item?

Thanks

3 REPLIES 3
Read only

Former Member
0 Likes
754

I guess it is used while calculating data for Schedule Lines.

Check this code in fm SD_SALES_ITEM_MAINTAIN which is called in this BAPI

  • Menge (RV45A-KWMENG) temporaer fuer Konfiguration

if logic_switch-scheduling = chara.

read table fxvbepkom index 1 into ls_vbepkom.

if sy-subrc = 0.

perform rv45a-kwmeng_fuellen(sapfv45p) using ls_vbepkom-wmeng.

endif.

else.

perform rv45a-kwmeng_fuellen(sapfv45p) using fvbepkom-wmeng.

endif.

As per the code, if schedulling flag is set to 'A', it will read Schedule line details and pass the same to Quantity processing perform. It may not give a clear picture though, but you can keep a break poitn and populate A in schedulling field and check result in debug mode.

Read only

0 Likes
754

Any way the delivery date is already available, why dont you build a internal table of schedule lines with than date for each line item in the abap program, instaed of finding other solustion? Does it sounds good?

Read only

Former Member
0 Likes
754

I think LOGIC_SWITCH has to do with line item numbering (external/internal)...just populate the schedule line table with the same dat...I don't really see the problem.