09-08-2010 8:15 PM
Hi experts,
I have the following requirement:
1. In transactions ME51N / ME52N, the long text field for the item (Item Text) must be made read-only if the PR is already approved / released (release strategy indicator = '2').
2. The PR workflow approvers must recieve an e-mail if this text has been changed while the PR is still blocked / not fully approved (release strategy indicator = 'X').
I'm guessing both can be achieved through BADI implementations (in this case, IF_EX_ME_REQ_POSTED~POSTED), but I've read a lot about various Exits in these transactions, and now I'm not sure if this is the right one. Can you help me?
PS.: I'm not completely familiar with BADIs and Exits, so please bear with me on this.
09-09-2010 8:39 AM
Hi Leonardo
1. Acheving this by coding is not proper way. I know that when PR is released some fileds can be made un-editable by doing configuaration settings. Please check with functional consultant if long text can be made un-editable.
2. You can implemen enhacement MEREQ001, in CMOD creating project. Activate the project. Then put breakpoint in available user-exits in this. Use user-exit which fits to your requirement.
Regards
Sachin
09-09-2010 8:39 AM
Hi Leonardo
1. Acheving this by coding is not proper way. I know that when PR is released some fileds can be made un-editable by doing configuaration settings. Please check with functional consultant if long text can be made un-editable.
2. You can implemen enhacement MEREQ001, in CMOD creating project. Activate the project. Then put breakpoint in available user-exits in this. Use user-exit which fits to your requirement.
Regards
Sachin
09-09-2010 12:46 PM
Thanks for your helpful answer Sachin, I will check with the MM consultant about the configuration. But still:
You can implement enhancement MEREQ001
I read on some other thread in this forum that screen parameters cannot be read from within this enhancement's exits. Any input on this?
TIA,
Leonardo
09-09-2010 12:58 PM
Hi
I would have given you use-exit name, but unfortunately I do not have sap system right now. But put break point in user-exits where EBAN table would be available , you can check release indicator in EBAN table in this user exit. Based on this check you can put your code to send email to approver.
Regards
Sachin.
09-09-2010 1:28 PM
Hi Leonardo,
In addition to sachin here is the exit which contains EBAN
EXIT_SAPLMEREQ_009
EXIT_SAPLMEREQ_007
Thank you,
Thanks,
AMS
09-10-2010 1:13 AM
Thanks for the replies.
The MM consultant is still looking for a way to grey out the text field within SPRO. It's not an easy requirement
Regarding the text changes, I followed your advices and I'm now trying to implement my code within the exit EXIT_SAPLMEREQ_005 (it's triggered right after the user saves the document, so it makes sense). The problem now is that when this exit is called, the changes made to the item text are already committed, and I can't compare the new text with the old one.
I also tried implementing ME_REQ_PROCESS_ITEM, but it doesn't seem to be called from ME52N.
Isn't there a log for long text changes? It would be really easy to just read CDHDR / CDPOS and know if the text has been changed. Also, is this text the same text from material master? If it is, I guess it would be easier to log its changes, right?
Will appreciate your input on this.
Regards,
Leo
09-10-2010 6:12 AM
Hi
Do not use CDHDR and CDPOS. In user exits function module please check importing parameters and tables. You would get find 2 EBAN values would be available. One would be with new values and other would be old.
Edited by: Sachin Patil on Sep 10, 2010 10:43 AM
09-10-2010 12:20 PM
Thanks Sachin, but I checked those structures and none of them happen to hold the information I want, the new item text.
The client revised the requirement, and now I just need the details of the change (username, date and time), which I can easily recover with FM READ_TEXT.
Anyway, thanks for all the help.