Skip to Content
author's profile photo Former Member
Former Member

How to write an E message in 3 lines

Hi,

I want to write a message with long text and spit them into 3 lines, Is there a good method?

Thanks a lot.

Sincerely,

Julie

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Aug 27, 2009 at 11:23 AM

    Hi,

    Try something like this,

    DATA: NEWLINE(4) TYPE X VALUE '0D0A'.
    CONCATENATE l_text+0(100) l_text+101(100) l_text+201(100)  into l_text seperated by NEWLINE.
    

    You can change the offset length as per your requirement

    Regards,

    Vikranth

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Julie,

      it depends on where the messages go to.

      Usually a message is displayed in the status line at the bottom of the screen. You can not extend this line.

      What we do here is to create an application log, add the messages to the application log and finally display the application log in a popup or screen container. Here you can display as many messages (i.e. message lines) as you like.

      Just do a

      MESSAGE ID <id> TYPE <type> NUMBER <number> WITH <msgv1> <msgv2> <msgv3> <msgv4> INTO LV_DUMMY.
      * transfer SY-MSGID SY-MSGTY SY-MSGNO SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 to BAL_S_MSG structure
      CALL FUNCTION 'BAL_LOG_MSG_ADD'
        EXPORTING
      *   I_LOG_HANDLE              = I_LOG_HANDLE
          i_s_msg                   = i_s_msg
      * IMPORTING
      *   E_S_MSG_HANDLE            = E_S_MSG_HANDLE
      *   E_MSG_WAS_LOGGED          = E_MSG_WAS_LOGGED
      *   E_MSG_WAS_DISPLAYED       = E_MSG_WAS_DISPLAYED
      * EXCEPTIONS
      *   LOG_NOT_FOUND             = 1
      *   MSG_INCONSISTENT          = 2
      *   LOG_IS_FULL               = 3
      *   OTHERS                    = 4
                .
      IF sy-subrc <> 0.
      * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
      *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      
      

      You can display and/or save your application log. This is extremely useful in terms of quality assurance and documentation. See transacions SLG1 and SLG0 as function group SBAL for protocol handling.

      We built a CLASS round the SBAL functions. In the transaction, we execute a couple of checks at certain steps, put all messages to the application log and then display the log.

      Regards,

      Clemens

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2009 at 11:17 AM

    Hi,

    Is it fine if you can write it as ..

    message E000 with "Resulted".

    message E000 with "with".

    message E000 with "error".

    it will display it as....

    Error :Resulted

    Error :with

    Error :error

    Add a comment
    10|10000 characters needed characters exceeded

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.