on 2014 Nov 29 6:18 PM
Hi Team,
I have requirement to find the shopping cart approved date.
I mean, when shopping cart approval is completed.
We are preparing the report, and in that i need to show when SC is approved.
Could you please let me know, how to get the approved date of the SC?
I have only SC number or GUID.
Regards
Venkatesh P
Dear Venkatesh,
Here are two approaches. First is long but give you correct result always but not sure about second approach.
First Approach
1. Get the details of SC using FM BBP_PD_SC_GETDETAILS and check if the status of the SC is approved.
2. Call method /SAPSRM/CL_WF_APV_FACADE=>RETRIEVE_PROCESS_HISTORY, pass the SC Guid as Exporting parameter and retrieve ES_PROCESS ( deep structure ) values in internal table.
3. Take the last record of ES_PROCESS and check field DICISIONSET_LIST (internal table).
4. Read first line and check DICISIONSET_LIST-WORKITEM_LIST
5. Field CTIME ( Creation of Workitem) and ETIME ( Completion of Workitem ). ETIME will give you the final approval date & time.
Second Approach
1. You can use FM BBP_PD_SC_GETDETAILS to retrieve the header details and status of the SC.
2. Check if the status of the shopping cart is approved and retrieve the values of CHANGED_AT and CHANGED_BY fields from the header structure for your report.
Thanks
Rajan
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.