2010 Sep 04 1:02 AM
I created a structure with a table type in it. I want to display an ALV Grid report with that structure. Is it even possible. If yes, can someone please provide some reference. Thanks.
Edited by: Sreekanth Nadella on Sep 4, 2010 2:29 AM
2010 Sep 04 1:39 AM
yes you can display ALV with your table. Do you know anything about how to use ALV reuse library? You can refer package SLIS by SE80. You can find a lot of example about how to use ALV.
regards,
I created a structure with a table type in it. I want to display an ALV Grid report with that structure. Is it even possible. If yes, can someone please provide some reference. Thanks.
Edited by: Sreekanth Nadella on Sep 4, 2010 2:29 AM
2010 Sep 04 1:39 AM
yes you can display ALV with your table. Do you know anything about how to use ALV reuse library? You can refer package SLIS by SE80. You can find a lot of example about how to use ALV.
regards,
2010 Sep 04 5:09 AM
Hi Thien,
I have used ALV in many reports and also have used many features of ALV. This specific layout with a table type in it is what I am not able to find. If you can point me to a specific program in the SLIS package, it would be helpful.
Thanks,
Sreekanth.
2010 Sep 04 6:34 AM
Hello Sreekanth,
If you read the documentation of the REUSE* function modules, it states:
The function module outputs an internal table with whatever structure in the form of a formatted single- oder multi-line list.
So displaying the output is possible. Have you given a try before posting the question ?
BR,
Suhas
2010 Sep 04 6:47 AM
Hi Suhas,
Yes I did try. It is not showing any of the fields in the table type in the output. It shows all the fields in the structure but excludes the table type in the output.
Thanks,
Sreekanth.
2010 Sep 04 9:34 PM
Hello
A structure containing a field representing a table type is a DEEP structure. However, ALV grids can only display flat structures. Thus, you will never see such a field in your ALV.
Regards
Uwe
2010 Sep 04 5:08 AM
Hi Thien,
I have used ALV in many reports and also have used many features of ALV. This specific layout with a table type in it is what I am not able to find. If you can point me to a specific program in the SLIS package, it would be helpful.
Thanks,
Sreekanth.
2010 Sep 04 9:38 PM
Hi sreekanth,
forget about fieldcat, assuming your data are in gt_outtab (regardless what structure or type) just use
data:
gr_table type ref to cl_salv_table.
*... Create Instance
call method cl_salv_table=>factory
IMPORTING
R_SALV_TABLE = gr_table
changing
t_table = gt_outtab.
*... Display Table
gr_table->display( ).If your question means you have a table with a field that is an internal table itself, what do you think the ALV should look like? If you have clear imagination, let me know. Try to find a solution. Possibly you can define a dropdown event to show the values...
Regards,
Clemens
2010 Sep 08 6:14 PM
Hi Clemens,
It is not displaying the fields in the table type. Probably it is not possible to display deep structures in ALV reports as replied above.
Thanks.
2010 Sep 08 6:33 PM
Hi,
again,
what do you think the ALV should look like?
Regards,
Clemens
2010 Sep 08 10:28 PM
Hi Clemens,
The output should like a normal ALV Grid report. Just like a deep structure, one of the cell will have multiple row/value just like table. So you are looking at something like this.
A B C 1 2 3 D E
4 5 6
7 8 9
F G H 1 2 3 I J
4 5 6
7 8 9
Thanks.
2010 Sep 08 10:30 PM
the output is not formatted on screen as I thought. Please put the numbers below each other.
2010 Sep 09 9:31 AM
Hi Sreekanth,
just format code-like
A B C 1 2 3 D E
4 5 6
7 8 9
F G H 1 2 3 I J
4 5 6
7 8 9to get this result visible.
SAP standard does not provide such a functionality, it can display only flat structures. One reason for this is that if you have a deep structure with a field which is an internal table itself, this may be structured with more than one field. This would change the column structure. And, possibly, you could have inside the internal-table-column again more internal tables, ...
But with no big effort you can create a flat table with some more records for the additional data.
Regards,
Clemens
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |