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

Sap Script To OTF

Former Member
0 Likes
1,699

Hi Experts,

I am trying to convert a script to pdf data.

In the open_form I set getotf = 'X' and in the close form , i get the OTf data.

I convert this otf to pdf data.

In the pdf output, I only have the static fields and no data.Though the number of pages generated are same in the PDF output and the script.

Please help me to figure it out

Hi Experts,

I am trying to convert a script to pdf data.

In the open_form I set getotf = 'X' and in the close form , i get the OTf data.

I convert this otf to pdf data.

In the pdf output, I only have the static fields and no data.Though the number of pages generated are same in the PDF output and the script.

Please help me to figure it out

3 REPLIES 3
Read only

kostas_tsioubris
Contributor
0 Likes
1,069

Hi,

maybe it has to do with the type of font you are using in your sapscript. Try to change the fonts in no static texts and see what happens. You are sure that if you print the form will have data. You can test this by using FM 'DISPLAY_OTF'.

Kostas

Read only

0 Likes
1,069

Hi,

Ya...When the form is printed we have the data. But when we convert it into OTF the data part is missing. I checked the fonts also....they are the same.

Krishna

Read only

Former Member
0 Likes
1,069

try this

Here is some sample code for achieving manual conversion to the OTF format.

  • In case of more than 10 pages:

- Check the spool request

- Click Edit -> OTF display -> No. of OTF pages

  • Convert SAP Script to text:

- Display the spool request

- Then click Goto -> List display

Automatic conversion to the OTF format:

tables: tline.

data: begin of int_tline1 occurs 100.

include structure tline.

data: end of int_tline1.

call function 'OPEN_FORM'

device = 'OTF_MEM'

.........................................

  • after CLOSE_FORM

call function 'CONVERT_OTF_MEMORY'

exporting

format = 'ASCII'

max_linewidth = 132

tables

lines = int_tline1

exceptions

err_max_linewidth = 1

err_format = 2

err_conv_not_possible = 3

others = 4.

  • write the text file to spool

loop at int_tline1.

if int_tline1-tdline = space.

skip.

else.

write:/ int_tline1-tdline.

endif.

endloop.

regards,

srinivas

<b>*reward for useful answers*</b>