Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2800

Re: how to use NEW LINE in a string in smartform ?

$
0
0

Hi,

 

You can try to use do called dynamic text. First, convert your string to so called ITF Text, something like this:

DATA: l_string TYPE string,
      lt_stream_lines TYPESTANDARDTABLEOF string,

      gt_text TYPE tline_t .

CONCATENATE'AAAA'
            cl_abap_char_utilities=>newline
            'BBBB'
            cl_abap_char_utilities=>cr_lf
            'CCCC'
            INTO l_string .
APPEND l_string TO lt_stream_lines .

CALLFUNCTION 'CONVERT_STREAM_TO_ITF_TEXT'
  EXPORTING
    stream_lines = lt_stream_lines
    lf           ='X'
  TABLES
    itf_text     = gt_text.

Then, in the Smartform, set the Text node Type to dynamic text and assign the table with ITF Text:

ssf_dynamic_text.png

You should get something like this:

ssf_dynamic_text1.png

 

This conversion is especially useful when you have to deal with strings longer than 255 characters (maximum variable output length in Smartforms).

 

The contents of the dynamic text will be parsed by Smartform Composer during runtime, so you can even include variables (the ones visible in Smartform context) in the string.

 

cheers

Janis


Viewing all articles
Browse latest Browse all 2800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>