https://github.com/fabianlupa/abap-annotation-processing
Tech study on annotations in ABAP
https://github.com/fabianlupa/abap-annotation-processing
aap abap abap-annotation-processing abapgit sap zaap
Last synced: about 1 month ago
JSON representation
Tech study on annotations in ABAP
- Host: GitHub
- URL: https://github.com/fabianlupa/abap-annotation-processing
- Owner: fabianlupa
- License: mit
- Created: 2016-12-17T22:46:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-07T08:51:02.000Z (almost 8 years ago)
- Last Synced: 2025-02-28T12:33:50.842Z (about 2 months ago)
- Topics: aap, abap, abap-annotation-processing, abapgit, sap, zaap
- Language: ABAP
- Homepage:
- Size: 208 KB
- Stars: 5
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AAP - ABAP Annotation Processing [](https://travis-ci.org/flaiker/abap-annotation-processing) [](https://flaiker.github.io/abap-annotation-processing/) [](https://opensource.org/licenses/MIT)
Annotations in ABAP!**This project is a technology study / proof of concept of implementing a framework to manage class based annotations in ABAP. Since there is no native language support for annotations the assignments are done in customizing tables. The current state is still very much unfinished and not production ready. I am currently not planning on finishing this project (the necessary efforts and drawbacks are way too high). Feel free to fork it or take parts of it for reference.**
**DO NOT USE IN PRODUCTION.**
## Using annotations in ABAP code
```abap
DATA: lo_annotation TYPE REF TO zcl_my_annotation.DATA(lo_annotated_class) = NEW zcl_annotated_class( ).
DATA(lo_processor) = zcl_aap_proc_object=>from_object( lo_annotated_class ).
IF lo_processor->is_annotation_present_by_data( lo_annotation ).
lo_annotation ?= lo_processor->get_annotation_by_data( lo_annotation ).
WRITE lo_annotation->mv_my_attribute.
ENDIF.
```
[More example code](https://github.com/flaiker/abap-annotation-processing/tree/master/src/example)## Adding annotations to classes/interfaces/attributes/methods/parameters
Using transaction **ZAAP_CUST**:
## API Overview

[Detailed class diagram](https://github.com/flaiker/abap-annotation-processing/wiki/rendered/api-detail.png)## License
[MIT License Copyright (c) 2017 Fabian Lupa](LICENSE)