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

ABAP dependency injection

Former Member
0 Likes
1,218

In case anyone's interested in dependency injection in ABAP. Since we couldn't find any such library, we started to code it ourselves. First usable piece of code is available at: http://code.google.com/p/abap-di/

11 REPLIES 11
Read only

naimesh_patel
Active Contributor
0 Likes
1,132

Thanks for Sharing. Looks interesting. I'll give a try and let you know how it goes.

Regards,

Naimesh Patel

Read only

0 Likes
1,132

Great,

I would be especially interested in the status of the download - whether it's installable and runnable. Any pitfalls or inconsistencies you'll find, please report them (on project wiki if possible). I'll then be able to correct the package.

Thanks

Read only

0 Likes
1,132

Hi Dominik,

Getting Couple of errors:

1. Syntax error while activating the test program. Parameter INSTANCE of the method GETINSTANCE of the interface YDIINJECTOR, must be TYPE REF TO OBJECT. Currently it is TYPE REF TO DATA.

2. Getting a runtime error while accessing the statements in method GETELEMENTS of class YDIELEMENTS.


LOOP AT modules INTO module.
  binder->YDIBINDER~INSTALL( module ).   " << 
ENDLOOP.

I also left the same message on the WIKI.

Regards,

Naimesh Patel

Read only

0 Likes
1,132

Dear Naimesh,

could I have a request to you?

Turns out that at the time when I was about to do the change you made me realize I should do, I lost access to the system I was implementing the library on. It will take me probably until after Christmas to find a development environment where I can further work on the library.

Because I don't want to leave the library in such a state as is right now I made a change to the NUGGET file directly.

Would it be a problem for you to download the file named 2010-12-21-NUGG_ABAP-DI.zip, install it on your system and verify whether it compiles?

If so, then could you also try to change the example that is on the site and to obtain the reference from injector use


log ?= injector->getinstance( ... )

Let me know

Read only

0 Likes
1,132

Not able to import the nugget as it ends up in the short dump - Null Object reference.

Regards,

Naimesh Patel

Read only

0 Likes
1,132

I am sorry but this is not really the correct forum for having such a discussion. I have moved this thread to the Coffee Corner.

Also, Dominik, you might want too consider creating a project in Code Exchange.

Cheers,

Neil.

Read only

0 Likes
1,132

Not able to import the nugget as it ends up in the short dump - Null Object reference.

Looks like I'm unable to make the change without SAP system. Thanks for your time.

Read only

0 Likes
1,132

I am sorry but this is not really the correct forum for having such a discussion. I have moved this thread to the Coffee Corner.

Totally agree. I was looking for a better fit in the first place, but I was not aware of the coffee corner. Thanks for reassigning.

Also, Dominik, you might want too consider creating a project in Code Exchange.

I was thinking about it in the first place, but what bothered me is the licensing. Code Exchange has a very strict policy about who owns (SAP) the code published there. That's why I went for code.google.com/p/abap-di with the project.

Read only

Former Member
0 Likes
1,132

Thank you very much for Sharing.

Regards,

Rodrigo Crespo.

Read only

Former Member
0 Likes
1,132

Here's stage #2. I've corrected the bugs that prevented you from downloading or using the package. I also updated the site User's Guide and Installation Guide to reflect the changes.

[Ready to give it a second try?|http://genijusz.com/?page_id=98]

Read only

Former Member
0 Likes
1,132

New version 1.1 is released. This includes bugfixes and ability to bind providers. By introducing providers you no longer need a wrapper for objects that cannot be bind directly to the injector.

Give it a try !