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

'Simple Screen Exit Button not working'

Former Member
0 Likes
1,406

Hi,

I am Novice in SAP-BW can any Help me in this regards.

My Screen should come out when i press Exit.

But u it not coming out.

REPORT Z_SCREEN .

DATA: OK_CODE LIKE SY-UCOMM,

OUTPUT(8) TYPE C.

DATA: TEXT(10) TYPE C,

NUMBER TYPE I.

CALL SCREEN 1130.

&----


*& Module USER_COMMAND_1130 INPUT

&----


  • text

----


MODULE USER_COMMAND_1130 INPUT.

CASE OK_CODE.

WHEN 'EXIT'.

LEAVE TO SCREEN 0.

LEAVE PROGRAM .

ENDCASE.

ENDMODULE.

1 ACCEPTED SOLUTION
Read only

Manohar2u
Active Contributor
0 Likes
1,039

Hi Anil,

You need to define a module in PBO of 1130 screen's flow logic.

In this module you need to set pf-status with function keys 'EXIT' for back, leave or for cancel button.

PROCESS BEFORE OUTPUT.
  MODULE SET_STATUS.

MODULE SET_STATUS OUTPUT.
  SET PF-STATUS 'ENTW'.
  SET TITLEBAR 'ETW'.
ENDMODULE.

Cheers

Manohar

9 REPLIES 9
Read only

Former Member
0 Likes
1,039

Hi,

Remove LEAVE TO SCREEN 0.

Mark Helpfull answers

Regards

Read only

Manohar2u
Active Contributor
0 Likes
1,040

Hi Anil,

You need to define a module in PBO of 1130 screen's flow logic.

In this module you need to set pf-status with function keys 'EXIT' for back, leave or for cancel button.

PROCESS BEFORE OUTPUT.
  MODULE SET_STATUS.

MODULE SET_STATUS OUTPUT.
  SET PF-STATUS 'ENTW'.
  SET TITLEBAR 'ETW'.
ENDMODULE.

Cheers

Manohar

Read only

Former Member
0 Likes
1,039

hi anil,

use ok_code = sy-ucomm.

then use case ok_code.

hope this helps.

award if helpful.

regards,

keerthi.

Read only

rahulkavuri
Active Contributor
0 Likes
1,039

Just use LEAVE TO SCREEN 0.

Clear OK_CODE after every use, if u need it for further processing then u need to use flags

Read only

Former Member
0 Likes
1,039

Hi,

You must :

- create a status xxx with SE41 (and link the code 'EXIT' to a back/cancel/exit button

- set this status in the PBO (set PF-STATUS xxx)

- not forget the ok_code in the element list !!!

Nothing else.

Hope that helps ... and hope you'll reward

Read only

sreekanthgo
Contributor
0 Likes
1,039

Hi,

Try the below code.

In your screen PAI write the below code..


PROCESS AFTER INPUT.
*-- Exit program
  MODULE EXIT AT EXIT-COMMAND.
  • Double click on the above module and write the below code.

MODULE EXIT INPUT.

 LEAVE PROGRAM. " Exit program

ENDMODULE.                 " exit  INPUT

Thanks,

G.S.K

Read only

sreekanthgo
Contributor
0 Likes
1,039

Hi Anil,

Please do not forget to close the post if your issue has been solved.

You can close the post by alloting maximum points to a post or solved by your own.

Thanks,

GSK

Read only

0 Likes
1,039

hi anil,

if ur's is a report program check out the simple code.

TABLES sscrfields.

SELECTION-SCREEN PUSHBUTTON 5(10) exit

USER-COMMAND us01.

AT SELECTION-SCREEN.

CASE sscrfields-ucomm .

WHEN 'US01'.

LEAVE .

ENDCASE.

Read only

0 Likes
1,039

Hi,

Thanks a lot to u all. My Problem is Solved . Previously i didn't include PBO Module in my program. Now it is working ,fine.

Thanks again you all.