Sap Technology


Using open standards to provide people-centric access to SAP business information

posted May 27, 2011, 12:02 AM by Sap Team   [ updated May 27, 2011, 12:11 AM ]

A Brieft of Sap Net Weaver gateway by Christ Wealey.

The SAP NetWeaver Gateway is a set of ABAP add-ons to your existing SAP ERP system that provides easy access to your business information in a simple, people-centric manner and lowers the data consumption barrier to the point that no prior knowledge of an SAP system's internal workings is required.

It seems that whichever way you turn now, there’s some new computing device on the market demanding your undivided attention because it’s lighter, faster and generally cooler than any of its rivals or predecessors. However, no matter what features the latest and greatest gadgets have, they all have one thing in common—an insatiable hunger for data!

 

Meeting this seemingly never-ending demand for business data can turn into a major headache for application developers if the API into each business system requires the use of proprietary protocols.

What would make life much simpler is an easy–to–use, well defined API that gives access to the rich wealth of business data and functionality in your SAP systems.

SAP NetWeaver Gateway provides an API that is designed to function in just such a manner; and it does so using Microsoft’s open and license free standard called OData.

Accessing SAP Business Data using Open Source tools

Consumption of data through the SAP NetWeaver Gateway interface requires nothing more than the ability to make an HTTP request (something any browser can do); in other words, it does not require the use of any SAP proprietary software or protocols.

Although it is perfectly legitimate to do so, the consumption of data through the SAP NetWeaver Gateway interface does not impose any requirement on the developer to be able to write software in ABAP, or even to have any understanding of the internal workings of an SAP system.

Using nothing more than commonly available development tools such as Microsoft’s .Net or Apple’s XCode, or Open Source languages such as Ruby or PHP, you can easily create user interfaces for SAP business data and functionality by consuming the OData messages coming out of SAP NetWeaver Gateway.

In order to make the OData consumption process even easier, SAP deliver a Gateway Consumption Tool. This tool currently supports either Visual Studio 2010 or XCode and can be used to generate either an OData proxy object, or a basic application that wraps the generated proxy object.

 

SAP Business Data Is Now Self-Describing

As can be seen from the diagram on the right, Microsoft’s OData protocol is based on the Atom Publishing Protocol which in turn, is based on the Atom Syndication Format. SAP has used the standard extensibility features found in OData to provide its own annotations.

The combination of OData’s data format and the SAP Annotations make SAP business information both self-describing and human readable.

These two factors alone lower the barrier for consuming SAP business data and functionality to the point that no specialist knowledge of an SAP system is required before such data can be incorporated into a useful business application running on some external device.

Taking REST in SAP NetWeaver Gateway

The SAP NetWeaver Gateway interface has been designed to conform completely to the six architectural constraints that define a RESTful software system. This makes the business data content of your SAP systems accessible as RESTful resources through a uniform, stateless interface to any software system that can communicate using HTTP and the OData protocol.

So is SAP NetWeaver Gateway Just For Mobile Devices?

It is easy to think of an “external device” as being simply some type of hand-held, mobile device; but while that idea is perfectly valid and may well be of great significance to you, it’s only one of several possibilities.

The whole focus of the SAP NetWeaver Gateway interface is the REST enablement of SAP business data and functionality, thereby making it easy for non-SAP applications to consume. These could be:

  • Any external business application. E.G. Microsoft Office applications via a .Net (or even VBA) interface
  • Desktop machines using Web-based applications running PHP or Java or Ruby or... <fill in the blank yourself>
  • Mobile devices using native applications E.G. the iPad/iPhone or Android or Blackberry.
  • Embedded devices such as manufacturing robots or route planning software in Satellite Navigation systems.
  • Any other business scenario you can think of involving some programmable device that can speak HTTP...

Supply Your SAP Business Data to Any Device (that can Speak HTTP)

The SAP NetWeaver Gateway interface can be used by any programmable device that can speak HTTP. In providing this capability, it hides the complexities that exists within your system landscape by making use of:

Protocol Adaptation
OData becomes the only communication protocol needed for you to supply or consume SAP Business Data to or from your SAP systems.
Service Adaptation
Different types and versions of SAP systems now appear as a single, integrated repository of business information.

Does SAP NetWeaver Gateway Replace any Existing SAP Software?

In a word — No. SAP NetWeaver Gateway is not designed to be a channel for the type of transactional applications used by Power Users, neither is it designed to replace existing middleware like SAP NetWeaver PI. In addition to this, SAP NetWeaver Gateway applications are not designed to target A2A or B2B scenarios.

Instead, SAP NetWeaver Gateway is the door through which the mass consumption of SAP business data and functionality is made possible. The target audience for SAP NetWeaver Gateway applications is a group known as Occasional Platform Users (OPU). These are people who need ad hoc access to SAP data and functionality in an easy-to-consume manner.

Calling ALL Developers (Not Just ABAP Developers)

As part of the SAP NetWeaver Gateway software, you get various Service Provisioning tools. These tools will generate the necessary source code to jump-start the development of your external business applications. These tools can be used in conjunction with widely used Integrated Development Environments (IDEs) such Eclipse, Visual Studio 2010 and XCode.

And on the ABAP Side of Things...

Not wanting to leave out all the die-hard ABAPers out there, the SAP NetWeaver Gateway Add-On provides you with the OData Channel. This is a set of ABAP classes and interfaces that can be used to develop your own Gateway Model Objects within your backend SAP system. These are then registered with your SAP NetWeaver Gateway system in order to make them accessible to the outside world as RESTful services.

 

What Impact will the Gateway Software have on my System?

The exact configuration of your SAP NetWeaver Gateway installation will vary depending on your particular use case, but in general, there are two ways in which it can be installed. Either as:

  • An Add-On to your existing SAP system, or
  • A stand-alone Gateway instance

Either way, since the installation of SAP NetWeaver Gateway is provided through the ABAP Add-On process, it will not interfere with the functionality of your existing system.

Key Benefits

The SAP NetWeaver Gateway interface:

  • REST-enables your SAP system, thereby lowering the data consumption barrier to the point that no specialist knowledge of an SAP system is required before SAP business data can be consumed.
  • Will hide all the technical complexities of your SAP system landscape behind a single interface that is easy-to-use and non-proprietary.
  • Makes your SAP business data and functionality accessible to any external device or system that can speak HTTP and understand the OData protocol.
  • Provides Service Provisioning tools that allow the quick REST-enablement of existing ABAP functionality.
  • Provides plug-ins for well known IDEs such as Eclipse, Visual Studio 2010 and XCode.
  • Is installed as an ABAP Add-On; therefore, it will not interfere with your existing productive software.
 

Create internal table structure dynamically

posted Dec 26, 2010, 11:25 PM by Sen Long   [ updated Dec 26, 2010, 11:42 PM by Sap Team ]

ABAP code demonstrates how to create an internal table structure dynamically from within your SAP code. 

The program takes a table name as its input and then builds an internal table dynamically from this information, it then populates it with data and displays it using an ALV grid control.
REPORT  CREATE_DYNAMIC_ITAB.

type-pools : abap, slis.
field-symbols: <fs_table> type standard table,
               <fs_wa>,
               <fs_field>.
data: dyn_table    type ref to data,
      dyn_line     type ref to data,
      wa_fieldcat type lvc_s_fcat,
      it_fieldcat type lvc_t_fcat.

*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
      gd_tab_group type slis_t_sp_group_alv,
      gd_layout    TYPE slis_layout_alv,
      gd_repid     like sy-repid.

selection-screen begin of block block1 with frame.
parameters: p_table(30) type c default 'SFLIGHT'.
selection-screen end of block block1.

***********************************************************************
*start-of-selection.
start-of-selection.
  perform get_table_structure.
  perform create_itab_dynamically.
  perform get_data.
  perform display_data.

*&---------------------------------------------------------------------*
*&      Form  get_table_structure
*&---------------------------------------------------------------------*
*       Get structure of an SAP table
*----------------------------------------------------------------------*
form get_table_structure.
  data : it_tabdescr type abap_compdescr_tab,
         wa_tabdescr type abap_compdescr.
  data : ref_table_descr type ref to cl_abap_structdescr.

* Return structure of the table.
  ref_table_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).
  it_tabdescr[] = ref_table_descr->components[].
  loop at it_tabdescr into wa_tabdescr.
    clear wa_fieldcat.
    wa_fieldcat-fieldname = wa_tabdescr-name .
    wa_fieldcat-datatype  = wa_tabdescr-type_kind.
    wa_fieldcat-inttype   = wa_tabdescr-type_kind.
    wa_fieldcat-intlen    = wa_tabdescr-length.
    wa_fieldcat-decimals  = wa_tabdescr-decimals.
    append wa_fieldcat to it_fieldcat.
  endloop.
endform.                    "get_table_structure

*&---------------------------------------------------------------------*
*&      Form  create_itab_dynamically
*&---------------------------------------------------------------------*
*       Create internal table dynamically
*----------------------------------------------------------------------*
form create_itab_dynamically.
* Create dynamic internal table and assign to Field-Symbol
  call method cl_alv_table_create=>create_dynamic_table
    EXPORTING
      it_fieldcatalog = it_fieldcat
    IMPORTING
      ep_table        = dyn_table.
  assign dyn_table->* to <fs_table>.
* Create dynamic work area and assign to Field Symbol
  create data dyn_line like line of <fs_table>.
  assign dyn_line->* to <fs_wa>.
endform.                    "create_itab_dynamically

*&---------------------------------------------------------------------*
*&      Form  get_data
*&---------------------------------------------------------------------*
*       Populate dynamic itab
*----------------------------------------------------------------------*
form get_data.
* Select Data from table using field symbol which points to dynamic itab
  select * into CORRESPONDING FIELDS OF TABLE  <fs_table>
             from (p_table).
endform.                    "get_data

*&---------------------------------------------------------------------*
*&      Form  display_data
*&---------------------------------------------------------------------*
*       display data using ALV
*----------------------------------------------------------------------*
FORM display_data.
  perform build_fieldcatalog.
  perform build_layout.
  perform display_alv_report.
ENDFORM.                    " display_data

*&---------------------------------------------------------------------*
*&      Form  BUILD_FIELDCATALOG
*&---------------------------------------------------------------------*
*       Build Fieldcatalog for ALV Report, using SAP table structure
*----------------------------------------------------------------------*
form build_fieldcatalog.
* ALV Function module to build field catalog from SAP table structure
  DATA: it_fcat  TYPE slis_t_fieldcat_alv.

  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name       = p_table
    CHANGING
      ct_fieldcat            = it_fcat
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  fieldcatalog[] =  it_fcat[].
endform.                    " BUILD_FIELDCATALOG

*&---------------------------------------------------------------------*
*&      Form  BUILD_LAYOUT
*&---------------------------------------------------------------------*
*       Build layout for ALV grid report
*----------------------------------------------------------------------*
form build_layout.
  gd_layout-colwidth_optimize = 'X'.
endform.                    " BUILD_LAYOUT

*&---------------------------------------------------------------------*
*&      Form  DISPLAY_ALV_REPORT
*&---------------------------------------------------------------------*
*       Display report using ALV grid
*----------------------------------------------------------------------*
form display_alv_report.
  gd_repid = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = gd_repid
      is_layout          = gd_layout
      it_fieldcat        = fieldcatalog[]
      i_save             = 'X'
    TABLES
      t_outtab           = <fs_table>
    EXCEPTIONS
      program_error      = 1
      others             = 2.
endform.                    " DISPLAY_ALV_REPORT

Recent Announcements

 Field Symbols 

... adopts the field length and DECIMALS specification (type P) of the data object. TYPE TABLE The system checks whether the data object is a standard internal table. This is a ...


 SAP Upload and download Aug 23, 2010 3:26 PM  by Sap Land

