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).