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: 

Exit from Dynpro using OO

Former Member
0 Kudos

Dear Gurus ,

I made a screen that has a ALV list that is made using OO.

When i press '&F03' (back) it doesn't return at the selection criteria at the first hit of '&F03' but at the third hit .

Look my code below ...

........

........

MODULE USER_COMMAND_0100 INPUT.

SAVE_OK = OK_CODE.

CLEAR OK_CODE.

CASE SAVE_OK.

WHEN '&F03'.

SET SCREEN 0.

LEAVE SCREEN.

ENDCASE.

CLEAR SAVE_OK.

CLEAR OK_CODE.

.......

.......

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

'&F03' is just a std code use to back by ALV, u should use a different ok_code value.

U should post your code to call ALV, because the the code you've posted is right, probably u've call the screen 3 times.

Max

8 REPLIES 8

Former Member
0 Kudos

Hi,

Try like this

MODULE USER_COMMAND_0100 INPUT.

SAVE_OK = OK_CODE.

CLEAR OK_CODE.

CASE SAVE_OK.

WHEN '&F03'.

LEAVE TO SCREEN 0.

ENDCASE.

CLEAR SAVE_OK.

CLEAR OK_CODE.

.......

.......

Former Member
0 Kudos

Hi

'&F03' is just a std code use to back by ALV, u should use a different ok_code value.

U should post your code to call ALV, because the the code you've posted is right, probably u've call the screen 3 times.

Max

0 Kudos

Dear Max ,

You are right .. The problem is that i call the scrren to many times .....

0 Kudos

Because i have some icons in the screen i must call the screen again when i press a button in my screen .

And the problem is that when i press 5 times a button in the screen i must press 6 times the exit button .

Can you help ....?

0 Kudos

Hi

U should consider there's a limit for the CALL SCREEN statament: every time it's used the system creates an internal mode, after a certain number (it can depend on your system) of internal node a dump occurs.

If you want to make sure to go to selection screen try this:

SET SCREEN 1000.

LEAVE SCREEN.

Max

0 Kudos

Hi

Sorry it doesn't work:

So u should use CALL SCREEN of for the first call and for the next calls to use LEAVE TO SCREEN, so u can use the statament SET SCREEN 0. LEAVE SCREEN to back to selection screen.

Max

0 Kudos

Dear Max ...

It doesn't work ....

The problem is that because i have icons in screen i must load(call) the screen when i press a button of the alv.

So if i press 6 times a button i must press 7 times the back button ...

Please help ...

0 Kudos

Solved !!!!!!!!!!!!!!!!!!

Thanks Dear Max !!!!!!!

Your last answer was right !!!!