on 06-17-2014 2:27 AM
Hi Guys,
I have an issue on on_data_check event of ALV not triggered for 1 of my fields.
Here's my scenario.
1. I have a tabstrip with 2 tabs.
2. User enters data on tab1.
3. User clicks saves button.
4. An error message is raised stating that tab2 needs to be filled out.
5. User went to tab2 and click Append row to enter data to ALV.
6. When I choose data from my dropdown, click any button in the ALV, or hit enter, my on_data_check gets triggered. And my logic there gets executed.
7. Now the problem is on this 1 particular column: columnX.
This column has OVS input help.
After choosing data from the input help, user needs to hit enter or click save in order to trigger my on_data_check.
In my investigation, my event doesn't gets triggered because changes in columnX doesn't get logged at all!
R_PARAM->T_MODIFIED_CELLS doesn't have entry.
The weird thing is, it only happens when #4 happens.
If user enters data to tab1 and tab2 first before saving it, no error message is raised, and on_data_check gets triggered after I click check or hit enter after entering data in columnX.
What might be the cause of this?
Hi Navi,
Try to use the lo_model->refresh( ) after error message is raised.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navi,
Try to trigger data check event manually after value entered in COLUMNX.
You can manually trigger the data check event as below
DATA: lo_salv_wd_table TYPE REF TO iwci_salv_wd_table.
lo_salv_wd_table = wd_this->wd_cpifc_MY_ALV( ).
lo_salv_wd_table->data_check( ).
Note: here MY_ALV is the usage name of alv component SALV_WD_TABLE
Hope this helps you.
Regards,
Rama
Hi Rama,
Don't you think it's a bug?
I noticed that all fields wherein I input data using input help, doesn't trigger on_data_check.
I didn't noticed the other fields before because I won't be doing anything with their data.
But this columnX I need it in order to populate another column.
But on normal circumstance, wherein no error msg is raised before I manipulate ALV, on_data_check gets triggered every time I change something on ALV and press enter or click save afterwards.
Thanks.
Hi Rama,
I now found out the cause of the issue.
In WDDOMODIFYVIEW, i have a code that when met certain scenario, will do the updating of internal table.
I commented-out all the codes in this method and move it somewhere.
What might had caused it?
Why is it that when I do some processing in there, on_data_check doesn't gets triggered?
I can't see the connection.
Thanks.
Hi Navi,
Whenever you update data back to the context by manipulating internal table of alv, the on_data_check will not trigger as it sets data via code at runtime. Hence losing the track of user modified data information.
Are you able to meet your requirement after commenting the lines of internal table manipulation?
Regards,
Rama
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.