Friday, 27 November 2020

How to find the Views/CDS Views that stores multiple Field values? That’s what ABAPER and Functional does :) in WRICEFF development

Introduction

After working with SAP for more than 15 years and travelling across the Globe for SAP Projects one issue I always use to have how can I keep track of all the SAP Tables/Views associated with different Modules. If you are working as a SAP ABAP Consultant you need to keep the name of tables/views in your Fingertips. Sometimes this you know from other Experts and sometimes you have to dig it out.

After exploring I found a very easy way to know the Tables that contains all the four fields or Data Element in the same Views and has data in it.

Thursday, 26 November 2020

How to Send Email from SAP ABAP Query Report ?

Introduction

In SAP most of the time when we create a ABAP Query report we do it to download it to our Local file and then we need to send it to a bunch of Recipient. This Blog will help you in taking some of this Steps reduced by Sending email directly from the ABAP Query Report.

Solution

First we go to Transaction Code SQVI.

Select your ABAP Query.

Wednesday, 25 November 2020

Classes in ABAP

Classes are fundamental structures that we need to understand and master to model entities.

A class can represent anything; a document, a vehicle, animal, or anything that has traits and behaviours.

Classes in ABAP are coded in two steps: first of all, you code the definition part and then the implementation part.

The definition part is the place where you define all the data and methods that are going to be used in the class.

Monday, 23 November 2020

Consume ABAP RESTful Application Programming Model (RAP) Service in SAP UI5 Application

In this blog will see how to consume RAPM (ABAP RESTful Application Programming Model) service in SAP UI5 App through SAP Business Application Studio (BAS).

Step 1: Required SAP Cloud Platform Trial account. Refer below link to create.

https://developers.sap.com/tutorials/hcp-create-trial-account.html

Step 2: Considering we have ABAP RESTful Application Programming Model (RAP) service developed in SAP Cloud Platform ABAP Environment. To create one you can follow OpenSAP course Building Apps with the ABAP RESTful Application Programming Model

Friday, 20 November 2020

Discover approval level in MM Flexible Workflow agent determination BAdI

Introduction 

Recently I had an opportunity to work on SAP Flexible Workflow for Purchase Order approvals.

Flexible Workflow is a Fiori integrated solution for creation of document approval processes. Its main strength, ease of use, comes from little or zero need for programming interference. Basic scenarios can be created using configuration only. If you have a more complex situation, you can use one of the available BAdIs – for example the MMPUR_WORKFLOW_AGENTS_V2 BAdI, which allows for customer specific approval step agent determination logic.

Wednesday, 18 November 2020

Debugger-Script to generate Value-Statements for arbitrary Structures/Tables (Idea and Snipptes)

As I am forcing myself to write more Unit-Tests for my development classes, I was struggling a bit to set up the test-scenarios since the needed value statements may become big and boring to type in.

I know in ADT is a tool included in the SQL-Console to translate the select-output to a file including the value statements, but still, it took me some effort because not any table can be constructed via sql select (or the type of the target structure/table does not correspond to the db-table type…).

Friday, 13 November 2020

Separate data classes in unit tests

I proposed using an abstract class for the parts of a unit test that do not differ among the various test cases. I also suggested creating a separate class for each test case.

Based on this approach, I now want to describe a technique for separating the test data creation from the test data usage in test doubles.

Note that this approach is especially useful for classes where you put to the test a public method and cover the other methods by the calls of the public one. Classes that respect the single responsibility principle often are made like this.

Thursday, 12 November 2020

Custom E-tag for optimistic lock in SAP Gateway Odata for Deep Update

This blog is about the locking concept in SAP Gateway odata for update deep method. As there are already many blogs on optimistic and pessimistic locking mechanism. And in Gateway Odata there are different ways to implement optimistic lock for concurrency control. below are the ways which I am trying to categorizing 

1.) Using Timestamp for E-tag

2.) Using Hash for E-tag

Wednesday, 11 November 2020

How to set the delimit button for custom table and ways to use this functionality

Introduction:

This Blog is about to set the delimit button for custom table. Before doing that I will explain about the delimit functionality and when we will use this concept.

We generally use this concept in any module as per their business requirements in SAP. If they want to see/track the business data into single custom table. Then we will enable the delimit button of particular custom table.

Monday, 9 November 2020

G/W Service for Inbound Delivery Creation(VL31N) in SAP S/4 HANA

Introduction :

When a purchase order is created in the system, and if there is a need of Inbound Delivery Creation, we use to go to VL31N to create it Manually, but when it comes to a Technical scenario, it would require a BAPI to get that Created. But there is no specific/Direct BAPI for this requirement, we need to use Standard BAPI GN_DELIVERY_CREATE to proceed. Here in this Blog post i created an OData service for the same.

Friday, 6 November 2020

Changing Work-item Initiator in a Workflow.

Introduction:

Usually, for a workflow with multiple steps in Approval process, the Work item initiator is the user who processed the previous step/ created the current step and sometimes, technically it is shown as “WF-BATCH” which is technical workflow system user.

I came across this situation where my client wants to see the User who triggered/initiated the workflow in his FIORI MY-INBOX, instead of the user who created the current step ( i.e, who processed previous step/ Work-Item initiator ) which in my case was being shown as “WF-BATCH”.

Thursday, 5 November 2020

Substitution/Delegation app- Using and extending the standard My Inbox app

Recently, I have came across a scenario where one of the standard FIORI application- ‘My Inbox’ was implemented but the default landing page was different than the default page of My Inbox. Also, there was no semantic object mentioned in its tile to locate the standard application. The requirement was to add some custom code in that tile but I didn’t find any link as to where I can add the code as I was not aware of the corresponding application.

After reading some articles on internet, I was able to map the tile using the Roles assigned to my user but sometimes, developer has no Authorization to access the Roles.

Wednesday, 4 November 2020

MB5L Transaction CDS View Equivalent

It is a common requirement to build custom reports base on MB5L transaction data (List of Stock Values: Balances). There is no CDS view equivalent to get this data. SAP offers  C_StockQuantityCurrentValue (Current Stock Quantity and Value) CDS view, but it is lacking Company Code and Account details. In my blog I explain how to add missing details to SAP standard CDS view.

Monday, 2 November 2020

Transactional Fiori App using ABAP Restful Programming Model

UI Apps development is getting simplified with the evolution of ABAP. In my experience when UI5 was released i had to learn JavaScript ,jQuery concepts and use them to create even a simple UI App ,and then with the advent of  ABAP Programming model for Fiori it changed the approach, since using BOPF with annotations we can easily create  simple Transactional UI app’s with minimal frontend code. Now with ABAP RAP programming which is an evolution of latter, it further simplified and made flexible for UI App development.