Code Monkey home page Code Monkey logo

abap-platform-fundamentals-01's Introduction

REUSE status

Sample code snippets for ABAP educational online sessions

Description

This repository contains several packages. Each package contains sample code snippets (ABAP, CDS, SQL) that has been presented in various educational online sessions.

  • ABAP SQL – the art of accessing data
  • A new generation of CDS views - CDS view entities
  • Why aren't my tests stable? Test Isolation with the ABAP Unit Framework
  • ABAP RESTful Application Programming Model - Fundamentals (planned)
  • ABAP RESTful Application Programming Model - Entity Manipulation Language (planned)

Requirements

In general see the requirements document for Workshops about the ABAP RESTful Application Programming Model (RAP).

For specific requirements see the readme documents that are part of the aforementioned packages.

Download and Installation

Download the ABAP Development Tools as described here.

Import the source code either using the ABAPGIT report into on prem system or use the ABAPGit Plugin of ADT to import it into a Steampunk system.

Create a package (e.g. ``TEST_DSAG01orZ_DSAG01`) where the package name must not exceed 11 characters since the package uses prefix folder logic.

Package ABAP SQL – the art of accessing data

The package contains the examples / demos which have been demonstrated during the talk. The package can be installed with abapGit. After the installation you should be able to find the YBW_* classes and tables in your system. Please note that you need to load data into the YBW_... tables before executing the examples will produce valuable results. Data can be loaded by executing class YBW_LOAD_DATA in your ABAP in Eclipse editor. Just load the source code of the class with STRG+A. You can now execute the program by hitting the F9 key.

Session part 1:

  • YBW_JOIN
  • YBW_UNION
  • YBW_INTERSECT
  • YBW_EXCEPT
  • YBW_CTE
  • YBW_TIPPS0
  • YBW_TIPPS1
  • YBW_TIPPS2
  • YBW_TIPPS3

Session part 2:

  • YBW_WINDOWING0
  • YBW_WINDOWING1
  • YBW_WINDOWING2
  • YBW_WINDOWING3
  • YBW_WINDOWING4
  • YBW_WINDOWING_ABAP
  • YBW_CHAR_TO_NUMC_1
  • YBW_CHAR_TO_NUMC_2
  • YBW_CHAR_TO_NUMC_3
  • YBW_CHAR_TO_NUMC_4
  • YBW_CHAR_TO_NUMC_5
  • YBW_CHAR_TO_NUMC_6
  • YBW_TIPPS4
  • YBW_TIPPS5
  • YBW_TIPPS6
  • YBW_CANDIDATE_MANAGER

Package A new generation of CDS views - CDS view entities

The package contains the examples / demos which have been demonstrated during the talk. The package can be installed with abapGit. After the installation you should be able to find the Z_* CDS views and CDS tuning objects in your system.

Contents:

  • z_classic_view: CDS DDIC-based view
  • z_view_extension: CDS view extension
  • z_demo_no_1: CDS view entity
  • z_view_entity_extension: CDS view entity extension
  • z_demo_entity_buffer CDS view entity for buffering
  • z_demo_calculated_quantity: CDS view entity, demo for calculated quantity

Content (to be created manually):
A CDS entity buffer is a new kind of repository object of the technical type DTEB. This type of object is currently not supported in abapGit. To get the demo that was shown in the talk, proceed as follows:
• Right-click on the CDS view entity z_demo_entity_buffer and choose New Entity Buffer. • Insert a name, for example z_demo_entity_buffer, and type a description. • Paste the following source code:

define view entity buffer on z_demo_entity_buffer
       layer core
       type generic number of key elements 1
       

• Activate the entity buffer.

Package "Why aren't my tests stable? Test Isolation with the ABAP Unit Framework"

The subfolder src/test_isolation contains the examples which have been demonstrated during the presentations at DSAG and the global user groups. It will be also enhanced once there are new test frameworks available.

The Idea

The idea of this folder is to show how to use any test environment, helper class and some common design patterns that help with isolating your code under test from its depended-on components.

How To Use This Repository

If you want to isolate your code under test from the components it uses, you need to take a look at what your depended-on component is. Each isolation technique for a specific kind of depended-on component is used separate test class of the global class ZATI_CL_CODE_UNDER_TEST. The table below shows which test class uses which tool to isolate against which kind of depended-on component.

Test Class Depended-On Component Tool First Release
ltc_call_other_object Classes Self-made test doubles With ABAP OO
ltc_call_other_object_fw Classes ABAP Object Oriented Test Double Framework SAP BASIS 740 SP9
ltc_call_function_module Function Modules Function Module Test Double Framework SAP NetWeaver 756
ltc_select_database_table Database Tables and CDS Entities ABAP SQL Test Double Framework SAP NetWeaver 752
ltc_select_cds_entity Database Artefacts which are used in CDS ABAP CDS Test Double Framework SAP NetWeaver 751
ltc_call_authority_check Authority Checks Classic ABAP Authority Check Test Helper API -
ltcl_call_rap_bo_tx_bf_dbl RAP Business Objects Transactional Buffer Double Support -
ltcl_call_rap_bo_mock_eml_api RAP Business Objects Mock EML API Support -

Known Issues

There are no known issues.

How to obtain support

Create an issue in this repository if you find a bug or have questions about the content.

For additional support, ask a question in SAP Community.

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

License

Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

abap-platform-fundamentals-01's People

Contributors

anfisc avatar pdegler avatar sautermi0 avatar btbernard avatar ajinkyapatil8190 avatar safagb avatar schlotthauea avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.