SAP G_VALIDATION_ENVIRONMENT Function Module for Maintain Validation: Create, Change, Delete....









G_VALIDATION_ENVIRONMENT is a standard g validation environment SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Maintain Validation: Create, Change, Delete.... processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for g validation environment FM, simply by entering the name G_VALIDATION_ENVIRONMENT into the relevant SAP transaction such as SE37 or SE38.

Function Group: GBLO
Program Name: SAPLGBLO
Main Program: SAPLGBLO
Appliation area: G
Release date: 20-Jul-1999
Mode(Normal, Remote etc): Normal Function Module
Update:



Function G_VALIDATION_ENVIRONMENT pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'G_VALIDATION_ENVIRONMENT'"Maintain Validation: Create, Change, Delete....
EXPORTING
* ACTION_MODE = 'C' "Callup Mode: 'C' = Change, 'N' = Create
* ONE_V = ' ' "'X' = only 1 Val. (Not in Create, with B_valevent!)
* STEP = ' ' "Selected Step in Open Tree (Not in Create)
* VALID_TEMPLATE = ' ' "Validation Model
* SKIP_FIRST_SCREEN = ' ' "'X' = Skip First Maintenance Screen
* BVALEVENT = ' ' "Flag = 'X' to Prevent User Changing Valevent
* BVALUSER = 'X' "Flag = 'X' to Prevent User Changing Valuser
* VALEVENT = "Validation Event
VALID = "
* VALUSER = "
* VIEW_ONLY = ' ' "'X' = Changes not Possible

IMPORTING
HEADER_INFO = "Validation Header Information
VALID_MODIFIED = "'X' - Validation has been Changed

EXCEPTIONS
NOT_FOUND = 1
.



IMPORTING Parameters details for G_VALIDATION_ENVIRONMENT

ACTION_MODE - Callup Mode: 'C' = Change, 'N' = Create

Data type: GB01-BEXCLUDE
Default: 'C'
Optional: Yes
Call by Reference: No ( called with pass by value option)

ONE_V - 'X' = only 1 Val. (Not in Create, with B_valevent!)

Data type: GB01-BEXCLUDE
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

STEP - Selected Step in Open Tree (Not in Create)

Data type: GB921-SUBSEQNR
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALID_TEMPLATE - Validation Model

Data type: RGBLO-VALIDPROTO
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

SKIP_FIRST_SCREEN - 'X' = Skip First Maintenance Screen

Data type: GB01-BEXCLUDE
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

BVALEVENT - Flag = 'X' to Prevent User Changing Valevent

Data type: GB01-BEXCLUDE
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

BVALUSER - Flag = 'X' to Prevent User Changing Valuser

Data type: GB01-BEXCLUDE
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALEVENT - Validation Event

Data type: GB31-VALEVENT
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALID -

Data type: GB93-VALID
Optional: No
Call by Reference: No ( called with pass by value option)

VALUSER -

Data type: GB03-VALUSER
Optional: Yes
Call by Reference: No ( called with pass by value option)

VIEW_ONLY - 'X' = Changes not Possible

Data type: GB01-BEXCLUDE
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for G_VALIDATION_ENVIRONMENT

HEADER_INFO - Validation Header Information

Data type: GB93
Optional: No
Call by Reference: No ( called with pass by value option)

VALID_MODIFIED - 'X' - Validation has been Changed

Data type: GB01-BEXCLUDE
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NOT_FOUND - Boolean Class Or Subclass does not Exist.

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for G_VALIDATION_ENVIRONMENT Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_not_found  TYPE STRING, "   
lv_action_mode  TYPE GB01-BEXCLUDE, "   'C'
lv_header_info  TYPE GB93, "   
lv_one_v  TYPE GB01-BEXCLUDE, "   ' '
lv_step  TYPE GB921-SUBSEQNR, "   ' '
lv_valid_modified  TYPE GB01-BEXCLUDE, "   
lv_valid_template  TYPE RGBLO-VALIDPROTO, "   ' '
lv_skip_first_screen  TYPE GB01-BEXCLUDE, "   ' '
lv_bvalevent  TYPE GB01-BEXCLUDE, "   ' '
lv_bvaluser  TYPE GB01-BEXCLUDE, "   'X'
lv_valevent  TYPE GB31-VALEVENT, "   
lv_valid  TYPE GB93-VALID, "   
lv_valuser  TYPE GB03-VALUSER, "   
lv_view_only  TYPE GB01-BEXCLUDE. "   ' '

  CALL FUNCTION 'G_VALIDATION_ENVIRONMENT'  "Maintain Validation: Create, Change, Delete....
    EXPORTING
         ACTION_MODE = lv_action_mode
         ONE_V = lv_one_v
         STEP = lv_step
         VALID_TEMPLATE = lv_valid_template
         SKIP_FIRST_SCREEN = lv_skip_first_screen
         BVALEVENT = lv_bvalevent
         BVALUSER = lv_bvaluser
         VALEVENT = lv_valevent
         VALID = lv_valid
         VALUSER = lv_valuser
         VIEW_ONLY = lv_view_only
    IMPORTING
         HEADER_INFO = lv_header_info
         VALID_MODIFIED = lv_valid_modified
    EXCEPTIONS
        NOT_FOUND = 1
. " G_VALIDATION_ENVIRONMENT




ABAP code using 7.40 inline data declarations to call FM G_VALIDATION_ENVIRONMENT

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single BEXCLUDE FROM GB01 INTO @DATA(ld_action_mode).
DATA(ld_action_mode) = 'C'.
 
 
"SELECT single BEXCLUDE FROM GB01 INTO @DATA(ld_one_v).
DATA(ld_one_v) = ' '.
 
"SELECT single SUBSEQNR FROM GB921 INTO @DATA(ld_step).
DATA(ld_step) = ' '.
 
"SELECT single BEXCLUDE FROM GB01 INTO @DATA(ld_valid_modified).
 
"SELECT single VALIDPROTO FROM RGBLO INTO @DATA(ld_valid_template).
DATA(ld_valid_template) = ' '.
 
"SELECT single BEXCLUDE FROM GB01 INTO @DATA(ld_skip_first_screen).
DATA(ld_skip_first_screen) = ' '.
 
"SELECT single BEXCLUDE FROM GB01 INTO @DATA(ld_bvalevent).
DATA(ld_bvalevent) = ' '.
 
"SELECT single BEXCLUDE FROM GB01 INTO @DATA(ld_bvaluser).
DATA(ld_bvaluser) = 'X'.
 
"SELECT single VALEVENT FROM GB31 INTO @DATA(ld_valevent).
 
"SELECT single VALID FROM GB93 INTO @DATA(ld_valid).
 
"SELECT single VALUSER FROM GB03 INTO @DATA(ld_valuser).
 
"SELECT single BEXCLUDE FROM GB01 INTO @DATA(ld_view_only).
DATA(ld_view_only) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!