... solutions available are: Build a program in ABAP. Use FM "ALSM_EXCEL_TO_INTERNAL_TABLE" to upload excel to internal table Use one SAP tool called LSMW (Legacy Systems Migration ...

Abap.SapLand.Com

 ABAP System Fields Aug 30, 2010 1:49 PM  by Sap Land

... Print: ID for print dialog functionCCURSRate specification/result field (CURRENCY CONVERT)CCURTTable rate from currency conversionCDATEDate of rate from currency conversionCOLNOCurrent column during ...

Abap.SapLand.Com

 Search Help Example.pdf Nov 19, 2010 5:38 PM  by Sap Land

224k — on page ABAP Download

Abap.SapLand.Com


Introduction to and Overview of Performance and Sizing

posted Nov 15, 2010, 12:13 AM by Sen Long   [ updated Nov 15, 2010, 12:17 AM by Sap Team ]


Analyzing Possible Metrics to Define "Large Systems"
Number of users
Number of servers
Size of network, geographical distribution of users
Data throughput, number of transactions
Size of database and database tables

BAPI User Guide

posted Aug 25, 2010, 8:51 PM by Sen Long   [ updated Dec 19, 2010, 11:15 PM by Sap Team ]

The Business Framework - the open, component-based architecture, which allows software
components from SAP and third parties to interact and integrate with each other, is becoming
more and more important.
The gadget spec URL could not be found

SAP Systems Integration at Vattenfall Nordic by SAP NetWeaver PI

posted Aug 23, 2010, 3:26 AM by Sen Long   [ updated Aug 23, 2010, 3:27 AM by Sap Team ]


IDoc :Use Case for Download of Bonus Buy Promotions to SAP (GM) POS

posted Jul 2, 2010, 1:55 AM by Sen Long   [ updated Jul 2, 2010, 1:57 AM by Sap Team ]

Description

A bonus buy defines the set of item(s) for which a discount type can be granted when certain requirements are met. Fixed price, fixed discount, percentage discount or free goods discount are possible for bonus buy conditions.
This use case describes the transfer of bonus buy definitions from the ERP system to the SAP (GM) POS system using the POS integration content.
The following is a subset of the bonus buy scenarios currently supported for this content:

  • Buy y number of z items, get one w item for free (lowest price)
  • Buy y number of z items, get x percent off an additional w item
  • Buy y number of z items, get x percent off purchase
  • Buy y number of z items, get x amount off an additional w item
  • Buy y number of z items, get x amount off purchase
  • Buy y number of z items, get one w item at fixed price
  • Buy y number of z items for fixed price
  • Buy one z item, get a free gift

Where the z item can be a single article or an article grouping. The w item can be a single article or an article grouping or identical to the z item. This depends on the bonus buy definition. In older versions of SAP (GM) POS, the inclusion/exclusion functionality does not exist. In this case, the set of z and w items are identical. Also, the retail price of the z items must be greater than or equal to the retail price of w items in order for the discount of the bonus buy to be applied. 

Note that: 

  • bonus buys in the ERP system are referred to as mix matches in the POS system.
  • inclusion/exclusion is available in SAP (GM) POS version 2.1 or higher. 

Preconditions

  1. The XI system must be configured to ensure the connectivity in the communication with the ERP system and the SAP (GM) POS system.
  2. Sites (or stores) master data must be defined in the ERP system.
  3. Article master data must be defined for a specific store or set of store(s) in the ERP system.
  4. All required customization for bonus buy functionality must be completed in the ERP system. For example, the condition types for each discount type must exist in the ERP system.
     

Flow

Main Flow

  1. If the retailer deletes one or more bonus buy(s), refer to Use Case: Deletion of Bonus Buy Promotions.
  2. The retailer creates and/or modifies one or several bonus buys for a set of items for a specific store or group of stores in the ERP system using the transactions VBK1and VBK2, respectively.
    Note that the bonus buys must be defined as described in the Configuration Guide in order for the integration to work as designed.
  3. The retailer performs a download of the bonus buy data in the ERP system to one or more stores with transaction WPMA. The bonus buys are transferred through the ERP Bonus Buy Conditions IDoc.
  4. Once the ERP system generates the Bonus Buy Conditions IDoc, the XI system processes the bonus buy information through a two-step mapping.
  5. When the conversion is complete in the XI system, the generated input files are transferred to the SAP (GM) POS system, where the mix match and inclusion/exclusion data is stored in the POS database.
  6. If a cashier at a given store tries to scan (or enter) the bar code number(s) of one or more articles that have been assigned to a mix match and the prerequisites are met, the mix match description and discount are displayed at the register.

Post Conditions

          None

Format of ERP Bonus Buy Conditions IDoc

The IDoc WPDBBY01 is used for the download of bonus buy promotions. 

The following table provides a description of the common elements in the IDoc for each type of bonus buy scenario:

IDoc elements 
Description 
DOCNUM 
This field specifies the document number of the IDoc. 
E1WPBB01 segment 
Each segment represents a bonus buy condition. 
FILIALE 
Store for which the bonus buy is applicable. 
BBY_NR 
The bonus buy number. 
POINT 
Specifies the condition target type for the bonus buy (i.e. article, article grouping, total sale, all prerequisites) 
AENDKENNZ 
Specifies the action performed on the bonus buy information. 
E1WPBB02 segment 
Each segment defines the items that can receive the discount once the bonus buy conditions are reached.  
Note that this information is required when using the inclusion/exclusion functionality available in SAP (GM) POS 2.0.  
MAT_EAN 
The international article number (EAN/UPC) for the "Get" article. Note that the bonus buy is referenced through the EAN of an article. 
E1WPBB04 segment 
Each segment defines the items that can be purchased for the bonus buy to be applied. 
MAT_EAN 
The international article number (EAN/UPC) for the "Buy" article. Note that the bonus buy is referenced through the EAN of an article. 
E1WPBB05 segment 
Each segment represents the terms of the discount/condition for the bonus buy. 
START_DATE 
Date when the bonus buy starts. 
END_DATE 
Date when the bonus buy ends. 
BBY_TYPE 
Specifies the type of discount or condition. 
E1WPBB06 segment 
This segment defines the conditions and pricing terms for the discount. 
CALC_RULE 
Specifies the calculation type for determining free goods quantity. 
SHORT_TEXT 
Description of the bonus buy. 
LANGUAGE_ISO 
Identifies the language used for requested and provided descriptions. 


Sample: Buy 2 of Item 2050000029202 Get One Free (lowest price)

<?xml version="1.0" encoding="UTF-8"?>
<WPDBBY01>
               <IDOC BEGIN="1">
                              <EDI_DC40 SEGMENT="1">
                                             ...
                                              <DOCNUM>000000000255141</DOCNUM>
                                             ...
                              </EDI_DC40
                              <E1WPBB01 SEGMENT="1">
                                             <FILIALE>0000009901</FILIALE>
                                             <BBY_NR>BB1FREE</BBY_NR>
                                             ...
                                             <CATEG>M</CATEG>
                                             <POINT>M</POINT>
                                             ...
                                             <AENDKENNZ>MODI</AENDKENNZ>
                                             <E1WPBB02 SEGMENT="1">
                                                            <MAT_NR>000000000000000159</MAT_NR>
                                                            <MAT_EAN>2050000029202</MAT_EAN>
                                             </E1WPBB02>
                                             <E1WPBB03 SEGMENT="1">
                                                            <PRQ_TYPE>MAT</PRQ_TYPE>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000000159</MAT_NR>
                                                                           <MAT_EAN>2050000029202</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                             </E1WPBB03>
                                             <E1WPBB05 SEGMENT="1">
                                                            <COND_TYPE>BB04</COND_TYPE>
                                                            <START_DATE>20070419</START_DATE>
                                                            <END_DATE>99991231</END_DATE>
                                                            <BBY_TYPE>N</BBY_TYPE>
                                                            <E1WPBB06 SEGMENT="1">
                                                                           ...
                                                                           <FG_MIN_QUAN>2.000</FG_MIN_QUAN>
                                                                           <FG_QUAN>3.000</FG_QUAN>
                                                                           ...
                                                                           <FG_ADD_QUAN>1.000</FG_ADD_QUAN>
                                                                           ...
                                                                           <CALC_RULE>001</CALC_RULE>
                                                                           ...
                                                            </E1WPBB06>
                                             </E1WPBB05>
                                             <E1WPBB07 SEGMENT="1">
                                                            <LANGUAGE>E</LANGUAGE>
                                                            <LANGUAGE_ISO>EN</LANGUAGE_ISO>
                                                            <SHORT_TEXT>Buy 2 get 1 free</SHORT_TEXT>
                                             </E1WPBB07>
                              </E1WPBB01>
                              ...
               </IDOC>
</WPDBBY01>

The fields of segment E1WPBB06 for the above scenario are described below:

IDoc elements 
Description 
FG_MIN_QUAN 
Indicates the minimum number of items to purchase. 
FG_QUAN 
Total number of items to be purchased in the bonus buy. 
FG_ADD_QUAN 
Indicates the number of free items granted. 
POINT of E1WPBB01 segment 
Specifies the condition target type for the bonus buy. For this scenario, the value 'M' indicates article. 


Sample: Buy 2 of item 2050000029332, get 50 percent off additional item 2050000029333

<?xml version="1.0" encoding="UTF-8"?>
<WPDBBY01>
               <IDOC BEGIN="1">
                              <EDI_DC40 SEGMENT="1">
                                             ...
                                             <DOCNUM>000000000255141</DOCNUM>
                                             ...
                              </EDI_DC40>
                              <E1WPBB01 SEGMENT="1">
                                             <FILIALE>0000009901</FILIALE>
                                             <BBY_NR>BB2P50</BBY_NR>
                                             ...
                                             <CATEG>M</CATEG>
                                             <POINT>M</POINT>
                                             ...
                                             <AENDKENNZ>MODI</AENDKENNZ>
                                             <E1WPBB02 SEGMENT="1">
                                                            <MAT_NR>MTL00006</MAT_NR>
                                                            <MAT_EAN>2050000029333</MAT_EAN>
                                             </E1WPBB02>
                                             <E1WPBB03 SEGMENT="1">
                                                            <PRQ_TYPE>MAT</PRQ_TYPE>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>MTL00005</MAT_NR>
                                                                           <MAT_EAN>2050000029332</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                             </E1WPBB03>
                                             <E1WPBB05 SEGMENT="1">
                                                            <COND_TYPE>BB03</COND_TYPE>
                                                            <START_DATE>20070419</START_DATE>
                                                            <END_DATE>99991231</END_DATE>
                                                            <BBY_TYPE>%</BBY_TYPE>
                                                            <E1WPBB06 SEGMENT="1">
                                                                           ...
                                                                           <KOND_SIGN>-</KOND_SIGN>
                                                                           <KOND_PER>50.000</KOND_PER>
                                                                           ...
                                                                           <FG_MIN_QUAN>2.000</FG_MIN_QUAN>
                                                                           ...
                                                            </E1WPBB06>
                                             </E1WPBB05>
                                             <E1WPBB07 SEGMENT="1">
                                                            <LANGUAGE>E</LANGUAGE>
                                                            <LANGUAGE_ISO>EN</LANGUAGE_ISO>
                                                            <SHORT_TEXT>Buy 2 Get 50% of 3rd</SHORT_TEXT>
                                             </E1WPBB07>
                              </E1WPBB01>
                              ...
               </IDOC>
</WPDBBY01>

The fields of segment E1WPBB06 for the above scenario are described below:

IDoc elements 
Description 
KOND_SIGN 
Indicates if there is a negative or positive adjustment to the price. 
KOND_PER 
Specifies the percentage amount for the discount. 
FG_MIN_QUAN 
Indicates the minimum number of items to purchase. 
POINT of E1WPBB01 segment 
Specifies the condition target type for the bonus buy. For this scenario, the value 'M' indicates article. 

Sample: Buy 2 items, get 50 percent off purchase

<?xml version="1.0" encoding="UTF-8"?>
<WPDBBY01>
               <IDOC BEGIN="1">
                              <EDI_DC40 SEGMENT="1">
                                             ...
                                             <DOCNUM>0000000000255141</DOCNUM>
                                             ...
                              </EDI_DC40>
                              <E1WPBB01 SEGMENT="1">
                                             <FILIALE>0000009901</FILIALE>
                                             <BBY_NR>BB2PT50</BBY_NR>
                                             ...
                                             <CATEG>M</CATEG>
                                             <POINT>R or P</POINT>
                                             ...
                                             <AENDKENNZ>MODI</AENDKENNZ>
                                             <E1WPBB03 SEGMENT="1">
                                                            ...
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000317016</MAT_NR>
                                                                           <MAT_EAN>2050000015458</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                             </E1WPBB03>
                                             <E1WPBB03 SEGMENT="1">
                                                            ...
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000317050</MAT_NR>
                                                                           <MAT_EAN>2050000016479</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                             </E1WPBB03>
                                             <E1WPBB05 SEGMENT="1">
                                                            <COND_TYPE>BB03</COND_TYPE>
                                                            <START_DATE>20070419</START_DATE>
                                                            <END_DATE>99991231</END_DATE>
                                                            <BBY_TYPE>%</BBY_TYPE>
                                                            <E1WPBB06 SEGMENT="1">
                                                                           ...
                                                                           <KOND_SIGN>-</KOND_SIGN>
                                                                           <KOND_PER>50.000</KOND_PER>
                                                                           ...
                                                                           <FG_MIN_QUAN>2.000</FG_MIN_QUAN>
                                                                           ...
                                                              </E1WPBB06>
                                             </E1WPBB05>
                                             <E1WPBB07 SEGMENT="1">
                                                            <LANGUAGE>E</LANGUAGE>
                                                            <LANGUAGE_ISO>EN</LANGUAGE_ISO>
                                                            <SHORT_TEXT>Buy 2 Get 50% of total</SHORT_TEXT>
                                             </E1WPBB07>
                              </E1WPBB01>
                              ...
               </IDOC>
</WPDBBY01>

Note that in this case, the following combinations are possible to grant the discount:

  1. Buy 2 of item 2050000015458
  2. Buy 2 of item 2050000016479
  3. Buy 1 of item 2050000015458 and buy 1 of item 2050000016479

The fields of segment E1WPBB06 for the above scenario are described below:

IDoc elements 
Description 
KOND_SIGN 
Indicates if there is a negative or positive adjustment to the price. 
KOND_PER 
Specifies the percentage amount for discount. 
FG_MIN_QUAN 
Indicates the minimum number of items to purchase. 
POINT of E1WPBB01 segment 
Specifies the condition target type for the bonus buy. For this scenario, the value 'R' indicates total sale. 

Sample: Buy 3 items, get 5 dollars off of item 2050000013837

           
<?xml version="1.0" encoding="UTF-8"?>
<WPDBBY01>
               <IDOC BEGIN="1">
                              <EDI_DC40 SEGMENT="1">
                                             ...
                                             <DOCNUM>0000000000255141</DOCNUM>
                                             ...
                              </EDI_DC40>
                              <E1WPBB01 SEGMENT="1">
                                             <FILIALE>0000002101</FILIALE>
                                             <BBY_NR>BB3A5</BBY_NR>
                                             ...
                                             <CATEG>M</CATEG>
                                             <POINT>M</POINT>
                                             ...
                                             <AENDKENNZ>MODI</AENDKENNZ>
                                             <E1WPBB02 SEGMENT="1">
                                                            <MAT_NR>000000000000611063</MAT_NR>
                                                            <MAT_EAN>2050000013837</MAT_EAN>
                                             </E1WPBB02>
                                             <E1WPBB03 SEGMENT="1">
                                                            ...
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000611062</MAT_NR>
                                                                           <MAT_EAN>2050000013836</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                             </E1WPBB03>
                                             <E1WPBB05 SEGMENT="1">
                                                            <COND_TYPE>BB02</COND_TYPE>
                                                            <START_DATE>20070419</START_DATE>
                                                            <END_DATE>99991231</END_DATE>
                                                            <BBY_TYPE>R</BBY_TYPE>
                                                            <E1WPBB06 SEGMENT="1">
                                                                           <SCALE_TYPE>B</SCALE_TYPE>
                                                                           <KOND_SIGN>-</KOND_SIGN>
                                                                           ...
                                                                           <KOND_VAL>5</KOND_VAL>
                                                                           <KOND_CURCY>USD</KOND_CURCY>
                                                                           <KOND_CURCY_ISO>USD</KOND_CURCY_ISO>
                                                                           ...   
                                                                           <FG_MIN_QUAN>3.000</FG_MIN_QUAN>
                                                                           ...
                                                            </E1WPBB06>
                                             </E1WPBB05>
                                             <E1WPBB07 SEGMENT="1">
                                                            <LANGUAGE>E</LANGUAGE>
                                                            <LANGUAGE_ISO>EN</LANGUAGE_ISO>
                                                            <SHORT_TEXT>Buy 3 Get 5$ 4th</SHORT_TEXT>
                                             </E1WPBB07>
                              </E1WPBB01>
                              ...
               </IDOC>
</WPDBBY01>

The fields of segment E1WPBB06 for the above scenario are described below:

IDoc elements 
Description 
KOND_SIGN 
Indicates if there is a negative or positive adjustment to the price. 
KOND_VAL 
Specifies the actual amount in a particular currency for the discount. 
FG_MIN_QUAN 
Indicates the minimum number of items to purchase. 
POINT of E1WPBB01 segment 
Specifies the condition target type for the bonus buy. For this scenario, the value 'M' indicates article. 
KOND_CURCY_ISO 
Specifies the currency key for the amount in the case of absolute markdowns. 


Sample: Buy 3 of item 2050000005657, get 10 dollars off purchase

<?xml version="1.0" encoding="UTF-8"?>
<WPDBBY01>
               <IDOC BEGIN="1">
                              <EDI_DC40 SEGMENT="1">
                                             ...
                                             <DOCNUM>000000000255141</DOCNUM>
                                             ...
                              </EDI_DC40>
                              <E1WPBB01 SEGMENT="1">
                                             <FILIALE>0000009901</FILIALE>
                                             <BBY_NR>BB3AT10</BBY_NR>
                                             ...
                                             <CATEG>M</CATEG>
                                             <POINT>R or P</POINT>
                                             ...
                                             <AENDKENNZ>MODI</AENDKENNZ>
                                             <E1WPBB03 SEGMENT="1">
                                                            <PRQ_TYPE>MAT</PRQ_TYPE>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000311231</MAT_NR>
                                                                           <MAT_EAN>2050000005657</MAT_EAN>
                                                                            ...
                                                            </E1WPBB04>
                                             </E1WPBB03>
                                             <E1WPBB05 SEGMENT="1">
                                                            <COND_TYPE>BB02</COND_TYPE>
                                                            <START_DATE>20070419</START_DATE>
                                                            <END_DATE>99991231</END_DATE>
                                                            <BBY_TYPE>R</BBY_TYPE>
                                                            <E1WPBB06 SEGMENT="1">
                                                                           <SCALE_TYPE>B</SCALE_TYPE>
                                                                           <KOND_SIGN>-</KOND_SIGN>
                                                                           ...
                                                                           <KOND_VAL>10</KOND_VAL>
                                                                           <KOND_CURCY>USD</KOND_CURCY>
                                                                           <KOND_CURCY_ISO>USD</KOND_CURCY_ISO>
                                                                           <FG_MIN_QUAN>3.000</FG_MIN_QUAN>
                                                                           ...
                                                            </E1WPBB06>
                                             </E1WPBB05>
                                             <E1WPBB07 SEGMENT="1">
                                                            <LANGUAGE>E</LANGUAGE>
                                                            <LANGUAGE_ISO>EN</LANGUAGE_ISO>
                                                            <SHORT_TEXT>Buy 3 Get 10$ Off</SHORT_TEXT>
                                             </E1WPBB07>
                              </E1WPBB01>
                              ...
               </IDOC>
</WPDBBY01>

The fields of segment E1WPBB06 for the above scenario are described below:

IDoc elements 
Description 
KOND_SIGN 
Indicates if there is a negative or positive adjustment to the price. 
KOND_VAL 
Specifies the actual amount in a particular currency for the discount. 
FG_MIN_QUAN 
Indicates the minimum number of items to purchase. 
POINT of E1WPBB01 segment 
Specifies the condition target type for the bonus buy. For this scenario, the value 'R' indicates total sale. 
KOND_CURCY_ISO 
Specifies the currency key for the amount in the case of absolute markdowns. 

Sample: Buy 2 items, Get 1 of item 2050000013837 for 5 dollars

<?xml version="1.0" encoding="UTF-8"?>
<WPDBBY01>
               <IDOC BEGIN="1">
                              <EDI_DC40 SEGMENT="1>
                                             ...
                                             <DOCNUM>0000000000255141</DOCNUM>
                                             ...
                              </EDI_DC40>
                              <E1WPBB01 SEGMENT="1">
                                             <FILIALE>0000009901</FILIALE>
                                             <BBY_NR>BBPRICE</BBY_NR>
                                             ...
                                             <CATEG>M</CATEG>
                                             <POINT>G</POINT>
                                             ...
                                             <AENDKENNZ>MODI</AENDKENNZ>
                                              <E1WPBB02 SEGMENT="1">
                                                            <MAT_NR>000000000000611063</MAT_NR>
                                                            <MAT_EAN>2050000013837</MAT_EAN>
                                             </E1WPBB02>
                                             <E1WPBB03 SEGMENT="1">
                                                            <PRQ_TYPE>MGP</PRQ_TYPE>
                                                            <GRPG_NR>GROUP01</GRPG_NR>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_QUAN>2.000</MAT_QUAN>
                                                            </E1WPBB04>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000611062</MAT_NR>
                                                                           <MAT_EAN>2050000013836</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000610733</MAT_NR>
                                                                           <MAT_EAN>2050000010750</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                             </E1WPBB03>
                                             <E1WPBB05 SEGMENT="1">
                                                            <COND_TYPE>BB01</COND_TYPE>
                                                            <START_DATE>20070419</START_DATE>
                                                            <END_DATE>99991231</END_DATE>
                                                            <BBY_TYPE>P</BBY_TYPE>
                                                            <E1WPBB06 SEGMENT="1">
                                                                           <SCALE_TYPE>C</SCALE_TYPE>
                                                                           <KOND_SIGN>-</KOND_SIGN>
                                                                           ...
                                                                           <KOND_VAL>5.00</KOND_VAL>
                                                                           <KOND_CURCY>USD</KOND_CURCY>
                                                                           <KOND_CURCY_ISO>USD</KOND_CURCY_ISO>
                                                                           <FG_MIN_QUAN>2.000</FG_MIN_QUAN>
                                                                           ...
                                                            </E1WPBB06>
                                             </E1WPBB05>
                                             <E1WPBB07 SEGMENT="1">
                                                            <LANGUAGE>E</LANGUAGE>
                                                            <LANGUAGE_ISO>EN</LANGUAGE_ISO>
                                                            <SHORT_TEXT>Buy 2 Get 1 at $5</SHORT_TEXT>
                                             </E1WPBB07>
                              </E1WPBB01>
                              ...
               </IDOC>
</WPDBBY01>

The fields of segment E1WPBB06 for the above scenario are described below:

IDoc elements 
Description 
KOND_SIGN 
Indicates if there is a negative or positive adjustment to the price. 
KOND_VAL 
Specifies the actual price in a particular currency for the item(s). 
FG_MIN_QUAN 
Indicates the minimum number of items to purchase. 
POINT of E1WPBB01 segment 
Specifies the condition target type for the bonus buy. For this scenario, the value 'G' indicates article grouping. 
KOND_CURCY_ISO 
Specifies the currency key for the price amount. 

Sample: Buy 3 items for 10 dollars

<?xml version="1.0" encoding="UTF-8"?>
<WPDBBY01>
               <IDOC BEGIN="1">
                              <EDI_DC40 SEGMENT="1>
                                             ...
                                             <DOCNUM>0000000000255141</DOCNUM>
                                             ...
                              </EDI_DC40>
                              <E1WPBB01 SEGMENT="1">
                                             <FILIALE>0000009901</FILIALE>
                                             <BBY_NR>BBTOTPRICE</BBY_NR>
                                             ...
                                             <CATEG>M</CATEG>
                                             <POINT>R or P</POINT>
                                             ...
                                             <AENDKENNZ>MODI</AENDKENNZ>
                                              <E1WPBB03 SEGMENT="1">
                                                            <PRQ_TYPE>MGP</PRQ_TYPE>
                                                            <GRPG_NR>GROUP01</GRPG_NR>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_QUAN>2.000</MAT_QUAN>
                                                            </E1WPBB04>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000611066</MAT_NR>
                                                                           <MAT_EAN>2050000013840</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000610740</MAT_NR>
                                                                           <MAT_EAN>2050000010760</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                             </E1WPBB03>
                                             <E1WPBB05 SEGMENT="1">
                                                            <COND_TYPE>BB01</COND_TYPE>
                                                            <START_DATE>20070419</START_DATE>
                                                            <END_DATE>99991231</END_DATE>
                                                            <BBY_TYPE>P</BBY_TYPE>
                                                            <E1WPBB06 SEGMENT="1">
                                                                           <SCALE_TYPE>C</SCALE_TYPE>
                                                                           <KOND_SIGN>-</KOND_SIGN>
                                                                           ...
                                                                           <KOND_VAL>10.00</KOND_VAL>
                                                                           <KOND_CURCY>USD</KOND_CURCY>
                                                                           <KOND_CURCY_ISO>USD</KOND_CURCY_ISO>
                                                                           <FG_MIN_QUAN>3.000</FG_MIN_QUAN>
                                                                           ...
                                                            </E1WPBB06>
                                             </E1WPBB05>
                                             <E1WPBB07 SEGMENT="1">
                                                            <LANGUAGE>E</LANGUAGE>
                                                            <LANGUAGE_ISO>EN</LANGUAGE_ISO>
                                                            <SHORT_TEXT>Buy 3 for $10</SHORT_TEXT>
                                             </E1WPBB07>
                              </E1WPBB01>
                              ...
               </IDOC>
</WPDBBY01>

The fields of segment E1WPBB06 for the above scenario are described below:

IDoc elements 
Description 
KOND_SIGN 
Indicates if there is a negative or positive adjustment to the price. 
KOND_VAL 
Specifies the actual price in a particular currency for the item(s). 
FG_MIN_QUAN 
Indicates the minimum number of items to purchase. 
POINT of E1WPBB01 segment 
Specifies the condition target type for the bonus buy. For this scenario, the value 'R' indicates total purchase. 
KOND_CURCY_ISO 
Specifies the currency key for the price amount. 

Sample: Buy one item, Get a free gift

<?xml version="1.0" encoding="UTF-8"?>
<WPDBBY01>
               <IDOC BEGIN="1">
                              <EDI_DC40 SEGMENT="1">
                                             ...
                                             <DOCNUM>0000000000255141</DOCNUM>
                                             ...
                              </EDI_DC40>
                              ...
                              <E1WPBB01 SEGMENT="1">
                                             <FILIALE>0000009901</FILIALE>
                                             <BBY_NR>BBGIFT</BBY_NR>
                                             ...
                                              <CATEG>M</CATEG>
                                             <POINT>G</POINT>
                                             ...
                                             <AENDKENNZ>MODI</AENDKENNZ>
                                             <E1WPBB02 SEGMENT="1">
                                                            <MAT_NR>000000000000315212</MAT_NR>
                                                            <MAT_EAN>2050000006402</MAT_EAN>
                                             </E1WPBB02>
                                             <E1WPBB02 SEGMENT="1">
                                                            <MAT_NR>000000000000315222</MAT_NR>
                                                            <MAT_EAN>2050000006433</MAT_EAN>
                                             </E1WPBB02>
                                             <E1WPBB03 SEGMENT="1">
                                                            <PRQ_TYPE>MGP</PRQ_TYPE>
                                                            <GRPG_NR>BBGRP01</GRPG_NR>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_QUAN>1.000</MAT_QUAN>
                                                            </E1WPBB04>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000315211</MAT_NR>
                                                                           <MAT_EAN>2050000006401</MAT_EAN>
                                                                            ...
                                                            </E1WPBB04>
                                                            <E1WPBB04 SEGMENT="1">
                                                                           <MAT_NR>000000000000315221</MAT_NR>
                                                                           <MAT_EAN>2050000006432</MAT_EAN>
                                                                           ...
                                                            </E1WPBB04>
                                             </E1WPBB03>
                                             <E1WPBB05 SEGMENT="1">
                                                            <COND_TYPE>BB04</COND_TYPE>
                                                            <START_DATE>20070419</START_DATE>
                                                            <END_DATE>99991231</END_DATE>
                                                            <BBY_TYPE>N</BBY_TYPE>
                                                            <E1WPBB06 SEGMENT="1">
                                                                           <SCALE_TYPE>C</SCALE_TYPE>
                                                                           ...
                                                                           <FG_MIN_QUAN>1.000</FG_MIN_QUAN>
                                                                           <FG_QUAN>2.000</FG_QUAN>
                                                                           ...
                                                                           <FG_ADD_QUAN>1.000</FG_ADD_QUAN>
                                                                           ...
                                                            </E1WPBB06>
                                             </E1WPBB05>
                                             <E1WPBB07 SEGMENT="1">
                                                            <LANGUAGE>E</LANGUAGE>
                                                            <LANGUAGE_ISO>EN</LANGUAGE_ISO>
                                                            <SHORT_TEXT>Buy 1 Get 1 Free Gift</SHORT_TEXT>
                                             </E1WPBB07>
                              </E1WPBB01>
               </IDOC>
</WPDBBY01>

Note that in this case, the purchase of item 2050000006401 or 2050000006432 grants the discount. This case is similar to "Buy 1 get 1 free".
The fields of segment E1WPBB06 for the above scenario are described below:

IDoc elements 
Description 
FG_MIN_QUAN 
Indicates the minimum number of items to purchase. 
FG_QUAN 
Total number of items to be purchased in the bonus buy. 
FG_ADD_QUAN 
Indicates the number of free items granted. 
POINT of E1WPBB01 segment 
Specifies the condition target type for the bonus buy. For this scenario, the value 'G' indicates article grouping. 


Format of ARTS IXRetail Messages

The bonus buy download involves the creation of two (2) IXRetail messages:
  

  1. Item Maintenance
  2. Price

The Item Maintenance message is used to list the articles with their associated bonus buys. The Price message is used to define the bonus buy conditions.
 

Sample File: Transfer Article Information for 8 Bonus Buys in Store 0000009901 into IXRetail Item Maintenance Message

<?xml version="1.0" encoding="utf-8"?>
<ns1:ItemMaintenance xmlns:ns1="http://sap.com/xi/StoreConnectivity" Version="1.0">
         <BusinessUnit TypeCode="RetailStore">0000009901</BusinessUnit>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000029202</ItemID>
                      <MixMatch>BB1FREE</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000029332</ItemID>
                      <MixMatch>BB2P50</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000015458</ItemID>
                      <MixMatch>BB2PT50</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000016479</ItemID>
                      <MixMatch>BB2PT50</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000013836</ItemID>
                      <MixMatch>BB3A5</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000005657</ItemID>
                      <MixMatch>BB3AT10</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000006401</ItemID>
                      <MixMatch>BBGIFT</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000006432</ItemID>
                      <MixMatch>BBGIFT</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000010750</ItemID>
                      <MixMatch>BBPRICE</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000013836</ItemID>
                      <MixMatch>BBPRICE</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000013840</ItemID>
                      <MixMatch>BBTOTPRICE</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="BuyArticle" Type="PLU">2050000010760</ItemID>
                      <MixMatch>BBTOTPRICE</MixMatch>
                      <RFID/>
         </Item>
         ...
         <Item Action="AddUpdate">
                      <ItemID Qualifier="GetArticle" Type="PLU">2050000029202</ItemID>
                      <MixMatch>BB1FREE</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="GetArticle" Type="PLU">2050000029333</ItemID>
                      <MixMatch>BB2P50</MixMatch>
                      <RFID/>
         </Item>
          <Item Action="AddUpdate">
                      <ItemID Qualifier="GetArticle" Type="PLU">2050000013837</ItemID>
                      <MixMatch>BB3A5</MixMatch>
                      <RFID/>
         </Item>
          <Item Action="AddUpdate">
                      <ItemID Qualifier="GetArticle" Type="PLU">2050000013837</ItemID>
                      <MixMatch>BBPRICE</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="GetArticle" Type="PLU">2050000006402</ItemID>
                      <MixMatch>BBGIFT</MixMatch>
                      <RFID/>
         </Item>
         <Item Action="AddUpdate">
                      <ItemID Qualifier="GetArticle" Type="PLU">2050000006433</ItemID>
                      <MixMatch>BBGIFT</MixMatch>
                      <RFID/>
         </Item>
         ...
         <Batch>
                      <BatchID>0000000000255141</BatchID>
         </Batch>
</ns1:ItemMaintenance>

The following table provides a description of some of the main elements in the IXRetail Item Maintenance Message:

IXRetail Item Maintenance elements 
Description 
Batch-> BatchID 
Specifies the identity of the message. 
Note that this element is not used in SAP (GM) POS. 
BusinessUnit 
Store for which the bonus buys are applicable. 
@TypeCode 
Specifies the type of business unit. 
The default value is 'RetailStore'. Note that this attribute is available but not used in the integration. 
Item node 
Each node represents an article. 
@Action 
Specifies the action performed on the article information. 
ItemID 
The international article number (EAN/UPC) for the article to which the bonus buy applies. 
@Qualifier 
Some details about the article specified in the bonus buy. 
Note that the possible values are 'BuyArticle' or 'GetArticle'. 
@Type 
Specifies the type of article identity listed for the bonus buy. 
The default value is 'PLU'. Note that this attribute is available but not used in the integration. 
MixMatch 
The bonus buy number. Note that there can be multiple instances of this element if several bonus buys apply to an article. 


Sample File: Translation of the 8 Bonus Buys for Store 0000009901 into IXRetail Price Message

The following table provides a description of the common elements in the IXRetail Price message for each type of bonus buy scenario:

IXRetail Price Message elements 
Description 
PriceMessage node 
Each segment represents a bonus buy condition. 
@MessageID 
Specifies the trigger for the Price Message. 
In this scenario, the Bonus Buy IDoc is used to create the Price message. Note that this attribute is available but not used in the integration. 
RequestType 
Specifies the action performed on the bonus buy. 
BusinessUnit 
Store for which the bonus buy is applicable. 
@TypeCode 
Specifies the type of business unit. 
The default value is 'RetailStore'. Note that this attribute is available but not used in the integration. 
PriceRuleID 
The bonus buy number. 
Description 
Description of the bonus buy. 
@Language 
Identifies the language used for requested and provided descriptions. 
Note that this attribute is available but not used in the integration. 
Eligibility node 
Each node represents the terms of the discount/condition of the bonus buy. 
ThresholdQuantity->@Units
Indicates the minimum number of items to purchase. 
LimitQuantity->@Units 
Indicates the number of items for which the discount is applied. 
Eligibility->ItemID 
The international article number (EAN/UPC) for the articles that must be purchased for the bonus buy to be applied.
Derviation nodeEach node represents the price conditions of the bonus buy. 
NewPriceSpecifies the actual price in a particular currency for the article in the case of new price discount. 
@Currency 
Specifies the currency key for the amount in the case of new price discount. 
Note that this attribute is available but not used in the integration. 
RetailPriceModifier node 
Provides a detailed description of how a price is derived. 
@DiscountBenefit 
Indicates who will be granted the price change. 
The default value is 'Customer'. Note that this attribute is available but not used in the integration. 
@Direction 
Specifies whether the price change is due to a markup or markdown. 
The default value is 'Down' since the scenarios used are markdowns with the exception of new price on total sale scenario. Note that this attribute is available but not used in the integration. 
Amount 
Specifies the actual amount in a particular currency for the discount. 
@Currency 
Specifies the currency key for the amount in the case of absolute markdowns. 
Note that this attribute is available but not used in the integration. 
Percent 
Specifies the percentage amount for the discount. 
Derivation-> ItemIDThe international article number (EAN/UPC) for the articles that are received as part of the discount once the bonus buy is granted.  
ConcurrenceCode 
Specifies the calculation type for determining free goods quantity. 
EffectiveDateTimestamp 
Date when the bonus buy starts. 
ExpirationDateTimestamp 
Date when the bonus buy ends. 

Note that the MajorVersion, MinorVersion, and FixVersion specify the revision of the IXRetail Price message used in the integration.

Sample: Buy 2 item, Get One Free (lowest price)

<?xml version="1.0" encoding="utf-8"?>
<ns1:Price xmlns:ns1="http://sap.com/xi/StoreConnectivity" Version="1.0" MajorVersion="2"  MinorVersion="0"  FixVersion="1">
               <PriceMessage MessageID="0000000000255141">
                              <RequestType>AddUpdate</RequestType>
                              <BusinessUnit TypeCode="RetailStore">0000009901</BusinessUnit>
                              <PriceRuleSet>
                                             ...
                                             <PriceRule>
                                                            <PriceRuleID>BB1FREE</PriceRuleID>
                                                            <Description Language="EN">Buy 2 get 1 free</Description>
                                                            <Eligibility>
                                                                           <ThresholdQuantity Units="2"/>
                                                                           <LimitQuantity Units="1"/>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000029202</ItemID>
                                                                           </Eligibility>
                                                            </Eligibility>
                                                            <Derivation>
                                                                           <RetailPriceModifier DiscountBenefit= "Customer" Direction= "Down" >
                                                                                          ...
                                                                                          <Percent>100</Percent>
                                                                                          ...
                                                                           </RetailPriceModifier>
                                                                           <Derivation>
                                                                                          <ItemID Type= "PLU" >2050000029202</ItemID>
                                                                           </Derivation>
                                                            </Derivation>
                                                            <ConcurrenceCode>N</ConcurrenceCode>
                                                            <EffectiveDateTimestamp>20070419</EffectiveDateTimestamp>
                                                            <ExpirationDateTimestamp>99991231</ExpirationDateTimestamp>
                                             </PriceRule>
                              </PriceRuleSet>
               </PriceMessage>
               ...
</ns1:Price> 

Sample: Buy 2 items, get 50 percent off an additional item

<?xml version="1.0" encoding="utf-8"?>
<ns1:Price xmlns:ns1="http://sap.com/xi/StoreConnectivity" Version="1.0" MajorVersion="2"  MinorVersion="0"  FixVersion="1" >
               <PriceMessage MessageID="0000000000255141">
                              <RequestType>AddUpdate</RequestType>
                              <BusinessUnit TypeCode="RetailStore">0000009901</BusinessUnit>
                              <PriceRuleSet>
                                             ...
                                             <PriceRule>
                                                            <PriceRuleID>BB2P50</PriceRuleID>
                                                            <Description Language="EN">Buy 2 Get 50% of 3rd </Description>
                                                            <Eligibility>
                                                                           <ThresholdQuantity Units="2"/>
                                                                           <LimitQuantity Units="1"/>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000029332</ItemID>
                                                                           </Eligibility>
                                                            </Eligibility>
                                                            <Derivation>
                                                                           <RetailPriceModifier DiscountBenefit= "Customer" Direction= "Down" >
                                                                                           ...
                                                                                           <Percent>50</Percent>
                                                                                           ...
                                                                           </RetailPriceModifier>
                                                                           <Derivation>
                                                                                          <ItemID Type= "PLU" >2050000029333</ItemID>
                                                                           </Derivation>
                                                            </Derivation>
                                                            <ConcurrenceCode>N</ConcurrenceCode>
                                                            <EffectiveDateTimestamp>20070419</EffectiveDateTimestamp>
                                                            <ExpirationDateTimestamp>99991231</ExpirationDateTimestamp>
                                             </PriceRule>
                              </PriceRuleSet>
               </PriceMessage>
               ...
</ns1:Price>

Sample: Buy 2 items, get 50 percent off purchase

<?xml version="1.0" encoding="utf-8"?>
<ns1:Price xmlns:ns1="http://sap.com/xi/StoreConnectivity" Version="1.0" MajorVersion="2"  MinorVersion="0"  FixVersion="1" >
               <PriceMessage MessageID="0000000000255141">
                              <RequestType>AddUpdate</RequestType>
                              <BusinessUnit TypeCode="RetailStore">0000009901</BusinessUnit>
                              <PriceRuleSet>
                                             ...
                                             <PriceRule>
                                                            <PriceRuleID>BB2PT50</PriceRuleID>
                                                            <Description Language="EN">Buy 2 Get 50% of total</Description>
                                                            <Eligibility>
                                                                           <ThresholdQuantity Units="2"/>
                                                                           <LimitQuantity Units="0"/>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000015458</ItemID>
                                                                           </Eligibility>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000016479</ItemID>
                                                                           </Eligibility>
                                                            </Eligibility>
                                                            <Derivation>
                                                                           <RetailPriceModifier DiscountBenefit= "Customer" Direction= "Down" >
                                                                                          ...
                                                                                          <Percent>50</Percent>
                                                                                          ...
                                                                           </RetailPriceModifier>
                                                            </Derivation>
                                                            <ConcurrenceCode>Y</ConcurrenceCode>
                                                            <EffectiveDateTimestamp>20070419</EffectiveDateTimestamp>
                                                            <ExpirationDateTimestamp>99991231</ExpirationDateTimestamp>
                                             </PriceRule>
                              </PriceRuleSet>
               </PriceMessage>
               ...
</ns1:Price>

Sample: Buy 3 items, get 5 dollars off an additional item

<?xml version="1.0" encoding="utf-8"?>
<ns1:Price xmlns:ns1="http://sap.com/xi/StoreConnectivity" Version="1.0" MajorVersion="2"  MinorVersion="0"  FixVersion="1" >
               <PriceMessage MessageID="0000000000255141">
               <RequestType>AddUpdate</RequestType>
                                      <BusinessUnit TypeCode="RetailStore">0000009901</BusinessUnit>
                                      <PriceRuleSet>
                                                   <PriceRule>
                                                                <PriceRuleID>BB3A5</PriceRuleID>
                                                                <Description Language="EN">Buy 3 get 5$ 4th</Description>
                                                                <Eligibility>
                                                                            <ThresholdQuantity Units="3"/>
                                                                            <LimitQuantity Units="1"/>
                                                                            <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000013836</ItemID>
                                                                            </Eligibility>
                                                                </Eligibility>
                                                                <Derivation>
                                                                            <RetailPriceModifier DiscountBenefit= "Customer" Direction= "Down" >   
                                                                                         ...
                                                                                         <Amount Currency= "USD" >5.00</Amount>
                                                                                         ...
                                                                             </RetailPriceModifier>
                                                                             <Derivation>
                                                                                          <ItemID Type= "PLU" >2050000013837</ItemID>
                                                                             </Derivation>
                                                                </Derivation>
                                                                <ConcurrenceCode/>
                                                                <EffectiveDateTimestamp>20070419</EffectiveDateTimestamp>
                                                                <ExpirationDateTimestamp>99991231</ExpirationDateTimestamp>
                                                   </PriceRule>
                              </PriceRuleSet>
                              ...
               </PriceMessage>
</ns1:Price>

Sample: Buy 3 items, get 10 dollars off purchase

<?xml version="1.0" encoding="utf-8"?>
<ns1:Price xmlns:ns1="http://sap.com/xi/StoreConnectivity" Version="1.0" MajorVersion="2"  MinorVersion="0"  FixVersion="1" >
               <PriceMessage MessageID="0000000000255141">
                              <RequestType>AddUpdate</RequestType>
                              <BusinessUnit TypeCode="RetailStore">0000009901</BusinessUnit>
                              <PriceRuleSet>
                                             ...
                                             <PriceRule>
                                                            <PriceRuleID>BB3AT10</PriceRuleID>
                                                            <Description Language="EN">Buy 3 get 10$ off total</Description>
                                                            <Eligibility>
                                                                           <ThresholdQuantity Units="2"/>
                                                                           <LimitQuantity Units="1"/>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000005657</ItemID>
                                                                           </Eligibility>
                                                            </Eligibility>
                                                            <Derivation>
                                                                           <RetailPriceModifier DiscountBenefit= "Customer" Direction= "Down" >
                                                                                          ...
                                                                                          <Amount Currency= "USD" >10.00</Amount>
                                                                                          ...
                                                                           </RetailPriceModifier>
                                                            </Derivation>
                                                            <ConcurrenceCode>Y</ConcurrenceCode>
                                                            <EffectiveDateTimestamp>20070419</EffectiveDateTimestamp>
                                                            <ExpirationDateTimestamp>99991231</ExpirationDateTimestamp>
                                             </PriceRule>
                              </PriceRuleSet>
               </PriceMessage>
               ...
</ns1:Price>

Sample: Buy 2 items, get 1 for 5 dollars

<?xml version="1.0" encoding="utf-8"?>
<ns1:Price xmlns:ns1="http://sap.com/xi/StoreConnectivity" Version="1.0" MajorVersion="2"  MinorVersion="0"  FixVersion="1" >
               <PriceMessage MessageID="0000000000255141">
                              <RequestType>AddUpdate</RequestType>
                              <BusinessUnit TypeCode="RetailStore">0000009901</BusinessUnit>
                              <PriceRuleSet>
                                             ...
                                             <PriceRule>
                                                            <PriceRuleID>BBPPRICE</PriceRuleID>
                                                            <Description Language="EN">Buy 2 Get 1 at $5</Description>
                                                            <Eligibility>
                                                                           <ThresholdQuantity Units="2"/>
                                                                           <LimitQuantity Units="1"/>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000013836</ItemID>
                                                                           </Eligibility>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000010750</ItemID>
                                                                           </Eligibility>
                                                            </Eligibility>
                                                            <Derivation>
                                                                           <NewPrice ValueTypeCode="Promotion" Currency="USD">5.00</NewPrice>
                                                                           <Derivation>
                                                                                          <ItemID Type= "PLU" >2050000013837</ItemID>
                                                                           </Derivation>
                                                            </Derivation>
                                                            <ConcurrenceCode>N</ConcurrenceCode>
                                                            <EffectiveDateTimestamp>20070419</EffectiveDateTimestamp>
                                                            <ExpirationDateTimestamp>99991231</ExpirationDateTimestamp>
                                             </PriceRule>
                              </PriceRuleSet>
               </PriceMessage>
               ...
</ns1:Price>

Sample: Buy 3 items for 10 dollars

<?xml version="1.0" encoding="utf-8"?>
<ns1:Price xmlns:ns1="http://sap.com/xi/StoreConnectivity" Version="1.0" MajorVersion="2"  MinorVersion="0"  FixVersion="1" >
               <PriceMessage MessageID="0000000000255141">
                              <RequestType>AddUpdate</RequestType>
                              <BusinessUnit TypeCode="RetailStore">0000009901</BusinessUnit>
                              <PriceRuleSet>
                                             ...
                                             <PriceRule>
                                                            <PriceRuleID>BBTOTPPRICE</PriceRuleID>
                                                            <Description Language="EN">Buy 3 for $10</Description>
                                                            <Eligibility>
                                                                           <ThresholdQuantity Units="3"/>
                                                                           <LimitQuantity Units="0"/>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000013840</ItemID>
                                                                           </Eligibility>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000010760</ItemID>
                                                                           </Eligibility>
                                                            </Eligibility>
                                                            <Derivation>
                                                                           <NewPrice ValueTypeCode="Promotion" Currency="USD">10.00</NewPrice>
                                                            </Derivation>
                                                            <ConcurrenceCode>N</ConcurrenceCode>
                                                            <EffectiveDateTimestamp>20070419</EffectiveDateTimestamp>
                                                            <ExpirationDateTimestamp>99991231</ExpirationDateTimestamp>
                                             </PriceRule>
                              </PriceRuleSet>
               </PriceMessage>
               ...
</ns1:Price>

Sample: Buy one item, Get a free gift

<?xml version="1.0" encoding="utf-8"?>
<ns1:Price xmlns:ns1="http://sap.com/xi/StoreConnectivity" Version="1.0" MajorVersion="2"  MinorVersion="0"  FixVersion="1" >
               <PriceMessage MessageID="0000000000255141">
                              <RequestType>AddUpdate</RequestType>
                              <BusinessUnit TypeCode="RetailStore">0000009901</BusinessUnit>
                              <PriceRuleSet>
                                             ...
                                             <PriceRule>
                                                            <PriceRuleID>BBGIFT</PriceRuleID>
                                                            <Description Language="EN">Buy 1 Get 1 Free Gift</Description>
                                                            <Eligibility>
                                                                           <ThresholdQuantity Units="1"/>
                                                                           <LimitQuantity Units="1"/>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000006401</ItemID>
                                                                           </Eligibility>
                                                                           <Eligibility>
                                                                                          <ItemID Type= "PLU" >2050000006432</ItemID>
                                                                           </Eligibility>
                                                            </Eligibility>
                                                            <Derivation>
                                                                           <RetailPriceModifier DiscountBenefit= "Customer" Direction= "Down" >
                                                                                          ...
                                                                                          <Percent>100</Percent>
                                                                                          ...
                                                                           </RetailPriceModifier>
                                                                           <Derivation>
                                                                                          <ItemID Type= "PLU" >2050000006402</ItemID>
                                                                           </Derivation>
                                                                           <Derivation>
                                                                                          <ItemID Type= "PLU" >2050000006433</ItemID>
                                                                           </Derivation>
                                                            </Derivation>
                                                            <ConcurrenceCode>N</ConcurrenceCode>
                                                            <EffectiveDateTimestamp>20070419</EffectiveDateTimestamp>
                                                            <ExpirationDateTimestamp>99991231</ExpirationDateTimestamp>
                                             </PriceRule>
                              </PriceRuleSet>
               </PriceMessage>
               ...
</ns1:Price>

Format of SAP (GM) POS Flat Files

The mix match download involves the creation of three (3) flat files in the SAP (GM) POS system:
   

  1. PLU File Update Records
  2. Mixmatch Table
  3. Discount Inclusion/Exclusion Records

These files are often referred to as PLUTXN, MIXMATCH and DISCINEX, respectively. The extension of these files is .asc (ASCII).
With each download, a trigger file is also created to indicate to SAP (GM) POS that an update to the database is necessary. When new mix match data is downloaded, the old records are overwritten. On the other hand, if new article data is downloaded before the previous changes are applied, the new article records are appended to the previous flat files. The same logic for article records is applicable for the inclusion/exclusion records.
 
 

PLU File Update Records

The bonus buy numbers in the ERP system are listed as numeric values in this file since they are transformed via a value mapping. For more information, refer to Section 9.

Sample Flat File: Translation of IXRetail Item Maintenance Message of Store 0000009901 into PLUTXN flat file

2, 2050000005657,,,,,20,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000013836,,,,,21,,,,,,,,,,,,,,,,,,,,,,,,,,,26,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000006401,,,,,22,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000006432,,,,,22,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
...
2, 2050000016479,,,,,23,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000015458,,,,,23,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000029202,,,,,24,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000029332,,,,,25,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000010750,,,,,26,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000013840,,,,,27,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000010760,,,,,27,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Note that the following records will also be downloaded using inclusion/exclusion functionality:

2, 2050000029202,,,,,24,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000029333,,,,,25,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000013837,,,,,21,,,,,,,,,,,,,,,,,,,,,,,,,,,26,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

2, 2050000006402,,,,,22,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2, 2050000006433,,,,,22,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
...

XML representation of PLUTXN file

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMPluTxn xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>PLUTXN</FileName>
         </Header>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000005657</PLU>
                      ..
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>20</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000013836</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>21</MixMatchID>
                      ...
                      <MixMatch2>26</MixMatch2>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000006401</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>22</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000006432</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>22</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         ...
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000016479</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>23</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000015458</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>23</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000029202</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>24</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000029332</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>25</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000010750</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>26</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000013840</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>27</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <PLU>2050000010760</PLU>
                      ...
                      <PLUDescription/>
                      <RetailPrice/>
                      <MixMatchID>27</MixMatchID>
                      ...
                      <MixMatch2/>
                      <MixMatch3/>
                      <MixMatch4/>
                      ...
         </Body>
          ...
</ns2:GMPluTxn>

Note that additional records will be downloaded when using inclusion/exclusion functionality of SAP (GM) POS 2.0. Refer to the previous Section "Translation of IXRetail Item Maintenance Message of Store 0000009901 into PLUTXN flat file" for more details on these records.

Based on the XML representation, the following table provides a description of some of the main elements in the PLUTXN ASCII flat file:

PLUTXN elements 
Description 
StoreNumber 
Directory where the source file must be stored in the POS system. Note that the directory name corresponds to the store number. 
FileName 
Name of target file. 
Body 
Each segment represents an article. 
UpdateType 
Specifies the action performed on the article information. 
PLU 
The international article number (EAN/UPC) for an article. 
MixMatchID 
The mix match number for which the article is eligible for. 
MixMatch[2-4] 
Additional mix match numbers for which the article is eligible for. Note that a maximum of four mix matches can be assigned to an article at one time. 

         
Note that the <Header> data is extracted to determine the directory and name of the file to be created in the POS system, and is not part of the flat file.

Mixmatch Table File

The bonus buy numbers in the ERP system are listed as numeric values in this file since they are transformed via a value mapping. For more information, refer to Section 9.
 

Sample Flat File: Translation of IXRetail Price Message of Store 0000009901 into MIXMATCH flat file without Inclusion/Exclusion Functionality

20,2,,,,,BUY 3 GET 10$ OFF,1,,10.00,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,10,,N,,,,,BUY 3 GET 10$ OFF,,,,,,,,N,N,N,N,,,,,   [TOTAL]
21,3,,,,,BUY 3 GET 5 $ OFF,1,,5.00,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 07/04/19,,,,Y,,,,,BUY 3 GET 5 $ OFF,,,,,,,,N,N,N,N,,,,,   [ITEM]
22,1,,,,,BUY 1 GET 1 FREE GIFT,1,,,100,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 1 GET 1 FREE GIFT,,,,,,,,N,Y,Y,N,,,,,
23,2,,,,,BUY 2 GET 50PERC,,,,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,10,,Y,50,,,,BUY 2 GET 50PERC,,,,,,,,N,N,N,N,,,,, [TOTAL]
24,2,,,,,BUY 2 GET 1 FREE,1,,,100,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 2 GET 1 FREE,,,,,,,,N,Y,Y,N,,,,,
25,2,,,,,BUY 2 GET 50PERC,1,,,50,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 2 GET 50PERC,,,,,,,,N,N,N,N,,,,,   [ITEM]
26,2,,,,,BUY 2 GET 1 AT $5,1,5.00,,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 2 GET 1 AT $5,,,,,,,,N,Y,Y,N,,,,,    [ITEM]
27,3,,10.00,,,BUY 3 FOR $10,,,,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 3 FOR $10,,,,,,,,N,Y,Y,N,,,,,  [TOTAL] 

Sample Flat File: Translation of IXRetail Price Message of Store 0000009901 into MIXMATCH flat file with Inclusion/Exclusion Functionality

20,2,,,,,BUY 3 GET 10$ OFF,1,,10.00,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,10,,N,,,,,BUY 3 GET 10$ OFF,,,,,,,,N,Y,N,N,,,,,,,,,,,,,,,00:00,23:59,N,0   [TOTAL]
21,3,,,,,BUY 3 GET 5 $ OFF,1,,5.00,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 07/04/19,,,,Y,,,,,BUY 3 GET 5 $ OFF,,,,,,,,N,Y,N,N,,,,,,41,42,,,,,,,,,00:00,23:59,N,0   [ITEM]
22,1,,,,,BUY 1 GET 1 FREE GIFT,1,,,100,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 1 GET 1 FREE GIFT,,,,,,,,N,Y,Y,N,,,,,,43,44,,,,,,,,,00:00,23:59,N,0
23,2,,,,,BUY 2 GET 50PERC,,,,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,10,,Y,50,,,,BUY 2 GET 50PERC,,,,,,,,N,Y,N,N,,,,,,,,,,,,,,,,00:00,23:59,N,0 [TOTAL]
24,2,,,,,BUY 2 GET 1 FREE,1,,,100,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 2 GET 1 FREE,,,,,,,,N,Y,Y,N,,,,,,,,,,,,,,,,00:00,23:59,N,0
25,2,,,,,BUY 2 GET 50PERC,1,,,50,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 2 GET 50PERC,,,,,,,,N,Y,N,N,,,,,,49,50,,,,,,,,,00:00,23:59,N,0   [ITEM]
26,2,,,,,BUY 2 GET 1 AT $5,1,5.00,,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 2 GET 1 AT $5,,,,,,,,N,Y,Y,N,,,,,,51,52,,,,,,,,,00:00,23:59,N,0  [ITEM]
27,3,,10.00,,,BUY 3 FOR $10,,,,,,,N,,N,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,07/04/19,,12,,Y,,,,,BUY 3 FOR $10,,,,,,,,N,Y,Y,N,,,,,,,,,,,,,,,,00:00,23:59,N,0 [TOTAL] 

Note that the length of the description for the mix match is restricted to 20 characters. Therefore, the description will be truncated in the output as it appears in the sample above. To differentiate total sale and article level promotions, the tags [TOTAL] and [ITEM] are used for illustration purposes only.

XML representation of MIXMATCH file

Based on the XML representation below, the following table provides a description of the common elements in the MIXMATCH flat file for each type of mix match scenario:

MIXMATCH elements 
Description 
StoreNumber 
Directory where the source file must be stored in the POS system. Note that the directory name corresponds to the store number. 
FileName 
Name of target file. 
Body 
Each segment represents a mix match or price rule. 
MixMatchID 
The mix match number. 
Alt1Qty 
Indicates the minimum number of items to purchase. 
MixMatchDesc 
Description of the mix match. 
Alt2Qty 
Indicates the number of items for which the mix match is granted. 
StartDate 
Date when the mix match starts. 
StopDate 
Date when the mix match ends. 
Note that an end date with year '9999' from the ERP is not supported by the POS. If this is the case, no date is specified. 
ApplyDiscToAltNo 
Specifies whether the discount is prorated or not. 
MustCompleteMM 
Indicates that the prerequisites of the mix match must be completely satisfied. 
MMDiscDesc 
Description of the mix match. 
RecalcPromoAndDisc 
This field indicates that promotions and discounts are to be re-calculated after a mix match is applied. 
AtTotalThis field indicates that the mix match must be applied at the end of the transaction. 
Note that the default value is 'Y' when using Inclusion/Exclusion functionality. Otherwise, the value is dependent on the mix match scenario as specified in the examples.
DiscOnLowerPriceThis field indicates that the discount is applied on the lowest price article from a set of different priced articles. 
Note that the value is dependent on the mix match scenario as specified in the examples.
GlobalIncluExcluIDIdentifier for the set of items to be used in a mix-match for a Merchandise Type mix match. 
InclusionExclusionIDAlt1 
Identifier for the list of items to be included or excluded from being purchased for a given mix match. 
Note that: 
1) this field is available in the interface of SAP (GM) POS 2.0 release. It is used for Inclusion/Exclusion.   
2) this field is not populated if the discount is granted on the total purchase OR if the 'Buy' and 'Get' set of articles are identical. 
InclusionExclusionIDAlt2 
Identifier for the list of items to be included or excluded from being received when a mix match is granted.  
Note that: 
1) this field is available in the interface of SAP (GM) POS 2.0 release. It is used for Inclusion/Exclusion.   
2) this field is not populated if the discount is granted on the total purchase OR if the 'Buy' and 'Get' set of articles are identical. 
RecalculateItemDiscounts
Indicates that item discounts must be re-calculated if a mix match is applied. 
Note that this field is available in the interface of SAP (GM) POS 2.0 release. 
PricingTargetType 
Indicates that the mixmatches are applicable to certain target groups. 
Note that this field is available in the interface of SAP (GM) POS 2.0 release. 

         
Note that the <Header> data is extracted to determine the directory and name of the file to be created in the POS system, and is not part of the flat file.

