SAP DOCU_CALL Function Module for









DOCU_CALL is a standard docu call 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 call FM, simply by entering the name DOCU_CALL 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): Normal Function Module
Update:



Function DOCU_CALL 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_CALL'"
EXPORTING
* CMOD_ENTRANCE = ' ' "Access via transaction CMOD
* SHORTTEXT = ' ' "
* TYP = 'E' "Documentation type
* SUPPRESS_EDIT = ' ' "
* USE_SEC_LANGU = ' ' "
* FORCE_EDITOR = ' ' "
* EXTENSION_MODE = ' ' "Enhancement mode
* TEMPLATE_ID = ' ' "
* TEMPLATE_OBJECT = ' ' "
* TEMPLATE_TYP = ' ' "
* USE_NOTE_TEMPLATE = ' ' "
* DISPL = ' ' "Display/maintenance mode
* DISPLAY_SHORTTEXT = ' ' "
* DISPL_MODE = '1' "Display mode (1=Editor,2=Formatted)
* DYNPRO_FOR_THLPF = ' ' "
* FDNAME_FOR_THLPF = ' ' "
ID = "Module class
LANGU = "Language
OBJECT = "Documentation module name
* PROGRAM_FOR_THLPF = ' ' "

IMPORTING
SAVETEXT = "
EXIT_CODE = "Document editor exit type

EXCEPTIONS
WRONG_NAME = 1
.



IMPORTING Parameters details for DOCU_CALL

CMOD_ENTRANCE - Access via transaction CMOD

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

SHORTTEXT -

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

TYP - Documentation type

Data type: DOKHL-TYP
Default: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SUPPRESS_EDIT -

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

USE_SEC_LANGU -

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

FORCE_EDITOR -

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

EXTENSION_MODE - Enhancement mode

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

TEMPLATE_ID -

Data type: DOKHL-ID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TEMPLATE_OBJECT -

Data type: DOKHL-OBJECT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TEMPLATE_TYP -

Data type: DOKHL-TYP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

USE_NOTE_TEMPLATE -

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

DISPL - Display/maintenance mode

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

DISPLAY_SHORTTEXT -

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

DISPL_MODE - Display mode (1=Editor,2=Formatted)

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

DYNPRO_FOR_THLPF -

Data type: THLPF-DYNPRO
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FDNAME_FOR_THLPF -

Data type: THLPF-FDNAME
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ID - Module class

Data type: DOKHL-ID
Optional: No
Call by Reference: No ( called with pass by value option)

LANGU - Language

Data type: DOKHL-LANGU
Optional: No
Call by Reference: No ( called with pass by value option)

OBJECT - Documentation module name

Data type: DOKHL-OBJECT
Optional: No
Call by Reference: No ( called with pass by value option)

PROGRAM_FOR_THLPF -

Data type: THLPF-PROGRAMM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for DOCU_CALL

SAVETEXT -

Data type: TTXCT-FUNCTION
Optional: No
Call by Reference: No ( called with pass by value option)

EXIT_CODE - Document editor exit type

Data type: RSDCU-EXIT_CODE
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

WRONG_NAME -

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

