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: 

Sales order mass change

Former Member
0 Kudos

Hi,

There is a custom report - sales order mass change cockpit, when executed it will display sales order details with item , header and BOM components.And also there are customized button to change Requested Delivery date, Delivery block, Reasons for rejection.

In this report i need to do modifications like -

- It should not be possible to change the data in BOM components because they are not delivered separately, only the BOM header is being removed from the stock at goods issue. Therefore:

1. If in the selection screen u201CDisplay BOM componentsu201D is not set, donu2019t include in the report output the order items with both VBAP-UEPOS and VBAP-STLNR not equal to zero

2. If u201CDisplay BOM componentsu201D is set, show the records with VBAP-UEPOS and VBAP-STLNR not equal to zero but donu2019t allow them to be selected for mass-changes (no button to be pressed available). The modifications done at BOM header will be copied into the components automatically by SAP standard.

Pls. help me how to put the code and where.

Let me know any further clarification needed.

Thanks.

1 REPLY 1

Former Member
0 Kudos

Hi,

Suppose you have Displa BOM Component as checkbox : ch

For

1. If in the selection screen u201CDisplay BOM componentsu201D is not set, donu2019t include in the report output the order items with both VBAP-UEPOS and VBAP-STLNR not equal to zero

if ch <> 'X'.

delete the items whose VBAP-UEPOS <> 0 and VBAP-STLNR <> 0

delete form itab_item where VBAP-UEPOS <> 0 and VBAP-STLNR.

ENDIF.

2. If u201CDisplay BOM componentsu201D is set, show the records with VBAP-UEPOS and VBAP-STLNR not equal to zero but donu2019t allow them to be selected for mass-changes (no button to be pressed available). The modifications done at BOM header will be copied into the components automatically by SAP standard.

if ch = 'X'.

loop at item_itab

if wa_item-UEPOS is not initial and/or wa_item-STLNR is not initial.

set a wa_item-flag = 'N'.

endif.

append wa to final_item.

endloop.

I hope it answers your query.

Regards,

Uma Dave