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: 

Change WBS element (VBAP-PS_PSP_PNR) value in Sales order item exit?

kristaps
Explorer
0 Kudos

Hi colleagues,

I tried to us Exit MV45AFZZ->USEREXIT_MOVE_FIELD_TO_VBAP to modify WBS element (VBAP-PS_PSP_PNR) during Sales Order editing. But the problem is that when I change WBS element (VBAP-PS_PSP_PNR) value in SO item level, the above user exit is not called. But I would like to mention that, for example, when I change Customer Material Numb or some other field in SO item level then the above user exit is called.

Can anyone explain why it is different for WBS element (VBAP-PS_PSP_PNR) and user exit is not called (some other user exit should be used)?

My requirement is to add WBS Element value to BOM sub items when value in main BOM WBS element is added/changed (when BOM is exposed). Maybe there is way it can be configured in customizing and ABAP development is not needed?

If you need additional information, please let me know. Any suggestions would be helpful.

BR, Kristaps

1 ACCEPTED SOLUTION

Jelena
Active Contributor
0 Kudos

I'd think in BOM scenario if WBS added to the main item it should be copied to the other items by standard and no user exit should be needed. Have you tried searching for the SAP Notes? What did the SD consultant say about this? Maybe it's worth reaching to the SAP Support?

5 REPLIES 5

raymond_giuseppi
Active Contributor
0 Kudos

AFAIK (Copy Customer Master Fields Into The Sales Document) USEREXIT_MOVE_FIELD_TO_VBAP is only triggered to copy some customer master fields (e.g. KNA1, KNVV, etc.) changing the WBS doesn't seem to trigger it, this you coul look in Customizing for copy rules. From Abap point of view you could also look in User Exits In Sales Document Processing for USEREXIT_SAVE_DOCUMENT_PREPARE, but it will not react immediatelly. For a quicker response, look at exits like USEREXIT_CHECK_VBAP or even a COBL exit?

Regards,
Raymond

0 Kudos

Hi,

Thanks for your reply. Can you please say me where this Customizing for copy rules could be done for WBS element? Can you provide steps here

BR, Kristaps

Jelena
Active Contributor
0 Kudos

I'd think in BOM scenario if WBS added to the main item it should be copied to the other items by standard and no user exit should be needed. Have you tried searching for the SAP Notes? What did the SD consultant say about this? Maybe it's worth reaching to the SAP Support?

0 Kudos

Good morning Jelena,

I agree with you that WBS element to Sub BOM items should be copied automatically by customizing. We checked and for some items it is already done, but as we have different Item Categories for BOM items for business needs, it is not possible to achieve this for all items. So we are trying to use user exits to achieve needed functionality (created another thread about user exits and BOM exposure - https://answers.sap.com/questions/75124/bom-exposure-in-sales-order.html).

Maybe there is a way how to configure Item category so that it adds Copying feature, but do not affect other functionality for item that is present at the moment?

Jelena
Active Contributor
0 Kudos

This was posted with ABAP tag, I believe you need to ask SD/MM people about the configuration. It just seemed logical to me that WBS should be copied. But if you're saying there is more to it then all bets are off. In general, KISS is a good principle, in SAP in particular, so just make sure you are not over-complicating your business process. "Business needs" could be merely "business wants".