on 02-23-2015 11:45 AM
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'.
Could you please add a screen shot or details what issue you are having exactly when doing it from Portal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Phani,
Whenever the document is generated Iam storing the document no.n date,etec...in some customizing table and all other static text I stored in so10 as standard text like below.
*****************************************************************************************************
<html> | |
<body> | |
<font face="Times New Roman" font size="3"> | |
<br><br> | |
<p><CENTER><p style="text-align:justify"> | |
      | |
<u>D.O.LETTER NO. &CURRENT& /DCM III/2013 ,Dated: &SYDATUM& | |
</u></P></CENTER> | |
Dear | |
<p> | |
    | |
Sub:- Market Borrowings − consent under Article 293(3) of the | |
Constitution of India<br>   | |
              | |
   for availing loans during financial year &YEAR& − Reg. | |
<br><br>          | |
Ref: From Ministry of Finance, Department of Expenditure, | |
<br>                  | |
Plan Finance − I, New Delhi &LETTERNO& | |
<BR> <CENTER>****</CENTER></p> |
************************************************************************************************************
I stored this Document details along with standard text in DMS server(Note:for better alginment purpose for paragraphs I used HTML tags).Now whenever the user wanted to see the document I need to provide download option to user.To Download the document i created one webdynpro application,In this wd appl.i coded the below
**************************************************************************************************
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'.
*********************************************************************************
This aplication is working fine in ECC but when we execute this application from portal The downloaded document is showing HTML tags which I used for alignments.Have a look on below.
<html> | |
<body> | |
<font face="Times New Roman" font size="3"> | |
<br><br> | |
<p><CENTER><p style="text-align:justify"> | |
      | |
<u>D.O.LETTER NO. &CURRENT& /DCM III/2013 ,Dated: &SYDATUM& | |
</u></P></CENTER> | |
Dear | |
<p> | |
    | |
Sub:- Market Borrowings − consent under Article 293(3) of the | |
Constitution of India<br>&nb |
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.