The following samples are the XML representations of mix matches using the inclusion/exclusion functionality:

Sample: Buy 2 items, Get One Free (lowest price)

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMMixMatch xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>MIXMATCH</FileName>
         </Header>
         <Body>
                      <MixMatchID>24</MixMatchID>
                      <Alt1Qty>2</Alt1Qty>
                      ...
                      <MixMatchDesc>BUY 2 GET 1 FREE</MixMatchDesc>
                      <Alt2Qty>1</Alt2Qty>
                      <Alt2SellPrice/>
                      <Alt2DollarOff/>
                      <Alt2PercentageOff>100</Alt2PercentageOff>
                      ...
                      <StartDate>07/04/19</StartDate>
                      <StopDate/>
                      <ApplyDiscToAltNo>12</ApplyDiscToAltNo>
                      ...
                      <MustCompleteMM>Y</MustCompleteMM>
                      <Alt1PercentageOff/>
                      ...
                      <MMDiscDesc>BUY 2 GET 1 FREE</MMDiscDesc>
                      ...
                      <RecalcPromoAndDisc>N</RecalcPromoAndDisc>
                      <AtTotal>Y</AtTotal>
                      <DiscOnLowerPrice>Y</DiscOnLowerPrice>
                      ...
                      <GlobalIncluExcluID/>
                      <InclusionExclusionIDAlt1/>
                      <InclusionExclusionIDAlt2/>
                      ...
                      <StartTime>00:00</StartTime>
                      <StopTime>23:59</StopTime>
                      <RecalculateItemDiscounts>N</RecalculateItemDiscounts>
                      <PricingTargetType>0</PricingTargetType>
         </Body>
         ...
