Wednesday, 16 August 2017

Enumerations in ABAP

To represent a fixed value set in ABAP you can use several different technologies. The newest one is enumerations which are provided at language level and can be used as of AS ABAP 7.51. With this blog post I want to show which possibilities there are for ABAP developers to define enumerations and use them in signature elements in the safest way possible.

Friday, 11 August 2017

Call HANA Orion API from ABAP

The SAP HANA Repository is a key feature of the HANA native development environment.  It is the design time archive for all development objects from database tables all the way up through user interface artifacts. However up until now we’ve not had a supported API which would allow application developers or 3rd party tools developers to access the Repository.  With the advent of the Web-based development tooling, SAP needed to create a REST-based service interface for these development tools.  These two requirements come together in SPS 09 in the form of the newly released SAP HANA REST API.

Basics of Web Dynpro ABAP

Basics


Web Dynpro applications  can be created and edited in the web dynpro explorer in the ABAP development environment

It has been fully integrated into the ABAP Workbench so there is no separate transaction code. we use the object list selection to display  or create Web Dynpro component.

Thursday, 10 August 2017

An ABAP tool to get ABAP source codes line number

You can use this tool ( an ABAP report ) to get the line number of your ABAP source code.

How to use this tool


Just specify the criteria based on which the source code will be scanned and line number will be calculated.

Wednesday, 9 August 2017

CDS view source code count tool Part-12

The Continues Blog, For development complexity and draft effort estimation I need a tool to calculate the total line number of the CDS views belonging to a given package.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Certifications

Tuesday, 8 August 2017

ABAP Nested Loop Performance Test

During an ABAP performance discussion, we decided to run tests to decide on the best method for nested loops. The example was to have an outer loop of BKPF and an inner loop of BSEG.

Nesting two raw loops gives the worst performance in all cases; therefore I have left it out.

In our initial test using the source code shared below; here are the methods ordered by better performance:

Saturday, 5 August 2017

How to create ABAP CDS View with enabling derivation of the value for parameters

There have been dozens of blogs online for walking through developers on how to create ABAP CDS view with parameters in ABAP for HANA, however, one major issue still exists is that although input parameters can restrict or filter the data from CDS views, the limitation of the value input for a parameter to filter out more specific data range is significant.

Here the author presents you a way to enable derivation of the value for parameters to tackle similar problems in your future development using the example shown below.

Friday, 4 August 2017

Regarding cookie manipulation in CL_HTTP_CLIENT to avoid CSRF token validation failure issue

Recently I meet with this cookie issue so I document it as a blog in case any other guys might meet with the same problem.

I am trying to create some Opportunity transaction data by consuming OData service via CL_HTTP_CLIENT. Since this is a update operation which needs to be finished by HTTP POST, so a CSRF token is needed in this HTTP post. Let’s first have a look what is a typical scenario running in Chrome extension postman:

Thursday, 3 August 2017

Old New ABAP Editor

Introduction


If you develop now UI for SAP, you use Web IDE. If you are doing backend and ABAP, you use ABAP in Eclipse. But sometimes you still need to come back to SAP GUI and ABAP Workbench and use the “New” ABAP Editor.

Wednesday, 2 August 2017

ABAP Group Operations in Internal Tables

Today, we will be inspecting some cool grouping techniques introduced in ABAP 7.40.

First, let’s get familiar with our context. We will read the table T001K, where BWKEY (valuation area) is the table key, but BUKRS (company code) is repeated multiple times in various lines. Let’s start off by reading this table.

Tuesday, 1 August 2017

Converting Function Module Exceptions to Exception Classes

Although function modules belong to the era of procedural programming, we all need to use them from time to time. While most BAPI’s usually return error messages in a clean internal table format, many other function modules return classical exceptions.

If you are calling a function within a class method, you might have a hard time converting those classical exceptions to class based exceptions – meaning exception classes.

Sunday, 30 July 2017

CDS view authorization Part-13

There are already lots of blogs in community talking about CDS authorization concept, here I just blog what is so far not mentioned in those blogs.

For demonstration purpose I create a very simple database table ZORDER with two entries:

ABAP Development, SAP ABAP, CDS

Friday, 28 July 2017

How to Create,Change or Check FBI Customization

Normally in FPM we have direct option to create Customization , whereas in FBI we don’t have:

Standard FBI View how it looks, there is no option to create customization

SPA ABAP Tutorials and Materials, SAP ABAP Certifications

ABAP in Eclipse 2.80 benefits Eclipse Oxygen

On June 28nd Eclipse Foundation released the Oxygen release which is the newest version of the Eclipse platform. This release brings some nice improvements the ABAP Development Tools directly benefit from:

Improvements of the “Quick Access” field


  • You can now use * and ? as wildcards and also search for partial descriptions in Quick Access (Ctrl+3).

Thursday, 27 July 2017

CDS view test double framework Part-11

The CDS view test double framework works as a magic for me: how the mocked data I inserted into the view under test could be read again in unit test code? As a result in this blog I will try to explain how CDS view framework works under the hood.

The view I am developed is listed below, which is simply used to return material guid with description by joining table MAKT with MARA:

Wednesday, 26 July 2017

How does CDS view key user extensibility work in S4 Part-10

One of supported feature is customer can easily add new fields to extensible CDS view without knowing technical detail.

For example, if a given CDS view is marked as “UI Reports” extensible in extensibility registration tcode SCFD_REGISTRY.

ABAP CDS, ABAP Development, SAP S/4HANA

Tuesday, 25 July 2017

Cube view and query view Part-9

In previous eight steps all we focus on is transactional stuff. This time let’s touch some analytics stuff.

Let’s first create a most simple database table in ABAP backend:

ABAP CDS, ABAP Development

Monday, 24 July 2017

Associations in ABAP CDS(7.40)

I would like to present one simple example to explain Association in ABAP CDS view in 7.40 environment.  In this example i will not concentrate on theory we will just take 3 tables and try to show association.

Let us take one problem statement

Problem Statement– “Need the details of all employees having valid addresses in database either PERMANENT or TEMPORARY”

Saturday, 22 July 2017

Darkest Dark Theme for Eclipse with ADT

I really like Abap in Eclipse and work with Eclipse every day. But if you work every day with Eclipse it’s really exhausting for your eyes because of the bright UI.

So i searched for a possibility to use the dark theme with ABAP in Eclipse. I think many developers tried to use the standard dark theme in Eclipse.

Friday, 21 July 2017

Simple Program to view tables in single view

