cancel
Showing results for 
Search instead for 
Did you mean: 

on_data_check event not triggered

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Navi,

Try to use the lo_model->refresh( ) after error message is raised.

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Lo_model pertains to the interfacecontroller?

So after triggering the message and before setting the ALV, need to refresh it beforehand?

ramakrishnappa
Active Contributor
0 Kudos

Hi Navi,

lo_model is the reference of class CL_SALV_WD_CONFIG_TABLE.

Once the user is in TAB2, you can refresh alv data.

Regards,

Rama

Former Member
0 Kudos

It's not working, the changes is still not logged.

ramakrishnappa
Active Contributor
0 Kudos

Not working?

Is columnX data is not passed to alv?

is error message is getting cleared once the user is in tab 2?

Former Member
0 Kudos

yeah, not working.

ColumnX data is passed to ALV. No problem with that. It's just that when I want to trigger on_data_check, it don't get triggered.

Ideally, it gets cleared because the error message is local.

Former Member
0 Kudos

I have error message raised by CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTRIBUTES and it doesn't have issue. I guess it has to do with MESSAGE_MANAGER.

ramakrishnappa
Active Contributor
0 Kudos

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



Former Member
0 Kudos

yeah, I also tried that before.

I put the code on the phase 3 of the ovs.

On the time that it passed the selected value to the ALV.

But still, it doesn't found in the changes in the ALV. Thus on_data_check doesn't get triggered.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

ramakrishnappa
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Rama,

Yes, it solves the issue.

But in my code, I wasn't updating the context only some other internal tables not directly related to ALV. That's why I find it weird as I don't see the connection.

Thanks.

ramakrishnappa
Active Contributor
0 Kudos

Oh thats weird. As long as you don't manipulate the alv model / context related to alv. It should not be an issue.

Former Member
0 Kudos

Yeah, that's what I'm thinking also.

For now, not doing anything on WDDOMODIFYVIEW solves the issue.

Thanks for the inputs!

Answers (0)