Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3570

Re: Doubt on instantiation of method

$
0
0

This discussion is a nice example that demonstrates the value of good testing.

 

If unit tests were coded in using ABAPunit, debugging could take place at the press of a button.

Alternatively it should take 10-20 minutes to write a test program to instantiate your object with _exactly_ the parameters you need. Then you have a Z-report that you can execute 100's of times and debug all day long. Much quicker than spending three days on SCN.

 

I noticed one other thing: Creating an instance with all object data (PO Header and Items) as importing parameters in a public constructor smells like bad Object design to me. As Florian described, you normally instantiate an object with a key (PO Number), and it reads its data from the DB.

 

Regards,

Mike


Viewing all articles
Browse latest Browse all 3570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>