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

Function DOCUMENT_DIRECTORY_MAINTAIN 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 'DOCUMENT_DIRECTORY_MAINTAIN'".
EXPORTING
* ACTIV = 'X' "Active ('X' = yes)
* PRIID = 1 "Priority number
* REPID = ' ' "Report name
* SCOLS = 0 "Column number
* SHTID = 0 "Page number
* TFLAG = ' ' "Text flag
* WTYPE = ' ' "Window category
* I_COBJID = ' ' "
* I_WINID = 0 "Number of the window
* MODE = '1' "Mode ('1' = everything, '2' only T242N, '3' only T242P
* MSGID = ' ' "Message area
* MSGNO = 0 "Message number
* MSGV1 = ' ' "Message variable 1
* MSGV2 = ' ' "Message variable 2
* MSGV3 = ' ' "Message variable 3
* MSGV4 = ' ' "Message variable 4
IMPORTING
WINID = "Window number
EXCEPTIONS
NUMBERS_EXPIRED = 1
IMPORTING Parameters details for DOCUMENT_DIRECTORY_MAINTAIN
ACTIV - Active ('X' = yes)
Data type: T242N-ACTIVDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PRIID - Priority number
Data type: T242N-PRIIDDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
REPID - Report name
Data type: T242N-REPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SCOLS - Column number
Data type: T242P-SCOLSOptional: Yes
Call by Reference: No ( called with pass by value option)
SHTID - Page number
Data type: T242N-SHTIDOptional: Yes
Call by Reference: No ( called with pass by value option)
TFLAG - Text flag
Data type: T242P-TFLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
WTYPE - Window category
Data type: T242P-WTYPEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_COBJID -
Data type: T242P-COBJIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_WINID - Number of the window
Data type: T242N-WINIDOptional: Yes
Call by Reference: No ( called with pass by value option)
MODE - Mode ('1' = everything, '2' only T242N, '3' only T242P
Data type: CDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSGID - Message area
Data type: SY-MSGIDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSGNO - Message number
Data type: SY-MSGNOOptional: Yes
Call by Reference: No ( called with pass by value option)
MSGV1 - Message variable 1
Data type: SY-MSGV1Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSGV2 - Message variable 2
Data type: SY-MSGV2Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSGV3 - Message variable 3
Data type: SY-MSGV3Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSGV4 - Message variable 4
Data type: SY-MSGV4Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DOCUMENT_DIRECTORY_MAINTAIN
WINID - Window number
Data type: T242N-WINIDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NUMBERS_EXPIRED - Number could not be assigned
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DOCUMENT_DIRECTORY_MAINTAIN 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_activ | TYPE T242N-ACTIV, " 'X' | |||
| lv_winid | TYPE T242N-WINID, " | |||
| lv_numbers_expired | TYPE T242N, " | |||
| lv_priid | TYPE T242N-PRIID, " 1 | |||
| lv_repid | TYPE T242N-REPID, " SPACE | |||
| lv_scols | TYPE T242P-SCOLS, " 0 | |||
| lv_shtid | TYPE T242N-SHTID, " 0 | |||
| lv_tflag | TYPE T242P-TFLAG, " ' ' | |||
| lv_wtype | TYPE T242P-WTYPE, " SPACE | |||
| lv_i_cobjid | TYPE T242P-COBJID, " SPACE | |||
| lv_i_winid | TYPE T242N-WINID, " 0 | |||
| lv_mode | TYPE C, " '1' | |||
| lv_msgid | TYPE SY-MSGID, " ' ' | |||
| lv_msgno | TYPE SY-MSGNO, " 0 | |||
| lv_msgv1 | TYPE SY-MSGV1, " ' ' | |||
| lv_msgv2 | TYPE SY-MSGV2, " ' ' | |||
| lv_msgv3 | TYPE SY-MSGV3, " ' ' | |||
| lv_msgv4 | TYPE SY-MSGV4. " ' ' |
|   CALL FUNCTION 'DOCUMENT_DIRECTORY_MAINTAIN' " |
| EXPORTING | ||
| ACTIV | = lv_activ | |
| PRIID | = lv_priid | |
| REPID | = lv_repid | |
| SCOLS | = lv_scols | |
| SHTID | = lv_shtid | |
| TFLAG | = lv_tflag | |
| WTYPE | = lv_wtype | |
| I_COBJID | = lv_i_cobjid | |
| I_WINID | = lv_i_winid | |
| MODE | = lv_mode | |
| MSGID | = lv_msgid | |
| MSGNO | = lv_msgno | |
| MSGV1 | = lv_msgv1 | |
| MSGV2 | = lv_msgv2 | |
| MSGV3 | = lv_msgv3 | |
| MSGV4 | = lv_msgv4 | |
| IMPORTING | ||
| WINID | = lv_winid | |
| EXCEPTIONS | ||
| NUMBERS_EXPIRED = 1 | ||
| . " DOCUMENT_DIRECTORY_MAINTAIN | ||
ABAP code using 7.40 inline data declarations to call FM DOCUMENT_DIRECTORY_MAINTAIN
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 ACTIV FROM T242N INTO @DATA(ld_activ). | ||||
| DATA(ld_activ) | = 'X'. | |||
| "SELECT single WINID FROM T242N INTO @DATA(ld_winid). | ||||
| "SELECT single PRIID FROM T242N INTO @DATA(ld_priid). | ||||
| DATA(ld_priid) | = 1. | |||
| "SELECT single REPID FROM T242N INTO @DATA(ld_repid). | ||||
| DATA(ld_repid) | = ' '. | |||
| "SELECT single SCOLS FROM T242P INTO @DATA(ld_scols). | ||||
| "SELECT single SHTID FROM T242N INTO @DATA(ld_shtid). | ||||
| "SELECT single TFLAG FROM T242P INTO @DATA(ld_tflag). | ||||
| DATA(ld_tflag) | = ' '. | |||
| "SELECT single WTYPE FROM T242P INTO @DATA(ld_wtype). | ||||
| DATA(ld_wtype) | = ' '. | |||
| "SELECT single COBJID FROM T242P INTO @DATA(ld_i_cobjid). | ||||
| DATA(ld_i_cobjid) | = ' '. | |||
| "SELECT single WINID FROM T242N INTO @DATA(ld_i_winid). | ||||
| DATA(ld_mode) | = '1'. | |||
| "SELECT single MSGID FROM SY INTO @DATA(ld_msgid). | ||||
| DATA(ld_msgid) | = ' '. | |||
| "SELECT single MSGNO FROM SY INTO @DATA(ld_msgno). | ||||
| "SELECT single MSGV1 FROM SY INTO @DATA(ld_msgv1). | ||||
| DATA(ld_msgv1) | = ' '. | |||
| "SELECT single MSGV2 FROM SY INTO @DATA(ld_msgv2). | ||||
| DATA(ld_msgv2) | = ' '. | |||
| "SELECT single MSGV3 FROM SY INTO @DATA(ld_msgv3). | ||||
| DATA(ld_msgv3) | = ' '. | |||
| "SELECT single MSGV4 FROM SY INTO @DATA(ld_msgv4). | ||||
| DATA(ld_msgv4) | = ' '. | |||
Search for further information about these or an SAP related objects