05-09-2006 2:20 PM
I've the following code (thx Dani )
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.
tbl is a table and fs1 his structure. Imagine that tbl had the value 'HRP1002' i know there is a field BEGDA and i want to display it but i can't write this : write <fs1>-BEGDA.
How can i do please.
Regards
05-09-2006 2:22 PM
Try this.
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,
<b><fs2>.</b>
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>.
<b>assign component 'BEGDA' of structure <fs1> to <fs2>.
write <fs2>.</b>
endselect.
Regards,
RIch Heilman
05-09-2006 2:22 PM
Try this.
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,
<b><fs2>.</b>
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>.
<b>assign component 'BEGDA' of structure <fs1> to <fs2>.
write <fs2>.</b>
endselect.
Regards,
RIch Heilman
05-09-2006 2:25 PM
Hello,
If you check your the field you need.
I´ve didnt test it but it could work.
Greettings
Gabriel P.
05-09-2006 4:42 PM