Wednesday 28 February 2024

A Quick Guide To ABAP Debugger

While the SAP BTP platform has witnessed significant progress and adoption, offering numerous development tools for SAP platforms, it's noteworthy that SAP GUI for ABAP continues to be widely utilized in many organizations and projects. This document aims to deliver succinct information about the SAP GUI ABAP debugger, specifically catering to SAP functional consultants and ABAP newcomers.

Note that certain features are also accessible during debugging in Eclipse ADT. Personally, I favor using the Eclipse IDE.

Breakpoint: A breakpoint is a specific point in your program where the execution of instructions comes to a halt. In ABAP, there are four ways to interrupt the execution of your program:

Monday 26 February 2024

How to use Side Effects in RAP (Restful Application Programming) Model

Introduction


When a user modifies the content of a field, and it affects the other fields in the UI. This is known as a side effect.

Side Effects annotations indicate which targets are to be refreshed in order to display updated values. These field values change due to the change of a field, action, or decision action. There are various ways to annotate side effects by combining the triggers and the affected components.

Wednesday 21 February 2024

Reporting daily material stocks using CDS views

Core Data Service Views (CDS) offer the possibility of reporting daily inventory values without the need to set up and fill info structures.

Every company must be able to show and report its inventories and, above all, be able to control them. For some companies, it is also important to be able to see the development of their stock on a weekly or even daily basis. For retail companies in particular, there is also the need to track not only the quantities but also the development of inventory values. In SAP ECC, this was made possible by updating information structures and transferring data to an SAP BW system using so-called 2LIS extractors. In this blog, I would like to discuss the possibilities in S/4HANA systems using CDS views, as in certain scenarios it is no longer possible to update the required info structures. In addition, the approach using CDS views offers the avoidance of non-posting times and the extraction of values without an S-API. This can be used within SAP Datasphere scenarios using CDS-CDC datasources.

Monday 19 February 2024

Dynamically show/hide enable/disable fields in Fiori Elements

Sometimes you need to hide or disable the field in UI dynamically based on condition, for example based on entered data in edit mode.

You can make it in backend using hide annotation with value based on control field. Changing the value of control field via value help additional bindings or determination with side effects.

Use Case: In our app for order creation user is entering order code first. Based on the value of order code the device location field or the device number field should be enabled dynamically in edit mode. I one is enabled for entering the other must be read only. 

Friday 16 February 2024

Methods to identify VIEW and TABLE name(s) from IMG node

Whenever a IMG node configuration is done in SAP, data get stored in View. Views are basically combination of one or more Tables. So, technically when a configuration is saved data is stored at Table level which could be one or more Table but virtually it is possible to view data from one or more table at a single virtual storage location called View. Implementation projects would require Views and Table for IMG Node to custom build tools as per local business requirement.

I have come up with methods to find VIEW(S) and TABLE name using IMG node to all beginners.

Follow either Method 1 or Method 2

Method 1:

Wednesday 14 February 2024

Multi Level BOM Explosion using CDS + Table Function

Problem Statement:-


I came around a requirement to create a fiori applications which involves BOM and had to list down all components of Material considering the multi level explosion.

Considering this data forming the base for the overall fiori application, we can not build a logic using CDS view only, as this involves selecting components underneath each component.

So the only approach is to write a recursive logic to fetch all the related components.

Friday 9 February 2024

Export the Analytic Application to PDF

Introduction:


We can use the "Export to PDF" component and its script APIs to export an analytic application to a PDF file. By default, the export settings we defined in the Export to PDF panel cannot be modified during the application run time by the users.

In this example, to offer application users the flexibility to customize the export settings, I have designed a new settings dialog by leveraging relevant APIs.

Wednesday 7 February 2024

Create CDS view in ABAP on BTP

Overview of ABAP for BTP


The foundation of SAP modification and development has always been ABAP. Developers may now fully utilize cloud-based solutions and expand the reach of ABAP applications to unprecedented levels thanks to the integration of ABAP on BTP. BTP offers a flexible and scalable platform that makes it possible to integrate numerous SAP and non-SAP services with ease.

Begin with Creating a Trial user and installing ADT tools


SAP has given a provision to create a trial user in the BTP environment - Create a Trial user - SAP BTP ABAP Environment

Friday 2 February 2024

Tip: SAP GUI Scripting VBA Code Snippet to Detect all IDs of the UI Elements

In a few cases it is in business context not allowed to install additional analyze software or tools. So applications that are permissible and available must be used, e.g. like Microsoft Office applications. This makes things a bit more laborious, but not impossible.

Here a Visual Basic for Application (VBA) example to detect all IDs of the UI Elements of a session of the SAP GUI for Windows with SAP GUI Scripting. The result is written into a Microsoft Excel table.

The sub routine Start connects to the session and calls the recursive sub routine GetAll, which detects all IDs. The global variable gColl stores all IDs as an array of strings.