Show TOC

Background documentationBinding SAP ME Data to XDP Templates

 

While designing your XDP template in Adobe LiveCycle Designer, you can bind SAP ME production data to specific fields in the document using Data Binding values. To bind SAP ME data, you add a field to the template as described in Adobe LiveCycle Designer help and enter a Data Binding value for the field object. When the document is printed, SAP ME data is dynamically inserted where the Data Binding values has been configured.

Data Binding values correspond to the elements in an XML stream that is used internally by SAP ME when a document is created and sent to the printer. You can use any XML data binding expressions supported by Adobe LiveCycle Designer to configure your Data Binding values.

For example, you want to design a template to print an SFC value in a certain field in the document and the SAP ME data has the following XML structure:

Syntax Syntax

  1. <sfcPrintingData>
      <sfcRef>SFCBO:SITE,SFC</sfcRef>
      <sfc>SFC</sfc>
      <itemRef>ItemBO:SITE,ITEM,REVISION</itemRef>
      <shopOrderRef>ShopOrderBO:SITE,SHOP_ORDER</shopOrderRef>
      <lccRef>LaborChargeCodeBO:SITE,LCC</lccRef>
      <processLotRef>ProcessLotBO:SITE,PL</processLotRef>
    </sfcPrintingData>
    
End of the code.

You can create the SFC field in your template and enter a Data Binding value to associate it with the corresponding <sfc> element in your XML structure. Since the <sfc> element is a child element of <sfcPrintingData> in the XML structure, you can enter the following Data Binding value:

$.sfcPrintingData.sfc

You can also use the Adobe LiveCycle Designer Data Connection to import a sample XML file containing SAP ME data. The Data Connection uses the sample XML file to generate Data Binding values that you can drag and drop onto your template.

For more information about creating a sample XML file for SAP ME, see the Creating a Sample SAP ME XML File section.

For more information about Data Connections, see Adobe LiveCycle Designer help.

XML Schema of the SAP ME Data

The XML representation of SAP ME data used during printing includes elements corresponding to the document note, information about the document itself, and data specific to the selected Print By method.

Note Note

Some SAP ME print content XML elements are optional based on the configuration settings on the Document Options tab page in Document Maintenance (see Document Maintenance).

End of the note.

Syntax Syntax

  1. <xsd:complexType name="PrintContent">
     <xsd:sequence>
       <xsd:element minOccurs="1" maxOccurs="1" name="documentNote" type="xsd:string"/>
       <xsd:element minOccurs="1" maxOccurs="1"  name="documentPrintingData" type="tns:DocumentPrintingData"/>
       <xsd:choice minOccurs="1" maxOccurs="1">
         <xsd:element minOccurs="1" maxOccurs="1" name="sfcPrintingData" type="tns:SfcConfiguration"/>
         <xsd:element minOccurs="1" maxOccurs="1" name="shopOrderPrintingData" type="tns:ShopOrderConfiguration"/>
         <xsd:element minOccurs="1" maxOccurs="1" name="inventoryPrintingData" type="tns:Inventory"/>
         <xsd:element minOccurs="1" maxOccurs="1" name="processLotPrintingData" type="tns:ProcessLotConfiguration"/>
         <xsd:element minOccurs="1" maxOccurs="1" name="containerPrintingData" type="tns:ContainerPrintInformationResponse"/>
       </xsd:choice>
     </xsd:sequence>
    </xsd:complexType>
End of the code.

For more information, see the Javadoc Reference section.

Document Note

This XML element contains the document note entered in Document (Re)print (see Document (Re)print).

The root XML element for the document note is <documentNote>.

Syntax Syntax

  1. <documentNote>Reprinting document due to printer jam</documentNote>
End of the code.
Document Printing Data

This XML element contains information about the document itself as it is configured in SAP ME.

The root XML element for document printing data is <documentPrintingData>.

Syntax Syntax

  1. <documentPrintingData>
      <ref>DocumentBO:T_DOC,NEW_4_SFC_TRAVELER_DOC,A</ref>
      <document>NEW_4_SFC_TRAVELER_DOC</document>
      <revision>A</revision>
      <template>pdf_sfc_traveler.xdp</template>
      <documentTypeRef>DocumentTypeBO:T_DOC,DOCUMENT</documentTypeRef>
      <formatterClass>com.sap.me.document$PrintingFormatAdsService</formatterClass>
      <printMethod>ALL</printMethod>
      <description>Base SFC Traveler Document</description>
      <transportUserArg>SHOP_ORDER;SFC</transportUserArg>
      <printQty>1</printQty>
      <formatUserArg>PRINT_FORMAT=PCL</formatUserArg>
      <writeErrorLog>true</writeErrorLog>
      <dataAcquisitionClass>com.sap.me.document$PrintingDataAcquisitionService</dataAcquisitionClass>
      <transportClass>com.sap.me.document$PrintingTransportAdsService</transportClass>
      <statusRef>Enabled</statusRef>
      <printBy>S</printBy>
      <site>T_DOC</site>
      <printDate>2012-09-04T15:29:20.170-04:00</printDate>
      <printUser>SITE_ADMIN</printUser>
    </documentPrintingData>
    
