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 Get_Selected_Rows Method

Former Member
0 Likes
891

Hello Everyone,

I am using ALVs in my Project (OO Approach). I have two different ALVs on two different Screens. I am selecting some rows and clicking on a Button (PRINT) and performing the required action.

Everything is fine with the ALV on one Screen, but on the other Screen starts the problem.

When i click on the Button for the first time, get_selected_rows is returning the rows that have been selected, but when i come back and click on the Button for the second time it is returning empty rows. Even if i select different rows and click on the Button, the method still returns empty rows.

How come it works fine on one Screen and not on the other? Any idea of solving this issue?

Thanks in Advance,

r a m a . .

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
820

Hello

I am almost sure that you do the execute your PRINT logic within the event handler method without going through PAI afterwards.

The solution to your problem is described in blog:

[Against All Odds - Programming of Communicating 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

6 REPLIES 6
Read only

Former Member
0 Likes
820

Haii All,

One small diference i could notice is: The Grid with which i am having the problem is placed in a Container of type CL_GUI_CUSTOM_CONTAINER, whereas the other Grid which is working fine is placed in a Container of type CL_GUI_CONTAINER. Ofcourse i tried to change the container to type CL_GUI_CONTAINER but still the problem persists.

Best regards,

r a m a . .

Read only

0 Likes
820

Tnk u Mods.

Read only

matt
Active Contributor
0 Likes
820

>

> Tnk u Mods.

What?

Read only

0 Likes
820

Ooops, because you moved the thread to the right Section:). Btw how can i delete my posts if i want to?

Best Regards,

r a m a . .

Read only

uwe_schieferstein
Active Contributor
0 Likes
821

Hello

I am almost sure that you do the execute your PRINT logic within the event handler method without going through PAI afterwards.

The solution to your problem is described in blog:

[Against All Odds - Programming of Communicating 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

Read only

0 Likes
820

Hello Mr. Uwe,

Thanks for your reply, gone through your wonderful piece of Blog..got to know some cool things

Best Regards,

rama