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

Converting internal table data into PDF fomrat

Former Member
0 Likes
2,533

I folks,

I need to send the internal table data to different vendors thorugh email as PDF attachment.

I have done some thing like this before, by using the spool number. But in the present requirement i cannot use spool number as the report is executed in the foreground. I am trying the following procedure for that.

1. For Converting ITAB data into OTF, using the FM 'PRINT_TEXT'

2. For converting the OTF data into PDF using the FM 'CONVERT_OTF_2_PDF'

But while using the Function modude 'PRINT_TEXT', for the import parameter 'LINES', i have given the itab i declared for output. But it going to short dump showing the message as 'ITAB is correct type, but its length is incorrect'. What is mistake i have done there. Is there any method to accomplish my requirement. How can i convert internal table data into PDF format, without any spool number..Could any body please suggest me...

Thanks in advance,

Shyam.

I folks,

I need to send the internal table data to different vendors thorugh email as PDF attachment.

I have done some thing like this before, by using the spool number. But in the present requirement i cannot use spool number as the report is executed in the foreground. I am trying the following procedure for that.

1. For Converting ITAB data into OTF, using the FM 'PRINT_TEXT'

2. For converting the OTF data into PDF using the FM 'CONVERT_OTF_2_PDF'

But while using the Function modude 'PRINT_TEXT', for the import parameter 'LINES', i have given the itab i declared for output. But it going to short dump showing the message as 'ITAB is correct type, but its length is incorrect'. What is mistake i have done there. Is there any method to accomplish my requirement. How can i convert internal table data into PDF format, without any spool number..Could any body please suggest me...

Thanks in advance,

Shyam.

5 REPLIES 5
Read only

Former Member
0 Likes
1,083

hi shyam

please refer to this thread

hope this helps

regards

Aakash Banga

Read only

Former Member
0 Likes
1,083

Hi,

Please have a look @ below thread.

Thanks

Nitesh

Read only

Former Member
0 Likes
1,083

Hi,

Thanks for your effort. But i have already seen those threads.But i am stuck at the point i mentioned.

while using the Function modude 'PRINT_TEXT', for the import parameter 'LINES', i have given the itab i declared for output. But it going to short dump showing the message as 'ITAB is correct type, but its length is incorrect'. Any idea on this?

Thanks,

Shyam.

Read only

0 Likes
1,083

Hi ,

In the Fm print_text the parameter LINES is in the tables option...

Anywayz have you declared that internal table which your passing to the LINES parameter as that of TLINE structure?

Ex: itab type standard table of tline.

Regards,

Rohan.

Edited by: Rohan on Dec 3, 2008 10:53 AM

Read only

Former Member
0 Likes
1,083

Hi I am also facing the same problem.

can you please send the code how you did it.