2006 Oct 23 2:23 PM
Hi all!
I have some existing code that converts an ABAP itab into an XML string as follows:
CALL TRANSFORMATION ('ID')
SOURCE tab = int_data[]
RESULT XML xml_out.
What I need is to add the CDATA tag to a specific few fields in that XML file...
Any ideas on how I do this?
Thanks for any help!
N
Hi all!
I have some existing code that converts an ABAP itab into an XML string as follows:
CALL TRANSFORMATION ('ID')
SOURCE tab = int_data[]
RESULT XML xml_out.
What I need is to add the CDATA tag to a specific few fields in that XML file...
Any ideas on how I do this?
Thanks for any help!
N
2006 Oct 23 3:36 PM
You can use the IXML interfaces in order to parse and render your XML string. See
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/de/86/8280cc12d511d5991b00508b6b8b11/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/de/86/8280cc12d511d5991b00508b6b8b11/frameset.htm</a>
Regards,
Thomas
2006 Oct 23 3:39 PM
hi,
i have tried in PDF file. the code is
&----
*& Form DOWNLOAD
&----
FORM DOWNLOAD .
DATA: lk_params TYPE pri_params,
lv_valid.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
immediately = ' '
layout = c_layout "'X_65_132'
no_dialog = c_x
IMPORTING
out_parameters = lk_params
valid = lv_valid.
IF lv_valid <> space .
NEW-PAGE PRINT ON PARAMETERS lk_params NO DIALOG.
*--To display the final report
perform print_report.
PERFORM DISPLAY.
NEW-PAGE PRINT OFF.
*---To convert the download to PDF
PERFORM conv_to_pdf_download.
perform download1.
ENDIF.
endif.
**--To display the final report
PERFORM DISPLAY.
perform print_report.
ENDFORM. " DOWNLOAD
&----
*& Form conv_to_pdf_download
&----
FORM conv_to_pdf_download .
clear it_final.
wait up to 2 seconds.
lv_spoolno = sy-spono.
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = lv_spoolno
NO_DIALOG = ''
DST_DEVICE =
PDF_DESTINATION =
IMPORTING
PDF_BYTECOUNT = lv_numbytes
PDF_SPOOLID =
LIST_PAGECOUNT =
BTC_JOBNAME =
BTC_JOBCOUNT =
TABLES
PDF = it_pdf.
endform. "conv_to_pdf_download
&----
*& Form download1
&----
form download1 .
CHECK DOWNLOAD = 'X'.
call function 'DOWNLOAD'
EXPORTING
BIN_FILESIZE = LV_NUMBYTES
CODEPAGE = ' '
FILENAME = P_FILE
FILETYPE = 'BIN'
IMPORTING
ACT_FILENAME = P_FILE
FILESIZE = LV_NUMBYTES
CANCEL = CANCEL
tables
data_tab = IT_PDF.
endform. " download1
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |