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: 

Call external subroutine in a program that has a screen

mgross1
Participant
0 Kudos

Hi,

In a ME21N user exit I am trying to call a form in a custom program:

PERFORM form_name IN PROGRAM zprog IF FOUND.

Within this form there is a call to a selection screen:

REPORT zprog

...

FORM form_name

CALL SELECTION-SCREEN 0200 STARTING AT 5 5.

ENDFORM.

After the PERFORM in the user I get a short dump:

"You are trying to use screen 0200 in program "SAPLXM06". This screen does not
exist."

Is there a way to make this work?

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor

Yes indeed, short dump DYNPRO_NOT_FOUND.

Either transfer your code into a function group ZFUGR, and do PERFORM form_name IN PROGRAM saplzfugr IF FOUND.

Or if you don't need absolutely the popup, use SUBMIT zprog VIA SELECTION-SCREEN USING SELECTION-SCREEN 0200 AND RETURN.

1 REPLY 1

Sandra_Rossi
Active Contributor

Yes indeed, short dump DYNPRO_NOT_FOUND.

Either transfer your code into a function group ZFUGR, and do PERFORM form_name IN PROGRAM saplzfugr IF FOUND.

Or if you don't need absolutely the popup, use SUBMIT zprog VIA SELECTION-SCREEN USING SELECTION-SCREEN 0200 AND RETURN.