Skip to Content

new-line code in mapping table

Hi,

we have a mapping table that stores the footers of all our companies.

These have text like " <b.>Company Name...</>.....".

(Note: ignore the '.' after the '<b' in the previous - I needed it here so I could display the command in SDN- it is not in the text on our system). This works fine and the appropriate section is in bold.

The question I have is that one of our companies needs the footer to have a second line so I need some sort of '<>' command to force a new line.

I have tried <cr>, <br>, \n and
n.

Does anyone know how to do this?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 30, 2008 at 09:18 AM

    Hi,

    Not sure if I understood your problem, try using

    <BR></BR>

    to goto new line.

    Regards,

    Sesh

    Add a comment
    10|10000 characters needed characters exceeded

    • Sesh,

      thanks for your help. I managed to get it working. Not the most elegant bit of code but it works:

      ...
          FIELD-SYMBOLS <fs> TYPE ANY.
          ASSIGN '0' TO <fs>.
          SEARCH l_text FOR '\NL'. "I decided to call it '\NL'
          IF sy-subrc = 0.
            SPLIT l_text AT '\NL' INTO l_text2 l_text3.
            ASSIGN l_index TO <fs>.
            IF NOT l_text2 IS INITIAL.
              WHILE NOT l_text2+l_n(80) IS INITIAL.
                l_index = l_index + 1.
                CONCATENATE 'DESC' <fs> INTO l_desc.
                READ TABLE outtab WITH KEY = l_desc.
                outtab-value = l_text2+l_n(80).
                MODIFY outtab INDEX sy-tabix.
                CLEAR outtab.
                l_n = l_n + 80.
                l_wa_o_text-tdformat = '*'.
                CONCATENATE l_wa_o_text-tdline '&' l_desc '&' INTO l_wa_o_text-tdline.
              ENDWHILE.
              APPEND l_wa_o_text TO l_o_text.
            ENDIF.
      ...
            APPEND l_wa_o_text TO l_o_text.
      ....
            CALL FUNCTION 'CREATE_TEXT'
              EXPORTING
                fid         = 'ST'
                flanguage   = sy-langu
                fname       = 'ZDYNAMIC_TEST'
                fobject     = 'TEXT'
                save_direct = 'X'
              TABLES
                flines      = l_o_text
              EXCEPTIONS
                no_init     = 1
                no_save     = 2
                OTHERS      = 3.
      

      outtab passed back to SAPScript....

      SAPScript Code:

      INCLUDE 'ZDYNAMIC_TEST' OBJECT TEXT ID 'ST' PARAGRAPH 'Z2'.
      

      Thanks.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.