BPC NW 7.5 - Save file into the server BPC by a ABAP program
I've a problem.
I use process chain EXPORT_TO_BADI and I'd like save data into BPC Server ( UJFS ).
Someone has any idea or simple code to save data?
I try to user some method in class CL_UJF_FILE_SERVICE_MGR especially method PUT_DOCUMENT_DATA_MGR
data : lo_save type ref to CL_UJF_FILE_SERVICE_MGR.
data : im_is_cd TYPE abap_bool.
im_is_cd = abap_true.
DATA: lt_content TYPE ujf_t_recline.
i_doc_name = filename.
EXPORTING i_docname = i_doc_name
i_append = 'X'
i_doc_content = lt_content
i_content_delivery = im_is_cd ).
The fields i_doc_name must be : \ROOT\WEBFOLDER\<appl_set>\<appl>FILE_NAME.TXT ??
There are other way?
Rich Heilman replied
Yes, that is the coding you want to use. But do not set the i_content_delivery paraemter to true. Doing so, will cause a problem. Pass ABAP_FALSE to it.
And yes, I_DOC_NAME requires you to pass the full path and file name just like you have mentioned.
Also, you need to create the instance of the file service manager into the lo_save reference variable. Use the FACTORY method of the CL_UJF_FILE_SERVICE_MGR class for this.
cl_ujf_file_service_mgr=>factory( exporting i_appset = p_appset is_user = ls_user receiving r_manager = lo_save ).
The UJFS transaction(program UJF_FILE_SERVICE_UI ) was orginally created to simply test all file service APIs, so you can look at the code in this program, to see how to call the APIs.