Skip to Content
author's profile photo Former Member
Former Member

Pass column names dynamically in report

Hello experts,

I am creating an ALV report where i need to pass the column names dynamically. if the current month is March and year is 2009. the column names should be as below

March 2009 April 2009 May 2009 June 2009 ..............till Feb 2010 (total columns are 12)

if the current month is June and year is 2010 it shoud be displayed as

June 2010 July 2010 Aug 2010................till May2011

I am actually calculating the forecast qty for each month and displaying in a report from the current month.

How to write field catelog for this requirement?

Thanks in Advance.

Rajesh.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Mar 30, 2009 at 08:05 PM

    I think in the fieldcat, at the time of declearation, you can alter the field description depending on the present month.

    If present_month = January
     wa_fieldcat-reptext_ddic = 'January'.       " Field description
    elseif present month = February.
     wa_fieldcat-reptext_ddic = 'February'.       " Field description
    
    on so on.....................
    

    Kuntal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2009 at 07:58 PM

    As your columns are only 12 .. U can fix(declare 12 fields) them and change the headings accordingly in the fieldcatalog ..

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.