SAP PI/PO : – POSDM INTEGRATION WITH ARTS POSLog POS SYSTEM – TUTORIAL 1
In this demo I would like to show how to integrate an Inbound ARTS POSLog Sales with POSDM BAPI through SAP PI/PO.
In any IS Retail implementation , Sales from Point Of Sales(POS) system needs to be integrated with SAP ERP. Process flow is as below:
POS(Sales) -> SAP PI/PO -> POSDM(SAP BW) -> SAP ECC.
Note: They are various POS system by different vendors such as GK POS, TRAVIS POS ,ARTS POSLog etc..which follow different specifications:This tutorial explains integration of ARTS POSLog Sales with POSDM through SAP PI/PO.
Information About POSDM :
Please refer to below links about the advantages and process involved with POSDM:
Information About ARTS POSLog :
POSLog (the data container) is an industry open standard retail schema developed by ARTS, a subgroup of the National Retailer Federation. POSLog is a standard that works internationally and reveals the similarities between POS practices from country to country. The POSLog can be used as an asynchronous data transmission container or synchronous request/reply type data exchanges where both directions are POSLog.
The above was an overview of POSDM and ARTS POSLog.Now tets start with the development from SAP PI/PO perspective.
This development involves reading of POSLog as a string in Java Map and converting it to target structure.
Different approaches can be employed to convert ARTS POSLog to POSDM Structure:
1) First approach was to build an entire xsd structure of ARTS POSLog format using tools such as XML Altova Spy and then do the graphical map.However this is considerable effort and requires lot of time.
2) Second approach was to read the ARTS POSLog as a string in XSLT or Java Mapping.As I was comfortable in Java Mapping, I have proceeded ahead with Java map.
Still its upto one individual whether they want use XSLT or Java map or build XSD and then use graphical map.
1) Idea on Java mapping
2) NWDS studio.
3) SAP PI/PO Java Mapping Jar file(RMcom.sap.xpi.ib.mapping.lib.zip)
4) Functional Mapping Specs explaining which field of ARTS POSLog needs to be mapped to POSDM Structure.
Step1 : Import the RFC “/POSDW/BAPI_POSTR_CREATE” from BW system.
Step2 : Create a Source Data Type.
Step3 : Create a Message Type:
Step 4: Create outbound service interface
Step5 : Create inbound Service Interface.
Step6 : Create Operation Mapping as shown below :
In the operation map 3 steps are involved:
- 1) First map is an xslt map to remove namespace.This is used as the input ARTS POSLog has the vendor namespaces embedded in it. If you see the below screen shot POSLog has namespaces and these must be removed before converting to target BAPI.If the input payload does not have namespaces then this step is not necessary.
Below is the xslt map “RemoveNamespaces.xsl”
<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform“>
<xsl:output method=”xml” indent=”no”/>
2) Second mapping is the java map which converts ARTS POSLog to BAPI.
Attached Java map file contains the code.
In this particular scenario I have all handled all the ARTS POSLog operations in one java map.The advantage is it takes less time to write,however is very tough to support and maintain.
In my next scenario i.e., ARTS POSLog to POSDM IDOC I will show how to split handling of POSLog operations in multiple java maps.The advantage is that it is easy to support and maintain however takes time and is more complex.
Upto the individual to take the call which approach one can follow.
1) Third map is a graphical map in which /POSDW/BAPI_POSTR_CREATE fields are one to one map except for one field called “FINANCIAL TYPE CODE”. Fix value standard function is used.
With ESR development done lets proceed to ID development:
Step 7: Create File Sender Channel as below:
Step 8 : Create Sender agreement .
Step 9 : Create Receiver Determination.
Step 10 : Create Interface Determination.
Step 11: Create Receiver Agreement.
Step 12 : Create Receiver Communication Channel.
Test the scenario :
Place the POSLog file in the source system.
The data transfer of transactional data from the POS system to the SAP BW system can be monitored with the monitoring functionality in the POS Data Management workbench (transaction: /N/POSDM/Mon0).
In my next demo I will show how to integrate an Inbound ARTS POSLog Sales with POSDM IDOC through SAP PI/PO i.e TUTORIAL 2.