SAP Function Modules

GLVA_ACCESS SAP Function module







GLVA_ACCESS is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name GLVA_ACCESS into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: GLVA
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM GLVA_ACCESS - GLVA ACCESS





CALL FUNCTION 'GLVA_ACCESS' "
  EXPORTING
    e_langu =                   " t002-spras
  TABLES
    it_rcomp =                  " range_comp
    it_cpval =                  " gcv_cpval
    it_valgrp =                 " gcv_grp
    it_valgrp_t =               " gcv_grpt
    it_valgrprl =               " gcv_grprl
    it_valrl =                  " gcv_rl
    it_valrlms =                " gcv_rlms
    it_valmess =                " gcv_mess
    it_valprot =                " gcv_prot
  EXCEPTIONS
    TOO_MUCH_VALIDATIONS = 1    "
    .  "  GLVA_ACCESS

ABAP code example for Function Module GLVA_ACCESS





The ABAP code below is a full code listing to execute function module GLVA_ACCESS including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_it_rcomp  TYPE STANDARD TABLE OF RANGE_COMP,"TABLES PARAM
wa_it_rcomp  LIKE LINE OF it_it_rcomp ,
it_it_cpval  TYPE STANDARD TABLE OF GCV_CPVAL,"TABLES PARAM
wa_it_cpval  LIKE LINE OF it_it_cpval ,
it_it_valgrp  TYPE STANDARD TABLE OF GCV_GRP,"TABLES PARAM
wa_it_valgrp  LIKE LINE OF it_it_valgrp ,
it_it_valgrp_t  TYPE STANDARD TABLE OF GCV_GRPT,"TABLES PARAM
wa_it_valgrp_t  LIKE LINE OF it_it_valgrp_t ,
it_it_valgrprl  TYPE STANDARD TABLE OF GCV_GRPRL,"TABLES PARAM
wa_it_valgrprl  LIKE LINE OF it_it_valgrprl ,
it_it_valrl  TYPE STANDARD TABLE OF GCV_RL,"TABLES PARAM
wa_it_valrl  LIKE LINE OF it_it_valrl ,
it_it_valrlms  TYPE STANDARD TABLE OF GCV_RLMS,"TABLES PARAM
wa_it_valrlms  LIKE LINE OF it_it_valrlms ,
it_it_valmess  TYPE STANDARD TABLE OF GCV_MESS,"TABLES PARAM
wa_it_valmess  LIKE LINE OF it_it_valmess ,
it_it_valprot  TYPE STANDARD TABLE OF GCV_PROT,"TABLES PARAM
wa_it_valprot  LIKE LINE OF it_it_valprot .


SELECT single SPRAS
FROM T002
INTO @DATA(ld_e_langu).


"populate fields of struture and append to itab
append wa_it_rcomp to it_it_rcomp.

"populate fields of struture and append to itab
append wa_it_cpval to it_it_cpval.

"populate fields of struture and append to itab
append wa_it_valgrp to it_it_valgrp.

"populate fields of struture and append to itab
append wa_it_valgrp_t to it_it_valgrp_t.

"populate fields of struture and append to itab
append wa_it_valgrprl to it_it_valgrprl.

"populate fields of struture and append to itab
append wa_it_valrl to it_it_valrl.

"populate fields of struture and append to itab
append wa_it_valrlms to it_it_valrlms.

"populate fields of struture and append to itab
append wa_it_valmess to it_it_valmess.

"populate fields of struture and append to itab
append wa_it_valprot to it_it_valprot. . CALL FUNCTION 'GLVA_ACCESS' EXPORTING e_langu = ld_e_langu TABLES it_rcomp = it_it_rcomp it_cpval = it_it_cpval it_valgrp = it_it_valgrp it_valgrp_t = it_it_valgrp_t it_valgrprl = it_it_valgrprl it_valrl = it_it_valrl it_valrlms = it_it_valrlms it_valmess = it_it_valmess it_valprot = it_it_valprot EXCEPTIONS TOO_MUCH_VALIDATIONS = 1 . " GLVA_ACCESS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_langu  TYPE T002-SPRAS ,
it_it_rcomp  TYPE STANDARD TABLE OF RANGE_COMP ,
wa_it_rcomp  LIKE LINE OF it_it_rcomp,
it_it_cpval  TYPE STANDARD TABLE OF GCV_CPVAL ,
wa_it_cpval  LIKE LINE OF it_it_cpval,
it_it_valgrp  TYPE STANDARD TABLE OF GCV_GRP ,
wa_it_valgrp  LIKE LINE OF it_it_valgrp,
it_it_valgrp_t  TYPE STANDARD TABLE OF GCV_GRPT ,
wa_it_valgrp_t  LIKE LINE OF it_it_valgrp_t,
it_it_valgrprl  TYPE STANDARD TABLE OF GCV_GRPRL ,
wa_it_valgrprl  LIKE LINE OF it_it_valgrprl,
it_it_valrl  TYPE STANDARD TABLE OF GCV_RL ,
wa_it_valrl  LIKE LINE OF it_it_valrl,
it_it_valrlms  TYPE STANDARD TABLE OF GCV_RLMS ,
wa_it_valrlms  LIKE LINE OF it_it_valrlms,
it_it_valmess  TYPE STANDARD TABLE OF GCV_MESS ,
wa_it_valmess  LIKE LINE OF it_it_valmess,
it_it_valprot  TYPE STANDARD TABLE OF GCV_PROT ,
wa_it_valprot  LIKE LINE OF it_it_valprot.


SELECT single SPRAS
FROM T002
INTO ld_e_langu.


"populate fields of struture and append to itab
append wa_it_rcomp to it_it_rcomp.

"populate fields of struture and append to itab
append wa_it_cpval to it_it_cpval.

"populate fields of struture and append to itab
append wa_it_valgrp to it_it_valgrp.

"populate fields of struture and append to itab
append wa_it_valgrp_t to it_it_valgrp_t.

"populate fields of struture and append to itab
append wa_it_valgrprl to it_it_valgrprl.

"populate fields of struture and append to itab
append wa_it_valrl to it_it_valrl.

"populate fields of struture and append to itab
append wa_it_valrlms to it_it_valrlms.

"populate fields of struture and append to itab
append wa_it_valmess to it_it_valmess.

"populate fields of struture and append to itab
append wa_it_valprot to it_it_valprot.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name GLVA_ACCESS or its description.