Quantcast
Channel: SCN : Document List - SAP ERP Financials
Viewing all articles
Browse latest Browse all 366

Restricting/Unrestricting Fields for Substitutions and Validations

$
0
0

Restricting/Unrestricting Fields for Substitutions and Validations

Note

This document explains the situations for FI Substitutions/Validations exclusively. The situations may or may not apply for substitutions and validations in other application areas

Introduction

Validation consists of perquisite, check and message. If the prerequisite is met and the check is not fulfilled, the message is displayed. The validation rules are activated at company code level. They are used to examine settings, say, postings from company code to business area are made or not.

 

Substitutions are used to substitute a document field value and consist of a prerequisite and substitution. A substitution is enforced if the prerequisite is met. Substitutions are also activated at the company code level and can be a constant value, a user exit or field-field assignment

 

Call-up Points and Boolean Class

There are 5 call-up points which can be used for Substitution or Validation.

  1. Document Header
  2. Line Item
  3. Complete Document
  4. Cost of Sales Accounting
  5. Cost of Sales Accounting (New)

 

The set up for the call-up points and which Boolean classes are used for FI Validations/Substitutions details can be found in table GB31 in the system.

 

 

 

As seen above, the table has entries for other application areas also like Asset Management (AM), Controlling (CO) etc, but we will be only looking at the 5 entries for FI.

 

The 5 call-up points mentioned a little while earlier, can be found in the table for the 5 FI entries highlighted. The VALEVENTTXT gives the call-up point details corresponding to the number in the field VALEVENT.

 

The RCLASS or WCLASS field can be referred to know the Boolean Class for an application area and call-up point. For example, for application area FR and call-up point 2 (Line Item), Boolean class is 009. Knowing the Boolean class for an application area and call-up point combination will be necessary for reading the table GB01, explained later.

 

The fields GBVALUSE and GBSBSTUSE are used to define which call-up points will be used for Validations and Substitutions respectively. If the field value is blank, the call-up point does not appear in the screen to define Validations or Substitutions. The fields can have the following values:

Generally, only the values blank and X are used.

 

The GB31 data entries for FI look as below:

 

 

As seen, GBVALUSE has selection only for 3 call-up points with X. The value is blank for Cost of Sales Accounting and Cost of Sales Accounting (New) call-up points. Hence, when defining validations, only 3 call-up points will be available. For FI Substitutions, all 5 call-up points will be available, since, all the 5 entries have X in the GBSUBSTUSE field. This can be observed in the screen shots below:

 

 

 

Table GB01

 

Situation faced: We were trying to create a substitution that modifies the payment block field at the document line item level based on certain criteria. The development and unit testing went fine in the development system. When we transported to the test system, the pre-requisite part was displaying correctly, but, the substitution part was appearing as blank.


The above situation was because, somehow, the entries in GB01 in the development and test system were different.

 

 

The Boolean class which was read from table GB31 will be used here. For application area FI and call-up point line item, the Boolean class is 09.

 

The class type refers to RCLASS or WCLASS or both from GB31. The class type in GB01 is ‘B’ for Validation, ‘S’ for Substitution and ‘A’ for both Validation and Substitution.

 

BCLTAB, for FI application area, generally refers to tables BKPF or BSEG, the standard SAP document header and line item details tables or system fields like client, transaction code, user ID etc. The BCLFIELD has the table fields for each of the tables in BCLTAB.

 

BEXCLUDE determines whether the table field in BCLFIELD of BCLTAB can be used in substitutions and validations or not. The value can be blank or ‘X’. If the value is ‘X’, the field BCLFIELD of table BCLTABLE is not allowed for that particular CLASSTYPE and BOOLCLASS. If the value is blank, it is allowed.

 

 

The above screen shot shows which table and fields of the table that will be allowed for Validation and Substitution definition for the call-up point Document Header (Since the BOOLCLASS = 09). As seen, all fields (BCLFIELD = *) of table BKPF (BCLTAB = BKPF) are available (BEXCLUDE = blank) to be used in FI Validations (CLASSTYPE = B). For Substitutions (CLASSTYPE = S), in table BKPF (BCLTAB = BKPF), field BUDAT (BCLFIELD = BUDAT) is excluded (BEXCLUDE = X), whereas, field BKTXT (BCLFIELD = BTXT) is available (BEXCLUDE = blank). So, from BKPF table, field BTXT can be used for substitutions, but, BUDAT cannot be used.

 

In our case, the field ZLSPR (Payment Block) had BEXCLUDE = X in test system and BEXCLUDE = blank in development system for BOOLCLASS = 09 (FI application area and line item call-up point). So, the substitution worked fine in development system. But, when the transport moved to test system, since, the payment black field was not allowed in substitutions, the substitution data in the step became blank.

 

Modification of GB01

In order to make BUDAT field of BKPF table available for substitutions, the BEXCLUDE = X needs to be modified to BEXCLUDE = blank for that particular entry.

 

In standard SAP system, direct modification of GB01 is not allowed through SM30. For modifying entries of GB01, a maintenance view exists in standard SAP. The view is VWTYGB01.

 

 

The view entries are the same as GB01 and can be modified in SM30. Whatever modification is done for VWTYGB01, reflects in GB01 table.

 

Both GB01 and VWTYGB01 are cross client. Also, when modification is done and VWTYGB01 transported, only those entries are picked up in the TR which are changed during modification. The TR does not transport the whole table. In the system where the TR gets imported, the changes in VWTYGB01 directly reflect in the GB01 table.

 

So, to restrict fields or remove restriction on fields or add new tables and fields to be included in Substitutions and Validations, VWTYGB01 should be used.


Viewing all articles
Browse latest Browse all 366

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>