2008 Jul 12 10:34 AM
Hi Friends,
I am using REUSE_ALV_GRID_DISPLAY function module.
I need to control my fields through field catalog like if the particular
Field value >500 that will be disable else that field will be editable.
I am not using oops only the function module grid display.
Thanks in advance.
Rajendran
2008 Jul 12 10:44 AM
hi ,
loop at ur internal table,
check for that firld value > 500.
if it is there just set some flag and exit from loop.
Then in the field catalog, based upon this condition u can make the col editable and non editable.
Regards,
Nishant Gupta
2008 Jul 14 5:22 AM
Hi ,
Thanks for your reply could you kindly explain the logic of fieldcatalog......or please provide sample code..
2008 Jul 14 5:39 AM
let ur internal table has two fields : matnr and menge.
itab
MATNR MENGE.
122 200
123 300
124 500
suppose you want the menge col editable if at least one of the row is having more than 200(MENGE).
loop at itab.
if itab-menge ge 200.
flag = 'X'.
exit.
endif.
endloop.
in the fieldcatalog for MENGE.
fcat-fieldname = 'MENGE'.
if flag = 'X'.
fcat-edit = 'X'
Regards,
Nishant
2008 Jul 12 10:53 AM
Hi,
Its possible to make a particular column editable using the flag EDIT in slis_fieldcat_alv type for eg check this program - BCALV_TEST_FULLSCREEN
But in non OO concept.i dont have a idea to make particular cells editable based on conditions (whose values are >500 )
That is possible only in OO concept as far as i know by using the method mc_style_disabled in class cl_gui_alv_grid . For this check program - BCALV_EDIT_03 and BCALV_EDIT_04
Cheers
Kothand
2008 Jul 12 10:59 AM
we can not make particular cell editable using field catalog..
u can try it by layout structure.we edit whole column by using fieldcatalog
2008 Jul 12 11:18 AM
Hi
Go through the link given below :
http://help.sap.com/saphelp_nw04/helpdata/en/c8/19882043b111d1896f0000e8322d00/frameset.htm
With Regards
Nikunj shah
2008 Jul 17 5:31 AM