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: 

How to leave a module pool screen on back button

Former Member
0 Kudos

Hi,

in a report i am calling a module pool screen call screen 500. Now inside this there is a back button.I want to go to my report selection screen when pressing BACK.

There are report displays called when diff buttons are pressed inside this module pool screen.

i tried using set screen 0/ set screen 1000/ leave screen/leave screen 0(it goes back report display)...

When i used call selection screen 1000(i want to show user the same variant ) the variant is not there.

Help needed urgently.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Try this piece of code.


CASE ok_code.
WHEN 'BACK'.
  SUBMIT <'report name'>.
ENDCASE.

If variant is assigned then press F1 keeping the cursor in submit statement it has got some options for submit statement.

Hope this solves your issue.

Cheers,

Suvendu

9 REPLIES 9

Former Member
0 Kudos

Hi,

Try like this,

When 'BACK'.

Call transaction 'T.Code'.

0 Kudos

It is not module pool program..

 

start-of-selection.

call screen 500.

module  m_user_command_500.
*{

 case sy-ucomm.

 when 'BACK'.

*" CODE REQD

when 'EXP'.

leave to list processing. 

 set pf-status 'JJS'.

write 'asbb'.  


*}

at user-command. 

case sy-ucomm.

when 'BACK2'

 call screen 500.

endcase.

so from report back i will go to modulepool screen and from there if i press BACK i want to go to selection screen .

Former Member
0 Kudos

while calling screen, u have to specify return statement to return back to ur report.

like the below statement.

call screen '500' and return via selection screen

rgds

Kiran

Former Member
0 Kudos

Hi... try this



SET PF-STATUS 'ASDF'.  " dbl click on ASDF and define it
CASE SY-UCOMM.
 WHEN 'BACK'.
      LEAVE TO SCREEN XXX. " give ur required screen no. in place of XXX  
 WHEN 'EXIT'.
      LEAVE TO SCREEN 0.
ENDCASE.


Former Member
0 Kudos

Hello,

Try this piece of code.


CASE ok_code.
WHEN 'BACK'.
  SUBMIT <'report name'>.
ENDCASE.

If variant is assigned then press F1 keeping the cursor in submit statement it has got some options for submit statement.

Hope this solves your issue.

Cheers,

Suvendu

Former Member
0 Kudos

Hi,

IF SY-UCOMM EQ 'BACK'.

LEAVE TO SCREEN 0.

ENDIF.

Former Member
0 Kudos

hi

try this

while creating the PF-STATUS in the PBO of the screen

u will go to tcode : SE41 to create menu entries in that

on the application tool bar for BACK button assign the Function Code Type = E.

in PAI

Module <Modulename> at EXIT-COMMAND.

in se38

Module <Modulename> input.

case sy-ucomm.

when 'BACK'.

Leave screen <scrno>.

or

Leave Program.

endcase.

endmodule.

Regards

former_member333737
Active Participant
0 Kudos

Hi try this,

CASE SY-UCOMM

WHEN 'BACK'.                     ' function of back button
CALL SCREEN 'XXXX'.

WHEN 'EXT'.                       "function for exit
LEAVE PROGRAM.

ENDCASE.

Regards,

Nikhil.

Former Member
0 Kudos

I could not get you. Please be clear