Integration between SAP S/4 HANA and InterFormNG2 - InterFormNG2 Manual

Integration between SAP S/4 HANA and InterFormNG2

Foreword / Background

This documentation outlines the process and requirements for integrating SAP S/4 HANA with InterFormNG2, a solution for managing digital forms and output. It is essential to note that there are multiple approaches and methods for system integration, and this documentation highlights some of the feasible options.

Alert
Please note that InterForm A/S will not be responsible for any configuration done inside the ERP. The following documentation is based on information from former projects and shall be seen as a support for integrating with InterFormNG2.

Info
Please note that certain SAP related functionalities of InterFormNG2 are not part of the base product and will require a license key. Please reach out to InterForm Sales in case you are interested in it.


Integration Options

InterFormNG2 as replacement for Adobe Document Service (ADS)

Introduction

InterFormNG2 can be used as a full or partial replacement for Adobe Document Service (ADS).
To do this, SAP ABAP must be configured to call an InterFormNG2 workflow instead of ADS.

System requirements

SAP S/4 HANA Requirements

Notes
Please consult your SAP partner for the correct configuration of SAP S/4 HANA. Any changes made to the ERP are the responsibility of the implementing organization.


  • Adobe Document Service (ADS) is configured

  • RFC Connection Configuration


The RFC connection is maintained in transaction SM59. When configuring the RFC destination, select Connection Type G - HTTP Connection to External Server. In the RFC destination parameters, provide the IP and port details of the InterForm web service. Additionally, specify the InterForm service user in the Logon & Security tab. Note that specific details like IP, port, InterForm user, and certificate will be defined during the installation of the InterForm server.

Certificate via STRUST: If the connection utilizes HTTPS, you may need the certificate of the InterForm server.





InterFormNG2 Requirements

Info
For InterFormNG2 configuration, it is advisable to reach out to InterForm directly for expert guidance.
  • InterFormNG2 installed (Prerequisites)

  • InterFormNG2 Version 3.5.1 or later is recommended.

  • The workflow must be created with the "REST webservice basic" input component to process the SAP requests.

  • REST webservice basic


Process Overview

The integration between SAP S/4 HANA and InterFormNG2 comprises two essential processes:

  1. Outbound - Transmitting data/requests from SAP S/4 HANA to InterFormNG2.

  2. Inbound - Receiving data, such as PDF previews, from InterFormNG2 to SAP S/4 HANA.

InterFormNG2 Integration via Webservice Communication

The integration with InterFormNG2 is primarily achieved through webservice communication. SAP S/4 HANA initiates a webservice request to an InterFormNG2 workflow. Subsequently, InterFormNG2 processes the XML request and converts it into the desired output format (e.g., PDF, PCL, or ZPL) based on the configured conditions.

InterFormNG2 can then either return the generated document (e.g., sending a response with the PDF for previewing) or directly output the documents to various destinations, such as physical printers, emails, or storage as PDFs.

Notes
InterForm controls the workflow, template selection and output process based on the contents of the xml-files.



  1. SAP ABAP sends a SOAP request to the InterFormNG2 workflow.

  2. The InterformNG2 workflow looks at the request data to decide if this should be processed by InterFormNG2 or should be re-routed to ADS.
    a. If the decision is to process it in InterFormNG2: The InterFormNG2 workflow creates a PCL or PDF document (or both), base64       encodes the created document and the generates a SOAP response containing the base64 encoded document. The response must be   in the same format as ADS responses and use “text/xml” as content type (set using the “Set MIME type” workflow component).
    b. If the decision is to process it in ADS: The InterFormNG2 workflow sends the original SOAP request XML to ADS using the     “
    Forward  webservice” workflow component.

  3. ADS sends a SOAP response back to InterFormNG2.

  4. A SOAP response is returned to SAP. In the (a) case, the response generated by InterFormNG2, in the (b) case, the one received as response from ADS.


Examples

Example 1 - Simple Flight Booking Example

