cancel
Showing results for 
Search instead for 
Did you mean: 

Need Dynamic or Cross tab reports

former_member281396
Participant
0 Kudos

Dear Gurus,

I want to develop a report in SAP where colums will be variable like if data increase colume will also be increased.I am giving an example below which clarify my requirements : -

In normal ALV display as follows :-

Material Batch Month Qty

M1 B1 04-2011 10.00

M1 B1 05-2011 15.00

M1 B1 06-2011 8.00

M2 B6 05-2011 18.00

M2 B6 06-2011 30.00

M3 B15 07-2011 35.00

I need this like following :

Material Batch 04-2011 05-2011 06-2011 07-2011

M1 B1 10.00 15.00 8.00 0.00

M2 B6 0.00 18.00 30.00 0.00

M3 B15 0.00 0.00 0.00 35.00

Here if month increase then it will increase like that :

Material Batch 04-2011 05-2011 06-2011 07-2011 08-2011

M1 B1 10.00 15.00 8.00 0.00 1.00

M2 B6 0.00 18.00 30.00 0.00 2.00

M3 B15 0.00 0.00 0.00 35.00 58.00

It can be increased upto n no of entries depends on selection screen.

I have never develop such type of report .Please help me out to develop this report.

Advance Thanks

Nirmal Sharma

Moderator message: FAQ, please search for previous discussions of this topic, e.g. "ALV dynamic colums"

Edited by: Thomas Zloch on Aug 12, 2011 2:01 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

SureshRa
Active Participant
0 Kudos

Hi Nirmal,

The first step is to construct a dynamic internal table at run time. For this purpose use RTTC (Run Time Type Creation) services with classes CL_ABAP_TYPEDESCR and CL_ABAP_TABLEDESCR.

Second step is to display this dynamic internal table data on the list or ALV. In case of ALV you don't have to strain to any extent if you use new ALV classes like CL_SALV_TABLE. Simply call the method "Display". If you want to show on conventional list, use dynamic programming techniques like ASSIGN COMPONENT <comp> .....

Regards

Suresh