-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c23930
commit 31d4245
Showing
287 changed files
with
18,472 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<DATA> | ||
<MASTER_LANGUAGE>D</MASTER_LANGUAGE> | ||
<I18N_LANGUAGES> | ||
<LAISO>E</LAISO> | ||
</I18N_LANGUAGES> | ||
<STARTING_FOLDER>/src/</STARTING_FOLDER> | ||
<FOLDER_LOGIC>FULL</FOLDER_LOGIC> | ||
<REQUIREMENTS> | ||
<item> | ||
<COMPONENT>SAP_ABA</COMPONENT> | ||
<MIN_RELEASE>750</MIN_RELEASE> | ||
</item> | ||
</REQUIREMENTS> | ||
</DATA> | ||
</asx:values> | ||
</asx:abap> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Contributing to cds2alv | ||
|
||
Welcome and thank you for your interest in our lovely project. Your contributions are grealty appreciated. | ||
|
||
Please bear in mind that this is our first public Open Source ABAP project, so we are still very much in the process of figuring things out. | ||
|
||
## Discussions | ||
|
||
You are welcome to engage in discussions here on GitHub. | ||
|
||
## Bug Reports | ||
|
||
If you have found a bug or wish for a new feature, please file an issue here on GitHub. | ||
|
||
When reporting bugs please provide some information on how the issue can be reproduced to help us find the cause of the error. | ||
|
||
## Contributions | ||
|
||
You are welcome to contribute by means of pull requests. If a pull request aims to resolve an issue, please reference accordingly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 rku.it GmbH | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Annotations | ||
The following CDS annotations are evaluated by the components of the CDS ALV framework. | ||
|
||
## Base | ||
* EndUserText.label - Descriptive name of the CDS entity | ||
|
||
## Grid Builder | ||
* Consumption.hidden - field is treated as technical by ALV | ||
* Consumption.valueHelp - custom F4 help for the field in the ALV grid | ||
* Consumption.valueHelpDefinition - custom F4 help for the field in the ALV grid | ||
* Consumption.semanticObject - semantic object for Intent-Based Navigation (Hotspot or Button) | ||
* DefaultAggregation - aggregation is applied to the respective column | ||
* EndUserText.label - column heading | ||
* EndUserText.quickInfo - column tooltip | ||
* Semantics.email.address - column becomes hotspot, link click to send mail | ||
* UI.hidden - field is hidden in the ALV grid by default | ||
* UI.lineItem.position - column position in the ALV grid | ||
* UI.lineItem.label - column heading | ||
* UI.lineItem.type - behaviour according to type: | ||
* #STANDARD or none: plain column | ||
* #FOR_ACTION: button for a BOPF action | ||
* #FOR_INTENT_BASED_NAVIGATION: button for Intent-Based Navigation | ||
* #WITH_INTENT_BASED_NAVIGATION: hotspot for Intent-Based Navigation | ||
* #WITH_URL: hotspot for an HTTP call | ||
* #WITH_NAVIGATION_PATH: hotspot for calling the report of an associated CDS view with the current display as forall-table | ||
* UI.lineItem.semanticObject - semantic object for Intent-Based Navigation (Hotspot or Button) | ||
* UI.lineItem.semanticObjectAction - semantic action for Intent-Based Navigation (Hotspot or Button) | ||
* UI.lineItem.targetElement - target path of the navigation via association | ||
* UI.lineItem.dataAction - name of the BOPF action | ||
* UI.lineItem.url - target URL for the HTTP call | ||
* ObjectModel.semanticKey - key columns in the ALV grid | ||
* ObjectModel.deleteEnabled - if true, adds user command DELETE to the alv grid | ||
* ObjectModel.updateEnabled - if true, the ALV becomes editable, adds user command SAVE to the alv grid | ||
* ObjectModel.readOnly - column remains read-only | ||
|
||
## Report Generation Strategy and Selection Screen | ||
* AbapCatalog.sqlViewName - used to compose the name of the generated report | ||
* Consumption.filter.selectionType - displays the field on the selection screen. Restrictions apply: | ||
* #SINGLE: NO-EXTENSIONS and NO INTERVALS, only EQ allowed | ||
* #INTERVAL: NO-EXTENSIONS, only EQ and BT allowed | ||
* #RANGE: no restrictions | ||
* Consumption.filter.multipleSelections - restricts the selection | ||
* Consumption.filter.mandatory - marks the field as mandatory on the selection screen | ||
* Consumption.filter.defaultValue - default value for a select option on the selection screen | ||
* Consumption.defaultValue - default value for a parameter on the selection screen | ||
* Consumption.valueHelp - custom F4 help for the field in the selection screen | ||
* Consumption.valueHelpDefinition - custom F4 help for the field in the selection screen | ||
* Consumption.hidden - field is not displayed on the selection screen | ||
* EndUserText.label - label for the line on the selection screen | ||
* UI.selectionField.position - position of the field on the selection screen | ||
* UI.selectionField.qualifier - used to group the selection fields into separate blocks on the selection screen | ||
|
||
## Table Container | ||
* ObjectModel.updateEnabled - if true, add style table field to the ALV grid | ||
* UI.lineItem.criticality - add color table field to the ALV grid | ||
|
||
## Value Help | ||
* Consumption.valueHelp - association that is used for the value help | ||
* Consumption.valueHelpDefinition.association - association that is used for the value help | ||
* Consumption.valueHelpDefinition.entity.name - name of the target CDS entity | ||
* Consumption.valueHelpDefinition.entity.element - name of the target CDS element | ||
* Consumption.valueHelpDefinition.distinctValues - selection is executed as SELECT DISTINCT | ||
* Consumption.valueHelpDefinition.label - not yet used | ||
* Consumption.valueHelpDefinition.additionalBinding.localParameter - name of the source parameter for an ON-condition | ||
* Consumption.valueHelpDefinition.additionalBinding.localElement - name of the source element for an ON-condition | ||
* Consumption.valueHelpDefinition.additionalBinding.parameter - name of the target parameter for an ON-condition | ||
* Consumption.valueHelpDefinition.additionalBinding.element - name of the target element for an ON-condition | ||
* Consumption.valueHelpDefinition.additionalBinding.usage - controls whether the binding is used as filter or result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This project offers a framework to generate List Reports using ALV Grid for CDS Views. | ||
The features of the reports are controlled using CDS Annotations. | ||
|
||
**Version** | ||
|
||
The project is maintained on a system with Software Component SAP_ABA 750 SP26. | ||
It runs on newer releases with minor adjustments, we plan to offer a variant for S/4HANA 2023 in the near future. | ||
|
||
**Resources** | ||
|
||
* [Installation Guide](./installation_guide.md) | ||
* [Overview of relevant CDS annotations](./annotations.md) | ||
* [Program extensions](./program_extensions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
## Prerequisites | ||
|
||
abapGit needs to be installed and set up according to the official documentation: | ||
* [Installation](https://docs.abapgit.org/user-guide/getting-started/install.html) | ||
* [SSL Setup](https://docs.abapgit.org/user-guide/setup/ssl-setup.html) (SSL certificates for api.github.com) | ||
* [Proxy Configuration](https://docs.abapgit.org/user-guide/setup/settings-global.html) | ||
|
||
## Installation | ||
|
||
Execute abapGit using the report *ZABAPGIT_STANDALONE* or transaction code *ZABAPGIT*, click on *New Online*. | ||
|
||
Fill the field *Git repository URL* with *https://github.com/rku-it-GmbH/cds2alv.git*. | ||
|
||
The default package name is *ZCDS_ALV*, create the package, if it does not already exist. | ||
|
||
Create the Online Repository and pull all contents to your system. | ||
|
||
Check if the Viewcluster *ZVC_CDS_ALV_FW* works properly, it may be necessary to generate the Maintenance Views in Function Group *ZCDS_ALV_TABLES* manually. | ||
|
||
## Setup | ||
|
||
### Maintain the Viewcluster *ZVC_CDS_ALV_FW* | ||
|
||
#### Intent-Based Navigation | ||
Define the Intent-Based Navigation for the semantic objects and actions you want to use in your CDS Views. | ||
|
||
#### Intent-Based Navigation (Exits) | ||
If the features offered by the framework are insufficient for ypur use case, you can use an exit class to implement the navigation for a specific CDS view. | ||
|
||
#### Program Extensions | ||
These are Plugins to enhance the features of the reports generated by the framework. | ||
They allow you to replace the steps for selection and display. | ||
|
||
##### Extension Parameters | ||
Program Extensions typically need additional parameters that need to be added to the selection screen. In this view you can define these additional parameters. | ||
|
||
Please be aware that the parameter names must be unique globally, so two extensions using the same parameter names cannot be active at the same time. | ||
|
||
#### Implementation | ||
The framework's factory class uses an Inverison of Control container to resolve the dependencies between the various classes. | ||
This allows for replacing the default classes with other classes implementing the same interface. | ||
|
||
In this view you can register global alternative implementing classes for the framework's interfaces. | ||
|
||
Please be aware that the IoC container is not able to resolve cyclic dependencies, so you need to make sure that your collection of implementing classes does not lead to any cyclic dependencies. | ||
|
||
### Maintain Number Range Interval for View Entity Reports | ||
Originally when designing the framework we decided to name the reports using a prefix and the name of the underlying database view of the CDS views. | ||
As CDS View Entities do not have underlying database views the need for an alternative solution arose. | ||
|
||
As of now the solution is to create a unique name by numbering the reports. To this end the framework uses the Number Range *ZCDS_ALV_N* with interval *00*. | ||
This interval needs to be defined in order for the framework to generate reports for CDS View entities. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Program extensions | ||
|
||
Program extensions are plugins for the reports genereated by the framework. | ||
They can be switched on and off for each individual CDS view in the first screen of the transaction *ZCDS_ALV_START*. | ||
|
||
## Defining a Program extension | ||
|
||
Program extensions are defined in the Viewcluster *ZVC_CDS_ALV_FW*. | ||
The definition of a program extension consists of the following information: | ||
* database key | ||
* display name | ||
* implementing class | ||
* descriptive texts for alternative selection or display, if any of these are impemented | ||
* addtional parameters that are added to the selection screen and bound to attributes of the implementing class | ||
|
||
## Implementing a Program extension | ||
|
||
The implementing class of a program extension must implement the interface *ZIF_CDS_ALV_REPORT_EXTENSION*, | ||
furthermore it is recommended to inherit from the abstract class *ZCL_CDS_ALV_REPORT_EXTENSION* or a suitable subclass. | ||
|
||
Program extensions can enhance the following events: | ||
|
||
* INITIALIZATION (initialization) | ||
* AT SELECTION-SCREEN OUTPUT (modify_screen) | ||
* AT SELECTION-SCREEN (handle_user_command) | ||
* AT SELECTION-SCREEN ON HELP-REQUEST (show_help) | ||
* AT SELECTION-SCREEN ON VALUE-REQUEST (value_help) | ||
* START-OF-SELECTION: | ||
* alternative_selection to replace the selection via the SADL framework | ||
* alternative_display to replace the ALV grid display | ||
|
||
Moreover, the method *alternative_reselection* needs to be implemented for handling the ALV user command *REFRESH*, if an alternative selection is defined | ||
|
||
## Collection of Program extensions | ||
|
||
A collection of program extensions will be made available as a separate repository in the near future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DEVC" serializer_version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<DEVC> | ||
<CTEXT>CDS ALV Framework</CTEXT> | ||
</DEVC> | ||
<PERMISSION> | ||
<SCOMPPDTLN> | ||
<INTF_NAME>SBOI_PUBLIC</INTF_NAME> | ||
<ERR_SEVER>NONE</ERR_SEVER> | ||
</SCOMPPDTLN> | ||
</PERMISSION> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@AbapCatalog.sqlViewName: 'ZCCDSALVEXTHDR' | ||
@AbapCatalog.compiler.compareFilter: true | ||
@AbapCatalog.preserveKey: true | ||
@AccessControl.authorizationCheck: #NOT_REQUIRED | ||
@EndUserText.label: 'Erweiterungen von Reports für CDS-Views' | ||
@VDM.viewType: #CONSUMPTION | ||
define view ZC_CDS_ALV_ExtensionHeaders as select from ZI_CDS_ALV_ExtensionHeaders { | ||
key ExtensionName, | ||
AlternativeSelection, | ||
AlternativeDisplay, | ||
ImplementingClass, | ||
_Text[ 1: Language = $session.system_language ].ExtensionText, | ||
_Text[ 1: Language = $session.system_language ].SelectionText, | ||
_Text[ 1: Language = $session.system_language ].DisplayText, | ||
/* Associations */ | ||
_Text | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DDLS" serializer_version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<DDLS> | ||
<DDLNAME>ZC_CDS_ALV_EXTENSIONHEADERS</DDLNAME> | ||
<DDLANGUAGE>D</DDLANGUAGE> | ||
<DDTEXT>Erweiterungen von Reports für CDS-Views</DDTEXT> | ||
</DDLS> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@AbapCatalog.sqlViewName: 'ZCCDSALVEXTPAR' | ||
@AbapCatalog.compiler.compareFilter: true | ||
@AbapCatalog.preserveKey: true | ||
@AccessControl.authorizationCheck: #NOT_REQUIRED | ||
@EndUserText.label: 'Parameter einer Programmerweiterung' | ||
@VDM.viewType: #CONSUMPTION | ||
define view ZC_CDS_ALV_ExtensionParameters as select from ZI_CDS_ALV_ExtensionParameters { | ||
key ExtensionName, | ||
key ParameterName, | ||
DbField, | ||
HasValueHelp, | ||
HasHelp, | ||
AttributeName, | ||
_Text[ 1: Language = $session.system_language ].ParameterText as ParameterText, | ||
/* Associations */ | ||
_Text | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DDLS" serializer_version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<DDLS> | ||
<DDLNAME>ZC_CDS_ALV_EXTENSIONPARAMETERS</DDLNAME> | ||
<DDLANGUAGE>D</DDLANGUAGE> | ||
<DDTEXT>Parameter einer Programmerweiterung</DDTEXT> | ||
</DDLS> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@AbapCatalog.sqlViewName: 'ZCCDSALVNAV' | ||
@AbapCatalog.compiler.compareFilter: true | ||
@AbapCatalog.preserveKey: true | ||
@AccessControl.authorizationCheck: #NOT_REQUIRED | ||
@EndUserText.label: 'Intent-Based Navigation' | ||
@VDM.viewType: #CONSUMPTION | ||
define view ZC_CDS_ALV_Navigation as select from ZI_CDS_ALV_Navigation { | ||
key SemanticObject, | ||
key SemanticAction, | ||
Function, | ||
DefaultParameter, | ||
ConversionExit, | ||
ObjectType, | ||
ObjectMethod, | ||
TransactionCode, | ||
ParameterId | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DDLS" serializer_version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<DDLS> | ||
<DDLNAME>ZC_CDS_ALV_NAVIGATION</DDLNAME> | ||
<DDLANGUAGE>D</DDLANGUAGE> | ||
<DDTEXT>Intent-Based Navigation</DDTEXT> | ||
</DDLS> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@AbapCatalog.sqlViewName: 'ZCCDSALVPARAMS' | ||
@AbapCatalog.compiler.compareFilter: true | ||
@AbapCatalog.preserveKey: true | ||
@AccessControl.authorizationCheck: #NOT_REQUIRED | ||
@EndUserText.label: 'PARAMETERS der generierten Programme für CDS-Views' | ||
@VDM.viewType: #CONSUMPTION | ||
define view ZC_CDS_ALV_Parameters as select from ZI_CDS_ALV_Parameters { | ||
key ProgramName, | ||
key SelectionName, | ||
CdsView, | ||
ParameterName | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DDLS" serializer_version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<DDLS> | ||
<DDLNAME>ZC_CDS_ALV_PARAMETERS</DDLNAME> | ||
<DDLANGUAGE>D</DDLANGUAGE> | ||
<DDTEXT>PARAMETERS der generierten Programme für CDS-Views</DDTEXT> | ||
</DDLS> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
Oops, something went wrong.