Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8776

Re: Change fieldcat values to editable after selecting a value in dropdown

$
0
0

Hi,

 

To change edit mode for specific cells only you will have to use style.

 

An example report available SAP is BCALV_EDIT_02

 

 

What you need to do :

  • Create one more field in alv internal table of type LVC_T_STYL ( say with name STYLEwhich is an internal table itself  as LVCC_T_STYL is a table type )
  • Now in a work area of type LVC_S_STYL give parameters like this :
  • WA-FIELDNAME = 'fieldname'
  • WA-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED. ( DISABLED for non editable mode )
  • Append the work area to the STYLE field of the record in which you want the field with name 'fieldname' disabled.
  • Enable the edit mode for alv using methid SET_READY_FOR_INPUT exporting I_ready_for_input = 1.
  • Refresh the alv grid display using method REFRESH_TABLE_DISPLAY.
  • The field names which you provided in style table will be disabled or enabled based on the value given in style field of it for the row or record where you appended the work area.

 

Regards,

Ashish


Viewing all articles
Browse latest Browse all 8776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>