A lot of times we need to view data from different tables in a single view to perform analysis.

It could be analysis for development or production. In those scenerios we can create quick SAP Query – but problem with Query is that if two tables are not joined you cannot view data from two more more independent tables.

In those cases we can use the below report which will fetch data from different tables and present it in single ALV or Browser page. The report logic is as given below.

Thursday, 20 July 2017

First Experience with ABAP for HANA – Evolution or Revolution?

ABAP for HANA – Revolution or Evolution?


When taking part at CEI Trailblazer I learned that SAP tried out lots of different approaches to find the best programming model for ABAP applications on top of HANA. So we had to learn about the new toolset ABAP in Eclipse and many new ABAP frameworks and techniques – in fact all represented different approaches and programming paradigms. Some of those frameworks are revolutionary in the sense that they are powerful and sophisticated – but do they allow agile development and “taste” like SAP Business Suite? We tested very conservative techniques like Open SQL with HANA as primary persistence and it worked fine and often brings immediate success. I learned that other approaches fit perfectly to HANA like OData with its filter and paging techniques.

Wednesday, 19 July 2017

ABAP on HANA Optimization – Step by Step Remediation

1. STEP BY STEP TUNE YOUR CUSTOM ABAP CODE – HANAFIED


1.1 Introduction

Before Migrating to Suite on HANA or ABAP on HANA environment we need to analyse which of my ABAP code must be changed to avoid potential functional issues. In general existing ABAP code runs on SAP HANA as before
Only if ABAP code relies on technical specifics of the old database, ABAP code changes might be necessary.

Monday, 17 July 2017

Use Regular Expression to parse the image reference in the markdown sourcre code

As mentioned in my blog A Github repository issue backup tool developed by ABAP I am developing a tool in ABAP which can backup my github issues.

One of the functionality I would like to fulfill is to backup the images used in issue with markdown format as well. Take this issue of mine for example. This issue contains the reference to image files uploaded by me via dragging my local image files and drop them to the browser.

Saturday, 15 July 2017

A Github repository issue backup tool developed by ABAP

I personally prefer to use Github repository issue to manage my knowledge. For issue, this is my github repository to store ABAP and SAP CRM related knowledge of mine and currently it has already 285 issues.

ABAP Development, ABAP Tutorials and Materials

Friday, 14 July 2017

Step-by-step Guide to setup ABAP on HANA with Eclipse

Step by Step guide to install ABAP on Eclipse for HANA Development


This blog describes how to install and update the front-end components of ABAP Development Tools (ADT) for SAP ABAP on HANA.

I’m writing this blog as I see many people have asked questions about ABAP Development tool on Eclipse. One can take different approaches within Eclipse to bring ABAP development tool and this is one such approach. This blog is suitable for anyone who seeks to start the ABAP Eclipse setup or those who need of such information.

Thursday, 13 July 2017

Adding Custom Fields in WZR1,WZR2 and WZR3

Creating Additional Tab in WZR1/WZR2/WZR3

Now here is the document to show how to create an Additional Tab in WRZ1 (Settlement Request) screen. I did this as per my requirement which is for creating Payment Settlement Request.Here the data is coming from the IDOC to SAP server and to track the Payment Information the Settlement request is created and gets stored in the Standard WBRK table.

Now in this IDOC, it contains some IMP user specific data which needs to be stored ,it can be anything in my case it is  For Ex. IDOC number, IBAN number, SWIFT key and many more for which there is no fields provided in the Standard WBRK table. Now so as to store those values in WBRK table we need to create Custom Fields in WZR1 screen as well as in WBRK table.

Wednesday, 12 July 2017

Decimal Shift & Decimal Shift Back in CURRENCY_CONVERSION an Example

Below example explains the use of parameter DECIMAL_SHIFT and DECIMAL_SHIFT_BACK in CDS function CURRENCY_CONVERSION (ABAP 7.40).

First let us understand what does Standard definition says:

DECIMAL_SHIFT–  If the value “X”  is passed to the parameter decimal_shift, the value passed is multiplied by 10 to the power of two minus the number of decimal places of the source currency before it is converted.

Tuesday, 11 July 2017

SAP FICO ABAP Interface (Iine Items/Balance in currency transaction) error resolved)

One of the most important aspect of SAP FICO is the posting of the documents. Document postings can be done in several ways. When abapers use Interface or report program to post documents , they face many issues. Here I am discussing the solution of two of the most common issues for document postings  to the fico.

Frist scenario is related to lines Items postings. The second scenario is related to  the error ‘balance in currency transaction.

Sunday, 9 July 2017

Using the Rules Pattern to Improve Code Maintainability

The Root Cause


What is the root cause of all of this mayhem? In a word, unpredictability. It was impossible to gather all of the requirements at design time, and if working according to agile methodologies this would not even be attempted. Requirements evolve over time, new customers and business conditions come onboard, so even if the requirements analysis had been completely comprehensive at the beginning of the design process, new requirements would invariably crop up.

My summary of different approaches for annotation declaration and generation Part-8

During my recent CDS view explore I have experienced several ways of CDS view annotation declaration or generation. I list them in this blog for study purpose.

Approach 1: developer does not declaration explicitly, but backend generates automatically
Take this field for example:

SAP ABAP Tutorials and Certifications

Friday, 7 July 2017

Unveil the secret of @ObjectModel.readOnly Part-7

In my application with edit function enabled, I have set posting date as read only by using the annotation below according to sap help.

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP Guide

Thursday, 6 July 2017

Consume table function in CDS view Part- 6

Let’s try to resolve one real issue now. What we want to achieve is: in CRM we need a CDS view which returns the service order guid together with its Sold-to Party information, “Title” ( Mr. ) and “Name” ( blGMOUTH ).

ABAP Development, SAP ABAP Certifications, SAP ABAP Guide

Wednesday, 5 July 2017

Weak reference in ABAP and Java

Recently I have some recruitment interview on the topic Weak reference and I think it is necessary for me to refresh my knowledge on this topic.

According to ABAP help, we can wrap an object reference to the so called weak reference, for example see the following code:

lo_person = NEW lcl_person( 'Jerry' ).
lo_weak = NEW cl_abap_weak_reference( lo_person ).

Tuesday, 4 July 2017

Functional programming – Simulate Curry in ABAP

As I mentioned in What should an ABAPer continue to learn as an application developer, function programming language is a mind -blower to ABAPers who have got used to ABAP as an imperative programming language.

One of important concept in functional programming is Currying.

Currying intensively manipulates functions.

Monday, 3 July 2017

