Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reading a PDF file

Former Member
0 Likes
1,221

Hello,

it's possible to open and extract information from a PDF file with an abap program?

thanks in advance,

Oscar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
972

Hi,

As per my knowledge, you can convert PDF to XML and then read the same into ABAP structure.

Hello,

it's possible to open and extract information from a PDF file with an abap program?

thanks in advance,

Oscar

2 REPLIES 2
Read only

Former Member
0 Likes
973

Hi,

As per my knowledge, you can convert PDF to XML and then read the same into ABAP structure.

Read only

Former Member
0 Likes
972

Hi Oscar,

Check out the below Program.


REPORT ztest_otf_convert .


The link between R/3 and the document content server 
is in TABLE TOA01 

PARAMETERS: obj_key LIKE toa01-object_id.

START-OF-SELECTION.

DATA: i_toa01 LIKE toa01.
data: path type SAEPFAD.

path = '\\someservername\somedirectoryname\somefilename.pdf'

SELECT SINGLE * FROM toa01 INTO i_toa01 WHERE 
ar_object = obj_key.

IF sy-subrc = 0.

CALL FUNCTION 'ARCHIVOBJECT_GET_DT_VIA_TABLE'
EXPORTING
archiv_id = i_toa01-archiv_id
archiv_doc_id = i_toa01-archiv_doc_id
doc_type = i_toa01-reserve
dtpath = path
convert = 'X'
EXCEPTIONS
error_application = 1
OTHERS = 2.


IF sy-subrc 0.


MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF.

ENDIF.

Thanks,

Chidanand