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

How to get the changed values in global class using the ALV?

0 Kudos
695

<changed the subject line>

Am using Editable ALV in "global class".Am editing values in ALV table and  trying to capture the changed values in an internal table on clicking a button in ALV Toolbar.
Am using set handler.

method1.

          SET HANDLER obj->user_command FOR ref_grid1.
        CALL METHOD ref_grid1->set_table_for_first_display
          EXPORTING
            it_toolbar_excluding = pt_exclude
          CHANGING
            it_outtab            = <dyn_table>
            it_fieldcatalog      = t_field_catalog.

end method.

here,

obj ref to 'my own class'.

ref_grid1 ref to cl_gui_alv_grid.

am handling the user command in another method "user_command". i can get the reference of ref_grid1 when am using in local class. but going in global class my ref_grid1 is initial. how can i get the changed values of ALV in another method dealing with global class.

Moderator Message - Please use a meaningful subject line in the future.

Message was edited by: Suhas Saha

2 REPLIES 2
Read only

0 Kudos
508

This message was moderated.

Read only

Former Member
0 Kudos
508

Hi,

Global or Local classes behave the same. If it's empty in the global class it's because you never instantiate the object. If not empty in the local class, I guess it's because you read a global variable in the program that it's initialize somewhere before. A global class does not have direct access to your global varibles in the project.

Hope this helps,

David.