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: 

Hierarchical - multiple header lines - grouping

Former Member
0 Kudos

Hi,

I was extensively searching SDN and did not get any suitable answers, so I'm posting. Maybe I'm sure what keywords to use. This is my requirement:

I want to create a hierarchical list display.

One header and one item. However I want to change the layout programmatically, so that the header is grouped according to various fields in 4 lines. I created a simple hierarchical list display and manually changed the layout on the screen (using change layout button). I can choose maximum upto 3 header lines, hence grouping is possible upto 3 levels.

Unfortunately my requirement is to group upto 4 levels. Also my last level should contain the fields including key fields (but layout is not allowing me to move the key field to the 3rd line).

Current output:

Header: Shipmentdocno(this is key field) ShipmentType Route Carrier ShippingPoint Description Destination

Item: Shipmentdocno Delivery Customer Name1

Required output:

Header:

Line 1: Carrier

Line 2: Route

Line3: ShippingPoint

Line4: Shipmentdocno(key field) ShipmentType Description Destination

Item: Shipmentdocno Delivery Customer Name1

Note: ALV tree also does not serve my purpose as there is no provision to display both header and item text on top, with data below.

This is basically a grouping requirement and needs to be visually grouped in separate lines at header level.

4 REPLIES 4

former_member184578
Active Contributor
0 Kudos

Hi.,

In REUSE_ALV_HIERSEQ_LIST_DISPLAY did you checked it_special_groups parameter " for grouping Columns.,

this may server your requirement., I may be wrong. wait for Experts reply..

Thanks & Regards,

Kiran

0 Kudos

Yes i checked special groups too.. it does not serve my purpose.

thre is a sample screenshot given to us but it is the result of a SAP query, they want the grouping like this in the hierarchical output as well. any ideas?? LINK to screenshot: [Hier_query|http://postimage.org/image/48bi2nok/] (data blurred for privacy)

0 Kudos

Hi abapfreak,

I've made some tests, and if you populate the row number in the field catalog, you are able to get 4 or more lines on the header. I've even debugged the function module REUSEHIERSEQDISPLAY (sorry, I have no SAP right now, so I can't tell the full name of the FM ), and the popup which allows you to show/hide columns has up to 9 tabs, one for each row... but unfortunately I was not able to activate all of them.

So: you may begin your list with more than 4 header rows (if you populate the field catalog properly), but as soon as you want to change the layout, you may lose that info...

...at least this is what I've found out...

Kind regards,

Alvaro

Former Member
0 Kudos

Solved it by grouping at header level using the sorting internal table it_sort. by giving it_sort-group = '*' and by populating top_of_page in events.