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

Monday, 8 July 2024

A Comprehensive Guide to Using OLE Objects in SAP ABAP

In this blog, we’ll explore how to use OLE objects in SAP ABAP to automate tasks in Microsoft Word. We will cover the basics, including how to create an OLE object, manipulate data, and handle errors.

Introduction to OLE in SAP ABAP

OLE Automation in ABAP enables you to control Microsoft Office applications. You can create documents, fill in data, format cells, and even run macros—all from within your ABAP programs. This is particularly useful for generating reports, exporting data, and performing complex calculations.

Prerequisites

Before you begin, ensure that:

You have access to a Microsoft Office installation on the machine running the SAP GUI.

You have basic knowledge of ABAP programming.

Wednesday, 3 July 2024

Full screen list in Maintenance Views

Introduction


With or without Fiori in the picture, Maintenance View is one of the main tools for maintaining SAP configuration. Reliable and easy to use, it is a proverbial workhorse.

However, since widescreen monitors became a standard, it has always been frustrating to me to see how much space is left unused (not to say wasted) in the list of a Maintenance View. The obvious solution was to modify the screen manually, but this was overwritten whenever a list was recreated.

Today, I will show you a way of making the Maintenance View list use as much space as possible, always.

Wednesday, 12 June 2024

Introducing new type of Data Access Control "Operator and Value" for SAP Datasphere

Row-level security in SAP Datasphere is implemented via Data Access Controls (DACs) to allow a more granular assignment of authorisations and access to data on dedicated views within a Space.

In general DACs are objects which can be created in SAP Datasphere as objects in their own right which control access to data for each user within a Space. Hence, an integral part of a DAC is a list of values a user is allowed to see for a dimension (e.g. 'Sales Units') a user is allowed to see. This list can be maintained  in a local table, a view or even a table function. Each value a user is allowed to see must be represented by one record in this list of authorised values.

Wednesday, 5 June 2024

SAP Fiori tools May 2024 release adds closer integration with ABAP Development Tools

SAP Fiori tools May 2024 release adds closer integration with ABAP Development Tools 


With the 2405 client release of ABAP Development Tools (ADT), combined with the latest SAP Fiori tools release, users can now have a more integrated experience when working between ADT at the backend and SAP Fiori tools for front-end development. No longer does the developer need to manually switch between the tooling environments and remember which system and entity they wish to use. Instead, with one button click in ADT, users can seamlessly switch from ABAP to SAP Fiori development. 

As mentioned in our SAP Fiori tools March update, SAP Fiori tools now enables users to launch the Application Generator directly from ADT and skip having to select a data source and entity in the generator if they already have the SAP system and entity chosen in ADT. With the 2405 client release of ADT, the development work has been completed and the feature is available to our cloud customers. 

Friday, 17 May 2024

Calling Fragment Form & Send it as an attachment using ABAP Walk-Through

This Blog is based on the Output Management Form and has all of its configuration completed 

Ex for dunning: use maintenance view: V_T047E using code: sm30 to switch between frameworks through drop-down list

Calling Fragment Form & Send it as an attachment using ABAP Walk-Through

Wednesday, 24 April 2024

How to improve the ADT Class Runner with additional Features

What is a Class Runner?


A class runner is a great tool to test code snippets and run code directly from ADT. You can even write a simple log to the console in Eclipse.

What can be improved?


When using multiple systems and complex projects I got annoyed at some point in time, that I don't know from which system the last log was, when it was written by which runner and if the last execution has finished or failed maybe.

Friday, 5 April 2024

Analytical Query CDS View creation and consumption in RSRT along with publishing OData Services

Introduction


In this blog you will learn about the creation of Query CDS Views for Analytical purpose and their consumption in RSRT tool, along with the required steps that needs to be followed to achieve it. Once after the Analytical query creation, I have tried replicating one of my project scenarios to have better understanding on defining key figures/ measures in CDS views. In the end blog explains about the process needs to be followed to expose the given Query CDS view into OData service links. The Query CDS Views are created specifically for Analytical reporting purposes within SAP systems. They can be optimized for certain reporting scenarios, analytical queries, aggregations and further can be integrated with SAP FIORI tool providing much better visual reporting experience.

Creation of query CDS view:


For the creation of query CDS view we must follow 3 basic steps as mentioned below:

Friday, 15 March 2024

Comparing Workflow Templates in SAP

Introduction


Identifying the changes present between different versions of workflow templates can be a challenge. Unlike other objects, there isn't a built-in functionality for direct comparison. Manually scrutinizing each step of the templates side-by-side can be both tedious and error-prone.

This lack can be frustrating, as I’ve witnessed firsthand through inquiries from few of my colleagues struggling to identify changes between versions for troubleshooting or maintaining consistency across environments. Fortunately, I’ve been able to help them by employing a couple of effective techniques that help bridging this gap.

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:

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.

Wednesday, 24 January 2024

Inventory Aging Trend with S/4HANA Embedded Analytics

