cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding msgs?

Former Member
0 Kudos

Hi all,

How can i use the method REPORT_ATTRIBUTE_T100_MESSAGE.and how many msgs can we show at a time?

Regards,

Ravi

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member515618
Active Participant
0 Kudos

Hi Ravi,

This method is used to raise error message and also highlight the field to which the attribute is bound.

Create a component controller method say REPORT_ATTR_MESSAGE the following are the interface parameters.

ATTRIBUTE Importing STRING

ELEMENT Importing IF_WD_CONTEXT_ELEMENT

L_MSG Importing SYSMSG

Place the following code in the method.


* get message manager
DATA: l_current_controller TYPE REF TO if_wd_controller,
      l_message_manager    TYPE REF TO if_wd_message_manager.
DATA: l_msg TYPE symsg.

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_ATTRIBUTE_T100_MESSAGE
    EXPORTING
      MSG            = l_msg
      ELEMENT        = element
      ATTRIBUTE_NAME = attribute.

When you want to raise message do the following.

ls_msg-msgid = 'msgid'

ls_msg-msgno = 'msgno'

ls_msg-msgty = 'E'

ls_msg-msgv1 = message_v1

ls_msg-msgv2 = message_v2

ls_msg-msgv3 = message_v3

ls_msg-msgv4 = message_v4

wd_comp_controller->report_attr_message(

attribute = '<Attribute_name>'

element = elem_<node_name>

l_msg = ls_msg.

And at time we can only raise 1 error message using this method. It can be called multiple times to display more than 1 messages though.

Hope this helps

Regards,

Sravan Varagani

Former Member
0 Kudos

Hi Sravan,

in my scenario i want to update PAY flag ,for those who pay the min bill.if patient isn't paying the min bil i want show a msg that you have to pay a balance of 2000.if there are any no of patients who are not paying the minimun bill.but i have to give msgs for all patients with thier balance to pay.

Regards,

Ravi.

former_member515618
Active Participant
0 Kudos

Hi Ravi,

Are you displaying the data as a table? If yes how many records are expected in it. This is important because, if you want to display messages, and if there are n number of ppl with min balance not paid, then it comes up with those many messages. It is not a good design practice.

Regards,

Sravan Varagani

Former Member
0 Kudos

Hi Sravan,

exactly i want to diplay msg in a tabular form.how many members ,who didnt pay min balance means ,it depends.we cant predict.i want to display msg as Patient A has to pay balance of that amount.and that balance field is not in my context.

Regards,Ravi