Info
This example demonstrates the connection between SAP S/4 HANA and InterFormNG2.

  • Open ABAP Editor (Transaction SE38)

      

  • Execute Program FP_TEST_03
    SAP Example program FP_TEST_03 (Report FP_TEST_03 - Printing of documents using PDF based forms)
    <xsl:param name="Base64"/>
    *----------------------------------------------------------------------*
    *       Report FP_TEST_03
    *----------------------------------------------------------------------*
    *       Printing of documents using PDF based forms
    *----------------------------------------------------------------------*
    PROGRAM fp_test_03.
    
    INCLUDE fp_utilities.                                      "#EC INCL_OK
    
    DATA carr_id TYPE sbook-carrid.
    
    SELECTION-SCREEN BEGIN OF BLOCK s_data WITH FRAME TITLE text-100.
    PARAMETER      p_custid TYPE scustom-id   DEFAULT 12.
    SELECT-OPTIONS s_carrid FOR carr_id       DEFAULT 'AA' TO 'ZZ'.
    SELECTION-SCREEN END OF BLOCK s_data.
    
    SELECTION-SCREEN BEGIN OF BLOCK s_form WITH FRAME TITLE text-101.
    PARAMETER:     p_form   TYPE fpwbformname  DEFAULT 'FP_TEST_03_TABLE',
                   p_langu  TYPE spras         DEFAULT 'D',
                   p_countr TYPE land1         DEFAULT 'DE' MATCHCODE OBJECT 
                     h_t005_land,
                   p_ia     TYPE fpinteractive,
                   p_norm   TYPE fppdfnorm     DEFAULT if_fp_pdf_norm=>default 
                     MODIF ID nrm.
    SELECTION-SCREEN END OF BLOCK s_form.
    
    SELECTION-SCREEN BEGIN OF BLOCK s_jobp WITH FRAME TITLE text-103.
    PARAMETER      p_jobp   TYPE fpjobprofile MODIF ID jpr.
    SELECTION-SCREEN END OF BLOCK s_jobp.
    
    SELECTION-SCREEN BEGIN OF BLOCK s_conn WITH FRAME TITLE text-102.
    PARAMETER      p_conn   TYPE rfcdest      OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK s_conn.
    
    DATA go_fp       TYPE REF TO if_fp.
    DATA go_pdf_obj  TYPE REF TO if_fp_pdf_object.
    DATA gx_fpex     TYPE REF TO cx_fp_runtime.
    DATA gt_profiles TYPE tfpjobprofile.
    DATA: customer          TYPE scustom,
          bookings          TYPE ty_bookings,
          connections       TYPE ty_connections,
          fm_name           TYPE rs38l_fnam,
          fp_docparams      TYPE sfpdocparams,
          fp_outputparams   TYPE sfpoutputparams,
          error_string      TYPE string.
    
    INITIALIZATION.
      MOVE cl_fp=>get_ads_connection( ) TO p_conn.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'JPR'.
          TRY.
              IF cl_fp_feature_test=>is_available(
                     iv_connection = p_conn
                     iv_feature    = cl_fp_feature_test=>gc_job_profiles )
                  = abap_true.
                CONTINUE.
              ENDIF.
            CATCH cx_fp_runtime_internal
                  cx_fp_runtime_system
                  cx_fp_runtime_usage.                      "#EC NO_HANDLER
          ENDTRY.
          screen-active = 0.
          MODIFY SCREEN.
          CLEAR p_jobp.
        ENDIF.
        IF screen-group1 = 'NRM'.
    *      TRY.
    *          IF cl_fp_feature_test=>is_available(
    *                 iv_connection = p_conn
    *                 iv_feature    = cl_fp_feature_test=>gc_render_pdfa1 )
    *              = abap_true.
    *            CONTINUE.
    *          ENDIF.
    *        CATCH cx_fp_runtime_internal
    *              cx_fp_runtime_system
    *              cx_fp_runtime_usage.                      "#EC NO_HANDLER
    *      ENDTRY.
    *      screen-active = 0.
    *      MODIFY SCREEN.
    *      CLEAR p_norm.
        ENDIF.
      ENDLOOP.
    
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_jobp.
      TRY.
          IF cl_fp_feature_test=>is_available(
                 iv_connection = p_conn
                 iv_feature    = cl_fp_feature_test=>gc_job_profiles )
              = abap_true.
    *       Get job-profiles list from the ADS.
            go_fp = cl_fp=>get_reference( ).
            go_pdf_obj = go_fp->create_pdf_object( connection = p_conn ).
            gt_profiles = go_pdf_obj->get_job_profiles( ).
    *       Show the value-help popup.
            CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
              EXPORTING
                retfield    = 'NAME'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                dynprofield = 'P_JOBP'
                value_org   = 'S'
              TABLES
                value_tab   = gt_profiles.
          ENDIF.
        CATCH cx_fp_runtime_internal
              cx_fp_runtime_system
              cx_fp_runtime_usage.                          "#EC NO_HANDLER
      ENDTRY.
    
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_conn.
      PERFORM value_help_for_destination USING 'P_CONN'.
    
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_norm.
      PERFORM value_help_for_pdfnorm USING 'P_NORM'.
    
    START-OF-SELECTION.
    
    * Get data.
      SELECT SINGLE * FROM scustom INTO customer WHERE id = p_custid.
      IF customer IS INITIAL.
        MESSAGE ID 'AD' TYPE 'E' NUMBER '718' WITH 'SCUSTOM'.
      ENDIF.
      SELECT * FROM sbook INTO TABLE bookings
          WHERE   customid = p_custid
              AND carrid  IN s_carrid
          ORDER BY PRIMARY KEY.
      IF bookings[] IS NOT INITIAL.
        SELECT * FROM spfli INTO TABLE connections FOR ALL ENTRIES IN bookings
            WHERE   carrid = bookings-carrid
                AND connid = bookings-connid
            ORDER BY PRIMARY KEY.
      ENDIF.
    
    * Print data:
    
    * First get name of the generated function module.
      TRY.
          CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
            EXPORTING
              i_name     = p_form
            IMPORTING
              e_funcname = fm_name.
        CATCH cx_fp_api_repository cx_fp_api_usage cx_fp_api_internal.
          MESSAGE ID 'FPAPIGENERIC' TYPE 'E' NUMBER '000' WITH p_form.
      ENDTRY.
    
    * Set output parameters and open spool job.
      fp_outputparams-preview    = abap_true.
      fp_outputparams-connection = p_conn.
      fp_outputparams-pdfnorm    = p_norm.
      IF p_jobp IS NOT INITIAL.
        TRY.
            IF cl_fp_feature_test=>is_available(
                   iv_connection = p_conn
                   iv_feature    = cl_fp_feature_test=>gc_job_profiles )
                = abap_true.
              fp_outputparams-job_profile = p_jobp.
            ENDIF.
          CATCH cx_fp_runtime_internal
                cx_fp_runtime_system
                cx_fp_runtime_usage INTO gx_fpex.
            PERFORM error USING gx_fpex.
        ENDTRY.
      ENDIF.
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = fp_outputparams
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      IF sy-subrc IS NOT INITIAL.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    
    * Set form language and country (->form locale).
      fp_docparams-langu    = p_langu.
      fp_docparams-country  = p_countr.
      fp_docparams-fillable = p_ia.
    
    * Now call the generated function module.
      CALL FUNCTION fm_name
        EXPORTING
          /1bcdwb/docparams  = fp_docparams
          customer           = customer
          bookings           = bookings
          connections        = connections
    **    IMPORTING
    **      /1bcdwb/formoutput =
        EXCEPTIONS
          usage_error        = 1
          system_error       = 2
          internal_error     = 3
          OTHERS             = 4.
      IF sy-subrc IS NOT INITIAL.
        CALL FUNCTION 'FP_GET_LAST_ADS_ERRSTR'
          IMPORTING
            e_adserrstr = error_string.
        IF error_string IS NOT INITIAL.
    *     We received a detailed error description.
          MESSAGE error_string TYPE 'E'.
        ELSE.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    
    * Close spool job.
      CALL FUNCTION 'FP_JOB_CLOSE'
    **    IMPORTING
    **      e_result       =
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 3
          OTHERS         = 4.
      IF sy-subrc IS NOT INITIAL.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    
    *&---------------------------------------------------------------------*
    *&      Form  value_help_for_pdfnorm
    *&---------------------------------------------------------------------*
    *       Get PDFNorm.
    *----------------------------------------------------------------------*
    *      <--P_NORM
    *----------------------------------------------------------------------*
    FORM value_help_for_pdfnorm USING p_norm TYPE dynfnam.
    
      TYPES: BEGIN OF lty_norm,
                 pdfnorm type FPPDFNORM,
             END OF lty_norm.
    
      STATICS st_norm   TYPE STANDARD TABLE OF lty_norm WITH KEY pdfnorm.
    *
    * fill internal table st_norm with PDFnormion
      data wa like line of st_norm.
      clear st_norm.
    
    TRY.
    IF cl_fp_feature_test=>is_available(
                     iv_connection = p_conn
                     iv_feature    = cl_fp_feature_test=>gc_pdfa_ext )
                  = abap_true.
      wa-pdfnorm = ''          ##no_text.  append wa to st_norm.
      wa-pdfnorm = 'PDF'       ##no_text.  append wa to st_norm.
      wa-pdfnorm = 'PDF/A-1'   ##no_text.  append wa to st_norm.
      wa-pdfnorm = 'PDF/A-1B'  ##no_text.  append wa to st_norm.
      wa-pdfnorm = 'PDF/A-2B'  ##no_text.  append wa to st_norm.
      wa-pdfnorm = 'PDF/A-3B'  ##no_text.  append wa to st_norm.
    elseif cl_fp_feature_test=>is_available(
                     iv_connection = p_conn
                     iv_feature    = cl_fp_feature_test=>gc_render_pdfa1 )
                  = abap_true.
      wa-pdfnorm = ''          ##no_text.  append wa to st_norm.
      wa-pdfnorm = 'PDF'       ##no_text.  append wa to st_norm.
      wa-pdfnorm = 'PDF/A-1'   ##no_text.  append wa to st_norm.
    
    else.
      wa-pdfnorm = ''          ##no_text.  append wa to st_norm.
      wa-pdfnorm = 'PDF'       ##no_text.  append wa to st_norm.
    endif.
         CATCH cx_fp_runtime_internal
               cx_fp_runtime_system
               cx_fp_runtime_usage.                      "#EC NO_HANDLER
    ENDTRY.
    
    * Show the value-help popup.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'EXTENSION'
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = p_norm
          value_org   = 'S'
        TABLES
          value_tab   = st_norm.
    ENDFORM.                    "value_help_for_pdfnorm
    

  • Choose connection ADS (RFC-Connection for the InterForm-Server must be configured in advance).

      

  • Choose output device and storage mode archive only.

      



  • Click on Print Preview.

  • SAP sends the xml-request to InterForm, which will return the PDF for previewing.

      


