‎2007 Dec 26 2:08 PM
Hi everyone.
I'm working on a dynamic ALV. I've solved the field catalog, but I'm still having some problems to deal with an internal table.
I have to build an internal table that has a field for each different result of a data selection, and whose name is the value of one of this results fields. To be a little more specific, I do a selecion from BSET, and I need an internal table with a field for each different BSET-KTOSL that I get.
Is there any simple way to do this?
Thanks a lot,
Fernando Villa.
‎2007 Dec 28 5:50 AM
Your requirement is very much possible. Once Heilman worte a blog. I used the same code and it is working fine. Find the link below.
[Click Here.|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2071] [original link is broken] [original link is broken] [original link is broken];
All the very best to you.
- Mohan.
‎2007 Dec 28 5:41 AM
here is the link for creating dynamic internal tables...
check whether this helps..
http://www.saptechnical.com/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
‎2007 Dec 28 5:41 AM
here is the link for creating dynamic internal tables...
check whether this helps..
http://www.saptechnical.com/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
‎2007 Dec 28 5:50 AM
Your requirement is very much possible. Once Heilman worte a blog. I used the same code and it is working fine. Find the link below.
[Click Here.|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2071] [original link is broken] [original link is broken] [original link is broken];
All the very best to you.
- Mohan.
‎2007 Dec 28 5:57 AM
Hi,
Check the following link:
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/dynamic%2binternal%2btable
Regards,
Bhaskar
‎2008 Feb 14 6:21 AM
Hi,
pls go through this program.
report z_dynamic.
type-pools : abap.
field-symbols: <dyn_table> type standard table,
<dyn_wa>,
<dyn_field>.
data: dy_table type ref to data,
dy_line type ref to data,
xfc type lvc_s_fcat,
ifc type lvc_t_fcat.
selection-screen begin of block b1 with frame.
parameters: p_table(30) type c default 'T001'.
selection-screen end of block b1.
start-of-selection.
perform get_structure.
perform create_dynamic_itab.
perform get_data.
perform write_out.
form create_dynamic_itab.
Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = ifc
importing
ep_table = dy_table.
assign dy_table->* to <dyn_table>.
Create dynamic work area and assign to FS
create data dy_line like line of <dyn_table>.
assign dy_line->* to <dyn_wa>.
endform.
Regards,
Gowri sankar
if it is usful reward points