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: 

problem with Style, Style2, Style3 in style table LVC_S_STYL.

Former Member
0 Kudos

Hi Gems,

I have an ALV output with field MATNR as disabled, HOTSPOT enabled and NO F4.

Now based on certain conditions i need to make the field as editable, F4 enable, Remove Hotspot only for some records.

I am using LVC_S_STYL wherein i am filling the fields style, style2, style3, style4 as below.

wa_editcell-style = cl_gui_alv_grid=>mc_style_enabled.

wa_editcell-style2 = cl_gui_alv_grid=>MC_STYLE_HOTSPOT_NO.

wa_editcell-style3 = cl_gui_alv_grid=>MC_STYLE_F4.

Whatever value i pass to STYLE is working But whatever values in others style2, style3 are not showing any effect.

Please suggest me what should i do?

Thanks

Dan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

STYLE2 is used to control cell borders. See Include <CL_ALV_CONTROL> for the applicable constants. It also gives a hint to the purpose of STYLE3 and STYLE4 fields.

5 REPLIES 5

Former Member
0 Kudos

Solved myself.

STYLE_ENABLED + STYLE_F4.

0 Kudos

Dear Dan,

I have some issues with lvc_s_styl.

In my ALV, i am having check box as a column and i am using 'style' for handling some other fields based on checkbox.

I have a situation where i am having buttons as a column. I have to handle some other fields when this button is clicked.

But the problem is since for the first time i tried to use 'style' for both operations (both button and checkbox), they were getting overwritten. so once i click the checkbox, the buttons were disappearing. As a matter of fact, i tried to handle checkbox with 'style' and button with 'style2'. But the buttons are not getting displayed even for the first time. Any suggestions.

Regards,

Sandeep Sivan

0 Kudos

!?

What solution you found?

You put different stylevalues to the same lvc_s_style row?

or you use the style and style2?

Can you post an example?

I understand that.

Example:

ls_celltab-fieldname = pv_fieldname.
  ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled
                     + cl_gui_alv_grid=>mc_style_hotspot_no.
  INSERT ls_celltab INTO TABLE lt_celltab.

Thank you so much, Dan.

I solved my problem.

Former Member
0 Kudos

STYLE2 is used to control cell borders. See Include <CL_ALV_CONTROL> for the applicable constants. It also gives a hint to the purpose of STYLE3 and STYLE4 fields.