05-08-2006 1:50 PM
Hi all,
in my programm i must check in differents tables some values. Tables are parameters of my program.
So i thought that i could use field-symbols for access to the table but it's not work for me.
Just a example, i've 2 tables to check : HRP1002 and HRP1003.
I can't do that :
FIELD-SYMBOLS <fs> STANDARD TABLE.
ASSIGN 'HRP1002' TO <fs>.
ASSIGN line is in error because no compatible type.
How can i do this ?
Regards
05-08-2006 1:56 PM
Try this code...
tables: rsrd1.
DATA: LineType TYPE string,
ItabRef TYPE REF TO DATA,
lineRef TYPE REF TO DATA.
FIELD-SYMBOLS: <fs> TYPE STANDARD TABLE,
<fs1> type any.
parameter tbl like RSRD1-TBMA_VAL.
linetype = tbl.
CREATE DATA ItabRef TYPE STANDARD TABLE OF (LineType).
ASSIGN ItabRef->* to <fs> .
create data lineref like line of <fs>.
assign lineref->* to <fs1>.
SELECT * FROM (tbl) INTO <fs1>.
write <fs1>.
endselect.
SELECT * FROM (tbl) INTO table <fs>.
05-08-2006 1:56 PM
Try this code...
tables: rsrd1.
DATA: LineType TYPE string,
ItabRef TYPE REF TO DATA,
lineRef TYPE REF TO DATA.
FIELD-SYMBOLS: <fs> TYPE STANDARD TABLE,
<fs1> type any.
parameter tbl like RSRD1-TBMA_VAL.
linetype = tbl.
CREATE DATA ItabRef TYPE STANDARD TABLE OF (LineType).
ASSIGN ItabRef->* to <fs> .
create data lineref like line of <fs>.
assign lineref->* to <fs1>.
SELECT * FROM (tbl) INTO <fs1>.
write <fs1>.
endselect.
SELECT * FROM (tbl) INTO table <fs>.
05-08-2006 1:59 PM
Try this..
FIELD-SYMBOLS <fs> .
ASSIGN 'HRP1002' TO <fs>.
This assigns the value HRP1002 to <fs>..
But if you want to assign the internal table values to <fs>, create an internal table and then assign it to <fs>
05-08-2006 2:01 PM
hi tafkap,
if u need any materail related to filed symbols let me know
Regards,
Naveen
05-08-2006 2:14 PM