Lazy Loading, Singleton and Bridge design pattern in JavaScript and in ABAP

According to Wikipedia Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program’s operation if properly and appropriately used.

In this blog, I will use an example of SCN log on to illustrate its usage in JavaScript and how to simulate the implementation in ABAP.

Sunday, 2 July 2017

Singleton bypass Trap – ABAP and Java

Recently I meet with an issue using Spring which finally turns out that my bean is initialized multiple times although it is expected to be a singleton. As a result I look into the possible scenario that might bypass the expected singleton behavior.

This blog introduces two possible scenarios which will cause your singleton design fail to work as expected.

Friday, 30 June 2017

Gate Way Service Creation Using The CDS Views With Parameters

How to create the Gate Way service using CDS Views with Parameters and Without Parameters:

Pre-requisite is to learn basics about the Core Data Services , Basic understanding about SADL Frame work.

Step 1: Create the CDS view in Eclipse or Hana Studio.

Here I am creating two CDS views in Hana Studio

Creating CDS View for the House Bank Details

Thursday, 29 June 2017

SAP HANA ABAP: SQLScript: Functions Part-1

The Goal of AMDP implementation is always to remove any additional logic required at the abap layer i.e. avoid loops, further joins, formatting or data conversions. To achieve this, we can leverage HANA SQL functions to ensure the that the data being returned from AMDP is complete and needs zero or a light touch while passing to the ABAP Layer.

Wednesday, 28 June 2017

BOPF Creation Using CDS Views & ODATA Publish

Creating the business object using the cds views to enable ODATA service enabled:

1.Root node creation for example : ZBO_MARA (Root node)

For the root node need to specify the annotation: @ObjectModel.modelCategory: #BUSINESS_OBJECT

Zbo_mara is the Root node and created the associations with zbo_marc and zekpo nodes

@ObjectModel.compositionRoot: true

Tuesday, 27 June 2017

Database Connections – Prepublished

This blog is a prepublication of that documentation.

Database Connections


An AS ABAP uses database connections to access databases. A database connection defines the address of the database system (database host), the database user, and hence the associated database schema that is accessed. The Open SQL and Native SQL statements of an ABAP program use a database connection of the current work process to access a database. By default, the standard connection is used to access the ABAP database schema of the standard AS ABAP database. By opening a secondary connection, it is also possible to access databases or database schemas other than the standard database. This makes possible a number of options, for example, data can be passed to and committed in other databases or in other database schemas. The secondary database does not need to be part of an AS ABAP here, but it does need to be supported by SAP. Connections called service connections can also be used to access the standard database.

Monday, 26 June 2017

How to create CDS view which supports navigation in OData service Part 5

Continues Part 4 How does annotation @OData.publish work

So far we have a working CDS view ready for us to create a UI5 application on top of it via Smart Template in WebIDE within just a couple of minutes. Once done, the UI5 application will display the data from our CDS view like below.

Friday, 23 June 2017

How does annotation @OData.publish work Part 4

In part1 of this tutorial, the old way to create OData service on top of CDS view is introduced.

@OData.publish: true


Just add this annotation to your CDS view and the odata service is automatically created, no need for you to go to code SEGW any more.

Thursday, 22 June 2017

How is view source in Eclipse converted to ABAP view in the backend Part 3

Continue What objects are automatically generated after you activate one CDS view Part 2.

Let’s review what we have learned so far. Through SQL trace and debugging, we have learned below:

1. When we click activate button in ABAP development tool ( I call it Eclipse now in this blog ), there are several corresponding ABAP objects generated and table entries inserted. Through debugging we know lots of related logic are implemented in package SDDL.

Wednesday, 21 June 2017

What objects are automatically generated after you activate one CDS view Part 2

Continues Part 1 My CDS view self study tutorial – Part 1 how to test odata service generated by CDS view

You paste the following source code for a simple CDS view into ABAP development studio and activate it:

