Showing posts with label ABAP Development. Show all posts
Showing posts with label ABAP Development. Show all posts

Wednesday, 13 March 2024

How to attach documents to a Journal Entry within SAP S/4HANA Public Cloud from ABAP

Introduction


In this blog, we describe a method to attach document files to a Journal Entry (BKPF) instance within the same SAP S/4HANA Public Cloud  using ABAP.

How to attach documents to a Journal Entry within SAP S/4HANA Public Cloud from ABAP.

This requires us to expose and consume the Attachment API as described in the SAP Business Accelerator HUB - Attachments.
 
I believe this blog can be very useful since existing documentation primarily focuses on exposing the services, but we encounter conceptual problems when consuming them locally.

Wednesday, 4 October 2023

Step by Step creation of Custom Database Table and Updated it with HANA Class using ABAP on HANA Development

Now I am going to explain how do we create Customized Data Dictionary Table in ABAP on HANA environment and updating the created Table 

Step1: Open the Hana studio and Go to the project explorer.

Step2: Click on the package and Right click on Dictionary.

I.e.. Dictionary –> New –> Database Table

Friday, 8 September 2023

Deadlock issue Analysis

Introduction:


The problem is the Database dead lock that occurred on every week at particular day and time in the production environment. Due to this database deadlock issue, the system would halt the background process, the users would not able to login into the system and would not able to process any document creation or change in the production system. The database table lock entries are being created spontaneously without releasing lock entries. For instance, within the short span of time more than 600k entries are created. So, there is no system resources free to process the rest of the operation/process.

Friday, 2 December 2022

Use multi-tenant capabilities of SAP Job Scheduling Service to schedule tenant-specific jobs to pull data from the S/4HANA system

In this blog, we will see how to schedule periodic jobs for each of the subscribing tenants to pull data periodically from the backend system and ensure data isolation for each tenant.

SAP Job Scheduling Service


SAP Job Scheduling service allows you to define and manage jobs that run once or on a recurring schedule. Use this runtime-agnostic service to schedule action endpoints in your application or long-running processes using Cloud Foundry tasks. Use REST APIs to schedule jobs, including long-running jobs asynchronously, and create multiple schedule formats for simple and complex recurring schedules. Manage jobs and tasks and manage schedules with a web-based user interface.

Wednesday, 24 August 2022

E-Mail Templates in S/4 HANA- Display table in Email Template

SAP has a very interesting feature in S/4 HANA (cloud and on premise both) – E-Mail Templates.

In this blog post, we will learn how to embed table with multiple records in SE80 email template.

Example:

◉ Requirement is to send an email by end of the month to all employees who has pending hours in his/her time sheet. Data is taken from Std HR tables and pending hours is calculated using formula for each employee for project on which he is assigned. Pending hours = Planned hours – (Approved + Submitted) hours.

Monday, 18 April 2022

Delivery Time Calculation for Summarized JIT Call with “CYCLE”

Solution Overview

As you know SAP KANBAN solution have provided external procurement function which can issue summarized JIT Call document to suppliers for fulfillment. it is definitely containing delivery date and time in the header information on summarized JIT Call documents, and those can be calculated by SAP standard JIT calculation profile configuration also. but during the solution delivery, you will be facing the “CYCLE” issues which was broadly and deeply operated on Japan automotive OEM and their suppliers who running KANBAN in factory.

Tuesday, 23 February 2021

Table Function for Calendar/Date Attributes

This Blog would give us most of the information about calendar attributes or date attributes through ABAP CDS. I am involved in Group Reporting implementation where we have to deal with lot of date attributes.

Little background on Group reporting, the data from group reporting is stored in ACDOCU (Consolidation Data table) where the data can be stored as Consolidated or Pre-consolidated which differentiated by RECORD TYPE. Consolidated data will have RECORD TYPE ‘R’, and the data is stored in cumulative manner ( Balance Carry Forward). For Balance Sheet reports if we want report DEC.2020 value then if you can directly the value of last period of the year 2020 and also YTD value for the 2020 can derived by reading last period value of 2020 as Record Type R will have Balance Carry forward. But the complexity increases when you are creating or designing the P&L reports where we need to show periodic values of the each month instead of Balance Carry forward.

Monday, 12 October 2020

Pitfalls at S/4HANA db tables with replacement object

1. Introduction

Due to the change of some data models, SAP uses so-called replacement objects for some db tables in S/4HANA. There are some oddities to consider, which I would like to discuss in this blog post.

