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: 

Question on ALV reports.... Please see.

Former Member
0 Kudos

Hi all,

I know that an ALV report is the marriage of 1) internal table with data. 2) Field Catalog 3) Layout

Out of 2 and 3 which one is the event table (for event based functionalities)

and which one holds the Non-event based functionalities?

Finally when I have given everything, how do I marry them?

Thanks,

Charles.

4 REPLIES 4

Former Member
0 Kudos

Hi,

As you have mentioned

1. Your internal table holds the complete data the needs to be displayed.

But,

2. You fieldcatalog is used to define what all data you need to display in your screen. It allows you to select a few fields from the internal table or all of them. It also allows you to define properties of each of the columns.

3. Your Layout properties allow you to define the properties of the entire layout on the whole.

None of the above properties hold the event based functions. If you check the FM 'REUSE_ALV_GRID_DISPLAY' in transaction SE37 and see its import parameters you will have a separate table for events. Also this FM is used to 'Marry' them and display the output.

Hope this helps.

Regards,

Pramod

0 Kudos

Hi Pramod,

Thanks for the answer. You said that the event based functionalities are in the event table and the FM used here REUSE_ALV_GRID_DISPLAY is also what is used to 'marry' them. I wanted to know whether these two functions can be performed by REUSE_ALV_LIST_DISPLAY as well?? Also, where do I save the non-event based functionalities (out of 2 and 3 and the 4th ie event table)?

Thanks much,

Charles.

0 Kudos

Hi,

The FM 'REUSE_ALV_GRID_DISPLAY' is only used to display the final result using all the inputs that can be taken through the Import parameters. So this is used to group all of the functionalities together.

If you want individual functionalities you can goto SE37 give REUSE_ALV * and search and you will get many function modules that are used to define the functionalities.

Regards,

Pramod

uwe_schieferstein
Active Contributor
0 Kudos

Hello Charles

In case of OO-controls (e.g. ALV grid, ALV tree) the situation is slightly different. Event handling requires three steps:


(1) Register the events at the control (e.g. ALV tree) which should be active (using method SET_REGISTERED_EVENTS).

In case of the ALV grid all event that the grid can trigger are already registered.


(2) Define event handler methods (e.g. within a local class).


(3) Set the event handler for the required events (using statement SET HANDLER).

The control instance "knows" which events it can trigger and which of them are active (ALV grid = all active; ALV tree = registered events are active)

When the control triggers an event (e.g. double-click) the control framework whether an event handler method has been set for this event.

Thus, the instance triggering the event has no idea who will handle it.

Final remark: Event handling is much easier using class-based ALV lists.

Examples:

Regards

Uwe