</ns2:GMMixMatch>

The fields in the MIXMATCH flat file for this scenario are described below:

MIXMATCH elements 
Description 
Alt2PercentageOff 
Specifies the percentage amount for the discount to be applied to the number of items specified in Alt2Qty field. For this case, the percentage is 100 since the article(s) are free. 
AtTotal 
This field indicates that the mix match must be applied at the end of the transaction. 
DiscOnLowerPrice 
This field indicates that the discount is applied on the lowest price article from a set of different priced articles. 


Sample: Buy 2 items, get 50 percent off an additional item

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMMixMatch xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>MIXMATCH</FileName>
         </Header>
         <Body>
                      <MixMatchID>25</MixMatchID>
                      <Alt1Qty>2</Alt1Qty>
                      ...
                      <MixMatchDesc>BUY 2 GET 50PERC</MixMatchDesc>
                      <Alt2Qty>1</Alt2Qty>
                      <Alt2SellPrice/>
                      <Alt2DollarOff/>
                      <Alt2PercentageOff>50<Alt2PercentageOff/>
                      ...
                      <StartDate>07/04/19</StartDate>
                      <StopDate/>
                      <ApplyDiscToAltNo>12</ApplyDiscToAltNo>
                      ...
                      <MustCompleteMM>Y</MustCompleteMM>
                      <Alt1PercentageOff/>
                      ...
                      <MMDiscDesc>BUY 2 GET 50PERC</MMDiscDesc>
                      ...
                      <RecalcPromoAndDisc>N</RecalcPromoAndDisc>
                      <AtTotal>Y</AtTotal>
                      <DiscOnLowerPrice>N</DiscOnLowerPrice>
                      ...
                      <GlobalIncluExcluID/>
                      <InclusionExclusionIDAlt1>49</InclusionExclusionIDAlt1>
                      <InclusionExclusionIDAlt2>50</InclusionExclusionIDAlt2>
                      ...
                      <StartTime>00:00</StartTime>
                      <StopTime>23:59</StopTime>
                      <RecalculateItemDiscounts>N</RecalculateItemDiscounts>
                      <PricingTargetType>0</PricingTargetType>

         </Body>
         ...