Since the basis for the replacement object is a CDS-View, it seems mysteriously that a db table can also exist on the HANA database at the same time, where individual data records can be stored.

Monday, 16 March 2020

Code-to-Data Paradigm in ABAP with SAP HANA

I have started learning ABAP with SAP HANA and I understand that Code pushdown is nothing new, It’s just “new” for many ABAP developers. So I want to share my exploration on this.

Traditional ABAP coding Style:

In traditional ABAP coding, it’s a standard practice to limit the number of hits to the database by bringing data as much as possible to the application server and then performing the operations on it to produce the desired output. Even though retrieving a large amount of data from a database is time-consuming.

Thursday, 12 December 2019

ABAP custom code adaptation for SAP HANA DB migration

Introduction


Objective of this blog is to provide a quick and short reference for custom code adaptation for SAP HANA database migration.

Scenario –  ERP system running on any DB to Business Suite on SAP HANA
Key Points to remember

Friday, 29 November 2019

ABAP Tool for receiving automated e-mails for SAP HANA Alerts

Introduction:


You want to receive automated e-mails for the currently active SAP HANA Alerts. These e-mails should be triggered by an ABAP program and the SAP Job scheduler (transaction SM36).

For this purpose, we have developed a little standalone ABAP program with the name RSHDB_SEND_ALERTS_BY_MAIL. This program sends automated emails with the currently active SAP HANA Alerts. Additionally, the program allows to restrict the alerts by the Rating and the Alert ID.

Wednesday, 1 November 2017

ABAP On HANA – My experience in SAP Inside Track

I would like to share my knowledge, which I gained from SIT (SAP Inside Track). Before getting started with a particular topic, I would like to share my experience on SIT, which was conducted in Hyderabad. It was a great pleasure for me to be a part of SIT. There were many valuable sessions throughout the day for 3 tracks (Technical, Functional and Analytical). As basically I am from technical side, the topics which they chosen are really excellent and presented in a very good manner.

Monday, 30 October 2017

Unfair speed test – ABAP CDS on ASE vs HANA CDS on HANA

The title of the blog post says it all. This will be an unfair speed test.

If you’ve read the previous two posts of this series, you’ll note that I have successfully connected the ABAP 751 SP02 Developer Edition to a HANA Express 2.0 server as a secondary DB and used a simple ABAP program that helped replicate data over from ASE to HANA DB.

To perform this test, I created two very similar CDS, one on ABAP that will be selecting from the ABAP 751 server running on ASE and another directly on HANA hosted on my HANA Express Edition server.

Friday, 13 October 2017

Code Push Down for HANA Starts with ABAP Open SQL

What is Code Push Down?


One of the key differences for developing applications in ABAP for HANA is that you can push down data intense computations and calculations to the HANA DB layer instead bringing all the data to the ABAP layer and the processing the data to do computations. This is what is termed as Code-to-Data paradigm in the context of developing ABAP applications optimized for HANA.

Thursday, 12 October 2017

Under the HANA hood of an ABAP Managed Database Procedure

I’ve been looking into ABAP managed database procedures for HANA recently and decided to take a look at what’s actually created under the hood in the HANA database when an AMDP is created.

I created a small test class in our CRM on HANA system with a method to read a couple of columns from the crmd_orderadm_h table using sqlscript. The method takes one input parameter IV_OBJECT_ID and has one export parameter ET_ORDER.

Sunday, 13 August 2017

ABAP on HANA Optimization – Step by Step Remediation

1. STEP BY STEP TUNE YOUR CUSTOM ABAP CODE – HANAFIED


1.1 Introduction

Before Migrating to Suite on HANA or ABAP on HANA environment we need to analyse which of my ABAP code must be changed to avoid potential functional issues. In general existing ABAP code runs on SAP HANA as before Only if ABAP code relies on technical specifics of the old database, ABAP code changes might be necessary.

Monday, 24 July 2017

CDS view performance analysis using PlanViz in HANA studio

I am a newbie in CDS performance area and frequently I meet with some “weird” performance behavior which makes me really confused. After I consulted with performance experts, it turns out that all those “strange” behavior has their root cause and could be well explained – no strange at all but just works as designed! I will share with my finding and learning with you through this blog.

Tuesday, 13 June 2017

Remediation for HANA Migration

Before migrating to HANA platform, the custom developments in SAP need to be remediated for HANA compatibility as explained in SAP Note 1912445.

Steps to be followed:

1. Identify the code where modifications are required.


 Execute SCI for custom developments with check variants as ‘FUNCTIONAL_DB’ and ‘FUNCTIONAL_DB_ADDITION’.