Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Field symbol value

Former Member
0 Likes
671

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

4 REPLIES 4
Read only

nirajgadre
Active Contributor
0 Likes
607

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

Read only

0 Likes
607

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 .

Read only

0 Likes
607

Hi,

try to declare the work area with type /sdf/sel_tabtype.

Read only

Former Member
0 Likes
607

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.