Skip to Content

How to display a variable in the message

Hi all,

I am developing an application where I am parking a document, can anyone please tell me how can I display the document number on the web dynpro screen with the message once the document has been parked. So far I have written the following code but this is just for displaying a message only and not the number:

DATA lo_api_controller     TYPE REF TO if_wd_controller.
    DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).

    CALL METHOD lo_api_controller->get_message_manager
      RECEIVING
        message_manager = lo_message_manager.
    CALL METHOD lo_message_manager->report_success
      EXPORTING
        message_text = 'Document has been parked.'

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 30, 2010 at 08:05 PM
    DATA lo_api_controller     TYPE REF TO if_wd_controller.
    DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
    data lv_document_number    type        string.
    data lv_message_string	   type        string.
    
    lo_api_controller ?= wd_this->wd_get_api( ).
     
        CALL METHOD lo_api_controller->get_message_manager
          RECEIVING
            message_manager = lo_message_manager.
    
    *** get document number in lv_document_number
    lv_document_number = .....
    
    *** form message string
    concatenate 'Document has been parked : Document No :' lv_document_number into lv_message_string.
    
        CALL METHOD lo_message_manager->report_success
          EXPORTING
            message_text = lv_message_string.
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 02, 2010 at 12:53 PM

    Hello Rajat,

    I would not suggest you to concatenate your message with the document number.that would be an expliciy way of doing things. I am not sure how you would manage the text if application is opened in different languages.

    I would rather suggest you to use t100 messages with placeholder and document number can be exported to message manager.

    I believe, its an information message. you could also export the type of message as "information".

    Regards

    Anurag Chopra

    Add comment
    10|10000 characters needed characters exceeded