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

custom button at selection screen toolbar

Former Member
0 Likes
3,372

Hi All,

I have a requirement to add button at selection screen toolbar. Once this button was hit another program should be called.

Do you have any idea on how to do this. Appreciate your help.

Thanks in advance.

9 REPLIES 9
Read only

deepak_dhamat
Active Contributor
0 Likes
1,864

Hi ,

Search SDN Before Posting you will find soultion ...

Regards

Deepak.

Read only

0 Likes
1,864

I've already did my research and no solution was found for my req. That's why am posting new thread. Thanks!

Read only

0 Likes
1,864

Hi,

To add a button in selection screen toolbar follow the following steps--

tables sscrfields.
INITIALIZATION.
  sscrfields-functxt_01 = 'ttttttttttttttttt '. " This is text for button 

AT SELECTION-SCREEN.
  IF sscrfields-ucomm EQ 'FC01'. " this is user command for the button 
*Submit the program here which u want to call if it is a report program*
  ENDIF.

U can add 5 button in the selection screen.

Regards,

Madhukar Shetty

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,864

>

> I've already did my research and no solution was found for my req.

Then i understand your research was not comprehensive SAP has provided a lots of demo programs for playing with the selection-screen; you can check them in ABAPDOCU transaction.

Anyway for your specific requirement you should refer to the demo program: DEMO_SEL_SCREEN_FUNCTION_KEY.

BR,

Suhas

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,864

Iniialization. Set PF status.

Nabheet

Read only

Former Member
0 Likes
1,864

Hi

first of all let me know how you are creating your selection screen,

By using Select-options or it is a odule pool programming.

if it is a Module pool then you can set the PF status of that screen and create your own buttons with there Function code

and in user command you can capture the functionality for that particular buttons Function code.

In case of select-options I am not sure how you will add a button to standard tool bar.

thanks

Lalit

Read only

Former Member
0 Likes
1,864

Hi,

use GUI status to create a push button.

capture the function code in at user-command event and submit to the another program.

Read only

Former Member
0 Likes
1,864

This message was moderated.

Read only

Former Member
0 Likes
1,864

Hi,

To add custom Button to your selection screen see the below example-

TABLES: SSCRFIELDS.

TYPE-POOLS ICON.

PARAMETERS: p_bukrs TYPE bukrs.

INITIALIZATION:

V_FUNCTXT-ICON_ID = ICON_XXX. " Add Icon to button if you want.

V_FUNCTXT-QUICKINFO = 'xxxx'. " Text to be displayed when you hover mouse over the button

V_FUNCTXT-ICON_TEXT = 'yyyy'. " Text to be dsipalyed on button.

SSCRFIELDS-FUNCTXT_01 = V_FUNCTXT.

AT SELECTION-SCREEN.

CASE SSCRFIELDS-UCOMM.

WHEN 'FC01'. " Handle the click on button. By default this function code will be

to your

"Your logic

ENDCASE.