ABAP Unit Test

And don’t tell me I’m a bore. ABAP unit test worth it!

Here how it was. Once I told you about Test Driven Development methodology, but today I decided to try it in practice how it works in SAP. I created basic OData Service and decided to test it automatically.

Now I want to test it automatically. Earlier I told about SECATT. Today let’s talk about Unit testing. It such a thing which is developed in ABAP and allows to test logic inside of a program. It does not simulate user input but verifies internal procedures, methods, functions for a supposed result. For example, it should always save correct data but never allows to save incorrect data. To implement we create two methods – positive result test and negative result test.

Read More


SAP ABAP Quality

Life throws me interesting tasks. The other day I was thinking about ABAP code quality automation. There is a tool to control ABAP quality and it’s called ATC – ABAP Test Cockpit. Guess, we can setup system to verify ABAP code for quality in ABAP Code Inspector where we set rules for naming, code blocks, conventions, etc. We can ask the system to schedule code checks before any transport request moves forward to quality or production. The system will stop any transfer in case there are mistakes in code or even variables naming.

 

Testing ABAP Code in SAP

testing ABAP code in SAP (image owner/author is unknown)

Read More


WebDynPro settings

Hi.

I’m going to share some of my thoughts regarding new topics on personnel development. We need to set up our systems before that time to make sure everything works well. Most of you have systems set up by Basis team guys, so this is for others.

Thus we need to set up SAP Netweaver/ERP server for WDA to allow to process and show WDA applications. You aware that WDA it one of the latest WEB based technologies SAP provide us. It’s less flexible than UI5 but still powerful. Web history in SAP started with BSP, than WDA for Java, WDA for ABAP and the latest Fiori on UI5.

We have a goal to see web applications for some HR functionality. We can run them through SE80 or from business role just to look at them as a start point. Starting app shows some error. It’s usually saying that server is inaccessible or something. Let’s figure out what’s going on. Server or service is not set. I’ve never done that before so will go ahead with you together. I’ve just found first WDA app, hit Test button in SE80 and it failed.

Read More


Connect to external database

Once I needed to create a program to download data fro external database into my own. It happened to be very easily.

In DBACOCKPIT transaction create a new connection to a database.

And user it in ABAP like this:

EXEC SQL.
CONNECT TO ‘BSK’
ENDEXEC.
EXEC SQL.
SET CONNECTION ‘BSK’
ENDEXEC.
EXEC SQL.
SELECT db_name() INTO :DBN FROM SVERS
ENDEXEC.
WRITE: / ‘current database name’, DBN.
EXEC SQL.
SET CONNECTION DEFAULT
ENDEXEC.
EXEC SQL.
SELECT db_name() INTO :DBN FROM SVERS
ENDEXEC.
WRITE: / ‘current database name’, DBN.

It’s basic Native SQL ? ABAP. Some SAP notes for reference.

Note 178949 – MSSQL: Database MultiConnect
Note 323151 – Several DB connections with Native SQL


Resume parsing

Want to talk about?

It’s a boring time for a recruiter. SAP knows well how to it his job, there is nothing to do about. Position requests from managers are being processed themselves, posted to internal and external web-portals or agencies. Feedbacks are being sent back to managers by themselves and automatically. Everything is integrated. CV is being read from email  [email protected], parsed to bones and stored in candidate database. Interviews are being initiated from a mobile phone, rooms are reserved. Boring, no fun at all.

Everything is clear except CV. We know every resume is made of a typical skeleton, where is personal info, contacts, work experience. Every part could be formalized, parsed to its components and analyzed by a number of factors and variants of appearance.

We understand that First and Last names could match file name, never is written with punctuation characters, always start with a capital letter or are all capital and resides in the top part of a doc.

We also understand that contact phone number has fixed number of digits, patterns are also well known and it’s placed somewhere by name or e-mail address.

We understand that work experience is a consequence of the same type blocks with company, period, position and job functions specification. It’s just a table which can be retrieved from CV somehow. Let’s say exported in XML format, where we can easily find repeating elements that appear more than once.

Read More