Thursday 31 December 2020

How to get fuzzy search for multiple columns other than the standard search help.

Introduction:

I am going to explain, how to add new fields in standard search help and make it available as fuzzy search help in dictionary(SE11) level and as well as report level.

Custom fuzzy search help in report level:

Step1:

Go to tcode SE11 and Create a custom table with the following fields, here I want to add a new field PO text to be displayed in the search help so added a field for PO text.

Wednesday 30 December 2020

Safe dating in ABAP

Every so often a developer needs to involve code related to dates in their work. I have come across some “interesting” and “creative” approaches to this which might work under some conditions, but do provide a risk. Let’s talk dates in ABAP. I’ll explain how they work, common mistakes and my suggestion for consistent handling… Please let me know if you have other suggestions!

The Basics

There is a predefined data type DATS which you declare just as you would expect:

DATA lv_date type dats.

To assign it the value of todays date, which always is available in the sy-datum field:

Tuesday 29 December 2020

SAP TM – Auto populate Email Receiver for PPF Action / PPF Output/ PDF Forms

Introduction:

A common functionality in SAP TM can be to send the email with the attachment to a particular receiver or a set of them when an action is executed in Output Management. This can be achieved manually by adding the email id into the Communication Tab and executing the action but checking the email checkbox.

But the requirements can be like, the receiver should be auto-populated based on certain conditions and add into the receiver table in the Output Management tab whenever the action is executed.

Monday 28 December 2020

ABAP Tricks for Functionals | Trick #1 – Edit Table Values in S/4 HANA using SE16 Debug Edit

Introduction –

We come across situations where we need to edit values in standard/custom tables. There could be many reasons why you want to edit values in standard/custom tables, some reasons are listed below.

1. You are performing testing, and want to simulate a test scenario without changing a lot of test data

2. You do not have a table maintenance transaction available to edit table value

3. You have found a data inconsistency and want to change table value to fix it

Sunday 27 December 2020

Calling Stored Procedure from SAP ABAP Application [BW on HANA, BW/4HANA, S/4HANA]

Stored Procedure – Introduction

Stored Procedure are frequently used Objects in SAP HANA. Stored Procedures allows to group the SQL statement into a single block and can return data in the form of output parameters.

In Mixed modelling Scenario calling a Stored Procedure from SAP Application can also be a good approach. Below is one Scenario we have faced in our Project.

Scenario: We had created a S/4HANA Report based on a Transient Provider and when checking for InfoProvider report gives a System Generated Tech name 2H*.

Saturday 26 December 2020

SAP Cloud Platform Launchpad: Integrate apps from the ABAP Environment

In this blog I’ll demonstrate how to configure an integration between the SAP Cloud Platform Launchpad service and a Fiori application deployed in the the ABAP environment. Below is the setup with both the ABAP environment and the Launchpad service sitting in the same subaccount. The steps shown will also work across separate subaccounts.

SAP Cloud Platform, ABAP Environment, SAP ABAP Exam Prep, SAP ABAP Development, SAP ABAP Guides, SAP ABAP Career, ABAP RESTful Programming Model

Wednesday 23 December 2020

SAP TM – Access the Transportation Charge Delegated Node in TOR BO and Update the Delegated Node.

Introduction

Working with BOPF in SAP TM is tricky and many times the developers struggle to find help online.

This blog is just an effort to reduce the burden by providing an easier way to traverse the delegated node for Transportation Charge From the Freight Order Root and how the update the Delegated Node fields.

Hoping that the reader has an idea about basic terms like Business Object, Node, Association etc, I move forward with the explanation.

Monday 21 December 2020

ALV Tree Simple Report (Multiple orders => Single Delivery)

Requirement

We had an interesting requirement to combine multiple orders (belonging to a single ship-to party) into a single delivery note. This can be achieved using standard transaction ‘VL10’ but the custom requirement was to only be able to combine the orders that had a similar payment type. Payment type is a custom field in the Sales Order (in our case VBAK-ZPAYM_TYPE) which can be either Cash, Credit Card, Debit Card or so on.

In this blog post, I’ll show how I used ALV tree for displaying orders belonging to Ship-to in a hierarchical form.

Friday 18 December 2020

Configuring OAuth 2.0 and Creating an ABAP Program That Uses OAuth 2.0 Client API

This blog post will give the basic overview about OAuth2.0 Configuration and use case from SAP ABAP program.

Introduction:

The OAuth 2.0 server (AS ABAP) protects resources you want to use, and the OAuth 2.0 client enables you to access services and resources that are offered by a service provider.

Authentication with OAuth 2.0 protection between an SAP NetWeaver Application Server for ABAP and an external service provider such as, for example, SAP HANA Cloud Platform, Google Cloud Platform, or Microsoft Azure, requires a dedicated OAuth 2.0 client. You can configure and register this OAuth 2.0 client in the OAuth 2.0 server (AS ABAP).

Thursday 17 December 2020

Dynamic Cache for CDS View performance optimization in S/4HANA

Purpose

