on 02-08-2012 2:25 PM
Hi,
we are on SRM 7 using the classic scenario.
I want to implement a check if every workflow step has an approver/processor.
Example:
I create a shopping cart with cost center accounting. The cost center manager is an approver in our workflow. When a cost center has no manager -> no approver for the workflow step can be found -> workflow runs into an error.
We do not want to use fall back agents. We want to throw an error message in the shopping cart before sending/ordering the shopping cart.
How can i do that? Are there any BADI which i can use?
Thanx and Best regards,
Ben
Please use BBP_DOC_CHECK BAdi and check for fields if approver has been filled or not. If yes proceed, if no process a error message.
Thanks,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Benjamin,
inside SC BAdI Check, follow below steps:
1- get SC instance from PDO buffer if available (method GET_BUFFERED_INSTANCE from class interface /SAPSRM/CL_PDO_FACTORY_SC_ADV )
2- get process info if SC is instanciated (class interface /SAPSRM/CL_PDO_BO_SC_ADV )
3- then check decisionset for each process level.
Regards
Laurent.
Hi,
i get the instance with
call method /SAPSRM/CL_PDO_FACTORY_SC_ADV=>GET_BUFFERED_INSTANCE
exporting
iv_header_guid = iv_doc_guid
receiving
ro_instance = lo_instance.
But when i debug into lo_instance and have a look at the decisionset in structure MS_DECISION_SET there are no entries in AGENT_LIST.
Best regards,
Ben
Hi,
You have to use BBP_DOC_CHECK BAdi , you have to build the logic in a z class and pass the SC_GUID. in the custom class use the bbp_procdoc_getdetail FM to get the current SC value and check if the current SC has valid approvers.. if not then raise the error message.. the reason why i ask you to create the Z class is , you can use the same class for WF..
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.