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

application tool bar

Former Member
0 Likes
1,781

Hi i have created application tool bar as follows.

at selection-screen output.

set pf-status '1000'.

set titlebar '1000'.

in the application tool bar ,Three buttons are there like report,edit,exit .i need to call ALV if user press button REPORT,i need leave from selection screen if user press EXIT,

how can i do it? please he

Regards.

Anil.

12 REPLIES 12
Read only

Former Member
0 Likes
1,718

Hi

CASE SY-UCOMM

when 'REPORT'

submit program '<<prog name'.

when 'EDIT'.

do your action here

when 'EXIT'.

leave program. or exit.

ENDCASE

Thanks & Regards,

Chandralekha.

Read only

Former Member
0 Likes
1,718

hi

in the event

Start of selection

use case on SY-ucomm like this

CASE SY-ucomm.

when 'REPORT'

write ur alve related coding here .

When 'EXIT'.

use EXIT statement to dome out of program .

ENdcase .

HOpe it will lead u to solution

Cheers

Snehi

Read only

Former Member
0 Likes
1,718

this is how you should use the pf-status.

REPORT  ZTEST_VB.

TABLES sscrfields.

parameters: p_matnr type mara-matnr.

initialization.
set pf-status '1000'.
set titlebar '1000'.

at selection-screen.
  CASE sscrfields-ucomm.
    WHEN 'ALV'.

    WHEN 'EXIT'.

  ENDCASE.

Read only

0 Likes
1,718

HI.

I have done it as your advice.

but the screen come out if i press the button REPORT.iam not getting output.

my code as follows

INITIALIZATION.

set pf-status '1000'.

set titlebar '1000'.

AT SELECTION-SCREEN.

CASE sscrfields-ucomm.

when 'PB_REPORT'.

PERFORM select_records.

PERFORM alv_report.

when 'PB_CLEAR'.

when 'PB_BACK'.

leave screen.

endcase.

pls help me to resove this problem,

Regards.

Anil.

Edited by: sutharapu anilkumar on Jul 25, 2008 12:55 PM

Read only

0 Likes
1,718

Hi,

Check The FCODE of Button Report is PB_REPORT or not.

Thanks,

Kishore

Read only

Former Member
0 Likes
1,718

hi,

as we know if we press execute button (F8) on application toolbar we will get the list. so what i understood from ur query is similar funcitonallity should be provided by ur program if u press on report button right.....

if so then give the function code of execute button to report button in se41.i think this resolves ur problem as per my understanding.

Rgds.,

subash

Read only

Former Member
0 Likes
1,718

This message was moderated.

Read only

former_member787646
Contributor
0 Likes
1,718

Hi

Try the following code...

DATA: OK_CODE TYPE SY-UCOMM.

CASE OK-CODE.

when 'REP'

submit '<prog name>'.

when 'EDIT'.

..............

..............

when 'EXIT'.

leave program.

ENDCASE

( * Here REP, EDIT & EXIT are Function Codes of the buttons in application toolbar).

Hope this would help you.

Murthy

Edited by: Kalyanam Seetha Rama Murthy on Jul 25, 2008 11:35 AM

Read only

Former Member
0 Likes
1,718

Hi,

At selection-screen.
  case sy-ucomm.
     when 'REPORT'.
          <ALV related code>
           
     when  'EXIT'.
           .....
     when 'EDIT'.
           .....
  endcase.

Regards,

Rajitha.

Read only

Former Member
0 Likes
1,718

Hi,

the SELECTION-SCREEN status can be changed with the function moduls described on [Changing the Standard GUI Status|http://help.sap.com/saphelp_nw70/helpdata/EN/e7/0eb237e29bc368e10000009b38f8cf/frameset.htm].

Regards Rudi

Read only

Former Member
0 Likes
1,718

Hi all,

u need to do coding in PAI of the screen

module exit input.

case ok_code.

when 'EXIT' .

clear ok_code.

leave to screen 0.

endcase.

endmodule. " EXIT INPUT

in the same way u can define for all the functionality..

Thanks & Regards

Ashu Singh

Read only

Former Member
0 Likes
1,718

hi Anil,

Please Check with the Function codes.If u give Fcode as pb_report in the screen layout and in the Program if u declare as PB_REPORT then report wont trigger.