04-21-2015 1:38 PM
Hi all,
i am facing an issue with column to rows conversion in alv report. I want to keep two columns of internal table as it is and rest to be converted to rows.
I am getting the below output in alv:
and the required output is as shown below:
I am searched online for various transpose options, but they all convert every column of the internal table to rows.
Columns serial no and date will be as it is and rest column should be converted into rows and an additional column must be added that of count sum.
I am getting the summation of count column in alv, but i require it in row form for every date.
I request you all to kindly provide a solution for this as soon as possible.
thanks,
Saurabh.
04-21-2015 1:47 PM
04-23-2015 2:08 PM
Thanks Rajkumar for your solution. I almost achieved the desired output.
now i am getting this output:
first column is serial number, second is date , 3 to 14 column is for count of respective services and final is total count for every services for that particular date.
But now i want those empty cells to be filled with '0' instead of just being blank showing that there was no service count for that particular date and for that particular service.
my final dynamic internal table is <gfs_dyn_table>.
I am unable to find out where should i put a condition to fill those blank cells with zero value.
I again hope to hear a positive solution soon.
Thanks.
04-24-2015 6:51 AM
Hi Saurabh,
If the column datatype that used here is character, then we need to loop the final internal table and fill the value for each cell by checking whether it is initial or not like below.
if <fs_value> is initial.
<fs_value> = 0.
endif.
If the column data type is integer or numeric, system will load the initial value. In ALV, if it is not showing then, we need to check the Field catalog maintained whether output type NO_OUT = 'X'. If it maintained like this, we need to remove it.
Regards
Rajkumar Narasimman
04-24-2015 7:01 AM
Thanks a lot Rajkumar. I just included ' gw_dyn_fcat-inttype = 'I'.' in the field catalog and it worked like a charm