📚 Architectural Blueprint

SAP S/4HANA Output Management & Adobe Forms Guide

A definitive guide to retiring legacy NAST messages, configuring BRFplus Output Parameter Determination (OPD), and orchestrating BTP Adobe Form rendering in Clean Core.

1. The Death of NAST & Legacy Output Determination

In SAP ECC, document output (PO printouts, Order Confirmations, Delivery Slips, Invoices) was governed by the NAST table and condition technique (transactions NACE, VV11, VV31). Programs triggered print programs like RSNAST00, invoking SmartForms or SAPscripts.

In SAP S/4HANA Clean Core:

2. Modern Output Management Architecture: 5 Core Steps

When an enterprise business document is created or changed, S/4HANA executes a sequential 5-step decision tree in BRFplus:

Evaluation Step Business Decision Configuration Rule
1. Output Type Should an output be triggered? Conditioned on Doc Type, Plant, and Approval Status.
2. Receiver Who receives the output? Evaluates Business Partner partner roles (e.g., LF Vendor, AG Sold-to).
3. Channel How is the output transmitted? Resolves to EMAIL, PRINT, or EDI.
4. Form Template Which Adobe Form layout is selected? Selects pre-compiled XDP form template and rendering language.
5. Email Settings What is the sender, subject, and body? Dynamic mail template resolution and recipient email routing.

3. Custom Field Enrichment via BAdI `APOC_CUSTOM_FIELDS`

When standard Adobe Form data contexts lack enterprise custom fields (e.g., ESG indicators, custom warehouse bin codes), Clean Core forbids modifying standard Gateway OData services. Instead, implement released developer BAdI APOC_CUSTOM_FIELDS:

METHOD if_apoc_custom_fields~enrich_data.
  IF is_output_item-business_object = 'PURCHASE_ORDER'.
    ct_custom_fields = VALUE #(
      ( field_name = 'ZZ_ESG_SCORE' field_value = 'A_PLUS' )
      ( field_name = 'ZZ_INCOTERMS_DETAIL' field_value = 'DAP Frankfurt Hub' )
    ).
  ENDIF.
ENDMETHOD.

4. Clean Core Email Dispatching: `cl_bcs_mail_message`

Legacy function modules (SO_NEW_DOCUMENT_ATT_SEND_API1) fail ATC checks in ABAP Cloud. Modern email dispatching uses the released object-oriented class cl_bcs_mail_message:

DATA(lo_mail) = cl_bcs_mail_message=>create_instance( ).
lo_mail->set_sender( 'billing@company.com' ).
lo_mail->add_recipient( 'customer@partner.com' ).
lo_mail->set_subject( 'Your Invoice INV-2026-001' ).
lo_mail->add_attachment( cl_bcs_mail_binarypart=>create_instance(
  iv_content      = lv_pdf_hex
  iv_content_type = 'application/pdf'
  iv_filename     = 'Invoice_2026.pdf' ) ).
lo_mail->send( ).

Interactive Output Management Code Generator

Generate BRFplus OPD decision specifications, custom field enrichment BAdIs, and ABAP Cloud email dispatchers with our free interactive architect.

📤 Launch Output Management Architect