@AbapCatalog.sqlViewName: 'zjerrySQL0208'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'test 233'
@ObjectModel: {
   createEnabled,
   deleteEnabled,
   updateEnabled

Tuesday, 20 June 2017

SAP Screen Personas for Web Dynpro ABAP – Cross Session Scripting

Introduction


With SAP Screen Personas there is now the option to add client-side scripting to existing Webdynpro for ABAP applications. For a first introduction to scripting please have a look at the Overview Blog of Matthias Heitmann.

With scripting it’s now possible to automate re-occurring or complex tasks. However there is a technical restriction: The script is always tied to the (technical) application. There is no possibility to define a script, which runs across different applications or even different browser windows. This heavily limits the applicability of scripting for automation.

Monday, 19 June 2017

A list of some “magic” tables and reports I collect in my daily work for ABAP development

During my daily work I get to know the existence of some magic tables and reports which can enable me to achieve some work more efficiently and conveniently. Now I shared them with you.

  • Magic tables

    • CUS_IMGACH – IMG Activities
Suppose I know the BAdI definition CRM_PRODIL_ADD_DATA and I would like to find the customizing path in SPRO where I can also manipulate it. Unfortunately the where used list in SE18 does not support to search BAdI definition by customizing activities.

Saturday, 17 June 2017

How to test odata service generated by CDS view Part 1

Prerequisite


I have created two simple CDS views. They are:

@AbapCatalog.sqlViewName: 'z20160310'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'consume view test '
@ObjectModel: {
  type: #CONSUMPTION,

Friday, 16 June 2017

Step by step process to upload and download document in webdynpro abap

This document will provide the step by step process from uploading a pdf document from presentation server to application server and save the document from application server to presentation server.

Thursday, 15 June 2017

How to publish your GUI-based SAP List Viewer (ALV) report in ABAP Web Dynpro

In this blog I will explain how any GUI-based ALV report can be displayed quite easily in ABAP Web Dynpro (WDA). The development is based on two out-of-the-box ABAP-tools: Class CL_SALV_BS_RUNTIME_INFO and the List Viewer for Webdynpro. More information about this class can be found here and some excellent documentation for the List Viewer for Webdynpro can be found here.

Wednesday, 14 June 2017

An small example to learn Garbage collection in Java and in ABAP

Both Java and ABAP can support automatic garbage collection. As an application developer the GC process are completely transparent for us and in our application code most of the time we should never call the GC API provided by Java or ABAP. Nevertheless it helps us to write more robust code with comparatively lower memory consumption if we have some basic understanding about the trigger point of Garbage collection.

Tuesday, 13 June 2017

Repository Information System for WebClient UI component context node and their attributes

Some key requirements:


1. I would like to know how many UI Component has used component set for example PROD_ALL defined in runtime repository.

SAP ABAP Development, SAP ABAP Tutorials and Materials

Monday, 12 June 2017

Test Seams and Test Injections simplify ABAP Unit Tests

Introduction


I will describe my experiences with ABAP Unit Tests and Test Seams. The techniques described here can be used for new code, but they are especially valuable while working with Legacy code.

Legacy Code is defined by Michael Feathers as Code without tests. Andrea Goulet defines Legacy Code as code without communication artifacts. This is a modern interpretation of the word. So in this definition a code that is new, can be called Legacy Code even by the developers who wrote the code. Just because they did not add the tests or communication artifacts they would have needed to maintain their own code properly.

Saturday, 10 June 2017

ADBC and JDBC

Recently during my self study on PostgreSQL I made some practice to connect PostgreSQL in Java programming using Java Database Connectivity – JDBC. In fact I found out that there are lots of commonality between these two technologies.

There is a demo program demo_adbc_query mentioned in SAP help to demonstrate the use of ADBC.

Thursday, 8 June 2017

Writing DCLs on Union Views in CDS – Part 1

Let us consider the following scenario:
  • There are 4 CDS views V1 , V2 , V3 and V4
  • There is another  CDS view V5 which is a union of views V1,V2,V3,V4 .
Now there is a DCL required to be defined on V5 which is a union view, which should display only authorized records from these 4 views V1,V2,V3 and V4.

When AND/OR condition is used between aspect pfcg_auth statements in a DCL, the requirement is not fulfilled because, when one of the four views pass through the authorization, it applies its result to rest all three views and similarly when any one of the view fails to pass through the authorization, even then it applies its result to rest all three views. So either all records get displayed or none get displayed because of AND/OR logic, which is not expected in the current scenario

Wednesday, 7 June 2017

Play around with JSONP in nodeJS server and ABAP server

In my blog Cross domain request in ABAP and Java with two workaround I introduce the step how to deal with Cross Domain issue using Cross-origin resource sharing ( CORS ) supported by almost all modern browsers.

And there is another alternative for cross domain issue, that is JSONP which can work on legacy browsers which predate CORS support.

Tuesday, 6 June 2017

SAP HANA ABAP: SQLScript Date/Time Functions

As we all know that in any reporting or data analysis system, the main objective is to convert the source data into the meaningful information which can be of business relevance. This is to facilitate the stake holders to take decisions effectively and efficiently.

If we break the above scenario to the HANA developer level, we need to have the knowledge on various functions available in SQLScript to develop a meaningful information for reporting and make our life easier as a developer.

Monday, 5 June 2017

SAP HANA ABAP: CDS/AMDP – The Real Picture

CDS and AMDP have been talk of the town since long time. SAP HANA Developers are trying their level best to try their hands on both of these artifacts. Not to mention they face a lot of challenges while achieving all their reporting requirements using these, which were being done at ABAP layer( SE38 ) previously

Challenges/Solutions:

1. In understanding what’s the difference between the performance of a simple select query which is written at the ABAP Layer and the same select query written at the DB layer using CDS or AMDP using SQL Script Code.

Friday, 2 June 2017

ABAP OO Event handling (register/unregister)

OO Events is very imported and handling them is very easy in ABAP.

We need handler method to register event

METHODS : handle_event_raised FOR EVENT event_raised OF lcl_event_raiser.

then we need to set this method as handler

SET HANDLER me->handle_event_raised FOR i_raiser.

Thursday, 1 June 2017

Build an Cross Site Scripting example in Java and ABAP

In this blog, I just show how to build a simple XSS example in Java and then try to implement the same in ABAP as well.

I have a github repository where a simple Java Servlet is developed.

Simply clone it locally and run as Server via url: http://localhost:8080/jerrytest, and it will print out the user gent field of the current http request.

Wednesday, 31 May 2017

The Prototype Design Pattern At Work

In this blog, see how the prototype design pattern is used for item cloning in an ABAP system.

Item Clone

In this example, we will work on an imaginary purchase requisition application where the user has to enter the vendor code (LIFNR), material number (MATNR), unit price (PREIS and WAERS), and quantity (MENGE and MEINS) into the GUI. We will want it to be possible to enter multiple line items.

Monday, 29 May 2017

Step by step to use jChartFX in BSP application

In my blog CRM One Order statistic tool I develop a small tool to print out the statistics of number of assigned line item for all business documents in the system.

The tool has the following three sections of output in SAPGUI.
This section means there are 1 order which has 5000 line items, 1 order has 2000 items, 1 order has 1998 items …

Friday, 26 May 2017

Replicate ABAP database table definition to PostgreSQL

Recently I am doing self-study on PostgreSQL which is a very popular object-relational and open source database.After I have played around with it a while I have great interest to replicate some of my CRM table to PostgreSQL and manipulate the table there for practice purpose.

The table in PostgreSQL could be created via command line or SQL script, the latter works almost exactly the same as what we do in HANA studio, which means a developer who has HANA studio development experience can pick up PostgreSQL very quickly.
Suppose I have to create a new table in PostgreSQL which has exactly the same fields as the table COMM_PRODUCT in CRM:

Wednesday, 24 May 2017

ABAP ICF handler and Java Servlet

This blog will not introduce how an ICF handler class in ABAP or a Servlet in Java are developed, but focus the way those instances of handler class or Servlet are spawned by Web Server.
Let’s first study the Servlet spawn behavior in Java.

Servlet in Java


According to Servlet specification, http request against a given url will be served by the same single instance of servlet.

For example, I have developed a simple Servlet which just returns “Hello world” as response. I map it with url starting with “/Hello”.

Monday, 22 May 2017

PO Service line item quantity exceed validation against PR quantity…

Scenario


Service PO creation / change scenario – Service Quantity increasing more than requested in PR.

If we are creating PO with respective to RFQ, we can increase the any service line item quantity whatever we wanted. There is no proper SAP validation exist in PO for the POs which are created with reference to RFQ. This scenario is related to only service POs.

Friday, 19 May 2017

Thursday, 18 May 2017

Interface In between SAP and MULESOFT

  • Introduction

This Document gives an in-detail approach to create an interface in between SAP and COUPA, with help of MULESOFT middleware application. It has step by step activites to be done in both SAP and MULESOFT applications. Technically Mulesoft integration is very stress-free comparatively with other middleware applications to interact with could base applications.

Wednesday, 17 May 2017

Use ABAP Channels to build a trace tool used in my daily work

In that blog some demo examples are explained. After going through those impressive tutorials and demos, have you ever thought about building some useful stuff for your daily work by leverage this powerful feature in ABAP?

As ABAPers we use various trace / monitor tools in our daily work, such as SAT and ST05. And in CRM, all business transactions are managed by so called One Order framework. This framework uses function module CRM_ORDER_MAINTAIN to create, update and delete the document.
Just look at this long list of importing parameters

Tuesday, 16 May 2017

Functional Programming – Try Reduce in JavaScript and in ABAP

In that blog I use the curry idea in the example below:

SAP ABAP Tutorials and Materials, SAP ABAP Certifications

output:

jerry-java

In this blog, as blog title, I will show another approach by leveraging built-in function reduce in JavaScript Array and Reduce keyword in ABAP to fulfill the same requirement.

Monday, 15 May 2017

A real case to use REDUCE to finish a task in daily work

Have you ever used REDUCE keyword to resolve a real task in your daily work? For me not till today.

There is a table CRM_JSTO which stores the object guid together with the status object name it uses.

SAP ABAP Tutorials, SAP ABAP Guide, SAP ABAP Syllabus

Friday, 12 May 2017

Locators in ABAP Open SQL

Recently I learned a new approach to access database table content without having to transport the column data into ABAP program using locator.

I make modifications on this sample. The modified one:

REPORT demo_db_locator.

DATA: otr_text_locator TYPE REF TO cl_abap_db_c_locator,
      length           TYPE i.

DATA: pattern  TYPE string VALUE 'ABAP',
      lv_index TYPE int4 VALUE 1.

Thursday, 11 May 2017

Merge table cells vertically in adobe table

One of the common requirements for complex table design in adobe forms.

Step 1: Create table.

SAP ABAP Tutorials and Materials, SAP ABAP Adoble

Wednesday, 10 May 2017

Simple Remote Query

Introduction


I thought that this way to handle data type could be also useful for reading specific database records defined on backend system database. Remote database records can be read by means of META_READ_TABLE and RFC_READ_TABLE standard function modules;  these modules are useful and powerful but for sure they are not developer-friendly because of its table parameters: options, fields and data. In details:

Tuesday, 9 May 2017

Cross domain request in ABAP and Java with two workaround

Cross Domain Request in ABAP


Create a new ICF node in tcode SICF, implement the following source code in its handler class.

SAP ABAP Guide, SAP ABAP Tutorials, SAP ABAP Certifications

Friday, 5 May 2017

Virtual Fields in CRM Reporting Framework

Use Case


In one of our applications, we have a search over the 1Order documents.

It uses the tables:
  • CRMD_SRV_SUBJECT (Service Subject) and
  • CRMD_SRV_OSSET (Service Subject Reference Object).
However, we need to pass the following “Reasons” as search criteria.

Thursday, 4 May 2017

NoITAB – A Stack

Internal Tables


ABAP’s internal tables are dynamic data objects that allow to process large quantities of data with the same structure, thereby taking care of dynamic memory management. So they are good at storing database table data and this makes them ubiquitous.

There seems to be no alternative. Complex data structure are usually mapped to internal table to avoid additional effort to implement a special data structure that will probably have poor performance anyway.

Wednesday, 3 May 2017

Change log for Z-Table Maintenance (via SCDO)

Generally we don’t need table logging for custom table maintenance (SM30), but it is important and needed for some cases. All customizing tables are automatically recorded by default but if you use regular Application tables (master and transaction data), you’re about to get your hands dirty .)

SAP ABAP Tutorial, SAP ABAP Materials, ABAP Guide, ABAP Certifications
Sample Z-Table

Tuesday, 2 May 2017

Add documentation in Custom Program (.docs)

Introduction:


I am going to show, how we can add documentation in Custom program.

I have searched in SCN network too many times, to achieve this functionality but not get any clue, so i have decided once i will achieve this functionality in my program. I will write regarding this functionality, I know this is very small thing however i have spoiled one day for this.

Monday, 1 May 2017

Eight different sort algorithms implemented in ABAP

Some application developers think that it is enough to know SORT keyword and how to use sorted table in ABAP for their daily work without knowing how SORT is done internally. For me I can not say this assumption is wrong. I personal preference is to know something more thoroughly. We have learned various sort algorithms in the university, here I just list my implementation on some of them using ABAP for my personal study purpose.

For each sort algorithm I will create a static public class with a sort method which accepts an internal table with unsorted Integer and an output table which are sorted. For simplification reason the element in the internal table only consists of unsigned integers ( >= 0 )

Sunday, 30 April 2017

Bitwise operation ( OR, AND, XOR ) on ABAP Integer

For training purpose I need to explain to my ABAP team colleagues about how bitwise operation on Integer in Java like below is done.

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP Guide

Friday, 28 April 2017

Adding UAN Number to PaySlip – Enhancing HINCEDTO Program

Employees Provident Fund Organisation, India (EPFO) has launched a Universal Account Number (UAN) to provide a number of facilities to its members through a single window. In SAP a new subtype 08 ( Universal Account Number ) has been created for Infotype 185 to store Universal Account number.

Basically we design payslip through HR form editor ( Tcode PE51 ) and we add tables, fields to HR Form classes (PE51_Checktab).

Thursday, 27 April 2017

String Template in ABAP, ES6, Angular and React

As an ABAP you probably be very familiar with String Template.

String Template in ABAP


A string template creates a string from literal text, embedded expressions, and control characters in a string expression. The most powerful feature I like is we can insert ABAP variable inside the template by wrapper variable with “{ }”, see one example below:

Wednesday, 26 April 2017

Tag(Marker) Interface in ABAP and Java

“Specific predefined global interface. By integrating the tag interface, classes or other interfaces stand out against the ABAP runtime environment. A tag interface generally does not contain its own interface components, but instead assigns a particular task to the integrating classes or interfaces and changes the way they are handled by the ABAP Compiler.“
And in fact this is not a specific concept of ABAP, but exists in many other language as well.

ABAP tag interface


One of the most famous tag interface in ABAP is if_serializable_object.

Tuesday, 25 April 2017

OOP Updates in ABAP 7.4 and ABAP 7.5

SAP introduced the concept of OO programming in ABAP in the year 2000. Since then, it’s been the recommended method of programming. Let’s describe the new features of ABAP that relate to OO programming.

1 Upcasting/Downcasting with CAST


In OO programming, a downcast is a process in which you turn a generic object, like a monster, into a more specific object, like a green monster. An upcast is the reverse. This functionality has been available in ABAP for a long time, but it gets a lot easier in 7.4.

Monday, 24 April 2017

Setup ESR connection between ABAP system and AEX (ERP to PO / SPROXY)

Check Transaction SPROXY on the ABAP system to ensure that ESR of PI/PO is connected.

If this is not given, you need the following setup steps:

1) Create 2 RFC destinations (Type G) on your ABAP System.

