SAP BM_FUNCTION_RANGE_F4 Function Module for









BM_FUNCTION_RANGE_F4 is a standard bm function range f4 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 bm function range f4 FM, simply by entering the name BM_FUNCTION_RANGE_F4 into the relevant SAP transaction such as SE37 or SE38.

Function Group: SF06
Program Name: SAPLSF06
Main Program: SAPLSF06
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BM_FUNCTION_RANGE_F4 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 'BM_FUNCTION_RANGE_F4'"
EXPORTING
* ROOT_STRUCTURE = ' ' "GUID for Structure
* ONLY_ACTIVE_AREAS = ' ' "Only active application components
* CHECK_SYSTEM_TYPE = ' ' "General Flag
* USE_CONTROL = ' ' "General Flag
* RFC_DESTINATION = "Logical Destination (Specified in Function Call)
* ROOT_NODE = "Node of entry
* CURRENT_NODE = "Object Definition
* CURRENT_ID = ' ' "Application component with this ID highlighted
* DISPLAY_KEY = ' ' "Display internal key number (HLA...)
* DISPLAY_APPL = ' ' "Display component ID (FI-GL...)
* COLORS = 'X' "General Flag
* WITH_FUNCTIONS = ' ' "Display functions
* WITH_PROCESS_VARIANTS = ' ' "

IMPORTING
SEL_ID = "ID of component/function selected
SEL_TYPE = "Object Type
SEL_OTYP = "Obj. type selected (H = component, F = function)
SEL_LEVEL = "Level selected
SEL_NODE_ID = "
SEL_APPL = "Code of component/function selected
CANC = "F12 = 'Cancel' chosen

TABLES
* SEL_NODE_TYPES = "
* EXCL_NODES = "

EXCEPTIONS
RFC_FAILURE = 1
.



IMPORTING Parameters details for BM_FUNCTION_RANGE_F4

ROOT_STRUCTURE - GUID for Structure

Data type: TTREE-ID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ONLY_ACTIVE_AREAS - Only active application components

Data type: RPYBMGF-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK_SYSTEM_TYPE - General Flag

Data type: RPYBMGF-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

USE_CONTROL - General Flag

Data type: RPYBMGF-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

RFC_DESTINATION - Logical Destination (Specified in Function Call)

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

ROOT_NODE - Node of entry

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

CURRENT_NODE - Object Definition

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

CURRENT_ID - Application component with this ID highlighted

Data type: DF14L-PS_POSID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DISPLAY_KEY - Display internal key number (HLA...)

Data type: RPYBMGF-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DISPLAY_APPL - Display component ID (FI-GL...)

Data type: RPYBMGF-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

COLORS - General Flag

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

WITH_FUNCTIONS - Display functions

Data type: RPYBMGF-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITH_PROCESS_VARIANTS -

Data type: RPYBMGF-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BM_FUNCTION_RANGE_F4

SEL_ID - ID of component/function selected

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

SEL_TYPE - Object Type

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

SEL_OTYP - Obj. type selected (H = component, F = function)

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

SEL_LEVEL - Level selected

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

SEL_NODE_ID -

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

SEL_APPL - Code of component/function selected

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

CANC - F12 = 'Cancel' chosen

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

TABLES Parameters details for BM_FUNCTION_RANGE_F4

SEL_NODE_TYPES -

Data type: BMRANGE
Optional: Yes
Call by Reference: Yes

EXCL_NODES -

Data type: BMOBJECT
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

RFC_FAILURE -

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