</ns2:GMMixMatch>

The fields in the MIXMATCH flat file for this scenario are described below:

MIXMATCH elements 
Description 
Alt2PercentageOff 
Specifies the percentage amount for the discount to be applied to the number of items specified in Alt2Qty field. 


Sample: Buy 2 items, get 50 percent off purchase

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMMixMatch xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>MIXMATCH</FileName>
         </Header>
         <Body>
                      <MixMatchID>23</MixMatchID>
                      <Alt1Qty>2</Alt1Qty>
                      ...
                      <MixMatchDesc>BUY 2 GET 50PERC</MixMatchDesc>
                      <Alt2Qty/>
                      <Alt2SellPrice/>
                      <Alt2DollarOff/>
                      <Alt2PercentageOff/>
                      ...
                      <StartDate>07/04/19</StartDate>
                      <StopDate/>
                      <ApplyDiscToAltNo>10</ApplyDiscToAltNo>
                      ...
                      <MustCompleteMM>Y</MustCompleteMM>
                      <Alt1PercentageOff>50</Alt1PercentageOff>
                      ...
                      <MMDiscDesc>BUY 2 GET 50PERC</MMDiscDesc>
                      ...
                      <RecalcPromoAndDisc>N</RecalcPromoAndDisc>
                      <AtTotal>Y</AtTotal>
                      <DiscOnLowerPrice>N</DiscOnLowerPrice>
                      ...
                      <GlobalIncluExcluID/>
                      <InclusionExclusionIDAlt1/>
                      <InclusionExclusionIDAlt2/>
                      ...
                      <StartTime>00:00</StartTime>
                      <StopTime>23:59</StopTime>
                      <RecalculateItemDiscounts>N</RecalculateItemDiscounts>
                      <PricingTargetType>0</PricingTargetType>

         </Body>
         ...
