Thursday, 8 September 2016

A kill to an ABAP CDS View?

In the first blog of this series we considered that CDS views are not just for the super cool HANA types, but can also be used to escape when marooned on planets with nothing but a lowly Oracle DB. Many of SAP's customers I suspect have only just begun to dip their toes into these scary HANA waters, and so its important to understand what of this new technology we can learn and use today (whilst still on the traditional non-HANA DB); and what must wait for a possible future HANA implementation.

In today's blog we will consider the performance of the ABAP CDS view with an Oracle DB, if we are without the HANA DB in the back end; all from the perspective of a certain double-o secret agent. In Teched I posed the question to an SAP expert, (Who shall remain nameless, less Spectre (of course we all know that SAP==Spectre ABAP Programmers) learn of his details and track him down), here I was lead to believe that even on Oracle the use of the ABAP CDS views would give major performance benefits over the equivalent SQL statement. I have to say I had my suspicions that this may have been a double agent trying to lure me, and so without further ado on returning from TECHED set out to test the ABAP CDS view tech with the help of my very own 00-agent and the necessary 00 CDS-View.

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.