Wednesday 30 September 2020

Pessimistic Lock in SAP Netweaver Gateway OData without using soft state

We are building our own App for SAP S4HANA 1909. The frontend is built in a Microsoft based tool. We integrated the App to S4HANA using OData protocol.

One of the requirement is to lock the object, once the user clicks on edit in the App. So that nobody else can edit, either from the app, or in SAP GUI.

Talking about lock in SAP NetWeaver Gateway-OData(on-premise), till date I could not find any solution which will behave similar way as in SAP GUI because of rest property(as rest is stateless) so cant store the state there.

Monday 28 September 2020

Standalone editing of ABAP in vscode

With ABAP code versioned in git, it is possible to clone ABAP projects as files to the local PC. And like other files, these can be edited with your favorite editor.

To help the developer, I’ve been working on a standalone setup for editing ABAP files based on LSP and vscode.

Below shows some of the features currently implemented,

Friday 25 September 2020

Printing QR Code and Digital Signature in Adobe Forms

Introduction

In this blog post, we will see how we can get QR code and Digital signature on Adobe Form without using Job profiles. We will basically convert the QR code into the image (BMP) and then Digitally sign the form via ADS Server.

Before implementing the solution please check if you have SAP note 2790500 implemented in your system so that we can use class CL_RSTX_BARCODE_RENDERER. Go to SE24 and check if you have the above class in your system. If not then implement the given note for the same.

Wednesday 23 September 2020

IDoc modification made easy with ABAP Object Oriented Programming

Introduction

Throughout all my years with ABAP development, modifying IDocs in an easy to understand, elegant way has always been a struggle. First, the issue of making changes to the segments, second, the issue of correct sequence of the IDoc’s segments.

In this blog post, I will show how to easily perform the create, read, update and delete (CRUD) operations on IDoc segments, thanks to the use of ABAP Object Oriented Programming.

Monday 21 September 2020

SAP Analytics Cloud live data connection to SAP Cloud Platform

Introduction:

This blog covers:

◉ Enable HANA service in SAP Cloud Platform(Neo)

◉ Creation of HANA database in Cloud Platform Cockpit

◉ Access the HANA DB

◉ Creation of live connection in SAC for Cloud Platform

◉ Creation of model and simple story in SAC

Friday 18 September 2020

Combine Select-option, CDS Table function and Call AMDP methods in Program

When we use openSQL, filtering data from parameters and select-option is too easy. With AMDP or CDS, we can only filter data with parameters. Some case, we want to filter both

select-option and parameters, So how can do it?

Additionally, AMDP is only a method, so if we have more AMDP methods, how can we call another AMDP inside the AMDP method?

Wednesday 16 September 2020

Unexpected behaviour of the RFC call

In this post I would like to describe interesting behavior of the RFC functional call in ABAP, and especially the program flow on the target side.

Let’s start from the coding, you can find below small synthetic example which is easier to understand than real cases. So please do not focus on the deep sense of it, rather pay attention to the coding itself.

Monday 14 September 2020

How Print-relevant purchasing document changes trigger printout

After Purchase Order been created at the system, the relevant users should get notice email if any important fields been changed like net price, delivery address, items, etc. SAP System already provides an excellent solution with transaction OMFS, where you can maintain a combination of table name and table fields along with control flags to control whether PO printout should be triggered or not.

SAP ABAP Certification, SAP ABAP Learning, SAP ABAP Exam Prep, SAP ABAP Guides

Saturday 12 September 2020

GOS Excel Attachment into Internal Table

Introduction


We have seen how image or PDF file can be retrieved from GOS attachment. But we have challenges when we try to get the data from Excel file of GOS attachment. Herein , we have a scenario where third Party vendor is sending consolidated PO Invoice with Excel File in GOS Attachments. The corresponding excel file contains the invoice line item details like PO Number, Item Number, Amount, Tax Code, Condition type etc. We can check below how we can read the line item data from GOS excel attachment and update the corresponding line item to be passed into Internal Table for further processing.

Friday 11 September 2020

GTT – another ways to replace FAE

With the ECC system in the past, when handling logic to filter the table together, we usually used For all entries – FAE. But, when we use it, we could not be able to utilize power in open SQL (ex Built-in function, order by). Known this disadvantage in the system, SAP has developed alternative solutions (CTE, View, …), one of the solutions which are a Global Temporary Tables, also known as GTT. So what it is, let’s stay tuned!!!

Thursday 10 September 2020

Easy way to create custom country-specific replication classes in the PTP framework

Introduction


When you try to replicate a person from EC to ECPY, then you may face a lot of difficulties like dealing with Pay Frequencies, storing information in a new subtype of an infotype, manipulating the employee data after the parsing of the XML.

SAP has provided country-specific standard replication classes & BADIs infotype wise, for that purpose. But, they are having less flexibility.

Wednesday 9 September 2020

ALV Grid With Multiple Header Lines

Sometimes the column description of an ALV grid is not sufficient and one would like to have multiple lines as column header. With this trick it is possible to realize such a behaviour.

Demonstration


This is how it looks like deomnstrated with the countries table T005T:

Monday 7 September 2020

How to Test BAPI Function Module in SAP?

Introduction


As a SAP Consultant at some point of your career you will use BAPI. There is special way to test a BAPI whether it is really useful for you to call in your Program.

Solution


In our example we will be using BAPI_PO_CHANGE to change some fields in PO Line Item.

Friday 4 September 2020

Easy Way to get the SAP TR/Task(Request/Task) details

Introduction


We generally use the Tcodes: SE01, SE09, SE10 for getting the transport details. The program called for all these Tcodes is RDDM0001. But, extracting the output in an excel sheet & doing some operations on them can be a difficult task sometimes.

Solution


First of all, please change the below-mentioned settings of the SE16(Data Browser) of SAP GUI.

Please follow the below steps:

Wednesday 2 September 2020

Designing for ABAP OOP and coding against interfaces with text-based diagraming tool.

Introduction.


As ABAP developer creating custom code (less than 10KLOC) for various user stories, when I started with object-oriented programming (OOP) in SAP, I had to start to solve below design problems:

1. what the design should contain,
2. how much design I will do up front,
3. how I will display it in graphical way (I prefer graphical way to see to design of my software solution) to see bigger picture,
4. what diagramming tool I will use,
5. what kind of diagram I will use,
6. how I will backup versions of the design,
7. how to create the diagram so that I would reuse it in coding,
8. how to ensure that other developers could update the diagram without a software with some proprietary license (so I was searching for open source software)