cancel
Showing results for 
Search instead for 
Did you mean: 

get detail info of PO during BRF workflow

sap_2605
Active Participant
0 Kudos

Hi,

We are using SRM 7 and using BRF for the workflow. During the workflow runtime it is important for us to get the PO detail such as whether the PO is created with reference to contract. This will determine whether the PO will go for approval or not (if PO have contract then the PO will be automatically approved).

I set 2 schema, where the schema for auto approved should be selected if contract is assigned, while schema for normal approval will be selected if NO contract is assigned. To get the PO detail we plan to use call class /sapsrm/if_wf_context_provider method get_document. I'm getting the GUID of the doc in here. However when I pass the GUID to FM BBP_PD_PO_GETDETAIL, the table data for this GUID is still empty. Apparently SRM has not gone to the point of making this data for GUID available at that time. I'm at loss rite now, as we dont know any other way to pick up the detail.

Can anyone share some thought on this?

Best regards,

John

Accepted Solutions (0)

Answers (1)

Answers (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello John,

Instead of using class interface /SAPSRM/CL_WF_CONTEXT_PROVIDER, use class interface /SAPSRM/CL_WF_RULE_CONTXT_PO with method GET_RELATED_DOCUMENTS with IV_DOC_GUID (PO guid) and IV_DOCUMENT_TYPE = BUS2201.

Regards.

Laurent.

sap_2605
Active Participant
0 Kudos

Hi,

Apparently the BADI is triggered very early, thus the GUID has no data yet. So nothing wrong with the FM. I'm closing this thread.

Best regards,

John