SAP GTS: Autoclassification Decision tool

Initial functional need

 

During the Greenfield project, the customer requested a copy/interpretation of their Legacy system Autoclassification Tool.

 

The functional request is to automatically apply Control Class for materials that are transferred to SAP GTS from S/4 (Feeder ERP in the Customer ecosystem).

 

In other words, build an Automatic Classification tool able to make a decision from a selection of variables. Based on the following Master Data inputs:

  • In the customer system, the Master Data is shared between S/4 and GTS E4H via RFC (Remote Function Calls).
  • For Product Master Data, additionally to Basic data (i.e.: Material Code, Material Description, Material Type), and Plant data (i.e.: Material Plant status, Country of Origin),
    • Characteristics have been identified to be transferred to GTS E4H:
      • US Content classification (i.e.: Yes or No)
      • Export Control Classification Number (ECCN)

 

This information is useful to the new development.

 

Master Data transfer

Technical details

 

As described, the Master Data is shared between S/4 and GTS E4H via RFC (Remote Function Calls).

Via the standard GTS add-on /SAPSLL/MENU_LEGALR3, materials are transferred using /SAPSLL/MATMAS_DIRR3 transaction.

 

Picture 1 (VESLOG E4H Fiori System Screenshot)

 

It allows individual or multiple selections of entries.

 

This is used frequently at multiple project steps (configuration, unit-testing, end-to-end, and User Acceptance).

For Go-Live, the transaction program /SAPSLL/MATMAS_DISTRIBUTE_R3 can be triggered inside a Periodic Job that will be performed according to your customers’ needs.

 

During this transfer, the standard material master fields (Material Number, Material description, unit of measure, shot text, etc.) are replicated into the GTS product master tables /SAPSLL/PNTPR, /SAPSLL/PR, and its associated language-dependent text table /SAPSLL/PRTW.

 

In addition to the standard replicated fields, it is possible to configure and map customer-driven specific characteristics (such as ECCN number, US Content Classification, material type, material supply-chain status, and other classification attributes).

 

They are identified as additional characteristics in GTS and configured using tr code SPRO:

    • GTS provides several fields that can be used to transfer any additional material information that will be useful for classification (with length from 1 digit field to 60 digit field)

Picture 2 (VESLOG E4H Fiori System Screenshot)

 

The S4 SAP GTS plug-in user exit: EXIT_SAPLSLL_LEG_PRR3_004 is available to control which product attribute transfer to GTS. After the user exit is updated and S/4HANA fields are identified, they will be stored at replication to GTS in the general product attribute table /SAPSLL/PRGEN.

 

In this customer environment, these additional attributes are sourced from S/4HANA but can be retrieved from other Feeder System, depending on your customer’s ERP architecture.

 

The /SAPSLL/PRGEN table holds these characteristics at the product level and serves as the central repository for GTS-specific classification data that extends the standard material master beyond what is replicated from S/4HANA.

 

Classification Process

 

In Legal Control functionality, for Export and or Import control, classification is the triggering point for the activation.

 

Additionally, to configurating the Legal regulation, Control Classes need to be managed as Master Data.

 

Export Control Classification Number

 

In the case of the Export Administration Regulations, the control classes used in GTS are generally derived from the Official US list. This information – also known as Control Class – can be either:

 

  • Loaded from an official list via the app “Load Control Classes (ECCN) from File”.
  • Defined manually in the app “Manage Control Classes”.

 

Picture 3 (VESLOG E4H Fiori System Screenshot)

 

Based on the functional scope of your customer, sometimes only a part of the global list will need to be created.

 

Once available, the classification is the step that binds your products to the Regulation

 

Classification of Materials

 

This is performed via the app “Classify Product (Legal Control)” or, for exceptional cases via the app “Manage Product”.

 

Picture 4 (VESLOG E4H Fiori System Screenshot)

 

Based on functional requirements, BRF+ decision table was chosen to answer the functional needs.

 

Conjointly with a development of a Specific Report – BRF+ decision table helps the system determine the action based on complex functional input rules.

 

BRF+

Presentation

 

BRF+ stands for Business Rule Framework Plus, which provides a comprehensive application programming interface and user interface for defining business rules.

 

It enables you to define business rules without the need of writing ABAP code.

 

The generated Business Rules can be incorporated into other SAP programs or Substitution/Validation rules. BRF+ is not new and even not directly related to SAP S/4HANA, but with the release of SAP S/4HANA 1610, BRF+ gained more attention since it is launched as the go-to solution for some business processes. It is a part of the SAP NetWeaver ABAP stack.

 

How do we call BRF+ in programs?

 

In the function component, there is an option called Create Code Template – after selecting this, it shows the generated code template.

 

The generated code is the one that needs to be placed in the program.

 

  • This is one way of calling BRF+, directly calling with the help of Function Code Template.
  • The other way is to call with the help of ABAP Function Module, where Function Module needs to be created and the generated logic is wrapped around a Function Module and can directly call the Function Module wherever the validation is required.

 

Note: Every generated Function Code Template consists of a Unique Alphanumeric ID(Constant) associated with it. This will uniquely identify the respective function, which should be called for validation.

 

In conclusion, BRF+ allows to model rules in an intuitive way and to reuse these rules in different applications.

 

BRF+ avoids the creation of custom table & maintenance of custom table for validation, also it avoids hardcoding of the values, which was a traditional approach followed by the developers.

 

Basically, BRF+ is used for doing Decision-Making where on-the-fly decision input & output values are maintained in Decision Tables, which have advanced features for doing validations.

 

Use case

Classify a material with US Regulation EAR control classification

 

Here below are the master data set of master data characteristics used as functional determinant rule in the BRF+ table:

  • Legal Regulation
  • Product Plant Status
  • Material Type
  • ECCN_Character
  • X_Characteristics

 

Here below are the output actions driven from the BRF+ table:

  • Action for Classification
  • Classify With
  • Already Classified

 

From them, a decision structure was built. Each material case follows the decision process below:

  • 1st: Determine the Legal Regulation that will benefit from the Automation
  • 2nd: Perform an initial filter of the material at hand, whether its Product Plant Status in the system allows it to be classified
  • 3rd: Perform a second filter of the material based on the Material Type
  • 4th: ECCN_Character are the ERP S/4HANA characteristics that are taken into account to perform the classification
  • 5th: X_Characteristic is another functional exclusion rule, not specified here in this blog for confidential reasons.
  • 6th: The system checks if the material is Already Classified with the same ECCN_Character to reduce the report workload

 

Once the rules have been determined, the BRF+ has decision “activities”:

  • Action Code 1: Classify with the ECCN_Character from the Material Characteristics
  • Action Code 2: Classify with the No Control Flag
  • Action Code 3: Do nothing

 

Based on the set of functional steps, BRF+ dictates the Report what needs to be done.

  • 1st: Action code 1, 2 and or 3 will be determined based on the decision tree
  • 2nd: Classification activity will be performed depending on the action code.

 

 

At VESLOG, we help companies design and implement tailored SAP GTS solutions that fit their business processes and data landscape.

Get in touch with us via our Contact page to discuss how Autoclassification can work in your system.