InterForm workflow





Resources

Info
The following resources can be utilized to set up your test system. You can find the files attached at the bottom of the page.
 
  • 1_generate_resp2.xsl  

  • 2_ng2txp_sap_bookings (1).zip

  • 3_sap_extract_pdf.xsl

  • 4_remove_namespaces.xsl

  • 5_ng2wfxp_SapTest_workflow_clouddemo (1).zip



Customized XML-output to InterFormNG2

Introduction

There is also the possibility to integrate with InterFormNG2 by enabling data transmission from SAP S/4 HANA to InterFormNG2 via the customization of print programs to generate XML files, which will be sent through a new RFC connection. The process and requirements are similar to the replacement of ADS, though the communication is only between S/4 and InterFormNG2.

System requirements

SAP S/4 HANA Requirements

Notes
Please consult your SAP partner for the correct configuration of SAP S/4 HANA. Any changes made to the ERP are the responsibility of the implementing organization.

RFC Connection Configuration

The RFC connection is maintained in transaction SM59. When configuring the RFC destination, select Connection Type G - HTTP Connection to External Server. In the RFC destination parameters, provide the IP and port details of the InterForm web service. Additionally, specify the InterForm service user in the Logon & Security tab. Note that specific details like IP, port, InterForm user, and certificate will be defined during the installation of the InterForm server.