Inventory aging trend with S/4HANA embedded analytics? Hmm…Sounds like data warehousing  snapshot requirement. Actually S/4HANA inventory data model supports key date concept (with some limitation) making it possible trend analysis.

Example below demonstrates one of possible use cases – month to month comparison showing changes across different aging ranges

Inventory Aging Trend with S/4HANA Embedded Analytics

Friday, 19 January 2024

Exploring Cross-Database Operations in ABAP Managed Database Procedures (AMDP)

In the SAP ABAP world, the use of ABAP Managed Database Procedures (AMDP) has brought about major and useful changes in the way data is processed in HANA databases. One of the many features that AMDP provides developers is the ability to perform Cross-Database Operations. This is an important and useful functionality that allows developers to interact with different databases within or between systems.

Wednesday, 17 January 2024

How to add a new field to the RAP BO of a customizing table

Introduction


In this blog post, you will learn how to adapt a RAP business object of a customizing table when you add a new non-key field to the table. Removing a field works very similar.

This blog is relevant for:

  • SAP S/4HANA On-Premises 2022 or higher
  • SAP S/4HANA Cloud, Public Edition
  • SAP S/4HANA Cloud, Private Edition
  • SAP BTP, ABAP Environment

Monday, 15 January 2024

“Unlocking EDI Flexibility: A Customizable ABAP Journey in SAP”

Enhancing EDI Processing with Customizable ABAP Code


In the realm of Electronic Data Interchange (EDI), flexibility and adaptability are paramount. In this post, we will explore a robust ABAP code for handling EDI files, specifically in the context of SAP systems. The code is designed to be customizable, allowing for seamless integration with various client-specific EDI scenarios.

Customizing the Main Table

To start, we create a main customizing table that serves as the backbone for EDI processing. This table incorporates essential elements for mapping and customization:

Friday, 12 January 2024

Creating custom DANFE | Output Management | S/4 HANA Public Cloud Edition | release 2308

Introduction


In S/4 HANA Public Cloud, we exclusively work with Adobe Forms to handle standard or customized forms. To develop a customized form, it is necessary to customize it using Adobe LiveCycle Designer and apply some settings in the environment so that the form in question can be used. I bring an example with one of the most requested forms by clients: the dear DANFE.

Need


Customization and implementation of a customized DANFE form to meet the needs of the end user. S/4 HANA Public Cloud environment – release 2308

Monday, 8 January 2024

Encrypted E-mail Attachment Pdf

I am delighted to communicate my enthusiasm regarding the proposed measure to enhance the security of the payroll envelope mail that is slated for transmission within the Human Resources (HR) module. This enhancement involves the implementation of encryption to fortify the confidentiality and integrity of the sensitive information contained in the payroll documentation.

I have employed a third-party tool supplied by ‘VeryPDF‘ to implement PDF encryption with a password.

Specifically, the ‘Encrypt PDF Command Line‘ tool from VeryPDF facilitates the encryption of PDFs with a password through the Windows Command Prompt. We can easily trigger that tool from SAP. It is noteworthy that a trial version is available for testing purposes.

Friday, 5 January 2024

SAP Business Workflow – Trigger Workflow Behind Tcode: CJ20N

There was a requirement in a project that the users wants to control project creation with workflow. Project Builder (CJ20N) screen does not have standard workflow process working behind. First of all we need to find the triggering event works behind Project Builder (CJ20N) screen. In my case I need to start workflow process after creating project.

In this blog I will show you how to reach the standard class, events and event parameters to trigger and design a workflow.

Saturday, 30 December 2023

Using memoization to optimize pure functions in ABAP

I recently needed to drastically improve performance of a recursive method, and memoization was there to save the day. I’d like to demonstrate the technique, in case you’re not familiar with it, using the recursive Fibonacci sequence as a base.

FAQ:

Q: Was the Fibonacci calculation what I needed to improve performance for?

A: No, but the recursive Fibonacci calculation is a great and simple example that lends very well to memoization demonstration.

Q: Aren’t there better performing ways to calculate the Fibonacci sequence than the recursive method?

A: Well, there are other, but I need somthing “slow” to demonstrate the memoization I have included two other options in the end, for good measure…

Friday, 29 December 2023

How to get stock on posting date: manually and programmatically

Sometimes for planning purposes we need to get logistics stocks by plant/storage location/material for the specific date. In the blog I will describe some ways to solve the problem depending on version of SAP NetWeaver.

Manual approach via tcode MB5B


Transaction MB5B could help us to read stocks. Tcode could be find via menu path Logistics -> Materials Management -> Inventory Management -> Environment -> Stock -> MB5B – Stock for Posting Date. As we could see from the screenshot below there are also some others useful transactions in the menu path.

Wednesday, 27 December 2023

Abap SQL Common Table Expression (CTE)

I this short blog post, I would like share a few useful CTE examples.

Sometimes we require complex sql queries and at that point we have a few options.

  • CDS
  • AMDP
  • CTE

By considering, DRY principle, if we will use it in multiple places, we may prefer to create cds or amdp depending on requirement. But if our requirement is to use it once, than we can use CTE.