0
votes

I have the following:

Types: begin of ty_main,
         bukrs like bseg-bukrs,
         fstyl type lvc_t_styl,
       end of ty_main.
DATA: it_main TYPE TABLE OF ty_main,
      wa_main LIKE LINE OF it_main.
Loop it_main into wa_main where fstyl-style = 
                                   cl_gui_alv_grid=>mc_style_disabled.
endloop.

Can someone tell me how to access fstyl-style? Thanks

1
lvc_t_styl is a table type right? then you need a structure, reading table into structure, then access via structure to your field.dotchuZ
are you looking for wa_main-fstyl-style ?Sandra Rossi
Yes, I want to use it for selecting the records in loop.ekekakos
What are you trying to achieve? It's not clear.Suncatcher

1 Answers

1
votes

Maybe you can convert your code as follows

types: begin of ty_main,
         bukrs like bseg-bukrs,
         fstyl type lvc_t_styl,
       end of ty_main.
data: it_main type table of ty_main,
      wa_main like line of it_main.

APPEND INITIAL LINE TO it_main REFERENCE INTO data(lr_main).
lr_main->bukrs = 'ESES'.
data lv_lvc_t_styl TYPE lvc_t_styl.

data lv_lvc_t_styl_line LIKE LINE OF lv_lvc_t_styl.
lv_lvc_t_styl_line-style = cl_gui_alv_grid=>mc_style_disabled.

append lv_lvc_t_styl_line to lv_lvc_t_styl.
lr_main->fstyl = lv_lvc_t_styl.

loop at it_main into wa_main WHERE fstyl IS NOT INITIAL.
  LOOP AT wa_main-fstyl REFERENCE INTO data(lr_line) WHERE style = cl_gui_alv_grid=>mc_style_disabled.
break yilmaz-e.
  ENDLOOP.
endloop.