on 05-02-2012 10:50 AM
1.First we select copy icon it will navigate to a popup window.2.In that we enter save buttton it will populate a msg in inintial screen.
3.then if we drag the cursor in the table control.it populating messge again and again.where we want to write the code to clear the msg node.
tell step by step process.otherwise give some sample code.
Hi,
if you make the message area invisible as Jayanthi suggested, messages won't be shown at all, I don't think this is what you want. You need to find out, where the message manager throws this message. Since you said this happens again every time you drag the cursor in the table control I would take a look at the hook methods, especially WDDOMODIFYVIEW. You need to find out where the message manager throws the messages first.
Cheers, Lukas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lukas Weigelt,
U catch my issue correctly.In the popup view i set the attribute.then i am read in the WDDOMODIFYVIEW.If the arrtibute value is not initial i displaying a msg.
I kept the debugger in the modify view.After copy process is done it coming to the main screen.After clicking the table control down button and then it going to modifyview and populating msg again.
where we want to invisible the node.
there will be 2 view one is main and another one is popup view.In that where we want ti invisble the node
Mhh.. If I were programming this, I wouldn't work with visibility, cause the message is still there, and this would somehow make it "unclean". I like Priyanka's approach but you need some indicator when to clear the messages. I think I would do it like this:
This would prevent the message being posted every time, since the Message Manager will only be executed when the help-attribute indicates that something new has just been saved.
Cheers, Lukas
IF lv_request_no2 is not initial.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
lv_lv_req = lv_request_no2.
* report message
CALL METHOD lo_message_manager->report_t100_message
EXPORTING
msgid = 'ZRF'
msgno = '011'
msgty = 'S'
p1 = lv_lv_req.
ENDIF.
this is my code in modify view.hw should set blank in modify view..rearrange my code
Hi Prabhu,
please refer the below. Just add single line which is made bold.
IF lv_request_no2 is not initial.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
lv_lv_req = lv_request_no2.
* report message
CALL METHOD lo_message_manager->report_t100_message
EXPORTING
msgid = 'ZRF'
msgno = '011'
msgty = 'S'
p1 = lv_lv_req.
lo_message_manager->clear_messages( ).
ENDIF.
Hi Chengalarayulu D,
If i give this in modifyview lo_message_manager->clear_messages( ). message is not populating for the first time itself.So give another idea to solve the issue.
Hi Try to change sequence in line of code snippet.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
IF lv_request_no2 is not initial.
lv_lv_req = lv_request_no2.
lo_message_manager->clear_messages( ).
* report message
CALL METHOD lo_message_manager->report_t100_message
EXPORTING
msgid = 'ZRF'
msgno = '011'
msgty = 'S'
p1 = lv_lv_req.
ELSE.<<<<<<<<<<<< Use this if required >>>>>>>>>>>>>>
lo_message_manager->clear_messages( ).
ENDIF.
Hi,
Try this. If you clear lv_request_no2, next time it won't have any values and make sure it is getting populated in the place where it is required.
IF lv_request_no2 is not initial.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
lv_lv_req = lv_request_no2.
* report message
CALL METHOD lo_message_manager->report_t100_message
EXPORTING
msgid = 'ZRF'
msgno = '011'
msgty = 'S'
p1 = lv_lv_req.
Clear lv_request_no2.
ENDIF.
Thanks for all of them.To share ur idea...i clear my issue using the logic below,
IF lv_request_no2 is not initial.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
DATA lo_nd_count TYPE REF TO if_wd_context_node.
DATA lo_el_count TYPE REF TO if_wd_context_element.
DATA ls_count TYPE wd_this->element_count.
DATA lv_count TYPE wd_this->element_count-count.
** navigate from <CONTEXT> to <COUNT> via lead selection
lo_nd_count = wd_context->get_child_node( name = wd_this->wdctx_count ).
** @TODO handle non existant child
** IF lo_nd_count IS INITIAL.
** ENDIF.
*
** get element via lead selection
lo_el_count = lo_nd_count->get_element( ).
** @TODO handle not set lead selection
IF lo_el_count IS INITIAL.
ENDIF.
lo_el_count->get_attribute(
EXPORTING
name = `COUNT`
IMPORTING
value = lv_count ).
* @TODO fill attribute
lv_count = lv_count + 1.
* set single attribute
lo_el_count->set_attribute(
name = `COUNT`
value = lv_count ).
if lv_count > 1.
lv_lv_req = lv_request_no2.
*lo_message_manager->clear_messages( ).
lv_request_no2 = ' '.
* set single attribute
lo_el_copy->set_attribute(
name = `REQUEST_NO`
value = lv_request_no2 ).
endif.
* report message
CALL METHOD lo_message_manager->report_t100_message
EXPORTING
msgid = 'ZRF'
msgno = '011'
msgty = 'S'
p1 = lv_lv_req.
*lo_message_manager->clear_messages( ).
ENDIF.
if lv_count greater than 1 means i am set lv_request_no2 blank.while coming to modifyview again then lv_request_no2 is initial then it wont come to that condition..
Thanks for all of them.........
Hi,
Try using the interface IF_WD_MESSAGE_MANAGER methods:
1) CLEAR_MESSAGES to remove all messages
Or
2) REMOVE_MESSAGE for removing particular message
Hope this helps
Regards,
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you Message area in the main view, just try to make it invisible and run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.