Posts

Showing posts from May, 2022

Radio Buttons in a single horizontal line on Input Screen of ABAP Program

Image
Create Program using Transaction SE38 or Use your any existing custom Program. BEGIN OF LINE will create single line with all parameters inside it. If you place any of the components in the same line, selection text symbols won't work. You need to use COMMENT to display texts. Change Texts under Text Elements Output will be displayed as below on Input Screen when Executing Program.

SAP Fiori Introduction

SAP Fiori Design System Accelerates and scales the design and development of enterprise software. It follows a modular design approach based on business roles, moving away from traditional monolithic transactions. It also Redefines the enterprise user experience by focusing on user tasks and workflows. SAP Fiori design system operates on two levels: Universal values, principles, and practices apply across all technology platforms. Values:- Consistency, Integration, Intelligence Principles:- Role-based, Adaptive, Simple, Coherent, Delightful Practices:- Design-Led Development, Design Council, Design Communities SAP Fiori design languages provide standardized design guidance across multiple platforms. SAP Fiori for Web SAP Fiori for iOS SAP Fiori for Android SAP Conversational User Experience SAP Fiori design system covers the below topics; What is Fiori? SAP Fiori is a design system that provides a consistent and holistic user experience for SAP software across platforms and devices. De

Introducing RESTful Application Programming

Image
RAP is just one code line for all different deployment options, SAP S4HANA or the cloud scenarios. the core of the RAP is based on CDS and supports all the draft functionality, the extensibility, and out-of-the-box implementation to take all the technical implementation tasks. With 7.5, it was the first time SAP introduced an end-to-end programming model. From CDS via BOPF up to the gateway level, we were able to create applications. RAP is the successor of the ABAP Programming Model for SAP Fiori. SAP extended the core data services by the so-called behaviour definition. The extension of the CDS language, and also the extension of the ABAP language itself, are used in order to have the native concept of built-in business objects.   Define a Database Table To implement the data model we would need at least one table. In this case, there is one single database table that contains flight connections. Here are the common steps that involve in the creation of a table. Create a Table Defini

Working with Internal Table in ABAP

Image
 Internal Table: Internal tables are variable data objects in which you can store several values of identical type. This type has to be specified in the declaration and is called the row type of the internal table. Table Types: The type of an internal table is called a table type. In the previous example we used TYPE TABLE OF in the DATA statement directly. The table type was bound to the declared variable. As an alternative you can use TYPE TABLE OF in a TYPES statement to define a table type with a name. You can then use this table type, for example, in a DATA statement. The visibility of these types depends on the position of the TYPES statement.  Processing Data in a Simple Internal Table: CLASS zcl_01_hello_world DEFINITION   PUBLIC   FINAL   CREATE PUBLIC .   PUBLIC SECTION.     INTERFACES if_oo_adt_classrun .   PROTECTED SECTION.   PRIVATE SECTION. ENDCLASS. CLASS zcl_01_hello_world IMPLEMENTATION.   METHOD if_oo_adt_classrun~main. * Declarations ********************************

Exception Handling in ABAP

Image
In ABAP, an exception is an error situation during the execution of an ABAP program. An exception is raised by the code that detects the error situation. Depending on who raises the exception, we distinguish between system exceptions and application exceptions. A catchable exception can be treated in the program using TRY... CATCH ..... ENDTRY   Before the ENDTRY statement, you have to add a CATCH statement followed by the ID of the exception you want to handle. CLASS zcl_01_hello_world DEFINITION   PUBLIC   FINAL   CREATE PUBLIC .   PUBLIC SECTION.     INTERFACES if_oo_adt_classrun .   PROTECTED SECTION.   PRIVATE SECTION. ENDCLASS. CLASS zcl_01_hello_world IMPLEMENTATION.   METHOD if_oo_adt_classrun~main. * Declarations **********************************************************************     DATA result TYPE i.     DATA numbers TYPE TABLE OF i. * Preparation **********************************************************************     APPEND 123 TO numbers. * Example 1: Conversion Err

Preparing the ABAP developement environment for SAP BTP

Image
Setup SAP BTP ABAP environment Login to the SAP BTP account with your registered email id Click on Trial Home Click on Go To Your Trail Account to navigate to trail intance BTP cockpit   Create service instance: you can do this by simply going to the booster tab Click start, it will create your instance on the cloud. Once the setup is done download the Service key. You can view the created service under instance tab How to Create ABAP Cloud project: Note: You must already have an SAP BTP account with an ABAP service and service key. Also install Eclipse and the SAP ABAP Development Tools. Open ABAP Perspective -> Choose File -> New -> ABAP Cloud Project Use a Service key option will be selected as default. Choose Next Import the file or paste the service key into the editor. Choose Next Select Open Logon Page in Browser for validatng the account. Use your BTP login credentials to validated the account and you will see success message  Once verified the account successfully sys

Functions in JavaScript

Functions: Functions are blocks of code designed to perform a specific task. Functions can help organize the code, avoid repetition and reduce the complexity of the code. 1. Function Declaration: the function in the main code flow To declare a function, you use the "function" keyword, followed by the function name, a list of parameters, and the function body as follows: function sum(a, b) {   let result = a + b;   return result; } 2. Function Expression: the function in the context of an expression Function name: It must be a valid JavaScript Identifier. The function names are in camelCase like "getSum()". "console.log()" is also a function to output a message to the console. let getSum = function(a, b) {   let result = a + b;   return result; }; Parameters vs Arguments:  The terms parameters and arguments are often used interchangeably. However, they are essentially different. When declaring a function, you specify the parameters.  However, when calling

CDS Views

Image
Association Association is nothing but an on-demand/Lazy Join and is defined with Cardinality syntax. Does not support with ABAP editor. It is not a JOIN statement but we can join multiple tables. Cardinality: [MIN...MAX] to define the association between entities in a CDS view 0..1 - zero to one 0..* - zero to many 1..0 - one to zero 1..* - one to many @AbapCatalog.sqlViewName: 'zwm_sales_v' @AbapCatalog.compiler.compareFilter: true @AbapCatalog.preserveKey: true @AccessControl.authorizationCheck: #CHECK @EndUserText.label: 'sales info' @ClientDependent: true @OData.publish: true   define view zwm_cds_sales     with parameters p_vkorg : vkorg    as select from vbak as header    inner join vbap as items          on header.vbeln = items.vbeln    association[1..*] to mara as _material         on items.matnr = _material.matnr    association[1..*] to makt as _text         on items.matnr = _text.matnr         and _text.spras = $session.system_language  {     key header.vbeln

JavaScript Data Types

Image
What are Data Types? Data Types are an important and basic concept of JavaScript. JavaScript is dynamic and loosely typed language. It means you don't require to specify a type of a variable. JavaScript variables can hold different data types such as numbers, strings, objects and more. JavaScript Types are dynamic JavaScript has dynamic types. This means that the same variable can be used to hold different data types. We do not have to manually define the data type of the value stored in a variable. Instead, data types are determined automatically. Primitive and object Data types The values can be either of Object data type or Primitive data type . Object Data Type : Objects such as functions and arrays are referred to as non-primitive values. Primitive Data Type : The predefined data types provided by JavaScript language are known as primitive data types. Primitive data types are also known as in-built data types. The fundamental difference between primitives and non-primitives is