Application Development and Automation 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: 
Read only

Call screen from ABAP class

Vignesh
Explorer
0 Likes
10,378

Hi,

I have requirement of displaying Tree ALV based on some input screen.

1. When user keyed in relevant information on initial screen and pressed create button, a new screen will be displayed with Tree ALV.

2. The Tree ALV will have one user-defined button on the toolbar. When clicking on the toolbar button, a pop-up screen should be displayed which has input fields where user can enter and click on "Submit" button on the pop-up screen. After clicking "Submit" button, the pop-up window should close and return back to Tree ALV screen.

Challenges:

Here the initial screen is developed using Module-pool report and the Tree ALV(ALV container screen is created in module pool report) is created using custom Z Class in SE24. Clicking on the button in ALV triggers an event method in Class. Based on FCODE, I have to call the pop-up screen which is created in module pool report.

Writing call screen line in method gives syntax error that, "Dynpro's can't be accessible". Please suggest a solution for this.

1 ACCEPTED SOLUTION
Read only

4,256

Hi Vignesh,

Have you considered creation a new function (and if necessary a new function group) and run the popup and it's code from there.

You can attached a screen to an FG, but not to an OO-class.

Hope this helps!

Hi,

I have requirement of displaying Tree ALV based on some input screen.

1. When user keyed in relevant information on initial screen and pressed create button, a new screen will be displayed with Tree ALV.

2. The Tree ALV will have one user-defined button on the toolbar. When clicking on the toolbar button, a pop-up screen should be displayed which has input fields where user can enter and click on "Submit" button on the pop-up screen. After clicking "Submit" button, the pop-up window should close and return back to Tree ALV screen.

Challenges:

Here the initial screen is developed using Module-pool report and the Tree ALV(ALV container screen is created in module pool report) is created using custom Z Class in SE24. Clicking on the button in ALV triggers an event method in Class. Based on FCODE, I have to call the pop-up screen which is created in module pool report.

Writing call screen line in method gives syntax error that, "Dynpro's can't be accessible". Please suggest a solution for this.

4 REPLIES 4
Read only

4,257

Hi Vignesh,

Have you considered creation a new function (and if necessary a new function group) and run the popup and it's code from there.

You can attached a screen to an FG, but not to an OO-class.

Hope this helps!

Read only

Vignesh
Explorer
0 Likes
4,256

Hi Hesen,

Thanks for your swift reply. Yes, I created an FM and call the screen inside the FM. So this FM is called inside the event handler method and finally I got the pop-up screen.

Read only

0 Likes
4,256

Ok looks like problem closed! 🙂

mh