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

Button in menu bar

Former Member
0 Likes
2,646

Hi all,

I need to create a push button in menu bar in report output.

The report output is a normal output not a alv. and i need a button in menu bar or application tool bar of a output, and when I click on this some action has to be performed.

What code i can use for this.

Thanks

Saravana

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,498

hi,

I think its better if use pf-status....there in Function keys u can cretae ur Button.

with regards,

madhuri.

6 REPLIES 6
Read only

Former Member
0 Likes
1,498

HI,

u can create it in use

1)use set pf-status 'MYMENU'.

double click on MYMENU there u can create ur menu

2)see this program

REPORT ZPROG1.

TABLES:SSCRFIELDS.

SELECTION-SCREEN PUSHBUTTON /10(4) MYBUTTON USER-COMMAND ABCD.

INITIALIZATION.

MYBUTTON = 'BACK'.

AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOMM = 'ABCD'.

SET SCREEN 0.

ENDIF.

rgds,

bharat.

Read only

Former Member
0 Likes
1,498

use set pf-status

Read only

Former Member
0 Likes
1,498

Hi,

refer to the following link:

[Removed by the moderator.]

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
1,499

hi,

I think its better if use pf-status....there in Function keys u can cretae ur Button.

with regards,

madhuri.

Read only

Former Member
0 Likes
1,498

you have to use set pf-status...

first use

set pf-status 'ZSPD'.<before write statement>

now dbl click on that it will go to se41 in application toolbar area just assign the name and fn code for the buttons activate it.

for hndling the fn code. you have to use at user-command event.

at user-command.

case sy-ucomm.

when '<your fn code in CAPS>'.

<do some processing>.

endcase.

regards

shiba dutta

Read only

Former Member
0 Likes
1,498

hi,

in report prgm give stmt as

set pf-status 'menu1' -> double click on meu1 -> give report prgm name -> select menu bar radio button -> click on + symbol for expanding -> select required buttons in standard tool bar application tool bar -> give function code for all buttons -> activate -> back.

in report prgm.

at selection-screen.

case sy-ucomm.

when 'back'.

leave to screen 0.

..........

..........

endcase.

if helpful reward some points.

with regards,

suresh babu aluri.