Certificate via STRUST: If the connection utilizes HTTPS, you may need the certificate of the InterForm server.





InterFormNG2 Requirements

Info
For InterFormNG2 configuration, it is advisable to reach out to InterForm directly for expert guidance.
  • InterFormNG2 installed (Prerequisites)

  • InterFormNG2 Version 3.x or later is recommended.

  • The workflow must be created with the "REST webservice basic" input component to process the SAP requests.

  • REST webservice basic



Process Overview

The integration between SAP S/4 HANA and InterFormNG2 comprises two essential processes:

  1. Outbound - Transmitting data/requests from SAP S/4 HANA to InterFormNG2.

  2. Inbound - Receiving data, such as PDF previews, from InterFormNG2 to SAP S/4 HANA.


InterFormNG2 Integration via Webservice Communication

The integration with InterFormNG2 is primarily achieved through webservice communication. SAP S/4 HANA initiates a webservice request to an InterFormNG2 workflow. Subsequently, InterFormNG2 processes the XML request and converts it into the desired output format (e.g., PDF, PCL, or ZPL) based on the configured conditions.

InterFormNG2 can then either return the generated document (e.g., sending a response with the PDF for previewing) or directly output the documents to various destinations, such as physical printers, emails, or storage as PDFs.

Notes
InterForm controls the workflow, template selection and output process based on the contents of the xml-files.

