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 do I enable at user command for OO Interactive ALV ?

Former Member
0 Likes
4,277

I created an ALV report based on a document, which when clicked into brings up another ALV report with additional information. Now I need to further be able to click into any one of the lines of the 2nd ALV report and be able to use the information for further use. Anybody has any ideas ? I tried using the same subroutine at_user_command for the processing the 2nd ALV lines, but it just does not recognize the input.

Steps followed:

1. Execute report with some selection criteria.

2. ALV report 1 is displayed.

3. Choose any line of ALV Report 1 and press Process button.

4. That opens up another ALV Report 2.

5. Now choose any line of ALV Report 2 and try to process a line. ----> This step is the stumbling block.



Anyone has any suggestions? Thanks so much!

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,054

When defining handling method for double-click use the implicit parameter sender, so you can share the same method between two or more grid, just use some 'case sender/when alv1/when alv2/endcase' syntax and a set handler for all instances at start of program.

Regards,

Raymond

When defining handling method for double-click use the implicit parameter sender, so you can share the same method between two or more grid, just use some 'case sender/when alv1/when alv2/endcase' syntax and a set handler for all instances at start of program.

Regards,

Raymond

6 REPLIES 6
Read only

Ashg1402
Contributor
0 Likes
2,054

Hi,

Check did you register the event properly for the object of second report in PBO module.?

Read only

Former Member
0 Likes
2,054

Hi Ashish, I did specify a SET HANDLER for the events (for user command) if that is what you meant... Let me know if there is anything more to it. Thnx!

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,055

When defining handling method for double-click use the implicit parameter sender, so you can share the same method between two or more grid, just use some 'case sender/when alv1/when alv2/endcase' syntax and a set handler for all instances at start of program.

Regards,

Raymond

Read only

0 Likes
2,054

Hi Raymond, that's what I did... had a SET HANDLER for user command and re-used the same subroutine in which I have a case-endcase for whichever pushbutton was chosen (either from the first report or the second) . But I found that the control doesn't even go to the event in case of the ALV Report 2, which is what I am trying to troubleshoot. Any suggestions? Thnx!

Read only

0 Likes
2,054

If you submit another report you wont be allowed to share such objects (New internal session)

Read only

Former Member
0 Likes
2,054

Thanks guys, I finally was able to resolve it. While I had the SET HANDLER for user command, I hadn't registered the object reference. So once I put in this statement before the SET HANDLER, things started working. Thanks for pointing me to this direction.

data: gr_alv type ref to cl_salv_table.

lo_evnt = gr_alv->get_event( ).                 ----->>> This was the line I missed

create object gr_evnt.

set handler gr_evnt->on_user_command for lo_evnt.