Skip to Content
0
Former Member
Jan 18, 2012 at 09:00 AM

How to find previous manager who has approved ?

34 Views

Hello experts,

I am using process controlled wokrflow using BRF. I have created a shopping cart which works till 4 levels. At 5th level I want to get exact approver from previous level. How should I achieve that ? In fourth level I am just selecting all managers using select zmanager from ztable appeending ...... query. There are 3 manager let's say (ABC,PQR and XYZ). That approval is approved by XYZ. I can see that using get_current_process_level (). Now I want to bring that XYZ at 5th level. Therefore I used

* Determine document owner and his manager  
  lt_document_responsible = get_document_responsible(
    iv_document_guid        = is_document-document_guid
    iv_document_type        = is_document-document_type
    ).

CALL METHOD /SAPSRM/CL_WF_APV_FACADE=>RETRIEVE_PROCESS_HISTORY
    EXPORTING
      IV_DOCUMENT_GUID = lv_guid "is_document
      IV_AGENT_ID      = lv_agent
      IV_LANGUAGE      = sy-langu
    IMPORTING
      ES_PROCESS       = ES_PROCESS

in get_area_to_item_map method. Now what exactly should be done in the query of get_responsible_approvers where I am writing select statement. How could I pass this reference there ? I need to add where condition in that. In z table it contains serial no and zmanager fields only. What should be done in order to get previous approvers here ? PLease adivse. Thank you.

Best regards.