Showing posts with label ABAP RESTful Application Programming Model. Show all posts
Showing posts with label ABAP RESTful Application Programming Model. Show all posts

Monday, 17 June 2024

Develop an application utilizing the RAP Web API with SAP Build Apps framework in S4Hana OnPremise

In this blog it will be shown how SAP Restful Application Programming Model can be used and consumed in SAP Build App to create an APP.

Technology used:


1. SAP RAP
2. SAP Build Apps
3. SAP BTP
 

Development Steps:


1.  Create RAP Model objects in Managed scenario.

◉ Database Table
◉ Interface View
◉ Transactional View
◉ Consumption View
◉ Transactional Behavior Definition
◉ Consumption Behavior Definition
◉ Service Definition
◉ Service Binding

Monday, 27 May 2024

Our Way into the Clean Core

Where are we coming from


We are a long-standing software partner of SAP, specializing in supply chain AddOns for nearly 20 years. We have different solutions inside of the portfolio and the older ones are more procedural coding, while the newer ones have more object oriented, more unit testing, and so on. But the big majority of all user interfaces are ALV Grid, ALV Tree and graphics (based on cl_gui_chart_engine). By the time we developed our own framework for these tools, so that it is easy to create several new containers with ALVs, letting the user decide, if he wants to use docking containers or dialogbox containers, support multi screens and so on.

In essence, we had a user interface that our end users greatly appreciated due to its ease of use. However, despite creating additional UI5 applications in recent years, most of our current users continue to work primarily within the SAP GUI. As a result, our initial plans were to gradually transition to more UI5-based applications. But the pressure to do so wasn’t significant, at least not from our customer base.

Wednesday, 17 April 2024

Upload Excel using SAP RAP Only

Develop an SAP RAP based App to upload excel (CSV) file just like you used to develop SE38 classical report.

We often get this requirement of developing a utility to create/update mass data for a BO such as Purchase Orders, Materials, Sales Orders etc. In S/4 HANA, the customer prefers to use SAP Fiori applications, rather than using the old classical reports. But can we develop a Fiori application to upload a file without involving using SAP UI5? Yes, we can.

Wednesday, 6 March 2024

Can I extend a certain app? With Clean Core? How?

Extensibility is a very important part in SAP S/4HANA. Although we recommend to have a fit-to-Standard approach, we know that not everything can be covered; there is a need for extensibility. But we don't just want to go hack about our system (anymore), we want to do it Clean Core compliant, meaning:

  • Extensions are clearly separated from SAP's code
  • Extensions do not modify any SAP objects
  • Extensions use only stable, released SAP APIs and extension points

But how to go about that? Well, I'm hoping to give some help on that. In this blog post I'm focusing on extending an SAP S/4HANA Standard app, as an example.

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.

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. 

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, 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

Monday, 22 January 2024

Unmanaged Query in Root View Entities

Introduction


In the context of the Restful ABAP Programming Model, when you think about an Unmanaged Query, you’re mostly thinking of a Custom Entity. In this blog post, I would like to introduce a method to implement an Unmanaged Query in combination with a Core Data Service (CDS) Root View Entity. I want to explain the advantages and disadvantages using a specific example.
 

Example


Two Fiori applications are required: One app is needed for maintaining an HTML email signature in a Database Table with placeholder for Name & Position, and the other app is intended to locate a specific signature for the logged-in user and replacing these placeholder.

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

Thursday, 9 November 2023

RAP EML Dynamic Operations: Dynamic EML Requests

Introduction


In the world of ABAP development, the RAP framework has revolutionized the way we build robust and flexible applications. One of the key features of RAP is the ability to dynamically generate EML (Entity Manipulation Language) requests. In this blog post, we will explore the dynamic form of MODIFY ENTITIES OPERATIONS, which allows us to perform operations on multiple business objects within a single statement.

Friday, 13 October 2023

SAP ABAP RAP: Custom Entities with compositions relationship in a Fiori Elements App

Introduction:


ABAP Restful Application Programming is an efficient and cloud-compatible development model that enables rapid creation of Fiori apps.

