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: 

Showing pushbutton as marked and dismarked

Former Member
0 Kudos

Hello guys,

Im needing a simple requirement but unfortunately I do not find the solution for it.

I got a push button on my selection screen. And now I want by pushing it it should be displayed as marked and dismarked.

I dot not want to deactivate it oder make it as inactive. Just as marked and dismarked, like in this example.

marked

dismarked


How to do this?

Thanks

Regards

Michael

1 ACCEPTED SOLUTION

oliver_wurm
Active Participant
0 Kudos

Hi Michael,

This type of Button can only be created on a Tool Bar. Please check SAP Demo Program SAPTOOLBAR_DEMO1 and look for the code where a Button of Type CNTB_BTYPE_CHECK is added.

I just created a small demo ABAP where I created a Docking Container (side = docking->dock_at_top, extension = 20) under INITIALIZATION. I created a toolbar as a child and a button group containing one button of type CNTB_BTYPE_CHECK.

Here's how that looks like:

Un-Checked:

Checked

Hope that helps.

Regards

Oliver

7 REPLIES 7

Former Member
0 Kudos

0 Kudos

It is not about the traffic lights, I know the icons for that. It is about displaying a button as marked/pressed.

Regards

Michael

0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Michael,

If you are using class based ALV (cl_gui_alv_grid) you need to use the event 'toolbar' to set the value 'checked' to x for each function.

Regards,

Nick

0 Kudos

Hm no Im needing this in the selection screen of my report. Maybe this is not possible with push buttons there?

Regards
Michael

0 Kudos

Hi Michael,

While I can't say definitely I can't recall seeing this style of button anywhere other than an ALV.

Regards,

Nick

oliver_wurm
Active Participant
0 Kudos

Hi Michael,

This type of Button can only be created on a Tool Bar. Please check SAP Demo Program SAPTOOLBAR_DEMO1 and look for the code where a Button of Type CNTB_BTYPE_CHECK is added.

I just created a small demo ABAP where I created a Docking Container (side = docking->dock_at_top, extension = 20) under INITIALIZATION. I created a toolbar as a child and a button group containing one button of type CNTB_BTYPE_CHECK.

Here's how that looks like:

Un-Checked:

Checked

Hope that helps.

Regards

Oliver