‎2011 Apr 06 9:07 AM
Hi,
I have coded for a pop up for the transaction va02 in the user exit MV45AFZZ.
This will trigger while saving.
It has two buttons "Cancel" and "Exit".
Exit - if you press Exit, it will go to easy access screen.
Cancel - It should remain in the same screen.
Exit works fine...But for cancel, i written the below code,
Leave to screen 4001.
It also works, but when you move to other screen in VA02 and try to save, while this pop up comes, and press Cancel, it gives dump.
What code should be written so it will work for all screen? What ever the screen, it should remain in the same screen while cancel button is pressed.
Thanks,
Ezhil.
‎2011 Apr 06 10:30 AM
Hi Ezhil,
The issue which you are facing generally comes in pop windows. What you can do is instead of 'Leave to screen 4001', it's better to use 'Call screen 4001'.
Hope it will solve your problem.
If you are still facing some issue, please let us know.
Cheers
VJ
‎2011 Apr 06 9:18 AM
‎2011 Apr 06 10:18 AM
Leave to screen 0 will lead to SAP easy access..this is used for EXIT button.
But when cancel button pressed, it should remain in the same screen. (VA02 screens)
‎2011 Apr 06 10:20 AM
‎2011 Apr 06 10:30 AM
Hi Ezhil,
The issue which you are facing generally comes in pop windows. What you can do is instead of 'Leave to screen 4001', it's better to use 'Call screen 4001'.
Hope it will solve your problem.
If you are still facing some issue, please let us know.
Cheers
VJ
‎2011 Apr 06 10:36 AM
I tried using CALL SCREEN 4001, but still i get the dump.
In the dump says
The system attempted to use dynpro 6201 in program "SAPMV45A".
This dynpro does not exist.
I dont know where the screen 6201 comes into picture.
‎2011 Apr 06 10:40 AM
Hi,
What pop up are you using? Which Function Module?
Regards,
Ernesto
‎2011 Apr 06 10:44 AM
‎2011 Apr 06 10:47 AM
Have you created '6201' screen because when I see the program SAPMV45A in se80 there is no screen number 6201.
Can you please let us know the code which you are coding in exit??
‎2011 Apr 06 10:51 AM
‎2011 Apr 06 10:54 AM
Please paste your code which are coding in the exit for the pop window.
‎2011 Apr 06 10:57 AM
Hi,
The dump comes only in line item "condition" tab. Its subscreen value is 6201. For all other screen, the pop up works well.
‎2011 Apr 06 11:03 AM
My code is
IF l_answer = '1'. "Cancel button
CALL SCREEN 4001.
ELSEIF l_answer = '2'. "Exit
LEAVE TO SCREEN 0.
ENDIF.
‎2011 Apr 06 11:07 AM
Hi,
Use Cancel Button that is provided by the Function Module instead of Button 1.
Regards,
Ernesto.
‎2011 Apr 06 11:12 AM
Yes, i tried FM cancel button. But how to stop the program flow. The coding which comes after the pop up should be executed. but it is being executed if I use the FM cancel button
‎2011 Apr 06 1:11 PM
Hi,
Thanks All..
This issue is solved by putting the below coding for cancel button
if l_answer = '1'. "Cancel Button
set screen sy-dynnr.
leave screen.
elseif l_answer = '2'. "Exit Button
leave to screen 0.
endif.