End of the code.

The <documentPrintingData> element also contains the following optional XML elements:

  • <customData>

  • <documentLinkList>

  • <documentOptionValueList>

Print by SFC

This XML element appears if Print by SFC is configured in Document Maintenance.

The root XML element for print by SFC is <sfcPrintingData>.

Syntax Syntax

Example
  1. <sfcPrintingData>
      <sfcRef>SFCBO:SITE,SFC</sfcRef>
      <sfc>SFC</sfc>
      <itemRef>ItemBO:SITE,ITEM,REVISION</itemRef>
      <shopOrderRef>ShopOrderBO:SITE,SHOP_ORDER</shopOrderRef>
      <lccRef>LaborChargeCodeBO:SITE,LCC</lccRef>
      <processLotRef>ProcessLotBO:SITE,PL</processLotRef>
      </sfcPrintingData>
End of the code.

The <sfcPrintingData> element contains the following optional XML elements:

  • <itemPrintingData>

  • <routerPrintingData>

  • <shopOrderPrintingData>

  • <parametricPrintingData>

  • <laborChargeCodePrintingData>

  • <processLotPrintingData>

  • <ncDataPrintingData>

  • <sfcDataPrintingData>

Print by Shop Order

This XML element appears if Print by Shop Order is configured in Document Maintenance.

The root XML element for print by shop order is <shopOrderPrintingData>.

Syntax Syntax

Example
  1. <shopOrderPrintingData>
      <shopOrderRef>ShopOrderBO:SITE,SHOP_ORDER</shopOrderRef>
      <shopOrder>SHOP_ORDER</shopOrder>
      <customer>CUSTOMER</customer>
      <itemRef>ItemBO:SITE,ITEM,REVISION</itemRef>
      <routerRef>RouterBO:SITE,ROUTER,U,REVISION</routerRef>
      <shopOrderSfcList>
       <sfcRef>SFCBO:SITE,SFC</sfcRef>
      </shopOrderSfcList>
      <collectParentSerial>false</collectParentSerial>
      <serialChangeRequired>false</serialChangeRequired>
    </shopOrderPrintingData>
End of the code.

The <shopOrderPrintingData> element contains the following optional XML elements:

  • <itemPrintingData>

  • <routerPrintingData>

Print by Inventory

This XML element appears if Print by Inventory is configured in Document Maintenance.

The root XML element for print by inventory is <inventoryPrintingData>.

Syntax Syntax

Example
  1. <inventoryPrintingData>
      <ref>InventoryBO:SITE,INVENTORY-ID</ref>
      <sfcRef>SFCBO:SITE,SFC</sfcRef>
      <inventoryId>INVENTORY-ID</inventoryId>
      <itemRef>ItemBO:SITE,ITEM,REVISION</itemRef>
      <workCenterLocRef>WorkCenterBO:SITE,WORK_CENTER</workCenterLocRef>
      <workCenterLocRes>false</workCenterLocRes>
      <operationLocRef>OperationBO:SITE,OPERATION,REVISION</operationLocRef>
      <operationLocRes>false</operationLocRes>
      <resourceLocRef>ResourceBO:SITE,RESOURCE</resourceLocRef>
      <resourceLocRes>false</resourceLocRes>
      <shopOrderLocRef>ShopOrderBO:SITE,SHOP_ORDER</shopOrderLocRef>
      <shopOrderLocRes>false</shopOrderLocRes>
      <hasBeenUsed>false</hasBeenUsed>
      <isShopOrderSetByERP>false</isShopOrderSetByERP>
      <workCenterLocPrintingData>
       <ref>WorkCenterBO:SITE,WORK_CENTER</ref>
       <workCenter>WORK_CENTER</workCenter>
      </workCenterLocPrintingData>
      <operationLocPrintingData>
      <ref>OperationBO:SITE,OPERATION,REVISION</ref>
       <operation>OPERATION</operation>
       <revision>REVISION</revision>
      </operationLocPrintingData>
      <resourceLocPrintingData>
       <resource>RESOURCE</resource>
       <ref>ResourceBO:SITE,RESOURCE</ref>
     </resourceLocPrintingData>
    </inventoryPrintingData>
End of the code.

The <inventoryPrintingData> element contains the following optional XML elements:

  • <sfcPrintingData>

  • <itemPrintingData>

  • <workCenterLocPritingData>

  • <shopOrderLocPrintingData>

  • <operationLocPrintingData>

  • <resourceLocPrintingData>

