cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying current date

Former Member
0 Kudos

Hi,

Iam new to webdynpro.Iam displaying a success message in a message area by using message manager.I need to display the current date at the end of the message.

Please anybody suggest me the way.

Thanks,

Kumar.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Get the date (system variable sy-datum ) format it (you can use the command write to it) and then concatenate to your message.

Command write:


DATA: date_short TYPE c LENGTH 8, 
      date_long  TYPE c LENGTH 10, 
      date_mask  TYPE c LENGTH 8. 

WRITE sy-datum TO: date_short, 
                   date_long, 
                   date_mask DD/MM/YY.

Regards,

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Thanks to all.Its working fine. But i need to display the message in bold letters.suggest me the process.

Thanks,

Kumar.

Former Member
0 Kudos

Hi,

Use the method REPORT_ERROR_MESSAGE from the same class.

Before Displaying the text, use TRANSLATE TEXT TO UPPER CASE Statement.

Shruthi R

Edited by: Shruthi R on May 20, 2008 1:00 PM

Former Member
0 Kudos

Hi,

you can use the following code :

In your messase in the message class use the & symbol at the end of the messae.

In webdynpro code pass the date in msgv1 attribute as shown below.

data: l_current_controller type ref to if_wd_controller,

l_message_manager type ref to if_wd_message_manager.

l_current_controller ?= wd_this->wd_get_api( ).

l_message_manager = l_current_controller->get_message_manager( ).

l_message_manager->report_t100_message(

exporting

msgid = return-msgid

msgno = return-msgno

msgty = return-msgty

msgv1 = sy-datum

).

Regards,

Shruthi R

Former Member
0 Kudos

Hi Sathish,

Check this below code for success message.

DATA : MSG(100).

MSG = 'THE CURRENT DATE IS : '.

CONCATENATE  msg sy-datum into MSG.

* get message manager
data: l_current_controller type ref to if_wd_controller,
      l_message_manager    type ref to if_wd_message_manager.

l_current_controller ?= wd_This->Wd_Get_Api( ).

CALL METHOD l_current_controller->GET_MESSAGE_MANAGER
  RECEIVING
    MESSAGE_MANAGER = l_message_manager
    .

* report message
CALL METHOD l_message_manager->REPORT_SUCCESS
  EXPORTING
    MESSAGE_TEXT             = msg.

Thanks.