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: 

How to use two ALV grids in a single program (pl read below for details)?

Former Member
0 Kudos

Please read thoroughly::

I have an ALV report using REUSE_ALV_GRID_DISPLAY.

On the output of this report, when I click on a "change" button, a couple of columns should be made editable.

I achieved this by modifying the fieldcatalog and triggering the output with another REUSE_ALV_GRID_DISPLAY.

When I click on the back button of this second report, it is still taking me to the first one.

How to over come this?

Note:

I used custom containers etc but the default buttons on the container are not controllable. I added custom buttons but could not suppress the default ones. So I did not pursue this much even though this is more comfortable to use.

I am not able to get into the code in debug to see how the default buttons like COPY, INSERT ROW etc are working.

Can any body throw some inputs into this?

Thanks,

Ven.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

>I achieved this by modifying the fieldcatalog and triggering the >output with another REUSE_ALV_GRID_DISPLAY.

>When I click on the back button of this second report, it is still >taking me to the first one.

>How to over come this?

For this there is a solution

i am thinking you are using user_command and calling the second time ALV Grid if so check this.

form user_command using r_ucomm type sy-ucomm selfield type slis_selfield.

case r_ucomm.
when 'CHANGE'.
 selfield-exit = 'X'.   "use this , this will solve the problem
"i hope you are calling the Function here


endform.

5 REPLIES 5

former_member188685
Active Contributor
0 Kudos

>I achieved this by modifying the fieldcatalog and triggering the >output with another REUSE_ALV_GRID_DISPLAY.

>When I click on the back button of this second report, it is still >taking me to the first one.

>How to over come this?

For this there is a solution

i am thinking you are using user_command and calling the second time ALV Grid if so check this.

form user_command using r_ucomm type sy-ucomm selfield type slis_selfield.

case r_ucomm.
when 'CHANGE'.
 selfield-exit = 'X'.   "use this , this will solve the problem
"i hope you are calling the Function here


endform.

0 Kudos

Vijay,

Thanks a lot for the quick help.

I tried this variable in debug mode and it worked but was not able to set it explicitely.

One more question:

Did u see the second part of my question regardign the toolbar buttons in the container.

Do you think you can point me to some directions?

Thanks,

Ven

0 Kudos

>I used custom containers etc but the default buttons on the >container are not controllable. I added custom buttons but >could not suppress the default ones. So I did not pursue this >much even though this is more comfortable to use.

Did you check the example BCALV_EDIT_04 , using the Data_changed event you can get the information of Appended/Deleted rows. my suggestion in this case use the standard buttons instead of custom button. in the above program it is explained properly. what problems you are facing..?

0 Kudos

Vijay,

I am able to use this functionality (BCALV_EDIT_04) combined with some custom buttons on the application tool bar.

However I am not able to debug the code to see what is written behind the scenes for COPY, INSERT, ADD ROWS etc buttons

0 Kudos

> what is written behind the scenes for COPY, INSERT, ADD

> ROWS etc buttons

I never tried it and but from the Behaviour of the buttons we can make out what is happening behind.