‎2008 Apr 22 6:29 AM
SELECT matnr meins FROM mara INTO CORRESPONDING FIELDS OF TABLE gt_mara.
is this statement correct where gt_mara has two fields matnr and meins
DATA:BEGIN OF wa_trans.
INCLUDE STRUCTURE gt_trans.
DATA: END OF wa_trans.
wat does thios do
‎2008 Apr 22 6:33 AM
Hi,
Do like this
Types: Begin of ty_mara,
matnr type mara-matnr,
meins type mara-meins,
end of ty_mara.
Data: gt_mara type table of ty_mara, " This is Internal table gt_mara declaration.
wa_mara type ty_mara. "This is Work Area declaration
SELECT matnr meins FROM mara INTO TABLE gt_mara.
Regards,
Satish
‎2008 Apr 22 6:36 AM
HI
1)
IF GT_MARA has these two fields only no need to write corresponding fields of table as a optimization point of view
else the statement is correct
SELECT matnr meins FROM mara INTO TABLE gt_mara.
2)
DATA:BEGIN OF wa_trans.
INCLUDE STRUCTURE gt_trans.
DATA: END OF wa_trans.
This statement defines a line type having a same structure as
GT_trans..
as u have named it WA_trans
it is working as a work area only it is also right....
HTH
pls reward points
regards
rajan
‎2008 Apr 22 6:37 AM
Hi,
Try to do like this
Data : Begin of imara occurs 0, "internal table declartions
matnr like mara-matnr,
meins like mara-meins,
end of imara.
Data: gt_mara type table of imara, "Internal table gt_mara declaration.
wa_mara type imara. "Work Area declaration
SELECT matnr meins FROM mara INTO TABLE gt_mara.
Reward me Points,
By
Pari
‎2008 Apr 22 6:41 AM
hi,
if the order of fields in gt_mara is meins and matnr its necessary to use corresponding edition. otherwise its not
you can use
SELECT matnr meins FROM mara into TABLE gt_mara.
and the next one defines a work area of structure gt_trans.
reward if helpful
prasanth