on 01-15-2013 8:20 AM
Hi ,
I am using SRM 702.
I wanted to determine if the BBP_DOC_CHECK badi is called by approver or by requestor in complitioner workflow.
If it is called by approver , i wanted to throw some warning messages.
How can i determine this?
Regards,
Ashish
Hi Ashish,
please, try following.
1. Call method /SAPSRM/CL_PDO_FACTORY_SC_ADV=>GET_BUFFERED_INSTANCE( document guid ); to get reference to SC.
2. Call method of SC object /SAPSRM/IF_PDO_ADV_BASE~GET_ADV_MODE() to get current mode.
Best Regards
Konstantin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Ashish,
Goods recepient of shopping cart is same as requester. So check goods recepient which can be obtained by iv_partner details .Compare with logged in user.If both are same then it is requestor every one else is non requester.
To check whether logged in user is approver or not check the role or u can check whether the cart is completion work flow or N step approval work flow.
U can check using the work flow tasks TSXXXXXX.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashish,
If is not possible to differentiate approvers and requestor's by roles then you have following options-
Check badi will have a standard importing parameter - IV_MODE which has following 2 values in runtime
1) C - Create Mode - when shopping cart is being created
2) U - Update mode - when shopping cart is being update (by creator / approver)
I would simply check the this mode and put the condition that current user (sy-uname) is not equal to 'creator' / 'requstor' as per your requirment. In case if you are using team cart then you would need to extend this check to include requestor's team as well.
Best Regards,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
yes, BAdI is called: put a break-point in GET_INSTANCE method from CL_EXITHANDLER class.
Regards.
Laurent.
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.