SAP /AIN/UI_ELEMENT_VALUES_CHECK Function Module for Get allowed values of an element
/AIN/UI_ELEMENT_VALUES_CHECK is a standard /ain/ui element values check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get allowed values of an element 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 /ain/ui element values check FM, simply by entering the name /AIN/UI_ELEMENT_VALUES_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: /AIN/UI_RFC_VHLP
Program Name: /AIN/SAPLUI_RFC_VHLP
Main Program: /AIN/SAPLUI_RFC_VHLP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /AIN/UI_ELEMENT_VALUES_CHECK 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 '/AIN/UI_ELEMENT_VALUES_CHECK'"Get allowed values of an element.
EXPORTING
IV_ELEMENTSET_USAGE = "Usage of element set in profile
* IV_LANGU = SY-LANGU "Language Key
IV_VALUE = "Value of element
* IV_ELEMENT_TYPE = '01' "Type of Element
IV_ELEMENTSET = "Element Set Name
IV_ELEMENT = "Element name
* IV_ID_VERSION = "ID Version
* IV_ID = "Electronic Product Code
* IV_BUSINESS_PROCESS = "Business Process
* IV_DOC_GUID = "Document ID
* IV_DEVGRP_GUID = "Device Group ID
IMPORTING
EV_VALUE_OK = "Checkbox
ES_MSG = "Return Parameter
TABLES
T_USER_DATA = "Values of ID Components
EXCEPTIONS
CUSTOMIZING_ERROR = 1
IMPORTING Parameters details for /AIN/UI_ELEMENT_VALUES_CHECK
IV_ELEMENTSET_USAGE - Usage of element set in profile
Data type: /AIN/PRF_ELEMENTSET_USAGEOptional: No
Call by Reference: Yes
IV_LANGU - Language Key
Data type: LANGUDefault: SY-LANGU
Optional: No
Call by Reference: Yes
IV_VALUE - Value of element
Data type: /AIN/PRF_ELEMENT_VALUEOptional: No
Call by Reference: Yes
IV_ELEMENT_TYPE - Type of Element
Data type: /AIN/PRF_ELEMENT_TYPEDefault: '01'
Optional: Yes
Call by Reference: Yes
IV_ELEMENTSET - Element Set Name
Data type: /AIN/PRF_ELEMENTSETOptional: No
Call by Reference: Yes
IV_ELEMENT - Element name
Data type: /AIN/PRF_ELEMENTOptional: No
Call by Reference: Yes
IV_ID_VERSION - ID Version
Data type: /AIN/EPC_VERSIONOptional: Yes
Call by Reference: Yes
IV_ID - Electronic Product Code
Data type: /AIN/EPCOptional: Yes
Call by Reference: Yes
IV_BUSINESS_PROCESS - Business Process
Data type: /AIN/DM_BUSINESS_PROCESSOptional: Yes
Call by Reference: Yes
IV_DOC_GUID - Document ID
Data type: /AIN/DM_DOC_GUIDOptional: Yes
Call by Reference: Yes
IV_DEVGRP_GUID - Device Group ID
Data type: /AIN/DM_DEVGRP_GUIDOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for /AIN/UI_ELEMENT_VALUES_CHECK
EV_VALUE_OK - Checkbox
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
ES_MSG - Return Parameter
Data type: BAPIRET2Optional: No
Call by Reference: Yes
TABLES Parameters details for /AIN/UI_ELEMENT_VALUES_CHECK
T_USER_DATA - Values of ID Components
Data type: /AIN/UI_USERDATA_STROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CUSTOMIZING_ERROR - customizing error
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for /AIN/UI_ELEMENT_VALUES_CHECK 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_ev_value_ok | TYPE XFELD, " | |||
| lt_t_user_data | TYPE STANDARD TABLE OF /AIN/UI_USERDATA_STR, " | |||
| lv_customizing_error | TYPE /AIN/UI_USERDATA_STR, " | |||
| lv_iv_elementset_usage | TYPE /AIN/PRF_ELEMENTSET_USAGE, " | |||
| lv_iv_langu | TYPE LANGU, " SY-LANGU | |||
| lv_iv_value | TYPE /AIN/PRF_ELEMENT_VALUE, " | |||
| lv_es_msg | TYPE BAPIRET2, " | |||
| lv_iv_element_type | TYPE /AIN/PRF_ELEMENT_TYPE, " '01' | |||
| lv_iv_elementset | TYPE /AIN/PRF_ELEMENTSET, " | |||
| lv_iv_element | TYPE /AIN/PRF_ELEMENT, " | |||
| lv_iv_id_version | TYPE /AIN/EPC_VERSION, " | |||
| lv_iv_id | TYPE /AIN/EPC, " | |||
| lv_iv_business_process | TYPE /AIN/DM_BUSINESS_PROCESS, " | |||
| lv_iv_doc_guid | TYPE /AIN/DM_DOC_GUID, " | |||
| lv_iv_devgrp_guid | TYPE /AIN/DM_DEVGRP_GUID. " |
|   CALL FUNCTION '/AIN/UI_ELEMENT_VALUES_CHECK' "Get allowed values of an element |
| EXPORTING | ||
| IV_ELEMENTSET_USAGE | = lv_iv_elementset_usage | |
| IV_LANGU | = lv_iv_langu | |
| IV_VALUE | = lv_iv_value | |
| IV_ELEMENT_TYPE | = lv_iv_element_type | |
| IV_ELEMENTSET | = lv_iv_elementset | |
| IV_ELEMENT | = lv_iv_element | |
| IV_ID_VERSION | = lv_iv_id_version | |
| IV_ID | = lv_iv_id | |
| IV_BUSINESS_PROCESS | = lv_iv_business_process | |
| IV_DOC_GUID | = lv_iv_doc_guid | |
| IV_DEVGRP_GUID | = lv_iv_devgrp_guid | |
| IMPORTING | ||
| EV_VALUE_OK | = lv_ev_value_ok | |
| ES_MSG | = lv_es_msg | |
| TABLES | ||
| T_USER_DATA | = lt_t_user_data | |
| EXCEPTIONS | ||
| CUSTOMIZING_ERROR = 1 | ||
| . " /AIN/UI_ELEMENT_VALUES_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM /AIN/UI_ELEMENT_VALUES_CHECK
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.| DATA(ld_iv_langu) | = SY-LANGU. | |||
| DATA(ld_iv_element_type) | = '01'. | |||
Search for further information about these or an SAP related objects