Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SAP Classic Dynpro and OO programming. Why not?

Tags:

oop

abap

dynpro

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 :)

like image 435
Dyrdek Avatar asked Oct 31 '22 07:10

Dyrdek


1 Answers

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.

like image 108
icbytes Avatar answered Jan 04 '23 13:01

icbytes