I’m reading Ken Beck’s “Test-Driven Development by example” (a review when I’ll finish it) and I tried to find if there’s a way to adapt it to ABAP.
Yes, it does. Mainly because SAP launched ABAP Unit, a test environment appliable to both programs and classes.
In programs is easy to implement: you must just define a local class FOR TESTING and go on.
In classes… it’s the same, but a bit trickier: take a look at this link from SAP
Let’s try it.
Great class to show your HTML strings via dialog box or within a custom container.
Just a trick: if you will use both options within the same program, it will fail if you don’t reset your browser AND the custom container.
It means that you must create a global (sigh) variable for the custom container:
DATA: browser TYPE REF TO cl_gui_custom_container.
And before the call to the dialog version you must free it:
IF browser IS BOUND.
CALL METHOD browser->free
OTHERS = 0. "nasty
The nasty thing here is the cleansing of SY-SUBRC even when errors occured. You can find a way to make it cleaner, I bet.
But it’s up to you to do it.
Don’t waste your time with this post. Here I will write some things I’m never able to remember, and I’m tired of re-search each time I need them. Don’t expect to find passwords 😛
I had to find the algorism for determine the checksum character of a BarCode39 string. It’s easy to do, and I though when I did it to not post the code here because it’s trivial.
But hey, I found the scrap piece of paper where I took my initial notes, and well, I’m in a sharing mood.
I had to give up my search… maybe I’ll be able to finish it or find the answer into the net someday. Until them, I’ll let you read my (lack of?) progress.
I had to send again a mail through SAP. I used my older code and found it a lot heavy for my needs. I managed to create a Z function that allows me to send a simple mail without having to fill all those nasty tables.
Maybe it exists in SAP standard, but I’ve been not able to find it. Continue reading
Sometimes shit happens. One receives a work request that seems idiotically simple but the tools provided by the system makes it a living hell.
Something like that happened me these days, because the way someone planned the queries system in SAP.
Because that, I decided to write my troubles and their solutions here, to keep track of them and to have a place to go where I’ll need to manage queries again.