SAP AIB2_GET_LATEST_REQUEST Function Module for IM: Determine Most Recent Request of an InfoSource
AIB2_GET_LATEST_REQUEST is a standard aib2 get latest request SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for IM: Determine Most Recent Request of an InfoSource 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 aib2 get latest request FM, simply by entering the name AIB2_GET_LATEST_REQUEST into the relevant SAP transaction such as SE37 or SE38.
Function Group: AIB2
Program Name: SAPLAIB2
Main Program: SAPLAIB2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function AIB2_GET_LATEST_REQUEST 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 'AIB2_GET_LATEST_REQUEST'"IM: Determine Most Recent Request of an InfoSource.
EXPORTING
I_INFOSOURCE = "InfoSource
I_LOGSYST = "Logical System
IMPORTING
E_FLG_BLOCK_INFOSOURCE = "General Flag
ES_REQUEST = "
TABLES
* CT_MONITOR = "User-defined monitor entry
IMPORTING Parameters details for AIB2_GET_LATEST_REQUEST
I_INFOSOURCE - InfoSource
Data type: RSIS-ISOURCEOptional: No
Call by Reference: Yes
I_LOGSYST - Logical System
Data type: RSOSOLTP-LOGSYSOptional: No
Call by Reference: Yes
EXPORTING Parameters details for AIB2_GET_LATEST_REQUEST
E_FLG_BLOCK_INFOSOURCE - General Flag
Data type: FLAGOptional: No
Call by Reference: Yes
ES_REQUEST -
Data type: RSSM_S_API_REQUEST_GETOptional: No
Call by Reference: Yes
TABLES Parameters details for AIB2_GET_LATEST_REQUEST
CT_MONITOR - User-defined monitor entry
Data type: RSMONITOROptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for AIB2_GET_LATEST_REQUEST 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_ct_monitor | TYPE STANDARD TABLE OF RSMONITOR, " | |||
| lv_i_infosource | TYPE RSIS-ISOURCE, " | |||
| lv_e_flg_block_infosource | TYPE FLAG, " | |||
| lv_i_logsyst | TYPE RSOSOLTP-LOGSYS, " | |||
| lv_es_request | TYPE RSSM_S_API_REQUEST_GET. " |
|   CALL FUNCTION 'AIB2_GET_LATEST_REQUEST' "IM: Determine Most Recent Request of an InfoSource |
| EXPORTING | ||
| I_INFOSOURCE | = lv_i_infosource | |
| I_LOGSYST | = lv_i_logsyst | |
| IMPORTING | ||
| E_FLG_BLOCK_INFOSOURCE | = lv_e_flg_block_infosource | |
| ES_REQUEST | = lv_es_request | |
| TABLES | ||
| CT_MONITOR | = lt_ct_monitor | |
| . " AIB2_GET_LATEST_REQUEST | ||
ABAP code using 7.40 inline data declarations to call FM AIB2_GET_LATEST_REQUEST
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 ISOURCE FROM RSIS INTO @DATA(ld_i_infosource). | ||||
| "SELECT single LOGSYS FROM RSOSOLTP INTO @DATA(ld_i_logsyst). | ||||
Search for further information about these or an SAP related objects