The name of the first on has no naming convention. This name will be used in sxmb_adm as URL.

Sunday, 23 April 2017

Various Proxy Design Pattern implementation variants in Java, ABAP and JavaScript

This blog gives an introduction about various proxy design pattern implementation variant in Java and ABAP.

Below paragraph is quoted directly from Wikipedia:

“A proxy, in its most general form, is a class functioning as an interface to something else. The proxy could interface to anything: a network connection, a large object in memory, a file, or some other resource that is expensive or impossible to duplicate. In short, a proxy is a wrapper or agent object that is being called by the client to access the real serving object behind the scenes. Use of the proxy can simply be forwarding to the real object, or can provide additional logic. In the proxy extra functionality can be provided, for example caching when operations on the real object are resource intensive, or checking preconditions before operations on the real object are invoked. For the client, usage of a proxy object is similar to using the real object, because both implement the same interface.“

Friday, 21 April 2017

Covariance in Java and simulation in ABAP

I am the trainer of one standard course “Programming Language Concept” within SAP and there is a set of concept Covariance and Contravariance, which has only built-in support by a subset of programming language like Java. For those ABAPers who don’t have chance to touch this concept in their daily work, I have built a small example to simulate how the concept works in ABAP as well for ease of understanding. The example explained in this example is just a prototype purely for training and education purpose.