This programming model facilitates both Managed and Unmanaged Implementation approaches, although the core data source must originate from a CDS view or a table within the same system in both scenarios. However, the non-key fields can be calculated on the fly using virtual elements.

When retrieving data from a remote source through an API or performing complex calculations, managing CDS view entities becomes challenging. Further complexities arise when compositions  are involved.

Friday, 22 September 2023

How to Navigate Within ABAP CDS Source Code and Between ABAP CDS Objects?

In this blog, I will describe how to …

◉ navigate within ABAP CDS source code,
◉ come to another  CDS/Dictionary object
◉ navigate within the ABAP CDS object you currently work on

… using ABAP development tools for Eclipse (ADT) a.k.a. ABAP in Eclipse.

Note: When I talk about objects, I mean CDS objects such as data definitions and/or relating ABAP Dictionary objects such as database tables, classic views and so on.

Friday, 21 April 2023

How to Manage and Move Transport Request in S/4HANA Public Cloud in 3 System Landscape

SAP HANA, SAP HANA Exam, SAP HANA Exam Prep, SAP HANA Preparation, SAP HANA Tutorial and Materials

Purpose of this Document


This document helps you understand moving transport request from Development to Q system and Q system to Production system in 3 System Landscape. Transports for business configuration, key user extensibility, and developer extensibility are of the different categories and that is why these are separated. So, we need to understand all of three.

Monday, 6 March 2023

A Complete Unmanaged CDS Scenario Including Parent-Child Relationship

What a trip this case has been. The ABAP RESTful Programming model isn’t exactly new, and yet in my reality it hasn’t been used much. And suddenly I saw myself facing the need for an unmanaged scenario.

First off, this is what you will find here: every single step, from CDS data definitions, to behavior definitions with implementation, and finally to an OData service which can query, read, filter, and even expand/navigate to child entries (NavigationProperty as it is called in the metadata document of OData).

Monday, 27 February 2023

ABAP RAP: Side Effects in CDS Behavior Definition and its variants

Introduction

 
​The most awaited feature was released for SAP BTP – ABAP Environment in 2302. It is none other than ‘Side effects in CDS Behavior Definition’.

I have been waiting for this feature and can’t stop myself from trying it. I thought the syntax would be complicated and was surprised when I realized they were so simple and readable.

​​​Side effects are useful in UI scenarios based on draft-enabled BOs to notify a Fiori Elements UI that data changes of defined fields require the recalculation of other data values, permissions or messages.​

Friday, 10 February 2023

How to consume RESTful Cloud API from SAP with JSON request – MS Dynamics

Development Requirement 


Switching from a conventional middleware to direct consumption of a RESTful API in Azure Cloud requires me to design and build a new SAP program .

Business scenario 


SAP Invoices are to be sent out to Microsoft Dynamics AX Cloud to create local invoices in AX. The invoices from SAP need to be stored in a staging storage in MSDAX before being converted to the local invoices.

Friday, 13 January 2023

Extending Fields in the RAP based Fiori applications

Field Extensions in a Fiori Applications is the most common requirements in many S/4 HANA projects. However this blog will focus on the RAP based Standard Fiori app Extensions for the Custom /Standard Fields.

The below flow charts will illustrate the different decisions and possibilities in extending the custom fields/standard for a RAP based Fiori applications

SAP Fiori Applications, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP RAP
RAP Custom Field Extension

Sunday, 8 January 2023

Alternative to BDC for Transactions F-30 or FB05 in RAP/Fiori Apps for Posting with Clearing

Posting the documents with Clearing open items and doing the transfer postings is a very common requirements in most of the SAP implementation FICO based projects.

Clearing can done in multiple ways

◉ G/L posting with clearing
◉ Customer – Customer  Posting with clearing
◉ Vendor- vendor Posting with Clearing

Wednesday, 21 December 2022

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

In this beginner blog post we are going to see how we can use Side Effects in ABAP Restful Application Programming Model.

What is Side Effects:


When user makes a change to a field on UI, and this change effect the content of other field, this behavior is called Side Effect.

Annotation to Implement Side Effects:


Some more annotation properties are available but for this demo we are only using below 2 Annotations properties.