‎2008 Mar 06 9:58 AM
Hi
I wnt to declare a table inside a structure. I have the following declaration with me:
data: begin of gt_matnrtab occurs 0.
include structure qmatnr.
data: celltab type lvc_t_styl.
data: tser like gt_sernrtab occurs 0.
data: zbgmp like zbgmp occurs 0.
data: tu_line(02).
data: end of gt_matnrtab.
The above declaration is working fine, but in ECC 6.0, I dont want to use the obsolete statement "OCCURS"..
so, i want to declare it as TYPES..and without using OCCURS.
Can anyone help me out in how to declare the internal tables TSER and ZBGMP in the structure declared by using TYPES statement?
Helpful Answers Wll be definitel rewarded.
Tahnks in advance
Shakir
‎2008 Mar 06 10:02 AM
Hi,
u can use TYPE TABLE OF statement.
data it_mara type table of MARA with header line.CHeers,
jose.
‎2008 Mar 06 10:21 AM
Hi,
try following the below code.
try to declare the itab 'gt_sernrtab' here.then proceed with the following..
types : begin of gs_matnrtab.
include structure qmatnr.
types :celltab type lvc_t_styl.
types :tser like gt_sernrtab.
types :zbgmp like zbgmp .
types :tu_line(02).
types :end of gt_matnrtab.
DATA : gt_matnrtab type table of gs_matnrtab WITH HEADER LINE.
Hope this will help u resolve ur issue..
Please reward points if useful
Regards
Rose
‎2008 Mar 06 10:28 AM
Try like this :
data: begin of gt_matnrtab occurs 0.
include structure qmatnr.
data: celltab type lvc_t_styl.
data: tser like table of gt_sernrtab .
data: zbgmp like table of zbgmp .
data: tu_line(02).
data: end of gt_matnrtab.
Regards,
Himanshu
Edited by: Himanshu Verma on Mar 6, 2008 3:58 PM
‎2008 Mar 06 10:37 AM
In ECC6 u should not use with header line, occurs..
use this way
types : begin of gs_matnrtab.
include structure qmatnr.
types :celltab type lvc_t_styl.
types :tser like gt_sernrtab.
types :zbgmp like zbgmp .
types :tu_line(02).
types :end of gt_matnrtab.
data: it_matnrtab type table of gs_matnrtab. " this is internal table with out header line.
so we need work area explicitily.
data: wa_matnrtab type gs_matnrtab. " this is work area.
regards.
santhosh reddy