Thursday, 20 April 2017

ABAP Call Monitor (SCMON) – Analyze usage of your code

Do you know that on average 60% of your custom code is in reality not executed in your productive landscape? Especially in SAP Business Suite migration projects like to SAP HANA or SAP S/4HANA such amounts of unused code result in huge adaptation efforts. Therefore SAP’s recommendation is to clean up your unused custom code before migration. But how can you identify the code that is not used?

The purpose of the ABAP Call Monitor (transaction SCMON) is to monitor the execution (usage) of ABAP code (function modules, method calls etc.) in your productive system. The advantage of the SCMON compared to the UPL (Usage Procedure Logging in SAP Solution Manager) is that using this tool you not only collect the usage data (how often a specific ABAP object was called), but also the information about the calling business process. Therefore as a result of the monitoring, you get a list of business transactions (callers) along with all ABAP objects that have been called within these business transactions including the number of calls.

Wednesday, 19 April 2017

Create dynamic proxy persistently in Java and ABAP

In my blog Implement CGLIB in ABAP I demonstrate how to create dynamical proxy class via CGLIB in Java and ABAP. The generated proxy class is actually a subclass which inherits the base class. Such class created by CGLIB is transient, which means the life time of generated class is only within the current session where it is created, which will not be persisted.

In this blog I will show how to create a globally persistent proxy class dynamically in Java and ABAP.

Tuesday, 18 April 2017

Simulate Mockito in ABAP

What is Mockito?

Mockito is a mocking framework, JAVA-based library that is used for effective unit testing of JAVA applications. In our unit test there are usually some dependency on other external service implementation for example network or database service. Usually in order to isolate our test code from these dependencies we have to create mock class against them. Mockito in Java can create transient mock class ( which is only available in current test session ) for us in a very easy way. See one example below:

Monday, 17 April 2017

Implement CGLIB in ABAP

What is CGLIB?

A Byte Code Generation Library which is high level API to generate and transform Java byte code. It is used in various scenarios such as AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access.

See one example in unit test.

In line 17, a new dynamic proxy class is generated as mock.
In line 19, we tell the proxy, “if get(0) is called on this mock class, then return mocked data “hello, world”.

Saturday, 15 April 2017

General properties of ABAP Classes / Interfaces

Every day you create or change ABAP class in class builder. When you activate your change, have you noticed a series of objects with several “=” in the middle part of each?

SAP ABAP Tutorials and Materials, SAP ABAP Guide, SAP ABAP Certifictions

Technically speaking, an ABAP class consists of several parts. In order to figure them out, I just create a simple class with the following source code:

Friday, 14 April 2017

Integer in ABAP, Java and JavaScript

When I first begin to program with ABAP I get confused with different kinds of integer type available for ABAP developers: i, int1, int2, int4, and int8.
According to ABAP help, predefined data types consists of two types:

1. predefined ABAP types: b, c, d, decfloat16, decfloat34, f, i, int8, n, p, s, string, t, x, and xstring.
2. predefined dictionary types: INT1, INT2, INT4, INT8,DEC,DF16_DEC,DF16_RAW,DF34_DEC,DF34_RAW and FLTP.

Thursday, 13 April 2017

How to write a “correct” program rejected by compiler: Exception handling in Java and in ABAP

Recently I am prepare an internal training and have been racking my brains to find a real example for my attendees about writting a “correct” program which gets rejected by compiler. The tricky point here is as a programmer, we always treat compiler as our god: if compiler complains that our program has errors, then we are wrong. Programmers tend to believe in that compiler will NEVER make mistakes.

SAP ABAP Tutorials and Materials, SAP ABAP Guide, SAP ABAP Certifications

And finally I got inspiration from Alexandru Constantin Bledea’s github.

Wednesday, 12 April 2017

Renaming objects in ABAP for Eclipse

If you want to rename ABAP classes, methods or variables you have two possibilities: Feel the pain or use Eclipse…

It’s pretty simple! Just right click on the object and choose “Rename”:

SAP ABAP Tutorials and Materials, SAP ABAP Cetifications, SAP ABAP Guide

Tuesday, 11 April 2017

Local class in ABAP, Java and JavaScript

Local class in ABAP


Suppose I have a global class with a public method ADD with following signature. I would like to implement with a local class inside this global class.

SAP ABAP Tutorials, SAP ABAP Materials, SAP ABAP Certifications, SAP ABAP Guide

Monday, 10 April 2017

Four different TEST ISOLATION techniques to build your ABAP unit test

As far as I know test isolation is widely used in SAP internal to build unit test code, at least in my team. Test isolation in unit test means that in your production code you make use of some API(class method/Function module) which are developed by other team, and you would not like to really consume them during your unit test, since you would not accept that most red lights in your unit test report are caused by the bugs in those external API,right? Instead, you expect that the call of those external API during your unit test execution will be replaced by some dummy code written by yourself.

