https://github.com/maxfreck/zmsg
A simple message with context, implemented in ABAP programming language.
https://github.com/maxfreck/zmsg
Last synced: 2 months ago
JSON representation
A simple message with context, implemented in ABAP programming language.
- Host: GitHub
- URL: https://github.com/maxfreck/zmsg
- Owner: maxfreck
- Created: 2017-11-30T11:27:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-30T12:18:10.000Z (over 7 years ago)
- Last Synced: 2025-01-30T17:38:28.392Z (4 months ago)
- Language: ABAP
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zmsgA simple message with context, implemented in ABAP programming language.
## Usage examples
Basic usage example:
```ABAP
data(message) = new zmsg(
template = 'Hello &1! This is a &2 &3 message.'
context = value #(
( id = 1 value = sy-uname )
( id = 2 value = 'Foo' )
( id = 3 value = 'Bar' )
)
).data(message_string) = message->to_string( ).
```You can get a string value using static method:
```ABAP
data(message_string) = zmsg=>str(
template = 'Hello &1! This is a &2 &3 message.'
context = value #(
( id = 1 value = sy-uname )
( id = 2 value = 'Foo' )
( id = 3 value = 'Bar' )
)
).
```Also, you can get a message text when checking `sy-subrc`:
```ABAP
data(message_string) = zmsg=>symsg( ).
```