Monday, 16 March 2020

Call a Remote Function Module (RFC) From SAP Cloud Platform ABAP Environment

First some important prerequisites (because I noticed these myself just late somewhere in the fine print after spending [wasting] some time trying things in my own trial accounts)

◉ You need a Global Enterprise Cloud Account – i.e. not just a trial account
◉ You need this for both, the SAP Cloud Foundry and the SAP Cloud Neo environment
◉ SAP Cloud Foundry and the SAP Cloud Neo need to be in the same region

Friday, 13 March 2020

ABAP unit: CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS method improved for asserting Standard tables

The ABAP class CL_ABAP_UNIT_ASSERT is a great class for asserting Actual and Expected data for ABAP unit testing. Asserting equal is comparing the Actual data with the Expected data that it is equal. If it is not equal than a failure will be raised.

The method ASSERT_EQUALS even supports deep structures.

As you can see in my blog ABAP BAPI BO Class Generator in paragraph “Testing the read method” I use deep structures a lot, for example for GET_DATA methods which return all BAPI data in a deep structures returning parameter, so I can use one returning parameter instead of multiple exporting parameters. Example:

Thursday, 12 March 2020

How to create a Payroll Function in SAP HR

All companies have their own business processes, that must be reflected into the Payroll calculation. Or, one company may simply disagree on SAP’s logic, and would like to replace it with their own. To these scenarios, the best alternative is to create a Payroll Function and add it the Payroll Schema, so that it can be called and executed by the Payroll and “do the magic” as the guys from business required. Check below how to do it!

Wednesday, 11 March 2020

SAPUI5 Smart features controlled by OData Annotations

In this post I want to give an insight into metadata based UI development. I will showcase some of the Smart component features controlled by metadata annotations. With the use of annotations and Smart components like SmartTable you can minimize the UI View code to be written for conventional scenarios like listing and filtering data.

Monday, 9 March 2020

Using Standard BOPF Object for CRUD Operations – Single/Multiple

What you will learn in this blog?


In this blog, you will learn to use SAP delivered standard BOPF object for CRUD operations in Custom Application.

My scenario / Example to Understand


For my use case, I have to create an excel upload utility to update/create multiple Service Entry Sheets in one go – Header & Item. There is a Standard Fiori Application that exists for creating Service Entry Sheet one by one. This application uses a BOPF object to perform CRUD operation along with draft functionality. For my use case I need to upload multiple Service Entry Sheet in one go-to standard tables so that they are visible to Standard Application and for this, I have few options:

Friday, 6 March 2020

SELECT-OPTIONS F4 help in ABAP Report Programs

This post describes how F4 help can be displayed for selection criteria defined by SELECT-OPTIONS on selection screen of ABAP report programs.

F4 help can be added to selection criteria:

◉ automatically: if there is input help associated to the data type of the selection criteria, F4 help will be displayed automatically in the selection screen

◉ programatically: if no input help exists for the data type of the selection criteria, F4 help can be provided by program code

Wednesday, 4 March 2020

Alternative to MD_STOCK_REQUIREMENTS_LIST_API to get Item in MRP document (MDPS), Individual lines of the MRP elements (MDEZ) for multiple materials / plant combination

Introduction


Normally there is a need to get stock requirements information for certain selected materials and plants. After scouting through various answers in sap forums and blogs we knew we had to use the FM MD_STOCK_REQUIREMENTS_LIST_API or BAPI_MATERIAL_STOCK_REQ_LIST to get results similar to MD04 transaction.

Monday, 2 March 2020

Get Expanded Entity Set /Get Expanded Entity Sap OData

Writing this blog for purpose of beginners in order to explain Deep structures handling in SAP OData.

Usually we encounter a business case where in we need to Fetch Parent child relationship data in single call  or we may need to save the Header Item details to database.

OData framework provides an option to perform this operations using Deep Structures.