cancel
Showing results for 
Search instead for 
Did you mean: 

Error in UJFS

Former Member
0 Kudos
314

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

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member211812
Participant
0 Kudos

Hi Experts

I am also facing the same issue, When i validate the file it is throwing an error "Cannot find the

generated document  content in the DB Table"

0 Kudos

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.

esjewett
Active Contributor
0 Kudos

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

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

esjewett
Active Contributor
0 Kudos

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

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

Former Member
0 Kudos

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,

former_member186338
Active Contributor
0 Kudos

Sorry, but what badi are you talking about??

Vadim

Former Member
0 Kudos

Hi Vadim,

It is a class: CL_UJF_FILE_SERVICE_MGR

Thanks,

former_member186338
Active Contributor
0 Kudos

What do you mean by: "It is a class: CL_UJF_FILE_SERVICE_MGR"???

Former Member
0 Kudos

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,

former_member186338
Active Contributor
0 Kudos

Hi Emilio,

I recommend you to start a new discussion and clearly explain everything:

What do you want to achieve in general?

What is the chain used?

What is the badi type?

How it's launched?

Etc...

Vadim