‎2007 Jun 08 6:25 AM
Hi friends,
First i would like to thank u all for ur wonderful contributions...
can i know wat is deep Internal table and provide me some eg for retriving data from deep IT ?
thanks in advance....
Regards..
balaji
‎2007 Jun 08 6:30 AM
Hi,
Check this example..
TYPES: BEGIN OF TYPE_DEEP,
MATNR TYPE MATNR,
T_MARC TYPE MARC OCCURS 0,
END OF TYPE_DEEP.
DATA: T_DEEP TYPE STANDARD TABLE OF TYPE_DEEP.
DATA: WA_DEEP TYPE TYPE_DEEP.
DATA: T_MARC TYPE TABLE OF MARC.
DATA: S_MARC TYPE MARC.
* Populating data.
WA_DEEP-MATNR = 'TEST'.
S_MARC-MATNR = 'TEST'.
S_MARC-WERKS = '9090'.
APPEND S_MARC TO T_MARC.
* Append second level internal table.
WA_DEEP-T_MARC[] = T_MARC[].
* Append.
APPEND WA_DEEP TO T_DEEP.
* Process the internal table.
LOOP AT T_DEEP INTO WA_DEEP.
WRITE: / WA_DEEP-MATNR.
* PROCESS the second level internal table.
LOOP AT WA_DEEP-T_MARC INTO S_MARC.
WRITE: S_MARC-WERKS.
ENDLOOP.
ENDLOOP.
Thanks,
Naren
‎2007 Jun 08 6:28 AM
‎2007 Jun 08 6:30 AM
Hi,
Check this example..
TYPES: BEGIN OF TYPE_DEEP,
MATNR TYPE MATNR,
T_MARC TYPE MARC OCCURS 0,
END OF TYPE_DEEP.
DATA: T_DEEP TYPE STANDARD TABLE OF TYPE_DEEP.
DATA: WA_DEEP TYPE TYPE_DEEP.
DATA: T_MARC TYPE TABLE OF MARC.
DATA: S_MARC TYPE MARC.
* Populating data.
WA_DEEP-MATNR = 'TEST'.
S_MARC-MATNR = 'TEST'.
S_MARC-WERKS = '9090'.
APPEND S_MARC TO T_MARC.
* Append second level internal table.
WA_DEEP-T_MARC[] = T_MARC[].
* Append.
APPEND WA_DEEP TO T_DEEP.
* Process the internal table.
LOOP AT T_DEEP INTO WA_DEEP.
WRITE: / WA_DEEP-MATNR.
* PROCESS the second level internal table.
LOOP AT WA_DEEP-T_MARC INTO S_MARC.
WRITE: S_MARC-WERKS.
ENDLOOP.
ENDLOOP.
Thanks,
Naren
‎2007 Jun 08 6:30 AM
HI,
structures containing internal tables as components or
Internal table containing Structure as components are called Deep Internal table.
Regards
Sudheer
‎2024 Aug 21 12:12 PM
‎2007 Jun 08 6:30 AM
Hi
There is no concept like Deep Internal table
May be you are talking of internal table with Nested Loops inside an Internal table.
We should avoid such nested loops as they consume lot of time
LOOP at itab.
.......................
loop at itab1.
...........................
loop at itab2.
............................
endloop.
endloop.
endloop.
Reward points for useful Answers
Regards
Anji
‎2007 Jun 08 6:32 AM
Hi Balaji ,
Deep internal tables are basically internal tables where the each record of the internal table has a feild which is it self an internal table.
An example will be the internal tables which we use when we want to assign color to columns of an ALV based on some criteria , here in the internal table we have a feild of type LVC_T_SCOL , which itself is an internal table.
For more info please see the link
http://help.sap.com/saphelp_nw04/helpdata/en/7f/e477e5fba211d2b48f006094192fe3/frameset.htm
Hope this helps.
Regards
Arun
Assign points if reply is helpful
‎2007 Jun 08 6:33 AM
hi balaji,
deep internal tables means a internal table without header line is nested in another internal table. this process is called nesting of internal tables n tables are caleed deep internal table.
ex:
loop at itab into wa1. [ where itab1 and itab2 are tables with out header lines n wa1 n wa2 are explicit work areas ]
read table itab2 into wa2.
write:/20 wa2-'fldname'
..........
............
endloop.
if helpful reward some points.
with regards,
suresh.