Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raketenstart-abap/abap-tvarvc
TVARVC Helper
https://github.com/raketenstart-abap/abap-tvarvc
Last synced: 6 days ago
JSON representation
TVARVC Helper
- Host: GitHub
- URL: https://github.com/raketenstart-abap/abap-tvarvc
- Owner: raketenstart-abap
- License: mit
- Created: 2022-11-09T16:36:21.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-28T11:54:39.000Z (11 months ago)
- Last Synced: 2024-08-02T19:01:48.776Z (4 months ago)
- Language: ABAP
- Size: 51.8 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- abap-florilegium - abap-tvarvc
README
# abap-tvarvc
A TVARVC helper class that makes easy and unique the process of selecting configuration data from database.- traceability
- straightforward approach
- easy to use## Diagram
## Instantiating
- create an pair value entry on `STVARV`;
- create a variable containing the key name;
- use snippet below to instantiate the `TVARVC Helper`.```abap
DATA go_tvarvc TYPE REF TO zif_core_tvarvc.
DATA gx_tvarvc TYPE REF TO zcx_core_tvarvc.CONSTANTS gc_tvarvc_entry TYPE string VALUE 'Z_TEST_TVARVC_SELECT_OPTIONS'.
CREATE OBJECT go_tvarvc TYPE zcl_core_tvarvc.
TRY.
gt_tvarvc = go_tvarvc->read_select_options( gc_tvarvc_entry ).CATCH zcx_core_tvarvc INTO gx_tvarvc.
gx_tvarvc->raise_message( ).
ENDTRY.
```## Examples and documentation
Main class is `ZCL_CORE_TVARVC`.
Find methods of `TVARVC Helper` below aside of its documentation.
- [**read_parameter**](#read-parameter)
- [**read_select_options**](#read_select_options)
- [**read_select_options_tab**](#read_select_options_tab)### read_parameter
Read a single parameter. Value is returned into a flat structure type of `rsparam_tt`.
- _input_:
- iv_name _TYPE (string)_
- _result_: TYPE rsparamExample: `Z_TEST_TVARVC_PARAMETER`.
See source code [**here**](src/z_test_tvarvc_parameter.prog.abap).
#
### read_select_options
Read a single parameter with values splitted by a separator. Values are returned into a internal table type of `rsparam_tt`.
- _input_:
- iv_name _TYPE (string)_
- iv_separator _TYPE (string)_
- _result_: TYPE rsparam_ttExample: `Z_TEST_TVARVC_SELECT_OPTIONS`.
See source code [**here**](src/z_test_tvarvc_select_options.prog.abap).
#
### read_select_options_tab
Read a select options values. Values are returned into a internal table type of `rsparam_tt`.
- _input_:
- iv_name _TYPE (string)_
- _result_: TYPE rsparam_ttExample: `Z_TEST_TVARVC_SELECT_OPTIONS_T`.
See source code [**here**](src/z_test_tvarvc_select_options_t.prog.abap).