</ns2:GMMixMatch>

The fields in the MIXMATCH flat file for this scenario are described below:

MIXMATCH elements 
Description 
Alt1Qty 
Normally, this element indicates the minimum number of items to purchase. For this scenario, it indicates the total number of items to be purchased for the mix match condition to be granted. 
Alt1PercentageOff 
Specifies the percentage amount for the discount to be applied to the number of items specified in Alt1Qty field. 


Sample: Buy 3 items, get 5 dollars off an additional item

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMMixMatch xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>MIXMATCH</FileName>
         </Header>
         <Body>
                      <MixMatchID>21</MixMatchID>
                      <Alt1Qty>3</Alt1Qty>
                      ...
                      <MixMatchDesc>BUY 3 GET 5$ OFF</MixMatchDesc>
                      <Alt2Qty>1</Alt2Qty>
                      <Alt2SellPrice/>
                      <Alt2DollarOff>5.00</Alt2DollarOff>
                      <Alt2PercentageOff/>
                      ...
                      <StartDate>07/04/19</StartDate>
                      <StopDate/>
                      <ApplyDiscToAltNo/>
                      <Filler4/>
                      <MustCompleteMM>Y</MustCompleteMM>
                      <Alt1PercentageOff/>
                      ...
                      <MMDiscDesc>BUY 3 GET 5$ OFF</MMDiscDesc>
                      ...
                      <RecalcPromoAndDisc>N</RecalcPromoAndDisc>
                      <AtTotal>Y</AtTotal>
                      <DiscOnLowerPrice>N</DiscOnLowerPrice>
                      ...
                      <GlobalIncluExcluID/>
                      <InclusionExclusionIDAlt1>41</InclusionExclusionIDAlt1>
                      <InclusionExclusionIDAlt2>42</InclusionExclusionIDAlt2>
                      ...
                      <StartTime>00:00</StartTime>
                      <StopTime>23:59</StopTime>
                      <RecalculateItemDiscounts>N</RecalculateItemDiscounts>
                      <PricingTargetType>0</PricingTargetType>        
         </Body>
         ...
