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

Prevent user change PO data except Validity start , Validity end and ...

Former Member
0 Likes
639

Hi,

I use BAdI: ME_PROCESS_PO_CUST method:PROCESS_ITEM to check if any change PO data after that PO was released. The change will accept only if the changed fields were Validity start, Validity end and Delivery date.

If user change other fields, i use the BAdI to set data in that field back to old data. My problem is when user delete item the field Delete Indicator was set to 'L' so i change it back to blank by method set_data but it still show delete indicator in PO screen.

anybody has any idea?!

best regards

Hi,

I use BAdI: ME_PROCESS_PO_CUST method:PROCESS_ITEM to check if any change PO data after that PO was released. The change will accept only if the changed fields were Validity start, Validity end and Delivery date.

If user change other fields, i use the BAdI to set data in that field back to old data. My problem is when user delete item the field Delete Indicator was set to 'L' so i change it back to blank by method set_data but it still show delete indicator in PO screen.

anybody has any idea?!

best regards

1 REPLY 1
Read only

robert_groten
Discoverer
0 Likes
497

Hi Chantima,

This is only a guess as I did not have time to validate...but only certain fields can be changed in the PROCESS_ITEM method...look at the structure MEPOITEM_TECH for the list that cannot be changed by the customer badi...your delete flag setting may be in there or the setting of the delete flag may update a field in this structure....

You may want to take a different approach and stop the changes from being made instead of backing them out....couple of possibilities include...

A. Restrict all users on this Tcode and PO document type I would look at the configuration in MM->Purchasing->Define screen layout at Document level. You can make fields display only instead of coding a solution.

B. If you have to have more control than provided in the config or need to code the solution, you may want to investigate using the Field selection methods (all start with FIELDSELECTION_*) to stop the changes from being made instead of backing them out after the changes are made.

Good luck.

Rob