Print by Process Lot

This XML element appears if Print by Process Lot is configured in Document Maintenance.

The root XML element for print by process lot is <processLotPrintingData>.

Syntax Syntax

Example
  1. <processLotPrintingData>
     <ref>ProcessLotBO:SITE,PL</ref>
     <processLot>PL</processLot>
     <processLotMemberList>
      <memberContext>SFCBO:SITE,SFC</memberContext>
      </processLotMemberList>
    </processLotPrintingData>
End of the code.

The <processLotPrintingData> element contains the following optional XML elements:

<sfcPrintingDataList>

Print by Container

This XML element appears if Print by Container is configured in Document Maintenance.

The root XML element for print by process lot is <containerPrintingData>.

Syntax Syntax

Example
  1. <containerPrintingData>
     <allowPrint>false</allowPrint>
     <containerNumber>CONTAINER_NUMBER</containerNumber>
      <assemblyMetricsPrintingData>
        <maxQty>862</maxQty>
        <minQty>402</minQty>
        <packedQty>836</packedQty>
        <packingLevel>PACKING_LEVEL</packingLevel>
        <packingValue>PACKING_VALUE</packingValue>
        <packingValueRevision>PACKING_VALUE_REVISION</packingValueRevision>
        <shopOrder>SHOP_ORDER</shopOrder>
      </assemblyMetricsPrintingData>
    </containerPrintingData>
End of the code.

The <containerPrintingData> element contains the following optional XML elements:

<assemblyMetricsPrintingData>

Javadoc Reference

Each printing XML element corresponds to a Java class in SAP ME and you can determine the detailed structure of the element using SAP ME Javadoc.

For more information, see SAP ME Javadoc at Start of the navigation path http://service.sap.com/instguidesInformation published on non-SAP site Next navigation step SAP Business Suite Applications Next navigation step SAP Manufacturing Next navigation step SAP Manufacturing Execution 6.1 End of the navigation path.

The following table lists the SAP ME classes associated with XML elements:

XML Element

SAP ME Class

<bomComponentPrintingData>

com.sap.me.productdefinition.ItemConfiguration

<bomPrintingData>

com.sap.me.productdefinition.BOMConfiguration

<componentPrintingData>

com.sap.me.productdefinition.ItemConfiguration

<componentPrintingDataList>

com.sap.me.production.AssembledComponent

<containerPrintingData>

com.sap.me.container.ContainerPrintInformationResponse

<documentPrintingData>

com.sap.me.document.DocumentConfiguration

<inventoryPrintingData>

com.sap.me.inventory.Inventory

<itemPrintingData>

com.sap.me.productdefinition.ItemConfiguration

<laborChargeCodePrintingData>

com.sap.me.labor.LaborChargeCodeConfiguration

<ncCodePrintingData>

com.sap.me.nonconformance.ReadNCResponse

<ncDataPrintingData>

com.sap.me.nonconformance.FindNCsBySFCResponse

<ncDataRecordPrintingDataList>

com.sap.me.nonconformance.ReadNCResponse

<operationLocPrintingData>

com.sap.me.productdefinition.OperationConfiguration

<operationPrintingData>

com.sap.me.productdefinition.OperationConfiguration

<parametricPrintingData>

com.sap.me.datacollection.ParametricsDataResponse

<processLotPrintingData>

com.sap.me.production.ProcessLotConfiguration

<resourceLocPrintingData>

com.sap.me.plant.ResourceConfiguration

<resourcePrintingData>

com.sap.me.productdefinition.ResourceConfiguration

<routerPrintingData>

com.sap.me.productdefinition.RouterConfiguration

<routerStepPrintingDataList>

com.sap.me.productdefinition.RouterStep

<sfcDataPrintingData>

com.sap.me.production.FindSfcDataBySfcResponse

<sfcPrintingData>

com.sap.me.production.SfcConfiguration

<shopOrderPrintingData>

com.sap.me.demand.ShopOrderConfiguration

<workCenterLocPritingData>

com.sap.me.plant.WorkCenterConfiguration

<workInstructionPrintingDataList>

com.sap.me.productdefinition.WorkInstructionFullConfiguration

Procedure

Prerequisites

You have set up ADS printing (see Setting Up ADS Printing).

Creating a Sample SAP ME XML File
  1. Log on to SAP Manufacturing Execution Administration Utilities using the following URL: http://<host>:<port>/manufacturing-admin.

  2. Choose Logging Configuration, select the Debugging Information checkbox, and choose Set.

  3. Print a document using Document (Re)print in SAP ME (see Document (Re)print).

As a result, the system saves the mePrintContent.xml file to the usr\sap\SID\JXX\j2ee\cluster\server<X> folder, where <X> is the number of the server process in SAP NetWeaver instance that has processed the printing request.