Friday 31 December 2021

Flexible Delivery Document Numbering in S/4HANA 2020

Requirement: Number Range for Delivery number must be determined based on following parameters.

Delivery Type

Shipping Point

Creation Year

Solution: In S/4HANA, new solution using CPF is available for determining number range for Delivery document numbering.

System will generate a CPF decision table with parameters as columns. We have to maintain different combinations of values and corresponding number range interval.

Thursday 30 December 2021

Adding a Value Help for Custom Business Object fields

The Custom CDS View app can be used to create customized value helps for custom business object fields of type Association to Business Object.

The value help view needs to have the associated custom business object as primary data source. 

Prerequisites

◉ You have checkmarked Can Be Associated in the custom business object you want to associate.

◉ You have used the associated custom business object view as Primary Data Source in the Custom CDS Views app.

Wednesday 29 December 2021

How to Process Multiple Files from Application Server via ABAP Program

In this Blog Post we will understand how to process multiple files of certain File Masks from Application Server (AL11) via ABAP Program.

Lets try to understand it via following steps :

Input to our Executable Program will be following 3 parameters:

◉ File Mask for processing Files from Server (e.g. ABC* , files starting with ABC*)

◉ Directory path from Application Server where File are stored.

◉ Process Chain to execute that consists of steps for Processing this Files.

Tuesday 28 December 2021

Validate Application Interface Framework (AIF) Value Mappings by Domain

Introduction

In a customer project we defined quite some AIF Value Mappings and noticed that Users can insert any Data into the Value Mapping Table. We wanted to limit the possible entries to the fixed Vales or Values in the Value Table of the Domain of the Data Element used in the Value Mapping Definition.

Example

Let´s say we have

“BUKRS” and Internal Field “XFELD”:

Monday 27 December 2021

Employee Master Data Replication in S/4 HANA from Workday

Background:

The client is using Workday as the HR solution, there was a need to set up HR mini-master in S/4 HANA and consume data from Workday and other 3rd party systems to replicate the Organization, Position and Worker data into the respective infotypes in the S/4 HANA system. HRMM was set up to support/fulfil requirements of SAP modules: Asset management, Finance and Material management

Requirement Summary:

Asset Management: To perform planning, scheduling and execution of maintenance work, workforce data is required.

Friday 24 December 2021

Measure your Application’s Performance and Resource Consumption: Evaluate Statistics Records with Transaction STATS

In this blog post I explain how you obtain statistics records with high quality and how you analyze them with transaction STATS. In the best case, such an analysis proves that your app combines excellent single user performance with low resource consumption and is scalable. In all other situations, the analysis will indicate the bottleneck where optimizations shall apply.

As owner and developer of transaction STATS I am more than happy to share tips and tricks that will help you to efficiently work with the tool and to obtain insights into your application’s performance.

You can use STATS since SAP NetWeaver 7.40. I am continuously improving it and this blog post presents the tool’s state for SAP NetWeaver 7.57 as of late December 2021.

Thursday 23 December 2021

Standard Table Addition in MDC

Master Data consolidation and Mass Process Enhancement with standard table.

Consolidation and Mass processing are two major applications of SAP MDG system. It’s an out-of-the-box solution. While implementing these application if one follows standard configuration guide it can be smoothly implemented.

This blog is written for audience who needs to enhance MDC with standard table and are new to these application.

Wednesday 22 December 2021

Working with Hierarchies in ABAP SQL

This blog summarizes the possibilities, ABAP SQL offers together with ABAP CDS for working with hierarchical data that are stored in database tables. Hierarchical data in database tables means, that lines of one or more database tables are connected by parent-child relationships. There are many use cases, where hierarchical data play a role and where accessing information about the hierarchical relationship is important. For example, a common task can be to find out the descendants or ancestors of a given hierarchy node or to aggregate values of subtrees.

Overview

In former times you had to load the hierarchical data from the database into internal tables and program it all by yourself (if you did not find an appropriate API). In between, meshes offered some features for working with hierarchies, as shown in this example, but have not found wide distribution.

Monday 20 December 2021

New Window Functions in ABAP SQL

Function that is specified in front of the definition of a window in an ABAP SQL window expression and evaluates the rows of the window, is known as window function. Such a function performs analytic operations over a set of input table rows that are somehow related to the current row and help us to solve complex query challenges in easy ways. Window functions are aimed for writing a single query which shows grouped information AND individual information in a query. You might say, it is also possible to use the GROUP BY clause to show grouped information. But the GROUP BY query has its limitation, in that it won’t show you individual data as well.

The addition OVER designates a function as a window function. If you’d like to narrow the window from the entire dataset to individual groups within the dataset, you can use PARTITION BY to do so. You can use the ORDER BY clause as well in defining a window function. It simply orders by the designated column(s) the same way the ORDER BY clause would, except that it treats every partition as separate. The ORDER and PARTITION define what is referred to as the “window”, the ordered subset of data over which calculations are made. Detailed explanation on the windowing syntax and related additions can be found in this blog about Window Expressions in ABAP SQL.

Saturday 18 December 2021

SAP BTP ABAP Environment – Setup Data Replication with SLT

Overview

One of the main scenarios of the SAP BTP ABAP Environment (“Steampunk”) is to build side-by-side extensions to ERP core applications. This side-by-side approach requires data from the core application. In order to read and write this data you can use external APIs. Sometimes, if the data is more frequently required, data replication might also be a valid option. Data replication of on-premise custom tables (ERP core application) to Steampunk is recommend via SLT using SLT SDK and custom-defined Steampunk Inbound RFC.

This approach is supported with the current Steampunk release and can be used immediately.

Friday 17 December 2021

Find when and how the objects been moved between systems

When there’s any sync issue between Development/Quality/Production Systems, it’ll be very convenient to investigate if could find out which transport contains specific objects. The easiest way is by version management through Menu->Utilities->Versions->Version management.

SAP ABAP Development, SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Career, SAP ABAP

Wednesday 15 December 2021

A Practical Guide to DevOps for SAP ERP

We’ve been applying DevOps for SAP to our product development and couldn’t be happier with the results. Below is a high-level overview of how we implemented DevOps for our team, and I hope it helps move the practice forward and gain adoption within SAP.

1. Run SAP ECC in a Docker container and allow each developer to run an isolated system.

2. Use abapGit to save ABAP code with a code repo such as GitHub.

3. Leverage ABAP Unit to execute unit tests and measure coverage.

Monday 13 December 2021

Window Expressions in ABAP SQL

In ABAP SQL, A window expression uses a window function to determine an individual value from the rows of a window of the result set of a query. The term window describes the set of rows on which the function operates. In other words, a window function uses values from the rows in a window to calculate the returned values.

A window expression can be specified as an SQL expression or as an argument of any SQL expressions, except for aggregate and defining a column of the result set in the SELECT list of a query. In each row of the result set, the result of the calculation is placed in the column defined in this way.

Friday 10 December 2021

Industry 4.0 – Intelligent Automation of Manufacturing with SAP-MII

Introduction

The purpose of this blog is to leverage SAP’s Digital manufacturing and SAP-MII capabilities to Integrate diversified manufacturing processes, machines, and systems together to bring smart manufactring concepts (Industry 4.0 ) into reality. 80% of the data is generated on the shop floor, If we would able to capture all those data using a comprehensive integration framework and contextualize with business acumen, then this would potentially solve all manufacturing related issues and help archiving.

◉ High yield.

◉ Low no-confirmities.

◉ High OEE(overall equipment effectiveness).

◉ Predict potential disruption and downstream impacts.

Wednesday 8 December 2021

Tips about material classfication mass upload

Function module ‘BAPI_OBJCL_CREATE’ can be used to upload new material classification data, and the function module ‘BAPI_OBJCL_CHANGE’ can be used to change existing material classification data. Before doing the upload data, it’s better to verify the material classification already existed or not by function module ‘BAPI_OBJCL_GETDETAIL’.

Be careful regards classification data as existing or not by checking the return message type from ‘BAPI_OBJCL_GETDETAIL’.

Monday 6 December 2021

Posting the data to BW4HANA ADSO using BW APIs and RFC connection

Problem introduction

As a developer, you would like to expose a service that enables third-party APIs to post the data directly into SAP BW ADSO.

For that reason, you would like to use an RFC enabled BW function module that allows the external source like CPI to read BW parameters, request the data from an outside source through REST, harmonize it and post the data to BW ADSO in a columnar format.

Saturday 4 December 2021

