Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
In the previous blog I explained the conceptual differences between NAST based output management and in this blog I will explain step by step instructions on how to create a custom output type. The object of this blog is not just to explain how it works, but to make new output management work in practical scenarios.

Where do we start?


A great place to start would be a very informative blog by Anirudh Jain Output Management via BRF+

Also please check out these notes

2292539 - SAP S/4HANA output control - configuration

2248229 - SAP S/4HANA output management - BRFplus files

Most of the delivered outputs work when the initial setup is completed as per the notes above. However, many a times we need to go beyond the delivered content and this is what I would like to share in this blog series.

How to configure a custom output

Step 1 – Activate new output management by application. You can notice that the configuration to S4HANA output management is now moved to Cross-Application components area where it rightfully belongs. Follow the path below in SPRO to start the creation of new output.

Cross-Application Components-> Output Control -> Manage Application Object Type Activation

As explained by OSS note – 2298826 you can turn on S4HANA output management by application from S4HANA 1610 onwards. For earlier versions refer to OSS note – 23340682334068. You will notice that only SD related applications appear in this area. Application type activation steps are embedded in SPRO nodes for different functional areas as below.



Materials Management -> Inventory Management and Physical Inventory -> Print Control -> Activation of new Output Management



Once you switch on the application, you will notice that the output screen changes in the application transaction. Output type field is not a 4 character field anymore.

Step 2 - Create a new output type. Follow the menu path as below. You should already see some outputs delivered in this section.

Cross- Applications -> Output control -> Define Output Types



 

There is not a whole lot of setup in this area. All you need to provide is a name for the output type, description and a call back class. Please bear in mind that S4HANA output management can trigger multiple outputs for the same output type. You do not need to configure multiple output types to trigger multiple outputs (for ex: Print, Email and Idoc channels can all be configured with the same output types to trigger based on different conditions).

Callback class - Let us understand the call back class in detail. There are several methods available and I will focus on important methods that can help you further enhance the functionality



IF_APOC_AUTHORITY~CHECK – Introduce custom authorization checks. Setting the field rv_authorized = ‘X’. Will allow the output to be processed. If rv_authorized  is not set to X, the output will stay in “To be output” status.

IF_APOC_OR_ITEM_VALIDATION~CHECK_ITEM – I did not see this method until 1709. In one of my earlier posts I mentioned that the classic output requirements are not supported in S4HANA output management. This method fills for that gap. This method is generally not available in the delivered call back class. However you can enhance the method and add interface IF_APOC_OR_ITEM_VALIDATION to the class. You can add a number of validations and add to the message log.

IF_APOC_OR_ITEM_VALIDATION~VALIDATE_CREATED_ITEM - I did not see this method until 1709. In one of my earlier posts I mentioned that the classic output requirements are not supported in S4HANA output management. This method fills for that gap. This method is generally not available in the delivered call back class. However you can enhance the method and add interface IF_APOC_OR_ITEM_VALIDATION to the class. You can then implement all the custom validation rules (legacy output requirements) here by setting IS_VALID = SPACE you can fail the output.

IF_SOMU_BADI_FORM_MASTER~GET_FORM_MASTER_DATA – Enables modification of data on the master form template. Did not get to use the master form functionality much. Will add details when I have come firsthand experience

IF_APOC_COMMON_API~GET_FDP_PARAMETER – This method is already implemented, did not need to manipulate anything in this method.

IF_APOC_COMMON_API~GET_DATA_FOR_ROLE – The standard class comes with this method implemented to read the email addresses from the address tables and populate the email ID for email outputs. As you are aware, SAP has stopped supporting FAX functionality. We were able to successfully make the Fax output work by modifying the code to read the fax number instead of the email address and convert it into an email address by concatenating the default domain settings for Fax from transaction SCOT.

IF_APOC_COMMON_API~GET_DATA_FOR_SENDER - The standard class comes with this method implemented to read the email addresses from the configuration for sales org, company code etc. This method can be leveraged to modify the email address to base it on some other logic.

IF_APOC_COMMON_API~GET_LEGACY_DATA – This is good method to link the new output management with classic output management. This method can be leveraged to generate Idocs, or use legacy output technologies. This is the approach used to integrate idoc technology with S4HANA output management. SAP has not implemented this method for the callback class for Sales order output. By implementing this method, you can enable the idocs for sales orders.

IF_APOC_COMMON_API~RENDER_DOCUMENT_LEGACY – This method can be leveraged to directly call legacy output programs.

IF_APOC_COMMON_API~CHECK_AUTHORITY – This is a deprecated method, use IF_APOC_AUTHORITY~CHECK instead.

