Skip to Content
-3

FM READ_TEXT export Lines to a string variable in smartform

Hello,

Can someone tell me how to pass the LINES table to a variable string but each line of the table to each line of the string variable.

Namely, I am getting from the FM the table LINES which has 3 lines:

1st line: ABC, 2nd line: DEF and 3rd line: HIK and I want the string variable to show:

ABC

DEF

HIK

How can I do this?

Thanks in advance.

Elias

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 24, 2017 at 10:59 AM

    Hi Elias,

    the alternative to the solution proposed by Horst Keller would be using the ABAP Char Utilities:

    CONCATENATE LINES OF itab INTO <YOUR_STRING> SEPARATED BY CL_ABAP_CHAR_UTILITIES=>NEWLINE.

    Those constants represent invisible formatting characters.

    Regards

    Fabian

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 24, 2017 at 09:36 AM
    Add comment
    10|10000 characters needed characters exceeded

    • What doesn't? Where are you typing this? What version of ABAP are you running? Are you aware that new syntax is often being available and sometimes what's posted here won't work on your system if it's older? And that then you need to do a little research to figure out how to retrofit an answer?