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.

 

Capture0.JPG

 

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:

a) https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=113246846

 

b) https://wiki.scn.sap.com/wiki/pages/viewpage.action?title=Implementation+Guide+POS&spaceKey=CK

 

 

     

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.

 

Pre-Requisites:

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.

 

Capture.JPG

 

Step2 : Create a Source Data Type.

 

Capture1.JPG

 

Step3 : Create a Message Type:

 

Capture2.JPG

 

Step 4: Create  outbound service interface

Capture3.JPG

 

Step5 :  Create inbound  Service Interface.

 

Capture4.JPG

 

Step6 : Create Operation Mapping as shown below :

 

Capture5.JPG

 

In the operation map 3 steps are  involved:

  1. 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.

Capture6.JPG

 

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”/>

 

<xsl:template match=”/|comment()|processing-instruction()”>

    <xsl:copy>

      <xsl:apply-templates/>

    </xsl:copy>

</xsl:template>

 

<xsl:template match=”*”>

    <xsl:element name=”{local-name()}”>

      <xsl:apply-templates select=”@*|node()”/>

    </xsl:element>

</xsl:template>

 

<xsl:template match=”@*”>

    <xsl:attribute name=”{local-name()}”>

      <xsl:value-of select=”.”/>

    </xsl:attribute>

</xsl:template>

</xsl:stylesheet>

 

 

2) Second mapping is the java map which converts  ARTS POSLog to BAPI.

Attached Java map  file contains the code.

 

Capture7.JPG

 

Note:

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.

 

Capture7.1.JPG

 

 

 

With ESR  development done lets proceed to ID development:

 

Step 7: Create File Sender Channel as below:

Capture8.JPG

 

Step 8 : Create Sender agreement .

Capture9.JPG

 

Step 9 : Create Receiver Determination.

 

Capture10.JPG

 

Step 10 : Create Interface Determination.

Capture12.JPG

 

Step 11:  Create Receiver Agreement.

Capture13.JPG

 

Step 12 : Create  Receiver Communication Channel.

Capture15.JPG

 

Test the scenario :

 

Place the POSLog file in the source system.

Capture16.JPG

 

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.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply