cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding OTF Data

Former Member
0 Kudos

Hi All,

I need to know is it possible to get OTF data by calling FM CLOSE_FORM as well create a spool in SP01 for related script.

Regards

Dhiraj Shetty

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

" 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.

If you look at the answer, then you will get the answer, first it will create the OTF data, then it will create the SPOOL

Regards

Sudheer

Former Member
0 Kudos

hi,

Jst tell me are you using CLOSE _FORM without getting OTFdata.

and after running tht the above FM your Callling 'CONVERT_OTF_MEMORY'

But as far as i know in the data passed in Result parameter of CLOSE_FORM we have to check GETOTFDATA field as 'X' then only its possible to get OTFDATA but when i use tht i am not able to create print Spool for the corresponding script

so thats why i thought is there any field where i can check 'X' and get teh spool to print as well .

Regards

Dhiraj Shetty

Former Member
0 Kudos

Hi Sudheer,

Your solutions is notanswering my query.

I need to know in CLOSE_FORM is there any thing to get the SPOOL with OTF DATA

Former Member
0 Kudos

Hi,

Manual conversion to OTF format

If there are more than 10 pages,

Tick the spool request

then 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 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

Sudheer