Hassle-free way to frequently change long string data in database without file upload

Problem Statement:

You do not have a user interface or an application ready to save the data in ABAP dictionary object, and you need to upload the data into a database table.

The above does not seem to be a problem because you can generate Table Maintenance Generator.

Wait wait wait! The problem is yet to come.

The table has a string field and TMG creation gives this error “Data type STRING is not supported in field”.

Friday 3 December 2021

Extract Document details using Document Information Extraction service with ABAP

In this blog I want to show the posibility to extract information from a document using AI and OCR implemented by the BTP service Document Information Extraction calling the API offered from an ABAP program.

The objective of this blog is not to show how the API works as there are good blogs showing it (Developer Mission) but to show how you can automate the API calls with only ABAP program. I say only abap as there are already another integration scenarios in CPI ( Document Information Extraction Integration with Email Server ) or with iRPA but here we will see a simple solution.

Here the architecture:

Thursday 2 December 2021

Tips about material classification mass upload

Function module ‘BAPI_OBJCL_CREATE’ can be used to upload new material classification data, and the function module ‘BAPI_OBJCL_CHANGE’ can be used to change existing material classification data. Before doing the upload data, it’s better to verify the material classification already existed or not by function module ‘BAPI_OBJCL_GETDETAIL’.

Be careful regards classification data as existing or not by checking the return message type from ‘BAPI_OBJCL_GETDETAIL’.

Wednesday 1 December 2021

Customized Fields at Dispute case creation screen for FBL5N

It’s quite an understandable requirement that additional fields and questionnaires need to be shown at added sub-screen while creating dispute cases through FBL5N.

SAP ABAP, SAP ABAP Exam Prep, SAP ABAP Exam, SAP ABAP Tutorial and Materials, SAP ABAP Career, SAP ABAP Certification, SAP ABAP Preparation, SAP ABAP Jobs

◉ Customized fields will save to dispute case attribute table UDMCASEATTR00, and answers to the questionnaire will be saved to a new Z customized table (cause various versions may happen so can’t save to UDMCASEATTR00);

Monday 29 November 2021

gCTS with Gogs, Github Actions (and some thoughts)

gCTS is now an option for transporting and storing the codebase using a git-based server. One of the key point to realize is the fact that gCTS is CTS plus “g(it)”. It is still the good old transport system, but backed up by Git which adds some benefits. Comparing to abapGit, gCTS it is not so feature rich but might be easier for teams not accustomed to Git specifics and when they are using traditional single-server dev environment. abapGit has much more “usual” Git inside, giving you much more control over the code you want to commit (patch, diff, tags etc.).

Friday 26 November 2021

Read GOS Attachment from business object and convert to xstring and Viceversa

INTRODUCTION:


In this blog post, we will learn how to convert a GOS attachment to xstring and vice versa.

What is GOS:


The GOS is a toolbar that provides different functions such as adding an attachment, creating a document link, displaying all the attachments etc. The attachments are not generic for that transaction but are specific for a particular SAP object.

Wednesday 24 November 2021

How to save any data type to DB and restore them.

All of them need to manually mocked the data. This is most annoying work at the unit-tests.

After three days of work I get some solution to mock the data without need it to COPY + PASTE them.

In this approach all what you need it is to get the data in the preferred way (it can be SQL query, FUNCTION CALL and so one…), and save it to DB.

For example:

It can be some record from the table MARA and you know that your method should return this record. For this case you write one SQL query and save result to the Z-table. After you did it, you can always use the data from Z-table and DON’T NEED to mock MARA-data manually.

Monday 22 November 2021

How to change released TR into Unreleased TR

Introduction:


This blog post will describe in detail how to change released TR into Unreleased TR

In this blog post, we will take the example to change released TR into Unreleased one.

Requirement:


Change released TR into Unreleased TR using SE09 Transaction Code

Transaciton Code: SE09 – modifiable

Saturday 20 November 2021

Automatic closure of pending Purchase Requisition’s

This blog post is to show, how to close the open PR’s for a specified time and email attachment of excel will be sent to respective persons through background jobs. Background jobs are done by basis team.

To store mail ID’s, we are using ‘STVARVC’ T-Code. Because this T-Code will save the mail ID’s in the ‘TVARVC’ table.

Fetching stored mail ID’s from ‘TVARVC’ table and sending closed PR’s to appropriate mail’s.

Steps to create a STVARVC data.

Friday 19 November 2021

CDS View Extension and OData Exposing

CDS(Core Data Services) is one of the new technologies SAP provides us. Similar to AMDP, it aims to increase performance by enabling data models to use and define in the database level instead of the application level. Although it has a wide range of uses, I will explain to extend a basic CDS view and expose it as an OData service.

CDS Views are virtual data models and they can be used to access Hana tables. You can use standard CDS views or create a custom one. However, in case of need, you may want to extend an already existing view to add new fields instead of creating a new one. Now, in this blog, I will create a basic CDS view, show how to extend it, and use as an OData service.

Wednesday 17 November 2021

Defining and Displaying User-Defined layouts using Factory Method

User case: In some situations, user may want to see only few fields in his output of the ALV or he may want to see different version of layout from the one being displayed. This blog post explains the  approach to achieve the requirement using Factory Method.

Let us assume the following query where Material details from tables MARA (Material Master), MAKT (Material Description) and MARC( Plant Data for Material ) as shown below.

Monday 15 November 2021

Integration Program With PI and Automatic creation of Goods Receipt by using a BAPI for MIGO Transaction and sending the details to third party system

This Program will help to upload the data for MIGO Transaction and also to send the data to third party system by using PI

1. Creation of PI

2. Need to display the excel file as ALV output.

iii. In MIGO there are two operations that are performed to post a GR.

iv. a) Check Operation

v. b) Post Operation.

Wednesday 10 November 2021

Dynamic text in adobe from – content flow to next page

Introduction:

I had a requirement from the client which requires an adobe form with dynamic text i.e text content should overflow to next pages. So, we implemented the sub form.

A sub form is a section in the form design that provides anchoring, layout, and geometry management for objects. The object in a sub form can be arranged in rows, columns or some other kind of balanced arrangement.

More than one sub form can be used in a form design. Sub forms can be placed inside other sub form. This relationship is displayed in the Hierarchy palette.

Monday 8 November 2021

Understanding how email template works in Flexible Workflow

Introduction:

Today in this blog post, we will have a deep dive to understand how system uses email templates and how email is triggered by flexible workflow. There are many beautiful blog post available today on email template on flexible workflow, but the information on how system uses these template to trigger email is missing.

Los Geht’s:

A couple of points which are worth re-iterating:

◉ The email template for Flexible Workflow is maintained using Fiori App “Maintain Email Template”.

Sunday 7 November 2021

Filtering by Short Material Product Hierarchy Dimension Keys with ABAP CDS Views

I previously explained how to Display Short Material Product Hierarchy Level Keys with ABAP CDS Views. But what if you want to use short Material Product Hierarchy dimensions instead of hierarchy levels? Displaying dimension is not an issue, but how to filter dimension by short key value? If this question challenges you, then my new blog is for you.

SAP ABAP CDS Views, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Prep, SAP ABAP Career, SAP ABAP Guides, SAP ABAP Skills

Saturday 6 November 2021

Read data from attachment List

1. Introduction

Normally, we use READ_TEXT to read data text from header or item. But in some case, specially in Fiori app, text data will be saved in attachment list.

So, how to read data from attachment List?

Don’t worry, I will show you step by step to get data by using abap program

Wednesday 3 November 2021

A simple dashboard using SAP CPQ’s Custom Table API and python app

This blog post will give you an overview of how you can make use of CPQ’s Custom Table API to build your own custom dashboard using python programming.

SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Prep, SAP ABAP Career, SAP ABAP Certification, SAP ABAP Guides, SAP ABAP Development

Use case:


Consider a simple use case wherein we have a list of of quotes stored in some custom table and the requirement is to create a graphical representation for the total count of quotes for each status. So we will be using a bar and a pie chart for this example.

Tuesday 2 November 2021

ABAP Managed Database procedures with SELECT OPTIONS

The ABAP ON HANA Technology provides a great advantage to developers to push down the logic at database level. ABAP Managed Database Procedures (AMDP) was introduced in Release 7.40, SP05. since its introduction by sap there is huge progress in the development of objects in Hana as well as in ABAP platform.