</ns2:GMMixMatch>

The fields in the MIXMATCH flat file for this scenario are described below:

MIXMATCH elements 
Description 
Alt2DollarOff 
Specifies the actual amount in the appropriate currency for the discount to be applied to the number of items specified in Alt2Qty field. 

Sample: Buy 3 items, get 10 dollars off purchase

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMMixMatch xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>MIXMATCH</FileName>
         </Header>
         <Body>
                      <MixMatchID>20</MixMatchID>
                      <Alt1Qty>2</Alt1Qty>
                      ...
                      <MixMatchDesc>BUY 3 GET 10$ OFF</MixMatchDesc>
                      <Alt2Qty>1</Alt2Qty>
                      <Alt2SellPrice/>
                      <Alt2DollarOff>10.00</Alt2DollarOff>
                      <Alt2PercentageOff/>
                      ...
                      <StartDate>07/04/19</StartDate>
                      <StopDate/>
                      <ApplyDiscToAltNo>10</ApplyDiscToAltNo>
                      ...
                      <MustCompleteMM>N</MustCompleteMM>
                      <Alt1PercentageOff/>
                      ...
                      <MMDiscDesc>BUY 3 GET 10$ OFF</MMDiscDesc>
                      ...
                      <RecalcPromoAndDisc>N</RecalcPromoAndDisc>
                      <AtTotal>Y</AtTotal>
                      <DiscOnLowerPrice>N</DiscOnLowerPrice>
                     ...
                      <GlobalIncluExcluID/>
                      <InclusionExclusionIDAlt1/>
                      <InclusionExclusionIDAlt2/>
                      ...
                      <StartTime>00:00</StartTime>
                      <StopTime>23:59</StopTime>
                      <RecalculateItemDiscounts>N</RecalculateItemDiscounts>
                      <PricingTargetType>0</PricingTargetType>  
         </Body>
         ...
</ns2:GMMixMatch>

The fields in the MIXMATCH flat file for this scenario are described below:

MIXMATCH elements 
Description 
Alt2DollarOff 
Specifies the actual amount in the appropriate currency for the discount to be applied to the total sale. 
MustCompleteMM 
Indicates that the prerequisites of the mix match must be completely satisfied. This differentiates it from the previous mix match on an item level. 
ApplyDiscToAltNo 
Specifies whether the discount is prorated or not. For the total sale, it is prorated. 

Sample: Buy 2 items, get 1 at 5 dollars

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMMixMatch xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>MIXMATCH</FileName>
         </Header>
         <Body>
                      <MixMatchID>26</MixMatchID>
                      <Alt1Qty>2</Alt1Qty>
                      ...
                      <MixMatchDesc> BUY 2 GET 1 AT $5</MixMatchDesc>
                      <Alt2Qty>1</Alt2Qty>
                      <Alt2SellPrice>5.00</Alt2SellPrice>
                      <Alt2DollarOff/>
                      <Alt2PercentageOff/>
                      ...
                      <StartDate>07/04/19</StartDate>
                      <StopDate/>
                      <ApplyDiscToAltNo>12</ApplyDiscToAltNo>
                      <Filler4/>
                      <MustCompleteMM>Y</MustCompleteMM>
                      <Alt1PercentageOff/>
                      ...
                      <MMDiscDesc>BUY 2 GET 1 AT $5</MMDiscDesc>
                      ...
                      <RecalcPromoAndDisc>N</RecalcPromoAndDisc>
                      <AtTotal>Y</AtTotal>
                      <DiscOnLowerPrice>Y</DiscOnLowerPrice>
                       ...
                      <GlobalIncluExcluID/>
                      <InclusionExclusionIDAlt1>51</InclusionExclusionIDAlt1>
                      <InclusionExclusionIDAlt2>52</InclusionExclusionIDAlt2>
                      ...
                      <StartTime>00:00</StartTime>
                      <StopTime>23:59</StopTime>
                      <RecalculateItemDiscounts>N</RecalculateItemDiscounts>
                      <PricingTargetType>0</PricingTargetType>       
         </Body>
         ...
</ns2:GMMixMatch>

The fields in the MIXMATCH flat file for this scenario are described below:

MIXMATCH elements 
Description 
Alt2SellPrice 
Specifies the actual price in the appropriate currency for the discounted item(s). 

Sample: Buy 3 items for 10 dollars

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMMixMatch xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>MIXMATCH</FileName>
         </Header>
         <Body>
                      <MixMatchID>27</MixMatchID>
                      <Alt1Qty>3</Alt1Qty>
                      ...
                      <Alt1SellPrice>10.00</Alt2SellPrice>
                      ...
                      <MixMatchDesc> BUY 3 FOR $10</MixMatchDesc>
                      ...
                      <StartDate>07/04/19</StartDate>
                      <StopDate/>
                      <ApplyDiscToAltNo>12</ApplyDiscToAltNo>
                      <Filler4/>
                      <MustCompleteMM>Y</MustCompleteMM>
                      ...
                      <MMDiscDesc>BUY 3 FOR $10</MMDiscDesc>
                      ...
                      <RecalcPromoAndDisc>N</RecalcPromoAndDisc>
                      <AtTotal>Y</AtTotal>
                      <DiscOnLowerPrice>Y</DiscOnLowerPrice>
                       ...
                      <GlobalIncluExcluID/>
                      <InclusionExclusionIDAlt1/>
                      <InclusionExclusionIDAlt2/>
                      ...
                      <StartTime>00:00</StartTime>
                      <StopTime>23:59</StopTime>
                      <RecalculateItemDiscounts>N</RecalculateItemDiscounts>
                      <PricingTargetType>0</PricingTargetType>       
         </Body>
         ...
</ns2:GMMixMatch>

The fields in the MIXMATCH flat file for this scenario are described below:

MIXMATCH elements 
Description 
Alt1SellPrice 
Specifies the actual price in the appropriate currency for the total purchase. 

Sample: Buy one item, Get free gift

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMMixMatch xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>MIXMATCH</FileName>
         </Header>
         <Body>
                      <MixMatchID>22</MixMatchID>
                      <Alt1Qty>1</Alt1Qty>
                      ...
                      <MixMatchDesc>BUY 1 GET 1 FREE GIFT</MixMatchDesc>
                      <Alt2Qty>1</Alt2Qty>
                      <Alt2SellPrice/>
                      <Alt2DollarOff/>
                      <Alt2PercentageOff>100</Alt2PercentageOff>
                      ...
                      <StartDate>07/04/19</StartDate>
                      <StopDate/>
                      <ApplyDiscToAltNo>12</ApplyDiscToAltNo>
                      <Filler4/>
                      <MustCompleteMM>Y</MustCompleteMM>
                      <Alt1PercentageOff/>
                      ...
                      <MMDiscDesc>BUY 1 GET 1 FREE GIFT</MMDiscDesc>
                      ...
                      <RecalcPromoAndDisc>N</RecalcPromoAndDisc>
                      <AtTotal>Y</AtTotal>
                      <DiscOnLowerPrice>Y</DiscOnLowerPrice>
                     ...
                      <GlobalIncluExcluID/>
                      <InclusionExclusionIDAlt1>43</InclusionExclusionIDAlt1>
                      <InclusionExclusionIDAlt2>44</InclusionExclusionIDAlt2>
                      ...
                      <StartTime>00:00</StartTime>
                      <StopTime>23:59</StopTime>
                      <RecalculateItemDiscounts>N</RecalculateItemDiscounts>
                      <PricingTargetType>0</PricingTargetType>
         </Body>
         ...
</ns2:GMMixMatch>

The fields in the MIXMATCH flat file for this scenario are described below:

MIXMATCH elements 
Description 
Alt2PercentageOff 
Specifies the percentage amount for the discount to be applied to the number of items specified in Alt2Qty field. For this case, the percentage is 100 since the gift is free. 
AtTotal 
This field indicates that the mix match must be applied at the end of the transaction. 
DiscOnLowerPrice 
This field indicates that the discount is applied on the lowest price article from a set of different priced articles. 


Discount Inclusion and Exclusion Record File

The discount inclusion and exclusion file lists the sets of articles (using the international article number as a reference) that are purchased or received for each defined mix match. 

Sample Flat File: Translation of IXRetail Item Maintenance and Price Messages of Store 0000009901 into DISCINEX flat file         

2,9901,99,99,49,1,MM ID 25 Alt1,1,2050000029332,,,,,,,,,,,,,,,N,
2,9901,99,99,49,2,MM ID 25 Alt1,2,,,,,,,,,,,,,,,,Y,
2,9901,99,99,50,1,MM ID 25 Alt2,1,2050000029333,,,,,,,,,,,,,,,N,
2,9901,99,99,50,2,MM ID 25 Alt2,2,,,,,,,,,,,,,,,,Y,
2,9901,99,99,43,1,MM ID 22 Alt1,1,2050000006401,,,,,,,,,,,,,,,N,
2,9901,99,99,43,2,MM ID 22 Alt1,1,2050000006432,,,,,,,,,,,,,,,N,
2,9901,99,99,43,3,MM ID 22 Alt1,2,,,,,,,,,,,,,,,,Y,
2,9901,99,99,44,1,MM ID 22 Alt2,1,2050000006402,,,,,,,,,,,,,,,N,
2,9901,99,99,44,2,MM ID 22 Alt2,1,2050000006433,,,,,,,,,,,,,,,N,
2,9901,99,99,44,3,MM ID 22 Alt2,2,,,,,,,,,,,,,,,,Y,
2,9901,99,99,41,1,MM ID 21 Alt1,1,2050000013836,,,,,,,,,,,,,,,N,
2,9901,99,99,41,2,MM ID 21 Alt1,2,,,,,,,,,,,,,,,,Y,
2,9901,99,99,42,1,MM ID 21 Alt2,1,2050000013837,,,,,,,,,,,,,,,N,
2,9901,99,99,42,2,MM ID 21 Alt2,2,,,,,,,,,,,,,,,,Y,
2,9901,99,99,51,1,MM ID 26 Alt1,1,2050000013836,,,,,,,,,,,,,,,N,
2,9901,99,99,51,2,MM ID 26 Alt1,1,2050000010750,,,,,,,,,,,,,,,N,
2,9901,99,99,51,3,MM ID 26 Alt1,2,,,,,,,,,,,,,,,,Y,
2,9901,99,99,52,1,MM ID 26 Alt2,1,2050000013837,,,,,,,,,,,,,,,N,
2,9901,99,99,52,2,MM ID 26 Alt2,2,,,,,,,,,,,,,,,,Y,

