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

# problem in open dataset

Former Member
0 Likes
787

Hi Friends,

by using CONVERT_OTFSPOOLJOB_2_PDF we can obtain IT_PDF internal table.with IT_PDF , we can download system usinsg WS_DOWNLOAD correctly.

But to send Application server, # is coming at the end

-


open dataset filename binary mode.

loop at it_pdf .

concatenate it_pdf-tdline it_pdf-format into text.

transfer text to filename.

endloop.

when we download this PDF file from application server , it is giving file error.

please suggest me.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
739

Hi,

Why are you using

concatenate....

open dataset filename binary mode.
loop at it_pdf .
<b>*concatenate it_pdf-tdline it_pdf-format into text.
transfer it_pdf to file.</b>
endloop.

7 REPLIES 7
Read only

Former Member
0 Likes
739

What is the error?

Rob

Read only

Former Member
0 Likes
739

That # is a new_line character.

Before you download it to appl server, you can replace it.

loop at it_pdf.

replace all occurances of CL_ABAP_CHAR_UTILITIES=>NEWLINE with '' in it_pdf-tdline.

concatenate it_pdf-tdline it_pdf-format into text.

transfer text to filename.

endloop.

Regards,

ravi

Read only

Former Member
0 Likes
739

open dataset filename <b>for output in</b> binary mode.

loop at it_pdf .

concatenate it_pdf-tdline it_pdf-format into text.

transfer text to filename.

endloop.

are you disturbing the IT_PDF any where after your FM

<b>CONVERT_OTFSPOOLJOB_2_PDF</b> call,

please tell us what error you got.

Regards

vijay

Read only

Former Member
0 Likes
740

Hi,

Why are you using

concatenate....

open dataset filename binary mode.
loop at it_pdf .
<b>*concatenate it_pdf-tdline it_pdf-format into text.
transfer it_pdf to file.</b>
endloop.

Read only

0 Likes
739

vijay,

Thanks alot. Your idea is working fine.

if you donot mind please give your mail id

to

abapbalaji@yahoo.com

Thanks alot.

Balaji.

Read only

0 Likes
739

Hi,

my mail id is...

vijay_bits2000@yahoo.com

Regards

vijay

Read only

0 Likes
739

Hi,

if your Problem is solved please close the thread ,and try to reward for helpful answers.

Regards

vijay