Skip to Content
avatar image
Former Member

How to Get List of Shopping Cart Approvers

I have a requirement to get a list of all the approvers a shopping cart is going to be routed through in Workflow.

I've figured out that I can query table SWW_WI2OBJ to get the Workflow item ID using the shopping cart number (INSTID = shopping cart #) and then use that to query SWWUSERWI to the the user ID of the approver the Workflow is currently on.

A shopping cart can have multiple approvers though. I can't figure out how to get the full list of all approvers a shopping cart is going to be routed through. How can I find out who else, besides the current approver, a shopping cart is going to be routed through for approval?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 18, 2011 at 12:48 PM

    Hi,

    Can you use transaction BBP_PD and enter the shopping cart no in the object id field. This will give you list of all the approvers with which shopping cart is awaiting approval.

    Regards,

    Nisha

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Nisha,

      I am able to get into BBP_PD, but I don't see where the approvers are listed in there. I see there is a section for Workflow Item, but its doesn't tell me much more than the ID of a Workflow item, which I'm already able to get. I'm also going to need to get this information from inside a program, so what I'm really after are the database tables I can query or a function module I can run to get this information.

      Thanks,

      Seth

  • Mar 19, 2011 at 07:23 PM

    Hello,

    You could try FM BBP_WFL_DIN_APPR_CONTAINER_GET, providing as input parameter the workitem ID.

    Regards,

    Ricardo

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Seth,

      Were you able to get the list of all approves for the SC? I am looking for the same information, it would help if you can share what you've done to work around this.

  • avatar image
    Former Member
    Feb 15, 2013 at 01:28 PM

    Hi,

    I needed to do the same. This is how I solved it. You only need the GUID of the shopping cart.

    REPORT 

    zmsz_teszt.



    DATA:

          lv_sc_id TYPE crmd_orderadm_h-object_id,

          lv_sc_guid TYPE crmd_orderadm_h-guid,

          ls_wf_hist TYPE /sapsrm/s_wf_process.



    FIELD-SYMBOLS:

                   <ls_prolevlist> TYPE LINE OF /sapsrm/s_wf_process-process_level_list,

                   <ls_decision> TYPE LINE OF /sapsrm/t_wf_decisionset_s,

                   <ls_wi_list> TYPE LINE OF /SAPSRM/T_WF_WORKITEM_S.



    lv_sc_id = '6800003658'.

    lv_sc_guid = '0050568602601ED299E0575227599CF4'.



    /sapsrm/cl_wf_apv_facade=>retrieve_process_history( EXPORTING iv_document_guid = lv_sc_guid

                                                                  iv_agent_id = ''

                                                                  iv_language = ''

                                                        IMPORTING es_process = ls_wf_hist ).



    *ls_wf_hist

    WRITE: / 'USER         Decision'.

    LOOP AT ls_wf_hist-process_level_list ASSIGNING <ls_prolevlist>.

      LOOP AT <ls_prolevlist>-decisionset_list ASSIGNING <ls_decision>.

        LOOP AT <ls_decision>-workitem_list ASSIGNING <ls_wi_list>.

          WRITE: / <ls_wi_list>-agent, <ls_decision>-status.

        ENDLOOP.

      ENDLOOP.

    ENDLOOP.

    Cheers,

    Misi

    Add comment
    10|10000 characters needed characters exceeded