Application Development 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: 

smartform long text

Former Member
0 Kudos

Hi everybody

I am facing a small problem in displaying the long text in smartform.

I used the following code

loop at g_line.

concatenate str g_line-tdline into str separated by CL_ABAP_CHAR_UTILITIES=>NEWLINE.

  • shift str left deleting leading '#'.

endloop.

the output i am getting is like this

#this is material long text

1#this is more info on line

2#and more details here.

But the way output should look as

this is material long text1

this is more info on line2

and more details here.

can any suggest

regards

venkat

4 REPLIES 4

Former Member
0 Kudos

Hi venkat,

I dont think that you can display the NEWLINE character in the smartform.

Since you have the data in the internal table, its better to create a TEMPLATE or TABLE node in the smartform.

Regards,

Wenceslaus.

0 Kudos

For every long text, it shoulb have the OBJECT, NAME, Standard ID, Language.. using thes you can call the Longtext

Example: INCLUDE &Tablename-Longtext field naem& OBJECT TEXT ID ADRS LANGUAGE &EKKO-SPRAS&,

so this will pick the data from the Longtext.

There is another way also to fetch the Long text :

call the Function module READ_TEXT, pass the varaibles,here also you need to pass ID,LANGUAGE and OBJECT then this function module will read the long text

0 Kudos

Hi Kishan

Thank u

I had used this READ_text FM and passed the parameters but in the print i am getting '#' which is not there in actuall long text.Thats my main problem, so could u suggest.

regards

venkat

0 Kudos

If you're working on rel 4.7, you can try to use cl_abap_char_utilities=>newline, the value of this attribute is #.

replace all occurences of CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB in hash with ','.