2014 Nov 21 5:29 AM
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.
2014 Nov 21 5:45 AM
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
2014 Nov 21 5:44 AM
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.
2014 Nov 21 5:45 AM
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
2014 Nov 21 6:06 AM
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
2014 Nov 23 11:02 PM
Hi Gita,
Unfortunately I think this could be the only way.
Thanks,
Naveen
2014 Nov 24 7:12 AM
May I just comment that this requirement is not good, since standard SAP reports do not have this text.
2014 Nov 21 5:47 AM
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