SAP G_BOOL_F4_SUBSTITUTION Function Module for









G_BOOL_F4_SUBSTITUTION is a standard g bool f4 substitution 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 bool f4 substitution FM, simply by entering the name G_BOOL_F4_SUBSTITUTION into the relevant SAP transaction such as SE37 or SE38.

Function Group: GBL1
Program Name: SAPLGBL1
Main Program: SAPLGBL1
Appliation area: G
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function G_BOOL_F4_SUBSTITUTION 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_BOOL_F4_SUBSTITUTION'"
EXPORTING
* DESC_FIELDNAME = ' ' "Substitution Description Field Name
* EVENT_FLD = ' ' "
* VAL_EVENT = ' ' "Event to find value for(' ' finds all events).
* VAL_USER = ' ' "SUBUSER ID of calling application.
* PROG_NAME = '' "Program name for screen to substitute info
* STEP_IDX = "Step index if step-loop used
* USER_TXT_FLD = ' ' "
* USER_FLD = ' ' "
* ID_FLD = ' ' "
* DISPLAY_ONLY = '' "

IMPORTING
SUBSTITUTION = "Substitution selected(blank if none selected).
SUBSTEXT = "Substitution short text

EXCEPTIONS
NO_VALUES_FOUND = 1
.



IMPORTING Parameters details for G_BOOL_F4_SUBSTITUTION

DESC_FIELDNAME - Substitution Description Field Name

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

EVENT_FLD -

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

VAL_EVENT - Event to find value for(' ' finds all events).

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

VAL_USER - SUBUSER ID of calling application.

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

PROG_NAME - Program name for screen to substitute info

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

STEP_IDX - Step index if step-loop used

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

USER_TXT_FLD -

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

USER_FLD -

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

ID_FLD -

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

DISPLAY_ONLY -

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

EXPORTING Parameters details for G_BOOL_F4_SUBSTITUTION

SUBSTITUTION - Substitution selected(blank if none selected).

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

SUBSTEXT - Substitution short text

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

EXCEPTIONS details

NO_VALUES_FOUND -

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

Copy and paste ABAP code example for G_BOOL_F4_SUBSTITUTION 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_substitution  TYPE GB92-SUBSTID, "   
lv_desc_fieldname  TYPE DYNPREAD-FIELDNAME, "   ' '
lv_no_values_found  TYPE DYNPREAD, "   
lv_event_fld  TYPE DYNPREAD-FIELDNAME, "   ' '
lv_substext  TYPE GB92T-SUBSTEXT, "   
lv_val_event  TYPE GB31-VALEVENT, "   ' '
lv_val_user  TYPE GB31-VALUSER, "   ' '
lv_prog_name  TYPE SY-REPID, "   ''
lv_step_idx  TYPE SY-TABIX, "   
lv_user_txt_fld  TYPE DYNPREAD-FIELDNAME, "   ' '
lv_user_fld  TYPE DYNPREAD-FIELDNAME, "   ' '
lv_id_fld  TYPE DYNPREAD-FIELDNAME, "   ' '
lv_display_only  TYPE DYNPREAD. "   ''

  CALL FUNCTION 'G_BOOL_F4_SUBSTITUTION'  "
    EXPORTING
         DESC_FIELDNAME = lv_desc_fieldname
         EVENT_FLD = lv_event_fld
         VAL_EVENT = lv_val_event
         VAL_USER = lv_val_user
         PROG_NAME = lv_prog_name
         STEP_IDX = lv_step_idx
         USER_TXT_FLD = lv_user_txt_fld
         USER_FLD = lv_user_fld
         ID_FLD = lv_id_fld
         DISPLAY_ONLY = lv_display_only
    IMPORTING
         SUBSTITUTION = lv_substitution
         SUBSTEXT = lv_substext
    EXCEPTIONS
        NO_VALUES_FOUND = 1
. " G_BOOL_F4_SUBSTITUTION




ABAP code using 7.40 inline data declarations to call FM G_BOOL_F4_SUBSTITUTION

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 SUBSTID FROM GB92 INTO @DATA(ld_substitution).
 
"SELECT single FIELDNAME FROM DYNPREAD INTO @DATA(ld_desc_fieldname).
DATA(ld_desc_fieldname) = ' '.
 
 
"SELECT single FIELDNAME FROM DYNPREAD INTO @DATA(ld_event_fld).
DATA(ld_event_fld) = ' '.
 
"SELECT single SUBSTEXT FROM GB92T INTO @DATA(ld_substext).
 
"SELECT single VALEVENT FROM GB31 INTO @DATA(ld_val_event).
DATA(ld_val_event) = ' '.
 
"SELECT single VALUSER FROM GB31 INTO @DATA(ld_val_user).
DATA(ld_val_user) = ' '.
 
"SELECT single REPID FROM SY INTO @DATA(ld_prog_name).
DATA(ld_prog_name) = ''.
 
"SELECT single TABIX FROM SY INTO @DATA(ld_step_idx).
 
"SELECT single FIELDNAME FROM DYNPREAD INTO @DATA(ld_user_txt_fld).
DATA(ld_user_txt_fld) = ' '.
 
"SELECT single FIELDNAME FROM DYNPREAD INTO @DATA(ld_user_fld).
DATA(ld_user_fld) = ' '.
 
"SELECT single FIELDNAME FROM DYNPREAD INTO @DATA(ld_id_fld).
DATA(ld_id_fld) = ' '.
 
DATA(ld_display_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!