SAP UJF_API_PUT_DOCUMENT Function Module for File Services - Put Document
UJF_API_PUT_DOCUMENT is a standard ujf api put document 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 - Put Document 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 put document FM, simply by entering the name UJF_API_PUT_DOCUMENT 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_PUT_DOCUMENT 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_PUT_DOCUMENT'"File Services - Put Document.
EXPORTING
I_USER = "BPC User Information
I_APPSET = "AppSet Name
I_DOCNAME = "Document Name
I_COMPRESSION = "Compression( Y/N )
* I_SPLICE_ZIP = 'Y' "Splice ZIP Files
I_DOC_CONTENT = "Document Content
IMPORTING
E_MESSAGE_LINES = "Messages
EXCEPTIONS
SYSTEM_FAILURE = 1 COMMUNICATION_FAILURE = 2
IMPORTING Parameters details for UJF_API_PUT_DOCUMENT
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_DOCNAME - Document Name
Data type: UJF_DOC-DOCNAMEOptional: No
Call by Reference: No ( called with pass by value option)
I_COMPRESSION - Compression( Y/N )
Data type: UJ_BOOLOptional: No
Call by Reference: No ( called with pass by value option)
I_SPLICE_ZIP - Splice ZIP Files
Data type: UJ_BOOLDefault: 'Y'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DOC_CONTENT - Document Content
Data type: UJF_DOC-DOC_CONTENTOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for UJF_API_PUT_DOCUMENT
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_PUT_DOCUMENT 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_docname | TYPE UJF_DOC-DOCNAME, " | |||
| lv_i_compression | TYPE UJ_BOOL, " | |||
| lv_i_splice_zip | TYPE UJ_BOOL, " 'Y' | |||
| lv_i_doc_content | TYPE UJF_DOC-DOC_CONTENT. " |
|   CALL FUNCTION 'UJF_API_PUT_DOCUMENT' "File Services - Put Document |
| EXPORTING | ||
| I_USER | = lv_i_user | |
| I_APPSET | = lv_i_appset | |
| I_DOCNAME | = lv_i_docname | |
| I_COMPRESSION | = lv_i_compression | |
| I_SPLICE_ZIP | = lv_i_splice_zip | |
| I_DOC_CONTENT | = lv_i_doc_content | |
| IMPORTING | ||
| E_MESSAGE_LINES | = lv_e_message_lines | |
| EXCEPTIONS | ||
| SYSTEM_FAILURE = 1 | ||
| COMMUNICATION_FAILURE = 2 | ||
| . " UJF_API_PUT_DOCUMENT | ||
ABAP code using 7.40 inline data declarations to call FM UJF_API_PUT_DOCUMENT
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_docname). | ||||
| DATA(ld_i_splice_zip) | = 'Y'. | |||
| "SELECT single DOC_CONTENT FROM UJF_DOC INTO @DATA(ld_i_doc_content). | ||||
Search for further information about these or an SAP related objects