Configure Access to SAP oData Print API¶
Introduction¶
As of version 7.1.0, PLOSSYS Output Engine supports access to the SAP oData Print API with the goal to substitute the SAP Cloud Print Manager with a full integration into Output Engine.
The print API is a way to retrieve print jobs from SAP systems and notifiy the SAP system about the status of the print jobs.
SAP print jobs with attachments are supported, too. In this case all documents within the print job are handled as a document stream to ensure they are printed without being interrupted and in correct order. Only one notification is sent after the last document in the document stream has been processed.
The print API is a RESTful API that is used to communicate with SAP by offering different communication scenarios. Currently the Output Engine supports scenario "SAP_COM_0466: Printing – Pull integration".
Access to the SAP print API is provided by the seal-cpm-checkin
service and configured with the following service keys:
-
SAP_AIR_KEY
: The secret key used to access the SAP Application Interfaces, see SAP_AIR_KEY. The key is provided by SAP. -
SECRET
: The secret used to encrypt the passwords, see SECRET. -
SECRET_FILE
: A file containing the secret used to encrypt the passwords, see SECRET_FILE. -
SAP_SYSTEMS
: A JSON or YAML representation of the SAP systems to access, see SAP_SYSTEMS below.
Additionally the 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 usingSECRET
orSECRET_FILE
or clear text. On how to encrypt passwords, refer to Secure the SAP Login Data. -
authClientId
: oAuth client id, only mandatory for oAuth 2.0 authentication, not used forbasic
orcsrf
authentication. -
authClientSecret
: oAuth client secret, only mandatory for oAuth 2.0 authentication, not used forbasic
orcsrf
authentication.
Optional keys¶
-
systemName
: Description of the SAP system, replacessystemId
for logging if given. -
loginMethod
: Method to use for login, possible values arebasic
,csrf
,oauth
, defaultcsrf
. -
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 is5s
. -
maxItems
: Maximum number of items to fetch from SAP whenitemTransfer
is set tomulti
, default is150
. -
waitAfterFetchError
: Time to wait after fetch error, default is5s
. -
authIssuerUrl
: URL to OAuth service, default is${srvHostPort}/oauth/token
. -
itemTransfer
: Method for transfering document items, possible valuessingle
andmulti
. Default ismulti
. -
notifyTransfer
: Method for transfering document status notifications, possible valuessingle
andmulti
. Default is value fromitemTransfer
. -
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 ifmappings
is present. -
pls
: Printer name in PLOSSYS Output Engine. The key is mandatory ifmappings
is present.
-
Typical configuration¶
SAP_SYSTEMS: |
- systemName: "My SAP System"
client: "001"
user: "theUser"
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 theUser
.
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
mappings:
- sap: TEST1
pls: printer4
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`,
"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 arePRINT_QUALITY
,COLOR_MODEL
andDUPLEX
.
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 arePRINT_QUALITY
,COLOR_MODEL
andDUPLEX
.
Example - job default COLOR
job:
default:
COLOR_MODEL: COLOR
finisher
enables one or more finishing options for print jobs. Available options areSTAPLE
,PUNCH
,FOLD
andSORT
.
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 above example results in selectable media sizes from ISO_A6
to ISO_A3
in the print job.