Performance optimization of analytical app is crucial in S/4HANA as it causes additional system load as well as performance of analytics itself. This is great impact on business users.

This blog is about the CDS View performance optimization with Dynamic Cache in S/4HANA. With the Dynamic Result Cache, as the aggregated cached data is accessed instead of data in the source table, thus the runtime could be optimized. The cached data is updated when the data in the source is updated. Dynamic Cache can be created for a table in S/4HANA.

Wednesday 16 December 2020

CDS View Entity

The purpose of this blog is to show the created CDS view entities including Analytic Query, Extended entity, Annotate Entity in the system.

Test system

◉ S/4HANA On premise 2020 Initial shipment stack

◉ ABAP Platform Initial shipment stack (SAP_BASIS 755/0000 with SAP Kernel 781 patch19).

Tuesday 15 December 2020

Extending SAP Fiori App: My Inbox – Approve Purchase Requisitions (F0401A)

Overview

The intent of this blog post is to provide some initial insight in extending the standard SAP Fiori – My Inbox application. Specifically, this will deal with the SAP Fiori app: My Inbox – Approve Purchase Requisition (F0401A). Take note that this will not go into the details of setting up the SAP Business Workflow that will be using this, but only extending the SAP Fiori app itself. Fortunately, once set-up properly, we only need look at the ABAP Core Data Services (CDS) views to modify the front-end output.

Monday 14 December 2020

Reports with CL_SALV_TABLE

This time we’re going to make a report using the CL_SALV_TABLE class to create a grid with data.

This object is very useful and easy to use that you could make reports preparing first the data and finally exporting it to CL_SALV_TABLE.

It is also possible to it color la cells, rows and columns and it is even possible to make editable cells to enter data.

CL_SALV_TABLE includes toolbar and events where you can make calculations, save date and make a very interactive report.

Friday 11 December 2020

Modern Regular Expressions in ABAP – Part 1 – Introducing PCRE

Regular expressions have been part of the ABAP programming language for quite some time now. From the beginning, more than a decade ago, there has been only one regular expression flavor, defined by POSIX standard 1003.2 and implemented by the Boost Regex library version 1.31.

These regular expressions can be applied in a variety of ways throughout the ABAP language:

◉ using built-in functions like find, replace, count, matches, etc.

◉ using the ABAP statements FIND and REPLACE with the addition REGEX

◉ and, for the most amount of control, using classes CL_ABAP_REGEX and CL_ABAP_MATCHER

Thursday 10 December 2020

Determination In BOPF

Description: The Blog Post is about how to create determination and test it in BOPF framework.

Prerequisite: To know The Steps Of Creating BO Object in BOPF And Also To add Node And Necessary Structures Required For Creating BOBF Application.

Introduction: A determination is an entity of a business object node that is used to provide functions that are automatically executed as soon as a certain trigger condition is fulfilled. A determination is triggered internally on the basis of changes made to the node instance of a business object.

Examples For Determination: Generation Of ID Automatically Via SNRO.

Tuesday 8 December 2020

Automate Master Data Vendor Extension Process to Purchase Organization with Approval Workflow

Introduction

In every Project or Customer you worked for, you will have the scenario where some Master Data will not be extended to Company Code/Purchase organization and in those scenarios you have to send an email to that Team and wait when this will get extended so that you can create your Business Document. In this Blog we are considering a case where a Vendor/Supplier is not extended to a Purchase Organization. We will show how we can create a Simple Workflow for the Approval of this Master Data Extension and it is Auditable as everything is inside SAP. This will help you achieve the following Business Goals

Saturday 5 December 2020

Entity Manipulation Language – EML | RAP Series

What is EML?

Entity Manipulation Language (EML) is a part of the ABAP language. It means that there are new syntaxes available in ABAP to

◉ control the business object’s behavior in the context of ABAP RESTful programming model, using ABAP code user can manipulate Business Object created using ABAP RAP model

◉ provides a type-save read and modifying access to data in transactional development scenarios.

Friday 4 December 2020

QR code in smartforms

Most of the time in SAP the answer for many things come from a lot of sources. The QR code implementation in SAP is an example of it.

But then I realized that even if I use that code I had to deal with the fact that I should be aware that the QR code had to be generated from a Google API. That could be a problem because in my case I needed to use that feature internally, so it was not ok to access the internet to get the image. On the other hand, this site could be at any moment be closed or shutdown.

So, the thing is that I had to make my own webservice to get that image, and having a background of C# I found it logical to make my own webservice. So I began to investigate how to generate the QR and when I got it then I proceeded to code it. There are a lot of open source solutions out there and in my case, I just had to grab one of them and use it. I found a couple and the ZXing.Net implementation seemed to be the best in this case.

Thursday 3 December 2020

How to create a follow up (Subsequent Notification) in PM

Prerequisite:

You have a PM notification under which you want to create a child (subsequent or follow up) notification.

Overview:

I wanted to create a subsequent PM notification under a parent notification and could not found any concrete solution for the same which inspired me to write this blog to help fellow developers who are facing a similar problem.