-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathzcl_dynscreen_parameter.clas.abap
122 lines (98 loc) · 4.64 KB
/
zcl_dynscreen_parameter.clas.abap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
CLASS zcl_dynscreen_parameter DEFINITION PUBLIC INHERITING FROM zcl_dynscreen_io_element CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES:
zif_dynscreen_request_event.
METHODS:
constructor IMPORTING io_parent TYPE REF TO zcl_dynscreen_screen_base
iv_type TYPE typename OPTIONAL
is_generic_type TYPE mty_s_generic_type_info OPTIONAL
iv_text TYPE textpooltx OPTIONAL
RAISING zcx_dynscreen_type_error
zcx_dynscreen_incompatible
zcx_dynscreen_too_many_elems.
PROTECTED SECTION.
METHODS:
generate_open REDEFINITION,
generate_close REDEFINITION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_dynscreen_parameter IMPLEMENTATION.
METHOD constructor.
* ---------------------------------------------------------------------
super->constructor( io_parent = io_parent
iv_text = iv_text
iv_type = iv_type
is_generic_type = is_generic_type ).
* ---------------------------------------------------------------------
ENDMETHOD.
METHOD generate_open.
* ---------------------------------------------------------------------
DATA:
lv_default_value TYPE string,
lv_type TYPE string,
lv_nr_of_handlers TYPE i.
* ---------------------------------------------------------------------
IF mv_type = mc_type_generic.
lv_type = mv_generic_type_string.
ELSE.
lv_type = mv_type.
ENDIF.
* ---------------------------------------------------------------------
IF mv_value IS NOT INITIAL.
lv_default_value = ` ` && mc_syn-default && ` ` && mc_syn-sq && get_value( mc_conv_cast ) && mc_syn-sq.
ENDIF.
* ---------------------------------------------------------------------
APPEND
mc_syn-param && ` ` && mc_syn-var_prefix && mv_id && ` ` && mc_syn-type && ` ` && lv_type &&
lv_default_value && ` ` && mc_syn-modif && ` ` && base10_to_22( mv_id ) && '.'
TO mt_source.
* ---------------------------------------------------------------------
lv_nr_of_handlers = 0.
SYSTEM-CALL EVENTS GET NUM_HANDLERS FOR zif_dynscreen_request_event~help_request
OF INST me INTO lv_nr_of_handlers. "#EC CI_SYSTEMCALL
IF lv_nr_of_handlers > 0.
APPEND
mc_syn-eve_selscreen_ohr && ` ` && mc_syn-var_prefix && mv_id && '.'
TO ms_source_eve-t_selscreen_ohr.
APPEND
`go_cb->raise_request_event( iv_id = '` && mv_id && ##NO_TEXT
`' iv_kind = ` && zif_dynscreen_request_event=>kind_help_request && ##NO_TEXT
` iv_vname = '` && mc_syn-var_prefix && mv_id && '''' && ` ).` ##NO_TEXT
TO ms_source_eve-t_selscreen_ohr.
ENDIF.
lv_nr_of_handlers = 0.
SYSTEM-CALL EVENTS GET NUM_HANDLERS FOR zif_dynscreen_request_event~value_request
OF INST me INTO lv_nr_of_handlers. "#EC CI_SYSTEMCALL
IF lv_nr_of_handlers > 0.
APPEND
mc_syn-eve_selscreen_ovr && ` ` && mc_syn-var_prefix && mv_id && '.'
TO ms_source_eve-t_selscreen_ovr.
APPEND
`go_cb->raise_request_event( EXPORTING iv_id = '` && mv_id && ##NO_TEXT
`' iv_kind = ` && zif_dynscreen_request_event=>kind_value_request && ##NO_TEXT
` iv_vname = '` && mc_syn-var_prefix && mv_id && '''' && ##NO_TEXT
` CHANGING cv_value = ` && mc_syn-var_prefix && mv_id && ` ).` ##NO_TEXT
TO ms_source_eve-t_selscreen_ovr.
ENDIF.
* ---------------------------------------------------------------------
ENDMETHOD.
METHOD generate_close.
* ---------------------------------------------------------------------
* ---------------------------------------------------------------------
ENDMETHOD.
METHOD zif_dynscreen_request_event~set_req_field_ref.
* ---------------------------------------------------------------------
zif_dynscreen_request_event~md_request_value = id_value.
* ---------------------------------------------------------------------
ENDMETHOD.
METHOD zif_dynscreen_request_event~raise_help_request.
* ---------------------------------------------------------------------
RAISE EVENT zif_dynscreen_request_event~help_request.
* ---------------------------------------------------------------------
ENDMETHOD.
METHOD zif_dynscreen_request_event~raise_value_request.
* ---------------------------------------------------------------------
RAISE EVENT zif_dynscreen_request_event~value_request.
* ---------------------------------------------------------------------
ENDMETHOD.
ENDCLASS.