Copy and paste ABAP code example for BM_FUNCTION_RANGE_F4 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_sel_id  TYPE BMOBJECT-ID, "   
lv_rfc_failure  TYPE BMOBJECT, "   
lv_root_structure  TYPE TTREE-ID, "   SPACE
lt_sel_node_types  TYPE STANDARD TABLE OF BMRANGE, "   
lv_only_active_areas  TYPE RPYBMGF-FLAG, "   SPACE
lv_check_system_type  TYPE RPYBMGF-FLAG, "   SPACE
lv_use_control  TYPE RPYBMGF-FLAG, "   SPACE
lv_rfc_destination  TYPE RFCDEST, "   
lv_sel_type  TYPE BMOBJECT-TYPE, "   
lv_root_node  TYPE BMOBJECT-ID, "   
lt_excl_nodes  TYPE STANDARD TABLE OF BMOBJECT, "   
lv_sel_otyp  TYPE DF41S-PARENT_TYP, "   
lv_current_node  TYPE BMOBJECT-ID, "   
lv_sel_level  TYPE SNODETEXT-TLEVEL, "   
lv_current_id  TYPE DF14L-PS_POSID, "   SPACE
lv_display_key  TYPE RPYBMGF-FLAG, "   SPACE
lv_sel_node_id  TYPE HIER_IFACE-NODE_ID, "   
lv_sel_appl  TYPE DF14L-PS_POSID, "   
lv_display_appl  TYPE RPYBMGF-FLAG, "   SPACE
lv_canc  TYPE RPYBMGF-FLAG, "   
lv_colors  TYPE RPYBMGF-FLAG, "   'X'
lv_with_functions  TYPE RPYBMGF-FLAG, "   SPACE
lv_with_process_variants  TYPE RPYBMGF-FLAG. "   SPACE

  CALL FUNCTION 'BM_FUNCTION_RANGE_F4'  "
    EXPORTING
         ROOT_STRUCTURE = lv_root_structure
         ONLY_ACTIVE_AREAS = lv_only_active_areas
         CHECK_SYSTEM_TYPE = lv_check_system_type
         USE_CONTROL = lv_use_control
         RFC_DESTINATION = lv_rfc_destination
         ROOT_NODE = lv_root_node
         CURRENT_NODE = lv_current_node
         CURRENT_ID = lv_current_id
         DISPLAY_KEY = lv_display_key
         DISPLAY_APPL = lv_display_appl
         COLORS = lv_colors
         WITH_FUNCTIONS = lv_with_functions
         WITH_PROCESS_VARIANTS = lv_with_process_variants
    IMPORTING
         SEL_ID = lv_sel_id
         SEL_TYPE = lv_sel_type
         SEL_OTYP = lv_sel_otyp
         SEL_LEVEL = lv_sel_level
         SEL_NODE_ID = lv_sel_node_id
         SEL_APPL = lv_sel_appl
         CANC = lv_canc
    TABLES
         SEL_NODE_TYPES = lt_sel_node_types
         EXCL_NODES = lt_excl_nodes
    EXCEPTIONS
        RFC_FAILURE = 1
. " BM_FUNCTION_RANGE_F4




ABAP code using 7.40 inline data declarations to call FM BM_FUNCTION_RANGE_F4

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 ID FROM BMOBJECT INTO @DATA(ld_sel_id).
 
 
"SELECT single ID FROM TTREE INTO @DATA(ld_root_structure).
DATA(ld_root_structure) = ' '.
 
 
"SELECT single FLAG FROM RPYBMGF INTO @DATA(ld_only_active_areas).
DATA(ld_only_active_areas) = ' '.
 
"SELECT single FLAG FROM RPYBMGF INTO @DATA(ld_check_system_type).
DATA(ld_check_system_type) = ' '.
 
"SELECT single FLAG FROM RPYBMGF INTO @DATA(ld_use_control).
DATA(ld_use_control) = ' '.
 
 
"SELECT single TYPE FROM BMOBJECT INTO @DATA(ld_sel_type).
 
"SELECT single ID FROM BMOBJECT INTO @DATA(ld_root_node).
 
 
"SELECT single PARENT_TYP FROM DF41S INTO @DATA(ld_sel_otyp).
 
"SELECT single ID FROM BMOBJECT INTO @DATA(ld_current_node).
 
"SELECT single TLEVEL FROM SNODETEXT INTO @DATA(ld_sel_level).
 
"SELECT single PS_POSID FROM DF14L INTO @DATA(ld_current_id).
DATA(ld_current_id) = ' '.
 
"SELECT single FLAG FROM RPYBMGF INTO @DATA(ld_display_key).
DATA(ld_display_key) = ' '.
 
"SELECT single NODE_ID FROM HIER_IFACE INTO @DATA(ld_sel_node_id).
 
"SELECT single PS_POSID FROM DF14L INTO @DATA(ld_sel_appl).
 
"SELECT single FLAG FROM RPYBMGF INTO @DATA(ld_display_appl).
DATA(ld_display_appl) = ' '.
 
"SELECT single FLAG FROM RPYBMGF INTO @DATA(ld_canc).
 
"SELECT single FLAG FROM RPYBMGF INTO @DATA(ld_colors).
DATA(ld_colors) = 'X'.
 
"SELECT single FLAG FROM RPYBMGF INTO @DATA(ld_with_functions).
DATA(ld_with_functions) = ' '.
 
"SELECT single FLAG FROM RPYBMGF INTO @DATA(ld_with_process_variants).
DATA(ld_with_process_variants) = ' '.
 


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!