2008 Jul 16 2:27 AM
hello experts,
how can i fill the itab with different structure types.
if i give the componenttype/domain to 'any' in my structure declaration, then its not saving and showing the error.
how to solve this problem
thanks
Tim
2008 Jul 16 3:12 AM
Hi
can u try like
DATA : BEGIN OF it_itab OCCURS 0.
INCLUDE STRUCTURE <any structure>. " structure.
DATA : END OF it_itab.
what is the error u got.
Regards
Ramesh
2008 Jul 16 9:09 AM
hi,
thanks for your responce,
its not one structre to include, i mean in itab the first entry will be one structre type and second will be different strcture type.
Is there any generic type of structure to include for itab.
thanks
Time
2008 Jul 16 9:15 AM
Hi,
I think there is no general structure which accepts data of any types. I have the doubt why you need one internal table for storing data of different structure. You can declare multiple internal tables and store corresponding structure to that itab.
If you are looking for some internal table type whose structure can be dynamic then you can go for Field symbols table which is of form
field-symbols <itab> type standard table.
this can hold data of any structure.
but not rows of different structure ( which i think have no reason to be so )
Cheers
Kothand
2008 Jul 16 4:06 AM
Hi,
data: begin of w_tab,
matnr type matnr, "Data element
belnr type bkpf-belnr, "Referring a field
fld type marc, "Refering the structure of MARC table
end of w_tab,
itab like standard table of w_tab.
Is this what you are asking?
2008 Jul 16 9:10 AM
Hi
I hope you can make use of FIELD-SYMBOLS inside a internal table
Regards
pavan