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

Issue with ALV double click method

Former Member
0 Likes
717

Hi,

I have developed a module pool program. In that I have created two ALV grids in the same screen(say ALV1 and ALV2).

Initially ALV2 is not displayed. When we double click on a row of ALV1, then the ALV2 is displayed with some data.

According to my requirement, when i double click on the row of ALV2 i'm calling a screen and making entries in that.

Once data entered in that screen, it will return to the first screen.

When we double click on another row of ALV1, then ALV2 is refreshed with new values and again double clicking on ALV2.

When the first time ALV2 is displayed, the double click method is working fine and I can able to call the screen an can enter the values.

But when the ALV2 is refreshed with new data ( by double clicking on ALV1 second time), and after double clicking the ALV2 it is calling the new screen. After entering the data in that screen and press enter , it is giving the same screen and it is not returning to first screen.

In debugging I observed that, the double click method for ALV2 is triggered twice.

Please help me to solve this issue.

Thanks & Regards

Rajesh

Hi,

I have developed a module pool program. In that I have created two ALV grids in the same screen(say ALV1 and ALV2).

Initially ALV2 is not displayed. When we double click on a row of ALV1, then the ALV2 is displayed with some data.

According to my requirement, when i double click on the row of ALV2 i'm calling a screen and making entries in that.

Once data entered in that screen, it will return to the first screen.

When we double click on another row of ALV1, then ALV2 is refreshed with new values and again double clicking on ALV2.

When the first time ALV2 is displayed, the double click method is working fine and I can able to call the screen an can enter the values.

But when the ALV2 is refreshed with new data ( by double clicking on ALV1 second time), and after double clicking the ALV2 it is calling the new screen. After entering the data in that screen and press enter , it is giving the same screen and it is not returning to first screen.

In debugging I observed that, the double click method for ALV2 is triggered twice.

Please help me to solve this issue.

Thanks & Regards

Rajesh

3 REPLIES 3
Read only

Former Member
0 Likes
665

Hi,

Clear the value of the SY-UCOMM or OK_CODE value in the PBO or before pressing the ENTER to return to the main screen and write leave screen to back to the main screen.

Regards,

Suvajit.

Read only

Former Member
0 Likes
665

Hi,

You can assign sy-ucomm value for Enter by going to the PF-status, and assigning F-code to the Enter button (a tick mark inside a circle). This way restrict your code by not letting it execute it for Enter.

Read only

uwe_schieferstein
Active Contributor
0 Likes
665

Hello Rajesh

I am almost sure that the problem is due to the fact that you handle the double-click event solely within your event handler method WITHOUT passing PAI afterwards (which would trigger the next PBO with automatic flushing).

Have a look at my sample report ZUS_SDN_THREE_ALV_GRIDS in thread

You need to "pretty print" the coding a little bit but then you will see immediately how your communication between multiple ALV grids should look like.

In addition, you may have a look at blog:

[Against All Odds - Programming of Communicating (S)ALV Grid Controls|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/21504] [original link is broken] [original link is broken] [original link is broken];

Regards

Uwe