SAP HELP_VALUES_GET_WITH_MACO Function Module for Include Program Controlled Matchcode Selection (Obsolete)
HELP_VALUES_GET_WITH_MACO is a standard help values get with maco SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Include Program Controlled Matchcode Selection (Obsolete) processing and below is the pattern details for this FM, 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 help values get with maco FM, simply by entering the name HELP_VALUES_GET_WITH_MACO 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:
![](https://www.se80.co.uk/training-education/wp-content/uploads/2019/07/normal-function-module.png)
Function HELP_VALUES_GET_WITH_MACO 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 'HELP_VALUES_GET_WITH_MACO'"Include Program Controlled Matchcode Selection (Obsolete).
EXPORTING
* CUCOL = 1 "Cursor Position: Column
* CUROW = 1 "Cursor Position: Line
* MC_ID = ' ' "Matchcode ID
MC_OBJECT = "Matchcode Object
* SELSTR = ' ' "Value from Screen
IMPORTING
SELECTVALUE = "Field Contents of the Selected Matchcode
COMPLETE_STRING = "Return the Complete Matchcode String
TABLES
* USER_FUNCTION_VALUES = "
EXCEPTIONS
NO_SELECTION = 1 NO_VALUES = 2 NO_VALUES_SELECTED = 3
IMPORTING Parameters details for HELP_VALUES_GET_WITH_MACO
CUCOL - Cursor Position: Column
Data type: SY-CUCOLDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
CUROW - Cursor Position: Line
Data type: SY-CUROWDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
MC_ID - Matchcode ID
Data type: DD23L-MCIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MC_OBJECT - Matchcode Object
Data type: DD23L-MCONAMEOptional: No
Call by Reference: No ( called with pass by value option)
SELSTR - Value from Screen
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HELP_VALUES_GET_WITH_MACO
SELECTVALUE - Field Contents of the Selected Matchcode
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
COMPLETE_STRING - Return the Complete Matchcode String
Data type: RSMDY2Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HELP_VALUES_GET_WITH_MACO
USER_FUNCTION_VALUES -
Data type: RSMVAOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_SELECTION - No Selection Made
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALUES - No Values Exist
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 HELP_VALUES_GET_WITH_MACO 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_cucol | TYPE SY-CUCOL, " 1 | |||
lv_selectvalue | TYPE SY, " | |||
lv_no_selection | TYPE SY, " | |||
lt_user_function_values | TYPE STANDARD TABLE OF RSMVA, " | |||
lv_curow | TYPE SY-CUROW, " 1 | |||
lv_no_values | TYPE SY, " | |||
lv_complete_string | TYPE RSMDY2, " | |||
lv_mc_id | TYPE DD23L-MCID, " SPACE | |||
lv_no_values_selected | TYPE DD23L, " | |||
lv_mc_object | TYPE DD23L-MCONAME, " | |||
lv_selstr | TYPE DD23L. " SPACE |
  CALL FUNCTION 'HELP_VALUES_GET_WITH_MACO' "Include Program Controlled Matchcode Selection (Obsolete) |
EXPORTING | ||
CUCOL | = lv_cucol | |
CUROW | = lv_curow | |
MC_ID | = lv_mc_id | |
MC_OBJECT | = lv_mc_object | |
SELSTR | = lv_selstr | |
IMPORTING | ||
SELECTVALUE | = lv_selectvalue | |
COMPLETE_STRING | = lv_complete_string | |
TABLES | ||
USER_FUNCTION_VALUES | = lt_user_function_values | |
EXCEPTIONS | ||
NO_SELECTION = 1 | ||
NO_VALUES = 2 | ||
NO_VALUES_SELECTED = 3 | ||
. " HELP_VALUES_GET_WITH_MACO |
ABAP code using 7.40 inline data declarations to call FM HELP_VALUES_GET_WITH_MACO
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 CUCOL FROM SY INTO @DATA(ld_cucol). | ||||
DATA(ld_cucol) | = 1. | |||
"SELECT single CUROW FROM SY INTO @DATA(ld_curow). | ||||
DATA(ld_curow) | = 1. | |||
"SELECT single MCID FROM DD23L INTO @DATA(ld_mc_id). | ||||
DATA(ld_mc_id) | = ' '. | |||
"SELECT single MCONAME FROM DD23L INTO @DATA(ld_mc_object). | ||||
DATA(ld_selstr) | = ' '. | |||
Search for further information about these or an SAP related objects