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

Function READ_TEMP_DOCUMENT 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 'READ_TEMP_DOCUMENT'".
EXPORTING
I_UF05A = "General data for SAPMF05A
IMPORTING
E_TMPBL = "
TABLES
T_BKPF = "Document headers
* T_MANDATE = "
T_BSEC = "OTA data
T_BSED = "Bill of Exchange Data
T_BSEG = "Line items
T_BSET = "Tax information
T_BSEZ = "Additional data (per line item)
* T_ACSPLT = "Carrier for Split Information re: Current Account Line Items
* T_TIBAN = "IBAN
* T_BNKA = "Bankenstamm
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for READ_TEMP_DOCUMENT
I_UF05A - General data for SAPMF05A
Data type: UF05AOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for READ_TEMP_DOCUMENT
E_TMPBL -
Data type: TMPBLOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for READ_TEMP_DOCUMENT
T_BKPF - Document headers
Data type: BKPFOptional: No
Call by Reference: No ( called with pass by value option)
T_MANDATE -
Data type: SEPA_MANDATEOptional: Yes
Call by Reference: Yes
T_BSEC - OTA data
Data type: BSECOptional: No
Call by Reference: No ( called with pass by value option)
T_BSED - Bill of Exchange Data
Data type: BSEDOptional: No
Call by Reference: No ( called with pass by value option)
T_BSEG - Line items
Data type: BSEGOptional: No
Call by Reference: No ( called with pass by value option)
T_BSET - Tax information
Data type: BSETOptional: No
Call by Reference: No ( called with pass by value option)
T_BSEZ - Additional data (per line item)
Data type: BSEZOptional: No
Call by Reference: No ( called with pass by value option)
T_ACSPLT - Carrier for Split Information re: Current Account Line Items
Data type: ACSPLTOptional: Yes
Call by Reference: Yes
T_TIBAN - IBAN
Data type: TIBANOptional: Yes
Call by Reference: Yes
T_BNKA - Bankenstamm
Data type: BNKAOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NOT_FOUND - desired document was not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for READ_TEMP_DOCUMENT 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_bkpf | TYPE STANDARD TABLE OF BKPF, " | |||
| lv_e_tmpbl | TYPE TMPBL, " | |||
| lv_i_uf05a | TYPE UF05A, " | |||
| lv_not_found | TYPE UF05A, " | |||
| lt_t_mandate | TYPE STANDARD TABLE OF SEPA_MANDATE, " | |||
| lt_t_bsec | TYPE STANDARD TABLE OF BSEC, " | |||
| lt_t_bsed | TYPE STANDARD TABLE OF BSED, " | |||
| lt_t_bseg | TYPE STANDARD TABLE OF BSEG, " | |||
| lt_t_bset | TYPE STANDARD TABLE OF BSET, " | |||
| lt_t_bsez | TYPE STANDARD TABLE OF BSEZ, " | |||
| lt_t_acsplt | TYPE STANDARD TABLE OF ACSPLT, " | |||
| lt_t_tiban | TYPE STANDARD TABLE OF TIBAN, " | |||
| lt_t_bnka | TYPE STANDARD TABLE OF BNKA. " |
|   CALL FUNCTION 'READ_TEMP_DOCUMENT' " |
| EXPORTING | ||
| I_UF05A | = lv_i_uf05a | |
| IMPORTING | ||
| E_TMPBL | = lv_e_tmpbl | |
| TABLES | ||
| T_BKPF | = lt_t_bkpf | |
| T_MANDATE | = lt_t_mandate | |
| T_BSEC | = lt_t_bsec | |
| T_BSED | = lt_t_bsed | |
| T_BSEG | = lt_t_bseg | |
| T_BSET | = lt_t_bset | |
| T_BSEZ | = lt_t_bsez | |
| T_ACSPLT | = lt_t_acsplt | |
| T_TIBAN | = lt_t_tiban | |
| T_BNKA | = lt_t_bnka | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " READ_TEMP_DOCUMENT | ||
ABAP code using 7.40 inline data declarations to call FM READ_TEMP_DOCUMENT
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