Creating Custom Output Type for Sales Scheduling Agreement in BRF+
Business Rules Framework Plus (BRF+) is a Business rules System which is developed in ABAP by SAP. It is a part of SAP NetWeaver 7.0 EHP2 and hence requires no additional SAP License. It provides seamless user experience with features like simulation, transport, XML export or import.
It also supports output determination for printing of forms in SAP at more granular level than it is in NACE. It uses rule sets and decision tables to provide clear cut, transparent business rules and business decisions. BRF+ thus helps organizations to run business smoother, improve efficieny and lower TCO.
The major benefits of BRF+ can be listed as below :
- The creation of rules, function or decisions table does not require any ABAP or any other coding. So minor adjustments can be made by business user who need not be an expert.
- The rules that we create or the decison tables or templates are transportable and also can be easily imported or exported as XML files.
- It contains vast library of ready-made expressions which helps to create the business rules and business decisions faster and also to simplify them. This also ensures the consistency by reducing redundancy.
- As mentioned earlier, it is pre-delivered and shipped with SAP NetWeaver 7.0 EhP2 (and above) and hence no separate cost for licensing.
There are standard ‘Output Types’ provided by SAP for each ‘Application Object Type’ (Business Object). Presently, under the Application Object Type ‘Sales Order’, following output types are provided by standard SAP.
The business requirement is to create custom ‘Output Type’ for ‘Sales Scheduling Agreement’ and configure an adobe form template in BRF+. So, every time a scheduling agreement is created, the adobe form should get automatically assigned to it. Let’s get started.
- BRF+ Application is fully configured with the XML files uploaded for output determination as per OSS Note-2248229
- Adobe Document Server (ADS) server is up and running
The SAP Logon version is 750 and theme is ‘Blue Crystal Theme’.
- Go to Transaction code ‘SPRO’. Click on button ‘SAP Reference IMG’. Navigate to ‘Cross-Application Components->Output Control’.
2. Choose ‘Define Output Types’. If you get pop up informing that ‘The table is cross client’, click on continue.
- Select any row for Application Object Type ‘SALES_DOCUMENT’ and click ‘Copy As’.
- Keep the ‘Appl. Object Type’ and ‘Callback Class’ unchanged. Provide the name for output type as ‘SCHEDULING_AGREEMENT’ and a description of your choice. Press Enter.
- A warning message will be displayed stating ‘Choose the key from the allowed namespace’. Press enter to move to the next screen.
- The entry is copied, click on ‘Save’ to commit. You will be prompted to choose a transport request.
- Now, we have to assign the output channels that is the ways we want the form output to be. e.g, print, email.
- Select any row under application object type ‘SALES_DOCUMENT’ and click ‘Copy As’.
- Keep the Application object type as ‘SALES_DOCUMENT’ and for the output type, we can directly enter or choose from the drop-down.
- Provide the channel as ‘PRINT’. Copy and save. We can also add another for ‘EMAIL’ as output channel, if required.
- Next step is to assign form template. In this step, we shall assign the z-form to the newly created output type. Select ‘Assign Form Templates’.
- Copy any existing entry for appl. object type ‘SALES_DOCUMENT’.
- Provide (or choose from the drop down) the output type ‘SCHEDULING_AGREEMENT’. Select the form type as ’2-PDF-Based Print form (Legacy)’. Enter the z-form name, print program name and form routine name as shown. Here, in our case, it is adobe form.
- Next we shall proceed to define business rules and population decision tables for output determination.
Define Business Rules and Maintain Decision Table
- In this step, choose ‘Define Business Rules for Output Determination’. A browser window will open. Select ‘Sales Document’ from the drop down. The drop-down entries are only after uploading the XML templates as per OSS Note# 2248229.
- We have to set the rules for the determination steps applicable to our business. Some of the steps are mandatory for the correct output determination. Let’s go one by one. Select ‘Output Type’ from the drop-down.
- Click on the ‘EDIT’ button.
- Select ‘Insert New Row’.
- Choose the ‘Document Category’ = ‘E’ for scheduling agreement. This can be found in VBAK table. Maintain output type as ‘SCHEDULING_AGREEMENT’. For ease, just copy the last row, paste and make the desired changes.
- Next step is maintaining the receiver. This step is optional. Choose ‘Receiver’ from the drop-down in the ‘Determination Steps’.
- In the ‘Maintain Business Rules’ table, repeat the steps for ‘EDIT’ and add new row. Then, maintain the appropriate ‘Role’ for our output type ‘SCHEDULING_AGREEMENT’.
- In the next step, we shall maintain the output channel i.e. the output can be printed using a printer or sent via email.
This is a mandatory step as the form name will not be determined automatically in the scheduling agreement.
- Click the ‘EDIT’ button->Insert new row and maintain the channel as ‘PRINT’ from the drop-down. Check and Activate.
- Then follows the most important step – To assign the ‘Form Template’. Choose ‘Form Template’ from the drop-down in determination step
- Here, provide and assign the form name to our custom output type ‘scheduling agreement’. To do this, click the ‘EDIT’->’Insert New Row’. Output Type=SCHEDULING_AGREEMENT’, Form name – -Z-Form name. Additionaly, we can specify role, sender country, recipient, channel, language etc. Except output type and form template, other fields are optional.
- The last step is to set the output relevance indicator. Repeat the steps-EDIT->INSERT. Provide the name of our custom output type and set the ‘Relevance Indicator’ to ‘X’. Other columns are optional. Activate and we are all set to use the custom output.
We are done with the steps to create a custom output type and define business rule for it using the decision table.
The transaction to create sales Scheduling Agreement is ‘VA31’.
- Enter scheduling agreement type and continue. Provide required details such as Sold-To-Party’, cust reference etc.in the next screen. Then go to menu ‘Extras->Output->Header->Edit’
The form name will be automatically populated in the ‘Form Template’ column along with role, receiver and channel.
Thus, our Configuration is working as desired.
Thanks for the detailed information on BRF+.
I wanted to know if is it possible to have editable Email body for the outputs which we setup using BRF+ so that a note is added by user. Currently mails are sent to multiple recipients and also adding a note to the email. Using BRF+ we can send mails to multiple recipients. But is it possible to add email body every time a mail is sent?
Our customer wants to create the following scenario :
1- When sending output to Print Purchase Order from Storage location = X
( The purchase order contains the item data with this specific storage location = X )
print this Output to printer number 100001
2- When sending output to Print Purchase Order from Storage location = Y
( The purchase order contains the item data with this specific storage location = Y )
print this Output to printer number 200002
What would be the right way to create a BRF rule for that scenario ?