Skip to content

Communication Scenario 466:
Printing – Pull Integration


Literature - SAP documentation

Refer to SAP_COM_0466 for further information.


Configure Access to SAP oData Print API

Access to SAP oData Print API is provided by seal-cpm-checkin service and configured with the following service keys:

  • SAP_AIR_KEY: The secret key used to access the SAP Application Interfaces. The key is provided by SAP.

  • SECRET: The secret used to encrypt the passwords.

  • SECRET_FILE: File containing the secret used to encrypt the passwords.

  • SAP_SYSTEMS: A JSON or YAML representation of the SAP systems to access, refer to SAP_SYSTEMS below.

Additionally, SAP printer parameters have to be configured in the Output Engine printer configuration.


SAP_SYSTEMS

The SAP_SYSTEMS key is a JSON or YAML representation of the SAP systems that are accessed. The key is a list of objects, where each object represents a SAP system. The following keys are used for each object:

Mandatory keys:

  • systemId: Three-letter name of the SAP system, e.g. H22, used for logging purposes and future implementation of scenario SAP_COM_0467: Printing - Notification Integration.

  • user: SAP technical user name.

  • password: SAP technical user password. Either encrypted using SECRET or SECRET_FILE or clear text. On how to encrypt passwords, refer to Secure the SAP Logon Data.

  • authClientId: oAuth client id, only mandatory for oAuth 2.0 authentication, not used for basic or csrf authentication.

  • authClientSecret: oAuth client secret, only mandatory for oAuth 2.0 authentication, not used for basic or csrf authentication.

Optional keys:

  • systemName: Description of the SAP system, replaces systemId for logging if given.

  • client: Client Id used for the SAP system.

  • loginMethod: Method to use for login, possible values are basic, csrf, oauth, default csrf.

  • scenario: The communication scenario to use, possible values are 466, 467, both, default both. The both scenario distinguishes the queues by the OMSType (466, or 467) given by the SAP system.

  • srvHostPort: Host and port of SAP service in URL format, default is https://localhost:50001.

  • srvPath: Path to SAP oData Print API service, default is /sap/opu/odata/sap/API_CLOUD_PRINT_PULL_SRV.

  • icmInterval: Interval for polling SAP ICM cache, default is 5s.

  • maxItems: Maximum number of items to fetch from SAP when itemTransfer is set to multi, default is 150.

  • waitAfterFetchError: Time to wait after fetch error, default is 5s.

  • authIssuerUrl: URL to OAuth service, default is ${srvHostPort}/oauth/token.

  • itemTransfer: Method for transfering document items, possible values single and multi. Default is multi.

  • notifyTransfer: Method for transfering document status notifications, possible values single and multi. Default is value from itemTransfer.

  • saveJSON : If true save original JSON document object from SAP as temporary file in the database for debugging purposes. Default is false.

  • mappings: List of mappings for SAP printer names to OMS printer names. Every entry consists of an object with two properties:

    • sap: Name of the queue in SAP. The key is mandatory if mappings is present.

    • pls: Printer name in PLOSSYS Output Engine. The key is mandatory if mappings is present.


Examples

Example - typical configuration using HTTPS and systemId

SAP_SYSTEMS: |
  - systemId: "H22"
    user: "technicalUser"
    password: "encryptedPassword"
    srvHostPort: "https://123.124.125.126:44300"

Connects to https://123.124.125.126:44300, using csrf as login method and the default path to the SAP Cloud Print service. Retrieving print jobs for all printers assigned to user technicalUser.

Example - typical configuration using HTTP and systemName

SAP_SYSTEMS: |
  - systemName: "My SAP System"
    client: "001"
    user: "technicalUser"
    password: "encryptedPassword"
    srvHostPort: "http://10.100.53.130:50000"

Connects to http://10.100.53.130:50000, using csrf as login method and the default path to the SAP Cloud Print service. Retrieving print jobs for all printers assigned to user technicalUser.

Example - full YAML configuration

SAP_SYSTEMS: |
  - systemName: "My SAP System"
    client: "001"
    loginMethod: "oauth"
    user: "username"
    password: "encryptedPassword"
    authClientId: "cpm-checkin"
    authClientSecret: "f042973a-b56c-4ded-8414-7988b8e7bff0"
    authIssuerUrl: "https://myidentityprovider:443/oauth/token"
    srvHostPort: "http://10.100.53.130:50000"
    srvPath: "/sap/opu/odata/sap/API_CLOUD_PRINT_PULL_SRV"
    icmInterval: 5s
    maxItems: 150
    waitAfterFetchError: 10s
    itemTransfer: multi
    notifyTransfer: multi
    saveJSON: true
    mappings:
      - sap: TEST1
        pls: printer4

Example - full JSON configuration

SAP_SYSTEMS: |
  [
    {
      "systemName": "My SAP System",
      "client": "001",
      "loginMethod": "oauth",
      "user": "username",
      "password": "encryptedPassword",
      "authClientId": "cpm-checkin",
      "authClientSecret": "f042973a-b56c-4ded-8414-7988b8e7bff0",
      "authIssuerUrl": "https://myidentityprovider:443/oauth/token",
      "srvHostPort": "http://10.100.53.130:50000",
      "srvPath": "/sap/opu/odata/sap/API_CLOUD_PRINT_PULL_SRV",
      "icmInterval": "5s",
      "maxItems": 150,
      "waitAfterFetchError": "10s",
      "itemTransfer": `multi`,
      "notifyTransfer": `multi`,
      "saveJSON": true,
      "mappings": {
        "sap": "TEST1",
        "pls": "printer4"
      }
    }
  ]

Printer Configuration

The SAP printer parameters are derived from the Output Engine printer configuration.

  • job overrides are used to disable a parameter or set a single available value. Valid parameter keys for overrides are PRINT_QUALITY, COLOR_MODEL and DUPLEX.

    Example - job override disabling duplex

    job:
      override:
        DUPLEX: false
    

    Example - job override set duplex to LONG_SIDE

    job:
      override:
        DUPLEX: LONG_SIDE
    
  • job defaults are used to set a default value from a fix list of possible values. Valid parameter keys for setting defaults are PRINT_QUALITY, COLOR_MODEL and DUPLEX.

    Example - job default COLOR

    job:
      default:
        COLOR_MODEL: COLOR
    
  • finisher enables one or more finishing options for print jobs. Available options are STAPLE, PUNCH, FOLD and SORT.

    Example - enabling finishing for STAPLE

    finisher: ["STAPLE"]
    
  • ppd enables selecting media sizes for the print jobs. The media sizes are read from the spezified PPD file.

    Example - PPD file

    ppd: "small-a4-a3.ppd"
    

    The example results in selectable media sizes from ISO_A6 to ISO_A3 in the print job.


Back to top