Skip to Content
-2

Special button type

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 11 at 06:21 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

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

    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.

    Add comment
    10|10000 characters needed 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.

  • Apr 12 at 11:08 AM

    Hi,

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

    Kind regards, Rob Dielemans

    Add comment
    10|10000 characters needed characters exceeded