Note that the length of the description for the inclusion/exclusion record is restricted to 20 characters.

XML representation of DISCINEX file

Based on the XML representation below, the following table provides a description of the elements in the DISCINEX flat file:

DISCINEX elements 
Description 
StoreNumber 
Directory where the source file must be stored in the POS system. Note that the directory name corresponds to the store number. 
FileName 
Name of target file. 
Body 
Each segment represents a mix match or price rule. 
UpdateType 
Specifies the action performed on the inclusion or exclusion record.
Store 
The store for which the discount inclusion and/or exclusion record is applicable. 
InclusionExclusionID
The identifier for the inclusion and/or exclusion record. 
Note that there are 2 identifiers: one for the 'Buy' articles and another for the 'Get' articles per mix match. No identifiers are needed if the discount is granted on the total purchase OR if the 'Buy' and 'Get' set of articles are identical. 
RuleNumber 
This number determines the order that the rules are executed in the inclusion/exclusion record. 
Description 
Specifies the description for the inclusion/exclusion record. 
ApplyType 
Indicates that the information is for inclusion or exclusion. 
Note that the default value is 'Include' except for the last rule that is an 'Exclude' of all other articles. 
PLU 
The international article number (EAN/UPC) for an article. 
AllFlagIndicates that the exact match for the articles is required. 
Note that the default value is 'N' except for the last rule that is an exclusion of all other articles. 

         
Note that the <Header> data is extracted to determine the directory and name of the file to be created in the POS system, and is not part of the flat file.

Sample: Inclusion/Exclusion records for all Mix matches

<?xml version="1.0" encoding="utf-8" ?>
<ns2:GMDiscInEx xmlns:ns2="http://sap.com/xi/GMStoreConnectivity">
         <Header>
                      <StoreNumber>0000009901</StoreNumber>
                      <FileName>DISCINEX</FileName>
         </Header>
           <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                       <InclusionExclusionID>49</InclusionExclusionID>
                       <RuleNumber>1</RuleNumber>
                       <Description>MM ID 25 Alt1</Description>
                       <ApplyType>1</ApplyType>
                       <PLU>2050000029332</PLU>
                       ...
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                       <InclusionExclusionID>49</InclusionExclusionID>
                       <RuleNumber>2</RuleNumber>
                       <Description>MM ID 25 Alt1</Description>
                       <ApplyType>2</ApplyType>
                       <PLU/>
                       ...
                      <AllFlag>Y</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>50</InclusionExclusionID>
                      <RuleNumber>1</RuleNumber>
                      <Description>MM ID 25 Alt2</Description>
                      <ApplyType>1</ApplyType>
                      <PLU>2050000029333</PLU>
                      ...
                       <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>50</InclusionExclusionID>
                      <RuleNumber>2</RuleNumber>
                      <Description>MM ID 25 Alt2</Description>
                      <ApplyType>2</ApplyType>
                      <PLU/>
                      ...
                       <AllFlag>Y</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>43</InclusionExclusionID>
                      <RuleNumber>1</RuleNumber>
                      <Description>MM ID 22 Alt1</Description>
                      <ApplyType>1</ApplyType>
                      <PLU>2050000006401</PLU>
                      ...
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>43</InclusionExclusionID>
                      <RuleNumber>2</RuleNumber>
                      <Description>MM ID 22 Alt1</Description>
                       <ApplyType>1</ApplyType>
                      <PLU>2050000006432</PLU>
                      ...
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>43</InclusionExclusionID>
                      <RuleNumber>3</RuleNumber>
                      <Description>MM ID 22 Alt1</Description>
                       <ApplyType>2</ApplyType>
                      <PLU/>
                      ...
                      <AllFlag>Y</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>44</InclusionExclusionID>
                      <RuleNumber>1</RuleNumber>
                      <Description>MM ID 22 Alt2</Description>
                      <ApplyType>1</ApplyType>
                      <PLU>2050000006402</PLU>
                      ...
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>44</InclusionExclusionID>
                      <RuleNumber>2</RuleNumber>
                      <Description>MM ID 22 Alt2</Description>
                      <ApplyType>1</ApplyType>
                      <PLU>2050000006433</PLU>
                       ...
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>44</InclusionExclusionID>
                      <RuleNumber>3</RuleNumber>
                      <Description>MM ID 22 Alt2</Description>
                      <ApplyType>2</ApplyType>
                      <PLU/>
                       ...
                      <AllFlag>Y</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>41</InclusionExclusionID>
                      <RuleNumber>1</RuleNumber>
                      <Description>MM ID 21 Alt1</Description>
                      <ApplyType>1</ApplyType>
                      <PLU>2050000013836</PLU>
                      ...
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>41</InclusionExclusionID>
                      <RuleNumber>2</RuleNumber>
                      <Description>MM ID 21 Alt1</Description>
                      <ApplyType>2</ApplyType>
                      <PLU/>
                      ...
                      <AllFlag>Y</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>42</InclusionExclusionID>
                      <RuleNumber>1</RuleNumber>
                      <Description>MM ID 21 Alt2</Description>
                      <ApplyType>1</ApplyType>
                      <PLU>2050000013837</PLU>
                      ..
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>42</InclusionExclusionID>
                      <RuleNumber>2</RuleNumber>
                      <Description>MM ID 21 Alt2</Description>
                      <ApplyType>2</ApplyType>
                      <PLU/>
                      ..
                      <AllFlag>Y</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>51</InclusionExclusionID>
                      <RuleNumber>1</RuleNumber>
                      <Description>MM ID 26 Alt1</Description>
                      <ApplyType>1</ApplyType>
                      <PLU>2050000013836</PLU>
                       ...
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>51</InclusionExclusionID>
                      <RuleNumber>2</RuleNumber>
                      <Description>MM ID 26 Alt1</Description>
                      <ApplyType>1</ApplyType>
                      <PLU>2050000010750</PLU>
                      ...
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>51</InclusionExclusionID>
                      <RuleNumber>3</RuleNumber>
                      <Description>MM ID 26 Alt1</Description>
                      <ApplyType>2</ApplyType>
                      <PLU/>
                      ...
                      <AllFlag>Y</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>52</InclusionExclusionID>
                      <RuleNumber>1</RuleNumber>
                      <Description>MM ID 26 Alt2</Description>
                      <ApplyType>1</ApplyType>
                      <PLU>2050000013837</PLU>
                      ..
                      <AllFlag>N</AllFlag>
                      <NonMerchandiseID/>
         </Body>
         <Body>
                      <UpdateType>2</UpdateType>
                      <Store>9901</Store>
                      ...
                      <InclusionExclusionID>52</InclusionExclusionID>
                      <RuleNumber>2</RuleNumber>
                      <Description>MM ID 26 Alt2</Description>
                      <ApplyType>2</ApplyType>
                      <PLU/>
                      ..
                      <AllFlag>Y</AllFlag>
                      <NonMerchandiseID/>
         </Body>

         ...
</ns2:GMDiscInEx>


First Transformation in XI: Bonus Buy Conditions IDoc to IXRetail Item Maintenance and Price Messages

Description

In this transformation step, two (2) IXRetail messages are created.

Field Transformation Table

Source field in IDoc 
Comments 
Target field in ItemMaintenance 
E1WPBB01-> FILIALE 
 BusinessUnit 
E1WPBB04 segment 
 Item node 
E1WPBB01 -> AENDKENNZ 
 Item-> @Action 
E1WPBB04 -> MAT_EAN 
OR 
E1WPBB02 -> MAT_EAN
 Item-> ItemID 
 If E1WPBB04-> MAT_EAN is available, the default value is 'BuyArticle'. 
If E1WPBB02-> MAT_EAN is available, the default value is 'GetArticle'.
ItemID-> @Qualifier
E1WPBB01 -> BBY_NR 
 Item-> MixMatch 
EDI_DC40-> DOCNUM 
 Batch-> BatchID 
   
Source field in IDoc 
Comments 
Target field in  Price message 
E1WPBB01 segment 
 PriceMessage node 
EDI_DC40-> DOCNUM 
 PriceMessage-> @MessageID 
E1WPBB01-> AENDKENNZ 
 PriceMessage->RequestType 
E1WPBB01-> FILIALE 
 PriceMessage-> BusinessUnit 
E1WPBB01 -> BBY_NR 
 PriceRule-> PriceRuleID 
E1WPBB07 -> SHORT_TEXT  
OR 
E1WPBB01 -> BBY_NR
E1WPBB07->SHORT_TEXT if it exists; otherwise, use E1WPBB01 -> BBY_NR.PriceRule-> Description 
E1WPBB07 -> LANGUAGE_ISO 
 Description-> @Language 
E1WPBB06 -> FG_MIN_QUAN 
 Eligibility->ThresholdQuantity-> @Units 
 This value is derived based on the bonus buy scenario. 
Eligibility->LimitQuantity-> @Units 
E1WPBB04 -> MAT_EAN Eligibility-> Eligibility-> ItemID 
E1WPBB06 -> KOND_VAL 
 Derivation-> NewPrice
E1WPBB06 -> KOND_CURCY_ISO NewPrice-> @Currency
E1WPBB02 -> MAT_EAN Derivation-> Derivation-> ItemID
E1WPBB06 -> KOND_VAL 
 RetailPriceModifier-> Amount 
E1WPBB06 -> KOND_CURCY_ISO 
 Amount-> @Currency 
E1WPBB06 -> KOND_PER 
This value is derived for the "get free item" or "get free gift" bonus buy scenario. 
RetailPriceModifier-> Percent 
E1WPBB06 -> CALC_RULE 
This value is derived based on the bonus buy scenario. 
PriceRule-> ConcurrenceCode 
E1WPBB05 -> START_DATE 
 PriceRule-> EffectiveDateTimestamp 
E1WPBB05 -> END_DATE 
 PriceRule-> ExpirationDateTimestamp 


Second Transformation in XI: IXRetail Item Maintenance and Price Messages to SAP (GM) POS Flat Files

Description

         
The SAP (GM) POS system supports only numeric values for the bonus buy number whereas the ERP supports alphanumeric strings. Value mappings exist to address this incompatibility issue. For example, bonus buy GMBB1FREE from the ERP can be converted to mix match number 24 via the value mapping. 

For the inclusion/exclusion file, the identifiers are derived from the bonus buy number so the bonus buy identifier must be numeric. The value mapping for bonus buy number conversion is also used in the instance.

It is already possible today to define number ranges for bonus buy IDs in ERP and use it in the desired manner at the POS, e.g. restrict BBY IDs to 1 to 255. In these number ranges are used, no value mapping is required.

Field Transformation Table

Source field in ItemMaintenance 
Comments 
Target field in PLUTXN 
ItemMaintenance -> BusinessUnit 
 Header->StoreNumber 
Item -> @Action 
 Body->UpdateType 
Item -> ItemID 
Item(s) with ItemID->@Qualifer='BuyArticle' AND ItemID->@Qualifier='GetArticle' when using Inclusion/Exclusion.   
Otherwise, Item(s) with ItemID->@Qualifier='BuyArticle' only.
Body->PLU 
Item -> MixMatch 
Use value mapping for conversion: 
Source: 
IXRetailMixMatchID/Schema 
Target: 
GMMixMatchID/Schema 
Body-> MixMatchID 
Item -> MixMatch 
Use value mapping for conversion: 
Source: 
IXRetailMixMatchID/Schema 
Target: 
GMMixMatchID/Schema 
Body-> MixMatch[2-4] 
   
Source field in Price 
Comments 
Target field in MIXMATCH 
PriceMessage -> BusinessUnit 
 Header->StoreNumber 
PriceRule-> PriceRuleID 
Use value mapping for conversion: 
Source: 
IXRetailMixMatchID/Schema 
Target: 
GMMixMatchID/Schema 
Body-> MixMatchID