Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sap-samples/abap-platform-fundamentals-01
This project contains ABAP and SQL source used in customer facing events for SAP user groups.
https://github.com/sap-samples/abap-platform-fundamentals-01
abap sample sample-code sql
Last synced: 3 days ago
JSON representation
This project contains ABAP and SQL source used in customer facing events for SAP user groups.
- Host: GitHub
- URL: https://github.com/sap-samples/abap-platform-fundamentals-01
- Owner: SAP-samples
- License: apache-2.0
- Created: 2022-03-14T22:43:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T08:25:44.000Z (about 1 year ago)
- Last Synced: 2023-08-21T09:37:19.249Z (about 1 year ago)
- Topics: abap, sample, sample-code, sql
- Language: ABAP
- Homepage:
- Size: 103 KB
- Stars: 5
- Watchers: 7
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/abap-platform-fundamentals-01)](https://api.reuse.software/info/github.com/SAP-samples/abap-platform-fundamentals-01)
# 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](https://github.com/SAP-samples/abap-platform-rap-workshops/blob/main/requirements_rap_workshops.md) 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](https://tools.hana.ondemand.com/#abap).
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_DSAG01` or `Z_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_TIPPS3Session 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 quantityContent (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](https://www.youtube.com/live/Duwd6Du7lM0?feature=share). 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](https://help.sap.com/docs/ABAP_PLATFORM/c238d694b825421f940829321ffa326a/804c251e9c19426cadd1395978d3f17b.html?locale=en-US) | SAP BASIS 740 SP9
ltc_call_function_module | Function Modules | [Function Module Test Double Framework](https://help.sap.com/docs/SAP_S4HANA_CLOUD/25cf71e63940453397a32dc2b7676947/75964f284aa9435da40c4d82e111f276.html?locale=en-US) | SAP NetWeaver 756
ltc_select_database_table | Database Tables and CDS Entities | [ABAP SQL Test Double Framework](https://help.sap.com/docs/ABAP_PLATFORM/c238d694b825421f940829321ffa326a/1432ca1fc7b547d493f691cdd09245ae.html?locale=en-US) | SAP NetWeaver 752
ltc_select_cds_entity | Database Artefacts which are used in CDS | [ABAP CDS Test Double Framework](https://help.sap.com/docs/ABAP_PLATFORM_NEW/c238d694b825421f940829321ffa326a/cbedc08ff4de48ffa8d04d3067ef08e7.html?locale=en-US) | SAP NetWeaver 751
ltc_call_authority_check | Authority Checks | [Classic ABAP Authority Check Test Helper API](https://help.sap.com/docs/ABAP_PLATFORM_NEW/c238d694b825421f940829321ffa326a/6500d4d8f89a4743a6c0513d659a475b.html?locale=en-US) | -
ltcl_call_rap_bo_tx_bf_dbl | RAP Business Objects | [Transactional Buffer Double Support](https://help.sap.com/docs/SAP_S4HANA_CLOUD/25cf71e63940453397a32dc2b7676947/0337944d45994a3ba7482421cdfe36c8.html) | -
ltcl_call_rap_bo_mock_eml_api | RAP Business Objects | [Mock EML API Support](https://help.sap.com/docs/SAP_S4HANA_CLOUD/25cf71e63940453397a32dc2b7676947/4fa0e8a6ea0d4c45bec1afdc1ac6bd49.html?locale=en-US) | -## Known Issues
There are no known issues.
## How to obtain support
[Create an issue](https://github.com/SAP-samples/abap-platform-fundamentals-01/issues) in this repository if you find a bug or have questions about the content.
For additional support, [ask a question in SAP Community](https://answers.sap.com/questions/ask.html).## 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](https://developercertificate.org/).## 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](LICENSES/Apache-2.0.txt) file.