Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 09, 2006 at 01: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09, 2006 at 01:25 PM

    Hello,

    If you check your the field you need.

    Iยดve didnt test it but it could work.

    Greettings

    Gabriel P.

    Add comment
    10|10000 characters needed characters exceeded