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: 

Display text next to the Execute icon in o/p

former_member699182
Participant
0 Kudos

Is it possible to add a text next to the Execute button in the report output? Like in the below screen (which is an o/p screen of my report pgm), i want to display the text EXECUTE after the icon. Possible?

Thanks.

1 ACCEPTED SOLUTION

former_member196601
Active Participant
0 Kudos

Hi Gita,

Try code like below:

TYPE-POOLS icon.

TABLES sscrfields.

DATA functxt TYPE smp_dyntxt.

DATA: gt_exclude TYPE TABLE OF rsexfcode,

            gtt_exclude TYPE rsexfcode..

PARAMETERS: p_matnr TYPE mara-matnr.

SELECTION-SCREEN: FUNCTION KEY 1.

INITIALIZATION.

   functxt-icon_id   = ICON_EXECUTE_OBJECT.

   functxt-quickinfo = 'Execute'.

   functxt-icon_text = 'Execute'.

   sscrfields-functxt_01 = functxt.

   gtt_exclude-fcode = 'ONLI'.

   APPEND gtt_exclude TO gt_exclude.

AT SELECTION-SCREEN.

   CASE sscrfields-ucomm.

     WHEN 'FC01'.

       "do your stuff like execute your report using submit"

   ENDCASE.

   AT SELECTION-SCREEN OUTPUT.

   CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

     EXPORTING

       p_status  = '%_00'

       p_program = 'RSSYSTDB'

     TABLES

       p_exclude = gt_exclude.



Thanks,Naveen

6 REPLIES 6

Former Member
0 Kudos

Hi,

You can get it the function using:

TABLES sscrfields.

"--The select-screen must be exit.
PARAMETERS:p_werks LIKE t001w-werks OBLIGATORY.

SELECTION-SCREEN: FUNCTION KEY 1.

INITIALIZATION.
  sscrfields-functxt_01 = 'BUTTON'.

AT SELECTION-SCREEN .
  CASE sscrfields-ucomm.
    WHEN 'FC01'.
      ...
  ENDCASE.

Regards.

former_member196601
Active Participant
0 Kudos

Hi Gita,

Try code like below:

TYPE-POOLS icon.

TABLES sscrfields.

DATA functxt TYPE smp_dyntxt.

DATA: gt_exclude TYPE TABLE OF rsexfcode,

            gtt_exclude TYPE rsexfcode..

PARAMETERS: p_matnr TYPE mara-matnr.

SELECTION-SCREEN: FUNCTION KEY 1.

INITIALIZATION.

   functxt-icon_id   = ICON_EXECUTE_OBJECT.

   functxt-quickinfo = 'Execute'.

   functxt-icon_text = 'Execute'.

   sscrfields-functxt_01 = functxt.

   gtt_exclude-fcode = 'ONLI'.

   APPEND gtt_exclude TO gt_exclude.

AT SELECTION-SCREEN.

   CASE sscrfields-ucomm.

     WHEN 'FC01'.

       "do your stuff like execute your report using submit"

   ENDCASE.

   AT SELECTION-SCREEN OUTPUT.

   CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

     EXPORTING

       p_status  = '%_00'

       p_program = 'RSSYSTDB'

     TABLES

       p_exclude = gt_exclude.



Thanks,Naveen

0 Kudos

Thank you Naveen, That works perfectly. But I was sort of expecting a one or 2 liner. This seems to be the only way to do it isnt it?

BR,

Gita

0 Kudos

Hi Gita,

Unfortunately I think this could be the only way.

Thanks,

Naveen

0 Kudos

May I just comment that this requirement is not good, since standard SAP reports do not have this text.

chinna_babu2
Active Participant
0 Kudos

Hi,

Try below code.

REPORT Test.

TABLES SSCRFIELDS.               "Fields on selection screens

type-pools : icon.

SELECTION-SCREEN FUNCTION KEY 1. "button on the application toolbar

PARAMETERS P_DAT LIKE SY-DATUM.

INITIALIZATION.

"Populating button text

   MOVE 'Execute' TO SSCRFIELDS-FUNCTXT_01.

AT SELECTION-SCREEN.

   IF SSCRFIELDS-UCOMM = 'FC01'.

   ENDIF.

START-OF-SELECTION.

END-OF-SELECTION.


Regards,

Murthy