Application Development 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: 

When i click the button i wanna change this field's no-out property

Former Member
0 Kudos

DATA :   gt_fcat    TYPE lvc_t_fcat         WITH HEADER LINE       ,

             gs_fcat    TYPE lvc_s_fcat                .

            

*****

              clear gs_fcat.

              gs_fcat-col_pos   = 16.

             gs_fcat-fieldname = BETRG.

             gs_fcat-tabname   = GT_ITAB .

             gs_fcat-reptext  = 'Pays'.

             gs_fcat-NO_OUT    = 'X '.

     APPEND gs_fcat TO gt_fcat.

******

WHEN '&BT1'.

LOOP AT GT_FCAT.

IF  gt_fcat-fieldname = 'BETRG'.

   refresh gt_fcat[].

      CLEAR gs_fcat.

      gs_fcat-NO_OUT    = ' '.

      APPEND gs_fcat TO gt_fcat.

      MODIFY GT_FCAT[].

ENDIF.

ENDLOOP.

Problem is when i click button betrg field doesn't seem still.

1 ACCEPTED SOLUTION

former_member197622
Participant
0 Kudos

i never was able to do this with reuse alv

but you can try this solution

you need to use ALV OO

with the set_frontend_fieldcatalog method set the new field catalog

CALL METHOD go_alv->set_frontend_fieldcatalog

     exporting

          it_fieldcatalog = t_filedcat[].


and then refresh the alv.


Good luck


Regards

MC


1 REPLY 1

former_member197622
Participant
0 Kudos

i never was able to do this with reuse alv

but you can try this solution

you need to use ALV OO

with the set_frontend_fieldcatalog method set the new field catalog

CALL METHOD go_alv->set_frontend_fieldcatalog

     exporting

          it_fieldcatalog = t_filedcat[].


and then refresh the alv.


Good luck


Regards

MC