‎2006 Jun 21 1:38 PM
Hi all,
can u plz explain How can i define an internal table using types?
Thanks & regards
Venkat
‎2006 Jun 21 1:40 PM
TYPES: BEGIN OF type_salida,
hkont LIKE bseg-hkont,
secue TYPE num1,
altkt LIKE skb1-altkt,
txt50 LIKE skat-txt50,
budat LIKE bkpf-budat,
blart LIKE bkpf-blart,
xblnr LIKE bkpf-xblnr,
belnr LIKE bkpf-belnr,
buzei LIKE bseg-buzei,
bktxt LIKE bkpf-bktxt,
debe LIKE bseg-dmbtr,
haber LIKE bseg-dmbtr,
saldo LIKE bseg-dmbtr,
debed LIKE bseg-wrbtr,
haberd LIKE bseg-wrbtr,
saldod LIKE bseg-wrbtr,
wrbtr LIKE bseg-wrbtr,
dmbtr LIKE bseg-dmbtr,
shkzg LIKE bseg-shkzg,
bukrs LIKE bkpf-bukrs,
END OF type_salida.
DATA: t_salida TYPE STANDARD TABLE OF type_salida WITH HEADER LINE.
‎2006 Jun 21 1:41 PM
Hi Venkat,
The TYPES statement introduces user-defined data types . As with standard data types, you can use them when creating data objects and when assigning types to formal parameters and field symbols. User-defined data types are an essential component of the ABAP/4 type concept .
TYPES:
BEGIN OF TY_MARA,
MATNR TYPE MARA-MATNR,
MTART TYPE MARA-MTART,
MBRSH TYPE MARA-MBRSH,
MATKL TYPE MARA-MATKL,
END OF TY_MARA.
DATA ITAB TYPE STANDARD TABLE OF TY_MARA WITH HEADER LINE.
To know more about TYPES, Just see the URL.
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/types.htm
<b>Note: Plz award points to all helpful answers.
Close the thread if they are solved.</b>
Thanks,
Vinay
‎2006 Jun 21 1:42 PM
Hi Venkat,
have a look at the following link
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/frameset.htm
i hope it helps.
Regards,
Kinshuk
‎2006 Jun 21 1:42 PM
if you have a type ty_mytype,
then
data itab type standard table of ty_mytype occurs 0.
Regards,
Ravi
‎2006 Jun 21 1:45 PM
Hai Venkat
see the following Code
************************************************************************
Table Declaration *
************************************************************************
TABLES: mara,
marc,
mard.
************************************************************************
Types Declaration *
************************************************************************
TYPES: BEGIN OF typ_mara,
matnr TYPE mara-matnr, "Material Number"
mbrsh TYPE mara-mbrsh, "Industrial Sector"
mtart TYPE mara-mtart, "Material Type"
meins TYPE mara-meins, "Base Unit of Measure"
END OF typ_mara.
TYPES: BEGIN OF typ_makt,
matnr TYPE makt-matnr, "Material Number"
maktx TYPE makt-maktx, "Material Description"
END OF typ_makt.
TYPES: BEGIN OF typ_marc,
matnr TYPE marc-matnr, "Material Number"
werks TYPE marc-werks, "Plant Number"
END OF typ_marc.
TYPES: BEGIN OF typ_mard,
matnr TYPE marc-matnr, "Material Number"
werks TYPE marc-werks, "Plant Number"
lgort TYPE mard-lgort, "Storage Location"
END OF typ_mard.
************************************************************************
Intrnal tables Declaration *
************************************************************************
DATA: it_mara TYPE STANDARD TABLE OF typ_mara WITH HEADER LINE.
DATA: it_makt TYPE STANDARD TABLE OF typ_makt WITH HEADER LINE.
DATA: it_marc TYPE STANDARD TABLE OF typ_marc WITH HEADER LINE.
DATA: it_mard TYPE STANDARD TABLE OF typ_mard WITH HEADER LINE.
Thanks & regards
Sreenivasulu P