Friday, 7 April 2017

How to configure transports of XS Classic native applications

CDS view with input parameters consumption via OData

I decided to write this blog after I spent a lot of time in figuring out how to consume the CDS view with input parameter via OData.Hope this helps

CDS view with input parameters require a special syntax when you are making a call via OData. The steps to be followed in the CDS View are:
1) Annotations: Odata.publish:true
2) If you have Date field as your input parameter with datatype as Dats ,it might create an issue so cast it to Char. You will get the following error in that case:

Wednesday, 5 April 2017

Try to access static private attribute via ABAP RTTI and Java Reflection

In ABAP we can define a static attribute for a class via keyword CLASS-DATA, whose validity is not associated with instances of a class but with the class itself. In order to prove this fact I use the following simple Pointer class for demonstration:

class ZCL_POINT definition
  public
  final
  create public .
public section.

Tuesday, 4 April 2017

Searching the ABAP Keyword Documentation

The ABAP Keyword Documentation is what appears when you hit F1 on ABAP statements in the ABAP Editor in SAP GUI (SE80, SE38, SE24, …) or in ADT. Hitting F1 triggers a search. The ABAP Keyword Documentation framework analyzes the context of the current cursor position and tries to find the most appropriate document(s). That works rather good for ABAP keywords. It is a bit less reliable in expressions.

The basis of the search is an index table that is generated from keywords attached to the documentation topics. E.g., if you use F1 on DO, there is an entry like “DO, ABAP Statement” in that table and the context sensitive search will recognize that the cursor is placed on the first word of the statement and will directly call the respective document.

Monday, 3 April 2017

Using KeePass to logon to a ABAP Project in ABAP in Eclipse

Many systems with many clients means many passwords to me. And if I do want to make things right, I need to use a password manager (and generator) for this task. To manage my logons I am using KeePass, from which I can directly access the systems via SAPGUI.

For to be able to use KeePass also for to logon in ABAP in Eclipse, I would appreciate very much, if you could change the title of the Logon Window from “Logon to System” to “Logon to System for ABAP Project <name of the project>” or any other title which at least contains the name of the ABAP project.

Saturday, 1 April 2017

Stateless and Stateful – Different behavior in application side

In this blog I will explain how stateful and stateless BSP application behave differently.

The test BSP application I am using



SAP ABAP Tutorials, SAP ABAP Materials, SAP ABAP Guide, SAP ABAP Certifications

It consists of three files.

Thursday, 30 March 2017

What is RICEF?

You can see RICEF acronym, when you look at the most SAP ABAP Developer job position descriptions; and you can sometimes encounter RICE version of it. So what does RICEF stand for?

Firstly let’s look at some SAP job posting examples:

  • Able to scope, review, and create SD RICEF…
  • MM RICEF Functional Spec Exp…
  • Must have experience supervising a team and writing RICEF…
  • Must be very proficient in all aspects of RICEF developments…
  • Interact with business users to analyze the requirements and technical desings of the RICEF objects…

Friday, 24 March 2017

An ABAP test case pattern using fixtures inspired by Javascript

An ABAP test case pattern using fixtures inspired by Javascript


21.03.17 – Frank Gales

After years of ABAP development I some years ago moved to Javascript but I’m for a short intermezzo doing some ABAP development again. In Javascript in my team we do have a pattern for test fixtures that evolved during time. A test fixture is a set of test data.

Here is the pattern. It is mostly JSON so it should also be understandable for ABAP developers. In order to get the most benefit out of a test it should be easy to add a new fixture (test data set) e.g. to cover more edge cases or after a bug is found to have that specific context covered in a test.

Monday, 20 March 2017

Java byte code and ABAP Load

I use this small blog to help my new colleagues on board who have Java programming background to understand the hello world example written in ABAP.

Hello World example in Java


The following example could be done in pure text editor without Java IDE. You should have JDK installed as prerequisite and corresponding environment variable setup correctly.
Once done, type javac -version in command line, you should see the following output: ( result may vary based on your JDK version )

Thursday, 16 March 2017

Abap Syntax Highlighter and code folding in Notepad++

Editing Abap code with Notepad++

Maybe like me, you are doing some remote work with using RDP connections or Citrix. It can be very slow sometimes even if you tweak the settings of your RDP connection or Citrix by putting an awkward 8 bit resolution, something unheard in the first quarter of the twenty first century… I often experience lags and slowdown that makes me sometimes very angry. Using a SAP logon connection through RDP can be a very frustrating experience (especially if you are in China like me…)

Wednesday, 15 March 2017

Fibonacci Sequence in ES5, ES6 and ABAP

The concept of Fibonacci Sequence or Fibonacci Number is widely used in many programming books.

It could be defined via the formula:
F(0)=1,F(1)=1, F(n)=F(n-1)+F(n-2)

In ES5


In ES6 there is a feature so called “generatorFunction” which can achieve the calculation of Fibonacci Sequence in a very convenient way. But before we really enjoy the built-in language feature, let’s first see how to simulate it in ES5.
Here I use the closure in JavaScript to store the current round of calculation and return a new function for next round trigger.

Wednesday, 8 March 2017

SAP Table Maintenance Tool

Whether it is a functional or technical transaction or a basis transaction, everything in SAP or for that matter in any technology, boils down to database, and as we know database means tables. Apart from the standard tables that SAP has, a business will usually have to create many ‘Z’ tables for its custom development. Many times a business ends up with hundreds of custom tables and always their maintenance is a real cause of concern as the usual maintenance tools in SAP have their own issues. Usually, a table in SAP can be maintained in three ways,

            1.Through ‘SM30’ (Table Maintenance)

            2.Through SE11 

            3.Via custom transaction.

Monday, 6 March 2017

How to use SQL window functions in ABAP CDS views

I would like to consider a case of using Windows Fuctions in ABAP CDS views based on data in S/4HANA system.

I also take case of some features like:
  • Main CDS view syntax and semantics
  • Parameters in CDS views
  • Consumption options of CDS views

Friday, 3 March 2017

How to trace authorizations in ABAP CDS views

Now it is time to trace and troubleshot. I’am going to explain this thema based on analytical query CDS Z05_C_FlightByAirportQuery which is based on Cube CDS view Z05_I_FlightByAirport.

Access control was defined for the Cube CDS view in previous post:

