SAP UJF_API_PUT_DOCUMENT_FTP Function Module for File Services - Put Document from FTP
UJF_API_PUT_DOCUMENT_FTP is a standard ujf api put document ftp 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 from FTP 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 ftp FM, simply by entering the name UJF_API_PUT_DOCUMENT_FTP 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_FTP 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_FTP'"File Services - Put Document from FTP.
EXPORTING
I_USER = "BPC User Information
I_APPSET = "AppSet Name
I_DOCNAME = "Document Name
I_FTP_DESTINATION = "FTP Destination(Path/Filename)
* I_FTP_USER = 'anonymous' "FTP User
* I_FTP_PASSWORD = ' ' "FTP Password
I_COMPRESSION = "Compression( Y/N )
* I_SPLICE_ZIP = 'Y' "Splice ZIP Files
IMPORTING
E_MESSAGE_LINES = "Messages
EXCEPTIONS
SYSTEM_FAILURE = 1 COMMUNICATION_FAILURE = 2
IMPORTING Parameters details for UJF_API_PUT_DOCUMENT_FTP
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_FTP_DESTINATION - FTP Destination(Path/Filename)
Data type: STRINGOptional: No
Call by Reference: No ( called with pass by value option)
I_FTP_USER - FTP User
Data type: STRINGDefault: 'anonymous'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FTP_PASSWORD - FTP Password
Data type: STRINGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_COMPRESSION - Compression( Y/N )
Data type: UJF_DOC-COMPRESSIONOptional: 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)
EXPORTING Parameters details for UJF_API_PUT_DOCUMENT_FTP
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: No ( called with pass by value option)
COMMUNICATION_FAILURE - Communication Failure Exception
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for UJF_API_PUT_DOCUMENT_FTP 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_ftp_destination | TYPE STRING, " | |||
| lv_i_ftp_user | TYPE STRING, " 'anonymous' | |||
| lv_i_ftp_password | TYPE STRING, " SPACE | |||
| lv_i_compression | TYPE UJF_DOC-COMPRESSION, " | |||
| lv_i_splice_zip | TYPE UJ_BOOL. " 'Y' |
|   CALL FUNCTION 'UJF_API_PUT_DOCUMENT_FTP' "File Services - Put Document from FTP |
| EXPORTING | ||
| I_USER | = lv_i_user | |
| I_APPSET | = lv_i_appset | |
| I_DOCNAME | = lv_i_docname | |
| I_FTP_DESTINATION | = lv_i_ftp_destination | |
| I_FTP_USER | = lv_i_ftp_user | |
| I_FTP_PASSWORD | = lv_i_ftp_password | |
| I_COMPRESSION | = lv_i_compression | |
| I_SPLICE_ZIP | = lv_i_splice_zip | |
| IMPORTING | ||
| E_MESSAGE_LINES | = lv_e_message_lines | |
| EXCEPTIONS | ||
| SYSTEM_FAILURE = 1 | ||
| COMMUNICATION_FAILURE = 2 | ||
| . " UJF_API_PUT_DOCUMENT_FTP | ||
ABAP code using 7.40 inline data declarations to call FM UJF_API_PUT_DOCUMENT_FTP
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_ftp_user) | = 'anonymous'. | |||
| DATA(ld_i_ftp_password) | = ' '. | |||
| "SELECT single COMPRESSION FROM UJF_DOC INTO @DATA(ld_i_compression). | ||||
| DATA(ld_i_splice_zip) | = 'Y'. | |||
Search for further information about these or an SAP related objects