SAP REQUEST_READ_SINGLE_WITHVARNT Function Module for
REQUEST_READ_SINGLE_WITHVARNT is a standard request read single withvarnt 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 request read single withvarnt FM, simply by entering the name REQUEST_READ_SINGLE_WITHVARNT into the relevant SAP transaction such as SE37 or SE38.
Function Group: AIA1
Program Name: SAPLAIA1
Main Program: SAPLAIA1
Appliation area: A
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function REQUEST_READ_SINGLE_WITHVARNT 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 'REQUEST_READ_SINGLE_WITHVARNT'".
EXPORTING
I_POSNR = "
* I_VARNT = "
* I_BUFFER = 'X' "
* I_STATUSCHECK_FLAG = "
* I_TCODE = "Transaction Code
IMPORTING
E_NUMBER_OF_VARIANT = "
E_XIMAK = "Approp. request
E_PROFIL = "
TABLES
* T_IMAV = "Variants
* T_IMAVT = "
* T_IMAKT = "
* T_IMAVZ = "
* T_IMAKPA = "
* T_TAIF2 = "
EXCEPTIONS
NO_REQUEST_NUMBER = 1 WRONG_APP_REQUEST = 2
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLAIA1_001 Transfer of Activity Category to Customer Exit
EXIT_SAPLAIA1_002 Assignment of Work Center when Creating PM Order from App. Req.
EXIT_SAPLAIA1_003 Transfer of Approp. Request Data to WBS Element
IMPORTING Parameters details for REQUEST_READ_SINGLE_WITHVARNT
I_POSNR -
Data type: IMAK-POSNROptional: No
Call by Reference: No ( called with pass by value option)
I_VARNT -
Data type: IMAV-VARNTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BUFFER -
Data type: IMAV-XGENEHDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_STATUSCHECK_FLAG -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
I_TCODE - Transaction Code
Data type: SY-TCODEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for REQUEST_READ_SINGLE_WITHVARNT
E_NUMBER_OF_VARIANT -
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
E_XIMAK - Approp. request
Data type: RIMAKOptional: No
Call by Reference: No ( called with pass by value option)
E_PROFIL -
Data type: TBP1C-PROFILOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for REQUEST_READ_SINGLE_WITHVARNT
T_IMAV - Variants
Data type: RIMAVOptional: Yes
Call by Reference: No ( called with pass by value option)
T_IMAVT -
Data type: RIMAVTOptional: Yes
Call by Reference: No ( called with pass by value option)
T_IMAKT -
Data type: RIMAKTOptional: Yes
Call by Reference: No ( called with pass by value option)
T_IMAVZ -
Data type: RIMAVZOptional: Yes
Call by Reference: No ( called with pass by value option)
T_IMAKPA -
Data type: RIMAKPAOptional: Yes
Call by Reference: No ( called with pass by value option)
T_TAIF2 -
Data type: IMAD1_XTAIF2Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_REQUEST_NUMBER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_APP_REQUEST -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for REQUEST_READ_SINGLE_WITHVARNT 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: | ||||
| lt_t_imav | TYPE STANDARD TABLE OF RIMAV, " | |||
| lv_i_posnr | TYPE IMAK-POSNR, " | |||
| lv_no_request_number | TYPE IMAK, " | |||
| lv_e_number_of_variant | TYPE SY-TABIX, " | |||
| lv_e_ximak | TYPE RIMAK, " | |||
| lv_i_varnt | TYPE IMAV-VARNT, " | |||
| lt_t_imavt | TYPE STANDARD TABLE OF RIMAVT, " | |||
| lv_wrong_app_request | TYPE RIMAVT, " | |||
| lt_t_imakt | TYPE STANDARD TABLE OF RIMAKT, " | |||
| lv_e_profil | TYPE TBP1C-PROFIL, " | |||
| lv_i_buffer | TYPE IMAV-XGENEH, " 'X' | |||
| lt_t_imavz | TYPE STANDARD TABLE OF RIMAVZ, " | |||
| lv_i_statuscheck_flag | TYPE I, " | |||
| lv_i_tcode | TYPE SY-TCODE, " | |||
| lt_t_imakpa | TYPE STANDARD TABLE OF RIMAKPA, " | |||
| lt_t_taif2 | TYPE STANDARD TABLE OF IMAD1_XTAIF2. " |
|   CALL FUNCTION 'REQUEST_READ_SINGLE_WITHVARNT' " |
| EXPORTING | ||
| I_POSNR | = lv_i_posnr | |
| I_VARNT | = lv_i_varnt | |
| I_BUFFER | = lv_i_buffer | |
| I_STATUSCHECK_FLAG | = lv_i_statuscheck_flag | |
| I_TCODE | = lv_i_tcode | |
| IMPORTING | ||
| E_NUMBER_OF_VARIANT | = lv_e_number_of_variant | |
| E_XIMAK | = lv_e_ximak | |
| E_PROFIL | = lv_e_profil | |
| TABLES | ||
| T_IMAV | = lt_t_imav | |
| T_IMAVT | = lt_t_imavt | |
| T_IMAKT | = lt_t_imakt | |
| T_IMAVZ | = lt_t_imavz | |
| T_IMAKPA | = lt_t_imakpa | |
| T_TAIF2 | = lt_t_taif2 | |
| EXCEPTIONS | ||
| NO_REQUEST_NUMBER = 1 | ||
| WRONG_APP_REQUEST = 2 | ||
| . " REQUEST_READ_SINGLE_WITHVARNT | ||
ABAP code using 7.40 inline data declarations to call FM REQUEST_READ_SINGLE_WITHVARNT
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 POSNR FROM IMAK INTO @DATA(ld_i_posnr). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_e_number_of_variant). | ||||
| "SELECT single VARNT FROM IMAV INTO @DATA(ld_i_varnt). | ||||
| "SELECT single PROFIL FROM TBP1C INTO @DATA(ld_e_profil). | ||||
| "SELECT single XGENEH FROM IMAV INTO @DATA(ld_i_buffer). | ||||
| DATA(ld_i_buffer) | = 'X'. | |||
| "SELECT single TCODE FROM SY INTO @DATA(ld_i_tcode). | ||||
Search for further information about these or an SAP related objects