SAP F4_MACO_MULT_SELECTION Function Module for









F4_MACO_MULT_SELECTION is a standard f4 maco mult selection 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 f4 maco mult selection FM, simply by entering the name F4_MACO_MULT_SELECTION into the relevant SAP transaction such as SE37 or SE38.

Function Group: SHL2
Program Name: SAPLSHL2
Main Program: SAPLSHL2
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function F4_MACO_MULT_SELECTION 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 'F4_MACO_MULT_SELECTION'"
EXPORTING
* DISPLAY = ' ' "Display flag
MAX_CNT = "Maximum number of values to be displayed
MAIN_FIELD = "Selection field
* NO_SCROLL = ' ' "No scrolling of the displayed value list
* TITEL = ' ' "Title of the F4 popup

IMPORTING
FCODE = "Function code

TABLES
SELFLDS_TAB = "Structure table
RESULT_TAB = "Selected values

EXCEPTIONS
USER_CANCEL = 1 NO_VALUES_SELECTED = 2
.



IMPORTING Parameters details for F4_MACO_MULT_SELECTION

DISPLAY - Display flag

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

MAX_CNT - Maximum number of values to be displayed

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

MAIN_FIELD - Selection field

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

NO_SCROLL - No scrolling of the displayed value list

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

TITEL - Title of the F4 popup

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

EXPORTING Parameters details for F4_MACO_MULT_SELECTION

FCODE - Function code

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

TABLES Parameters details for F4_MACO_MULT_SELECTION

SELFLDS_TAB - Structure table

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

RESULT_TAB - Selected values

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

EXCEPTIONS details

USER_CANCEL - Cancel

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

NO_VALUES_SELECTED - No selection made

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

Copy and paste ABAP code example for F4_MACO_MULT_SELECTION 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, "   
lv_display  TYPE SY, "   SPACE
lt_selflds_tab  TYPE STANDARD TABLE OF F4MCHLP3, "   
lv_user_cancel  TYPE F4MCHLP3, "   
lv_max_cnt  TYPE F4MCHLP3, "   
lt_result_tab  TYPE STANDARD TABLE OF SEAHLPRES, "   
lv_no_values_selected  TYPE SEAHLPRES, "   
lv_main_field  TYPE F4MCHLP2-FIELDNAME, "   
lv_no_scroll  TYPE F4MCHLP2, "   SPACE
lv_titel  TYPE F4MCHLP2. "   SPACE

  CALL FUNCTION 'F4_MACO_MULT_SELECTION'  "
    EXPORTING
         DISPLAY = lv_display
         MAX_CNT = lv_max_cnt
         MAIN_FIELD = lv_main_field
         NO_SCROLL = lv_no_scroll
         TITEL = lv_titel
    IMPORTING
         FCODE = lv_fcode
    TABLES
         SELFLDS_TAB = lt_selflds_tab
         RESULT_TAB = lt_result_tab
    EXCEPTIONS
        USER_CANCEL = 1
        NO_VALUES_SELECTED = 2
. " F4_MACO_MULT_SELECTION




ABAP code using 7.40 inline data declarations to call FM F4_MACO_MULT_SELECTION

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_display) = ' '.
 
 
 
 
 
 
"SELECT single FIELDNAME FROM F4MCHLP2 INTO @DATA(ld_main_field).
 
DATA(ld_no_scroll) = ' '.
 
DATA(ld_titel) = ' '.
 


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!