Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem FIELD-SYMBOL

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

Tags:
Former Member
replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question