cancel
Showing results for 
Search instead for 
Did you mean: 

how can i pass text which we get from READ_TEXT into scripts

Former Member
0 Kudos
463

hi ,

here i am getting text from read_text function module into the internal table,text carries many lines.

how can i pass those lines of text to my script.

note: here i am maintaining this function module in subroutine.i can pass this text through a variable as changing parameter in script.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi madhav

As you are getting the text in the internal table and now you wnat to pass it to script see this we can do in two ways 1) either you loop around the table and get the text in some variable and write that variable in script 2) Or you can loop around the table call write form and set some element in script where ever you want to print that text and just write the text with internal table field name ( itab-fieldname) in the script , hopefully it might solve your problem

Thanks

Former Member
0 Kudos

Hello,

Once u get the text into internal table,proceed as follows.

For example u get text into g_t_lines internal table.Then u must pass it into varible g_f_var1(500.Here i kept the restrction to 500, u may proceed to ur requirement.

Check the following code.

LOOP AT g_t_lines.

CONCATENATE g_f_var1 g_t_lines1-tdline INTO g_f_var1 SEPARATED BY space.

ENDLOOP.

Try and this way and let me know if u face any problem.

Regards

Former Member
0 Kudos

If you want to format the lines obtained after getting lines from READ_TEXT. Then you can loop through the table in driver program and call function write_text to keep printing lines.

Enjoy SAP

Former Member
0 Kudos

HOW CAN I MAINTAIN WRITE_TEXT FUNCTION MODULE

FOR WRITING IT IN FORM

Former Member
0 Kudos

Hi,

You can use INCLUDE statement in the form to directly get the values from the text object and display in the output...

Check this documentation...

http://help.sap.com/saphelp_46c/helpdata/EN/d1/80321e454211d189710000e8322d00/content.htm

Thanks,

Naren

Former Member
0 Kudos

Hi

You don't need to do that, but you can call the text in the sapscript directly:

/: INCLUDE <TEXT> OBJECT TEXT ID ST LANGUAGE <LANGUAGE>

Max