Step 3 – Configure output conditions. Key concept that needs to be understood here is the concept of the CDS view tied to the output. Each application is linked to one and only one CDS view. Picture combining all the condition tables you had in the old output determination procedure, if you are conversant with NAST based output management. Here is how you can find out the name of the CDS view linked to the application. It is very important to know this to help you extend the delivered functionality and also for troubleshooting.

Go to transaction OPD or Cross-Application Components -> Output Control -> Define Business Rules for Output Determination from SPRO. Select application area, Select output type, click on the button “Context overview”. Click on condition parameters of the application. This should give you the name of the CDS view. The fields in this CDS view are available in all of the steps below to build your conditions.



If the delivered fields are not sufficient for the conditions you desire to build, you can extend the CDS views. Please see an informative blog by Tushar Sharma.

https://blogs.sap.com/2017/09/16/abap-core-data-services-part-2types-of-cds-views/#EVIEW

In the next blog post I will explain the rest of the configration needed to complete the setup of outputs.

 

Hope you find this information useful.
18 Comments
former_member453753
Discoverer
0 Kudos
Hello Raghavendra

Thank you for your article explaining a new concept, eagerly wafting for the article on the configuration.
0 Kudos
I am glad I could be of help.

Many a times I get questions on some of the limitations on new output management specifically ALE. As such there are some SAP notes that talk about this specific limitation. I would like to explain how we could overcome that limitation by modifying the callback class.

Setting up distribution model and partner profile will remain the same.

In the output determination configuration I defaulted the role to LS.

Implement method IF_APOC_COMMON_API~GET_LEGACY_DATA like any other Idoc output type and point the out put to old output type.

There is no need to maintain output conditions in VVXX transactions.

I have copied the standard class and modified the IF_APOC_COMMON_API~GET_DATA_FOR_ROLE and added the logic below. You can implement your own custom logic to dynamically populate the variable lv_logsys.


LOOP AT ct_role_data ASSIGNING FIELDSYMBOL(<ls_role_data>).
  IF <ls_role_data>role ‘LS’.
     <ls_role_data>id lv_logsys.
     <ls_role_data>country ‘US’.
    <ls_role_data>language ‘E’.
    CONTINUE.
  ENDIF.
ENDLOOP.

 

rajesh2942
Explorer
0 Kudos
Hi Raghavendra,

Your blog is very informative and useful.

Question: If i want to add any custom field to any of the decision tables, how do we do it ? After adding custom field, do we need to logic in IF_APOC_OR_ITEM_VALIDATION~VALIDATE_CREATED_ITEM or IF_APOC_OR_ITEM_VALIDATION~CHECK_ITEM by enhancing fall back class assigned to Output type ?

Thanks,

Rajesh V

 
menkade
Explorer
0 Kudos
Hi Raghavendra,

Can I copy standard class CL_Billing_Output_Control and modify the method IF_APOC_COMMON_API~GET_LEGACY_DATA with an additional reference condition type different from RD00. We need different keys of the message control to trigger the right structure of EDI format.

Kind regards,

Youssra

Youssra,

Sorry for the delay in responding. Yes, you can copy the call back class and implement GET_LEGACY_DATA method. You can switch the parmbindvalue for KSCHL to the output of your choice. 

DATA    ls_parmbind TYPE abap_parmbind.

CLEAR et_legacy_data.

ls_parmbindname ‘KAPPL’.
GET REFERENCE OF ‘V3’ INTO ls_parmbindvalue.

INSERT ls_parmbind INTO TABLE et_legacy_data.

CLEAR ls_parmbind.
ls_parmbindname ‘KSCHL’.
GET REFERENCE OF ‘ZRD0’ INTO ls_parmbindvalue.
INSERT ls_parmbind INTO TABLE et_legacy_data.

former_member620347
Participant
0 Kudos
Hello Raghavendra,

Thanks for the information on BRF+ output.

I want to send the attachments along with PO output attachment for the BRF+ output.

Is there any provision for this? or can you please suggest the steps for this?

Regards,

Sudhir
0 Kudos
I am sorry for the delay in responding. We had to write code in the output program to read the attachments and merge with the pdf generated with the output.
debasmitaghatak
Explorer
0 Kudos
Hello Raghavendra

 

We are on 1809 FSP02 on prem and try to use new output management for generating correspondence using SAP11. However when we try to generate the correspondence for SAP11 using the app Create Correspondence App V2, it gives the error Output Management nodes could not be created using BRF+.

