cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Document Guid in WF Enhancement Badi Implementation

Former Member
0 Likes
173

Hi Gurus,

I've implemented a Custom BRF Process Level for QUOT and RFQ, I've created an Enhancement of Standard Badi " /SAPSRM/BD_WF_QTE_RR_PURMGR".

My question is, in the method GET_APPROVERS_BY_AREA_GUID, I've implemented my specific CUSTOM to determine the Approvers list, but i dont have the Document GUID.

There's some class to determine the document GUID?

Thank You for your help

Roberto

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Robin,

thank you for your reply. but unfortunatly the method GET_APPROVERS_BY_AREA_GUID have only 2 parameters:

IS_AREA in IMPORT and VALUE( RT_APPROVER ) in EXPORT.

The parameters that you have mentioned are available in method GET_AREA_TO_ITEM_MAP...

Former Member
0 Likes

Hi Roberto,

the method GET_AREA_TO_ITEM_MAP has the returning parameter by name RT_ITEM_TO_AREA_MAP.

just define the below code as

DATA LO_AREA TYPE REF TO /SAPSRM/IF_WF_AREA.

"""depends upon your custom criteria""

AT NEW 'GUID'. "" PASS YOUR ITEM GUID

LO_AREA = /SAPSRM/CL_WF_AREA=>/SAPSRM/IF_WF_AREA~CREATE_INSTANCE(

IV_AREA_TYPE = /SAPSRM/IF_WF_PROCESS_C=>GC_MOCK_PDO_GUID """ JUST AN EXAMPLE

IV_LEADING_OBJECT_ID = LR_ITEM_TO_CC_MAP->GUID ).

LS_AREA_TO_ITEM_MAP-AREA_GUID = LO_AREA->GET_GUID( ).

ENDAT.

LS_AREA_TO_ITEM_MAP-ITEM_GUID = LR_ITEM_TO_CC_MAP->ITEM_GUID.

APPEND LS_AREA_TO_ITEM_MAP TO RT_ITEM_TO_AREA_MAP.

now go to the method GET_APPROVERS_BY_AREA_GUID

where the variable LO_AREA which has already been defined so do not do any coding here.

just click on the class /sapsrm/cl_wf_area, method GET_RESPONSIBLE_APPROVERS

write piece of code as

data Z_GUID TYPE /SAPSRM/WF_AREA_GUID.

Z_GUID = ME->/SAPSRM/IF_WF_AREA~GET_LEADING_OBJECT_ID( ).

where reference object ME does has all the values which has been mapped from previous method

GET_AREA_TO_ITEM_MAP .

find out approval and pass to parameter RT_APPROVER

let me know if you need anything more.

regards

sahil purushan

RobinJanke
Contributor
0 Likes

The GET_APPROVERS_BY_AREA_GUID method has an importing parameter IS_DOCUMENT. The field IS_DOCUMENT-DOCUMENT_GUID contains the GUID of the document.

Regards,

Robin