Wednesday, 31 May 2023

BDD-style tests for ABAP with Cacamber

Do you know this problem? New features should be developed, but communication with the customer is difficult. People talk past each other. Requirements are unclear. Finally, when the feature is implemented, it turns out the customer actually had a different requirement: “But we thought that does something completely different!”

One solution to this problem is to intensify communication between the customer and the development team and get feedback as soon as possible. An agile process model that focuses on this is Behavior Driven Development (BDD).

BDD focuses on the behavior of the user and attempts to establish consistency between requirements, implementation, and testing – a common understanding. For this purpose, examples are specified, so-called scenarios, which describe the behavior. This is often done during  “3 Amigos Sessions”, in which business, developers, and QA work together.

Monday, 29 May 2023

Dynamic logo in smart form using variables

Introduction


Dealing with logos is always a big deal in Smart form. This blog shows how to generate a Smart form with a dynamic logo in SE38. The objective is by using the parameter values set dynamic logo in the report program.

Requirement: Pass Purchase document number (EBELN) as input parameter and fetch Document date (BEDAT). If the Purchase document date is lower than require date then, print the First logo. Else print the Second logo.

Friday, 26 May 2023

Adobe form XML parsing error due to invalid characters

Overview


This blog relates to generation of an Adobe Form via transaction code CORRHIST in SAP HANA.  Normally when selecting a document to print and output to PDF as a spool file there is no issue, but in some instances the document may fail to produce due to Adobe Document Services (ADS), encountering an error with invalid characters that it cannot handle.  In this instance an error occurs and the document will not produce.

Wednesday, 24 May 2023

How to Configure Dynamic Email in Output Parameter Determination App

Following what we have learned from other blogs for the Output Parameter Determination app, I came across something which seemed impossible at the beginning but what’s not possible with SAP?

I had a requirement to setup dynamic Sender and Receiver email address in Output Parameter Determination app for Item Interest Calculation rule. As we know that the app generally presents a decision table for each Determination Setting such as – Output Type, Email Settings, Email Recipient, Form Template etc. And the decision table has endless possibilities for nesting with data objects and expressions. I took advantage of the expression assignment and achieved fetching email of Sender and Receiver dynamically.

Monday, 22 May 2023

Additional accounting document creation in ECC for CRM Billing

Introduction: Recently we faced a scenario where it was required to create one more accounting document ( different document type) in ECC for CRM billing scenario and for a special case. There might be one question can come up why it was at all required and believe me that we had a same question. But business was very stringent due to one it’s special case and wanted to inherit this custom requirement with the standard process.

So we were left with no option and achieved same by exploring the requirement through ECC USER-EXIT/ CRM middleware BADI, automatically after the standard process gets completed.

Friday, 19 May 2023

YTD(Year To Date), MTD(Month To Date) and Quarter wise separation of data in HANA Modelling.

Introduction:


In a live connection dashboard, Standard content dashboard or in SAP HANA dashboard passing the whole data will make a lack or slow down the front-end(SAC, Lumira, PowerBi, etc). To overcome this type situation, we can use YTD, MTD, QTD concept in the HANA modelling.

Fiscal Year:

A fiscal year is a 12-month period of time that a company or government uses for accounting purposes to measure its financial performance.

Wednesday, 17 May 2023

SAP ABAP 7.4: For Loop with Multiple table – Append all the data to final Internal table

Many of you already know to work with For loop in SAP ABAP. However, those who are new to the ABAP 7.4 syntax often struggle at some places to achieve the expected result using new syntax. One of the scenario, I am covering below so that new learner can find help with this post.

Scenario:


When we process multiple internal table inside the for loop(in which the where condition of the second internal table will be from the first internal table inside the For Loop). In this case, the result in the final internal table will be only the common data in which they find in both the internal tables.

Monday, 15 May 2023

Hide ToC transports in ABAP Version Management (enhancement)

This time I come to you with an easy to implement enhancement, which will forever change your lives as ABAP developers.

How many times have you struggled with the ToCs cluttering your list of transports in the Versions Management view? Now there is a solution to that issue. After implementing the steps shown below you will be able to filter out all ToCs and enjoy clean list of transports. Enjoy!

Implementation


1. Enhance class CL_VERS_OBJTYPE_UI_ALV

Friday, 12 May 2023

Create an OData service by passing a parameter and get Smart form as a PDF

Introduction


This blog shows the gateway project using OData service to obtain an output as a PDF by using Smart form. The objective is to pass the parameter as input and obtain an output as a PDF using Smart Form.

Requirement: Pass the Invoice Document number (Belnr) as input and obtain Plant, Purchase document number, Item number, Fiscal year, Material Number, and Reference number as an output through OData Service by using the smart form.

Wednesday, 10 May 2023

Analyzing performance degradations in the ABAP environment in the Cloud

As an administrator or developer, you need to keep track of the performance of your own applications in the ABAP environment of SAP BTP. Ideally, you have an app that not only shows you when performance deteriorates, but that also allows you to drill down to the relevant requests and the associated code.

In this blog post, I would like to show you a real-life example of how you can use the System Workload app to analyze a performance degradation. The following scenario was captured during a normal performance regression review of a change in the SQL statement processing for one of my development projects. I had changed a sequence of SQL statements and later checked its impact on performance using this app.

Monday, 8 May 2023

Sample ABAP ALV report with editable fields with user command without join condition

Introduction


I am PP functional consultant gathering ABAP technical Knowledge. In ABAP for self learning we need more sample program to get clarification on understanding things better. In SAP blog the availability of sample program is less. So I am writing this.

Main Part


This program will fetch the material details details and changing the values in alv will update the ztable.

Friday, 5 May 2023

Learning new syntax ABAP 7.4 with a volte-face scenario

Recently, I encountered a unique challenge while working with a client with an old SAP system.

I had code ( ABAP 7.4 ) ready to deploy to client system but I could not use it due to lower ECC version. So, I downgraded my code syntactically as many of the operators are not supported by EHP 6.0

I am sharing few of my learnings while doing so. I hope the same can be useful for changing the code to and/or learning ABAP 7.4 as well.

This blog will cover Inline declaration of variables and field symbols, inline usage of structure, and operators such as Filter and group by.

Wednesday, 3 May 2023

Enabling F4 search help and customizing them for fields in Purchase Requisition (ME51N/52N) & Purchase orders (ME21N/22N)

Today, I would like to discuss a scenario that I recently came across. As an ABAP consultant, finding and enhancing standard transactions is the need for the business and achieving the same is a crucial task.

When I got the requirement to assign F4 help to a field in PR and PO, I started scratching my head looking for resources online to achieve the same.

So to begin with, lets see how these standard transactions for creation/change of PR and PO look like.

We’ll pick the requisitioner field (AFNAM) for this instance.

Monday, 1 May 2023

Parallel Processing On OABAP – Using Classes and Methods

Parallel processing is implemented in ABAP reports and programs, not in the background processing system itself. That means that jobs are only processed in parallel if the report that runs in a job step is programmed for parallel processing. Such reports can also process in parallel if they are started interactively.

Parallel processing in OAbap is using class and methods in report level program.

Parallel Processing is implemented with a special variant of Asynchronous RFC. It’s important that you use only the correct variant for you own parallel processing applications. The “CALL FUNCTION STARTING NEW TASK DESTINATION IN GROUP” keywords.