Wednesday, 28 December 2022

How To Create A Rest Api With SAP Abap And Apply MVC1 Routing

In this blog post, I would like show how to create Rest api and how to apply MVC1 routing to handle different request simply from a controller class.

For that, first we will create handler and controller class for rest structure. Then we will add mvc1 controller class and model class to process business logic.

And finally we will create a service to handle rest requests.

Tuesday, 8 November 2022

Creating Dynamic Table and Dynamic Select

In this blog, I will talk about the necessary methods and definitions for the use of dynamic tables in a program, dynamic select and how to perform operations on dynamic table. I hope it will be an example for you to create a dynamic table. Before start, dynamic internal table is an internal table with variable rows and columns which can be defined during run time.

Definitions

For dynamic table, we create Field-symbol. Remember that “Field symbols can be declared in any procedure and in the global declaration part of an ABAP program, but not in the declaration part of a class or an interface.”

Monday, 22 August 2022

Extending SAP FIORI App : My Inbox – Approve Purchase Order (F0402A)

Overview

This blog shares on how SAP FIORI App – My Inbox can be enhanced. FIORI extension is done on My Inbox – Approve Purchase Order (F0402A) enhancing custom field in PO Line Item data.    Custom screen enhancement is done on PO Line Item to add field ‘Last Price’. To display the field on FIORI screen, no enhancement is needed either in Odata, Workflow or UI. Appropriate CDS views related to My Inbox – Purchase Order app to be identified and enhanced to modify the UI output display.

Workflow Configuration

SAP Business Workflow configuration entries maintained for Workflow Task of Purchase Order

Transaction Code – SPRO

Wednesday, 10 August 2022

Enabling the CFL custom fields with F4 help using SCFD_EUI transaction from SAP GUI

Custom fields can be enabled at GUI or FIORI launchpad either using CFL (Custom Fields Logic) or transaction code SCFD_EUI. In this blog I will be demonstrating the prominence of SCFD_EUI in enabling the custom fields with F4 help at the backend (SAP GUI).

Why to use SCFD_EUI instead of CFL?

There are few advantages for preferring SCFD_EUI over CFL

In CFL, customization of field suffix is not allowed as the suffix is predefined and cannot be changed. However, in SCFD_EUI we can change the suffix of the field as per the requirement.

Friday, 5 August 2022

ABAP Restful Application Programming: Custom actions => Merge Draft entities into Active and switch to display mode

Introduction:

In this blog post, I will explain about “Custom actions” that can merge draft entities into Active and switch to display mode. An action in RAP is a non-standard modifying operation that is part of the business logic. The standard use case of an action is to change specific fields of a business object entity.

Problem statement:

In General, MODIFY ENTITIES can be used to change the required fields in an entity. That means, Active instance remains as active and Draft instance remains as Draft. But some business requirements expect us to convert those draft instances into active instances.