Application Development 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: 

Problem with Closing of Screen

Former Member
0 Kudos
374

Hi,

I have created a screen of type Modal Dialog Box.

For this screen, in the right hand corner, i was able to see the cross symbol , which is not working, means when i press this button, nothing action has been performed.

My requirement is if you press [X] , screen should be closed.

Can any one help me on this one.

8 REPLIES 8

Former Member
0 Kudos
136

Hi Krishna,

you can assign function to that symbol in pf status.

for that you see stand pf status.

Regards,

Vijay

0 Kudos
136

In standard PF, i was not able to find the function code for that [X] button.

Can you xplain me in detail.

0 Kudos
136

Hi,

Please refer

Hope this will help you.

Former Member
0 Kudos
136

answered

MarcinPciak
Active Contributor
0 Kudos
136

Regards

Marcin

former_member218674
Contributor
0 Kudos
136

Hello Krishna,

To happen anything on screen you need to catch event and write code for closing the screen. It doesn't matter if screen is modal or non-modal.

You need to put button on it and in user command you can write following code:


   SET SCREEN 0.
   Leave screen.

Check following link for more details on screen processing.

http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba4e635c111d1829f0000e829fbfe/frameset.htm

Thanks,

Augustin.

former_member218674
Contributor
0 Kudos
136

Hello Krishna,

To happen anything on screen you need to catch event and write code for closing the screen. It doesn't matter if screen is modal or non-modal.

You need to put button on it and in user command you can write following code:


   SET SCREEN 0.
   Leave screen.

Check following link for more details on screen processing.

http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba4e635c111d1829f0000e829fbfe/frameset.htm

Thanks,

Augustin.

Former Member
0 Kudos
136

Hi Chaitanya,

Try with the following code....

in the pf-status STATUS assign fcodes to the function keys: SAVE,BACK,EXIT, CANCEL.

In the attributes of the screen 100 maintain the radio button Modal Dialog Box checked.


call screen 100
starting at 10 5
ending at 30 10.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module STATUS_0100 output.
  SET PF-STATUS 'STATUS'.
*  SET TITLEBAR 'xxx'.

endmodule.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module USER_COMMAND_0100 input.
CASE SY-UCOMM.
  WHEN 'EXIT' or 'CANCEL' or 'BACK'. 
  LEAVE PROGRAM.
ENDCASE.
endmodule.                 " USER_COMMAND_0100  INPUT

Regards,

Mdi.Deeba