SAP TEMPLATE_SINGLEREAD_IMKEY Function Module for
TEMPLATE_SINGLEREAD_IMKEY is a standard template singleread imkey 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 template singleread imkey FM, simply by entering the name TEMPLATE_SINGLEREAD_IMKEY into the relevant SAP transaction such as SE37 or SE38.
Function Group: REDB_CODING_TEMPLATES
Program Name: SAPLREDB_CODING_TEMPLATES
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TEMPLATE_SINGLEREAD_IMKEY 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 'TEMPLATE_SINGLEREAD_IMKEY'".
EXPORTING
IV_IMKEY = "
* IV_RESET_INDEX = "
* IV_BYPASSING_INDEX = "
* IV_MAX_INDEX_SIZE = 100 "
IMPORTING
ES_VIOB01 = "
ES_VIOB02 = "
ES_VIOB03 = "
ES_VIMI01 = "
ES_VIMIMV = "
EXCEPTIONS
NOT_FOUND_IN_MAPPING_TABLE = 1 BUFFER_INCONSISTENCY = 2 INDEX_INCONSISTENCY = 3 INCONSISTENT_MAPPING_TABLE = 4 PARAMETER_ERROR = 5 OTHER_ERROR_SINGLEREAD = 6 OTHER_ERROR_INCONSISTENTT2B = 7
IMPORTING Parameters details for TEMPLATE_SINGLEREAD_IMKEY
IV_IMKEY -
Data type: IMKEYOptional: No
Call by Reference: Yes
IV_RESET_INDEX -
Data type: XFELDOptional: Yes
Call by Reference: Yes
IV_BYPASSING_INDEX -
Data type: XFELDOptional: Yes
Call by Reference: Yes
IV_MAX_INDEX_SIZE -
Data type: IDefault: 100
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for TEMPLATE_SINGLEREAD_IMKEY
ES_VIOB01 -
Data type: VIOB01Optional: No
Call by Reference: Yes
ES_VIOB02 -
Data type: VIOB02Optional: No
Call by Reference: Yes
ES_VIOB03 -
Data type: VIOB03Optional: No
Call by Reference: Yes
ES_VIMI01 -
Data type: VIMI01Optional: No
Call by Reference: Yes
ES_VIMIMV -
Data type: VIMIMVOptional: No
Call by Reference: Yes
EXCEPTIONS details
NOT_FOUND_IN_MAPPING_TABLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BUFFER_INCONSISTENCY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INDEX_INCONSISTENCY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INCONSISTENT_MAPPING_TABLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PARAMETER_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OTHER_ERROR_SINGLEREAD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OTHER_ERROR_INCONSISTENTT2B -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TEMPLATE_SINGLEREAD_IMKEY 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_iv_imkey | TYPE IMKEY, " | |||
| lv_es_viob01 | TYPE VIOB01, " | |||
| lv_not_found_in_mapping_table | TYPE VIOB01, " | |||
| lv_es_viob02 | TYPE VIOB02, " | |||
| lv_iv_reset_index | TYPE XFELD, " | |||
| lv_buffer_inconsistency | TYPE XFELD, " | |||
| lv_es_viob03 | TYPE VIOB03, " | |||
| lv_iv_bypassing_index | TYPE XFELD, " | |||
| lv_index_inconsistency | TYPE XFELD, " | |||
| lv_es_vimi01 | TYPE VIMI01, " | |||
| lv_iv_max_index_size | TYPE I, " 100 | |||
| lv_inconsistent_mapping_table | TYPE I, " | |||
| lv_es_vimimv | TYPE VIMIMV, " | |||
| lv_parameter_error | TYPE VIMIMV, " | |||
| lv_other_error_singleread | TYPE VIMIMV, " | |||
| lv_other_error_inconsistentt2b | TYPE VIMIMV. " |
|   CALL FUNCTION 'TEMPLATE_SINGLEREAD_IMKEY' " |
| EXPORTING | ||
| IV_IMKEY | = lv_iv_imkey | |
| IV_RESET_INDEX | = lv_iv_reset_index | |
| IV_BYPASSING_INDEX | = lv_iv_bypassing_index | |
| IV_MAX_INDEX_SIZE | = lv_iv_max_index_size | |
| IMPORTING | ||
| ES_VIOB01 | = lv_es_viob01 | |
| ES_VIOB02 | = lv_es_viob02 | |
| ES_VIOB03 | = lv_es_viob03 | |
| ES_VIMI01 | = lv_es_vimi01 | |
| ES_VIMIMV | = lv_es_vimimv | |
| EXCEPTIONS | ||
| NOT_FOUND_IN_MAPPING_TABLE = 1 | ||
| BUFFER_INCONSISTENCY = 2 | ||
| INDEX_INCONSISTENCY = 3 | ||
| INCONSISTENT_MAPPING_TABLE = 4 | ||
| PARAMETER_ERROR = 5 | ||
| OTHER_ERROR_SINGLEREAD = 6 | ||
| OTHER_ERROR_INCONSISTENTT2B = 7 | ||
| . " TEMPLATE_SINGLEREAD_IMKEY | ||
ABAP code using 7.40 inline data declarations to call FM TEMPLATE_SINGLEREAD_IMKEY
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_max_index_size) | = 100. | |||
Search for further information about these or an SAP related objects