Posts

ABAP RESTful Application Programming Model (RAP)

Image
 What is RAP(RESTful Application Programming) The ABAP RESTful Application Programming Model (RAP) is the centerpiece of the ABAP Cloud development model for efficiently building cloud-ready, transactional business apps and extensions on SAP BTP ABAP Environment, SAP S/4HANA Cloud, SAP S/4HANA Cloud ABAP environment, and SAP S/4HANA 1909 and higher. RAP consists of a set of concepts, tools, languages, and powerful frameworks which help developers both to build innovative, cloud-ready, enterprise applications and Web APIs; and to easily extend SAP standard applications on the ABAP platform, in the cloud as well as on-premise. RAP offers a standardized development flow based on Core Data Services (CDS), the ABAP language, and business services in the modern, Eclipse-based ABAP Development Tools (ADT). DATA MODELING AND BEHAVIOUR Data Model Consist of entities which involved in business scenario, ABAP RAP uses CDS to define and organize the data model. CDS Entity are fundamental build...

AMDP - ABAP Manage Database Procedure

Image
AMDP – ABAP Managed Databased Procedure ABAP Managed Database Procedures, is a procedure, we can write code inside AMDP by using SQLSCRIPT which is a database language same as SQL script, this language is easy to understand and code.  After coding logic inside AMDP method, you can consume it in ABAP report, or use AMDP same as delegate method in CDS table function. With AMDP, We can take advantage of new features of HANA (code push-down technique), hence we still code all logic on application layer, then this logic will be executed on the database layer. AMDP is only supported in ADT bundle or HANA studio, and don’t be supported in SAP GUI. So if you want to learn AMDP, please change IDE to ADT bundle instead SAP GUI. Besides HANA DB, AMDP can support many other DB, maybe in the future. So, at this time, we can only use it in HANA DB Limitations of AMDP We can only create, debug AMDP in ADT bundle or HANA studio. With AMDP, we can’t use MSEG table. So, we can use MATDOC table or pr...

CDS View

Image
CDS VIEW – Core Data Services CDS is an extension of the ABAP Dictionary that allows you to define semantically rich data models in the database and to use these data models in your ABAP programs. CDS is a central part of enabling code push-down in ABAP applications. CDS views are the new programming design concepts which can achieve Code-to-Data paradigm which actually means Code push down into the database for processing. Types of CDS View Define View         > Define View with Join         > Define View with Association         > Define View with Parameters. 2. Extend View 3. Define Table Function with parameters Step to Create CDS View > Create an ABAP project within Eclipse by logging in to S4 HANA system > Right Click on Your username under Local Objects and choose New->Other ABAP Repository            Objects. Core Data Services->Data Definition Simple View wil...

New Syntax(ABAP ON HANA)

1.  Inline Declaration: Before 7.4 New syntaxes were not introduced the variable needs to be declared before using it, now using inline declaration  variable can we declare and use at the same time, Below are Whenever data is to be moved to a variable, can be declared at the same instance, Old Syntax.   DATA var1 TYPE char5.   var1 = ‘ABC’. New Syntax.   DATA(var1) = ‘ABC’. 2. Select Single From DataBase Table into Work Area Old Syntax. DATA wa TYPE .... SELECT SINGLE fld1 fld2 FROM  (TableName) INTO wa  WHERE fld1 = var1 AND      fld2 = var2. New Syntax. SELECT SINGLE fld1, fld2, FROM (TableName)  INTO @DATA(wa) WHERE fld1 = @var1  AND fld2 = @var2. 3. Selecting Data From DataBase Table Into Internal Table, Old Syntax.      DATA itab TYPE TABLE OF TableName. SELECT fld1 fld2 FROM (TableName) INTO TABLE itab WHERE fld1 = var1 AND fld2 = var2. New Syntax. SELECT fld1, fld2 FROM (TableName) INTO TABLE @DATA(itab) W...

ABAP - Debugging

Image
  ABAP debugging   Debugging is a process to understand program behavior in runtime. SAP has a inbuilt debugger which is part of the ABAP workbench.  Debugging steps There are two possible strategies for starting the Debugger in the ABAP Workbench:   By running the program in debugging mode. By setting breakpoints then running the program   Running a Program in Debugging Mode From the Object Navigator -> select a program and choose Test/Execute from the Development Object menu. The Choose Execution Type dialog box appears. Choose Debugging From the initial screen of the ABAP Editor Choose Program -> Execute ->Debugging (or the Debugging pushbutton). From any screen Choose System ® Utilities ® Debug ABAP. From any screen Enter " /h " in the command field. Breakpoints.   There are two types of breakpoints Static Dynamic  Static Break points Addition of a break point statement in your program. Static breakpoints are not normally user-specific. Ho...