@EndUserText.label: 'Role for Z05_I_FLIGHTBYAIRPORT'
@MappingRole: true
define role Z05_ROLE {
    grant select on Z05_I_FlightByAirport
     where ( Airline, FlightDate) =
            aspect pfcg_auth (  ZS_NEW,
                                CARRID,
                                FLTDATE,
                                actvt = '03' );

Thursday, 2 March 2017

Code visualization using Moose

It is now possible to extract model information from a SAP system to analyze it using Moose in a Pharo virtual machine.

Pharo is a kind of Smalltalk and heavily used by specialists who develop techniques for code visualization especially for refactoring. The SAP model data is extracted using FAMIX, this allows a more detailed analysis as would be possible using UML. This is now possible due to a new open source extractor.

Wednesday, 1 March 2017

Standart DEMO Examples of ABAP CDS views

This post was created to show standard ABAP development package with could be very useful for:

  • ABAP programmers starting  to use CDS views functionality
  • Application consultants (e.i. in case of customer CDS views enhancements should be done or some standard CDS view results don’t seem to be correct)

You could find a package SABAPDEMOS in HANA Studio ABAP perspective in case of S/4HANA system (or in SE80 t-code). There are a lot of useful things there.

Thursday, 23 February 2017

How to consume a hierarchy in CDS view analytical query

In my previous post “How to build a Custom Hierarchy in ABAP CDS views” I create a custom CDS view with hierarchy based on HCM Area tables.

Now we will create a analytical query:
  • Show how to enable hierarchy in a query
  • Open it in RSRT to test purpose
  • Find it Query Browser Fiori App and open with Disign Studio template (0ANALYSIS)

Wednesday, 22 February 2017

How to build a Custom Hierarchy in ABAP CDS views

I was interested in standard analytics capabilities of HCM in S/4HANA (1511) and Orgunit Hierarchy realization in ABAP CDS views.

I. Find a standard HR hierarchy

I started with Query Browser Fiori App and wanted to find standard analytical queries by HCM components like HR-PA, HR-PD, HR-PT, HR-PY etc. But there was not one unfortunately.

After this I went to ABAP dictionary to find where main HR tables, like HRP1000, HRP1001, PA0001 are used. It is possible to find DDL Sources.

Friday, 17 February 2017

How to create/update a contact person(both mobile & telephone) of a customer using cmd_ei_api=>maintain

Introduction:
  • This document shows how to create/update contact person (VAP1 tcode) of an existing customer using the class cmd_ei_api and its method “maintain”.
How to create/update a contact person(both mobile & telephone) of a customer using cmd_ei_api=>maintain

Wednesday, 18 January 2017

Bypass CDS view name case conversion in ABAP source code pretty printer

Some colleagues complained that when they consume CDS view in ABAP source code, for example the view below: I_Product

Bypass CDS view name case conversion in ABAP source code pretty printer

Tuesday, 17 January 2017

Tracking SAP system from Email

Sometimes during system refresh or upgrade, basis team forget to turn off the mail settings in SCOT. This results in sending emails from non productive environment and creates a big impact for business and increases support team effort. In this blog, I would like to explain how to trace the system which has triggered the email and steps to remove from user’s inbox.
  1. Get an original email received by the user. This needs to be received as mail attachment and not forwarded
  2. Open the email and click on File->Properties
  3. In the Internet headers section, scroll down until you find Date, From, Subject.
  4. Note the IP address in the Received section.

Thursday, 12 January 2017

Add a Custom Screen on Purchase Requisition Header By Replacing Standard GUI Status

I had saw some threads/posts in SAP forums, they were asking for the solutions on how to adding a custom screen/tab on the purchase requisition. But just as my knowledge, SAP has not provided any user-exit/Badi/SMOD for enhancing the screen of header part of purchase requisition.

And as we also know, purchase requisition database designing is different from other businesses object documents. A general designing of database table for business documents should commonly have Header and Items, some has Schedule Lines. For example, EKKO and EKPO for purchase order, VBAK and VBAP for sales order, BKPF and BSEG for FI documents……

Wednesday, 11 January 2017

zSQL: A tool to execute SQL statements directly in sap

Sometimes i need to write sql statements and get results immediately in abap. To handle this requirement, i create a test program, write my sql in it and debug to investigate results.  It’s difficult and time consuming work so I have developed an SQL tool for ABAP Programmers to allow them to run select statements directly in SAP, confirm or discover relationships and see data side by side.

Tuesday, 10 January 2017

Make great software

I wrote about the need for an 10 years old ABAP developer to update programming skills in order to align them with the market’s current requirements, an important aspect in everyone’s career, including both in-house and freelance consultants. Then I introduced the example of a guitar shop owner named Mike who needs an app within SAP to keep tracking of his instruments. Silly example since everything could be done with the standard, I know, but a good exercise to put programming concepts into practice.

After succesfully passing the two tests implemented for the add_guitar() method in the inventory class, the next step is to implement a search() method.

Monday, 9 January 2017

Friday, 6 January 2017

Do you know the Catmull-Rom algorithm ?

Well, the requirement is easily expressed… but not easily achieved…

This algorithm is used mainly in the field of 3D rendering to have smooth curves.
My implementation works only on one dimension which is the height.

I give here a short program (sorry for the naming conventions but it is mainly intended to show the results of the algorithm) displaying some points and the interpolated curve. You can change the values in the SELECT-OPTIONS and see the curve related to the new values.

Thursday, 5 January 2017

How to use Windows PowerShell Script inside ABAP

Windows PowerShell is a mix of command-line shell and scripting language. You find more Information about PowerShell  here.

With the free COM library ActiveXPosh.dll from SAPIEN you can also use PowerShell inside ABAP.

Here an example how to get all services and its state.

Wednesday, 4 January 2017

SAPscript forms breakdown tool

Overview

“SAPscript forms breakdown helper” is a free tool for analysing forms. It has different features to help you understanding the structure of a form and the used SAPscript commands. Therefore you are quickly ready to decide what has to be changed to fulfill your requirements. Please note that you cannot make changes to a form with this tool. That’s the task of transaction SE71 which you can easily call from the tool.

Tuesday, 3 January 2017

BOPF Change Tracker

This article describes BOPF Change tracker. It is a tool which allows you to track any changes of any data in BOPF. We have similar functionality in BOPF Test UI but The Change tracker is much stronger and generic.

Monday, 2 January 2017

Using chained statements to imitate varargs in ABAP

In other programming languages (like Java for example) there is a concept called varargs for method parameters. Instead of having to build an array by hand you can just pass your elements separated by a comma to the method and the runtime/compiler will make an array for you and pass it to the method. It looks like this: