Wednesday 26 January 2022

“Self-Monitoring” Batch-Job

Introduction

ABAPers

have you ever encountered the situation where it might be helpful to monitor running batch jobs via ABAP-Reports (e.g. to get noticed automatically via email when a job fails)?

I want to share some basic ideas/snippets on this topic with the following blog post.

Snippets

It is quite “simple” to retrieve the status of a batch-job via function-module. FM

Monday 24 January 2022

How to Set Up the Email Notification for Flexible Workflow in SAP S/4HANA Cloud

Background

SAP has provided a Standard Solution to notify the users about new work items generated by flexible workflow and displayed in the ‘My Inbox’ app.

Introduction

The default notification in SAP S/4HANA Cloud is through alerts that are displayed in the SAP Fiori Launchpad, but it is also possible to configure the system to notify users via email about new work items in their inbox.

Moreover, it is possible to configure the system to send notification for approval or rejection of requests.

Saturday 22 January 2022

ABAP Runtime Measurements Made Easy

We have all done it, written a piece of code that seems pretty cool in the development environment and when it hits a customer with sufficient data volume, it turns into a slow crawling snail.

That means back to the drawing board and evaluating different approaches for the code.

We have to take runtime measurements to compare the results and make an educated guess of which approach might be the best.

The ABAP development environment offers lots of nice tools to do runtime measurements, e.g. the ST05 trace, the SAT runtime measurements, the SQL monitor, etc.

Friday 21 January 2022

How to setup a cloud connector for OP integration

This blog post describes how to set up a cloud connector for integration between SAP Self-Billing Cockpit and an SAP S/4HANA system.

Prerequisites

◉ Download the cloud connector in https://tools.hana.ondemand.com/#cloud

◉ Install the cloud connector in one service which would not shut down. Otherwise the connection between Self-Billing Cockpit and S/4HANA would disconnect when service down. https://help.sap.com/viewer/cca91383641e40ffbe03bdc78f00f681/Cloud/en-US/57ae3d62f63440f7952e57bfcef948d3.html

Thursday 20 January 2022

AMDP: Scalar Functions

Introduction- Short Recap

Database Procedures (sometimes referred to as Stored Procedures or Procs) are subroutines that can contain one or more SQL statements that perform a specific task. They can be used for data validation, access control, or to reduce network traffic between clients and the DBMS servers. Extensive and complex business logic can be embedded into the subroutine, thereby offering better performance.

Like every database, SAP HANA support procedure implemented using native scripting language (HANA SQL Script in case of HANA database). These procedures are created and executed on the database layer. HANA DB is column based and reading data is very performance cost. To tackle this problem, ABAP Managed Database Procedure (known as AMDP) is defined which is used a top-down approach. It is written in ABAP layer but pointing to HANA DB.

Wednesday 19 January 2022

HTTP Services in SAP BTP

Definition :

The HTTP service is the component of the Application Server that provides facilities for deploying web applications and for making deployed web applications accessible by HTTP clients.

We have seen HTTP and HTTPS services in SAP ERP, there are many steps involved to create and enable this service in ERP. But in BTP its relatively Simpler, Let’s look at the steps for creating HTTP service in SAP BTP .

Tuesday 18 January 2022

Connect a btp application to on-premises services

Cloud Connector

Is basically a reverse proxy with a tunnel to the btp. You can have many of these connection to a btp subaccount, identified by an ID, in this case mylocalmachine:

SAP BTP, ABAP Development, SAP ABAP Exam Prep, SAP ABAP Certification, SAP ABAP Skills, SAP ABAP Tutorial and Materials, SAP ABAP Jobs, SAP ABAP

and set up a Cloud to On-Premise link:

Monday 17 January 2022

Passing Dynamic Signature (HMAC SHA256 algorithm) and Timestamp in SAP PI REST Adapter Header Using Java Mapping

Introduction:

This Blog will guide you to pass dynamic Signature and Timestamp in the Header of a POST Method Using REST Adapter in SAP PI. For calculating signature there are certain rules which will be mentioned in the Pre-Request Script of the Third-party service which you will be integrating into SAP. In this case, the Signature is calculated by the HMAC SHA256 algorithm and passed in the Header of the POST Service where the receiving third-party system will validate the signature.

Preface:

I recently worked with a Receiver Adapter integration with a Third-party and there was a challenge in Passing Headers. In general Integration scenarios in Headers, we used to pass Token or Authorization or some known parameters, the case which I have worked on has Signature and Timestamp to be passed in the Headers.

Wednesday 12 January 2022

BTP Integration – Process email Attachment to Post Deep insert using odata on Premise ECC

There are different integration scenarios where we would like send to an email with attachment of contents (XML or json) which can be read and sent to ECC to post a transaction identified by the integration. To achieve this we have to perform the following Steps

1. Configure ECC and cloud connector for http

2. check connectivity for IMAP download and import the certificates into Integration Suite key Store

3. Create the BTP Integration iflow to process inbound email to read the attachment and invoke the configured odata service and send result email or exception process email

4. Test the end to end process

Monday 10 January 2022

ABAP Unit Tests: Generate a VALUE # Statement for the Contents of an internal Table

Creating test data for a meaningful ABAP unit test can be challenging. The data preview in the ABAP Development Tools (ADT) for Eclipse can help with that for database tables or views.

Let’s take table T100 (ABAP messages) as an example. First open the table definition and then click on the F8 button to trigger the data preview.

SAP ABAP Unit Tests, SAP ABAP Development, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Guides, SAP ABAP Skills, SAP ABAP Certification
ABAP Data Explorer in Eclipse

Saturday 8 January 2022

SAP S/4HANA 2021 Release: System Comparison Tool

Would you like to know what has changed in SAP S/4HANA on premise release 2021 vs. release 2020 as far as development objects are concerned? Or would you like to compare the source code in your development box with the code that is running on your production system?

If yes, you might be familiar with the existing repository comparison tool that can be started via transaction SREPO.

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Prep, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Tutorial and Materials, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Certification, ABAP Development
Initial Screen of Transaction SREPO

Friday 7 January 2022

My learnings with AMDP

In this blog, we will be covering some of the learnings of AMDP. We are covering different scenarios and errors related to it.

This is an attempt to help anyone who is starting with AMDP’s and need help with issues faced.

Further scenarios will be added in up-coming blogs or updated in this blog only.

Scenario 1) Add colon(:) sign as and when you are going to use a local variable in a method. Below error will come if there’s no colon added:

“LT_ABAP_DATA” is unknown. ABAP objects and DDIC objects must be declared in the METHOD statement. Local names must start with “:” here.

Wednesday 5 January 2022

Run your ABAP Unit test in CI pipelines

In this blog we will take a look at how to run your ABAP Unit tests in CI pipeline when publishing from AbapGit and how to run the unit tests without relying on additional source code installed on the Abap server.

Why would you even want to consider this approach. You could just keep running your Unit tests like normal.

While this is certainly true, I don’t think you can test too often, so adding another layer of testing in a pipeline where you could also integrate other packages as well is pretty cool. Or possibly you could use this setup to potentially shift your development to a server off the common transport path to later integrate into the test system via a pipeline.

Monday 3 January 2022

Enter dates in your SAP Fiori Elements App without actually entering dates

Do you know you can use words like ‘now’, ‘tomorrow’, ‘today’, ‘yesterday’, ‘next month’, ‘next year’ etc. in a Fiori Element App Preview while entering values for date and timestamp fields without any additional implementation. This may come handy while testing RAP generated oData services through Preview Tool URLs.

Here is the list of all the words and how you can use these:

Open your Service Binding in ADT and select the entity which has date/timestamp fields enabled for CREATE mode. Hit Preview button in ADT to launch Fiori Elements App preview and then hit Create button in Fiori App Preview