‎2006 Jun 29 1:43 PM
what is wrong of the declare of assign
tables : mard.
DATA: BEGIN OF imard OCCURS 0,
matnr LIKE mard-matnr,
lfgja LIKE mard-lfgja,
lfmon LIKE mard-lfmon,
labst LIKE mard-labst,
mdrue LIKE mard-mdrue,
s_stock like mard-labst,
e_stock like mard-labst,
END OF imard.
FIELD-SYMBOLS: <ls_mard> TYPE any.
SELECT matnr
lfgja
lfmon
labst
mdrue
FROM mard
INTO TABLE imard.
loop at imard ASSIGNING <ls_mard>.
if <ls_mard>-mdrue = space.
‎2006 Jun 29 1:50 PM
your field symbol is a field while you loop on a structure.
this will solve your problem:
FIELD-SYMBOLS: <ls_mard> like line of imard.
Itay
‎2006 Jun 29 1:50 PM
your field symbol is a field while you loop on a structure.
this will solve your problem:
FIELD-SYMBOLS: <ls_mard> like line of imard.
Itay
‎2006 Jun 29 1:51 PM
Hi
Your field symbol should be type line of imard
FIELD-SYMBOLS: <ls_mard> LIKE LINE of imard.
‎2006 Jun 29 1:53 PM
hi,
Check This form SAP Help.
I think This will Help U.
When you use LOOP AT itab, the header line of the internal table itab is used as the output area (this is only possible for tables with a header line). When you use LOOP AT itab INTO wa, the explicitly specified work area wa is used as the output area. In both cases, the current table line is copied into the output area.
To avoid the costs for the copy process, you can use the additions ASSIGNING <fs> and REFERENCE INTO dref. In both cases, the system directly processes the contents of the internal table. If you use the ASSIGNING addition, the field symbol <fs> points to the respective current line. If you use REFERENCE INTO dref, the reference of the current line is put into dref. Within the loop, neither the field symbol <fs> nor the reference dref must be processed.
If the table is empty, or if the additions prevent the system from choosing an entry, the output area (field symbol or the reference variable) remains unchanged. At the end of the loop, the output area displays (or the field symbol or the reference points to) the last entry selected.
‎2006 Jun 29 1:54 PM
As you have declared the field symbols as type any it cannot identify the column you have specified.
You should do this.
FIELD-SYMBOLS: <ls_mard> like line of table imard.
Regards,
Ravi