SAP S_TWB_READ_DOCU Function Module for
S_TWB_READ_DOCU is a standard s twb read docu 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 s twb read docu FM, simply by entering the name S_TWB_READ_DOCU into the relevant SAP transaction such as SE37 or SE38.
Function Group: S_TWB_RFC
Program Name: SAPLS_TWB_RFC
Main Program: SAPLS_TWB_RFC
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function S_TWB_READ_DOCU 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 'S_TWB_READ_DOCU'".
EXPORTING
* IV_DOCU_LANGUAGE = SY-LANGU "Documentation language
* IV_DOCU_ID = 'HY' "Document Class
IV_DOCU_OBJECT = "Documentation Object
* IV_DOCU_TYPE = 'E' "Documentation Type
* IV_DOCU_VERSION = "Version of document
* IV_ONLY_HEADER = "Flag with Values ' ' and 'X'
* IV_REPLACE_CONTROL = ' ' "Flag with Values ' ' and 'X'
* IV_DELETE_UNUSED_SYMBOLS = 'X' "Flag with Values ' ' and 'X'
IMPORTING
EV_DOKIL = "Index for Documentation Table DOKH
EV_DOKHL = "Documentation: Headers
TABLES
* ET_TEXTLINES = "Text
EXCEPTIONS
DOCU_NOT_FOUND = 1
IMPORTING Parameters details for S_TWB_READ_DOCU
IV_DOCU_LANGUAGE - Documentation language
Data type: DOKU_LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_DOCU_ID - Document Class
Data type: DOKU_IDDefault: 'HY'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_DOCU_OBJECT - Documentation Object
Data type: DOKU_OBJOptional: No
Call by Reference: No ( called with pass by value option)
IV_DOCU_TYPE - Documentation Type
Data type: DOKU_TYPDefault: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_DOCU_VERSION - Version of document
Data type: DOKIL-VERSIONOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_ONLY_HEADER - Flag with Values ' ' and 'X'
Data type: HIER_YESNOOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_REPLACE_CONTROL - Flag with Values ' ' and 'X'
Data type: HIER_YESNODefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_DELETE_UNUSED_SYMBOLS - Flag with Values ' ' and 'X'
Data type: HIER_YESNODefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for S_TWB_READ_DOCU
EV_DOKIL - Index for Documentation Table DOKH
Data type: DOKILOptional: No
Call by Reference: No ( called with pass by value option)
EV_DOKHL - Documentation: Headers
Data type: DOKHLOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for S_TWB_READ_DOCU
ET_TEXTLINES - Text
Data type: TLINEOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
DOCU_NOT_FOUND - Documentation not found
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for S_TWB_READ_DOCU 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_ev_dokil | TYPE DOKIL, " | |||
| lt_et_textlines | TYPE STANDARD TABLE OF TLINE, " | |||
| lv_docu_not_found | TYPE TLINE, " | |||
| lv_iv_docu_language | TYPE DOKU_LANGU, " SY-LANGU | |||
| lv_ev_dokhl | TYPE DOKHL, " | |||
| lv_iv_docu_id | TYPE DOKU_ID, " 'HY' | |||
| lv_iv_docu_object | TYPE DOKU_OBJ, " | |||
| lv_iv_docu_type | TYPE DOKU_TYP, " 'E' | |||
| lv_iv_docu_version | TYPE DOKIL-VERSION, " | |||
| lv_iv_only_header | TYPE HIER_YESNO, " | |||
| lv_iv_replace_control | TYPE HIER_YESNO, " SPACE | |||
| lv_iv_delete_unused_symbols | TYPE HIER_YESNO. " 'X' |
|   CALL FUNCTION 'S_TWB_READ_DOCU' " |
| EXPORTING | ||
| IV_DOCU_LANGUAGE | = lv_iv_docu_language | |
| IV_DOCU_ID | = lv_iv_docu_id | |
| IV_DOCU_OBJECT | = lv_iv_docu_object | |
| IV_DOCU_TYPE | = lv_iv_docu_type | |
| IV_DOCU_VERSION | = lv_iv_docu_version | |
| IV_ONLY_HEADER | = lv_iv_only_header | |
| IV_REPLACE_CONTROL | = lv_iv_replace_control | |
| IV_DELETE_UNUSED_SYMBOLS | = lv_iv_delete_unused_symbols | |
| IMPORTING | ||
| EV_DOKIL | = lv_ev_dokil | |
| EV_DOKHL | = lv_ev_dokhl | |
| TABLES | ||
| ET_TEXTLINES | = lt_et_textlines | |
| EXCEPTIONS | ||
| DOCU_NOT_FOUND = 1 | ||
| . " S_TWB_READ_DOCU | ||
ABAP code using 7.40 inline data declarations to call FM S_TWB_READ_DOCU
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_docu_language) | = SY-LANGU. | |||
| DATA(ld_iv_docu_id) | = 'HY'. | |||
| DATA(ld_iv_docu_type) | = 'E'. | |||
| "SELECT single VERSION FROM DOKIL INTO @DATA(ld_iv_docu_version). | ||||
| DATA(ld_iv_replace_control) | = ' '. | |||
| DATA(ld_iv_delete_unused_symbols) | = 'X'. | |||
Search for further information about these or an SAP related objects