Friday, 12 July 2019

Currency and Unit conversion in ABAP CDS views

Recently, I’ve been checking some examples of unit and currency conversions based on ABAP CDS views and I noticed is quite common to find people applying manual conversions in the formulas.

A simple example of a days to years conversion is conceived with a multiplication of the original value by 365, for more complex situations like an expansion of this same conversion from days to months and years a CASE statement is implemented to adjust the output of the value.

Wednesday, 10 July 2019

How to create an openApi Rest Service from an oData v4 Rest Service with SAP Netweaver ABAP

Motivation and Introduction:


Rest Services are very popular and widely used. But Rest is only a programming paradigm and or an architectural approach as such it doesn’t set up any contract how services are offered, and which format the payload will have finally.

Monday, 8 July 2019

Step-by-Step Archiving of Material Documents

1. Step by Step Archiving Procedure for Material Documents Archiving:


Archiving Object MM_MATBEL is used for the archiving of Material Documents.To perform data archiving in the SAP system, SARA transaction code is used. This is the standard method for executing the Archival.

Sunday, 7 July 2019

Read COMM port using ABAP w/o third party software

Case: Weighbridge scale sends the weight data to COMM Port.

Earlier we had to write a .NET program using SAP.NET Connector (Using VB.NET) and then from SAP side we had to create RFC so that the COMM port data gets utilized in SAP.

Now there is no need to use the third party software (VB.NET, C# etc) Using the following steps we can directly fetch the weight data at the COMM Port to SAP:

Saturday, 6 July 2019

How to create OData for GET operation in SAP Cloud for Customer System ?

Open Data Protocol (OData) is an open protocol which allows the creation and consumption of quarriable and inter-operable RESTful APIs in a simple and standard way.

This blog post covers the step by step process for beginners on how to create the OData service for GET operation in the SAP Cloud for Customer System.

Friday, 5 July 2019

Excel Data to Internal table using ALSM_EXCEL_TO_INTERNAL_TABLE without additional code

This blog post will help you avoid extraneous code every time you create Excel upload program by creating a simple Interface and a structure.

Before I came across FMs like TEXT_CONVERT_XLS_TO_SAP and SAP_CONVERT_TO_XLS_FORMAT, I used  ALSM_EXCEL_TO_INTERNAL_TABLE widely.
For ALSM_EXCEL_TO_INTERNAL_TABLE, explicitly we need to write code to transfer output of this FM into internal table of desired format. For this we have to map column number of FM output with columns of required internal table using

Wednesday, 3 July 2019

ST Transformations: XML 2 ABAP, a working example

Note: this post is not about the differences between XSLT and ST, it’s just a little example for quickly understanding the general structure of a Simple Transformation.

Monday, 1 July 2019

Comparative Analysis with S/4 HANA Embedded Analytics

Comparative Analysis is a common requirement, for example, Y2Y. The challenge is to model CDS View in such a way that make data selection flexible and easy for both reporting period and reference period.