Skip to Content
Technical Articles
Author's profile photo Tushar Shukla

EAN128/GS128 Application Identifier implementation in EWM


In this blog post we will discuss how to configure and implement the EAN128 barcode Application Identifier mapping in EWM.

Application Identifiers (AIs) are prefixes used in barcodes to define the meaning and format of data attributes. 2D barcodes can hold multiple fields/data elements(e.g. Product, Batch, Serial no etc. ). AI are required to identify the data elements.


I would not go in details about EAN128 implementation in EWM,  please check blog EAN128/GS128 EWM details   to get basic understanding.

Business Scenario: During goods receipt of products, company wants to capture the Country of Origin(COO). 2D barcode contains the  COO along with other details like Product, Batch, quantity etc.

As per GS128 definition COO is mapped to AI 422 and its length is 3 char. Country code needs to be specified according to ISO 3166 standard.

Solution:  AI 422 implementation is not provided by standard EWM.

Add the configuration for AI 422

Configuration:   Extended Warehouse Management > Mobile Data Entry > Maintain Bar Code Specification > Data Description



AI 422 Config

BADI Implementation for mapping :  Create an implementation for BADI  /SCWM/EX_RF_BARC_INIT  and add the AI 422 mapping code in method INIT of BADI implementation class.

METHOD /scwm/if_ex_rf_barc_init~init.
  DATA: ls_ai_rel TYPE /scwm/e128_ai_relation.
  ls_ai_rel-ai        = '422'.
  ls_ai_rel-aisub     = '0'.
  ls_ai_rel-aiusage   = '3'.
  ls_ai_rel-field     = 'WELAN'.
  ls_ai_rel-unitfield = ''.
  INSERT ls_ai_rel INTO TABLE ct_ean128_ai_relation.

Testing : Let’s test the sample barcode string with EWM EAN128 barcode decode Function module /SCWM/EAN128_DECODE

Barcode String : ]C110LOT23456789^]21SN1234567890123456^]422USA


Input Barcode String



Country of Origin(COO) barcode data element is mapped to output structure field.

We can similarly map other fields for which standard EAN 128 is not available.

Thanks for reading, please feel free to leave any comments or questions below.



Tushar Shukla


Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo IN Learning Hub SAP
      IN Learning Hub SAP

      Great Blog Tushar

      Very Useful


      - Umesh Pamnani