Friday, 22 June 2018

How to create calendar day ABAP CDS view with working day flag


◈ With S/4HANA we have a standard CDS view I_CalendarDate based on SCAL_TT_DATE table, but there aren’t information about working days. However it could be important to have such flag, for example, when we need to count only working days or filtering something based on working dates only.

Wednesday, 20 June 2018

ABAP is here and it stays in the DNA of SAP even in the New Age of SAP Development

After having followed the other blogs you will have your own SAP Cloud Connector (SAPCC), your own NW ABAP, both of them running in separate Docker containers on your own laptop, and you’ll have setup all configuration needed to connect your very own NW ABAP through your SAPCC to your own SAP Cloud Platform (SAPCP) trial account – non-trial works as well. You will also learn how to configure Principal Propagation which basically allows you to get Single-Sign-On (SSO) easily working.

Monday, 18 June 2018

Using ABAP2XLSX to send ALV table output as Excel spreadsheet via internet email

A recent discussion amongst the ABAP developers at my site dealt with the topic of how to arrange for a customized ABAP program running as a background job to have its ALV table output sent to an internet email address. During this discussion I learned the easy way to do this, requiring no ABAP programming at all, which simply requires the designation of a Spool recipient when scheduling the background job via transaction SM36:

Friday, 15 June 2018

New ABAP Table Sum


In this blog series, the goal is to focus on comparing older ABAP language features with a detailed explanation of the new ABAP syntax.

Wednesday, 13 June 2018

ABAP CDS View: Issue faced on join of tables on columns where one column is of RAW data type

ABAP CDS views provide the capability to join tables on linked columns. For example, a table employee_details and company_details can be joined based on company_ID that exists in both the tables. But following issues are faced while performing join:

1) Both columns have different data types:

First solution that will come to your mind is to cast one of these columns as the data type of the other.

Monday, 11 June 2018

How to Test BOPF Actions, Determinations and Validations Using BUnit – An Introduction to the BOPF Unit Test Framework

The Business Object Processing Framework (BOPF) provides actions, determinations and validations to define the (main) logic of their application. The behavior is usually defined in the execute method of those interfaces (/BOBF/IF_FRW_ACTION, /BOBF/IF_FRW_DETERMINATION and /BOBF/IF_FRW_VALIDATION). The application-related data can be obtained using the parameter io_read (type ref to /BOBF/IF_FRW_READ), and can be modified by io_modify (type ref to /BOBF/IF_FRW_MODIFY, not available for validations). Either one of them, if not both, might always be used. Writing unit tests for the execute methods will have mocking io_read and / or io_modify as a prerequisite. This would probably mean to perform at least the following:

Friday, 8 June 2018

BOPF: Using Non-UUIDs (DB_KEY) keys DB tables

1. Definition

The Business Object Processing framework is an ABAP Object oriented framework that provides a set of generic functionalities for modularized and standardized development. It controls business logic as well as data retrieval of buffer and persistency layer. The Business Object Processing Framework mainly processes data that are uniquely identified by UUIDs. This means, database tables should contain DB_KEY of Type RAW16. In case, there is a requirement to use existing legacy tables (Non RAW16 keys) in BOPF then it requires different steps in configuration of BOPF. Many blogs/documents are available that can provide more details about default configuration process and implementation of BOPF. However, not much information is available on the configuration required for using non-UUID key fields as table keys.