Examples

Example 2 - SAP Business Document Example

Info

This example illustrates how to send an XML request via a webservice to InterFormNG2. Please keep in mind to customize your S/4 environment to send similar XML-requests to InterForm.

  • Send xml-request via webservice to the endpoint (In this example we just use an easy html-file which does the same job). 





  • InterForm will return the PDF to the same endpoint

      

Resources

Info
To set up your test system, you can utilize the following resources. The files are attached at the bottom of the page.
  • 6_ng2txp_ZSD_X_SALES_DOCUMENT_V2_STANDARD.zip

  • 7_ng2wfxp_webservice_input_workflow.zip

  • 8_webservice.html


InterFormNG2 as eXternal Output Management System (XOM)

Introduction

S/4-BC-XOM offers an open and versatile interface to integrate external output management systems (OMS) with the SAP S/4HANA spool system, allowing you to connect the SAP spool system with an OMS.

System requirements

SAP S/4 HANA Requirements

Notes
Please consult your SAP partner for the correct configuration of SAP S/4 HANA. Any changes made to the ERP are the responsibility of the implementing organization.

We recommend to get familiar with the SAP Printing Guide: SPA Printing Guide (BC-CCM-PRN).

In SAP, InterFormNG2 can be configured as an eXternal Output Management System (XOM). For this to work, an OMS command must be configured in SAP with the SPAD transaction. See more details here: Defining OMS Command Set for LOMS.

The attached shell script must be placed in the file system on the SAP ABAP server. 

#! /bin/bash
# Argument 1 is path and filename (&F)
docpath=$1
# Argument 2 is copies (&C)
copies=$2
# Argument 3 is name of OMS (&Er)
oms=$3
# Argument 4 is the ID of the SAP system (&Es)
sapid=$4
# Argument 5 is SAP spool id (&EI)
spoolid=$5
# Argument 6 is reply message group (&EG)
msggroup=$6
encoded=$(base64 $docpath)
# Generate uuid, then cut it off at 20 chars since this is max for SAP uid
uuid=$(uuidgen)
uid=${uuid:0:20}
# Construct the XML input for InterFormNG2
xmldoc="<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<sapxom>
  <sapid>$sapid</sapid>
  <oms>$oms</oms>
  <spoolId>$spoolid</spoolId>
  <msgGroup>$msggroup</msgGroup>
  <uid>$uid</uid>
  <doc>$encoded</doc>
  <doctype>PDF</doctype>
  <copies>$copies</copies>
