Application Development 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: 

OOPS ALV - Editing the OutTab

mike_mcinerney
Participant
0 Kudos

I want to use cl_gui_alv_grid as a pretty wide open internal table editor.

In the PBO, I


* create the custom container and grid (if they do not exist)
* set the layout variable edit to u2018Xu2019
* populate the outputtable "myinternaltable"  and  call the   set_table_for_first_display method, 
     Exporting
          i_structure_name =  u2018myDDICstructu2019
          Is_Layout = my_layout
     Changing
          it_outtab = myInternalTable.

When the grid comes up, I can edit the display, but the changes do not seem to make it back to the itab.

What combination of modes and control structures, etc might I need?

Thanksu2026

u2026Mike

1 ACCEPTED SOLUTION

mike_mcinerney
Participant
0 Kudos

That's very helpful. I registered the event and it transfers the data for me now, So then, what does 'edit_mode' do on the layout ?

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos

did you set the EDIT EVENT or atleast are you calling the CHECK_CHANGED_DATA method in the PAI.

Register the edit event also for enter or modified then the Data changed event will trigger.

call method g_grid->register_edit_event
               exporting
                  i_event_id = cl_gui_alv_grid=>mc_evt_enter.

For details Just check the programs BCALV_EDIT_01 to BCALV_EDIT_09

mike_mcinerney
Participant
0 Kudos

That's very helpful. I registered the event and it transfers the data for me now, So then, what does 'edit_mode' do on the layout ?

0 Kudos

it just opens the Columns in the edit mode. But check_changed_data method will transfer the contents back to internal table. It calls the Data_changed event internally.