SAP DOCU_GET Function Module for
DOCU_GET is a standard docu get 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 docu get FM, simply by entering the name DOCU_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: SDOC
Program Name: SAPLSDOC
Main Program: SAPLSDOC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function DOCU_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 'DOCU_GET'".
EXPORTING
* EXTEND_EXCEPT = ' ' "
ID = "Documentation class
LANGU = "Language
OBJECT = "Documentation module name
* TYP = 'E' "Documentation type
* VERSION = 0 "
* VERSION_ACTIVE_OR_LAST = 'L' "Highest or last active version
* PRINT_PARAM_GET = 'X' "
IMPORTING
DOKSTATE = "Documentation module status
DOKTITLE = "
HEAD = "SAPscript documentation module information
DOKTYP = "
TABLES
LINE = "Documentation module contents
EXCEPTIONS
NO_DOCU_ON_SCREEN = 1 NO_DOCU_SELF_DEF = 2 NO_DOCU_TEMP = 3 RET_CODE = 4
IMPORTING Parameters details for DOCU_GET
EXTEND_EXCEPT -
Data type: SY-BATCHDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID - Documentation class
Data type: DOKHL-IDOptional: No
Call by Reference: No ( called with pass by value option)
LANGU - Language
Data type: SY-LANGUOptional: No
Call by Reference: No ( called with pass by value option)
OBJECT - Documentation module name
Data type: DOKHL-OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
TYP - Documentation type
Data type: DOKHL-TYPDefault: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)
VERSION -
Data type: DOKHL-DOKVERSIONOptional: Yes
Call by Reference: No ( called with pass by value option)
VERSION_ACTIVE_OR_LAST - Highest or last active version
Data type: SY-BATCHDefault: 'L'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PRINT_PARAM_GET -
Data type: SY-BATCHDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DOCU_GET
DOKSTATE - Documentation module status
Data type: DOKHL-DOKSTATEOptional: No
Call by Reference: No ( called with pass by value option)
DOKTITLE -
Data type: DSYST-DOKTITLEOptional: No
Call by Reference: No ( called with pass by value option)
HEAD - SAPscript documentation module information
Data type: THEADOptional: No
Call by Reference: No ( called with pass by value option)
DOKTYP -
Data type: DOKIL-TYPOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for DOCU_GET
LINE - Documentation module contents
Data type: TLINEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_DOCU_ON_SCREEN -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_DOCU_SELF_DEF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_DOCU_TEMP -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RET_CODE - Return code - module not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DOCU_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_line | TYPE STANDARD TABLE OF TLINE, " | |||
lv_dokstate | TYPE DOKHL-DOKSTATE, " | |||
lv_extend_except | TYPE SY-BATCH, " SPACE | |||
lv_no_docu_on_screen | TYPE SY, " | |||
lv_id | TYPE DOKHL-ID, " | |||
lv_doktitle | TYPE DSYST-DOKTITLE, " | |||
lv_no_docu_self_def | TYPE DSYST, " | |||
lv_head | TYPE THEAD, " | |||
lv_langu | TYPE SY-LANGU, " | |||
lv_no_docu_temp | TYPE SY, " | |||
lv_doktyp | TYPE DOKIL-TYP, " | |||
lv_object | TYPE DOKHL-OBJECT, " | |||
lv_ret_code | TYPE DOKHL, " | |||
lv_typ | TYPE DOKHL-TYP, " 'E' | |||
lv_version | TYPE DOKHL-DOKVERSION, " 0 | |||
lv_version_active_or_last | TYPE SY-BATCH, " 'L' | |||
lv_print_param_get | TYPE SY-BATCH. " 'X' |
  CALL FUNCTION 'DOCU_GET' " |
EXPORTING | ||
EXTEND_EXCEPT | = lv_extend_except | |
ID | = lv_id | |
LANGU | = lv_langu | |
OBJECT | = lv_object | |
TYP | = lv_typ | |
VERSION | = lv_version | |
VERSION_ACTIVE_OR_LAST | = lv_version_active_or_last | |
PRINT_PARAM_GET | = lv_print_param_get | |
IMPORTING | ||
DOKSTATE | = lv_dokstate | |
DOKTITLE | = lv_doktitle | |
HEAD | = lv_head | |
DOKTYP | = lv_doktyp | |
TABLES | ||
LINE | = lt_line | |
EXCEPTIONS | ||
NO_DOCU_ON_SCREEN = 1 | ||
NO_DOCU_SELF_DEF = 2 | ||
NO_DOCU_TEMP = 3 | ||
RET_CODE = 4 | ||
. " DOCU_GET |
ABAP code using 7.40 inline data declarations to call FM DOCU_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."SELECT single DOKSTATE FROM DOKHL INTO @DATA(ld_dokstate). | ||||
"SELECT single BATCH FROM SY INTO @DATA(ld_extend_except). | ||||
DATA(ld_extend_except) | = ' '. | |||
"SELECT single ID FROM DOKHL INTO @DATA(ld_id). | ||||
"SELECT single DOKTITLE FROM DSYST INTO @DATA(ld_doktitle). | ||||
"SELECT single LANGU FROM SY INTO @DATA(ld_langu). | ||||
"SELECT single TYP FROM DOKIL INTO @DATA(ld_doktyp). | ||||
"SELECT single OBJECT FROM DOKHL INTO @DATA(ld_object). | ||||
"SELECT single TYP FROM DOKHL INTO @DATA(ld_typ). | ||||
DATA(ld_typ) | = 'E'. | |||
"SELECT single DOKVERSION FROM DOKHL INTO @DATA(ld_version). | ||||
"SELECT single BATCH FROM SY INTO @DATA(ld_version_active_or_last). | ||||
DATA(ld_version_active_or_last) | = 'L'. | |||
"SELECT single BATCH FROM SY INTO @DATA(ld_print_param_get). | ||||
DATA(ld_print_param_get) | = 'X'. | |||
Search for further information about these or an SAP related objects