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: 

Open Dynpro in new Mode

Former Member
0 Kudos

Hello,

is there a way to open a Dynpro in a new modus?

something like:

CALL_SCREEN XYZ IN_NEW_MODUS.

best regards

1 ACCEPTED SOLUTION

SimoneMilesi
Active Contributor
0 Kudos

and gave you the explain.

Another solution could be calling your screen as Popup.

12 REPLIES 12

Hvshal4u
Active Participant
0 Kudos

I guess you can " CALL TRANSACTION 'XXXX' "

Regards,

Vishal

Former Member
0 Kudos

yes, but i don't have a transaction for my dynpro. i just got the dynpros number, so i need something like

call_screen 33 in new mode.

there is no transaction '33'.

Sandra_Rossi
Active Contributor
0 Kudos

There is for instance function module TH_CREATE_FOREIGN_MODE - already discussed in the forum

0 Kudos

i already used the function th_create_mode, but there is just a tcode or a transaction name. what i need is a dynpro number.

CALL FUNCTION 'TH_CREATE_FOREIGN_MODE'

   EXPORTING

     CLIENT                 =

     USER                   =

*   TCODE                  =

*   RETURN_ERROR           = 1

*   CREATE_EXCLUSIVE       = 0

* EXCEPTIONS

*   USER_NOT_FOUND         = 1

*   CANT_CREATE_MODE       = 2

*   NO_AUTHORITY           = 3

*   OTHERS                 = 4

           .

IF SY-SUBRC <> 0.

* Implement suitable error handling here

ENDIF.


what i need is something like:


CALL FUNCTION 'TH_CREATE_FOREIGN_MODE'

   EXPORTING

     CLIENT                 =

     USER                   =

     DYNPRO_NUMBER                 =

*   RETURN_ERROR           = 1

*   CREATE_EXCLUSIVE       = 0

* EXCEPTIONS

*   USER_NOT_FOUND         = 1

*   CANT_CREATE_MODE       = 2

*   NO_AUTHORITY           = 3

*   OTHERS                 = 4

           .

IF SY-SUBRC <> 0.

* Implement suitable error handling here

ENDIF.

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

A Dynpro is always part of a program. You can only open programs in new modes (ABAP sessions) and that only with CALL FUNCTION STARTING NEW TASK. But never just one Dynpro, how should that work at all?

Horst

SimoneMilesi
Active Contributor
0 Kudos

and gave you the explain.

Another solution could be calling your screen as Popup.

0 Kudos

i would try to call my dynpro in a popup. is there a custom popup for this solution or how u do that?

0 Kudos

For displaying a dynpro as a popup, you must declare the dynpro as a modal window (it's a dynpro main attribute), and call it using CALL SCREEN ... STARTING AT ...

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

The ABAP statement for popups command is CALL SCREEN ... STARTING AT.

But the dynpro must be defined accordingly and also the GUI status.

Maybe the best is, you scan the Dynpro documentation a bit.

General Dynpros - Classic Dynpro Programming - SAP Library

especially

Embedding Modal Dialog Boxes - Classic Dynpro Programming - SAP Library

0 Kudos

There is one problem with that solution, when i define the dynpro as a modal window, because i have to display the dynpro normally or in a popup window. if i define it as a modal window, it can't be used in a normal way.

0 Kudos

I've already tried something similar to that with:

CALL SCREEN BILD STARTING AT WINX1 WINY1

ENDING AT WINX2 WINY2.

but that kind of code just opens the screen with the number of the variable "BILD".

The screen is not shown as a popup-window.

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can declare the dynpro as a subscreen and reuse it in a normal and a modal window ...