2011 Oct 07 10:45 AM
Hi experts,
I have requirement,
I have PDF file, which i have to read into internal table.i there any possibility . can any one help me please <removed by moderator>.
thanks in advance
Edited by: Thomas Zloch on Oct 7, 2011 8:25 PM
Hi experts,
I have requirement,
I have PDF file, which i have to read into internal table.i there any possibility . can any one help me please <removed by moderator>.
thanks in advance
Edited by: Thomas Zloch on Oct 7, 2011 8:25 PM
2011 Oct 07 10:57 AM
Hi,
You can use
DATA : l_pdf TYPE fpcontent,
pdftab TYPE solix_tab.
pdftab = cl_document_bcs=>xstring_to_solix( ip_xstring = l_pdf ).
You will get contents in pdftab.
Let me know if this works...
Regards,
Rahul
2011 Oct 11 6:56 AM
hi Rahul,
But how to get the contents of PDF file into FP content
Regards
siva
2011 Oct 11 7:09 AM
Hi,
If you get the data (xstring) in your context you can extract the data. An example of this can be found in the report FP_PDF_TEST_03.
Check the source of the report and you will see what you need to extract the data from the PDF.
2011 Oct 11 7:15 AM
Hi,
try this
DATA: l_filename TYPE string,
l_rawtab TYPE STANDARD TABLE OF raw255,
l_len TYPE i.
MOVE p_filename TO l_filename.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_len
CHANGING
data_tab = l_rawtab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
IF sy-subrc IS NOT INITIAL.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = l_len
IMPORTING
buffer = p_content
TABLES
binary_tab = l_rawtab
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc IS NOT INITIAL.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
koolspy.
2011 Nov 01 4:25 AM
Hi,
Thanks for the efforts.But still its not okay. i couldnt do it. I heard some thing called ADS is needed for that. Has anybody have idea on that?
Regards
siva
2011 Nov 01 5:02 AM
hi,
ADS is a adobe service configuration . It is used for the adobe interactive and to be configured by the Basis.
regards,
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |