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

modulepool

Former Member
0 Likes
832

hi,

iam creating set pf-status(menu bar)

iam getting the menu ,but when iam clicking on back it is going for short dump.

i did not write any functionality for back button

do i need to write .

it wil be good if i get a sample program from set pf-status and set titlebar

thanku

kirthi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
794

Hi

In PBO write

MODULE status_0100 OUTPUT.

SET PF-STATUS 'AAA'.

SET TITLEBAR 'TAA'.

ENDMODULE. " STATUS_0100 OUTPUT

double click on TAA and write the Description for title Bar and save it

and double click on AAA and display the Buttons and write the code

in PAI for the buttons like

MODULE user_command_0100 INPUT.

CASE okcode.

WHEN 'BACK' or 'EXIT'.

CLEAR okcode.

LEAVE PROGRAM.

ENDMODULE.

Reward points for useful Answers

Regards

Anji

5 REPLIES 5
Read only

Former Member
0 Likes
795

Hi

In PBO write

MODULE status_0100 OUTPUT.

SET PF-STATUS 'AAA'.

SET TITLEBAR 'TAA'.

ENDMODULE. " STATUS_0100 OUTPUT

double click on TAA and write the Description for title Bar and save it

and double click on AAA and display the Buttons and write the code

in PAI for the buttons like

MODULE user_command_0100 INPUT.

CASE okcode.

WHEN 'BACK' or 'EXIT'.

CLEAR okcode.

LEAVE PROGRAM.

ENDMODULE.

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
794

Hi,

SET PF-STATUS is used for defining menu in the program and screens...

For that first you need to create the GUI Status for the program in which you are going to use the GUI Status....

GUI Status contains the Menubar , Standard Toolbar & Application Toolbar.

You can create it by this way...

SE80

Create Program

Right Click on Program

Create --> GUS Status...

Give Name of that GUI Status.. ( Further it will be useful in the program )

Now it opens the window where you can design your own menu & toolbar...

Design it...

Now save and activate it..

Get back to ur module pool program.

code for pf-status in PBO module of screen as:

MODULE STATUS_0100 OUTPUT.

SET PF-STATUS 'SCR100'.

SET TITLEBAR 'MAINTPLAN'.

Regards,

Priyanka.

Read only

gopi_narendra
Active Contributor
0 Likes
794

In the PAI of the screen. just write this module

Make sure you give the same CODES for EXIT and make sure the function type for each code is E (Exit Command)

process after input.

  module EXIT_COMMAND_0100 at exit-command.

*&---------------------------------------------------------------------*
*&      Module  exit_command_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module EXIT_COMMAND_0100 input.

  case SY-UCOMM.

    when 'BACK'
      or 'CANC'
      or 'EXIT'.
      LEAVE PROGRAM.
  endcase.

endmodule.                 " exit_command_0100  INPUT

Regards

Gopi

Read only

Former Member
0 Likes
794

You need to write a PAI module on_user_command. In that check for the sy-ucomm.

case sy-ucomm.

when 'BACK'.

leave screen.

endcase.

In your PF status, you should specify the function code as 'BACK'.

Regards,

Nithya

Read only

Former Member
0 Likes
794

please see this link with screen shots for menu bar and its function code creation .

<a href="http://">http://help.sap.com/saphelp_nw04/helpdata/en/83/7a18cbde6e11d195460000e82de14a/frameset.htm</a>

Girish