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: 

ALV display in a special format

Former Member
0 Kudos

Hi all,

We have a requirement to display an ALV report in following format.

-


Actual -


-


Plan -


WBS Element SKF Jan Feb … Dec Jan Feb …. Dec

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Actual and plan should come as two headings in the first row.

In the second row WBS ELEMENT , SKF and Under 'ACTUAL' heading JAN TO DEC FIELDS will come and same for 'PLAN'.

Is this possible? If so what function module need to be used.

If any one worked on this kind of scenario please help us.

1 REPLY 1

Former Member
0 Kudos

ALV does not support twi lines of column headings like you show, but you can put your data into a simple ALV list (REUSE_ALV_LIST_DISPLAY) by defining columns as follows:


data: 
  begin of st_report,
    wbs like ??,
    skf like ??,
    act01 like bseg-wrbtr,
    act02 like bseg-wrbtr,
    act03 like bseg-wrbtr,
    ...
    plan01 like bseg-wrbtr,
    plan02 like bseg-wrbtr,
    plan03 like bseg-wrbtr,
   ...
  end of st_report.

As the amount columns will be 15 - 20 chars wide, give them headings like "Jan Actual", "Feb Actual", ..., "Jan Plan", "Feb Plan", etc.

Thiis way, if user hides some columns using ALV options, headings on individual columns will still be correct.

If columns are not holding amounts, and are not 10+ wide you may need to shorten headings.

Hope this helps.

Andrew