The same error has been addressed in SAP asking to add email in OPD channel but the environment they have specified is cloud. So despite email is added in OPD as channel, I am unable to make the app work through new output management. Are you aware of this?

 

Regards

Debasmita
former_member703498
Discoverer
0 Kudos
HI Raghavendra,

 

Thanks for the excellent post . I have a question on this . I can understand that we can use below to set the OUTPUT and use NACE out type .  This method is only setting the OUTPUT type . We also need to set the Output medium . Where can we set that ?

IF_APOC_COMMON_API~GET_LEGACY_DATA

 

For example, I can set "LD00" 0r "ZRD0" as output type. In this output type, I have mediums configured like "Email" , "Fax" , "Special Function"  in NACE .

 

How will we specify the medium . We want to use "Special Function" with ZRD0" .

Initially, I though this is picked from the BRF+ channels. However, I could find channel for Special function in the BRF+ channel .

 

Could you please throw some light on this ?

 

 
former_member703498
Discoverer
0 Kudos
HI Raghavendra,

 

Thanks for the excellent post . I have a question on this . I can understand that we can use below to set the OUTPUT and use NACE out type .  This method is only setting the OUTPUT type . We also need to set the Output medium . Where can we set that ?

IF_APOC_COMMON_API~GET_LEGACY_DATA

 

For example, I can set “LD00” 0r “ZRD0” as output type. In this output type, I have mediums configured like “Email” , “Fax” , “Special Function”  in NACE .

 

How will we specify the medium . We want to use “Special Function” with ZRD0″ .

Initially, I though this is picked from the BRF+ channels. However, I could find channel for Special function in the BRF+ channel .

 

Could you please throw some light on this ?

 

Regards,

Sangita
100985314489
Explorer
0 Kudos
Hi,

So as per the standard class CL_BILLING_OUTPUT_CONTROL we can only use RD00.If we need to use RD04,we need to change this? or we can keep using RD00.
0 Kudos
Sangita,

Literally you can use any output medium to call a special function. In order to accomplish this requirement, we just copied the print program and inserted the code in the print program. You also have the option of pointing to NAST output by implementing the method IF_APOC_COMMON_API~GET_LEGACY_DATA
0 Kudos
Thank you so much, your explanations are helpful.
0 Kudos
Thank you Fabrice.
0 Kudos
Hello Raghavendra

I followed the steps to create a Idoc by using method  IF_APOC_COMMON_API~GET_LEGACY_DATA and I could generate the Idoc, Thanks for the useful information in the blog.

I have one more requirement - I would trigger the out for some BPs only, like in VOFM output requirement routine we can restrict the output determination based on certain conditions, How can we do similar thing in OPD?

 

Thanks

 

Vivek
BjornHarzer
Participant
0 Kudos
Hi Raghavendra

The following doesn't seem to be correct

IF_APOC_OR_ITEM_VALIDATION~CHECK_ITEM – I did not see this method until 1709. In one of my earlier posts I mentioned that the classic output requirements are not supported in S4HANA output management. This method fills for that gap. This method is generally not available in the delivered call back class. However you can enhance the method and add interface IF_APOC_OR_ITEM_VALIDATION to the class. You can add a number of validations and add to the message log.

Yes, you can add the interface to the callback class of the output type and implement the methods of the interface, but that doesn't do anything.

This interface is called by the SAP internal Badis APOC_ITEM_VALIDATION and BADI_SDBILL_OMVAL.

What I am really missing here is that i can implement a customer Badi in order to code custom validations on when an output is relevant or not (e.g. calling in class CL_APOC_OR_A_ROOT_DET_ITEMS===CP method _PARAMETER_DETERMINATION and settings parameter is_relevant)

At the moment i would have to mod the Badi and implement my own country specific implementation of BADI_SDBILL_OMVAL, but that's a mod...

Anyone with a solution for that?

Bjorn
naimkhans_babi
Active Participant
0 Kudos
Hello Raghvendra!

 

I am trying to determine an output type when sales order changes in va02, but no output type is determined ordrsp.

  1. in VA01 - > Output type (ZORDC) is determined from BRF+ in In-preparation status and upon saving it become - completed.

  2. in VA02 -> when sales order is changed no output type is determined, no new line with in-preparation status.  only old zordc is visible in completed


I have written a code in legacy_get_data method.  in NACE - issue multiple is also tick.   ZA00 is used as output in WE20 and passed in get_legacy_data method, as well as in NACE.  is there something else i need to do or I am making mistake, kindly help me to understand how i can configure in BRF+ to re-trigger a output.

 

Thank you

Best Regards

Naim
Labels in this area