2011 Jul 13 3:35 PM
Hi, im validating the data inside method "handle_data_changed" and when a error occurs I use the following code to add an error in the protocol.
CALL METHOD p_er_data_changed->add_protocol_entry
EXPORTING
i_msgid = 'SU'
i_msgno = '000'
i_msgty = 'E'
i_msgv1 = 'Value Invalid '
i_fieldname = lw_mod_cell-fieldname
i_row_id = lw_mod_cell-row_id.The problem is that even I dont use the method p_er_data_changed->display_protocol. It shows me the protocol anyway... and dont know why.
What I want is to collect all the errors in the protocol so when the user press a "check" or "save" button, if the protocol isnt empy then show ALL the errors.
But the event is triggered in every field so what I get is a error message for each field instead of showing all the errors together.
thx
Hi.,
To suppress the popup log you have to deactivate the protocol display.
pass space to the method ACTIVATE_DISPLAY_PROTOCOL( ) of class CL_GUI_ALV_GRID to suppress popup log.
DATA: o_grid TYPE REF TO cl_gui_alv_grid.
o_grid->activate_display_protocol( space ). " To deactivate Protocol display
do this in PBO.
hope this helps u.,
Thanks & Regards,
Kiran
2011 Jul 14 7:27 AM
Hi.,
To suppress the popup log you have to deactivate the protocol display.
pass space to the method ACTIVATE_DISPLAY_PROTOCOL( ) of class CL_GUI_ALV_GRID to suppress popup log.
DATA: o_grid TYPE REF TO cl_gui_alv_grid.
o_grid->activate_display_protocol( space ). " To deactivate Protocol display
do this in PBO.
hope this helps u.,
Thanks & Regards,
Kiran
2011 Jul 14 4:20 PM
My primary problem was that I registered the event:
* CALL METHOD o_grid->register_edit_event
* EXPORTING
* i_event_id = cl_gui_alv_grid=>mc_evt_modified.Now I dont get the protocol after completing every cell.
Kiran, thx for the input it works.
But now how can I do, to show the protocol wherever I want ? for example when the button "SAVE" is pressed.
2011 Jul 21 3:53 PM
So... is there a way to show the protocol outside the event data_changed. For example at user_command when pressing SAVE.
2011 Jul 21 5:18 PM
Try this way:
CALL METHOD pr_data_changed->add_protocol_entry
EXPORTING
i_msgid = '0K'
i_msgno = '000'
i_msgty = 'E'
i_msgv1 = text-m03
i_msgv2 = magv2
i_msgv3 = text-m04
i_fieldname = fieldname
i_row_id = row_id.
error_in_data = 'X'. "<<<<<<<<<<<<<<
EXIT.*-- Display application log if an error has occured.
IF error_in_data EQ 'X'.
CALL METHOD er_data_changed->display_protocol.
ENDIF.
2011 Jul 21 9:03 PM
Hi Jay, but that code is inside the method handle_data_changed. Right ?
Is like CALL METHOD er_data_changed->display_protocol only can be used in that method. So if u register the event
CALL METHOD o_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.The protocol will be displayed wharever u enter a value in each field.
If u register this event
CALL METHOD o_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.You will get it wharever you hit ENTER.
Like Kiranssaid, with this you can avoid showing the protocol,
o_grid->activate_display_protocol( space ).Tthe thing is that I want to show it... but not in the method handle_data_changed, and It seems that is a private method... so I dont know if there is a way to show it outside the method handle_data_changed.
thx greetings
2011 Jul 21 10:58 PM
Can creating a method for display protocol help? and call it where needed
call method o_grid->display_me( ).
2011 Jul 14 7:50 AM
Hello,
I think you might have placed the method display_protocol( ) inside an iteration!
I'll suggest have a look at the SAP demo program BCALV_EDIT_03. Have a look at the event handle method handle_data_changed( ).
BR,
Suhas
2025 Jul 09 8:57 AM
I did this to suppress the protocol , but my fields are high lighted in red now . How to remove this ?
Regards,
Bharathi
2011 Jul 14 8:51 AM
Hi ,
have you registed the event ENTER , it will happens whenever you press enter/adding new rows and then press enter.
regards
Prabhu
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |