2010 Apr 02 6:52 AM
Hi experts ,
in FS <fs_date> i am having the date value in the type of select option structure sign , option ,low , high .
i want to move to the <fs_date>-sign to other range table . how to perform this , below is the sample code i tried .
DATA: rt_date TYPE REF TO data,
DATA:rt_dat TYPE /sdf/sel_tabtype,
FIELD-SYMBOLS: <fs_date> TYPE TABLE ,
ASSIGN rt_date->* TO <fs_date>.
error is comming if i perform like this .
LOOP AT <fs_date> .
rt_dat-sign = <fs_date>-sign.
rt_dat-option = <fs_date>-option.
rt_dat-low = <fs_date>-low.
rt_dat-high = <fs_date>-high.
ENDLOOP.
thanks
chinnaiya P
Hi experts ,
in FS <fs_date> i am having the date value in the type of select option structure sign , option ,low , high .
i want to move to the <fs_date>-sign to other range table . how to perform this , below is the sample code i tried .
DATA: rt_date TYPE REF TO data,
DATA:rt_dat TYPE /sdf/sel_tabtype,
FIELD-SYMBOLS: <fs_date> TYPE TABLE ,
ASSIGN rt_date->* TO <fs_date>.
error is comming if i perform like this .
LOOP AT <fs_date> .
rt_dat-sign = <fs_date>-sign.
rt_dat-option = <fs_date>-option.
rt_dat-low = <fs_date>-low.
rt_dat-high = <fs_date>-high.
ENDLOOP.
thanks
chinnaiya P
2010 Apr 02 7:02 AM
Hi,
Try to loop on the field-symbol table and pass this value to work area.
and append work area to another range table.
Loop AT <FS_DATE> into lw_temp.
rt_dat-sign = lw_temp-sign.
rt_dat-option = lw_temp-option.
rt_dat-low = lw_temp-low.
rt_dat-high = lw_temp.-high.
append rt_date.
endloop
2010 Apr 02 7:04 AM
HI NIRAJ , THANKS FOR YOUR QUICK REPLY ,
I DECLARED <FS_DATE> AS FIELD-SYMBOLS: <fs_date> TYPE TABLE ,
HOW DECLARE A WA FOR THIS fIELD SYMBOL .
2010 Apr 02 7:08 AM
2010 Apr 02 7:48 PM
For what you are trying to do, you don't need field symbols or dynamic data creation. But, if you insist on that path, you are missing a CREATE DATA statement. Try the following code:
DATA: rt_date TYPE REF TO data.
DATA: rt_dat TYPE /sdf/sel_tabtype.
FIELD-SYMBOLS: <fs_date> TYPE TABLE,
<fs_row> type any.
CREATE DATA rt_date type /sdf/sel_tabtype.
ASSIGN rt_date->* TO <fs_date>.
loop at <fs_date> ASSIGNING <fs_row>.
append <fs_row> to rt_dat.
ENDLOOP.