ABAP ON HANA Technology increases the performance with its code to data paradigm and provides the much capabilities at HANA Level. The introduction of CDS view and AMDP are major concepts that uses the SQL script capabilities which the database understands.

Saturday 30 October 2021

ABAP Managed Database Procedure

The technology is evolving and SAP has developed techniques like CDS View or AMDP to solve the performance issues of fetching data from the database and also to take advantage of the HANA power.

Let’s keep up with innovations!

I would like to share with you some of the basic information we need to have about AMDP.

ABAP Managed Database Procedures (AMDP)  was introduced in Release 7.40, SP05, allowing developers to create their software and write directly in ABAP. Database procedure, but fully managed on ABAP.

Friday 29 October 2021

Code Pushdown – CDS date interval slicing

Interval slicing is a task that developers need to deal with when working with overlapping records with validity periods – such as conditions in SAP. At single point in time multiple records can be valid (perhaps with different condition type). This blog will show you how to achieve this in CDS views without writing single line of ABAP.

ABAP Development, SAP CDS, SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Database
Overlapping intervals

Such data is saved in SAP in database table as per picture below – lets call the table ZSLICE_DB  (it has 4 records – corresponding with picture above).

Monday 25 October 2021

Display Short Material Product Hierarchy Level Keys with ABAP CDS Views

Material Product Hierarchy displays long levels key based on T179 table, but users accustomed to see individual level short keys the ways they maintained in MM02 transaction. Take Material Product Hierarchy to a next level addressing user requirements.

Below is how users assign hierarchy levels are maintained in MM02 transaction

ABAP CDS Views, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Career, SAP ABAP Preparation, SAP ABAP Jobs

Sunday 24 October 2021

ABAP SQL: Indicator Structures

From ABAP release 7.55 you can declare indicator structures along with the statement TYPES. The indicator structure is the last component of the structured type and mirrors the preceding components as indicators of type x of length 1. The new addition WITH INDICATORS to the statement TYPES allows to define an indicator structure as a substructure, i.e., structured component of a nested structure, of a given structured type.

ABAP SQL Indicator

Generally speaking, an indicator is a one-byte character field that is either set on (‘1’) or off (‘0’). Indicators are like switches which normally used to indicate the result or to control the processing of an operation. You can use an indicator structure as an ABAP SQL indicator representing a null indicator in ABAP SQL read or as a set indicator in write statements. In read statements, the indicators can store information while in write statements, indicators can be used to mark columns for change. The components of the null indicator indicate which columns of the result set contain the null value to indicate an undefined value or result and which don’t. The indicator structure is created equally for each data type of a first-level component of structure. This means that, for example, each substructure or each reference variable is mirrored in the same way as an indicator component is mirrored as an elementary component of structure.

Friday 22 October 2021

Send password protected ZIP file (PDF file inside ZIP folder) from SAP via email

This blog describes the procedure to email a ZIP file (PDF file inside ZIP folder) with password protection, as an attachment. Normally, we have a scenario where we convert the OTF output of a Smartform, or a spool request to PDF.

Without using any third-party tool, we can password protect the ZIP file (pdf file inside the ZIP folder) and send it via email using SAP.

Business Scenario

Generate a payslip using smartform, encrypt it with a password and send it to the employee via email.

Prerequisites

◉ You are able to generate a smartform with OTF data

Wednesday 20 October 2021

New kinds of ABAP expressions

New ABAP expressions for generic and dynamic programming in ABAP Platform 2021:

Part I – Dynamic Access to (maybe generic) references

Do you use the new ABAP expressions like constructor operators or table selectors in your coding? But you often find that when using generic programming, i.e. data types like REF TO DATA, DATA or ANY you fall back to programming style of the 70th? Then the new ABAP platform 2021 (which shipped with kernel 7.85 last week) has some new features to get you clean up your coding.

The main mantra of the new release is: “Get rid of field-symbols!

Monday 18 October 2021

A new generation of CDS views: how to migrate your CDS views to CDS view entities

With ABAP release 7.55, a new type of CDS view has been released: the CDS view entity. CDS view entities are an improvement over the “classic” CDS DDIC-based views.

CDS Views, SAP ABAP, SAP ABAP Tutorial and Materials, SAP ABA Certification, SAP ABAP Preparation, SAP ABAP Guides, SAP ABAP Career

New migration tool available


Now, a new migration tool is available that automates many steps of a migration from a CDS DDIC-based view to a CDS view entity. But that’s not the only helper to facilitate a migration. The following support has been released:

Friday 15 October 2021

Design Patterns in ABAP: Factory and singleton (and the wonderous world of OO-Abap)

Introduction

Did you ever encounter that even after the statement DEFINITION DEFERRED you still need to move the definition of your class? Or have you ever wondered that if a singleton-class has several subclasses, why all those subclasses will be singletons, or that all classes in the tree will be one singleton? Those experiences were new to me, but I encountered them and I wanted to share my amazement.

This blog is a mixture of a how-to create a factory-class for singletons with inheritance, some surprises I found during coding and a request for advice. So please, please comment and ask questions. I would love to learn from my mistakes and wrong assumptions. I chose to not use test-driven approach to keep this blog more readable.

Thursday 14 October 2021

Include Batch expiration in Material Requirement Planning

Why does Batch Expiry critical in MRP?

Life science (Pharmaceutical/Food/Chemical) products always have limited shelf life and also have limited environment exposure life. Product has to be manufactured and sold/consumed before expiry of its shelf life. I have been into SAP production planning and supply chain consulting practice for the last 20 years. This has been a pain area since decades for planning and manufacturing business function. This is important to find out a systematic solution to account batch level expiry of components in enterprise level material requirement planning in order to streamline material availability on time manufacturing lines and minimize waste due to expiry. This blog will help the SAP community to solve the long pending problem of  non-accountability of  batches with expiry dates in Net requirement calculation of SAP-MRP.

Monday 11 October 2021

Customized Fields in Dispute management of FSCM

My previous companion article demonstrated the enhancement to add customized fields at Case Management. In this article, I’m going to show how to add customized fields in Dispute management.

ABAP Development, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Preparation, SAP ABAP Guides

Friday 8 October 2021

About Checked Credit Value at Credit Management

Checked Credit Value is wildly used in credit management. Sometimes it could be a little confused as it does not always equal the total credit value of the sales order. The simplest scenario, it’s the input amount value when performing a simulation of a credit check for a specific business partner along its credit segment. The log of results of UKM_BP simulation and its credit check displays like below:

ABAP Development, SAP ABAP Tutorial and Material, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning

Wednesday 6 October 2021

Regular Expressions (RegEx) in Modern ABAP

In this blog post, I would like to share the latest news and changes made to Regular Expressions in modern ABAP, mainly from OP release 7.55 & 7.56.

Previously, POSIX style regular expressions or “Portable Operating System Interface for uniX” was used in ABAP. Hence, from now on, regular expressions in POSIX syntax are obsolete, then using this kind of regular expressions syntax leads to a warning from the syntax check. Although this can be hidden by the pragma ##regex_posix, it is strongly recommended to migrated to the other regular expression syntax supported by ABAP like PCRE regular expressions, XPath regular expressions or XSD regular expressions.

Tuesday 5 October 2021

ABAP – Past, Present & Future

What’s in a name?

SAP is notorious for rebranding its own acronyms to meet market requirements.

The original meaning of ABAP was “Allgemeines Beleg AuswertungsProgramm” meaning “general program to evaluate documents”. Later on it was changed to “Allgemeiner Berichts-Aufbereitungs-Prozessor” which means “”generic report preparation processor” and nowadays we talk about “Advanced Business Application Programming”.

Monday 4 October 2021

How to generate RAP BOs with custom entities?

With the latest version of my open source project the RAP Generator the tool is able to generate RAP business objects whose data model consist out of custom entities.

As a datasource you can use one of the follwoing datasource types:

◉ Abstract entities

◉ DDIC structures

◉ ABAP types (which currently have to based on DDIC structures as well)

Saturday 2 October 2021

Steampunk is going all-in

SAP BTP, ABAP Environment, ABAP Development, ABAP Extensibility, SAP Business Technology Platform, SAP Extension Suite, SAP ABAP Preparation, SAP ABAP Career

In Poker, going all-in can mean you’re really desperate. Or pretty confident that it’s the right thing to do. Judging by the spirit of optimism in our ABAP Platform dev teams, I don’t think we’re desperate, and here are some of the reasons why:

◉ The ABAP Platform unit has sort of rejuvenated. More than half of our employees have joined us during the past 4 years. ABAP is ready for the years to come.

