Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

cl_gui_alv_grid-check_changed_data issue

VenuAnumayam
Participant
0 Likes
914

Hello,

I am using method "cl_gui_alv_grid->check_changed_data" in an editable ALV program like this.

module user_command_0100 input.
data: l_valid type c.

    case ok_code.
     when 'EDIT'.
      call method plan_grid->check_changed_data
                importing e_valid = l_valid.


     if l_valid = 'X'.
      perform update_data.
     endif.

The issue is, even if no records were changed on the ALV output, the method is returning l_valid = 'X'.

Can I use l_valid as a flag to determine the data was changed?

Thanks.

Edited by: ravi kumar on Dec 17, 2009 12:35 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
788

I think that the method tells you if there is any error on your ALV so you can save it without problems...remember that you can control errors when a particular field has changed.

Greetings,

Blag.

Hello,

I am using method "cl_gui_alv_grid->check_changed_data" in an editable ALV program like this.

module user_command_0100 input.
data: l_valid type c.

    case ok_code.
     when 'EDIT'.
      call method plan_grid->check_changed_data
                importing e_valid = l_valid.


     if l_valid = 'X'.
      perform update_data.
     endif.

The issue is, even if no records were changed on the ALV output, the method is returning l_valid = 'X'.

Can I use l_valid as a flag to determine the data was changed?

Thanks.

Edited by: ravi kumar on Dec 17, 2009 12:35 PM

5 REPLIES 5
Read only

prasenjit_sharma
Active Contributor
0 Likes
788

Hi,

Try to debug inside the method and see why the flag is set as 'X' evenif there is no data change.

Regards

Prasenjit

Read only

Former Member
0 Likes
789

I think that the method tells you if there is any error on your ALV so you can save it without problems...remember that you can control errors when a particular field has changed.

Greetings,

Blag.

Read only

0 Likes
788

I think that the method tells you if there is any error on your ALV so you can save it without problems...remember that you can control errors when a particular field has changed.

In that case, the 'l_valid" is not a "true" flag for finding out if the data was changed or not but it is for determining if there are any errors or not.

Read only

0 Likes
788

That's what I think...but I'm not completely sure... -:)

Greetings,

Blag.

Read only

0 Likes
788

Thanks.