Copy and paste ABAP code example for DOCU_CALL 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_savetext  TYPE TTXCT-FUNCTION, "   
lv_wrong_name  TYPE TTXCT, "   
lv_cmod_entrance  TYPE TTXCT, "   SPACE
lv_shorttext  TYPE TTXCT, "   SPACE
lv_typ  TYPE DOKHL-TYP, "   'E'
lv_suppress_edit  TYPE DOKHL, "   SPACE
lv_use_sec_langu  TYPE DOKHL, "   SPACE
lv_force_editor  TYPE C, "   SPACE
lv_extension_mode  TYPE C, "   SPACE
lv_template_id  TYPE DOKHL-ID, "   SPACE
lv_template_object  TYPE DOKHL-OBJECT, "   SPACE
lv_template_typ  TYPE DOKHL-TYP, "   SPACE
lv_use_note_template  TYPE CHAR1, "   SPACE
lv_displ  TYPE CHAR1, "   ' '
lv_exit_code  TYPE RSDCU-EXIT_CODE, "   
lv_display_shorttext  TYPE CHAR1, "   SPACE
lv_displ_mode  TYPE CHAR1, "   '1'
lv_dynpro_for_thlpf  TYPE THLPF-DYNPRO, "   SPACE
lv_fdname_for_thlpf  TYPE THLPF-FDNAME, "   SPACE
lv_id  TYPE DOKHL-ID, "   
lv_langu  TYPE DOKHL-LANGU, "   
lv_object  TYPE DOKHL-OBJECT, "   
lv_program_for_thlpf  TYPE THLPF-PROGRAMM. "   SPACE

  CALL FUNCTION 'DOCU_CALL'  "
    EXPORTING
         CMOD_ENTRANCE = lv_cmod_entrance
         SHORTTEXT = lv_shorttext
         TYP = lv_typ
         SUPPRESS_EDIT = lv_suppress_edit
         USE_SEC_LANGU = lv_use_sec_langu
         FORCE_EDITOR = lv_force_editor
         EXTENSION_MODE = lv_extension_mode
         TEMPLATE_ID = lv_template_id
         TEMPLATE_OBJECT = lv_template_object
         TEMPLATE_TYP = lv_template_typ
         USE_NOTE_TEMPLATE = lv_use_note_template
         DISPL = lv_displ
         DISPLAY_SHORTTEXT = lv_display_shorttext
         DISPL_MODE = lv_displ_mode
         DYNPRO_FOR_THLPF = lv_dynpro_for_thlpf
         FDNAME_FOR_THLPF = lv_fdname_for_thlpf
         ID = lv_id
         LANGU = lv_langu
         OBJECT = lv_object
         PROGRAM_FOR_THLPF = lv_program_for_thlpf
    IMPORTING
         SAVETEXT = lv_savetext
         EXIT_CODE = lv_exit_code
    EXCEPTIONS
        WRONG_NAME = 1
. " DOCU_CALL




ABAP code using 7.40 inline data declarations to call FM DOCU_CALL

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 FUNCTION FROM TTXCT INTO @DATA(ld_savetext).
 
 
DATA(ld_cmod_entrance) = ' '.
 
DATA(ld_shorttext) = ' '.
 
"SELECT single TYP FROM DOKHL INTO @DATA(ld_typ).
DATA(ld_typ) = 'E'.
 
DATA(ld_suppress_edit) = ' '.
 
DATA(ld_use_sec_langu) = ' '.
 
DATA(ld_force_editor) = ' '.
 
DATA(ld_extension_mode) = ' '.
 
"SELECT single ID FROM DOKHL INTO @DATA(ld_template_id).
DATA(ld_template_id) = ' '.
 
"SELECT single OBJECT FROM DOKHL INTO @DATA(ld_template_object).
DATA(ld_template_object) = ' '.
 
"SELECT single TYP FROM DOKHL INTO @DATA(ld_template_typ).
DATA(ld_template_typ) = ' '.
 
DATA(ld_use_note_template) = ' '.
 
DATA(ld_displ) = ' '.
 
"SELECT single EXIT_CODE FROM RSDCU INTO @DATA(ld_exit_code).
 
DATA(ld_display_shorttext) = ' '.
 
DATA(ld_displ_mode) = '1'.
 
"SELECT single DYNPRO FROM THLPF INTO @DATA(ld_dynpro_for_thlpf).
DATA(ld_dynpro_for_thlpf) = ' '.
 
"SELECT single FDNAME FROM THLPF INTO @DATA(ld_fdname_for_thlpf).
DATA(ld_fdname_for_thlpf) = ' '.
 
"SELECT single ID FROM DOKHL INTO @DATA(ld_id).
 
"SELECT single LANGU FROM DOKHL INTO @DATA(ld_langu).
 
"SELECT single OBJECT FROM DOKHL INTO @DATA(ld_object).
 
"SELECT single PROGRAMM FROM THLPF INTO @DATA(ld_program_for_thlpf).
DATA(ld_program_for_thlpf) = ' '.
 


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!