◉ We feel we’re relevant. Our biggest issue now is to handle the growing demand of customers, partners, and internal stakeholders. Could be worse.

Friday 1 October 2021

Printing Charts / Graphs on Smart Forms Dynamically

In many requirement graphical charts are required by the clients since a graph is much more appealing to the user. As graphs enables a better analysis of data to the user. It is however quite simple to provide the same functionality for building graphical charts in your ABAP report itself by using CL_IGS_CHART_ENGINE.

Recently I had the requirement of printing Charts on Smart forms. In Smart forms we can print the image if the image is already uploaded to the Form Graphics (SE78). I search through the SCN but doesn’t find the solution of printing the charts on Smart forms. Then I had an idea of uploading the graphical image generated by CL_IGS_CHART_ENGINE dynamically to Form Graphics (SE78).  I have used the same functionality as used in Form Graphics (SE78) import to upload the image dynamically in Form Graphics.

Wednesday 29 September 2021

Building Dropdown list using Value help in CDS views with validations – ABAP Restful Application Programming Model

Introduction:

Dropdown lists are very helpful when you want the user to select from a set of predefined values. The values can be either static or dynamic based on whether the database table used to implement the dropdown is updated or remains fixed.

Problem Statement:

Suppose that you have a Fiori list report template application for bus booking. You have used Restful Application Programming Model to implement your backend. In your bus booking application, the user can create new bookings. You want that when the user clicks the create action button, he is shown a create new booking page where he needs to enter passenger details which includes a dropdown list for selecting Gender.

Monday 27 September 2021

Editable ALV with F4 Help support Multiple Selection

It’s a small requirement that asks to provide multiple selections for one customized field at editable ALV grid of one customized screen:

◉ All selected entries of the popup list from F4 should be concatenated into one string separated by a comma. For example, if the user ticks the checkbox for 01&03, then the value should be 01,03.

SAP ABAP Exam Prep, SAP ABAP Tutorial and Material, SAP ABAP Certifications, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Study Materials

Friday 24 September 2021

ABAP Unit Tests for ODATA requests

Introduction

As an SAP developer coming from the Java world, I always focus on Object Oriented ABAP and believe in the high value of unit testing. So the question came once, how should I test ODATA service?

In the past I tried to build mocking classes, so that I could call the ZCL*DPC_EXT methods, but it was too difficult and had little value when compared to development efforts. Then I left the topic and decided to keep example requests in SAP Gateway Client through transaction /IWFND/GW_CLIENT. That was ok for documenting purposes, but it was not a unit test unfortunatelly.

Wednesday 22 September 2021

Create a simple Daemon in ABAP

What is a Daemon in ABAP Language?

A daemon is a utility program that runs continuously by itself and without the control of an interactive user on a multi-tasking operating system in the background to monitor and take care of certain subsystems or show immediate reaction to events. Daemons perform explicit actions at predefined times or in response to certain events.

ABAP daemons abilities which provided by the ABAP Daemon Framework (ADF), are more alike to its counterparts in linux or windows. They are being used to handle events in a reliable way by running in sessions with unlimited lifetime. ABAP programs can communicate with the daemons by sending messages to them using ABAP Messaging Channels and message type Push Channel Protocol (PCP) which is a communications format like a simple HTTP message.

Monday 20 September 2021

‘TAB_DUPLICATE_KEY’ issue during Delivery Due for STO

Program RVV50R10C (Deliver Documents Due for Delivery) usually been set up as a background job to generate delivery documents every day. It runs perfectly until one Monday, the user finds fewer delivery orders have been created than before and especially no delivery anymore for STO(stock transfer orders).  There’s a dump error of ‘TAB_DUPLICATE_KEY’ for every background job with RVV50R10C like below:

SAP ABAP Exam Prep, SAP ABAP Tutorial and Material, SAP ABAP Career, SAP ABAP Guides, SAP ABAP Learning

Friday 17 September 2021

Example of Integration between SAP and Salesforce with BOOMI

In this article, just offer a quick overview&example of how material master data has been transferred from SAP to Salesforce through BOOMI, also trace the process flow which could help to do issue analysis.

SAP Salesforce, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Certification, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Wednesday 15 September 2021

RAP Unmanaged BO – Late Numbering

In this blog post, I would like to talk about `late numbering` and how it can be implemented.

Objective

I will use an example to demonstrate:

◉ How to define late numbering

◉ How to handle created instances during Interaction Phase [Create and Create By Association (CBA) methods for now]

◉ At what point in Save sequence actual number is generated

◉ How this number is mapped back to temporary numbers used during Interaction Phase

◉ An Entity Manipulation Language (EML) statement to test this

Monday 13 September 2021

Accessing SuccessFactors OData APIs using OAuth 2.0 Client APIs

This article describes the process on how one can access SuccessFactors OData APIs from an ABAP program using the OAuth 2.0 Client API. The OAuth 2.0 client enables one to access protected services and resources that are offered by any external service providers. The communication between OAuth 2.0 client and server is secured by an HTTPS connection.

With the sunset (planned retirement) of HTTP Basic Authentication for API Calls (SFAPI and OData), one of the recommended alternative approaches is to use OAuth2 SAML Bearer Assertion.OAuth 2.0 client handles the storing of OAuth 2.0 tokens and client secrets in the secure store.During the authentication, OAuth 2.0 client passes the OAuth 2.0 scopes to the service provider which contains references to all the allowed resources. The objective of this article is to share a working sample of OAuth 2.0 with OData API calls required for custom development integrations involving SAP ERP system with SuccessFactors Employee Central.

Friday 10 September 2021

Auto Calculations for a Receipt in My Travel Expense Fiori App

While working on a “Travel Management Roll out using Fiori Apps” project for one of our client recently, I came across a requirement of calculating amount of a receipt based on some business rules. We were implementing “My Travel Expense” app Version 2.

A little dig into the implementation guide of the fiori app suggested implementing Badi PAOC_MTE_BADI. Unfortunately, i couldn’t find any help on implementing this Badi. The situation worsened when I tried implementing the badi and failed to save my changes to the trip data. Neither I was able to show custom messages.

After effort of hours and days, finally i was able to succeed. So i thought i must share it with community to help save others some precious time.

Thursday 9 September 2021

Kernel Badi Sorter with Multiple Implementation

The intention here is to do a sample test Sorting of Multiple Implementations of a Kernel BADI.

A pre-requisite of knowing Kernel BADI basics is required.

So, I have defined a Enhancement Spot ZDPK_KERNEL_BADI_SORT_EHN

ABAP Development, ABAP Connectivity, SAP ABAP Career, SAP ABAP Tutorial and Material, SAP ABAP Study Material, SAP ABAP Preparation, SAP ABAP Certification
Create Badi

Wednesday 8 September 2021

Web Development with (Cloud) ABAP

Introduction

Using Cloud ABAP, we will create an HTTP service, and use it to serve dynamically, server-side rendered HTML. I.e., we will be doing web development in ABAP. Our use of ABAP will be quite similar to, for example, using Flask in Python. Of course, however, we don’t actually have a framework to use, so we will have to do some things – like the template rendering – ourselves. This tutorial includes every step of the process, from creating the HTTP service, to using the web app. To do this, I will use the demo use-case of a movie database.

Tuesday 7 September 2021

E2E tests automation using UIVeri5

Let’s look at it a little bit closer.

Preparation

