Skip to Content
-2

Special button type

Apr 11 at 01:40 PM

61

avatar image

Hi everybody!

I would like to learn how can I create a selection screen with these kind of buttons, as far as I know, they are not created as usual PARAMETERS or SELECT-OPTIONS...

I really appreciate any help!

Thanks :)

nq3p2.png (1.2 kB)
10 |10000 characters needed characters left characters exceeded
0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Amy King Apr 11 at 06:21 PM
2

Hi Violeta,

You can create a pushbutton on a selection screen with the syntax

SELECTION-SCREEN PUSHBUTTON position(length) button_text
                 USER-COMMAND command
                 MODIF ID mid.

In the INITIALIZATION event, you can set an icon to the pushbutton

CALL FUNCTION 'ICON_CREATE'
  EXPORTING
    name = icon_okay
  IMPORTING
    result = button_text
  EXCEPTIONS
    OTHERS = 0.

And handle its USER-COMMAND in the AT SELECTION-SCREEN event. Here is the documentation.

Cheers,
Amy

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you very much for your answer, that was helpful.

1
avatar image
Former Member Apr 12 at 10:16 AM
1

Hello,

I guess the screenshot you have mentioned is from SPRO. If so that is not a selection screen. That is a list output obtained from STREE concept. If you are looking to display these icons in list output, the below code can be used.

INCLUDE <icon>.
WRITE: / icon_display AS ICON HOTSPOT, icon_execute_object AS ICON HOTSPOT.
AT LINE-SELECTION.
  DATA: cursor(20) TYPE c.
  GET CURSOR FIELD cursor.
  CASE cursor.
    WHEN 'ICON_DISPLAY'.
      WRITE: 'display'.
    WHEN 'ICON_EXECUTE_OBJECT'.
      WRITE: 'execute'.
  ENDCASE.

If you were requirement was in selection screen then please ignore my comment.

Regards,

Aswath.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi, it is the idea I was looking for. I'm trying to mimic the SPRO menu but from a report, let's say.

Thank you very much for your answer.

1
Rob Dielemans Apr 12 at 11:08 AM
1

Hi,

You can find many examples with ABAP code in transaction DWDM There look for tree controls.

Kind regards, Rob Dielemans

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you very much, This will be so helpful in many occasions.

:)

0