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

Add a button near execute button

Former Member
5,625

Hello Experts,

I want to add a button near the execute button on the selection screen.Based on this button I would be displaying some radio buttons on the selection screen.

Kindly help me with some sample code as to how can i go about in adding a button near the execute button of the selection screen

Definately the points would be rewarded for helpful answers

11 REPLIES 11
Read only

Former Member
0 Likes
3,573

Hi,

Try this code:

&----


*& Report ABAPMASTER

*&

&----


*&

*&

&----


REPORT ABAPMASTER.

TABLES SSCRFIELDS. "Fields on selection screens

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

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

PARAMETERS P_DAT LIKE SY-DATUM.

INITIALIZATION.

  • Populating button text

MOVE 'Push Button 1' TO SSCRFIELDS-FUNCTXT_01.

MOVE 'Push Button 2' TO SSCRFIELDS-FUNCTXT_02.

AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOMM = 'FC01'.

PERFORM PUSH_BUTTON_CODE_1.

ELSEIF SSCRFIELDS-UCOMM = 'FC01'.

PERFORM PUSH_BUTTON_CODE_2.

ENDIF.

START-OF-SELECTION.

END-OF-SELECTION.

&----


*& Form Push_button_code_1

&----


  • text

----


FORM PUSH_BUTTON_CODE_1.

ENDFORM. "Push_button_code_1

&----


*& Form Push_button_code_2

&----


  • text

----


FORM PUSH_BUTTON_CODE_2.

ENDFORM. "Push_button_code_2

Regards,

Joy.

Read only

former_member787646
Contributor
0 Likes
3,573

Hi

The structure used to add buttons to the application tool bar on Selection Screen is "SSCRFIELDS".

See the below program in SE38 on how to add the buttons on application tool bar in a Selection Screen ..

Prgoram Name: GP6VZKL33C4FMI8GIKF0IWR7THB400

Hope this would help you.

Murthy

Read only

Former Member
0 Likes
3,573

Hello Experts,

Actually I want to add an icon just next to the execute button and write the code in it.

So please help how can add an icon button near to execute button of selection screen.

Also as stated earlier ..I want to write a code so that when the button is clicked then i can display some hidden radio buttons.

Point will be rewarded.

Read only

0 Likes
3,573

Hi,

Try this code:

REPORT zABAPMASTER.

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 '@01@' TO SSCRFIELDS-FUNCTXT_01.

" @01@= Value for icon can be found from

" type-pools : icon

AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOMM = 'FC01'.

PERFORM PUSH_BUTTON_CODE_1.

ENDIF.

START-OF-SELECTION.

END-OF-SELECTION.

&----


*& Form Push_button_code_1

&----


  • text

----


FORM PUSH_BUTTON_CODE_1.

ENDFORM. "Push_button_code_1

Read only

Former Member
0 Likes
3,573

Hi,

Please refer SAP standard demo program demo_sel_screen_function_key.

Thanks,

Sriram POnna.

Read only

FredericGirod
Active Contributor
0 Likes
3,573

luckky the solution is just behind

Read only

roberto_forti
Contributor
0 Likes
3,573

Hi, see SAP demo example demo_sel_screen_function_key

Read only

0 Likes
3,573

Hi experts,

I have tried with all the solutions which is provided to me. These answers already existing. But it's not fulfilling my requirement.kindly provide me the solution for my requirement.

in the highlighted place i want to add my button. i tried with Standard PF status. But it's over writing execute button and it's showing unnecessary buttons also kindly check in below screen shot for reference. And also standard back button is not working even. Kindly help me on this issue to resolve.

Read only

0 Likes
3,571

kindly provide me the solution for my requirement. I want to add an icon just next to the execute button at highlighted place. kindly do the needful.

Read only

0 Likes
3,571

Hi,

Implementing CUA enhancement as well as creating report "ZRPT_ABCD" with customized button.

enhancement ...

set pf-status 'ZF_ABC' of program 'ZRPF_ABCD' excluding cua_exclude.

endenhancement.
Read only

luckky
Explorer
0 Likes
3,571

i am not the person who worked previously on this requirement.