on 04-23-2014 2:39 AM
Dear SRM Experts,
I have a requirement, when SC data changes BBP_DOC_CHANGE_BADI triggers with Shopping cart details.
I need to have a validation in BBP_DOC_CHANGE_BADI only when changes happens from Approval/Review screen (for example: Operational purchaser changes any SC data ) . is there any way/function/method/BADI Signature can I check, from which screen the BBP_DOC_CHANGE_BADI is triggering? So that I can have the validation only when Operational purchaser changes the data. Because the BBP_DOC_CHANGE_BADI triggers when SC create/change from Create/Review/Approval screens.
It would be great if you could let me know, if there any way to find out on which process (Create/Review/Approval ) the BBP_DOC_CHANGE_BADI triggers, So that I will include my condition based on approval/Review process.
Thank you
Magesh
Hi,
use the following code in your BADI (this is just an incomplete snippet but should give you enough information to get it working).
TRY.
CALL METHOD /sapsrm/cl_wf_process_manager=>get_current_process_level
EXPORTING
iv_document_guid = es_header-guid
IMPORTING
es_process_level = ls_process.
CATCH /sapsrm/cx_wf_not_found .
ENDTRY.
The ls_process will either contain a process_level -> approval (you have to look into the variable to determine what type of approval. Or it is initial -> no approval yet.
Regards,
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Magesh,
Can this be checked with user's role assigned for Operational purchaser?
Check user Attributes if it has role for operational purchaser, then trigger your code, else not.
Cheers
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.