on 2010 Dec 17 1:34 PM
Hi all.
When I try to download a file in UJFS transaction this don't work and displayed a message
"SAP BPC cannot find generated document content in DB table".
The file is in \ROOT\WEBFOLDERS\APSHELL\PLANNING\DATAMANAGER\TRANSFORMATIONFILES\EXAMPLES\IMPORT.XLS
How I can resolve the problem?
Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Everyone,
I am also facing same error ie Cannot find generated document content in DB Table when I am running package to upload master data from flat file. I am automatically uploading master data flat file using following code in backend
TYPES:BEGIN OF ty_data,
text(125),
END OF ty_data.
DATA : hex(1) TYPE x VALUE '0A'. "Tab Space
DATA: target TYPE char255
."VALUE '\ROOT\WEBFOLDERS\SIL\sales_planning_sil_2\DATAMANAGER\DATAFILES\EXAMPLES\ZCUST_LOC.CSV' .
*\ROOT\WEBFOLDERS\SIL\SALES_PLANNING_SIL_2\DATAMANAGER\DATAFILES\gt_saknr.xls
DATA: it_data TYPE STANDARD TABLE OF ty_data,
wa_data TYPE ty_data,
flag(1) .
DATA: p_file TYPE string ," VALUE '/usr/sap/BID/DVEBMGS02/work/ZCUST_LOC.CSV',
text(125) ,
string TYPE string .
CASE sy-slset.
WHEN 'FILE_LOC' OR 'FILE_SG'.
target = '\ROOT\WEBFOLDERS\SIL\SALES_PLANNING_SIL_2\DATAMANAGER\DATAFILES\MASTER DATA\' && p_target.
WHEN 'FILE_SG1' OR 'FILE_SG2' OR 'FILE_SG3' OR 'FILE_SGC' .
target = '\ROOT\WEBFOLDERS\SIL\SALES_PLANNING_SIL\DATAMANAGER\DATAFILES\EXAMPLES\CUSTOMER MASTER DATA\' && p_target.
ENDCASE.
** if p_target = 'ZCUST_SG' OR p_target = 'ZCUST_LOC' .
** target = '\ROOT\WEBFOLDERS\SIL\SALES_PLANNING_SIL_2\DATAMANAGER\DATAFILES\MASTER DATA\' && p_target && '.CSV' .
** ELSE.
** target = '\ROOT\WEBFOLDERS\SIL\SALES_PLANNING_SIL\DATAMANAGER\DATAFILES\EXAMPLES\CUSTOMER MASTER DATA\' && p_target && '.CSV'.
** ENDIF .
p_file = '/usr/sap/BIP/DVEBMGS02/work/' && p_source.
* p_file = target .
*START-OF-SELECTION.
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT .
IF sy-subrc = 0.
DO .
READ DATASET p_file INTO text .
IF sy-subrc = 0.
wa_data-text = text .
APPEND wa_data TO it_data.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET p_file .
DATA: lv_content_string TYPE xstring.
CALL FUNCTION 'SCMS_TEXT_TO_XSTRING'
IMPORTING
buffer = lv_content_string
TABLES
text_tab = it_data.
DATA: p_docnam TYPE ujf_doc-docname.
p_docnam = target.
* TRY.
lo_file_service_mgr->put_document(
EXPORTING i_docname = p_docnam"lv_docname
i_compression = abap_true
i_splice_zip = ' '"lv_splice
i_doc_content = lv_content_string ).
If I am directly uploading flat file through excel then it is working fine.
Kindly help me resolving the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marco,
It sounds like you used the "Download as Data Manager document" option when you should have used the other (normal) download option in the context menu. Does that explain it?
It's difficult to tell which type of file is which, so sometimes you just need to try both and see which one works
Ethan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right, download as data manager document refers to data files used in data manager. For example, say you upload a flat file with transaction data or master data. WHen this is written to the backend, it is written to a generated database table, so you need to use the option download/upload as data manager document in UJFS, for ALL other files, they are stored as blobs in the UJF_DOC table, and you use the normal option for download/uploading documents in UJFS.
Regards,
Rich Heilman
Hi Rich,
Yes, this has caused confusion with pretty much every person I have ever shown UJFS too since you can't tell from within UJFS how a given file was uploaded, though if you know what you are doing you can usually figure it out from the directory Since any given file will only work with one download method it would be nice if UJFS would figure out which is the valid method and use it rather than throwing an error. Something else to add to the development request queue
Ethan
I agree. But just to give a little history.... the UJFS transaction was actually my test program when developing the APIs for the BPC file service, whichi s why both the "Download/Upload" options are exposed in the context menu. This program was a "Z" program and not designed to ship with the product, but it was decided to ship it after I showed it to a couple colleagues. So that is why the options are there, but still it is a good idea to enhance it slightly since it is being used a lot.
Thanks,
Rich Heilman
Hello Rich,
Currently we have the same problem, we have implemented a BADI in SAP BW to upload master data and transactions to UJFS transaction. When we execute the charge packets master and transactional data (/CPMB/IMPORT_MASTER and /CPMB/IMPORT) the following error message:
How can we solve this problem? We must change a parameter in SAP BW?
If we make the load from Excel packages are executed correctly.
Thanks for everything,
Hello Vadim,
this is what makes the program:
*&---------------------------------------------------------------------*
*& AT SELECTION-SCREEN *
*&---------------------------------------------------------------------*
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& START-OF-SELECTION *
*&---------------------------------------------------------------------*
start-of-selection.
l_usuario = p_ftp_u.
l_password = p_ftp_p.
cl_ujf_file_service_mgr=>factory(
EXPORTING is_user = ls_user
i_appset = p_appset
RECEIVING r_manager = lo_file_service_mgr ).
TRY.
* lo_file_service_mgr->put_document_ftp_data_mgr( " Put for DM
lo_file_service_mgr->PUT_DOCUMENT_FTP( " Put for DM
EXPORTING i_docname = p_docnam
i_ftp_destination = p_ftp_d
i_ftp_user = l_usuario
i_ftp_password = l_password ).
* i_append = abap_false ) .
CATCH cx_ujf_file_service_error INTO lo_exception.
ls_message-msgid = lo_exception->if_t100_message~t100key-msgid.
ls_message-msgty = 'E'.
ls_message-msgno = lo_exception->if_t100_message~t100key-msgno.
ls_message-msgv1 = lo_exception->if_t100_message~t100key-attr1.
ls_message-msgv2 = lo_exception->if_t100_message~t100key-attr2.
ls_message-msgv3 = lo_exception->if_t100_message~t100key-attr3.
ls_message-msgv4 = lo_exception->if_t100_message~t100key-attr4.
ls_message-message = lo_exception->get_text( ).
WRITE:/ ls_message-msgid, ls_message-msgno, ls_message-message(40).
ENDTRY.
*&---------------------------------------------------------------------*
*& END-OF-SELECTION *
*&---------------------------------------------------------------------*
end-of-selection.
*&---------------------------------------------------------------------*
*& AT USER-COMMAND *
*&---------------------------------------------------------------------*
at user-command.
Thanks,
User | Count |
---|---|
10 | |
5 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.