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: 

Display Deep structures in ALV

Former Member
0 Kudos

Hi,

We have a requirement to display deep structures in ALV i.e. We have to show Sales Order texts in ALV and as you know it may extend to several lines and the user wants to see it at a glance for every item.I created a new internal table in the output table but field catalog is ignoring the same and not displaying in ALV.

I am using CL_SALV_TABLE factory method but of no help.Please suggest to display the deep structure in ALV.

Thanks in advance.

Regards,

Kranti Yamparala.

7 REPLIES 7

Former Member
0 Kudos

Not supported, even in SALV, I believe. Did you search the forum about this? Gets asked pretty often.

Sandra_Rossi
Active Contributor
0 Kudos

Hi Kranti Yamparala,

if they don't need to sort, filter, etc., you may propose HTML tables for example, or even a simple ABAP list.

Or, using ALV, you may display only first tens of characters of the long text, or depending on what your ALV contains, you may create several lines for each original line, and hide the repeating values of the other columns...

Sandra

Clemenss
Active Contributor
0 Kudos

Hi Kranthi,

we handle such tasks by displaying an icon showing the user that there is something more, in your case the long text. Define this column as hotspot and in the respective event create a popup screen or dialog box with a text edit control or another SALV control showing the long text or other details.

Users prefer a clear list not interrupted by any additional records but they will appreciate the functionality providing detalied information on request.

And, by the way, what do you expect should a deep-structure-ALV look like, what would you do in Excel?

Regards,

Clemens

zamichiei1
Member
0 Kudos

take a look on

CALL FUNCTION 'RS_COMPLEX_OBJECT_EDIT'

or in the program NF2CHECK

ray_mannion
Participant
0 Kudos

You can do this if you define your own data dictionary structure using includes and groups.

Also be sure to set objects as "technical" using either the field catalog lvc_s_fcat-tech = 'X' for alv grids or using the method cl_salv_column_table->set_technical for cl_salv_table objects

Look at the help documentation here: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenddic_include_structure.htm

  • "The structure DEMO_WEEK includes the structure DEMO_DAY five times as an include structure with group names and suffixes. The program DEMO_INCLUDE_STRUCTURE shows how its components can be accessed in ABAP."

I needed to include several structures which all have the field MANDT in them. When you give each include a 2-3 character prefix and a group name, you can refer to the data in your code and yet the ALV grid sees it as a flat structure.

When you use these include/groups you need to reference the data like this

zvfutresall-future-matnr

It is a small learning curve, but this is a very powerful and useful technique when you want to have a flat structure containing several structures which may have common field names.

former_member1321
Participant
0 Kudos

For someone who ended up here during search, can have a look at here and see if that solves the purpose.

Your sharing is very useful for me, it's so cool