SAP /AIN/UI_DOCUMENT_GET Function Module for RFC function for retrieving documents









/AIN/UI_DOCUMENT_GET is a standard /ain/ui document get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for RFC function for retrieving documents 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 document get FM, simply by entering the name /AIN/UI_DOCUMENT_GET into the relevant SAP transaction such as SE37 or SE38.

Function Group: /AIN/UI_RFC
Program Name: /AIN/SAPLUI_RFC
Main Program: /AIN/SAPLUI_RFC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function /AIN/UI_DOCUMENT_GET 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_DOCUMENT_GET'"RFC function for retrieving documents
EXPORTING
* IV_DOC_ID_FROM = "Document ID
* IV_EXPIRY_DATE_TO = "Expiration Date
* IV_BU_PARTNER = "Business Partner Number
* IV_FIELD_NAME = "Element name
* IV_FIELD_VALUE = "Field value of object context
* IV_NUM_ROWS = "UI: Number of rows to display
* IV_DOC_ID_TO = "Document ID
* IV_DOC_TYPE = "Document Type
* IV_ACTION_TYPE = "Action Type
* IV_DOC_STATUS_FROM = "Document Status
* IV_DOC_STATUS_TO = "Document Status
* IV_DUE_DATE_FROM = "Due Date
* IV_DUE_DATE_TO = "Due Date
* IV_EXPIRY_DATE_FROM = "Expiration Date

TABLES
* T_DOC = "UI: Document keys
.



IMPORTING Parameters details for /AIN/UI_DOCUMENT_GET

IV_DOC_ID_FROM - Document ID

Data type: /AIN/DM_DOC_ID
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_EXPIRY_DATE_TO - Expiration Date

Data type: /AIN/DM_EXPIRY_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_BU_PARTNER - Business Partner Number

Data type: BU_PARTNER
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_FIELD_NAME - Element name

Data type: /AIN/PRF_ELEMENT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_FIELD_VALUE - Field value of object context

Data type: /AIN/DM_OBJ_CTX_FIELD_VALUE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_NUM_ROWS - UI: Number of rows to display

Data type: /AIN/UI_NUM_ROWS
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_DOC_ID_TO - Document ID

Data type: /AIN/DM_DOC_ID
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_DOC_TYPE - Document Type

Data type: /AIN/DM_DOC_TYPE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ACTION_TYPE - Action Type

Data type: /AIN/DM_ACTION_TYPE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_DOC_STATUS_FROM - Document Status

Data type: /AIN/DM_DOC_STATUS
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_DOC_STATUS_TO - Document Status

Data type: /AIN/DM_DOC_STATUS
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_DUE_DATE_FROM - Due Date

Data type: /AIN/DM_DUE_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_DUE_DATE_TO - Due Date

Data type: /AIN/DM_DUE_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_EXPIRY_DATE_FROM - Expiration Date

Data type: /AIN/DM_EXPIRY_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for /AIN/UI_DOCUMENT_GET

T_DOC - UI: Document keys

Data type: /AIN/UI_DOC_RFC_STR
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for /AIN/UI_DOCUMENT_GET 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_doc  TYPE STANDARD TABLE OF /AIN/UI_DOC_RFC_STR, "   
lv_iv_doc_id_from  TYPE /AIN/DM_DOC_ID, "   
lv_iv_expiry_date_to  TYPE /AIN/DM_EXPIRY_DATE, "   
lv_iv_bu_partner  TYPE BU_PARTNER, "   
lv_iv_field_name  TYPE /AIN/PRF_ELEMENT, "   
lv_iv_field_value  TYPE /AIN/DM_OBJ_CTX_FIELD_VALUE, "   
lv_iv_num_rows  TYPE /AIN/UI_NUM_ROWS, "   
lv_iv_doc_id_to  TYPE /AIN/DM_DOC_ID, "   
lv_iv_doc_type  TYPE /AIN/DM_DOC_TYPE, "   
lv_iv_action_type  TYPE /AIN/DM_ACTION_TYPE, "   
lv_iv_doc_status_from  TYPE /AIN/DM_DOC_STATUS, "   
lv_iv_doc_status_to  TYPE /AIN/DM_DOC_STATUS, "   
lv_iv_due_date_from  TYPE /AIN/DM_DUE_DATE, "   
lv_iv_due_date_to  TYPE /AIN/DM_DUE_DATE, "   
lv_iv_expiry_date_from  TYPE /AIN/DM_EXPIRY_DATE. "   

  CALL FUNCTION '/AIN/UI_DOCUMENT_GET'  "RFC function for retrieving documents
    EXPORTING
         IV_DOC_ID_FROM = lv_iv_doc_id_from
         IV_EXPIRY_DATE_TO = lv_iv_expiry_date_to
         IV_BU_PARTNER = lv_iv_bu_partner
         IV_FIELD_NAME = lv_iv_field_name
         IV_FIELD_VALUE = lv_iv_field_value
         IV_NUM_ROWS = lv_iv_num_rows
         IV_DOC_ID_TO = lv_iv_doc_id_to
         IV_DOC_TYPE = lv_iv_doc_type
         IV_ACTION_TYPE = lv_iv_action_type
         IV_DOC_STATUS_FROM = lv_iv_doc_status_from
         IV_DOC_STATUS_TO = lv_iv_doc_status_to
         IV_DUE_DATE_FROM = lv_iv_due_date_from
         IV_DUE_DATE_TO = lv_iv_due_date_to
         IV_EXPIRY_DATE_FROM = lv_iv_expiry_date_from
    TABLES
         T_DOC = lt_t_doc
. " /AIN/UI_DOCUMENT_GET




ABAP code using 7.40 inline data declarations to call FM /AIN/UI_DOCUMENT_GET

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!