Skip to Content
Technical Articles

S4HANA Output management – Part 2

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 22988262298826 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.

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.

You must be Logged on to comment or reply to a post.
  • 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’.


  • 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 ?


    Rajesh V


  • 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,

      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.

  • 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?



  • 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.