cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic message in webdynpro ABAP?

Former Member
0 Kudos

Hi,

I m working on booking tickets application. If i select few seats and click on submit button,

it show display a succuss message along with the selected seat numbers.

So how to get the seat numbers with using report_succuss method.

Kindly help me regarding this.

Best regards,

Narasimha

Accepted Solutions (0)

Answers (3)

Answers (3)

amy_king
Active Contributor
0 Kudos

Hi Narasimha,

In addition to method report_success, IF_WD_MESSAGE_MANAGER also has methods that allow you to specify a T100 message (messages created using transaction SE91):

  • report_t100_message
  • report_attribute_t100_message
  • report_element_t100_message

Another option then is you could create a T100 message and pass the seat numbers as a message parameter, for example:

DATA ls_t100_msg TYPE symsg.


ls_t100_msg-msgid  = message_class.
ls_t100_msg-msgno = message_number.

ls_t100_msg-msgty  = message_type.
ls_t100_msg-msgv1 = number_of_seats.


message_manager->report_attribute_t100_message(
       msg                   = ls_t100_msg
       element             = lo_element
       attribute_name = 'ATTRIBUTE'
).


Cheers,
Amy

Former Member
0 Kudos

Hi,

Simplest way of displaying the message in the required format is to do concatenation.

Get the selected seat numbes into a varibale. Concatenate the variables with the string variable along with the message you want. Then pass the string variable to the method report_success.

Sample code:

data : lv_message type string value 'You have selected'.

Concatenate lv_message lv_seatno into lv_message seperated by space.

call method lo_message_manger->report_sucess( message = lv_message ).

Best Regards,

Arun Krishnamoorthy

former_member184578
Active Contributor
0 Kudos

Hi,

Report_success method will display the text passing as message. You have to concatenate the seat numbers to the text and pass it to report_success message.

get the selected seats using get_attributes method then concatenate the seat numbers to the message text ( say lv_text ).

now pass the lv_text to the report success message .

Hope this helps u.,

Regards,

Kiran