Quantcast
Channel: SCN : All Content - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 3667

Displaying DMS document in .DOC using abap webdynpro

$
0
0

Dear Experts,

 

        TO dispay the DMS stored document Iam using below code,It is successfully displaying the stored Document

in .doc but here the problem is the same code is not working in when we execute the application EP(portal).

 

     Anyone could you please give the suitable solution for this is grately appreciated..thanx in advance     

 

                      ls_input-DOKAR = 'TST'.

                       ls_input-dokvr = '00'.

                       ls_input-doktl = '000'.

                       ls_input-doknr =  LS_docnum .

*

             CALL FUNCTION 'CVAPI_DOC_CHECKOUTVIEW_DIALOG'

               EXPORTING

                 PF_DOKAR                 = ls_input-dokar

                 PF_DOKNR                 = ls_input-doknr

                 PF_DOKVR                 = ls_input-dokvr

                 PF_DOKTL                  = ls_input-doktl

                PF_FTP_DEST             =  'SAPFTPA'

                PF_HOSTNAME              = 'DEFAULT '

                PF_CONTENT_PROVIDE       = 'TBL'

              IMPORTING

                PSX_MESSAGE              =  ls_message

              TABLES

                PTX_CONTENT              =  LT_DRAO .

 

 

             LOOP AT lt_drao INTO wa_drao.

               wa_bin = wa_drao-orblk.

               APPEND wa_bin TO lt_bin.

             ENDLOOP.

 

 

            DESCRIBE TABLE lt_drao LINES v_line.

            size = 2550 * v_line.

 

 

            CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'

            EXPORTING

               input_length       = size

            IMPORTING

               buffer             = file_data

            TABLES

               binary_tab         = lt_bin .

 

 

           CONCATENATE lv_lettername '.DOC' INTO LV_FILENAME .

           CALL METHOD cl_wd_runtime_services=>attach_file_to_response

           EXPORTING

               i_filename      = LV_FILENAME

               i_content       = file_data

               i_mime_type     = 'application/doc'.


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>