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, 24 February 2023

7 ways abapGit can transform your development approach for internal development

To the existing SAP development audience – git and abapGit can be curious things. Why did SAP ABAP need to have git when CTS has reliably moved and tracked changes across SAP environments for years? Obviously it’s useful for open source ABAP – but really what else?

In case you missed it: abapGit can be adopted even if you’re not intending to open-source your development on GitHub. And I firmly believe its advantages to your development process are significant enough to consider using abapGit for your company’s internal ABAP development efforts. And while GitHub remains the defacto king of git repositories – know also that abapGit can be used upon other git offerings like Azure DevOps, Bitbucket, Gitlab and others.

Wednesday, 22 February 2023

TDD: Use GitHub as data storage for your test data.

Usually, you can find plenty of articles and blogs about the TDD and how to write or use TDD approach in your project development. But this blog is not about it.

Well actually it is, but here I want to grab your attention to the other side of the coin. Namely, to have dynamic data storage to save your test data and to test your coding with plenty of cases. Besides, not only developers but also functional people can use it without any difficulty.

Well, I guess sounds interesting, then let’s start step by step.

Monday, 20 February 2023

Parallelize cl_http_client

You have the requirement to call an external scalable REST micro-service. Unfortunately the system needs a few 100ms to respond and you have to call the system multiple times with different parameters. As the code is called by end users you want to parallelize the REST calls.

So what is the “normal” solution for that problem? The Standard ABAP answer is of course: ABAP Parallelization using Worker-Processes (using e.g. that wonderful library ZTHREAD ). This has multiple problems though:

Friday, 17 February 2023

What Does your Scratch Pad Look Like?

Introduction


Several times a week I need to try out a piece of coding that I don’t want to put into the production code right away.

I used to create little test reports to experiment with the code snippets I need.

The problem with this approach was that I collected too many reports and our development
box was littered with ZEMA* reports.

Wednesday, 15 February 2023

Save/Process Incoming e-mail and attachments in SAP

Summary: This blog post will demonstrate how to handle incoming email with PDF attachments and save them against any transaction in SAP.

We will use GOS functionality to save the document but same kind of logiccan be used to save/process the attachments in the SAP system. I am taking an example of CRM billing document here.

(Since there is no designated space in CRM billing to store documents at the transaction level, we chosen to enable the GOS toolbar and save all transaction-related attachments there.

Monday, 13 February 2023

How to enhance SAP GOS Generic Object Services, SGOSATTR & SGOSCUST

Business requirement 

I had a chance to enhance GOS email service from my suggestion to utilize already activated GOS functionality instead of building new object.

GOS has been activated at lots of SAP transactions in my system but only specific Tcode needs to be enhanced. The enhancement point of the requirement was “Send” email -> “Send Object with Note” at VIM DP document transaction.

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, 3 February 2023

Printing Multiple Copies of the Adobe Form as a single document from SAP CRM Actions (in GUI/CRM WebUI)

Introduction:  In SAP CRM actions, we don’t have any option to configure, develop and print Adobe form. It allows printing of Smart Forms only.

But we can tweak system to make this feature possible, by doing some config/coding changes.

In SPRO, we have Actions available which gets configured with all the required business functionality. For the purposes of this explanation, I’ll use Actions in Billing as an illustration, and I’ll assume that we are aware of the fundamental criteria for developing action profiles and definitions. I’m going to skip right to maintaining Processing Types.