on 2008 Jul 14 3:58 PM
hi
i have a requirement in which i need to display a table with records and below it in a message area i need to display the total no. of records found ( eg : 2 records found )
am using message manager for the display and calculating the total no of rows by lv_index = LINES( li_table ) .
get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lv_index = LINES( li_table ).
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager
.
report message
CALL METHOD lo_message_manager->report_warning
EXPORTING
message_text = '& records found' WITH lv_index
.
BUT this throws an error. ... can anyone please provide the correct coding for this.
Thanks
Anurupa.
Hi Anurupa,
If u want just a message to come in the message area without warning or error . U can use method 'report_success'.
get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lv_index = LINES( li_table ).
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager
.
report message
CALL METHOD lo_message_manager->report_success
EXPORTING
message_text = '& records found' WITH lv_index
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can write like this
data: str type string.
concatenate lv_index 'records found' into str.
CALL METHOD lo_message_manager->report_warning
EXPORTING
message_text = str
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.