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

newline character in string

Former Member
0 Likes
939

Hi,

I want to display information to user using message type 'I'.

The information to be displayed consists of two lines , lets say string1 on first line & string2 on second line. How do i concatenate both these strings into one string with a newline character in between so that whenever this message is displayed it is displayed as

string1

string2

and NOT as string1 string2.

Pls guide me.

Bye

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
760

Hi,

You can use function module /RWD/POPUP_TO_DISPLAY_TEXTLIST to display messages of multiple lines or you can generate your own popup screen.

Example Code:


DATA: ttab TYPE TABLE OF tline WITH HEADER LINE.

ttab-tdline = 'line 1'.
APPEND ttab.

ttab-tdline = 'line 2'.
APPEND ttab.

CALL FUNCTION '/RWD/POPUP_TO_DISPLAY_TEXTLIST'
  EXPORTING
    titel            = 'Title'
  TABLES
    text_table       = ttab.

Regards,

Ali

Hi,

I want to display information to user using message type 'I'.

The information to be displayed consists of two lines , lets say string1 on first line & string2 on second line. How do i concatenate both these strings into one string with a newline character in between so that whenever this message is displayed it is displayed as

string1

string2

and NOT as string1 string2.

Pls guide me.

Bye

3 REPLIES 3
Read only

Former Member
0 Likes
761

Hi,

You can use function module /RWD/POPUP_TO_DISPLAY_TEXTLIST to display messages of multiple lines or you can generate your own popup screen.

Example Code:


DATA: ttab TYPE TABLE OF tline WITH HEADER LINE.

ttab-tdline = 'line 1'.
APPEND ttab.

ttab-tdline = 'line 2'.
APPEND ttab.

CALL FUNCTION '/RWD/POPUP_TO_DISPLAY_TEXTLIST'
  EXPORTING
    titel            = 'Title'
  TABLES
    text_table       = ttab.

Regards,

Ali

Read only

0 Likes
760

Thanks Ali for your response.

I want to display the multiline text in function 'POPUP_TO_CONFIRM' . I need to pass the string to 'text_question' variable. For this reason i want to have multiline text in one string variable.

Any idea how to do it .

Read only

0 Likes
760

You can use fm POPUP_TO_CONFIRM_STEP like this:


        CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
          EXPORTING
            defaultoption = 'Y'
            textline1     = 'msg line 1'
            textline2     = 'msg line 2'
            titel         = 'Warning'
          IMPORTING
            answer        = cevap.

Regards,

Ail