SAP G_SELECT_VARIATION Function Module for
G_SELECT_VARIATION is a standard g select variation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 select variation FM, simply by entering the name G_SELECT_VARIATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: GRWO
Program Name: SAPLGRWO
Main Program: SAPLGRWO
Appliation area: G
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function G_SELECT_VARIATION 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_SELECT_VARIATION'".
EXPORTING
* FCODE = 'VARI' "Function code
* REP_TABLE = ' ' "Report Writer Table
REPORT = "Report index
TABLES
VAR_TABLE = "Variation table, dimension-specifi
VAR_TABLE_REP = "Variation table, report-specific a
EXCEPTIONS
ILLEGAL_FUNCTION_CODE = 1 NOTHING_CHANGED = 2
IMPORTING Parameters details for G_SELECT_VARIATION
FCODE - Function code
Data type: SY-UCOMMDefault: 'VARI'
Optional: Yes
Call by Reference: No ( called with pass by value option)
REP_TABLE - Report Writer Table
Data type: T804A-TABDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
REPORT - Report index
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for G_SELECT_VARIATION
VAR_TABLE - Variation table, dimension-specifi
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
VAR_TABLE_REP - Variation table, report-specific a
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ILLEGAL_FUNCTION_CODE - Invalid function code
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOTHING_CHANGED - No selection was carried out
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for G_SELECT_VARIATION 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_fcode | TYPE SY-UCOMM, " 'VARI' | |||
| lt_var_table | TYPE STANDARD TABLE OF SY, " | |||
| lv_illegal_function_code | TYPE SY, " | |||
| lv_rep_table | TYPE T804A-TAB, " SPACE | |||
| lt_var_table_rep | TYPE STANDARD TABLE OF T804A, " | |||
| lv_nothing_changed | TYPE T804A, " | |||
| lv_report | TYPE T804A. " |
|   CALL FUNCTION 'G_SELECT_VARIATION' " |
| EXPORTING | ||
| FCODE | = lv_fcode | |
| REP_TABLE | = lv_rep_table | |
| REPORT | = lv_report | |
| TABLES | ||
| VAR_TABLE | = lt_var_table | |
| VAR_TABLE_REP | = lt_var_table_rep | |
| EXCEPTIONS | ||
| ILLEGAL_FUNCTION_CODE = 1 | ||
| NOTHING_CHANGED = 2 | ||
| . " G_SELECT_VARIATION | ||
ABAP code using 7.40 inline data declarations to call FM G_SELECT_VARIATION
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 UCOMM FROM SY INTO @DATA(ld_fcode). | ||||
| DATA(ld_fcode) | = 'VARI'. | |||
| "SELECT single TAB FROM T804A INTO @DATA(ld_rep_table). | ||||
| DATA(ld_rep_table) | = ' '. | |||
Search for further information about these or an SAP related objects