Wednesday, 7 September 2016

Setting Code Inspector Custom Variant as Default Code Inspector variant

In our projects we generally create a custom variant for the code inspectors, which take cares of our project related Naming convention and coding standard.
If you are new in creating Code inspector variant you can refer below link.

http://sapabapcentral.blogspot.com/2015/09/creating-code-inspector-check-variant.html

In general whenever we develop any object or make any changes in any object, we go to Transaction SCII and run the code inspector for Z created Variant instead of directly checking it from Object menu Class/Program/Function module etc. ->Check -> code inspector.

Saturday, 3 September 2016

Output Catcher for ABAP

Output Catch is a small SAP server application to catch text on the presentation server from ABAP on the application server. You can send text direct to the editor of output catch, to a specific log file on the client, to a Windows debugger or to the Windows event protocol of the client.

It is very easy to use Output Catch:
  1. Register the Destination OUTPUTCATCH with the TAC SM59.
  2. Start the program OutptCatch.exe.
  3. Fill the connection parameters.

Friday, 2 September 2016

Creating Custom Fields in ME31K , ME32K , ME33K

As we know the enhancement to the screen is not impossible but it is not supported because we need some S_DEVELOP authorisation and modify some of the Standard table with z fields .That why please consider this document only if water is above your head and is a critical requirement of client
1) Create a Project using CMOD Tcode.
2) Give the enhancement name MM06E005.
3) Go to component Tab.


Creating Custom Fields in ME31K , ME32K , ME33K

Thursday, 1 September 2016

Smartform Version Comparison

There has long been a requirement, where we need to compare 2 Smartform versions.
In SAP there is no feature for this, there are no past versions maintained and also certainly no remote comparison.

This makes comparison and version management of smartforms a tedious task.

I was faced with such a task too. There were multiple complex smartforms and due to multiple activities and phases of my project working simultaneously, it was very difficult to trace what went wrong and definitely made it a lot of effort to maintain and revert changes in case of any issues.

Thus began my journey down the lane on how to overcome this problem.

Wednesday, 31 August 2016

Releasing Internal Table Memory

It is a well known fact, that you release the memory occupied by an internal table using either CLEAR or FREE, where FREE releases also the initial memory area. You normally use CLEAR, if you want to reuse the table and you use FREE, if you  really want to get rid of it and don't want to refill it later on. Assigning an initial internal table to a filled internal table does also release the target table's memory in the same way as CLEAR does.

But last week a colleague pointed out to me that it is not such a well known fact that deleting lines of internal tables with DELETE normally does not release the memory occupied by the deleted lines. Instead, there seem to be people deleting lines of internal tables in order to release memory. Therefore as a rule:

Monday, 29 August 2016

Mocking DAOs with ABAP Test Double Framework

Introduction


The sample below is very basic and no real business logic is included because it focuses on the concepts. For the dependency injection of the daos I used an interface for two reasons. First when more complicated or variants of Daos are needed the interface provides more flexibilty and the ABAP test double framework currently only can mock interfaces.

If you have suggestions, hints or question feel free to comment this document as I am keen on improve my concept, since it will not be the last time I have to write a Dao.

Thursday, 14 July 2016

Dynamic FM call with extra parameter

Use Case 


Consider the scenario in your development, you are reusing a standard FM in your program which is having 2 mandatory import parameters . And you shipped the solution to the customer. Now same FM in the customer system is having one more additional mandatory importing parameter. Now when your program runs and that calls the FM the dump appears in customer system. How to resolve this issue. This can be done by calling the FM dynamically with extra parameter that is not in your system but it is there in customer system. The below post tries to show the same.

The  FM ‘FPM_DEMO_FLIGHT_GET_CARRIER’ having below details as one import and one export parameter.

Wednesday, 6 January 2016

A room with an ABAP CDS view

In Björn Goerke's keynote speech from Barcelona Teched 2015, you may recall that he had crash landed on Mars, and was attempting to escape mars with the help of all of the latest SAP tech available. One of the technologies that we took away from teched, and that Björn used in his keynote was that of the CDS view.

But what if Björn had crashed on Mars and was without a Hana DB? what if he hadn't upgraded yet to full blown Hana, but he wanted to prep for such a future eventuality. That is a similar situation to what I find myself in with my current employer. We have crashed landed too, but we are even further out than Mars... and we have no Hana DB, but can we prep in advance for HANA? perhaps by using CDS Views on our current Oracle DB.