</sapxom>"
# Call the InterFormNG2 workflow
statuscode=$(curl -s -u sapconn:sapconnpw 
  -X POST 
  -H 'Content-type: application/xml' 
  --write-out %{http_code} 
  --output /dev/null 
  -d "$xmldoc" 
  https://clouddemo.interform400.com/basicws/sapxom)
if [[ "$statuscode" -ne 200 ]] ; then
# Error
echo 2.00 1 1 - Error code $statuscode
else
# Success
echo 2.00 4 1 $uid
fi


NotesPlease note that in the sendToInterform.sh script you must change the part “https://clouddemo.interform400.com/basicws/sapxom” to match your NG2 environment URL and workflow path.
On a Linux installation, it is recommended to place the script in /opt/interform. An OMS command can then be defined as:
/opt/interform/sendToInterform.sh &F &C &Er &Es &EI &EG

SAP Connection configuration

For the XOM callback, a SAP connection must be configured in InterFormNG2 settings.


























As SAP ABAP host, set the domain name or IP or your SAP ABAP installation. Note that the network configuration must allow InterFormNG2 to connect to port 3300 on the SAP ABAB server.
Set the system number and client number to connect to.
Set the language to use (mostly for error messages from SAP). Note that only ‘en’ and ‘de’ are supported by default in SAP. To use other languages, a language pack must be installed on SAP.
Finally set the username and password of a SAP user to connect as. The user must have the necessary access rights on SAP.

InterFormNG2 Requirements

Info
For InterFormNG2 configuration, it is advisable to reach out to InterForm directly for expert guidance.
  • InterFormNG2 installed (Prerequisites)

  • InterFormNG2 Version 3.5.1 or later is required. A license for the module is needed.

  • SAPConnector-3.5.1-ngmodule.jar must be added to the modules folder: C:\Program Files\InterFormNG2\modules → Please restart the service afterwards → Please reach out to InterForm in order to obtain this file.

  • Two library files are required for the XOM part. According to SAP license terms we cannot distribute these libraries, so you must download the libraries from SAP Java Connector The files are sapjco3.jar and sapjco3.dll (if you run NG2 on Windows, for Linux/IBMi it will be sapjco3.so instead of the dll). These must be placed in the InterFormNG2 libext folder.

  • A workflow must be created in InterFormNG2 with the “REST webservice basic” input component. The username and password used for the workflow must be set in the shell script (on the curl command, after -u). The workflow should have the path set as “sapxom”. If another path is used, the shell script must be updated (the URL on the curl command). A callback from InterFormNG2 to SAP is needed when the workflow completes. This requires configuration of a SAP connection in InterFormNG2 (see below).

Process Overview

When all has been configured, InterFormNG2 can act as external output management system for SAP. The procedure is as follows:



  1. SAP XOM command invokes the shell script and passes the configured information as command line arguments. The shell script generates an XML containing the command arguments and a base64 encoded version of the document to be processed. The XML structure looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <sapxom>
      <sapid>A4H</sapid>
      <oms>INTERFORM</oms>
      <spoolId>000002160400015</spoolId>
      <msgGroup>CA4HINTERF</msgGroup>
      <uid>840e250a-831c-4a4e-8</uid>
      <doc>BASE64_DOCUMENT_DATA</doc>
      <doctype>PDF</doctype>
      <copies>1</copies>
    </sapxom>

  2. The shell script sends a REST webservice request to the InterFormNG2 workflow.
    In the workflow, the “uid” field from the input XML can be used as log info key.
    The workflow should as soon as possible send a response to SAP (i.e. before doing any actual processing). This can for instance be done using the workflow component “First in, first out queue” with the wait strategy set to “Return”. (Another option would be to save the input XML to the file system and then end the workflow. Another workflow can then pick up the file from the file system.)

  3. A response is returned from the workflow, completing the shell script execution.

  4. When the InterFormNG2 workflow has completed processing, it must create a callback to SAP to indicate that the processing has completed as well as with which status (success or failure).
    This callback can be done using the workflow component “SAP XOM callback”.
    On this component, set “message group” to the value received as input /sapxom/msgGroup and set “spool ID” to the value received as input /sapxom/spoolId. Optionally a message for the SAP log can be written in the field “status message”

      

InterFormNG2 as eXternal Output Management System (XOM) - Example Setup

  1. Setup SAP connection configuration 



  2. Setup Printers in InterFormNG2 



  3. Define Workflow "sapxom" - You can reuse the attachment 9_ng2wfxp_sapxomworkflow.zip



  4. Send XML-Request to the sapxom-Workflow - e.g. similar to: 

    <?xml version="1.0" encoding="UTF-8"?>
    <sapxom>
      <sapid>A4H</sapid>
      <oms>INTERFORM</oms>
      <spoolId>000002160400015</spoolId>
      <msgGroup>CA4HINTERF</msgGroup>
      <uid>840e250a-831c-4a4e-8</uid>
      <doc>BASE64encodedPDF</doc>
      <doctype>PDF</doctype>
      <device>PRINTER01</device>
      <copies>1</copies>
    </sapxom>

The sapxom-Workflow receives the xml-request from SAP and calls the following functions:
  1. First in, first out - to directly return a webservice response
  2. Payload to named property - to store the initial xml-request for the callback
  3. Save in resources - Saves the xml-request in the internal library with the UID as the filename - recommended for debugging purposes.
  4. Set Printer - to define the output-device/printer based on the content of the xml -> It's important to have a printer configured in InterFormNG2 with the same name.
  5. Choice and Join - To differentiate between different file-formats (e.g. PDF and PS).
  6. Base64 XML node to payload - to extract the base64 encoded document from the xml
  7. To printer - to send the document to the printer
  8. Join
  9. Named property to payload - returning to the initial xml-request
  10. SAP XOM callback - does the callback to SAP

Notes
Please note: The above setup can be used as a baseline. It is supposed to help with the initial setup and testing but it needs to be modified according to the specific requirements and configuration of your system.

 


    Notice: Help Center Transition Update

    As of January 13, 2025, we are excited to announce that our new Help Center is in the final stages of development. While the Knowledge Base is already accessible, our current JIRA system will continue to manage support tickets during this transition period. For assistance with InterForm Output Management Software, please refer to the Support for InterForm Output Management Software.

    We appreciate your patience and understanding as we work to enhance your support experience. If you have any questions or encounter any issues, please do not hesitate to reach out via the existing support channels.

    Best regards,
    The InterForm Support Team


      • Related Articles

      • Infor M3 integration

        A special Infor M3 module for InterFormNG2 can help you to integrate InterFormNG2 with the ERP solution, M3 from Infor. The exact integration setup depends on the version of M3, that you are running. The description below covers version 10.2, but in ...
      • Infor IDM integration

        InterFormNG2 IDM Integration Module The IDM integration module provides InterFormNG2 users with an option to upload documents to IDM as part of an InterFormNG2 workflow. It also allows you to read documents from IDM via a custom URL. Below is a more ...
      • Call external HTTP(s) rest apis

        Calling external HTTP(s) rest api's In InterFormNG2 it is possible to call (most) external HTTP REST APIs / Webservices and form submits using workflow components. The calls are based on RFC2616 Hypertext Transfer Protocol HTTP/1.1 ...
      • Sharepoint integration module

        With the Sharepoint integration module you can create/updates a document in SharePoint online from the current workflow payload. Note that the size of the document to upload must be less than 4 MByte. Office 365 Configuration In order to use the ...
      • Release log

        This is the list of the InterFormNG2 releases and the major new features in each release: Version 3.5.1 Version 3.5.0 Important: InterFormNG2 now runs on Java 17. So you need to install Java 17 on Linux and the IBM i platform, if you want to ...