5
votes

I read a few articles that say that you can't develope OO in SAPs classic dynpros. I'm a beginner so maybe I got some misunderstandings. But I'm developing object orientated when I'm using classes and objects, right?

In a dynpro I can also use classes and create objects, use their methods, etc. So why is Dynpro not OO?

I know that's a basic question but I need to get this out of my mind if I got a misunderstandig of OO :)

2

2 Answers

2
votes

That's mainly because of the classic PBO-PAI processing. You are bound to a "message-pump" like classic dynpro was developed several Years ago. But I must disagree, that it is not possible to develop following the OOP-principle. It is just not THAT nice, for example, You are bound to catch PAI for further navigations, validations and processings, and You can set values, messages and so on in the PBO.

But as ugly as it is , it still offers You the perfect approach to what ? He he he ?

MVC-Design-Pattern.

As long as You model a good model and controller, You keep track of it as a object in the top-include and create some wrappers, which MUST pass the control (and I do not like it that much ) first through the PAI/PBO-Modules down to form-routines, inside those formroutines You are free to execute everything You want, even in the OO-Context. Create a global model-and controller class, create a dynpro with one alv-grid, create also a top-include and try to play around. There are already much standard-applications, using exact the same approach. One nice thing is ( though You have the module-formroutine-delegation ), that You can really start a nice modelling of the model and the controller, and this is oo by definition.

0
votes

SAP ABAP Classical Dynpro screens are part of a built-in procedural process that runs processing before showing the screen(PBO), Displays the screen, then processing after an action is detected on the screen(PAI).

The SAP code that processes this is procedural so you can not build a "pure" OO program.

You can use classes, objects, and methods in the program but you must also have the procedural processing involved.

You can make a royal mess trying to use MVC but at that point why don't you just use WebDynpro instead?