XFP Format Reference for SAP BC-XOM Integrations
From the perspective of SAP ERP, Loftware Enterprise SP acts as an Output Management System (OMS). SAP ERP sends the data for a request in Raw Data Interface (RDI), XML for Smart Forms (XSF), XML for Interactive Forms by Adobe (XFP), or other XML. You can configure the data with values for Loftware Enterprise SP-specific names to override default values.
If the SAP Output Device is configured as Device Type XFP, the OMS Submit command invokes the CLI to pass the XFP data to an SAP BC-XOM integration in Loftware Enterprise SP.
There are two formats for XML for SAP Interactive Forms by Adobe (XFP):
- XFP with context: Mixes some of the structure of the PDF-based form with the data from an application.
- XFP without context: Contains just the data with none of the form structure and can be used for performance enhancement.
Custom Stylesheet
A custom stylesheet can be configured for incoming XFP requests. If a stylesheet is not specified and the incoming request is XFP, the Loftware Enterprise SP built-in stylesheet is used. If you are creating a custom stylesheet, it is recommended that you use the Loftware Enterprise SP XFP stylesheet template as a starting point. To view the XFP stylesheet template, enter the following in the address field of your browser, where spectrum-server
is the name of the server hosting Loftware Enterprise SP for your organization:http://spectrum-server:8080/downloads/sap-xfp.xsl.template
To implement the options configured in the General, SAP, and Advanced panels in a custom stylesheet for XSF, XML, or XFP, include the following parameters.
<!--
PrinterName is passed in by the parser, and comes from the Loftware SAP CLI.
If there is no printer specified in the data header or an override field,
this value is used.
Other parameters are integration options.
-->
<xsl:param name="PrinterName" select="''"/>
<xsl:param name="SpoolId" select="''"/>
<!-- ExtendedFieldNames will contain the separation character for true,
and empty string or 'false' for false. Default is '/'.
'/' or '_' = true, '' or 'false' = false
-->
<xsl:param name="ExtendedFieldNames" select="'/'"/>
<xsl:param name="IncludeAuditData" select="'true'"/>

general/FORM
is used for document ID unless an override field is present for this form.general/DEST
is used for the Loftware Enterprise SP output device unless an override field is present for this form.general/COPIES
is used for the Loftware Enterprise SP quantity value unless an override field is present for this form.
Example XFP with Context
<header>
<general>
<XFPVERSION>1.0</XFPVERSION>
<XFPTYPE/>
<SAPSID>IDS</SAPSID>
<FORM>Z_SHIPPING_FORM_01</FORM>
<FORMTYPE/>
<IFTYPE/>
<LANGU>de</LANGU>
<COUNTRY>DE</COUNTRY>
<INTERACTIVE/>
<DYNAMIC/>
<DEVICE>PRINTER</DEVICE>
</general>
</header>

You can use the following field names to override values in XFP headers. Loftware Enterprise SP fields are expected to occur as text
elements with the appropriate corresponding name
attribute value. Before you can do so, you must configure these names in SAP ERP and incorporate them into an ABAP program or SAPscript.
Field Name | Value |
---|---|
LW_PRINTERNAME |
Device name (Alias) of the selected device. |
LW_JOBNAME |
The name for a specific job in Loftware Enterprise SP. |
LW_TRAY |
|
LW_QUANTITY |
|
LW_DUPLICATES |
Important! For XSF, XFP, and XML, the XML (LPS) processor subtracts 1 from the LW_DUPLICATES value. For RDI, the LW_DUPLICATES value is used as is. |
LW_LABEL |
The label template to use with a job. |
LW_PAGES |
|
LW_INLINE_DOCUMENT |
Required for printing external files. Print an external file, such as a PDF, without associating the file with label template. |
LW_INLINE_TYPE |
Required for printing external files. The list of supported external file types. For example, INLINE_PDF. |
LW_LABEL_RANGES |
A set of comma delimited label ranges to reprint in a multi-label or quantity reprint. When printing external files, this is the range of pages to print. An asterisk is a wildcard value that resolves to the last label printed. |
LW_PAGE_HANDLING |
The page handling for imaged files. Maintains aspect ratios. ACTUAL_SIZE: Do not increase or decrease the image size on the page. Default value. FIT: Increase or decrease the image size as appropriate to fit the page. INCREASE: Increase the image size of undersized images only to fit the page. DECREASE: Decrease the image size of oversized images only to fit the page. CUSTOM: Increase or decrease the image size as specified in !PAGE_CUSTOM!. |
LW_PAGE_CUSTOM |
Required if !PAGE_HANDLING! is CUSTOM. For imaged files, the percentage as an integer value to increase or decrease the image size on the page. A value greater than 100 will increase the image size, and a value less than 100 will decrease the image size on the page. Can be used when printing external files. Default: 100. |
LW_FORCE_IMAGE |
When printing external files, whether to force the file to print as an imaged file. TRUE: An external file is imaged regardless if the target device is configured and supports the !INLINE_TYPE! natively. FALSE: Default value. |
LW_TARGET_MEDIA_HEIGHT |
Required if !PAGE_HANDLING! is not CUSTOM. For imaged files, the height of the target media size in thousandths of an inch (mils), unless specified otherwise in !TARGET_MEDIA_UNITS!. |
LW_TARGET_MEDIA_WIDTH |
For imaged files, the width of the target media size in thousandths of an inch (mils), unless specified otherwise in !TARGET_MEDIA_UNITS!. |
LW_TARGET_MEDIA_UNITS |
The target unit of measurement. Can be used when printing external files. INCHES: Thousandths of an inch (mils). Default value. CM: Centimeter. MM: Millimeter. |

The XML element names from the XFP data element hierarchy are used for extended field names, with suffixes added for repeating elements (such as table data).