I prefer using various configuration for different projects. So in my case I created a separate folder for the demo project and configured package.json file:

  "name": "uiveri5-example", 

  "version": "0.0.0", 

  "scripts": { 

    "tests": "uiveri5 ./tests/conf.js" 

Monday 6 September 2021

How Change Request Management (ChaRM) Leverages Git-enabled CTS (gCTS)

Introduction

Change Request Management (ChaRM) controls change and transport process for ABAP system landscape which is based on classic Change and Transport System (CTS), but since SAP Solution Manager 7.2 SP12 ChaRM integrated with Git-enabled Change and Transport System (gCTS) to provide a possibility to transport ABAP code using Git-enabled CTS instead of CTS. A new change document type introduced to support the change management process. By default, Git-enabled changes are delivered as change transaction SMGH.

Saturday 4 September 2021

No device selection at Print screen list popup window

A user surprisingly finds out the option ‘Windows Device’ is missing at the print screen list popup window for all transactions at one system but another not.

SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Tutorial and Material, SAP ABAP Learning, SAP ABAP Guides, SAP ABAP Learning

Friday 3 September 2021

Using the ODBC driver for ABAP on Linux

Prerequisites on Linux

A 64-bit Linux version is required because the ODBC driver for ABAP is a 64-bit ODBC driver. To define ODBC data source names (DSN) for the ODBC driver for ABAP on Linux, you need to install the unixODBC software package on your Linux system. This software package will also provide some simple command-line tools to test an ODBC connection and to execute SQL queries.

You may also want to install the LibreOffice software package to follow my simple application scenario.

Thursday 2 September 2021

How to download the Content repository (Archive link/Open Text attachments) to App Server or Desktop using ABAP code

Note – This is an example from SAP S/4 HANA – 1809 system but not restricted to a particular release.

Introduction – The SAP Content Server is a stand-alone component in which a large quantity of electronic documents of any format and with any content can be stored. The SAP applications concerned must support the use of the SAP Content Server. The documents can be saved either in one or more MaxDB instances or in the file system. The SAP Content Server is available for Windows 2000 & 2003 Server as well as for several UNIX variants.

The content repository configuration is maintained via T code OAC0. Please see below example for Accounts Payable (Please note, this article doesn’t focus on the Content repository configuration).

Sunday 29 August 2021

Organizing ADT Project Explorer – Working Sets

Introduction

When I started using Eclipse ADT I missed a functionality to organize all access to systems that I had in SAP GUI in workspaces:

ABAP Development, SAP ABAP Exam Prep, SAP ABAP Tutorial and Material, SAP ABAP Career, SAP ABAP Preparation, SAP ABAP Guides
SAP GUI Workspaces

Friday 27 August 2021

ASYNC/Parallel ABAP in a OO way

Motivation

Every now and then we find a need for doing some work in parallel. Recently I’ve worked on a process that was taking far too long to be of any use. It was taking large amounts of data in and creating an even larger amount of records given complex rules, validations and enrichment.

Refreshing some ABAP parallelism techniques, my options were basically to split the input data and then running FMs in background, starting a new task or writing a report and scheduling a job with parallelism being ranges of a selection criteria.

All valid options, I suppose, but I got used to work purely in OO and hammering FMs here and there to have my parallelism had a particular bad smell.  It would prevent me to assert some critical behavior via unit tests, for starters, and it would also add this new responsibility, running in parallel, to weird places with code that looked boring and repetitive (take data from classes, run fm, take data back…).

Friday 20 August 2021

OData Versioning

OData has become an inevitable topic for any SAP ABAP developer. I am sure most of us are involved in an OData development one way or the other.

Let’s discuss versioning, one of the advanced concepts of OData.

Note – I are working with OData version 2.0 in this article.

Motivation

Ever wondered if the business logic of an OData can be modified and activated as a different version without effecting the current business logic? I did and some of the scenarios I have faced are

Wednesday 18 August 2021

Post Request for Adobe Form Generation with OData Version 4

Introduction

In blog post “Download File through NetWeaver Gateway with OData Version 4” I showed you how you can download a file via NetWeaver Gateway with OData Version 4. Now I would like to present you how you can generate an adobe form via post request. The result is that we have an entry in ZDEMO database table and the key of the entry is in the response of the OData Request.

The next sections contain following topics:

1. preliminary work

2. implementation of a model provider

3. implementation of a data provider

4. test

Monday 16 August 2021

SAP GLM Integration with EWM in S4 Embedded System (Technical)

This blog post explains the process of printing the labels/Safety Data Sheets from the EWM system using the SAP Global Label Management (GLM) tool. This article explains related to the technical solutions only.

Our client was a chemical products manufacturing company and had to print lots of the labels and safety data sheets to adhere to the safety standards. The client was using a third party software to print these labels and the safety data sheets in the existing SAP system.

During the S/4 implementations, our client decided to make use of the SAP GLM functionality to meet their business requirements.

The client was implementing the embedded SAP EWM as well. The standard GLM process works based on the ERP process but the client requirement was to print the labels/SDS using the EWM system. The client was expecting to the implementation partner to automate this printing process in EWM than ERP.

Friday 13 August 2021

FBL1N Enhancement Document Date Functionality

Standard FBL1N transaction fetches the vendor line item display based on posting date. When there is a requirement to fetch customer line items based on document date, a custom enhancement needs to be developed.

To make them work based on document date (To fetch records based on BLDAT-Document date) enhancement needs to be developed in the logical database.The logical database holds all the structures. Here we cannot enhance the structures and nodes directly. Only the source code program of the database can only be enhanced.

By using submit functionality (passing vendor,open items date) in custom z reports ,records based on the posting date will only be fetched. But in order to fetch open items based on document date(BLDAT), enhancement needs to be done. The standard transaction code FBL1N cannot be enhanced to accomodate this functionality. The standard FBL5N fetches the customer line item display based on posting date(key date).

Thursday 12 August 2021

A Pocket guide for Hello World in SAP ABAP

In this blog, I will discuss What is SAP, and How to write Hello World in SAP ABAP.

SAP stands for Systems Applications and Products. SAP, by definition, is in addition to the name of the ERP (Enterprise Resource Planning) software and the name of the company. The SAP software package was established in the year 1972 in Walldorf, Germany by five IBM German employees; Wellenreuther, Hopp, Plattner, Tschira, and Hector.

The solution of SAP is a combination of various kinds of modules or applications. Every module contains a vital role to play in the basic process of the business.

Monday 9 August 2021

Exceptions in oabap for new abapers

First we can discuss what is exceptions exactly.

Exceptions: The Exception is a problem that arises during execution of the program. When an exception occurs the normal flow of an execution is disrupted and the program application is terminating abnormally, which is not recommended, by avoiding these you can handle the errors. When you fail to capture the error the runtime system will abort the program (i.e., crash)

Whenever the exceptions are raised in case of ABAP the program is going to short dump, this is not the right case, as a developer you can think about the exceptions where it is raised from where you need to capture the exceptions, Exceptions are always play an important role while developing the application.

What is exception handling ?

Exception handling is a process of handling an exception in such a way the short dump of a program is avoided and normal termination of the program is achieved. If the generated exception successfully handled the normal termination of the program is achieved and the performance of the software is not affected.

Friday 6 August 2021

Refresh of CL_SALV_TREE

Introduction

I’m developing for the first time a CL_SALV_TREE simple tree. The tree is way of configuring data that is grouped together. I could have done it with table maintenance, but I wanted something rather nicer.

The structure of my data (for the purposes of this blog is:

Group name Count Active flag

The three operations I want to do are:

Create a new entry

Delete a current entry

Toggle the activation flag

Thursday 5 August 2021

Azure Synapse Pipelines and OData – Part 3 – Metadata Store

Where I show you how to deal with OData extraction from the SAP system using Synapse Pipelines. In the first episode, we’ve built a simple pipeline that extracts data from a selected OData service and saves it to the data lake. Then, a week later, we enhanced the design to support parameters, which eliminated some of the hardcoded values. It allows us to change the OData service we want to use without modifying the pipeline or resources.

It was a great improvement, but the process still has two main disadvantages. The extraction job can only extract a single OData service at a time, and we still have to provide parameter values manually. If we want to extract data from many services, we have to start the pipeline multiple times, each time providing the OData service name, entity and host. Not the most effective approach.

Wednesday 4 August 2021

Azure Synapse Pipelines and OData – Part 2 – All about parameters

OData services have become one the most powerful interfaces in SAP systems. In the last episode, we’ve built a simple pipeline that extracts business information from an OData service to a data lake and makes them available for further processing and analytics. We’ve created all required resources, including linked services and datasets, and we’ve used them to define the Copy Data activity. The extraction process run without any issues, and we were able to display data from the lake.

But imagine you’d like to change the data source. Instead of Sales Orders, you’d like to get information about Business Partners. To make such a change, you’d have to go through all resources and modify them. You’d have to alter the URL of the OData service, target location and entity. Quite a few changes! Alternatively, you could create a new set of objects, including the Copy Data activity. Both solutions are not ideal. As your project grows, maintaining a large set of resources can become a tremendous job. Not to mention the likelihood of making a mistake!

Tuesday 3 August 2021

Azure Synapse Pipelines and OData – Part 1 – The First Extraction

INTRODUCTION TO AZURE SYNAPSE

I want to keep the theory as short as possible, but I think you will benefit from a brief introduction to Azure Synapse. Especially, if you’re unfamiliar with Azure tools for data analytics. Whenever you work with data, there are a few steps involved to retrieve a piece of information or insight. I guess we are all familiar with the ETL acronym, which stands for Extract – Transform – Load. It basically describes a process that gets data from one system, modifies them, and then uploads them to a target solution. For example, to a data warehouse, making it available for reporting.

Read More: C_TAW12_750

Monday 2 August 2021

Connecting from SAP Business Application Studio to SAP ABAP Environment in BTP

This post will cover setting up a connection between SAP BTP ABAP Environment and Business Application Studio.

SAP Business Application Studio (BAS) is a new SAP Business Technology Platform (BTP) service that offers a modern development environment tailored for the efficient development of business applications for the SAP Intelligent Enterprise.

In this blog, we will use the Trial account where I will walk you through the steps on how you can use a Booster to Automate the Setup and create a Fiori application. If you have created an instance and service key already? you can skip step 1

Friday 30 July 2021

Display Messages in ODATA Header Response while success and update and usage of ALL Query operations.

Introduction

This article explains the gradual creation of OData services, mapping messages on the OData response header, and simple operations($filter, $orderby, $inline count, $skip and $top).

Overview

1) Creation of OData service

Go to transaction code – SEGW.

Thursday 29 July 2021

Sending Spool List into Excel Format through Email Attachment

Requirement

I got one requirement where i need to call the SUIM transaction -> Roles by Complex Selection Criteria with multiple variants selections as background job and need to send the output in XLS format to multiple users maintained in distribution list.

There was one more additional requirement where i need to create single excel output with multiple tabs ( indicating each variant of report ).

Solution

This Solution will help for any report which we want to execute as background job and display the List View in Excel format.

Wednesday 28 July 2021

Error Handling In Odata

Introduction

◉ For raising error messages first we have to prepare a message container. Message Container is used to add corresponding success or error messages to the response of the OData service. We use a standard interface /IWBEP/IF_MESSAGE_CONTAINER to add the messages to the OData response.

◉ To add a message to the message container, we can use any of these methods in the message container interface apart from these 5 methods other methods also available. In this blog I will be showing these methods only.

Monday 26 July 2021

SAP Extended Warehouse Management (EWM) deployment options with S/4 HANA

Introduction: 

Nowadays, SAP S/4 HANA is taking up rapidly, many companies face the challenges while deciding right SAP EWM solution for their businesses. This blog carries the functional information between SAP S/4 HANA EWM deployment options and will help you to decide right EWM solution which depends on enterprise structure, current system landscape, future automation plan and cost etc.

Objective:

The objective of this blog is to get clear understanding of SAP S/4 HANA EWM deployment options to Customer’s, Consultant’s, and partner. Also, this article contains few important point’s which are needs to take into consideration while choosing the EWM deployment option. All the information is based on latest releases of SAP S/4 HANA EWM.

Friday 23 July 2021

SAP BTP ABAP Environment – Pre-Upgrade Option for Release 2108

Overview

Providing a significant number of new features is an important goal of release upgrades to deliver innovations to our customers and partners.

An upgrade is intended as a “no event” for customers and partners. For example, only compatible changes of released objects (APIs) will be delivered. But we recommend performing a test of the custom-built productive apps in a test environment for the new release. The complexity of the technical dependencies between the custom-built apps and the underlying environment cannot be tested isolated, only including the ABAP environment on SAP side. Therefore, we offer you to upgrade selected systems 15 days in advance to test the applications prior to the planned standard-upgrade.

Thursday 22 July 2021

Exploring SAP Profitability and Performance Management’s Remote Function Adapter – External Function Type

SAP Profitability and Performance Management (abbreviated as “PaPM” in this blog further)  Remote Function Adapter (RFA) function provides automated communication capabilities to other application and systems. Remote Function Adapter comes with different function types to set-up communication and posting. These vary from:

◉ Posting of Finance AP, AR, GL entries

◉ Calling external R script procedure

◉ Calling HANA stored procedure

◉ Integration scenario with SAP SD for creation of Sales Order, Inquiry or Quotation

◉ Replicating CO Master Data

◉ And External Function for calling remote NetWeaver function or a Web service

Wednesday 21 July 2021

Zchat – ABAP based instant messaging

As an external developer I’m involved in many projects. We usually connect to the client system using various combinations of Remote Desktop. For security reasons, the clipboard between Remote Desktop and the work computer is disabled. Also, we usually don’t have any Instant Messaging or even mail.

Lack of communication turns ordinary actions (copy, past, send) into a whole quest – you need to call, dictate the program name, line number, etc. This greatly slows down development and disturbs concentration.

I wrote a Web Service that works like a chat. The data is stored in the SAP system, the client part is stored in the web browser.

Tuesday 20 July 2021

Build composition tree with ABAP CDS views

Parent child relationship in CDS data modeling for ABAP RESTful application programming model (RAP)

The ABAP RESTful application programming model (RAP) defines the architecture for efficient end-to-end development of intrinsically SAP HANA-optimized OData services (such as Fiori apps) in SAP Cloud Platform, ABAP Environment or Application Server ABAP.

SAP ABAP CDS Views, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Material, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides, SAP ABAP Study Material
ABAP RESTful application programming model

Monday 19 July 2021

Split STO delivery with fixed number of line items

When users deal with delivery orders with lots of items lines like greater than 25, it creates processing challenges resulting in long delays as the work must be performed by a single person and can’t be divided out. Then the requirement is split delivery at VL10B for STO when the numbers of delivery line items are greater than a specific number.

This question has been asked many times in the community like this one. Jelena’s answer is absolutely working, in this article just make it more clear how to achieve this by using VOFM.

Friday 16 July 2021

Download File through NetWeaver Gateway with OData Version 4

Introduction

In this blog post I would like to show you how you can download a file through NetWeaver Gateway with OData Version 4. The next sections contain following topics:

1. preliminary work

2. implementation of a model provider

3. implementation of a data provider

4. register and publish OData Service

5. test

Wednesday 14 July 2021

A Step by Step process to create Odata services in SAP / SAP HANA system

In this blog post, I am going to tell you step by step process to create Odata services for SAP /SAP HANA system and how to test it.

I tried to explain the whole process in 4 steps.

Step 1. Go to transaction code – SEGW.

Tuesday 13 July 2021

A Step by Step process to trigger Odata Service to send data based on Event Configuration in SAP HANA

In this blog post, I am going to share how to create a simple odata service and trigger GET event for Purchase order data based on Event configurations.

I tried to explain this document in Three steps:

Step 1. creation of Odata service to get data

Step 1. Go to transaction code – SEGW.

Monday 12 July 2021

Setup the dev environment for ABAP RESTfull application programming (RAP) using SAP BTP ABAP environment and eclipse ADT.

Setup the development environment for ABAP RESTfull application programming (RAP) using SAP BTP ABAP environment and eclipse ADT.

Getting started SAP BTP ABAP environment with Eclipse

SAP Business Technology platform (BTP) providing us ABAP environment.

In this blog, I would like to explain the process of connecting this SAP BTP ABAP environment platform to the eclipse.

This requires the below two steps.

◉ Creating SAP BTP ABAP environment Service instance and service key.

◉ Connecting SAP BTP ABAP environment to the Eclipse.

Saturday 10 July 2021

Creating OData API based on a Mapped Data Source

This blog post will provide the steps to implement the pagination in OData by leveraging the CDS view and the SADL framework based on Mapped Data Source.

Introduction:

SADL offers a mapping editor in the SAP Gateway Service Builder to bind one or several SADL models to OData entity sets. This enables you to use SADL models as an additional data source besides RFC and others. Once the OData properties are mapped, the system provides a standard, optimized implementation of the OData service to retrieve the data.

Friday 9 July 2021

Local ABAP exception classes (inside global classes)

SAP ABAP Exam Prep, SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides

Why use local exception classes?

Although it is generally best practice to create global exception classes, they can seem a bit overkill for some applications. Think of PoCs, demo scenarios, BAdI implementations, etc. A handy but not so well-known option for these situations is to define a local exception class inside the global class. These allow internal exceptions (exceptions raised within the class itself) to be handled without the need for another global DDIC object. 

Wednesday 7 July 2021

Post Customer and Vendor using BAPI_ACC_DOCUMENT_POST ((40/50 for G/L Accounts, 31/21 for vendor sub-ledger,11/01 for Customer sub-ledger))

Introduction:

This blog post will describe the various steps involved to post a FI document using BAPI ‘BAPI_ACC_DOCUMENT_POST’ from an TXT file.

Requirement:

The TXT file should be balanced for the document to be posted i.e. credit amount and debit amount should be equal.

Tuesday 6 July 2021

Web Dynpro ABAP: New Customizing UI with UI Guideline FIORI

Introduction

The UIs of your Web Dynpro ABAP applications (including those built with Floorplan Manager) don’t always meet your exact requirements and you must adapt them accordingly.

And, you as an administrator, can make these UI adaptations using the customizing UI.

Until recently, the customizing UI had plenty of functionality but wasn’t the easiest to work with. Things have changed! Starting with SAP_UI 7.54 (for ABAP 1909), there is a totally new UI for customizing.

This UI is only available with UI guideline FIORI. Of course, the adapted applications can also be used with other guidelines.

Monday 5 July 2021

Debug tips about VL014 “Error delivery split because the partners are different”

When using TCODE VL10B to create a delivery order based on one specific STO order, the user got the Error message of VL014 which is “Item &: delivery split because the partners are different”. All items share the same customer and related split configuration been checked without issue, those items should be group into one delivery order instead of split by items which increase lots of unnecessary further operations.

ABAP Development, SAP ABAP Exam Prep, SAP ABAP Tutorial and Materials, SAP ABAP Career, SAP ABAP Study Materials, SAP ABAP Preparation

Saturday 3 July 2021

ABAP Restful Application Programming Model with Legacy BAPI

Unmanaged Or Managed?

While Sap was constructing the new RAP model, it made a distinction between managed and unmanaged scenarios. Managed means completely new and Greenfield implementation(no legacy logic).

If you have to use existing BAPI or function, SAP is recommended to turn to the unmanaged scenario in RAP model.

Friday 2 July 2021

SALV: ALV Quickstart Snippets 🚀

The object model for the SAP List Viewer (ALV) is an object-oriented encapsulation of SAP’s much older ALV tool. Today class CL_SALV_TABLE remains widely used for displaying simple, two-dimensional ALV grids.

Get your ALV up and running in no time using this collection of shorts snippets covering most of the basic requirements.

Note: For simplicity’s sake error handling of SALV errors (subclasses of exception class CX_SALV_ERROR) have been left out. Make sure to implement appropriate exception handling for productive code.

Wednesday 30 June 2021

Merging Multiple Adobe Forms and Downloading it as a single PDF

ABAPERS, sometimes we could a client requirement of merging multiple adobe forms and displaying it as one single pdf to the end-user.

However, after doing a lot of googling and reading numerous threads, I came across various solutions but some gave output as spool or some merged the forms but didn’t gave user to download the generated pdf into the system with desired location and name.

So, here I’ll provide the complete end-to-end solution with steps as well as the complete code, so that it really helps you. So let’s get started..

Monday 28 June 2021

Sequence issue of address line for contact person

1. The normal format of the address line

Generally, when the contact person been selected or changed in order, the contact person’s first name &last name always been concatenated as name1 like below.

ABAP Development, SAP ABAP Tutorial and Material, SAP ABAP Career, SAP ABAP Certification, SAP ABAP Preparation

Friday 25 June 2021

Concento RDG simplifies Field Property Configuration, lets you change fields in the UI without any hassle.

Concento™ Rapid Data Governance (RDG) is an SAP Certified accelerator, which enables various processes like MDG Data Model Maintenance, Workflow Design, Business Rules, along with UI Configuration in an intuitive, elegant and graphical interface. Even users with no technical knowledge can perform complex tasks as RDG automates it for them.

In MDG, there are generally three ways to change field properties. Briefly mentioned below:

1. Using adaptations in MDG, to change fields based on CR type and Workflow.

2. Implementing the BADI USMD_ACC_FLD_PROP_CUST_DEP_SET.

3. Setting the properties in the GET definition method of the feeder class.

Wednesday 23 June 2021

Use of node class in BOPF

Introduction:

I tried searching the web regarding “node class” of BOPF framework, I found very little information. Hence, I explored it and thought to share my findings in the community, which will help someone who is new to the framework. So in this blog post, we will see the use of “Node Class” in a BOPF Node. We will discuss its functionality, the required API, and all related information. Below is the screenshot where the node class is maintained.

Monday 21 June 2021

Install ABAP Platform 1909 – Dev Edition on an Azure Ubuntu instance using docker – Part 2

In this part, we are going to focus on the installation and access to the ABAP platform.

I will reiterate the process blueprint to help follow the steps we need to achieve to complete this installation. Since we tackled Step 1 of the blueprint in Part 1 of this series, we will continue from step 2 in this part.

Process blueprint

1. Create and login into an ubuntu instance on Azure.

2. Prepare the data drive on your ubuntu instance.

3. Install docker and move docker data directory to the prepared data drive.

4. Install ABAP Platform 1909 Dev Edition with docker.

5. Open the necessary ports on Azure.

6. Access your ABAP instance in SAP GUI and generate a new license.

Friday 18 June 2021

Install ABAP Platform 1909 – Dev Edition on an Azure Ubuntu instance using docker – Part 1

Introduction

As coders, we run into several situations where we would like to test snippets of code on a local system before even implementing the snippet in a dev system. In certain instances, we as developers would want to use code QA tools like the ABAP Test Cockpit and either do not have the authorizations to access the tool or are not comfortable with setting it up in a customer system.

My goto setup to get a personal system was the SAP Cloud Appliance Library (SAP CAL), It serves the purpose it was designed for perfectly. It is very well built and very intuitive to use while requiring very little interaction with the underlying technologies to get up and running in a test ABAP environment. The only apparent downside with regards to SAP CAL is the fact that it is a bit of an overkill for what a developer might want to use the system for, which warrants its relatively heavy price tag. The cost break down of running an an SAP NetWeaver AS ABAP 7.51 SP02 on HANA Dev system as at the time of writing this post is: 

Wednesday 16 June 2021

Transport your SAPUI5 applications from Slack

SAP ABAP Study Material, SAP ABAP Career, SAP ABAP Tutorial and Material, SAP ABAP Preparation, SAP ABAP Exam Prep

I am going to write about our slack integration with AWS and SAP to transport SAPUI5 applications to target system. We are improving this integration everyday and adding new functionalities. It is really fun to do and also improving our efficiency.

TL;DR

We created a custom slack application and a command to trigger an API through AWS and finally initiate a request collection in SAP via REST API and release to target system.

Monday 14 June 2021

Load FI documents from Excel/CSV with ODIN (Open Document Interface)

ODIN is a flexible, extensible, easy to use, multi-purpose import interface for SAP FI documents.

It is suitable for postings as they can be entered in the dialog transaction fb01, such as incoming and outgoing invoices or G/L account postings.

Key features

◉ Can be used in frontend or as background job (with local or server side files)

◉ Flexible dataset structure

◉ Suitable for mass processing

Friday 11 June 2021

Calling the Submit Report/ Program through the Odata Service

All of you know the Alv report and OData service individually. Coming to this scenario some of the members don’t aware how to use the Report through Submit in OData service.

So I am trying to explain how do we use Submit report in Netweaver gate way services.

More info: C_TAW12_750 Key Points

Note: Please follow the following steps

Thursday 10 June 2021

Adjust Hyperlink Parameters while sending an Email via Marketing Campaign

Introduction

Using below steps you can add additional URL parameters with dynamic values to your Hyperlink which was created in Content Studio Form.

Also you can define a custom field on the campaign level from which you can influence the behavior of few parameters which you set in BADI, or also you can add new link parameters using this custom field.

Wednesday 9 June 2021

Triggering a workflow on receiving inbound Email with interactive offline adobe form attachment and error handling

There could multiple scenarios in real time where we need to handle an inbound incoming email with attachments  and perform an action for example creation of a Business partner and attach the attachment in business partner or creation of a workflow in receiving the incoming PDF and attach the same in the workflows.

Interactive Offline Forms – Inbound Email Scenario

For this we should adapt to creation of the interactive offline forms

Monday 7 June 2021

Integrating ABAP Function modules with SAP Data Intelligence

Introduction:

In this new blog post I worked together with Michael Sun about the usage of ABAP function module calls with SAP Data Intelligence using Custom ABAP Operators.

The goal of this new blog post is to provide simplified guidance and a foundation for the general usage of function modules in SAP Data Intelligence Pipelines that require certain input parameters, such as elements, structures or table, to execute the function module call. Be aware that the required input parameters in form of structures and tables can be also deeply nested into certain sub-levels depending on the function module you choose.

Saturday 5 June 2021

Practical Guide to Clean Core Custom development for S4 HANA

Objective

Objective of this blog is to help understand the need for buzz word “Clean Core”, how to approach it and review the technical options available.

Why CLEAN CORE?

In this digital world, organizations have many challenges for a sustainable growth with heavy competition, budget constraints and many others. Bi-Model IT practice helped some of them to pivot their business model and enrich even during COVID times. SAP is a vast ERP solution available with many industry specific modules. In addition to the out-of-the-box standard processes available, many customers have developed their own secret sauce by building custom objects inside the system with ABAP development. So, with the Brownfield projects, where Customers are planning to migrate from ECC to S4 HANA, there are many challenges to overcome from the Business value perspective as well from Technical. Some of them are like their custom code is tightly coupled up with standard SAP, increased complexity with continuous changes to the solutions, maintainability, extensibility, and user friendliness. In addition, it is important that IT executives and Business Leaders think about the long-term strategy, rather than considering a system upgrade. To overcome the custom code mess, the buzz word CLEAN CORE, heard several times in many conferences and meetings will help address the pain points.

Friday 4 June 2021

Resolve annoying self-signed SSL certificate issue on ABAP 1909 Developer Edition with your own local CA (Certificate Authority)

TLDR; Resolve the ERR_CERT_AUTHORITY_INVALID issue on browsers with https using self-signed SSL certificate by generating your own local CA (Certificate Authority) with OpenSSL on Windows/MacOS for ABAP 1909 Developer Edition.

More Info: C_TAW12_750 Key Points

I’ll share in a few simple steps, how I was able to generate my own local CA with OpenSSL and use that to sign the SSL certificate that comes delivered in ABAP 1909 Developer Edition (CN=*.dummy.nodomain) to get rid of the annoying browser warning messages when accessing any URLs served through HTTPS on this local ABAP development environment.

Wednesday 2 June 2021

Retrigger Sales order output after changes at partner only

It’s necessary that users need to be noticed when some important fields in order been changed in the system. Sap provides transaction OMFS where you can maintain a combination of table names and table fields along with control flags to control whether Purchase order printout should be triggered or not. You can check my previous blog if you interest in this topic.

Now one requirement is to retrigger the output of the sales order only when some specific fields have been changed for the contact person at the header level (partner function is AP). Unfortunately, I didn’t find accordingly transaction for a Sales order to deal with the output retrigger after some changes. SAP does provide solutions at notes 395569 CHECKLISTSD: Change outputs.

Monday 31 May 2021

Avoid Hardcoding in SAP by TVARVC or SETLEAF

At the time of discussing client’s pain points and challenges which they are facing or reviewing the ABAP codes we have noticed that many variables are hardcoded or many Z-tables are present in the SAP system for maintenance of data to use in user exits, BADI’s, Reports, Forms, etc.

Due to Hardcode, code changes is required every time for addition/modification/deletion in the data which requires additional technical efforts along with functional for inputs & testing. Due to Z-table creation also Additional ABAP efforts are required for DDIC creation, table maintenance generator, domains creation or assignment, etc.

Wednesday 26 May 2021

How to create and approve ATC exemptions in SAP BTP ABAP Environment

With SAP BTP ABAP Environment 2105 we delivered the basic scope of ATC exemptions. Now you can create and approve ATC exemptions using ADT in Eclipse and transport them between different SAP BTP ABAP Environment systems.

NOTE: In order to incorporate feedback from early adapters before making this functionality free available for all, it is currently available via the feature toggle. You need to create a customer ticket on the BC-CP-ABA component to turn it on in your SAP BTP ABAP Environment system.

Let’s take a look at the ATC exemption process in detail. The following class contains the hard-corded user name and will be checked with the ABAP Test Cockpit for security violations:

Monday 24 May 2021

SAP oDATA V4 API – Using ABAP Restful Programming

Challenge:

Create a ABAP V4 – API with Parent and Child Relationship using existing Standard CDS Views Provided by SAP without Writing an ABAP Code

Note: Some of the code are not pasted so that readers try it with hands on.

Business Scenario: Get All Business Partner Details – Supplier – Customer – Expanding from Parent Child

Friday 21 May 2021

Extension and enhancement of SXI_MONITOR Generic Search Framework

Introduction

This blog post describes the technical background of the SXI_MONITOR Generic Search Framework and explains how to create your own enhanced searches.

Content of an XML message

The SXI_MONITOR Generic Search Framework is used to filter XML message based on its content. The following figure shows how an XML message is structured.

Monday 17 May 2021

Filters Push down in ABAP CDS views – For a better performance of the application!

In this blog post I have discussed on various technics those can be used to push down the consumption level filters to the database table level

1. Pushing down the single selection filters from the fiori application using parameterized ABAP CDS views

2. Pushing down the multiple selection filters from the fiori application using the dynamic where clause – In combination with the ABAP Managed Database Procedure (AMDP ) table functions and ABAP CDS views.

Tuesday 11 May 2021

Upload Variant table using transaction CU60E – RCU_UPLOAD_EXCEL_TO_VTAB

Learn about how to upload variant table contents from excel in .csv format using transaction CU60E.

Business requirement: In general , in Variant configuration module it is always require to upload the values to Variant table as a content from excel file. It will be always challenging for the functional consultants to load the data from excel file to SAP particularly in project implementations.

When we have a characteristics values being filled in excel sheet we can upload via transaction CU60E with .csv format.

Wednesday 5 May 2021

Getting acquainted with automating ABAP unit testing – Part 10

Part 9 – Write a third unit test

To recap from the preceding blog, we added a new unit test for testing production subroutine set_alv_function_module_name and, when executed, this unit test triggers a warning. Here is the source code as we left it in the previous blog:

Monday 3 May 2021

Getting acquainted with automating ABAP unit testing – Part 9

Part 8 – Fix the production code bug identified by the second unit test

To recap from the preceding blog, we fixed the production code highlighted by a unit test failure, which caused the unit test to now pass and the production code, when executed, to retrieve the correct rows from the persistence repository. Unfortunately, we also found that when we request the output in ALV grid format we still are presented with the ALV report in classic list format. Here is the source code as we left it in the previous blog:

Tuesday 27 April 2021

Getting acquainted with automating ABAP unit testing – Part 8

Part 7 – Write a second unit test

To recap from the preceding blog, we had added a new unit test method to call subroutine get_flights_via_carrier three times, each time using a different carrier value, and found that this unit test method issued two failures, suggesting that one of the carrier values did not cause a test failure. Here is the source code as we left it in the previous blog:

Monday 26 April 2021

Getting acquainted with automating ABAP unit testing – Part 7

Part 6 – Using the correct method call syntax to request a unit test assertion

To recap from the preceding blog, we had changed the call to method assert_not_initial of class cl_abap_unit_assert so that it uses the standalone static method call syntax instead of the former dynamic method call syntax. We also know there is a bug in the production code: the ALV report presents rows for the wrong airline. Here is the source code as we left it in the previous blog:

Monday 19 April 2021

Getting acquainted with automating ABAP unit testing – Part 6

Part 5 – Fix the production code bug identified by the first unit test

To recap from the preceding blog, we corrected the bug exposed by a failing unit test. Now the unit test passes and the program, when executed, produces an ALV classic list report instead of issuing an error message, though the rows appearing in the report do not necessarily match the value specified on the initial selection screen. Here is the source code as we left it in the previous blog:

Sunday 18 April 2021

How to use a RFC Function module using RESTful ABAP Programming

I got a requirement to use RFC function module to get the data third party system. Using ABAP programming it is a cake walk for any ABAP developer. But, my client asked to use Eclipse and CDS to achieve this functionality. As many of us are new to Eclipse and CDS views. After doing R&D and found one reference to achieve my requirement. I hope this blog helps to all those who are going to start using Eclipse ADT for their developments.

1. Create a CDS view using templet “Custom entity with parameters”.

2. Create custom entity as per your required output and make sure to give the Class name “ABAP:ZCL_RFC_DETERMINE_JURISDICTION” where you are going to call your function module.

Friday 16 April 2021

Getting acquainted with automating ABAP unit testing – Part 5

Part 4 – Complete the process of writing the first unit test

To recap from the preceding blog, we added an assertion to our unit test method, and when we executed the unit test it promptly detected a failure after calling production-code subroutine set_alv_field_catalog. Here is the source code as we left it in the previous blog: