Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP_POST_FILES on UNIX server cannot read file

Former Member
0 Kudos

Hi,

We are currently facing an issue where we are trying to upload a file to the Content Server using the FM HTTP_POST_FILES. The file we are trying to upload resides on the SAP server itself under the folder /usr/sap/DHC/SYS/global/temporary_folder/

When using transaction OAAD, a file can be manually stored and assigned. Internally, the same function module is used, but in that case, the file is read from the user's PC.

In our scenario, the file can be found using OPEN DATASET and RZL_READ_DIR_LOCAL. However, when using the HTTP_POST_FILES FM where the absolute path and filename are passed on, the FM goes into error with the following error :

Error when uploading file: /usr/sap/DHC/SYS/global/temporary_folder/00006112.jpg (file_open_error)

Does anyone have an idea what might be the issue ? Could it be that HTTP_POST_FILES is incompatible with a UNIX path ?

1 REPLY 1

JP_Barcenas
Participant
0 Kudos

Hi Frederic,

HTTP_POST_FILES is a low level function module. Try going up in the application layer. For example, try using the functions that belong to the SCMS_AO_API function group (e.g. SCMS_AO_FILE_CREATE). Or, if you are planning to use the uploaded document with archivelink, then go further up to ARCHIVOBJECT* function modules (e.g. ARCHIVOBJECT_CREATE_FILE).

good luck!

juan