Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Active Contributor
Hello fellow community members,

In this blog I would like to share my experience on the creation as well as consumption of a procedure call in BRF+ which is used by the OPD transaction.

A little background, OPD is the newer equivalent of NACE in S/4HANA used for configuring and issuing outputs. NACE is used in ECC to configure output controls and map forms with driver programs and trigger the output.

Back to the topic - Here, I will give an illustrative document on how to create procedures and use them. As an example I have done this on Central Purchase Contracts business object available in the Central Procurement solution -

The steps will be divided as below -
A. Creation of Element and Procedure
B. Creation of application logic
C. Embedding the created procedure in the OPD transaction

In Detail,

A. Creation of Element and Procedure

1. Open BRF+ transaction in SAP GUI.
URL will look like - https:///sap/bc/webdynpro/sap/fdt_wd_workbench?sap-language=EN&sap-client=<3 digit client id>#

2. Put application - OPD_MM_CENTRAL_CONTRACT and search

3. Creation of Element

-> This creates an element.

4. Creation of Procedure

-> This creates a procedure and also assigns the above created element as the result data object.

B. Creation of application logic

1. Creation of class and static method

-> This creates the placeholder for the application logic

2. Map the parameters which will be used in application logic

-> Newly added parameters are mapped.

-> Upon activation, message is displayed.

C. Embedding the created procedure in the OPD transaction

1. Launch the OPD transaction in SAP GUI

2. Choose the business object as 'Central Purchase Contract' and the determination step as 'Output Type'

3. Go to Edit – Table Settings – Pull the custom expression which was created above and maintain values in same.


Finally, to conclude - the issued outputs will look like rows in below table in Manage Central Purchase Contracts app -

Tips for working with expressions -

1. A 'blank' is different from a 'false' in the decision tables.
2. If values are not maintained (left as 'blank') then the expression class is not called, and the static method is not invoked.

Other Tips -

1. The Function Module - CNTRL_CONTRACT_OM_TRIGGER gets triggered for Central Purchase contracts for issuing output. It can be debugged for any behaviour conceptualization.
2. Always put an external breakpoint on SAP_WFRT (Workflow User) and analyse.

To further ignite the passion, I would like to highlight few practical use cases - this approach can be used to dynamically control output issuance like issue output only if Distribution Lines in a Contract are active, send emails to different recipients based on priority, etc.

Please provide your valuable feedback.