‎2008 Jun 26 2:26 PM
Hey All,
I am trying to develop a report to display the planned order requirements for a few weeks and then the subsequent months after that. The output is in ALV grid format. Now the problem is that the number of weeks to displayed varies and it is dependent on the date on which the report is run, so that it end before the subsequent month starts.
I am using:
CALL METHOD v_alv_tree->set_table_for_first_display
EXPORTING
is_variant = wa_variant
i_save = c_save
is_hierarchy_header = wa_hierarchy_header
it_list_commentary = i_list_commentary
i_logo = c_pepsico_logo
CHANGING
it_outtab = i_output1[]
it_fieldcatalog = i_fieldcat[].
Say for example if the total columns is 30, depending on the date columns 12 or/and 13 or/and 14 should not be displayed.
I have added a logic to change the field catalog based on the date.
But the output still shows all the data as i am not changing the output tab.
How can i acheive this? Do I have to use dynamic tables, or is there a easier way?
Thanks
‎2008 Jun 26 2:30 PM
‎2008 Jun 26 2:29 PM
You can do that using fieldcatalog. may be some where you are doing the mistake in building the fieldcatalog.
you can do that using Dynamic Tables also.
‎2008 Jun 26 2:30 PM
‎2008 Jun 26 2:42 PM
Thank you for your suggestions.
Raymond, How do i use the TECH field to not display the column, Maybe i am taking the wrong approch here. The modification i did was to not populate the particular week columns in the field catalog which should not be displayed.
I am doing something like this:
form f_build_field catalog.
Loop for week
if date > v_date
exit.
fill the field catalog
Endloop.
Loop for month
fill the field catalog
Endloop.
How do we create dynamic field catalog??
‎2008 Jun 26 2:44 PM
Loop for month
fill the field catalog
Endloop.how many months you are looping and...what is the condition to exclude them from layout.
‎2008 Jun 26 2:48 PM
The total display is for one year.
So if i run the report on 1st jan it should show sixteen weeks and the 8 months
but if i run on 7th it should show 15 weeks and 8 months
and like wise....
Months are fixed. ie I have to show 8 months of requirement
‎2008 Jun 26 2:59 PM
‎2008 Jun 26 3:03 PM
Hi Aparna,
Below is the sample code for the dynamic field catalog.
concatenate:
'KST00' c_count into l_field_qty.
assign:
component l_field_qty of structure w_keph to <fs>.
w_keph-kst001 = w_keph-kst001 + <fs>.
&*******Reward Point if helpful**********&
‎2008 Jun 26 2:32 PM
Hi Aparna,
Create a dynamic field catalog . It will solve your problem
‎2008 Jul 08 3:53 AM