Application Development and Automation 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: 
Read only

ikon selection

Former Member
0 Likes
640

Hi all.......

I had displayed 5 ikons ( as Hot-Spot ) in a report out-put.

by clicking on each ikon different code should be executed ( written in perform statements ) should be called....

pseudo code will be like this......

WHEN 'icon_list'.

perform addition.

WHEN 'ICON_OKAY'.

PERFORM substraction.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
579

Hi,

Do it this way..

INCLUDE <icon>.
WRITE /: icon_green_light AS ICON HOTSPOT,
         icon_red_light AS ICON HOTSPOT.

AT LINE-SELECTION.
  CASE sy-lisel.
    WHEN '08'.
      WRITE:/ 'abcd'.
    WHEN '0A'.
      WRITE:/ 'xyz'.
  ENDCASE.

or

write /: 'Addition' as hotspot,
           'Subtraction' as hotspot.

at line-selection.
 case sy-lisel.
  when 'Addition'.
       perform addition.
  when 'Subtraction'.
       perform 'Subtraction'.
 endcase.

you can get the value of the icon when you debug it.

Example: " icon_green_light = 08 , icon_red_light = 0A

Thanks&Regards

Sarves

3 REPLIES 3
Read only

Former Member
0 Likes
580

Hi,

Do it this way..

INCLUDE <icon>.
WRITE /: icon_green_light AS ICON HOTSPOT,
         icon_red_light AS ICON HOTSPOT.

AT LINE-SELECTION.
  CASE sy-lisel.
    WHEN '08'.
      WRITE:/ 'abcd'.
    WHEN '0A'.
      WRITE:/ 'xyz'.
  ENDCASE.

or

write /: 'Addition' as hotspot,
           'Subtraction' as hotspot.

at line-selection.
 case sy-lisel.
  when 'Addition'.
       perform addition.
  when 'Subtraction'.
       perform 'Subtraction'.
 endcase.

you can get the value of the icon when you debug it.

Example: " icon_green_light = 08 , icon_red_light = 0A

Thanks&Regards

Sarves

Read only

Former Member
0 Likes
579

Hi Kiran,

If u have displayed the icons using pf-status then please refer the below sample,

set pf-status 'GUI_CODE'
     CASE SY-UCOMM.
    WHEN 'ICON_LIST'.
    perform addition.

   WHEN 'ICON_OKAY'.
   PERFORM substraction.
ENDCASE.

Thanks

Karthik.

Read only

Former Member
0 Likes
579

Hi ,

using SET PF-STATUS 'TEST1' create a status and define the fcodes .

data: ok_code TYPE sy-ucomm.

then in program use

CASE ok_code.

WHEN 'ADD

PERFORM ADDITION

WHEN 'SUB

PERFORM SUBSTRACTION.

ENDCASE.

regards

gowri