SAP UJF_API_CREATE_DIRECTORY Function Module for File Services - Create Directory
UJF_API_CREATE_DIRECTORY is a standard ujf api create directory SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for File Services - Create Directory processing and below is the pattern details for this FM, 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 ujf api create directory FM, simply by entering the name UJF_API_CREATE_DIRECTORY into the relevant SAP transaction such as SE37 or SE38.
Function Group: UJF0
Program Name: SAPLUJF0
Main Program: SAPLUJF0
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function UJF_API_CREATE_DIRECTORY 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 'UJF_API_CREATE_DIRECTORY'"File Services - Create Directory.
EXPORTING
I_USER = "BPC User Information
I_APPSET = "AppSet Name
I_DIRNAME = "Document/Folder Name
IMPORTING
E_MESSAGE_LINES = "Messages
EXCEPTIONS
SYSTEM_FAILURE = 1 COMMUNICATION_FAILURE = 2
IMPORTING Parameters details for UJF_API_CREATE_DIRECTORY
I_USER - BPC User Information
Data type: UJ0_S_USEROptional: No
Call by Reference: No ( called with pass by value option)
I_APPSET - AppSet Name
Data type: UJF_DOC-APPSETOptional: No
Call by Reference: No ( called with pass by value option)
I_DIRNAME - Document/Folder Name
Data type: UJF_DOC-DOCNAMEOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for UJF_API_CREATE_DIRECTORY
E_MESSAGE_LINES - Messages
Data type: UJ0_T_MESSAGEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
SYSTEM_FAILURE - System Failure Exception
Data type:Optional: No
Call by Reference: Yes
COMMUNICATION_FAILURE - Communication Failure Exception
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for UJF_API_CREATE_DIRECTORY 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_i_user | TYPE UJ0_S_USER, " | |||
| lv_system_failure | TYPE UJ0_S_USER, " | |||
| lv_e_message_lines | TYPE UJ0_T_MESSAGE, " | |||
| lv_i_appset | TYPE UJF_DOC-APPSET, " | |||
| lv_communication_failure | TYPE UJF_DOC, " | |||
| lv_i_dirname | TYPE UJF_DOC-DOCNAME. " |
|   CALL FUNCTION 'UJF_API_CREATE_DIRECTORY' "File Services - Create Directory |
| EXPORTING | ||
| I_USER | = lv_i_user | |
| I_APPSET | = lv_i_appset | |
| I_DIRNAME | = lv_i_dirname | |
| IMPORTING | ||
| E_MESSAGE_LINES | = lv_e_message_lines | |
| EXCEPTIONS | ||
| SYSTEM_FAILURE = 1 | ||
| COMMUNICATION_FAILURE = 2 | ||
| . " UJF_API_CREATE_DIRECTORY | ||
ABAP code using 7.40 inline data declarations to call FM UJF_API_CREATE_DIRECTORY
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 APPSET FROM UJF_DOC INTO @DATA(ld_i_appset). | ||||
| "SELECT single DOCNAME FROM UJF_DOC INTO @DATA(ld_i_dirname). | ||||
Search for further information about these or an SAP related objects