content
stringlengths 4
1.04M
| input_ids
sequencelengths 2
1.02k
| attention_mask
sequencelengths 2
1.02k
|
---|---|---|
"! <p class="shorttext synchronized" lang="en">Field Control: ALV for managing the output fields</p>
CLASS zcl_dbbr_fc_output_alv DEFINITION
PUBLIC
INHERITING FROM zcl_dbbr_fc_generic_alv
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_dbbr_fc_output_alv IMPLEMENTATION.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
15878,
6779,
25,
8355,
53,
329,
11149,
262,
5072,
7032,
3556,
79,
29,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
16072,
62,
22915,
62,
282,
85,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
9945,
1671,
62,
16072,
62,
41357,
62,
282,
85,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
16072,
62,
22915,
62,
282,
85,
30023,
2538,
10979,
6234,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_gui_page_db DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_gui_page
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor .
METHODS zif_abapgit_gui_page~on_event
REDEFINITION .
PROTECTED SECTION.
METHODS render_content
REDEFINITION .
PRIVATE SECTION.
CONSTANTS:
BEGIN OF gc_action,
delete TYPE string VALUE 'delete',
END OF gc_action .
CLASS-METHODS delete
IMPORTING
!is_key TYPE zif_abapgit_persistence=>ty_content
RAISING
zcx_abapgit_exception
zcx_abapgit_cancel .
METHODS explain_content
IMPORTING
!is_data TYPE zif_abapgit_persistence=>ty_content
RETURNING
VALUE(rv_text) TYPE string
RAISING
zcx_abapgit_exception .
ENDCLASS.
CLASS ZCL_ABAPGIT_GUI_PAGE_DB IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
ms_control-page_title = 'DATABASE PERSISTENCY'.
ENDMETHOD. " constructor.
METHOD delete.
DATA: lv_answer TYPE c LENGTH 1.
ASSERT is_key-type IS NOT INITIAL.
ASSERT is_key-value IS NOT INITIAL.
lv_answer = zcl_abapgit_popups=>popup_to_confirm(
titlebar = 'Warning'
text_question = 'Delete?'
text_button_1 = 'Ok'
icon_button_1 = 'ICON_DELETE'
text_button_2 = 'Cancel'
icon_button_2 = 'ICON_CANCEL'
default_button = '2'
display_cancel_button = abap_false ). "#EC NOTEXT
IF lv_answer = '2'.
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
ENDIF.
zcl_abapgit_persistence_db=>get_instance( )->delete(
iv_type = is_key-type
iv_value = is_key-value ).
COMMIT WORK.
ENDMETHOD. " delete
METHOD explain_content.
DATA: ls_result TYPE match_result,
ls_match TYPE submatch_result,
lv_cnt TYPE i.
CASE is_data-type.
WHEN 'REPO'.
FIND FIRST OCCURRENCE OF REGEX '<url>(.*)</url>'
IN is_data-data_str IGNORING CASE RESULTS ls_result.
READ TABLE ls_result-submatches INTO ls_match INDEX 1.
IF sy-subrc IS INITIAL.
rv_text = is_data-data_str+ls_match-offset(ls_match-length).
ENDIF.
FIND FIRST OCCURRENCE OF REGEX '<OFFLINE/>'
IN is_data-data_str IGNORING CASE MATCH COUNT lv_cnt.
IF lv_cnt > 0.
rv_text = |<strong>On-line</strong>, Name: <strong>{
zcl_abapgit_url=>name( rv_text ) }</strong>|.
ELSE.
rv_text = |Off-line, Name: <strong>{ rv_text }</strong>|.
ENDIF.
WHEN 'BACKGROUND'.
FIND FIRST OCCURRENCE OF REGEX '<method>(.*)</method>'
IN is_data-data_str IGNORING CASE RESULTS ls_result.
READ TABLE ls_result-submatches INTO ls_match INDEX 1.
IF sy-subrc IS NOT INITIAL.
RETURN.
ENDIF.
rv_text = |Method: { is_data-data_str+ls_match-offset(ls_match-length) }, |
&& |Repository: { zcl_abapgit_repo_srv=>get_instance( )->get( is_data-value )->get_name( ) }|.
WHEN 'USER'.
rv_text = '-'. " No additional explanation for user
WHEN 'SETTINGS'.
rv_text = '-'.
WHEN OTHERS.
IF strlen( is_data-data_str ) >= 250.
rv_text = is_data-data_str(250).
ELSE.
rv_text = is_data-data_str.
ENDIF.
rv_text = escape( val = rv_text
format = cl_abap_format=>e_html_attr ).
rv_text = |<pre>{ rv_text }</pre>|.
ENDCASE.
ENDMETHOD. "explain_content
METHOD render_content.
DATA: lt_data TYPE zif_abapgit_persistence=>tt_content,
lv_action TYPE string,
lv_trclass TYPE string,
lo_toolbar TYPE REF TO zcl_abapgit_html_toolbar.
FIELD-SYMBOLS: <ls_data> LIKE LINE OF lt_data.
lt_data = zcl_abapgit_persistence_db=>get_instance( )->list( ).
CREATE OBJECT ro_html.
ro_html->add( '<div class="db_list">' ).
ro_html->add( '<table class="db_tab">' ).
" Header
ro_html->add( '<thead>' ).
ro_html->add( '<tr>' ).
ro_html->add( '<th>Type</th>' ).
ro_html->add( '<th>Key</th>' ).
ro_html->add( '<th>Data</th>' ).
ro_html->add( '<th></th>' ).
ro_html->add( '</tr>' ).
ro_html->add( '</thead>' ).
ro_html->add( '<tbody>' ).
" Lines
LOOP AT lt_data ASSIGNING <ls_data>.
CLEAR lv_trclass.
IF sy-tabix = 1.
lv_trclass = ' class="firstrow"' ##NO_TEXT.
ENDIF.
lv_action = zcl_abapgit_html_action_utils=>dbkey_encode( <ls_data> ).
CREATE OBJECT lo_toolbar.
lo_toolbar->add( iv_txt = 'Display' iv_act = |{ zif_abapgit_definitions=>gc_action-db_display }?{ lv_action }| ).
lo_toolbar->add( iv_txt = 'Edit' iv_act = |{ zif_abapgit_definitions=>gc_action-db_edit }?{ lv_action }| ).
lo_toolbar->add( iv_txt = 'Delete' iv_act = |{ gc_action-delete }?{ lv_action }| ).
ro_html->add( |<tr{ lv_trclass }>| ).
ro_html->add( |<td>{ <ls_data>-type }</td>| ).
ro_html->add( |<td>{ <ls_data>-value }</td>| ).
ro_html->add( |<td class="data">{ explain_content( <ls_data> ) }</td>| ).
ro_html->add( '<td>' ).
ro_html->add( lo_toolbar->render( ) ).
ro_html->add( '</td>' ).
ro_html->add( '</tr>' ).
ENDLOOP.
ro_html->add( '</tbody>' ).
ro_html->add( '</table>' ).
ro_html->add( '</div>' ).
ENDMETHOD. "render_content
METHOD zif_abapgit_gui_page~on_event.
DATA: ls_db TYPE zif_abapgit_persistence=>ty_content.
CASE iv_action.
WHEN gc_action-delete.
ls_db = zcl_abapgit_html_action_utils=>dbkey_decode( iv_getdata ).
delete( ls_db ).
ev_state = zif_abapgit_definitions=>gc_event_state-re_render.
ENDCASE.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
9945,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
764,
628,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
7700,
93,
261,
62,
15596,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
8543,
62,
11299,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
308,
66,
62,
2673,
11,
198,
220,
220,
220,
220,
220,
220,
220,
12233,
41876,
4731,
26173,
8924,
705,
33678,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
308,
66,
62,
2673,
764,
628,
220,
220,
220,
42715,
12,
49273,
50,
12233,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
2539,
41876,
1976,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
11299,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
66,
21130,
764,
198,
220,
220,
220,
337,
36252,
50,
4727,
62,
11299,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
7890,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
11299,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
5239,
8,
41876,
4731,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
40156,
62,
4537,
8264,
62,
11012,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
2208,
3784,
41571,
273,
7,
6739,
198,
220,
220,
220,
13845,
62,
13716,
12,
7700,
62,
7839,
796,
705,
35,
1404,
6242,
11159,
350,
4877,
8808,
45155,
4458,
198,
220,
23578,
49273,
13,
220,
366,
23772,
13,
628,
198,
220,
337,
36252,
12233,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
41484,
41876,
269,
406,
49494,
352,
13,
628,
220,
220,
220,
24994,
17395,
318,
62,
2539,
12,
4906,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
24994,
17395,
318,
62,
2539,
12,
8367,
3180,
5626,
3268,
2043,
12576,
13,
628,
220,
220,
220,
300,
85,
62,
41484,
796,
1976,
565,
62,
397,
499,
18300,
62,
12924,
4739,
14804,
12924,
929,
62,
1462,
62,
10414,
2533,
7,
198,
220,
220,
220,
220,
220,
3670,
5657,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
20361,
6,
198,
220,
220,
220,
220,
220,
2420,
62,
25652,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
38727,
8348,
198,
220,
220,
220,
220,
220,
2420,
62,
16539,
62,
16,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
18690,
6,
198,
220,
220,
220,
220,
220,
7196,
62,
16539,
62,
16,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
2149,
1340,
62,
7206,
2538,
9328,
6,
198,
220,
220,
220,
220,
220,
2420,
62,
16539,
62,
17,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
34,
21130,
6,
198,
220,
220,
220,
220,
220,
7196,
62,
16539,
62,
17,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
2149,
1340,
62,
34,
20940,
3698,
6,
198,
220,
220,
220,
220,
220,
4277,
62,
16539,
220,
220,
220,
220,
220,
220,
220,
796,
705,
17,
6,
198,
220,
220,
220,
220,
220,
3359,
62,
66,
21130,
62,
16539,
796,
450,
499,
62,
9562,
6739,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
5626,
13918,
628,
220,
220,
220,
16876,
300,
85,
62,
41484,
796,
705,
17,
4458,
198,
220,
220,
220,
220,
220,
17926,
24352,
7788,
42006,
2849,
41876,
1976,
66,
87,
62,
397,
499,
18300,
62,
66,
21130,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
1976,
565,
62,
397,
499,
18300,
62,
19276,
13274,
62,
9945,
14804,
1136,
62,
39098,
7,
1267,
3784,
33678,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
4906,
220,
796,
318,
62,
2539,
12,
4906,
198,
220,
220,
220,
220,
220,
21628,
62,
8367,
796,
318,
62,
2539,
12,
8367,
6739,
628,
220,
220,
220,
22240,
2043,
30936,
13,
628,
220,
23578,
49273,
13,
220,
366,
12233,
628,
198,
220,
337,
36252,
4727,
62,
11299,
13,
628,
220,
220,
220,
42865,
25,
43979,
62,
20274,
41876,
2872,
62,
20274,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
15699,
220,
41876,
850,
15699,
62,
20274,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
66,
429,
220,
220,
220,
41876,
1312,
13,
628,
198,
220,
220,
220,
42001,
318,
62,
7890,
12,
4906,
13,
198,
220,
220,
220,
220,
220,
42099,
705,
2200,
16402,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
376,
12115,
31328,
440,
4093,
31302,
18310,
3963,
23337,
6369,
705,
27,
6371,
33994,
15885,
36475,
6371,
29,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
318,
62,
7890,
12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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">Retrieves free Alias for Join definition</p>
"! Singleton for managing the alias names for tables in a single join definition
CLASS zcl_dbbr_entity_alias_util DEFINITION
PUBLIC
FINAL
CREATE PRIVATE.
PUBLIC SECTION.
"! <p class="shorttext synchronized" lang="en">Initialize aliases</p>
"!
CLASS-METHODS initialize_aliases
IMPORTING
if_alv_alias_only TYPE abap_bool OPTIONAL.
"! <p class="shorttext synchronized" lang="en">Retrieves the next free ALV Alias</p>
"!
CLASS-METHODS get_next_free_alv_alias
RETURNING
VALUE(rv_alias) TYPE zsat_entity_alias_alv.
"! <p class="shorttext synchronized" lang="en">Creates alias for the entity and registers it</p>
"!
CLASS-METHODS create_entity_alias
IMPORTING
iv_entity TYPE ZSAT_ENTITY_ID
RETURNING
VALUE(rv_entity_alias) TYPE zsat_entity_alias.
"! <p class="shorttext synchronized" lang="en">Add new Alias</p>
"!
CLASS-METHODS add_entity_alias
IMPORTING
iv_entity_alias TYPE zsat_entity_alias
RETURNING
VALUE(rf_added) TYPE abap_bool.
"! <p class="shorttext synchronized" lang="en">Unregisters given alias from Alias pool</p>
"!
CLASS-METHODS unregister_alv_alias
IMPORTING
iv_alias TYPE zsat_entity_alias_alv.
"! <p class="shorttext synchronized" lang="en">Unregister long alias name</p>
"!
CLASS-METHODS unregister_alias
IMPORTING
iv_alias TYPE zsat_entity_alias.
CLASS-METHODS check_entity_alias
IMPORTING
iv_alias TYPE zsat_entity_alias.
"! <p class="shorttext synchronized" lang="en">Add ALV Alias for entity</p>
"!
CLASS-METHODS add_entity_alv_alias
IMPORTING
iv_alias TYPE zsat_entity_alias_alv
RETURNING
VALUE(rf_added) TYPE abap_bool.
PROTECTED SECTION.
PRIVATE SECTION.
CLASS-DATA gt_alv_alias_in_use TYPE STANDARD TABLE OF zsat_entity_alias_alv.
CLASS-DATA gt_alias_in_use TYPE STANDARD TABLE OF zsat_entity_alias.
ENDCLASS.
CLASS zcl_dbbr_entity_alias_util IMPLEMENTATION.
METHOD add_entity_alv_alias.
CLEAR rf_added.
IF NOT line_exists( gt_alv_alias_in_use[ table_line = iv_alias ] ).
gt_alv_alias_in_use = VALUE #( BASE gt_alv_alias_in_use ( iv_alias ) ).
rf_added = abap_true.
ENDIF.
ENDMETHOD.
METHOD add_entity_alias.
CLEAR rf_added.
IF NOT line_exists( gt_alias_in_use[ table_line = iv_entity_alias ] ).
gt_alias_in_use = VALUE #( BASE gt_alias_in_use ( iv_entity_alias ) ).
rf_added = abap_true.
ENDIF.
ENDMETHOD.
METHOD check_entity_alias.
CHECK line_exists( gt_alias_in_use[ table_line = to_upper( iv_alias ) ] ).
ZCX_SAT_VALIDATION_EXCEPTION=>raise_with_text(
iv_text = |{ 'Alias' } { iv_alias } { 'is already in use!' }|
).
.
ENDMETHOD.
METHOD create_entity_alias.
DATA: lt_slash_match TYPE match_result_tab.
*** As a first step the original entity will be the alias, for a better
* IF iv_entity CP '/*'.
* FIND ALL OCCURRENCES OF '/' IN iv_entity RESULTS lt_slash_match.
* DATA(lv_last_index) = lt_slash_match[ 2 ]-offset + 1.
* rv_entity_alias = iv_entity+lv_last_index.
* ELSE.
rv_entity_alias = iv_entity.
* ENDIF.
ENDMETHOD.
METHOD initialize_aliases.
CLEAR gt_alv_alias_in_use.
IF if_alv_alias_only = abap_false.
CLEAR gt_alias_in_use.
ENDIF.
ENDMETHOD.
METHOD get_next_free_alv_alias.
DATA(lv_counter) = 1.
DATA(lf_alias_found) = abap_false.
WHILE lf_alias_found = abap_false.
rv_alias = zcl_dbbr_alias_map=>get_alias( lv_counter ).
IF NOT line_exists( gt_alv_alias_in_use[ table_line = rv_alias ] ).
gt_alv_alias_in_use = VALUE #( BASE gt_alv_alias_in_use ( rv_alias ) ).
lf_alias_found = abap_true.
ELSE.
lv_counter = lv_counter + 1.
ENDIF.
ENDWHILE.
ENDMETHOD.
METHOD unregister_alv_alias.
DELETE gt_alv_alias_in_use WHERE table_line = iv_alias.
ENDMETHOD.
METHOD unregister_alias.
DELETE gt_alias_in_use WHERE table_line = iv_alias.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9781,
5034,
1158,
1479,
978,
4448,
329,
15251,
6770,
3556,
79,
29,
198,
40484,
5573,
10565,
329,
11149,
262,
16144,
3891,
329,
8893,
287,
257,
2060,
4654,
6770,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
26858,
62,
26011,
62,
22602,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
13,
628,
220,
44731,
44513,
13,
628,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
24243,
1096,
47217,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
42715,
12,
49273,
50,
41216,
62,
7344,
1386,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
611,
62,
282,
85,
62,
26011,
62,
8807,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9781,
5034,
1158,
262,
1306,
1479,
8355,
53,
978,
4448,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
19545,
62,
5787,
62,
282,
85,
62,
26011,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
26011,
8,
41876,
1976,
49720,
62,
26858,
62,
26011,
62,
282,
85,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
16719,
274,
16144,
329,
262,
9312,
290,
28441,
340,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
42715,
12,
49273,
50,
2251,
62,
26858,
62,
26011,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26858,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1168,
50,
1404,
62,
3525,
9050,
62,
2389,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
26858,
62,
26011,
8,
41876,
1976,
49720,
62,
26858,
62,
26011,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
4550,
649,
978,
4448,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
42715,
12,
49273,
50,
751,
62,
26858,
62,
26011,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26858,
62,
26011,
41876,
1976,
49720,
62,
26858,
62,
26011,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
41871,
62,
29373,
8,
41876,
450,
499,
62,
30388,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
3118,
2301,
6223,
1813,
16144,
422,
978,
4448,
5933,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
42715,
12,
49273,
50,
555,
30238,
62,
282,
85,
62,
26011,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26011,
41876,
1976,
49720,
62,
26858,
62,
26011,
62,
282,
85,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
3118,
30238,
890,
16144,
1438,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
42715,
12,
49273,
50,
555,
30238,
62,
26011,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26011,
41876,
1976,
49720,
62,
26858,
62,
26011,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
2198,
62,
26858,
62,
26011,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26011,
41876,
1976,
49720,
62,
26858,
62,
26011,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
4550,
8355,
53,
978,
4448,
329,
9312,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
42715,
12,
49273,
50,
751,
62,
26858,
62,
282,
85,
62,
26011,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26011,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
49720,
62,
26858,
62,
26011,
62,
282,
85,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
41871,
62,
29373,
8,
41876,
450,
499,
62,
30388,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
83,
62,
282,
85,
62,
26011,
62,
259,
62,
1904,
41876,
49053,
9795,
43679,
3963,
1976,
49720,
62,
26858,
62,
26011,
62,
282,
85,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
83,
62,
26011,
62,
259,
62,
1904,
41876,
49053,
9795,
43679,
3963,
1976,
49720,
62,
26858,
62,
26011,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
26858,
62,
26011,
62,
22602,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
751,
62,
26858,
62,
282,
85,
62,
26011,
13,
198,
220,
220,
220,
30301,
1503,
374,
69,
62,
29373,
13,
628,
220,
220,
220,
16876,
5626,
1627,
62,
1069,
1023,
7,
308,
83,
62,
282,
85,
62,
26011,
62,
259,
62,
1904,
58,
3084,
62,
1370,
796,
21628,
62,
26011,
2361,
6739,
198,
220,
220,
220,
220,
220,
308,
83,
62,
282,
85,
62,
26011,
62,
259,
62,
1904,
796,
26173,
8924,
1303,
7,
49688,
308,
83,
62,
282,
85,
62,
26011,
62,
259,
62,
1904,
357,
21628,
62,
26011,
1267,
6739,
198,
220,
220,
220,
220,
220,
374,
69,
62,
29373,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
751,
62,
26858,
62,
26011,
13,
198,
220,
220,
220,
30301,
1503,
374
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_ttyp DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_TTYP IMPLEMENTATION.
METHOD zif_abapgit_object~changed_by.
SELECT SINGLE as4user FROM dd40l INTO rv_user
WHERE typename = ms_item-obj_name
AND as4local = 'A'.
IF sy-subrc <> 0.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_objname TYPE rsedd0-ddobjname.
IF zif_abapgit_object~exists( ) = abap_false.
RETURN.
ENDIF.
lv_objname = ms_item-obj_name.
CALL FUNCTION 'RS_DD_DELETE_OBJ'
EXPORTING
no_ask = abap_true
objname = lv_objname
objtype = 'A'
EXCEPTIONS
not_executed = 1
object_not_found = 2
object_not_specified = 3
permission_failure = 4.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: lv_name TYPE ddobjname,
lt_dd42v TYPE dd42v_tab,
lt_dd43v TYPE dd43v_tab,
ls_dd40v TYPE dd40v,
lv_msg TYPE string.
io_xml->read( EXPORTING iv_name = 'DD40V'
CHANGING cg_data = ls_dd40v ).
io_xml->read( EXPORTING iv_name = 'DD42V'
CHANGING cg_data = lt_dd42v ).
io_xml->read( EXPORTING iv_name = 'DD43V'
CHANGING cg_data = lt_dd43v ).
corr_insert( iv_package = iv_package iv_object_class = 'DICT' ).
lv_name = ms_item-obj_name. " type conversion
CALL FUNCTION 'DDIF_TTYP_PUT'
EXPORTING
name = lv_name
dd40v_wa = ls_dd40v
TABLES
dd42v_tab = lt_dd42v
dd43v_tab = lt_dd43v
EXCEPTIONS
ttyp_not_found = 1
name_inconsistent = 2
ttyp_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc <> 0.
lv_msg = |Error in DDIF_TTYP_PUT on object { lv_name }|.
CASE sy-subrc.
WHEN 1.
lv_msg = lv_msg && | (TTYP_NOT_FOUND)|.
WHEN 2.
lv_msg = lv_msg && | (NAME_INCONSISTENT)|.
WHEN 3.
lv_msg = lv_msg && | (TTYP_INCONSISTENT)|.
WHEN 4.
lv_msg = lv_msg && | (PUT_FAILURE)|.
WHEN 5.
lv_msg = lv_msg && | (PUT_REFUSED)|.
WHEN OTHERS.
ENDCASE.
zcx_abapgit_exception=>raise( lv_msg ).
ENDIF.
zcl_abapgit_objects_activation=>add_item( ms_item ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_typename TYPE dd40l-typename.
SELECT SINGLE typename FROM dd40l INTO lv_typename
WHERE typename = ms_item-obj_name
AND as4local = 'A'.
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
DATA: ls_meta TYPE zif_abapgit_definitions=>ty_metadata.
ls_meta = zif_abapgit_object~get_metadata( ).
IF ls_meta-late_deser = abap_true.
APPEND zif_abapgit_object=>gc_step_id-late TO rt_steps.
ELSEIF ls_meta-ddic = abap_true.
APPEND zif_abapgit_object=>gc_step_id-ddic TO rt_steps.
ELSE.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-ddic = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'ESDICT'
iv_argument = |{ ms_item-obj_type }{ ms_item-obj_name }| ).
ENDMETHOD.
METHOD zif_abapgit_object~jump.
jump_se11( iv_radio = 'RSRD1-DDTYPE'
iv_field = 'RSRD1-DDTYPE_VAL' ).
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lv_name TYPE ddobjname,
lt_dd42v TYPE dd42v_tab,
lt_dd43v TYPE dd43v_tab,
ls_dd40v TYPE dd40v.
lv_name = ms_item-obj_name.
CALL FUNCTION 'DDIF_TTYP_GET'
EXPORTING
name = lv_name
state = 'A'
langu = mv_language
IMPORTING
dd40v_wa = ls_dd40v
TABLES
dd42v_tab = lt_dd42v
dd43v_tab = lt_dd43v
EXCEPTIONS
illegal_input = 1
OTHERS = 2.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
IF ls_dd40v IS INITIAL.
RETURN. " does not exist in system
ENDIF.
CLEAR: ls_dd40v-as4user,
ls_dd40v-as4date,
ls_dd40v-as4time.
IF NOT ls_dd40v-rowkind IS INITIAL.
CLEAR ls_dd40v-typelen.
ENDIF.
io_xml->add( iv_name = 'DD40V'
ig_data = ls_dd40v ).
io_xml->add( iv_name = 'DD42V'
ig_data = lt_dd42v ).
io_xml->add( iv_name = 'DD43V'
ig_data = lt_dd43v ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
83,
28004,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
23680,
62,
51,
9936,
47,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
355,
19,
7220,
16034,
49427,
1821,
75,
39319,
374,
85,
62,
7220,
198,
220,
220,
220,
220,
220,
33411,
2170,
12453,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
5357,
355,
19,
12001,
796,
705,
32,
4458,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
374,
85,
62,
7220,
796,
269,
62,
7220,
62,
34680,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
26801,
3672,
41876,
44608,
6048,
15,
12,
1860,
26801,
3672,
13,
628,
220,
220,
220,
16876,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1069,
1023,
7,
1267,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
300,
85,
62,
26801,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
6998,
62,
16458,
62,
7206,
2538,
9328,
62,
9864,
41,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
645,
62,
2093,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
26181,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
26801,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
26181,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
32,
6,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
407,
62,
18558,
7241,
220,
220,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
1662,
62,
9275,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
1662,
62,
23599,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
7170,
62,
32165,
495,
220,
220,
796,
604,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
62,
83,
3064,
7,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
8906,
48499,
1096,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
3672,
220,
41876,
49427,
26801,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
1860,
3682,
85,
41876,
49427,
3682,
85,
62,
8658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
1860,
3559,
85,
41876,
49427,
3559,
85,
62,
8658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
1860,
1821,
85,
41876,
49427,
1821,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
19662,
220,
220,
41876,
4731,
13,
628,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
1821,
53,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
269,
70,
62,
7890,
796,
43979,
62,
1860,
1821,
85,
6739,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
3682,
53,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
269,
70,
62,
7890,
796,
300,
83,
62,
1860,
3682,
85,
6739,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
3559,
53,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
269,
70,
62,
7890,
796,
300,
83,
62,
1860,
3559,
85,
6739,
628,
220,
220,
220,
1162,
81,
62,
28463,
7,
21628,
62,
26495,
796,
21628,
62,
26495,
21628,
62,
15252,
62,
4871,
796,
705,
35,
18379,
6,
6739,
628,
220,
220,
220,
300,
85,
62,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
366,
2099,
11315,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
16458,
5064,
62,
51,
9936,
47,
62,
30076,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
49427,
1821,
85,
62,
10247,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
43979,
62,
1860,
1821,
85,
198,
220,
220,
220,
220,
220,
309,
6242,
28378,
198,
220,
220,
220,
220,
220,
220,
220,
49427,
3682,
85,
62,
8658,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
83,
62,
1860,
3682,
85,
198,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ycl_addict_def_system_rules DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES yif_addict_system_rules.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ycl_addict_def_system_rules IMPLEMENTATION.
METHOD yif_addict_system_rules~get_requests_of_tickets.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Returns the requests of the given ticket.
" Assumption here: Request text starts with ticket number.
" Sample format:
" VOL-12345 - Explanation
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
DATA(request_details) = ycl_addict_transport_request=>get_request_list(
VALUE #( as4text_rng = VALUE #( FOR _ticket_key IN ticket_keys (
option = ycl_addict_toolkit=>option-cp
sign = ycl_addict_toolkit=>sign-include
low = |{ _ticket_key-ticket_id } - *| ) )
srch_strkorr = abap_true ) ).
requests = VALUE #( FOR _rd IN request_details
WHERE ( strkorr IS INITIAL )
( _rd-trkorr ) ).
ENDMETHOD.
METHOD yif_addict_system_rules~is_request_toc_safe.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Is request ToC safe?
" Here is the logic of this method:
" Workbench request should be ToC safe without any problems.
" However; assume the following scenario:
"
" Dev system, client 220: Customizing request is created
" Dev system, client 100: ToC is created and
" customizing from 220 is included
" QA system, client 100: ToC is imported
"
" In that case; the ToC includes the data from client 100,
" not 220. It might even be completely empty if the same
" keys don't exist in dev 100. When you import that ToC into
" the QA system, it will damage the data there - instead
" of importing the data from 220.
"
" Therefore, customizing requests from other clients are not
" ToC safe.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
TRY.
DATA(request) = ycl_addict_transport_request=>get_instance( trkorr ).
CATCH cx_root.
RETURN.
ENDTRY.
DATA(trf) = request->get_header( )-trfunction.
safe = xsdbool( NOT (
( trf = ycl_addict_transport_request=>trfunction-cust OR
trf = ycl_addict_transport_request=>trfunction-cust_task ) AND
( request->get_source_client( ) <> sy-mandt ) ) ).
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
565,
62,
2860,
713,
62,
4299,
62,
10057,
62,
38785,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
331,
361,
62,
2860,
713,
62,
10057,
62,
38785,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
31631,
331,
565,
62,
2860,
713,
62,
4299,
62,
10057,
62,
38785,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
331,
361,
62,
2860,
713,
62,
10057,
62,
38785,
93,
1136,
62,
8897,
3558,
62,
1659,
62,
83,
15970,
13,
198,
220,
220,
220,
13538,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
37811,
198,
220,
220,
220,
366,
16409,
262,
7007,
286,
262,
1813,
7846,
13,
198,
220,
220,
220,
366,
2195,
24098,
994,
25,
19390,
2420,
4940,
351,
7846,
1271,
13,
198,
220,
220,
220,
366,
27565,
5794,
25,
198,
220,
220,
220,
366,
38570,
12,
10163,
2231,
532,
50125,
341,
198,
220,
220,
220,
13538,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
37811,
198,
220,
220,
220,
42865,
7,
25927,
62,
36604,
8,
796,
331,
565,
62,
2860,
713,
62,
7645,
634,
62,
25927,
14804,
1136,
62,
25927,
62,
4868,
7,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
1303,
7,
355,
19,
5239,
62,
81,
782,
796,
26173,
8924,
1303,
7,
7473,
4808,
43350,
62,
2539,
3268,
7846,
62,
13083,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3038,
796,
331,
565,
62,
2860,
713,
62,
25981,
15813,
14804,
18076,
12,
13155,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1051,
220,
220,
796,
331,
565,
62,
2860,
713,
62,
25981,
15813,
14804,
12683,
12,
17256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1877,
220,
220,
220,
796,
930,
90,
4808,
43350,
62,
2539,
12,
43350,
62,
312,
1782,
532,
1635,
91,
1267,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19677,
354,
62,
2536,
74,
38890,
796,
450,
499,
62,
7942,
1267,
6739,
628,
220,
220,
220,
7007,
796,
26173,
8924,
1303,
7,
7473,
4808,
4372,
3268,
2581,
62,
36604,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33411,
357,
965,
74,
38890,
3180,
3268,
2043,
12576,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
4808,
4372,
12,
2213,
74,
38890,
1267,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
331,
361,
62,
2860,
713,
62,
10057,
62,
38785,
93,
271,
62,
25927,
62,
40301,
62,
21230,
13,
198,
220,
220,
220,
13538,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
198,
220,
220,
220,
366,
1148,
2581,
1675,
34,
3338,
30,
198,
220,
220,
220,
366,
3423,
318,
262,
9156,
286,
428,
2446,
25,
198,
220,
220,
220,
366,
5521,
26968,
2581,
815,
307,
1675,
34,
3338,
1231,
597,
2761,
13,
198,
220,
220,
220,
366,
2102,
26,
7048,
262,
1708,
8883,
25,
198,
220,
220,
220,
366,
198,
220,
220,
220,
366,
6245,
1080,
11,
5456,
15629,
25,
8562,
2890,
2581,
318,
2727,
198,
220,
220,
220,
366,
6245,
1080,
11,
5456,
1802,
25,
1675,
34,
318,
2727,
290,
198,
220,
220,
220,
366,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2183,
2890,
422,
15629,
318,
3017,
198,
220,
220,
220,
366,
1195,
32,
1080,
11,
5456,
1802,
25,
1675,
34,
318,
17392,
198,
220,
220,
220,
366,
198,
220,
220,
220,
366,
554,
326,
1339,
26,
262,
1675,
34,
3407,
262,
1366,
422,
5456,
1802,
11,
198,
220,
220,
220,
366,
407,
15629,
13,
632,
1244,
772,
307,
3190,
6565,
611,
262,
976,
198,
220,
220,
220,
366,
8251,
836,
470,
2152,
287,
1614,
1802,
13,
1649,
345,
1330,
326,
1675,
34,
656,
198,
220,
220,
220,
366,
262,
1195,
32,
1080,
11,
340,
481,
2465,
262,
1366,
612,
532,
2427,
198,
220,
220,
220,
366,
286,
33332,
262,
1366,
422,
15629,
13,
198,
220,
220,
220,
366,
198,
220,
220,
220,
366,
8447,
11,
2183,
2890,
7007,
422,
584,
7534,
389,
407,
198,
220,
220,
220,
366,
1675,
34,
3338,
13,
198,
220,
220,
220,
13538,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
15931,
37811,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
42865,
7,
25927,
8,
796,
331,
565,
62,
2860,
713,
62,
7645,
634,
62,
25927,
14804,
1136,
62,
39098,
7,
491,
74,
38890,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
15763,
13,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
40405,
13,
628,
220,
220,
220,
42865,
7,
2213,
69,
8,
796,
2581,
3784,
1136,
62,
25677,
7,
1267,
12,
2213,
8818,
13,
628,
220,
220,
220,
3338,
796,
2124,
82,
9945,
970,
7,
5626,
357,
198,
220,
220,
220,
220,
220,
220,
220,
357,
491,
69,
796,
331,
565,
62,
2860,
713,
62,
7645,
634,
62,
25927,
14804,
2213,
8818,
12,
66,
436,
6375,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
491,
69,
796,
331,
565
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_user_master_record DEFINITION
PUBLIC
FINAL
CREATE PRIVATE .
PUBLIC SECTION.
CLASS-METHODS:
get_instance
IMPORTING
!iv_user TYPE uname
RETURNING
VALUE(ro_user) TYPE REF TO zcl_abapgit_user_master_record.
METHODS:
constructor
IMPORTING
!iv_user TYPE uname,
get_name
RETURNING
VALUE(rv_name) TYPE zif_abapgit_definitions=>ty_git_user-name,
get_email
RETURNING
VALUE(rv_email) TYPE zif_abapgit_definitions=>ty_git_user-email.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_user,
user TYPE uname,
o_user TYPE REF TO zcl_abapgit_user_master_record,
END OF ty_user.
CLASS-DATA:
mt_user TYPE HASHED TABLE OF ty_user
WITH UNIQUE KEY user.
DATA:
ms_user TYPE zif_abapgit_definitions=>ty_git_user.
ENDCLASS.
CLASS zcl_abapgit_user_master_record IMPLEMENTATION.
METHOD constructor.
DATA: lt_return TYPE TABLE OF bapiret2,
ls_address TYPE bapiaddr3,
lt_smtp TYPE TABLE OF bapiadsmtp,
ls_smtp TYPE bapiadsmtp.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = iv_user
IMPORTING
address = ls_address
TABLES
return = lt_return
addsmtp = lt_smtp.
* Choose the first email from SU01
SORT lt_smtp BY consnumber ASCENDING.
LOOP AT lt_smtp INTO ls_smtp.
ms_user-email = ls_smtp-e_mail.
EXIT.
ENDLOOP.
* Attempt to use the full name from SU01
ms_user-name = ls_address-fullname.
ENDMETHOD.
METHOD get_email.
rv_email = ms_user-email.
ENDMETHOD.
METHOD get_instance.
DATA: ls_user TYPE ty_user.
FIELD-SYMBOLS: <ls_user> TYPE ty_user.
READ TABLE mt_user ASSIGNING <ls_user>
WITH KEY user = iv_user.
IF sy-subrc <> 0.
ls_user-user = iv_user.
CREATE OBJECT ls_user-o_user
EXPORTING
iv_user = iv_user.
INSERT ls_user
INTO TABLE mt_user
ASSIGNING <ls_user>.
ENDIF.
ro_user = <ls_user>-o_user.
ENDMETHOD.
METHOD get_name.
rv_name = ms_user-name.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
7220,
62,
9866,
62,
22105,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
651,
62,
39098,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
7220,
220,
220,
220,
220,
220,
220,
41876,
555,
480,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
7220,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
7220,
62,
9866,
62,
22105,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
7220,
41876,
555,
480,
11,
628,
220,
220,
220,
220,
220,
651,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
3672,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
18300,
62,
7220,
12,
3672,
11,
628,
220,
220,
220,
220,
220,
651,
62,
12888,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
12888,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
18300,
62,
7220,
12,
12888,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
7220,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2836,
220,
220,
41876,
555,
480,
11,
198,
220,
220,
220,
220,
220,
220,
220,
267,
62,
7220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
7220,
62,
9866,
62,
22105,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
7220,
13,
628,
220,
220,
220,
42715,
12,
26947,
25,
198,
220,
220,
220,
220,
220,
45079,
62,
7220,
41876,
367,
11211,
1961,
43679,
3963,
1259,
62,
7220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
4725,
33866,
8924,
35374,
2836,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
13845,
62,
7220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
18300,
62,
7220,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
7220,
62,
9866,
62,
22105,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
7783,
220,
41876,
43679,
3963,
275,
499,
557,
83,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
21975,
41876,
275,
15042,
29851,
18,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
5796,
34788,
220,
220,
220,
41876,
43679,
3963,
275,
15042,
5643,
16762,
79,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
5796,
34788,
220,
220,
220,
41876,
275,
15042,
5643,
16762,
79,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
33,
17614,
62,
29904,
62,
18851,
62,
35,
20892,
4146,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
20579,
796,
21628,
62,
7220,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2209,
220,
796,
43979,
62,
21975,
198,
220,
220,
220,
220,
220,
309,
6242,
28378,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
220,
220,
796,
300,
83,
62,
7783,
198,
220,
220,
220,
220,
220,
220,
220,
751,
5796,
34788,
220,
796,
300,
83,
62,
5796,
34788,
13,
198,
198,
9,
220,
220,
220,
220,
17489,
262,
717,
3053,
422,
13558,
486,
198,
220,
220,
220,
311,
9863,
300,
83,
62,
5796,
34788,
11050,
762,
17618,
25400,
10619,
2751,
13,
628,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
5796,
34788,
39319,
43979,
62,
5796,
34788,
13,
198,
220,
220,
220,
220,
220,
13845,
62,
7220,
12,
12888,
796,
43979,
62,
5796,
34788,
12,
68,
62,
4529,
13,
198,
220,
220,
220,
220,
220,
7788,
2043,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
198,
198,
9,
220,
220,
220,
220,
25770,
284,
779,
262,
1336,
1438,
422,
13558,
486,
198,
220,
220,
220,
13845,
62,
7220,
12,
3672,
796,
43979,
62,
21975,
12,
12853,
3672,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
12888,
13,
628,
220,
220,
220,
374,
85,
62,
12888,
796,
13845,
62,
7220,
12,
12888,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
39098,
13,
628,
220,
220,
220,
42865,
25,
43979,
62,
7220,
41876,
1259,
62,
7220,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
7220,
29,
41876,
1259,
62,
7220,
13,
628,
220,
220,
220,
20832,
43679,
45079,
62,
7220,
24994,
3528,
15871,
1279,
7278,
62,
7220,
29,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
35374,
2836,
796,
21628,
62,
7220,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
628,
220,
220,
220,
220,
220,
43979,
62,
7220,
12,
7220,
796,
21628,
62,
7220,
13,
198,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
43979,
62,
7220,
12,
78,
62,
7220,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
7220,
796,
21628,
62,
7220,
13,
628,
220,
220,
220,
220,
220,
29194,
17395,
43979,
62,
7220,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_area DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_objects_super
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abapgit_object .
ALIASES mo_files
FOR zif_abapgit_object~mo_files .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_abapgit_object_area IMPLEMENTATION.
METHOD zif_abapgit_object~changed_by.
DATA: lv_user TYPE string.
SELECT SINGLE tstpnm FROM ('RSDAREA') INTO lv_user.
rv_user = lv_user.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA:
lr_area TYPE REF TO object.
CREATE OBJECT lr_area TYPE ('CL_NEW_AWB_AREA').
CALL METHOD lr_area->('IF_RSAWBN_FOLDER_TREE~DELETE_NODE')
EXPORTING
i_nodename = ms_item-obj_name
i_with_dialog = ''.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error while deleting AREA: { ms_item-obj_name }| ).
ENDIF.
corr_insert( iv_package ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA:
lv_nodename TYPE c LENGTH 40,
lv_parentname TYPE c LENGTH 40,
lv_txtsh TYPE c LENGTH 20,
lv_txtlg TYPE c LENGTH 60,
lr_area TYPE REF TO object.
io_xml->read( EXPORTING iv_name = 'NODENAME'
CHANGING cg_data = lv_nodename ).
io_xml->read( EXPORTING iv_name = 'PARENTNAME'
CHANGING cg_data = lv_parentname ).
io_xml->read( EXPORTING iv_name = 'TXTSH'
CHANGING cg_data = lv_txtsh ).
io_xml->read( EXPORTING iv_name = 'TXTLG'
CHANGING cg_data = lv_txtlg ).
CREATE OBJECT lr_area TYPE ('CL_NEW_AWB_AREA').
CALL METHOD lr_area->('IF_RSAWBN_FOLDER_TREE~CREATE_NODE')
EXPORTING
i_parentname = lv_parentname
i_nodename = lv_nodename
i_txtsh = lv_txtsh
i_txtlg = lv_txtlg.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error while creating AREA: { ms_item-obj_name }| ).
ENDIF.
tadir_insert( iv_package ).
corr_insert( iv_package ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA:
lr_area TYPE REF TO object,
lr_tab_tree TYPE REF TO data,
lr_str_tee TYPE REF TO data.
FIELD-SYMBOLS:
<lt_tree> TYPE STANDARD TABLE,
<ls_tree> TYPE any.
CREATE OBJECT lr_area TYPE ('CL_NEW_AWB_AREA').
CREATE DATA lr_tab_tree TYPE STANDARD TABLE OF ('RSAWBN_S_TREEORG').
ASSIGN lr_tab_tree->* TO <lt_tree>.
CREATE DATA lr_str_tee TYPE STANDARD TABLE OF ('RSAWBN_S_TREEORG').
ASSIGN lr_str_tee->* TO <ls_tree>.
CALL METHOD lr_area->('IF_RSAWBN_FOLDER_TREE~GET_TREE')
EXPORTING
i_objvers = ''
i_langu = ''
IMPORTING
e_t_tree = <lt_tree>.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error while read AREA tree| ).
ENDIF.
READ TABLE <lt_tree> WITH KEY ('NODENAME') = ms_item-obj_name ASSIGNING <ls_tree>.
IF sy-subrc = 0.
rv_bool = abap_true.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
DATA:
lr_area TYPE REF TO object,
lr_tab_tree TYPE REF TO data,
lr_str_tee TYPE REF TO data.
FIELD-SYMBOLS:
<lt_tree> TYPE STANDARD TABLE,
<ls_tree> TYPE any.
CREATE OBJECT lr_area TYPE ('CL_NEW_AWB_AREA').
CREATE DATA lr_tab_tree TYPE STANDARD TABLE OF ('RSAWBN_S_TREEORG').
ASSIGN lr_tab_tree->* TO <lt_tree>.
CREATE DATA lr_str_tee TYPE STANDARD TABLE OF ('RSAWBN_S_TREEORG').
ASSIGN lr_str_tee->* TO <ls_tree>.
CALL METHOD lr_area->('IF_RSAWBN_FOLDER_TREE~GET_TREE')
EXPORTING
i_objvers = 'A'
i_langu = mv_language
IMPORTING
e_t_tree = <lt_tree>.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error while read AREA tree| ).
ENDIF.
READ TABLE <lt_tree> WITH KEY ('NODENAME') = ms_item-obj_name ASSIGNING <ls_tree>.
IF sy-subrc = 0.
rv_active = abap_true.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'ERSDAREA' ).
ENDMETHOD.
METHOD zif_abapgit_object~jump.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA:
lr_area TYPE REF TO object,
lr_tab_tree TYPE REF TO data,
lr_str_tee TYPE REF TO data,
lr_rsdareat TYPE REF TO data,
lv_select TYPE string.
FIELD-SYMBOLS:
<lt_tree> TYPE STANDARD TABLE,
<ls_tree> TYPE any,
<lv_parentname> TYPE any,
<ls_rsdareat> TYPE any,
<lv_txtlg> TYPE any,
<lv_txtsh> TYPE any.
CREATE OBJECT lr_area TYPE ('CL_NEW_AWB_AREA').
CREATE DATA lr_tab_tree TYPE STANDARD TABLE OF ('RSAWBN_S_TREEORG').
ASSIGN lr_tab_tree->* TO <lt_tree>.
CREATE DATA lr_str_tee TYPE STANDARD TABLE OF ('RSAWBN_S_TREEORG').
ASSIGN lr_str_tee->* TO <ls_tree>.
CREATE DATA lr_rsdareat TYPE ('RSDAREAT').
ASSIGN lr_rsdareat->* TO <ls_rsdareat>.
CALL METHOD lr_area->('IF_RSAWBN_FOLDER_TREE~GET_TREE')
EXPORTING
i_objvers = 'A'
i_langu = mv_language
IMPORTING
e_t_tree = <lt_tree>.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error while read AREA tree| ).
ENDIF.
READ TABLE <lt_tree> WITH KEY ('NODENAME') = ms_item-obj_name ASSIGNING <ls_tree>.
lv_select = |INFOAREA = '{ ms_item-obj_name }'|.
SELECT SINGLE * FROM ('RSDAREAT')
INTO <ls_rsdareat>
WHERE infoarea = ms_item-obj_name.
ASSIGN COMPONENT 'TXTSH' OF STRUCTURE <ls_rsdareat> TO <lv_txtsh>.
ASSIGN COMPONENT 'TXTLG' OF STRUCTURE <ls_rsdareat> TO <lv_txtlg>.
ASSIGN COMPONENT 'PARENTNAME' OF STRUCTURE <ls_tree> TO <lv_parentname>.
io_xml->add( iv_name = 'NODENAME'
ig_data = ms_item-obj_name ).
io_xml->add( iv_name = 'PARENTNAME'
ig_data = <lv_parentname> ).
io_xml->add( iv_name = 'TXTSH'
ig_data = <lv_txtsh> ).
io_xml->add( iv_name = 'TXTLG'
ig_data = <lv_txtlg> ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
20337,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
764,
628,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
20337,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
7220,
41876,
4731,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
256,
301,
79,
21533,
16034,
19203,
6998,
35,
12203,
32,
11537,
39319,
300,
85,
62,
7220,
13,
628,
220,
220,
220,
374,
85,
62,
7220,
796,
300,
85,
62,
7220,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
300,
81,
62,
20337,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
2134,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
300,
81,
62,
20337,
41876,
19203,
5097,
62,
13965,
62,
12298,
33,
62,
12203,
32,
27691,
628,
220,
220,
220,
42815,
337,
36252,
300,
81,
62,
20337,
3784,
10786,
5064,
62,
49,
4090,
54,
15766,
62,
37,
3535,
14418,
62,
51,
11587,
93,
7206,
2538,
9328,
62,
45,
16820,
11537,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
77,
375,
12453,
220,
220,
220,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
4480,
62,
38969,
519,
796,
705,
4458,
628,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
930,
12331,
981,
34817,
15986,
32,
25,
1391,
13845,
62,
9186,
12,
26801,
62,
3672,
1782,
91,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
1162,
81,
62,
28463,
7,
21628,
62,
26495,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
8906,
48499,
1096,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
300,
85,
62,
77,
375,
12453,
220,
220,
41876,
269,
406,
49494,
2319,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
8000,
3672,
41876,
269,
406,
49494,
2319,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
14116,
1477,
220,
220,
220,
220,
220,
41876,
269,
406,
49494,
1160,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
14116,
75,
70,
220,
220,
220,
220,
220,
41876,
269,
406,
49494,
3126,
11,
198,
220,
220,
220,
220,
220,
300,
81,
62,
20337,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
2134,
13,
628,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
45,
3727,
1677,
10067,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
269,
70,
62,
7890,
796,
300,
85,
62,
77,
375,
12453,
220,
6739,
628,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
27082,
3525,
20608,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
7890,
796,
300,
85,
62,
8000,
3672,
6739,
628,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
29551,
4694,
39,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
7890,
796,
300,
85,
62,
14116,
1477,
6739,
628,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
29551,
14990,
38,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
7890,
796,
300,
85,
62,
14116,
75,
70,
6739,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
300,
81,
62,
20337,
41876,
19203,
5097,
62,
13965,
62,
12298,
33,
62,
12203,
32,
27691,
628,
220,
220,
220,
42815,
337,
36252,
300,
81,
62,
20337,
3784,
10786,
5064,
62,
49,
4090,
54,
15766,
62,
37,
3535,
14418,
62,
51,
11587,
93,
43387,
6158,
62,
45,
16820,
11537,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
8000,
3672,
796,
300,
85,
62,
8000,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
77,
375,
12453,
220,
220,
796,
300,
85,
62,
77,
375,
12453,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
14116,
1477,
220,
220,
220,
220,
220,
796,
300,
85,
62,
14116,
1477,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
14116,
75,
70,
220,
220,
220,
220,
220,
796,
300,
85,
62,
14116,
75,
70,
13,
628,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
930,
12331,
981,
4441,
15986,
32,
25,
1391,
13845,
62,
9186,
12,
26801,
62,
3672,
1782,
91,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
36264,
343,
62,
28463,
7,
21628,
62,
26495,
6739,
628,
220,
220,
220,
1162,
81,
62,
28463,
7,
21628,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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IVATE SECTION.
DATA m_cnt TYPE REF TO zcl_abapdi_container.
DATA m_cut TYPE REF TO zif_fmwp_gen.
METHODS:
generate_class FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS ltcl_main IMPLEMENTATION.
METHOD generate_class.
m_cnt = NEW zcl_abapdi_container( ).
m_cnt->register( i_if = 'zif_flsuni' i_cl = 'zcl_flsuni_double' ).
m_cnt->register( i_if = 'zif_fmwp_fmadptr' i_cl = 'zcl_fmwp_fmadptr_imp').
m_cut = CAST zif_fmwp_gen( m_cnt->get_instance( 'zcl_fmwp_gen' ) ).
cl_abap_unit_assert=>assert_bound( msg = 'cut' act = m_cut ).
DATA(l_cls) = NEW zcl_fmwp_clsinfo( ).
CALL METHOD m_cut->class_generate
EXPORTING
i_name = 'FUNCTION_IMPORT_DOKU'
CHANGING
c_class = l_cls.
" THEN
DATA(l_meth) = l_cls->method_get_imp( 'function_import_doku' ).
DATA(l_param) = l_cls->method_get_all_params( ).
cl_abap_unit_assert=>assert_equals(
msg = 'msg'
exp = VALUE vseoparam(
cmpname = 'FUNCTION_IMPORT_DOKU'
sconame = 'EXCEPTION_LIST'
cmptype = '1'
pardecltyp = 2 " changing weil tabelle
typtype = '1'
type = 'TT_RSEXC'
)
act = l_param[ cmpname = 'FUNCTION_IMPORT_DOKU' sconame = 'EXCEPTION_LIST' ] ).
DATA(l_src) = VALUE rswsourcet(
( |call function 'FUNCTION_IMPORT_DOKU'| )
( |exporting| )
( |GLOBAL_FLAG = GLOBAL_FLAG| )
( |REMOTE_CALL = REMOTE_CALL| )
( |UPDATE_TASK = UPDATE_TASK| )
( |SHORT_TEXT = SHORT_TEXT| )
( |FREEDATE = FREEDATE| )
( |importing| )
( |FUNCNAME = FUNCNAME| )
( |LANGUAGE = LANGUAGE| )
( |WITH_ENHANCEMENTS = WITH_ENHANCEMENTS| )
( |IGNORE_SWITCHES = IGNORE_SWITCHES| )
( |tables| )
( |DOKUMENTATION = DOKUMENTATION| )
( |EXCEPTION_LIST = EXCEPTION_LIST| )
( |EXPORT_PARAMETER = EXPORT_PARAMETER| )
( |IMPORT_PARAMETER = IMPORT_PARAMETER| )
( |CHANGING_PARAMETER = CHANGING_PARAMETER| )
( |changing| )
( |TST_CHG = TST_CHG| )
( |exceptions| )
( |ERROR_MESSAGE = 1| )
( |FUNCTION_NOT_FOUND = 1| )
( |INVALID_NAME = 1| )
( |others = 2| )
( |.| ) ).
cl_abap_unit_assert=>assert_equals( msg = 'src' exp = l_src act = l_meth ).
CALL METHOD l_cls->method_get_def
EXPORTING
i_name = 'function_import_doku'
IMPORTING
e_method_def = DATA(ls_method)
e_params = DATA(lt_params).
cl_abap_unit_assert=>assert_equals(
msg = 'IGNORE_SWITCHES'
exp = 0
act = lt_params[ sconame = 'IGNORE_SWITCHES' ]-pardecltyp ).
DATA(impl) = l_cls->method_get_all_sources( ).
DATA(types) = l_cls->type_get_all( ).
cl_abap_unit_assert=>assert_equals( msg = 'types empty' exp = 5 act = lines( types ) ).
ENDMETHOD.
ENDCLASS.
| [
9,
1,
9,
779,
428,
2723,
2393,
329,
534,
9564,
2969,
4326,
1332,
6097,
198,
31631,
300,
83,
565,
62,
12417,
5550,
20032,
17941,
25261,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
285,
62,
66,
429,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
10989,
62,
34924,
13,
198,
220,
220,
220,
42865,
285,
62,
8968,
41876,
4526,
37,
5390,
1976,
361,
62,
38353,
24142,
62,
5235,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
7716,
62,
4871,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
10619,
31631,
13,
628,
198,
31631,
300,
83,
565,
62,
12417,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
7716,
62,
4871,
13,
628,
220,
220,
220,
285,
62,
66,
429,
796,
12682,
1976,
565,
62,
397,
499,
10989,
62,
34924,
7,
6739,
198,
220,
220,
220,
285,
62,
66,
429,
3784,
30238,
7,
1312,
62,
361,
796,
705,
89,
361,
62,
2704,
19155,
72,
6,
1312,
62,
565,
796,
705,
89,
565,
62,
2704,
19155,
72,
62,
23352,
6,
6739,
198,
220,
220,
220,
285,
62,
66,
429,
3784,
30238,
7,
1312,
62,
361,
796,
705,
89,
361,
62,
38353,
24142,
62,
69,
9937,
20692,
6,
1312,
62,
565,
796,
705,
89,
565,
62,
38353,
24142,
62,
69,
9937,
20692,
62,
11011,
27691,
628,
220,
220,
220,
285,
62,
8968,
796,
327,
11262,
1976,
361,
62,
38353,
24142,
62,
5235,
7,
285,
62,
66,
429,
3784,
1136,
62,
39098,
7,
705,
89,
565,
62,
38353,
24142,
62,
5235,
6,
1267,
6739,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
7784,
7,
31456,
796,
705,
8968,
6,
719,
796,
285,
62,
8968,
6739,
198,
220,
220,
220,
42865,
7,
75,
62,
565,
82,
8,
796,
12682,
1976,
565,
62,
38353,
24142,
62,
565,
82,
10951,
7,
6739,
198,
220,
220,
220,
42815,
337,
36252,
285,
62,
8968,
3784,
4871,
62,
8612,
378,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
3672,
220,
796,
705,
42296,
4177,
2849,
62,
3955,
15490,
62,
35,
11380,
52,
6,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
269,
62,
4871,
796,
300,
62,
565,
82,
13,
628,
220,
220,
220,
366,
42243,
198,
220,
220,
220,
42865,
7,
75,
62,
76,
2788,
8,
796,
300,
62,
565,
82,
3784,
24396,
62,
1136,
62,
11011,
7,
705,
8818,
62,
11748,
62,
67,
11601,
6,
6739,
198,
220,
220,
220,
42865,
7,
75,
62,
17143,
8,
796,
300,
62,
565,
82,
3784,
24396,
62,
1136,
62,
439,
62,
37266,
7,
6739,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
796,
705,
19662,
6,
198,
220,
220,
220,
220,
220,
220,
220,
1033,
796,
26173,
8924,
410,
325,
404,
41158,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
3149,
3672,
796,
705,
42296,
4177,
2849,
62,
3955,
15490,
62,
35,
11380,
52,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
629,
261,
480,
796,
705,
6369,
42006,
2849,
62,
45849,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12067,
457,
2981,
796,
705,
16,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41746,
68,
565,
28004,
796,
362,
366,
5609,
356,
346,
7400,
13485,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
457,
2981,
796,
705,
16,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
796,
705,
15751,
62,
49,
5188,
55,
34,
6,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
719,
796,
300,
62,
17143,
58,
269,
3149,
3672,
796,
705,
42296,
4177,
2849,
62,
3955,
15490,
62,
35,
11380,
52,
6,
629,
261,
480,
796,
705,
6369,
42006,
2849,
62,
45849,
6,
2361,
6739,
198,
220,
220,
220,
42865,
7,
75,
62,
10677,
8,
796,
26173,
8924,
374,
2032,
82,
454,
66,
316,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
930,
13345,
2163,
705,
42296,
4177,
2849,
62,
3955,
15490,
62,
35,
11380,
52,
6,
91,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
930,
1069,
26527,
91,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
930,
8763,
9864,
1847,
62,
38948,
796,
10188,
9864,
1847,
62,
38948,
91,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
930,
40726,
23051,
62,
34,
7036,
796,
22657,
23051,
62,
34,
7036,
91,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
930,
16977,
62,
51,
1921,
42,
796,
35717,
62,
51,
1921,
42,
91,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
930,
9693,
9863,
62,
32541,
796,
6006,
9863,
62,
32541,
91,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
930,
37,
2200,
1961,
6158,
796,
44253,
1961,
6158,
91,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
930,
11748,
278,
91,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
930,
42296,
34,
20608,
796,
29397,
34,
20608,
91,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_dp_deco_kontrol1 DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
interfaces zif_dp_deco_kontrol.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_dp_deco_kontrol1 IMPLEMENTATION.
METHOD zif_dp_deco_kontrol~kontrol_et.
##todo. " Burası değişecek
basarili = abap_True.
sonuc_msg = 'Kontrol 1 basarili'.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
26059,
62,
12501,
78,
62,
74,
756,
3225,
16,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
20314,
1976,
361,
62,
26059,
62,
12501,
78,
62,
74,
756,
3225,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
26059,
62,
12501,
78,
62,
74,
756,
3225,
16,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1976,
361,
62,
26059,
62,
12501,
78,
62,
74,
756,
3225,
93,
74,
756,
3225,
62,
316,
13,
198,
220,
220,
220,
22492,
83,
24313,
13,
366,
5481,
292,
30102,
390,
33133,
72,
46481,
68,
344,
74,
198,
220,
220,
220,
1615,
283,
2403,
220,
796,
450,
499,
62,
17821,
13,
198,
220,
220,
220,
3367,
1229,
62,
19662,
796,
705,
42,
756,
3225,
352,
1615,
283,
2403,
4458,
198,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_aoc_check_64 DEFINITION
PUBLIC
INHERITING FROM zcl_aoc_super_root
CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor .
METHODS get_message_text
REDEFINITION .
METHODS if_ci_test~query_attributes
REDEFINITION .
METHODS put_attributes
REDEFINITION .
METHODS run
REDEFINITION .
METHODS get_attributes
REDEFINITION .
PROTECTED SECTION.
DATA mv_covered TYPE abap_bool .
DATA mi_result TYPE REF TO if_scv_result .
DATA mv_risk TYPE saunit_d_allowed_risk_level .
DATA mv_duration TYPE saunit_d_allowed_rt_duration .
METHODS node
IMPORTING
!ii_node TYPE REF TO if_scv_result_node .
METHODS walk
IMPORTING
!ii_node TYPE REF TO if_scv_result_node .
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_AOC_CHECK_64 IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
version = '001'.
position = '064'.
has_documentation = c_true.
has_attributes = abap_true.
attributes_ok = abap_true.
mv_errty = c_error.
mv_duration = if_aunit_attribute_enums=>c_duration-medium.
mv_risk = if_aunit_attribute_enums=>c_risk_level-harmless.
add_obj_type( 'CLAS' ).
ENDMETHOD. "CONSTRUCTOR
METHOD get_attributes.
EXPORT
mv_errty = mv_errty
mv_duration = mv_duration
mv_risk = mv_risk
TO DATA BUFFER p_attributes.
ENDMETHOD.
METHOD get_message_text.
CLEAR p_text.
CASE p_code.
WHEN '001'.
p_text = 'Unit test not covering class'. "#EC NOTEXT
WHEN OTHERS.
super->get_message_text( EXPORTING p_test = p_test
p_code = p_code
IMPORTING p_text = p_text ).
ENDCASE.
ENDMETHOD.
METHOD if_ci_test~query_attributes.
zzaoc_top.
zzaoc_fill_att mv_errty 'Error Type' ''. "#EC NOTEXT
zzaoc_fill_att mv_duration 'Duration' ''. "#EC NOTEXT
zzaoc_fill_att mv_risk 'Risk' ''. "#EC NOTEXT
zzaoc_popup.
ENDMETHOD.
METHOD node.
DATA: lv_pb_type TYPE cvd_pb_type,
lv_pb_name TYPE cvd_pb_name,
lv_prog_class TYPE cvd_prog_class,
lv_prog_type TYPE cvd_prog_type,
lv_prog_name TYPE cvd_prog_name,
lo_pb_info TYPE REF TO cl_scov_pb_info,
lt_tkey_selops TYPE cvt_test_key_selops,
ls_tkey_selops LIKE LINE OF lt_tkey_selops,
lo_ui_factory TYPE REF TO cl_scov_stmnt_cov_ui_factory.
CASE ii_node->subtype.
WHEN 'METH'.
DATA(lo_insp) = cl_scv_pblock_inspector=>create( ii_node ).
lv_pb_type = 'METH'.
lv_pb_name = lo_insp->get_method_name( ).
lv_prog_class = lo_insp->get_class_name( ).
lv_prog_type = lo_insp->get_program_subtype( ).
lv_prog_name = lo_insp->get_program_name( ).
WHEN OTHERS.
lv_pb_type = ii_node->subtype.
lv_pb_name = ii_node->name.
CLEAR lv_prog_class.
lv_prog_type = ii_node->get_parent( )->subtype.
lv_prog_name = ii_node->get_parent( )->name.
ENDCASE.
CREATE OBJECT lo_ui_factory.
lo_pb_info = lo_ui_factory->create_pb_info(
im_pb_type = lv_pb_type
im_pb_name = lv_pb_name
im_prog_class = lv_prog_class
im_prog_type = lv_prog_type
im_prog_name = lv_prog_name ).
ls_tkey_selops-option = 'EQ'.
ls_tkey_selops-sign = 'I'.
ls_tkey_selops-low = mi_result->get_measurement( )->get_testkey( ).
APPEND ls_tkey_selops TO lt_tkey_selops.
DATA(li_container) = lo_ui_factory->create_stmnt_dcon_factory( lt_tkey_selops
)->create_stmnt_data_container( lo_pb_info ).
DATA(lt_meta) = li_container->get_stmnt_cov_meta_data( ).
* 102 = covered
READ TABLE lt_meta WITH KEY color = '102' TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
mv_covered = abap_true.
ENDIF.
ENDMETHOD.
METHOD put_attributes.
IMPORT
mv_errty = mv_errty
mv_duration = mv_duration
mv_risk = mv_risk
FROM DATA BUFFER p_attributes. "#EC CI_USE_WANTED
ASSERT sy-subrc = 0.
ENDMETHOD.
METHOD run.
* abapOpenChecks
* https://github.com/larshp/abapOpenChecks
* MIT License
DATA: li_node TYPE REF TO if_scv_result_node,
lt_keys TYPE sabp_t_tadir_keys,
ls_key LIKE LINE OF lt_keys,
lv_clsname TYPE seoclsname,
lo_runner TYPE REF TO cl_aucv_test_runner_abstract,
li_coverage TYPE REF TO if_aucv_cvrg_rslt_provider,
li_aunit TYPE REF TO if_saunit_internal_result,
lo_aunit TYPE REF TO cl_saunit_internal_result,
lo_passport TYPE REF TO object.
IF object_type <> 'CLAS'.
RETURN.
ENDIF.
DATA(ls_info) = cl_aunit_prog_info=>get_program_info(
allow_commit = abap_true
obj_type = object_type
obj_name = object_name ).
IF ls_info-has_tests = abap_false.
RETURN.
ENDIF.
CALL METHOD ('\PROGRAM=SAPLSAUCV_GUI_RUNNER\CLASS=PASSPORT')=>get
RECEIVING
result = lo_passport.
lo_runner = cl_aucv_test_runner_coverage=>create( lo_passport ).
ls_key-obj_name = object_name.
ls_key-obj_type = object_type.
APPEND ls_key TO lt_keys.
lo_runner->run_for_program_keys(
EXPORTING
i_limit_on_duration_category = mv_duration
i_limit_on_risk_level = mv_risk
i_program_keys = lt_keys
IMPORTING
e_coverage_result = li_coverage
e_aunit_result = li_aunit ).
lo_aunit ?= li_aunit.
IF lo_aunit->f_task_data-info-has_skipped = abap_true.
* Some or all unit tests skipped, could not determine coverage
RETURN.
ENDIF.
TRY.
mi_result = li_coverage->build_coverage_result( ).
CATCH cx_scv_execution_error cx_scv_call_error.
RETURN.
ENDTRY.
mv_covered = abap_false.
LOOP AT mi_result->get_root_node( )->get_children( ) INTO li_node.
walk( li_node ).
ENDLOOP.
IF mv_covered = abap_false.
lv_clsname = object_name.
inform( p_sub_obj_type = c_type_include
p_sub_obj_name = cl_oo_classname_service=>get_ccau_name( lv_clsname )
p_line = 1
p_kind = mv_errty
p_test = myname
p_code = '001' ).
ENDIF.
ENDMETHOD.
METHOD walk.
IF ii_node->has_children( ) = abap_false.
node( ii_node ).
ENDIF.
LOOP AT ii_node->get_children( ) INTO DATA(li_node).
walk( li_node ).
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
64,
420,
62,
9122,
62,
2414,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
64,
420,
62,
16668,
62,
15763,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
764,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
20500,
62,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
611,
62,
979,
62,
9288,
93,
22766,
62,
1078,
7657,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1234,
62,
1078,
7657,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1057,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
1078,
7657,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
42865,
285,
85,
62,
32111,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42865,
21504,
62,
20274,
41876,
4526,
37,
5390,
611,
62,
1416,
85,
62,
20274,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
19121,
41876,
473,
20850,
62,
67,
62,
40845,
62,
19121,
62,
5715,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
32257,
41876,
473,
20850,
62,
67,
62,
40845,
62,
17034,
62,
32257,
764,
628,
220,
220,
220,
337,
36252,
50,
10139,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
17440,
41876,
4526,
37,
5390,
611,
62,
1416,
85,
62,
20274,
62,
17440,
764,
198,
220,
220,
220,
337,
36252,
50,
2513,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
17440,
41876,
4526,
37,
5390,
611,
62,
1416,
85,
62,
20274,
62,
17440,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
4503,
62,
50084,
62,
2414,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
2208,
3784,
41571,
273,
7,
6739,
628,
220,
220,
220,
2196,
220,
220,
220,
220,
220,
220,
220,
796,
705,
8298,
4458,
198,
220,
220,
220,
2292,
220,
220,
220,
220,
220,
220,
796,
705,
15,
2414,
4458,
628,
220,
220,
220,
468,
62,
22897,
341,
796,
269,
62,
7942,
13,
198,
220,
220,
220,
468,
62,
1078,
7657,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
12608,
62,
482,
220,
796,
450,
499,
62,
7942,
13,
628,
220,
220,
220,
285,
85,
62,
8056,
774,
220,
220,
220,
796,
269,
62,
18224,
13,
198,
220,
220,
220,
285,
85,
62,
32257,
796,
611,
62,
1942,
270,
62,
42348,
62,
268,
5700,
14804,
66,
62,
32257,
12,
24132,
13,
198,
220,
220,
220,
285,
85,
62,
19121,
220,
220,
220,
220,
796,
611,
62,
1942,
270,
62,
42348,
62,
268,
5700,
14804,
66,
62,
19121,
62,
5715,
12,
29155,
1203,
13,
628,
220,
220,
220,
751,
62,
26801,
62,
4906,
7,
705,
5097,
1921,
6,
6739,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10943,
46126,
1581,
628,
198,
220,
337,
36252,
651,
62,
1078,
7657,
13,
628,
220,
220,
220,
7788,
15490,
198,
220,
220,
220,
220,
220,
285,
85,
62,
8056,
774,
796,
285,
85,
62,
8056,
774,
198,
220,
220,
220,
220,
220,
285,
85,
62,
32257,
796,
285,
85,
62,
32257,
198,
220,
220,
220,
220,
220,
285,
85,
62,
19121,
796,
285,
85,
62,
19121,
198,
220,
220,
220,
220,
220,
5390,
42865,
20571,
45746,
279,
62,
1078,
7657,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
20500,
62,
5239,
13,
628,
220,
220,
220,
30301,
1503,
279,
62,
5239,
13,
628,
220,
220,
220,
42001,
279,
62,
8189,
13,
198,
220,
220,
220,
220,
220,
42099,
705,
8298,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
279,
62,
5239,
796,
705,
26453,
1332,
407,
9505,
1398,
4458,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
220,
220,
42099,
440,
4221,
4877,
13,
198,
220,
220,
220,
220,
220,
220,
220,
2208,
3784,
1136,
62,
20500,
62,
5239,
7,
7788,
15490,
2751,
279,
62,
9288,
796,
279,
62,
9288,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
8189,
796,
279,
62,
8189,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
279,
62,
5239,
796,
279,
62,
5239,
6739,
198,
220,
220,
220,
23578,
34,
11159,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
611,
62,
979,
62,
9288,
93,
22766,
62,
1078,
7657,
13,
628,
220,
220,
220,
1976,
4496,
420,
62,
4852,
13,
628,
220,
220,
220,
1976,
4496,
420,
62,
20797,
62,
1078,
285,
85,
62,
8056,
774,
705,
12331,
5994,
6,
705,
4458,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
1976,
4496,
420,
62,
20797,
62,
1078,
285,
85,
62,
32257,
705,
26054,
6,
705,
4458,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
1976,
4496,
420,
62,
20797,
62,
1078,
285,
85,
62,
19121,
705,
49,
1984,
6,
705,
4458,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">Provides metadata information</p>
INTERFACE zif_qdrt_metadata_provider
PUBLIC.
METHODS:
"! <p class="shorttext synchronized" lang="en">Retrieves metadata of entity</p>
get_metadata
RETURNING
VALUE(result) TYPE REF TO data,
"! <p class="shorttext synchronized" lang="en">Tests if entity exists</p>
entity_exists
RETURNING
VALUE(result) TYPE abap_bool.
ENDINTERFACE.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
15946,
1460,
20150,
1321,
3556,
79,
29,
198,
41358,
49836,
1976,
361,
62,
80,
7109,
83,
62,
38993,
62,
15234,
1304,
198,
220,
44731,
13,
628,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9781,
5034,
1158,
20150,
286,
9312,
3556,
79,
29,
198,
220,
220,
220,
651,
62,
38993,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
4526,
37,
5390,
1366,
11,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
51,
3558,
611,
9312,
7160,
3556,
79,
29,
198,
220,
220,
220,
9312,
62,
1069,
1023,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
450,
499,
62,
30388,
13,
198,
10619,
41358,
49836,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report Z_SDN_ITAB_COMPARISON_TEST
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT Z_SDN_ITAB_COMPARISON_TEST.
"! NOTE: Mark the checkboxes in order to simulate a scenario
PARAMETERS p_insert AS CHECKBOX.
"! NOTE: Mark the checkboxes in order to simulate a scenario
PARAMETERS p_update AS CHECKBOX.
"! NOTE: Mark the checkboxes in order to simulate a scenario
PARAMETERS p_delete AS CHECKBOX.
class lcl_interactive_test definition create public.
public section.
"! interactive_test( ) generates simplified PBO data and PAI data for
"! demonstrating the functionality of method COMPARE. PBO data and PAI
"! data as well as the results are displayed as ALV lists.
"! The interface of method contains three IMPORTING parameters
"! (flags) for simulating PAI data that contain new, modified or deleted
"! entries and any combination thereof.
METHODS
interactive_test
IMPORTING
insert_line TYPE abap_bool
update_line TYPE abap_bool
delete_line TYPE abap_bool.
protected section.
private section.
endclass.
class lcl_interactive_test implementation.
method interactive_test.
TYPES: ty_airlines TYPE STANDARD TABLE OF scarr.
DATA:
gridtitle TYPE lvc_title,
airlines_old TYPE ty_airlines,
airlines_new TYPE ty_airlines,
airlines_inserted TYPE ty_airlines,
airlines_updated TYPE ty_airlines,
airlines_deleted TYPE ty_airlines.
DATA(field_catalog) = VALUE lvc_t_fcat( ).
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SCARR'
CHANGING
ct_fieldcat = field_catalog
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
* Create 4 sample entries
airlines_old = airlines_new = VALUE #( ( carrid = 'AA' ) ( carrid = 'AB' ) ( carrid = 'LH' ) ( carrid = 'NZ' ) ).
* Delete first entry from old itab => first entry of new itab
* should be inserted (carrid = 'AA' -> CHIND = 'I').
IF ( insert_line = abap_true ).
DELETE airlines_old INDEX 1.
ENDIF.
* Modify second entry of new itab =>
* should be updated (carrid = 'AB' -> CHIND = 'U')
IF ( update_line = abap_true ).
airlines_new[ 2 ]-carrname = 'Air Berlin'.
ENDIF.
* Delete third entry from new itab =>
* should be deleted (carrid = 'LH' -> CHIND = 'D').
IF ( delete_line = abap_true ).
DELETE airlines_new INDEX 3.
ENDIF.
* NOTE: carrid = 'NZ' is identical in old and new itab => ignored
* Display "old" itab
gridtitle = 'Old Internal Table Entries (e.g. PBO)'(old).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'KNB1'
i_grid_title = gridtitle
it_fieldcat_lvc = field_catalog
TABLES
t_outtab = airlines_old
EXCEPTIONS
program_error = 1
OTHERS = 2.
* Display "new" itab
gridtitle = 'New Internal Table Entries (e.g. PAI)'(new).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'KNB1'
i_grid_title = gridtitle
it_fieldcat_lvc = field_catalog
TABLES
t_outtab = airlines_new
EXCEPTIONS
program_error = 1
OTHERS = 2.
* Compare old vs. new itab
zcl_table_comparison_factory=>create_table_comparison( )->compare(
EXPORTING
internal_table_new = airlines_new
internal_table_old = airlines_old
IMPORTING
inserted = airlines_inserted
updated = airlines_updated
deleted = airlines_deleted ).
* Display new entries
gridtitle = 'INSERT: new entries'(ins).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'KNB1'
i_grid_title = gridtitle
it_fieldcat_lvc = field_catalog
TABLES
t_outtab = airlines_inserted
EXCEPTIONS
program_error = 1
OTHERS = 2.
* Display changed entries
gridtitle = 'UPDATE: changed entries'(upd).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'KNB1'
i_grid_title = gridtitle
it_fieldcat_lvc = field_catalog
TABLES
t_outtab = airlines_updated
EXCEPTIONS
program_error = 1
OTHERS = 2.
* Display deleted entries
gridtitle = 'DELETE: deleted entries'(del).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'KNB1'
i_grid_title = gridtitle
it_fieldcat_lvc = field_catalog
TABLES
t_outtab = airlines_deleted
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDMETHOD.
endclass.
START-OF-SELECTION.
new lcl_interactive_test( )->interactive_test(
insert_line = p_insert
update_line = p_update
delete_line = p_delete ).
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
1168,
62,
10305,
45,
62,
2043,
6242,
62,
9858,
27082,
39960,
62,
51,
6465,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
2200,
15490,
1168,
62,
10305,
45,
62,
2043,
6242,
62,
9858,
27082,
39960,
62,
51,
6465,
13,
628,
198,
40484,
24550,
25,
2940,
262,
2198,
29305,
287,
1502,
284,
29308,
257,
8883,
198,
27082,
2390,
2767,
4877,
279,
62,
28463,
7054,
5870,
25171,
39758,
13,
198,
198,
40484,
24550,
25,
2940,
262,
2198,
29305,
287,
1502,
284,
29308,
257,
8883,
198,
27082,
2390,
2767,
4877,
279,
62,
19119,
7054,
5870,
25171,
39758,
13,
198,
198,
40484,
24550,
25,
2940,
262,
2198,
29305,
287,
1502,
284,
29308,
257,
8883,
198,
27082,
2390,
2767,
4877,
279,
62,
33678,
7054,
5870,
25171,
39758,
13,
628,
198,
4871,
300,
565,
62,
3849,
5275,
62,
9288,
6770,
2251,
1171,
13,
628,
220,
1171,
2665,
13,
198,
220,
220,
220,
366,
0,
14333,
62,
9288,
7,
1267,
18616,
27009,
350,
8202,
1366,
290,
8147,
40,
1366,
329,
198,
220,
220,
220,
366,
0,
21135,
262,
11244,
286,
2446,
24301,
12203,
13,
350,
8202,
1366,
290,
8147,
40,
198,
220,
220,
220,
366,
0,
1366,
355,
880,
355,
262,
2482,
389,
9066,
355,
8355,
53,
8341,
13,
198,
220,
220,
220,
366,
0,
383,
7071,
286,
2446,
4909,
1115,
30023,
9863,
2751,
10007,
198,
220,
220,
220,
366,
0,
357,
33152,
8,
329,
985,
8306,
8147,
40,
1366,
326,
3994,
649,
11,
9518,
393,
13140,
198,
220,
220,
220,
366,
0,
12784,
290,
597,
6087,
15370,
13,
198,
220,
220,
220,
337,
36252,
50,
198,
220,
220,
220,
220,
220,
14333,
62,
9288,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7550,
62,
1370,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4296,
62,
1370,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12233,
62,
1370,
41876,
450,
499,
62,
30388,
13,
198,
220,
6861,
2665,
13,
198,
220,
2839,
2665,
13,
198,
198,
437,
4871,
13,
198,
198,
4871,
300,
565,
62,
3849,
5275,
62,
9288,
7822,
13,
628,
220,
2446,
14333,
62,
9288,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
1259,
62,
958,
6615,
41876,
49053,
9795,
43679,
3963,
629,
3258,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
10706,
7839,
41876,
300,
28435,
62,
7839,
11,
198,
220,
220,
220,
220,
220,
26225,
62,
727,
220,
41876,
1259,
62,
958,
6615,
11,
198,
220,
220,
220,
220,
220,
26225,
62,
3605,
220,
41876,
1259,
62,
958,
6615,
11,
198,
220,
220,
220,
220,
220,
26225,
62,
28463,
276,
220,
41876,
1259,
62,
958,
6615,
11,
198,
220,
220,
220,
220,
220,
26225,
62,
43162,
220,
41876,
1259,
62,
958,
6615,
11,
198,
220,
220,
220,
220,
220,
26225,
62,
2934,
33342,
220,
41876,
1259,
62,
958,
6615,
13,
628,
220,
220,
220,
42865,
7,
3245,
62,
9246,
11794,
8,
796,
26173,
8924,
300,
28435,
62,
83,
62,
69,
9246,
7,
6739,
198,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
43,
15922,
62,
11674,
3698,
9697,
1404,
1847,
7730,
62,
29296,
8264,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
301,
5620,
62,
3672,
220,
220,
220,
220,
220,
220,
796,
705,
6173,
26465,
6,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
269,
83,
62,
3245,
9246,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
2214,
62,
9246,
11794,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
18326,
62,
39994,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
1430,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
513,
13,
198,
198,
9,
220,
220,
13610,
604,
6291,
12784,
198,
220,
220,
220,
26225,
62,
727,
796,
26225,
62,
3605,
796,
26173,
8924,
1303,
7,
357,
1097,
6058,
796,
705,
3838,
6,
1267,
357,
1097,
6058,
796,
705,
6242,
6,
1267,
220,
357,
1097,
6058,
796,
705,
43,
39,
6,
1267,
357,
1097,
6058,
796,
705,
37371,
6,
1267,
6739,
628,
198,
9,
220,
220,
23520,
717,
5726,
422,
1468,
340,
397,
5218,
717,
5726,
286,
649,
340,
397,
198,
9,
220,
220,
815,
307,
18846,
357,
66,
3258,
312,
796,
705,
3838,
6,
4613,
5870,
12115,
796,
705,
40,
27691,
198,
220,
220,
220,
16876,
357,
7550,
62,
1370,
796,
450,
499,
62,
7942,
6739,
198,
220,
220,
220,
220,
220,
5550,
2538,
9328,
26225,
62,
727,
24413,
6369,
352,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
198,
9,
220,
220,
3401,
1958,
1218,
5726,
286,
649,
340,
397,
5218,
198,
9,
220,
220,
815,
307,
6153,
357,
66,
3258,
312,
796,
705,
6242,
6,
4613,
5870,
12115,
796,
705,
52,
11537,
198,
220,
220,
220,
16876,
357,
4296,
62,
1370,
796,
450,
499,
62,
7942,
6739,
198,
220,
220,
220,
220,
220,
26225,
62,
3605,
58,
362,
2361,
12,
66,
3258,
3672,
796,
705,
16170,
11307,
4458,
198,
220,
220,
220,
23578,
5064,
13,
198,
198,
9,
220,
220,
23520,
2368,
5726,
422,
649,
340,
397,
5218,
198,
9,
220,
220,
815,
307,
13140,
357,
66,
3258,
312,
796,
705,
43,
39,
6,
4613,
5870,
12115,
796,
705,
35,
27691,
198,
220,
220,
220,
16876,
357,
12233,
62,
1370,
796,
450,
499,
62,
7942,
6739,
198,
220,
220,
220,
220,
220,
5550,
2538,
9328,
26225,
62,
3605,
24413,
6369,
513,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
9,
220,
220,
24550,
25,
1097,
6058,
796,
705,
37371,
6,
318,
10411,
287,
1468,
290,
649,
340,
397,
5218,
9514,
628,
198,
9,
220,
220,
16531,
366,
727,
1,
340,
397,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
REPORT zbook_demo_dyn_multi.
PARAMETERS p_show TYPE c LENGTH 1 NO-DISPLAY.
PARAMETERS p_type01 TYPE char80 NO-DISPLAY.
PARAMETERS p_type02 TYPE char80 NO-DISPLAY.
PARAMETERS p_type03 TYPE char80 NO-DISPLAY.
PARAMETERS p_type04 TYPE char80 NO-DISPLAY.
PARAMETERS p_type05 TYPE char80 NO-DISPLAY.
SELECTION-SCREEN BEGIN OF SCREEN 100." AS WINDOW.
PARAMETERS p_data01 LIKE (p_type01) MODIF ID 01." VALUE CHECK.
PARAMETERS p_data02 LIKE (p_type02) MODIF ID 02." VALUE CHECK.
PARAMETERS p_data03 LIKE (p_type03) MODIF ID 03." VALUE CHECK.
PARAMETERS p_data04 LIKE (p_type04) MODIF ID 04." VALUE CHECK.
PARAMETERS p_data05 LIKE (p_type05) MODIF ID 05." VALUE CHECK.
SELECTION-SCREEN END OF SCREEN 100.
*----------------------------------------------------------------------*
* CLASS lcl_dyn DEFINITION
*----------------------------------------------------------------------*
CLASS lcl_dyn DEFINITION.
PUBLIC SECTION.
* CLASS-DATA gv_field TYPE c LENGTH 80.
CLASS-METHODS pai IMPORTING ucomm TYPE clike.
CLASS-METHODS pbo IMPORTING i_show TYPE char01.
CLASS-METHODS exit.
CLASS-METHODS init.
PROTECTED SECTION.
CLASS-DATA max VALUE 5.
CLASS-METHODS check_values.
CLASS-METHODS export_values.
CLASS-METHODS loop_at_screen IMPORTING i_show TYPE char01.
CLASS-METHODS change_status.
ENDCLASS. "lcl_dyn DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_dyn IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_dyn IMPLEMENTATION.
METHOD pai.
check_values( ).
IF ucomm = 'CRET'.
export_values( ).
LEAVE PROGRAM.
ENDIF.
ENDMETHOD. "pai
METHOD exit.
FREE MEMORY ID zcl_book_dyn_multi=>gc_memory_id.
MESSAGE 'Eingabe abgebrochen...' TYPE 'S'.
ENDMETHOD. "exit
METHOD pbo.
loop_at_screen( i_show ).
* change_status( ).
ENDMETHOD. "pbo
METHOD loop_at_screen.
DATA lv_pname TYPE c LENGTH 80.
FIELD-SYMBOLS <type> TYPE any.
LOOP AT SCREEN.
IF screen-group1 IS NOT INITIAL.
CONCATENATE 'P_TYPE' screen-group1 INTO lv_pname.
ASSIGN (lv_pname) TO <type>.
IF sy-subrc = 0 AND <type> IS INITIAL.
screen-active = '0'.
MODIFY SCREEN.
ELSEIF i_show IS NOT INITIAL.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD. "loop_at_screen
METHOD init.
DATA lt_excl TYPE STANDARD TABLE OF syucomm.
APPEND 'SPOS' TO lt_excl.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = space
p_program = space
TABLES
p_exclude = lt_excl.
ENDMETHOD. "change_status
METHOD change_status.
DATA lt_excl TYPE STANDARD TABLE OF syucomm.
APPEND 'SPOS' TO lt_excl.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = space
p_program = space
TABLES
p_exclude = lt_excl.
ENDMETHOD. "change_status
* METHOD init.
* FREE MEMORY ID zcl_book_dyn_multi=>gc_memory_id.
* ENDMETHOD. "init
METHOD check_values.
DATA lv_tabname TYPE dfies-tabname.
DATA lv_fieldname TYPE dfies-lfieldname.
DATA lv_count TYPE n LENGTH 2.
DATA lv_pname TYPE c LENGTH 80.
FIELD-SYMBOLS <type> TYPE any.
FIELD-SYMBOLS <data> TYPE any.
DATA dtype TYPE REF TO data.
DATA ddata TYPE REF TO data.
DO max TIMES.
lv_count = sy-index.
CONCATENATE 'P_TYPE' lv_count INTO lv_pname.
ASSIGN (lv_pname) TO <type>.
SPLIT <type> AT '-' INTO lv_tabname lv_fieldname.
CONCATENATE 'P_DATA' lv_count INTO lv_pname.
ASSIGN (lv_pname) TO <data>.
CALL FUNCTION 'DDUT_INPUT_CHECK'
EXPORTING
tabname = lv_tabname
fieldname = lv_fieldname
value = <data>
IMPORTING
msgid = sy-msgid
msgty = sy-msgty
msgno = sy-msgno
msgv1 = sy-msgv1
msgv2 = sy-msgv2
msgv3 = sy-msgv3
msgv4 = sy-msgv4
EXCEPTIONS
OTHERS = 3.
IF sy-msgty = 'E'.
SET CURSOR FIELD lv_pname.
MESSAGE ID sy-msgid
TYPE sy-msgty
NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDDO.
ENDMETHOD. "check_values
METHOD export_values.
TYPES: BEGIN OF ty_param,
field TYPE c LENGTH 80,
value TYPE c LENGTH 80,
END OF ty_param.
DATA lt_params TYPE STANDARD TABLE OF ty_param.
FIELD-SYMBOLS <param> TYPE ty_param.
DATA lv_count TYPE n LENGTH 2.
DATA lv_pname TYPE c LENGTH 80.
DATA lv_type TYPE c LENGTH 80.
FIELD-SYMBOLS <type> TYPE any.
FIELD-SYMBOLS <data> TYPE any.
DO max TIMES.
lv_count = sy-index.
CONCATENATE 'P_TYPE' lv_count INTO lv_type.
ASSIGN (lv_type) TO <type>.
CHECK <type> IS NOT INITIAL.
CONCATENATE 'P_DATA' lv_count INTO lv_pname.
* ASSIGN (lv_pname) TO <data>.
APPEND INITIAL LINE TO lt_params ASSIGNING <param>.
<param>-field = lv_count.
<param>-value = lv_pname.
ENDDO.
EXPORT (lt_params) TO MEMORY ID zcl_book_dyn_multi=>gc_memory_id.
ENDMETHOD. "export_values
ENDCLASS. "lcl_dyn IMPLEMENTATION
INITIALIZATION.
lcl_dyn=>init( ).
START-OF-SELECTION.
CALL SELECTION-SCREEN 100 STARTING AT 2 2 ENDING AT 80 9.
AT SELECTION-SCREEN ON EXIT-COMMAND.
lcl_dyn=>exit( ).
AT SELECTION-SCREEN OUTPUT.
lcl_dyn=>pbo( p_show ).
AT SELECTION-SCREEN.
lcl_dyn=>pai( sy-ucomm ).
| [
2200,
15490,
1976,
2070,
62,
9536,
78,
62,
67,
2047,
62,
41684,
13,
198,
198,
27082,
2390,
2767,
4877,
279,
62,
12860,
41876,
269,
406,
49494,
352,
8005,
12,
26288,
31519,
13,
198,
198,
27082,
2390,
2767,
4877,
279,
62,
4906,
486,
41876,
1149,
1795,
220,
8005,
12,
26288,
31519,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
4906,
2999,
41876,
1149,
1795,
220,
8005,
12,
26288,
31519,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
4906,
3070,
41876,
1149,
1795,
220,
8005,
12,
26288,
31519,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
4906,
3023,
41876,
1149,
1795,
220,
8005,
12,
26288,
31519,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
4906,
2713,
41876,
1149,
1795,
220,
8005,
12,
26288,
31519,
13,
628,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
6374,
2200,
1677,
1802,
526,
7054,
370,
12115,
3913,
13,
198,
198,
27082,
2390,
2767,
4877,
279,
62,
7890,
486,
34178,
357,
79,
62,
4906,
486,
8,
19164,
5064,
4522,
5534,
526,
26173,
8924,
5870,
25171,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
7890,
2999,
34178,
357,
79,
62,
4906,
2999,
8,
19164,
5064,
4522,
7816,
526,
26173,
8924,
5870,
25171,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
7890,
3070,
34178,
357,
79,
62,
4906,
3070,
8,
19164,
5064,
4522,
7643,
526,
26173,
8924,
5870,
25171,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
7890,
3023,
34178,
357,
79,
62,
4906,
3023,
8,
19164,
5064,
4522,
8702,
526,
26173,
8924,
5870,
25171,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
7890,
2713,
34178,
357,
79,
62,
4906,
2713,
8,
19164,
5064,
4522,
8870,
526,
26173,
8924,
5870,
25171,
13,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
6374,
2200,
1677,
1802,
13,
628,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
67,
2047,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
31631,
300,
565,
62,
67,
2047,
5550,
20032,
17941,
13,
198,
220,
44731,
44513,
13,
198,
9,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
3245,
41876,
269,
406,
49494,
4019,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
279,
1872,
30023,
9863,
2751,
334,
9503,
220,
41876,
537,
522,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
279,
2127,
30023,
9863,
2751,
1312,
62,
12860,
41876,
1149,
486,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
8420,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
2315,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
42715,
12,
26947,
3509,
26173,
8924,
642,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
2198,
62,
27160,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
10784,
62,
27160,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
9052,
62,
265,
62,
9612,
30023,
9863,
2751,
1312,
62,
12860,
41876,
1149,
486,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
1487,
62,
13376,
13,
198,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
75,
565,
62,
67,
2047,
5550,
20032,
17941,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
67,
2047,
30023,
2538,
10979,
6234,
198,
9,
10097,
23031,
9,
198,
31631,
300,
565,
62,
67,
2047,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
279,
1872,
13,
198,
220,
220,
220,
2198,
62,
27160,
7,
6739,
198,
220,
220,
220,
16876,
334,
9503,
796,
705,
34,
26087,
4458,
198,
220,
220,
220,
220,
220,
10784,
62,
27160,
7,
6739,
198,
220,
220,
220,
220,
220,
12509,
32,
6089,
46805,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
49712,
628,
220,
337,
36252,
8420,
13,
198,
220,
220,
220,
17189,
35153,
15513,
4522,
1976,
565,
62,
2070,
62,
67,
2047,
62,
41684,
14804,
36484,
62,
31673,
62,
312,
13,
198,
220,
220,
220,
337,
1546,
4090,
8264,
705,
36,
278,
11231,
450,
469,
7957,
6607,
986,
6,
41876,
705,
50,
4458,
198,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
37023,
628,
220,
337,
36252,
279,
2127,
13,
198,
220,
220,
220,
9052,
62,
265,
62,
9612,
7,
1312,
62,
12860,
6739,
198,
9,
220,
220,
220,
1487,
62,
13376,
7,
6739,
198,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
79,
2127,
628,
220,
337,
36252,
9052,
62,
265,
62,
9612,
13,
198,
220,
220,
220,
42865,
300,
85,
62,
79,
3672,
220,
220,
220,
220,
41876,
269,
406,
49494,
4019,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
1279,
4906,
29,
220,
41876,
597,
13,
628,
220,
220,
220,
17579,
3185,
5161,
6374,
2200,
1677,
13,
198,
220,
220,
220,
220,
220,
16876,
3159,
12,
8094,
16,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
39962,
1404,
1677,
6158,
705,
47,
62,
25216,
6,
3159,
12,
8094,
16,
39319,
300,
85,
62,
79,
3672,
13,
198,
220,
220,
220,
220,
220,
220,
220,
24994,
16284,
357,
6780,
62,
79,
3672,
8,
5390,
1279,
4906,
28401,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
5357,
1279,
4906,
29,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3159,
12,
5275,
796,
705,
15,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19164,
5064,
56,
6374,
2200,
1677,
13,
198,
220,
220,
220,
220,
220,
220,
220,
17852,
5188,
5064,
1312,
62,
12860,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3159,
12,
15414,
796,
705,
15,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19164,
5064,
56,
6374,
2200,
1677,
13,
198,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZSAPLINK_PDF_FORMS definition
public
inheriting from ZSAPLINK
final
create public .
public section.
methods CHECKEXISTS
redefinition .
methods CREATEIXMLDOCFROMOBJECT
redefinition .
methods CREATEOBJECTFROMIXMLDOC
redefinition .
protected section.
methods DELETEOBJECT
redefinition .
methods GETOBJECTTYPE
redefinition .
private section.
endclass. "ZSAPLINK_PDF_FORMS definition
*----------------------------------------------------------------------*
* class ZSAPLINK_PDF_FORMS implementation.
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class ZSAPLINK_PDF_FORMS implementation.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| SAPlink is free software; you can redistribute it and/or modify |
*| it under the terms of the GNU General Public License as published |
*| by the Free Software Foundation; either version 2 of the License, |
*| or (at your option) any later version. |
*| |
*| SAPlink is distributed in the hope that it will be useful, |
*| but WITHOUT ANY WARRANTY; without even the implied warranty of |
*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
*| GNU General Public License for more details. |
*| |
*| You should have received a copy of the GNU General Public License |
*| along with SAPlink; if not, write to the |
*| Free Software Foundation, Inc., |
*| 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
*\---------------------------------------------------------------------/
METHOD checkexists .
SELECT SINGLE name FROM fplayout INTO objname WHERE name = objname.
IF sy-subrc = 0.
exists = 'X'.
ENDIF.
ENDMETHOD.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| SAPlink is free software; you can redistribute it and/or modify |
*| it under the terms of the GNU General Public License as published |
*| by the Free Software Foundation; either version 2 of the License, |
*| or (at your option) any later version. |
*| |
*| SAPlink is distributed in the hope that it will be useful, |
*| but WITHOUT ANY WARRANTY; without even the implied warranty of |
*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
*| GNU General Public License for more details. |
*| |
*| You should have received a copy of the GNU General Public License |
*| along with SAPlink; if not, write to the |
*| Free Software Foundation, Inc., |
*| 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
*\---------------------------------------------------------------------/
METHOD createixmldocfromobject .
DATA rootnode TYPE REF TO if_ixml_element.
DATA sourcenode TYPE REF TO if_ixml_element.
DATA rc TYPE sysubrc.
DATA sourcestring TYPE string.
DATA _objtype TYPE string.
TYPES: t_raw(1024) TYPE x.
DATA: l_wb_form TYPE REF TO if_fp_wb_form,
l_form TYPE REF TO if_fp_form,
l_formname TYPE fpname,
l_name TYPE string,
l_file_table TYPE filetable,
l_filename TYPE string,
l_pathname TYPE string,
l_fullpath TYPE string,
l_rc TYPE i,
l_user_action TYPE i,
l_xstring TYPE xstring,
l_string TYPE string,
l_binary_table TYPE TABLE OF t_raw,
l_binary_length TYPE i,
l_node TYPE REF TO if_fp_node,
l_form_wb TYPE REF TO cl_fp_wb_form,
l_form_wb_if TYPE REF TO if_fp_wb_form.
l_formname = objname.
TRY.
CALL METHOD cl_fp_wb_form=>load
EXPORTING
i_name = l_formname
RECEIVING
r_wb_form = l_form_wb_if.
CATCH cx_fp_api_usage .
CLEAR ixmldocument.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING textid = zcx_saplink=>not_found.
CATCH cx_fp_api_repository .
CLEAR ixmldocument.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING textid = zcx_saplink=>not_found.
CATCH cx_fp_api_internal .
CLEAR ixmldocument.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING textid = zcx_saplink=>not_found.
ENDTRY.
l_wb_form ?= l_form_wb_if.
l_form ?= l_wb_form->get_object( ).
l_name = l_wb_form->get_name( ).
TRY.
l_xstring = cl_fp_helper=>convert_form_to_xstring( l_form ).
CATCH cx_fp_api_internal.
CLEAR ixmldocument.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING textid = zcx_saplink=>not_found.
ENDTRY.
_objtype = getobjecttype( ).
rootnode = xmldoc->create_element( _objtype ).
DATA: wa_fplayout TYPE fplayout.
SELECT SINGLE * FROM fplayout INTO wa_fplayout WHERE name = objname.
setattributesfromstructure( node = rootnode structure = wa_fplayout
).
sourcenode = xmldoc->create_element( 'PDFform' ).
l_string = l_xstring.
rc = sourcenode->if_ixml_node~set_value( l_string ).
rc = rootnode->append_child( sourcenode ).
rc = xmldoc->append_child( rootnode ).
ixmldocument = xmldoc.
ENDMETHOD.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| SAPlink is free software; you can redistribute it and/or modify |
*| it under the terms of the GNU General Public License as published |
*| by the Free Software Foundation; either version 2 of the License, |
*| or (at your option) any later version. |
*| |
*| SAPlink is distributed in the hope that it will be useful, |
*| but WITHOUT ANY WARRANTY; without even the implied warranty of |
*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
*| GNU General Public License for more details. |
*| |
*| You should have received a copy of the GNU General Public License |
*| along with SAPlink; if not, write to the |
*| Free Software Foundation, Inc., |
*| 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
*\---------------------------------------------------------------------/
METHOD createobjectfromixmldoc .
DATA rootnode TYPE REF TO if_ixml_element.
DATA progattribs TYPE trdir.
DATA sourcenode TYPE REF TO if_ixml_element.
DATA l_xml_node TYPE REF TO if_ixml_element.
DATA source TYPE string.
DATA sourcetable TYPE table_of_strings.
DATA _objtype TYPE string.
DATA checkexists TYPE flag.
DATA: wa_fplayout TYPE fplayout,
formname TYPE tdsfname,
modif_language TYPE sylangu.
TYPES: t_raw(1024) TYPE x.
DATA: l_exception_workbench TYPE REF TO cx_fp_ui_workbench,
l_exception_usage TYPE REF TO cx_fp_api_usage,
l_exception_repository TYPE REF TO cx_fp_api_repository,
l_exception_internal TYPE REF TO cx_fp_api_internal,
l_message_text TYPE string,
l_form TYPE REF TO if_fp_form,
l_file_table TYPE filetable,
l_filename TYPE string,
l_rc TYPE i,
l_user_action TYPE i,
l_xstring TYPE xstring,
l_binary_table TYPE TABLE OF t_raw,
l_binary_length TYPE i,
l_node TYPE REF TO if_fp_node,
m_wb_object TYPE REF TO if_fp_wb_form.
_objtype = getobjecttype( ).
xmldoc = ixmldocument.
rootnode = xmldoc->find_from_name( _objtype ).
CALL METHOD getstructurefromattributes
EXPORTING
node = rootnode
CHANGING
structure = wa_fplayout.
objname = wa_fplayout-name.
checkexists = checkexists( ).
IF checkexists IS NOT INITIAL.
IF overwrite IS INITIAL.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING textid = zcx_saplink=>existing.
ELSE.
* delete object for new install
deleteobject( ).
ENDIF.
ENDIF.
sourcenode = rootnode->find_from_name( 'PDFform' ).
source = sourcenode->get_value( ).
l_xstring = source.
formname = objname.
TRY.
TRY.
cl_fp_wb_helper=>form_exists( wa_fplayout-name ).
CATCH cx_fp_api_usage INTO l_exception_usage.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING msg = 'Error creating PDF form'.
CATCH cx_fp_api_repository INTO l_exception_repository.
CASE l_exception_repository->textid.
WHEN cx_fp_api_repository=>object_already_exists.
l_message_text = l_exception_repository->get_text( ).
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING msg = 'Object already exists'.
ENDCASE.
ENDTRY.
TRY.
l_form = cl_fp_helper=>convert_xstring_to_form( i_xstring = l_xstring i_language = sy-langu ).
CALL METHOD cl_fp_helper=>set_new_layout_id
CHANGING
c_form = l_form.
CATCH cx_fp_api_internal.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING msg = 'Convert XML error'.
EXIT.
ENDTRY.
TRY.
m_wb_object = cl_fp_wb_form=>create( i_name = wa_fplayout-name i_form = l_form ).
CATCH cx_fp_api_usage INTO l_exception_usage.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING msg = 'Error creating PDF form'.
CATCH cx_fp_api_repository INTO l_exception_repository.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING msg = 'Error creating PDF form'.
ENDTRY.
TRY.
m_wb_object->save( ).
CATCH cx_fp_api_usage INTO l_exception_usage.
TRY.
m_wb_object->free( ).
CATCH cx_fp_api.
ENDTRY.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING msg = 'Error saving PDF form'.
CATCH cx_fp_api_repository INTO l_exception_repository.
TRY.
m_wb_object->free( ).
CATCH cx_fp_api.
ENDTRY.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING msg = 'Error saving PDF form'.
CATCH cx_fp_api_internal INTO l_exception_internal.
TRY.
m_wb_object->free( ).
CATCH cx_fp_api.
ENDTRY.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING msg = 'Error saving PDF form'.
ENDTRY.
TRY.
m_wb_object->free( ).
CATCH cx_fp_api.
ENDTRY.
CATCH cx_fp_ui_workbench INTO l_exception_workbench.
IF l_exception_workbench->textid <> cx_fp_ui_workbench=>error_occured.
l_message_text = l_exception_workbench->get_text( ).
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING msg = l_message_text.
ENDIF.
ENDTRY.
ENDMETHOD.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| SAPlink is free software; you can redistribute it and/or modify |
*| it under the terms of the GNU General Public License as published |
*| by the Free Software Foundation; either version 2 of the License, |
*| or (at your option) any later version. |
*| |
*| SAPlink is distributed in the hope that it will be useful, |
*| but WITHOUT ANY WARRANTY; without even the implied warranty of |
*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
*| GNU General Public License for more details. |
*| |
*| You should have received a copy of the GNU General Public License |
*| along with SAPlink; if not, write to the |
*| Free Software Foundation, Inc., |
*| 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
*\---------------------------------------------------------------------/
METHOD deleteobject .
DATA: l_wb_form TYPE REF TO cl_fp_wb_form,
l_formname TYPE fpname.
l_formname = objname.
TRY.
CALL METHOD cl_fp_wb_form=>delete
EXPORTING
i_name = l_formname.
CATCH cx_fp_api_usage .
CATCH cx_fp_api_repository .
ENDTRY.
ENDMETHOD. "createobjectfromixmldoc
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| SAPlink is free software; you can redistribute it and/or modify |
*| it under the terms of the GNU General Public License as published |
*| by the Free Software Foundation; either version 2 of the License, |
*| or (at your option) any later version. |
*| |
*| SAPlink is distributed in the hope that it will be useful, |
*| but WITHOUT ANY WARRANTY; without even the implied warranty of |
*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
*| GNU General Public License for more details. |
*| |
*| You should have received a copy of the GNU General Public License |
*| along with SAPlink; if not, write to the |
*| Free Software Foundation, Inc., |
*| 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
*\---------------------------------------------------------------------/
METHOD getobjecttype .
objecttype = 'SFPF'. "Form Object: Form
ENDMETHOD.
endclass. "ZSAPLINK_PDF_FORMS implementation | [
4871,
1168,
50,
2969,
43,
17248,
62,
20456,
62,
13775,
5653,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
1168,
50,
2969,
43,
17248,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
5050,
5870,
25171,
6369,
1797,
4694,
198,
220,
220,
220,
34087,
17750,
764,
198,
220,
5050,
29244,
6158,
10426,
5805,
38715,
10913,
2662,
9864,
23680,
198,
220,
220,
220,
34087,
17750,
764,
198,
220,
5050,
29244,
1404,
4720,
33,
23680,
10913,
2662,
10426,
5805,
38715,
198,
220,
220,
220,
34087,
17750,
764,
198,
24326,
2665,
13,
628,
220,
5050,
5550,
28882,
4720,
33,
23680,
198,
220,
220,
220,
34087,
17750,
764,
198,
220,
5050,
17151,
9864,
23680,
25216,
198,
220,
220,
220,
34087,
17750,
764,
198,
19734,
2665,
13,
198,
437,
4871,
13,
366,
57,
50,
2969,
43,
17248,
62,
20456,
62,
13775,
5653,
6770,
628,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
1398,
1168,
50,
2969,
43,
17248,
62,
20456,
62,
13775,
5653,
7822,
13,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
4871,
1168,
50,
2969,
43,
17248,
62,
20456,
62,
13775,
5653,
7822,
13,
628,
198,
16208,
10097,
30934,
59,
198,
9,
91,
220,
220,
770,
2393,
318,
636,
286,
48323,
8726,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
48323,
8726,
318,
1479,
3788,
26,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
220,
220,
930,
198,
9,
91,
220,
220,
340,
739,
262,
2846,
286,
262,
22961,
3611,
5094,
13789,
355,
3199,
930,
198,
9,
91,
220,
220,
416,
262,
3232,
10442,
5693,
26,
2035,
2196,
362,
286,
262,
13789,
11,
930,
198,
9,
91,
220,
220,
393,
357,
265,
534,
3038,
8,
597,
1568,
2196,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
48323,
8726,
318,
9387,
287,
262,
2911,
326,
340,
481,
307,
4465,
11,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
475,
42881,
15529,
34764,
56,
26,
1231,
772,
262,
17142,
18215,
286,
220,
220,
220,
930,
198,
9,
91,
220,
220,
34482,
3398,
1565,
5603,
25382,
393,
376,
46144,
7473,
317,
16652,
2149,
37232,
33079,
48933,
13,
220,
4091,
262,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
22961,
3611,
5094,
13789,
329,
517,
3307,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
921,
815,
423,
2722,
257,
4866,
286,
262,
22961,
3611,
5094,
13789,
930,
198,
9,
91,
220,
220,
1863,
351,
48323,
8726,
26,
611,
407,
11,
3551,
284,
262,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
3232,
10442,
5693,
11,
3457,
1539,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
6885,
14021,
520,
11,
19383,
22343,
11,
6182,
11,
8779,
220,
657,
2481,
940,
12,
1485,
486,
220,
4916,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
59,
10097,
30934,
14,
198,
49273,
1125,
66,
365,
87,
1023,
764,
628,
220,
33493,
311,
2751,
2538,
1438,
16034,
277,
1759,
448,
39319,
26181,
3672,
33411,
1438,
796,
26181,
3672,
13,
198,
220,
16876,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
7160,
796,
705,
55,
4458,
198,
220,
23578,
5064,
13,
198,
198,
10619,
49273,
13,
628,
198,
16208,
10097,
30934,
59,
198,
9,
91,
220,
220,
770,
2393,
318,
636,
286,
48323,
8726,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
9,
91,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS y_code_pal_buffer DEFINITION SHARED MEMORY ENABLED PUBLIC CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES y_if_code_pal_buffer.
ALIASES get FOR y_if_code_pal_buffer~get.
ALIASES modify FOR y_if_code_pal_buffer~modify.
ALIASES entry FOR y_if_code_pal_buffer~entry.
PROTECTED SECTION.
CLASS-METHODS update IMPORTING entry TYPE entry RAISING cx_sy_itab_line_not_found.
CLASS-METHODS insert IMPORTING entry TYPE entry.
PRIVATE SECTION.
CLASS-DATA internal TYPE y_if_code_pal_buffer~entries.
ENDCLASS.
CLASS y_code_pal_buffer IMPLEMENTATION.
METHOD update.
DATA(index) = line_index( internal[ object_type = entry-object_type
object_name = entry-object_name ] ).
internal[ index ] = entry.
ENDMETHOD.
METHOD insert.
internal = VALUE #( BASE internal
( CORRESPONDING #( entry ) ) ).
ASSERT sy-subrc = 0.
ENDMETHOD.
METHOD modify.
TRY.
update( entry ).
CATCH cx_sy_itab_line_not_found.
insert( entry ).
ENDTRY.
ENDMETHOD.
METHOD get.
result = internal[ object_type = object_type
object_name = object_name ].
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
62,
8189,
62,
18596,
62,
22252,
5550,
20032,
17941,
39225,
1961,
35153,
15513,
412,
4535,
9148,
1961,
44731,
29244,
6158,
44731,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
331,
62,
361,
62,
8189,
62,
18596,
62,
22252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
651,
7473,
331,
62,
361,
62,
8189,
62,
18596,
62,
22252,
93,
1136,
13,
198,
220,
220,
220,
8355,
43429,
1546,
13096,
7473,
331,
62,
361,
62,
8189,
62,
18596,
62,
22252,
93,
4666,
1958,
13,
198,
220,
220,
220,
8355,
43429,
1546,
5726,
7473,
331,
62,
361,
62,
8189,
62,
18596,
62,
22252,
93,
13000,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
4296,
30023,
9863,
2751,
5726,
41876,
5726,
17926,
1797,
2751,
43213,
62,
1837,
62,
270,
397,
62,
1370,
62,
1662,
62,
9275,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
7550,
30023,
9863,
2751,
5726,
41876,
5726,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42715,
12,
26947,
5387,
41876,
331,
62,
361,
62,
8189,
62,
18596,
62,
22252,
93,
298,
1678,
13,
198,
10619,
31631,
13,
628,
198,
31631,
331,
62,
8189,
62,
18596,
62,
22252,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
4296,
13,
198,
220,
220,
220,
42865,
7,
9630,
8,
796,
1627,
62,
9630,
7,
5387,
58,
2134,
62,
4906,
796,
5726,
12,
15252,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
5726,
12,
15252,
62,
3672,
2361,
6739,
198,
220,
220,
220,
5387,
58,
6376,
2361,
796,
5726,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
7550,
13,
198,
220,
220,
220,
5387,
796,
26173,
8924,
1303,
7,
49688,
5387,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
23929,
19535,
47,
18672,
2751,
1303,
7,
5726,
1267,
1267,
6739,
198,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
13096,
13,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
4296,
7,
5726,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
1837,
62,
270,
397,
62,
1370,
62,
1662,
62,
9275,
13,
198,
220,
220,
220,
220,
220,
220,
220,
7550,
7,
5726,
6739,
198,
220,
220,
220,
23578,
40405,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
651,
13,
198,
220,
220,
220,
1255,
796,
5387,
58,
2134,
62,
4906,
796,
2134,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
2134,
62,
3672,
20740,
198,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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YPE zif_abapgit_persistence=>ty_repo-key
is_file TYPE zif_abapgit_definitions=>ty_file OPTIONAL
is_object TYPE zif_abapgit_definitions=>ty_item OPTIONAL
iv_patch_mode TYPE abap_bool OPTIONAL
RAISING
zcx_abapgit_exception,
zif_abapgit_gui_event_handler~on_event REDEFINITION.
CLASS-METHODS:
get_patch_data
IMPORTING
iv_patch TYPE string
EXPORTING
ev_filename TYPE string
ev_line_index TYPE string
RAISING
zcx_abapgit_exception.
PROTECTED SECTION.
METHODS:
render_content REDEFINITION,
add_menu_end REDEFINITION,
add_menu_begin REDEFINITION,
render_table_head_non_unified REDEFINITION,
render_beacon_begin_of_row REDEFINITION,
render_diff_head_after_state REDEFINITION,
insert_nav REDEFINITION,
render_line_split_row REDEFINITION.
PRIVATE SECTION.
TYPES:
ty_patch_action TYPE string .
CONSTANTS:
BEGIN OF c_actions,
stage TYPE string VALUE 'patch_stage',
refresh TYPE string VALUE 'patch_refresh',
refresh_local TYPE string VALUE 'patch_refresh_local',
refresh_local_object TYPE string VALUE 'patch_refresh_local_object',
END OF c_actions,
BEGIN OF c_patch_action,
add TYPE ty_patch_action VALUE 'add',
remove TYPE ty_patch_action VALUE 'remove',
END OF c_patch_action .
DATA:
mo_stage TYPE REF TO zcl_abapgit_stage,
mv_section_count TYPE i,
mv_pushed TYPE abap_bool,
mo_repo_online TYPE REF TO zcl_abapgit_repo_online.
METHODS:
render_patch
IMPORTING
io_html TYPE REF TO zcl_abapgit_html
iv_filename TYPE string
is_diff_line TYPE zif_abapgit_definitions=>ty_diff
iv_fstate TYPE char1
iv_index TYPE sy-tabix
RAISING
zcx_abapgit_exception,
render_patch_head
IMPORTING
io_html TYPE REF TO zcl_abapgit_html
is_diff TYPE ty_file_diff,
start_staging
IMPORTING
it_postdata TYPE cnht_post_data_tab
RAISING
zcx_abapgit_exception,
apply_patch_from_form_fields
IMPORTING
it_postdata TYPE cnht_post_data_tab
RAISING
zcx_abapgit_exception,
restore_patch_flags
IMPORTING
it_diff_files_old TYPE tt_file_diff
RAISING
zcx_abapgit_exception,
add_to_stage
RAISING
zcx_abapgit_exception,
refresh
IMPORTING
iv_action TYPE clike
RAISING
zcx_abapgit_exception,
refresh_full
RAISING
zcx_abapgit_exception,
refresh_local
RAISING
zcx_abapgit_exception,
refresh_local_object
IMPORTING
iv_action TYPE clike
RAISING
zcx_abapgit_exception,
apply_patch_all
IMPORTING
iv_patch TYPE string
iv_patch_flag TYPE abap_bool
RAISING
zcx_abapgit_exception,
are_all_lines_patched
IMPORTING
it_diff TYPE zif_abapgit_definitions=>ty_diffs_tt
RETURNING
VALUE(rv_are_all_lines_patched) TYPE abap_bool,
apply_patch_for
IMPORTING
iv_filename TYPE string
iv_line_index TYPE string
iv_patch_flag TYPE abap_bool
RAISING
zcx_abapgit_exception,
get_diff_object
IMPORTING
iv_filename TYPE string
RETURNING
VALUE(ro_diff) TYPE REF TO zcl_abapgit_diff
RAISING
zcx_abapgit_exception,
get_diff_line
IMPORTING
io_diff TYPE REF TO zcl_abapgit_diff
iv_line_index TYPE string
RETURNING
VALUE(rs_diff) TYPE zif_abapgit_definitions=>ty_diff
RAISING
zcx_abapgit_exception,
is_every_changed_line_patched
RETURNING
VALUE(rv_everything_patched) TYPE abap_bool.
CLASS-METHODS:
is_patch_line_possible
IMPORTING
is_diff_line TYPE zif_abapgit_definitions=>ty_diff
iv_fstate TYPE char1
RETURNING
VALUE(rv_is_patch_line_possible) TYPE abap_bool.
METHODS render_scripts
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS ZCL_ABAPGIT_GUI_PAGE_PATCH IMPLEMENTATION.
METHOD add_menu_begin.
io_menu->add(
iv_txt = |Refresh local|
iv_typ = zif_abapgit_html=>c_action_type-dummy
iv_act = c_actions-refresh_local
iv_id = c_actions-refresh_local
iv_title = |Refresh all local objects, without refreshing the remote| ).
io_menu->add(
iv_txt = |Refresh|
iv_typ = zif_abapgit_html=>c_action_type-dummy
iv_act = c_actions-refresh
iv_id = c_actions-refresh
iv_title = |Complete refresh of all objects, local and remote| ).
ENDMETHOD.
METHOD add_menu_end.
io_menu->add( iv_txt = 'Stage'
iv_act = c_actions-stage
iv_id = 'stage'
iv_typ = zif_abapgit_html=>c_action_type-dummy
) ##NO_TEXT.
ENDMETHOD.
METHOD add_to_stage.
DATA: lt_diff TYPE zif_abapgit_definitions=>ty_diffs_tt,
lv_something_patched TYPE abap_bool,
ls_status TYPE zif_abapgit_definitions=>ty_result,
lv_patch TYPE xstring,
lo_git_add_patch TYPE REF TO zcl_abapgit_git_add_patch.
FIELD-SYMBOLS: <ls_diff_file> TYPE ty_file_diff.
LOOP AT mt_diff_files ASSIGNING <ls_diff_file>.
IF <ls_diff_file>-o_diff IS NOT BOUND.
" When we deal with binary files we don't have a diff object.
" There's nothing to do because they cannot be patched
CONTINUE.
ENDIF.
lt_diff = <ls_diff_file>-o_diff->get( ).
READ TABLE lt_diff TRANSPORTING NO FIELDS
WITH KEY patch_flag = abap_true.
CHECK sy-subrc = 0.
lv_something_patched = abap_true.
CREATE OBJECT lo_git_add_patch
EXPORTING
it_diff = <ls_diff_file>-o_diff->get( ).
lv_patch = lo_git_add_patch->get_patch_binary( ).
IF <ls_diff_file>-lstate = 'D' AND are_all_lines_patched( lt_diff ) = abap_true.
ls_status-lstate = zif_abapgit_definitions=>c_state-deleted.
mo_stage->rm(
iv_path = <ls_diff_file>-path
is_status = ls_status
iv_filename = <ls_diff_file>-filename ).
ELSE.
IF <ls_diff_file>-lstate = 'A' AND are_all_lines_patched( lt_diff ) = abap_true.
ls_status-lstate = zif_abapgit_definitions=>c_state-added.
ELSE.
ls_status-lstate = zif_abapgit_definitions=>c_state-modified.
ENDIF.
mo_stage->add(
iv_path = <ls_diff_file>-path
iv_filename = <ls_diff_file>-filename
is_status = ls_status
iv_data = lv_patch ).
ENDIF.
ENDLOOP.
IF lv_something_patched = abap_false.
zcx_abapgit_exception=>raise( |Nothing added| ).
ENDIF.
ENDMETHOD.
METHOD apply_patch_all.
DATA: lv_filename TYPE string,
lt_patch TYPE string_table,
lv_line_index TYPE string.
FIELD-SYMBOLS: <lv_patch> TYPE LINE OF string_table.
SPLIT iv_patch AT ',' INTO TABLE lt_patch.
LOOP AT lt_patch ASSIGNING <lv_patch>.
get_patch_data(
EXPORTING
iv_patch = <lv_patch>
IMPORTING
ev_filename = lv_filename
ev_line_index = lv_line_index ).
apply_patch_for( iv_filename = lv_filename
iv_line_index = lv_line_index
iv_patch_flag = iv_patch_flag ).
ENDLOOP.
ENDMETHOD.
METHOD apply_patch_for.
DATA: lo_diff TYPE REF TO zcl_abapgit_diff,
ls_diff_line TYPE zif_abapgit_definitions=>ty_diff,
lv_line TYPE i.
lo_diff = get_diff_object( iv_filename ).
ls_diff_line = get_diff_line( io_diff = lo_diff
iv_line_index = iv_line_index ).
CASE ls_diff_line-result.
WHEN zif_abapgit_definitions=>c_diff-update
OR zif_abapgit_definitions=>c_diff-insert.
lv_line = ls_diff_line-new_num.
lo_diff->set_patch_new( iv_line_new = lv_line
iv_patch_flag = iv_patch_flag ).
WHEN zif_abapgit_definitions=>c_diff-delete.
lv_line = ls_diff_line-old_num.
lo_diff->set_patch_old( iv_line_old = lv_line
iv_patch_flag = iv_patch_flag ).
ENDCASE.
ENDMETHOD.
METHOD apply_patch_from_form_fields.
DATA: lv_string TYPE string,
lt_fields TYPE tihttpnvp,
lv_add TYPE string,
lv_remove TYPE string.
lv_string = zcl_abapgit_utils=>translate_postdata( it_postdata ).
lt_fields = zcl_abapgit_html_action_utils=>parse_fields( lv_string ).
zcl_abapgit_html_action_utils=>get_field( EXPORTING iv_name = c_patch_action-add
it_field = lt_fields
CHANGING cg_field = lv_add ).
zcl_abapgit_html_action_utils=>get_field( EXPORTING iv_name = c_patch_action-remove
it_field = lt_fields
CHANGING cg_field = lv_remove ).
apply_patch_all( iv_patch = lv_add
iv_patch_flag = abap_true ).
apply_patch_all( iv_patch = lv_remove
iv_patch_flag = abap_false ).
ENDMETHOD.
METHOD are_all_lines_patched.
DATA: lv_patch_count TYPE i.
FIELD-SYMBOLS: <ls_diff> TYPE zif_abapgit_definitions=>ty_diff.
LOOP AT it_diff ASSIGNING <ls_diff>
WHERE patch_flag = abap_true.
lv_patch_count = lv_patch_count + 1.
ENDLOOP.
rv_are_all_lines_patched = boolc( lv_patch_count = lines( it_diff ) ).
ENDMETHOD.
METHOD constructor.
super->constructor(
iv_key = iv_key
is_file = is_file
is_object = is_object ).
IF mo_repo->is_offline( ) = abap_true.
zcx_abapgit_exception=>raise( |Can't patch offline repos| ).
ENDIF.
mo_repo_online ?= mo_repo.
" While patching we always want to be in split mode
CLEAR: mv_unified.
CREATE OBJECT mo_stage.
ms_control-page_menu = build_menu( ).
ENDMETHOD.
METHOD get_diff_line.
DATA: lt_diff TYPE zif_abapgit_definitions=>ty_diffs_tt,
lv_line_index TYPE sy-tabix.
lv_line_index = iv_line_index.
lt_diff = io_diff->get( ).
READ TABLE lt_diff INTO rs_diff
INDEX lv_line_index.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Invalid line index { lv_line_index }| ).
ENDIF.
ENDMETHOD.
METHOD get_diff_object.
FIELD-SYMBOLS: <ls_diff_file> LIKE LINE OF mt_diff_files.
LOOP AT mt_diff_files ASSIGNING <ls_diff_file>.
IF get_normalized_fname_with_path( <ls_diff_file> ) = iv_filename.
ro_diff = <ls_diff_file>-o_diff.
EXIT.
ENDIF.
ENDLOOP.
IF ro_diff IS NOT BOUND.
zcx_abapgit_exception=>raise( |Invalid filename { iv_filename }| ).
ENDIF.
ENDMETHOD.
METHOD get_patch_data.
DATA: lv_section TYPE string.
CLEAR: ev_filename, ev_line_index.
FIND FIRST OCCURRENCE OF REGEX `patch_line` && `_(.*)_(\d)+_(\d+)`
IN iv_patch
SUBMATCHES ev_filename lv_section ev_line_index.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Invalid patch| ).
ENDIF.
ENDMETHOD.
METHOD insert_nav.
" add beacon at beginning of file
rv_insert_nav = abap_true.
ENDMETHOD.
METHOD is_every_changed_line_patched.
DATA: lt_diff TYPE zif_abapgit_definitions=>ty_diffs_tt.
FIELD-SYMBOLS:
<ls_diff_file> TYPE zcl_abapgit_gui_page_diff=>ty_file_diff,
<ls_diff> TYPE zif_abapgit_definitions=>ty_diff.
rv_everything_patched = abap_true.
LOOP AT mt_diff_files ASSIGNING <ls_diff_file>.
lt_diff = <ls_diff_file>-o_diff->get( ).
LOOP AT lt_diff ASSIGNING <ls_diff>
WHERE result IS NOT INITIAL
AND patch_flag = abap_false.
rv_everything_patched = abap_false.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
EXIT.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD is_patch_line_possible.
IF is_diff_line-result = zif_abapgit_definitions=>c_diff-update
OR is_diff_line-result = zif_abapgit_definitions=>c_diff-insert
OR is_diff_line-result = zif_abapgit_definitions=>c_diff-delete.
rv_is_patch_line_possible = abap_true.
ENDIF.
ENDMETHOD.
METHOD refresh.
DATA:
lt_diff_files_old TYPE tt_file_diff.
lt_diff_files_old = mt_diff_files.
CASE iv_action.
WHEN c_actions-refresh.
refresh_full( ).
WHEN c_actions-refresh_local.
refresh_local( ).
WHEN OTHERS.
refresh_local_object( iv_action ).
ENDCASE.
calculate_diff( ).
restore_patch_flags( lt_diff_files_old ).
ENDMETHOD.
METHOD refresh_full.
mo_repo->refresh( abap_true ).
ENDMETHOD.
METHOD refresh_local.
mo_repo->refresh_local_objects( ).
ENDMETHOD.
METHOD refresh_local_object.
DATA:
lv_regex TYPE string,
lv_obj_type TYPE tadir-object,
lv_obj_name TYPE tadir-obj_name.
lv_regex = c_actions-refresh_local_object && `_(\w{4})_(.*)`.
FIND FIRST OCCURRENCE OF REGEX lv_regex
IN iv_action
SUBMATCHES lv_obj_type lv_obj_name.
IF sy-subrc = 0.
mo_repo->refresh_local_object(
iv_obj_type = lv_obj_type
iv_obj_name = lv_obj_name ).
ELSE.
zcx_abapgit_exception=>raise( |Invalid refresh action { iv_action }| ).
ENDIF.
ENDMETHOD.
METHOD render_beacon_begin_of_row.
mv_section_count = mv_section_count + 1.
io_html->add( |<th class="patch">| ).
io_html->add_checkbox( iv_id = |patch_section_{ get_normalized_fname_with_path( is_diff ) }_{ mv_section_count }| ).
io_html->add( '</th>' ).
ENDMETHOD.
METHOD render_content.
CLEAR: mv_section_count.
IF mv_pushed = abap_true.
refresh_full( ).
calculate_diff( ).
CLEAR: mv_pushed.
ENDIF.
gui_services( )->get_hotkeys_ctl( )->register_hotkeys( me ).
ri_html = super->render_content( ).
register_deferred_script( render_scripts( ) ).
ENDMETHOD.
METHOD render_diff_head_after_state.
DATA: lv_act_id TYPE string.
IF is_diff-obj_type IS NOT INITIAL AND is_diff-obj_name IS NOT INITIAL.
lv_act_id = |{ c_actions-refresh_local_object }_{ is_diff-obj_type }_{ is_diff-obj_name }|.
io_html->add_a(
iv_txt = |Refresh|
iv_typ = zif_abapgit_html=>c_action_type-dummy
iv_act = lv_act_id
iv_id = lv_act_id
iv_title = |Local refresh of this object| ).
ENDIF.
super->render_diff_head_after_state(
io_html = io_html
is_diff = is_diff ).
ENDMETHOD.
METHOD render_line_split_row.
render_patch( io_html = io_html
iv_filename = iv_filename
is_diff_line = is_diff_line
iv_fstate = iv_fstate
iv_index = iv_index ).
super->render_line_split_row(
io_html = io_html
iv_filename = iv_filename
is_diff_line = is_diff_line
iv_index = iv_index
iv_fstate = iv_fstate
iv_new = iv_new
iv_old = iv_old ).
ENDMETHOD.
METHOD render_patch.
CONSTANTS:
BEGIN OF lc_css_class,
patch TYPE string VALUE `patch` ##NO_TEXT,
END OF lc_css_class.
DATA:
lv_id TYPE string,
lv_patched TYPE abap_bool,
lv_is_patch_possible TYPE abap_bool.
lv_patched = get_diff_object( iv_filename )->is_line_patched( iv_index ).
lv_is_patch_possible = is_patch_line_possible(
is_diff_line = is_diff_line
iv_fstate = iv_fstate ).
IF lv_is_patch_possible = abap_true.
lv_id = |{ iv_filename }_{ mv_section_count }_{ iv_index }|.
io_html->add( |<td class="{ lc_css_class-patch }">| ).
io_html->add_checkbox(
iv_id = |patch_line_{ lv_id }|
iv_checked = lv_patched ).
io_html->add( |</td>| ).
ELSE.
io_html->add( |<td class="{ lc_css_class-patch }">| ).
io_html->add( |</td>| ).
ENDIF.
ENDMETHOD.
METHOD render_patch_head.
io_html->add( |<th class="patch">| ).
io_html->add_checkbox( iv_id = |patch_file_{ get_normalized_fname_with_path( is_diff ) }| ).
io_html->add( '</th>' ).
ENDMETHOD.
METHOD render_scripts.
CREATE OBJECT ro_html.
ro_html->zif_abapgit_html~set_title( cl_abap_typedescr=>describe_by_object_ref( me )->get_relative_name( ) ).
ro_html->add( 'preparePatch();' ).
ro_html->add( 'registerStagePatch();' ).
ENDMETHOD.
METHOD render_table_head_non_unified.
render_patch_head( io_html = io_html
is_diff = is_diff ).
super->render_table_head_non_unified(
io_html = io_html
is_diff = is_diff ).
ENDMETHOD.
METHOD restore_patch_flags.
DATA:
lt_diff_old TYPE zif_abapgit_definitions=>ty_diffs_tt.
FIELD-SYMBOLS:
<ls_diff_file> TYPE ty_file_diff,
<ls_diff_file_old> TYPE ty_file_diff,
<ls_diff_old> TYPE zif_abapgit_definitions=>ty_diff.
LOOP AT mt_diff_files ASSIGNING <ls_diff_file>.
READ TABLE it_diff_files_old ASSIGNING <ls_diff_file_old>
WITH KEY secondary
COMPONENTS path = <ls_diff_file>-path
filename = <ls_diff_file>-filename.
IF sy-subrc <> 0.
CONTINUE. " e.g. new objects
ENDIF.
lt_diff_old = <ls_diff_file_old>-o_diff->get( ).
LOOP AT lt_diff_old ASSIGNING <ls_diff_old>
WHERE patch_flag = abap_true.
<ls_diff_file>-o_diff->set_patch_by_old_diff(
is_diff_old = <ls_diff_old>
iv_patch_flag = abap_true ).
ENDLOOP.
ENDLOOP.
ENDMETHOD.
METHOD start_staging.
apply_patch_from_form_fields( it_postdata ).
add_to_stage( ).
ENDMETHOD.
METHOD zif_abapgit_gui_event_handler~on_event.
CASE iv_action.
WHEN c_actions-stage.
start_staging( it_postdata ).
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_commit
EXPORTING
io_repo = mo_repo_online
io_stage = mo_stage.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN OTHERS.
FIND FIRST OCCURRENCE OF REGEX |^{ c_actions-refresh }| IN iv_action.
IF sy-subrc = 0.
apply_patch_from_form_fields( it_postdata ).
refresh( iv_action ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
ELSE.
super->zif_abapgit_gui_event_handler~on_event(
EXPORTING
iv_action = iv_action
iv_getdata = iv_getdata
it_postdata = it_postdata
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
ENDIF.
ENDCASE.
ENDMETHOD.
METHOD zif_abapgit_gui_hotkeys~get_hotkey_actions.
DATA: ls_hotkey_action LIKE LINE OF rt_hotkey_actions.
ls_hotkey_action-ui_component = 'Patch'.
ls_hotkey_action-description = |Stage changes|.
ls_hotkey_action-action = |stagePatch|.
ls_hotkey_action-hotkey = |s|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ls_hotkey_action-description = |Refresh local|.
ls_hotkey_action-action = |refreshLocal|.
ls_hotkey_action-hotkey = |r|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
17147,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
26069,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
8940,
13083,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
2539,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
260,
7501,
12,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
7753,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
7753,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
15252,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
17147,
62,
14171,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
628,
220,
220,
220,
220,
220,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
15596,
62,
30281,
93,
261,
62,
15596,
23848,
36,
20032,
17941,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
651,
62,
17147,
62,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
17147,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
819,
62,
34345,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
819,
62,
1370,
62,
9630,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
8543,
62,
11299,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
751,
62,
26272,
62,
437,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
751,
62,
26272,
62,
27471,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
8543,
62,
11487,
62,
2256,
62,
13159,
62,
403,
1431,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
8543,
62,
1350,
7807,
62,
27471,
62,
1659,
62,
808,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
8543,
62,
26069,
62,
2256,
62,
8499,
62,
5219,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
7550,
62,
28341,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
8543,
62,
1370,
62,
35312,
62,
808,
23848,
36,
20032,
17941,
13,
628,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
1259,
62,
17147,
62,
2673,
41876,
4731,
764,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
4658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3800,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
17147,
62,
14247,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
14976,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
17147,
62,
5420,
3447,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
14976,
62,
12001,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
17147,
62,
5420,
3447,
62,
12001,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
14976,
62,
12001,
62,
15252,
41876,
4731,
26173,
8924,
705,
17147,
62,
5420,
3447,
62,
12001,
62,
15252,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
4658,
11,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
17147,
62,
2673,
11,
198,
220,
220,
220,
220,
220,
220,
220,
751,
220,
220,
220,
41876,
1259,
62,
17147,
62,
2673,
26173,
8924,
705,
2860,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
4781,
41876,
1259,
62,
17147,
62,
2673,
26173,
8924,
705,
28956,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
17147,
62,
2673,
764,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
6941,
62,
14247,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
14247,
11,
198,
220,
220,
220,
220,
220,
285,
85,
62,
5458,
62,
9127,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
285,
85,
62,
79,
7474,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
6941,
62,
260,
7501,
62,
25119,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
62,
25119,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
8543,
62,
17147,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
6494,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
34345,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
26069,
62,
1370,
41876,
1976,
361,
62,
397
] | [
1,
1,
1,
1,
1,
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ized" lang="en">Metadata provider for DDIC value help</p>
CLASS zcl_qdrt_ddic_shlp_vmp DEFINITION
PUBLIC
FINAL
CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES:
zif_qdrt_vh_metadata_provider.
METHODS:
constructor
IMPORTING
name TYPE shlpname
type TYPE string.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES: BEGIN OF ty_metadata.
INCLUDE TYPE zif_qdrt_ty_global=>ty_vh_metadata.
TYPES: END OF ty_metadata.
DATA:
exists TYPE abap_bool VALUE abap_undefined,
metadata TYPE ty_metadata,
value_help_type TYPE string,
value_help_name TYPE shlpname.
METHODS: read_metadata.
ENDCLASS.
CLASS zcl_qdrt_ddic_shlp_vmp IMPLEMENTATION.
METHOD constructor.
me->value_help_name = name.
me->value_help_type = type.
read_metadata( ).
ENDMETHOD.
METHOD zif_qdrt_metadata_provider~entity_exists.
IF exists = abap_undefined.
SELECT SINGLE @abap_true
FROM dd30l
WHERE shlpname = @value_help_name
INTO @exists.
IF sy-subrc <> 0.
exists = abap_false.
ENDIF.
ENDIF.
result = exists.
ENDMETHOD.
METHOD zif_qdrt_metadata_provider~get_metadata.
result = REF #( metadata ).
ENDMETHOD.
METHOD read_metadata.
DATA:
shlp_descriptor TYPE shlp_descr.
CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
EXPORTING
shlpname = value_help_name
shlptype = 'SH'
IMPORTING
shlp = shlp_descriptor.
metadata = CORRESPONDING #( zcl_qdrt_vh_util=>convert_to_vh_metadata( shlp_descriptor ) ).
IF shlp_descriptor IS NOT INITIAL AND
shlp_descriptor-shlpname IS NOT INITIAL.
DATA(shlp_description) = zcl_qdrt_text_util=>get_short_text(
object_type = zif_qdrt_c_global=>c_tadir_types-search_help
object_name = CONV #( value_help_name ) ).
metadata-description = shlp_description.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9171,
14706,
10131,
329,
20084,
2149,
1988,
1037,
3556,
79,
29,
198,
31631,
1976,
565,
62,
80,
7109,
83,
62,
1860,
291,
62,
1477,
34431,
62,
85,
3149,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
25,
198,
220,
220,
220,
220,
220,
1976,
361,
62,
80,
7109,
83,
62,
85,
71,
62,
38993,
62,
15234,
1304,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
41876,
427,
34431,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
41876,
4731,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
38993,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
5097,
52,
7206,
41876,
1976,
361,
62,
80,
7109,
83,
62,
774,
62,
20541,
14804,
774,
62,
85,
71,
62,
38993,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
23578,
3963,
1259,
62,
38993,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
7160,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
26173,
8924,
450,
499,
62,
917,
18156,
11,
198,
220,
220,
220,
220,
220,
20150,
220,
220,
220,
220,
220,
220,
220,
41876,
1259,
62,
38993,
11,
198,
220,
220,
220,
220,
220,
1988,
62,
16794,
62,
4906,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
1988,
62,
16794,
62,
3672,
41876,
427,
34431,
3672,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
1100,
62,
38993,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
80,
7109,
83,
62,
1860,
291,
62,
1477,
34431,
62,
85,
3149,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
502,
3784,
8367,
62,
16794,
62,
3672,
796,
1438,
13,
198,
220,
220,
220,
502,
3784,
8367,
62,
16794,
62,
4906,
796,
2099,
13,
198,
220,
220,
220,
1100,
62,
38993,
7,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
80,
7109,
83,
62,
38993,
62,
15234,
1304,
93,
26858,
62,
1069,
1023,
13,
198,
220,
220,
220,
16876,
7160,
796,
450,
499,
62,
917,
18156,
13,
198,
220,
220,
220,
220,
220,
33493,
311,
2751,
2538,
2488,
397,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
16034,
49427,
1270,
75,
198,
220,
220,
220,
220,
220,
220,
220,
33411,
427,
34431,
3672,
796,
2488,
8367,
62,
16794,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
39319,
2488,
1069,
1023,
13,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
7160,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
1255,
796,
7160,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
80,
7109,
83,
62,
38993,
62,
15234,
1304,
93,
1136,
62,
38993,
13,
198,
220,
220,
220,
1255,
796,
4526,
37,
1303,
7,
20150,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1100,
62,
38993,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
427,
34431,
62,
20147,
1968,
273,
41876,
427,
34431,
62,
20147,
81,
13,
198,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
37,
19,
5064,
62,
18851,
62,
50,
6581,
47,
62,
30910,
9419,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
427,
34431,
3672,
796,
1988,
62,
16794,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
427,
75,
457,
2981,
796,
705,
9693,
6,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
427,
34431,
220,
220,
220,
220,
796,
427,
34431,
62,
20147,
1968,
273,
13,
628,
220,
220,
220,
20150,
796,
23929,
19535,
47,
18672,
2751,
1303,
7,
1976,
565,
62,
80,
7109,
83,
62,
85,
71,
62,
22602,
14804,
1102,
1851,
62,
1462,
62,
85,
71,
62,
38993,
7,
427,
34431,
62,
20147,
1968,
273,
1267,
6739,
628,
220,
220,
220,
16876,
427,
34431,
62,
20147,
1968,
273,
3180,
5626,
3268,
2043,
12576,
5357,
198,
220,
220,
220,
220,
220,
220,
220,
427,
34431,
62,
20147,
1968,
273,
12,
1477,
34431,
3672,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
42865,
7,
1477,
34431,
62,
11213,
8,
796,
1976,
565,
62,
80,
7109,
83,
62,
5239,
62,
22602,
14804,
1136,
62,
19509,
62,
5239,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
4906,
796,
1976,
361,
62,
80,
7109,
83,
62,
66,
62,
20541,
14804,
66,
62,
83,
324,
343,
62,
19199,
12,
12947,
62,
16794,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
7102,
53,
1303,
7,
1988,
62,
16794,
62,
3672,
1267,
6739,
198,
220,
220,
220,
220,
220,
20150,
12,
11213,
796,
427,
34431,
62,
11213,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ltcl_test DEFINITION FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS FINAL.
PUBLIC SECTION.
PROTECTED SECTION.
PRIVATE SECTION.
DATA mo_cut TYPE REF TO ycl_advent2020_day19.
DATA m_input TYPE string_table.
METHODS setup.
METHODS given_the_example.
METHODS given_the_input.
METHODS part_one_example FOR TESTING.
METHODS part_one_input FOR TESTING.
METHODS part_two_example FOR TESTING.
METHODS part_two_input FOR TESTING.
ENDCLASS.
CLASS ltcl_test IMPLEMENTATION.
METHOD setup.
mo_cut = NEW #( ).
ENDMETHOD.
METHOD part_one_example.
given_the_example( ).
DATA(act) = mo_cut->solve_part_one( input = m_input ).
cl_abap_unit_assert=>assert_equals( exp = -1 act = act ).
ENDMETHOD.
METHOD part_one_input.
given_the_input( ).
DATA(act) = mo_cut->solve_part_one( input = m_input ).
cl_abap_unit_assert=>assert_equals( exp = -1 act = act ).
ENDMETHOD.
METHOD part_two_example.
given_the_example( ).
DATA(act) = mo_cut->solve_part_two( input = m_input ).
cl_abap_unit_assert=>assert_equals( exp = -1 act = act ).
ENDMETHOD.
METHOD part_two_input.
given_the_input( ).
DATA(act) = mo_cut->solve_part_two( input = m_input ).
cl_abap_unit_assert=>assert_equals( exp = -1 act = act ).
ENDMETHOD.
METHOD given_the_example.
m_input = VALUE #(
).
ENDMETHOD.
METHOD given_the_input.
m_input = VALUE #(
).
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
83,
565,
62,
9288,
5550,
20032,
17941,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
6941,
62,
8968,
41876,
4526,
37,
5390,
331,
565,
62,
324,
1151,
42334,
62,
820,
1129,
13,
198,
220,
220,
220,
42865,
285,
62,
15414,
41876,
4731,
62,
11487,
13,
628,
220,
220,
220,
337,
36252,
50,
9058,
13,
198,
220,
220,
220,
337,
36252,
50,
1813,
62,
1169,
62,
20688,
13,
198,
220,
220,
220,
337,
36252,
50,
1813,
62,
1169,
62,
15414,
13,
628,
220,
220,
220,
337,
36252,
50,
636,
62,
505,
62,
20688,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
636,
62,
505,
62,
15414,
7473,
43001,
2751,
13,
628,
220,
220,
220,
337,
36252,
50,
636,
62,
11545,
62,
20688,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
636,
62,
11545,
62,
15414,
7473,
43001,
2751,
13,
628,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
9288,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
9058,
13,
198,
220,
220,
220,
6941,
62,
8968,
796,
12682,
1303,
7,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
636,
62,
505,
62,
20688,
13,
198,
220,
220,
220,
1813,
62,
1169,
62,
20688,
7,
6739,
198,
220,
220,
220,
42865,
7,
529,
8,
796,
6941,
62,
8968,
3784,
82,
6442,
62,
3911,
62,
505,
7,
5128,
796,
285,
62,
15414,
6739,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
532,
16,
719,
796,
719,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
636,
62,
505,
62,
15414,
13,
198,
220,
220,
220,
1813,
62,
1169,
62,
15414,
7,
6739,
198,
220,
220,
220,
42865,
7,
529,
8,
796,
6941,
62,
8968,
3784,
82,
6442,
62,
3911,
62,
505,
7,
5128,
796,
285,
62,
15414,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
532,
16,
719,
796,
719,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
636,
62,
11545,
62,
20688,
13,
198,
220,
220,
220,
1813,
62,
1169,
62,
20688,
7,
6739,
198,
220,
220,
220,
42865,
7,
529,
8,
796,
6941,
62,
8968,
3784,
82,
6442,
62,
3911,
62,
11545,
7,
5128,
796,
285,
62,
15414,
6739,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
532,
16,
719,
796,
719,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
636,
62,
11545,
62,
15414,
13,
198,
220,
220,
220,
1813,
62,
1169,
62,
15414,
7,
6739,
198,
220,
220,
220,
42865,
7,
529,
8,
796,
6941,
62,
8968,
3784,
82,
6442,
62,
3911,
62,
11545,
7,
5128,
796,
285,
62,
15414,
6739,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
532,
16,
719,
796,
719,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1813,
62,
1169,
62,
20688,
13,
198,
220,
220,
220,
285,
62,
15414,
796,
26173,
8924,
1303,
7,
198,
220,
220,
220,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1813,
62,
1169,
62,
15414,
13,
198,
220,
220,
220,
285,
62,
15414,
796,
26173,
8924,
1303,
7,
198,
220,
220,
220,
6739,
198,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_md_header DEFINITION PUBLIC FINAL CREATE PUBLIC.
PUBLIC SECTION.
TYPES content_table TYPE TABLE OF string WITH EMPTY KEY.
METHODS constructor
IMPORTING
name TYPE string OPTIONAL
level TYPE i OPTIONAL
text TYPE string
underlined TYPE abap_bool OPTIONAL
RAISING
zcx_md_error.
METHODS get_content RETURNING VALUE(result) TYPE content_table.
METHODS get_name RETURNING VALUE(result) TYPE string.
METHODS get_level RETURNING VALUE(result) TYPE i.
PROTECTED SECTION.
PRIVATE SECTION.
DATA: name TYPE string,
level TYPE i,
content TYPE content_table.
METHODS change_text IMPORTING text TYPE string.
METHODS add_bar
RAISING
zcx_md_error.
ENDCLASS.
CLASS zcl_md_header IMPLEMENTATION.
METHOD constructor.
DATA: line TYPE string,
bar TYPE string.
IF name IS NOT INITIAL.
me->name = name.
ELSE.
me->name = '<DUMMY>'.
ENDIF.
IF level IS NOT INITIAL.
me->level = level.
ELSE.
me->level = 1.
ENDIF.
IF text IS INITIAL.
RAISE EXCEPTION TYPE zcx_md_error EXPORTING code = zcx_md_error=>code_enum-bad_method_parameters.
ENDIF.
change_text( text = text ).
IF underlined = abap_true.
add_bar( ).
ENDIF.
ENDMETHOD.
METHOD get_content.
result = content.
ENDMETHOD.
METHOD get_level.
result = level.
ENDMETHOD.
METHOD get_name.
result = name.
ENDMETHOD.
METHOD add_bar.
DATA bar TYPE string.
TRY.
DATA(headline) = content[ 1 ].
CATCH cx_sy_itab_line_not_found.
RAISE EXCEPTION TYPE zcx_md_error EXPORTING code = zcx_md_error=>code_enum-table_line_not_found.
ENDTRY.
DO strlen( headline ) TIMES.
bar = |{ bar }-|.
ENDDO.
IF bar IS NOT INITIAL.
APPEND bar TO content.
ENDIF.
ENDMETHOD.
METHOD change_text.
DATA headline TYPE string.
DO level TIMES.
headline = |{ headline }#|.
ENDDO.
headline = |{ headline } { text }|.
APPEND headline TO content.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
9132,
62,
25677,
5550,
20032,
17941,
44731,
25261,
29244,
6158,
44731,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
2695,
62,
11487,
41876,
43679,
3963,
4731,
13315,
38144,
9936,
35374,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
1241,
220,
220,
220,
220,
220,
41876,
1312,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
2420,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
739,
10837,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
9132,
62,
18224,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
11299,
30826,
4261,
15871,
26173,
8924,
7,
20274,
8,
41876,
2695,
62,
11487,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
3672,
30826,
4261,
15871,
26173,
8924,
7,
20274,
8,
41876,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
5715,
30826,
4261,
15871,
26173,
8924,
7,
20274,
8,
41876,
1312,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
1438,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1241,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2695,
41876,
2695,
62,
11487,
13,
628,
220,
220,
220,
337,
36252,
50,
1487,
62,
5239,
30023,
9863,
2751,
2420,
41876,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
751,
62,
5657,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
9132,
62,
18224,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
9132,
62,
25677,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
42865,
25,
1627,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2318,
220,
41876,
4731,
13,
628,
220,
220,
220,
16876,
1438,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
502,
3784,
3672,
796,
1438,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
502,
3784,
3672,
796,
705,
27,
35,
5883,
26708,
29,
4458,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
16876,
1241,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
502,
3784,
5715,
796,
1241,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
502,
3784,
5715,
796,
352,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
16876,
2420,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
17926,
24352,
7788,
42006,
2849,
41876,
1976,
66,
87,
62,
9132,
62,
18224,
7788,
15490,
2751,
2438,
796,
1976,
66,
87,
62,
9132,
62,
18224,
14804,
8189,
62,
44709,
12,
14774,
62,
24396,
62,
17143,
7307,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
1487,
62,
5239,
7,
2420,
796,
2420,
6739,
628,
220,
220,
220,
16876,
739,
10837,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
220,
220,
751,
62,
5657,
7,
6739,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
651,
62,
11299,
13,
198,
220,
220,
220,
1255,
796,
2695,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
651,
62,
5715,
13,
198,
220,
220,
220,
1255,
796,
1241,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
651,
62,
3672,
13,
198,
220,
220,
220,
1255,
796,
1438,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
751,
62,
5657,
13,
198,
220,
220,
220,
42865,
2318,
41876,
4731,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
42865,
7,
2256,
1370,
8,
796,
2695,
58,
352,
20740,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
1837,
62,
270,
397,
62,
1370,
62,
1662,
62,
9275,
13,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
24352,
7788,
42006,
2849,
41876,
1976,
66,
87,
62,
9132,
62,
18224,
7788,
15490,
2751,
2438,
796,
1976,
66,
87,
62,
9132,
62,
18224,
14804,
8189,
62,
44709,
12,
11487,
62,
1370,
62,
1662,
62,
9275,
13,
198,
220,
220,
220,
23578,
40405,
13,
628,
220,
220,
220,
8410,
965,
11925,
7,
16534,
1267,
31742,
1546,
13,
198,
220,
220,
220,
220,
220,
2318,
796,
930,
90,
2318,
1782,
22831,
13,
198,
220,
220,
220,
23578,
18227,
13,
628,
220,
220,
220,
16876,
2318,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
43504,
10619,
2318,
5390,
2695,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1487,
62,
5239,
13,
198,
220,
220,
220,
42865,
16534,
41876,
4731,
13,
628,
220,
220,
220,
8410,
1241,
31742,
1546,
13,
198,
220,
220,
220,
220,
220,
16534,
796,
930,
90,
16534,
1782,
2,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rest_resource~get REDEFINITION.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS:
BEGIN OF c_uri_attributes,
name TYPE string VALUE 'name',
type TYPE string VALUE 'type',
field TYPE string VALUE 'field',
field_type TYPE string VALUE 'fieldType',
value_help_type TYPE string VALUE 'valueHelpType',
END OF c_uri_attributes.
DATA:
entity_name TYPE zif_qdrt_ty_global=>ty_entity_name,
entity_type TYPE zif_qdrt_ty_global=>ty_entity_type,
field TYPE fieldname,
field_type TYPE zif_qdrt_ty_global=>ty_field_type,
value_help_type TYPE string.
METHODS:
read_uri_params
RAISING
zcx_qdrt_appl_error,
get_vh_metadata_for_field
RAISING
zcx_qdrt_appl_error.
ENDCLASS.
CLASS zcl_qdrt_entity_vh_meta_res IMPLEMENTATION.
METHOD if_rest_resource~get.
TRY.
read_uri_params( ).
get_vh_metadata_for_field( ).
CATCH zcx_qdrt_appl_error INTO DATA(rest_error).
zcl_qdrt_rest_error_response=>create( mo_response )->set_body_from_exc( rest_error ).
ENDTRY.
ENDMETHOD.
METHOD read_uri_params.
entity_name = to_upper( mo_request->get_uri_attribute(
iv_name = c_uri_attributes-name
iv_encoded = abap_false ) ).
zcl_qdrt_rest_request_util=>check_empty_uri_attribute(
uri_attribute = c_uri_attributes-name
value = entity_name ).
entity_type = to_upper( mo_request->get_uri_attribute(
iv_name = c_uri_attributes-type
iv_encoded = abap_false ) ).
zcl_qdrt_rest_request_util=>check_empty_uri_attribute(
uri_attribute = c_uri_attributes-type
value = entity_type ).
field = to_upper( mo_request->get_uri_query_parameter(
iv_name = c_uri_attributes-field
iv_encoded = abap_false ) ).
zcl_qdrt_rest_request_util=>check_empty_uri_attribute(
uri_attribute = c_uri_attributes-field
value = field ).
field_type = mo_request->get_uri_query_parameter(
iv_name = c_uri_attributes-field_type
iv_encoded = abap_false ).
zcl_qdrt_rest_request_util=>check_empty_uri_attribute(
uri_attribute = c_uri_attributes-field_type
value = field_type ).
value_help_type = mo_request->get_uri_query_parameter(
iv_name = c_uri_attributes-value_help_type
iv_encoded = abap_false ).
zcl_qdrt_rest_request_util=>check_empty_uri_attribute(
uri_attribute = c_uri_attributes-value_help_type
value = value_help_type ).
ENDMETHOD.
METHOD get_vh_metadata_for_field.
DATA(vh_metadata_provider) = zcl_qdrt_provider_factory=>create_field_vh_metadata_prov(
entity_name = entity_name
entity_type = entity_type
fieldname = field
field_type = field_type
value_help_type = value_help_type ).
DATA(metadata) = vh_metadata_provider->get_metadata( ).
mo_response->create_entity( )->set_string_data(
zcl_qdrt_json=>to_json(
data = metadata
compress = abap_true
pretty_name = zcl_qdrt_json=>pretty_mode-camel_case ) ).
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
26198,
329,
11052,
10478,
3395,
14706,
3556,
79,
29,
198,
31631,
1976,
565,
62,
80,
7109,
83,
62,
26858,
62,
85,
71,
62,
28961,
62,
411,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
537,
62,
2118,
62,
31092,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
611,
62,
2118,
62,
31092,
93,
1136,
23848,
36,
20032,
17941,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
9900,
62,
1078,
7657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
3672,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
2099,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
4906,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
2214,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
3245,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
2214,
62,
4906,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
3245,
6030,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
16794,
62,
4906,
41876,
4731,
26173,
8924,
705,
8367,
22087,
6030,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
9900,
62,
1078,
7657,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
9312,
62,
3672,
220,
220,
220,
220,
41876,
1976,
361,
62,
80,
7109,
83,
62,
774,
62,
20541,
14804,
774,
62,
26858,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
9312,
62,
4906,
220,
220,
220,
220,
41876,
1976,
361,
62,
80,
7109,
83,
62,
774,
62,
20541,
14804,
774,
62,
26858,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
2214,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
2214,
3672,
11,
198,
220,
220,
220,
220,
220,
2214,
62,
4906,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
80,
7109,
83,
62,
774,
62,
20541,
14804,
774,
62,
3245,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
1988,
62,
16794,
62,
4906,
41876,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1100,
62,
9900,
62,
37266,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
80,
7109,
83,
62,
1324,
75,
62,
18224,
11,
198,
220,
220,
220,
220,
220,
651,
62,
85,
71,
62,
38993,
62,
1640,
62,
3245,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
80,
7109,
83,
62,
1324,
75,
62,
18224,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
80,
7109,
83,
62,
26858,
62,
85,
71,
62,
28961,
62,
411,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
611,
62,
2118,
62,
31092,
93,
1136,
13,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1100,
62,
9900,
62,
37266,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
651,
62,
85,
71,
62,
38993,
62,
1640,
62,
3245,
7,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
1976,
66,
87,
62,
80,
7109,
83,
62,
1324,
75,
62,
18224,
39319,
42865,
7,
2118,
62,
18224,
737,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
565,
62,
80,
7109,
83,
62,
2118,
62,
18224,
62,
26209,
14804,
17953,
7,
6941,
62,
26209,
1267,
3784,
2617,
62,
2618,
62,
6738,
62,
41194,
7,
1334,
62,
18224,
6739,
198,
220,
220,
220,
23578,
40405,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1100,
62,
9900,
62,
37266,
13,
198,
220,
220,
220,
9312,
62,
3672,
796,
284,
62,
45828,
7,
6941,
62,
25927,
3784,
1136,
62,
9900,
62,
42348,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
3672,
220,
220,
220,
796,
269,
62,
9900,
62,
1078,
7657,
12,
3672,
198,
220,
220,
220,
220,
220,
21628,
62,
12685,
9043,
796,
450,
499,
62,
9562,
1267,
6739,
198,
220,
220,
220,
1976,
565,
62,
80,
7109,
83,
62,
2118,
62,
25927,
62,
22602,
14804,
9122,
62,
28920,
62,
9900,
62,
42348,
7,
198,
220,
220,
220,
220,
220,
2956,
72,
62,
42348,
796,
269,
62,
9900,
62,
1078,
7657,
12,
3672,
198,
220,
220,
220,
220,
220,
1988,
220,
220,
220,
220,
220,
220,
220,
220,
796,
9312,
62,
3672,
6739,
628,
220,
220,
220,
9312,
62,
4906,
796,
284,
62,
45828,
7,
6941,
62,
25927,
3784,
1136,
62,
9900,
62,
42348,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
3672,
220,
220,
220,
796,
269,
62,
9900,
62,
1078,
7657,
12,
4906,
198,
220,
220,
220,
220,
220,
21628,
62,
12685,
9043,
796,
450,
499,
62,
9562,
220,
1267,
6739,
198,
220,
220,
220,
1976,
565,
62,
80,
7109,
83,
62,
2118,
62,
25927,
62,
22602,
14804,
9122,
62,
28920,
62,
9900,
62,
42348,
7,
198,
220,
220,
220,
220,
220,
2956,
72,
62,
42348,
796,
269,
62,
9900,
62,
1078,
7657,
12,
4906,
198,
220,
220,
220,
220,
220,
1988,
220,
220,
220,
220,
220,
220,
220,
220,
796,
9312,
62,
4906,
6739,
628,
220,
220,
220,
2214,
796,
284,
62,
45828,
7,
6941,
62,
25927,
3784,
1136,
62,
9900,
62,
22766,
62,
17143,
2357,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
3672,
220,
220,
220,
796,
269,
62,
9900,
62,
1078,
7657,
12,
3245,
198,
220,
220,
220,
220,
220,
21628,
62,
12685,
9043,
796,
450,
499,
62,
9562,
220,
1267,
6739,
198,
220,
220,
220,
1976,
565,
62,
80,
7109,
83,
62,
2118,
62,
25927,
62,
22602,
14804,
9122,
62,
28920,
62,
9900,
62,
42348,
7
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_auth DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
ENDCLASS.
CLASS zcl_abapgit_object_auth IMPLEMENTATION.
METHOD zif_abapgit_object~changed_by.
* looks like "changed by user" is not stored in the database
rv_user = c_user_unknown.
ENDMETHOD.
METHOD zif_abapgit_object~compare_to_remote_version.
CREATE OBJECT ro_comparison_result TYPE zcl_abapgit_comparison_null.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_fieldname TYPE authx-fieldname.
lv_fieldname = ms_item-obj_name.
* there is a bug in SAP standard, the TADIR entries are not deleted
* when the AUTH object is deleted in transaction SU20
CALL FUNCTION 'SUSR_AUTF_DELETE_FIELD'
EXPORTING
fieldname = lv_fieldname
EXCEPTIONS
delete_not_possible = 1
field_in_use = 2
not_existing = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from SUSR_AUTF_DELETE_FIELD' ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
* see include LSAUT_FIELDF02
DATA: ls_authx TYPE authx,
lo_auth TYPE REF TO cl_auth_tools.
io_xml->read( EXPORTING iv_name = 'AUTHX'
CHANGING cg_data = ls_authx ).
CREATE OBJECT lo_auth.
IF lo_auth->add_afield_to_trkorr( ls_authx-fieldname ) <> 0.
zcx_abapgit_exception=>raise( 'Error deserializing AUTH' ).
ENDIF.
MODIFY authx FROM ls_authx.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Error deserializing AUTH' ).
ENDIF.
CALL FUNCTION 'DB_COMMIT'.
lo_auth->set_authfld_info_from_db( ls_authx-fieldname ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_fieldname TYPE authx-fieldname.
SELECT SINGLE fieldname FROM authx
INTO lv_fieldname
WHERE fieldname = ms_item-obj_name. "#EC CI_GENBUFF
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD.
METHOD zif_abapgit_object~has_changed_since.
rv_changed = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
DATA: lv_field TYPE fieldname.
lv_field = ms_item-obj_name.
* TODO, this function module does not exist in 702
CALL FUNCTION 'SU20_MAINTAIN_SNGL'
EXPORTING
id_field = lv_field
id_wbo_mode = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: ls_authx TYPE authx.
SELECT SINGLE * FROM authx INTO ls_authx
WHERE fieldname = ms_item-obj_name. "#EC CI_GENBUFF
IF sy-subrc <> 0.
RETURN.
ENDIF.
io_xml->add( iv_name = 'AUTHX'
ig_data = ls_authx ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
18439,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
18439,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
198,
9,
3073,
588,
366,
40985,
416,
2836,
1,
318,
407,
8574,
287,
262,
6831,
198,
220,
220,
220,
374,
85,
62,
7220,
796,
269,
62,
7220,
62,
34680,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5589,
533,
62,
1462,
62,
47960,
62,
9641,
13,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
785,
1845,
1653,
62,
20274,
41876,
1976,
565,
62,
397,
499,
18300,
62,
785,
1845,
1653,
62,
8423,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
3245,
3672,
41876,
6284,
87,
12,
3245,
3672,
13,
628,
198,
220,
220,
220,
300,
85,
62,
3245,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
198,
198,
9,
612,
318,
257,
5434,
287,
48323,
3210,
11,
262,
309,
2885,
4663,
12784,
389,
407,
13140,
198,
9,
618,
262,
37195,
2134,
318,
13140,
287,
8611,
13558,
1238,
198,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
50,
2937,
49,
62,
39371,
37,
62,
7206,
2538,
9328,
62,
44603,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2214,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
3245,
3672,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
12233,
62,
1662,
62,
79,
4733,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2214,
62,
259,
62,
1904,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
407,
62,
25687,
220,
220,
220,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
645,
62,
9800,
414,
220,
220,
220,
220,
220,
220,
220,
796,
604,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
642,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
18224,
422,
311,
2937,
49,
62,
39371,
37,
62,
7206,
2538,
9328,
62,
44603,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
8906,
48499,
1096,
13,
198,
9,
766,
2291,
406,
4090,
3843,
62,
11674,
3698,
8068,
2999,
628,
220,
220,
220,
42865,
25,
43979,
62,
18439,
87,
41876,
6284,
87,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
18439,
220,
41876,
4526,
37,
5390,
537,
62,
18439,
62,
31391,
13,
628,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
32,
24318,
55,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
269,
70,
62,
7890,
796,
43979,
62,
18439,
87,
6739,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
2376,
62,
18439,
13,
628,
220,
220,
220,
16876,
2376,
62,
18439,
3784,
2860,
62,
1878,
1164,
62,
1462,
62,
2213,
74,
38890,
7,
43979,
62,
18439,
87,
12,
3245,
3672,
1267,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
12331,
748,
48499,
2890,
37195,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
19164,
5064,
56,
6284,
87,
16034,
43979,
62,
18439,
87,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
12331,
748,
48499,
2890,
37195,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
11012,
62,
9858,
36393,
4458,
198,
220,
220,
220,
2376,
62,
18439,
3784,
2617,
62,
18439,
69,
335,
62,
10951,
62,
6738,
62,
9945,
7,
43979,
62,
18439,
87,
12,
3245,
3672,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1069,
1023,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
3245,
3672,
41876,
6284,
87,
12,
3245,
3672,
13,
628,
198,
220,
220,
220,
33493,
311,
2751,
2538,
2214,
3672,
16034,
6284,
87,
198,
220,
220,
220,
220,
220,
39319,
300,
85,
62,
3245,
3672,
198,
220,
220,
220,
220,
220,
33411,
2214,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
14514,
62,
35353,
19499,
5777,
198,
220,
220,
220,
374,
85,
62,
30388,
796,
20512,
66,
7,
827,
12,
7266,
6015,
796,
657,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1136,
62,
38993,
13,
198,
220,
220,
220,
44608,
62,
38993,
796,
651,
62,
38993,
7,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
10134,
62,
40985,
62,
20777,
13,
198,
220,
220,
220,
374,
85
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_ABAK_DATA definition
public
abstract
create public
global friends ZCL_ABAK_FACTORY .
public section.
interfaces ZIF_ABAK_DATA .
protected section.
methods LOAD_DATA_AUX
abstract
returning
value(RT_K) type ZABAK_K_T
raising
ZCX_ABAK .
methods INVALIDATE_AUX
abstract
raising
ZCX_ABAK .
private section.
constants:
BEGIN OF gc_option,
equal TYPE bapioption VALUE 'EQ',
not_equal TYPE bapioption VALUE 'NE',
between TYPE bapioption VALUE 'BT',
not_between TYPE bapioption VALUE 'NB',
contains_pattern TYPE bapioption VALUE 'CP',
does_not_contain_pattern TYPE bapioption VALUE 'NP',
less_than TYPE bapioption VALUE 'LT',
less_or_equal TYPE bapioption VALUE 'LE',
greater_than TYPE bapioption VALUE 'GT',
greater_or_equal TYPE bapioption VALUE 'GE',
END OF gc_option .
constants:
BEGIN OF gc_sign,
include TYPE bapisign VALUE 'I',
exclude TYPE bapisign VALUE 'E',
END OF gc_sign .
data GT_K type ZABAK_K_T .
data G_LOADED type FLAG .
methods CHECK_DATA
importing
!IT_K type ZABAK_K_T
raising
ZCX_ABAK .
methods CHECK_LINE
importing
!IS_K type ZABAK_K
raising
ZCX_ABAK .
methods CHECK_LINE_MULTI
importing
!IS_K type ZABAK_K
raising
ZCX_ABAK .
methods LOAD_DATA
raising
ZCX_ABAK .
methods FILL_DEFAULTS
changing
!CT_K type ZABAK_K_T
raising
ZCX_ABAK .
methods CHECK_SUBLINE
importing
!I_KV type ZABAK_KV
raising
ZCX_ABAK .
ENDCLASS.
CLASS ZCL_ABAK_DATA IMPLEMENTATION.
METHOD check_data.
FIELD-SYMBOLS: <s_k> LIKE LINE OF it_k.
LOOP AT it_k ASSIGNING <s_k>.
check_line( <s_k> ).
ENDLOOP.
ENDMETHOD.
METHOD check_line.
FIELD-SYMBOLS: <s_kv> LIKE LINE OF is_k-t_kv.
IF is_k-fieldname IS INITIAL.
RAISE EXCEPTION TYPE zcx_abak
EXPORTING
textid = zcx_abak=>invalid_parameters.
ENDIF.
LOOP AT is_k-t_kv ASSIGNING <s_kv>.
check_subline( <s_kv> ).
* Multiple fields: check if there are corresponding values and other checks
check_line_multi( is_k ).
ENDLOOP.
ENDMETHOD.
METHOD check_line_multi.
DATA: t_fieldname TYPE STANDARD TABLE OF string,
t_value TYPE STANDARD TABLE OF string.
FIELD-SYMBOLS: <s_kv> LIKE LINE OF is_k-t_kv.
SPLIT is_k-fieldname AT space INTO TABLE t_fieldname.
* Only relevant for multiple fieldnames
IF lines( t_fieldname ) <= 1.
RETURN.
ENDIF.
READ TABLE is_k-t_kv ASSIGNING <s_kv> INDEX 1.
* Option must be EQ (no ranges)
IF <s_kv>-option <> gc_option-equal.
RAISE EXCEPTION TYPE zcx_abak_data
EXPORTING
textid = zcx_abak_data=>multi_option_not_eq.
ENDIF.
* Sign must be I (no ranges)
IF <s_kv>-sign <> gc_sign-include.
RAISE EXCEPTION TYPE zcx_abak_data
EXPORTING
textid = zcx_abak_data=>multi_sign_not_i.
ENDIF.
* High must be empty (no ranges)
IF <s_kv>-high IS NOT INITIAL.
RAISE EXCEPTION TYPE zcx_abak_data
EXPORTING
textid = zcx_abak_data=>high_must_be_empty.
ENDIF.
* We need one value per field
SPLIT <s_kv>-low AT space INTO TABLE t_value.
IF lines( t_value ) <> lines( t_fieldname ).
RAISE EXCEPTION TYPE zcx_abak_data
EXPORTING
textid = zcx_abak_data=>multi_fieldname_value_mismatch.
ENDIF.
ENDMETHOD.
METHOD check_subline.
* Validate sign
IF i_kv-sign CN 'IE'.
RAISE EXCEPTION TYPE zcx_abak_data
EXPORTING
textid = zcx_abak_data=>invalid_sign
sign = i_kv-sign.
ENDIF.
CASE i_kv-option.
WHEN gc_option-equal OR
gc_option-not_equal OR
gc_option-contains_pattern OR
gc_option-does_not_contain_pattern OR
gc_option-greater_or_equal OR
gc_option-greater_than OR
gc_option-less_or_equal OR
gc_option-less_than.
* For single value operators HIGH must be empty
IF i_kv-high IS NOT INITIAL.
RAISE EXCEPTION TYPE zcx_abak_data
EXPORTING
textid = zcx_abak_data=>high_must_be_empty
option = i_kv-option.
ENDIF.
WHEN gc_option-between OR
gc_option-not_between.
* Two value operator must have high defined
IF i_kv-low IS INITIAL OR i_kv-high IS INITIAL.
RAISE EXCEPTION TYPE zcx_abak_data
EXPORTING
textid = zcx_abak_data=>low_high_must_be_filled
option = i_kv-option.
ENDIF.
IF i_kv-high < i_kv-low.
RAISE EXCEPTION TYPE zcx_abak_data
EXPORTING
textid = zcx_abak_data=>high_must_be_gt_low
option = i_kv-option
low = i_kv-low
high = i_kv-high.
ENDIF.
WHEN OTHERS.
RAISE EXCEPTION TYPE zcx_abak_data
EXPORTING
textid = zcx_abak_data=>invalid_option
option = i_kv-option.
ENDCASE.
ENDMETHOD.
METHOD fill_defaults.
FIELD-SYMBOLS: <s_k> LIKE LINE OF ct_k,
<s_kv> LIKE LINE OF <s_k>-t_kv.
LOOP AT ct_k ASSIGNING <s_k>.
LOOP AT <s_k>-t_kv ASSIGNING <s_kv> WHERE sign IS INITIAL OR option IS INITIAL. "#EC CI_NESTED
IF <s_kv>-sign IS INITIAL.
<s_kv>-sign = gc_sign-include.
ENDIF.
IF <s_kv>-option IS INITIAL.
<s_kv>-option = gc_option-equal.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDMETHOD.
METHOD load_data.
IF g_loaded = abap_true.
RETURN.
ENDIF.
gt_k = load_data_aux( ).
fill_defaults( CHANGING ct_k = gt_k ).
check_data( gt_k ).
g_loaded = abap_true.
ENDMETHOD.
METHOD zif_abak_data~get_data.
load_data( ).
rt_k = gt_k.
ENDMETHOD.
METHOD zif_abak_data~invalidate.
CLEAR gt_k[].
CLEAR g_loaded.
invalidate_aux( ).
ENDMETHOD.
METHOD zif_abak_data~read.
FIELD-SYMBOLS: <s_k> LIKE LINE OF gt_k.
LOG-POINT ID zabak SUBKEY 'data.read' FIELDS i_scope i_fieldname i_context.
load_data( ).
READ TABLE gt_k ASSIGNING <s_k>
WITH KEY scope = i_scope
fieldname = i_fieldname
context = i_context.
IF sy-subrc = 0.
rt_kv = <s_k>-t_kv.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
32,
4339,
42,
62,
26947,
6770,
198,
220,
1171,
198,
220,
12531,
198,
220,
2251,
1171,
628,
220,
3298,
2460,
1168,
5097,
62,
32,
4339,
42,
62,
37,
10659,
15513,
764,
198,
198,
11377,
2665,
13,
628,
220,
20314,
1168,
5064,
62,
32,
4339,
42,
62,
26947,
764,
198,
24326,
2665,
13,
628,
220,
5050,
17579,
2885,
62,
26947,
62,
26830,
55,
198,
220,
12531,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
14181,
62,
42,
8,
2099,
1168,
32,
4339,
42,
62,
42,
62,
51,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
220,
5050,
3268,
23428,
2389,
6158,
62,
26830,
55,
198,
220,
12531,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
19734,
2665,
13,
628,
220,
38491,
25,
198,
220,
220,
220,
347,
43312,
3963,
308,
66,
62,
18076,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4961,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
36,
48,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
407,
62,
40496,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
12161,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1022,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
19313,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
407,
62,
23395,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
32819,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4909,
62,
33279,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
8697,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
857,
62,
1662,
62,
3642,
391,
62,
33279,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
22182,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1342,
62,
14813,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
27734,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1342,
62,
273,
62,
40496,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
2538,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3744,
62,
14813,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
19555,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3744,
62,
273,
62,
40496,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
499,
14922,
5378,
26173,
8924,
705,
8264,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
308,
66,
62,
18076,
764,
198,
220,
38491,
25,
198,
220,
220,
220,
347,
43312,
3963,
308,
66,
62,
12683,
11,
198,
220,
220,
220,
220,
220,
2291,
41876,
275,
499,
271,
570,
26173,
8924,
705,
40,
3256,
198,
220,
220,
220,
220,
220,
19607,
41876,
275,
499,
271,
570,
26173,
8924,
705,
36,
3256,
198,
220,
220,
220,
23578,
3963,
308,
66,
62,
12683,
764,
198,
220,
1366,
7963,
62,
42,
2099,
1168,
32,
4339,
42,
62,
42,
62,
51,
764,
198,
220,
1366,
402,
62,
35613,
1961,
2099,
9977,
4760,
764,
628,
220,
5050,
5870,
25171,
62,
26947,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
42,
2099,
1168,
32,
4339,
42,
62,
42,
62,
51,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
220,
5050,
5870,
25171,
62,
24027,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
42,
2099,
1168,
32,
4339,
42,
62,
42,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
220,
5050,
5870,
25171,
62,
24027,
62,
44,
16724,
40,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
42,
2099,
1168,
32,
4339,
42,
62,
42,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
220,
5050,
17579,
2885,
62,
26947,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
220,
5050,
376,
8267,
62,
7206,
7708,
35342,
198,
220,
220,
220,
5609,
198,
220,
220,
220,
220,
220,
5145,
4177,
62,
42,
2099,
1168,
32,
4339,
42,
62,
42,
62,
51,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
220,
5050,
5870,
25171,
62,
12564,
9148,
8881,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
40,
62,
42,
53,
2099,
1168,
32,
4339,
42,
62,
42,
53,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
4339,
42,
62,
26947,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
2198,
62,
7890,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
82,
62,
74,
29,
34178,
48920,
3963,
340,
62,
74,
13,
628,
220,
220,
220,
17579,
3185,
5161,
340,
62,
74,
24994,
3528,
15871,
1279,
82,
62,
74,
28401,
198,
220,
220,
220,
220,
220,
2198,
62,
1370,
7,
1279,
82,
62,
74,
29,
6739,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
2198,
62,
1370,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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E i VALUE 3,
no_more_act TYPE i VALUE 4,
new_page_w_bookmark TYPE i VALUE 5,
go_back_to_bookmark TYPE i VALUE 6,
new_page_replacing TYPE i VALUE 7,
END OF c_event_state .
CONSTANTS:
BEGIN OF c_action,
go_home TYPE string VALUE 'go_home',
go_db TYPE string VALUE 'go_db',
END OF c_action .
METHODS go_home
RAISING
zcx_abapgit_exception .
METHODS go_page
IMPORTING
!ii_page TYPE REF TO zif_abapgit_gui_renderable
!iv_clear_stack TYPE abap_bool DEFAULT abap_true
RAISING
zcx_abapgit_exception .
METHODS back
IMPORTING
!iv_to_bookmark TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(rv_exit) TYPE abap_bool
RAISING
zcx_abapgit_exception .
METHODS on_event
FOR EVENT sapevent OF zif_abapgit_html_viewer
IMPORTING
!action
!frame
!getdata
!postdata
!query_table .
METHODS constructor
IMPORTING
!io_component TYPE REF TO object OPTIONAL
!ii_asset_man TYPE REF TO zif_abapgit_gui_asset_manager OPTIONAL
!ii_hotkey_ctl TYPE REF TO zif_abapgit_gui_hotkey_ctl OPTIONAL
!ii_html_processor TYPE REF TO zif_abapgit_gui_html_processor OPTIONAL
!iv_rollback_on_error TYPE abap_bool DEFAULT abap_true
RAISING
zcx_abapgit_exception .
METHODS free .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_page_stack,
page TYPE REF TO zif_abapgit_gui_renderable,
bookmark TYPE abap_bool,
END OF ty_page_stack .
DATA mv_rollback_on_error TYPE abap_bool .
DATA mi_cur_page TYPE REF TO zif_abapgit_gui_renderable .
DATA:
mt_stack TYPE STANDARD TABLE OF ty_page_stack .
DATA:
mt_event_handlers TYPE STANDARD TABLE OF REF TO zif_abapgit_gui_event_handler .
DATA mi_router TYPE REF TO zif_abapgit_gui_event_handler .
DATA mi_asset_man TYPE REF TO zif_abapgit_gui_asset_manager .
DATA mi_hotkey_ctl TYPE REF TO zif_abapgit_gui_hotkey_ctl .
DATA mi_html_processor TYPE REF TO zif_abapgit_gui_html_processor .
DATA mi_html_viewer TYPE REF TO zif_abapgit_html_viewer .
DATA mo_html_parts TYPE REF TO zcl_abapgit_html_parts .
METHODS cache_html
IMPORTING
!iv_text TYPE string
RETURNING
VALUE(rv_url) TYPE w3url .
METHODS startup
RAISING
zcx_abapgit_exception .
METHODS render
RAISING
zcx_abapgit_exception .
METHODS call_page
IMPORTING
!ii_page TYPE REF TO zif_abapgit_gui_renderable
!iv_with_bookmark TYPE abap_bool DEFAULT abap_false
!iv_replacing TYPE abap_bool DEFAULT abap_false
RAISING
zcx_abapgit_exception .
METHODS handle_action
IMPORTING
!iv_action TYPE c
!iv_getdata TYPE c OPTIONAL
!it_postdata TYPE cnht_post_data_tab OPTIONAL .
METHODS handle_error
IMPORTING
!ix_exception TYPE REF TO zcx_abapgit_exception .
ENDCLASS.
CLASS ZCL_ABAPGIT_GUI IMPLEMENTATION.
METHOD back.
DATA: lv_index TYPE i,
ls_stack LIKE LINE OF mt_stack.
lv_index = lines( mt_stack ).
IF lv_index = 0.
rv_exit = abap_true.
RETURN.
ENDIF.
DO lv_index TIMES.
READ TABLE mt_stack INDEX lv_index INTO ls_stack.
ASSERT sy-subrc = 0.
DELETE mt_stack INDEX lv_index.
ASSERT sy-subrc = 0.
lv_index = lv_index - 1.
IF iv_to_bookmark = abap_false OR ls_stack-bookmark = abap_true.
EXIT.
ENDIF.
ENDDO.
mi_cur_page = ls_stack-page. " last page always stays
render( ).
ENDMETHOD.
METHOD cache_html.
rv_url = zif_abapgit_gui_services~cache_asset(
iv_text = iv_text
iv_type = 'text'
iv_subtype = 'html' ).
ENDMETHOD.
METHOD call_page.
DATA: ls_stack TYPE ty_page_stack.
IF iv_replacing = abap_false AND NOT mi_cur_page IS INITIAL.
ls_stack-page = mi_cur_page.
ls_stack-bookmark = iv_with_bookmark.
APPEND ls_stack TO mt_stack.
ENDIF.
mi_cur_page = ii_page.
render( ).
ENDMETHOD.
METHOD constructor.
IF io_component IS BOUND.
IF zcl_abapgit_gui_utils=>is_renderable( io_component ) = abap_true.
mi_cur_page ?= io_component. " direct page
ELSE.
IF zcl_abapgit_gui_utils=>is_event_handler( io_component ) = abap_false.
zcx_abapgit_exception=>raise( 'Component must be renderable or be an event handler' ).
ENDIF.
mi_router ?= io_component.
ENDIF.
ENDIF.
CREATE OBJECT mo_html_parts.
mv_rollback_on_error = iv_rollback_on_error.
mi_asset_man = ii_asset_man.
mi_hotkey_ctl = ii_hotkey_ctl.
mi_html_processor = ii_html_processor. " Maybe improve to middlewares stack ??
startup( ).
ENDMETHOD.
METHOD free.
SET HANDLER me->on_event FOR mi_html_viewer ACTIVATION space.
mi_html_viewer->close_document( ).
mi_html_viewer->free( ).
FREE mi_html_viewer.
ENDMETHOD.
METHOD go_home.
DATA: ls_stack LIKE LINE OF mt_stack,
lv_mode TYPE tabname.
IF mi_router IS BOUND.
CLEAR: mt_stack, mt_event_handlers.
APPEND mi_router TO mt_event_handlers.
" on_event doesn't accept strings directly
GET PARAMETER ID 'DBT' FIELD lv_mode.
CASE lv_mode.
WHEN 'ZABAPGIT'.
on_event( action = |{ c_action-go_db }| ).
WHEN OTHERS.
on_event( action = |{ c_action-go_home }| ).
ENDCASE.
ELSE.
IF lines( mt_stack ) > 0.
READ TABLE mt_stack INTO ls_stack INDEX 1.
mi_cur_page = ls_stack-page.
ENDIF.
render( ).
ENDIF.
ENDMETHOD.
METHOD go_page.
IF iv_clear_stack = abap_true.
CLEAR mt_stack.
ENDIF.
mi_cur_page = ii_page.
render( ).
ENDMETHOD.
METHOD handle_action.
DATA:
lx_exception TYPE REF TO zcx_abapgit_exception,
li_handler TYPE REF TO zif_abapgit_gui_event_handler,
li_event TYPE REF TO zif_abapgit_gui_event,
ls_handled TYPE zif_abapgit_gui_event_handler=>ty_handling_result.
CREATE OBJECT li_event TYPE zcl_abapgit_gui_event
EXPORTING
ii_gui_services = me
iv_action = iv_action
iv_getdata = iv_getdata
it_postdata = it_postdata.
TRY.
LOOP AT mt_event_handlers INTO li_handler.
ls_handled = li_handler->on_event( li_event ).
IF ls_handled-state IS NOT INITIAL AND ls_handled-state <> c_event_state-not_handled. " is handled
EXIT.
ENDIF.
ENDLOOP.
CASE ls_handled-state.
WHEN c_event_state-re_render.
render( ).
WHEN c_event_state-new_page.
call_page( ls_handled-page ).
WHEN c_event_state-new_page_w_bookmark.
call_page(
ii_page = ls_handled-page
iv_with_bookmark = abap_true ).
WHEN c_event_state-new_page_replacing.
call_page(
ii_page = ls_handled-page
iv_replacing = abap_true ).
WHEN c_event_state-go_back.
back( ).
WHEN c_event_state-go_back_to_bookmark.
back( abap_true ).
WHEN c_event_state-no_more_act.
" Do nothing, handling completed
WHEN OTHERS.
zcx_abapgit_exception=>raise( |Unknown action: { iv_action }| ).
ENDCASE.
CATCH zcx_abapgit_cancel ##NO_HANDLER.
" Do nothing = gc_event_state-no_more_act
CATCH zcx_abapgit_exception INTO lx_exception.
handle_error( lx_exception ).
ENDTRY.
ENDMETHOD.
METHOD handle_error.
DATA: li_gui_error_handler TYPE REF TO zif_abapgit_gui_error_handler,
lx_exception TYPE REF TO cx_root.
IF mv_rollback_on_error = abap_true.
ROLLBACK WORK.
ENDIF.
TRY.
li_gui_error_handler ?= mi_cur_page.
IF li_gui_error_handler IS BOUND AND li_gui_error_handler->handle_error( ix_exception ) = abap_true.
" We rerender the current page to display the error box
render( ).
ELSE.
MESSAGE ix_exception TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.
CATCH zcx_abapgit_exception cx_sy_move_cast_error INTO lx_exception.
" In case of fire we just fallback to plain old message
MESSAGE lx_exception TYPE 'S' DISPLAY LIKE 'E'.
ENDTRY.
ENDMETHOD.
METHOD on_event.
handle_action(
iv_action = action
iv_getdata = getdata
it_postdata = postdata ).
ENDMETHOD.
METHOD render.
DATA: lv_url TYPE w3url,
lv_html TYPE string,
li_html TYPE REF TO zif_abapgit_html.
IF mi_cur_page IS NOT BOUND.
zcx_abapgit_exception=>raise( 'GUI error: no current page' ).
ENDIF.
CLEAR mt_event_handlers.
mo_html_parts->clear( ).
IF mi_router IS BOUND.
APPEND mi_router TO mt_event_handlers.
ENDIF.
IF mi_hotkey_ctl IS BOUND.
mi_hotkey_ctl->reset( ).
ENDIF.
li_html = mi_cur_page->render( ).
lv_html = li_html->render( iv_no_indent_jscss = abap_true ).
IF mi_html_processor IS BOUND.
lv_html = mi_html_processor->process(
iv_html = lv_html
ii_gui_services = me ).
ENDIF.
lv_url = cache_html( lv_html ).
mi_html_viewer->show_url( lv_url ).
ENDMETHOD.
METHOD startup.
DATA: lt_events TYPE cntl_simple_events,
ls_event LIKE LINE OF lt_events,
lt_assets TYPE zif_abapgit_gui_asset_manager=>ty_web_assets.
FIELD-SYMBOLS <ls_asset> LIKE LINE OF lt_assets.
mi_html_viewer = zcl_abapgit_ui_factory=>get_html_viewer( ).
IF mi_asset_man IS BOUND.
lt_assets = mi_asset_man->get_all_assets( ).
LOOP AT lt_assets ASSIGNING <ls_asset> WHERE is_cacheable = abap_true.
zif_abapgit_gui_services~cache_asset(
iv_xdata = <ls_asset>-content
iv_url = <ls_asset>-url
iv_type = <ls_asset>-type
iv_subtype = <ls_asset>-subtype ).
ENDLOOP.
ENDIF.
ls_event-eventid = mi_html_viewer->m_id_sapevent.
ls_event-appl_event = abap_true.
APPEND ls_event TO lt_events.
mi_html_viewer->set_registered_events( lt_events ).
SET HANDLER me->on_event FOR mi_html_viewer.
ENDMETHOD.
METHOD zif_abapgit_gui_services~cache_asset.
DATA: lt_xdata TYPE lvc_t_mime,
lv_size TYPE i,
lt_html TYPE w3htmltab.
ASSERT iv_text IS SUPPLIED OR iv_xdata IS SUPPLIED.
IF iv_text IS SUPPLIED. " String input
zcl_abapgit_convert=>string_to_tab(
EXPORTING
iv_str = iv_text
IMPORTING
ev_size = lv_size
et_tab = lt_html ).
mi_html_viewer->load_data(
EXPORTING
iv_type = iv_type
iv_subtype = iv_subtype
iv_size = lv_size
iv_url = iv_url
IMPORTING
ev_assigned_url = rv_url
CHANGING
ct_data_table = lt_html
EXCEPTIONS
OTHERS = 1 ).
ELSE. " Raw input
zcl_abapgit_convert=>xstring_to_bintab(
EXPORTING
iv_xstr = iv_xdata
IMPORTING
ev_size = lv_size
et_bintab = lt_xdata ).
mi_html_viewer->load_data(
EXPORTING
iv_type = iv_type
iv_subtype = iv_subtype
iv_size = lv_size
iv_url = iv_url
IMPORTING
ev_assigned_url = rv_url
CHANGING
ct_data_table = lt_xdata
EXCEPTIONS
OTHERS = 1 ).
ENDIF.
ASSERT sy-subrc = 0. " Image data error
ENDMETHOD.
METHOD zif_abapgit_gui_services~get_current_page_name.
IF mi_cur_page IS BOUND.
rv_page_name = cl_abap_classdescr=>describe_by_object_ref( mi_cur_page )->get_relative_name( ).
ENDIF." ELSE - return is empty => initial page
ENDMETHOD.
METHOD zif_abapgit_gui_services~get_hotkeys_ctl.
ri_hotkey_ctl = mi_hotkey_ctl.
ENDMETHOD.
METHOD zif_abapgit_gui_services~get_html_parts.
ro_parts = mo_html_parts.
ENDMETHOD.
METHOD zif_abapgit_gui_services~register_event_handler.
ASSERT ii_event_handler IS BOUND.
INSERT ii_event_handler INTO mt_event_handlers INDEX 1.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
30416,
764,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
15596,
62,
5219,
11,
198,
220,
220,
220,
220,
220,
220,
220,
407,
62,
38788,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
26173,
8924,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
302,
62,
13287,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
26173,
8924,
352,
11,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7700,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
26173,
8924,
362,
11,
198,
220,
220,
220,
220,
220,
220,
220,
467,
62,
1891,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
26173,
8924,
513,
11,
198,
220,
220,
220,
220,
220,
220,
220,
645,
62,
3549,
62,
529,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
26173,
8924,
604,
11,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7700,
62,
86,
62,
2070,
4102,
41876,
1312,
26173,
8924,
642,
11,
198,
220,
220,
220,
220,
220,
220,
220,
467,
62,
1891,
62,
1462,
62,
2070,
4102,
41876,
1312,
26173,
8924,
718,
11,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7700,
62,
35666,
4092,
220,
41876,
1312,
26173,
8924,
767,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
15596,
62,
5219,
764,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
2673,
11,
198,
220,
220,
220,
220,
220,
220,
220,
467,
62,
11195,
41876,
4731,
26173,
8924,
705,
2188,
62,
11195,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
467,
62,
9945,
220,
220,
41876,
4731,
26173,
8924,
705,
2188,
62,
9945,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
2673,
764,
628,
220,
220,
220,
337,
36252,
50,
467,
62,
11195,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
467,
62,
7700,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
7700,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
13287,
540,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
20063,
62,
25558,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
736,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
1462,
62,
2070,
4102,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
37023,
8,
220,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
319,
62,
15596,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
49261,
473,
431,
1151,
3963,
1976,
361,
62,
397,
499,
18300,
62,
6494,
62,
1177,
263,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
2673,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
14535,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
1136,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
7353,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
22766,
62,
11487,
764,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
42895,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
2134,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
562,
316,
62,
805,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
562,
316,
62,
37153,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
8940,
2539,
62,
34168,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
8940,
2539,
62,
34168,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
6494,
62,
41341,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
6494,
62,
41341,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
2487,
1891,
62,
261,
62,
18224,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
1479,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
7700,
62,
25558,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2443,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
13287,
540,
11,
198,
220,
220,
220,
220,
220,
220,
220,
44007,
41876
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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ter TYPE zif_abapgit_definitions=>ty_tadir_tt OPTIONAL
RAISING
zcx_abapgit_exception .
CLASS-METHODS export_object
RAISING
zcx_abapgit_exception
zcx_abapgit_cancel .
CLASS-METHODS export_package
RAISING
zcx_abapgit_exception
zcx_abapgit_cancel .
CLASS-METHODS load
RETURNING
VALUE(rt_files) TYPE zif_abapgit_definitions=>ty_files_tt
RAISING
zcx_abapgit_exception .
PROTECTED SECTION.
PRIVATE SECTION.
CLASS-METHODS encode_files
IMPORTING
!it_files TYPE zif_abapgit_definitions=>ty_files_item_tt
RETURNING
VALUE(rv_xstr) TYPE xstring
RAISING
zcx_abapgit_exception .
CLASS-METHODS filename
IMPORTING
!iv_str TYPE string
EXPORTING
!ev_path TYPE string
!ev_filename TYPE string
RAISING
zcx_abapgit_exception .
CLASS-METHODS file_download
IMPORTING
!iv_package TYPE devclass
!iv_xstr TYPE xstring
RAISING
zcx_abapgit_exception .
CLASS-METHODS normalize_path
CHANGING
!ct_files TYPE zif_abapgit_definitions=>ty_files_tt
RAISING
zcx_abapgit_exception .
CLASS-METHODS unzip_file
IMPORTING
!iv_xstr TYPE xstring
RETURNING
VALUE(rt_files) TYPE zif_abapgit_definitions=>ty_files_tt
RAISING
zcx_abapgit_exception .
ENDCLASS.
CLASS ZCL_ABAPGIT_ZIP IMPLEMENTATION.
METHOD encode_files.
DATA: lo_zip TYPE REF TO cl_abap_zip,
lv_filename TYPE string.
FIELD-SYMBOLS: <ls_file> LIKE LINE OF it_files.
CREATE OBJECT lo_zip.
LOOP AT it_files ASSIGNING <ls_file>.
CONCATENATE <ls_file>-file-path+1 <ls_file>-file-filename INTO lv_filename.
lo_zip->add( name = lv_filename
content = <ls_file>-file-data ).
ENDLOOP.
rv_xstr = lo_zip->save( ).
ENDMETHOD.
METHOD export.
DATA: lo_log TYPE REF TO zcl_abapgit_log,
lt_zip TYPE zif_abapgit_definitions=>ty_files_item_tt,
lv_package TYPE devclass.
CREATE OBJECT lo_log.
lv_package = io_repo->get_package( ).
IF zcl_abapgit_factory=>get_sap_package( lv_package )->exists( ) = abap_false.
zcx_abapgit_exception=>raise( |Package { lv_package } doesn't exist| ).
ENDIF.
lt_zip = io_repo->get_files_local( io_log = lo_log
it_filter = it_filter ).
IF lo_log->count( ) > 0.
lo_log->show( ).
ENDIF.
file_download( iv_package = io_repo->get_package( )
iv_xstr = encode_files( lt_zip ) ).
ENDMETHOD.
METHOD export_object.
DATA: ls_tadir TYPE zif_abapgit_definitions=>ty_tadir,
lv_folder TYPE string,
lv_fullpath TYPE string,
lt_rawdata TYPE solix_tab,
lv_sep TYPE c LENGTH 1,
ls_files_item TYPE zcl_abapgit_objects=>ty_serialization.
STATICS: sv_prev TYPE string.
FIELD-SYMBOLS: <ls_file> LIKE LINE OF ls_files_item-files.
ls_tadir = zcl_abapgit_ui_factory=>get_popups( )->popup_object( ).
IF ls_tadir IS INITIAL.
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
ENDIF.
ls_files_item-item-obj_type = ls_tadir-object.
ls_files_item-item-obj_name = ls_tadir-obj_name.
ls_files_item = zcl_abapgit_objects=>serialize( is_item = ls_files_item-item
iv_language = sy-langu ).
IF lines( ls_files_item-files ) = 0.
MESSAGE 'Empty' TYPE 'S'.
RETURN.
ENDIF.
cl_gui_frontend_services=>directory_browse(
EXPORTING
initial_folder = sv_prev
CHANGING
selected_folder = lv_folder ).
IF lv_folder IS INITIAL.
RETURN.
ENDIF.
sv_prev = lv_folder.
cl_gui_frontend_services=>get_file_separator(
CHANGING
file_separator = lv_sep ).
LOOP AT ls_files_item-files ASSIGNING <ls_file>.
CONCATENATE lv_folder lv_sep <ls_file>-filename INTO lv_fullpath.
lt_rawdata = cl_bcs_convert=>xstring_to_solix( <ls_file>-data ).
cl_gui_frontend_services=>gui_download(
EXPORTING
bin_filesize = xstrlen( <ls_file>-data )
filename = lv_fullpath
filetype = 'BIN'
CHANGING
data_tab = lt_rawdata
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from gui_download' ).
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD export_package.
DATA: lo_repo TYPE REF TO zcl_abapgit_repo_offline,
ls_data TYPE zif_abapgit_persistence=>ty_repo,
li_popups TYPE REF TO zif_abapgit_popups.
ls_data-key = 'DUMMY'.
ls_data-dot_abapgit = zcl_abapgit_dot_abapgit=>build_default( )->get_data( ).
li_popups = zcl_abapgit_ui_factory=>get_popups( ).
li_popups->popup_package_export(
IMPORTING
ev_package = ls_data-package
ev_folder_logic = ls_data-dot_abapgit-folder_logic ).
IF ls_data-package IS INITIAL.
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
ENDIF.
CREATE OBJECT lo_repo
EXPORTING
is_data = ls_data.
export( lo_repo ).
ENDMETHOD.
METHOD filename.
IF iv_str CA '/'.
FIND REGEX '(.*/)(.*)' IN iv_str
SUBMATCHES ev_path ev_filename.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Malformed path' ).
ENDIF.
IF ev_path <> '/'.
CONCATENATE '/' ev_path INTO ev_path.
ENDIF.
ELSE.
ev_path = '/'.
ev_filename = iv_str.
ENDIF.
TRANSLATE ev_filename TO LOWER CASE.
ENDMETHOD.
METHOD file_download.
DATA:
lv_path TYPE string,
lv_default TYPE string,
lo_fe_serv TYPE REF TO zif_abapgit_frontend_services,
lv_package TYPE devclass.
lv_package = iv_package.
TRANSLATE lv_package USING '/#'.
CONCATENATE lv_package '_' sy-datlo '_' sy-timlo INTO lv_default.
lo_fe_serv = zcl_abapgit_factory=>get_frontend_services( ).
lv_path = lo_fe_serv->show_file_save_dialog(
iv_title = 'Export ZIP'
iv_extension = 'zip'
iv_default_filename = lv_default ).
lo_fe_serv->file_download(
iv_path = lv_path
iv_xstr = iv_xstr ).
ENDMETHOD.
METHOD load.
DATA: lv_path TYPE string,
lv_xstr TYPE xstring.
lv_path = zcl_abapgit_factory=>get_frontend_services( )->show_file_open_dialog(
iv_title = 'Import ZIP'
iv_default_filename = '*.zip' ).
lv_xstr = zcl_abapgit_factory=>get_frontend_services( )->file_upload( lv_path ).
rt_files = unzip_file( lv_xstr ).
ENDMETHOD.
METHOD normalize_path.
* removes first folder from path if needed
DATA: lt_split TYPE TABLE OF string,
lv_needed TYPE abap_bool,
lv_length TYPE i,
lv_split LIKE LINE OF lt_split.
FIELD-SYMBOLS: <ls_file> LIKE LINE OF ct_files.
READ TABLE ct_files INDEX 1 ASSIGNING <ls_file>.
IF sy-subrc <> 0.
RETURN.
ENDIF.
SPLIT <ls_file>-path AT '/' INTO TABLE lt_split.
IF sy-subrc <> 0.
RETURN.
ENDIF.
READ TABLE lt_split INDEX 2 INTO lv_split.
IF sy-subrc <> 0 OR strlen( lv_split ) = 0.
RETURN.
ENDIF.
CONCATENATE '/' lv_split '/*' INTO lv_split.
lv_needed = abap_true.
LOOP AT ct_files ASSIGNING <ls_file>.
IF NOT <ls_file>-path CP lv_split.
lv_needed = abap_false.
EXIT. " current loop
ENDIF.
ENDLOOP.
IF lv_needed = abap_true.
lv_length = strlen( lv_split ) - 2.
LOOP AT ct_files ASSIGNING <ls_file>.
<ls_file>-path = <ls_file>-path+lv_length.
ENDLOOP.
ENDIF.
ENDMETHOD.
METHOD unzip_file.
DATA: lo_zip TYPE REF TO cl_abap_zip,
lv_data TYPE xstring.
FIELD-SYMBOLS: <ls_zipfile> LIKE LINE OF lo_zip->files,
<ls_file> LIKE LINE OF rt_files.
CREATE OBJECT lo_zip.
lo_zip->load( EXPORTING
zip = iv_xstr
EXCEPTIONS
zip_parse_error = 1
OTHERS = 2 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from zip' ).
ENDIF.
LOOP AT lo_zip->files ASSIGNING <ls_zipfile>.
lo_zip->get(
EXPORTING
name = <ls_zipfile>-name
IMPORTING
content = lv_data
EXCEPTIONS
zip_index_error = 1
zip_decompression_error = 2
OTHERS = 3 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from zip get' ).
ENDIF.
APPEND INITIAL LINE TO rt_files ASSIGNING <ls_file>.
filename(
EXPORTING
iv_str = <ls_zipfile>-name
IMPORTING
ev_path = <ls_file>-path
ev_filename = <ls_file>-filename ).
<ls_file>-data = lv_data.
<ls_file>-sha1 = zcl_abapgit_hash=>sha1( iv_type = zif_abapgit_definitions=>c_type-blob
iv_data = <ls_file>-data ).
ENDLOOP.
DELETE rt_files WHERE filename IS INITIAL.
normalize_path( CHANGING ct_files = rt_files ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
13344,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
10784,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
260,
7501,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
24455,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
83,
324,
343,
62,
926,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
10784,
62,
15252,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
66,
21130,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
10784,
62,
26495,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
66,
21130,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
3440,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
16624,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
16624,
62,
926,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
37773,
62,
16624,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
16624,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
16624,
62,
9186,
62,
926,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
87,
2536,
8,
41876,
2124,
8841,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
29472,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
2536,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
1990,
62,
6978,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
1990,
62,
34345,
41876,
4731,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
2393,
62,
15002,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
87,
2536,
220,
220,
220,
41876,
2124,
8841,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
3487,
1096,
62,
6978,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
310,
62,
16624,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
16624,
62,
926,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
555,
13344,
62,
7753,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
87,
2536,
220,
220,
220,
220,
220,
220,
220,
41876,
2124,
8841,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
16624,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
16624,
62,
926,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
57,
4061,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
37773,
62,
16624,
13,
628,
220,
220,
220,
42865,
25,
2376,
62,
13344,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
13344,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
34345,
41876,
4731,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
7753,
29,
34178,
48920,
3963,
340,
62,
16624,
13,
628,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
2376,
62,
13344,
13,
628,
220,
220,
220,
17579,
3185,
5161,
340,
62,
16624,
24994,
3528,
15871,
1279,
7278,
62,
7753,
28401,
198,
220,
220,
220,
220,
220,
39962,
1404,
1677,
6158,
1279,
7278,
62,
7753,
29,
12,
7753,
12,
6978,
10,
16,
1279,
7278,
62,
7753,
29,
12,
7753,
12,
34345,
39319,
300,
85,
62,
34345,
13,
198,
220,
220,
220,
220,
220,
2376,
62,
13344,
3784,
2860,
7,
1438,
220,
220,
220,
796,
300,
85,
62,
34345,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ltcl_lock_travel DEFINITION DEFERRED.
CLASS /dmo/cl_flight_legacy01 DEFINITION LOCAL FRIENDS ltcl_lock_travel.
CLASS ltcl_lock_travel DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PRIVATE SECTION.
METHODS:
got_lock FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS ltcl_lock_travel IMPLEMENTATION.
METHOD got_lock ##NEEDED.
ENDMETHOD.
ENDCLASS.
CLASS ltc_travel DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PROTECTED SECTION.
CONSTANTS mc_use_sql_doubles TYPE abap_bool VALUE abap_false.
CONSTANTS mc_msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_01'.
* SQL doubles currently not available in cloud environment
* CLASS-DATA mr_test_environment TYPE REF TO if_osql_test_environment.
CLASS-DATA gr_cut TYPE REF TO /dmo/cl_flight_legacy01.
CLASS-DATA gv_agency_id_1 TYPE /dmo/agency_id01.
CLASS-DATA gv_agency_id_2 TYPE /dmo/agency_id01.
CLASS-DATA gv_agency_id_unknown TYPE /dmo/agency_id01.
CLASS-DATA gv_customer_id_1 TYPE /dmo/customer_id01.
CLASS-DATA gv_customer_id_2 TYPE /dmo/customer_id01.
CLASS-DATA gv_customer_id_unknown TYPE /dmo/customer_id01.
METHODS _create_travel IMPORTING is_travel TYPE /dmo/if_flight_legacy01=>ts_travel_in
iv_save TYPE abap_bool DEFAULT abap_true
RETURNING VALUE(rs_travel) TYPE /dmo/travel01.
METHODS _delete_existing_travel IMPORTING iv_travel_id TYPE /dmo/travel_id01.
PRIVATE SECTION.
DATA mv_travel_count TYPE i.
DATA mv_booking_count TYPE i.
DATA mv_booking_supplement_count TYPE i.
CLASS-METHODS class_setup.
METHODS setup.
METHODS teardown.
CLASS-METHODS class_teardown.
"! Create and check a single travel
METHODS create FOR TESTING RAISING cx_static_check.
"! Try to create a travel with an unknown agency -> ERROR
METHODS c_agency_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a travel with an unknown customer -> ERROR
METHODS c_customer_unknown FOR TESTING RAISING cx_static_check.
"! Create 2 travels in the same LUW
METHODS create_mutiple_calls FOR TESTING RAISING cx_static_check.
"! Create a single travel
METHODS create_single FOR TESTING RAISING cx_static_check.
"! Delete a single travel
METHODS delete_single FOR TESTING RAISING cx_static_check.
"! Update a single travel
METHODS update_single FOR TESTING RAISING cx_static_check.
"! Try to delete a single travel with unknown Travel ID -> ERROR
METHODS d_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a single travel with unknown Travel ID -> ERROR
METHODS u_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Delete multiple travels
METHODS delete_multiple FOR TESTING RAISING cx_static_check.
"! Update multiple travels
METHODS update_multiple FOR TESTING RAISING cx_static_check.
"! Update a single travel twice in the same LUW
METHODS update_twice FOR TESTING RAISING cx_static_check.
"! Update, delete a single travel in the same LUW
METHODS update_delete_single FOR TESTING RAISING cx_static_check.
"! Try to update a single travel with an unknown agency -> ERROR
METHODS u_agency_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a single travel with an unknown customer -> ERROR
METHODS u_customer_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a single travel with an initial Travel ID -> ERROR
METHODS d_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a single travel with an initial Travel ID -> ERROR
METHODS u_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Call action to set booking status
METHODS act_set_status_to_booked FOR TESTING RAISING cx_static_check.
"! Try to create a travel with faulty dates -> Error
METHODS c_dates_invalid FOR TESTING RAISING cx_static_check.
"! Try to update a travel with faulty dates -> Error
METHODS u_dates_invalid FOR TESTING RAISING cx_static_check.
"! Reset buffer
METHODS initialize FOR TESTING RAISING cx_static_check.
"! Create, update a single travel in the same LUW
METHODS create_update_in_one_luw FOR TESTING RAISING cx_static_check.
"! Create, delete a single travel in the same LUW
METHODS create_delete_in_one_luw FOR TESTING RAISING cx_static_check.
"! Update, delete a single travel in the same LUW
METHODS update_delete_in_one_luw FOR TESTING RAISING cx_static_check.
"! Try to delete, update a single travel in the same LUW -> ERROR
METHODS delete_update_in_one_luw FOR TESTING RAISING cx_static_check.
"! Delete, delete a single travel in the same LUW -> Error
METHODS delete_delete_in_one_luw FOR TESTING RAISING cx_static_check.
"! Try to update a travel with no control structure -> ERROR
METHODS u_no_control FOR TESTING RAISING cx_static_check.
"! Try to change the travel status to an invalid value -> ERROR
METHODS u_status_invalid FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS /dmo/cl_flight_legacy01 DEFINITION LOCAL FRIENDS ltc_travel.
CLASS ltc_travel IMPLEMENTATION.
METHOD class_setup.
IF mc_use_sql_doubles = abap_true ##BOOL_OK.
* mr_test_environment = cl_osql_test_environment=>create( i_dependency_list = VALUE #( ( '/DMO/TRAVEL01' ) ( '/DMO/BOOKING01' ) ( '/DMO/BOOK_SUP_01' )
* ( '/DMO/AGENCY01' ) ( '/DMO/CUSTOMER01' ) ( '/DMO/FLIGHT01' ) ( '/DMO/SUPPLEME_01' ) ) ).
* mr_test_environment->clear_doubles( ).
* gv_agency_id_1 = '42'.
* gv_agency_id_2 = '43'.
* DATA lt_agency TYPE STANDARD TABLE OF /dmo/agency01.
* lt_agency = VALUE #( ( agency_id = gv_agency_id_1 ) ( agency_id = gv_agency_id_2 ) ).
* mr_test_environment->insert_test_data( lt_agency ).
*
* gv_customer_id_1 = '42'.
* gv_customer_id_2 = '43'.
* DATA lt_customer TYPE STANDARD TABLE OF /dmo/customer01.
* lt_customer = VALUE #( ( customer_id = gv_customer_id_1 ) ( customer_id = gv_customer_id_2 ) ).
* mr_test_environment->insert_test_data( lt_customer ).
*
* gv_agency_id_unknown = '99'.
* gv_customer_id_unknown = '99'.
ELSE.
DATA lt_agency_id TYPE SORTED TABLE OF /dmo/agency_id01 WITH UNIQUE KEY table_line.
SELECT DISTINCT agency_id FROM /dmo/agency01 ORDER BY agency_id DESCENDING INTO TABLE @lt_agency_id .
DATA lt_customer_id TYPE SORTED TABLE OF /dmo/customer_id01 WITH UNIQUE KEY table_line.
SELECT DISTINCT customer_id FROM /dmo/customer01 ORDER BY customer_id DESCENDING INTO TABLE @lt_customer_id .
" Select 2 known agency IDs
IF lines( lt_agency_id ) < 2.
cl_abap_unit_assert=>abort( msg = 'No agency data!' ).
ENDIF.
gv_agency_id_1 = lt_agency_id[ 1 ].
gv_agency_id_2 = lt_agency_id[ 2 ].
cl_abap_unit_assert=>assert_differs( act = gv_agency_id_1 exp = gv_agency_id_2 )." To be totally sure
" Select 2 known customer IDs
IF lines( lt_customer_id ) < 2.
cl_abap_unit_assert=>abort( msg = 'No customer data!' ).
ENDIF.
gv_customer_id_1 = lt_customer_id[ 1 ].
gv_customer_id_2 = lt_customer_id[ 2 ].
cl_abap_unit_assert=>assert_differs( act = gv_customer_id_1 exp = gv_customer_id_2 )." To be totally sure
" Determine an unknown agency ID
gv_agency_id_unknown = lt_agency_id[ 1 ].
DO.
gv_agency_id_unknown = gv_agency_id_unknown + 1.
READ TABLE lt_agency_id TRANSPORTING NO FIELDS WITH TABLE KEY table_line = gv_agency_id_unknown.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
" Determine an unknown customer ID
gv_customer_id_unknown = lt_customer_id[ 1 ].
DO.
gv_customer_id_unknown = gv_customer_id_unknown + 1.
READ TABLE lt_customer_id TRANSPORTING NO FIELDS WITH TABLE KEY table_line = gv_customer_id_unknown.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
ENDIF.
gr_cut = NEW #( ).
ENDMETHOD.
METHOD setup.
SELECT COUNT( * ) FROM /dmo/travel01 INTO @mv_travel_count.
SELECT COUNT( * ) FROM /dmo/booking01 INTO @mv_booking_count.
SELECT COUNT( * ) FROM /dmo/book_sup_01 INTO @mv_booking_supplement_count.
ENDMETHOD.
METHOD teardown.
" Ensure proper cleanup of each individual test method
SELECT COUNT( * ) FROM /dmo/travel01 INTO @DATA(lv_travel_count).
cl_abap_unit_assert=>assert_equals( act = lv_travel_count exp = mv_travel_count ).
SELECT COUNT( * ) FROM /dmo/booking01 INTO @DATA(lv_booking_count).
cl_abap_unit_assert=>assert_equals( act = lv_booking_count exp = mv_booking_count ).
SELECT COUNT( * ) FROM /dmo/book_sup_01 INTO @DATA(lv_booking_supplement_count).
cl_abap_unit_assert=>assert_equals( act = lv_booking_supplement_count exp = mv_booking_supplement_count ).
ENDMETHOD.
METHOD class_teardown.
IF mc_use_sql_doubles = abap_true ##BOOL_OK ##NEEDED.
* mr_test_environment->destroy( ).
ENDIF.
ENDMETHOD.
METHOD create.
SELECT COUNT( * ) FROM /dmo/travel01 INTO @DATA(lv_count1).
DATA lv_start TYPE timestampl.
GET TIME STAMP FIELD lv_start.
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' )
IMPORTING es_travel = DATA(ls_travel_new)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_new-travel_id ).
gr_cut->save( ).
DATA lv_end TYPE timestampl.
GET TIME STAMP FIELD lv_end.
SELECT COUNT( * ) FROM /dmo/travel01 INTO @DATA(lv_count2).
cl_abap_unit_assert=>assert_equals( msg = 'create should add a travel' exp = 1 act = lv_count2 - lv_count1 ).
SELECT * FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO TABLE @DATA(lt_travel).
cl_abap_unit_assert=>assert_equals( msg = 'cannot read created travel' exp = 1 act = lines( lt_travel ) ).
DATA(ls_travel) = lt_travel[ 1 ].
cl_abap_unit_assert=>assert_equals( msg = 'createdby' exp = ls_travel-createdby act = sy-uname ).
cl_abap_unit_assert=>assert_number_between( msg = 'createdat' number = ls_travel-createdat lower = lv_start upper = lv_end ).
cl_abap_unit_assert=>assert_equals( msg = 'status' act = ls_travel-status exp = CONV /dmo/travel_status01( /dmo/if_flight_legacy01=>travel_status-new ) ).
_delete_existing_travel( ls_travel_new-travel_id ).
ENDMETHOD.
METHOD create_mutiple_calls.
DATA lv_start TYPE timestampl.
GET TIME STAMP FIELD lv_start.
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' )
IMPORTING es_travel = DATA(ls_travel_1)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_1-travel_id ).
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' )
IMPORTING es_travel = DATA(ls_travel_2)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_2-travel_id ).
cl_abap_unit_assert=>assert_false( xsdbool( ls_travel_1-travel_id = ls_travel_2-travel_id ) ).
gr_cut->save( ).
DATA lv_end TYPE timestampl.
GET TIME STAMP FIELD lv_end.
SELECT * FROM /dmo/travel01 WHERE travel_id = @ls_travel_1-travel_id OR travel_id = @ls_travel_2-travel_id INTO TABLE @DATA(lt_travel) ##SELECT_FAE_WITH_LOB[DESCRIPTION].
cl_abap_unit_assert=>assert_equals( msg = 'cannot read created travel' exp = 2 act = lines( lt_travel ) ).
DATA(ls_travel) = lt_travel[ 1 ].
cl_abap_unit_assert=>assert_equals( msg = 'createdby' exp = ls_travel-createdby act = sy-uname ).
cl_abap_unit_assert=>assert_number_between( msg = 'createdat' number = ls_travel-createdat lower = lv_start upper = lv_end ).
cl_abap_unit_assert=>assert_equals( msg = 'status' act = ls_travel-status exp = CONV /dmo/travel_status01( /dmo/if_flight_legacy01=>travel_status-new ) ).
_delete_existing_travel( ls_travel_1-travel_id ).
_delete_existing_travel( ls_travel_2-travel_id ).
ENDMETHOD.
METHOD c_agency_unknown.
SELECT COUNT( * ) FROM /dmo/travel01 INTO @DATA(lv_count1).
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_unknown customer_id = gv_customer_id_2 )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
gr_cut->save( ).
SELECT COUNT( * ) FROM /dmo/travel01 INTO @DATA(lv_count2).
cl_abap_unit_assert=>assert_equals( msg = 'should not create bad travel' exp = lv_count1 act = lv_count2 ).
DATA lv_msg_found TYPE abap_bool.
LOOP AT lt_messages INTO DATA(lr_message) ##INTO_OK.
IF lr_message->t100key = /dmo/cx_flight_legacy01=>agency_unkown.
lv_msg_found = abap_true.
ENDIF.
ENDLOOP.
cl_abap_unit_assert=>assert_equals( msg = 'missing error' exp = abap_true act = lv_msg_found ).
ENDMETHOD.
METHOD c_customer_unknown.
SELECT COUNT( * ) FROM /dmo/travel01 INTO @DATA(lv_count1).
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_unknown )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
gr_cut->save( ).
SELECT COUNT( * ) FROM /dmo/travel01 INTO @DATA(lv_count2).
cl_abap_unit_assert=>assert_equals( msg = 'should not create bad travel' exp = lv_count1 act = lv_count2 ).
DATA lv_msg_found TYPE abap_bool.
LOOP AT lt_messages INTO DATA(lr_message) ##INTO_OK.
IF lr_message->t100key = /dmo/cx_flight_legacy01=>customer_unkown.
lv_msg_found = abap_true.
ENDIF.
ENDLOOP.
cl_abap_unit_assert=>assert_equals( msg = 'missing error' exp = abap_true act = lv_msg_found ).
ENDMETHOD.
METHOD create_single.
DATA lv_timestampl TYPE timestampl.
GET TIME STAMP FIELD lv_timestampl.
SELECT MAX( travel_id ) FROM /dmo/travel01 INTO @DATA(lv_travel_id_max).
DATA lv_travel_id_1 TYPE /dmo/travel_id01.
DATA lv_travel_id_2 TYPE /dmo/travel_id01.
lv_travel_id_1 = lv_travel_id_max + 1.
IF lv_travel_id_1 IS INITIAL.
cl_abap_unit_assert=>abort( msg = 'Travel ID overflow!' ).
ENDIF.
lv_travel_id_2 = lv_travel_id_max + 2.
IF lv_travel_id_2 IS INITIAL.
cl_abap_unit_assert=>abort( msg = 'Travel ID overflow!' ).
ENDIF.
" Create a travel
cl_abap_unit_assert=>assert_equals( act = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201'
status = /dmo/if_flight_legacy01=>travel_status-booked ) )-travel_id exp = lv_travel_id_1 ).
" Create a second travel
cl_abap_unit_assert=>assert_equals( act = _create_travel( VALUE #( agency_id = gv_agency_id_2 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201'
status = /dmo/if_flight_legacy01=>travel_status-booked ) )-travel_id exp = lv_travel_id_2 ).
" Select and check the second travel
DATA ls_travel_sel TYPE /dmo/travel01.
SELECT SINGLE * FROM /dmo/travel01 WHERE travel_id = @lv_travel_id_2 INTO @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = gv_agency_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-status exp = CONV /dmo/travel_status01( /dmo/if_flight_legacy01=>travel_status-new ) )." Provided status overridden by determination
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-createdby exp = sy-uname ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-lastchangedby exp = sy-uname ).
cl_abap_unit_assert=>assert_true( xsdbool( ls_travel_sel-createdat = ls_travel_sel-lastchangedat ) ).
DATA(lv_diff) = CONV i( cl_abap_tstmp=>subtract( tstmp1 = ls_travel_sel-createdat tstmp2 = lv_timestampl ) ).
cl_abap_unit_assert=>assert_true( xsdbool( 0 <= lv_diff AND lv_diff <= 1 ) ).
_delete_existing_travel( lv_travel_id_1 ).
_delete_existing_travel( lv_travel_id_2 ).
ENDMETHOD.
METHOD delete_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Description' ) ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_new-description exp = 'My_Description' ).
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO @DATA(lv_description).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new-description ).
_delete_existing_travel( ls_travel_new-travel_id ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @ls_travel_new-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD update_single.
DATA lv_timestampl TYPE timestampl.
GET TIME STAMP FIELD lv_timestampl.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text' ) ).
DATA ls_travel_sel TYPE /dmo/travel01.
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = ls_travel_new-description ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id description = abap_true )
IMPORTING es_travel = DATA(ls_travel_updated)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_updated-travel_id exp = ls_travel_new-travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_updated-description exp = 'My_New_Text' ).
gr_cut->save( ).
CLEAR ls_travel_sel.
SELECT SINGLE * FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = ls_travel_new-agency_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_New_Text' ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-lastchangedby exp = sy-uname ).
cl_abap_unit_assert=>assert_differs( act = ls_travel_sel-createdat exp = ls_travel_sel-lastchangedat ).
DATA(lv_diff) = cl_abap_tstmp=>subtract( tstmp1 = ls_travel_sel-lastchangedat tstmp2 = lv_timestampl ).
cl_abap_unit_assert=>assert_true( xsdbool( 0 < lv_diff AND lv_diff < 1 ) ).
_delete_existing_travel( ls_travel_new-travel_id ).
ENDMETHOD.
METHOD d_travel_id_unknown.
DATA(ls_travel_deleted) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' ) ).
_delete_existing_travel( ls_travel_deleted-travel_id ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_deleted-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel_deleted-travel_id ).
ENDMETHOD.
METHOD u_travel_id_unknown.
DATA(ls_travel_deleted) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
_delete_existing_travel( ls_travel_deleted-travel_id ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_deleted-travel_id description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_deleted-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel_deleted-travel_id ).
ENDMETHOD.
METHOD delete_multiple.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_travel_new_1) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_1' ) ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_new_1-description exp = 'My_Text_1' ).
DATA(ls_travel_new_2) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_2' ) ).
DATA(ls_travel_new_3) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_3' ) ).
" Delete - only in buffer
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new_1-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new_2-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new_3-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
DATA lv_description TYPE /dmo/description01.
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new_1-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_1-description ).
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new_2-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_2-description ).
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new_3-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_3-description ).
" Now persist the buffer
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id IN ( @ls_travel_new_1-travel_id, @ls_travel_new_2-travel_id, @ls_travel_new_3-travel_id ) INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD update_multiple.
DATA(ls_travel_new_1) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_1' ) ).
DATA(ls_travel_new_2) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_2' ) ).
DATA(ls_travel_new_3) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_3' ) ).
DATA lv_description TYPE /dmo/description01.
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new_1-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_1-description ).
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new_2-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_2-description ).
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new_3-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_3-description ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new_1-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text_1' )
is_travelx = VALUE #( travel_id = ls_travel_new_1-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new_2-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text_2' )
is_travelx = VALUE #( travel_id = ls_travel_new_2-travel_id description = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new_3-travel_id agency_id = gv_agency_id_2 description = 'My_New_Text_3' )
is_travelx = VALUE #( travel_id = ls_travel_new_3-travel_id agency_id = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
DATA ls_travel_sel TYPE /dmo/travel01.
CLEAR ls_travel_sel.
SELECT SINGLE agency_id, customer_id, description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new_1-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = ls_travel_new_1-agency_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new_1-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_New_Text_1' ).
CLEAR ls_travel_sel.
SELECT SINGLE agency_id, customer_id, description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new_2-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = ls_travel_new_2-agency_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new_2-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_New_Text_2' ).
CLEAR ls_travel_sel.
SELECT SINGLE agency_id, customer_id, description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new_3-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = gv_agency_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new_3-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_Text_3' ).
_delete_existing_travel( ls_travel_new_1-travel_id ).
_delete_existing_travel( ls_travel_new_2-travel_id ).
_delete_existing_travel( ls_travel_new_3-travel_id ).
ENDMETHOD.
METHOD update_twice.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text' ) ).
DATA ls_travel_sel TYPE /dmo/travel01.
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = ls_travel_new-description ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id agency_id = gv_agency_id_2 description = 'WHATEVER' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id agency_id = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR ls_travel_sel.
SELECT SINGLE agency_id, customer_id, description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = gv_agency_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_New_Text' ).
_delete_existing_travel( ls_travel_new-travel_id ).
ENDMETHOD.
METHOD update_delete_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text' ) ).
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO @DATA(lv_description).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new-description ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @ls_travel_new-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD u_agency_unknown.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id agency_id = gv_agency_id_unknown )
is_travelx = VALUE #( travel_id = ls_travel-travel_id agency_id = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>agency_unkown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_AGENCY_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_agency_id exp = gv_agency_id_unknown ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD u_customer_unknown.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id customer_id = gv_customer_id_unknown )
is_travelx = VALUE #( travel_id = ls_travel-travel_id customer_id = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>customer_unkown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CUSTOMER_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_customer_id exp = gv_customer_id_unknown ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD d_travel_id_initial.
gr_cut->delete_travel( EXPORTING iv_travel_id = '0'
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
ENDMETHOD.
METHOD act_set_status_to_booked.
DATA lv_timestampl TYPE timestampl.
GET TIME STAMP FIELD lv_timestampl.
" Case A: Known travel ID
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' ) ).
DATA ls_travel_sel TYPE /dmo/travel01.
SELECT SINGLE status FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-status exp = CONV /dmo/travel_status01( /dmo/if_flight_legacy01=>travel_status-new ) ).
gr_cut->set_status_to_booked( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR ls_travel_sel.
SELECT SINGLE status, createdat, lastchangedby, lastchangedat FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-status exp = CONV /dmo/travel_status01( /dmo/if_flight_legacy01=>travel_status-booked ) ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-lastchangedby exp = sy-uname ).
cl_abap_unit_assert=>assert_differs( act = ls_travel_sel-createdat exp = ls_travel_sel-lastchangedat ).
DATA(lv_diff) = cl_abap_tstmp=>subtract( tstmp1 = ls_travel_sel-lastchangedat tstmp2 = lv_timestampl ).
cl_abap_unit_assert=>assert_true( xsdbool( 0 < lv_diff AND lv_diff < 1 ) ).
" Case B: Initial travel ID
gr_cut->set_status_to_booked( EXPORTING iv_travel_id = '0'
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
" Case C: Unknown travel ID
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
" -- Deletion only in buffer
gr_cut->set_status_to_booked( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel_new-travel_id ).
gr_cut->save( ).
" -- Deletion send to DB
gr_cut->set_status_to_booked( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel_new-travel_id ).
ENDMETHOD.
METHOD c_dates_invalid.
" Try with initial begin date
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 end_date = '20190101' )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>no_begin_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
" Try with initial end date
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' )
IMPORTING es_travel = ls_travel
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>no_end_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
" Try to have begin date after end date
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190201' end_date = '20190101' )
IMPORTING es_travel = ls_travel
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>end_date_before_begin_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_BEGIN_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_END_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_begin_date exp = '20190201' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_end_date exp = '20190101' ).
ENDMETHOD.
METHOD u_dates_invalid.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
" Try to clear begin date
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( travel_id = ls_travel-travel_id begin_date = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>no_begin_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
" Try to clear end date
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( travel_id = ls_travel-travel_id end_date = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>no_end_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
" Try to have begin date after end date
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id end_date = '20181201' )
is_travelx = VALUE #( travel_id = ls_travel-travel_id end_date = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>end_date_before_begin_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_BEGIN_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_END_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_begin_date exp = ls_travel-begin_date ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_end_date exp = '20181201' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD initialize.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->initialize( ).
gr_cut->save( ).
SELECT SINGLE description FROM /dmo/travel01 WHERE travel_id = @ls_travel_new-travel_id INTO @DATA(lv_description).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = 'My_Old_Text' ).
_delete_existing_travel( ls_travel_new-travel_id ).
ENDMETHOD.
METHOD create_update_in_one_luw.
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id agency_id = gv_agency_id_2 description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel-travel_id description = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
SELECT SINGLE agency_id, description FROM /dmo/travel01 WHERE travel_id = @ls_travel-travel_id INTO ( @DATA(lv_agency_id), @DATA(lv_description) ).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_agency_id exp = gv_agency_id_1 ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = 'My_New_Text' ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD create_delete_in_one_luw.
DATA lv_db_exits TYPE abap_bool.
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exits.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exits.
cl_abap_unit_assert=>assert_false( lv_db_exits ).
ENDMETHOD.
METHOD update_delete_in_one_luw.
DATA lv_db_exits TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
DATA(lv_travel_id) = ls_travel_new-travel_id.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = lv_travel_id agency_id = gv_agency_id_2 description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = lv_travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = lv_travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exits.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @lv_travel_id INTO @lv_db_exits.
cl_abap_unit_assert=>assert_false( lv_db_exits ).
ENDMETHOD.
METHOD delete_update_in_one_luw.
DATA lv_db_exits TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
DATA(lv_travel_id) = ls_travel_new-travel_id.
gr_cut->delete_travel( EXPORTING iv_travel_id = lv_travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = lv_travel_id agency_id = gv_agency_id_2 description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = lv_travel_id description = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = lv_travel_id ).
gr_cut->save( ).
CLEAR lv_db_exits.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @lv_travel_id INTO @lv_db_exits.
cl_abap_unit_assert=>assert_false( lv_db_exits ).
ENDMETHOD.
METHOD delete_delete_in_one_luw.
DATA lv_db_exits TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
DATA(lv_travel_id) = ls_travel_new-travel_id.
gr_cut->delete_travel( EXPORTING iv_travel_id = lv_travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = lv_travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = lv_travel_id ).
gr_cut->save( ).
CLEAR lv_db_exits.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @lv_travel_id INTO @lv_db_exits.
cl_abap_unit_assert=>assert_false( lv_db_exits ).
ENDMETHOD.
METHOD u_no_control.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
" No control data at all
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_control-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD u_status_invalid.
CONSTANTS lc_status_invalid TYPE /dmo/travel_status01 VALUE 'Z'.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
" No control data at all
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id status = lc_status_invalid )
is_travelx = VALUE #( travel_id = ls_travel-travel_id status = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_status_invalid-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_STATUS' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_status exp = lc_status_invalid ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD _create_travel.
CLEAR rs_travel.
gr_cut->create_travel( EXPORTING is_travel = is_travel
IMPORTING es_travel = rs_travel
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( rs_travel-travel_id ).
IF iv_save = abap_true.
gr_cut->save( ).
ENDIF.
ENDMETHOD.
METHOD _delete_existing_travel.
gr_cut->delete_travel( EXPORTING iv_travel_id = iv_travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
ENDMETHOD.
ENDCLASS.
CLASS ltc_booking DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS INHERITING FROM ltc_travel.
PROTECTED SECTION.
TYPES: BEGIN OF ts_flight,
carrier_id TYPE /dmo/carrier_id01,
connection_id TYPE /dmo/connection_id01,
flight_date TYPE /dmo/flight_date01,
price TYPE /dmo/flight_price01,
currency_code TYPE /dmo/currency_code01,
END OF ts_flight.
CLASS-DATA gs_flight_1 TYPE ts_flight.
CLASS-DATA gs_flight_2 TYPE ts_flight.
CLASS-DATA gv_carrier_id_unknown TYPE /dmo/carrier_id01.
CLASS-DATA gv_currency_code_unknown TYPE /dmo/currency_code01.
CLASS-DATA gv_booking_date TYPE /dmo/booking_date01.
DATA mv_travel_id TYPE /dmo/travel_id01.
DATA mv_travel_id_unknown TYPE /dmo/travel_id01.
METHODS _create_booking IMPORTING iv_travel_id TYPE /dmo/travel_id01
is_booking TYPE /dmo/if_flight_legacy01=>ts_booking_in
iv_save TYPE abap_bool DEFAULT abap_true
RETURNING VALUE(rs_booking) TYPE /dmo/booking01.
METHODS _delete_existing_booking IMPORTING iv_travel_id TYPE /dmo/travel_id01
iv_booking_id TYPE /dmo/booking_id01.
PRIVATE SECTION.
CLASS-METHODS class_setup.
METHODS setup.
METHODS teardown.
"! Create, Update, Delete a single booking in 3 different LUWs
METHODS c_u_d_single FOR TESTING RAISING cx_static_check.
"! Create, Update a single booking in the same LUW, delete it in a second LUW
METHODS cu_d_single FOR TESTING RAISING cx_static_check.
"! Create, Update, Delete a single booking in the same LUW
METHODS cud_single FOR TESTING RAISING cx_static_check.
"! Create, (Update, Update), Delete a single booking in 3 different LUWs
METHODS c_uu_d_single FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an unknown Travel ID -> ERROR
METHODS c_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an initial Travel ID -> ERROR
METHODS c_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an unknown Travel ID -> ERROR
METHODS u_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an initial Travel ID -> ERROR
METHODS u_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking with an unknown Travel ID -> ERROR
METHODS d_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking with an initial Travel ID -> ERROR
METHODS d_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an unknown Booking ID -> ERROR
METHODS u_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking with an unknown Booking ID -> ERROR
METHODS d_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an initial Booking ID -> ERROR
METHODS u_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking with an initial Booking ID -> ERROR
METHODS d_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Create, update, delete a single travel with bookings in 3 different LUWs
METHODS c_u_d_travel_w_bookings FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an unknown customer -> ERROR
METHODS c_customer_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an unknown customer -> ERROR
METHODS u_customer_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a booking with a booking date in the past -> ERROR
METHODS c_booking_date_past FOR TESTING RAISING cx_static_check.
"! Try to clear booking date -> ERROR
METHODS u_booking_date_initial FOR TESTING RAISING cx_static_check.
"! Try to create a booking with invalid flight data -> ERROR
METHODS c_flight_invalid FOR TESTING RAISING cx_static_check.
"! Try to update a booking with different flight data -> ERROR
METHODS u_flight FOR TESTING RAISING cx_static_check.
"! Try to delete, update a single booking in the same LUW -> ERROR
METHODS du_single FOR TESTING RAISING cx_static_check.
"! Try to delete, delete a single booking in the same LUW -> NO Error
METHODS dd_single FOR TESTING RAISING cx_static_check.
"! Create booking, delete father travel in same LUW -> NO Error, Booking ignored
METHODS c_booking_d_travel_1_luw FOR TESTING RAISING cx_static_check.
"! Try to delete father travel, create booking in same LUW -> ERROR
METHODS d_travel_c_booking_1_luw FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an initial Booking ID -> ERROR
METHODS c_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to create a booking with a known combination Travel ID, Booking ID -> ERROR
METHODS c_booking_id_exists FOR TESTING RAISING cx_static_check.
"! Check that price and currency are derived / not derived
METHODS c_price_currency FOR TESTING RAISING cx_static_check.
"! Try to update price only or currency only -> ERROR
METHODS u_price_currency FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an unknown currency code -> ERROR
METHODS c_currency_code_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an unknown currency code -> ERROR
METHODS u_currency_code_unknown FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS /dmo/cl_flight_legacy01 DEFINITION LOCAL FRIENDS ltc_booking.
CLASS ltc_booking IMPLEMENTATION.
METHOD class_setup.
IF mc_use_sql_doubles = abap_true ##BOOL_OK.
* gs_flight_1 = VALUE #( carrier_id = 'AB' connection_id = '0001' flight_date = '20190306' price = '10818.00' currency_code = 'SGD' ) ##LITERAL.
* gs_flight_2 = value #( carrier_id = 'CD' connection_id = '0002' flight_date = '20180510' price = '5950.00' currency_code = 'SGD' ) ##LITERAL.
*
* DATA lt_flight TYPE STANDARD TABLE OF /dmo/flight01.
* lt_flight = VALUE #( ( carrier_id = gs_flight_1-carrier_id connection_id = gs_flight_1-connection_id flight_date = gs_flight_1-flight_date price = gs_flight_1-price currency_code = gs_flight_1-currency_code )
* ( carrier_id = gs_flight_2-carrier_id connection_id = gs_flight_2-connection_id flight_date = gs_flight_2-flight_date price = gs_flight_2-price currency_code = gs_flight_2-currency_code ) ).
* mr_test_environment->insert_test_data( lt_flight ).
*
* gv_currency_code_unknown = 'XYZ'.
ELSE.
" Select 2 different Flight Dates with their prices
SELECT SINGLE carrier_id, connection_id, flight_date, price, currency_code FROM /dmo/flight01
INTO CORRESPONDING FIELDS OF @gs_flight_1 ##WARN_OK.
IF sy-subrc <> 0.
cl_abap_unit_assert=>abort( |No flight data!| ).
ENDIF.
SELECT SINGLE carrier_id, connection_id, flight_date, price, currency_code FROM /dmo/flight01 WHERE carrier_id <> @gs_flight_1-carrier_id AND connection_id <> @gs_flight_1-connection_id
INTO CORRESPONDING FIELDS OF @gs_flight_2 ##WARN_OK.
IF sy-subrc <> 0.
cl_abap_unit_assert=>abort( |No flight data!| ).
ENDIF.
" Determine an unknown Carrier ID
gv_carrier_id_unknown = 'XX'.
SELECT SINGLE carrier_id FROM /dmo/carrier01 WHERE carrier_id = @gv_carrier_id_unknown INTO @DATA(lv_dummy_carrier_id).
IF sy-subrc = 0.
cl_abap_unit_assert=>abort( |Carrier ID { gv_carrier_id_unknown } should not be known!| ).
ENDIF.
" Invalid currency code
gv_currency_code_unknown = 'XYZ'.
" We should use TCURC, but this is not released for "ABAP for SAP Cloud Platform"
SELECT SINGLE currency FROM i_currency WHERE currency = @gv_currency_code_unknown INTO @DATA(lv_dummy_currency_code).
IF sy-subrc = 0.
cl_abap_unit_assert=>abort( |Currency { gv_currency_code_unknown } should not be known!| ).
ENDIF.
ENDIF.
" Use Current date as Booking date
gv_booking_date = cl_abap_context_info=>get_system_date( ).
ENDMETHOD.
METHOD setup.
mv_travel_id = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) )-travel_id.
mv_travel_id_unknown = mv_travel_id.
DO.
mv_travel_id_unknown = mv_travel_id_unknown + 1.
SELECT SINGLE travel_id FROM /dmo/travel01 WHERE travel_id = @mv_travel_id_unknown INTO @DATA(lv_dummy_travel_id).
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
ENDMETHOD.
METHOD teardown.
_delete_existing_travel( mv_travel_id ).
ENDMETHOD.
METHOD c_u_d_single.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-carrier_id exp = gs_flight_1-carrier_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-connection_id exp = gs_flight_1-connection_id ).
SELECT SINGLE * FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(ls_booking_sel).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = ls_booking-customer_id ).
DATA(lv_booking_date) = gv_booking_date + 15.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id booking_date = lv_booking_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR ls_booking_sel.
SELECT SINGLE * FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-carrier_id exp = ls_booking-carrier_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-booking_date exp = lv_booking_date ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
SELECT SINGLE * FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( exp = 4 ).
ENDMETHOD.
METHOD cu_d_single.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-carrier_id exp = gs_flight_1-carrier_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-connection_id exp = gs_flight_1-connection_id ).
DATA(lv_booking_date) = gv_booking_date + 15.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id booking_date = lv_booking_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
SELECT SINGLE * FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(ls_booking_sel).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-carrier_id exp = ls_booking-carrier_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-booking_date exp = lv_booking_date ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
SELECT SINGLE * FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( exp = 4 ).
ENDMETHOD.
METHOD cud_single.
DATA lv_db_exists TYPE abap_bool.
SELECT SINGLE lastchangedat FROM /dmo/travel01 WHERE travel_id = @mv_travel_id INTO @DATA(lv_lastchangedat_1).
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
DATA lv_booking_date TYPE /dmo/booking_date01.
lv_booking_date = gv_booking_date + 15.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id booking_date = lv_booking_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update booking_date = abap_true ) )
IMPORTING et_booking = DATA(lt_booking_updated)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_updated ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_updated[ 1 ]-travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_updated[ 1 ]-booking_id exp = ls_booking-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_updated[ 1 ]-booking_date exp = lv_booking_date ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
" Check that the administrative fields of the root node have been updated
SELECT SINGLE lastchangedby, lastchangedat FROM /dmo/travel01 WHERE travel_id = @mv_travel_id INTO ( @DATA(lv_lastchangedby), @DATA(lv_lastchangedat_2) ).
cl_abap_unit_assert=>assert_equals( act = lv_lastchangedby exp = sy-uname ).
cl_abap_unit_assert=>assert_true( xsdbool( lv_lastchangedat_2 > lv_lastchangedat_1 ) ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking01 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_uu_d_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
SELECT SINGLE customer_id FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(lv_customer_id).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = ls_booking-customer_id ).
DATA(lv_booking_date) = gv_booking_date + 15.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id booking_date = lv_booking_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id customer_id = gv_customer_id_2 ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update customer_id = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
DATA ls_booking_sel TYPE /dmo/booking01.
SELECT SINGLE booking_date, customer_id FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-booking_date exp = lv_booking_date ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = gv_customer_id_2 ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking01 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking = VALUE #( ( booking_id = '10' booking_date = '20180701' customer_id = gv_customer_id_1 carrier_id = gs_flight_1-carrier_id connection_id = gs_flight_1-connection_id ) )
it_bookingx = VALUE #( ( booking_id = '10' action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD c_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking = VALUE #( ( booking_id = '10' booking_date = '20180701' customer_id = gv_customer_id_1 carrier_id = gs_flight_1-carrier_id connection_id = gs_flight_1-connection_id ) )
it_bookingx = VALUE #( ( booking_id = '10' action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking = VALUE #( ( booking_id = '2' booking_date = '20180715' ) )
it_bookingx = VALUE #( ( booking_id = '2' action_code = /dmo/if_flight_legacy01=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD u_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking = VALUE #( ( booking_id = '2' booking_date = '20180715' ) )
it_bookingx = VALUE #( ( booking_id = '2' action_code = /dmo/if_flight_legacy01=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
ENDMETHOD.
METHOD d_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking = VALUE #( ( booking_id = '1' ) )
it_bookingx = VALUE #( ( booking_id = '1' action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD d_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking = VALUE #( ( booking_id = '1' ) )
it_bookingx = VALUE #( ( booking_id = '1' action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10' booking_date = '20180715' ) )
it_bookingx = VALUE #( ( booking_id = '10' action_code = /dmo/if_flight_legacy01=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
ENDMETHOD.
METHOD d_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10' ) )
it_bookingx = VALUE #( ( booking_id = '10' action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
ENDMETHOD.
METHOD u_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '0' booking_date = '20180715' ) )
it_bookingx = VALUE #( ( booking_id = '0' action_code = /dmo/if_flight_legacy01=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD d_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '0' ) )
it_bookingx = VALUE #( ( booking_id = '0' action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD c_u_d_travel_w_bookings.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create a travel with 2 bookings (the second travel is only for testing)
DATA(ls_travel_1) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
DATA(ls_travel_2) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_1-travel_id ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_2-travel_id ).
DATA(ls_booking_1) = _create_booking( iv_travel_id = ls_travel_1-travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
DATA(ls_booking_2) = _create_booking( iv_travel_id = ls_travel_1-travel_id
is_booking = VALUE #( booking_id = '20'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
gr_cut->save( ).
SELECT COUNT( * ) FROM /dmo/booking01 WHERE travel_id = @ls_travel_1-travel_id INTO @DATA(lv_count).
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 2 ).
" 2. LUW: Update the first booking
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_1-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_1-travel_id )
it_booking = VALUE #( ( booking_id = ls_booking_1-booking_id customer_id = gv_customer_id_2 ) )
it_bookingx = VALUE #( ( booking_id = ls_booking_1-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update customer_id = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
SELECT SINGLE customer_id FROM /dmo/booking01 WHERE travel_id = @ls_booking_1-travel_id AND booking_id = @ls_booking_1-booking_id INTO @DATA(lv_customer_id).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = gv_customer_id_2 ).
SELECT SINGLE customer_id FROM /dmo/booking01 WHERE travel_id = @ls_booking_2-travel_id AND booking_id = @ls_booking_2-booking_id INTO @lv_customer_id.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = gv_customer_id_1 ).
" 3. LUW: Delete the first booking - check that the second booking is still there
_delete_existing_booking( iv_travel_id = ls_booking_1-travel_id iv_booking_id = ls_booking_1-booking_id ).
SELECT travel_id, booking_id FROM /dmo/booking01 WHERE travel_id = @ls_travel_1-travel_id INTO TABLE @DATA(lt_booking_key).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_key ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_key[ 1 ]-booking_id exp = ls_booking_2-booking_id ).
" 4. LUW: Delete the travel - check that the second booking has also been deleted
_delete_existing_travel( ls_travel_1-travel_id ).
_delete_existing_travel( ls_travel_2-travel_id ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking01 FIELDS @abap_true WHERE travel_id = @ls_travel_1-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_customer_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_unknown
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>customer_unkown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CUSTOMER_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_customer_id exp = gv_customer_id_unknown ).
ENDMETHOD.
METHOD u_customer_unknown.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id customer_id = gv_customer_id_unknown ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update customer_id = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>customer_unkown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CUSTOMER_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_customer_id exp = gv_customer_id_unknown ).
gr_cut->save( ).
SELECT SINGLE customer_id FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(lv_customer_id).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = ls_booking-customer_id ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
ENDMETHOD.
METHOD c_booking_date_past.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = '20180101'
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_booking_date_invalid-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_date exp = '20180101' ).
ENDMETHOD.
METHOD u_booking_date_initial.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_booking_date_invalid-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking-booking_id ).
cl_abap_unit_assert=>assert_initial( lx->mv_booking_date ).
gr_cut->save( ).
SELECT SINGLE booking_date FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(lv_booking_date).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_booking_date exp = gv_booking_date ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
ENDMETHOD.
METHOD c_flight_invalid.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gv_carrier_id_unknown
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>flight_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CARRIER_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_CONNECTION_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_FLIGHT_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_carrier_id exp = gv_carrier_id_unknown ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_connection_id exp = gs_flight_1-connection_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_flight_date exp = gs_flight_1-flight_date ).
ENDMETHOD.
METHOD u_flight.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id flight_date = gs_flight_2-flight_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update flight_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_flight_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
gr_cut->save( ).
SELECT SINGLE flight_date FROM /dmo/booking01 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(lv_flight_date).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_flight_date exp = gs_flight_1-flight_date ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
ENDMETHOD.
METHOD du_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id customer_id = gv_customer_id_2 ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update customer_id = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking-booking_id ).
gr_cut->save( ).
SELECT SINGLE FROM /dmo/booking01 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD dd_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking01 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_booking_d_travel_1_luw.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create travel
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" 2. LUW: Create booking for the new travel, delete the new travel
_create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
"Check that travel and booking are gone
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD d_travel_c_booking_1_luw.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create travel
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" 2. LUW: Delete the new travel, create booking for the same travel
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( travel_id = ls_travel-travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
gr_cut->save( ).
"Check that travel and booking are gone
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '0'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '0'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD c_booking_id_exists.
_create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
" Try to create a booking that is already in the buffer
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_exists-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
gr_cut->save( ).
" Try to create a booking that is already in the database
CLEAR lt_messages.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = lt_booking
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_exists-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
ENDMETHOD.
METHOD c_price_currency.
" Do not provide price and currency
DATA(ls_booking_1) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
" Provide price and currency
CONSTANTS lc_diff TYPE p VALUE '99.99'.
DATA lv_flight_price TYPE /dmo/flight_price01.
DATA lv_currency_code TYPE /dmo/currency_code01.
lv_flight_price = gs_flight_1-price + lc_diff.
lv_currency_code = SWITCH #( gs_flight_1-currency_code WHEN 'EUR' THEN 'USD' ELSE 'EUR' ).
DATA(ls_booking_2) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '20'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = lv_flight_price
currency_code = lv_currency_code )
iv_save = abap_true ).
DATA ls_booking_sel TYPE /dmo/booking01.
SELECT SINGLE flight_price, currency_code FROM /dmo/booking01 WHERE travel_id = @ls_booking_1-travel_id AND booking_id = @ls_booking_1-booking_id INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-flight_price exp = gs_flight_1-price ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-currency_code exp = gs_flight_1-currency_code ).
CLEAR ls_booking_sel.
SELECT SINGLE flight_price, currency_code FROM /dmo/booking01 WHERE travel_id = @ls_booking_1-travel_id AND booking_id = @ls_booking_2-booking_id INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-flight_price exp = lv_flight_price ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-currency_code exp = lv_currency_code ).
ENDMETHOD.
METHOD u_price_currency.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '999.99'
currency_code = 'EUR' )
iv_save = abap_false ).
" Try to change the flight price only
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking-travel_id )
is_travelx = VALUE #( travel_id = ls_booking-travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id flight_price = '888.88' ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update flight_price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_price_currency_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking-booking_id ).
" Try to change the currency code only
CLEAR lt_messages.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking-travel_id )
is_travelx = VALUE #( travel_id = ls_booking-travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id currency_code = 'XXX' ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update currency_code = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_price_currency_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking-booking_id ).
ENDMETHOD.
METHOD c_currency_code_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '999.99'
currency_code = gv_currency_code_unknown ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>currency_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CURRENCY_CODE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_currency_code exp = gv_currency_code_unknown ).
ENDMETHOD.
METHOD u_currency_code_unknown.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '999.99'
currency_code = 'EUR' )
iv_save = abap_false ).
" Try to change the flight price only
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking-travel_id )
is_travelx = VALUE #( travel_id = ls_booking-travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id flight_price = '999.99' currency_code = gv_currency_code_unknown ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-update flight_price = abap_true currency_code = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>currency_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CURRENCY_CODE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_currency_code exp = gv_currency_code_unknown ).
ENDMETHOD.
METHOD _create_booking.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = iv_travel_id )
is_travelx = VALUE #( travel_id = iv_travel_id )
it_booking = VALUE #( ( is_booking ) )
it_bookingx = VALUE #( ( booking_id = is_booking-booking_id action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking ) exp = 1 ).
rs_booking = lt_booking[ 1 ].
cl_abap_unit_assert=>assert_equals( act = rs_booking-travel_id exp = iv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = rs_booking-booking_id exp = is_booking-booking_id ).
IF iv_save = abap_true.
gr_cut->save( ).
ENDIF.
ENDMETHOD.
METHOD _delete_existing_booking.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = iv_travel_id )
is_travelx = VALUE #( travel_id = iv_travel_id )
it_booking = VALUE #( ( booking_id = iv_booking_id ) )
it_bookingx = VALUE #( ( booking_id = iv_booking_id action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
ENDMETHOD.
ENDCLASS.
CLASS ltc_booking_supplement DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS INHERITING FROM ltc_booking.
PRIVATE SECTION.
TYPES: BEGIN OF ts_supplement,
supplement_id TYPE /dmo/supplement_id01,
price TYPE /dmo/supplement_price01,
currency_code TYPE /dmo/currency_code01,
END OF ts_supplement.
CLASS-DATA gs_supplement_1 TYPE ts_supplement.
CLASS-DATA gs_supplement_2 TYPE ts_supplement.
CLASS-DATA gv_supplement_id_unknown TYPE /dmo/supplement_id01.
DATA mv_booking_id TYPE /dmo/booking_id01.
DATA mv_booking_id_unknown TYPE /dmo/booking_id01.
CLASS-METHODS class_setup.
METHODS setup.
"! Complicated test involving all 3 levels
METHODS c_u_d_multiple FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an unknown Travel ID -> ERROR
METHODS c_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an initial Travel ID -> ERROR
METHODS c_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an unknown Travel ID -> ERROR
METHODS u_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an initial Travel ID -> ERROR
METHODS u_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an unknown Travel ID -> ERROR
METHODS d_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an initial Travel ID -> ERROR
METHODS d_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an unknown Booking ID -> ERROR
METHODS c_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an initial Travel ID -> ERROR
METHODS c_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an unknown Booking ID -> ERROR
METHODS u_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an initial Booking ID -> ERROR
METHODS u_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an unknown Booking ID -> ERROR
METHODS d_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an initial Booking ID -> ERROR
METHODS d_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an unknown Booking Supplement ID -> ERROR
METHODS u_booking_suppl_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an initial Booking Supplement ID -> ERROR
METHODS u_booking_suppl_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an unknown Booking Supplement ID -> ERROR
METHODS d_booking_suppl_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an initial Booking Supplement ID -> ERROR
METHODS d_booking_suppl_id_initial FOR TESTING RAISING cx_static_check.
"! Create booking supplement, delete father booking in same LUW -> NO Error, booking supplement ignored
METHODS c_bsuppl_d_booking_1_luw FOR TESTING RAISING cx_static_check.
"! Create booking supplement, delete father travel in same LUW -> NO Error, booking supplement ignored
METHODS c_bsuppl_d_travel_1_luw FOR TESTING RAISING cx_static_check.
"! Try to delete father travel, create booking supplement in same LUW -> ERROR
METHODS d_travel_c_bsuppl_1_luw FOR TESTING RAISING cx_static_check.
"! Try to delete father booking, create booking supplement in same LUW -> ERROR
METHODS d_booking_c_bsuppl_1_luw FOR TESTING RAISING cx_static_check.
"! Try to delete, update a single booking in the same LUW -> ERROR
METHODS du_single FOR TESTING RAISING cx_static_check.
"! Try to delete, delete a single booking in the same LUW -> NO Error
METHODS dd_single FOR TESTING RAISING cx_static_check.
"! Try to create a Booking Supplement with an unknown supplement ID -> ERROR
METHODS c_supplement_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a Booking Supplement with an initial Booking Supplement ID -> ERROR
METHODS c_booking_suppl_id_initial FOR TESTING RAISING cx_static_check.
"! Try to create a Booking Supplement with a known combination of Travel ID, Booking ID, Booking Supplement ID -> ERROR
METHODS c_booking_suppl_id_exists FOR TESTING RAISING cx_static_check.
"! Do a deep insert involving all 3 levels
METHODS c_deep_insert FOR TESTING RAISING cx_static_check.
"! Try to do a deep insert with a faulty booking supplement -> ERROR (nothing is created)
METHODS c_deep_insert_suppl_unknown FOR TESTING RAISING cx_static_check.
"! Do a complicated update in a single call
METHODS u_single_travel_multiple FOR TESTING RAISING cx_static_check.
METHODS read_db FOR TESTING RAISING cx_static_check.
METHODS read_buffer FOR TESTING RAISING cx_static_check.
METHODS read_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to change the supplement ID -> ERROR
METHODS u_supplement_id FOR TESTING RAISING cx_static_check.
"! Check that price and currency are derived / not derived
METHODS c_price_currency FOR TESTING RAISING cx_static_check.
"! Try to update price only or currency only -> ERROR
METHODS u_price_currency FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an unknown currency code -> ERROR
METHODS c_currency_code_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an unknown currency code -> ERROR
METHODS u_currency_code_unknown FOR TESTING RAISING cx_static_check.
METHODS _create_booking_suppl IMPORTING iv_travel_id TYPE /dmo/travel_id01
is_booking_supplement TYPE /dmo/if_flight_legacy01=>ts_booking_supplement_in
iv_save TYPE abap_bool DEFAULT abap_true
RETURNING VALUE(rs_booking_supplement) TYPE /dmo/book_sup_01.
ENDCLASS.
CLASS /dmo/cl_flight_legacy01 DEFINITION LOCAL FRIENDS ltc_booking_supplement.
CLASS ltc_booking_supplement IMPLEMENTATION.
METHOD class_setup.
IF mc_use_sql_doubles = abap_true ##BOOL_OK.
* gs_supplement_1 = VALUE #( supplement_id = 'BV-0001' price = '2.30' currency_code = 'EUR' ) ##LITERAL.
* gs_supplement_2 = VALUE #( supplement_id = 'BV-0002' price = '7.50' currency_code = 'EUR' ) ##LITERAL.
*
* DATA lt_supplement TYPE STANDARD TABLE OF /dmo/suppleme_01.
* lt_supplement = VALUE #( ( supplement_id = gs_supplement_1-supplement_id price = gs_supplement_1-price currency_code = gs_supplement_1-currency_code )
* ( supplement_id = gs_supplement_2-supplement_id price = gs_supplement_2-price currency_code = gs_supplement_2-currency_code ) ).
* mr_test_environment->insert_test_data( lt_supplement ).
*
* gv_supplement_id_unknown = 'XX-999'.
ELSE.
" Select any valid combination of Supplement ID, Price, Currency Code
SELECT SINGLE supplement_id, price, currency_code FROM /dmo/suppleme_01 INTO ( @gs_supplement_1-supplement_id, @gs_supplement_1-price, @gs_supplement_1-currency_code ) ##WARN_OK.
IF sy-subrc <> 0.
cl_abap_unit_assert=>abort( 'No supplement data!' ).
ENDIF.
" Select a different valid combination of Supplement ID, Price, Currency Code
SELECT SINGLE supplement_id, price, currency_code FROM /dmo/suppleme_01 WHERE supplement_id <> @gs_supplement_1-supplement_id
INTO ( @gs_supplement_2-supplement_id, @gs_supplement_2-price, @gs_supplement_2-currency_code ) ##WARN_OK.
IF sy-subrc <> 0.
cl_abap_unit_assert=>abort( 'No supplement data!' ).
ENDIF.
cl_abap_unit_assert=>assert_differs( act = gs_supplement_1-supplement_id exp = gs_supplement_2-supplement_id ).
" Determine an unknown Supplement ID
gv_supplement_id_unknown = 'XX-999'.
SELECT SINGLE supplement_id FROM /dmo/suppleme_01 WHERE supplement_id = @gv_supplement_id_unknown INTO @DATA(lv_dummy_supplement_id).
IF sy-subrc = 0.
cl_abap_unit_assert=>abort( |Supplement ID { gv_supplement_id_unknown } should not be known!| ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD setup.
mv_booking_id = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )-booking_id.
mv_booking_id_unknown = '20'.
ENDMETHOD.
METHOD c_u_d_multiple.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW:
" Create a travel
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
" Create 2 bookings for the new travel
DATA(ls_booking_1) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '20'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
DATA(ls_booking_2) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '21'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
" Create a single booking supplement for the first booking
_create_booking_suppl( iv_travel_id = ls_booking_1-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking_1-booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_false ).
" Create 2 booking supplements for the second booking
DATA(ls_book_suppl_2_1) = _create_booking_suppl( iv_travel_id = ls_booking_2-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking_2-booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
iv_save = abap_false ).
DATA(ls_book_suppl_2_2) = _create_booking_suppl( iv_travel_id = ls_booking_2-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking_2-booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = '30.0'
currency_code = 'EUR' )
iv_save = abap_false ).
gr_cut->save( ).
SELECT COUNT( * ) FROM /dmo/book_sup_01 WHERE travel_id = @ls_travel-travel_id INTO @DATA(lv_count).
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 3 ).
DATA ls_book_suppl_sel TYPE /dmo/book_sup_01.
SELECT SINGLE price, currency_code FROM /dmo/book_sup_01 WHERE travel_id = @ls_book_suppl_2_1-travel_id
AND booking_id = @ls_book_suppl_2_1-booking_id
AND booking_supplement_id = @ls_book_suppl_2_1-booking_supplement_id
INTO CORRESPONDING FIELDS OF @ls_book_suppl_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-price exp = '20.0' ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-currency_code exp = 'EUR' ).
" 2. Update the first booking supplement of the second booking
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_book_suppl_2_1-travel_id )
is_travelx = VALUE #( travel_id = ls_book_suppl_2_1-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_book_suppl_2_1-booking_id
booking_supplement_id = ls_book_suppl_2_1-booking_supplement_id
price = '21.0'
currency_code = 'USD'
) )
it_booking_supplementx = VALUE #( ( booking_id = ls_book_suppl_2_1-booking_id
booking_supplement_id = ls_book_suppl_2_1-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-update
price = abap_true
currency_code = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
" Check that record already in update buffer is properly updated
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_book_suppl_2_1-travel_id )
is_travelx = VALUE #( travel_id = ls_book_suppl_2_1-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_book_suppl_2_1-booking_id
booking_supplement_id = ls_book_suppl_2_1-booking_supplement_id
price = '22.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_book_suppl_2_1-booking_id
booking_supplement_id = ls_book_suppl_2_1-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-update
price = abap_true
currency_code = abap_true ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-travel_id exp = ls_book_suppl_2_1-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-booking_id exp = ls_book_suppl_2_1-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-booking_supplement_id exp = ls_book_suppl_2_1-booking_supplement_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-price exp = '22.0' ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-currency_code exp = 'EUR' ).
gr_cut->save( ).
SELECT SINGLE price, currency_code FROM /dmo/book_sup_01 WHERE travel_id = @ls_book_suppl_2_1-travel_id
AND booking_id = @ls_book_suppl_2_1-booking_id
AND booking_supplement_id = @ls_book_suppl_2_1-booking_supplement_id
INTO CORRESPONDING FIELDS OF @ls_book_suppl_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-price exp = '22.0' ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-currency_code exp = 'EUR' ).
SELECT SINGLE price, currency_code FROM /dmo/book_sup_01 WHERE travel_id = @ls_book_suppl_2_2-travel_id
AND booking_id = @ls_book_suppl_2_2-booking_id
AND booking_supplement_id = @ls_book_suppl_2_2-booking_supplement_id
INTO CORRESPONDING FIELDS OF @ls_book_suppl_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-price exp = '30.0' ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-currency_code exp = 'EUR' ).
" 3. Delete the first booking - check that the booking supplement has also been deleted
_delete_existing_booking( iv_travel_id = ls_booking_1-travel_id iv_booking_id = ls_booking_1-booking_id ).
SELECT COUNT( * ) FROM /dmo/book_sup_01 WHERE travel_id = @ls_travel-travel_id INTO @lv_count.
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 2 ).
SELECT COUNT( * ) FROM /dmo/book_sup_01 WHERE travel_id = @ls_travel-travel_id AND booking_id = @ls_booking_2-booking_id INTO @lv_count.
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 2 ).
" 4. LUW: Delete the second booking supplement of the second booking - here check also travel admin field
SELECT SINGLE lastchangedat FROM /dmo/travel01 WHERE travel_id = @ls_travel-travel_id INTO @DATA(lv_lastchangedat_1).
cl_abap_unit_assert=>assert_subrc( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @ls_book_suppl_2_2-travel_id
AND booking_id = @ls_book_suppl_2_2-booking_id
AND booking_supplement_id = @ls_book_suppl_2_2-booking_supplement_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_book_suppl_2_2-travel_id )
is_travelx = VALUE #( travel_id = ls_book_suppl_2_2-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_book_suppl_2_2-booking_id
booking_supplement_id = ls_book_suppl_2_2-booking_supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_book_suppl_2_2-booking_id
booking_supplement_id = ls_book_suppl_2_2-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @ls_book_suppl_2_2-travel_id
AND booking_id = @ls_book_suppl_2_2-booking_id
AND booking_supplement_id = @ls_book_suppl_2_2-booking_supplement_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
SELECT SINGLE lastchangedat FROM /dmo/travel01 WHERE travel_id = @ls_travel-travel_id INTO @DATA(lv_lastchangedat_2).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_true( xsdbool( lv_lastchangedat_2 > lv_lastchangedat_1 ) ).
SELECT COUNT( * ) FROM /dmo/book_sup_01 WHERE travel_id = @ls_travel-travel_id AND booking_id = @ls_booking_2-booking_id INTO @lv_count.
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 1 ).
" 5. LUW: Delete the travel - check that all booking (supplements) have also been deleted
_delete_existing_travel( ls_travel-travel_id ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking_supplement = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD c_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking_supplement = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking_supplement = VALUE #( ( booking_id = '2' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = '2' action_code = /dmo/if_flight_legacy01=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD u_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking_supplement = VALUE #( ( booking_id = '2' booking_supplement_id = '1' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = '2' booking_supplement_id = '1' action_code = /dmo/if_flight_legacy01=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
ENDMETHOD.
METHOD d_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking_supplement = VALUE #( ( booking_id = '1'
booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD d_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking_supplement = VALUE #( ( booking_id = '1' booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_id = '1' booking_supplement_id = '1' action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
ENDMETHOD.
METHOD c_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id_unknown
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id_unknown
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id_unknown ).
ENDMETHOD.
METHOD c_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_supplement_id = '1' action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD u_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id_unknown booking_supplement_id = '1' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id_unknown booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy01=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id_unknown ).
ENDMETHOD.
METHOD u_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_supplement_id = '1' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_supplement_id = '1' action_code = /dmo/if_flight_legacy01=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD d_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id_unknown booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id_unknown booking_supplement_id = '1' action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id_unknown ).
ENDMETHOD.
METHOD d_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_supplement_id = '1' action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD u_booking_suppl_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id booking_supplement_id = '10' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id booking_supplement_id = '10' action_code = /dmo/if_flight_legacy01=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = '10' ).
ENDMETHOD.
METHOD u_booking_suppl_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id action_code = /dmo/if_flight_legacy01=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
ENDMETHOD.
METHOD d_booking_suppl_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id booking_supplement_id = '10' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id booking_supplement_id = '10'
action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = '10' ).
ENDMETHOD.
METHOD d_booking_suppl_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
ENDMETHOD.
METHOD c_bsuppl_d_booking_1_luw.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create: Travel - Booking
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
DATA(ls_booking) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_true ).
" 2. LUW: Create Booking Supplement, Delete father Booking
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = ls_booking-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking-booking_id
booking_supplement_id = '11'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_false ).
_delete_existing_booking( iv_travel_id = ls_booking-travel_id iv_booking_id = ls_booking-booking_id ).
" Check that the Booking Supplement was not created
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @ls_booking_supplement-travel_id
AND booking_id = @ls_booking_supplement-booking_id
AND booking_supplement_id = @ls_booking_supplement-booking_supplement_id
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD c_bsuppl_d_travel_1_luw.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create: Travel - Booking
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
DATA(ls_booking) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '11'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_true ).
" 2. LUW: Create Booking Supplement, Delete father Travel
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = ls_booking-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking-booking_id
booking_supplement_id = '11'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_false ).
_delete_existing_travel( ls_travel-travel_id ).
" Check that the Booking Supplement was not created
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @ls_booking_supplement-travel_id
AND booking_id = @ls_booking_supplement-booking_id
AND booking_supplement_id = @ls_booking_supplement-booking_supplement_id
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD d_travel_c_bsuppl_1_luw.
" 1. LUW: Create: Travel - Booking
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
DATA(ls_booking) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_true ).
" 2. LUW: Delete Travel, try to create Booking Supplement
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking-travel_id )
is_travelx = VALUE #( travel_id = ls_booking-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking-booking_id
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking-booking_id
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
gr_cut->save( ).
ENDMETHOD.
METHOD d_booking_c_bsuppl_1_luw.
" Delete Booking, try to create Booking Supplement
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = mv_booking_id ) )
it_bookingx = VALUE #( ( booking_id = mv_booking_id action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
ENDMETHOD.
METHOD du_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '22'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_true ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement-travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement-booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement-booking_supplement_id exp = '22' ).
" Check existence of Booking Supplement
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = '22' INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" Delete, Update Booking Supplement in the same LUW
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-update
price = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking_supplement-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = ls_booking_supplement-booking_supplement_id ).
gr_cut->save( ).
" Check that the Booking Supplement no longer exists
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @ls_booking_supplement-travel_id
AND booking_id = @ls_booking_supplement-booking_id
AND booking_supplement_id = @ls_booking_supplement-booking_supplement_id
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD dd_single.
CONSTANTS lc_booking_supplement_id TYPE /dmo/booking_supplement_id01 VALUE '34'.
DATA lv_db_exists TYPE abap_bool.
_create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_true ).
" Check existence of Booking Supplement
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = @lc_booking_supplement_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" Delete Booking Supplement twice in the same LUW
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
" Check that the Booking Supplement no longer exists
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = @lc_booking_supplement_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_supplement_unknown.
DATA lv_db_exists TYPE abap_bool.
" Try to create 2 Booking Supplements, one of them is faulty
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '1'
supplement_id = gv_supplement_id_unknown
price = '10.0'
currency_code = 'EUR' )
( booking_id = mv_booking_id
booking_supplement_id = '2'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy01=>action_code-create )
( booking_id = mv_booking_id
booking_supplement_id = '2'
supplement_id = gs_supplement_1-supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_supplement_id exp = gv_supplement_id_unknown ).
gr_cut->save( ).
" Check that no Booking Supplement has been created
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_booking_suppl_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '0'
supplement_id = gs_supplement_1-supplement_id
price = gs_supplement_1-price
currency_code = gs_supplement_1-currency_code ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '0'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
ENDMETHOD.
METHOD c_booking_suppl_id_exists.
_create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = gs_supplement_1-price
currency_code = gs_supplement_1-currency_code )
iv_save = abap_false ).
" Try to create a booking supplement that is already in the buffer
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = gs_supplement_1-price
currency_code = gs_supplement_1-currency_code ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '20'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_exists-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = '20' ).
gr_cut->save( ).
" Try to create a booking supplement that is already in the database
CLEAR lt_messages.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = gs_supplement_1-price
currency_code = gs_supplement_1-currency_code ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '20'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = lt_booking_supplement
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_exists-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = '20' ).
ENDMETHOD.
METHOD c_deep_insert.
CONSTANTS lc_booking_id_1 TYPE /dmo/booking_id01 VALUE '20'.
CONSTANTS lc_booking_id_2 TYPE /dmo/booking_id01 VALUE '21'.
CONSTANTS lc_booking_supplement_id_1_1 TYPE /dmo/booking_supplement_id01 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_1 TYPE /dmo/booking_supplement_id01 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_2 TYPE /dmo/booking_supplement_id01 VALUE '20'.
gr_cut->create_travel(
EXPORTING
is_travel = VALUE #( agency_id = gv_agency_id_1
customer_id = gv_customer_id_1
begin_date = '20190101'
end_date = '20190201'
description = 'My_Deep_Insert'
total_price = '999.99' "Derivated, so ignored
booking_fee = '10.00'
currency_code = 'EUR' )
it_booking = VALUE #( ( booking_id = lc_booking_id_1
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '100.00'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_date = gv_booking_date
customer_id = gv_customer_id_2
carrier_id = gs_flight_2-carrier_id
connection_id = gs_flight_2-connection_id
flight_date = gs_flight_2-flight_date
flight_price = '200.00'
currency_code = 'EUR' ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_2
supplement_id = gs_supplement_1-supplement_id
price = '30.0'
currency_code = 'USD' ) )
IMPORTING
es_travel = DATA(ls_travel)
et_booking = DATA(lt_booking)
et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking ) exp = 2 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 3 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 booking_supplement_id = lc_booking_supplement_id_1_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 booking_supplement_id = lc_booking_supplement_id_2_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 booking_supplement_id = lc_booking_supplement_id_2_2 ] ) ) ).
gr_cut->save( ).
" Check travel
DATA(lv_exchange_rate_date) = cl_abap_context_info=>get_system_date( ).
/dmo/cl_flight_amdp01=>convert_currency(
EXPORTING
iv_amount = '30.00'
iv_currency_code_source = 'USD'
iv_currency_code_target = 'EUR'
iv_exchange_rate_date = lv_exchange_rate_date
IMPORTING
ev_amount = data(lv_30_usd_as_eur)
).
cl_abap_unit_assert=>assert_not_initial( lv_30_usd_as_eur ).
DATA ls_travel_sel TYPE /dmo/travel01.
SELECT SINGLE agency_id, customer_id, total_price, currency_code, description FROM /dmo/travel01 WHERE travel_id = @ls_travel-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = gv_agency_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-total_price exp = '10.00' + '100.00' + '200.00' + '10.00' + '20.00' + lv_30_usd_as_eur ) ##LITERAL.
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-currency_code exp = 'EUR' ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_Deep_Insert' ).
" Check booking count, Check one of the bookings
SELECT COUNT( * ) FROM /dmo/booking01 WHERE travel_id = @ls_travel-travel_id INTO @DATA(lv_count).
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 2 ).
DATA ls_booking_sel TYPE /dmo/booking01.
SELECT SINGLE customer_id, flight_date FROM /dmo/booking01 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_2
INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = gv_customer_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-flight_date exp = gs_flight_2-flight_date ).
" Check booking supplement count, Check one of the booking supplements
lv_count = 0.
SELECT COUNT( * ) FROM /dmo/book_sup_01 WHERE travel_id = @ls_travel-travel_id INTO @lv_count.
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 3 ).
DATA ls_book_suppl_sel TYPE /dmo/book_sup_01.
SELECT SINGLE price, currency_code FROM /dmo/book_sup_01 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_2
AND booking_supplement_id = @lc_booking_supplement_id_2_1
INTO CORRESPONDING FIELDS OF @ls_book_suppl_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-price exp = '20.0' ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-currency_code exp = 'EUR' ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD c_deep_insert_suppl_unknown.
" Prepare travel in buffer without save
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
" Now try to put a second travel with a faulty booking supplement into the buffer
CONSTANTS lc_booking_id_1 TYPE /dmo/booking_id01 VALUE '20'.
CONSTANTS lc_booking_id_2 TYPE /dmo/booking_id01 VALUE '21'.
CONSTANTS lc_booking_supplement_id_2_1 TYPE /dmo/booking_supplement_id01 VALUE '10'.
gr_cut->create_travel(
EXPORTING
is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' description = 'My_Deep_Insert_Fail' )
it_booking = VALUE #( ( booking_id = lc_booking_id_1
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
( booking_id = lc_booking_id_2
booking_date = gv_booking_date
customer_id = gv_customer_id_2
carrier_id = gs_flight_2-carrier_id
connection_id = gs_flight_2-connection_id
flight_date = gs_flight_2-flight_date ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
supplement_id = gv_supplement_id_unknown " <<< Unknown Supplement ID
price = '20.0'
currency_code = 'EUR' ) )
IMPORTING
es_travel = DATA(ls_travel_fail)
et_booking = DATA(lt_booking)
et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel_fail-travel_id ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_supplement_id exp = gv_supplement_id_unknown ).
gr_cut->save( ).
" Delete the first travel, this would fail when first travel had not been created
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD u_single_travel_multiple.
DATA lv_db_exists TYPE abap_bool.
" Create and persis a travel with 1 booking and 3 booking supplements
CONSTANTS lc_booking_id_1 TYPE /dmo/booking_id01 VALUE '20'.
CONSTANTS lc_booking_supplement_id_1_1 TYPE /dmo/booking_supplement_id01 VALUE '10'.
CONSTANTS lc_booking_supplement_id_1_2 TYPE /dmo/booking_supplement_id01 VALUE '20'.
CONSTANTS lc_booking_supplement_id_1_3 TYPE /dmo/booking_supplement_id01 VALUE '30'.
gr_cut->create_travel(
EXPORTING
is_travel = VALUE #( agency_id = gv_agency_id_1
customer_id = gv_customer_id_1
begin_date = '20190101'
end_date = '20190201'
description = 'My_Deep_Insert_1' )
it_booking = VALUE #( ( booking_id = lc_booking_id_1
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '100.00'
currency_code = 'EUR' ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_2
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_3
supplement_id = gs_supplement_1-supplement_id
price = '30.0'
currency_code = 'EUR' ) )
IMPORTING
es_travel = DATA(ls_travel)
et_booking = DATA(lt_booking)
et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 3 ).
DATA(ls_booking_supplement_1_1) = lt_booking_supplement[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 booking_supplement_id = lc_booking_supplement_id_1_1 ].
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_2
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" Now do (and save) a complicated update:
" -- Change a travel attribute
" -- Change a booking attribute
" -- Change a booking supplement attribute
" -- Create a new booking
" -- Delete a Booking Supplement
" -- Create a Booking Supplement for an existing Booking
" -- Create a new Booking Supplement for the new Booking
CONSTANTS lc_booking_id_2 TYPE /dmo/booking_id01 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_1 TYPE /dmo/booking_supplement_id01 VALUE '10'.
CONSTANTS lc_booking_supplement_id_1_4 TYPE /dmo/booking_supplement_id01 VALUE '40'.
CONSTANTS lc_diff TYPE /dmo/supplement_price01 VALUE '123.00'.
DATA(lv_new_price) = ls_booking_supplement_1_1-price + lc_diff.
gr_cut->update_travel(
EXPORTING
is_travel = VALUE #( travel_id = ls_travel-travel_id description = 'My_Deep_Insert_2' )
is_travelx = VALUE #( travel_id = ls_travel-travel_id description = abap_true )
it_booking = VALUE #( ( booking_id = lc_booking_id_1 customer_id = gv_customer_id_2 )
( booking_id = lc_booking_id_2
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_2-carrier_id
connection_id = gs_flight_2-connection_id
flight_date = gs_flight_2-flight_date
flight_price = '200.00'
currency_code = 'EUR' ) )
it_bookingx = VALUE #( ( booking_id = lc_booking_id_1 action_code = /dmo/if_flight_legacy01=>action_code-update customer_id = abap_true )
( booking_id = lc_booking_id_2 action_code = /dmo/if_flight_legacy01=>action_code-create ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
price = lv_new_price
currency_code = 'EUR' )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_2 )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_4
supplement_id = gs_supplement_2-supplement_id
price = '40.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
supplement_id = gs_supplement_2-supplement_id
price = '50.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
action_code = /dmo/if_flight_legacy01=>action_code-update
price = abap_true
currency_code = 'EUR' )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_2
action_code = /dmo/if_flight_legacy01=>action_code-delete )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_4
action_code = /dmo/if_flight_legacy01=>action_code-create )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING
es_travel = DATA(ls_travel_aft_update)
et_booking = DATA(lt_booking_aft_update)
et_booking_supplement = DATA(lt_booking_suppl_aft_update)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_aft_update-travel_id exp = ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_aft_update ) exp = 2 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 ] ) ) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_suppl_aft_update ) exp = 3 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_suppl_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 booking_supplement_id = lc_booking_supplement_id_1_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_suppl_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 booking_supplement_id = lc_booking_supplement_id_1_4 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_suppl_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 booking_supplement_id = lc_booking_supplement_id_2_1 ] ) ) ).
gr_cut->save( ).
" Check Travel
DATA ls_travel_sel TYPE /dmo/travel01.
SELECT SINGLE total_price, currency_code, description FROM /dmo/travel01 WHERE travel_id = @ls_travel-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-total_price exp = '100.00' + '200.00' + lv_new_price + '30.00' + '40.00' + '50.00' ) ##LITERAL.
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-currency_code exp = 'EUR' ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_Deep_Insert_2' ).
" Check Booking(s)
" -- Updated Booking
DATA ls_booking_sel TYPE /dmo/booking01.
SELECT SINGLE booking_date, customer_id FROM /dmo/booking01 WHERE travel_id = @ls_travel-travel_id AND booking_id = @lc_booking_id_1 INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-booking_date exp = gv_booking_date ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = gv_customer_id_2 ).
" -- New Booking
CLEAR ls_booking_sel.
SELECT SINGLE customer_id, flight_date FROM /dmo/booking01 WHERE travel_id = @ls_travel-travel_id AND booking_id = @lc_booking_id_2 INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-flight_date exp = gs_flight_2-flight_date ).
" Check Booking Supplement(s)
" -- Updated Booking Supplement
DATA ls_booking_supplement_sel TYPE /dmo/book_sup_01.
SELECT SINGLE supplement_id, price FROM /dmo/book_sup_01 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_1
INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-supplement_id exp = gs_supplement_1-supplement_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-price exp = lv_new_price ).
" -- Deleted Booking Supplement
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_2
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
" -- Unchanged Booking Supplement
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_01 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_3
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" -- Created Booking Supplement for the existing Booking
CLEAR ls_booking_supplement_sel.
SELECT SINGLE supplement_id FROM /dmo/book_sup_01 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_4
INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-supplement_id exp = gs_supplement_2-supplement_id ).
" -- Created Booking Supplement for the new Booking
CLEAR ls_booking_supplement_sel.
SELECT SINGLE supplement_id FROM /dmo/book_sup_01 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_2
AND booking_supplement_id = @lc_booking_supplement_id_2_1
INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-supplement_id exp = gs_supplement_2-supplement_id ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD read_db.
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
" Create 2 bookings for the new travel
_create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '20'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
_create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '21'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
" Create a single booking supplement for the first booking
_create_booking_suppl( iv_travel_id = ls_travel-travel_id
is_booking_supplement = VALUE #( booking_id = '20'
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_false ).
" Create 2 booking supplements for the second booking
_create_booking_suppl( iv_travel_id = ls_travel-travel_id
is_booking_supplement = VALUE #( booking_id = '21'
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
iv_save = abap_false ).
_create_booking_suppl( iv_travel_id = ls_travel-travel_id
is_booking_supplement = VALUE #( booking_id = '21'
booking_supplement_id = '20'
supplement_id = gs_supplement_2-supplement_id
price = '30.0'
currency_code = 'EUR' )
iv_save = abap_true )." <<< Finally write to DB
gr_cut->get_travel( EXPORTING iv_travel_id = ls_travel-travel_id
iv_include_buffer = abap_true
IMPORTING es_travel = DATA(ls_travel_read)
et_booking = DATA(lt_booking_read)
et_booking_supplement = DATA(lt_booking_supplement_read)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_read-travel_id exp = ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_read-agency_id exp = ls_travel-agency_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_read ) exp = 2 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement_read ) exp = 3 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement_read[ travel_id = ls_travel-travel_id booking_id = '21' booking_supplement_id = '20' ] ) ) ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement_read[ travel_id = ls_travel-travel_id booking_id = '21' booking_supplement_id = '20' ]-supplement_id exp = gs_supplement_2-supplement_id ).
_delete_existing_travel( ls_travel-travel_id ).
gr_cut->get_travel( EXPORTING iv_travel_id = ls_travel-travel_id
iv_include_buffer = abap_true
IMPORTING es_travel = ls_travel_read
et_booking = lt_booking_read
et_booking_supplement = lt_booking_supplement_read
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( ls_travel_read ).
cl_abap_unit_assert=>assert_initial( lt_booking_read ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement_read ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
ENDMETHOD.
METHOD read_buffer.
CONSTANTS lc_booking_id_1 TYPE /dmo/booking_id01 VALUE '20'.
CONSTANTS lc_booking_id_2 TYPE /dmo/booking_id01 VALUE '21'.
CONSTANTS lc_booking_supplement_id_1_1 TYPE /dmo/booking_supplement_id01 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_1 TYPE /dmo/booking_supplement_id01 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_2 TYPE /dmo/booking_supplement_id01 VALUE '20'.
gr_cut->create_travel(
EXPORTING
is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' description = 'My_Deep_Insert' )
it_booking = VALUE #( ( booking_id = lc_booking_id_1
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
( booking_id = lc_booking_id_2
booking_date = gv_booking_date
customer_id = gv_customer_id_2
carrier_id = gs_flight_2-carrier_id
connection_id = gs_flight_2-connection_id
flight_date = gs_flight_2-flight_date ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_2
supplement_id = gs_supplement_2-supplement_id
price = '30.0'
currency_code = 'EUR' ) )
IMPORTING
es_travel = DATA(ls_travel)
et_booking = DATA(lt_booking)
et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking ) exp = 2 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 3 ).
" Now delete the first booking from the buffer
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( travel_id = ls_travel-travel_id )
it_booking = VALUE #( ( booking_id = lc_booking_id_1 ) )
it_bookingx = VALUE #( ( booking_id = lc_booking_id_1 action_code = /dmo/if_flight_legacy01=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->get_travel( EXPORTING iv_travel_id = ls_travel-travel_id
iv_include_buffer = abap_true
IMPORTING es_travel = DATA(ls_travel_read)
et_booking = DATA(lt_booking_read)
et_booking_supplement = DATA(lt_booking_supplement_read)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_read-travel_id exp = ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_read-agency_id exp = ls_travel-agency_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_read ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement_read ) exp = 2 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement_read[ travel_id = ls_travel-travel_id booking_id = '21' booking_supplement_id = '20' ] ) ) ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement_read[ travel_id = ls_travel-travel_id booking_id = '21' booking_supplement_id = '20' ]-supplement_id exp = gs_supplement_2-supplement_id ).
gr_cut->initialize( ).
ENDMETHOD.
METHOD read_travel_id_initial.
gr_cut->get_travel( EXPORTING iv_travel_id = '0'
iv_include_buffer = abap_true
IMPORTING es_travel = DATA(ls_travel_read)
et_booking = DATA(lt_booking_read)
et_booking_supplement = DATA(lt_booking_supplement_read)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel_read ).
cl_abap_unit_assert=>assert_initial( lt_booking_read ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement_read ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_supplement_id.
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_true ).
" Pretend to change the supplement ID (provide the same value)
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
supplement_id = gs_supplement_1-supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-update
supplement_id = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
" Try to update the Booking Supplement with an unknown supplement ID
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
supplement_id = gs_supplement_2-supplement_id
price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-update
supplement_id = abap_true
price = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_suppl_id_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking_supplement-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = ls_booking_supplement-booking_supplement_id ).
gr_cut->save( ).
" Check that nothing has changed
SELECT SINGLE supplement_id, price FROM /dmo/book_sup_01 WHERE travel_id = @ls_booking_supplement-travel_id
AND booking_id = @ls_booking_supplement-booking_id
AND booking_supplement_id = @ls_booking_supplement-booking_supplement_id
INTO ( @DATA(lv_supplement_id), @DATA(lv_price) ).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_supplement_id exp = gs_supplement_1-supplement_id ).
cl_abap_unit_assert=>assert_equals( act = lv_price exp = '10' ).
ENDMETHOD.
METHOD c_price_currency.
" Do not provide price and currency
_create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id )
iv_save = abap_false ).
" Provide price and currency
CONSTANTS lc_diff TYPE /dmo/supplement_price01 VALUE '9.99'.
DATA lv_price TYPE /dmo/supplement_price01.
DATA lv_currency_code TYPE /dmo/currency_code01.
lv_price = gs_supplement_1-price + lc_diff.
lv_currency_code = SWITCH #( gs_supplement_1-currency_code WHEN 'USD' THEN 'EUR' ELSE 'USD' ).
_create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = lv_price
currency_code = lv_currency_code )
iv_save = abap_true ).
DATA ls_booking_supplement_sel TYPE /dmo/book_sup_01.
SELECT SINGLE price, currency_code FROM /dmo/book_sup_01 WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = '10' INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-price exp = gs_supplement_1-price ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-currency_code exp = gs_supplement_1-currency_code ).
CLEAR ls_booking_supplement_sel.
SELECT SINGLE price, currency_code FROM /dmo/book_sup_01 WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = '20' INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-price exp = lv_price ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-currency_code exp = lv_currency_code ).
ENDMETHOD.
METHOD u_price_currency.
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id )
iv_save = abap_true ).
" Try to change only the price
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-update
price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_pri_curr_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking_supplement-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = ls_booking_supplement-booking_supplement_id ).
" Try to change only the currency
CLEAR lt_messages.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
currency_code = 'XXX' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-update
currency_code = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>booking_supplement_pri_curr_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking_supplement-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = ls_booking_supplement-booking_supplement_id ).
ENDMETHOD.
METHOD c_currency_code_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '9.99'
currency_code = gv_currency_code_unknown ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '10'
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>currency_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CURRENCY_CODE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_currency_code exp = gv_currency_code_unknown ).
ENDMETHOD.
METHOD u_currency_code_unknown.
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id )
iv_save = abap_true ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
price = '9.99'
currency_code = gv_currency_code_unknown ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-update
price = abap_true
currency_code = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy01 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy01.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy01=>currency_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CURRENCY_CODE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_currency_code exp = gv_currency_code_unknown ).
ENDMETHOD.
METHOD _create_booking_suppl.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = iv_travel_id )
is_travelx = VALUE #( travel_id = iv_travel_id )
it_booking_supplement = VALUE #( ( is_booking_supplement ) )
it_booking_supplementx = VALUE #( ( booking_id = is_booking_supplement-booking_id
booking_supplement_id = is_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy01=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 1 ).
rs_booking_supplement = lt_booking_supplement[ 1 ].
cl_abap_unit_assert=>assert_equals( act = rs_booking_supplement-travel_id exp = iv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = rs_booking_supplement-booking_id exp = is_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = rs_booking_supplement-booking_supplement_id exp = is_booking_supplement-booking_supplement_id ).
IF iv_save = abap_true.
gr_cut->save( ).
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
83,
565,
62,
5354,
62,
35927,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
198,
31631,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
486,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
83,
565,
62,
5354,
62,
35927,
13,
198,
198,
31631,
300,
83,
565,
62,
5354,
62,
35927,
5550,
20032,
17941,
25261,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1392,
62,
5354,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
10619,
31631,
13,
628,
198,
31631,
300,
83,
565,
62,
5354,
62,
35927,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1392,
62,
5354,
22492,
12161,
1961,
1961,
13,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
628,
198,
31631,
300,
23047,
62,
35927,
5550,
20032,
17941,
7473,
43001,
2751,
360,
4261,
6234,
6006,
9863,
45698,
42,
49277,
43638,
5805,
7597,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
36650,
62,
1904,
62,
25410,
62,
67,
280,
7689,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
26173,
8924,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
36650,
62,
19662,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
827,
19662,
312,
220,
220,
26173,
8924,
31051,
35,
11770,
14,
24187,
62,
3697,
9947,
62,
2538,
62,
486,
4458,
198,
198,
9,
16363,
21938,
3058,
407,
1695,
287,
6279,
2858,
198,
9,
220,
220,
42715,
12,
26947,
285,
81,
62,
9288,
62,
38986,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
418,
13976,
62,
9288,
62,
38986,
13,
628,
220,
220,
220,
42715,
12,
26947,
1036,
62,
8968,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
486,
13,
628,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
40955,
62,
312,
62,
16,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
40955,
62,
312,
486,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
40955,
62,
312,
62,
17,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
40955,
62,
312,
486,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
40955,
62,
312,
62,
34680,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
40955,
62,
312,
486,
13,
628,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
23144,
263,
62,
312,
62,
16,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23144,
263,
62,
312,
486,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
23144,
263,
62,
312,
62,
17,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23144,
263,
62,
312,
486,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
23144,
263,
62,
312,
62,
34680,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23144,
263,
62,
312,
486,
13,
628,
220,
220,
220,
337,
36252,
50,
4808,
17953,
62,
35927,
30023,
9863,
2751,
318,
62,
35927,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
361,
62,
22560,
62,
1455,
1590,
486,
14804,
912,
62,
35927,
62,
259,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
21928,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
3808,
62,
35927,
8,
41876,
1220,
67,
5908,
14,
35927,
486,
13,
198,
220,
220,
220,
337,
36252,
50,
4808,
33678,
62,
25687,
62,
35927,
30023,
9863,
2751,
21628,
62,
35927,
62,
312,
41876,
1220,
67,
5908,
14,
35927,
62,
312,
486,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
35927,
62,
9127,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
2070,
278,
62,
9127,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
2070,
278,
62,
18608,
1732,
62,
9127,
41876,
1312,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
1398,
62,
40406,
13,
198,
220,
220,
220,
337,
36252,
50,
9058,
13,
198,
220,
220,
220,
337,
36252,
50,
573,
446,
593,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
1398,
62,
660,
446,
593,
13,
628,
220,
220,
220,
366,
0,
13610,
290,
2198,
257,
2060,
3067,
198,
220,
220,
220,
337,
36252,
50,
2251,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
366,
0,
9993,
284,
2251,
257,
3067,
351,
281,
6439,
4086,
4613,
33854,
198,
220,
220,
220,
337,
36252,
50,
269,
62,
40955,
62,
34680,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
366,
0,
9993,
284,
2251,
257,
3067,
351,
281,
6439,
6491,
4613,
33854,
198,
220,
220,
220,
337,
36252,
50,
269,
62,
23144,
263,
62,
34680,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_ecatt_super DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_objects_super
ABSTRACT
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abapgit_object .
ALIASES mo_files
FOR zif_abapgit_object~mo_files .
METHODS:
constructor
IMPORTING
!is_item TYPE zif_abapgit_definitions=>ty_item
!iv_language TYPE spras .
PROTECTED SECTION.
METHODS:
get_object_type ABSTRACT
RETURNING VALUE(rv_object_type) TYPE etobj_type,
get_upload ABSTRACT
RETURNING
VALUE(ro_upload) TYPE REF TO cl_apl_ecatt_upload,
get_download ABSTRACT
RETURNING
VALUE(ro_download) TYPE REF TO cl_apl_ecatt_download,
get_lock_object ABSTRACT
RETURNING
VALUE(rv_lock_object) TYPE eqeobj.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_last_changed,
luser TYPE xubname,
ldate TYPE datum,
ltime TYPE uzeit,
END OF ty_last_changed.
CONSTANTS:
BEGIN OF co_name,
version TYPE string VALUE 'VERSION' ##NO_TEXT,
versions TYPE string VALUE 'VERSIONS' ##NO_TEXT,
END OF co_name,
co_default_version TYPE etobj_ver VALUE '1' ##NO_TEXT.
CLASS-METHODS:
is_change_more_recent_than
IMPORTING
is_currently_changed TYPE ty_last_changed
is_last_changed TYPE ty_last_changed
RETURNING
VALUE(rv_is_change_more_recent) TYPE abap_bool.
DATA:
mv_object_name TYPE etobj_name.
METHODS:
get_changed_date
IMPORTING
ii_document TYPE REF TO if_ixml_document
RETURNING
VALUE(rv_changed_date) TYPE d,
get_changed_time
IMPORTING
ii_document TYPE REF TO if_ixml_document
RETURNING
VALUE(rv_changed_time) TYPE t,
get_changed_by_user
IMPORTING
ii_document TYPE REF TO if_ixml_document
RETURNING
VALUE(rv_changed_by_user) TYPE xubname,
get_change_information
IMPORTING
is_version_info TYPE etversinfo
RETURNING
VALUE(rs_change_information) TYPE ty_last_changed
RAISING
cx_ecatt_apl
zcx_abapgit_exception,
clear_attributes
CHANGING
ci_document TYPE REF TO if_ixml_document,
clear_elements
CHANGING
ci_document TYPE REF TO if_ixml_document,
get_version_from_node
IMPORTING
ii_node TYPE REF TO if_ixml_node
RETURNING
VALUE(rv_version) TYPE string,
deserialize_version
IMPORTING
ii_version_node TYPE REF TO if_ixml_node
iv_package TYPE devclass
RAISING
zcx_abapgit_exception,
serialize_version
IMPORTING
iv_version TYPE etversinfo-version
CHANGING
ci_node TYPE REF TO if_ixml_element
RAISING
cx_ecatt
zcx_abapgit_exception,
clear_element
IMPORTING
iv_name TYPE csequence
CHANGING
ci_document TYPE REF TO if_ixml_document,
serialize_versions
IMPORTING
it_version_info TYPE etversinfo_tabtype
CHANGING
ci_document TYPE REF TO if_ixml_document
RAISING
cx_ecatt
zcx_abapgit_exception.
ENDCLASS.
CLASS zcl_abapgit_object_ecatt_super IMPLEMENTATION.
METHOD clear_attributes.
DATA: lo_element TYPE REF TO if_ixml_element,
lv_object_type TYPE etobj_type.
lv_object_type = get_object_type( ).
lo_element = ci_document->find_from_name( |{ lv_object_type }| ).
lo_element->remove_attribute( |SAPRL| ).
lo_element->remove_attribute( |DOWNLOADDATE| ).
lo_element->remove_attribute( |DOWNLOADTIME| ).
ENDMETHOD.
METHOD clear_element.
DATA: lo_element TYPE REF TO if_ixml_element.
lo_element = ci_document->find_from_name( iv_name ).
IF lo_element IS BOUND.
lo_element->set_value( || ).
ENDIF.
ENDMETHOD.
METHOD clear_elements.
clear_element( EXPORTING iv_name = |FUSER|
CHANGING ci_document = ci_document ).
clear_element( EXPORTING iv_name = |FDATE|
CHANGING ci_document = ci_document ).
clear_element( EXPORTING iv_name = |LUSER|
CHANGING ci_document = ci_document ).
clear_element( EXPORTING iv_name = |LDATE|
CHANGING ci_document = ci_document ).
clear_element( EXPORTING iv_name = |LTIME|
CHANGING ci_document = ci_document ).
clear_element( EXPORTING iv_name = |TWB_RESP|
CHANGING ci_document = ci_document ).
clear_element( EXPORTING iv_name = |DEVCLASS|
CHANGING ci_document = ci_document ).
clear_element( EXPORTING iv_name = |TADIR_RESP|
CHANGING ci_document = ci_document ).
clear_element( EXPORTING iv_name = |VAR_EXT_PATH|
CHANGING ci_document = ci_document ).
ENDMETHOD.
METHOD constructor.
super->constructor( is_item = is_item
iv_language = iv_language ).
mv_object_name = ms_item-obj_name.
ENDMETHOD.
METHOD deserialize_version.
DATA: ls_object TYPE etmobjects,
lo_upload TYPE REF TO cl_apl_ecatt_upload,
lv_xml TYPE xstring,
lv_text TYPE string,
li_document TYPE REF TO if_ixml_document,
lv_version TYPE string,
lx_error TYPE REF TO cx_ecatt.
lv_version = get_version_from_node( ii_version_node ).
IF lv_version IS INITIAL.
RETURN.
ENDIF.
lo_upload = get_upload( ).
li_document = cl_ixml=>create( )->create_document( ).
li_document->append_child( ii_version_node->get_first_child( ) ).
lv_xml = cl_ixml_80_20=>render_to_xstring( li_document ).
CALL METHOD lo_upload->('Z_SET_STREAM_FOR_UPLOAD')
EXPORTING
iv_xml = lv_xml.
ls_object-d_obj_name = mv_object_name.
ls_object-s_obj_type = get_object_type( ).
ls_object-d_devclass = iv_package.
ls_object-d_obj_ver = lv_version.
ls_object-d_overwrite = abap_true.
TRY.
lo_upload->upload(
CHANGING
ch_object = ls_object ).
CATCH cx_ecatt INTO lx_error.
lv_text = lx_error->get_text( ).
zcx_abapgit_exception=>raise( lv_text ).
ENDTRY.
ENDMETHOD.
METHOD get_changed_by_user.
rv_changed_by_user = ii_document->find_from_name( 'LUSER' )->get_value( ).
ENDMETHOD.
METHOD get_changed_date.
DATA: lv_changed_date_external TYPE string.
lv_changed_date_external = ii_document->find_from_name( 'LDATE' )->get_value( ).
CALL FUNCTION 'CONVERSION_EXIT_RSDAT_INPUT'
EXPORTING
input = lv_changed_date_external
IMPORTING
output = rv_changed_date
EXCEPTIONS
invalid_date = 1
OTHERS = 2.
IF sy-subrc <> 0.
RETURN.
ENDIF.
ENDMETHOD.
METHOD get_changed_time.
DATA: lv_changed_time_external TYPE string.
lv_changed_time_external = ii_document->find_from_name( 'LTIME' )->get_value( ).
CALL FUNCTION 'CONVERSION_EXIT_TIMLO_INPUT'
EXPORTING
input = lv_changed_time_external
IMPORTING
output = rv_changed_time
EXCEPTIONS
wrong_input = 1
OTHERS = 2.
IF sy-subrc <> 0.
RETURN.
ENDIF.
ENDMETHOD.
METHOD get_change_information.
DATA: li_document TYPE REF TO if_ixml_document,
lv_xml TYPE xstring,
lo_download TYPE REF TO cl_apl_ecatt_download,
lv_object_type TYPE etobj_type.
lo_download = get_download( ).
lv_object_type = get_object_type( ).
zcl_abapgit_ecatt_helper=>build_xml_of_object(
EXPORTING
im_object_name = mv_object_name
im_object_version = is_version_info-version
im_object_type = lv_object_type
io_download = lo_download
IMPORTING
ex_xml_stream = lv_xml ).
li_document = cl_ixml_80_20=>parse_to_document( stream_xstring = lv_xml ).
rs_change_information-ldate = get_changed_date( li_document ).
rs_change_information-ltime = get_changed_time( li_document ).
rs_change_information-luser = get_changed_by_user( li_document ).
ENDMETHOD.
METHOD get_version_from_node.
TRY.
rv_version = ii_node->get_first_child(
)->get_first_child(
)->get_first_child(
)->get_first_child(
)->get_value( ).
CATCH cx_sy_ref_is_initial.
RETURN.
ENDTRY.
ENDMETHOD.
METHOD is_change_more_recent_than.
IF ( is_currently_changed-ldate > is_last_changed-ldate )
OR ( is_currently_changed-ldate = is_last_changed-ldate
AND is_currently_changed-ltime > is_last_changed-ltime ).
rv_is_change_more_recent = abap_true.
ENDIF.
ENDMETHOD.
METHOD serialize_version.
DATA: li_document TYPE REF TO if_ixml_document,
lv_xml TYPE xstring,
lo_node TYPE REF TO if_ixml_element,
lo_download TYPE REF TO cl_apl_ecatt_download,
lv_object_type TYPE etobj_type.
lo_download = get_download( ).
lv_object_type = get_object_type( ).
zcl_abapgit_ecatt_helper=>build_xml_of_object(
EXPORTING
im_object_name = mv_object_name
im_object_version = iv_version
im_object_type = lv_object_type
io_download = lo_download
IMPORTING
ex_xml_stream = lv_xml ).
li_document = cl_ixml_80_20=>parse_to_document( stream_xstring = lv_xml ).
clear_attributes(
CHANGING
ci_document = li_document ).
clear_elements(
CHANGING
ci_document = li_document ).
lo_node = li_document->create_element( co_name-version ).
lo_node->append_child( li_document->get_root_element( ) ).
ci_node->append_child( lo_node ).
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
DATA: ls_last_changed TYPE ty_last_changed,
ls_currently_changed TYPE ty_last_changed,
lt_version_info TYPE etversinfo_tabtype,
lx_error TYPE REF TO cx_ecatt,
lv_text TYPE string,
lv_object_type TYPE etobj_type.
FIELD-SYMBOLS: <ls_version_info> LIKE LINE OF lt_version_info.
TRY.
lv_object_type = get_object_type( ).
cl_apl_ecatt_object=>get_version_info_object(
EXPORTING
im_name = mv_object_name
im_obj_type = lv_object_type
IMPORTING
ex_version_info = lt_version_info ).
LOOP AT lt_version_info ASSIGNING <ls_version_info>.
ls_currently_changed = get_change_information( <ls_version_info> ).
IF is_change_more_recent_than( is_currently_changed = ls_currently_changed
is_last_changed = ls_last_changed ) = abap_true.
ls_last_changed = ls_currently_changed.
ENDIF.
ENDLOOP.
CATCH cx_ecatt INTO lx_error.
lv_text = lx_error->get_text( ).
MESSAGE lv_text TYPE 'S' DISPLAY LIKE 'E'.
ENDTRY.
IF ls_last_changed-luser IS NOT INITIAL.
rv_user = ls_last_changed-luser.
ELSE.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~compare_to_remote_version.
CREATE OBJECT ro_comparison_result TYPE zcl_abapgit_comparison_null.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lx_error TYPE REF TO cx_ecatt_apl,
lv_text TYPE string,
lv_object_type TYPE etobj_type.
lv_object_type = get_object_type( ).
TRY.
cl_apl_ecatt_object=>delete_object( im_obj_type = lv_object_type
im_name = mv_object_name
" we have to supply a version, so let's use the default version
" and delete them all
im_version = co_default_version
im_delete_all_versions = abap_true ).
CATCH cx_ecatt_apl INTO lx_error.
lv_text = lx_error->get_text( ).
zcx_abapgit_exception=>raise( lv_text ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: li_document TYPE REF TO if_ixml_document,
li_versions TYPE REF TO if_ixml_node_collection,
li_version_iterator TYPE REF TO if_ixml_node_iterator,
lo_version_node TYPE REF TO if_ixml_node.
li_document = io_xml->get_raw( ).
li_versions = li_document->get_elements_by_tag_name( depth = 0
name = co_name-version ).
li_version_iterator = li_versions->create_iterator( ).
DO.
lo_version_node = li_version_iterator->get_next( ).
IF lo_version_node IS NOT BOUND.
EXIT.
ENDIF.
deserialize_version( ii_version_node = lo_version_node
iv_package = iv_package ).
ENDDO.
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_object_type TYPE etobj_type.
lv_object_type = get_object_type( ).
TRY.
rv_bool = cl_apl_ecatt_object=>existence_check_object( im_name = mv_object_name
im_version = co_default_version
im_obj_type = lv_object_type
im_exists_any_version = abap_true ).
CATCH cx_ecatt.
RETURN.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD.
METHOD zif_abapgit_object~has_changed_since.
rv_changed = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = ms_item-obj_name
object_type = ms_item-obj_type
in_new_window = abap_true
EXCEPTIONS
not_executed = 1
invalid_object_type = 2
OTHERS = 3.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error { sy-subrc } from RS_TOOL_ACCESS | ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA:
lt_version_info TYPE etversinfo_tabtype,
li_document TYPE REF TO if_ixml_document,
lx_error TYPE REF TO cx_ecatt,
lv_text TYPE string,
lv_object_type TYPE etobj_type.
lv_object_type = get_object_type( ).
TRY.
cl_apl_ecatt_object=>get_version_info_object(
EXPORTING
im_name = mv_object_name
im_obj_type = lv_object_type
IMPORTING
ex_version_info = lt_version_info ).
li_document = cl_ixml=>create( )->create_document( ).
serialize_versions(
EXPORTING
it_version_info = lt_version_info
CHANGING
ci_document = li_document ).
io_xml->set_raw( li_document->get_root_element( ) ).
CATCH cx_ecatt INTO lx_error.
lv_text = lx_error->get_text( ).
MESSAGE lv_text TYPE 'S' DISPLAY LIKE 'E'.
ENDTRY.
ENDMETHOD.
METHOD serialize_versions.
DATA: li_versions_node TYPE REF TO if_ixml_element.
FIELD-SYMBOLS: <ls_version_info> LIKE LINE OF it_version_info.
li_versions_node = ci_document->create_element( co_name-versions ).
IF lines( it_version_info ) > 0.
LOOP AT it_version_info ASSIGNING <ls_version_info>.
serialize_version(
EXPORTING
iv_version = <ls_version_info>-version
CHANGING
ci_node = li_versions_node ).
ENDLOOP.
ELSE.
serialize_version(
EXPORTING
iv_version = co_default_version
CHANGING
ci_node = li_versions_node ).
ENDIF.
ci_document->append_child( li_versions_node ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
DATA: lv_object TYPE seqg3-garg.
lv_object = ms_item-obj_name.
OVERLAY lv_object WITH ' '.
lv_object = lv_object && '*'.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = get_lock_object( )
iv_argument = lv_object ).
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
721,
1078,
62,
16668,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
198,
220,
9564,
18601,
10659,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
764,
628,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
764,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
9186,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
16129,
41876,
7500,
292,
764,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
651,
62,
15252,
62,
4906,
9564,
18601,
10659,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
15252,
62,
4906,
8,
41876,
2123,
26801,
62,
4906,
11,
628,
220,
220,
220,
220,
220,
651,
62,
25850,
9564,
18601,
10659,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
25850,
8,
41876,
4526,
37,
5390,
537,
62,
64,
489,
62,
721,
1078,
62,
25850,
11,
628,
220,
220,
220,
220,
220,
651,
62,
15002,
9564,
18601,
10659,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
15002,
8,
41876,
4526,
37,
5390,
537,
62,
64,
489,
62,
721,
1078,
62,
15002,
11,
628,
220,
220,
220,
220,
220,
651,
62,
5354,
62,
15252,
9564,
18601,
10659,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
5354,
62,
15252,
8,
41876,
37430,
68,
26801,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
12957,
62,
40985,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
7220,
41876,
2124,
549,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
4475,
41876,
4818,
388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
2435,
41876,
334,
2736,
270,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
12957,
62,
40985,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
763,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2196,
220,
41876,
4731,
26173,
8924,
705,
43717,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6300,
41876,
4731,
26173,
8924,
705,
28884,
11053,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
763,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
763,
62,
12286,
62,
9641,
41876,
2123,
26801,
62,
332,
26173,
8924,
705,
16,
6,
22492,
15285,
62,
32541,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
318,
62,
3803,
62,
3549,
62,
49921,
62,
14813,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
41745,
62,
40985,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1259,
62,
12957,
62,
40985,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
12957,
62,
40985,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1259,
62,
12957,
62,
40985,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
271,
62,
3803,
62,
3549,
62,
49921,
8,
41876,
450,
499,
62,
30388,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
285,
85,
62,
15252,
62,
3672,
41876,
2123,
26801,
62,
3672,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
651,
62,
40985,
62,
4475,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
22897,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
22897,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
40985,
62,
4475,
8,
41876,
288,
11,
628,
220,
220,
220,
220,
220,
651,
62,
40985,
62,
2435,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
22897,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
22897,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
40985,
62,
2435,
8,
41876,
256,
11,
628,
220,
220,
220,
220,
220,
651,
62,
40985,
62,
1525,
62,
7220,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
22897,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
22897,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_gui_page_settings DEFINITION
PUBLIC
FINAL
CREATE PUBLIC INHERITING FROM zcl_abapgit_gui_page.
PUBLIC SECTION.
CONSTANTS:
BEGIN OF c_action,
save_settings TYPE string VALUE 'save_settings',
change_proxy_bypass TYPE string VALUE 'change_proxy_bypass',
END OF c_action.
METHODS constructor
RAISING zcx_abapgit_exception.
METHODS zif_abapgit_gui_event_handler~on_event REDEFINITION.
PROTECTED SECTION.
METHODS render_content REDEFINITION.
PRIVATE SECTION.
DATA mo_settings TYPE REF TO zcl_abapgit_settings .
DATA mv_error TYPE abap_bool .
DATA mt_post_fields TYPE tihttpnvp .
DATA mt_proxy_bypass TYPE zif_abapgit_definitions=>ty_range_proxy_bypass_url.
DATA mt_default_hotkeys TYPE zif_abapgit_gui_hotkeys=>tty_hotkey_with_descr.
METHODS post_commit_msg .
METHODS post_development_internals .
METHODS post_hotkeys .
METHODS render_proxy
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_development_internals
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_form_begin
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_form_end
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_max_lines
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_icon_scaling
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_ui_theme
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_adt_jump_enabled
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_commit_msg
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS post_proxy .
METHODS post
IMPORTING
!it_post_fields TYPE tihttpnvp .
METHODS validate_settings .
METHODS parse_post
IMPORTING
!it_postdata TYPE cnht_post_data_tab
RETURNING
VALUE(rt_post_fields) TYPE tihttpnvp .
METHODS persist_settings
RAISING
zcx_abapgit_exception .
METHODS read_settings .
METHODS render_section_begin
IMPORTING
!iv_header TYPE csequence
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_section_end
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_start_up
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS render_link_hints
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html
RAISING
zcx_abapgit_exception .
METHODS render_hotkeys
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html
RAISING
zcx_abapgit_exception .
METHODS is_post_field_checked
IMPORTING
iv_name TYPE string
RETURNING
VALUE(rv_return) TYPE abap_bool .
METHODS render_parallel_proc
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
ENDCLASS.
CLASS ZCL_ABAPGIT_GUI_PAGE_SETTINGS IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
ms_control-page_title = 'SETTINGS'.
ENDMETHOD.
METHOD is_post_field_checked.
FIELD-SYMBOLS: <ls_post_field> TYPE ihttpnvp.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = iv_name.
IF sy-subrc = 0
AND ( <ls_post_field>-value = abap_true "HTML value when using standard netweaver GUI
OR <ls_post_field>-value = 'on' ). "HTML value when using Netweaver Java GUI
rv_return = abap_true.
ENDIF.
ENDMETHOD.
METHOD parse_post.
DATA lv_serialized_post_data TYPE string.
CONCATENATE LINES OF it_postdata INTO lv_serialized_post_data.
rt_post_fields = zcl_abapgit_html_action_utils=>parse_fields( lv_serialized_post_data ).
ENDMETHOD.
METHOD persist_settings.
DATA lo_settings_persistence TYPE REF TO zcl_abapgit_persist_settings.
lo_settings_persistence = zcl_abapgit_persist_settings=>get_instance( ).
lo_settings_persistence->modify( mo_settings ).
MESSAGE 'Settings succesfully saved' TYPE 'S'.
ENDMETHOD.
METHOD post.
DATA lv_i_param_value TYPE i.
DATA lv_c_param_value TYPE c.
FIELD-SYMBOLS: <ls_post_field> TYPE ihttpnvp.
CREATE OBJECT mo_settings.
mt_post_fields = it_post_fields.
post_proxy( ).
post_commit_msg( ).
post_development_internals( ).
* todo, refactor to private POST_* methods
IF is_post_field_checked( 'show_default_repo' ) = abap_true.
mo_settings->set_show_default_repo( abap_true ).
ELSE.
mo_settings->set_show_default_repo( abap_false ).
ENDIF.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'max_lines'.
IF sy-subrc = 0.
lv_i_param_value = <ls_post_field>-value.
mo_settings->set_max_lines( lv_i_param_value ).
ELSE.
mo_settings->set_max_lines( 0 ).
ENDIF.
IF is_post_field_checked( 'adt_jump_enabled' ) = abap_true.
mo_settings->set_adt_jump_enanbled( abap_true ).
ELSE.
mo_settings->set_adt_jump_enanbled( abap_false ).
ENDIF.
IF is_post_field_checked( 'link_hints_enabled' ) = abap_true.
mo_settings->set_link_hints_enabled( abap_true ).
ELSE.
mo_settings->set_link_hints_enabled( abap_false ).
ENDIF.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'link_hint_key'.
IF sy-subrc = 0.
mo_settings->set_link_hint_key( |{ <ls_post_field>-value }| ).
ENDIF.
IF is_post_field_checked( 'parallel_proc_disabled' ) = abap_true.
mo_settings->set_parallel_proc_disabled( abap_true ).
ELSE.
mo_settings->set_parallel_proc_disabled( abap_false ).
ENDIF.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'icon_scaling'.
IF sy-subrc = 0.
lv_c_param_value = <ls_post_field>-value.
mo_settings->set_icon_scaling( lv_c_param_value ).
ELSE.
mo_settings->set_icon_scaling( '' ).
ENDIF.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'ui_theme'.
IF sy-subrc = 0.
mo_settings->set_ui_theme( <ls_post_field>-value ).
ELSE.
mo_settings->set_ui_theme( zcl_abapgit_settings=>c_ui_theme-default ).
ENDIF.
post_hotkeys( ).
ENDMETHOD.
METHOD post_commit_msg.
DATA: lv_i_param_value TYPE i.
FIELD-SYMBOLS: <ls_post_field> TYPE ihttpnvp.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'comment_length'.
IF sy-subrc = 0.
lv_i_param_value = <ls_post_field>-value.
IF lv_i_param_value < zcl_abapgit_settings=>c_commitmsg_comment_length_dft.
lv_i_param_value = zcl_abapgit_settings=>c_commitmsg_comment_length_dft.
ENDIF.
mo_settings->set_commitmsg_comment_length( lv_i_param_value ).
ELSE.
mo_settings->set_commitmsg_comment_length( zcl_abapgit_settings=>c_commitmsg_comment_length_dft ).
ENDIF.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'comment_default'.
IF sy-subrc = 0.
mo_settings->set_commitmsg_comment_default( <ls_post_field>-value ).
ENDIF.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'body_size'.
IF sy-subrc = 0.
lv_i_param_value = <ls_post_field>-value.
IF lv_i_param_value < zcl_abapgit_settings=>c_commitmsg_body_size_dft.
lv_i_param_value = zcl_abapgit_settings=>c_commitmsg_body_size_dft.
ENDIF.
mo_settings->set_commitmsg_body_size( lv_i_param_value ).
ELSE.
mo_settings->set_commitmsg_body_size( zcl_abapgit_settings=>c_commitmsg_body_size_dft ).
ENDIF.
ENDMETHOD.
METHOD post_development_internals.
IF is_post_field_checked( 'critical_tests' ) = abap_true.
mo_settings->set_run_critical_tests( abap_true ).
ELSE.
mo_settings->set_run_critical_tests( abap_false ).
ENDIF.
IF is_post_field_checked( 'experimental_features' ) = abap_true.
mo_settings->set_experimental_features( abap_true ).
ELSE.
mo_settings->set_experimental_features( abap_false ).
ENDIF.
ENDMETHOD.
METHOD post_hotkeys.
DATA:
lt_key_bindings TYPE zif_abapgit_definitions=>tty_hotkey,
ls_key_binding LIKE LINE OF lt_key_bindings.
FIELD-SYMBOLS:
<ls_default_hotkey> LIKE LINE OF mt_default_hotkeys,
<ls_post_field> TYPE ihttpnvp.
LOOP AT mt_post_fields ASSIGNING <ls_post_field> WHERE name CP 'hk~*'.
FIND FIRST OCCURRENCE OF REGEX `hk~(.+)~(.+)`
IN <ls_post_field>-name
SUBMATCHES ls_key_binding-ui_component ls_key_binding-action.
CHECK sy-subrc = 0.
READ TABLE mt_default_hotkeys
ASSIGNING <ls_default_hotkey>
WITH TABLE KEY action
COMPONENTS
ui_component = ls_key_binding-ui_component
action = ls_key_binding-action.
IF sy-subrc = 0 AND <ls_post_field>-value IS NOT INITIAL AND <ls_post_field>-value <> <ls_default_hotkey>-hotkey.
ls_key_binding-hotkey = <ls_post_field>-value.
APPEND ls_key_binding TO lt_key_bindings.
ENDIF.
ENDLOOP.
mo_settings->set_hotkeys( lt_key_bindings ).
ENDMETHOD.
METHOD post_proxy.
FIELD-SYMBOLS: <ls_post_field> TYPE ihttpnvp.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'proxy_url'.
IF sy-subrc <> 0.
mv_error = abap_true.
ENDIF.
mo_settings->set_proxy_url( <ls_post_field>-value ).
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'proxy_port'.
IF sy-subrc <> 0.
mv_error = abap_true.
ENDIF.
mo_settings->set_proxy_port( <ls_post_field>-value ).
IF is_post_field_checked( 'proxy_auth' ) = abap_true.
mo_settings->set_proxy_authentication( abap_true ).
ELSE.
mo_settings->set_proxy_authentication( abap_false ).
ENDIF.
mo_settings->set_proxy_bypass( mt_proxy_bypass ).
ENDMETHOD.
METHOD read_settings.
DATA lo_settings_persistence TYPE REF TO zcl_abapgit_persist_settings.
lo_settings_persistence = zcl_abapgit_persist_settings=>get_instance( ).
mo_settings = lo_settings_persistence->read( ).
mt_proxy_bypass = mo_settings->get_proxy_bypass( ).
ENDMETHOD.
METHOD render_adt_jump_enabled.
DATA lv_checked TYPE string.
IF mo_settings->get_adt_jump_enabled( ) = abap_true.
lv_checked = 'checked'.
ENDIF.
CREATE OBJECT ro_html.
ro_html->add( |<h2>ABAP Development Tools (ADT)</h2>| ).
ro_html->add( `<input type="checkbox" name="adt_jump_enabled" value="X" `
&& lv_checked && ` > Enable jump to ADT first` ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_commit_msg.
CREATE OBJECT ro_html.
ro_html->add( |<h2>Commit Message</h2>| ).
ro_html->add( |<label for="comment_length">Max. length of comment (recommendation 50)</label>| ).
ro_html->add( |<br>| ).
ro_html->add( |<input name="comment_length" type="number" step="10" size="3" maxlength="3" min="50"| &&
| value="{ mo_settings->get_commitmsg_comment_length( ) }">| ).
ro_html->add( |<br>| ).
ro_html->add( |<label for="comment_default">Default for comment (possible variables: $OBJECT, $FILE)</label>| ).
ro_html->add( |<br>| ).
ro_html->add( |<input name="comment_default" type="text" size="80" maxlength="255"| &&
| value="{ mo_settings->get_commitmsg_comment_default( ) }">| ).
ro_html->add( |<br>| ).
ro_html->add( |<label for="body_size">Max. line size of body (recommendation 72)</label>| ).
ro_html->add( |<br>| ).
ro_html->add( |<input name="body_size" type="number" size="3" maxlength="3" min="50"| &&
| value="{ mo_settings->get_commitmsg_body_size( ) }">| ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_content.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
read_settings( ).
ri_html->add( render_form_begin( ) ).
ri_html->add( render_section_begin( |Global settings| ) ).
ri_html->add( render_proxy( ) ).
ri_html->add( |<hr>| ).
ri_html->add( render_commit_msg( ) ).
ri_html->add( |<hr>| ).
ri_html->add( render_development_internals( ) ).
ri_html->add( render_section_end( ) ).
ri_html->add( render_section_begin( |User specific settings| ) ).
ri_html->add( render_start_up( ) ).
ri_html->add( render_max_lines( ) ).
ri_html->add( render_icon_scaling( ) ).
ri_html->add( render_ui_theme( ) ).
ri_html->add( |<hr>| ).
ri_html->add( render_adt_jump_enabled( ) ).
ri_html->add( |<hr>| ).
ri_html->add( render_parallel_proc( ) ).
ri_html->add( |<hr>| ).
ri_html->add( render_link_hints( ) ).
ri_html->add( |<hr>| ).
ri_html->add( render_hotkeys( ) ).
ri_html->add( render_section_end( ) ).
ri_html->add( render_form_end( ) ).
ENDMETHOD.
METHOD render_development_internals.
DATA: lv_critical_tests TYPE string,
lv_experimental TYPE string.
IF mo_settings->get_run_critical_tests( ) = abap_true.
lv_critical_tests = 'checked'.
ENDIF.
IF mo_settings->get_experimental_features( ) = abap_true.
lv_experimental = 'checked'.
ENDIF.
CREATE OBJECT ro_html.
ro_html->add( |<h2>abapGit Development Internals settings</h2>| ).
ro_html->add( `<input type="checkbox" name="critical_tests" `
&& lv_critical_tests && ` > Enable critical unit tests (see LTCL_DANGEROUS)` ).
ro_html->add( |<br>| ).
ro_html->add( `<input type="checkbox" name="experimental_features" `
&& lv_experimental && ` > Enable experimental features` ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_form_begin.
CREATE OBJECT ro_html.
ro_html->add( '<div class="settings_container">' ).
ro_html->add( `<form id="settings_form" method="post" action="sapevent:` && c_action-save_settings && `">` ).
ENDMETHOD.
METHOD render_form_end.
CREATE OBJECT ro_html.
ro_html->add( '<input type="submit" value="Save" class="floating-button blue-set emphasis">' ).
ro_html->add( '</form>' ).
ro_html->add( '</div>' ).
ENDMETHOD.
METHOD render_hotkeys.
DATA lv_hk_id TYPE string.
DATA lt_hotkeys LIKE mt_default_hotkeys.
FIELD-SYMBOLS <ls_key> LIKE LINE OF mt_default_hotkeys.
mt_default_hotkeys = zcl_abapgit_hotkeys=>get_all_default_hotkeys( ). " Cache for save processing
lt_hotkeys = mt_default_hotkeys.
zcl_abapgit_hotkeys=>merge_hotkeys_with_settings( CHANGING ct_hotkey_actions = lt_hotkeys ).
CREATE OBJECT ro_html.
ro_html->add( |<h2>Hotkeys</h2>| ).
ro_html->add( '<table class="settings_tab">' ).
ro_html->add( '<thead><tr><th>Component</th><th>Action</th><th>Key</th></tr></thead>' ).
LOOP AT lt_hotkeys ASSIGNING <ls_key>.
ro_html->add( '<tr>' ).
ro_html->add( |<td>{ <ls_key>-ui_component }</td>| ).
ro_html->add( |<td>{ <ls_key>-description }</td>| ).
lv_hk_id = |hk~{ <ls_key>-ui_component }~{ <ls_key>-action }|.
ro_html->add( |<td><input name="{ lv_hk_id }" maxlength=1 type="text" value="{ <ls_key>-hotkey }"></td>| ).
ro_html->add( '</tr>' ).
ENDLOOP.
ro_html->add( '</table>' ).
ENDMETHOD.
METHOD render_icon_scaling.
DATA:
BEGIN OF ls_sel,
auto TYPE string,
large TYPE string,
small TYPE string,
END OF ls_sel.
CASE mo_settings->get_icon_scaling( ).
WHEN zcl_abapgit_settings=>c_icon_scaling-large.
ls_sel-large = ' selected'.
WHEN zcl_abapgit_settings=>c_icon_scaling-small.
ls_sel-small = ' selected'.
WHEN OTHERS.
ls_sel-auto = ' selected'.
ENDCASE.
CREATE OBJECT ro_html.
ro_html->add( |<h2>UI Icon scaling</h2>| ).
ro_html->add( |<label for="icon_scaling">High DPI icon scaling</label>| ).
ro_html->add( |<br>| ).
ro_html->add( |<select name="icon_scaling" size="3">| ).
ro_html->add( |<option value=""{ ls_sel-auto }>Auto</option>| ).
ro_html->add( |<option value="{ zcl_abapgit_settings=>c_icon_scaling-large }"{ ls_sel-large }>Large</option>| ).
ro_html->add( |<option value="{ zcl_abapgit_settings=>c_icon_scaling-small }"{ ls_sel-small }>Small</option>| ).
ro_html->add( |</select>| ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_link_hints.
DATA: lv_checked TYPE string,
lv_link_hint_key TYPE char01.
IF mo_settings->get_link_hints_enabled( ) = abap_true.
lv_checked = 'checked'.
ENDIF.
lv_link_hint_key = mo_settings->get_link_hint_key( ).
CREATE OBJECT ro_html.
ro_html->add( |<h2>Vimium like link hints</h2>| ).
ro_html->add( `<input type="checkbox" name="link_hints_enabled" value="X" `
&& lv_checked && ` > Enable Vimium like link hints` ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ro_html->add( |<input type="text" name="link_hint_key" size="1" maxlength="1" value="{ lv_link_hint_key }" |
&& |> Single key to activate links| ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_max_lines.
CREATE OBJECT ro_html.
ro_html->add( |<h2>List size</h2>| ).
ro_html->add( |<label for="max_lines">Max. # of objects listed (0 = all)</label>| ).
ro_html->add( |<br>| ).
ro_html->add( `<input name="max_lines" type="text" size="5" value="` && mo_settings->get_max_lines( ) && `">` ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_parallel_proc.
DATA lv_checked TYPE string.
IF mo_settings->get_parallel_proc_disabled( ) = abap_true.
lv_checked = 'checked'.
ENDIF.
CREATE OBJECT ro_html.
ro_html->add( |<h2>Parallel processing</h2>| ).
ro_html->add( `<input type="checkbox" name="parallel_proc_disabled" value="X" `
&& lv_checked && ` > Disable parallel processing` ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_proxy.
CREATE OBJECT ro_html.
ro_html->add( |<h2>Proxy</h2>| ).
ro_html->add( |<label for="proxy_url">Proxy URL</label>| ).
ro_html->add( |<br>| ).
ro_html->add( `<input name="proxy_url" type="text" size="50" value="` &&
mo_settings->get_proxy_url( ) && `">` ).
ro_html->add( |<br>| ).
ro_html->add( |<label for="proxy_port">Proxy Port</label>| ).
ro_html->add( |<br>| ).
ro_html->add( `<input name="proxy_port" type="text" size="5" value="` &&
mo_settings->get_proxy_port( ) && `">` ).
ro_html->add( |<br>| ).
ro_html->add( |<label for="proxy_auth">Proxy Authentication</label>| ).
IF mo_settings->get_proxy_authentication( ) = abap_true.
ro_html->add( `<input name="proxy_auth" type="checkbox" checked>` ).
ELSE.
ro_html->add( `<input name="proxy_auth" type="checkbox">` ).
ENDIF.
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ro_html->add( |<label for="proxy_bypass">Bypass proxy settings for these Hosts & Domains</label>| ).
ro_html->add( |<br>| ).
ro_html->add( |<button type="button" name="proxy_bypass" class="grey-set"|
& |onclick="location.href='sapevent:{ c_action-change_proxy_bypass }';">Maintain</button>| ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_section_begin.
CREATE OBJECT ro_html.
ro_html->add( |<h1>{ iv_header }</h1>| ).
ro_html->add( |<div class="settings_section">| ).
ENDMETHOD.
METHOD render_section_end.
CREATE OBJECT ro_html.
ro_html->add( |</div>| ).
ENDMETHOD.
METHOD render_start_up.
DATA lv_checked TYPE string.
IF mo_settings->get_show_default_repo( ) = abap_true.
lv_checked = 'checked'.
ENDIF.
CREATE OBJECT ro_html.
ro_html->add( |<h2>Start up</h2>| ).
ro_html->add( `<input type="checkbox" name="show_default_repo" value="X" `
&& lv_checked && ` > Show last repo` ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_ui_theme.
" TODO: unify with render_icon_scaling, make list component
DATA:
BEGIN OF ls_sel,
default TYPE string,
dark TYPE string,
belize TYPE string,
END OF ls_sel.
CASE mo_settings->get_ui_theme( ).
WHEN zcl_abapgit_settings=>c_ui_theme-default.
ls_sel-default = ' selected'.
WHEN zcl_abapgit_settings=>c_ui_theme-dark.
ls_sel-dark = ' selected'.
WHEN zcl_abapgit_settings=>c_ui_theme-belize.
ls_sel-belize = ' selected'.
ENDCASE.
CREATE OBJECT ro_html.
ro_html->add( |<h2>UI Theme</h2>| ).
ro_html->add( |<label for="ui_theme">UI Theme</label>| ).
ro_html->add( |<br>| ).
ro_html->add( |<select name="ui_theme" size="3">| ).
ro_html->add( |<option value="{ zcl_abapgit_settings=>c_ui_theme-default }"{
ls_sel-default }>{ zcl_abapgit_settings=>c_ui_theme-default }</option>| ).
ro_html->add( |<option value="{ zcl_abapgit_settings=>c_ui_theme-dark }"{
ls_sel-dark }>{ zcl_abapgit_settings=>c_ui_theme-dark }</option>| ).
ro_html->add( |<option value="{ zcl_abapgit_settings=>c_ui_theme-belize }"{
ls_sel-belize }>{ zcl_abapgit_settings=>c_ui_theme-belize }</option>| ).
ro_html->add( |</select>| ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD validate_settings.
IF ( mo_settings->get_proxy_url( ) IS NOT INITIAL AND mo_settings->get_proxy_port( ) IS INITIAL ) OR
( mo_settings->get_proxy_url( ) IS INITIAL AND mo_settings->get_proxy_port( ) IS NOT INITIAL ).
MESSAGE 'If specifying proxy, specify both URL and port' TYPE 'W'.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_gui_event_handler~on_event.
* todo, check input values eg INT
DATA:
lt_post_fields TYPE tihttpnvp.
CASE iv_action.
WHEN c_action-save_settings.
lt_post_fields = parse_post( it_postdata ).
post( lt_post_fields ).
validate_settings( ).
IF mv_error = abap_true.
MESSAGE 'Error when saving settings. Open an issue at https://github.com/larshp/abapGit' TYPE 'E'.
ELSE.
persist_settings( ).
ENDIF.
ev_state = zcl_abapgit_gui=>c_event_state-go_back.
WHEN c_action-change_proxy_bypass.
mt_proxy_bypass = zcl_abapgit_ui_factory=>get_popups( )->popup_proxy_bypass( mt_proxy_bypass ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
ENDCASE.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
33692,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
2673,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3613,
62,
33692,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
21928,
62,
33692,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
1487,
62,
36436,
62,
1525,
6603,
41876,
4731,
26173,
8924,
705,
3803,
62,
36436,
62,
1525,
6603,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
2673,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
15596,
62,
30281,
93,
261,
62,
15596,
23848,
36,
20032,
17941,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
11299,
23848,
36,
20032,
17941,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42865,
6941,
62,
33692,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
33692,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
18224,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42865,
45079,
62,
7353,
62,
25747,
41876,
46668,
4023,
77,
36133,
764,
198,
220,
220,
220,
42865,
45079,
62,
36436,
62,
1525,
6603,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9521,
62,
36436,
62,
1525,
6603,
62,
6371,
13,
198,
220,
220,
220,
42865,
45079,
62,
12286,
62,
8940,
13083,
41876,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
8940,
13083,
14804,
42852,
62,
8940,
2539,
62,
4480,
62,
20147,
81,
13,
628,
220,
220,
220,
337,
36252,
50,
1281,
62,
41509,
62,
19662,
764,
198,
220,
220,
220,
337,
36252,
50,
1281,
62,
31267,
62,
23124,
874,
764,
198,
220,
220,
220,
337,
36252,
50,
1281,
62,
8940,
13083,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
36436,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
31267,
62,
23124,
874,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
687,
62,
27471,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
687,
62,
437,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
9806,
62,
6615,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
4749,
62,
1416,
4272,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
9019,
62,
43810,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
324,
83,
62,
43327,
62,
25616,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
41509,
62,
19662,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
1281,
62,
36436,
764,
198,
220,
220,
220,
337,
36252,
50,
1281,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
7353,
62,
25747,
41876,
46668,
4023,
77,
36133,
764,
198,
220,
220,
220,
337,
36252,
50,
26571,
62,
33692,
764,
198,
220,
220,
220,
337,
36252,
50,
21136,
62,
7353,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
7353,
7890,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
269,
77,
4352,
62,
7353,
62,
7890,
62,
8658,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
7353,
62,
25747,
8,
41876,
46668,
4023,
77,
36133,
764,
198,
220,
220,
220,
337,
36252,
50,
21160,
62,
33692,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
1100,
62,
33692,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
5458,
62,
27471
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS y_check_sub_assign_read_table DEFINITION PUBLIC INHERITING FROM y_check_base CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor.
PROTECTED SECTION.
METHODS inspect_tokens REDEFINITION.
PRIVATE SECTION.
METHODS is_read_table IMPORTING statement TYPE sstmnt
RETURNING VALUE(result) TYPE abap_bool.
METHODS extract_fieldname IMPORTING statement TYPE sstmnt
RETURNING VALUE(result) TYPE string.
METHODS has_subsequent_read IMPORTING statement TYPE sstmnt
fieldname TYPE string
RETURNING VALUE(result) TYPE abap_bool.
ENDCLASS.
CLASS y_check_sub_assign_read_table IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
settings-pseudo_comment = '"#EC SUB_ASSIGN' ##NO_TEXT.
settings-disable_threshold_selection = abap_true.
settings-threshold = 0.
settings-documentation = |{ c_docs_path-checks }sub-assign-read-table.md|.
set_check_message( 'Subsequent memory assign to the Read Table might cause undesired changes!' ).
ENDMETHOD.
METHOD inspect_tokens.
CHECK is_read_table( statement ) = abap_true.
DATA(fieldname) = extract_fieldname( statement ).
IF fieldname IS INITIAL.
RETURN.
ENDIF.
DATA(position) = index.
LOOP AT ref_scan->statements ASSIGNING FIELD-SYMBOL(<statement>)
FROM index TO structure-stmnt_to.
IF is_read_table( <statement> ) = abap_false.
position = position + 1.
CONTINUE.
ENDIF.
DATA(has_subsequent_read) = has_subsequent_read( statement = <statement>
fieldname = fieldname ).
IF has_subsequent_read = abap_false.
position = position + 1.
CONTINUE.
ENDIF.
DATA(check_configuration) = detect_check_configuration( <statement> ).
raise_error( statement_level = <statement>-level
statement_index = position
statement_from = <statement>-from
check_configuration = check_configuration ).
ENDLOOP.
ENDMETHOD.
METHOD is_read_table.
CHECK get_token_abs( statement-from ) = 'READ'.
CHECK get_token_abs( statement-from + 1 ) = 'TABLE'.
result = abap_true.
ENDMETHOD.
METHOD extract_fieldname.
LOOP AT ref_scan->tokens ASSIGNING FIELD-SYMBOL(<token>)
FROM statement-from TO statement-to
WHERE str CP 'FIELD-SYMBOL(<*>)'.
result = <token>-str.
REPLACE 'FIELD-SYMBOL(' IN result WITH ''.
REPLACE ')' IN result WITH ''.
RETURN.
ENDLOOP.
ENDMETHOD.
METHOD has_subsequent_read.
DATA(tokens) = ref_scan->tokens.
LOOP AT tokens ASSIGNING FIELD-SYMBOL(<token>)
FROM statement-from TO statement-to.
IF <token>-str <> 'INTO'.
CONTINUE.
ENDIF.
DATA(target) = tokens[ sy-tabix + 1 ].
IF target-str = fieldname.
result = abap_true.
RETURN.
ENDIF.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
62,
9122,
62,
7266,
62,
562,
570,
62,
961,
62,
11487,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
331,
62,
9122,
62,
8692,
29244,
6158,
44731,
764,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
23772,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
10104,
62,
83,
482,
641,
23848,
36,
20032,
17941,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
318,
62,
961,
62,
11487,
30023,
9863,
2751,
2643,
220,
220,
220,
220,
41876,
264,
301,
76,
429,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
20274,
8,
41876,
450,
499,
62,
30388,
13,
628,
220,
220,
220,
337,
36252,
50,
7925,
62,
3245,
3672,
30023,
9863,
2751,
2643,
220,
220,
220,
220,
41876,
264,
301,
76,
429,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
20274,
8,
41876,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
468,
62,
7266,
44399,
62,
961,
30023,
9863,
2751,
2643,
220,
220,
220,
220,
41876,
264,
301,
76,
429,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2214,
3672,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
20274,
8,
41876,
450,
499,
62,
30388,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
331,
62,
9122,
62,
7266,
62,
562,
570,
62,
961,
62,
11487,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
2208,
3784,
41571,
273,
7,
6739,
628,
220,
220,
220,
6460,
12,
7752,
12003,
62,
23893,
796,
705,
1,
2,
2943,
28932,
62,
10705,
16284,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
6460,
12,
40223,
62,
400,
10126,
62,
49283,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
6460,
12,
400,
10126,
796,
657,
13,
198,
220,
220,
220,
6460,
12,
22897,
341,
796,
930,
90,
269,
62,
31628,
62,
6978,
12,
42116,
1782,
7266,
12,
562,
570,
12,
961,
12,
11487,
13,
9132,
91,
13,
628,
220,
220,
220,
900,
62,
9122,
62,
20500,
7,
705,
7004,
44399,
4088,
8333,
284,
262,
4149,
8655,
1244,
2728,
27858,
1202,
2458,
13679,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
10104,
62,
83,
482,
641,
13,
628,
220,
220,
220,
5870,
25171,
318,
62,
961,
62,
11487,
7,
2643,
1267,
796,
450,
499,
62,
7942,
13,
628,
220,
220,
220,
42865,
7,
3245,
3672,
8,
796,
7925,
62,
3245,
3672,
7,
2643,
6739,
628,
220,
220,
220,
16876,
2214,
3672,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
42865,
7,
9150,
8,
796,
6376,
13,
628,
220,
220,
220,
17579,
3185,
5161,
1006,
62,
35836,
3784,
14269,
3196,
24994,
3528,
15871,
18930,
24639,
12,
23060,
10744,
3535,
7,
27,
26090,
43734,
198,
220,
220,
220,
16034,
6376,
5390,
4645,
12,
301,
76,
429,
62,
1462,
13,
628,
220,
220,
220,
220,
220,
16876,
318,
62,
961,
62,
11487,
7,
1279,
26090,
29,
1267,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
220,
220,
2292,
796,
2292,
1343,
352,
13,
198,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
42865,
7,
10134,
62,
7266,
44399,
62,
961,
8,
796,
468,
62,
7266,
44399,
62,
961,
7,
2643,
796,
1279,
26090,
29,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2214,
3672,
796,
2214,
3672,
6739,
628,
220,
220,
220,
220,
220,
16876,
468,
62,
7266,
44399,
62,
961,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
220,
220,
2292,
796,
2292,
1343,
352,
13,
198,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
42865,
7,
9122,
62,
11250,
3924,
8,
796,
4886,
62,
9122,
62,
11250,
3924,
7,
1279,
26090,
29,
6739,
628,
220,
220,
220,
220,
220,
5298,
62,
18224,
7,
2643,
62,
5715,
796,
1279,
26090,
29,
12,
5715,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2643,
62,
9630,
796,
2292,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2643,
62,
6738,
796,
1279,
26090,
29,
12,
6738,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2198,
62,
11250,
3924,
796,
2198,
62,
11250,
3924,
6739,
628,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
318,
62,
961,
62,
11487,
13,
198,
220,
220,
220,
5870,
25171,
651,
62,
30001,
62,
8937,
7,
2643,
12,
6738,
1267,
796,
705,
15675,
4458,
198,
220,
220,
220,
5870,
25171,
651,
62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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_dependencies DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
CLASS-METHODS resolve
CHANGING
!ct_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_dependency,
depname TYPE dd02l-tabname,
deptyp TYPE c LENGTH 4,
deplocal TYPE dd02l-as4local,
refname TYPE dd02l-tabname,
reftyp TYPE c LENGTH 4,
kind TYPE c LENGTH 1,
END OF ty_dependency .
TYPES:
ty_dedenpencies TYPE STANDARD TABLE OF ty_dependency
WITH NON-UNIQUE DEFAULT KEY .
TYPES:
BEGIN OF ty_item,
obj_type TYPE tadir-object,
obj_name TYPE tadir-obj_name,
devclass TYPE devclass,
END OF ty_item .
CLASS-METHODS resolve_ddic
CHANGING
!ct_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
CLASS-METHODS get_ddls_dependencies
IMPORTING
iv_ddls_name TYPE tadir-obj_name
RETURNING
VALUE(rt_dependency) TYPE ty_dedenpencies.
CLASS-METHODS resolve_packages
CHANGING
ct_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt.
ENDCLASS.
CLASS zcl_abapgit_dependencies IMPLEMENTATION.
METHOD get_ddls_dependencies.
DATA: lt_ddls_name TYPE TABLE OF ddsymtab,
ls_ddls_name TYPE ddsymtab.
ls_ddls_name-name = iv_ddls_name.
INSERT ls_ddls_name INTO TABLE lt_ddls_name.
PERFORM ('DDLS_GET_DEP') IN PROGRAM ('RADMASDL')
TABLES lt_ddls_name rt_dependency.
ENDMETHOD.
METHOD resolve.
DATA: lv_tabclass TYPE dd02l-tabclass.
FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF ct_tadir.
" misuse field KORRNUM to fix deletion sequence
" higher value means later deletion
LOOP AT ct_tadir ASSIGNING <ls_tadir>.
CASE <ls_tadir>-object.
WHEN 'DEVC'.
" Packages last
<ls_tadir>-korrnum = '999000'.
WHEN 'DOMA'.
<ls_tadir>-korrnum = '900000'.
WHEN 'PARA'.
" PARA after DTEL
<ls_tadir>-korrnum = '810000'.
WHEN 'DTEL'.
<ls_tadir>-korrnum = '800000'.
WHEN 'SHLP'.
" SHLP after TABL
<ls_tadir>-korrnum = '760000'.
WHEN 'TTYP' OR 'TABL' OR 'VIEW'.
SELECT SINGLE tabclass FROM dd02l
INTO lv_tabclass
WHERE tabname = <ls_tadir>-obj_name
AND as4local = 'A'
AND as4vers = '0000'.
IF sy-subrc = 0 AND lv_tabclass = 'APPEND'.
" delete append structures before database tables
<ls_tadir>-korrnum = '730000'.
ELSE.
<ls_tadir>-korrnum = '750000'.
ENDIF.
WHEN 'ENQU'.
" ENQU before TABL
<ls_tadir>-korrnum = '725000'.
WHEN 'DDLS'.
" DDLS after DCLS but before other DDIC
<ls_tadir>-korrnum = '720000'.
WHEN 'DDLX'.
" DDLX before DDLS
<ls_tadir>-korrnum = '719000'.
WHEN 'AUTH'.
" AUTH after DCLS
<ls_tadir>-korrnum = '715000'.
WHEN 'SUSO'.
" SUSO after DCLS
<ls_tadir>-korrnum = '710000'.
WHEN 'DCLS'.
" AUTH and SUSO after DCLS
<ls_tadir>-korrnum = '705000'.
WHEN 'IASP'.
<ls_tadir>-korrnum = '552000'.
WHEN 'IARP'.
<ls_tadir>-korrnum = '551000'.
WHEN 'IATU'.
<ls_tadir>-korrnum = '550000'.
WHEN 'SUSC'.
<ls_tadir>-korrnum = '500000'.
WHEN 'ACID'.
" ACID after PROG/FUGR/CLAS
<ls_tadir>-korrnum = '300000'.
WHEN 'FUGR'.
<ls_tadir>-korrnum = '260000'.
WHEN 'PROG'.
" delete includes after main programs
SELECT COUNT(*) FROM reposrc
WHERE progname = <ls_tadir>-obj_name
AND r3state = 'A'
AND subc = 'I'.
IF sy-subrc = 0.
<ls_tadir>-korrnum = '250000'.
ELSE.
<ls_tadir>-korrnum = '240000'.
ENDIF.
WHEN 'INTF'.
<ls_tadir>-korrnum = '230000'.
WHEN 'CLAS'.
<ls_tadir>-korrnum = '220000'.
WHEN 'IDOC'.
<ls_tadir>-korrnum = '200000'.
WHEN 'WDCA'.
<ls_tadir>-korrnum = '174000'.
WHEN 'WDYA'.
<ls_tadir>-korrnum = '173000'.
WHEN 'WDCC'.
<ls_tadir>-korrnum = '172000'.
WHEN 'WDYN'.
<ls_tadir>-korrnum = '171000'.
WHEN 'IEXT'.
<ls_tadir>-korrnum = '150000'.
WHEN OTHERS.
<ls_tadir>-korrnum = '100000'.
ENDCASE.
ENDLOOP.
resolve_ddic( CHANGING ct_tadir = ct_tadir ).
resolve_packages( CHANGING ct_tadir = ct_tadir ).
SORT ct_tadir BY korrnum ASCENDING.
ENDMETHOD.
METHOD resolve_ddic.
* this will make sure the deletion sequence of structures/tables work
* in case they have dependencies with .INCLUDE
TYPES: BEGIN OF ty_edge,
from TYPE ty_item,
to TYPE ty_item,
END OF ty_edge.
DATA: lt_nodes TYPE TABLE OF ty_item,
lt_edges TYPE TABLE OF ty_edge,
lt_findstrings TYPE TABLE OF rsfind,
lv_plus TYPE i VALUE 1,
lv_find_obj_cls TYPE euobj-id,
lv_index TYPE i,
lv_before TYPE i,
lt_founds TYPE TABLE OF rsfindlst,
lt_scope TYPE STANDARD TABLE OF seu_obj,
lt_dependency TYPE ty_dedenpencies.
FIELD-SYMBOLS: <ls_tadir_ddls> TYPE zif_abapgit_definitions=>ty_tadir,
<ls_dependency> TYPE ty_dependency,
<ls_tadir_dependent> TYPE zif_abapgit_definitions=>ty_tadir,
<ls_tadir> LIKE LINE OF ct_tadir,
<ls_edge> LIKE LINE OF lt_edges,
<ls_found> LIKE LINE OF lt_founds,
<ls_node> LIKE LINE OF lt_nodes.
" build nodes
LOOP AT ct_tadir ASSIGNING <ls_tadir>
WHERE object = 'TABL'
OR object = 'VIEW'
OR object = 'TTYP'.
APPEND INITIAL LINE TO lt_nodes ASSIGNING <ls_node>.
<ls_node>-obj_name = <ls_tadir>-obj_name.
<ls_node>-obj_type = <ls_tadir>-object.
ENDLOOP.
APPEND 'TABL' TO lt_scope.
APPEND 'VIEW' TO lt_scope.
APPEND 'STRU' TO lt_scope.
APPEND 'TTYP' TO lt_scope.
" build edges
LOOP AT lt_nodes ASSIGNING <ls_node>.
CLEAR lt_findstrings.
APPEND <ls_node>-obj_name TO lt_findstrings.
lv_find_obj_cls = <ls_node>-obj_type.
CALL FUNCTION 'RS_EU_CROSSREF'
EXPORTING
i_find_obj_cls = lv_find_obj_cls
TABLES
i_findstrings = lt_findstrings
o_founds = lt_founds
i_scope_object_cls = lt_scope
EXCEPTIONS
not_executed = 1
not_found = 2
illegal_object = 3
no_cross_for_this_object = 4
batch = 5
batchjob_error = 6
wrong_type = 7
object_not_exist = 8
OTHERS = 9.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
LOOP AT lt_founds ASSIGNING <ls_found>.
APPEND INITIAL LINE TO lt_edges ASSIGNING <ls_edge>.
<ls_edge>-from = <ls_node>.
<ls_edge>-to-obj_name = <ls_found>-object.
CASE <ls_found>-object_cls.
WHEN 'DS'
OR 'DT'.
<ls_edge>-to-obj_type = 'TABL'.
WHEN 'DV'.
<ls_edge>-to-obj_type = 'VIEW'.
WHEN 'DA'.
<ls_edge>-to-obj_type = 'TTYP'.
WHEN OTHERS.
zcx_abapgit_exception=>raise( 'resolve_ddic, unknown object_cls' ).
ENDCASE.
ENDLOOP.
ENDLOOP.
" build DDLS edges
SORT ct_tadir. "binary search
LOOP AT ct_tadir ASSIGNING <ls_tadir_ddls>
WHERE object = 'DDLS'.
CLEAR: lt_dependency.
APPEND INITIAL LINE TO lt_nodes ASSIGNING <ls_node>.
<ls_node>-obj_name = <ls_tadir_ddls>-obj_name.
<ls_node>-obj_type = <ls_tadir_ddls>-object.
lt_dependency = get_ddls_dependencies( <ls_tadir_ddls>-obj_name ).
LOOP AT lt_dependency ASSIGNING <ls_dependency>
WHERE deptyp = 'DDLS'
AND refname = <ls_tadir_ddls>-obj_name.
READ TABLE ct_tadir ASSIGNING <ls_tadir_dependent>
WITH KEY pgmid = 'R3TR'
object = 'DDLS'
obj_name = <ls_dependency>-depname
BINARY SEARCH.
CHECK sy-subrc = 0.
APPEND INITIAL LINE TO lt_edges ASSIGNING <ls_edge>.
<ls_edge>-from = <ls_node>.
<ls_edge>-to-obj_name = <ls_dependency>-depname.
<ls_edge>-to-obj_type = 'DDLS'.
ENDLOOP.
ENDLOOP.
DO.
lv_before = lines( lt_nodes ).
LOOP AT lt_nodes ASSIGNING <ls_node>.
lv_index = sy-tabix.
READ TABLE lt_edges WITH KEY
from-obj_name = <ls_node>-obj_name
from-obj_type = <ls_node>-obj_type
TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
LOOP AT ct_tadir ASSIGNING <ls_tadir>
WHERE obj_name = <ls_node>-obj_name
AND object = <ls_node>-obj_type.
<ls_tadir>-korrnum = <ls_tadir>-korrnum + lv_plus.
CONDENSE <ls_tadir>-korrnum.
ENDLOOP.
DELETE lt_edges
WHERE to-obj_name = <ls_node>-obj_name
AND to-obj_type = <ls_node>-obj_type.
DELETE lt_nodes INDEX lv_index.
EXIT. " make sure the sequence is fixed
ENDIF.
ENDLOOP.
IF lv_before = lines( lt_nodes ).
EXIT.
ENDIF.
lv_plus = lv_plus + 1.
ENDDO.
ENDMETHOD.
METHOD resolve_packages.
DATA: lt_subpackages TYPE zif_abapgit_sap_package=>ty_devclass_tt.
FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF ct_tadir,
<lv_subpackage> LIKE LINE OF lt_subpackages,
<ls_tadir_subpackage> LIKE LINE OF ct_tadir.
" List subpackage before corresponding superpackage
LOOP AT ct_tadir ASSIGNING <ls_tadir>
WHERE object = 'DEVC'.
lt_subpackages = zcl_abapgit_factory=>get_sap_package( |{ <ls_tadir>-obj_name }| )->list_subpackages( ).
LOOP AT lt_subpackages ASSIGNING <lv_subpackage>.
READ TABLE ct_tadir ASSIGNING <ls_tadir_subpackage>
WITH KEY object = 'DEVC'
obj_name = <lv_subpackage>.
IF sy-subrc = 0.
<ls_tadir_subpackage>-korrnum = condense( |{ <ls_tadir_subpackage>-korrnum - 1 }| ).
ENDIF.
ENDLOOP.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
45841,
3976,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
10568,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
310,
62,
83,
324,
343,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
83,
324,
343,
62,
926,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
45841,
1387,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1207,
3672,
220,
41876,
49427,
2999,
75,
12,
8658,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
390,
457,
4464,
220,
220,
41876,
269,
406,
49494,
604,
11,
198,
220,
220,
220,
220,
220,
220,
220,
38316,
4374,
41876,
49427,
2999,
75,
12,
292,
19,
12001,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
3672,
220,
41876,
49427,
2999,
75,
12,
8658,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
302,
701,
4464,
220,
220,
41876,
269,
406,
49494,
604,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1611,
220,
220,
220,
220,
41876,
269,
406,
49494,
352,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
45841,
1387,
764,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
1259,
62,
9395,
268,
3617,
3171,
41876,
49053,
9795,
43679,
3963,
1259,
62,
45841,
1387,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
44521,
12,
4944,
33866,
8924,
5550,
38865,
35374,
764,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
9186,
11,
198,
220,
220,
220,
220,
220,
220,
220,
26181,
62,
4906,
41876,
36264,
343,
12,
15252,
11,
198,
220,
220,
220,
220,
220,
220,
220,
26181,
62,
3672,
41876,
36264,
343,
12,
26801,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1614,
4871,
41876,
1614,
4871,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
9186,
764,
628,
220,
220,
220,
42715,
12,
49273,
50,
10568,
62,
1860,
291,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
310,
62,
83,
324,
343,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
83,
324,
343,
62,
926,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
1860,
7278,
62,
45841,
3976,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1860,
7278,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
36264,
343,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
45841,
1387,
8,
41876,
1259,
62,
9395,
268,
3617,
3171,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
10568,
62,
43789,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
269,
83,
62,
83,
324,
343,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
83,
324,
343,
62,
926,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
45841,
3976,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
651,
62,
1860,
7278,
62,
45841,
3976,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
1860,
7278,
62,
3672,
41876,
43679,
3963,
49427,
37047,
8658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
1860,
7278,
62,
3672,
41876,
49427,
37047,
8658,
13,
628,
220,
220,
220,
43979,
62,
1860,
7278,
62,
3672,
12,
3672,
796,
21628,
62,
1860,
7278,
62,
3672,
13,
198,
220,
220,
220,
29194,
17395,
43979,
62,
1860,
7278,
62,
3672,
39319,
43679,
300,
83,
62,
1860,
7278,
62,
3672,
13,
628,
220,
220,
220,
19878,
21389,
19203,
16458,
6561,
62,
18851,
62,
46162,
11537,
3268,
46805,
19203,
49,
2885,
31180,
19260,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
309,
6242,
28378,
300,
83,
62,
1860,
7278,
62,
3672,
374,
83,
62,
45841,
1387,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
10568,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
8658,
4871,
41876,
49427,
2999,
75,
12,
8658,
4871,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
83,
324,
343,
29,
34178,
48920,
3963,
269,
83,
62,
83,
324,
343,
13,
628,
220,
220,
220,
366,
29169,
2214,
509,
1581,
49,
41359,
284,
4259,
39948,
8379,
198,
220,
220,
220,
366,
2440,
1988,
1724,
1568,
39948,
628,
220,
220,
220,
17579,
3185,
5161,
269,
83,
62,
83,
324,
343,
24994,
3528,
15871,
1279,
7278,
62,
83,
324,
343,
28401,
198,
220,
220,
220,
220,
220,
42001,
1279,
7278,
62,
83,
324,
343,
29,
12,
15252,
13,
198,
220,
220,
220,
220,
220,
220,
220,
42099,
705,
7206,
15922,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
6400,
1095,
938,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
83,
324,
343,
29,
12,
74,
38890,
22510,
796,
705,
17032,
830,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
42099,
705,
39170,
32,
4458,
198,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ltcl_run_checks DEFINITION DEFERRED.
CLASS zcl_abapgit_file_status DEFINITION LOCAL FRIENDS ltcl_run_checks.
CLASS ltcl_run_checks DEFINITION FOR TESTING RISK LEVEL HARMLESS
DURATION SHORT FINAL.
PRIVATE SECTION.
DATA: mt_results TYPE zif_abapgit_definitions=>ty_results_tt,
mo_dot TYPE REF TO zcl_abapgit_dot_abapgit,
mi_log TYPE REF TO zif_abapgit_log.
METHODS:
append_result IMPORTING iv_obj_type TYPE trobjtype
iv_obj_name TYPE sobj_name
iv_match TYPE abap_bool
iv_lstate TYPE char1
iv_rstate TYPE char1
iv_package TYPE devclass
iv_path TYPE string
iv_filename TYPE string
iv_packmove TYPE abap_bool OPTIONAL,
setup,
positive FOR TESTING RAISING zcx_abapgit_exception,
neg_diff_path_for_same_obj FOR TESTING RAISING zcx_abapgit_exception,
neg_incorrect_path_vs_pack FOR TESTING RAISING zcx_abapgit_exception,
neg_similar_filenames FOR TESTING RAISING zcx_abapgit_exception,
neg_empty_filenames FOR TESTING RAISING zcx_abapgit_exception,
package_move FOR TESTING RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS ltcl_run_checks IMPLEMENTATION.
METHOD append_result.
DATA ls_result LIKE LINE OF mt_results.
ls_result-inactive = abap_false.
ls_result-obj_type = iv_obj_type.
ls_result-obj_name = iv_obj_name.
ls_result-match = iv_match.
ls_result-lstate = iv_lstate.
ls_result-rstate = iv_rstate.
ls_result-package = iv_package.
ls_result-path = iv_path.
ls_result-filename = iv_filename.
ls_result-packmove = iv_packmove.
APPEND ls_result TO mt_results.
ENDMETHOD.
METHOD setup.
CREATE OBJECT mi_log TYPE zcl_abapgit_log.
mo_dot = zcl_abapgit_dot_abapgit=>build_default( ).
mo_dot->set_starting_folder( '/' ).
ENDMETHOD.
METHOD positive.
" 0 Positive
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma1.doma.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA2'
iv_match = ' '
iv_lstate = 'M'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma2.doma.xml' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 0 ).
ENDMETHOD.
METHOD neg_diff_path_for_same_obj.
" 1 Negative, different path for same object
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/sub'
iv_filename = 'zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma1.doma.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA2'
iv_match = ' '
iv_lstate = 'M'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma2.doma.xml' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
" This one is not pure - incorrect path also triggers path vs package check
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 2 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '1' )
exp = abap_true ).
ENDMETHOD.
METHOD neg_incorrect_path_vs_pack.
" 2 Negative, incorrect path vs package
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/sub'
iv_filename = '$$zdoma1.doma.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA2'
iv_match = ' '
iv_lstate = 'M'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zdoma2.doma.xml' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 1 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '2' )
exp = abap_true ).
ENDMETHOD.
METHOD neg_similar_filenames.
" 3 Negative, similar filenames
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zdoma1.doma.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA2'
iv_match = ' '
iv_lstate = 'M'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zdoma1.doma.xml' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 1 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '3' )
exp = abap_true ).
ENDMETHOD.
METHOD neg_empty_filenames.
" 4 Negative, empty filenames
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 1 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '4' )
exp = abap_true ).
ENDMETHOD.
METHOD package_move.
" 5 Changed package assignment
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.abap'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = 'A'
iv_rstate = ' '
iv_package = '$Z$SUB'
iv_path = '/sub'
iv_filename = 'zclass1.clas.abap'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.xml'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = 'A'
iv_rstate = ' '
iv_package = '$Z$SUB'
iv_path = '/sub'
iv_filename = 'zclass1.clas.xml'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA1'
iv_match = ' '
iv_lstate = 'A'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma1.doma.xml'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA2'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$SUB'
iv_path = '/sub'
iv_filename = 'zdoma1.doma.xml'
iv_packmove = 'X' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
" Three files, but only two msg (for two changed objects)
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 2 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '5' )
exp = abap_true ).
ENDMETHOD.
ENDCLASS.
CLASS lcl_status_result DEFINITION.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING
it_results TYPE zif_abapgit_definitions=>ty_results_tt,
get_line
IMPORTING
iv_line TYPE i
RETURNING
VALUE(rs_data) TYPE zif_abapgit_definitions=>ty_result,
assert_lines
IMPORTING
iv_lines TYPE i.
PRIVATE SECTION.
DATA: mt_results TYPE zif_abapgit_definitions=>ty_results_tt.
ENDCLASS.
CLASS lcl_status_result IMPLEMENTATION.
METHOD constructor.
mt_results = it_results.
ENDMETHOD.
METHOD get_line.
READ TABLE mt_results INDEX iv_line INTO rs_data.
cl_abap_unit_assert=>assert_subrc( ).
ENDMETHOD.
METHOD assert_lines.
cl_abap_unit_assert=>assert_equals(
act = lines( mt_results )
exp = iv_lines ).
ENDMETHOD.
ENDCLASS.
CLASS ltcl_status_helper DEFINITION DEFERRED.
CLASS zcl_abapgit_file_status DEFINITION LOCAL FRIENDS ltcl_status_helper.
CLASS ltcl_status_helper DEFINITION FOR TESTING.
PUBLIC SECTION.
INTERFACES:
zif_abapgit_tadir.
METHODS:
constructor,
add_tadir
IMPORTING
iv_obj_type TYPE tadir-object
iv_obj_name TYPE tadir-obj_name
iv_devclass TYPE tadir-devclass,
add_remote
IMPORTING
iv_path TYPE string DEFAULT '/'
iv_filename TYPE string
iv_sha1 TYPE zif_abapgit_definitions=>ty_sha1,
add_local
IMPORTING
iv_path TYPE string DEFAULT '/'
iv_filename TYPE string
iv_sha1 TYPE zif_abapgit_definitions=>ty_sha1
iv_obj_type TYPE tadir-object
iv_obj_name TYPE tadir-obj_name
iv_devclass TYPE devclass DEFAULT '$Z$',
add_state,
run
IMPORTING
iv_devclass TYPE devclass DEFAULT '$Z$'
RETURNING
VALUE(ro_result) TYPE REF TO lcl_status_result
RAISING
zcx_abapgit_exception.
PRIVATE SECTION.
TYPES: BEGIN OF ty_tadir,
obj_type TYPE tadir-object,
obj_name TYPE tadir-obj_name,
devclass TYPE tadir-devclass,
END OF ty_tadir.
DATA:
mt_tadir TYPE STANDARD TABLE OF ty_tadir WITH DEFAULT KEY,
mt_local TYPE zif_abapgit_definitions=>ty_files_item_tt,
mt_remote TYPE zif_abapgit_definitions=>ty_files_tt,
mt_state TYPE zif_abapgit_definitions=>ty_file_signatures_tt.
ENDCLASS.
CLASS ltcl_status_helper IMPLEMENTATION.
METHOD constructor.
zcl_abapgit_injector=>set_tadir( me ).
ENDMETHOD.
METHOD add_tadir.
FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF mt_tadir.
APPEND INITIAL LINE TO mt_tadir ASSIGNING <ls_tadir>.
<ls_tadir>-obj_type = iv_obj_type.
<ls_tadir>-obj_name = iv_obj_name.
<ls_tadir>-devclass = iv_devclass.
ENDMETHOD.
METHOD zif_abapgit_tadir~get_object_package.
DATA: ls_tadir LIKE LINE OF mt_tadir.
IF lines( mt_tadir ) > 0.
READ TABLE mt_tadir INTO ls_tadir WITH KEY
obj_type = iv_object
obj_name = iv_obj_name.
cl_abap_unit_assert=>assert_subrc( ).
rv_devclass = ls_tadir-devclass.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_tadir~read.
cl_abap_unit_assert=>fail( ).
ENDMETHOD.
METHOD zif_abapgit_tadir~read_single.
cl_abap_unit_assert=>fail( ).
ENDMETHOD.
METHOD add_remote.
FIELD-SYMBOLS: <ls_remote> LIKE LINE OF mt_remote.
APPEND INITIAL LINE TO mt_remote ASSIGNING <ls_remote>.
<ls_remote>-path = iv_path.
<ls_remote>-filename = iv_filename.
<ls_remote>-sha1 = iv_sha1.
ENDMETHOD.
METHOD add_local.
FIELD-SYMBOLS: <ls_local> LIKE LINE OF mt_local.
APPEND INITIAL LINE TO mt_local ASSIGNING <ls_local>.
<ls_local>-item-obj_type = iv_obj_type.
<ls_local>-item-obj_name = iv_obj_name.
<ls_local>-item-devclass = iv_devclass.
<ls_local>-file-path = iv_path.
<ls_local>-file-filename = iv_filename.
<ls_local>-file-sha1 = iv_sha1.
ENDMETHOD.
METHOD add_state.
* todo
ENDMETHOD.
METHOD run.
DATA: lt_results TYPE zif_abapgit_definitions=>ty_results_tt,
lo_dot TYPE REF TO zcl_abapgit_dot_abapgit.
lo_dot = zcl_abapgit_dot_abapgit=>build_default( ).
lt_results = zcl_abapgit_file_status=>calculate_status(
iv_devclass = iv_devclass
io_dot = lo_dot
it_local = mt_local
it_remote = mt_remote
it_cur_state = mt_state ).
CREATE OBJECT ro_result
EXPORTING
it_results = lt_results.
ENDMETHOD.
ENDCLASS.
CLASS ltcl_calculate_status DEFINITION DEFERRED.
CLASS zcl_abapgit_file_status DEFINITION LOCAL FRIENDS ltcl_calculate_status.
CLASS ltcl_calculate_status DEFINITION FOR TESTING RISK LEVEL HARMLESS
DURATION SHORT FINAL.
PRIVATE SECTION.
DATA:
mo_helper TYPE REF TO ltcl_status_helper,
mo_result TYPE REF TO lcl_status_result.
METHODS:
setup,
only_remote FOR TESTING RAISING zcx_abapgit_exception,
only_local FOR TESTING RAISING zcx_abapgit_exception,
match FOR TESTING RAISING zcx_abapgit_exception,
diff FOR TESTING RAISING zcx_abapgit_exception,
local_outside_main FOR TESTING RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS ltcl_calculate_status IMPLEMENTATION.
METHOD setup.
CREATE OBJECT mo_helper.
ENDMETHOD.
METHOD only_remote.
mo_helper->add_remote(
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = 'D1' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-rstate
exp = zif_abapgit_definitions=>c_state-added ).
ENDMETHOD.
METHOD only_local.
mo_helper->add_local(
iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = 'D1' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-lstate
exp = zif_abapgit_definitions=>c_state-added ).
ENDMETHOD.
METHOD match.
mo_helper->add_local(
iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = 'D1' ).
mo_helper->add_remote(
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = 'D1' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-match
exp = abap_true ).
ENDMETHOD.
METHOD diff.
mo_helper->add_local(
iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = '12345' ).
mo_helper->add_remote(
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = '54321' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-lstate
exp = zif_abapgit_definitions=>c_state-modified ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-rstate
exp = zif_abapgit_definitions=>c_state-modified ).
ENDMETHOD.
METHOD local_outside_main.
mo_helper->add_tadir(
iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_devclass = '$OUTSIDE$' ).
mo_helper->add_remote(
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = '54321' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
" it should appear as not existing locally
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-rstate
exp = zif_abapgit_definitions=>c_state-added ).
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
83,
565,
62,
5143,
62,
42116,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
7753,
62,
13376,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
83,
565,
62,
5143,
62,
42116,
13,
198,
198,
31631,
300,
83,
565,
62,
5143,
62,
42116,
5550,
20032,
17941,
7473,
43001,
2751,
45698,
42,
49277,
43638,
5805,
7597,
198,
220,
360,
4261,
6234,
6006,
9863,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
45079,
62,
43420,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
43420,
62,
926,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6941,
62,
26518,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21504,
62,
6404,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6404,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
24443,
62,
20274,
30023,
9863,
2751,
21628,
62,
26801,
62,
4906,
41876,
4161,
50007,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26801,
62,
3672,
41876,
27355,
73,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
15699,
220,
220,
220,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
75,
5219,
220,
220,
41876,
1149,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
81,
5219,
220,
220,
41876,
1149,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26495,
220,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
6978,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
34345,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
8002,
21084,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
11,
198,
220,
220,
220,
220,
220,
9058,
11,
198,
220,
220,
220,
220,
220,
3967,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
2469,
62,
26069,
62,
6978,
62,
1640,
62,
31642,
62,
26801,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
2469,
62,
1939,
47315,
62,
6978,
62,
14259,
62,
8002,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
2469,
62,
38610,
62,
10379,
268,
1047,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
2469,
62,
28920,
62,
10379,
268,
1047,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
5301,
62,
21084,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
5143,
62,
42116,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
24443,
62,
20274,
13,
628,
220,
220,
220,
42865,
43979,
62,
20274,
34178,
48920,
3963,
45079,
62,
43420,
13,
628,
220,
220,
220,
43979,
62,
20274,
12,
259,
5275,
796,
450,
499,
62,
9562,
13,
628,
220,
220,
220,
43979,
62,
20274,
12,
26801,
62,
4906,
796,
21628,
62,
26801,
62,
4906,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
26801,
62,
3672,
796,
21628,
62,
26801,
62,
3672,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
15699,
220,
220,
220,
796,
21628,
62,
15699,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
75,
5219,
220,
220,
796,
21628,
62,
75,
5219,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
81,
5219,
220,
220,
796,
21628,
62,
81,
5219,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
26495,
220,
796,
21628,
62,
26495,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
6978,
220,
220,
220,
220,
796,
21628,
62,
6978,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
34345,
796,
21628,
62,
34345,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
8002,
21084,
796,
21628,
62,
8002,
21084,
13,
628,
220,
220,
220,
43504,
10619,
43979,
62,
20274,
5390,
45079,
62,
43420,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
9058,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
21504,
62,
6404,
41876,
1976,
565,
62,
397,
499,
18300,
62,
6404,
13,
628,
220,
220,
220,
6941,
62,
26518,
796,
1976,
565,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
14804,
11249,
62,
12286,
7,
6739,
198,
220,
220,
220,
6941,
62,
26518,
3784,
2617,
62,
38690,
62,
43551,
7,
31051,
6,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
3967,
13,
628,
220,
220,
220,
366,
657,
33733,
198,
220,
220,
220,
24443,
62,
20274,
7
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report YREPOSRC_GENERATE
*&
*&---------------------------------------------------------------------*
*& Prepare YREPOSRC META & DATA
*&---------------------------------------------------------------------*
REPORT yreposrc_generate.
PARAMETERS i_grp_sz TYPE i DEFAULT 4000 OBLIGATORY. " Group Size for Each Job
PARAMETERS i_min_ln TYPE i DEFAULT 20000 OBLIGATORY. " Minimal lines to be submitted to Database
START-OF-SELECTION.
DATA: lt_progname TYPE STANDARD TABLE OF reposrc-progname,
lv_progname TYPE reposrc-progname,
lv_tabix TYPE sy-tabix,
lv_uzeit TYPE sy-uzeit,
gv_counter TYPE int4.
DATA: gt_rsparam TYPE rsparams_tt,
gs_rsparam LIKE LINE OF gt_rsparam.
SELECT progname FROM reposrc INTO TABLE lt_progname. " UP TO 14400 ROWS.
lv_uzeit = sy-uzeit.
PERFORM clear_counter.
LOOP AT lt_progname INTO lv_progname.
lv_tabix = sy-tabix.
" Prepare Paramters
CLEAR gs_rsparam.
gs_rsparam-selname = 'I_PROG'.
gs_rsparam-kind = 'S'.
gs_rsparam-sign = 'I'.
gs_rsparam-option = 'EQ'.
gs_rsparam-low = lv_progname.
APPEND gs_rsparam TO gt_rsparam.
gv_counter = gv_counter + 1.
" Submit job
IF gv_counter >= i_grp_sz.
PERFORM submit_job USING lv_uzeit lv_tabix gt_rsparam.
PERFORM clear_counter.
ENDIF.
ENDLOOP.
" Submit remaining jobs
IF gt_rsparam IS NOT INITIAL.
PERFORM submit_job USING lv_uzeit lv_tabix gt_rsparam.
PERFORM clear_counter.
ENDIF.
WRITE: 'Done'.
*&---------------------------------------------------------------------*
*& Form clear_counter
*&---------------------------------------------------------------------*
* Clear Counter.
*----------------------------------------------------------------------*
FORM clear_counter.
gv_counter = 0.
CLEAR gt_rsparam.
ENDFORM. "clear_counter
*&---------------------------------------------------------------------*
*& Form submit_job
*&---------------------------------------------------------------------*
* Submit background job.
*----------------------------------------------------------------------*
FORM submit_job
USING uzeit TYPE sy-uzeit
tabix TYPE sy-tabix
rspar TYPE rsparams_tt.
DATA: lv_tabix_s TYPE char16,
lv_line TYPE i,
lv_line_s TYPE string,
lv_job_name TYPE btcjob,
lv_job_count TYPE btcjobcnt.
WAIT UP TO 10 SECONDS.
DESCRIBE TABLE rspar LINES lv_line.
MOVE lv_line TO lv_line_s.
tabix = tabix - lv_line + 1.
MOVE tabix TO lv_tabix_s.
CONDENSE lv_tabix_s.
UNPACK lv_tabix_s TO lv_tabix_s. " Add leading zero (0)
CONCATENATE 'RS' uzeit '_' lv_tabix_s '_' lv_line_s INTO lv_job_name.
" 1/3 - Job Open
CALL FUNCTION 'JOB_OPEN'
EXPORTING
* DELANFREP = ' '
* JOBGROUP = ' '
jobname = lv_job_name
* SDLSTRTDT = NO_DATE
* SDLSTRTTM = NO_TIME
* JOBCLASS =
IMPORTING
jobcount = lv_job_count
* CHANGING
* RET =
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
" 2/3 - Submit program
CLEAR gs_rsparam.
gs_rsparam-selname = 'I_MIN_LN'.
gs_rsparam-kind = 'P'.
gs_rsparam-sign = 'I'.
gs_rsparam-option = 'EQ'.
gs_rsparam-low = i_min_ln.
APPEND gs_rsparam TO rspar.
SUBMIT yreposrc_generate_job
WITH SELECTION-TABLE rspar
VIA JOB lv_job_name
NUMBER lv_job_count
AND RETURN.
" 3/3 - Job Close
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
* AT_OPMODE = ' '
* AT_OPMODE_PERIODIC = ' '
* CALENDAR_ID = ' '
* EVENT_ID = ' '
* EVENT_PARAM = ' '
* EVENT_PERIODIC = ' '
jobcount = lv_job_count
jobname = lv_job_name
* LASTSTRTDT = NO_DATE
* LASTSTRTTM = NO_TIME
* PRDDAYS = 0
* PRDHOURS = 0
* PRDMINS = 0
* PRDMONTHS = 0
* PRDWEEKS = 0
* PREDJOB_CHECKSTAT = ' '
* PRED_JOBCOUNT = ' '
* PRED_JOBNAME = ' '
* SDLSTRTDT = NO_DATE
* SDLSTRTTM = NO_TIME
* STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
strtimmed = 'X' " Job Start Immediately
* TARGETSYSTEM = ' '
* START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
* START_ON_WORKDAY_NR = 0
* WORKDAY_COUNT_DIRECTION = 0
* RECIPIENT_OBJ =
* TARGETSERVER = ' '
* DONT_RELEASE = ' '
* TARGETGROUP = ' '
* DIRECT_START =
* IMPORTING
* JOB_WAS_RELEASED =
* CHANGING
* RET =
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "submit_job | [
9,
5,
10097,
30934,
9,
201,
198,
9,
5,
6358,
220,
575,
35316,
2640,
7397,
62,
35353,
1137,
6158,
201,
198,
9,
5,
201,
198,
9,
5,
10097,
30934,
9,
201,
198,
9,
5,
43426,
575,
35316,
2640,
7397,
337,
20892,
1222,
42865,
201,
198,
9,
5,
10097,
30934,
9,
201,
198,
201,
198,
2200,
15490,
220,
331,
260,
1930,
6015,
62,
8612,
378,
13,
201,
198,
201,
198,
27082,
2390,
2767,
4877,
1312,
62,
2164,
79,
62,
82,
89,
220,
220,
220,
220,
41876,
1312,
5550,
38865,
220,
220,
30123,
440,
9148,
3528,
1404,
15513,
13,
220,
366,
4912,
12849,
329,
5501,
15768,
201,
198,
27082,
2390,
2767,
4877,
1312,
62,
1084,
62,
18755,
220,
220,
220,
220,
41876,
1312,
5550,
38865,
220,
939,
405,
440,
9148,
3528,
1404,
15513,
13,
220,
366,
1855,
4402,
3951,
284,
307,
8948,
284,
24047,
201,
198,
201,
198,
2257,
7227,
12,
19238,
12,
46506,
2849,
13,
201,
198,
201,
198,
220,
42865,
25,
300,
83,
62,
1676,
70,
3672,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
1128,
418,
6015,
12,
1676,
70,
3672,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
1676,
70,
3672,
220,
220,
220,
220,
220,
41876,
1128,
418,
6015,
12,
1676,
70,
3672,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
8658,
844,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
827,
12,
8658,
844,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
84,
2736,
270,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
827,
12,
84,
2736,
270,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
308,
85,
62,
24588,
220,
220,
220,
220,
220,
220,
41876,
493,
19,
13,
201,
198,
220,
42865,
25,
308,
83,
62,
3808,
17143,
220,
220,
220,
220,
220,
220,
41876,
44608,
37266,
62,
926,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
308,
82,
62,
3808,
17143,
220,
220,
220,
220,
220,
220,
34178,
48920,
3963,
308,
83,
62,
3808,
17143,
13,
201,
198,
201,
198,
220,
33493,
1172,
3672,
16034,
1128,
418,
6015,
39319,
43679,
300,
83,
62,
1676,
70,
3672,
13,
366,
15958,
5390,
1478,
7029,
371,
22845,
13,
201,
198,
201,
198,
220,
300,
85,
62,
84,
2736,
270,
796,
827,
12,
84,
2736,
270,
13,
201,
198,
201,
198,
220,
19878,
21389,
1598,
62,
24588,
13,
201,
198,
220,
17579,
3185,
5161,
300,
83,
62,
1676,
70,
3672,
39319,
300,
85,
62,
1676,
70,
3672,
13,
201,
198,
220,
220,
220,
300,
85,
62,
8658,
844,
796,
827,
12,
8658,
844,
13,
201,
198,
201,
198,
220,
220,
220,
366,
43426,
25139,
1010,
201,
198,
220,
220,
220,
30301,
1503,
308,
82,
62,
3808,
17143,
13,
201,
198,
220,
220,
220,
308,
82,
62,
3808,
17143,
12,
741,
3672,
796,
705,
40,
62,
4805,
7730,
4458,
201,
198,
220,
220,
220,
308,
82,
62,
3808,
17143,
12,
11031,
220,
220,
220,
796,
705,
50,
4458,
201,
198,
220,
220,
220,
308,
82,
62,
3808,
17143,
12,
12683,
220,
220,
220,
796,
705,
40,
4458,
201,
198,
220,
220,
220,
308,
82,
62,
3808,
17143,
12,
18076,
220,
796,
705,
36,
48,
4458,
201,
198,
220,
220,
220,
308,
82,
62,
3808,
17143,
12,
9319,
220,
220,
220,
220,
796,
300,
85,
62,
1676,
70,
3672,
13,
201,
198,
201,
198,
220,
220,
220,
43504,
10619,
308,
82,
62,
3808,
17143,
5390,
308,
83,
62,
3808,
17143,
13,
201,
198,
220,
220,
220,
308,
85,
62,
24588,
796,
308,
85,
62,
24588,
1343,
352,
13,
201,
198,
201,
198,
220,
220,
220,
366,
39900,
1693,
201,
198,
220,
220,
220,
16876,
308,
85,
62,
24588,
18189,
1312,
62,
2164,
79,
62,
82,
89,
13,
201,
198,
220,
220,
220,
220,
220,
19878,
21389,
9199,
62,
21858,
1294,
2751,
300,
85,
62,
84,
2736,
270,
300,
85,
62,
8658,
844,
308,
83,
62,
3808,
17143,
13,
201,
198,
220,
220,
220,
220,
220,
19878,
21389,
1598,
62,
24588,
13,
201,
198,
220,
220,
220,
23578,
5064,
13,
201,
198,
201,
198,
220,
23578,
21982,
3185,
13,
201,
198,
201,
198,
220,
366,
39900,
5637,
3946,
201,
198,
220,
16876,
308,
83,
62,
3808,
17143,
3180,
5626,
3268,
2043,
12576,
13,
201,
198,
220,
220,
220,
19878,
21389,
9199,
62,
21858,
1294,
2751,
300,
85,
62,
84,
2736,
270,
300,
85,
62,
8658,
844,
308,
83,
62,
3808,
17143,
13,
201,
198,
220,
220,
220,
19878,
21389,
1598,
62,
24588,
13,
201,
198,
220,
23578,
5064,
13,
201,
198,
201,
198,
220,
44423,
25,
705,
45677,
4458,
201,
198,
201,
198,
201,
198,
9,
5,
10097,
30934,
9,
201,
198,
9,
5,
220,
220,
220,
220,
220,
5178,
220,
1598,
62,
24588,
201,
198,
9,
5,
10097,
30934,
9,
201,
198,
9,
220,
220,
220,
220,
220,
220,
11459,
15034,
13,
201,
198,
9,
10097,
23031,
9,
201,
198,
21389,
1598,
62,
24588,
13,
201,
198,
201,
198,
220,
308,
85,
62,
24588,
796,
657,
13,
201,
198,
220,
30301,
1503,
308,
83,
62,
3808,
17143,
13,
201,
198,
201,
198,
1677,
8068,
1581,
44,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
20063,
62,
24588,
201,
198,
201,
198,
201,
198,
9,
5,
10097,
30934,
9,
201,
198,
9,
5,
220,
220,
220,
220,
220,
5178,
220,
9199,
62,
21858,
201,
198,
9,
5,
10097,
30934,
9,
201,
198,
9,
220,
220,
220,
220,
220,
220,
39900,
4469,
1693,
13,
201,
198,
9,
10097,
23031,
9,
201,
198,
21389,
9199,
62,
21858,
201,
198,
220,
1294,
2751,
334,
2736,
270,
220,
220,
41876,
827,
12,
84,
2736,
270,
201,
198,
220,
220,
220,
220,
220,
220,
220,
7400,
844,
220,
220,
41876,
827,
12,
8658,
844,
201,
198,
220,
220,
220,
220,
220,
220,
220,
44608,
1845,
220,
220,
41876,
44608,
37266,
62,
926,
13,
201,
198,
201,
198,
220,
42865,
25,
300,
85,
62,
8658,
844,
62,
82,
220,
220,
220,
41876,
1149,
1433,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Include ZDEMO_CALENDAR_CLASSES
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Class ZCL_DATE_CALCULATION
*&---------------------------------------------------------------------*
* Text
*----------------------------------------------------------------------*
CLASS zcl_date_calculation DEFINITION.
PUBLIC SECTION.
CLASS-METHODS: months_between_two_dates
IMPORTING
i_date_from TYPE datum
i_date_to TYPE datum
i_incl_to TYPE flag
EXPORTING
e_month TYPE i.
ENDCLASS. "ZCL_DATE_CALCULATION
*----------------------------------------------------------------------*
* CLASS ZCL_DATE_CALCULATION IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcl_date_calculation IMPLEMENTATION.
METHOD months_between_two_dates.
DATA: date_to TYPE datum.
DATA: BEGIN OF datum_von,
jjjj(4) TYPE n,
mm(2) TYPE n,
tt(2) TYPE n,
END OF datum_von.
DATA: BEGIN OF datum_bis,
jjjj(4) TYPE n,
mm(2) TYPE n,
tt(2) TYPE n,
END OF datum_bis.
e_month = 0.
CHECK NOT ( i_date_from IS INITIAL )
AND NOT ( i_date_to IS INITIAL ).
date_to = i_date_to.
IF i_incl_to = abap_true.
date_to = date_to + 1.
ENDIF.
datum_von = i_date_from.
datum_bis = date_to.
e_month = ( datum_bis-jjjj - datum_von-jjjj ) * 12
+ ( datum_bis-mm - datum_von-mm ).
ENDMETHOD. "MONTHS_BETWEEN_TWO_DATES
ENDCLASS. "ZCL_DATE_CALCULATION IMPLEMENTATION
*----------------------------------------------------------------------*
* CLASS zcl_date_calculation_test DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcl_date_calculation_test DEFINITION FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS
.
PRIVATE SECTION.
METHODS:
months_between_two_dates FOR TESTING.
ENDCLASS. "zcl_date_calculation_test DEFINITION
*----------------------------------------------------------------------*
* CLASS zcl_date_calculation_test IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcl_date_calculation_test IMPLEMENTATION.
METHOD months_between_two_dates.
DATA: date_from TYPE datum VALUE '20120101',
date_to TYPE datum VALUE '20121231'.
DATA: month TYPE i.
zcl_date_calculation=>months_between_two_dates(
EXPORTING
i_date_from = date_from
i_date_to = date_to
i_incl_to = abap_true
IMPORTING
e_month = month
).
cl_aunit_assert=>assert_equals(
exp = 12 " Data Object with Expected Type
act = month " Data Object with Current Value
msg = 'Calculated date is wrong' " Message in Case of Error
).
ENDMETHOD. "months_between_two_dates
ENDCLASS. "zcl_date_calculation_test IMPLEMENTATION
*----------------------------------------------------------------------*
* CLASS zcl_helper DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcl_helper DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
load_image
IMPORTING
filename TYPE string
RETURNING value(r_image) TYPE xstring,
add_calendar
IMPORTING
i_date_from TYPE datum
i_date_to TYPE datum
i_from_row TYPE zexcel_cell_row
i_from_col TYPE zexcel_cell_column_alpha
i_day_style TYPE zexcel_cell_style
i_cw_style TYPE zexcel_cell_style
CHANGING
c_worksheet TYPE REF TO zcl_excel_worksheet
RAISING
zcx_excel,
add_calendar_landscape
IMPORTING
i_date_from TYPE datum
i_date_to TYPE datum
i_from_row TYPE zexcel_cell_row
i_from_col TYPE zexcel_cell_column_alpha
i_day_style TYPE zexcel_cell_style
i_cw_style TYPE zexcel_cell_style
CHANGING
c_worksheet TYPE REF TO zcl_excel_worksheet
RAISING
zcx_excel,
add_a2x_footer
IMPORTING
i_from_row TYPE zexcel_cell_row
i_from_col TYPE zexcel_cell_column_alpha
CHANGING
c_worksheet TYPE REF TO zcl_excel_worksheet
RAISING
zcx_excel,
add_calender_week
IMPORTING
i_date TYPE datum
i_row TYPE zexcel_cell_row
i_col TYPE zexcel_cell_column_alpha
i_style TYPE zexcel_cell_style
CHANGING
c_worksheet TYPE REF TO zcl_excel_worksheet
RAISING
zcx_excel.
ENDCLASS. "zcl_helper DEFINITION
*----------------------------------------------------------------------*
* CLASS zcl_helper IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcl_helper IMPLEMENTATION.
METHOD load_image.
"Load samle image
DATA: lt_bin TYPE solix_tab,
lv_len TYPE i.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = filename
filetype = 'BIN'
IMPORTING
filelength = lv_len
CHANGING
data_tab = lt_bin
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = lv_len
IMPORTING
buffer = r_image
TABLES
binary_tab = lt_bin
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMETHOD. "load_image
METHOD add_calendar.
DATA: day_names TYPE TABLE OF t246.
DATA: row TYPE zexcel_cell_row,
row_max TYPE i,
col_int TYPE zexcel_cell_column,
col_max TYPE i,
from_col_int TYPE zexcel_cell_column,
col TYPE zexcel_cell_column_alpha,
lo_column TYPE REF TO zcl_excel_column,
lo_row TYPE REF TO zcl_excel_row.
DATA: lv_date TYPE datum,
value TYPE string,
weekday TYPE wotnr,
weekrow TYPE wotnr VALUE 1,
day TYPE i,
width TYPE f,
height TYPE f.
DATA: hyperlink TYPE REF TO zcl_excel_hyperlink.
FIELD-SYMBOLS: <day_name> LIKE LINE OF day_names.
lv_date = i_date_from.
from_col_int = zcl_excel_common=>convert_column2int( i_from_col ).
" Add description for Calendar Week
c_worksheet->set_cell(
EXPORTING
ip_column = i_from_col " Cell Column
ip_row = i_from_row " Cell Row
ip_value = 'CW'(001) " Cell Value
ip_style = i_cw_style
).
" Add Days
CALL FUNCTION 'DAY_NAMES_GET'
TABLES
day_names = day_names.
LOOP AT day_names ASSIGNING <day_name>.
row = i_from_row.
col_int = from_col_int + <day_name>-wotnr.
col = zcl_excel_common=>convert_column2alpha( col_int ).
value = <day_name>-langt.
c_worksheet->set_cell(
EXPORTING
ip_column = col " Cell Column
ip_row = row " Cell Row
ip_value = value " Cell Value
ip_style = i_cw_style
).
ENDLOOP.
WHILE lv_date <= i_date_to.
day = lv_date+6(2).
CALL FUNCTION 'FIMA_X_DAY_IN_MONTH_COMPUTE'
EXPORTING
i_datum = lv_date
IMPORTING
e_wochentag_nr = weekday.
row = i_from_row + weekrow.
col_int = from_col_int + weekday.
col = zcl_excel_common=>convert_column2alpha( col_int ).
value = day.
CONDENSE value.
c_worksheet->set_cell(
EXPORTING
ip_column = col " Cell Column
ip_row = row " Cell Row
ip_value = value " Cell Value
ip_style = i_day_style " Single-Character Indicator
).
IF weekday = 7.
" Add Calender Week
zcl_helper=>add_calender_week(
EXPORTING
i_date = lv_date
i_row = row
i_col = i_from_col
i_style = i_cw_style
CHANGING
c_worksheet = c_worksheet
).
weekrow = weekrow + 1.
ENDIF.
lv_date = lv_date + 1.
ENDWHILE.
" Add Calender Week
zcl_helper=>add_calender_week(
EXPORTING
i_date = lv_date
i_row = row
i_col = i_from_col
i_style = i_cw_style
CHANGING
c_worksheet = c_worksheet
).
" Add Created with abap2xlsx
row = row + 2.
zcl_helper=>add_a2x_footer(
EXPORTING
i_from_row = row
i_from_col = i_from_col
CHANGING
c_worksheet = c_worksheet
).
col_int = from_col_int.
col_max = from_col_int + 7.
WHILE col_int <= col_max.
col = zcl_excel_common=>convert_column2alpha( col_int ).
IF sy-index = 1.
width = '5.0'.
ELSE.
width = '11.4'.
ENDIF.
lo_column = c_worksheet->get_column( col ).
lo_column->set_width( width ).
col_int = col_int + 1.
ENDWHILE.
row = i_from_row + 1.
row_max = i_from_row + 6.
WHILE row <= row_max.
height = 50.
lo_row = c_worksheet->get_row( row ).
lo_row->set_row_height( height ).
row = row + 1.
ENDWHILE.
ENDMETHOD. "add_calendar
METHOD add_a2x_footer.
DATA: value TYPE string,
hyperlink TYPE REF TO zcl_excel_hyperlink.
value = 'Created with abap2xlsx. Find more information at https://github.com/sapmentors/abap2xlsx.'(002).
hyperlink = zcl_excel_hyperlink=>create_external_link( 'https://github.com/sapmentors/abap2xlsx' ). "#EC NOTEXT
c_worksheet->set_cell(
EXPORTING
ip_column = i_from_col " Cell Column
ip_row = i_from_row " Cell Row
ip_value = value " Cell Value
ip_hyperlink = hyperlink
).
ENDMETHOD. "add_a2x_footer
METHOD add_calendar_landscape.
DATA: day_names TYPE TABLE OF t246.
DATA: lv_date TYPE datum,
day TYPE i,
value TYPE string,
weekday TYPE wotnr.
DATA: row TYPE zexcel_cell_row,
from_col_int TYPE zexcel_cell_column,
col_int TYPE zexcel_cell_column,
col TYPE zexcel_cell_column_alpha.
DATA: lo_column TYPE REF TO zcl_excel_column,
lo_row TYPE REF TO zcl_excel_row.
FIELD-SYMBOLS: <day_name> LIKE LINE OF day_names.
lv_date = i_date_from.
" Add Days
CALL FUNCTION 'DAY_NAMES_GET'
TABLES
day_names = day_names.
WHILE lv_date <= i_date_to.
day = lv_date+6(2).
CALL FUNCTION 'FIMA_X_DAY_IN_MONTH_COMPUTE'
EXPORTING
i_datum = lv_date
IMPORTING
e_wochentag_nr = weekday.
" Day name row
row = i_from_row.
col_int = from_col_int + day + 2.
col = zcl_excel_common=>convert_column2alpha( col_int ).
READ TABLE day_names ASSIGNING <day_name>
WITH KEY wotnr = weekday.
value = <day_name>-kurzt.
c_worksheet->set_cell(
EXPORTING
ip_column = col " Cell Column
ip_row = row " Cell Row
ip_value = value " Cell Value
ip_style = i_cw_style
).
" Day row
row = i_from_row + 1.
value = day.
CONDENSE value.
c_worksheet->set_cell(
EXPORTING
ip_column = col " Cell Column
ip_row = row " Cell Row
ip_value = value " Cell Value
ip_style = i_day_style " Single-Character Indicator
).
" width
lo_column = c_worksheet->get_column( col ).
lo_column->set_width( '3.6' ).
lv_date = lv_date + 1.
ENDWHILE.
" Add ABAP2XLSX Footer
row = i_from_row + 2.
c_worksheet->set_cell(
EXPORTING
ip_column = col " Cell Column
ip_row = row " Cell Row
ip_value = ' ' " Cell Value
).
lo_row = c_worksheet->get_row( row ).
lo_row->set_row_height( '5.0' ).
row = i_from_row + 3.
zcl_helper=>add_a2x_footer(
EXPORTING
i_from_row = row
i_from_col = i_from_col
CHANGING
c_worksheet = c_worksheet
).
" Set with for all 31 coulumns
WHILE day < 32.
day = day + 1.
col_int = from_col_int + day + 2.
col = zcl_excel_common=>convert_column2alpha( col_int ).
" width
lo_column = c_worksheet->get_column( col ).
lo_column->set_width( '3.6' ).
ENDWHILE.
ENDMETHOD. "ADD_CALENDAR_LANDSCAPE
METHOD add_calender_week.
DATA: week TYPE kweek,
week_int TYPE i,
value TYPE string.
" Add Calender Week
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = i_date " Date for which the week should be calculated
IMPORTING
week = week. " Week for date (format:YYYYWW)
value = week+4(2).
week_int = value.
value = week_int.
CONDENSE value.
c_worksheet->set_cell(
EXPORTING
ip_column = i_col " Cell Column
ip_row = i_row " Cell Row
ip_value = value " Cell Value
ip_style = i_style
).
ENDMETHOD. "add_calender_week
ENDCLASS. "zcl_helper IMPLEMENTATION
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
40348,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1168,
39429,
46,
62,
34,
1847,
10619,
1503,
62,
31631,
1546,
198,
9,
5,
10097,
30934,
9,
198,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
220,
220,
220,
220,
220,
5016,
1168,
5097,
62,
35,
6158,
62,
34,
1847,
34,
6239,
6234,
198,
9,
5,
10097,
30934,
9,
198,
9,
220,
220,
220,
220,
220,
220,
220,
8255,
198,
9,
10097,
23031,
9,
198,
31631,
1976,
565,
62,
4475,
62,
9948,
14902,
5550,
20032,
17941,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
1933,
62,
23395,
62,
11545,
62,
19581,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
1312,
62,
4475,
62,
6738,
41876,
4818,
388,
198,
220,
220,
220,
220,
220,
1312,
62,
4475,
62,
1462,
220,
220,
41876,
4818,
388,
198,
220,
220,
220,
220,
220,
1312,
62,
259,
565,
62,
1462,
220,
220,
41876,
6056,
198,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
304,
62,
8424,
220,
220,
220,
220,
41876,
1312,
13,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
57,
5097,
62,
35,
6158,
62,
34,
1847,
34,
6239,
6234,
628,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
1168,
5097,
62,
35,
6158,
62,
34,
1847,
34,
6239,
6234,
30023,
2538,
10979,
6234,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
1976,
565,
62,
4475,
62,
9948,
14902,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1933,
62,
23395,
62,
11545,
62,
19581,
13,
198,
220,
220,
220,
42865,
25,
3128,
62,
1462,
41876,
4818,
388,
13,
198,
220,
220,
220,
42865,
25,
347,
43312,
3963,
4818,
388,
62,
26982,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
474,
41098,
73,
7,
19,
8,
41876,
299,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8085,
7,
17,
8,
41876,
299,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
7,
17,
8,
41876,
299,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
4818,
388,
62,
26982,
13,
628,
220,
220,
220,
42865,
25,
347,
43312,
3963,
4818,
388,
62,
41907,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
474,
41098,
73,
7,
19,
8,
41876,
299,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8085,
7,
17,
8,
41876,
299,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
7,
17,
8,
41876,
299,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
4818,
388,
62,
41907,
13,
628,
220,
220,
220,
304,
62,
8424,
796,
657,
13,
628,
220,
220,
220,
5870,
25171,
5626,
357,
1312,
62,
4475,
62,
6738,
3180,
3268,
2043,
12576,
1267,
198,
220,
220,
220,
220,
220,
5357,
5626,
357,
1312,
62,
4475,
62,
1462,
3180,
3268,
2043,
12576,
6739,
628,
220,
220,
220,
3128,
62,
1462,
796,
1312,
62,
4475,
62,
1462,
13,
198,
220,
220,
220,
16876,
1312,
62,
259,
565,
62,
1462,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
220,
220,
3128,
62,
1462,
796,
3128,
62,
1462,
1343,
352,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
4818,
388,
62,
26982,
796,
1312,
62,
4475,
62,
6738,
13,
198,
220,
220,
220,
4818,
388,
62,
41907,
796,
3128,
62,
1462,
13,
628,
220,
220,
220,
304,
62,
8424,
220,
220,
796,
220,
220,
357,
4818,
388,
62,
41907,
12,
41098,
41098,
532,
4818,
388,
62,
26982,
12,
41098,
41098,
1267,
1635,
1105,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1343,
357,
4818,
388,
62,
41907,
12,
3020,
220,
220,
532,
4818,
388,
62,
26982,
12,
3020,
220,
220,
6739,
198,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
27857,
4221,
50,
62,
33,
2767,
8845,
1677,
62,
34551,
46,
62,
35,
29462,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
57,
5097,
62,
35,
6158,
62,
34,
1847,
34,
6239,
6234,
30023,
2538,
10979,
6234,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
1976,
565,
62,
4475,
62,
9948,
14902,
62,
9288,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
1976,
565,
62,
4475,
62,
9948,
14902,
62,
9288,
5550,
20032,
17941,
7473,
43001,
2751,
198,
220,
220,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
220,
220,
45698,
42,
49277,
43638,
5805,
7597,
198,
220,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1933,
62,
23395,
62,
11545,
62,
19581,
7473,
43001,
2751,
13,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
89,
565,
62,
4475,
62,
9948,
14902,
62,
9288,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
1976,
565,
62,
4475,
62,
9948,
14902,
62,
9288,
30023,
2538,
10979,
6234,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
1976,
565,
62,
4475,
62,
9948,
14902,
62,
9288,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1933,
62,
23395,
62,
11545,
62,
19581,
13,
628,
220,
220,
220,
42865,
25,
3128,
62,
6738,
41876,
4818,
388,
26173,
8924,
705,
1264,
1264,
486,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3128,
62,
1462,
220,
220,
41876,
4818,
388,
26173,
8924,
705
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
INTERFACE zif_abapgit_frontend_services PUBLIC.
TYPES ty_char1 TYPE c LENGTH 1.
METHODS file_upload
IMPORTING
!iv_path TYPE string
RETURNING
VALUE(rv_xstr) TYPE xstring
RAISING
zcx_abapgit_exception.
METHODS file_download
IMPORTING
!iv_path TYPE string
!iv_xstr TYPE xstring
RAISING
zcx_abapgit_exception .
METHODS show_file_save_dialog
IMPORTING
!iv_title TYPE string
!iv_extension TYPE string
!iv_default_filename TYPE string
RETURNING
VALUE(rv_path) TYPE string
RAISING
zcx_abapgit_exception.
METHODS show_file_open_dialog
IMPORTING
!iv_title TYPE string
!iv_extension TYPE string
!iv_default_filename TYPE string
RETURNING
VALUE(rv_path) TYPE string
RAISING
zcx_abapgit_exception.
METHODS clipboard_export
IMPORTING
iv_no_auth_check TYPE abap_bool DEFAULT abap_false
VALUE(it_data) TYPE STANDARD TABLE
RAISING
zcx_abapgit_exception.
METHODS execute
IMPORTING
!iv_document TYPE string OPTIONAL
!iv_application TYPE string OPTIONAL
!iv_parameter TYPE string OPTIONAL
!iv_default_directory TYPE string OPTIONAL
!iv_maximized TYPE string OPTIONAL
!iv_minimized TYPE string OPTIONAL
!iv_synchronous TYPE string OPTIONAL
!iv_operation TYPE string DEFAULT 'OPEN'
RAISING
zcx_abapgit_exception.
METHODS get_system_directory
CHANGING
!cv_system_directory TYPE string
RAISING
zcx_abapgit_exception.
METHODS directory_browse
IMPORTING
iv_window_title TYPE string OPTIONAL
iv_initial_folder TYPE string OPTIONAL
CHANGING
cv_selected_folder TYPE string
RAISING
zcx_abapgit_exception.
METHODS get_file_separator
CHANGING
cv_file_separator TYPE ty_char1
RAISING
zcx_abapgit_exception.
METHODS get_gui_version
CHANGING
ct_version_table TYPE filetable
cv_rc TYPE i
RAISING
zcx_abapgit_exception.
METHODS directory_exist
IMPORTING
iv_directory TYPE string
RETURNING
VALUE(rv_exists) TYPE abap_bool
RAISING
zcx_abapgit_exception.
METHODS directory_create
IMPORTING
iv_directory TYPE string
CHANGING
cv_rc TYPE i
RAISING
zcx_abapgit_exception.
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
397,
499,
18300,
62,
8534,
437,
62,
30416,
44731,
13,
628,
220,
24412,
47,
1546,
1259,
62,
10641,
16,
41876,
269,
406,
49494,
352,
13,
628,
220,
337,
36252,
50,
2393,
62,
25850,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6978,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
87,
2536,
8,
41876,
2124,
8841,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
220,
337,
36252,
50,
2393,
62,
15002,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6978,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
87,
2536,
41876,
2124,
8841,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
337,
36252,
50,
905,
62,
7753,
62,
21928,
62,
38969,
519,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
7839,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
2302,
3004,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
12286,
62,
34345,
41876,
4731,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
6978,
8,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
220,
337,
36252,
50,
905,
62,
7753,
62,
9654,
62,
38969,
519,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
7839,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
2302,
3004,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
12286,
62,
34345,
41876,
4731,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
6978,
8,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
337,
36252,
50,
47999,
62,
39344,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
21628,
62,
3919,
62,
18439,
62,
9122,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
270,
62,
7890,
8,
220,
220,
41876,
49053,
9795,
43679,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
337,
36252,
50,
12260,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
22897,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
31438,
220,
220,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
17143,
2357,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
12286,
62,
34945,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
9806,
320,
1143,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
1084,
320,
1143,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
28869,
11413,
516,
220,
220,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
27184,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
5550,
38865,
705,
3185,
1677,
6,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
337,
36252,
50,
651,
62,
10057,
62,
34945,
198,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
5145,
33967,
62,
10057,
62,
34945,
41876,
4731,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
337,
36252,
50,
8619,
62,
25367,
325,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
21628,
62,
17497,
62,
7839,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
21628,
62,
36733,
62,
43551,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
269,
85,
62,
34213,
62,
43551,
41876,
4731,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
337,
36252,
50,
651,
62,
7753,
62,
25512,
1352,
198,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
269,
85,
62,
7753,
62,
25512,
1352,
41876,
1259,
62,
10641,
16,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
337,
36252,
50,
651,
62,
48317,
62,
9641,
198,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
269,
83,
62,
9641,
62,
11487,
41876,
2393,
11487,
198,
220,
220,
220,
220,
220,
269,
85,
62,
6015,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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------------------------------------*
DEFINE append_equals.
lwa_&1-sign = ztl_cl_global=>e_range_signs-include.
lwa_&1-option = ztl_cl_global=>e_range_options-equals.
lwa_&1-low = &2.
APPEND lwa_&1 TO &1.
END-OF-DEFINITION.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
40348,
1976,
28781,
62,
72,
62,
9521,
62,
20285,
4951,
198,
9,
5,
10097,
30934,
9,
198,
7206,
29940,
24443,
62,
4853,
874,
13,
198,
220,
300,
10247,
62,
5,
16,
12,
12683,
796,
1976,
28781,
62,
565,
62,
20541,
14804,
68,
62,
9521,
62,
12683,
82,
12,
17256,
13,
198,
220,
300,
10247,
62,
5,
16,
12,
18076,
796,
1976,
28781,
62,
565,
62,
20541,
14804,
68,
62,
9521,
62,
25811,
12,
4853,
874,
13,
198,
220,
300,
10247,
62,
5,
16,
12,
9319,
796,
1222,
17,
13,
628,
220,
43504,
10619,
300,
10247,
62,
5,
16,
5390,
1222,
16,
13,
198,
10619,
12,
19238,
12,
7206,
20032,
17941,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_factory DEFINITION
PUBLIC
CREATE PRIVATE
GLOBAL FRIENDS zcl_abapgit_injector .
PUBLIC SECTION.
CLASS-METHODS get_tadir
RETURNING
VALUE(ri_tadir) TYPE REF TO zif_abapgit_tadir .
CLASS-METHODS get_sap_package
IMPORTING
!iv_package TYPE devclass
RETURNING
VALUE(ri_sap_package) TYPE REF TO zif_abapgit_sap_package .
CLASS-METHODS get_code_inspector
IMPORTING
!iv_package TYPE devclass
RETURNING
VALUE(ri_code_inspector) TYPE REF TO zif_abapgit_code_inspector
RAISING
zcx_abapgit_exception .
CLASS-METHODS get_branch_overview
IMPORTING
!io_repo TYPE REF TO zcl_abapgit_repo_online
RETURNING
VALUE(ri_branch_overview) TYPE REF TO zif_abapgit_branch_overview
RAISING
zcx_abapgit_exception .
CLASS-METHODS get_stage_logic
RETURNING
VALUE(ri_logic) TYPE REF TO zif_abapgit_stage_logic .
CLASS-METHODS get_cts_api
RETURNING
VALUE(ri_cts_api) TYPE REF TO zif_abapgit_cts_api .
CLASS-METHODS get_environment
RETURNING
VALUE(ri_environment) TYPE REF TO zif_abapgit_environment .
CLASS-METHODS get_longtexts
RETURNING
VALUE(ri_longtexts) TYPE REF TO zif_abapgit_longtexts .
CLASS-METHODS get_http_agent
RETURNING
VALUE(ri_http_agent) TYPE REF TO zif_abapgit_http_agent .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_sap_package,
package TYPE devclass,
instance TYPE REF TO zif_abapgit_sap_package,
END OF ty_sap_package .
TYPES:
ty_sap_packages TYPE HASHED TABLE OF ty_sap_package
WITH UNIQUE KEY package .
TYPES:
BEGIN OF ty_code_inspector_pack,
package TYPE devclass,
instance TYPE REF TO zif_abapgit_code_inspector,
END OF ty_code_inspector_pack .
TYPES:
ty_code_inspector_packs TYPE HASHED TABLE OF ty_code_inspector_pack
WITH UNIQUE KEY package .
CLASS-DATA gi_tadir TYPE REF TO zif_abapgit_tadir .
CLASS-DATA gt_sap_package TYPE ty_sap_packages .
CLASS-DATA gt_code_inspector TYPE ty_code_inspector_packs .
CLASS-DATA gi_stage_logic TYPE REF TO zif_abapgit_stage_logic .
CLASS-DATA gi_cts_api TYPE REF TO zif_abapgit_cts_api .
CLASS-DATA gi_environment TYPE REF TO zif_abapgit_environment .
CLASS-DATA gi_longtext TYPE REF TO zif_abapgit_longtexts .
CLASS-DATA gi_http_agent TYPE REF TO zif_abapgit_http_agent .
ENDCLASS.
CLASS ZCL_ABAPGIT_FACTORY IMPLEMENTATION.
METHOD get_branch_overview.
CREATE OBJECT ri_branch_overview
TYPE zcl_abapgit_branch_overview
EXPORTING
io_repo = io_repo.
ENDMETHOD.
METHOD get_code_inspector.
DATA: ls_code_inspector LIKE LINE OF gt_code_inspector.
FIELD-SYMBOLS: <ls_code_inspector> TYPE ty_code_inspector_pack.
READ TABLE gt_code_inspector ASSIGNING <ls_code_inspector>
WITH TABLE KEY package = iv_package.
IF sy-subrc <> 0.
ls_code_inspector-package = iv_package.
CREATE OBJECT ls_code_inspector-instance TYPE zcl_abapgit_code_inspector
EXPORTING
iv_package = iv_package.
INSERT ls_code_inspector
INTO TABLE gt_code_inspector
ASSIGNING <ls_code_inspector>.
ENDIF.
ri_code_inspector = <ls_code_inspector>-instance.
ENDMETHOD.
METHOD get_cts_api.
IF gi_cts_api IS NOT BOUND.
CREATE OBJECT gi_cts_api TYPE zcl_abapgit_cts_api.
ENDIF.
ri_cts_api = gi_cts_api.
ENDMETHOD.
METHOD get_environment.
IF gi_environment IS NOT BOUND.
CREATE OBJECT gi_environment TYPE zcl_abapgit_environment.
ENDIF.
ri_environment = gi_environment.
ENDMETHOD.
METHOD get_http_agent.
IF gi_http_agent IS BOUND.
ri_http_agent = gi_http_agent.
ELSE.
ri_http_agent = zcl_abapgit_http_agent=>create( ).
ENDIF.
ENDMETHOD.
METHOD get_longtexts.
IF gi_longtext IS NOT BOUND.
CREATE OBJECT gi_longtext TYPE zcl_abapgit_longtexts.
ENDIF.
ri_longtexts = gi_longtext.
ENDMETHOD.
METHOD get_sap_package.
DATA: ls_sap_package TYPE ty_sap_package.
FIELD-SYMBOLS: <ls_sap_package> TYPE ty_sap_package.
READ TABLE gt_sap_package ASSIGNING <ls_sap_package>
WITH TABLE KEY package = iv_package.
IF sy-subrc <> 0.
ls_sap_package-package = iv_package.
CREATE OBJECT ls_sap_package-instance TYPE zcl_abapgit_sap_package
EXPORTING
iv_package = iv_package.
INSERT ls_sap_package
INTO TABLE gt_sap_package
ASSIGNING <ls_sap_package>.
ENDIF.
ri_sap_package = <ls_sap_package>-instance.
ENDMETHOD.
METHOD get_stage_logic.
IF gi_stage_logic IS INITIAL.
CREATE OBJECT gi_stage_logic
TYPE zcl_abapgit_stage_logic.
ENDIF.
ri_logic = gi_stage_logic.
ENDMETHOD.
METHOD get_tadir.
IF gi_tadir IS INITIAL.
CREATE OBJECT gi_tadir TYPE zcl_abapgit_tadir.
ENDIF.
ri_tadir = gi_tadir.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
4810,
3824,
6158,
198,
220,
10188,
9864,
1847,
48167,
1677,
5258,
1976,
565,
62,
397,
499,
18300,
62,
259,
752,
273,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
83,
324,
343,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
83,
324,
343,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
83,
324,
343,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
82,
499,
62,
26495,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
82,
499,
62,
26495,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
82,
499,
62,
26495,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
8189,
62,
1040,
806,
273,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
8189,
62,
1040,
806,
273,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
8189,
62,
1040,
806,
273,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
1671,
3702,
62,
2502,
1177,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
260,
7501,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
62,
25119,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
1671,
3702,
62,
2502,
1177,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
1671,
3702,
62,
2502,
1177,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
14247,
62,
6404,
291,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6404,
291,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
14247,
62,
6404,
291,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
310,
82,
62,
15042,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
310,
82,
62,
15042,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
310,
82,
62,
15042,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
38986,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
38986,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
38986,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
6511,
5239,
82,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6511,
5239,
82,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6511,
5239,
82,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
4023,
62,
25781,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
4023,
62,
25781,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
4023,
62,
25781,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
82,
499,
62,
26495,
11,
198,
220,
220,
220,
220,
220,
220,
220,
5301,
220,
41876,
1614,
4871,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4554,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
82,
499,
62,
26495,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
82,
499,
62,
26495,
764,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
1259,
62,
82,
499,
62,
43789,
41876,
367,
11211,
1961,
43679,
3963,
1259,
62,
82,
499,
62,
26495,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
4725,
33866,
8924,
35374,
5301,
764,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
8189,
62,
1040,
806,
273,
62,
8002,
11,
198,
220,
220,
220,
220,
220,
220,
220,
5301,
220,
41876,
1614,
4871,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4554,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
8189,
62,
1040,
806,
273,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
8189,
62,
1040,
806,
273,
62,
8002,
764,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
1259,
62,
8189,
62,
1040,
806,
273,
62,
32377,
41876,
367,
11211,
1961,
43679,
3963,
1259,
62,
8189,
62,
1040,
806,
273,
62,
8002,
198,
220,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_repo_srv DEFINITION
PUBLIC
FINAL
CREATE PRIVATE .
PUBLIC SECTION.
INTERFACES zif_abapgit_repo_srv .
INTERFACES zif_abapgit_repo_listener .
ALIASES get_repo_from_package
FOR zif_abapgit_repo_srv~get_repo_from_package .
ALIASES get_repo_from_url
FOR zif_abapgit_repo_srv~get_repo_from_url .
CLASS-METHODS get_instance
RETURNING
VALUE(ri_srv) TYPE REF TO zif_abapgit_repo_srv .
PROTECTED SECTION.
PRIVATE SECTION.
ALIASES delete
FOR zif_abapgit_repo_srv~delete .
ALIASES get
FOR zif_abapgit_repo_srv~get .
ALIASES list
FOR zif_abapgit_repo_srv~list .
ALIASES validate_package
FOR zif_abapgit_repo_srv~validate_package .
ALIASES validate_url
FOR zif_abapgit_repo_srv~validate_url .
CLASS-DATA gi_ref TYPE REF TO zif_abapgit_repo_srv .
DATA mv_init TYPE abap_bool VALUE abap_false ##NO_TEXT.
DATA mt_list TYPE zif_abapgit_repo_srv=>ty_repo_list .
METHODS determine_branch_name
IMPORTING
!iv_name TYPE string
!iv_url TYPE string
RETURNING
VALUE(rv_name) TYPE string
RAISING
zcx_abapgit_exception .
METHODS refresh
RAISING
zcx_abapgit_exception .
METHODS instantiate_and_add
IMPORTING
!is_repo_meta TYPE zif_abapgit_persistence=>ty_repo
RETURNING
VALUE(ro_repo) TYPE REF TO zcl_abapgit_repo
RAISING
zcx_abapgit_exception .
METHODS add
IMPORTING
!io_repo TYPE REF TO zcl_abapgit_repo
RAISING
zcx_abapgit_exception .
METHODS reinstantiate_repo
IMPORTING
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
!is_meta TYPE zif_abapgit_persistence=>ty_repo_xml
RAISING
zcx_abapgit_exception .
METHODS validate_sub_super_packages
IMPORTING
!iv_package TYPE devclass
!it_repos TYPE zif_abapgit_persistence=>ty_repos
!iv_ign_subpkg TYPE abap_bool DEFAULT abap_false
EXPORTING
VALUE(eo_repo) TYPE REF TO zcl_abapgit_repo
!ev_reason TYPE string
RAISING
zcx_abapgit_exception .
ENDCLASS.
CLASS zcl_abapgit_repo_srv IMPLEMENTATION.
METHOD add.
DATA: lo_repo LIKE LINE OF mt_list.
LOOP AT mt_list INTO lo_repo.
IF lo_repo->get_key( ) = io_repo->get_key( ).
IF lo_repo = io_repo.
RETURN.
ENDIF.
zcx_abapgit_exception=>raise( 'identical keys' ).
ENDIF.
ENDLOOP.
io_repo->bind_listener( me ).
APPEND io_repo TO mt_list.
ENDMETHOD.
METHOD determine_branch_name.
DATA lo_branch_list TYPE REF TO zcl_abapgit_git_branch_list.
rv_name = iv_name.
IF rv_name IS INITIAL.
ASSERT NOT iv_url IS INITIAL.
lo_branch_list = zcl_abapgit_git_transport=>branches( iv_url ).
rv_name = lo_branch_list->get_head_symref( ).
ELSEIF -1 = find(
val = rv_name
sub = zif_abapgit_definitions=>c_git_branch-heads_prefix ).
" Assume short branch name was received
rv_name = zif_abapgit_definitions=>c_git_branch-heads_prefix && rv_name.
ENDIF.
ENDMETHOD.
METHOD get_instance.
IF gi_ref IS INITIAL.
CREATE OBJECT gi_ref TYPE zcl_abapgit_repo_srv.
ENDIF.
ri_srv = gi_ref.
ENDMETHOD.
METHOD instantiate_and_add.
IF is_repo_meta-offline = abap_false.
CREATE OBJECT ro_repo TYPE zcl_abapgit_repo_online
EXPORTING
is_data = is_repo_meta.
ELSE.
CREATE OBJECT ro_repo TYPE zcl_abapgit_repo_offline
EXPORTING
is_data = is_repo_meta.
ENDIF.
add( ro_repo ).
ENDMETHOD.
METHOD refresh.
DATA: lt_list TYPE zif_abapgit_persistence=>ty_repos.
FIELD-SYMBOLS: <ls_list> LIKE LINE OF lt_list.
CLEAR mt_list.
lt_list = zcl_abapgit_persist_factory=>get_repo( )->list( ).
LOOP AT lt_list ASSIGNING <ls_list>.
instantiate_and_add( <ls_list> ).
ENDLOOP.
mv_init = abap_true.
ENDMETHOD.
METHOD reinstantiate_repo.
DATA lo_repo TYPE REF TO zcl_abapgit_repo.
DATA ls_full_meta TYPE zif_abapgit_persistence=>ty_repo.
lo_repo = get( iv_key ).
DELETE TABLE mt_list FROM lo_repo.
ASSERT sy-subrc IS INITIAL.
MOVE-CORRESPONDING is_meta TO ls_full_meta.
ls_full_meta-key = iv_key.
instantiate_and_add( ls_full_meta ).
ENDMETHOD.
METHOD validate_sub_super_packages.
DATA:
ls_repo LIKE LINE OF it_repos,
li_package TYPE REF TO zif_abapgit_sap_package,
lt_packages TYPE zif_abapgit_sap_package=>ty_devclass_tt,
lo_repo TYPE REF TO zcl_abapgit_repo.
LOOP AT it_repos INTO ls_repo.
lo_repo = get( ls_repo-key ).
li_package = zcl_abapgit_factory=>get_sap_package( ls_repo-package ).
IF li_package->exists( ) = abap_false.
" Skip dangling repository
CONTINUE.
ENDIF.
CLEAR lt_packages.
IF lo_repo->get_local_settings( )-ignore_subpackages = abap_false.
APPEND LINES OF li_package->list_subpackages( ) TO lt_packages.
READ TABLE lt_packages TRANSPORTING NO FIELDS
WITH KEY table_line = iv_package.
IF sy-subrc = 0.
eo_repo = lo_repo.
ev_reason = |Repository { lo_repo->get_name( ) } already contains { iv_package } |.
RETURN.
ENDIF.
ENDIF.
IF iv_ign_subpkg = abap_false.
APPEND LINES OF li_package->list_superpackages( ) TO lt_packages.
READ TABLE lt_packages TRANSPORTING NO FIELDS
WITH KEY table_line = iv_package.
IF sy-subrc = 0.
eo_repo = lo_repo.
ev_reason = |Repository { lo_repo->get_name( ) } already contains subpackage of { iv_package } |.
RETURN.
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD zif_abapgit_repo_listener~on_meta_change.
DATA li_persistence TYPE REF TO zif_abapgit_persist_repo.
li_persistence = zcl_abapgit_persist_factory=>get_repo( ).
li_persistence->update_metadata(
iv_key = iv_key
is_meta = is_meta
is_change_mask = is_change_mask ).
" Recreate repo instance if type changed
" Instances in mt_list are of *_online and *_offline type
" If type is changed object should be recreated from the proper class
" TODO refactor, e.g. unify repo logic in one class
IF is_change_mask-offline = abap_true.
reinstantiate_repo(
iv_key = iv_key
is_meta = is_meta ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_repo_srv~delete.
zcl_abapgit_persist_factory=>get_repo( )->delete( io_repo->get_key( ) ).
" If favorite, remove it
IF zcl_abapgit_persistence_user=>get_instance( )->is_favorite_repo( io_repo->get_key( ) ) = abap_true.
zcl_abapgit_persistence_user=>get_instance( )->toggle_favorite( io_repo->get_key( ) ).
ENDIF.
DELETE TABLE mt_list FROM io_repo.
ASSERT sy-subrc = 0.
ENDMETHOD.
METHOD zif_abapgit_repo_srv~get.
FIELD-SYMBOLS: <lo_list> LIKE LINE OF mt_list.
IF mv_init = abap_false.
refresh( ).
ENDIF.
DO 2 TIMES.
" Repo might have been created in another session. Try again after refresh
IF sy-index = 2.
refresh( ).
ENDIF.
LOOP AT mt_list ASSIGNING <lo_list>.
IF <lo_list>->get_key( ) = iv_key.
ro_repo = <lo_list>.
RETURN.
ENDIF.
ENDLOOP.
ENDDO.
zcx_abapgit_exception=>raise( 'repo not found, get' ).
ENDMETHOD.
METHOD zif_abapgit_repo_srv~get_repo_from_package.
DATA:
lt_repos TYPE zif_abapgit_persistence=>ty_repos,
lv_name TYPE zif_abapgit_persistence=>ty_local_settings-display_name,
lv_owner TYPE zif_abapgit_persistence=>ty_local_settings-display_name.
FIELD-SYMBOLS:
<ls_repo> LIKE LINE OF lt_repos.
" check if package is already in use for a different repository
lt_repos = zcl_abapgit_persist_factory=>get_repo( )->list( ).
READ TABLE lt_repos WITH KEY package = iv_package ASSIGNING <ls_repo>.
IF sy-subrc = 0.
eo_repo = get_instance( )->get( <ls_repo>-key ).
lv_name = eo_repo->get_name( ).
lv_owner = <ls_repo>-created_by.
ev_reason = |Package { iv_package } already versioned as { lv_name } by { lv_owner }|.
ELSE.
" check if package is include as sub-package in a different repo
validate_sub_super_packages(
EXPORTING
iv_package = iv_package
it_repos = lt_repos
iv_ign_subpkg = iv_ign_subpkg
IMPORTING
eo_repo = eo_repo
ev_reason = ev_reason ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_repo_srv~get_repo_from_url.
DATA:
lt_repos TYPE zif_abapgit_persistence=>ty_repos,
lv_current_repo_address TYPE string,
lv_check_repo_address TYPE string,
lv_repo_path TYPE string,
lv_name TYPE zif_abapgit_persistence=>ty_local_settings-display_name,
lv_owner TYPE zif_abapgit_persistence=>ty_local_settings-display_name.
FIELD-SYMBOLS:
<ls_repo> LIKE LINE OF lt_repos.
CLEAR:
eo_repo, ev_reason.
lv_current_repo_address = zcl_abapgit_url=>url_address( iv_url ).
" check if url is already in use for a different package
lt_repos = zcl_abapgit_persist_factory=>get_repo( )->list( ).
LOOP AT lt_repos ASSIGNING <ls_repo> WHERE offline = abap_false.
lv_check_repo_address = zcl_abapgit_url=>url_address( <ls_repo>-url ).
IF lv_current_repo_address = lv_check_repo_address.
eo_repo = get_instance( )->get( <ls_repo>-key ).
lv_repo_path = zcl_abapgit_url=>path_name( iv_url ).
lv_name = eo_repo->get_name( ).
lv_owner = <ls_repo>-created_by.
ev_reason = |Repository { lv_repo_path } already versioned as { lv_name } by { lv_owner }|.
RETURN.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD zif_abapgit_repo_srv~is_repo_installed.
DATA: lt_repo TYPE zif_abapgit_repo_srv=>ty_repo_list,
lo_repo TYPE REF TO zcl_abapgit_repo,
lv_url TYPE string,
lv_package TYPE devclass,
lo_repo_online TYPE REF TO zcl_abapgit_repo_online,
lv_err TYPE string.
lt_repo = list( ).
LOOP AT lt_repo INTO lo_repo.
CHECK lo_repo->is_offline( ) = abap_false.
lo_repo_online ?= lo_repo.
lv_url = lo_repo_online->get_url( ).
lv_package = lo_repo_online->get_package( ).
CHECK to_upper( lv_url ) = to_upper( iv_url ).
" Validate bindings
"TODO refactor: move this message out of this method
IF iv_target_package IS NOT INITIAL AND iv_target_package <> lv_package.
lv_err = |Installation to package { lv_package } detected. |
&& |Cancelling installation|.
zcx_abapgit_exception=>raise( lv_err ).
ENDIF.
rv_installed = abap_true.
EXIT.
ENDLOOP.
ENDMETHOD.
METHOD zif_abapgit_repo_srv~list.
IF mv_init = abap_false.
refresh( ).
ENDIF.
rt_list = mt_list.
ENDMETHOD.
METHOD zif_abapgit_repo_srv~new_offline.
DATA: ls_repo TYPE zif_abapgit_persistence=>ty_repo,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
lo_dot_abapgit TYPE REF TO zcl_abapgit_dot_abapgit.
IF zcl_abapgit_auth=>is_allowed( zif_abapgit_auth=>gc_authorization-create_repo ) = abap_false.
zcx_abapgit_exception=>raise( 'Not authorized' ).
ENDIF.
validate_package( iv_package ).
IF iv_url IS INITIAL.
zcx_abapgit_exception=>raise( 'Missing display name for repo' ).
ENDIF.
lo_dot_abapgit = zcl_abapgit_dot_abapgit=>build_default( ).
lo_dot_abapgit->set_folder_logic( iv_folder_logic ).
lv_key = zcl_abapgit_persist_factory=>get_repo( )->add(
iv_url = iv_url
iv_branch_name = ''
iv_package = iv_package
iv_offline = abap_true
is_dot_abapgit = lo_dot_abapgit->get_data( ) ).
TRY.
ls_repo = zcl_abapgit_persist_factory=>get_repo( )->read( lv_key ).
CATCH zcx_abapgit_not_found.
zcx_abapgit_exception=>raise( 'new_offline not found' ).
ENDTRY.
ro_repo ?= instantiate_and_add( ls_repo ).
ls_repo-local_settings-serialize_master_lang_only = iv_master_lang_only.
ro_repo->set_local_settings( ls_repo-local_settings ).
ENDMETHOD.
METHOD zif_abapgit_repo_srv~new_online.
DATA: ls_repo TYPE zif_abapgit_persistence=>ty_repo,
lv_branch_name LIKE iv_branch_name,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
ls_dot_abapgit TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit,
lv_url TYPE string.
ASSERT NOT iv_url IS INITIAL
AND NOT iv_package IS INITIAL.
lv_url = condense( iv_url ).
IF zcl_abapgit_auth=>is_allowed( zif_abapgit_auth=>gc_authorization-create_repo ) = abap_false.
zcx_abapgit_exception=>raise( 'Not authorized' ).
ENDIF.
validate_package( iv_package = iv_package
iv_ign_subpkg = iv_ign_subpkg ).
validate_url( lv_url ).
lv_branch_name = determine_branch_name(
iv_name = iv_branch_name
iv_url = lv_url ).
ls_dot_abapgit = zcl_abapgit_dot_abapgit=>build_default( )->get_data( ).
ls_dot_abapgit-folder_logic = iv_folder_logic.
lv_key = zcl_abapgit_persist_factory=>get_repo( )->add(
iv_url = lv_url
iv_branch_name = lv_branch_name " local !
iv_display_name = iv_display_name
iv_package = iv_package
iv_offline = abap_false
is_dot_abapgit = ls_dot_abapgit ).
TRY.
ls_repo = zcl_abapgit_persist_factory=>get_repo( )->read( lv_key ).
CATCH zcx_abapgit_not_found.
zcx_abapgit_exception=>raise( 'new_online not found' ).
ENDTRY.
ro_repo ?= instantiate_and_add( ls_repo ).
IF ls_repo-local_settings-ignore_subpackages <> iv_ign_subpkg.
ls_repo-local_settings-ignore_subpackages = iv_ign_subpkg.
ENDIF.
ls_repo-local_settings-serialize_master_lang_only = iv_master_lang_only.
ro_repo->set_local_settings( ls_repo-local_settings ).
ro_repo->refresh( ).
ro_repo->find_remote_dot_abapgit( ).
ENDMETHOD.
METHOD zif_abapgit_repo_srv~purge.
* uninstalls all objects, no UI or popups in this class
* todo, this should be a method on the repo instead?
DATA: lt_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt.
DATA: lx_error TYPE REF TO zcx_abapgit_exception.
CREATE OBJECT ri_log TYPE zcl_abapgit_log.
ri_log->set_title( 'Uninstall Log' ).
IF io_repo->get_local_settings( )-write_protected = abap_true.
zcx_abapgit_exception=>raise( 'Cannot purge. Local code is write-protected by repo config' ).
ELSEIF zcl_abapgit_auth=>is_allowed( zif_abapgit_auth=>gc_authorization-uninstall ) = abap_false.
zcx_abapgit_exception=>raise( 'Not authorized' ).
ENDIF.
lt_tadir = zcl_abapgit_factory=>get_tadir( )->read( io_repo->get_package( ) ).
TRY.
zcl_abapgit_objects=>delete( it_tadir = lt_tadir
is_checks = is_checks
ii_log = ri_log ).
CATCH zcx_abapgit_exception INTO lx_error.
" If uninstall fails, repo needs a refresh to show which objects where deleted and which not
io_repo->refresh( ).
RAISE EXCEPTION lx_error.
ENDTRY.
delete( io_repo ).
ENDMETHOD.
METHOD zif_abapgit_repo_srv~validate_package.
DATA: lv_as4user TYPE tdevc-as4user,
lo_repo TYPE REF TO zcl_abapgit_repo,
lv_reason TYPE string.
IF iv_package IS INITIAL.
zcx_abapgit_exception=>raise( 'add, package empty' ).
ENDIF.
IF iv_package = '$TMP'.
zcx_abapgit_exception=>raise( 'not possible to use $TMP, create new (local) package' ).
ENDIF.
" Check if package owned by SAP is allowed (new packages are ok, since they are created automatically)
SELECT SINGLE as4user FROM tdevc
INTO lv_as4user
WHERE devclass = iv_package. "#EC CI_GENBUFF
IF sy-subrc = 0 AND lv_as4user = 'SAP' AND
zcl_abapgit_factory=>get_environment( )->is_sap_object_allowed( ) = abap_false.
zcx_abapgit_exception=>raise( |Package { iv_package } not allowed, responsible user = 'SAP'| ).
ENDIF.
" Check if package is already used in another repo
IF iv_chk_exists = abap_true.
get_repo_from_package(
EXPORTING
iv_package = iv_package
iv_ign_subpkg = iv_ign_subpkg
IMPORTING
eo_repo = lo_repo
ev_reason = lv_reason ).
IF lo_repo IS BOUND.
zcx_abapgit_exception=>raise( lv_reason ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_repo_srv~validate_url.
DATA:
lo_repo TYPE REF TO zcl_abapgit_repo,
lv_reason TYPE string.
zcl_abapgit_url=>validate( iv_url ).
IF iv_chk_exists = abap_true.
get_repo_from_url(
EXPORTING
iv_url = iv_url
IMPORTING
eo_repo = lo_repo
ev_reason = lv_reason ).
IF lo_repo IS BOUND.
zcx_abapgit_exception=>raise( lv_reason ).
ENDIF.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
764,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
4868,
877,
764,
628,
220,
220,
220,
8355,
43429,
1546,
651,
62,
260,
7501,
62,
6738,
62,
26495,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
93,
1136,
62,
260,
7501,
62,
6738,
62,
26495,
764,
628,
220,
220,
220,
8355,
43429,
1546,
651,
62,
260,
7501,
62,
6738,
62,
6371,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
93,
1136,
62,
260,
7501,
62,
6738,
62,
6371,
764,
628,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
39098,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
27891,
85,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
8355,
43429,
1546,
12233,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
93,
33678,
764,
198,
220,
220,
220,
8355,
43429,
1546,
651,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
93,
1136,
764,
198,
220,
220,
220,
8355,
43429,
1546,
1351,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
93,
4868,
764,
198,
220,
220,
220,
8355,
43429,
1546,
26571,
62,
26495,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
93,
12102,
378,
62,
26495,
764,
198,
220,
220,
220,
8355,
43429,
1546,
26571,
62,
6371,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
93,
12102,
378,
62,
6371,
764,
628,
220,
220,
220,
42715,
12,
26947,
308,
72,
62,
5420,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
15003,
41876,
450,
499,
62,
30388,
26173,
8924,
450,
499,
62,
9562,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
42865,
45079,
62,
4868,
41876,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
14804,
774,
62,
260,
7501,
62,
4868,
764,
628,
220,
220,
220,
337,
36252,
50,
5004,
62,
1671,
3702,
62,
3672,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
3672,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
3672,
8,
41876,
4731,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
14976,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
9113,
9386,
62,
392,
62,
2860,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
260,
7501,
62,
28961,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
260,
7501,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
260,
7501,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
6865,
18797,
9386,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
2539,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
260,
7501,
12,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
28961,
41876,
1976,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
260,
7501,
62,
19875,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
26571,
62,
7266,
62,
16668,
62,
43789,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
220,
220,
220,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
260,
1930,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
260,
1930,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
570,
62,
7266,
35339,
41876,
450,
499,
62,
30388,
5550,
38865,
450
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_advent2020_day15_gw IMPLEMENTATION.
METHOD zif_advent2020_gw~solve.
output = 'todo'.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
324,
1151,
42334,
62,
820,
1314,
62,
70,
86,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
324,
1151,
42334,
62,
70,
86,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
324,
1151,
42334,
62,
820,
1314,
62,
70,
86,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
324,
1151,
42334,
62,
70,
86,
93,
82,
6442,
13,
628,
220,
220,
220,
5072,
796,
705,
83,
24313,
4458,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_tobj DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES: BEGIN OF ty_tobj,
tddat TYPE tddat,
tvdir TYPE tvdir,
tvimf TYPE STANDARD TABLE OF tvimf WITH DEFAULT KEY,
END OF ty_tobj.
METHODS:
read_extra IMPORTING iv_tabname TYPE vim_name
RETURNING VALUE(rs_tobj) TYPE ty_tobj,
update_extra IMPORTING is_tobj TYPE ty_tobj,
delete_extra IMPORTING iv_tabname TYPE vim_name.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_TOBJ IMPLEMENTATION.
METHOD delete_extra.
DELETE FROM tddat WHERE tabname = iv_tabname.
DELETE FROM tvdir WHERE tabname = iv_tabname.
DELETE FROM tvimf WHERE tabname = iv_tabname.
ENDMETHOD.
METHOD read_extra.
SELECT SINGLE * FROM tddat INTO rs_tobj-tddat WHERE tabname = iv_tabname.
SELECT SINGLE * FROM tvdir INTO rs_tobj-tvdir WHERE tabname = iv_tabname.
CLEAR: rs_tobj-tvdir-gendate, rs_tobj-tvdir-gentime.
SELECT * FROM tvimf INTO TABLE rs_tobj-tvimf WHERE tabname = iv_tabname.
ENDMETHOD.
METHOD update_extra.
DATA: lt_current_tvimf TYPE STANDARD TABLE OF tvimf.
FIELD-SYMBOLS: <ls_tvimf> TYPE tvimf.
MODIFY tddat FROM is_tobj-tddat.
MODIFY tvdir FROM is_tobj-tvdir.
SELECT * INTO TABLE lt_current_tvimf
FROM tvimf
WHERE tabname = is_tobj-tddat-tabname
ORDER BY PRIMARY KEY.
LOOP AT lt_current_tvimf ASSIGNING <ls_tvimf>.
READ TABLE is_tobj-tvimf WITH KEY tabname = <ls_tvimf>-tabname
event = <ls_tvimf>-event
TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
DELETE tvimf FROM <ls_tvimf>.
ENDIF.
ENDLOOP.
MODIFY tvimf FROM TABLE is_tobj-tvimf.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
DATA: lv_type_pos TYPE i.
lv_type_pos = strlen( ms_item-obj_name ) - 1.
SELECT SINGLE luser FROM objh INTO rv_user
WHERE objectname = ms_item-obj_name(lv_type_pos)
AND objecttype = ms_item-obj_name+lv_type_pos. "#EC CI_GENBUFF
IF sy-subrc <> 0.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: ls_objh TYPE objh,
lv_type_pos TYPE i.
lv_type_pos = strlen( ms_item-obj_name ) - 1.
ls_objh-objectname = ms_item-obj_name(lv_type_pos).
ls_objh-objecttype = ms_item-obj_name+lv_type_pos.
CALL FUNCTION 'OBJ_GENERATE'
EXPORTING
iv_objectname = ls_objh-objectname
iv_objecttype = ls_objh-objecttype
iv_maint_mode = 'D'
EXCEPTIONS
illegal_call = 1
object_not_found = 2
generate_error = 3
transport_error = 4
object_enqueue_failed = 5
OTHERS = 6.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from OBJ_GENERATE' ).
ENDIF.
delete_extra( ls_objh-objectname ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: ls_objh TYPE objh,
ls_objt TYPE objt,
lt_objs TYPE tt_objs,
lt_objsl TYPE tt_objsl,
lt_objm TYPE tt_objm,
ls_tobj TYPE ty_tobj.
io_xml->read( EXPORTING iv_name = 'OBJH'
CHANGING cg_data = ls_objh ).
io_xml->read( EXPORTING iv_name = 'OBJT'
CHANGING cg_data = ls_objt ).
io_xml->read( EXPORTING iv_name = 'OBJS'
CHANGING cg_data = lt_objs ).
io_xml->read( EXPORTING iv_name = 'OBJSL'
CHANGING cg_data = lt_objsl ).
io_xml->read( EXPORTING iv_name = 'OBJM'
CHANGING cg_data = lt_objm ).
CALL FUNCTION 'OBJ_GENERATE'
EXPORTING
iv_objectname = ls_objh-objectname
iv_objecttype = ls_objh-objecttype
iv_maint_mode = 'I'
iv_objecttext = ls_objt-ddtext
iv_objcateg = ls_objh-objcateg
iv_objtransp = ls_objh-objtransp
iv_devclass = iv_package
TABLES
tt_v_obj_s = lt_objs
tt_objm = lt_objm
EXCEPTIONS
illegal_call = 1
object_not_found = 2
generate_error = 3
transport_error = 4
object_enqueue_failed = 5
OTHERS = 6.
IF sy-subrc <> 0.
* TOBJ has to be saved/generated after the DDIC tables have been
* activated - fixed with late deserialization
zcx_abapgit_exception=>raise( 'error from OBJ_GENERATE' ).
ENDIF.
CALL FUNCTION 'OBJ_SET_IMPORTABLE'
EXPORTING
iv_objectname = ls_objh-objectname
iv_objecttype = ls_objh-objecttype
iv_importable = ls_objh-importable
EXCEPTIONS
object_not_defined = 1
invalid = 2
transport_error = 3
object_enqueue_failed = 4
OTHERS = 5.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from OBJ_SET_IMPORTABLE' ).
ENDIF.
* fm OBJ_GENERATE takes the defaults from the DDIC object
* set OBJTRANSP directly, should be okay looking at the code in OBJ_SET_IMPORTABLE
* locking has been done in OBJ_SET_IMPORTABLE plus recording of transport
UPDATE objh SET objtransp = ls_objh-objtransp
WHERE objectname = ls_objh-objectname
AND objecttype = ls_objh-objecttype.
io_xml->read( EXPORTING iv_name = 'TOBJ'
CHANGING cg_data = ls_tobj ).
ls_tobj-tvdir-gendate = sy-datum.
ls_tobj-tvdir-gentime = sy-uzeit.
update_extra( ls_tobj ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_objectname TYPE objh-objectname,
lv_type_pos TYPE i.
lv_type_pos = strlen( ms_item-obj_name ) - 1.
SELECT SINGLE objectname FROM objh INTO lv_objectname
WHERE objectname = ms_item-obj_name(lv_type_pos)
AND objecttype = ms_item-obj_name+lv_type_pos. "#EC CI_GENBUFF
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-late TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-late_deser = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
DATA: ls_bcdata TYPE bdcdata,
lt_bcdata TYPE STANDARD TABLE OF bdcdata.
ls_bcdata-program = 'SAPMSVIM'.
ls_bcdata-dynpro = '0050'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO lt_bcdata.
CLEAR ls_bcdata.
ls_bcdata-fnam = 'VIMDYNFLDS-VIEWNAME'.
ls_bcdata-fval = substring( val = ms_item-obj_name
len = strlen( ms_item-obj_name ) - 1 ).
APPEND ls_bcdata TO lt_bcdata.
CLEAR ls_bcdata.
ls_bcdata-fnam = 'VIMDYNFLDS-ELEM_GEN'.
ls_bcdata-fval = abap_true.
APPEND ls_bcdata TO lt_bcdata.
CLEAR ls_bcdata.
ls_bcdata-fnam = 'BDC_OKCODE'.
ls_bcdata-fval = '=SHOW'.
APPEND ls_bcdata TO lt_bcdata.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
STARTING NEW TASK 'GIT'
EXPORTING
tcode = 'SE54'
mode_val = 'E'
TABLES
using_tab = lt_bcdata
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from ABAP4_CALL_TRANSACTION, TOBJ' ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: ls_objh TYPE objh,
ls_objt TYPE objt,
lt_objs TYPE tt_objs,
lt_objsl TYPE tt_objsl,
lt_objm TYPE tt_objm,
ls_tobj TYPE ty_tobj,
lv_type_pos TYPE i.
lv_type_pos = strlen( ms_item-obj_name ) - 1.
ls_objh-objectname = ms_item-obj_name(lv_type_pos).
ls_objh-objecttype = ms_item-obj_name+lv_type_pos.
CALL FUNCTION 'CTO_OBJECT_GET'
EXPORTING
iv_objectname = ls_objh-objectname
iv_objecttype = ls_objh-objecttype
iv_language = mv_language
iv_sel_objt = abap_true
iv_sel_objs = abap_true
iv_sel_objsl = abap_true
iv_sel_objm = abap_true
IMPORTING
es_objh = ls_objh
es_objt = ls_objt
TABLES
tt_objs = lt_objs
tt_objsl = lt_objsl
tt_objm = lt_objm
EXCEPTIONS
object_not_defined = 1
OTHERS = 2.
IF sy-subrc = 1.
RETURN.
ELSEIF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from CTO_OBJECT_GET' ).
ENDIF.
CLEAR: ls_objh-luser,
ls_objh-ldate.
io_xml->add( iv_name = 'OBJH'
ig_data = ls_objh ).
io_xml->add( iv_name = 'OBJT'
ig_data = ls_objt ).
io_xml->add( iv_name = 'OBJS'
ig_data = lt_objs ).
io_xml->add( iv_name = 'OBJSL'
ig_data = lt_objsl ).
io_xml->add( iv_name = 'OBJM'
ig_data = lt_objm ).
ls_tobj = read_extra( ls_objh-objectname ).
io_xml->add( iv_name = 'TOBJ'
ig_data = ls_tobj ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
83,
26801,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
83,
26801,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
1860,
265,
41876,
256,
1860,
265,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31557,
15908,
41876,
31557,
15908,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
31124,
69,
41876,
49053,
9795,
43679,
3963,
256,
31124,
69,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
83,
26801,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1100,
62,
26086,
30023,
9863,
2751,
21628,
62,
8658,
3672,
220,
220,
220,
220,
41876,
43907,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
3808,
62,
83,
26801,
8,
41876,
1259,
62,
83,
26801,
11,
198,
220,
220,
220,
220,
220,
4296,
62,
26086,
30023,
9863,
2751,
318,
62,
83,
26801,
41876,
1259,
62,
83,
26801,
11,
198,
220,
220,
220,
220,
220,
12233,
62,
26086,
30023,
9863,
2751,
21628,
62,
8658,
3672,
41876,
43907,
62,
3672,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
23680,
62,
51,
9864,
41,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
12233,
62,
26086,
13,
628,
220,
220,
220,
5550,
2538,
9328,
16034,
256,
1860,
265,
33411,
7400,
3672,
796,
21628,
62,
8658,
3672,
13,
198,
220,
220,
220,
5550,
2538,
9328,
16034,
31557,
15908,
33411,
7400,
3672,
796,
21628,
62,
8658,
3672,
13,
198,
220,
220,
220,
5550,
2538,
9328,
16034,
256,
31124,
69,
33411,
7400,
3672,
796,
21628,
62,
8658,
3672,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1100,
62,
26086,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
1635,
16034,
256,
1860,
265,
39319,
44608,
62,
83,
26801,
12,
83,
1860,
265,
33411,
7400,
3672,
796,
21628,
62,
8658,
3672,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
1635,
16034,
31557,
15908,
39319,
44608,
62,
83,
26801,
12,
14981,
15908,
33411,
7400,
3672,
796,
21628,
62,
8658,
3672,
13,
198,
220,
220,
220,
30301,
1503,
25,
44608,
62,
83,
26801,
12,
14981,
15908,
12,
70,
437,
378,
11,
44608,
62,
83,
26801,
12,
14981,
15908,
12,
6783,
524,
13,
628,
220,
220,
220,
33493,
1635,
16034,
256,
31124,
69,
39319,
43679,
44608,
62,
83,
26801,
12,
14981,
320,
69,
33411,
7400,
3672,
796,
21628,
62,
8658,
3672,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
4296,
62,
26086,
13,
198,
220,
220,
220,
42865,
25,
300,
83,
62,
14421,
62,
14981,
320,
69,
41876,
49053,
9795,
43679,
3963,
256,
31124,
69,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
14981,
320,
69,
29,
41876,
256,
31124,
69,
13,
628,
220,
220,
220,
19164,
5064,
56,
256,
1860,
265,
16034,
318,
62,
83,
26801,
12,
83,
1860,
265,
13,
198,
220,
220,
220,
19164,
5064,
56,
31557,
15908,
16034,
318,
62,
83,
26801,
12,
14981,
15908,
13,
628,
220,
220,
220,
33493,
1635,
39319,
43679,
300,
83,
62,
14421,
62,
14981,
320,
69,
198,
220,
220,
220,
220,
220,
16034,
256,
31124,
69,
198,
220,
220,
220,
220,
220,
33411,
7400,
3672,
796,
318,
62,
83,
26801,
12,
83,
1860,
265,
12,
8658,
3672,
198,
220,
220,
220,
220,
220,
38678,
11050,
4810,
3955,
13153,
35374,
13,
628,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
14421,
62,
14981,
320,
69,
24994,
3528,
15871,
1279,
7278,
62,
14981,
320,
69,
28401,
198,
220,
220,
220,
220,
220,
20832,
43679,
318,
62,
83,
26801,
12,
14981,
320,
69,
13315,
35374,
7400,
3672,
796,
1279,
7278,
62,
14981,
320,
69,
29,
12,
8658,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1785,
220,
220,
796,
1279,
7278,
62,
14981,
320,
69,
29,
12,
15596,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
13,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
5550,
2538,
9328,
256,
31124,
69,
16034,
1279,
7278,
62,
14981,
320,
69,
28401,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
19164,
5064,
56,
256,
31124,
69,
16034,
43679,
318,
62,
83,
26801,
12,
14981,
320,
69,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
4906,
62,
1930,
41876,
1312,
13,
628,
220,
220,
220,
300,
85,
62,
4906,
62,
1930,
796,
965,
11925,
7,
13845,
62,
9186,
12,
26801,
62,
3672,
1267,
532,
352,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
300,
7220,
16034,
26181,
71,
39319,
374,
85,
62,
7220,
198,
220,
220,
220,
220,
220,
33411,
2134,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
7,
6780,
62,
4906,
62,
1930,
8,
198,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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lock_travel DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PRIVATE SECTION.
METHODS:
got_lock FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS ltcl_lock_travel IMPLEMENTATION.
METHOD got_lock ##NEEDED.
ENDMETHOD.
ENDCLASS.
CLASS ltc_travel DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PROTECTED SECTION.
CONSTANTS mc_use_sql_doubles TYPE abap_bool VALUE abap_false.
CONSTANTS mc_msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_22'.
* SQL doubles currently not available in cloud environment
* CLASS-DATA mr_test_environment TYPE REF TO if_osql_test_environment.
CLASS-DATA gr_cut TYPE REF TO /dmo/cl_flight_legacy22.
CLASS-DATA gv_agency_id_1 TYPE /dmo/agency_id22.
CLASS-DATA gv_agency_id_2 TYPE /dmo/agency_id22.
CLASS-DATA gv_agency_id_unknown TYPE /dmo/agency_id22.
CLASS-DATA gv_customer_id_1 TYPE /dmo/customer_id22.
CLASS-DATA gv_customer_id_2 TYPE /dmo/customer_id22.
CLASS-DATA gv_customer_id_unknown TYPE /dmo/customer_id22.
METHODS _create_travel IMPORTING is_travel TYPE /dmo/if_flight_legacy22=>ts_travel_in
iv_save TYPE abap_bool DEFAULT abap_true
RETURNING VALUE(rs_travel) TYPE /dmo/travel22.
METHODS _delete_existing_travel IMPORTING iv_travel_id TYPE /dmo/travel_id22.
PRIVATE SECTION.
DATA mv_travel_count TYPE i.
DATA mv_booking_count TYPE i.
DATA mv_booking_supplement_count TYPE i.
CLASS-METHODS class_setup.
METHODS setup.
METHODS teardown.
CLASS-METHODS class_teardown.
"! Create and check a single travel
METHODS create FOR TESTING RAISING cx_static_check.
"! Try to create a travel with an unknown agency -> ERROR
METHODS c_agency_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a travel with an unknown customer -> ERROR
METHODS c_customer_unknown FOR TESTING RAISING cx_static_check.
"! Create 2 travels in the same LUW
METHODS create_mutiple_calls FOR TESTING RAISING cx_static_check.
"! Create a single travel
METHODS create_single FOR TESTING RAISING cx_static_check.
"! Delete a single travel
METHODS delete_single FOR TESTING RAISING cx_static_check.
"! Update a single travel
METHODS update_single FOR TESTING RAISING cx_static_check.
"! Try to delete a single travel with unknown Travel ID -> ERROR
METHODS d_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a single travel with unknown Travel ID -> ERROR
METHODS u_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Delete multiple travels
METHODS delete_multiple FOR TESTING RAISING cx_static_check.
"! Update multiple travels
METHODS update_multiple FOR TESTING RAISING cx_static_check.
"! Update a single travel twice in the same LUW
METHODS update_twice FOR TESTING RAISING cx_static_check.
"! Update, delete a single travel in the same LUW
METHODS update_delete_single FOR TESTING RAISING cx_static_check.
"! Try to update a single travel with an unknown agency -> ERROR
METHODS u_agency_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a single travel with an unknown customer -> ERROR
METHODS u_customer_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a single travel with an initial Travel ID -> ERROR
METHODS d_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a single travel with an initial Travel ID -> ERROR
METHODS u_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Call action to set booking status
METHODS act_set_status_to_booked FOR TESTING RAISING cx_static_check.
"! Try to create a travel with faulty dates -> Error
METHODS c_dates_invalid FOR TESTING RAISING cx_static_check.
"! Try to update a travel with faulty dates -> Error
METHODS u_dates_invalid FOR TESTING RAISING cx_static_check.
"! Reset buffer
METHODS initialize FOR TESTING RAISING cx_static_check.
"! Create, update a single travel in the same LUW
METHODS create_update_in_one_luw FOR TESTING RAISING cx_static_check.
"! Create, delete a single travel in the same LUW
METHODS create_delete_in_one_luw FOR TESTING RAISING cx_static_check.
"! Update, delete a single travel in the same LUW
METHODS update_delete_in_one_luw FOR TESTING RAISING cx_static_check.
"! Try to delete, update a single travel in the same LUW -> ERROR
METHODS delete_update_in_one_luw FOR TESTING RAISING cx_static_check.
"! Delete, delete a single travel in the same LUW -> Error
METHODS delete_delete_in_one_luw FOR TESTING RAISING cx_static_check.
"! Try to update a travel with no control structure -> ERROR
METHODS u_no_control FOR TESTING RAISING cx_static_check.
"! Try to change the travel status to an invalid value -> ERROR
METHODS u_status_invalid FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS /dmo/cl_flight_legacy22 DEFINITION LOCAL FRIENDS ltc_travel.
CLASS ltc_travel IMPLEMENTATION.
METHOD class_setup.
IF mc_use_sql_doubles = abap_true ##BOOL_OK.
* mr_test_environment = cl_osql_test_environment=>create( i_dependency_list = VALUE #( ( '/DMO/TRAVEL22' ) ( '/DMO/BOOKING22' ) ( '/DMO/BOOK_SUP_22' )
* ( '/DMO/AGENCY22' ) ( '/DMO/CUSTOMER22' ) ( '/DMO/FLIGHT22' ) ( '/DMO/SUPPLEME_22' ) ) ).
* mr_test_environment->clear_doubles( ).
* gv_agency_id_1 = '42'.
* gv_agency_id_2 = '43'.
* DATA lt_agency TYPE STANDARD TABLE OF /dmo/agency22.
* lt_agency = VALUE #( ( agency_id = gv_agency_id_1 ) ( agency_id = gv_agency_id_2 ) ).
* mr_test_environment->insert_test_data( lt_agency ).
*
* gv_customer_id_1 = '42'.
* gv_customer_id_2 = '43'.
* DATA lt_customer TYPE STANDARD TABLE OF /dmo/customer22.
* lt_customer = VALUE #( ( customer_id = gv_customer_id_1 ) ( customer_id = gv_customer_id_2 ) ).
* mr_test_environment->insert_test_data( lt_customer ).
*
* gv_agency_id_unknown = '99'.
* gv_customer_id_unknown = '99'.
ELSE.
DATA lt_agency_id TYPE SORTED TABLE OF /dmo/agency_id22 WITH UNIQUE KEY table_line.
SELECT DISTINCT agency_id FROM /dmo/agency22 ORDER BY agency_id DESCENDING INTO TABLE @lt_agency_id .
DATA lt_customer_id TYPE SORTED TABLE OF /dmo/customer_id22 WITH UNIQUE KEY table_line.
SELECT DISTINCT customer_id FROM /dmo/customer22 ORDER BY customer_id DESCENDING INTO TABLE @lt_customer_id .
" Select 2 known agency IDs
IF lines( lt_agency_id ) < 2.
cl_abap_unit_assert=>abort( msg = 'No agency data!' ).
ENDIF.
gv_agency_id_1 = lt_agency_id[ 1 ].
gv_agency_id_2 = lt_agency_id[ 2 ].
cl_abap_unit_assert=>assert_differs( act = gv_agency_id_1 exp = gv_agency_id_2 )." To be totally sure
" Select 2 known customer IDs
IF lines( lt_customer_id ) < 2.
cl_abap_unit_assert=>abort( msg = 'No customer data!' ).
ENDIF.
gv_customer_id_1 = lt_customer_id[ 1 ].
gv_customer_id_2 = lt_customer_id[ 2 ].
cl_abap_unit_assert=>assert_differs( act = gv_customer_id_1 exp = gv_customer_id_2 )." To be totally sure
" Determine an unknown agency ID
gv_agency_id_unknown = lt_agency_id[ 1 ].
DO.
gv_agency_id_unknown = gv_agency_id_unknown + 1.
READ TABLE lt_agency_id TRANSPORTING NO FIELDS WITH TABLE KEY table_line = gv_agency_id_unknown.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
" Determine an unknown customer ID
gv_customer_id_unknown = lt_customer_id[ 1 ].
DO.
gv_customer_id_unknown = gv_customer_id_unknown + 1.
READ TABLE lt_customer_id TRANSPORTING NO FIELDS WITH TABLE KEY table_line = gv_customer_id_unknown.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
ENDIF.
gr_cut = NEW #( ).
ENDMETHOD.
METHOD setup.
SELECT COUNT( * ) FROM /dmo/travel22 INTO @mv_travel_count.
SELECT COUNT( * ) FROM /dmo/booking22 INTO @mv_booking_count.
SELECT COUNT( * ) FROM /dmo/book_sup_22 INTO @mv_booking_supplement_count.
ENDMETHOD.
METHOD teardown.
" Ensure proper cleanup of each individual test method
SELECT COUNT( * ) FROM /dmo/travel22 INTO @DATA(lv_travel_count).
cl_abap_unit_assert=>assert_equals( act = lv_travel_count exp = mv_travel_count ).
SELECT COUNT( * ) FROM /dmo/booking22 INTO @DATA(lv_booking_count).
cl_abap_unit_assert=>assert_equals( act = lv_booking_count exp = mv_booking_count ).
SELECT COUNT( * ) FROM /dmo/book_sup_22 INTO @DATA(lv_booking_supplement_count).
cl_abap_unit_assert=>assert_equals( act = lv_booking_supplement_count exp = mv_booking_supplement_count ).
ENDMETHOD.
METHOD class_teardown.
IF mc_use_sql_doubles = abap_true ##BOOL_OK ##NEEDED.
* mr_test_environment->destroy( ).
ENDIF.
ENDMETHOD.
METHOD create.
SELECT COUNT( * ) FROM /dmo/travel22 INTO @DATA(lv_count1).
DATA lv_start TYPE timestampl.
GET TIME STAMP FIELD lv_start.
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' )
IMPORTING es_travel = DATA(ls_travel_new)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_new-travel_id ).
gr_cut->save( ).
DATA lv_end TYPE timestampl.
GET TIME STAMP FIELD lv_end.
SELECT COUNT( * ) FROM /dmo/travel22 INTO @DATA(lv_count2).
cl_abap_unit_assert=>assert_equals( msg = 'create should add a travel' exp = 1 act = lv_count2 - lv_count1 ).
SELECT * FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO TABLE @DATA(lt_travel).
cl_abap_unit_assert=>assert_equals( msg = 'cannot read created travel' exp = 1 act = lines( lt_travel ) ).
DATA(ls_travel) = lt_travel[ 1 ].
cl_abap_unit_assert=>assert_equals( msg = 'createdby' exp = ls_travel-createdby act = sy-uname ).
cl_abap_unit_assert=>assert_number_between( msg = 'createdat' number = ls_travel-createdat lower = lv_start upper = lv_end ).
cl_abap_unit_assert=>assert_equals( msg = 'status' act = ls_travel-status exp = CONV /dmo/travel_status22( /dmo/if_flight_legacy22=>travel_status-new ) ).
_delete_existing_travel( ls_travel_new-travel_id ).
ENDMETHOD.
METHOD create_mutiple_calls.
DATA lv_start TYPE timestampl.
GET TIME STAMP FIELD lv_start.
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' )
IMPORTING es_travel = DATA(ls_travel_1)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_1-travel_id ).
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' )
IMPORTING es_travel = DATA(ls_travel_2)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_2-travel_id ).
cl_abap_unit_assert=>assert_false( xsdbool( ls_travel_1-travel_id = ls_travel_2-travel_id ) ).
gr_cut->save( ).
DATA lv_end TYPE timestampl.
GET TIME STAMP FIELD lv_end.
SELECT * FROM /dmo/travel22 WHERE travel_id = @ls_travel_1-travel_id OR travel_id = @ls_travel_2-travel_id INTO TABLE @DATA(lt_travel) ##SELECT_FAE_WITH_LOB[DESCRIPTION].
cl_abap_unit_assert=>assert_equals( msg = 'cannot read created travel' exp = 2 act = lines( lt_travel ) ).
DATA(ls_travel) = lt_travel[ 1 ].
cl_abap_unit_assert=>assert_equals( msg = 'createdby' exp = ls_travel-createdby act = sy-uname ).
cl_abap_unit_assert=>assert_number_between( msg = 'createdat' number = ls_travel-createdat lower = lv_start upper = lv_end ).
cl_abap_unit_assert=>assert_equals( msg = 'status' act = ls_travel-status exp = CONV /dmo/travel_status22( /dmo/if_flight_legacy22=>travel_status-new ) ).
_delete_existing_travel( ls_travel_1-travel_id ).
_delete_existing_travel( ls_travel_2-travel_id ).
ENDMETHOD.
METHOD c_agency_unknown.
SELECT COUNT( * ) FROM /dmo/travel22 INTO @DATA(lv_count1).
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_unknown customer_id = gv_customer_id_2 )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
gr_cut->save( ).
SELECT COUNT( * ) FROM /dmo/travel22 INTO @DATA(lv_count2).
cl_abap_unit_assert=>assert_equals( msg = 'should not create bad travel' exp = lv_count1 act = lv_count2 ).
DATA lv_msg_found TYPE abap_bool.
LOOP AT lt_messages INTO DATA(lr_message) ##INTO_OK.
IF lr_message->t100key = /dmo/cx_flight_legacy22=>agency_unkown.
lv_msg_found = abap_true.
ENDIF.
ENDLOOP.
cl_abap_unit_assert=>assert_equals( msg = 'missing error' exp = abap_true act = lv_msg_found ).
ENDMETHOD.
METHOD c_customer_unknown.
SELECT COUNT( * ) FROM /dmo/travel22 INTO @DATA(lv_count1).
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_unknown )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
gr_cut->save( ).
SELECT COUNT( * ) FROM /dmo/travel22 INTO @DATA(lv_count2).
cl_abap_unit_assert=>assert_equals( msg = 'should not create bad travel' exp = lv_count1 act = lv_count2 ).
DATA lv_msg_found TYPE abap_bool.
LOOP AT lt_messages INTO DATA(lr_message) ##INTO_OK.
IF lr_message->t100key = /dmo/cx_flight_legacy22=>customer_unkown.
lv_msg_found = abap_true.
ENDIF.
ENDLOOP.
cl_abap_unit_assert=>assert_equals( msg = 'missing error' exp = abap_true act = lv_msg_found ).
ENDMETHOD.
METHOD create_single.
DATA lv_timestampl TYPE timestampl.
GET TIME STAMP FIELD lv_timestampl.
SELECT MAX( travel_id ) FROM /dmo/travel22 INTO @DATA(lv_travel_id_max).
DATA lv_travel_id_1 TYPE /dmo/travel_id22.
DATA lv_travel_id_2 TYPE /dmo/travel_id22.
lv_travel_id_1 = lv_travel_id_max + 1.
IF lv_travel_id_1 IS INITIAL.
cl_abap_unit_assert=>abort( msg = 'Travel ID overflow!' ).
ENDIF.
lv_travel_id_2 = lv_travel_id_max + 2.
IF lv_travel_id_2 IS INITIAL.
cl_abap_unit_assert=>abort( msg = 'Travel ID overflow!' ).
ENDIF.
" Create a travel
cl_abap_unit_assert=>assert_equals( act = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201'
status = /dmo/if_flight_legacy22=>travel_status-booked ) )-travel_id exp = lv_travel_id_1 ).
" Create a second travel
cl_abap_unit_assert=>assert_equals( act = _create_travel( VALUE #( agency_id = gv_agency_id_2 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201'
status = /dmo/if_flight_legacy22=>travel_status-booked ) )-travel_id exp = lv_travel_id_2 ).
" Select and check the second travel
DATA ls_travel_sel TYPE /dmo/travel22.
SELECT SINGLE * FROM /dmo/travel22 WHERE travel_id = @lv_travel_id_2 INTO @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = gv_agency_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-status exp = CONV /dmo/travel_status22( /dmo/if_flight_legacy22=>travel_status-new ) )." Provided status overridden by determination
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-createdby exp = sy-uname ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-lastchangedby exp = sy-uname ).
cl_abap_unit_assert=>assert_true( xsdbool( ls_travel_sel-createdat = ls_travel_sel-lastchangedat ) ).
DATA(lv_diff) = CONV i( cl_abap_tstmp=>subtract( tstmp1 = ls_travel_sel-createdat tstmp2 = lv_timestampl ) ).
cl_abap_unit_assert=>assert_true( xsdbool( 0 <= lv_diff AND lv_diff <= 1 ) ).
_delete_existing_travel( lv_travel_id_1 ).
_delete_existing_travel( lv_travel_id_2 ).
ENDMETHOD.
METHOD delete_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Description' ) ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_new-description exp = 'My_Description' ).
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO @DATA(lv_description).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new-description ).
_delete_existing_travel( ls_travel_new-travel_id ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @ls_travel_new-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD update_single.
DATA lv_timestampl TYPE timestampl.
GET TIME STAMP FIELD lv_timestampl.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text' ) ).
DATA ls_travel_sel TYPE /dmo/travel22.
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = ls_travel_new-description ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id description = abap_true )
IMPORTING es_travel = DATA(ls_travel_updated)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_updated-travel_id exp = ls_travel_new-travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_updated-description exp = 'My_New_Text' ).
gr_cut->save( ).
CLEAR ls_travel_sel.
SELECT SINGLE * FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = ls_travel_new-agency_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_New_Text' ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-lastchangedby exp = sy-uname ).
cl_abap_unit_assert=>assert_differs( act = ls_travel_sel-createdat exp = ls_travel_sel-lastchangedat ).
DATA(lv_diff) = cl_abap_tstmp=>subtract( tstmp1 = ls_travel_sel-lastchangedat tstmp2 = lv_timestampl ).
cl_abap_unit_assert=>assert_true( xsdbool( 0 < lv_diff AND lv_diff < 1 ) ).
_delete_existing_travel( ls_travel_new-travel_id ).
ENDMETHOD.
METHOD d_travel_id_unknown.
DATA(ls_travel_deleted) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' ) ).
_delete_existing_travel( ls_travel_deleted-travel_id ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_deleted-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel_deleted-travel_id ).
ENDMETHOD.
METHOD u_travel_id_unknown.
DATA(ls_travel_deleted) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
_delete_existing_travel( ls_travel_deleted-travel_id ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_deleted-travel_id description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_deleted-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel_deleted-travel_id ).
ENDMETHOD.
METHOD delete_multiple.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_travel_new_1) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_1' ) ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_new_1-description exp = 'My_Text_1' ).
DATA(ls_travel_new_2) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_2' ) ).
DATA(ls_travel_new_3) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_3' ) ).
" Delete - only in buffer
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new_1-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new_2-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new_3-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
DATA lv_description TYPE /dmo/description22.
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new_1-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_1-description ).
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new_2-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_2-description ).
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new_3-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_3-description ).
" Now persist the buffer
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id IN ( @ls_travel_new_1-travel_id, @ls_travel_new_2-travel_id, @ls_travel_new_3-travel_id ) INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD update_multiple.
DATA(ls_travel_new_1) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_1' ) ).
DATA(ls_travel_new_2) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_2' ) ).
DATA(ls_travel_new_3) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text_3' ) ).
DATA lv_description TYPE /dmo/description22.
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new_1-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_1-description ).
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new_2-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_2-description ).
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new_3-travel_id INTO @lv_description.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new_3-description ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new_1-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text_1' )
is_travelx = VALUE #( travel_id = ls_travel_new_1-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new_2-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text_2' )
is_travelx = VALUE #( travel_id = ls_travel_new_2-travel_id description = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new_3-travel_id agency_id = gv_agency_id_2 description = 'My_New_Text_3' )
is_travelx = VALUE #( travel_id = ls_travel_new_3-travel_id agency_id = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
DATA ls_travel_sel TYPE /dmo/travel22.
CLEAR ls_travel_sel.
SELECT SINGLE agency_id, customer_id, description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new_1-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = ls_travel_new_1-agency_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new_1-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_New_Text_1' ).
CLEAR ls_travel_sel.
SELECT SINGLE agency_id, customer_id, description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new_2-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = ls_travel_new_2-agency_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new_2-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_New_Text_2' ).
CLEAR ls_travel_sel.
SELECT SINGLE agency_id, customer_id, description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new_3-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = gv_agency_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new_3-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_Text_3' ).
_delete_existing_travel( ls_travel_new_1-travel_id ).
_delete_existing_travel( ls_travel_new_2-travel_id ).
_delete_existing_travel( ls_travel_new_3-travel_id ).
ENDMETHOD.
METHOD update_twice.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text' ) ).
DATA ls_travel_sel TYPE /dmo/travel22.
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = ls_travel_new-description ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id agency_id = gv_agency_id_2 description = 'WHATEVER' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id agency_id = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR ls_travel_sel.
SELECT SINGLE agency_id, customer_id, description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = gv_agency_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = ls_travel_new-customer_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_New_Text' ).
_delete_existing_travel( ls_travel_new-travel_id ).
ENDMETHOD.
METHOD update_delete_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Text' ) ).
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO @DATA(lv_description).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = ls_travel_new-description ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id agency_id = gv_agency_id_unknown description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @ls_travel_new-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD u_agency_unknown.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id agency_id = gv_agency_id_unknown )
is_travelx = VALUE #( travel_id = ls_travel-travel_id agency_id = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>agency_unkown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_AGENCY_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_agency_id exp = gv_agency_id_unknown ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD u_customer_unknown.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id customer_id = gv_customer_id_unknown )
is_travelx = VALUE #( travel_id = ls_travel-travel_id customer_id = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>customer_unkown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CUSTOMER_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_customer_id exp = gv_customer_id_unknown ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD d_travel_id_initial.
gr_cut->delete_travel( EXPORTING iv_travel_id = '0'
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
ENDMETHOD.
METHOD act_set_status_to_booked.
DATA lv_timestampl TYPE timestampl.
GET TIME STAMP FIELD lv_timestampl.
" Case A: Known travel ID
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' ) ).
DATA ls_travel_sel TYPE /dmo/travel22.
SELECT SINGLE status FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-status exp = CONV /dmo/travel_status22( /dmo/if_flight_legacy22=>travel_status-new ) ).
gr_cut->set_status_to_booked( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR ls_travel_sel.
SELECT SINGLE status, createdat, lastchangedby, lastchangedat FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-status exp = CONV /dmo/travel_status22( /dmo/if_flight_legacy22=>travel_status-booked ) ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-lastchangedby exp = sy-uname ).
cl_abap_unit_assert=>assert_differs( act = ls_travel_sel-createdat exp = ls_travel_sel-lastchangedat ).
DATA(lv_diff) = cl_abap_tstmp=>subtract( tstmp1 = ls_travel_sel-lastchangedat tstmp2 = lv_timestampl ).
cl_abap_unit_assert=>assert_true( xsdbool( 0 < lv_diff AND lv_diff < 1 ) ).
" Case B: Initial travel ID
gr_cut->set_status_to_booked( EXPORTING iv_travel_id = '0'
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
" Case C: Unknown travel ID
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
" -- Deletion only in buffer
gr_cut->set_status_to_booked( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel_new-travel_id ).
gr_cut->save( ).
" -- Deletion send to DB
gr_cut->set_status_to_booked( EXPORTING iv_travel_id = ls_travel_new-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel_new-travel_id ).
ENDMETHOD.
METHOD c_dates_invalid.
" Try with initial begin date
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 end_date = '20190101' )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>no_begin_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
" Try with initial end date
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' )
IMPORTING es_travel = ls_travel
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>no_end_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
" Try to have begin date after end date
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190201' end_date = '20190101' )
IMPORTING es_travel = ls_travel
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>end_date_before_begin_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_BEGIN_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_END_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_begin_date exp = '20190201' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_end_date exp = '20190101' ).
ENDMETHOD.
METHOD u_dates_invalid.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
" Try to clear begin date
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( travel_id = ls_travel-travel_id begin_date = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>no_begin_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
" Try to clear end date
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( travel_id = ls_travel-travel_id end_date = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>no_end_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
" Try to have begin date after end date
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id end_date = '20181201' )
is_travelx = VALUE #( travel_id = ls_travel-travel_id end_date = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>end_date_before_begin_date-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_BEGIN_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_END_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_begin_date exp = ls_travel-begin_date ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_end_date exp = '20181201' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD initialize.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel_new-travel_id description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel_new-travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->initialize( ).
gr_cut->save( ).
SELECT SINGLE description FROM /dmo/travel22 WHERE travel_id = @ls_travel_new-travel_id INTO @DATA(lv_description).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = 'My_Old_Text' ).
_delete_existing_travel( ls_travel_new-travel_id ).
ENDMETHOD.
METHOD create_update_in_one_luw.
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id agency_id = gv_agency_id_2 description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = ls_travel-travel_id description = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
SELECT SINGLE agency_id, description FROM /dmo/travel22 WHERE travel_id = @ls_travel-travel_id INTO ( @DATA(lv_agency_id), @DATA(lv_description) ).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_agency_id exp = gv_agency_id_1 ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = 'My_New_Text' ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD create_delete_in_one_luw.
DATA lv_db_exits TYPE abap_bool.
gr_cut->create_travel( EXPORTING is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' )
IMPORTING es_travel = DATA(ls_travel)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel-travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exits.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exits.
cl_abap_unit_assert=>assert_false( lv_db_exits ).
ENDMETHOD.
METHOD update_delete_in_one_luw.
DATA lv_db_exits TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
DATA(lv_travel_id) = ls_travel_new-travel_id.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = lv_travel_id agency_id = gv_agency_id_2 description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = lv_travel_id description = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = lv_travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exits.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @lv_travel_id INTO @lv_db_exits.
cl_abap_unit_assert=>assert_false( lv_db_exits ).
ENDMETHOD.
METHOD delete_update_in_one_luw.
DATA lv_db_exits TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
DATA(lv_travel_id) = ls_travel_new-travel_id.
gr_cut->delete_travel( EXPORTING iv_travel_id = lv_travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = lv_travel_id agency_id = gv_agency_id_2 description = 'My_New_Text' )
is_travelx = VALUE #( travel_id = lv_travel_id description = abap_true )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = lv_travel_id ).
gr_cut->save( ).
CLEAR lv_db_exits.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @lv_travel_id INTO @lv_db_exits.
cl_abap_unit_assert=>assert_false( lv_db_exits ).
ENDMETHOD.
METHOD delete_delete_in_one_luw.
DATA lv_db_exits TYPE abap_bool.
DATA(ls_travel_new) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_2 begin_date = '20190101' end_date = '20190201' description = 'My_Old_Text' ) ).
DATA(lv_travel_id) = ls_travel_new-travel_id.
gr_cut->delete_travel( EXPORTING iv_travel_id = lv_travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->delete_travel( EXPORTING iv_travel_id = lv_travel_id
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = lv_travel_id ).
gr_cut->save( ).
CLEAR lv_db_exits.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @lv_travel_id INTO @lv_db_exits.
cl_abap_unit_assert=>assert_false( lv_db_exits ).
ENDMETHOD.
METHOD u_no_control.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
" No control data at all
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_control-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD u_status_invalid.
CONSTANTS lc_status_invalid TYPE /dmo/travel_status22 VALUE 'Z'.
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
" No control data at all
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id status = lc_status_invalid )
is_travelx = VALUE #( travel_id = ls_travel-travel_id status = abap_true )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_status_invalid-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_STATUS' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_status exp = lc_status_invalid ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD _create_travel.
CLEAR rs_travel.
gr_cut->create_travel( EXPORTING is_travel = is_travel
IMPORTING es_travel = rs_travel
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( rs_travel-travel_id ).
IF iv_save = abap_true.
gr_cut->save( ).
ENDIF.
ENDMETHOD.
METHOD _delete_existing_travel.
gr_cut->delete_travel( EXPORTING iv_travel_id = iv_travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
ENDMETHOD.
ENDCLASS.
CLASS ltc_booking DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS INHERITING FROM ltc_travel.
PROTECTED SECTION.
TYPES: BEGIN OF ts_flight,
carrier_id TYPE /dmo/carrier_id22,
connection_id TYPE /dmo/connection_id22,
flight_date TYPE /dmo/flight_date22,
price TYPE /dmo/flight_price22,
currency_code TYPE /dmo/currency_code22,
END OF ts_flight.
CLASS-DATA gs_flight_1 TYPE ts_flight.
CLASS-DATA gs_flight_2 TYPE ts_flight.
CLASS-DATA gv_carrier_id_unknown TYPE /dmo/carrier_id22.
CLASS-DATA gv_currency_code_unknown TYPE /dmo/currency_code22.
CLASS-DATA gv_booking_date TYPE /dmo/booking_date22.
DATA mv_travel_id TYPE /dmo/travel_id22.
DATA mv_travel_id_unknown TYPE /dmo/travel_id22.
METHODS _create_booking IMPORTING iv_travel_id TYPE /dmo/travel_id22
is_booking TYPE /dmo/if_flight_legacy22=>ts_booking_in
iv_save TYPE abap_bool DEFAULT abap_true
RETURNING VALUE(rs_booking) TYPE /dmo/booking22.
METHODS _delete_existing_booking IMPORTING iv_travel_id TYPE /dmo/travel_id22
iv_booking_id TYPE /dmo/booking_id22.
PRIVATE SECTION.
CLASS-METHODS class_setup.
METHODS setup.
METHODS teardown.
"! Create, Update, Delete a single booking in 3 different LUWs
METHODS c_u_d_single FOR TESTING RAISING cx_static_check.
"! Create, Update a single booking in the same LUW, delete it in a second LUW
METHODS cu_d_single FOR TESTING RAISING cx_static_check.
"! Create, Update, Delete a single booking in the same LUW
METHODS cud_single FOR TESTING RAISING cx_static_check.
"! Create, (Update, Update), Delete a single booking in 3 different LUWs
METHODS c_uu_d_single FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an unknown Travel ID -> ERROR
METHODS c_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an initial Travel ID -> ERROR
METHODS c_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an unknown Travel ID -> ERROR
METHODS u_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an initial Travel ID -> ERROR
METHODS u_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking with an unknown Travel ID -> ERROR
METHODS d_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking with an initial Travel ID -> ERROR
METHODS d_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an unknown Booking ID -> ERROR
METHODS u_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking with an unknown Booking ID -> ERROR
METHODS d_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an initial Booking ID -> ERROR
METHODS u_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking with an initial Booking ID -> ERROR
METHODS d_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Create, update, delete a single travel with bookings in 3 different LUWs
METHODS c_u_d_travel_w_bookings FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an unknown customer -> ERROR
METHODS c_customer_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an unknown customer -> ERROR
METHODS u_customer_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a booking with a booking date in the past -> ERROR
METHODS c_booking_date_past FOR TESTING RAISING cx_static_check.
"! Try to clear booking date -> ERROR
METHODS u_booking_date_initial FOR TESTING RAISING cx_static_check.
"! Try to create a booking with invalid flight data -> ERROR
METHODS c_flight_invalid FOR TESTING RAISING cx_static_check.
"! Try to update a booking with different flight data -> ERROR
METHODS u_flight FOR TESTING RAISING cx_static_check.
"! Try to delete, update a single booking in the same LUW -> ERROR
METHODS du_single FOR TESTING RAISING cx_static_check.
"! Try to delete, delete a single booking in the same LUW -> NO Error
METHODS dd_single FOR TESTING RAISING cx_static_check.
"! Create booking, delete father travel in same LUW -> NO Error, Booking ignored
METHODS c_booking_d_travel_1_luw FOR TESTING RAISING cx_static_check.
"! Try to delete father travel, create booking in same LUW -> ERROR
METHODS d_travel_c_booking_1_luw FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an initial Booking ID -> ERROR
METHODS c_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to create a booking with a known combination Travel ID, Booking ID -> ERROR
METHODS c_booking_id_exists FOR TESTING RAISING cx_static_check.
"! Check that price and currency are derived / not derived
METHODS c_price_currency FOR TESTING RAISING cx_static_check.
"! Try to update price only or currency only -> ERROR
METHODS u_price_currency FOR TESTING RAISING cx_static_check.
"! Try to create a booking with an unknown currency code -> ERROR
METHODS c_currency_code_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking with an unknown currency code -> ERROR
METHODS u_currency_code_unknown FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS /dmo/cl_flight_legacy22 DEFINITION LOCAL FRIENDS ltc_booking.
CLASS ltc_booking IMPLEMENTATION.
METHOD class_setup.
IF mc_use_sql_doubles = abap_true ##BOOL_OK.
* gs_flight_1 = VALUE #( carrier_id = 'AB' connection_id = '0001' flight_date = '20190306' price = '10818.00' currency_code = 'SGD' ) ##LITERAL.
* gs_flight_2 = value #( carrier_id = 'CD' connection_id = '0002' flight_date = '20180510' price = '5950.00' currency_code = 'SGD' ) ##LITERAL.
*
* DATA lt_flight TYPE STANDARD TABLE OF /dmo/flight22.
* lt_flight = VALUE #( ( carrier_id = gs_flight_1-carrier_id connection_id = gs_flight_1-connection_id flight_date = gs_flight_1-flight_date price = gs_flight_1-price currency_code = gs_flight_1-currency_code )
* ( carrier_id = gs_flight_2-carrier_id connection_id = gs_flight_2-connection_id flight_date = gs_flight_2-flight_date price = gs_flight_2-price currency_code = gs_flight_2-currency_code ) ).
* mr_test_environment->insert_test_data( lt_flight ).
*
* gv_currency_code_unknown = 'XYZ'.
ELSE.
" Select 2 different Flight Dates with their prices
SELECT SINGLE carrier_id, connection_id, flight_date, price, currency_code FROM /dmo/flight22
INTO CORRESPONDING FIELDS OF @gs_flight_1 ##WARN_OK.
IF sy-subrc <> 0.
cl_abap_unit_assert=>abort( |No flight data!| ).
ENDIF.
SELECT SINGLE carrier_id, connection_id, flight_date, price, currency_code FROM /dmo/flight22 WHERE carrier_id <> @gs_flight_1-carrier_id AND connection_id <> @gs_flight_1-connection_id
INTO CORRESPONDING FIELDS OF @gs_flight_2 ##WARN_OK.
IF sy-subrc <> 0.
cl_abap_unit_assert=>abort( |No flight data!| ).
ENDIF.
" Determine an unknown Carrier ID
gv_carrier_id_unknown = 'XX'.
SELECT SINGLE carrier_id FROM /dmo/carrier22 WHERE carrier_id = @gv_carrier_id_unknown INTO @DATA(lv_dummy_carrier_id).
IF sy-subrc = 0.
cl_abap_unit_assert=>abort( |Carrier ID { gv_carrier_id_unknown } should not be known!| ).
ENDIF.
" Invalid currency code
gv_currency_code_unknown = 'XYZ'.
" We should use TCURC, but this is not released for "ABAP for SAP Cloud Platform"
SELECT SINGLE currency FROM i_currency WHERE currency = @gv_currency_code_unknown INTO @DATA(lv_dummy_currency_code).
IF sy-subrc = 0.
cl_abap_unit_assert=>abort( |Currency { gv_currency_code_unknown } should not be known!| ).
ENDIF.
ENDIF.
" Use Current date as Booking date
gv_booking_date = cl_abap_context_info=>get_system_date( ).
ENDMETHOD.
METHOD setup.
mv_travel_id = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) )-travel_id.
mv_travel_id_unknown = mv_travel_id.
DO.
mv_travel_id_unknown = mv_travel_id_unknown + 1.
SELECT SINGLE travel_id FROM /dmo/travel22 WHERE travel_id = @mv_travel_id_unknown INTO @DATA(lv_dummy_travel_id).
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
ENDMETHOD.
METHOD teardown.
_delete_existing_travel( mv_travel_id ).
ENDMETHOD.
METHOD c_u_d_single.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-carrier_id exp = gs_flight_1-carrier_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-connection_id exp = gs_flight_1-connection_id ).
SELECT SINGLE * FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(ls_booking_sel).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = ls_booking-customer_id ).
DATA(lv_booking_date) = gv_booking_date + 15.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id booking_date = lv_booking_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR ls_booking_sel.
SELECT SINGLE * FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-carrier_id exp = ls_booking-carrier_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-booking_date exp = lv_booking_date ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
SELECT SINGLE * FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( exp = 4 ).
ENDMETHOD.
METHOD cu_d_single.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-carrier_id exp = gs_flight_1-carrier_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking-connection_id exp = gs_flight_1-connection_id ).
DATA(lv_booking_date) = gv_booking_date + 15.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id booking_date = lv_booking_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
SELECT SINGLE * FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(ls_booking_sel).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-carrier_id exp = ls_booking-carrier_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-booking_date exp = lv_booking_date ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
SELECT SINGLE * FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( exp = 4 ).
ENDMETHOD.
METHOD cud_single.
DATA lv_db_exists TYPE abap_bool.
SELECT SINGLE lastchangedat FROM /dmo/travel22 WHERE travel_id = @mv_travel_id INTO @DATA(lv_lastchangedat_1).
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
DATA lv_booking_date TYPE /dmo/booking_date22.
lv_booking_date = gv_booking_date + 15.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id booking_date = lv_booking_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update booking_date = abap_true ) )
IMPORTING et_booking = DATA(lt_booking_updated)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_updated ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_updated[ 1 ]-travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_updated[ 1 ]-booking_id exp = ls_booking-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_updated[ 1 ]-booking_date exp = lv_booking_date ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
" Check that the administrative fields of the root node have been updated
SELECT SINGLE lastchangedby, lastchangedat FROM /dmo/travel22 WHERE travel_id = @mv_travel_id INTO ( @DATA(lv_lastchangedby), @DATA(lv_lastchangedat_2) ).
cl_abap_unit_assert=>assert_equals( act = lv_lastchangedby exp = sy-uname ).
cl_abap_unit_assert=>assert_true( xsdbool( lv_lastchangedat_2 > lv_lastchangedat_1 ) ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking22 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_uu_d_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
SELECT SINGLE customer_id FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(lv_customer_id).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = ls_booking-customer_id ).
DATA(lv_booking_date) = gv_booking_date + 15.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id booking_date = lv_booking_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id customer_id = gv_customer_id_2 ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update customer_id = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
DATA ls_booking_sel TYPE /dmo/booking22.
SELECT SINGLE booking_date, customer_id FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-booking_date exp = lv_booking_date ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = gv_customer_id_2 ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking22 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking = VALUE #( ( booking_id = '10' booking_date = '20180701' customer_id = gv_customer_id_1 carrier_id = gs_flight_1-carrier_id connection_id = gs_flight_1-connection_id ) )
it_bookingx = VALUE #( ( booking_id = '10' action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD c_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking = VALUE #( ( booking_id = '10' booking_date = '20180701' customer_id = gv_customer_id_1 carrier_id = gs_flight_1-carrier_id connection_id = gs_flight_1-connection_id ) )
it_bookingx = VALUE #( ( booking_id = '10' action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking = VALUE #( ( booking_id = '2' booking_date = '20180715' ) )
it_bookingx = VALUE #( ( booking_id = '2' action_code = /dmo/if_flight_legacy22=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD u_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking = VALUE #( ( booking_id = '2' booking_date = '20180715' ) )
it_bookingx = VALUE #( ( booking_id = '2' action_code = /dmo/if_flight_legacy22=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
ENDMETHOD.
METHOD d_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking = VALUE #( ( booking_id = '1' ) )
it_bookingx = VALUE #( ( booking_id = '1' action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD d_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking = VALUE #( ( booking_id = '1' ) )
it_bookingx = VALUE #( ( booking_id = '1' action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10' booking_date = '20180715' ) )
it_bookingx = VALUE #( ( booking_id = '10' action_code = /dmo/if_flight_legacy22=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
ENDMETHOD.
METHOD d_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10' ) )
it_bookingx = VALUE #( ( booking_id = '10' action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
ENDMETHOD.
METHOD u_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '0' booking_date = '20180715' ) )
it_bookingx = VALUE #( ( booking_id = '0' action_code = /dmo/if_flight_legacy22=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD d_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '0' ) )
it_bookingx = VALUE #( ( booking_id = '0' action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD c_u_d_travel_w_bookings.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create a travel with 2 bookings (the second travel is only for testing)
DATA(ls_travel_1) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
DATA(ls_travel_2) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_1-travel_id ).
cl_abap_unit_assert=>assert_not_initial( ls_travel_2-travel_id ).
DATA(ls_booking_1) = _create_booking( iv_travel_id = ls_travel_1-travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
DATA(ls_booking_2) = _create_booking( iv_travel_id = ls_travel_1-travel_id
is_booking = VALUE #( booking_id = '20'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
gr_cut->save( ).
SELECT COUNT( * ) FROM /dmo/booking22 WHERE travel_id = @ls_travel_1-travel_id INTO @DATA(lv_count).
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 2 ).
" 2. LUW: Update the first booking
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_1-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_1-travel_id )
it_booking = VALUE #( ( booking_id = ls_booking_1-booking_id customer_id = gv_customer_id_2 ) )
it_bookingx = VALUE #( ( booking_id = ls_booking_1-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update customer_id = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
SELECT SINGLE customer_id FROM /dmo/booking22 WHERE travel_id = @ls_booking_1-travel_id AND booking_id = @ls_booking_1-booking_id INTO @DATA(lv_customer_id).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = gv_customer_id_2 ).
SELECT SINGLE customer_id FROM /dmo/booking22 WHERE travel_id = @ls_booking_2-travel_id AND booking_id = @ls_booking_2-booking_id INTO @lv_customer_id.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = gv_customer_id_1 ).
" 3. LUW: Delete the first booking - check that the second booking is still there
_delete_existing_booking( iv_travel_id = ls_booking_1-travel_id iv_booking_id = ls_booking_1-booking_id ).
SELECT travel_id, booking_id FROM /dmo/booking22 WHERE travel_id = @ls_travel_1-travel_id INTO TABLE @DATA(lt_booking_key).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_key ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_key[ 1 ]-booking_id exp = ls_booking_2-booking_id ).
" 4. LUW: Delete the travel - check that the second booking has also been deleted
_delete_existing_travel( ls_travel_1-travel_id ).
_delete_existing_travel( ls_travel_2-travel_id ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking22 FIELDS @abap_true WHERE travel_id = @ls_travel_1-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_customer_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_unknown
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>customer_unkown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CUSTOMER_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_customer_id exp = gv_customer_id_unknown ).
ENDMETHOD.
METHOD u_customer_unknown.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id customer_id = gv_customer_id_unknown ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update customer_id = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>customer_unkown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CUSTOMER_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_customer_id exp = gv_customer_id_unknown ).
gr_cut->save( ).
SELECT SINGLE customer_id FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(lv_customer_id).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = ls_booking-customer_id ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
ENDMETHOD.
METHOD c_booking_date_past.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = '20180101'
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_booking_date_invalid-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_date exp = '20180101' ).
ENDMETHOD.
METHOD u_booking_date_initial.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update booking_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_booking_date_invalid-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking-booking_id ).
cl_abap_unit_assert=>assert_initial( lx->mv_booking_date ).
gr_cut->save( ).
SELECT SINGLE booking_date FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(lv_booking_date).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_booking_date exp = gv_booking_date ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
ENDMETHOD.
METHOD c_flight_invalid.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gv_carrier_id_unknown
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>flight_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CARRIER_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_CONNECTION_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_FLIGHT_DATE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_carrier_id exp = gv_carrier_id_unknown ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_connection_id exp = gs_flight_1-connection_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_flight_date exp = gs_flight_1-flight_date ).
ENDMETHOD.
METHOD u_flight.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id flight_date = gs_flight_2-flight_date ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update flight_date = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_flight_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
gr_cut->save( ).
SELECT SINGLE flight_date FROM /dmo/booking22 WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @DATA(lv_flight_date).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_flight_date exp = gs_flight_1-flight_date ).
_delete_existing_booking( iv_travel_id = mv_travel_id iv_booking_id = ls_booking-booking_id ).
ENDMETHOD.
METHOD du_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id customer_id = gv_customer_id_2 ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update customer_id = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking-booking_id ).
gr_cut->save( ).
SELECT SINGLE FROM /dmo/booking22 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD dd_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking22 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @ls_booking-booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_booking_d_travel_1_luw.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create travel
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" 2. LUW: Create booking for the new travel, delete the new travel
_create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
"Check that travel and booking are gone
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD d_travel_c_booking_1_luw.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create travel
DATA(ls_travel) = _create_travel( VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' ) ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" 2. LUW: Delete the new travel, create booking for the same travel
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( travel_id = ls_travel-travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
gr_cut->save( ).
"Check that travel and booking are gone
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/travel22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '0'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '0'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD c_booking_id_exists.
_create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
" Try to create a booking that is already in the buffer
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_exists-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
gr_cut->save( ).
" Try to create a booking that is already in the database
CLEAR lt_messages.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = lt_booking
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_exists-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = '10' ).
ENDMETHOD.
METHOD c_price_currency.
" Do not provide price and currency
DATA(ls_booking_1) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
" Provide price and currency
CONSTANTS lc_diff TYPE p VALUE '99.99'.
DATA lv_flight_price TYPE /dmo/flight_price22.
DATA lv_currency_code TYPE /dmo/currency_code22.
lv_flight_price = gs_flight_1-price + lc_diff.
lv_currency_code = SWITCH #( gs_flight_1-currency_code WHEN 'EUR' THEN 'USD' ELSE 'EUR' ).
DATA(ls_booking_2) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '20'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = lv_flight_price
currency_code = lv_currency_code )
iv_save = abap_true ).
DATA ls_booking_sel TYPE /dmo/booking22.
SELECT SINGLE flight_price, currency_code FROM /dmo/booking22 WHERE travel_id = @ls_booking_1-travel_id AND booking_id = @ls_booking_1-booking_id INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-flight_price exp = gs_flight_1-price ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-currency_code exp = gs_flight_1-currency_code ).
CLEAR ls_booking_sel.
SELECT SINGLE flight_price, currency_code FROM /dmo/booking22 WHERE travel_id = @ls_booking_1-travel_id AND booking_id = @ls_booking_2-booking_id INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-flight_price exp = lv_flight_price ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-currency_code exp = lv_currency_code ).
ENDMETHOD.
METHOD u_price_currency.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '999.99'
currency_code = 'EUR' )
iv_save = abap_false ).
" Try to change the flight price only
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking-travel_id )
is_travelx = VALUE #( travel_id = ls_booking-travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id flight_price = '888.88' ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update flight_price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_price_currency_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking-booking_id ).
" Try to change the currency code only
CLEAR lt_messages.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking-travel_id )
is_travelx = VALUE #( travel_id = ls_booking-travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id currency_code = 'XXX' ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update currency_code = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_price_currency_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking-booking_id ).
ENDMETHOD.
METHOD c_currency_code_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '999.99'
currency_code = gv_currency_code_unknown ) )
it_bookingx = VALUE #( ( booking_id = '10'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>currency_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CURRENCY_CODE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_currency_code exp = gv_currency_code_unknown ).
ENDMETHOD.
METHOD u_currency_code_unknown.
DATA(ls_booking) = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '999.99'
currency_code = 'EUR' )
iv_save = abap_false ).
" Try to change the flight price only
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking-travel_id )
is_travelx = VALUE #( travel_id = ls_booking-travel_id )
it_booking = VALUE #( ( booking_id = ls_booking-booking_id flight_price = '999.99' currency_code = gv_currency_code_unknown ) )
it_bookingx = VALUE #( ( booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-update flight_price = abap_true currency_code = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>currency_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CURRENCY_CODE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_currency_code exp = gv_currency_code_unknown ).
ENDMETHOD.
METHOD _create_booking.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = iv_travel_id )
is_travelx = VALUE #( travel_id = iv_travel_id )
it_booking = VALUE #( ( is_booking ) )
it_bookingx = VALUE #( ( booking_id = is_booking-booking_id action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking = DATA(lt_booking)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking ) exp = 1 ).
rs_booking = lt_booking[ 1 ].
cl_abap_unit_assert=>assert_equals( act = rs_booking-travel_id exp = iv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = rs_booking-booking_id exp = is_booking-booking_id ).
IF iv_save = abap_true.
gr_cut->save( ).
ENDIF.
ENDMETHOD.
METHOD _delete_existing_booking.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = iv_travel_id )
is_travelx = VALUE #( travel_id = iv_travel_id )
it_booking = VALUE #( ( booking_id = iv_booking_id ) )
it_bookingx = VALUE #( ( booking_id = iv_booking_id action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
ENDMETHOD.
ENDCLASS.
CLASS ltc_booking_supplement DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS INHERITING FROM ltc_booking.
PRIVATE SECTION.
TYPES: BEGIN OF ts_supplement,
supplement_id TYPE /dmo/supplement_id22,
price TYPE /dmo/supplement_price22,
currency_code TYPE /dmo/currency_code22,
END OF ts_supplement.
CLASS-DATA gs_supplement_1 TYPE ts_supplement.
CLASS-DATA gs_supplement_2 TYPE ts_supplement.
CLASS-DATA gv_supplement_id_unknown TYPE /dmo/supplement_id22.
DATA mv_booking_id TYPE /dmo/booking_id22.
DATA mv_booking_id_unknown TYPE /dmo/booking_id22.
CLASS-METHODS class_setup.
METHODS setup.
"! Complicated test involving all 3 levels
METHODS c_u_d_multiple FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an unknown Travel ID -> ERROR
METHODS c_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an initial Travel ID -> ERROR
METHODS c_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an unknown Travel ID -> ERROR
METHODS u_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an initial Travel ID -> ERROR
METHODS u_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an unknown Travel ID -> ERROR
METHODS d_travel_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an initial Travel ID -> ERROR
METHODS d_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an unknown Booking ID -> ERROR
METHODS c_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an initial Travel ID -> ERROR
METHODS c_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an unknown Booking ID -> ERROR
METHODS u_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an initial Booking ID -> ERROR
METHODS u_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an unknown Booking ID -> ERROR
METHODS d_booking_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an initial Booking ID -> ERROR
METHODS d_booking_id_initial FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an unknown Booking Supplement ID -> ERROR
METHODS u_booking_suppl_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an initial Booking Supplement ID -> ERROR
METHODS u_booking_suppl_id_initial FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an unknown Booking Supplement ID -> ERROR
METHODS d_booking_suppl_id_unknown FOR TESTING RAISING cx_static_check.
"! Try to delete a booking supplement with an initial Booking Supplement ID -> ERROR
METHODS d_booking_suppl_id_initial FOR TESTING RAISING cx_static_check.
"! Create booking supplement, delete father booking in same LUW -> NO Error, booking supplement ignored
METHODS c_bsuppl_d_booking_1_luw FOR TESTING RAISING cx_static_check.
"! Create booking supplement, delete father travel in same LUW -> NO Error, booking supplement ignored
METHODS c_bsuppl_d_travel_1_luw FOR TESTING RAISING cx_static_check.
"! Try to delete father travel, create booking supplement in same LUW -> ERROR
METHODS d_travel_c_bsuppl_1_luw FOR TESTING RAISING cx_static_check.
"! Try to delete father booking, create booking supplement in same LUW -> ERROR
METHODS d_booking_c_bsuppl_1_luw FOR TESTING RAISING cx_static_check.
"! Try to delete, update a single booking in the same LUW -> ERROR
METHODS du_single FOR TESTING RAISING cx_static_check.
"! Try to delete, delete a single booking in the same LUW -> NO Error
METHODS dd_single FOR TESTING RAISING cx_static_check.
"! Try to create a Booking Supplement with an unknown supplement ID -> ERROR
METHODS c_supplement_unknown FOR TESTING RAISING cx_static_check.
"! Try to create a Booking Supplement with an initial Booking Supplement ID -> ERROR
METHODS c_booking_suppl_id_initial FOR TESTING RAISING cx_static_check.
"! Try to create a Booking Supplement with a known combination of Travel ID, Booking ID, Booking Supplement ID -> ERROR
METHODS c_booking_suppl_id_exists FOR TESTING RAISING cx_static_check.
"! Do a deep insert involving all 3 levels
METHODS c_deep_insert FOR TESTING RAISING cx_static_check.
"! Try to do a deep insert with a faulty booking supplement -> ERROR (nothing is created)
METHODS c_deep_insert_suppl_unknown FOR TESTING RAISING cx_static_check.
"! Do a complicated update in a single call
METHODS u_single_travel_multiple FOR TESTING RAISING cx_static_check.
METHODS read_db FOR TESTING RAISING cx_static_check.
METHODS read_buffer FOR TESTING RAISING cx_static_check.
METHODS read_travel_id_initial FOR TESTING RAISING cx_static_check.
"! Try to change the supplement ID -> ERROR
METHODS u_supplement_id FOR TESTING RAISING cx_static_check.
"! Check that price and currency are derived / not derived
METHODS c_price_currency FOR TESTING RAISING cx_static_check.
"! Try to update price only or currency only -> ERROR
METHODS u_price_currency FOR TESTING RAISING cx_static_check.
"! Try to create a booking supplement with an unknown currency code -> ERROR
METHODS c_currency_code_unknown FOR TESTING RAISING cx_static_check.
"! Try to update a booking supplement with an unknown currency code -> ERROR
METHODS u_currency_code_unknown FOR TESTING RAISING cx_static_check.
METHODS _create_booking_suppl IMPORTING iv_travel_id TYPE /dmo/travel_id22
is_booking_supplement TYPE /dmo/if_flight_legacy22=>ts_booking_supplement_in
iv_save TYPE abap_bool DEFAULT abap_true
RETURNING VALUE(rs_booking_supplement) TYPE /dmo/book_sup_22.
ENDCLASS.
CLASS /dmo/cl_flight_legacy22 DEFINITION LOCAL FRIENDS ltc_booking_supplement.
CLASS ltc_booking_supplement IMPLEMENTATION.
METHOD class_setup.
IF mc_use_sql_doubles = abap_true ##BOOL_OK.
* gs_supplement_1 = VALUE #( supplement_id = 'BV-0001' price = '2.30' currency_code = 'EUR' ) ##LITERAL.
* gs_supplement_2 = VALUE #( supplement_id = 'BV-0002' price = '7.50' currency_code = 'EUR' ) ##LITERAL.
*
* DATA lt_supplement TYPE STANDARD TABLE OF /dmo/suppleme_22.
* lt_supplement = VALUE #( ( supplement_id = gs_supplement_1-supplement_id price = gs_supplement_1-price currency_code = gs_supplement_1-currency_code )
* ( supplement_id = gs_supplement_2-supplement_id price = gs_supplement_2-price currency_code = gs_supplement_2-currency_code ) ).
* mr_test_environment->insert_test_data( lt_supplement ).
*
* gv_supplement_id_unknown = 'XX-999'.
ELSE.
" Select any valid combination of Supplement ID, Price, Currency Code
SELECT SINGLE supplement_id, price, currency_code FROM /dmo/suppleme_22 INTO ( @gs_supplement_1-supplement_id, @gs_supplement_1-price, @gs_supplement_1-currency_code ) ##WARN_OK.
IF sy-subrc <> 0.
cl_abap_unit_assert=>abort( 'No supplement data!' ).
ENDIF.
" Select a different valid combination of Supplement ID, Price, Currency Code
SELECT SINGLE supplement_id, price, currency_code FROM /dmo/suppleme_22 WHERE supplement_id <> @gs_supplement_1-supplement_id
INTO ( @gs_supplement_2-supplement_id, @gs_supplement_2-price, @gs_supplement_2-currency_code ) ##WARN_OK.
IF sy-subrc <> 0.
cl_abap_unit_assert=>abort( 'No supplement data!' ).
ENDIF.
cl_abap_unit_assert=>assert_differs( act = gs_supplement_1-supplement_id exp = gs_supplement_2-supplement_id ).
" Determine an unknown Supplement ID
gv_supplement_id_unknown = 'XX-999'.
SELECT SINGLE supplement_id FROM /dmo/suppleme_22 WHERE supplement_id = @gv_supplement_id_unknown INTO @DATA(lv_dummy_supplement_id).
IF sy-subrc = 0.
cl_abap_unit_assert=>abort( |Supplement ID { gv_supplement_id_unknown } should not be known!| ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD setup.
mv_booking_id = _create_booking( iv_travel_id = mv_travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date ) )-booking_id.
mv_booking_id_unknown = '20'.
ENDMETHOD.
METHOD c_u_d_multiple.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW:
" Create a travel
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
" Create 2 bookings for the new travel
DATA(ls_booking_1) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '20'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
DATA(ls_booking_2) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '21'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
" Create a single booking supplement for the first booking
_create_booking_suppl( iv_travel_id = ls_booking_1-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking_1-booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_false ).
" Create 2 booking supplements for the second booking
DATA(ls_book_suppl_2_1) = _create_booking_suppl( iv_travel_id = ls_booking_2-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking_2-booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
iv_save = abap_false ).
DATA(ls_book_suppl_2_2) = _create_booking_suppl( iv_travel_id = ls_booking_2-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking_2-booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = '30.0'
currency_code = 'EUR' )
iv_save = abap_false ).
gr_cut->save( ).
SELECT COUNT( * ) FROM /dmo/book_sup_22 WHERE travel_id = @ls_travel-travel_id INTO @DATA(lv_count).
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 3 ).
DATA ls_book_suppl_sel TYPE /dmo/book_sup_22.
SELECT SINGLE price, currency_code FROM /dmo/book_sup_22 WHERE travel_id = @ls_book_suppl_2_1-travel_id
AND booking_id = @ls_book_suppl_2_1-booking_id
AND booking_supplement_id = @ls_book_suppl_2_1-booking_supplement_id
INTO CORRESPONDING FIELDS OF @ls_book_suppl_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-price exp = '20.0' ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-currency_code exp = 'EUR' ).
" 2. Update the first booking supplement of the second booking
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_book_suppl_2_1-travel_id )
is_travelx = VALUE #( travel_id = ls_book_suppl_2_1-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_book_suppl_2_1-booking_id
booking_supplement_id = ls_book_suppl_2_1-booking_supplement_id
price = '21.0'
currency_code = 'USD'
) )
it_booking_supplementx = VALUE #( ( booking_id = ls_book_suppl_2_1-booking_id
booking_supplement_id = ls_book_suppl_2_1-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-update
price = abap_true
currency_code = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
" Check that record already in update buffer is properly updated
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_book_suppl_2_1-travel_id )
is_travelx = VALUE #( travel_id = ls_book_suppl_2_1-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_book_suppl_2_1-booking_id
booking_supplement_id = ls_book_suppl_2_1-booking_supplement_id
price = '22.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_book_suppl_2_1-booking_id
booking_supplement_id = ls_book_suppl_2_1-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-update
price = abap_true
currency_code = abap_true ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-travel_id exp = ls_book_suppl_2_1-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-booking_id exp = ls_book_suppl_2_1-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-booking_supplement_id exp = ls_book_suppl_2_1-booking_supplement_id ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-price exp = '22.0' ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement[ 1 ]-currency_code exp = 'EUR' ).
gr_cut->save( ).
SELECT SINGLE price, currency_code FROM /dmo/book_sup_22 WHERE travel_id = @ls_book_suppl_2_1-travel_id
AND booking_id = @ls_book_suppl_2_1-booking_id
AND booking_supplement_id = @ls_book_suppl_2_1-booking_supplement_id
INTO CORRESPONDING FIELDS OF @ls_book_suppl_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-price exp = '22.0' ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-currency_code exp = 'EUR' ).
SELECT SINGLE price, currency_code FROM /dmo/book_sup_22 WHERE travel_id = @ls_book_suppl_2_2-travel_id
AND booking_id = @ls_book_suppl_2_2-booking_id
AND booking_supplement_id = @ls_book_suppl_2_2-booking_supplement_id
INTO CORRESPONDING FIELDS OF @ls_book_suppl_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-price exp = '30.0' ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-currency_code exp = 'EUR' ).
" 3. Delete the first booking - check that the booking supplement has also been deleted
_delete_existing_booking( iv_travel_id = ls_booking_1-travel_id iv_booking_id = ls_booking_1-booking_id ).
SELECT COUNT( * ) FROM /dmo/book_sup_22 WHERE travel_id = @ls_travel-travel_id INTO @lv_count.
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 2 ).
SELECT COUNT( * ) FROM /dmo/book_sup_22 WHERE travel_id = @ls_travel-travel_id AND booking_id = @ls_booking_2-booking_id INTO @lv_count.
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 2 ).
" 4. LUW: Delete the second booking supplement of the second booking - here check also travel admin field
SELECT SINGLE lastchangedat FROM /dmo/travel22 WHERE travel_id = @ls_travel-travel_id INTO @DATA(lv_lastchangedat_1).
cl_abap_unit_assert=>assert_subrc( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @ls_book_suppl_2_2-travel_id
AND booking_id = @ls_book_suppl_2_2-booking_id
AND booking_supplement_id = @ls_book_suppl_2_2-booking_supplement_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_book_suppl_2_2-travel_id )
is_travelx = VALUE #( travel_id = ls_book_suppl_2_2-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_book_suppl_2_2-booking_id
booking_supplement_id = ls_book_suppl_2_2-booking_supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_book_suppl_2_2-booking_id
booking_supplement_id = ls_book_suppl_2_2-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @ls_book_suppl_2_2-travel_id
AND booking_id = @ls_book_suppl_2_2-booking_id
AND booking_supplement_id = @ls_book_suppl_2_2-booking_supplement_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
SELECT SINGLE lastchangedat FROM /dmo/travel22 WHERE travel_id = @ls_travel-travel_id INTO @DATA(lv_lastchangedat_2).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_true( xsdbool( lv_lastchangedat_2 > lv_lastchangedat_1 ) ).
SELECT COUNT( * ) FROM /dmo/book_sup_22 WHERE travel_id = @ls_travel-travel_id AND booking_id = @ls_booking_2-booking_id INTO @lv_count.
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 1 ).
" 5. LUW: Delete the travel - check that all booking (supplements) have also been deleted
_delete_existing_travel( ls_travel-travel_id ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/booking22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking_supplement = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD c_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking_supplement = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking_supplement = VALUE #( ( booking_id = '2' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = '2' action_code = /dmo/if_flight_legacy22=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD u_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking_supplement = VALUE #( ( booking_id = '2' booking_supplement_id = '1' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = '2' booking_supplement_id = '1' action_code = /dmo/if_flight_legacy22=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
ENDMETHOD.
METHOD d_travel_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id_unknown )
is_travelx = VALUE #( travel_id = mv_travel_id_unknown )
it_booking_supplement = VALUE #( ( booking_id = '1'
booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_id = '1'
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id_unknown ).
ENDMETHOD.
METHOD d_travel_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( )
is_travelx = VALUE #( )
it_booking_supplement = VALUE #( ( booking_id = '1' booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_id = '1' booking_supplement_id = '1' action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
ENDMETHOD.
METHOD c_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id_unknown
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id_unknown
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id_unknown ).
ENDMETHOD.
METHOD c_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_supplement_id = '1' action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD u_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id_unknown booking_supplement_id = '1' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id_unknown booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy22=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id_unknown ).
ENDMETHOD.
METHOD u_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_supplement_id = '1' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_supplement_id = '1' action_code = /dmo/if_flight_legacy22=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD d_booking_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id_unknown booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id_unknown booking_supplement_id = '1' action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id_unknown ).
ENDMETHOD.
METHOD d_booking_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_supplement_id = '1' ) )
it_booking_supplementx = VALUE #( ( booking_supplement_id = '1' action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
ENDMETHOD.
METHOD u_booking_suppl_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id booking_supplement_id = '10' price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id booking_supplement_id = '10' action_code = /dmo/if_flight_legacy22=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = '10' ).
ENDMETHOD.
METHOD u_booking_suppl_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id action_code = /dmo/if_flight_legacy22=>action_code-update price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
ENDMETHOD.
METHOD d_booking_suppl_id_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id booking_supplement_id = '10' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id booking_supplement_id = '10'
action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = '10' ).
ENDMETHOD.
METHOD d_booking_suppl_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
ENDMETHOD.
METHOD c_bsuppl_d_booking_1_luw.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create: Travel - Booking
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
DATA(ls_booking) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_true ).
" 2. LUW: Create Booking Supplement, Delete father Booking
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = ls_booking-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking-booking_id
booking_supplement_id = '11'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_false ).
_delete_existing_booking( iv_travel_id = ls_booking-travel_id iv_booking_id = ls_booking-booking_id ).
" Check that the Booking Supplement was not created
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @ls_booking_supplement-travel_id
AND booking_id = @ls_booking_supplement-booking_id
AND booking_supplement_id = @ls_booking_supplement-booking_supplement_id
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD c_bsuppl_d_travel_1_luw.
DATA lv_db_exists TYPE abap_bool.
" 1. LUW: Create: Travel - Booking
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
DATA(ls_booking) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '11'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_true ).
" 2. LUW: Create Booking Supplement, Delete father Travel
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = ls_booking-travel_id
is_booking_supplement = VALUE #( booking_id = ls_booking-booking_id
booking_supplement_id = '11'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_false ).
_delete_existing_travel( ls_travel-travel_id ).
" Check that the Booking Supplement was not created
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @ls_booking_supplement-travel_id
AND booking_id = @ls_booking_supplement-booking_id
AND booking_supplement_id = @ls_booking_supplement-booking_supplement_id
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD d_travel_c_bsuppl_1_luw.
" 1. LUW: Create: Travel - Booking
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
DATA(ls_booking) = _create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '10'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_true ).
" 2. LUW: Delete Travel, try to create Booking Supplement
gr_cut->delete_travel( EXPORTING iv_travel_id = ls_travel-travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking-travel_id )
is_travelx = VALUE #( travel_id = ls_booking-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking-booking_id
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking-booking_id
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
gr_cut->save( ).
ENDMETHOD.
METHOD d_booking_c_bsuppl_1_luw.
" Delete Booking, try to create Booking Supplement
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking = VALUE #( ( booking_id = mv_booking_id ) )
it_bookingx = VALUE #( ( booking_id = mv_booking_id action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '1'
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
ENDMETHOD.
METHOD du_single.
DATA lv_db_exists TYPE abap_bool.
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '22'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_true ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement-travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement-booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement-booking_supplement_id exp = '22' ).
" Check existence of Booking Supplement
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = '22' INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" Delete, Update Booking Supplement in the same LUW
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-update
price = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking_supplement-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = ls_booking_supplement-booking_supplement_id ).
gr_cut->save( ).
" Check that the Booking Supplement no longer exists
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @ls_booking_supplement-travel_id
AND booking_id = @ls_booking_supplement-booking_id
AND booking_supplement_id = @ls_booking_supplement-booking_supplement_id
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD dd_single.
CONSTANTS lc_booking_supplement_id TYPE /dmo/booking_supplement_id22 VALUE '34'.
DATA lv_db_exists TYPE abap_bool.
_create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_true ).
" Check existence of Booking Supplement
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = @lc_booking_supplement_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" Delete Booking Supplement twice in the same LUW
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = lc_booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->save( ).
" Check that the Booking Supplement no longer exists
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = @lc_booking_supplement_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_supplement_unknown.
DATA lv_db_exists TYPE abap_bool.
" Try to create 2 Booking Supplements, one of them is faulty
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '1'
supplement_id = gv_supplement_id_unknown
price = '10.0'
currency_code = 'EUR' )
( booking_id = mv_booking_id
booking_supplement_id = '2'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '1'
action_code = /dmo/if_flight_legacy22=>action_code-create )
( booking_id = mv_booking_id
booking_supplement_id = '2'
supplement_id = gs_supplement_1-supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_supplement_id exp = gv_supplement_id_unknown ).
gr_cut->save( ).
" Check that no Booking Supplement has been created
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
ENDMETHOD.
METHOD c_booking_suppl_id_initial.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '0'
supplement_id = gs_supplement_1-supplement_id
price = gs_supplement_1-price
currency_code = gs_supplement_1-currency_code ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '0'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_no_key-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
ENDMETHOD.
METHOD c_booking_suppl_id_exists.
_create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = gs_supplement_1-price
currency_code = gs_supplement_1-currency_code )
iv_save = abap_false ).
" Try to create a booking supplement that is already in the buffer
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = gs_supplement_1-price
currency_code = gs_supplement_1-currency_code ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '20'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_exists-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = '20' ).
gr_cut->save( ).
" Try to create a booking supplement that is already in the database
CLEAR lt_messages.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = gs_supplement_1-price
currency_code = gs_supplement_1-currency_code ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '20'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = lt_booking_supplement
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_exists-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = mv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = mv_booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = '20' ).
ENDMETHOD.
METHOD c_deep_insert.
CONSTANTS lc_booking_id_1 TYPE /dmo/booking_id22 VALUE '20'.
CONSTANTS lc_booking_id_2 TYPE /dmo/booking_id22 VALUE '21'.
CONSTANTS lc_booking_supplement_id_1_1 TYPE /dmo/booking_supplement_id22 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_1 TYPE /dmo/booking_supplement_id22 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_2 TYPE /dmo/booking_supplement_id22 VALUE '20'.
gr_cut->create_travel(
EXPORTING
is_travel = VALUE #( agency_id = gv_agency_id_1
customer_id = gv_customer_id_1
begin_date = '20190101'
end_date = '20190201'
description = 'My_Deep_Insert'
total_price = '999.99' "Derivated, so ignored
booking_fee = '10.00'
currency_code = 'EUR' )
it_booking = VALUE #( ( booking_id = lc_booking_id_1
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '100.00'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_date = gv_booking_date
customer_id = gv_customer_id_2
carrier_id = gs_flight_2-carrier_id
connection_id = gs_flight_2-connection_id
flight_date = gs_flight_2-flight_date
flight_price = '200.00'
currency_code = 'EUR' ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_2
supplement_id = gs_supplement_1-supplement_id
price = '30.0'
currency_code = 'USD' ) )
IMPORTING
es_travel = DATA(ls_travel)
et_booking = DATA(lt_booking)
et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking ) exp = 2 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 3 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 booking_supplement_id = lc_booking_supplement_id_1_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 booking_supplement_id = lc_booking_supplement_id_2_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 booking_supplement_id = lc_booking_supplement_id_2_2 ] ) ) ).
gr_cut->save( ).
" Check travel
DATA(lv_exchange_rate_date) = cl_abap_context_info=>get_system_date( ).
/dmo/cl_flight_amdp22=>convert_currency(
EXPORTING
iv_amount = '30.00'
iv_currency_code_source = 'USD'
iv_currency_code_target = 'EUR'
iv_exchange_rate_date = lv_exchange_rate_date
IMPORTING
ev_amount = data(lv_30_usd_as_eur)
).
cl_abap_unit_assert=>assert_not_initial( lv_30_usd_as_eur ).
DATA ls_travel_sel TYPE /dmo/travel22.
SELECT SINGLE agency_id, customer_id, total_price, currency_code, description FROM /dmo/travel22 WHERE travel_id = @ls_travel-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-agency_id exp = gv_agency_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-total_price exp = '10.00' + '100.00' + '200.00' + '10.00' + '20.00' + lv_30_usd_as_eur ) ##LITERAL.
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-currency_code exp = 'EUR' ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_Deep_Insert' ).
" Check booking count, Check one of the bookings
SELECT COUNT( * ) FROM /dmo/booking22 WHERE travel_id = @ls_travel-travel_id INTO @DATA(lv_count).
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 2 ).
DATA ls_booking_sel TYPE /dmo/booking22.
SELECT SINGLE customer_id, flight_date FROM /dmo/booking22 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_2
INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = gv_customer_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-flight_date exp = gs_flight_2-flight_date ).
" Check booking supplement count, Check one of the booking supplements
lv_count = 0.
SELECT COUNT( * ) FROM /dmo/book_sup_22 WHERE travel_id = @ls_travel-travel_id INTO @lv_count.
cl_abap_unit_assert=>assert_equals( act = lv_count exp = 3 ).
DATA ls_book_suppl_sel TYPE /dmo/book_sup_22.
SELECT SINGLE price, currency_code FROM /dmo/book_sup_22 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_2
AND booking_supplement_id = @lc_booking_supplement_id_2_1
INTO CORRESPONDING FIELDS OF @ls_book_suppl_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-price exp = '20.0' ).
cl_abap_unit_assert=>assert_equals( act = ls_book_suppl_sel-currency_code exp = 'EUR' ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD c_deep_insert_suppl_unknown.
" Prepare travel in buffer without save
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
" Now try to put a second travel with a faulty booking supplement into the buffer
CONSTANTS lc_booking_id_1 TYPE /dmo/booking_id22 VALUE '20'.
CONSTANTS lc_booking_id_2 TYPE /dmo/booking_id22 VALUE '21'.
CONSTANTS lc_booking_supplement_id_2_1 TYPE /dmo/booking_supplement_id22 VALUE '10'.
gr_cut->create_travel(
EXPORTING
is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' description = 'My_Deep_Insert_Fail' )
it_booking = VALUE #( ( booking_id = lc_booking_id_1
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
( booking_id = lc_booking_id_2
booking_date = gv_booking_date
customer_id = gv_customer_id_2
carrier_id = gs_flight_2-carrier_id
connection_id = gs_flight_2-connection_id
flight_date = gs_flight_2-flight_date ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
supplement_id = gv_supplement_id_unknown " <<< Unknown Supplement ID
price = '20.0'
currency_code = 'EUR' ) )
IMPORTING
es_travel = DATA(ls_travel_fail)
et_booking = DATA(lt_booking)
et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel_fail-travel_id ).
cl_abap_unit_assert=>assert_initial( lt_booking ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>supplement_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_supplement_id exp = gv_supplement_id_unknown ).
gr_cut->save( ).
" Delete the first travel, this would fail when first travel had not been created
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD u_single_travel_multiple.
DATA lv_db_exists TYPE abap_bool.
" Create and persis a travel with 1 booking and 3 booking supplements
CONSTANTS lc_booking_id_1 TYPE /dmo/booking_id22 VALUE '20'.
CONSTANTS lc_booking_supplement_id_1_1 TYPE /dmo/booking_supplement_id22 VALUE '10'.
CONSTANTS lc_booking_supplement_id_1_2 TYPE /dmo/booking_supplement_id22 VALUE '20'.
CONSTANTS lc_booking_supplement_id_1_3 TYPE /dmo/booking_supplement_id22 VALUE '30'.
gr_cut->create_travel(
EXPORTING
is_travel = VALUE #( agency_id = gv_agency_id_1
customer_id = gv_customer_id_1
begin_date = '20190101'
end_date = '20190201'
description = 'My_Deep_Insert_1' )
it_booking = VALUE #( ( booking_id = lc_booking_id_1
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date
flight_price = '100.00'
currency_code = 'EUR' ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_2
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_3
supplement_id = gs_supplement_1-supplement_id
price = '30.0'
currency_code = 'EUR' ) )
IMPORTING
es_travel = DATA(ls_travel)
et_booking = DATA(lt_booking)
et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 3 ).
DATA(ls_booking_supplement_1_1) = lt_booking_supplement[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 booking_supplement_id = lc_booking_supplement_id_1_1 ].
gr_cut->save( ).
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_2
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" Now do (and save) a complicated update:
" -- Change a travel attribute
" -- Change a booking attribute
" -- Change a booking supplement attribute
" -- Create a new booking
" -- Delete a Booking Supplement
" -- Create a Booking Supplement for an existing Booking
" -- Create a new Booking Supplement for the new Booking
CONSTANTS lc_booking_id_2 TYPE /dmo/booking_id22 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_1 TYPE /dmo/booking_supplement_id22 VALUE '10'.
CONSTANTS lc_booking_supplement_id_1_4 TYPE /dmo/booking_supplement_id22 VALUE '40'.
CONSTANTS lc_diff TYPE /dmo/supplement_price22 VALUE '123.00'.
DATA(lv_new_price) = ls_booking_supplement_1_1-price + lc_diff.
gr_cut->update_travel(
EXPORTING
is_travel = VALUE #( travel_id = ls_travel-travel_id description = 'My_Deep_Insert_2' )
is_travelx = VALUE #( travel_id = ls_travel-travel_id description = abap_true )
it_booking = VALUE #( ( booking_id = lc_booking_id_1 customer_id = gv_customer_id_2 )
( booking_id = lc_booking_id_2
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_2-carrier_id
connection_id = gs_flight_2-connection_id
flight_date = gs_flight_2-flight_date
flight_price = '200.00'
currency_code = 'EUR' ) )
it_bookingx = VALUE #( ( booking_id = lc_booking_id_1 action_code = /dmo/if_flight_legacy22=>action_code-update customer_id = abap_true )
( booking_id = lc_booking_id_2 action_code = /dmo/if_flight_legacy22=>action_code-create ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
price = lv_new_price
currency_code = 'EUR' )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_2 )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_4
supplement_id = gs_supplement_2-supplement_id
price = '40.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
supplement_id = gs_supplement_2-supplement_id
price = '50.0'
currency_code = 'EUR' ) )
it_booking_supplementx = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
action_code = /dmo/if_flight_legacy22=>action_code-update
price = abap_true
currency_code = 'EUR' )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_2
action_code = /dmo/if_flight_legacy22=>action_code-delete )
( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_4
action_code = /dmo/if_flight_legacy22=>action_code-create )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING
es_travel = DATA(ls_travel_aft_update)
et_booking = DATA(lt_booking_aft_update)
et_booking_supplement = DATA(lt_booking_suppl_aft_update)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_aft_update-travel_id exp = ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_aft_update ) exp = 2 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 ] ) ) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_suppl_aft_update ) exp = 3 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_suppl_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 booking_supplement_id = lc_booking_supplement_id_1_1 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_suppl_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_1 booking_supplement_id = lc_booking_supplement_id_1_4 ] ) ) ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_suppl_aft_update[ travel_id = ls_travel-travel_id booking_id = lc_booking_id_2 booking_supplement_id = lc_booking_supplement_id_2_1 ] ) ) ).
gr_cut->save( ).
" Check Travel
DATA ls_travel_sel TYPE /dmo/travel22.
SELECT SINGLE total_price, currency_code, description FROM /dmo/travel22 WHERE travel_id = @ls_travel-travel_id INTO CORRESPONDING FIELDS OF @ls_travel_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-total_price exp = '100.00' + '200.00' + lv_new_price + '30.00' + '40.00' + '50.00' ) ##LITERAL.
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-currency_code exp = 'EUR' ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_sel-description exp = 'My_Deep_Insert_2' ).
" Check Booking(s)
" -- Updated Booking
DATA ls_booking_sel TYPE /dmo/booking22.
SELECT SINGLE booking_date, customer_id FROM /dmo/booking22 WHERE travel_id = @ls_travel-travel_id AND booking_id = @lc_booking_id_1 INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-booking_date exp = gv_booking_date ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = gv_customer_id_2 ).
" -- New Booking
CLEAR ls_booking_sel.
SELECT SINGLE customer_id, flight_date FROM /dmo/booking22 WHERE travel_id = @ls_travel-travel_id AND booking_id = @lc_booking_id_2 INTO CORRESPONDING FIELDS OF @ls_booking_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_sel-flight_date exp = gs_flight_2-flight_date ).
" Check Booking Supplement(s)
" -- Updated Booking Supplement
DATA ls_booking_supplement_sel TYPE /dmo/book_sup_22.
SELECT SINGLE supplement_id, price FROM /dmo/book_sup_22 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_1
INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-supplement_id exp = gs_supplement_1-supplement_id ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-price exp = lv_new_price ).
" -- Deleted Booking Supplement
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_2
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_false( lv_db_exists ).
" -- Unchanged Booking Supplement
CLEAR lv_db_exists.
SELECT SINGLE FROM /dmo/book_sup_22 FIELDS @abap_true WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_3
INTO @lv_db_exists.
cl_abap_unit_assert=>assert_true( lv_db_exists ).
" -- Created Booking Supplement for the existing Booking
CLEAR ls_booking_supplement_sel.
SELECT SINGLE supplement_id FROM /dmo/book_sup_22 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_1
AND booking_supplement_id = @lc_booking_supplement_id_1_4
INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-supplement_id exp = gs_supplement_2-supplement_id ).
" -- Created Booking Supplement for the new Booking
CLEAR ls_booking_supplement_sel.
SELECT SINGLE supplement_id FROM /dmo/book_sup_22 WHERE travel_id = @ls_travel-travel_id
AND booking_id = @lc_booking_id_2
AND booking_supplement_id = @lc_booking_supplement_id_2_1
INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-supplement_id exp = gs_supplement_2-supplement_id ).
_delete_existing_travel( ls_travel-travel_id ).
ENDMETHOD.
METHOD read_db.
DATA(ls_travel) = _create_travel( is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' )
iv_save = abap_false ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
" Create 2 bookings for the new travel
_create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '20'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
_create_booking( iv_travel_id = ls_travel-travel_id
is_booking = VALUE #( booking_id = '21'
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
iv_save = abap_false ).
" Create a single booking supplement for the first booking
_create_booking_suppl( iv_travel_id = ls_travel-travel_id
is_booking_supplement = VALUE #( booking_id = '20'
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_false ).
" Create 2 booking supplements for the second booking
_create_booking_suppl( iv_travel_id = ls_travel-travel_id
is_booking_supplement = VALUE #( booking_id = '21'
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
iv_save = abap_false ).
_create_booking_suppl( iv_travel_id = ls_travel-travel_id
is_booking_supplement = VALUE #( booking_id = '21'
booking_supplement_id = '20'
supplement_id = gs_supplement_2-supplement_id
price = '30.0'
currency_code = 'EUR' )
iv_save = abap_true )." <<< Finally write to DB
gr_cut->get_travel( EXPORTING iv_travel_id = ls_travel-travel_id
iv_include_buffer = abap_true
IMPORTING es_travel = DATA(ls_travel_read)
et_booking = DATA(lt_booking_read)
et_booking_supplement = DATA(lt_booking_supplement_read)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_read-travel_id exp = ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_read-agency_id exp = ls_travel-agency_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_read ) exp = 2 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement_read ) exp = 3 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement_read[ travel_id = ls_travel-travel_id booking_id = '21' booking_supplement_id = '20' ] ) ) ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement_read[ travel_id = ls_travel-travel_id booking_id = '21' booking_supplement_id = '20' ]-supplement_id exp = gs_supplement_2-supplement_id ).
_delete_existing_travel( ls_travel-travel_id ).
gr_cut->get_travel( EXPORTING iv_travel_id = ls_travel-travel_id
iv_include_buffer = abap_true
IMPORTING es_travel = ls_travel_read
et_booking = lt_booking_read
et_booking_supplement = lt_booking_supplement_read
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( ls_travel_read ).
cl_abap_unit_assert=>assert_initial( lt_booking_read ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement_read ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_travel-travel_id ).
ENDMETHOD.
METHOD read_buffer.
CONSTANTS lc_booking_id_1 TYPE /dmo/booking_id22 VALUE '20'.
CONSTANTS lc_booking_id_2 TYPE /dmo/booking_id22 VALUE '21'.
CONSTANTS lc_booking_supplement_id_1_1 TYPE /dmo/booking_supplement_id22 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_1 TYPE /dmo/booking_supplement_id22 VALUE '10'.
CONSTANTS lc_booking_supplement_id_2_2 TYPE /dmo/booking_supplement_id22 VALUE '20'.
gr_cut->create_travel(
EXPORTING
is_travel = VALUE #( agency_id = gv_agency_id_1 customer_id = gv_customer_id_1 begin_date = '20190101' end_date = '20190201' description = 'My_Deep_Insert' )
it_booking = VALUE #( ( booking_id = lc_booking_id_1
booking_date = gv_booking_date
customer_id = gv_customer_id_1
carrier_id = gs_flight_1-carrier_id
connection_id = gs_flight_1-connection_id
flight_date = gs_flight_1-flight_date )
( booking_id = lc_booking_id_2
booking_date = gv_booking_date
customer_id = gv_customer_id_2
carrier_id = gs_flight_2-carrier_id
connection_id = gs_flight_2-connection_id
flight_date = gs_flight_2-flight_date ) )
it_booking_supplement = VALUE #( ( booking_id = lc_booking_id_1
booking_supplement_id = lc_booking_supplement_id_1_1
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_1
supplement_id = gs_supplement_1-supplement_id
price = '20.0'
currency_code = 'EUR' )
( booking_id = lc_booking_id_2
booking_supplement_id = lc_booking_supplement_id_2_2
supplement_id = gs_supplement_2-supplement_id
price = '30.0'
currency_code = 'EUR' ) )
IMPORTING
es_travel = DATA(ls_travel)
et_booking = DATA(lt_booking)
et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_not_initial( ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking ) exp = 2 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 3 ).
" Now delete the first booking from the buffer
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_travel-travel_id )
is_travelx = VALUE #( travel_id = ls_travel-travel_id )
it_booking = VALUE #( ( booking_id = lc_booking_id_1 ) )
it_bookingx = VALUE #( ( booking_id = lc_booking_id_1 action_code = /dmo/if_flight_legacy22=>action_code-delete ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
gr_cut->get_travel( EXPORTING iv_travel_id = ls_travel-travel_id
iv_include_buffer = abap_true
IMPORTING es_travel = DATA(ls_travel_read)
et_booking = DATA(lt_booking_read)
et_booking_supplement = DATA(lt_booking_supplement_read)
et_messages = lt_messages ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_read-travel_id exp = ls_travel-travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel_read-agency_id exp = ls_travel-agency_id ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_read ) exp = 1 ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement_read ) exp = 2 ).
cl_abap_unit_assert=>assert_true( xsdbool( line_exists( lt_booking_supplement_read[ travel_id = ls_travel-travel_id booking_id = '21' booking_supplement_id = '20' ] ) ) ).
cl_abap_unit_assert=>assert_equals( act = lt_booking_supplement_read[ travel_id = ls_travel-travel_id booking_id = '21' booking_supplement_id = '20' ]-supplement_id exp = gs_supplement_2-supplement_id ).
gr_cut->initialize( ).
ENDMETHOD.
METHOD read_travel_id_initial.
gr_cut->get_travel( EXPORTING iv_travel_id = '0'
iv_include_buffer = abap_true
IMPORTING es_travel = DATA(ls_travel_read)
et_booking = DATA(lt_booking_read)
et_booking_supplement = DATA(lt_booking_supplement_read)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( ls_travel_read ).
cl_abap_unit_assert=>assert_initial( lt_booking_read ).
cl_abap_unit_assert=>assert_initial( lt_booking_supplement_read ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>travel_no_key-msgno ).
ENDMETHOD.
METHOD u_supplement_id.
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '10.0'
currency_code = 'EUR' )
iv_save = abap_true ).
" Pretend to change the supplement ID (provide the same value)
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
supplement_id = gs_supplement_1-supplement_id ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-update
supplement_id = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
" Try to update the Booking Supplement with an unknown supplement ID
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
supplement_id = gs_supplement_2-supplement_id
price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-update
supplement_id = abap_true
price = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_suppl_id_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking_supplement-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = ls_booking_supplement-booking_supplement_id ).
gr_cut->save( ).
" Check that nothing has changed
SELECT SINGLE supplement_id, price FROM /dmo/book_sup_22 WHERE travel_id = @ls_booking_supplement-travel_id
AND booking_id = @ls_booking_supplement-booking_id
AND booking_supplement_id = @ls_booking_supplement-booking_supplement_id
INTO ( @DATA(lv_supplement_id), @DATA(lv_price) ).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_supplement_id exp = gs_supplement_1-supplement_id ).
cl_abap_unit_assert=>assert_equals( act = lv_price exp = '10' ).
ENDMETHOD.
METHOD c_price_currency.
" Do not provide price and currency
_create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id )
iv_save = abap_false ).
" Provide price and currency
CONSTANTS lc_diff TYPE /dmo/supplement_price22 VALUE '9.99'.
DATA lv_price TYPE /dmo/supplement_price22.
DATA lv_currency_code TYPE /dmo/currency_code22.
lv_price = gs_supplement_1-price + lc_diff.
lv_currency_code = SWITCH #( gs_supplement_1-currency_code WHEN 'USD' THEN 'EUR' ELSE 'USD' ).
_create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '20'
supplement_id = gs_supplement_1-supplement_id
price = lv_price
currency_code = lv_currency_code )
iv_save = abap_true ).
DATA ls_booking_supplement_sel TYPE /dmo/book_sup_22.
SELECT SINGLE price, currency_code FROM /dmo/book_sup_22 WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = '10' INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-price exp = gs_supplement_1-price ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-currency_code exp = gs_supplement_1-currency_code ).
CLEAR ls_booking_supplement_sel.
SELECT SINGLE price, currency_code FROM /dmo/book_sup_22 WHERE travel_id = @mv_travel_id AND booking_id = @mv_booking_id AND booking_supplement_id = '20' INTO CORRESPONDING FIELDS OF @ls_booking_supplement_sel.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-price exp = lv_price ).
cl_abap_unit_assert=>assert_equals( act = ls_booking_supplement_sel-currency_code exp = lv_currency_code ).
ENDMETHOD.
METHOD u_price_currency.
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id )
iv_save = abap_true ).
" Try to change only the price
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
price = '11.0' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-update
price = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_pri_curr_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking_supplement-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = ls_booking_supplement-booking_supplement_id ).
" Try to change only the currency
CLEAR lt_messages.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
currency_code = 'XXX' ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-update
currency_code = abap_true ) )
IMPORTING et_messages = lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>booking_supplement_pri_curr_u-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_TRAVEL_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr2 exp = 'MV_BOOKING_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr3 exp = 'MV_BOOKING_SUPPLEMENT_ID' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_travel_id exp = ls_booking_supplement-travel_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_id exp = ls_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_booking_supplement_id exp = ls_booking_supplement-booking_supplement_id ).
ENDMETHOD.
METHOD c_currency_code_unknown.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = mv_travel_id )
is_travelx = VALUE #( travel_id = mv_travel_id )
it_booking_supplement = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id
price = '9.99'
currency_code = gv_currency_code_unknown ) )
it_booking_supplementx = VALUE #( ( booking_id = mv_booking_id
booking_supplement_id = '10'
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>currency_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CURRENCY_CODE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_currency_code exp = gv_currency_code_unknown ).
ENDMETHOD.
METHOD u_currency_code_unknown.
DATA(ls_booking_supplement) = _create_booking_suppl( iv_travel_id = mv_travel_id
is_booking_supplement = VALUE #( booking_id = mv_booking_id
booking_supplement_id = '10'
supplement_id = gs_supplement_1-supplement_id )
iv_save = abap_true ).
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = ls_booking_supplement-travel_id )
is_travelx = VALUE #( travel_id = ls_booking_supplement-travel_id )
it_booking_supplement = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
price = '9.99'
currency_code = gv_currency_code_unknown ) )
it_booking_supplementx = VALUE #( ( booking_id = ls_booking_supplement-booking_id
booking_supplement_id = ls_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-update
price = abap_true
currency_code = abap_true ) )
IMPORTING et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_messages ) exp = 1 ).
cl_abap_unit_assert=>assert_true( xsdbool( lt_messages[ 1 ] IS INSTANCE OF /dmo/cx_flight_legacy22 ) ).
DATA lx TYPE REF TO /dmo/cx_flight_legacy22.
lx ?= lt_messages[ 1 ].
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgid exp = mc_msgid ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-msgno exp = /dmo/cx_flight_legacy22=>currency_unknown-msgno ).
cl_abap_unit_assert=>assert_equals( act = lx->if_t100_message~t100key-attr1 exp = 'MV_CURRENCY_CODE' ).
cl_abap_unit_assert=>assert_equals( act = lx->mv_currency_code exp = gv_currency_code_unknown ).
ENDMETHOD.
METHOD _create_booking_suppl.
gr_cut->update_travel( EXPORTING is_travel = VALUE #( travel_id = iv_travel_id )
is_travelx = VALUE #( travel_id = iv_travel_id )
it_booking_supplement = VALUE #( ( is_booking_supplement ) )
it_booking_supplementx = VALUE #( ( booking_id = is_booking_supplement-booking_id
booking_supplement_id = is_booking_supplement-booking_supplement_id
action_code = /dmo/if_flight_legacy22=>action_code-create ) )
IMPORTING et_booking_supplement = DATA(lt_booking_supplement)
et_messages = DATA(lt_messages) ).
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = lines( lt_booking_supplement ) exp = 1 ).
rs_booking_supplement = lt_booking_supplement[ 1 ].
cl_abap_unit_assert=>assert_equals( act = rs_booking_supplement-travel_id exp = iv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = rs_booking_supplement-booking_id exp = is_booking_supplement-booking_id ).
cl_abap_unit_assert=>assert_equals( act = rs_booking_supplement-booking_supplement_id exp = is_booking_supplement-booking_supplement_id ).
IF iv_save = abap_true.
gr_cut->save( ).
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
83,
565,
62,
5354,
62,
35927,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
198,
31631,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
1828,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
83,
565,
62,
5354,
62,
35927,
13,
198,
198,
31631,
300,
83,
565,
62,
5354,
62,
35927,
5550,
20032,
17941,
25261,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1392,
62,
5354,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
10619,
31631,
13,
628,
198,
31631,
300,
83,
565,
62,
5354,
62,
35927,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1392,
62,
5354,
22492,
12161,
1961,
1961,
13,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
628,
198,
31631,
300,
23047,
62,
35927,
5550,
20032,
17941,
7473,
43001,
2751,
360,
4261,
6234,
6006,
9863,
45698,
42,
49277,
43638,
5805,
7597,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
36650,
62,
1904,
62,
25410,
62,
67,
280,
7689,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
26173,
8924,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
36650,
62,
19662,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
827,
19662,
312,
220,
220,
26173,
8924,
31051,
35,
11770,
14,
24187,
62,
3697,
9947,
62,
2538,
62,
1828,
4458,
198,
198,
9,
16363,
21938,
3058,
407,
1695,
287,
6279,
2858,
198,
9,
220,
220,
42715,
12,
26947,
285,
81,
62,
9288,
62,
38986,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
418,
13976,
62,
9288,
62,
38986,
13,
628,
220,
220,
220,
42715,
12,
26947,
1036,
62,
8968,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
1828,
13,
628,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
40955,
62,
312,
62,
16,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
40955,
62,
312,
1828,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
40955,
62,
312,
62,
17,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
40955,
62,
312,
1828,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
40955,
62,
312,
62,
34680,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
40955,
62,
312,
1828,
13,
628,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
23144,
263,
62,
312,
62,
16,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23144,
263,
62,
312,
1828,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
23144,
263,
62,
312,
62,
17,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23144,
263,
62,
312,
1828,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
23144,
263,
62,
312,
62,
34680,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23144,
263,
62,
312,
1828,
13,
628,
220,
220,
220,
337,
36252,
50,
4808,
17953,
62,
35927,
30023,
9863,
2751,
318,
62,
35927,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
361,
62,
22560,
62,
1455,
1590,
1828,
14804,
912,
62,
35927,
62,
259,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
21928,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
3808,
62,
35927,
8,
41876,
1220,
67,
5908,
14,
35927,
1828,
13,
198,
220,
220,
220,
337,
36252,
50,
4808,
33678,
62,
25687,
62,
35927,
30023,
9863,
2751,
21628,
62,
35927,
62,
312,
41876,
1220,
67,
5908,
14,
35927,
62,
312,
1828,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
35927,
62,
9127,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
2070,
278,
62,
9127,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
2070,
278,
62,
18608,
1732,
62,
9127,
41876,
1312,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
1398,
62,
40406,
13,
198,
220,
220,
220,
337,
36252,
50,
9058,
13,
198,
220,
220,
220,
337,
36252,
50,
573,
446,
593,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
1398,
62,
660,
446,
593,
13,
628,
220,
220,
220,
366,
0,
13610,
290,
2198,
257,
2060,
3067,
198,
220,
220,
220,
337,
36252,
50,
2251,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
366,
0,
9993,
284,
2251,
257,
3067,
351,
281,
6439,
4086,
4613,
33854,
198,
220,
220,
220,
337,
36252,
50,
269,
62,
40955,
62,
34680,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
366,
0,
9993,
284,
2251,
257,
3067,
351,
281,
6439,
6491,
4613,
33854,
198,
220,
220,
220,
337,
36252,
50,
269,
62,
23144,
263,
62,
34680,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_oo_class DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_oo_base
CREATE PUBLIC .
PUBLIC SECTION.
METHODS zif_abapgit_oo_object_fnc~create
REDEFINITION .
METHODS zif_abapgit_oo_object_fnc~create_sotr
REDEFINITION .
METHODS zif_abapgit_oo_object_fnc~delete
REDEFINITION .
METHODS zif_abapgit_oo_object_fnc~generate_locals
REDEFINITION .
METHODS zif_abapgit_oo_object_fnc~get_class_properties
REDEFINITION .
METHODS zif_abapgit_oo_object_fnc~get_includes
REDEFINITION .
METHODS zif_abapgit_oo_object_fnc~insert_text_pool
REDEFINITION .
METHODS zif_abapgit_oo_object_fnc~read_sotr
REDEFINITION .
METHODS zif_abapgit_oo_object_fnc~read_text_pool
REDEFINITION .
METHODS zif_abapgit_oo_object_fnc~deserialize_source
REDEFINITION .
PROTECTED SECTION.
TYPES: ty_char1 TYPE c LENGTH 1,
ty_char2 TYPE c LENGTH 2.
PRIVATE SECTION.
CLASS-METHODS update_source_index
IMPORTING
!iv_clsname TYPE csequence
!io_scanner TYPE REF TO cl_oo_source_scanner_class .
CLASS-METHODS update_report
IMPORTING
!iv_program TYPE programm
!it_source TYPE string_table
RETURNING
VALUE(rv_updated) TYPE abap_bool
RAISING
zcx_abapgit_exception .
CLASS-METHODS generate_classpool
IMPORTING
!iv_name TYPE seoclsname
RAISING
zcx_abapgit_exception .
CLASS-METHODS update_meta
IMPORTING
!iv_name TYPE seoclsname
!iv_exposure TYPE seoexpose
!it_source TYPE rswsourcet
RAISING
zcx_abapgit_exception .
CLASS-METHODS determine_method_include
IMPORTING
!iv_name TYPE seoclsname
!iv_method TYPE seocpdname
RETURNING
VALUE(rv_program) TYPE programm
RAISING
zcx_abapgit_exception .
CLASS-METHODS init_scanner
IMPORTING
!it_source TYPE zif_abapgit_definitions=>ty_string_tt
!iv_name TYPE seoclsname
RETURNING
VALUE(ro_scanner) TYPE REF TO cl_oo_source_scanner_class
RAISING
zcx_abapgit_exception .
CLASS-METHODS update_full_class_include
IMPORTING
!iv_classname TYPE seoclsname
!it_source TYPE string_table
!it_methods TYPE cl_oo_source_scanner_class=>type_method_implementations .
CLASS-METHODS create_report
IMPORTING
!iv_program TYPE programm
!it_source TYPE string_table
!iv_extension TYPE ty_char2
!iv_program_type TYPE ty_char1
!iv_version TYPE r3state .
CLASS-METHODS update_cs_number_of_methods
IMPORTING
!iv_classname TYPE seoclsname
!iv_number_of_impl_methods TYPE i .
ENDCLASS.
CLASS zcl_abapgit_oo_class IMPLEMENTATION.
METHOD create_report.
INSERT REPORT iv_program FROM it_source EXTENSION TYPE iv_extension STATE iv_version PROGRAM TYPE iv_program_type.
ASSERT sy-subrc = 0.
ENDMETHOD.
METHOD determine_method_include.
DATA: ls_mtdkey TYPE seocpdkey.
ls_mtdkey-clsname = iv_name.
ls_mtdkey-cpdname = iv_method.
cl_oo_classname_service=>get_method_include(
EXPORTING
mtdkey = ls_mtdkey
RECEIVING
result = rv_program
EXCEPTIONS
method_not_existing = 1 ).
IF sy-subrc = 0.
RETURN.
ENDIF.
CALL FUNCTION 'SEO_METHOD_GENERATE_INCLUDE'
EXPORTING
suppress_mtdkey_check = abap_true
mtdkey = ls_mtdkey
EXCEPTIONS
not_existing = 1
model_only = 2
include_existing = 3
method_imp_not_generated = 4
method_imp_not_initialised = 5
_internal_class_not_existing = 6
_internal_method_overflow = 7
cancelled = 8
method_is_abstract_implemented = 9
method_is_final_implemented = 10
internal_error_insert_report = 11
OTHERS = 12.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error from SEO_METHOD_GENERATE_INCLUDE. Subrc = { sy-subrc }| ).
ENDIF.
rv_program = cl_oo_classname_service=>get_method_include( ls_mtdkey ).
ENDMETHOD.
METHOD generate_classpool.
DATA: ls_clskey TYPE seoclskey.
ls_clskey-clsname = iv_name.
CALL FUNCTION 'SEO_CLASS_GENERATE_CLASSPOOL'
EXPORTING
clskey = ls_clskey
suppress_corr = abap_true
EXCEPTIONS
not_existing = 1
model_only = 2
class_pool_not_generated = 3
class_stment_not_generated = 4
locals_not_generated = 5
macros_not_generated = 6
public_sec_not_generated = 7
protected_sec_not_generated = 8
private_sec_not_generated = 9
typeref_not_generated = 10
class_pool_not_initialised = 11
class_stment_not_initialised = 12
locals_not_initialised = 13
macros_not_initialised = 14
public_sec_not_initialised = 15
protected_sec_not_initialised = 16
private_sec_not_initialised = 17
typeref_not_initialised = 18
_internal_class_overflow = 19
OTHERS = 20.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error from SEO_CLASS_GENERATE_CLASSPOOL. Subrc = { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD init_scanner.
DATA: lx_exc TYPE REF TO cx_root,
lv_message TYPE string.
TRY.
ro_scanner = cl_oo_source_scanner_class=>create_class_scanner(
clif_name = iv_name
source = it_source ).
ro_scanner->scan( ).
CATCH cx_clif_scan_error.
zcx_abapgit_exception=>raise( 'error initializing CLAS scanner' ).
CATCH cx_root INTO lx_exc.
lv_message = lx_exc->get_text( ).
zcx_abapgit_exception=>raise( lv_message ).
ENDTRY.
ENDMETHOD.
METHOD update_cs_number_of_methods.
" Indirect access to keep downward compatibility
DATA lr_cache_entry TYPE REF TO data.
FIELD-SYMBOLS: <lg_cache_entry> TYPE any,
<lg_field> TYPE any.
TRY.
CREATE DATA lr_cache_entry TYPE ('SEO_CS_CACHE').
CATCH cx_sy_create_data_error.
* does not exist in some older systems
RETURN.
ENDTRY.
ASSIGN lr_cache_entry->* TO <lg_cache_entry>.
ASSERT sy-subrc = 0.
ASSIGN COMPONENT 'CLSNAME' OF STRUCTURE <lg_cache_entry>
TO <lg_field>.
ASSERT sy-subrc = 0.
<lg_field> = iv_classname.
ASSIGN COMPONENT 'NO_OF_METHOD_IMPLS' OF STRUCTURE <lg_cache_entry>
TO <lg_field>.
ASSERT sy-subrc = 0.
<lg_field> = iv_number_of_impl_methods.
MODIFY ('SEO_CS_CACHE') FROM <lg_cache_entry>.
ENDMETHOD.
METHOD update_full_class_include.
CONSTANTS: lc_class_source_extension TYPE c LENGTH 2 VALUE 'CS',
lc_include_program_type TYPE c LENGTH 1 VALUE 'I',
lc_active_version TYPE r3state VALUE 'A'.
create_report( iv_program = cl_oo_classname_service=>get_cs_name( iv_classname )
it_source = it_source
iv_extension = lc_class_source_extension
iv_program_type = lc_include_program_type
iv_version = lc_active_version ).
" Assuming that all methods that were scanned are implemented
update_cs_number_of_methods( iv_classname = iv_classname
iv_number_of_impl_methods = lines( it_methods ) ).
ENDMETHOD.
METHOD update_meta.
DATA: lo_update TYPE REF TO cl_oo_class_section_source,
ls_clskey TYPE seoclskey,
lv_scan_error TYPE abap_bool.
ls_clskey-clsname = iv_name.
TRY.
CALL FUNCTION 'SEO_BUFFER_REFRESH'
EXPORTING
cifkey = ls_clskey
version = seoc_version_active.
CREATE OBJECT lo_update TYPE ('CL_OO_CLASS_SECTION_SOURCE')
EXPORTING
clskey = ls_clskey
exposure = iv_exposure
state = 'A'
source = it_source
suppress_constrctr_generation = abap_true
EXCEPTIONS
class_not_existing = 1
read_source_error = 2
OTHERS = 3 ##SUBRC_OK.
CATCH cx_sy_dyn_call_param_not_found.
* downport to 702, see https://github.com/larshp/abapGit/issues/933
* this will READ REPORT instead of using it_source, which should be okay
CREATE OBJECT lo_update TYPE cl_oo_class_section_source
EXPORTING
clskey = ls_clskey
exposure = iv_exposure
state = 'A'
EXCEPTIONS
class_not_existing = 1
read_source_error = 2
OTHERS = 3.
ENDTRY.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error instantiating CL_OO_CLASS_SECTION_SOURCE. Subrc = { sy-subrc }| ).
ENDIF.
lo_update->set_dark_mode( abap_true ).
TRY.
CALL METHOD lo_update->('SET_AMDP_SUPPORT')
EXPORTING
enabled = abap_true.
CATCH cx_sy_dyn_call_illegal_method ##NO_HANDLER.
* AMDP not supported in this system, ignore error
ENDTRY.
lo_update->scan_section_source(
RECEIVING
scan_error = lv_scan_error
EXCEPTIONS
scan_abap_source_error = 1
OTHERS = 2 ).
IF sy-subrc <> 0 OR lv_scan_error = abap_true.
zcx_abapgit_exception=>raise( |CLAS, error while scanning source. Subrc = { sy-subrc }| ).
ENDIF.
* this will update the SEO* database tables
lo_update->revert_scan_result( ).
IF iv_exposure = seoc_exposure_public.
generate_classpool( iv_name ).
ENDIF.
ENDMETHOD.
METHOD update_report.
DATA: lt_old TYPE string_table.
READ REPORT iv_program INTO lt_old.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Fatal error. Include { iv_program } should have been created previously!| ).
ENDIF.
IF lt_old <> it_source.
INSERT REPORT iv_program FROM it_source.
ASSERT sy-subrc = 0.
rv_updated = abap_true.
ELSE.
rv_updated = abap_false.
ENDIF.
ENDMETHOD.
METHOD update_source_index.
CONSTANTS:
lc_version_active TYPE r3state VALUE 'A', "#EC NOTEXT
lc_version_inactive TYPE r3state VALUE 'I'. "#EC NOTEXT
" dynamic invocation, IF_OO_SOURCE_POS_INDEX_HELPER doesn't exist in 702.
DATA lo_index_helper TYPE REF TO object.
TRY.
CREATE OBJECT lo_index_helper TYPE ('CL_OO_SOURCE_POS_INDEX_HELPER').
CALL METHOD lo_index_helper->('IF_OO_SOURCE_POS_INDEX_HELPER~CREATE_INDEX_WITH_SCANNER')
EXPORTING
class_name = iv_clsname
version = lc_version_active
scanner = io_scanner.
CALL METHOD lo_index_helper->('IF_OO_SOURCE_POS_INDEX_HELPER~DELETE_INDEX')
EXPORTING
class_name = iv_clsname
version = lc_version_inactive.
CATCH cx_root.
" it's probably okay to no update the index
RETURN.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~create.
DATA: lt_vseoattrib TYPE seoo_attributes_r.
FIELD-SYMBOLS: <lv_clsname> TYPE seoclsname.
* same as in super class, but with "version = seoc_version_active"
ASSIGN COMPONENT 'CLSNAME' OF STRUCTURE cg_properties TO <lv_clsname>.
ASSERT sy-subrc = 0.
lt_vseoattrib = convert_attrib_to_vseoattrib(
iv_clsname = <lv_clsname>
it_attributes = it_attributes ).
TRY.
CALL FUNCTION 'SEO_CLASS_CREATE_COMPLETE'
EXPORTING
devclass = iv_package
overwrite = iv_overwrite
version = seoc_version_active
suppress_dialog = abap_true " Parameter missing in 702
CHANGING
class = cg_properties
attributes = lt_vseoattrib
EXCEPTIONS
existing = 1
is_interface = 2
db_error = 3
component_error = 4
no_access = 5
other = 6
OTHERS = 7.
CATCH cx_sy_dyn_call_param_not_found.
CALL FUNCTION 'SEO_CLASS_CREATE_COMPLETE'
EXPORTING
devclass = iv_package
overwrite = iv_overwrite
version = seoc_version_active
CHANGING
class = cg_properties
attributes = lt_vseoattrib
EXCEPTIONS
existing = 1
is_interface = 2
db_error = 3
component_error = 4
no_access = 5
other = 6
OTHERS = 7.
ENDTRY.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error from SEO_CLASS_CREATE_COMPLETE. Subrc = { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~create_sotr.
DATA: lt_sotr TYPE zif_abapgit_definitions=>ty_sotr_tt,
lt_objects TYPE sotr_objects,
ls_paket TYPE sotr_pack,
lv_object LIKE LINE OF lt_objects.
FIELD-SYMBOLS: <ls_sotr> LIKE LINE OF lt_sotr.
LOOP AT it_sotr ASSIGNING <ls_sotr>.
CALL FUNCTION 'SOTR_OBJECT_GET_OBJECTS'
EXPORTING
object_vector = <ls_sotr>-header-objid_vec
IMPORTING
objects = lt_objects
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |error from SOTR_OBJECT_GET_OBJECTS. Subrc = { sy-subrc }| ).
ENDIF.
READ TABLE lt_objects INDEX 1 INTO lv_object.
ASSERT sy-subrc = 0.
ls_paket-paket = iv_package.
CALL FUNCTION 'SOTR_CREATE_CONCEPT'
EXPORTING
paket = ls_paket
crea_lan = <ls_sotr>-header-crea_lan
alias_name = <ls_sotr>-header-alias_name
object = lv_object
entries = <ls_sotr>-entries
concept_default = <ls_sotr>-header-concept
EXCEPTIONS
package_missing = 1
crea_lan_missing = 2
object_missing = 3
paket_does_not_exist = 4
alias_already_exist = 5
object_type_not_found = 6
langu_missing = 7
identical_context_not_allowed = 8
text_too_long = 9
error_in_update = 10
no_master_langu = 11
error_in_concept_id = 12
alias_not_allowed = 13
tadir_entry_creation_failed = 14
internal_error = 15
error_in_correction = 16
user_cancelled = 17
no_entry_found = 18
OTHERS = 19.
IF sy-subrc <> 0 AND sy-subrc <> 5.
zcx_abapgit_exception=>raise( |Error from SOTR_CREATE_CONCEPT. Subrc = { sy-subrc }| ).
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~delete.
CALL FUNCTION 'SEO_CLASS_DELETE_COMPLETE'
EXPORTING
clskey = is_deletion_key
EXCEPTIONS
not_existing = 1
is_interface = 2
db_error = 3
no_access = 4
other = 5
OTHERS = 6.
IF sy-subrc = 1.
* ignore deletion of objects that does not exist
* this can happen when the SXCI object is deleted before the implementing CLAS
RETURN.
ELSEIF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error from SEO_CLASS_DELETE_COMPLETE. Subrc = { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~deserialize_source.
DATA: lv_updated TYPE abap_bool,
lv_program TYPE program,
lo_scanner TYPE REF TO cl_oo_source_scanner_class,
lt_methods TYPE cl_oo_source_scanner_class=>type_method_implementations,
lv_method LIKE LINE OF lt_methods,
lt_public TYPE seop_source_string,
lt_source TYPE seop_source_string.
"Buffer needs to be refreshed,
"otherwise standard SAP CLIF_SOURCE reorder methods alphabetically
CALL FUNCTION 'SEO_BUFFER_INIT'.
CALL FUNCTION 'SEO_BUFFER_REFRESH'
EXPORTING
cifkey = is_key
version = seoc_version_inactive.
lo_scanner = init_scanner(
it_source = it_source
iv_name = is_key-clsname ).
* public
lt_public = lo_scanner->get_public_section_source( ).
IF lt_public IS NOT INITIAL.
lv_program = cl_oo_classname_service=>get_pubsec_name( is_key-clsname ).
lv_updated = update_report( iv_program = lv_program
it_source = lt_public ).
IF lv_updated = abap_true.
update_meta( iv_name = is_key-clsname
iv_exposure = seoc_exposure_public
it_source = lt_public ).
ENDIF.
ENDIF.
* protected
lt_source = lo_scanner->get_protected_section_source( ).
IF lt_source IS NOT INITIAL.
lv_program = cl_oo_classname_service=>get_prosec_name( is_key-clsname ).
lv_updated = update_report( iv_program = lv_program
it_source = lt_source ).
IF lv_updated = abap_true.
update_meta( iv_name = is_key-clsname
iv_exposure = seoc_exposure_protected
it_source = lt_source ).
ENDIF.
ENDIF.
* private
lt_source = lo_scanner->get_private_section_source( ).
IF lt_source IS NOT INITIAL.
lv_program = cl_oo_classname_service=>get_prisec_name( is_key-clsname ).
lv_updated = update_report( iv_program = lv_program
it_source = lt_source ).
IF lv_updated = abap_true.
update_meta( iv_name = is_key-clsname
iv_exposure = seoc_exposure_private
it_source = lt_source ).
ENDIF.
ENDIF.
* methods
lt_methods = lo_scanner->get_method_implementations( ).
LOOP AT lt_methods INTO lv_method.
TRY.
lt_source = lo_scanner->get_method_impl_source( lv_method ).
CATCH cx_oo_clif_component.
zcx_abapgit_exception=>raise( 'error from GET_METHOD_IMPL_SOURCE' ).
ENDTRY.
lv_program = determine_method_include(
iv_name = is_key-clsname
iv_method = lv_method ).
update_report(
iv_program = lv_program
it_source = lt_source ).
ENDLOOP.
* full class include
update_full_class_include( iv_classname = is_key-clsname
it_source = it_source
it_methods = lt_methods ).
update_source_index(
iv_clsname = is_key-clsname
io_scanner = lo_scanner ).
* TODO, perhaps move this call to somewhere else, to be done while cleaning up the CLAS deserialization
zcl_abapgit_objects_activation=>add(
iv_type = 'CLAS'
iv_name = is_key-clsname ).
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~generate_locals.
DATA: lv_program TYPE programm.
IF lines( it_local_definitions ) > 0.
lv_program = cl_oo_classname_service=>get_ccdef_name( is_key-clsname ).
update_report( iv_program = lv_program
it_source = it_local_definitions ).
ENDIF.
IF lines( it_local_implementations ) > 0.
lv_program = cl_oo_classname_service=>get_ccimp_name( is_key-clsname ).
update_report( iv_program = lv_program
it_source = it_local_implementations ).
ENDIF.
IF lines( it_local_macros ) > 0.
lv_program = cl_oo_classname_service=>get_ccmac_name( is_key-clsname ).
update_report( iv_program = lv_program
it_source = it_local_macros ).
ENDIF.
IF lines( it_local_test_classes ) > 0.
lv_program = cl_oo_classname_service=>get_ccau_name( is_key-clsname ).
update_report( iv_program = lv_program
it_source = it_local_test_classes ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~get_class_properties.
CALL FUNCTION 'SEO_CLIF_GET'
EXPORTING
cifkey = is_class_key
version = seoc_version_active
IMPORTING
class = rs_class_properties
EXCEPTIONS
not_existing = 1
deleted = 2
model_only = 3
OTHERS = 4.
IF sy-subrc = 1.
RETURN. " in case only inactive version exists
ELSEIF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error from SEO_CLIF_GET. Subrc = { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~get_includes.
* note: includes returned might not exist
* method cl_oo_classname_service=>GET_ALL_CLASS_INCLUDES does not exist in 702
DATA: lv_class_name TYPE seoclsname,
lt_methods TYPE seop_methods_w_include.
FIELD-SYMBOLS: <ls_method> LIKE LINE OF lt_methods.
lv_class_name = iv_object_name.
APPEND cl_oo_classname_service=>get_ccdef_name( lv_class_name ) TO rt_includes.
APPEND cl_oo_classname_service=>get_ccmac_name( lv_class_name ) TO rt_includes.
APPEND cl_oo_classname_service=>get_ccimp_name( lv_class_name ) TO rt_includes.
APPEND cl_oo_classname_service=>get_cl_name( lv_class_name ) TO rt_includes.
APPEND cl_oo_classname_service=>get_ccau_name( lv_class_name ) TO rt_includes.
APPEND cl_oo_classname_service=>get_pubsec_name( lv_class_name ) TO rt_includes.
APPEND cl_oo_classname_service=>get_prosec_name( lv_class_name ) TO rt_includes.
APPEND cl_oo_classname_service=>get_prisec_name( lv_class_name ) TO rt_includes.
APPEND cl_oo_classname_service=>get_classpool_name( lv_class_name ) TO rt_includes.
APPEND cl_oo_classname_service=>get_ct_name( lv_class_name ) TO rt_includes.
* skip the CS include, as it is sometimes generated on the fly instead of
* when the methods are changed
cl_oo_classname_service=>get_all_method_includes(
EXPORTING
clsname = lv_class_name
RECEIVING
result = lt_methods
EXCEPTIONS
class_not_existing = 1 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Class { lv_class_name } not existing| ).
ENDIF.
LOOP AT lt_methods ASSIGNING <ls_method>.
APPEND <ls_method>-incname TO rt_includes.
ENDLOOP.
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~insert_text_pool.
DATA: lv_cp TYPE program.
lv_cp = cl_oo_classname_service=>get_classpool_name( iv_class_name ).
INSERT TEXTPOOL lv_cp
FROM it_text_pool
LANGUAGE iv_language
STATE iv_state.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from INSERT TEXTPOOL' ).
ENDIF.
zcl_abapgit_objects_activation=>add( iv_type = 'REPT'
iv_name = lv_cp ).
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~read_sotr.
rt_sotr = zcl_abapgit_sotr_handler=>read_sotr_seocomp( iv_object_name ).
ENDMETHOD.
METHOD zif_abapgit_oo_object_fnc~read_text_pool.
DATA: lv_cp TYPE program.
lv_cp = cl_oo_classname_service=>get_classpool_name( iv_class_name ).
READ TEXTPOOL lv_cp INTO rt_text_pool LANGUAGE iv_language. "#EC CI_READ_REP
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
2238,
62,
4871,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
2238,
62,
8692,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
17953,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
17953,
62,
82,
313,
81,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
33678,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
8612,
378,
62,
17946,
874,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
1136,
62,
4871,
62,
48310,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
1136,
62,
42813,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
28463,
62,
5239,
62,
7742,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
961,
62,
82,
313,
81,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
961,
62,
5239,
62,
7742,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
397,
499,
18300,
62,
2238,
62,
15252,
62,
69,
10782,
93,
8906,
48499,
1096,
62,
10459,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
1259,
62,
10641,
16,
41876,
269,
406,
49494,
352,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
62,
10641,
17,
41876,
269,
406,
49494,
362,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
4296,
62,
10459,
62,
9630,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
565,
82,
3672,
41876,
269,
43167,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
35836,
1008,
41876,
4526,
37,
5390,
537,
62,
2238,
62,
10459,
62,
35836,
1008,
62,
4871,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
4296,
62,
13116,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
23065,
220,
220,
220,
220,
220,
220,
41876,
1430,
76,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
10459,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
62,
11487,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
43162,
8,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
7716,
62,
4871,
7742,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
3672,
41876,
384,
420,
7278,
3672,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
4296,
62,
28961,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
3672,
220,
220,
220,
220,
41876,
384,
420,
7278,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
1069,
26205,
41876,
384,
78,
1069,
3455,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
10459,
220,
220,
41876,
374,
2032,
82,
454,
66,
316,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
5004,
62,
24396,
62,
17256,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
384,
420,
7278,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
24396,
220,
220,
220,
220,
220,
220,
220,
41876,
384,
420,
30094,
3672,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
23065,
8,
41876,
1430,
76,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
2315,
62,
35836,
1008,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
10459,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
8841,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
**********************************************************************
* UTILS
**********************************************************************
class lcl_utils definition final.
public section.
class-methods normalize_path
importing
iv_path type string
returning
value(rv_path) type string.
class-methods split_path
importing
iv_path type string
returning
value(rv_path_name) type zif_ajson=>ty_path_name.
class-methods validate_array_index
importing
iv_path type string
iv_index type string
returning
value(rv_index) type i
raising
zcx_ajson_error.
endclass.
class lcl_utils implementation.
method validate_array_index.
if not iv_index co '0123456789'.
zcx_ajson_error=>raise( |Cannot add non-numeric key [{ iv_index }] to array [{ iv_path }]| ).
endif.
rv_index = iv_index.
if rv_index = 0.
zcx_ajson_error=>raise( |Cannot add zero key to array [{ iv_path }]| ).
endif.
endmethod.
method normalize_path.
rv_path = iv_path.
if strlen( rv_path ) = 0.
rv_path = '/'.
endif.
if rv_path+0(1) <> '/'.
rv_path = '/' && rv_path.
endif.
if substring( val = rv_path off = strlen( rv_path ) - 1 ) <> '/'.
rv_path = rv_path && '/'.
endif.
endmethod.
method split_path.
data lv_offs type i.
data lv_len type i.
data lv_trim_slash type i.
lv_len = strlen( iv_path ).
if lv_len = 0 or iv_path = '/'.
return. " empty path is the alias for root item = '' + ''
endif.
if substring( val = iv_path off = lv_len - 1 ) = '/'.
lv_trim_slash = 1. " ignore last '/'
endif.
lv_offs = find( val = reverse( iv_path ) sub = '/' off = lv_trim_slash ).
if lv_offs = -1.
lv_offs = lv_len. " treat whole string as the 'name' part
endif.
lv_offs = lv_len - lv_offs.
rv_path_name-path = normalize_path( substring( val = iv_path len = lv_offs ) ).
rv_path_name-name = substring( val = iv_path off = lv_offs len = lv_len - lv_offs - lv_trim_slash ).
endmethod.
endclass.
**********************************************************************
* PARSER
**********************************************************************
class lcl_json_parser definition final.
public section.
methods parse
importing
iv_json type string
returning
value(rt_json_tree) type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error.
private section.
types:
ty_stack_tt type standard table of ref to zif_ajson=>ty_node.
data mt_stack type ty_stack_tt.
class-methods join_path
importing
it_stack type ty_stack_tt
returning
value(rv_path) type string.
methods raise
importing
iv_error type string
raising
zcx_ajson_error.
methods _parse
importing
iv_json type string
returning
value(rt_json_tree) type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error cx_sxml_error.
methods _get_location
importing
iv_json type string
iv_offset type i
returning
value(rv_location) type string.
endclass.
class lcl_json_parser implementation.
method parse.
data lx_sxml_parse type ref to cx_sxml_parse_error.
data lx_sxml type ref to cx_sxml_error.
data lv_location type string.
try.
rt_json_tree = _parse( iv_json ).
catch cx_sxml_parse_error into lx_sxml_parse.
lv_location = _get_location(
iv_json = iv_json
iv_offset = lx_sxml_parse->xml_offset ).
zcx_ajson_error=>raise(
iv_msg = |Json parsing error (SXML): { lx_sxml_parse->get_text( ) }|
iv_location = lv_location ).
catch cx_sxml_error into lx_sxml.
zcx_ajson_error=>raise(
iv_msg = |Json parsing error (SXML): { lx_sxml->get_text( ) }|
iv_location = '@PARSER' ).
endtry.
endmethod.
method _get_location.
data lv_json type string.
data lv_offset type i.
data lt_text type table of string.
data lv_text type string.
data lv_line type i.
data lv_pos type i.
lv_offset = iv_offset.
if lv_offset < 0.
lv_offset = 0.
endif.
if lv_offset > strlen( iv_json ).
lv_offset = strlen( iv_json ).
endif.
lv_json = iv_json(lv_offset).
replace all occurrences of cl_abap_char_utilities=>cr_lf
in lv_json with cl_abap_char_utilities=>newline.
split lv_json at cl_abap_char_utilities=>newline into table lt_text.
lv_line = lines( lt_text ).
if lv_line = 0.
lv_line = 1.
lv_pos = 1.
else.
read table lt_text index lv_line into lv_text.
lv_pos = strlen( lv_text ) + 1.
endif.
rv_location = |Line { lv_line }, Offset { lv_pos }|.
endmethod.
method _parse.
data lo_reader type ref to if_sxml_reader.
data lr_stack_top like line of mt_stack.
data lo_node type ref to if_sxml_node.
field-symbols <item> like line of rt_json_tree.
clear mt_stack.
if iv_json is initial.
return.
endif.
lo_reader = cl_sxml_string_reader=>create( cl_abap_codepage=>convert_to( iv_json ) ).
" TODO: self protection, check non-empty, check starting from object ...
do.
lo_node = lo_reader->read_next_node( ).
if lo_node is not bound.
exit.
endif.
case lo_node->type.
when if_sxml_node=>co_nt_element_open.
data lt_attributes type if_sxml_attribute=>attributes.
data lo_attr like line of lt_attributes.
data lo_open type ref to if_sxml_open_element.
lo_open ?= lo_node.
append initial line to rt_json_tree assigning <item>.
<item>-type = to_lower( lo_open->qname-name ).
read table mt_stack index 1 into lr_stack_top.
if sy-subrc = 0.
<item>-path = join_path( mt_stack ).
lr_stack_top->children = lr_stack_top->children + 1.
if lr_stack_top->type = 'array'.
<item>-name = |{ lr_stack_top->children }|.
<item>-index = lr_stack_top->children.
else.
lt_attributes = lo_open->get_attributes( ).
loop at lt_attributes into lo_attr.
if lo_attr->qname-name = 'name' and lo_attr->value_type = if_sxml_value=>co_vt_text.
<item>-name = lo_attr->get_value( ).
endif.
endloop.
endif.
endif.
get reference of <item> into lr_stack_top.
insert lr_stack_top into mt_stack index 1.
when if_sxml_node=>co_nt_element_close.
data lo_close type ref to if_sxml_close_element.
lo_close ?= lo_node.
read table mt_stack index 1 into lr_stack_top.
delete mt_stack index 1.
if lo_close->qname-name <> lr_stack_top->type.
raise( 'Unexpected closing node type' ).
endif.
when if_sxml_node=>co_nt_value.
data lo_value type ref to if_sxml_value_node.
lo_value ?= lo_node.
<item>-value = lo_value->get_value( ).
when others.
raise( 'Unexpected node type' ).
endcase.
enddo.
if lines( mt_stack ) > 0.
raise( 'Unexpected end of data' ).
endif.
endmethod.
method join_path.
field-symbols <ref> like line of it_stack.
loop at it_stack assigning <ref>.
rv_path = <ref>->name && '/' && rv_path.
endloop.
endmethod.
method raise.
zcx_ajson_error=>raise(
iv_location = join_path( mt_stack )
iv_msg = |JSON PARSER: { iv_error } @ { join_path( mt_stack ) }| ).
endmethod.
endclass.
**********************************************************************
* SERIALIZER
**********************************************************************
class lcl_json_serializer definition final create private.
public section.
class-methods stringify
importing
it_json_tree type zif_ajson=>ty_nodes_ts
iv_indent type i default 0
iv_keep_item_order type abap_bool default abap_false
returning
value(rv_json_string) type string
raising
zcx_ajson_error.
class-methods class_constructor.
private section.
class-data gv_comma_with_lf type string.
data mt_json_tree type zif_ajson=>ty_nodes_ts.
data mv_keep_item_order type abap_bool.
data mt_buffer type string_table.
data mv_indent_step type i.
data mv_level type i.
class-methods escape
importing
iv_unescaped type string
returning
value(rv_escaped) type string.
methods _stringify
returning
value(rv_json_string) type string
raising
zcx_ajson_error.
methods stringify_node
importing
is_node type zif_ajson=>ty_node
raising
zcx_ajson_error.
methods stringify_set
importing
iv_parent_path type string
iv_array type abap_bool
raising
zcx_ajson_error.
endclass.
class lcl_json_serializer implementation.
method class_constructor.
gv_comma_with_lf = ',' && cl_abap_char_utilities=>newline.
endmethod.
method stringify.
data lo type ref to lcl_json_serializer.
create object lo.
lo->mt_json_tree = it_json_tree.
lo->mv_indent_step = iv_indent.
lo->mv_keep_item_order = iv_keep_item_order.
rv_json_string = lo->_stringify( ).
endmethod.
method _stringify.
field-symbols <n> like line of mt_json_tree.
read table mt_json_tree assigning <n>
with key
path = ''
name = ''. " Root
if sy-subrc <> 0.
return.
endif.
stringify_node( <n> ).
rv_json_string = concat_lines_of( table = mt_buffer ).
endmethod.
method stringify_node.
data lv_item type string.
data lv_indent_prefix type string.
if mv_indent_step > 0.
lv_indent_prefix = repeat( val = ` ` occ = mv_indent_step * mv_level ).
lv_item = lv_indent_prefix.
endif.
if is_node-name is not initial and is_node-index is initial. " Not root, not array item
if mv_indent_step > 0.
lv_item = lv_item && |"{ is_node-name }": |.
else.
lv_item = |"{ is_node-name }":|.
endif.
endif.
case is_node-type.
when zif_ajson=>node_type-array.
lv_item = lv_item && '['.
when zif_ajson=>node_type-object.
lv_item = lv_item && '{'.
when zif_ajson=>node_type-string.
lv_item = lv_item && |"{ escape( is_node-value ) }"|.
when zif_ajson=>node_type-boolean or zif_ajson=>node_type-number.
lv_item = lv_item && is_node-value.
when zif_ajson=>node_type-null.
lv_item = lv_item && 'null'.
when others.
zcx_ajson_error=>raise(
iv_msg = |Unexpected type [{ is_node-type }]|
iv_location = is_node-path && is_node-name ).
endcase.
if mv_indent_step > 0
and ( is_node-type = zif_ajson=>node_type-array or is_node-type = zif_ajson=>node_type-object )
and is_node-children > 0.
mv_level = mv_level + 1.
lv_item = lv_item && cl_abap_char_utilities=>newline.
endif.
append lv_item to mt_buffer.
" finish complex item
if is_node-type = zif_ajson=>node_type-array or is_node-type = zif_ajson=>node_type-object.
data lv_children_path type string.
data lv_tail type string.
lv_children_path = is_node-path && is_node-name && '/'. " for root: path = '' and name = '', so result is '/'
case is_node-type.
when zif_ajson=>node_type-array.
if is_node-children > 0.
stringify_set(
iv_parent_path = lv_children_path
iv_array = abap_true ).
endif.
lv_tail = ']'.
when zif_ajson=>node_type-object.
if is_node-children > 0.
stringify_set(
iv_parent_path = lv_children_path
iv_array = abap_false ).
endif.
lv_tail = '}'.
endcase.
if mv_indent_step > 0 and is_node-children > 0.
lv_tail = lv_indent_prefix && lv_tail.
mv_level = mv_level - 1.
endif.
append lv_tail to mt_buffer.
endif.
endmethod.
method stringify_set.
data lv_tab_key type string.
data lv_first_done type abap_bool.
field-symbols <n> like line of mt_json_tree.
if iv_array = abap_true.
lv_tab_key = 'array_index'. " path + index
elseif mv_keep_item_order = abap_true.
lv_tab_key = 'item_order'. " path + order
else.
lv_tab_key = 'primary_key'. " path + name
endif.
loop at mt_json_tree assigning <n> using key (lv_tab_key) where path = iv_parent_path.
if lv_first_done = abap_false.
lv_first_done = abap_true.
elseif mv_indent_step > 0.
append gv_comma_with_lf to mt_buffer.
else.
append ',' to mt_buffer.
endif.
stringify_node( <n> ).
endloop.
if mv_indent_step > 0 and lv_first_done = abap_true. " only of items were in the list
append cl_abap_char_utilities=>newline to mt_buffer.
endif.
endmethod.
method escape.
rv_escaped = iv_unescaped.
if rv_escaped ca |"\\\t\n\r|.
" TODO consider performance ...
" see also https://www.json.org/json-en.html
rv_escaped = replace(
val = rv_escaped
sub = '\'
with = '\\'
occ = 0 ).
rv_escaped = replace(
val = rv_escaped
sub = |\n|
with = '\n'
occ = 0 ).
rv_escaped = replace(
val = rv_escaped
sub = |\r|
with = '\r'
occ = 0 ).
rv_escaped = replace(
val = rv_escaped
sub = |\t|
with = '\t'
occ = 0 ).
rv_escaped = replace(
val = rv_escaped
sub = '"'
with = '\"'
occ = 0 ).
endif.
endmethod.
endclass.
**********************************************************************
* JSON_TO_ABAP
**********************************************************************
class lcl_json_to_abap definition final.
public section.
methods constructor
importing
!ii_custom_mapping type ref to zif_ajson_mapping optional.
methods to_abap
importing
it_nodes type zif_ajson=>ty_nodes_ts
changing
c_container type any
raising
zcx_ajson_error.
methods to_timestamp
importing
iv_value type zif_ajson=>ty_node-value
returning
value(rv_result) type timestamp
raising
zcx_ajson_error.
methods to_date
importing
iv_value type zif_ajson=>ty_node-value
returning
value(rv_result) type d
raising
zcx_ajson_error.
private section.
types:
begin of ty_type_cache,
type_path type string,
target_field_name type string,
dd type ref to cl_abap_datadescr,
type_kind like cl_abap_typedescr=>typekind_any,
tab_item_buf type ref to data,
end of ty_type_cache.
data mt_node_type_cache type hashed table of ty_type_cache with unique key type_path.
data mr_nodes type ref to zif_ajson=>ty_nodes_ts.
data mi_custom_mapping type ref to zif_ajson_mapping.
methods any_to_abap
importing
iv_path type string
is_parent_type type ty_type_cache optional
i_container_ref type ref to data
raising
zcx_ajson_error.
methods value_to_abap
importing
is_node type zif_ajson=>ty_node
is_node_type type ty_type_cache
i_container_ref type ref to data
raising
zcx_ajson_error
cx_sy_conversion_no_number.
methods get_node_type
importing
is_node type zif_ajson=>ty_node optional " Empty for root
is_parent_type type ty_type_cache optional
i_container_ref type ref to data optional
returning
value(rs_node_type) type ty_type_cache
raising
zcx_ajson_error.
endclass.
class lcl_json_to_abap implementation.
method constructor.
mi_custom_mapping = ii_custom_mapping.
endmethod.
method to_abap.
data lr_ref type ref to data.
clear c_container. " what about data/obj refs ?
clear mt_node_type_cache.
get reference of c_container into lr_ref.
get reference of it_nodes into mr_nodes.
get_node_type( i_container_ref = lr_ref ). " Pre-cache root node type
any_to_abap(
iv_path = ''
i_container_ref = lr_ref ).
endmethod.
method get_node_type.
data lv_node_type_path type string.
data lo_sdescr type ref to cl_abap_structdescr.
data lo_tdescr type ref to cl_abap_tabledescr.
data lo_ddescr type ref to cl_abap_datadescr.
" Calculate type path
if is_parent_type-type_kind = cl_abap_typedescr=>typekind_table.
lv_node_type_path = is_parent_type-type_path && '/-'. " table item type
elseif is_parent_type-type_kind is not initial.
lv_node_type_path = is_parent_type-type_path && '/' && is_node-name.
endif. " For root node lv_node_type_path remains ''
" Get or create cached
read table mt_node_type_cache into rs_node_type with key type_path = lv_node_type_path.
if sy-subrc <> 0.
rs_node_type-type_path = lv_node_type_path.
if mi_custom_mapping is bound.
rs_node_type-target_field_name = to_upper( mi_custom_mapping->to_abap(
iv_path = is_node-path
iv_name = is_node-name ) ).
if rs_node_type-target_field_name is initial.
rs_node_type-target_field_name = to_upper( is_node-name ).
endif.
else.
rs_node_type-target_field_name = to_upper( is_node-name ).
endif.
case is_parent_type-type_kind.
when 'h'. " Table
lo_tdescr ?= is_parent_type-dd.
rs_node_type-dd = lo_tdescr->get_table_line_type( ).
when 'u' or 'v'. " Structure
lo_sdescr ?= is_parent_type-dd.
lo_sdescr->get_component_type(
exporting
p_name = rs_node_type-target_field_name
receiving
p_descr_ref = rs_node_type-dd
exceptions
component_not_found = 4 ).
if sy-subrc <> 0.
zcx_ajson_error=>raise( |Path not found| ).
endif.
when ''. " Root node
rs_node_type-dd ?= cl_abap_typedescr=>describe_by_data_ref( i_container_ref ).
when others.
zcx_ajson_error=>raise( |Unexpected parent type| ).
endcase.
rs_node_type-type_kind = rs_node_type-dd->type_kind. " for caching and cleaner unintialized access
if rs_node_type-type_kind = 'h'. " Table
lo_tdescr ?= rs_node_type-dd.
if lo_tdescr->table_kind <> 'S'. " standard
lo_ddescr = lo_tdescr->get_table_line_type( ).
create data rs_node_type-tab_item_buf type handle lo_ddescr.
endif.
endif.
insert rs_node_type into table mt_node_type_cache.
endif.
endmethod.
method any_to_abap.
data ls_node_type like line of mt_node_type_cache.
data lx_ajson type ref to zcx_ajson_error.
data lx_root type ref to cx_root.
data lr_target_field type ref to data.
field-symbols <n> type zif_ajson=>ty_node.
field-symbols <parent_stdtab> type standard table.
field-symbols <parent_anytab> type any table.
field-symbols <parent_struc> type any.
field-symbols <tab_item> type any.
" Assign container
case is_parent_type-type_kind.
when 'h'. " Table
if is_parent_type-tab_item_buf is bound. " Indirect hint that table was sorted/hashed, see get_node_type.
assign i_container_ref->* to <parent_anytab>.
assert sy-subrc = 0.
lr_target_field = is_parent_type-tab_item_buf. " For hashed/sorted table - same buffer for all children
assign is_parent_type-tab_item_buf->* to <tab_item>.
assert sy-subrc = 0.
else.
assign i_container_ref->* to <parent_stdtab>.
assert sy-subrc = 0.
endif.
when 'u' or 'v'. " Structure
assign i_container_ref->* to <parent_struc>.
assert sy-subrc = 0.
endcase.
try.
" array_index because stringified index goes in wrong order [1, 10, 2 ...]
loop at mr_nodes->* assigning <n> using key array_index where path = iv_path.
" Get or create type cache record
if is_parent_type-type_kind <> 'h' or ls_node_type-type_kind is initial.
" table records are the same, no need to refetch twice
ls_node_type = get_node_type(
is_node = <n>
is_parent_type = is_parent_type ).
endif.
" Validate node type
if ls_node_type-type_kind ca 'lr'. " data/obj ref
" TODO maybe in future
zcx_ajson_error=>raise( 'Cannot assign to ref' ).
endif.
" Find target field reference
case is_parent_type-type_kind.
when 'h'. " Table
if not ls_node_type-target_field_name co '0123456789'.
" Does not affect anything actually but for integrity
zcx_ajson_error=>raise( 'Need index to access tables' ).
endif.
if is_parent_type-tab_item_buf is not bound. " Indirect hint that table was srt/hsh, see get_node_type
append initial line to <parent_stdtab> reference into lr_target_field.
assert sy-subrc = 0.
endif.
when 'u' or 'v'.
field-symbols <field> type any.
assign component ls_node_type-target_field_name of structure <parent_struc> to <field>.
assert sy-subrc = 0.
get reference of <field> into lr_target_field.
when ''. " Root node
lr_target_field = i_container_ref.
when others.
zcx_ajson_error=>raise( 'Unexpected parent type' ).
endcase.
" Process value assignment
case <n>-type.
when zif_ajson=>node_type-object.
if not ls_node_type-type_kind co 'uv'.
zcx_ajson_error=>raise( 'Expected structure' ).
endif.
any_to_abap(
iv_path = <n>-path && <n>-name && '/'
is_parent_type = ls_node_type
i_container_ref = lr_target_field ).
when zif_ajson=>node_type-array.
if not ls_node_type-type_kind = 'h'.
zcx_ajson_error=>raise( 'Expected table' ).
endif.
any_to_abap(
iv_path = <n>-path && <n>-name && '/'
is_parent_type = ls_node_type
i_container_ref = lr_target_field ).
when others.
value_to_abap(
is_node = <n>
is_node_type = ls_node_type
i_container_ref = lr_target_field ).
endcase.
if is_parent_type-tab_item_buf is bound. " Indirect hint that table was sorted/hashed, see get_node_type.
try.
insert <tab_item> into table <parent_anytab>.
catch cx_sy_itab_duplicate_key.
sy-subrc = 4.
endtry.
if sy-subrc <> 0.
zcx_ajson_error=>raise( 'Duplicate insertion' ).
endif.
endif.
endloop.
catch zcx_ajson_error into lx_ajson.
if lx_ajson->location is initial.
lx_ajson->set_location( <n>-path && <n>-name ).
endif.
raise exception lx_ajson.
catch cx_sy_conversion_no_number.
zcx_ajson_error=>raise(
iv_msg = 'Source is not a number'
iv_location = <n>-path && <n>-name ).
catch cx_root into lx_root.
zcx_ajson_error=>raise(
iv_msg = lx_root->get_text( )
iv_location = <n>-path && <n>-name ).
endtry.
endmethod.
method value_to_abap.
field-symbols <container> type any.
if is_node_type-type_kind ca 'lruvh'. " refs, table, strucs
zcx_ajson_error=>raise( |Unsupported target for value [{ is_node_type-type_kind }]| ).
endif.
assign i_container_ref->* to <container>.
assert sy-subrc = 0.
case is_node-type.
when zif_ajson=>node_type-null.
" Do nothing
when zif_ajson=>node_type-boolean.
" TODO: check type ?
<container> = boolc( is_node-value = 'true' ).
when zif_ajson=>node_type-number.
" TODO: check type ?
<container> = is_node-value.
when zif_ajson=>node_type-string.
" TODO: check type ?
if is_node_type-type_kind = 'D' and is_node-value is not initial.
<container> = to_date( is_node-value ).
elseif is_node_type-type_kind = 'P' and is_node-value is not initial.
<container> = to_timestamp( is_node-value ).
else.
<container> = is_node-value.
endif.
when others.
zcx_ajson_error=>raise( |Unexpected JSON type [{ is_node-type }]| ).
endcase.
endmethod.
method to_date.
data lv_y type c length 4.
data lv_m type c length 2.
data lv_d type c length 2.
find first occurrence of regex '^(\d{4})-(\d{2})-(\d{2})(T|$)' "#EC NOTEXT
in iv_value
submatches lv_y lv_m lv_d.
if sy-subrc <> 0.
zcx_ajson_error=>raise( 'Unexpected date format' ).
endif.
concatenate lv_y lv_m lv_d into rv_result.
endmethod.
method to_timestamp.
constants lc_utc type c length 6 value 'UTC'.
constants lc_regex_ts_with_hour type string
value `^(\d{4})-(\d{2})-(\d{2})(T)(\d{2}):(\d{2}):(\d{2})(\+)(\d{2}):(\d{2})`. "#EC NOTEXT
constants lc_regex_ts_utc type string
value `^(\d{4})-(\d{2})-(\d{2})(T)(\d{2}):(\d{2}):(\d{2})(Z|$)`. "#EC NOTEXT
data:
begin of ls_timestamp,
year type c length 4,
month type c length 2,
day type c length 2,
t type c length 1,
hour type c length 2,
minute type c length 2,
second type c length 2,
local_sign type c length 1,
local_hour type c length 2,
local_minute type c length 2,
end of ls_timestamp.
data lv_date type d.
data lv_time type t.
data lv_seconds_conv type i.
data lv_timestamp type timestampl.
find first occurrence of regex lc_regex_ts_with_hour
in iv_value submatches
ls_timestamp-year ls_timestamp-month ls_timestamp-day ls_timestamp-t
ls_timestamp-hour ls_timestamp-minute ls_timestamp-second
ls_timestamp-local_sign ls_timestamp-local_hour ls_timestamp-local_minute.
if sy-subrc = 0.
lv_seconds_conv = ( ls_timestamp-local_hour * 3600 ) + ( ls_timestamp-local_minute * 60 ).
else.
find first occurrence of regex lc_regex_ts_utc
in iv_value submatches
ls_timestamp-year ls_timestamp-month ls_timestamp-day ls_timestamp-t
ls_timestamp-hour ls_timestamp-minute ls_timestamp-second.
if sy-subrc <> 0.
zcx_ajson_error=>raise( 'Unexpected timestamp format' ).
endif.
endif.
concatenate ls_timestamp-year ls_timestamp-month ls_timestamp-day into lv_date.
concatenate ls_timestamp-hour ls_timestamp-minute ls_timestamp-second into lv_time.
convert date lv_date time lv_time into time stamp lv_timestamp time zone lc_utc.
try.
case ls_timestamp-local_sign.
when '-'.
lv_timestamp = cl_abap_tstmp=>add(
tstmp = lv_timestamp
secs = lv_seconds_conv ).
when '+'.
lv_timestamp = cl_abap_tstmp=>subtractsecs(
tstmp = lv_timestamp
secs = lv_seconds_conv ).
endcase.
catch cx_parameter_invalid_range cx_parameter_invalid_type.
zcx_ajson_error=>raise( 'Unexpected error calculating timestamp' ).
endtry.
cl_abap_tstmp=>move(
exporting
tstmp_src = lv_timestamp
importing
tstmp_tgt = rv_result ).
endmethod.
endclass.
**********************************************************************
* ABAP_TO_JSON
**********************************************************************
class lcl_abap_to_json definition final.
public section.
class-methods convert
importing
iv_data type any
is_prefix type zif_ajson=>ty_path_name optional
iv_array_index type i default 0
ii_custom_mapping type ref to zif_ajson_mapping optional
iv_keep_item_order type abap_bool default abap_false
returning
value(rt_nodes) type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error.
class-methods insert_with_type
importing
iv_data type any
iv_type type string
is_prefix type zif_ajson=>ty_path_name optional
iv_array_index type i default 0
ii_custom_mapping type ref to zif_ajson_mapping optional
iv_keep_item_order type abap_bool default abap_false
returning
value(rt_nodes) type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error.
class-methods class_constructor.
private section.
class-data gv_ajson_absolute_type_name type string.
data mi_custom_mapping type ref to zif_ajson_mapping.
data mv_keep_item_order type abap_bool.
methods convert_any
importing
iv_data type any
io_type type ref to cl_abap_typedescr
is_prefix type zif_ajson=>ty_path_name
iv_index type i default 0
iv_item_order type i default 0
changing
ct_nodes type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error.
methods convert_ajson
importing
io_json type ref to zcl_ajson
is_prefix type zif_ajson=>ty_path_name
iv_index type i default 0
changing
ct_nodes type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error.
methods convert_value
importing
iv_data type any
io_type type ref to cl_abap_typedescr
is_prefix type zif_ajson=>ty_path_name
iv_index type i default 0
iv_item_order type i default 0
changing
ct_nodes type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error.
methods convert_ref
importing
iv_data type any
is_prefix type zif_ajson=>ty_path_name
iv_index type i default 0
iv_item_order type i default 0
changing
ct_nodes type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error.
methods convert_struc
importing
iv_data type any
io_type type ref to cl_abap_typedescr
is_prefix type zif_ajson=>ty_path_name
iv_index type i default 0
iv_item_order type i default 0
changing
ct_nodes type zif_ajson=>ty_nodes_tt
cs_root type zif_ajson=>ty_node optional
raising
zcx_ajson_error.
methods convert_table
importing
iv_data type any
io_type type ref to cl_abap_typedescr
is_prefix type zif_ajson=>ty_path_name
iv_index type i default 0
iv_item_order type i default 0
changing
ct_nodes type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error.
methods insert_value_with_type
importing
iv_data type any
iv_type type string
io_type type ref to cl_abap_typedescr
is_prefix type zif_ajson=>ty_path_name
iv_index type i default 0
iv_item_order type i default 0
changing
ct_nodes type zif_ajson=>ty_nodes_tt
raising
zcx_ajson_error.
endclass.
class lcl_abap_to_json implementation.
method class_constructor.
data lo_dummy type ref to zcl_ajson.
data lo_type type ref to cl_abap_refdescr.
lo_type ?= cl_abap_typedescr=>describe_by_data( lo_dummy ).
gv_ajson_absolute_type_name = lo_type->get_referenced_type( )->absolute_name.
endmethod.
method convert.
data lo_type type ref to cl_abap_typedescr.
data lo_converter type ref to lcl_abap_to_json.
lo_type = cl_abap_typedescr=>describe_by_data( iv_data ).
create object lo_converter.
lo_converter->mi_custom_mapping = ii_custom_mapping.
lo_converter->mv_keep_item_order = iv_keep_item_order.
lo_converter->convert_any(
exporting
iv_data = iv_data
io_type = lo_type
is_prefix = is_prefix
iv_index = iv_array_index
changing
ct_nodes = rt_nodes ).
endmethod.
method convert_any.
case io_type->kind.
when cl_abap_typedescr=>kind_elem.
convert_value(
exporting
iv_data = iv_data
io_type = io_type
is_prefix = is_prefix
iv_index = iv_index
iv_item_order = iv_item_order
changing
ct_nodes = ct_nodes ).
when cl_abap_typedescr=>kind_struct.
convert_struc(
exporting
iv_data = iv_data
io_type = io_type
is_prefix = is_prefix
iv_index = iv_index
iv_item_order = iv_item_order
changing
ct_nodes = ct_nodes ).
when cl_abap_typedescr=>kind_table.
convert_table(
exporting
iv_data = iv_data
io_type = io_type
is_prefix = is_prefix
iv_index = iv_index
iv_item_order = iv_item_order
changing
ct_nodes = ct_nodes ).
when others.
if io_type->type_kind = cl_abap_typedescr=>typekind_dref.
convert_ref(
exporting
iv_data = iv_data
is_prefix = is_prefix
iv_index = iv_index
iv_item_order = iv_item_order
changing
ct_nodes = ct_nodes ).
elseif io_type->type_kind = cl_abap_typedescr=>typekind_oref
and cl_abap_typedescr=>describe_by_object_ref( iv_data )->absolute_name = gv_ajson_absolute_type_name.
convert_ajson(
exporting
io_json = iv_data
is_prefix = is_prefix
iv_index = iv_index
changing
ct_nodes = ct_nodes ).
else.
zcx_ajson_error=>raise( |Unsupported type [{ io_type->type_kind
}] @{ is_prefix-path && is_prefix-name }| ).
endif.
endcase.
endmethod.
method convert_ajson.
field-symbols <src> like line of ct_nodes.
field-symbols <dst> like line of ct_nodes.
if io_json is not bound.
return.
endif.
loop at io_json->mt_json_tree assigning <src>.
append <src> to ct_nodes assigning <dst>.
if <dst>-path is initial and <dst>-name is initial. " root node
<dst>-path = is_prefix-path.
<dst>-name = is_prefix-name.
<dst>-index = iv_index.
else.
<dst>-path = is_prefix-path && is_prefix-name && <dst>-path.
endif.
endloop.
endmethod.
method convert_value.
data ls_node like line of ct_nodes.
ls_node-path = is_prefix-path.
ls_node-name = is_prefix-name.
ls_node-index = iv_index.
ls_node-order = iv_item_order.
if mi_custom_mapping is bound.
ls_node-name = mi_custom_mapping->to_json(
iv_path = is_prefix-path
iv_name = is_prefix-name ).
endif.
if ls_node-name is initial.
ls_node-name = is_prefix-name.
endif.
if io_type->absolute_name = '\TYPE-POOL=ABAP\TYPE=ABAP_BOOL'
or io_type->absolute_name = '\TYPE=ABAP_BOOLEAN'
or io_type->absolute_name = '\TYPE=XSDBOOLEAN'
or io_type->absolute_name = '\TYPE=FLAG'
or io_type->absolute_name = '\TYPE=XFELD'.
ls_node-type = zif_ajson=>node_type-boolean.
if iv_data is not initial.
ls_node-value = 'true'.
else.
ls_node-value = 'false'.
endif.
elseif io_type->type_kind co 'CNgXyDT'. " Char like, date/time, xstring
ls_node-type = zif_ajson=>node_type-string.
ls_node-value = |{ iv_data }|.
elseif io_type->type_kind co 'bsI8PaeF'. " Numeric
ls_node-type = zif_ajson=>node_type-number.
ls_node-value = |{ iv_data }|.
else.
zcx_ajson_error=>raise( |Unexpected elementary type [{
io_type->type_kind }] @{ is_prefix-path && is_prefix-name }| ).
endif.
append ls_node to ct_nodes.
endmethod.
method convert_ref.
data ls_node like line of ct_nodes.
ls_node-path = is_prefix-path.
ls_node-name = is_prefix-name.
ls_node-index = iv_index.
ls_node-order = iv_item_order.
if mi_custom_mapping is bound.
ls_node-name = mi_custom_mapping->to_json(
iv_path = is_prefix-path
iv_name = is_prefix-name ).
endif.
if ls_node-name is initial.
ls_node-name = is_prefix-name.
endif.
if iv_data is initial.
ls_node-type = zif_ajson=>node_type-null.
ls_node-value = 'null'.
else.
" TODO support data references
zcx_ajson_error=>raise( |Unexpected reference @{ is_prefix-path && is_prefix-name }| ).
endif.
append ls_node to ct_nodes.
endmethod.
method convert_struc.
data lo_struc type ref to cl_abap_structdescr.
data lt_comps type cl_abap_structdescr=>component_table.
data ls_next_prefix like is_prefix.
data lv_item_order type i.
data ls_root like line of ct_nodes.
field-symbols <root> like ls_root.
field-symbols <c> like line of lt_comps.
field-symbols <val> type any.
" Object root
if cs_root is supplied. " call for include structure
assign cs_root to <root>.
else. " First call
ls_root-path = is_prefix-path.
ls_root-name = is_prefix-name.
ls_root-type = zif_ajson=>node_type-object.
ls_root-index = iv_index.
if mi_custom_mapping is bound.
ls_root-name = mi_custom_mapping->to_json(
iv_path = is_prefix-path
iv_name = is_prefix-name ).
endif.
if ls_root-name is initial.
ls_root-name = is_prefix-name.
endif.
ls_root-order = iv_item_order.
append ls_root to ct_nodes assigning <root>.
endif.
" Object attributes
lo_struc ?= io_type.
lt_comps = lo_struc->get_components( ).
" get_components is potentially much slower than lo_struc->components
" but ! we still need it to identify booleans
" and rtti seems to cache type descriptions really well (https://github.com/sbcgua/benchmarks.git)
" the structures will be repeated in real life
ls_next_prefix-path = is_prefix-path && ls_root-name && '/'.
loop at lt_comps assigning <c>.
if <c>-as_include = abap_true.
convert_struc(
exporting
iv_data = iv_data
io_type = <c>-type
is_prefix = is_prefix
changing
cs_root = <root>
ct_nodes = ct_nodes ).
else.
<root>-children = <root>-children + 1.
ls_next_prefix-name = to_lower( <c>-name ).
assign component <c>-name of structure iv_data to <val>.
assert sy-subrc = 0.
if mv_keep_item_order = abap_true.
lv_item_order = <root>-children.
endif.
convert_any(
exporting
iv_data = <val>
io_type = <c>-type
is_prefix = ls_next_prefix
iv_item_order = lv_item_order
changing
ct_nodes = ct_nodes ).
endif.
endloop.
endmethod.
method convert_table.
data lo_table type ref to cl_abap_tabledescr.
data lo_ltype type ref to cl_abap_typedescr.
data ls_next_prefix like is_prefix.
data lv_tabix type sy-tabix.
data ls_root like line of ct_nodes.
field-symbols <root> like ls_root.
field-symbols <tab> type any table.
field-symbols <val> type any.
" Array root
ls_root-path = is_prefix-path.
ls_root-name = is_prefix-name.
ls_root-type = zif_ajson=>node_type-array.
ls_root-index = iv_index.
ls_root-order = iv_item_order.
if mi_custom_mapping is bound.
ls_root-name = mi_custom_mapping->to_json(
iv_path = is_prefix-path
iv_name = is_prefix-name ).
endif.
if ls_root-name is initial.
ls_root-name = is_prefix-name.
endif.
append ls_root to ct_nodes assigning <root>.
" Array items
lo_table ?= io_type.
lo_ltype = lo_table->get_table_line_type( ).
ls_next_prefix-path = is_prefix-path && is_prefix-name && '/'.
assign iv_data to <tab>.
lv_tabix = 1.
loop at <tab> assigning <val>.
ls_next_prefix-name = to_lower( |{ lv_tabix }| ).
convert_any(
exporting
iv_data = <val>
io_type = lo_ltype
is_prefix = ls_next_prefix
iv_index = <root>-children + 1
changing
ct_nodes = ct_nodes ).
<root>-children = <root>-children + 1.
lv_tabix = lv_tabix + 1.
endloop.
endmethod.
method insert_with_type.
data lo_type type ref to cl_abap_typedescr.
data lo_converter type ref to lcl_abap_to_json.
lo_type = cl_abap_typedescr=>describe_by_data( iv_data ).
create object lo_converter.
lo_converter->mi_custom_mapping = ii_custom_mapping.
lo_converter->mv_keep_item_order = iv_keep_item_order.
lo_converter->insert_value_with_type(
exporting
iv_data = iv_data
iv_type = iv_type
io_type = lo_type
is_prefix = is_prefix
iv_index = iv_array_index
changing
ct_nodes = rt_nodes ).
endmethod.
method insert_value_with_type.
data lv_prefix type string.
data ls_node like line of ct_nodes.
lv_prefix = is_prefix-path && is_prefix-name.
if io_type->type_kind co 'CNgXyDT'. " Char like, date/time, xstring
if iv_type = zif_ajson=>node_type-boolean and iv_data <> 'true' and iv_data <> 'false'.
zcx_ajson_error=>raise( |Unexpected boolean value [{ iv_data }] @{ lv_prefix }| ).
elseif iv_type = zif_ajson=>node_type-null and iv_data is not initial.
zcx_ajson_error=>raise( |Unexpected null value [{ iv_data }] @{ lv_prefix }| ).
elseif iv_type = zif_ajson=>node_type-number and iv_data cn '0123456789. E+-'.
zcx_ajson_error=>raise( |Unexpected numeric value [{ iv_data }] @{ lv_prefix }| ).
elseif iv_type <> zif_ajson=>node_type-string and iv_type <> zif_ajson=>node_type-boolean
and iv_type <> zif_ajson=>node_type-null and iv_type <> zif_ajson=>node_type-number.
zcx_ajson_error=>raise( |Unexpected type for value [{ iv_type },{ iv_data }] @{ lv_prefix }| ).
endif.
elseif io_type->type_kind co 'bsI8PaeF'. " Numeric
if iv_type <> zif_ajson=>node_type-number.
zcx_ajson_error=>raise( |Unexpected value for numeric [{ iv_data }] @{ lv_prefix }| ).
endif.
else.
zcx_ajson_error=>raise( |Unexpected type [{ io_type->type_kind }] @{ lv_prefix }| ).
endif.
ls_node-path = is_prefix-path.
ls_node-name = is_prefix-name.
ls_node-index = iv_index.
ls_node-value = iv_data.
ls_node-type = iv_type.
ls_node-order = iv_item_order.
if mi_custom_mapping is bound.
ls_node-name = mi_custom_mapping->to_json(
iv_path = is_prefix-path
iv_name = is_prefix-name ).
endif.
if ls_node-name is initial.
ls_node-name = is_prefix-name.
endif.
append ls_node to ct_nodes.
endmethod.
endclass.
**********************************************************************
* FILTER RUNNER
**********************************************************************
class lcl_filter_runner definition final.
public section.
methods run
importing
ii_filter type ref to zif_ajson_filter
it_source_tree type zif_ajson=>ty_nodes_ts
changing
ct_dest_tree type zif_ajson=>ty_nodes_ts
raising
zcx_ajson_error.
private section.
data mi_filter type ref to zif_ajson_filter.
data mr_source_tree type ref to zif_ajson=>ty_nodes_ts.
data mr_dest_tree type ref to zif_ajson=>ty_nodes_ts.
methods walk
importing
iv_path type string
changing
cs_parent type zif_ajson=>ty_node optional
raising
zcx_ajson_error.
endclass.
class lcl_filter_runner implementation.
method run.
assert ii_filter is bound.
mi_filter = ii_filter.
clear ct_dest_tree.
get reference of it_source_tree into mr_source_tree.
get reference of ct_dest_tree into mr_dest_tree.
walk( iv_path = '' ).
endmethod.
method walk.
data ls_node type zif_ajson=>ty_node.
loop at mr_source_tree->* into ls_node where path = iv_path.
case ls_node-type.
when zif_ajson=>node_type-boolean or zif_ajson=>node_type-null
or zif_ajson=>node_type-number or zif_ajson=>node_type-string.
if mi_filter->keep_node( ls_node ) = abap_false.
continue.
endif.
when zif_ajson=>node_type-array or zif_ajson=>node_type-object.
if mi_filter->keep_node(
is_node = ls_node
iv_visit = zif_ajson_filter=>visit_type-open ) = abap_false.
continue.
endif.
" Intentionally clear AFTER "open"
clear ls_node-children.
walk(
exporting
iv_path = iv_path && ls_node-name && `/`
changing
cs_parent = ls_node ).
if mi_filter->keep_node(
is_node = ls_node
iv_visit = zif_ajson_filter=>visit_type-close ) = abap_false.
continue.
endif.
when others.
zcx_ajson_error=>raise( |Unexpected node type { ls_node-type }| ).
endcase.
if cs_parent is supplied.
cs_parent-children = cs_parent-children + 1.
if cs_parent-type = zif_ajson=>node_type-array.
ls_node-name = |{ cs_parent-children }|.
ls_node-index = cs_parent-children.
endif.
endif.
insert ls_node into table mr_dest_tree->*.
endloop.
endmethod.
endclass.
| [
17174,
17174,
2466,
1174,
198,
9,
19255,
45484,
198,
17174,
17174,
2466,
1174,
198,
198,
4871,
300,
565,
62,
26791,
6770,
2457,
13,
198,
220,
1171,
2665,
13,
628,
220,
220,
220,
1398,
12,
24396,
82,
3487,
1096,
62,
6978,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
6978,
2099,
4731,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
81,
85,
62,
6978,
8,
2099,
4731,
13,
198,
220,
220,
220,
1398,
12,
24396,
82,
6626,
62,
6978,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
6978,
2099,
4731,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
81,
85,
62,
6978,
62,
3672,
8,
2099,
1976,
361,
62,
1228,
1559,
14804,
774,
62,
6978,
62,
3672,
13,
198,
220,
220,
220,
1398,
12,
24396,
82,
26571,
62,
18747,
62,
9630,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
6978,
2099,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
9630,
2099,
4731,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
81,
85,
62,
9630,
8,
2099,
1312,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
1228,
1559,
62,
18224,
13,
198,
198,
437,
4871,
13,
198,
198,
4871,
300,
565,
62,
26791,
7822,
13,
628,
220,
2446,
26571,
62,
18747,
62,
9630,
13,
628,
220,
220,
220,
611,
407,
21628,
62,
9630,
763,
705,
486,
1954,
2231,
3134,
4531,
4458,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
1228,
1559,
62,
18224,
14804,
40225,
7,
930,
34,
34574,
751,
1729,
12,
77,
39223,
1994,
685,
90,
21628,
62,
9630,
1782,
60,
284,
7177,
685,
90,
21628,
62,
6978,
1782,
60,
91,
6739,
198,
220,
220,
220,
45762,
13,
198,
220,
220,
220,
374,
85,
62,
9630,
796,
21628,
62,
9630,
13,
198,
220,
220,
220,
611,
374,
85,
62,
9630,
796,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
1228,
1559,
62,
18224,
14804,
40225,
7,
930,
34,
34574,
751,
6632,
1994,
284,
7177,
685,
90,
21628,
62,
6978,
1782,
60,
91,
6739,
198,
220,
220,
220,
45762,
13,
628,
220,
886,
24396,
13,
628,
220,
2446,
3487,
1096,
62,
6978,
13,
628,
220,
220,
220,
374,
85,
62,
6978,
796,
21628,
62,
6978,
13,
198,
220,
220,
220,
611,
965,
11925,
7,
374,
85,
62,
6978,
1267,
796,
657,
13,
198,
220,
220,
220,
220,
220,
374,
85,
62,
6978,
796,
31051,
4458,
198,
220,
220,
220,
45762,
13,
198,
220,
220,
220,
611,
374,
85,
62,
6978,
10,
15,
7,
16,
8,
1279,
29,
31051,
4458,
198,
220,
220,
220,
220,
220,
374,
85,
62,
6978,
796,
31051,
6,
11405,
374,
85,
62,
6978,
13,
198,
220,
220,
220,
45762,
13,
198,
220,
220,
220,
611,
3293,
1806,
7,
1188,
796,
374,
85,
62,
6978,
572,
796,
965,
11925,
7,
374,
85,
62,
6978,
1267,
532,
352,
1267,
1279,
29,
31051,
4458,
198,
220,
220,
220,
220,
220,
374,
85,
62,
6978,
796,
374,
85,
62,
6978,
11405,
31051,
4458,
198,
220,
220,
220,
45762,
13,
628,
220,
886,
24396,
13,
628,
220,
2446,
6626,
62,
6978,
13,
628,
220,
220,
220,
1366,
300,
85,
62,
8210,
2099,
1312,
13,
198,
220,
220,
220,
1366,
300,
85,
62,
11925,
2099,
1312,
13,
198,
220,
220,
220,
1366,
300,
85,
62,
2213,
320,
62,
6649,
1077,
2099,
1312,
13,
628,
220,
220,
220,
300,
85,
62,
11925,
796,
965,
11925,
7,
21628,
62,
6978,
6739,
198,
220,
220,
220,
611,
300,
85,
62,
11925,
796,
657,
393,
21628,
62,
6978,
796,
31051,
4458,
198,
220,
220,
220,
220,
220,
1441,
13,
366,
6565,
3108,
318,
262,
16144,
329,
6808,
2378,
796,
10148,
1343,
10148,
198,
220,
220,
220,
45762,
13,
628,
220,
220,
220,
611,
3293,
1806,
7,
1188,
796,
21628,
62,
6978,
572,
796,
300,
85,
62,
11925,
532,
352,
1267,
796,
31051,
4458,
198,
220,
220,
220,
220,
220,
300,
85,
62,
2213,
320,
62,
6649,
1077,
796,
352,
13,
366,
8856,
938,
31051,
6,
198,
220,
220,
220,
45762,
13,
628,
220,
220,
220,
300,
85,
62,
8210,
796,
1064,
7,
1188,
796,
9575,
7,
21628,
62,
6978,
1267,
850,
796,
31051,
6,
572,
796,
300,
85,
62,
2213,
320,
62,
6649,
1077,
6739,
198,
220,
220,
220,
611,
300,
85,
62,
8210,
796,
532,
16,
13,
198,
220,
220,
220,
220,
220,
300,
85,
62,
8210,
220,
796,
300,
85,
62,
11925,
13,
366,
2190,
2187,
4731,
355,
262,
705,
3672,
6,
636,
198,
220,
220,
220,
45762,
13,
198,
220,
220,
220,
300,
85,
62,
8210,
796,
300,
85,
62,
11925,
532,
300,
85,
62,
8210,
13,
628,
220,
220,
220,
374,
85,
62,
6978,
62,
3672,
12,
6978,
796,
3487,
1096,
62,
6978,
7,
3293,
1806,
7,
1188,
796,
21628,
62,
6978,
18896,
796,
300,
85,
62,
8210,
1267,
6739,
198,
220,
220,
220,
374,
85,
62,
6978,
62,
3672,
12,
3672,
796,
3293,
1806,
7,
1188,
796,
21628,
62,
6978,
572,
796,
300,
85,
62,
8210,
18896,
796,
300,
85,
62,
11925,
532,
300,
85,
62,
8210,
532,
300,
85,
62,
2213,
320,
62,
6649,
1077,
6739,
628,
220,
886,
24396,
13,
198,
198,
437,
4871,
13,
628,
198,
17174,
17174,
2466,
1174,
198,
9,
350,
27415,
1137,
198,
17174,
17174,
2466,
1174,
198,
198,
4871,
300,
565,
62,
17752,
62,
48610,
6770,
2457,
13,
198,
220,
1171,
2665,
13,
628,
220,
220,
220,
5050,
21136,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
17752,
2099,
4731,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
17034,
62,
17752,
62,
21048,
8,
2099,
1976,
361,
62,
1228,
1559,
14804,
774,
62,
77,
4147,
62,
926,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Include ZHRO_ADP_WFN_CA_F04
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form GET_EMPLOYEE_STATUS
*&---------------------------------------------------------------------*
* Get employee status
*----------------------------------------------------------------------*
* -->FV_MASSN Personnel Action
* -->FV_MASSG Personnel Action Reason
* <--FV_RETURN Employee Status
*----------------------------------------------------------------------*
FORM get_employee_status USING fv_massn fv_massg
CHANGING fv_return.
CASE fv_massn.
WHEN '7A'. "Hire
MOVE 'A' TO fv_return. "Active
WHEN '7B'. "Expat Assignment
MOVE 'A' TO fv_return. "Active
WHEN '7C'. "Organizational Change
MOVE 'A' TO fv_return. "Active
WHEN '7D'. "Change of Pay
MOVE 'A' TO fv_return. "Active
WHEN '7E'. "Transfer/Relocation
MOVE 'A' TO fv_return. "Active
WHEN '7F'. "Termination/Retirement/Deceased
CASE fv_massg.
WHEN '12'.
MOVE 'D' TO fv_return. "Deceased
WHEN '18'.
MOVE 'R' TO fv_return. "Retirement
WHEN OTHERS.
MOVE 'T' TO fv_return. "Termination
ENDCASE.
WHEN '7G'. "Rehire
MOVE 'A' TO fv_return. "Active
WHEN '7H'. "Retirement
MOVE 'R' TO fv_return. "Retirement
WHEN '7I'. "UnPaid LOA
MOVE 'L' TO fv_return. "LOA
WHEN '7J'. "Return to Work from UnPaid LOA
MOVE 'A' TO fv_return. "Active
WHEN '7K'. "Hire Unpaid LOA
MOVE 'L' TO fv_return. "LOA
WHEN '7L'. "Hire Paid LOA
MOVE 'L' TO fv_return. "LOA
WHEN '7M'. "Paid LOA – Active Status
MOVE 'L' TO fv_return. "LOA
WHEN '7N'. "Return to Work from Paid LOA
MOVE 'A' TO fv_return. "Active
WHEN '7O'. "Country ReAssignment
MOVE 'A' TO fv_return. "Active
WHEN '7P'. "Severance - Active
MOVE 'A' TO fv_return. "Active
WHEN '7Q'. "Return from Expat Assignment
MOVE 'A' TO fv_return. "Active
WHEN '7R'. "Severance - Withdrawn
MOVE 'T' TO fv_return. "Terminated
WHEN '7T'. "Change of Bank Details
MOVE 'A' TO fv_return. "Active
WHEN '7U'. "Intercompany Transfer
MOVE 'A' TO fv_return. "Active
WHEN '7Y'. "Conversion LOA - Canada
MOVE 'A' TO fv_return. "Active
WHEN '7Z'. "Conversion Hire - Canada
MOVE 'A' TO fv_return. "Active
WHEN OTHERS.
ENDCASE.
ENDFORM. " GET_EMPLOYEE_STATUS
*&---------------------------------------------------------------------*
*& Form RATE_TYPE_MAPPING
*&---------------------------------------------------------------------*
* Rate Type Mapping
*----------------------------------------------------------------------*
* -->FV_ABART Employee Type: 1 = Hourly, 3 = Salaried
* <--FV_RETURN Rate Type
*----------------------------------------------------------------------*
FORM rate_type_mapping USING fv_abart
CHANGING fv_return.
* 1 = Hourly, 3 = Salaried
IF fv_abart EQ '1'.
MOVE 'H' TO fv_return.
ELSEIF gv_abart EQ '3'.
MOVE 'S' TO fv_return.
ENDIF.
ENDFORM. " RATE_TYPE_MAPPING
*&---------------------------------------------------------------------*
*& Form PAY_GROUP_MAPPING
*&---------------------------------------------------------------------*
* Pay Group Mapping
*----------------------------------------------------------------------*
* -->FV_BUKRS Company code
* -->FV_RATE_TYPE H = Hourly, S = Salary
* <--FV_RETURN WFN Pay Group
*----------------------------------------------------------------------*
FORM pay_group_mapping USING fv_bukrs
fv_rate_type
CHANGING fv_return.
CASE fv_bukrs.
WHEN 'SP04'. "T56A
IF fv_rate_type EQ 'S'. "Salary
MOVE '2' TO fv_return.
ELSE.
MOVE '1' TO fv_return.
ENDIF.
WHEN OTHERS.
MOVE '1' TO fv_return.
ENDCASE.
ENDFORM. " PAY_GROUP_MAPPING
*&---------------------------------------------------------------------*
*& Form UNION_CODE_MAPPING
*&---------------------------------------------------------------------*
* Union Code Mapping
*----------------------------------------------------------------------*
* -->fv_trfar Pay scale type
* <--FV_RETURN Union code
*----------------------------------------------------------------------*
FORM union_code_mapping USING fv_trfar
CHANGING fv_return.
CASE fv_trfar.
WHEN 'NU'.
MOVE '' TO fv_return.
WHEN 'UA'.
MOVE 'U30' TO fv_return.
WHEN 'UB'.
MOVE 'UN' TO fv_return.
WHEN 'UC'.
MOVE '' TO fv_return.
WHEN 'UD'.
MOVE 'U20' TO fv_return.
WHEN 'UE'.
MOVE '847' TO fv_return.
WHEN 'UF'.
MOVE '847' TO fv_return.
WHEN OTHERS.
ENDCASE.
ENDFORM. " UNION_CODE_MAPPING
*&---------------------------------------------------------------------*
*& Form WORKER_CATEGORY_MAPPING
*&---------------------------------------------------------------------*
* Worker Category Mapping
*----------------------------------------------------------------------*
* -->FV_PERSG Employee Group
* <--FV_RETURN Worker Category
*----------------------------------------------------------------------*
FORM worker_category_mapping USING fv_persg
CHANGING fv_return.
CASE fv_persg.
WHEN '1'.
MOVE 'F' TO fv_return.
WHEN '2'.
MOVE 'P' TO fv_return.
WHEN '3'.
MOVE 'P' TO fv_return.
WHEN '4'.
MOVE '' TO fv_return.
WHEN '5'.
MOVE '' TO fv_return.
WHEN '6'.
MOVE '' TO fv_return.
WHEN '7'.
MOVE 'CAS' TO fv_return.
WHEN '8'.
MOVE 'CAS' TO fv_return.
WHEN '9'.
MOVE 'CON' TO fv_return.
WHEN 'A'.
MOVE 'OTH' TO fv_return.
WHEN 'B'.
MOVE 'OTH' TO fv_return.
WHEN 'C'.
MOVE '' TO fv_return.
WHEN 'D'.
MOVE 'OTH' TO fv_return.
WHEN 'E'.
MOVE 'F' TO fv_return.
WHEN 'F'.
MOVE 'F' TO fv_return.
WHEN 'G'.
MOVE 'F' TO fv_return.
WHEN 'H'.
MOVE '' TO fv_return.
WHEN 'I'.
MOVE '' TO fv_return.
WHEN OTHERS.
ENDCASE.
ENDFORM. " WORKER_CATEGORY_MAPPING | [
9,
5,
10097,
30934,
9,
201,
198,
9,
5,
220,
40348,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1168,
39,
13252,
62,
2885,
47,
62,
54,
43221,
62,
8141,
62,
37,
3023,
201,
198,
9,
5,
10097,
30934,
9,
201,
198,
201,
198,
9,
5,
10097,
30934,
9,
201,
198,
9,
5,
220,
220,
220,
220,
220,
5178,
220,
17151,
62,
3620,
6489,
21414,
6500,
62,
35744,
2937,
201,
198,
9,
5,
10097,
30934,
9,
201,
198,
9,
220,
220,
220,
220,
220,
220,
3497,
6538,
3722,
201,
198,
9,
10097,
23031,
9,
201,
198,
9,
220,
220,
220,
220,
220,
14610,
37,
53,
62,
44,
10705,
45,
220,
220,
220,
220,
220,
41623,
7561,
201,
198,
9,
220,
220,
220,
220,
220,
14610,
37,
53,
62,
44,
10705,
38,
220,
220,
220,
220,
220,
41623,
7561,
23219,
201,
198,
9,
220,
220,
220,
220,
220,
1279,
438,
37,
53,
62,
26087,
27064,
220,
220,
220,
220,
36824,
12678,
201,
198,
9,
10097,
23031,
9,
201,
198,
21389,
651,
62,
7033,
1453,
62,
13376,
220,
1294,
2751,
220,
220,
220,
277,
85,
62,
22208,
77,
277,
85,
62,
22208,
70,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
277,
85,
62,
7783,
13,
201,
198,
201,
198,
220,
42001,
277,
85,
62,
22208,
77,
13,
201,
198,
220,
220,
220,
42099,
705,
22,
32,
4458,
220,
366,
39,
557,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
33,
4458,
220,
366,
3109,
8071,
50144,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
34,
4458,
220,
366,
26121,
22684,
9794,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
35,
4458,
220,
366,
19400,
286,
7119,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
36,
4458,
220,
366,
43260,
14,
6892,
5040,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
37,
4458,
220,
366,
15156,
17928,
14,
9781,
24615,
14,
5005,
344,
839,
201,
198,
220,
220,
220,
220,
220,
42001,
277,
85,
62,
22208,
70,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
42099,
705,
1065,
4458,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13070,
6089,
705,
35,
6,
5390,
277,
85,
62,
7783,
13,
366,
5005,
344,
839,
201,
198,
220,
220,
220,
220,
220,
220,
220,
42099,
705,
1507,
4458,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13070,
6089,
705,
49,
6,
5390,
277,
85,
62,
7783,
13,
366,
9781,
24615,
201,
198,
220,
220,
220,
220,
220,
220,
220,
42099,
440,
4221,
4877,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13070,
6089,
705,
51,
6,
5390,
277,
85,
62,
7783,
13,
366,
15156,
17928,
201,
198,
220,
220,
220,
220,
220,
23578,
34,
11159,
13,
201,
198,
220,
220,
220,
42099,
705,
22,
38,
4458,
220,
366,
3041,
10695,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
39,
4458,
220,
366,
9781,
24615,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
49,
6,
5390,
277,
85,
62,
7783,
13,
366,
9781,
24615,
201,
198,
220,
220,
220,
42099,
705,
22,
40,
4458,
220,
366,
3118,
47,
1698,
17579,
32,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
43,
6,
5390,
277,
85,
62,
7783,
13,
366,
21982,
32,
201,
198,
220,
220,
220,
42099,
705,
22,
41,
4458,
220,
366,
13615,
284,
5521,
422,
791,
47,
1698,
17579,
32,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
42,
4458,
220,
366,
39,
557,
791,
20333,
17579,
32,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
43,
6,
5390,
277,
85,
62,
7783,
13,
366,
21982,
32,
201,
198,
220,
220,
220,
42099,
705,
22,
43,
4458,
220,
366,
39,
557,
47355,
17579,
32,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
43,
6,
5390,
277,
85,
62,
7783,
13,
366,
21982,
32,
201,
198,
220,
220,
220,
42099,
705,
22,
44,
4458,
220,
366,
47,
1698,
17579,
32,
784,
14199,
12678,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
43,
6,
5390,
277,
85,
62,
7783,
13,
366,
21982,
32,
201,
198,
220,
220,
220,
42099,
705,
22,
45,
4458,
220,
366,
13615,
284,
5521,
422,
47355,
17579,
32,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
46,
4458,
220,
366,
33921,
797,
8021,
16747,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
47,
4458,
220,
366,
50,
964,
590,
532,
14199,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
48,
4458,
220,
366,
13615,
422,
5518,
265,
50144,
201,
198,
220,
220,
220,
220,
220,
13070,
6089,
705,
32,
6,
5390,
277,
85,
62,
7783,
13,
220,
366,
13739,
201,
198,
220,
220,
220,
42099,
705,
22,
49,
4458,
220,
366,
50,
964,
590,
532,
2080,
41549,
201,
198,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">Demo Business function for multiple implementations</p>
INTERFACE zif_business_function_multiple
PUBLIC .
METHODS doit.
ENDINTERFACE.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
11522,
78,
7320,
2163,
329,
3294,
25504,
3556,
79,
29,
198,
41358,
49836,
1976,
361,
62,
22680,
62,
8818,
62,
48101,
198,
220,
44731,
764,
198,
220,
337,
36252,
50,
466,
270,
13,
198,
10619,
41358,
49836,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_EXCEL definition
public
create public .
public section.
*"* public components of class ZCL_EXCEL
*"* do not include other source files here!!!
interfaces ZIF_EXCEL_BOOK_PROPERTIES .
interfaces ZIF_EXCEL_BOOK_PROTECTION .
interfaces ZIF_EXCEL_BOOK_VBA_PROJECT .
data LEGACY_PALETTE type ref to ZCL_EXCEL_LEGACY_PALETTE read-only .
data SECURITY type ref to ZCL_EXCEL_SECURITY .
data USE_TEMPLATE type XFELD .
methods SET_THEME
importing
!IO_THEME type ref to ZCL_EXCEL_THEME .
methods GET_THEME
exporting
!EO_THEME type ref to ZCL_EXCEL_THEME .
methods ADD_NEW_AUTOFILTER
importing
!IO_SHEET type ref to ZCL_EXCEL_WORKSHEET
returning
value(RO_AUTOFILTER) type ref to ZCL_EXCEL_AUTOFILTER
raising
ZCX_EXCEL .
methods ADD_NEW_DRAWING
importing
!IP_TYPE type ZEXCEL_DRAWING_TYPE default ZCL_EXCEL_DRAWING=>TYPE_IMAGE
!IP_TITLE type CLIKE optional
returning
value(EO_DRAWING) type ref to ZCL_EXCEL_DRAWING .
methods ADD_NEW_RANGE
returning
value(EO_RANGE) type ref to ZCL_EXCEL_RANGE .
methods ADD_NEW_STYLE
importing
!IP_GUID type ZEXCEL_CELL_STYLE optional
returning
value(EO_STYLE) type ref to ZCL_EXCEL_STYLE .
methods ADD_NEW_WORKSHEET
importing
!IP_TITLE type ZEXCEL_SHEET_TITLE optional
returning
value(EO_WORKSHEET) type ref to ZCL_EXCEL_WORKSHEET
raising
ZCX_EXCEL .
methods ADD_STATIC_STYLES .
methods CONSTRUCTOR .
methods DELETE_WORKSHEET
importing
!IO_WORKSHEET type ref to ZCL_EXCEL_WORKSHEET
raising
ZCX_EXCEL .
methods DELETE_WORKSHEET_BY_NAME
importing
!IV_TITLE type CLIKE .
methods DELETE_WORKSHEET_BY_INDEX
importing
!IV_INDEX type NUMERIC .
methods GET_ACTIVE_SHEET_INDEX
returning
value(R_ACTIVE_WORKSHEET) type ZEXCEL_ACTIVE_WORKSHEET .
methods GET_ACTIVE_WORKSHEET
returning
value(EO_WORKSHEET) type ref to ZCL_EXCEL_WORKSHEET .
methods GET_AUTOFILTERS_REFERENCE
returning
value(RO_AUTOFILTERS) type ref to ZCL_EXCEL_AUTOFILTERS .
methods GET_DEFAULT_STYLE
returning
value(EP_STYLE) type ZEXCEL_CELL_STYLE .
methods GET_DRAWINGS_ITERATOR
importing
!IP_TYPE type ZEXCEL_DRAWING_TYPE
returning
value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR .
methods GET_NEXT_TABLE_ID
returning
value(EP_ID) type I .
methods GET_RANGES_ITERATOR
returning
value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR .
methods GET_STATIC_CELLSTYLE_GUID
importing
!IP_CSTYLE_COMPLETE type ZEXCEL_S_CSTYLE_COMPLETE
!IP_CSTYLEX_COMPLETE type ZEXCEL_S_CSTYLEX_COMPLETE
returning
value(EP_GUID) type ZEXCEL_CELL_STYLE .
methods GET_STYLES_ITERATOR
returning
value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR .
methods GET_STYLE_INDEX_IN_STYLES
importing
!IP_GUID type ZEXCEL_CELL_STYLE
returning
value(EP_INDEX) type SYTABIX
raising
ZCX_EXCEL .
methods GET_STYLE_TO_GUID
importing
!IP_GUID type ZEXCEL_CELL_STYLE
returning
value(EP_STYLEMAPPING) type ZEXCEL_S_STYLEMAPPING
raising
ZCX_EXCEL .
methods GET_WORKSHEETS_ITERATOR
returning
value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR .
methods GET_WORKSHEETS_NAME
returning
value(EP_NAME) type ZEXCEL_WORKSHEETS_NAME .
methods GET_WORKSHEETS_SIZE
returning
value(EP_SIZE) type I .
methods GET_WORKSHEET_BY_NAME
importing
!IP_SHEET_NAME type ZEXCEL_SHEET_TITLE
returning
value(EO_WORKSHEET) type ref to ZCL_EXCEL_WORKSHEET .
methods GET_WORKSHEET_BY_INDEX
importing
!IV_INDEX type NUMERIC
returning
value(EO_WORKSHEET) type ref to ZCL_EXCEL_WORKSHEET .
methods SET_ACTIVE_SHEET_INDEX
importing
!I_ACTIVE_WORKSHEET type ZEXCEL_ACTIVE_WORKSHEET
raising
ZCX_EXCEL .
methods SET_ACTIVE_SHEET_INDEX_BY_NAME
importing
!I_WORKSHEET_NAME type ZEXCEL_WORKSHEETS_NAME .
methods SET_DEFAULT_STYLE
importing
!IP_STYLE type ZEXCEL_CELL_STYLE
raising
ZCX_EXCEL .
*"* protected components of class ZCL_EXCEL
*"* do not include other source files here!!!
protected section.
data WORKSHEETS type ref to ZCL_EXCEL_WORKSHEETS .
private section.
constants VERSION type CHAR10 value '7.0.6'. "#EC NOTEXT
data AUTOFILTERS type ref to ZCL_EXCEL_AUTOFILTERS .
data CHARTS type ref to ZCL_EXCEL_DRAWINGS .
data DEFAULT_STYLE type ZEXCEL_CELL_STYLE .
*"* private components of class ZCL_EXCEL
*"* do not include other source files here!!!
data DRAWINGS type ref to ZCL_EXCEL_DRAWINGS .
data RANGES type ref to ZCL_EXCEL_RANGES .
data STYLES type ref to ZCL_EXCEL_STYLES .
data T_STYLEMAPPING1 type ZEXCEL_T_STYLEMAPPING1 .
data T_STYLEMAPPING2 type ZEXCEL_T_STYLEMAPPING2 .
data THEME type ref to ZCL_EXCEL_THEME .
methods STYLEMAPPING_DYNAMIC_STYLE
importing
!IP_STYLE type ref to ZCL_EXCEL_STYLE
returning
value(EO_STYLE2) type ZEXCEL_S_STYLEMAPPING .
ENDCLASS.
CLASS ZCL_EXCEL IMPLEMENTATION.
METHOD add_new_autofilter.
* Check for autofilter reference: new or overwrite; only one per sheet
ro_autofilter = autofilters->add( io_sheet ) .
ENDMETHOD.
method ADD_NEW_DRAWING.
* Create default blank worksheet
CREATE OBJECT eo_drawing
EXPORTING
ip_type = ip_type
ip_title = ip_title.
CASE ip_type.
WHEN 'image'.
drawings->add( eo_drawing ).
WHEN 'chart'.
charts->add( eo_drawing ).
ENDCASE.
endmethod.
method ADD_NEW_RANGE.
* Create default blank range
CREATE OBJECT eo_range.
ranges->add( eo_range ).
endmethod.
method ADD_NEW_STYLE.
* Start of deletion # issue 139 - Dateretention of cellstyles
* CREATE OBJECT eo_style.
* styles->add( eo_style ).
* End of deletion # issue 139 - Dateretention of cellstyles
* Start of insertion # issue 139 - Dateretention of cellstyles
* Create default style
CREATE OBJECT eo_style
EXPORTING
ip_guid = ip_guid.
styles->add( eo_style ).
DATA: style2 TYPE zexcel_s_stylemapping.
* Copy to new representations
style2 = stylemapping_dynamic_style( eo_style ).
INSERT style2 INTO TABLE t_stylemapping1.
INSERT style2 INTO TABLE t_stylemapping2.
* End of insertion # issue 139 - Dateretention of cellstyles
endmethod.
method ADD_NEW_WORKSHEET.
* Create default blank worksheet
CREATE OBJECT eo_worksheet
EXPORTING
ip_excel = me
ip_title = ip_title.
worksheets->add( eo_worksheet ).
worksheets->active_worksheet = worksheets->size( ).
endmethod.
METHOD add_static_styles.
" # issue 139
FIELD-SYMBOLS: <style1> LIKE LINE OF t_stylemapping1,
<style2> LIKE LINE OF t_stylemapping2.
DATA: style TYPE REF TO zcl_excel_style.
LOOP AT me->t_stylemapping1 ASSIGNING <style1> WHERE added_to_iterator IS INITIAL.
READ TABLE me->t_stylemapping2 ASSIGNING <style2> WITH TABLE KEY guid = <style1>-guid.
CHECK sy-subrc = 0. " Should always be true since these tables are being filled parallel
style = me->add_new_style( <style1>-guid ).
zcl_excel_common=>recursive_struct_to_class( EXPORTING i_source = <style1>-complete_style
i_sourcex = <style1>-complete_stylex
CHANGING e_target = style ).
ENDLOOP.
ENDMETHOD.
method CONSTRUCTOR.
DATA: lo_style TYPE REF TO zcl_excel_style.
* Inizialize instance objects
CREATE OBJECT security.
CREATE OBJECT worksheets.
CREATE OBJECT ranges.
CREATE OBJECT styles.
CREATE OBJECT drawings
EXPORTING
ip_type = zcl_excel_drawing=>type_image.
CREATE OBJECT charts
EXPORTING
ip_type = zcl_excel_drawing=>type_chart.
CREATE OBJECT legacy_palette.
CREATE OBJECT autofilters.
me->zif_excel_book_protection~initialize( ).
me->zif_excel_book_properties~initialize( ).
me->add_new_worksheet( ).
me->add_new_style( ). " Standard style
lo_style = me->add_new_style( ). " Standard style with fill gray125
lo_style->fill->filltype = zcl_excel_style_fill=>c_fill_pattern_gray125.
endmethod.
METHOD delete_worksheet.
DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
l_size TYPE i,
lv_errormessage TYPE string.
l_size = get_worksheets_size( ).
IF l_size = 1. " Only 1 worksheet left --> check whether this is the worksheet to be deleted
lo_worksheet = me->get_worksheet_by_index( 1 ).
IF lo_worksheet = io_worksheet.
lv_errormessage = 'Deleting last remaining worksheet is not allowed'(002).
RAISE EXCEPTION TYPE zcx_excel
EXPORTING
error = lv_errormessage.
ENDIF.
ENDIF.
me->worksheets->remove( io_worksheet ).
ENDMETHOD.
METHOD delete_worksheet_by_index.
DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
lv_errormessage TYPE string.
lo_worksheet = me->get_worksheet_by_index( iv_index ).
IF lo_worksheet IS NOT BOUND.
lv_errormessage = 'Worksheet not existing'(001).
RAISE EXCEPTION TYPE zcx_excel
EXPORTING
error = lv_errormessage.
ENDIF.
me->delete_worksheet( lo_worksheet ).
ENDMETHOD.
METHOD delete_worksheet_by_name.
DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
lv_errormessage TYPE string.
lo_worksheet = me->get_worksheet_by_name( iv_title ).
IF lo_worksheet IS NOT BOUND.
lv_errormessage = 'Worksheet not existing'(001).
RAISE EXCEPTION TYPE zcx_excel
EXPORTING
error = lv_errormessage.
ENDIF.
me->delete_worksheet( lo_worksheet ).
ENDMETHOD.
method GET_ACTIVE_SHEET_INDEX.
r_active_worksheet = me->worksheets->active_worksheet.
endmethod.
method GET_ACTIVE_WORKSHEET.
eo_worksheet = me->worksheets->get( me->worksheets->active_worksheet ).
endmethod.
method GET_AUTOFILTERS_REFERENCE.
ro_autofilters = autofilters.
endmethod.
method GET_DEFAULT_STYLE.
ep_style = me->default_style.
endmethod.
method GET_DRAWINGS_ITERATOR.
CASE ip_type.
WHEN zcl_excel_drawing=>type_image.
eo_iterator = me->drawings->get_iterator( ).
WHEN zcl_excel_drawing=>type_chart.
eo_iterator = me->charts->get_iterator( ).
WHEN OTHERS.
ENDCASE.
endmethod.
method GET_NEXT_TABLE_ID.
DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
lo_iterator TYPE REF TO cl_object_collection_iterator,
lv_tables_count TYPE i.
lo_iterator = me->get_worksheets_iterator( ).
WHILE lo_iterator->if_object_collection_iterator~has_next( ) EQ abap_true.
lo_worksheet ?= lo_iterator->if_object_collection_iterator~get_next( ).
lv_tables_count = lo_worksheet->get_tables_size( ).
ADD lv_tables_count TO ep_id.
ENDWHILE.
ADD 1 TO ep_id.
endmethod.
method GET_RANGES_ITERATOR.
eo_iterator = me->ranges->get_iterator( ).
endmethod.
METHOD get_static_cellstyle_guid.
" # issue 139
DATA: style LIKE LINE OF me->t_stylemapping1.
READ TABLE me->t_stylemapping1 INTO style
WITH TABLE KEY dynamic_style_guid = style-guid " no dynamic style --> look for initial guid here
complete_style = ip_cstyle_complete
complete_stylex = ip_cstylex_complete.
IF sy-subrc <> 0.
style-complete_style = ip_cstyle_complete.
style-complete_stylex = ip_cstylex_complete.
* CALL FUNCTION 'GUID_CREATE' " del issue #379 - function is outdated in newer releases
* IMPORTING
* ev_guid_16 = style-guid.
style-guid = zcl_excel_obsolete_func_wrap=>guid_create( ). " ins issue #379 - replacement for outdated function call
INSERT style INTO TABLE me->t_stylemapping1.
INSERT style INTO TABLE me->t_stylemapping2.
ENDIF.
ep_guid = style-guid.
ENDMETHOD.
method GET_STYLES_ITERATOR.
eo_iterator = me->styles->get_iterator( ).
endmethod.
method GET_STYLE_INDEX_IN_STYLES.
DATA: index TYPE syindex.
DATA: lo_iterator TYPE REF TO cl_object_collection_iterator,
lo_style TYPE REF TO zcl_excel_style.
CHECK ip_guid IS NOT INITIAL.
lo_iterator = me->get_styles_iterator( ).
WHILE lo_iterator->has_next( ) = 'X'.
ADD 1 TO index.
lo_style ?= lo_iterator->get_next( ).
IF lo_style->get_guid( ) = ip_guid.
ep_index = index.
EXIT.
ENDIF.
ENDWHILE.
IF ep_index IS INITIAL.
RAISE EXCEPTION TYPE zcx_excel
EXPORTING
error = 'Index not found'.
else.
SUBTRACT 1 from ep_index. " In excel list starts with "0"
ENDIF.
endmethod.
method GET_STYLE_TO_GUID.
" # issue 139
READ TABLE me->t_stylemapping2 INTO ep_stylemapping WITH TABLE KEY guid = ip_guid.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zcx_excel
EXPORTING
error = 'GUID not found'.
ENDIF.
IF ep_stylemapping-dynamic_style_guid IS NOT INITIAL.
zcl_excel_common=>recursive_class_to_struct( EXPORTING i_source = ep_stylemapping-cl_style
CHANGING e_target = ep_stylemapping-complete_style
e_targetx = ep_stylemapping-complete_stylex ).
ENDIF.
endmethod.
method GET_THEME.
eo_theme = theme.
endmethod.
method GET_WORKSHEETS_ITERATOR.
eo_iterator = me->worksheets->get_iterator( ).
endmethod.
method GET_WORKSHEETS_NAME.
ep_name = me->worksheets->name.
endmethod.
METHOD get_worksheets_size.
ep_size = me->worksheets->size( ).
ENDMETHOD.
METHOD get_worksheet_by_index.
DATA: lv_index TYPE zexcel_active_worksheet.
lv_index = iv_index.
eo_worksheet = me->worksheets->get( lv_index ).
ENDMETHOD.
METHOD get_worksheet_by_name.
DATA: lv_index TYPE zexcel_active_worksheet,
l_size TYPE i.
l_size = get_worksheets_size( ).
DO l_size TIMES.
lv_index = sy-index.
eo_worksheet = me->worksheets->get( lv_index ).
IF eo_worksheet->get_title( ) = ip_sheet_name.
RETURN.
ENDIF.
ENDDO.
CLEAR eo_worksheet.
ENDMETHOD.
METHOD set_active_sheet_index.
DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
lv_errormessage TYPE string.
*--------------------------------------------------------------------*
* Check whether worksheet exists
*--------------------------------------------------------------------*
lo_worksheet = me->get_worksheet_by_index( i_active_worksheet ).
IF lo_worksheet IS NOT BOUND.
lv_errormessage = 'Worksheet not existing'(001).
RAISE EXCEPTION TYPE zcx_excel
EXPORTING
error = lv_errormessage.
ENDIF.
me->worksheets->active_worksheet = i_active_worksheet.
ENDMETHOD.
METHOD set_active_sheet_index_by_name.
DATA: ws_it TYPE REF TO cl_object_collection_iterator,
ws TYPE REF TO zcl_excel_worksheet,
lv_title TYPE zexcel_sheet_title,
count TYPE i VALUE 1.
ws_it = me->worksheets->get_iterator( ).
WHILE ws_it->if_object_collection_iterator~has_next( ) = abap_true.
ws ?= ws_it->if_object_collection_iterator~get_next( ).
lv_title = ws->get_title( ).
IF lv_title = i_worksheet_name.
me->worksheets->active_worksheet = count.
EXIT.
ENDIF.
count = count + 1.
ENDWHILE.
ENDMETHOD.
method SET_DEFAULT_STYLE.
me->default_style = ip_style.
endmethod.
method SET_THEME.
theme = io_theme.
endmethod.
method STYLEMAPPING_DYNAMIC_STYLE.
" # issue 139
eo_style2-dynamic_style_guid = ip_style->get_guid( ).
eo_style2-guid = eo_style2-dynamic_style_guid.
eo_style2-added_to_iterator = abap_true.
eo_style2-cl_style = ip_style.
* don't care about attributes here, since this data may change
* dynamically
endmethod.
METHOD zif_excel_book_properties~initialize.
DATA: lv_timestamp TYPE timestampl.
me->zif_excel_book_properties~application = 'Microsoft Excel'.
me->zif_excel_book_properties~appversion = '12.0000'.
GET TIME STAMP FIELD lv_timestamp.
me->zif_excel_book_properties~created = lv_timestamp.
me->zif_excel_book_properties~creator = sy-uname.
me->zif_excel_book_properties~description = zcl_excel=>version.
me->zif_excel_book_properties~modified = lv_timestamp.
me->zif_excel_book_properties~lastmodifiedby = sy-uname.
ENDMETHOD.
method ZIF_EXCEL_BOOK_PROTECTION~INITIALIZE.
me->zif_excel_book_protection~protected = zif_excel_book_protection=>c_unprotected.
me->zif_excel_book_protection~lockrevision = zif_excel_book_protection=>c_unlocked.
me->zif_excel_book_protection~lockstructure = zif_excel_book_protection=>c_unlocked.
me->zif_excel_book_protection~lockwindows = zif_excel_book_protection=>c_unlocked.
CLEAR me->zif_excel_book_protection~workbookpassword.
CLEAR me->zif_excel_book_protection~revisionspassword.
endmethod.
method ZIF_EXCEL_BOOK_VBA_PROJECT~SET_CODENAME.
me->zif_excel_book_vba_project~codename = ip_codename.
endmethod.
method ZIF_EXCEL_BOOK_VBA_PROJECT~SET_CODENAME_PR.
me->zif_excel_book_vba_project~codename_pr = ip_codename_pr.
endmethod.
method ZIF_EXCEL_BOOK_VBA_PROJECT~SET_VBAPROJECT.
me->zif_excel_book_vba_project~vbaproject = ip_vbaproject.
endmethod.
ENDCLASS.
| [
4871,
1168,
5097,
62,
6369,
34,
3698,
6770,
198,
220,
1171,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
20314,
1168,
5064,
62,
6369,
34,
3698,
62,
39453,
62,
4805,
3185,
17395,
11015,
764,
198,
220,
20314,
1168,
5064,
62,
6369,
34,
3698,
62,
39453,
62,
4805,
2394,
24565,
764,
198,
220,
20314,
1168,
5064,
62,
6369,
34,
3698,
62,
39453,
62,
53,
4339,
62,
31190,
23680,
764,
628,
220,
1366,
20978,
43300,
62,
47,
1847,
2767,
9328,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
2538,
38,
43300,
62,
47,
1847,
2767,
9328,
1100,
12,
8807,
764,
198,
220,
1366,
10729,
4261,
9050,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
23683,
4261,
9050,
764,
198,
220,
1366,
23210,
62,
51,
3620,
6489,
6158,
2099,
1395,
37,
24639,
764,
628,
220,
5050,
25823,
62,
4221,
3620,
36,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
4221,
3620,
36,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
4221,
3620,
36,
764,
198,
220,
5050,
17151,
62,
4221,
3620,
36,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
4720,
62,
4221,
3620,
36,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
4221,
3620,
36,
764,
198,
220,
5050,
27841,
62,
13965,
62,
39371,
19238,
4146,
5781,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
9693,
36,
2767,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
13252,
62,
39371,
19238,
4146,
5781,
8,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
39371,
19238,
4146,
5781,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
6369,
34,
3698,
764,
198,
220,
5050,
27841,
62,
13965,
62,
35,
20530,
2751,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
25216,
2099,
1168,
6369,
34,
3698,
62,
35,
20530,
2751,
62,
25216,
4277,
1168,
5097,
62,
6369,
34,
3698,
62,
35,
20530,
2751,
14804,
25216,
62,
3955,
11879,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
49560,
2538,
2099,
43749,
7336,
11902,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
4720,
62,
35,
20530,
2751,
8,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
35,
20530,
2751,
764,
198,
220,
5050,
27841,
62,
13965,
62,
49,
27746,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
4720,
62,
49,
27746,
8,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
49,
27746,
764,
198,
220,
5050,
27841,
62,
13965,
62,
2257,
56,
2538,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
38,
27586,
2099,
1168,
6369,
34,
3698,
62,
5222,
3069,
62,
2257,
56,
2538,
11902,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
4720,
62,
2257,
56,
2538,
8,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
2257,
56,
2538,
764,
198,
220,
5050,
27841,
62,
13965,
62,
33249,
9693,
36,
2767,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
49560,
2538,
2099,
1168,
6369,
34,
3698,
62,
9693,
36,
2767,
62,
49560,
2538,
11902,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
4720,
62,
33249,
9693,
36,
2767,
8,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
6369,
34,
3698,
764,
198,
220,
5050,
27841,
62,
35744,
2149,
62,
2257,
56,
28378,
764,
198,
220,
5050,
7102,
46126,
1581,
764,
198,
220,
5050,
5550,
2538,
9328,
62,
33249,
9693,
36,
2767,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
33249,
9693,
36,
2767,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
6369,
34,
3698,
764,
198,
220,
5050,
5550,
2538,
9328,
62,
33249,
9693,
36,
2767,
62,
17513,
62,
20608,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
49560,
2538,
2099,
43749,
7336,
764,
198,
220,
5050,
5550,
2538,
9328,
62,
33249,
9693,
36,
2767,
62,
17513,
62,
12115,
6369,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
12115,
6369,
2099,
36871,
1137,
2149,
764,
198,
220,
5050,
17151,
62,
10659,
9306,
62,
9693,
36,
2767,
62,
12115,
6369,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
62,
10659,
9306,
62,
33249,
9693,
36,
2767,
8,
2099,
1168,
6369,
34,
3698,
62,
10659,
9306,
62,
33249,
9693,
36,
2767,
764,
198,
220,
5050,
17151,
62,
10659,
9306,
62,
33249,
9693,
36,
2767,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
4720,
62,
33249,
9693,
36,
2767,
8,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
764,
198,
220,
5050,
17151,
62,
39371,
19238,
4146,
51,
4877,
62,
2200,
24302,
18310,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
13252,
62,
39371,
19238,
4146,
51,
4877,
8,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
39371,
19238,
4146,
51,
4877,
764,
198,
220,
5050,
17151,
62,
7206,
38865,
62,
2257,
56,
2538,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
8905,
62,
2257,
56,
2538,
8,
2099,
1168,
6369,
34,
3698,
62,
5222,
3069,
62,
2257,
56,
2538,
764,
198,
220,
5050,
17151,
62,
35,
20530,
20754,
62,
2043,
1137,
25633,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
25216,
2099,
1168,
6369,
34,
3698,
62,
35,
20530,
2751
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_gui_asset_manager DEFINITION PUBLIC FINAL CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abapgit_gui_asset_manager.
TYPES:
BEGIN OF ty_asset_entry.
INCLUDE TYPE zif_abapgit_gui_asset_manager~ty_web_asset.
TYPES: mime_name TYPE wwwdatatab-objid,
END OF ty_asset_entry ,
ty_asset_register TYPE STANDARD TABLE OF ty_asset_entry WITH KEY url.
METHODS register_asset
IMPORTING
!iv_url TYPE string
!iv_type TYPE string
!iv_cachable TYPE abap_bool DEFAULT abap_true
!iv_mime_name TYPE wwwdatatab-objid OPTIONAL
!iv_base64 TYPE string OPTIONAL
!iv_inline TYPE string OPTIONAL .
PROTECTED SECTION.
PRIVATE SECTION.
DATA mt_asset_register TYPE ty_asset_register.
METHODS get_mime_asset
IMPORTING
iv_mime_name TYPE c
RETURNING
VALUE(rv_xdata) TYPE xstring
RAISING
zcx_abapgit_exception.
METHODS load_asset
IMPORTING
is_asset_entry TYPE ty_asset_entry
RETURNING
VALUE(rs_asset) TYPE zif_abapgit_gui_asset_manager~ty_web_asset
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS zcl_abapgit_gui_asset_manager IMPLEMENTATION.
METHOD get_mime_asset.
DATA: ls_key TYPE wwwdatatab,
lv_size_c TYPE wwwparams-value,
lv_size TYPE i,
lt_w3mime TYPE STANDARD TABLE OF w3mime.
ls_key-relid = 'MI'.
ls_key-objid = iv_mime_name.
" Get exact file size
CALL FUNCTION 'WWWPARAMS_READ'
EXPORTING
relid = ls_key-relid
objid = ls_key-objid
name = 'filesize'
IMPORTING
value = lv_size_c
EXCEPTIONS
entry_not_exists = 1.
IF sy-subrc IS NOT INITIAL.
RETURN.
ENDIF.
lv_size = lv_size_c.
" Get binary data
CALL FUNCTION 'WWWDATA_IMPORT'
EXPORTING
key = ls_key
TABLES
mime = lt_w3mime
EXCEPTIONS
wrong_object_type = 1
import_error = 2.
IF sy-subrc IS NOT INITIAL.
RETURN.
ENDIF.
rv_xdata = zcl_abapgit_convert=>bintab_to_xstring(
iv_size = lv_size
it_bintab = lt_w3mime ).
ENDMETHOD.
METHOD load_asset.
MOVE-CORRESPONDING is_asset_entry TO rs_asset.
IF rs_asset-content IS INITIAL AND is_asset_entry-mime_name IS NOT INITIAL.
" inline content has the priority
rs_asset-content = get_mime_asset( is_asset_entry-mime_name ).
ENDIF.
IF rs_asset-content IS INITIAL.
zcx_abapgit_exception=>raise( |failed to load GUI asset: { is_asset_entry-url }| ).
ENDIF.
ENDMETHOD.
METHOD register_asset.
DATA ls_asset LIKE LINE OF mt_asset_register.
SPLIT iv_type AT '/' INTO ls_asset-type ls_asset-subtype.
ls_asset-url = iv_url.
ls_asset-mime_name = iv_mime_name.
ls_asset-is_cacheable = iv_cachable.
IF iv_base64 IS NOT INITIAL.
ls_asset-content = zcl_abapgit_convert=>base64_to_xstring( iv_base64 ).
ELSEIF iv_inline IS NOT INITIAL.
ls_asset-content = zcl_abapgit_convert=>string_to_xstring( iv_inline ).
ENDIF.
APPEND ls_asset TO mt_asset_register.
ENDMETHOD.
METHOD zif_abapgit_gui_asset_manager~get_all_assets.
FIELD-SYMBOLS <ls_a> LIKE LINE OF mt_asset_register.
LOOP AT mt_asset_register ASSIGNING <ls_a>.
APPEND load_asset( <ls_a> ) TO rt_assets.
ENDLOOP.
ENDMETHOD.
METHOD zif_abapgit_gui_asset_manager~get_asset.
FIELD-SYMBOLS <ls_a> LIKE LINE OF mt_asset_register.
READ TABLE mt_asset_register WITH KEY url = iv_url ASSIGNING <ls_a>.
IF <ls_a> IS NOT ASSIGNED.
zcx_abapgit_exception=>raise( |Cannot find GUI asset: { iv_url }| ).
ENDIF.
rs_asset = load_asset( <ls_a> ).
ENDMETHOD.
METHOD zif_abapgit_gui_asset_manager~get_text_asset.
DATA ls_asset TYPE zif_abapgit_gui_asset_manager~ty_web_asset.
ls_asset = zif_abapgit_gui_asset_manager~get_asset( iv_url ).
IF ls_asset-type <> 'text'.
zcx_abapgit_exception=>raise( |Not a text asset: { iv_url }| ).
ENDIF.
IF iv_assert_subtype IS NOT INITIAL AND ls_asset-subtype <> iv_assert_subtype.
zcx_abapgit_exception=>raise( |Wrong subtype ({ iv_assert_subtype }): { iv_url }| ).
ENDIF.
rv_asset = zcl_abapgit_convert=>xstring_to_string_utf8( ls_asset-content ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
562,
316,
62,
37153,
5550,
20032,
17941,
44731,
25261,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
562,
316,
62,
37153,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
562,
316,
62,
13000,
13,
198,
220,
220,
220,
220,
220,
220,
220,
3268,
5097,
52,
7206,
41876,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
562,
316,
62,
37153,
93,
774,
62,
12384,
62,
562,
316,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
285,
524,
62,
3672,
41876,
7324,
19608,
265,
397,
12,
26801,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
562,
316,
62,
13000,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
62,
562,
316,
62,
30238,
41876,
49053,
9795,
43679,
3963,
1259,
62,
562,
316,
62,
13000,
13315,
35374,
19016,
13,
628,
220,
220,
220,
337,
36252,
50,
7881,
62,
562,
316,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
66,
34446,
220,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
76,
524,
62,
3672,
41876,
7324,
19608,
265,
397,
12,
26801,
312,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8692,
2414,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
45145,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
764,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42865,
45079,
62,
562,
316,
62,
30238,
41876,
1259,
62,
562,
316,
62,
30238,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
76,
524,
62,
562,
316,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
76,
524,
62,
3672,
220,
220,
220,
41876,
269,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
87,
7890,
8,
41876,
2124,
8841,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
220,
220,
337,
36252,
50,
3440,
62,
562,
316,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
562,
316,
62,
13000,
220,
41876,
1259,
62,
562,
316,
62,
13000,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
562,
316,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
562,
316,
62,
37153,
93,
774,
62,
12384,
62,
562,
316,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
562,
316,
62,
37153,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
651,
62,
76,
524,
62,
562,
316,
13,
628,
220,
220,
220,
42865,
25,
43979,
62,
2539,
220,
220,
220,
41876,
7324,
19608,
265,
397,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
7857,
62,
66,
41876,
7324,
37266,
12,
8367,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
7857,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
86,
18,
76,
524,
41876,
49053,
9795,
43679,
3963,
266,
18,
76,
524,
13,
628,
220,
220,
220,
43979,
62,
2539,
12,
2411,
312,
796,
705,
8895,
4458,
198,
220,
220,
220,
43979,
62,
2539,
12,
26801,
312,
796,
21628,
62,
76,
524,
62,
3672,
13,
628,
220,
220,
220,
366,
3497,
2748,
2393,
2546,
198,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
17947,
25527,
1503,
40834,
62,
15675,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
823,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
43979,
62,
2539,
12,
2411,
312,
198,
220,
220,
220,
220,
220,
220,
220,
26181,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
43979,
62,
2539,
12,
26801,
312,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
16624,
1096,
6,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
7857,
62,
66,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
5726,
62,
1662,
62,
1069,
1023,
796,
352,
13,
628,
220,
220,
220,
16876,
827,
12,
7266,
6015,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
300,
85,
62,
7857,
796,
300,
85,
62,
7857,
62,
66,
13,
628,
220,
220,
220,
366,
3497,
13934,
1366,
198,
220,
220,
220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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class lcl_test definition for testing
duration short
risk level harmless.
private section.
data:
anon_log type ref to zif_logger,
named_log type ref to zif_logger,
reopened_log type ref to zif_logger.
class-methods:
class_setup.
methods:
setup,
teardown,
get_first_message
importing log_handle type balloghndl
returning value(msg) type char255,
get_messages
importing
log_handle type balloghndl
exporting
texts type table_of_strings
msg_details type bal_tt_msg,
format_message
importing id like sy-msgid default sy-msgid
lang type langu default '-'
no like sy-msgno default sy-msgno
v1 like sy-msgv1 default sy-msgv1
v2 like sy-msgv2 default sy-msgv2
v3 like sy-msgv3 default sy-msgv3
v4 like sy-msgv4 default sy-msgv4
returning value(msg) type string,
can_create_anon_log for testing,
can_create_named_log for testing,
can_reopen_log for testing,
can_create_expiring_log_days for testing,
can_create_expiring_log_date for testing,
can_open_or_create for testing,
can_add_log_context for testing,
can_add_to_log for testing,
can_add_to_named_log for testing,
auto_saves_named_log for testing,
auto_saves_reopened_log for testing,
can_log_string for testing,
can_log_char for testing,
can_log_bapiret1 for testing,
can_log_bapiret2 for testing,
can_log_bapi_coru_return for testing,
can_log_bapi_order_return for testing,
can_log_rcomp for testing,
can_log_prott for testing,
can_log_bapirettab for testing,
can_log_err for testing,
can_log_chained_exceptions for testing,
can_log_batch_msgs for testing,
can_log_any_simple_structure for testing,
can_log_any_deep_structure for testing,
can_add_msg_context for testing,
can_add_callback_sub for testing,
can_add_callback_fm for testing,
must_use_factory for testing,
can_use_and_chain_aliases for testing,
return_proper_status for testing,
return_proper_length for testing,
can_add_table_msg_context FOR TESTING RAISING cx_static_check.
endclass. "lcl_Test
class lcl_test implementation.
method class_setup.
zcl_logger=>new(
object = 'ABAPUNIT'
subobject = 'LOGGER'
desc = 'Log saved in database' )->add( 'This message is in the database' ).
endmethod.
method setup.
anon_log = zcl_logger=>new( ).
named_log = zcl_logger=>new( object = 'ABAPUNIT'
subobject = 'LOGGER'
desc = `Hey it's a log` ).
reopened_log = zcl_logger=>open( object = 'ABAPUNIT'
subobject = 'LOGGER'
desc = 'Log saved in database' ).
endmethod.
method can_create_anon_log.
cl_aunit_assert=>assert_bound(
act = anon_log
msg = 'Cannot Instantiate Anonymous Log' ).
endmethod.
method can_create_named_log.
cl_aunit_assert=>assert_bound(
act = named_log
msg = 'Cannot Instantiate Named Log' ).
endmethod.
method can_create_expiring_log_days.
data expiring_log type ref to zif_logger.
data act_header type bal_s_log.
constants days_until_log_can_be_deleted type i value 365.
expiring_log = zcl_logger_factory=>create_log(
object = 'ABAPUNIT'
subobject = 'LOGGER'
desc = 'Log that is not deletable and expiring'
settings = zcl_logger_factory=>create_settings(
)->set_expiry_in_days( days_until_log_can_be_deleted
)->set_must_be_kept_until_expiry( abap_true )
).
cl_aunit_assert=>assert_bound(
act = expiring_log
msg = 'Cannot Instantiate Expiring Log' ).
call function 'BAL_LOG_HDR_READ'
exporting
i_log_handle = expiring_log->handle
importing
e_s_log = act_header.
data lv_exp type d.
lv_exp = sy-datum + days_until_log_can_be_deleted.
cl_aunit_assert=>assert_equals(
exporting
exp = lv_exp
act = act_header-aldate_del
msg = 'Log is not expiring in correct amount of days'
).
cl_aunit_assert=>assert_equals(
exporting
exp = abap_true
act = act_header-del_before
msg = 'Log should not be deletable before expiry date'
).
endmethod.
method can_create_expiring_log_date.
data expiring_log type ref to zif_logger.
data act_header type bal_s_log.
constants days_until_log_can_be_deleted type i value 365.
data lv_expire type d.
lv_expire = sy-datum + days_until_log_can_be_deleted.
expiring_log = zcl_logger_factory=>create_log(
object = 'ABAPUNIT'
subobject = 'LOGGER'
desc = 'Log that is not deletable and expiring'
settings = zcl_logger_factory=>create_settings(
)->set_expiry_date( lv_expire
)->set_must_be_kept_until_expiry( abap_true )
).
cl_aunit_assert=>assert_bound(
act = expiring_log
msg = 'Cannot Instantiate Expiring Log' ).
call function 'BAL_LOG_HDR_READ'
exporting
i_log_handle = expiring_log->handle
importing
e_s_log = act_header.
cl_aunit_assert=>assert_equals(
exporting
exp = lv_expire
act = act_header-aldate_del
msg = 'Log is not expiring on correct date'
).
cl_aunit_assert=>assert_equals(
exporting
exp = abap_true
act = act_header-del_before
msg = 'Log should not be deletable before expiry date'
).
endmethod.
method can_reopen_log.
cl_aunit_assert=>assert_bound(
act = reopened_log
msg = 'Cannot Reopen Log from DB' ).
endmethod.
method can_open_or_create.
data: created_log type ref to zif_logger,
handles type bal_t_logh.
call function 'BAL_GLB_MEMORY_REFRESH'. "Close Logs
reopened_log = zcl_logger=>open( object = 'ABAPUNIT'
subobject = 'LOGGER'
desc = 'Log saved in database'
create_if_does_not_exist = abap_true ).
created_log = zcl_logger=>open( object = 'ABAPUNIT'
subobject = 'LOGGER'
desc = 'Log not in database'
create_if_does_not_exist = abap_true ).
call function 'BAL_GLB_SEARCH_LOG'
importing
e_t_log_handle = handles.
cl_aunit_assert=>assert_equals(
exp = 2
act = lines( handles )
msg = 'Did not create nonexistent log from OPEN' ).
endmethod.
method can_add_log_context.
data: log type ref to zif_logger,
random_country_data type t005t,
act_header type bal_s_log.
random_country_data-mandt = sy-mandt.
random_country_data-spras = 'D'.
random_country_data-land1 = 'DE'.
log = zcl_logger=>new( context = random_country_data ).
call function 'BAL_LOG_HDR_READ'
exporting
i_log_handle = log->handle
importing
e_s_log = act_header.
cl_aunit_assert=>assert_equals(
exp = 'T005T'
act = act_header-context-tabname
msg = 'Did not add context to log' ).
cl_aunit_assert=>assert_equals(
exp = random_country_data
act = act_header-context-value
msg = 'Did not add context to log' ).
endmethod.
method can_add_to_log.
data: dummy type c.
message s001(00) with 'I' 'test' 'the' 'logger.' into dummy.
anon_log->add( ).
cl_aunit_assert=>assert_equals(
exp = 'Itestthelogger.'
act = get_first_message( anon_log->handle )
msg = 'Did not log system message properly' ).
endmethod.
method can_add_to_named_log.
data: dummy type c.
message s001(00) with 'Testing' 'a' 'named' 'logger.' into dummy.
named_log->add( ).
cl_aunit_assert=>assert_equals(
exp = 'Testinganamedlogger.'
act = get_first_message( named_log->handle )
msg = 'Did not write to named log' ).
endmethod.
method auto_saves_named_log.
data: dummy type c,
log_numbers type bal_t_logn,
msg type string.
message s000(sabp_unit) with 'Testing' 'logger' 'that' 'saves.' into dummy.
named_log->add( ).
msg = format_message( ).
call function 'BAL_GLB_MEMORY_REFRESH'.
append named_log->db_number to log_numbers.
call function 'BAL_DB_LOAD'
exporting
i_t_lognumber = log_numbers.
cl_aunit_assert=>assert_equals(
exp = msg
act = get_first_message( named_log->handle )
msg = 'Did not write to named log' ).
endmethod.
method auto_saves_reopened_log.
data: log_numbers type bal_t_logn,
act_texts type table_of_strings,
act_text type string.
reopened_log->add( 'This is another message in the database' ).
call function 'BAL_GLB_MEMORY_REFRESH'.
append reopened_log->db_number to log_numbers.
call function 'BAL_DB_LOAD'
exporting
i_t_lognumber = log_numbers.
get_messages( exporting log_handle = reopened_log->handle
importing texts = act_texts ).
read table act_texts index 1 into act_text.
cl_aunit_assert=>assert_equals(
exp = 'This message is in the database'
act = act_text
msg = 'Did not autosave to reopened log' ).
read table act_texts index 2 into act_text.
cl_aunit_assert=>assert_equals(
exp = 'This is another message in the database'
act = act_text
msg = 'Did not autosave to reopened log' ).
endmethod.
method can_log_string.
data: stringmessage type string value `Logging a string, guys!`.
anon_log->add( stringmessage ).
cl_aunit_assert=>assert_equals(
exp = stringmessage
act = get_first_message( anon_log->handle )
msg = 'Did not log system message properly' ).
endmethod.
method can_log_char.
data: charmessage type char70 value 'Logging a char sequence!'.
anon_log->add( charmessage ).
cl_aunit_assert=>assert_equals(
exp = charmessage
act = get_first_message( anon_log->handle )
msg = 'Did not log system message properly' ).
endmethod.
method can_log_bapiret1.
data: bapi_msg type bapiret1,
msg_handle type balmsghndl,
expected_details type bal_s_msg,
actual_details type bal_s_msg,
actual_text type char200.
expected_details-msgty = bapi_msg-type = 'W'.
expected_details-msgid = bapi_msg-id = 'BL'.
expected_details-msgno = bapi_msg-number = '001'.
expected_details-msgv1 = bapi_msg-message_v1 = 'This'.
expected_details-msgv2 = bapi_msg-message_v2 = 'is'.
expected_details-msgv3 = bapi_msg-message_v3 = 'a'.
expected_details-msgv4 = bapi_msg-message_v4 = 'test'.
anon_log->add( bapi_msg ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = actual_details
e_txt_msg = actual_text.
cl_aunit_assert=>assert_not_initial(
act = actual_details-time_stmp
msg = 'Did not log system message properly' ).
expected_details-msg_count = 1.
clear actual_details-time_stmp.
cl_aunit_assert=>assert_equals(
exp = expected_details
act = actual_details
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = 'This is a test'
act = condense( actual_text )
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = abap_true
act = anon_log->has_warnings( )
msg = 'Did not log or fetch system message properly'
).
endmethod.
method can_log_bapiret2.
data: bapi_msg type bapiret2,
msg_handle type balmsghndl,
expected_details type bal_s_msg,
actual_details type bal_s_msg,
actual_text type char200.
expected_details-msgty = bapi_msg-type = 'W'.
expected_details-msgid = bapi_msg-id = 'BL'.
expected_details-msgno = bapi_msg-number = '001'.
expected_details-msgv1 = bapi_msg-message_v1 = 'This'.
expected_details-msgv2 = bapi_msg-message_v2 = 'is'.
expected_details-msgv3 = bapi_msg-message_v3 = 'a'.
expected_details-msgv4 = bapi_msg-message_v4 = 'test'.
anon_log->add( bapi_msg ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = actual_details
e_txt_msg = actual_text.
cl_aunit_assert=>assert_not_initial(
act = actual_details-time_stmp
msg = 'Did not log system message properly' ).
expected_details-msg_count = 1.
clear actual_details-time_stmp.
cl_aunit_assert=>assert_equals(
exp = expected_details
act = actual_details
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = 'This is a test'
act = condense( actual_text )
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = abap_true
act = anon_log->has_warnings( )
msg = 'Did not log or fetch system message properly'
).
endmethod.
method can_log_bapi_coru_return.
data: bapi_msg type bapi_coru_return,
msg_handle type balmsghndl,
expected_details type bal_s_msg,
actual_details type bal_s_msg,
actual_text type char200.
expected_details-msgty = bapi_msg-type = 'W'.
expected_details-msgid = bapi_msg-id = 'BL'.
expected_details-msgno = bapi_msg-number = '001'.
expected_details-msgv1 = bapi_msg-message_v1 = 'This'.
expected_details-msgv2 = bapi_msg-message_v2 = 'is'.
expected_details-msgv3 = bapi_msg-message_v3 = 'a'.
expected_details-msgv4 = bapi_msg-message_v4 = 'test'.
anon_log->add( bapi_msg ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = actual_details
e_txt_msg = actual_text.
cl_aunit_assert=>assert_not_initial(
act = actual_details-time_stmp
msg = 'Did not log system message properly' ).
expected_details-msg_count = 1.
clear actual_details-time_stmp.
cl_aunit_assert=>assert_equals(
exp = expected_details
act = actual_details
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = 'This is a test'
act = condense( actual_text )
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = abap_true
act = anon_log->has_warnings( )
msg = 'Did not log or fetch system message properly'
).
endmethod.
method can_log_bapi_order_return.
data: msg_handle type balmsghndl,
expected_details type bal_s_msg,
actual_details type bal_s_msg,
actual_text type char200.
"Solution manager doens't have BAPI_ORDER_RETURN. Therefore avoid using the concrete type
DATA bapi_order_return_data_ref TYPE REF TO DATA.
DATA bapi_return_temp TYPE bapiret2."these fields have the same name as BAPI_ORDER_RETURN
FIELD-SYMBOLS <bapi_order_return_structure> TYPE ANY.
TRY.
CREATE DATA bapi_order_return_data_ref TYPE ('BAPI_ORDER_RETURN').
CATCH CX_SY_CREATE_DATA_ERROR.
RETURN."Non ECC System such as SolutionManager
ENDTRY.
ASSIGN bapi_order_return_data_ref->* TO <bapi_order_return_structure>.
expected_details-msgty = bapi_return_temp-type = 'E'.
expected_details-msgid = bapi_return_temp-id = 'BL'.
expected_details-msgno = bapi_return_temp-number = '001'.
expected_details-msgv1 = bapi_return_temp-message_v1 = 'This'.
expected_details-msgv2 = bapi_return_temp-message_v2 = 'is'.
expected_details-msgv3 = bapi_return_temp-message_v3 = 'a'.
expected_details-msgv4 = bapi_return_temp-message_v4 = 'test'.
MOVE-CORRESPONDING bapi_return_temp TO <bapi_order_return_structure>.
anon_log->add( <bapi_order_return_structure> ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = actual_details
e_txt_msg = actual_text.
cl_aunit_assert=>assert_not_initial(
act = actual_details-time_stmp
msg = 'Did not log system message properly' ).
expected_details-msg_count = 1.
clear actual_details-time_stmp.
cl_aunit_assert=>assert_equals(
exp = expected_details
act = actual_details
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = 'This is a test'
act = condense( actual_text )
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = abap_true
act = anon_log->has_errors( )
msg = 'Did not log or fetch system message properly'
).
endmethod.
method can_log_rcomp.
data:
msg_handle type balmsghndl,
expected_details type bal_s_msg,
actual_details type bal_s_msg,
actual_text type char200.
"Solution manager doens't have PROTT. Therefore avoid using the concrete type
DATA rcomp_data_ref TYPE REF TO DATA.
FIELD-SYMBOLS <rcomp_structure> TYPE ANY.
TRY.
CREATE DATA rcomp_data_ref TYPE ('RCOMP').
CATCH CX_SY_CREATE_DATA_ERROR.
RETURN."Non ECC System such as SolutionManager
ENDTRY.
ASSIGN rcomp_data_ref->* TO <rcomp_structure>.
expected_details-msgty = 'E'.
expected_details-msgid = 'BL'.
expected_details-msgno = '001'.
expected_details-msgv1 = 'This'.
expected_details-msgv2 = 'is'.
expected_details-msgv3 = 'a'.
expected_details-msgv4 = 'test'.
MOVE-CORRESPONDING expected_details TO <rcomp_structure>.
anon_log->add( <rcomp_structure> ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = actual_details
e_txt_msg = actual_text.
cl_aunit_assert=>assert_not_initial(
act = actual_details-time_stmp
msg = 'Did not log system message properly' ).
expected_details-msg_count = 1.
clear actual_details-time_stmp.
cl_aunit_assert=>assert_equals(
exp = expected_details
act = actual_details
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = 'This is a test'
act = condense( actual_text )
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = abap_true
act = anon_log->has_errors( )
msg = 'Did not log or fetch system message properly'
).
endmethod.
METHOD can_log_prott.
data: msg_handle type balmsghndl,
expected_details type bal_s_msg,
actual_details type bal_s_msg,
actual_text type char200.
"Solution manager doens't have PROTT. Therefore avoid using the concrete type
DATA prott_data_ref TYPE REF TO DATA.
FIELD-SYMBOLS <prott_structure> TYPE ANY.
TRY.
CREATE DATA prott_data_ref TYPE ('PROTT').
CATCH CX_SY_CREATE_DATA_ERROR.
RETURN."Non ECC System such as SolutionManager
ENDTRY.
ASSIGN prott_data_ref->* TO <prott_structure>.
expected_details-msgty = 'W'.
expected_details-msgid = 'BL'.
expected_details-msgno = '001'.
expected_details-msgv1 = 'This'.
expected_details-msgv2 = 'is'.
expected_details-msgv3 = 'a'.
expected_details-msgv4 = 'test'.
MOVE-CORRESPONDING expected_details TO <prott_structure>.
anon_log->add( <prott_structure> ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = actual_details
e_txt_msg = actual_text.
cl_aunit_assert=>assert_not_initial(
act = actual_details-time_stmp
msg = 'Did not log system message properly' ).
expected_details-msg_count = 1.
clear actual_details-time_stmp.
cl_aunit_assert=>assert_equals(
exp = expected_details
act = actual_details
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = 'This is a test'
act = condense( actual_text )
msg = 'Did not log system message properly' ).
cl_aunit_assert=>assert_equals(
exp = abap_true
act = anon_log->has_warnings( )
msg = 'Did not log or fetch system message properly'
).
ENDMETHOD.
method can_log_bapirettab.
data: bapi_messages type bapirettab,
bapi_msg type bapiret2,
exp_texts type table_of_strings,
exp_text type string,
exp_details type bal_tt_msg,
exp_detail type bal_s_msg,
act_texts type table_of_strings,
act_text type string,
act_details type bal_tt_msg,
act_detail type bal_s_msg.
define bapiret_messages_are.
exp_detail-msgty = bapi_msg-type = &1.
exp_detail-msgid = bapi_msg-id = &2.
exp_detail-msgno = bapi_msg-number = &3.
exp_detail-msgv1 = bapi_msg-message_v1 = &4.
exp_detail-msgv2 = bapi_msg-message_v2 = &5.
exp_detail-msgv3 = bapi_msg-message_v3 = &6.
exp_detail-msgv4 = bapi_msg-message_v4 = &7.
exp_text = |{ exp_detail-msgv1 } { exp_detail-msgv2 } {
exp_detail-msgv3 } { exp_detail-msgv4 }|.
APPEND bapi_msg TO bapi_messages.
APPEND exp_detail TO exp_details.
APPEND exp_text TO exp_texts.
end-of-definition.
bapiret_messages_are: 'S' 'BL' '001' 'This' 'is' 'happy' 'message',
'W' 'BL' '001' 'This' 'is' 'warning' 'message',
'E' 'BL' '001' 'This' 'is' 'angry' 'message'.
anon_log->add( bapi_messages ).
get_messages( exporting log_handle = anon_log->handle
importing texts = act_texts
msg_details = act_details ).
do 3 times.
read table act_details into act_detail index sy-index.
read table exp_details into exp_detail index sy-index.
cl_aunit_assert=>assert_not_initial(
act = act_detail-time_stmp
msg = 'Did not log system message properly' ).
exp_detail-msg_count = 1.
clear act_detail-time_stmp.
cl_aunit_assert=>assert_equals(
exp = exp_detail
act = act_detail
msg = 'Did not log bapirettab properly' ).
read table act_texts into act_text index sy-index.
read table exp_texts into exp_text index sy-index.
cl_aunit_assert=>assert_equals(
exp = exp_text
act = condense( act_text )
msg = 'Did not log bapirettab properly' ).
enddo.
endmethod.
method can_log_err.
data: impossible_int type i,
err type ref to cx_sy_zerodivide,
act_txt type char255,
exp_txt type char255,
long_text type string,
msg_handle type balmsghndl.
try.
impossible_int = 1 / 0. "Make an error!
catch cx_sy_zerodivide into err.
anon_log->add( err ).
exp_txt = err->if_message~get_text( ).
long_text = err->if_message~get_longtext( ).
endtry.
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_EXCEPTION_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_txt_msg = act_txt.
cl_aunit_assert=>assert_equals(
exp = exp_txt "'Division by zero'
act = act_txt
msg = 'Did not log throwable correctly' ).
endmethod.
method can_log_chained_exceptions.
data: main_exception type ref to lcx_t100,
previous_exception type ref to lcx_t100,
catched_exception type ref to lcx_t100,
msg_handle type balmsghndl,
act_texts type table_of_strings,
act_text type string.
define exceptions_are.
create object main_exception
exporting
previous = previous_exception
id = &1
no = &2
msgv1 = &3
msgv2 = &4
msgv3 = &5
msgv4 = &6.
previous_exception = main_exception.
end-of-definition.
"Given
exceptions_are:
'SABP_UNIT' '010' '' '' '' '',
'SABP_UNIT' '030' '' '' '' '',
'SABP_UNIT' '000' 'This' 'is' 'test' 'message'.
"When
try.
raise exception main_exception.
catch lcx_t100 into catched_exception.
anon_log->add( catched_exception ).
endtry.
"Then
get_messages( exporting log_handle = anon_log->handle
importing texts = act_texts ).
read table act_texts index 1 into act_text.
cl_aunit_assert=>assert_equals(
exp = format_message( id = 'SABP_UNIT' no = 010 ) " 'Message 1'
act = act_text
msg = 'Did not log chained exception correctly' ).
read table act_texts index 2 into act_text.
cl_aunit_assert=>assert_equals(
exp = format_message( id = 'SABP_UNIT' no = 030 ) " 'Message 2'
act = act_text
msg = 'Did not log chained exception correctly' ).
read table act_texts index 3 into act_text.
cl_aunit_assert=>assert_equals(
exp = format_message( id = 'SABP_UNIT' no = 000 v1 = 'This' v2 = 'is' v3 = 'test' v4 = 'message' ) " 'Message: This is test message'
act = act_text
msg = 'Did not log chained exception correctly' ).
endmethod.
method can_log_batch_msgs.
data: batch_msgs type table of bdcmsgcoll,
batch_msg type bdcmsgcoll,
act_texts type table_of_strings,
act_text type string.
define batch_messages_are.
batch_msg-msgtyp = &1.
batch_msg-msgid = &2.
batch_msg-msgnr = &3.
batch_msg-msgv1 = &4.
batch_msg-msgv2 = &5.
batch_msg-msgv3 = &6.
batch_msg-msgv4 = &7.
APPEND batch_msg TO batch_msgs.
end-of-definition.
batch_messages_are:
'S' 'SABP_UNIT' '010' '' '' '' '',
'S' 'SABP_UNIT' '030' '' '' '' '',
'S' 'SABP_UNIT' '000' 'This' 'is' 'test' 'message'.
anon_log->add( batch_msgs ).
get_messages( exporting log_handle = anon_log->handle
importing texts = act_texts ).
read table act_texts index 1 into act_text.
cl_aunit_assert=>assert_equals(
exp = format_message( id = 'SABP_UNIT' no = 010 ) " 'Message 1'
act = act_text
msg = 'Did not log BDC return messages correctly' ).
read table act_texts index 2 into act_text.
cl_aunit_assert=>assert_equals(
exp = format_message( id = 'SABP_UNIT' no = 030 ) " 'Message 2'
act = act_text
msg = 'Did not log BDC return messages correctly' ).
read table act_texts index 3 into act_text.
cl_aunit_assert=>assert_equals(
exp = format_message( id = 'SABP_UNIT' no = 000 v1 = 'This' v2 = 'is' v3 = 'test' v4 = 'message' ) " 'Message: This is test message'
act = act_text
msg = 'Did not log BDC return messages correctly' ).
endmethod.
method can_log_any_simple_structure.
types: begin of ty_struct,
comp1 type string,
comp2 type i,
end of ty_struct.
data: struct type ty_struct,
act_table type table_of_strings,
exp_table type table_of_strings,
exp_line like line of exp_table,
msg_details type bal_tt_msg.
struct-comp1 = 'Demo'.
struct-comp2 = 5.
anon_log->e( struct ).
get_messages( exporting log_handle = anon_log->handle
importing texts = act_table
msg_details = msg_details ).
exp_line = '--- Begin of structure ---'.
append exp_line to exp_table.
exp_line = 'comp1 = Demo'.
append exp_line to exp_table.
exp_line = 'comp2 = 5'.
append exp_line to exp_table.
exp_line = '--- End of structure ---'.
append exp_line to exp_table.
cl_aunit_assert=>assert_equals(
exp = exp_table
act = act_table
msg = 'Simple structure was not logged correctly'
).
endmethod.
method can_log_any_deep_structure.
types: begin of ty_struct,
comp1 type string,
comp2 type i,
end of ty_struct,
begin of ty_deep_struct,
comp1 type string,
deep type ty_struct,
end of ty_deep_struct.
data: struct type ty_deep_struct,
act_table type table_of_strings,
exp_table type table_of_strings,
exp_line like line of exp_table,
msg_details type bal_tt_msg.
struct-comp1 = 'Demo'.
struct-deep-comp1 = 'Inner component'.
struct-deep-comp2 = 10.
anon_log->e( struct ).
get_messages( exporting log_handle = anon_log->handle
importing texts = act_table
msg_details = msg_details ).
exp_line = '--- Begin of structure ---'.
append exp_line to exp_table.
exp_line = 'comp1 = Demo'.
append exp_line to exp_table.
exp_line = '--- Begin of structure ---'.
append exp_line to exp_table.
exp_line = 'comp1 = Inner component'.
append exp_line to exp_table.
exp_line = 'comp2 = 10'.
append exp_line to exp_table.
exp_line = '--- End of structure ---'.
append exp_line to exp_table.
exp_line = '--- End of structure ---'.
append exp_line to exp_table.
cl_aunit_assert=>assert_equals(
exp = exp_table
act = act_table
msg = 'Deep structure was not logged correctly'
).
endmethod.
method can_add_msg_context.
data: addl_context type bezei20 value 'Berlin', "data element from dictionary!
msg_handle type balmsghndl,
act_details type bal_s_msg.
anon_log->add( obj_to_log = 'Here is some text'
context = addl_context ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = act_details.
cl_aunit_assert=>assert_equals(
exp = addl_context
act = act_details-context-value
msg = 'Did not add context correctly' ).
cl_aunit_assert=>assert_equals(
exp = 'BEZEI20'
act = act_details-context-tabname
msg = 'Did not add context correctly' ).
endmethod.
method can_add_table_msg_context.
data: addl_context type bezei20 value 'Berlin', "data element from dictionary!
msg_handle type balmsghndl,
act_details type bal_s_msg.
data msg_table type table_of_strings.
append `Here is some text` to msg_table.
append `Here is some other text` to msg_table.
anon_log->add( obj_to_log = msg_table
context = addl_context ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = act_details.
cl_aunit_assert=>assert_equals(
exp = addl_context
act = act_details-context-value
msg = 'Did not add context correctly' ).
cl_aunit_assert=>assert_equals(
exp = 'BEZEI20'
act = act_details-context-tabname
msg = 'Did not add context correctly' ).
msg_handle-msgnumber = '000002'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = act_details.
cl_aunit_assert=>assert_initial(
act = act_details-context-value
msg = 'Context should only be added to first line' ).
cl_aunit_assert=>assert_initial(
act = act_details-context-tabname
msg = 'Context should only be added to first line' ).
endmethod.
method can_add_callback_sub.
data: msg_handle type balmsghndl,
msg_detail type bal_s_msg,
exp_callback type bal_s_clbk.
anon_log->add( obj_to_log = 'Message with Callback'
callback_form = 'FORM'
callback_prog = 'PROGRAM' ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = msg_detail.
exp_callback-userexitf = 'FORM'.
exp_callback-userexitp = 'PROGRAM'.
exp_callback-userexitt = ' '.
cl_aunit_assert=>assert_equals(
exp = exp_callback
act = msg_detail-params-callback
msg = 'Did not add callback correctly' ).
endmethod.
method can_add_callback_fm.
data: msg_handle type balmsghndl,
msg_detail type bal_s_msg,
exp_callback type bal_s_clbk.
anon_log->add( obj_to_log = 'Message with Callback'
callback_fm = 'FUNCTION' ).
msg_handle-log_handle = anon_log->handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = msg_detail.
exp_callback-userexitf = 'FUNCTION'.
exp_callback-userexitp = ' '.
exp_callback-userexitt = 'F'.
cl_aunit_assert=>assert_equals(
exp = exp_callback
act = msg_detail-params-callback
msg = 'Did not add callback correctly' ).
endmethod.
method must_use_factory.
data: log type ref to object.
try.
create object log type ('ZCL_LOGGER').
cl_aunit_assert=>fail( 'Did not force creation via factory' ).
catch cx_sy_create_object_error.
"PASSED
endtry.
endmethod.
method can_use_and_chain_aliases.
data: texts type table_of_strings,
text type string,
msg_details type bal_tt_msg,
msg_detail type bal_s_msg.
anon_log->a( 'Severe Abort Error!' )->e( |Here's an error!| ).
anon_log->w( 'This is a warning' )->i( `Helpful Information` ).
anon_log->s( 'Great' && 'Success' ).
get_messages( exporting log_handle = anon_log->handle
importing texts = texts
msg_details = msg_details ).
read table texts index 1 into text.
read table msg_details index 1 into msg_detail.
cl_aunit_assert=>assert_equals(
exp = 'A'
act = msg_detail-msgty
msg = 'Didn''t log by alias' ).
cl_aunit_assert=>assert_equals(
exp = 'Severe Abort Error!'
act = text
msg = 'Didn''t log by alias' ).
read table texts index 2 into text.
read table msg_details index 2 into msg_detail.
cl_aunit_assert=>assert_equals(
exp = 'E'
act = msg_detail-msgty
msg = 'Didn''t log by alias' ).
cl_aunit_assert=>assert_equals(
exp = 'Here''s an error!'
act = text
msg = 'Didn''t log by alias' ).
read table texts index 3 into text.
read table msg_details index 3 into msg_detail.
cl_aunit_assert=>assert_equals(
exp = 'W'
act = msg_detail-msgty
msg = 'Didn''t log by alias' ).
cl_aunit_assert=>assert_equals(
exp = 'This is a warning'
act = text
msg = 'Didn''t log by alias' ).
read table texts index 4 into text.
read table msg_details index 4 into msg_detail.
cl_aunit_assert=>assert_equals(
exp = 'I'
act = msg_detail-msgty
msg = 'Didn''t log by alias' ).
cl_aunit_assert=>assert_equals(
exp = 'Helpful Information'
act = text
msg = 'Didn''t log by alias' ).
read table texts index 5 into text.
read table msg_details index 5 into msg_detail.
cl_aunit_assert=>assert_equals(
exp = 'S'
act = msg_detail-msgty
msg = 'Didn''t log by alias' ).
cl_aunit_assert=>assert_equals(
exp = 'GreatSuccess'
act = text
msg = 'Didn''t log by alias' ).
endmethod.
method get_first_message.
data: msg_handle type balmsghndl.
msg_handle-log_handle = log_handle.
msg_handle-msgnumber = '000001'.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_txt_msg = msg.
endmethod.
method get_messages.
data: handle_as_table type bal_t_logh,
message_handles type bal_t_msgh,
msg_handle type balmsghndl,
msg_detail type bal_s_msg,
msg_text type char255.
append log_handle to handle_as_table.
call function 'BAL_GLB_SEARCH_MSG'
exporting
i_t_log_handle = handle_as_table
importing
e_t_msg_handle = message_handles.
loop at message_handles into msg_handle.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = msg_handle
importing
e_s_msg = msg_detail
e_txt_msg = msg_text.
append msg_detail to msg_details.
append msg_text to texts.
endloop.
endmethod.
method format_message.
call function 'FORMAT_MESSAGE'
exporting
id = id
lang = 'E'
no = no
v1 = v1
v2 = v2
v3 = v3
v4 = v4
importing
msg = msg
exceptions
not_found = 1
others = 2.
* TODO: raise abap unit
endmethod.
method teardown.
call function 'BAL_GLB_MEMORY_REFRESH'.
endmethod.
method return_proper_status.
cl_aunit_assert=>assert_not_initial(
act = anon_log->is_empty( )
msg = 'Not empty at start' ).
anon_log->s( 'success' ).
anon_log->i( 'info' ).
cl_aunit_assert=>assert_initial(
act = anon_log->is_empty( )
msg = 'Empty after add' ).
cl_aunit_assert=>assert_initial(
act = anon_log->has_errors( )
msg = 'Has errors when there were no errors' ).
cl_aunit_assert=>assert_initial(
act = anon_log->has_warnings( )
msg = 'Has warnings when there were no warnings' ).
anon_log->e( 'error' ).
anon_log->w( 'warning' ).
cl_aunit_assert=>assert_not_initial(
act = anon_log->has_errors( )
msg = 'Has no errors when there were errors' ).
cl_aunit_assert=>assert_not_initial(
act = anon_log->has_warnings( )
msg = 'Has no warnings when there were warnings' ).
endmethod.
method return_proper_length.
cl_aunit_assert=>assert_equals(
exp = 0
act = anon_log->length( )
msg = 'Did not return 0 length at start' ).
anon_log->s( 'success' ).
anon_log->i( 'info' ).
anon_log->w( 'warning' ).
cl_aunit_assert=>assert_equals(
exp = 3
act = anon_log->length( )
msg = 'Did not return right length after add' ).
endmethod.
endclass. "lcl_Test
| [
4871,
300,
565,
62,
9288,
6770,
329,
4856,
198,
220,
9478,
1790,
198,
220,
2526,
1241,
23585,
13,
198,
220,
2839,
2665,
13,
628,
220,
220,
220,
1366,
25,
198,
220,
220,
220,
220,
220,
281,
261,
62,
6404,
220,
220,
220,
220,
2099,
1006,
284,
1976,
361,
62,
6404,
1362,
11,
198,
220,
220,
220,
220,
220,
3706,
62,
6404,
220,
220,
220,
2099,
1006,
284,
1976,
361,
62,
6404,
1362,
11,
198,
220,
220,
220,
220,
220,
37415,
62,
6404,
2099,
1006,
284,
1976,
361,
62,
6404,
1362,
13,
628,
220,
220,
220,
1398,
12,
24396,
82,
25,
198,
220,
220,
220,
220,
220,
1398,
62,
40406,
13,
628,
220,
220,
220,
5050,
25,
198,
220,
220,
220,
220,
220,
9058,
11,
198,
220,
220,
220,
220,
220,
573,
446,
593,
11,
198,
220,
220,
220,
220,
220,
651,
62,
11085,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
33332,
2604,
62,
28144,
2099,
2613,
46664,
358,
75,
198,
220,
220,
220,
220,
220,
220,
220,
8024,
1988,
7,
19662,
8,
2099,
1149,
13381,
11,
198,
220,
220,
220,
220,
220,
651,
62,
37348,
1095,
198,
220,
220,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
62,
28144,
220,
2099,
2613,
46664,
358,
75,
198,
220,
220,
220,
220,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13399,
220,
220,
220,
220,
220,
220,
2099,
3084,
62,
1659,
62,
37336,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31456,
62,
36604,
2099,
3652,
62,
926,
62,
19662,
11,
628,
220,
220,
220,
220,
220,
5794,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
33332,
4686,
220,
220,
220,
220,
220,
220,
220,
220,
588,
827,
12,
19662,
312,
4277,
827,
12,
19662,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42392,
220,
220,
220,
220,
220,
220,
2099,
2786,
4277,
705,
19355,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
645,
220,
220,
220,
220,
220,
220,
220,
220,
588,
827,
12,
19662,
3919,
4277,
827,
12,
19662,
3919,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
16,
220,
220,
220,
220,
220,
220,
220,
220,
588,
827,
12,
19662,
85,
16,
4277,
827,
12,
19662,
85,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
17,
220,
220,
220,
220,
220,
220,
220,
220,
588,
827,
12,
19662,
85,
17,
4277,
827,
12,
19662,
85,
17,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
18,
220,
220,
220,
220,
220,
220,
220,
220,
588,
827,
12,
19662,
85,
18,
4277,
827,
12,
19662,
85,
18,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
19,
220,
220,
220,
220,
220,
220,
220,
220,
588,
827,
12,
19662,
85,
19,
4277,
827,
12,
19662,
85,
19,
198,
220,
220,
220,
220,
220,
220,
220,
8024,
1988,
7,
19662,
8,
2099,
4731,
11,
628,
220,
220,
220,
220,
220,
460,
62,
17953,
62,
36902,
62,
6404,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
17953,
62,
13190,
62,
6404,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
260,
9654,
62,
6404,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
17953,
62,
11201,
3428,
62,
6404,
62,
12545,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
17953,
62,
11201,
3428,
62,
6404,
62,
4475,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
9654,
62,
273,
62,
17953,
329,
4856,
11,
628,
220,
220,
220,
220,
220,
460,
62,
2860,
62,
6404,
62,
22866,
329,
4856,
11,
628,
220,
220,
220,
220,
220,
460,
62,
2860,
62,
1462,
62,
6404,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
2860,
62,
1462,
62,
13190,
62,
6404,
329,
4856,
11,
628,
220,
220,
220,
220,
220,
8295,
62,
82,
3080,
62,
13190,
62,
6404,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
8295,
62,
82,
3080,
62,
260,
26350,
62,
6404,
329,
4856,
11,
628,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
8841,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
10641,
220,
220,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
65,
499,
557,
83,
16,
220,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
65,
499,
557,
83,
17,
220,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
65,
15042,
62,
10215,
84,
62,
7783,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
65,
15042,
62,
2875,
62,
7783,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
81,
5589,
220,
220,
220,
220,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
1676,
926,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
65,
499,
557,
926,
397,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
8056,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
354,
1328,
62,
1069,
11755,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
43501,
62,
907,
14542,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
1092,
62,
36439,
62,
301,
5620,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
6404,
62,
1092,
62,
22089,
62,
301,
5620,
329,
4856,
11,
628,
220,
220,
220,
220,
220,
460,
62,
2860,
62,
19662,
62,
22866,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
2860,
62,
47423,
62,
7266,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
460,
62,
2860,
62,
47423
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_iwpr DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_objects_super
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abapgit_object .
PROTECTED SECTION.
METHODS get_generic
RETURNING
VALUE(ro_generic) TYPE REF TO zcl_abapgit_objects_generic
RAISING
zcx_abapgit_exception .
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_abapgit_object_iwpr IMPLEMENTATION.
METHOD get_generic.
CREATE OBJECT ro_generic
EXPORTING
is_item = ms_item
iv_language = mv_language.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = zcl_abapgit_objects_super=>c_user_unknown.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
get_generic( )->delete( iv_package ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
get_generic( )->deserialize(
iv_package = iv_package
io_xml = io_xml ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
rv_bool = get_generic( )->exists( ).
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
SUBMIT /iwbep/r_sbui_service_builder
WITH i_prname = ms_item-obj_name
AND RETURN.
rv_exit = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
get_generic( )->serialize( io_xml ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
14246,
1050,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
41357,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
41357,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
41357,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
14246,
1050,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
651,
62,
41357,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
41357,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
9186,
220,
220,
220,
220,
796,
13845,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
796,
285,
85,
62,
16129,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
198,
220,
220,
220,
374,
85,
62,
7220,
796,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
14804,
66,
62,
7220,
62,
34680,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
628,
220,
220,
220,
651,
62,
41357,
7,
1267,
3784,
33678,
7,
21628,
62,
26495,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
8906,
48499,
1096,
13,
628,
220,
220,
220,
651,
62,
41357,
7,
1267,
3784,
8906,
48499,
1096,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
26495,
796,
21628,
62,
26495,
198,
220,
220,
220,
220,
220,
33245,
62,
19875,
220,
220,
220,
220,
796,
33245,
62,
19875,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1069,
1023,
13,
628,
220,
220,
220,
374,
85,
62,
30388,
796,
651,
62,
41357,
7,
1267,
3784,
1069,
1023,
7,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1136,
62,
785,
1845,
1352,
13,
198,
220,
220,
220,
30826,
27064,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1136,
62,
8906,
48499,
1096,
62,
20214,
13,
198,
220,
220,
220,
43504,
10619,
1976,
361,
62,
397,
499,
18300,
62,
15252,
14804,
36484,
62,
9662,
62,
312,
12,
397,
499,
5390,
374,
83,
62,
20214,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1136,
62,
38993,
13,
628,
220,
220,
220,
44608,
62,
38993,
796,
651,
62,
38993,
7,
6739,
198,
220,
220,
220,
44608,
62,
38993,
12,
33678,
62,
83,
324,
343,
796,
450,
499,
62,
7942,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
271,
62,
5275,
13,
198,
220,
220,
220,
374,
85,
62,
5275,
796,
318,
62,
5275,
7,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
271,
62,
24162,
13,
628,
220,
220,
220,
374,
85,
62,
271,
62,
24162,
796,
450,
499,
62,
9562,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
43327,
13,
628,
220,
220,
220,
28932,
36393,
1220,
14246,
65,
538,
14,
81,
62,
36299,
9019,
62,
15271,
62,
38272,
198,
220,
220,
220,
220,
220,
13315,
1312,
62,
1050,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
5357,
30826,
27064,
13,
628,
220,
220,
220,
374,
85,
62,
37023,
796,
450,
499,
62,
7942,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
46911,
1096,
13,
628,
220,
220,
220,
651,
62,
41357,
7,
1267,
3784,
46911,
1096,
7,
33245,
62,
19875,
6739,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_type DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS: c_prefix TYPE c LENGTH 3 VALUE '%_C'.
METHODS read
EXPORTING ev_ddtext TYPE ddtypet-ddtext
et_source TYPE abaptxt255_tab
RAISING zcx_abapgit_not_found.
METHODS create
IMPORTING iv_ddtext TYPE ddtypet-ddtext
it_source TYPE abaptxt255_tab
iv_devclass TYPE devclass
RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_TYPE IMPLEMENTATION.
METHOD create.
DATA: lv_progname TYPE reposrc-progname,
lv_typegroup TYPE rsedd0-typegroup.
lv_typegroup = ms_item-obj_name.
CALL FUNCTION 'RS_DD_TYGR_INSERT_SOURCES'
EXPORTING
typegroupname = lv_typegroup
ddtext = iv_ddtext
corrnum = ''
devclass = iv_devclass
TABLES
source = it_source
EXCEPTIONS
already_exists = 1
not_executed = 2
permission_failure = 3
object_not_specified = 4
illegal_name = 5
OTHERS = 6.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from RS_DD_TYGR_INSERT_SOURCES' ).
ENDIF.
CONCATENATE c_prefix lv_typegroup INTO lv_progname.
UPDATE progdir SET uccheck = abap_true
WHERE name = lv_progname.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error setting uccheck' ).
ENDIF.
ENDMETHOD.
METHOD read.
DATA: lv_typdname TYPE rsedd0-typegroup,
lt_psmodisrc TYPE TABLE OF smodisrc,
lt_psmodilog TYPE TABLE OF smodilog,
lt_ptrdir TYPE TABLE OF trdir.
SELECT SINGLE ddtext FROM ddtypet
INTO ev_ddtext
WHERE typegroup = ms_item-obj_name
AND ddlanguage = mv_language.
lv_typdname = ms_item-obj_name.
" Active version
CALL FUNCTION 'TYPD_GET_OBJECT'
EXPORTING
typdname = lv_typdname
TABLES
psmodisrc = lt_psmodisrc
psmodilog = lt_psmodilog
psource = et_source
ptrdir = lt_ptrdir
EXCEPTIONS
version_not_found = 1
reps_not_exist = 2
OTHERS = 3.
IF sy-subrc <> 0.
" Inactive version
CALL FUNCTION 'TYPD_GET_OBJECT'
EXPORTING
typdname = lv_typdname
r3state = 'I'
TABLES
psmodisrc = lt_psmodisrc
psmodilog = lt_psmodilog
psource = et_source
ptrdir = lt_ptrdir
EXCEPTIONS
version_not_found = 1
reps_not_exist = 2
OTHERS = 3.
ENDIF.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zcx_abapgit_not_found.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = c_user_unknown. " todo
ENDMETHOD.
METHOD zif_abapgit_object~delete.
IF zif_abapgit_object~exists( ) = abap_false.
RETURN.
ENDIF.
delete_ddic( 'G' ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: lv_ddtext TYPE ddtypet-ddtext,
lt_source TYPE abaptxt255_tab,
lv_progname TYPE reposrc-progname,
lv_typegroup TYPE rsedd0-typegroup.
lv_typegroup = ms_item-obj_name.
io_xml->read( EXPORTING iv_name = 'DDTEXT'
CHANGING cg_data = lv_ddtext ).
lt_source = mo_files->read_abap( ).
IF zif_abapgit_object~exists( ) = abap_false.
create( iv_ddtext = lv_ddtext
it_source = lt_source
iv_devclass = iv_package ).
ELSE.
CONCATENATE c_prefix lv_typegroup INTO lv_progname.
INSERT REPORT lv_progname FROM lt_source STATE 'I'.
ENDIF.
zcl_abapgit_objects_activation=>add_item( ms_item ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
TRY.
read( ).
rv_bool = abap_true.
CATCH zcx_abapgit_not_found
zcx_abapgit_exception.
rv_bool = abap_false.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
jump_se11( iv_radio = 'RSRD1-TYMA'
iv_field = 'RSRD1-TYMA_VAL' ).
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lv_ddtext TYPE ddtypet-ddtext,
lt_source TYPE abaptxt255_tab.
TRY.
read( IMPORTING
ev_ddtext = lv_ddtext
et_source = lt_source ).
CATCH zcx_abapgit_not_found.
RETURN.
ENDTRY.
io_xml->add( iv_name = 'DDTEXT'
ig_data = lv_ddtext ).
mo_files->add_abap( lt_source ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
4906,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
269,
62,
40290,
41876,
269,
406,
49494,
513,
26173,
8924,
705,
4,
62,
34,
4458,
628,
220,
220,
220,
337,
36252,
50,
1100,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
819,
62,
1860,
5239,
41876,
49427,
774,
6449,
12,
1860,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2123,
62,
10459,
41876,
450,
2373,
742,
13381,
62,
8658,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1662,
62,
9275,
13,
628,
220,
220,
220,
337,
36252,
50,
2251,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
1860,
5239,
220,
220,
41876,
49427,
774,
6449,
12,
1860,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
62,
10459,
220,
220,
41876,
450,
2373,
742,
13381,
62,
8658,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
7959,
4871,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
23680,
62,
25216,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
2251,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
1676,
70,
3672,
220,
41876,
1128,
418,
6015,
12,
1676,
70,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
4906,
8094,
41876,
44608,
6048,
15,
12,
4906,
8094,
13,
628,
198,
220,
220,
220,
300,
85,
62,
4906,
8094,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
6998,
62,
16458,
62,
9936,
10761,
62,
20913,
17395,
62,
50,
2606,
7397,
1546,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2099,
8094,
3672,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
4906,
8094,
198,
220,
220,
220,
220,
220,
220,
220,
49427,
5239,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
1860,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
1162,
81,
22510,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
10148,
198,
220,
220,
220,
220,
220,
220,
220,
1614,
4871,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
7959,
4871,
198,
220,
220,
220,
220,
220,
309,
6242,
28378,
198,
220,
220,
220,
220,
220,
220,
220,
2723,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
340,
62,
10459,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
1541,
62,
1069,
1023,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
407,
62,
18558,
7241,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
7170,
62,
32165,
495,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
1662,
62,
23599,
796,
604,
198,
220,
220,
220,
220,
220,
220,
220,
5293,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
796,
642,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
718,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
18224,
422,
19340,
62,
16458,
62,
9936,
10761,
62,
20913,
17395,
62,
50,
2606,
7397,
1546,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
39962,
1404,
1677,
6158,
269,
62,
40290,
300,
85,
62,
4906,
8094,
39319,
300,
85,
62,
1676,
70,
3672,
13,
198,
220,
220,
220,
35717,
1172,
15908,
25823,
334,
535,
258,
694,
796,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
33411,
1438,
796,
300,
85,
62,
1676,
70,
3672,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
18224,
4634,
334,
535,
258,
694,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1100,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
28004,
67,
3672,
220,
41876,
44608,
6048,
15,
12,
4906,
8094,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
862,
4666,
271,
6015,
41876,
43679,
3963,
895,
375,
271,
6015,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
862,
4666,
346,
519,
41876,
43679,
3963,
895,
375,
346,
519,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
457,
4372,
343,
220,
220,
220,
41876,
43679,
3963,
491,
15908,
13,
628,
198,
220,
220,
220,
33493,
311,
2751,
2538,
49427,
5239,
16034,
49427,
774,
6449,
198,
220,
220,
220,
220,
220,
39319,
819,
62,
1860,
5239,
198,
220,
220,
220,
220,
220,
33411,
2099,
8094,
220,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
5357,
49427
] | [
1,
1,
1,
1,
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invoice_extract.
"Custom DMEE Tree Type handling
INCLUDE z_dmee_invoice_extract_lcl00."Tools and data types
INCLUDE z_dmee_invoice_extract_ssc. "Selection Screen
INCLUDE z_dmee_invoice_extract_lcl01."Screen processing class
INCLUDE z_dmee_invoice_extract_lcl02."ALV processing
INCLUDE z_dmee_invoice_extract_lcl03."Main report processing
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
lcl_screen=>call_f4( lcl_tools=>c_f4_var ).
START-OF-SELECTION.
lcl_screen=>get_instance( )->initialize( ).
lcl_report=>get_instance( )->process( ).
| [
2200,
15490,
1976,
62,
67,
1326,
68,
62,
16340,
2942,
62,
2302,
974,
13,
198,
198,
1,
15022,
14848,
6500,
12200,
5994,
9041,
198,
1268,
5097,
52,
7206,
1976,
62,
67,
1326,
68,
62,
16340,
2942,
62,
2302,
974,
62,
75,
565,
405,
526,
33637,
290,
1366,
3858,
198,
1268,
5097,
52,
7206,
1976,
62,
67,
1326,
68,
62,
16340,
2942,
62,
2302,
974,
62,
824,
66,
13,
220,
366,
4653,
1564,
15216,
198,
1268,
5097,
52,
7206,
1976,
62,
67,
1326,
68,
62,
16340,
2942,
62,
2302,
974,
62,
75,
565,
486,
526,
23901,
7587,
1398,
198,
1268,
5097,
52,
7206,
1976,
62,
67,
1326,
68,
62,
16340,
2942,
62,
2302,
974,
62,
75,
565,
2999,
526,
1847,
53,
7587,
198,
1268,
5097,
52,
7206,
1976,
62,
67,
1326,
68,
62,
16340,
2942,
62,
2302,
974,
62,
75,
565,
3070,
526,
13383,
989,
7587,
198,
198,
1404,
33493,
2849,
12,
6173,
2200,
1677,
6177,
26173,
8924,
12,
2200,
35780,
7473,
279,
62,
25641,
13,
198,
220,
300,
565,
62,
9612,
14804,
13345,
62,
69,
19,
7,
300,
565,
62,
31391,
14804,
66,
62,
69,
19,
62,
7785,
6739,
198,
198,
2257,
7227,
12,
19238,
12,
46506,
2849,
13,
198,
220,
300,
565,
62,
9612,
14804,
1136,
62,
39098,
7,
1267,
3784,
36733,
1096,
7,
6739,
198,
220,
300,
565,
62,
13116,
14804,
1136,
62,
39098,
7,
1267,
3784,
14681,
7,
6739,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*----------------------------------------------------------------------*
* CLASS ZCL_AES_MODE_OFB DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcl_aes_mode_ofb DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_aes_mode .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_AES_MODE_OFB IMPLEMENTATION.
METHOD zif_aes_mode~decrypt_raw16_table.
DATA: converter_block TYPE xstring,
origin_plain_block TYPE xstring,
working_plain_block TYPE xstring,
working_cipher_block TYPE xstring,
origin_cipher_block TYPE xstring.
FIELD-SYMBOLS: <raw16> TYPE zif_aes_mode=>ty_raw16.
CLEAR et_data.
working_plain_block = i_initialization_vector.
LOOP AT it_data INTO origin_cipher_block.
io_rijndael->encrypt_xstring(
EXPORTING
i_data = working_plain_block
i_key = i_key
IMPORTING
e_data = working_cipher_block ).
converter_block = working_cipher_block.
origin_plain_block = origin_cipher_block BIT-XOR converter_block.
APPEND INITIAL LINE TO et_data ASSIGNING <raw16>.
<raw16> = origin_plain_block.
working_plain_block = working_cipher_block.
ENDLOOP.
ENDMETHOD. "zif_aes_mode~decrypt_raw16_table
METHOD zif_aes_mode~encrypt_raw16_table.
DATA: converter_block TYPE xstring,
origin_plain_block TYPE xstring,
working_plain_block TYPE xstring,
working_cipher_block TYPE xstring,
converted_cipher_block TYPE xstring.
FIELD-SYMBOLS: <raw16> TYPE zif_aes_mode=>ty_raw16.
CLEAR et_data.
working_plain_block = i_initialization_vector.
LOOP AT it_data INTO origin_plain_block.
converter_block = origin_plain_block.
io_rijndael->encrypt_xstring(
EXPORTING
i_data = working_plain_block
i_key = i_key
IMPORTING
e_data = working_cipher_block ).
converted_cipher_block = working_cipher_block BIT-XOR converter_block.
APPEND INITIAL LINE TO et_data ASSIGNING <raw16>.
<raw16> = converted_cipher_block.
working_plain_block = working_cipher_block.
ENDLOOP.
ENDMETHOD. "zif_aes_mode~encrypt_raw16_table
ENDCLASS.
| [
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
1168,
5097,
62,
32,
1546,
62,
49058,
62,
19238,
33,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
1976,
565,
62,
64,
274,
62,
14171,
62,
1659,
65,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
64,
274,
62,
14171,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
1546,
62,
49058,
62,
19238,
33,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
64,
274,
62,
14171,
93,
12501,
6012,
62,
1831,
1433,
62,
11487,
13,
198,
220,
220,
220,
42865,
25,
38394,
62,
9967,
220,
220,
220,
220,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8159,
62,
25638,
62,
9967,
220,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1762,
62,
25638,
62,
9967,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1762,
62,
66,
10803,
62,
9967,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8159,
62,
66,
10803,
62,
9967,
220,
41876,
2124,
8841,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
1831,
1433,
29,
41876,
1976,
361,
62,
64,
274,
62,
14171,
14804,
774,
62,
1831,
1433,
13,
628,
198,
220,
220,
220,
30301,
1503,
2123,
62,
7890,
13,
628,
220,
220,
220,
1762,
62,
25638,
62,
9967,
796,
1312,
62,
36733,
1634,
62,
31364,
13,
628,
220,
220,
220,
17579,
3185,
5161,
340,
62,
7890,
39319,
8159,
62,
66,
10803,
62,
9967,
13,
198,
220,
220,
220,
220,
220,
33245,
62,
380,
73,
358,
3010,
3784,
12685,
6012,
62,
87,
8841,
7,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
7890,
220,
796,
1762,
62,
25638,
62,
9967,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
2539,
220,
220,
796,
1312,
62,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
62,
7890,
220,
796,
1762,
62,
66,
10803,
62,
9967,
6739,
628,
220,
220,
220,
220,
220,
38394,
62,
9967,
796,
1762,
62,
66,
10803,
62,
9967,
13,
628,
220,
220,
220,
220,
220,
8159,
62,
25638,
62,
9967,
796,
8159,
62,
66,
10803,
62,
9967,
36992,
12,
55,
1581,
38394,
62,
9967,
13,
628,
220,
220,
220,
220,
220,
43504,
10619,
3268,
2043,
12576,
48920,
5390,
2123,
62,
7890,
24994,
3528,
15871,
1279,
1831,
1433,
28401,
198,
220,
220,
220,
220,
220,
1279,
1831,
1433,
29,
796,
8159,
62,
25638,
62,
9967,
13,
628,
220,
220,
220,
220,
220,
1762,
62,
25638,
62,
9967,
796,
1762,
62,
66,
10803,
62,
9967,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
89,
361,
62,
64,
274,
62,
14171,
93,
12501,
6012,
62,
1831,
1433,
62,
11487,
628,
198,
220,
337,
36252,
1976,
361,
62,
64,
274,
62,
14171,
93,
12685,
6012,
62,
1831,
1433,
62,
11487,
13,
198,
220,
220,
220,
42865,
25,
38394,
62,
9967,
220,
220,
220,
220,
220,
220,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8159,
62,
25638,
62,
9967,
220,
220,
220,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1762,
62,
25638,
62,
9967,
220,
220,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1762,
62,
66,
10803,
62,
9967,
220,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11513,
62,
66,
10803,
62,
9967,
41876,
2124,
8841,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
1831,
1433,
29,
41876,
1976,
361,
62,
64,
274,
62,
14171,
14804,
774,
62,
1831,
1433,
13,
628,
198,
220,
220,
220,
30301,
1503,
2123,
62,
7890,
13,
628,
220,
220,
220,
1762,
62,
25638,
62,
9967,
796,
1312,
62,
36733,
1634,
62,
31364,
13,
628,
220,
220,
220,
17579,
3185,
5161,
340,
62,
7890,
39319,
8159,
62,
25638,
62,
9967,
13,
198,
220,
220,
220,
220,
220,
38394,
62,
9967,
796,
8159,
62,
25638,
62,
9967,
13,
628,
220,
220,
220,
220,
220,
33245,
62,
380,
73,
358,
3010,
3784,
12685,
6012,
62,
87,
8841,
7,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
7890,
220,
796,
1762,
62,
25638,
62,
9967,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
2539,
220,
220,
796,
1312,
62,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
62,
7890,
220,
796,
1762,
62,
66,
10803,
62,
9967,
6739,
628,
220,
220,
220,
220,
220,
11513,
62,
66,
10803,
62,
9967,
796,
1762,
62,
66,
10803,
62,
9967,
36992,
12,
55,
1581,
38394,
62,
9967,
13,
628,
220,
220,
220,
220,
220,
43504,
10619,
3268,
2043,
12576,
48920,
5390,
2123,
62,
7890,
24994,
3528,
15871,
1279,
1831,
1433,
28401,
198,
220,
220,
220,
220,
220,
1279,
1831,
1433,
29,
796,
11513,
62,
66,
10803,
62,
9967,
13,
628,
220,
220,
220,
220,
220,
1762,
62,
25638,
62,
9967,
796,
1762,
62,
66,
10803,
62,
9967,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class zcl_adash_component_runner definition
public
final
create public
inheriting from zcl_adash_test_runner_base.
public section.
methods:
constructor
importing
!guid_filter type guid_32 optional
!component type sobj_name
!type type trobjtype
!aunit_runner type ref to cl_aucv_test_runner_abstract optional
!with_coverage type abap_bool default abap_false,
run_and_return_results redefinition.
protected section.
private section.
data adash_setups type standard table of ztbc_adash_setup.
data component type sobj_name.
data type type trobjtype.
endclass.
class zcl_adash_component_runner implementation.
method constructor.
"@TODO: I see this piece of code elsewhere too.
"Create a factory
super->constructor(
aunit_runner = cond #(
when !aunit_runner is bound then !aunit_runner
when with_coverage eq abap_false then new_no_coverage_runner( )
else new_coverage_runner( )
)
).
append value #(
current_execution_guid = guid_filter
name = component
type = type
"@doesnt really matter, the runner is what dictates that for now
with_coverage = !with_coverage
max_duration_allowed = if_aunit_attribute_enums=>c_duration-short
max_risk_level_allowed = if_aunit_attribute_enums=>c_risk_level-harmless
) to adash_setups.
endmethod.
method run_and_return_results.
loop at adash_setups into data(a_setup).
create_run_results_container( a_setup ).
result = run_aunit_and_adapt( a_setup ).
endloop.
endmethod.
endclass.
| [
4871,
1976,
565,
62,
324,
1077,
62,
42895,
62,
16737,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
198,
220,
10639,
1780,
422,
1976,
565,
62,
324,
1077,
62,
9288,
62,
16737,
62,
8692,
13,
628,
220,
1171,
2665,
13,
198,
220,
220,
220,
5050,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
5162,
312,
62,
24455,
220,
220,
2099,
10103,
62,
2624,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
42895,
220,
220,
220,
220,
2099,
27355,
73,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
4161,
50007,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
1942,
270,
62,
16737,
220,
2099,
1006,
284,
537,
62,
14272,
85,
62,
9288,
62,
16737,
62,
397,
8709,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
4480,
62,
1073,
1857,
2099,
450,
499,
62,
30388,
4277,
450,
499,
62,
9562,
11,
198,
220,
220,
220,
220,
220,
1057,
62,
392,
62,
7783,
62,
43420,
34087,
17750,
13,
628,
220,
6861,
2665,
13,
198,
220,
2839,
2665,
13,
198,
220,
220,
220,
1366,
512,
1077,
62,
2617,
4739,
2099,
3210,
3084,
286,
1976,
83,
15630,
62,
324,
1077,
62,
40406,
13,
198,
220,
220,
220,
1366,
7515,
2099,
27355,
73,
62,
3672,
13,
198,
220,
220,
220,
1366,
2099,
2099,
4161,
50007,
4906,
13,
628,
198,
198,
437,
4871,
13,
628,
198,
198,
4871,
1976,
565,
62,
324,
1077,
62,
42895,
62,
16737,
7822,
13,
628,
198,
220,
2446,
23772,
13,
198,
220,
220,
220,
44212,
51,
3727,
46,
25,
314,
766,
428,
3704,
286,
2438,
8057,
1165,
13,
198,
220,
220,
220,
366,
16447,
257,
8860,
198,
220,
220,
220,
2208,
3784,
41571,
273,
7,
198,
220,
220,
220,
220,
220,
220,
220,
257,
20850,
62,
16737,
796,
1779,
1303,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
618,
5145,
1942,
270,
62,
16737,
318,
5421,
788,
5145,
1942,
270,
62,
16737,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
618,
351,
62,
1073,
1857,
37430,
450,
499,
62,
9562,
788,
649,
62,
3919,
62,
1073,
1857,
62,
16737,
7,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
649,
62,
1073,
1857,
62,
16737,
7,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
6739,
628,
220,
220,
220,
24443,
1988,
1303,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1459,
62,
18558,
1009,
62,
5162,
312,
796,
10103,
62,
24455,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
796,
7515,
198,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
796,
2099,
198,
220,
220,
220,
220,
220,
220,
220,
220,
44212,
22437,
429,
1107,
2300,
11,
262,
17490,
318,
644,
35054,
326,
329,
783,
198,
220,
220,
220,
220,
220,
220,
220,
220,
351,
62,
1073,
1857,
796,
5145,
4480,
62,
1073,
1857,
198,
220,
220,
220,
220,
220,
220,
220,
220,
3509,
62,
32257,
62,
40845,
796,
611,
62,
1942,
270,
62,
42348,
62,
268,
5700,
14804,
66,
62,
32257,
12,
19509,
198,
220,
220,
220,
220,
220,
220,
220,
220,
3509,
62,
19121,
62,
5715,
62,
40845,
796,
611,
62,
1942,
270,
62,
42348,
62,
268,
5700,
14804,
66,
62,
19121,
62,
5715,
12,
29155,
1203,
628,
220,
220,
220,
1267,
284,
512,
1077,
62,
2617,
4739,
13,
628,
220,
886,
24396,
13,
628,
628,
220,
2446,
1057,
62,
392,
62,
7783,
62,
43420,
13,
628,
220,
220,
220,
9052,
379,
512,
1077,
62,
2617,
4739,
656,
1366,
7,
64,
62,
40406,
737,
628,
220,
220,
220,
220,
220,
2251,
62,
5143,
62,
43420,
62,
34924,
7,
257,
62,
40406,
6739,
198,
220,
220,
220,
220,
220,
1255,
796,
1057,
62,
1942,
270,
62,
392,
62,
42552,
7,
257,
62,
40406,
6739,
628,
220,
220,
220,
886,
26268,
13,
628,
198,
220,
886,
24396,
13,
628,
198,
437,
4871,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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ZCL_EXCEL_WORKSHEET DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcl_excel_worksheet DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
*"* public components of class ZCL_EXCEL_WORKSHEET
*"* do not include other source files here!!!
*"* protected components of class ZCL_EXCEL_WORKSHEET
*"* do not include other source files here!!!
*"* protected components of class ZCL_EXCEL_WORKSHEET
*"* do not include other source files here!!!
TYPE-POOLS abap .
TYPE-POOLS slis .
TYPE-POOLS soi .
INTERFACES zif_excel_sheet_printsettings .
INTERFACES zif_excel_sheet_properties .
INTERFACES zif_excel_sheet_protection .
INTERFACES zif_excel_sheet_vba_project .
TYPES:
BEGIN OF mty_s_outline_row,
row_from TYPE i,
row_to TYPE i,
collapsed TYPE abap_bool,
END OF mty_s_outline_row .
TYPES:
mty_ts_outlines_row TYPE SORTED TABLE OF mty_s_outline_row WITH UNIQUE KEY row_from row_to .
CONSTANTS c_break_column TYPE zexcel_break VALUE 2. "#EC NOTEXT
CONSTANTS c_break_none TYPE zexcel_break VALUE 0. "#EC NOTEXT
CONSTANTS c_break_row TYPE zexcel_break VALUE 1. "#EC NOTEXT
DATA excel TYPE REF TO zcl_excel READ-ONLY .
DATA print_gridlines TYPE zexcel_print_gridlines READ-ONLY VALUE abap_false. "#EC NOTEXT
DATA sheet_content TYPE zexcel_t_cell_data .
DATA sheet_setup TYPE REF TO zcl_excel_sheet_setup .
DATA show_gridlines TYPE zexcel_show_gridlines READ-ONLY VALUE abap_true. "#EC NOTEXT
DATA show_rowcolheaders TYPE zexcel_show_gridlines READ-ONLY VALUE abap_true. "#EC NOTEXT
DATA styles TYPE zexcel_t_sheet_style .
DATA tabcolor TYPE zexcel_s_tabcolor READ-ONLY .
METHODS add_comment
IMPORTING
!ip_comment TYPE REF TO zcl_excel_comment .
METHODS add_drawing
IMPORTING
!ip_drawing TYPE REF TO zcl_excel_drawing .
METHODS add_new_column
IMPORTING
!ip_column TYPE simple
RETURNING
value(eo_column) TYPE REF TO zcl_excel_column .
METHODS add_new_style_cond
RETURNING
value(eo_style_cond) TYPE REF TO zcl_excel_style_cond .
METHODS add_new_data_validation
RETURNING
value(eo_data_validation) TYPE REF TO zcl_excel_data_validation .
METHODS add_new_range
RETURNING
value(eo_range) TYPE REF TO zcl_excel_range .
METHODS add_new_row
IMPORTING
!ip_row TYPE simple
RETURNING
value(eo_row) TYPE REF TO zcl_excel_row .
METHODS bind_alv
IMPORTING
!io_alv TYPE REF TO object
!it_table TYPE STANDARD TABLE
!i_top TYPE i DEFAULT 1
!i_left TYPE i DEFAULT 1
!table_style TYPE zexcel_table_style OPTIONAL
!i_table TYPE abap_bool DEFAULT abap_true
RAISING
zcx_excel .
METHODS bind_alv_ole2
IMPORTING
!i_document_url TYPE char255 DEFAULT space
!i_xls TYPE c DEFAULT space
!i_save_path TYPE string
!io_alv TYPE REF TO cl_gui_alv_grid
!it_listheader TYPE slis_t_listheader OPTIONAL
!i_top TYPE i DEFAULT 1
!i_left TYPE i DEFAULT 1
!i_columns_header TYPE c DEFAULT 'X'
!i_columns_autofit TYPE c DEFAULT 'X'
!i_format_col_header TYPE soi_format_item OPTIONAL
!i_format_subtotal TYPE soi_format_item OPTIONAL
!i_format_total TYPE soi_format_item OPTIONAL
EXCEPTIONS
miss_guide
ex_transfer_kkblo_error
fatal_error
inv_data_range
dim_mismatch_vkey
dim_mismatch_sema
error_in_sema .
METHODS bind_table
IMPORTING
!ip_table TYPE STANDARD TABLE
!it_field_catalog TYPE zexcel_t_fieldcatalog OPTIONAL
!is_table_settings TYPE zexcel_s_table_settings OPTIONAL
value(iv_default_descr) TYPE c OPTIONAL
EXPORTING
!es_table_settings TYPE zexcel_s_table_settings
RAISING
zcx_excel .
METHODS calculate_column_widths
RAISING
zcx_excel .
METHODS change_cell_style
IMPORTING
!ip_column TYPE simple
!ip_row TYPE zexcel_cell_row
!ip_complete TYPE zexcel_s_cstyle_complete OPTIONAL
!ip_xcomplete TYPE zexcel_s_cstylex_complete OPTIONAL
!ip_font TYPE zexcel_s_cstyle_font OPTIONAL
!ip_xfont TYPE zexcel_s_cstylex_font OPTIONAL
!ip_fill TYPE zexcel_s_cstyle_fill OPTIONAL
!ip_xfill TYPE zexcel_s_cstylex_fill OPTIONAL
!ip_borders TYPE zexcel_s_cstyle_borders OPTIONAL
!ip_xborders TYPE zexcel_s_cstylex_borders OPTIONAL
!ip_alignment TYPE zexcel_s_cstyle_alignment OPTIONAL
!ip_xalignment TYPE zexcel_s_cstylex_alignment OPTIONAL
!ip_number_format_format_code TYPE zexcel_number_format OPTIONAL
!ip_protection TYPE zexcel_s_cstyle_protection OPTIONAL
!ip_xprotection TYPE zexcel_s_cstylex_protection OPTIONAL
!ip_font_bold TYPE flag OPTIONAL
!ip_font_color TYPE zexcel_s_style_color OPTIONAL
!ip_font_color_rgb TYPE zexcel_style_color_argb OPTIONAL
!ip_font_color_indexed TYPE zexcel_style_color_indexed OPTIONAL
!ip_font_color_theme TYPE zexcel_style_color_theme OPTIONAL
!ip_font_color_tint TYPE zexcel_style_color_tint OPTIONAL
!ip_font_family TYPE zexcel_style_font_family OPTIONAL
!ip_font_italic TYPE flag OPTIONAL
!ip_font_name TYPE zexcel_style_font_name OPTIONAL
!ip_font_scheme TYPE zexcel_style_font_scheme OPTIONAL
!ip_font_size TYPE zexcel_style_font_size OPTIONAL
!ip_font_strikethrough TYPE flag OPTIONAL
!ip_font_underline TYPE flag OPTIONAL
!ip_font_underline_mode TYPE zexcel_style_font_underline OPTIONAL
!ip_fill_filltype TYPE zexcel_fill_type OPTIONAL
!ip_fill_rotation TYPE zexcel_rotation OPTIONAL
!ip_fill_fgcolor TYPE zexcel_s_style_color OPTIONAL
!ip_fill_fgcolor_rgb TYPE zexcel_style_color_argb OPTIONAL
!ip_fill_fgcolor_indexed TYPE zexcel_style_color_indexed OPTIONAL
!ip_fill_fgcolor_theme TYPE zexcel_style_color_theme OPTIONAL
!ip_fill_fgcolor_tint TYPE zexcel_style_color_tint OPTIONAL
!ip_fill_bgcolor TYPE zexcel_s_style_color OPTIONAL
!ip_fill_bgcolor_rgb TYPE zexcel_style_color_argb OPTIONAL
!ip_fill_bgcolor_indexed TYPE zexcel_style_color_indexed OPTIONAL
!ip_fill_bgcolor_theme TYPE zexcel_style_color_theme OPTIONAL
!ip_fill_bgcolor_tint TYPE zexcel_style_color_tint OPTIONAL
!ip_borders_allborders TYPE zexcel_s_cstyle_border OPTIONAL
!ip_fill_gradtype_type TYPE zexcel_s_gradient_type-type OPTIONAL
!ip_fill_gradtype_degree TYPE zexcel_s_gradient_type-degree OPTIONAL
!ip_xborders_allborders TYPE zexcel_s_cstylex_border OPTIONAL
!ip_borders_diagonal TYPE zexcel_s_cstyle_border OPTIONAL
!ip_fill_gradtype_bottom TYPE zexcel_s_gradient_type-bottom OPTIONAL
!ip_fill_gradtype_top TYPE zexcel_s_gradient_type-top OPTIONAL
!ip_xborders_diagonal TYPE zexcel_s_cstylex_border OPTIONAL
!ip_borders_diagonal_mode TYPE zexcel_diagonal OPTIONAL
!ip_fill_gradtype_right TYPE zexcel_s_gradient_type-right OPTIONAL
!ip_borders_down TYPE zexcel_s_cstyle_border OPTIONAL
!ip_fill_gradtype_left TYPE zexcel_s_gradient_type-left OPTIONAL
!ip_fill_gradtype_position1 TYPE zexcel_s_gradient_type-position1 OPTIONAL
!ip_xborders_down TYPE zexcel_s_cstylex_border OPTIONAL
!ip_borders_left TYPE zexcel_s_cstyle_border OPTIONAL
!ip_fill_gradtype_position2 TYPE zexcel_s_gradient_type-position2 OPTIONAL
!ip_fill_gradtype_position3 TYPE zexcel_s_gradient_type-position3 OPTIONAL
!ip_xborders_left TYPE zexcel_s_cstylex_border OPTIONAL
!ip_borders_right TYPE zexcel_s_cstyle_border OPTIONAL
!ip_xborders_right TYPE zexcel_s_cstylex_border OPTIONAL
!ip_borders_top TYPE zexcel_s_cstyle_border OPTIONAL
!ip_xborders_top TYPE zexcel_s_cstylex_border OPTIONAL
!ip_alignment_horizontal TYPE zexcel_alignment OPTIONAL
!ip_alignment_vertical TYPE zexcel_alignment OPTIONAL
!ip_alignment_textrotation TYPE zexcel_text_rotation OPTIONAL
!ip_alignment_wraptext TYPE flag OPTIONAL
!ip_alignment_shrinktofit TYPE flag OPTIONAL
!ip_alignment_indent TYPE zexcel_indent OPTIONAL
!ip_protection_hidden TYPE zexcel_cell_protection OPTIONAL
!ip_protection_locked TYPE zexcel_cell_protection OPTIONAL
!ip_borders_allborders_style TYPE zexcel_border OPTIONAL
!ip_borders_allborders_color TYPE zexcel_s_style_color OPTIONAL
!ip_borders_allbo_color_rgb TYPE zexcel_style_color_argb OPTIONAL
!ip_borders_allbo_color_indexed TYPE zexcel_style_color_indexed OPTIONAL
!ip_borders_allbo_color_theme TYPE zexcel_style_color_theme OPTIONAL
!ip_borders_allbo_color_tint TYPE zexcel_style_color_tint OPTIONAL
!ip_borders_diagonal_style TYPE zexcel_border OPTIONAL
!ip_borders_diagonal_color TYPE zexcel_s_style_color OPTIONAL
!ip_borders_diagonal_color_rgb TYPE zexcel_style_color_argb OPTIONAL
!ip_borders_diagonal_color_inde TYPE zexcel_style_color_indexed OPTIONAL
!ip_borders_diagonal_color_them TYPE zexcel_style_color_theme OPTIONAL
!ip_borders_diagonal_color_tint TYPE zexcel_style_color_tint OPTIONAL
!ip_borders_down_style TYPE zexcel_border OPTIONAL
!ip_borders_down_color TYPE zexcel_s_style_color OPTIONAL
!ip_borders_down_color_rgb TYPE zexcel_style_color_argb OPTIONAL
!ip_borders_down_color_indexed TYPE zexcel_style_color_indexed OPTIONAL
!ip_borders_down_color_theme TYPE zexcel_style_color_theme OPTIONAL
!ip_borders_down_color_tint TYPE zexcel_style_color_tint OPTIONAL
!ip_borders_left_style TYPE zexcel_border OPTIONAL
!ip_borders_left_color TYPE zexcel_s_style_color OPTIONAL
!ip_borders_left_color_rgb TYPE zexcel_style_color_argb OPTIONAL
!ip_borders_left_color_indexed TYPE zexcel_style_color_indexed OPTIONAL
!ip_borders_left_color_theme TYPE zexcel_style_color_theme OPTIONAL
!ip_borders_left_color_tint TYPE zexcel_style_color_tint OPTIONAL
!ip_borders_right_style TYPE zexcel_border OPTIONAL
!ip_borders_right_color TYPE zexcel_s_style_color OPTIONAL
!ip_borders_right_color_rgb TYPE zexcel_style_color_argb OPTIONAL
!ip_borders_right_color_indexed TYPE zexcel_style_color_indexed OPTIONAL
!ip_borders_right_color_theme TYPE zexcel_style_color_theme OPTIONAL
!ip_borders_right_color_tint TYPE zexcel_style_color_tint OPTIONAL
!ip_borders_top_style TYPE zexcel_border OPTIONAL
!ip_borders_top_color TYPE zexcel_s_style_color OPTIONAL
!ip_borders_top_color_rgb TYPE zexcel_style_color_argb OPTIONAL
!ip_borders_top_color_indexed TYPE zexcel_style_color_indexed OPTIONAL
!ip_borders_top_color_theme TYPE zexcel_style_color_theme OPTIONAL
!ip_borders_top_color_tint TYPE zexcel_style_color_tint OPTIONAL
RETURNING
value(ep_guid) TYPE zexcel_cell_style
RAISING
zcx_excel .
METHODS constructor
IMPORTING
!ip_excel TYPE REF TO zcl_excel
!ip_title TYPE zexcel_sheet_title OPTIONAL
RAISING
zcx_excel .
METHODS delete_merge
IMPORTING
!ip_cell_column TYPE simple OPTIONAL
!ip_cell_row TYPE zexcel_cell_row OPTIONAL
RAISING
zcx_excel .
METHODS delete_row_outline
IMPORTING
!iv_row_from TYPE i
!iv_row_to TYPE i
RAISING
zcx_excel .
METHODS freeze_panes
IMPORTING
!ip_num_columns TYPE i OPTIONAL
!ip_num_rows TYPE i OPTIONAL
RAISING
zcx_excel .
METHODS get_active_cell
RETURNING
value(ep_active_cell) TYPE string
RAISING
zcx_excel .
METHODS get_cell
IMPORTING
!ip_column TYPE simple
!ip_row TYPE zexcel_cell_row
EXPORTING
!ep_value TYPE zexcel_cell_value
!ep_rc TYPE sysubrc
!ep_style TYPE REF TO zcl_excel_style
!ep_guid TYPE zexcel_cell_style
!ep_formula TYPE zexcel_cell_formula
RAISING
zcx_excel .
METHODS get_column
IMPORTING
!ip_column TYPE simple
RETURNING
value(eo_column) TYPE REF TO zcl_excel_column .
METHODS get_columns
RETURNING
value(eo_columns) TYPE REF TO zcl_excel_columns .
METHODS get_columns_iterator
RETURNING
value(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS get_style_cond_iterator
RETURNING
value(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS get_data_validations_iterator
RETURNING
value(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS get_data_validations_size
RETURNING
value(ep_size) TYPE i .
METHODS get_default_column
RETURNING
value(eo_column) TYPE REF TO zcl_excel_column .
METHODS get_default_excel_date_format
RETURNING
value(ep_default_excel_date_format) TYPE zexcel_number_format .
METHODS get_default_excel_time_format
RETURNING
value(ep_default_excel_time_format) TYPE zexcel_number_format .
METHODS get_default_row
RETURNING
value(eo_row) TYPE REF TO zcl_excel_row .
METHODS get_dimension_range
RETURNING
value(ep_dimension_range) TYPE string
RAISING
zcx_excel .
METHODS get_comments
RETURNING
value(r_comments) TYPE REF TO zcl_excel_comments .
METHODS get_drawings
IMPORTING
!ip_type TYPE zexcel_drawing_type OPTIONAL
RETURNING
value(r_drawings) TYPE REF TO zcl_excel_drawings .
METHODS get_comments_iterator
RETURNING
value(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS get_drawings_iterator
IMPORTING
!ip_type TYPE zexcel_drawing_type
RETURNING
value(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS get_freeze_cell
EXPORTING
!ep_row TYPE zexcel_cell_row
!ep_column TYPE zexcel_cell_column .
METHODS get_guid
RETURNING
value(ep_guid) TYPE uuid .
METHODS get_highest_column
RETURNING
value(r_highest_column) TYPE zexcel_cell_column
RAISING
zcx_excel .
METHODS get_highest_row
RETURNING
value(r_highest_row) TYPE int4
RAISING
zcx_excel .
METHODS get_hyperlinks_iterator
RETURNING
value(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS get_hyperlinks_size
RETURNING
value(ep_size) TYPE i .
METHODS get_merge
RETURNING
value(merge_range) TYPE string_table
RAISING
zcx_excel .
METHODS get_pagebreaks
RETURNING
value(ro_pagebreaks) TYPE REF TO zcl_excel_worksheet_pagebreaks
RAISING
zcx_excel .
METHODS get_ranges_iterator
RETURNING
value(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS get_row
IMPORTING
!ip_row TYPE int4
RETURNING
value(eo_row) TYPE REF TO zcl_excel_row .
METHODS get_rows
RETURNING
value(eo_rows) TYPE REF TO zcl_excel_rows .
METHODS get_rows_iterator
RETURNING
value(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS get_row_outlines
RETURNING
value(rt_row_outlines) TYPE mty_ts_outlines_row .
METHODS get_style_cond
IMPORTING
!ip_guid TYPE zexcel_cell_style
RETURNING
value(eo_style_cond) TYPE REF TO zcl_excel_style_cond .
METHODS get_tabcolor
RETURNING
value(ev_tabcolor) TYPE zexcel_s_tabcolor .
METHODS get_tables_iterator
RETURNING
value(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS get_tables_size
RETURNING
value(ep_size) TYPE i .
METHODS get_title
IMPORTING
!ip_escaped TYPE flag DEFAULT ''
RETURNING
value(ep_title) TYPE zexcel_sheet_title .
METHODS is_cell_merged
IMPORTING
!ip_column TYPE simple
!ip_row TYPE zexcel_cell_row
RETURNING
value(rp_is_merged) TYPE abap_bool
RAISING
zcx_excel .
METHODS set_cell
IMPORTING
!ip_column TYPE simple
!ip_row TYPE zexcel_cell_row
!ip_value TYPE simple OPTIONAL
!ip_formula TYPE zexcel_cell_formula OPTIONAL
!ip_style TYPE zexcel_cell_style OPTIONAL
!ip_hyperlink TYPE REF TO zcl_excel_hyperlink OPTIONAL
!ip_data_type TYPE zexcel_cell_data_type OPTIONAL
!ip_abap_type TYPE abap_typekind OPTIONAL
RAISING
zcx_excel .
METHODS set_cell_formula
IMPORTING
!ip_column TYPE simple
!ip_row TYPE zexcel_cell_row
!ip_formula TYPE zexcel_cell_formula
RAISING
zcx_excel .
METHODS set_cell_style
IMPORTING
!ip_column TYPE simple
!ip_row TYPE zexcel_cell_row
!ip_style TYPE zexcel_cell_style
RAISING
zcx_excel .
METHODS set_column_width
IMPORTING
!ip_column TYPE simple
!ip_width_fix TYPE simple DEFAULT 0
!ip_width_autosize TYPE flag DEFAULT 'X'
RAISING
zcx_excel .
METHODS set_default_excel_date_format
IMPORTING
!ip_default_excel_date_format TYPE zexcel_number_format
RAISING
zcx_excel .
METHODS set_merge
IMPORTING
!ip_column_start TYPE simple DEFAULT zcl_excel_common=>c_excel_sheet_min_col
!ip_column_end TYPE simple DEFAULT zcl_excel_common=>c_excel_sheet_max_col
!ip_row TYPE zexcel_cell_row DEFAULT zcl_excel_common=>c_excel_sheet_min_row
!ip_row_to TYPE zexcel_cell_row DEFAULT zcl_excel_common=>c_excel_sheet_max_row
!ip_style TYPE zexcel_cell_style OPTIONAL "added parameter
!ip_value TYPE simple OPTIONAL "added parameter
!ip_formula TYPE zexcel_cell_formula OPTIONAL "added parameter
RAISING
zcx_excel .
METHODS set_print_gridlines
IMPORTING
!i_print_gridlines TYPE zexcel_print_gridlines .
METHODS set_row_height
IMPORTING
!ip_row TYPE simple
!ip_height_fix TYPE simple
RAISING
zcx_excel .
METHODS set_row_outline
IMPORTING
!iv_row_from TYPE i
!iv_row_to TYPE i
!iv_collapsed TYPE abap_bool
RAISING
zcx_excel .
METHODS set_show_gridlines
IMPORTING
!i_show_gridlines TYPE zexcel_show_gridlines .
METHODS set_show_rowcolheaders
IMPORTING
!i_show_rowcolheaders TYPE zexcel_show_rowcolheader .
METHODS set_tabcolor
IMPORTING
!iv_tabcolor TYPE zexcel_s_tabcolor .
METHODS set_table
IMPORTING
!ip_table TYPE STANDARD TABLE
!ip_hdr_style TYPE zexcel_cell_style OPTIONAL
!ip_body_style TYPE zexcel_cell_style OPTIONAL
!ip_table_title TYPE string
!ip_top_left_column TYPE zexcel_cell_column_alpha DEFAULT 'B'
!ip_top_left_row TYPE zexcel_cell_row DEFAULT 3
!ip_transpose TYPE xfeld OPTIONAL
!ip_no_header TYPE xfeld OPTIONAL
RAISING
zcx_excel .
METHODS set_title
IMPORTING
!ip_title TYPE zexcel_sheet_title
RAISING
zcx_excel .
METHODS get_table
IMPORTING
!iv_skipped_rows TYPE int4 DEFAULT 0
!iv_skipped_cols TYPE int4 DEFAULT 0
EXPORTING
!et_table TYPE STANDARD TABLE
RAISING
zcx_excel .
METHODS set_merge_style
IMPORTING
!ip_column_start TYPE simple OPTIONAL
!ip_column_end TYPE simple OPTIONAL
!ip_row TYPE zexcel_cell_row OPTIONAL
!ip_row_to TYPE zexcel_cell_row OPTIONAL
!ip_style TYPE zexcel_cell_style OPTIONAL .
METHODS set_area_formula
IMPORTING
!ip_column_start TYPE simple
!ip_column_end TYPE simple OPTIONAL
!ip_row TYPE zexcel_cell_row
!ip_row_to TYPE zexcel_cell_row OPTIONAL
!ip_formula TYPE zexcel_cell_formula
!ip_merge TYPE abap_bool OPTIONAL
RAISING
zcx_excel .
METHODS set_area_style
IMPORTING
!ip_column_start TYPE simple
!ip_column_end TYPE simple OPTIONAL
!ip_row TYPE zexcel_cell_row
!ip_row_to TYPE zexcel_cell_row OPTIONAL
!ip_style TYPE zexcel_cell_style
!ip_merge TYPE abap_bool OPTIONAL .
METHODS set_area
IMPORTING
!ip_column_start TYPE simple
!ip_column_end TYPE simple OPTIONAL
!ip_row TYPE zexcel_cell_row
!ip_row_to TYPE zexcel_cell_row OPTIONAL
!ip_value TYPE simple OPTIONAL
!ip_formula TYPE zexcel_cell_formula OPTIONAL
!ip_style TYPE zexcel_cell_style OPTIONAL
!ip_hyperlink TYPE REF TO zcl_excel_hyperlink OPTIONAL
!ip_data_type TYPE zexcel_cell_data_type OPTIONAL
!ip_abap_type TYPE abap_typekind OPTIONAL
!ip_merge TYPE abap_bool OPTIONAL
RAISING
zcx_excel .
METHODS get_header_footer_drawings
RETURNING
value(rt_drawings) TYPE zexcel_t_drawings .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF mty_s_font_metric,
char TYPE c LENGTH 1,
char_width TYPE tdcwidths,
END OF mty_s_font_metric .
TYPES:
mty_th_font_metrics
TYPE HASHED TABLE OF mty_s_font_metric
WITH UNIQUE KEY char .
TYPES:
BEGIN OF mty_s_font_cache,
font_name TYPE zexcel_style_font_name,
font_height TYPE tdfontsize,
flag_bold TYPE abap_bool,
flag_italic TYPE abap_bool,
th_font_metrics TYPE mty_th_font_metrics,
END OF mty_s_font_cache .
TYPES:
mty_th_font_cache
TYPE HASHED TABLE OF mty_s_font_cache
WITH UNIQUE KEY font_name font_height flag_bold flag_italic .
TYPES:
* types:
* mty_ts_row_dimension TYPE SORTED TABLE OF zexcel_s_worksheet_rowdimensio WITH UNIQUE KEY row .
BEGIN OF mty_merge,
row_from TYPE i,
row_to TYPE i,
col_from TYPE i,
col_to TYPE i,
END OF mty_merge .
TYPES:
mty_ts_merge TYPE SORTED TABLE OF mty_merge WITH UNIQUE KEY table_line .
*"* private components of class ZCL_EXCEL_WORKSHEET
*"* do not include other source files here!!!
DATA active_cell TYPE zexcel_s_cell_data .
DATA charts TYPE REF TO zcl_excel_drawings .
DATA columns TYPE REF TO zcl_excel_columns .
DATA row_default TYPE REF TO zcl_excel_row .
DATA column_default TYPE REF TO zcl_excel_column .
DATA styles_cond TYPE REF TO zcl_excel_styles_cond .
DATA data_validations TYPE REF TO zcl_excel_data_validations .
DATA default_excel_date_format TYPE zexcel_number_format .
DATA default_excel_time_format TYPE zexcel_number_format .
DATA comments TYPE REF TO zcl_excel_comments .
DATA drawings TYPE REF TO zcl_excel_drawings .
DATA freeze_pane_cell_column TYPE zexcel_cell_column .
DATA freeze_pane_cell_row TYPE zexcel_cell_row .
DATA guid TYPE uuid .
DATA hyperlinks TYPE REF TO cl_object_collection .
DATA lower_cell TYPE zexcel_s_cell_data .
DATA mo_pagebreaks TYPE REF TO zcl_excel_worksheet_pagebreaks .
CLASS-DATA mth_font_cache TYPE mty_th_font_cache .
DATA mt_merged_cells TYPE mty_ts_merge .
DATA mt_row_outlines TYPE mty_ts_outlines_row .
DATA print_title_col_from TYPE zexcel_cell_column_alpha .
DATA print_title_col_to TYPE zexcel_cell_column_alpha .
DATA print_title_row_from TYPE zexcel_cell_row .
DATA print_title_row_to TYPE zexcel_cell_row .
DATA ranges TYPE REF TO zcl_excel_ranges .
DATA rows TYPE REF TO zcl_excel_rows .
DATA tables TYPE REF TO cl_object_collection .
DATA title TYPE zexcel_sheet_title VALUE 'Worksheet'. "#EC NOTEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . " .
DATA upper_cell TYPE zexcel_s_cell_data .
METHODS calculate_cell_width
IMPORTING
!ip_column TYPE simple
!ip_row TYPE zexcel_cell_row
RETURNING
value(ep_width) TYPE float
RAISING
zcx_excel .
METHODS generate_title
RETURNING
value(ep_title) TYPE zexcel_sheet_title .
METHODS get_value_type
IMPORTING
!ip_value TYPE simple
EXPORTING
!ep_value TYPE simple
!ep_value_type TYPE abap_typekind .
METHODS print_title_set_range .
METHODS update_dimension_range
RAISING
zcx_excel .
ENDCLASS.
CLASS ZCL_EXCEL_WORKSHEET IMPLEMENTATION.
METHOD add_comment.
comments->include( ip_comment ).
ENDMETHOD. "add_comment
METHOD add_drawing.
CASE ip_drawing->get_type( ).
WHEN zcl_excel_drawing=>type_image.
drawings->include( ip_drawing ).
WHEN zcl_excel_drawing=>type_chart.
charts->include( ip_drawing ).
ENDCASE.
ENDMETHOD. "ADD_DRAWING
METHOD add_new_column.
DATA: lv_column_alpha TYPE zexcel_cell_column_alpha.
lv_column_alpha = zcl_excel_common=>convert_column2alpha( ip_column ).
CREATE OBJECT eo_column
EXPORTING
ip_index = lv_column_alpha
ip_excel = me->excel
ip_worksheet = me.
columns->add( eo_column ).
ENDMETHOD. "ADD_NEW_COLUMN
METHOD add_new_data_validation.
CREATE OBJECT eo_data_validation.
data_validations->add( eo_data_validation ).
ENDMETHOD. "ADD_NEW_DATA_VALIDATION
METHOD add_new_range.
* Create default blank range
CREATE OBJECT eo_range.
ranges->add( eo_range ).
ENDMETHOD. "ADD_NEW_RANGE
METHOD add_new_row.
CREATE OBJECT eo_row
EXPORTING
ip_index = ip_row.
rows->add( eo_row ).
ENDMETHOD. "ADD_NEW_ROW
METHOD add_new_style_cond.
CREATE OBJECT eo_style_cond.
styles_cond->add( eo_style_cond ).
ENDMETHOD. "ADD_NEW_STYLE_COND
METHOD bind_alv.
DATA: lo_converter TYPE REF TO zcl_excel_converter.
CREATE OBJECT lo_converter.
TRY.
lo_converter->convert(
EXPORTING
io_alv = io_alv
it_table = it_table
i_row_int = i_top
i_column_int = i_left
i_table = i_table
i_style_table = table_style
io_worksheet = me
CHANGING
co_excel = excel ).
CATCH zcx_excel .
ENDTRY.
ENDMETHOD. "BIND_ALV
METHOD bind_alv_ole2.
*--------------------------------------------------------------------*
* Method description:
* Method use to export a CL_GUI_ALV_GRID object to xlsx/xls file
* with list header and characteristics of ALV field catalog such as:
* + Total, group's subtotal
* + Quantity fields, amount fields (dependent fields)
* + No_out, no_zero, ...
* Technique use in method:
* SAP Desktop Office Integration (DOI)
*--------------------------------------------------------------------*
* Data for session 0: DOI constructor
* ------------------------------------------
DATA: lo_control TYPE REF TO i_oi_container_control.
DATA: lo_proxy TYPE REF TO i_oi_document_proxy.
DATA: lo_spreadsheet TYPE REF TO i_oi_spreadsheet.
DATA: lo_error TYPE REF TO i_oi_error.
DATA: lc_retcode TYPE soi_ret_string.
DATA: li_has TYPE i. "Proxy has spreadsheet interface?
DATA: l_is_closed TYPE i.
* Data for session 1: Get LVC data from ALV object
* ------------------------------------------
DATA: l_has_activex,
l_doctype_excel_sheet(11) TYPE c.
* LVC
DATA: lt_fieldcat_lvc TYPE lvc_t_fcat.
DATA: wa_fieldcat_lvc TYPE lvc_s_fcat.
DATA: lt_sort_lvc TYPE lvc_t_sort.
DATA: lt_filter_idx_lvc TYPE lvc_t_fidx.
DATA: lt_grouplevels_lvc TYPE lvc_t_grpl.
* KKBLO
DATA: lt_fieldcat_kkblo TYPE kkblo_t_fieldcat.
DATA: lt_sort_kkblo TYPE kkblo_t_sortinfo.
DATA: lt_grouplevels_kkblo TYPE kkblo_t_grouplevels.
DATA: lt_filter_idx_kkblo TYPE kkblo_t_sfinfo.
DATA: wa_listheader LIKE LINE OF it_listheader.
* Subtotal
DATA: lt_collect00 TYPE REF TO data.
DATA: lt_collect01 TYPE REF TO data.
DATA: lt_collect02 TYPE REF TO data.
DATA: lt_collect03 TYPE REF TO data.
DATA: lt_collect04 TYPE REF TO data.
DATA: lt_collect05 TYPE REF TO data.
DATA: lt_collect06 TYPE REF TO data.
DATA: lt_collect07 TYPE REF TO data.
DATA: lt_collect08 TYPE REF TO data.
DATA: lt_collect09 TYPE REF TO data.
* data table name
DATA: l_tabname TYPE kkblo_tabname.
* local object
DATA: lo_grid TYPE REF TO lcl_gui_alv_grid.
* data table get from ALV
DATA: lt_alv TYPE REF TO data.
* total / subtotal data
FIELD-SYMBOLS: <f_collect00> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect01> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect02> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect03> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect04> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect05> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect06> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect07> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect08> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect09> TYPE STANDARD TABLE.
* table before append subtotal lines
FIELD-SYMBOLS: <f_alv_tab> TYPE STANDARD TABLE.
* data for session 2: sort, filter and calculate total/subtotal
* ------------------------------------------
* table to save index of subotal / total line in excel tanle
* this ideal to control index of subtotal / total line later
* for ex, when get subtotal / total line to format
TYPES: BEGIN OF st_subtot_indexs,
index TYPE i,
END OF st_subtot_indexs.
DATA: lt_subtot_indexs TYPE TABLE OF st_subtot_indexs.
DATA: wa_subtot_indexs LIKE LINE OF lt_subtot_indexs.
* data table after append subtotal
DATA: lt_excel TYPE REF TO data.
DATA: l_tabix TYPE i.
DATA: l_save_index TYPE i.
* dyn subtotal table name
DATA: l_collect TYPE string.
* subtotal range, to format subtotal (and total)
DATA: subranges TYPE soi_range_list.
DATA: subrangeitem TYPE soi_range_item.
DATA: l_sub_index TYPE i.
* table after append subtotal lines
FIELD-SYMBOLS: <f_excel_tab> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_excel_line> TYPE any.
* dyn subtotal tables
FIELD-SYMBOLS: <f_collect_tab> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <f_collect_line> TYPE any.
FIELD-SYMBOLS: <f_filter_idx_line> LIKE LINE OF lt_filter_idx_kkblo.
FIELD-SYMBOLS: <f_fieldcat_line> LIKE LINE OF lt_fieldcat_kkblo.
FIELD-SYMBOLS: <f_grouplevels_line> LIKE LINE OF lt_grouplevels_kkblo.
FIELD-SYMBOLS: <f_line> TYPE any.
* Data for session 3: map data to semantic table
* ------------------------------------------
TYPES: BEGIN OF st_column_index,
fieldname TYPE kkblo_fieldname,
tabname TYPE kkblo_tabname,
col LIKE sy-index,
END OF st_column_index.
* columns index
DATA: lt_column_index TYPE TABLE OF st_column_index.
DATA: wa_column_index LIKE LINE OF lt_column_index.
* table of dependent field ( currency and quantity unit field)
DATA: lt_fieldcat_depf TYPE kkblo_t_fieldcat.
DATA: wa_fieldcat_depf TYPE kkblo_fieldcat.
* XXL interface:
* -XXL: contain exporting columns characteristic
DATA: lt_sema TYPE TABLE OF gxxlt_s INITIAL SIZE 0.
DATA: wa_sema LIKE LINE OF lt_sema.
* -XXL interface: header
DATA: lt_hkey TYPE TABLE OF gxxlt_h INITIAL SIZE 0.
DATA: wa_hkey LIKE LINE OF lt_hkey.
* -XXL interface: header keys
DATA: lt_vkey TYPE TABLE OF gxxlt_v INITIAL SIZE 0.
DATA: wa_vkey LIKE LINE OF lt_vkey.
* Number of H Keys: number of key columns
DATA: l_n_hrz_keys TYPE i.
* Number of data columns in the list object: non-key columns no
DATA: l_n_att_cols TYPE i.
* Number of V Keys: number of header row
DATA: l_n_vrt_keys TYPE i.
* curency to format amount
DATA: lt_tcurx TYPE TABLE OF tcurx.
DATA: wa_tcurx LIKE LINE OF lt_tcurx.
DATA: l_def TYPE flag. " currency / quantity flag
DATA: wa_t006 TYPE t006. " decimal place of unit
DATA: l_num TYPE i. " table columns number
DATA: l_typ TYPE c. " table type
DATA: wa TYPE REF TO data.
DATA: l_int TYPE i.
DATA: l_counter TYPE i.
FIELD-SYMBOLS: <f_excel_column> TYPE any.
FIELD-SYMBOLS: <f_fcat_column> TYPE any.
* Data for session 4: write to excel
* ------------------------------------------
DATA: sema_type TYPE c.
DATA l_error TYPE REF TO c_oi_proxy_error.
DATA count TYPE i.
DATA datac TYPE i.
DATA datareal TYPE i. " exporting column number
DATA vkeycount TYPE i.
DATA all TYPE i.
DATA mit TYPE i VALUE 1. " index of recent row?
DATA li_col_pos TYPE i VALUE 1. " column position
DATA li_col_num TYPE i. " table columns number
FIELD-SYMBOLS: <line> TYPE any.
FIELD-SYMBOLS: <item> TYPE any.
DATA td TYPE sydes_desc.
DATA: typ.
DATA: ranges TYPE soi_range_list.
DATA: rangeitem TYPE soi_range_item.
DATA: contents TYPE soi_generic_table.
DATA: contentsitem TYPE soi_generic_item.
DATA: semaitem TYPE gxxlt_s.
DATA: hkeyitem TYPE gxxlt_h.
DATA: vkeyitem TYPE gxxlt_v.
DATA: li_commentary_rows TYPE i. "row number of title lines + 1
DATA: lo_error_w TYPE REF TO i_oi_error.
DATA: l_retcode TYPE soi_ret_string.
DATA: no_flush TYPE c VALUE 'X'.
DATA: li_head_top TYPE i. "header rows position
* Data for session 5: Save and clode document
* ------------------------------------------
DATA: li_document_size TYPE i.
DATA: ls_path TYPE rlgrap-filename.
* MACRO: Close_document
*-------------------------------------------
DEFINE close_document.
clear: l_is_closed.
if lo_proxy is not initial.
* check proxy detroyed adi
call method lo_proxy->is_destroyed
importing
ret_value = l_is_closed.
* if dun detroyed yet: close -> release proxy
if l_is_closed is initial.
call method lo_proxy->close_document
* EXPORTING
* do_save = do_save
importing
error = lo_error
retcode = lc_retcode.
endif.
call method lo_proxy->release_document
importing
error = lo_error
retcode = lc_retcode.
else.
lc_retcode = c_oi_errors=>ret_document_not_open.
endif.
* Detroy control container
if lo_control is not initial.
call method lo_control->destroy_control.
endif.
clear:
lo_spreadsheet,
lo_proxy,
lo_control.
* free local
clear: l_is_closed.
END-OF-DEFINITION.
* Macro to catch DOI error
*-------------------------------------------
DEFINE error_doi.
if lc_retcode ne c_oi_errors=>ret_ok.
close_document.
call method lo_error->raise_message
exporting
type = 'E'.
clear: lo_error.
endif.
END-OF-DEFINITION.
*--------------------------------------------------------------------*
* SESSION 0: DOI CONSTRUCTOR
*--------------------------------------------------------------------*
* check active windown
CALL FUNCTION 'GUI_HAS_ACTIVEX'
IMPORTING
return = l_has_activex.
IF l_has_activex IS INITIAL.
RAISE miss_guide.
ENDIF.
* Get Container Object of Screen
CALL METHOD c_oi_container_control_creator=>get_container_control
IMPORTING
control = lo_control
retcode = lc_retcode.
error_doi.
* Initialize Container control
CALL METHOD lo_control->init_control
EXPORTING
parent = cl_gui_container=>default_screen
r3_application_name = ''
inplace_enabled = 'X'
no_flush = 'X'
register_on_close_event = 'X'
register_on_custom_event = 'X'
IMPORTING
error = lo_error
retcode = lc_retcode.
error_doi.
* Get Proxy Document:
* check exist of document proxy, if exist -> close first
IF NOT lo_proxy IS INITIAL.
close_document.
ENDIF.
IF i_xls IS NOT INITIAL.
* xls format, doctype = soi_doctype_excel97_sheet
l_doctype_excel_sheet = 'Excel.Sheet.8'.
ELSE.
* xlsx format, doctype = soi_doctype_excel_sheet
l_doctype_excel_sheet = 'Excel.Sheet'.
ENDIF.
CALL METHOD lo_control->get_document_proxy
EXPORTING
document_type = l_doctype_excel_sheet
register_container = 'X'
IMPORTING
document_proxy = lo_proxy
error = lo_error
retcode = lc_retcode.
error_doi.
IF i_document_url IS INITIAL.
* create new excel document
CALL METHOD lo_proxy->create_document
EXPORTING
create_view_data = 'X'
open_inplace = 'X'
no_flush = 'X'
IMPORTING
error = lo_error
retcode = lc_retcode.
error_doi.
ELSE.
* Read excel template for i_DOCUMENT_URL
* this excel template can be store in local or server
CALL METHOD lo_proxy->open_document
EXPORTING
document_url = i_document_url
open_inplace = 'X'
no_flush = 'X'
IMPORTING
error = lo_error
retcode = lc_retcode.
error_doi.
ENDIF.
* Check Spreadsheet Interface of Document Proxy
CALL METHOD lo_proxy->has_spreadsheet_interface
IMPORTING
is_available = li_has
error = lo_error
retcode = lc_retcode.
error_doi.
* create Spreadsheet object
CHECK li_has IS NOT INITIAL.
CALL METHOD lo_proxy->get_spreadsheet_interface
IMPORTING
sheet_interface = lo_spreadsheet
error = lo_error
retcode = lc_retcode.
error_doi.
*--------------------------------------------------------------------*
* SESSION 1: GET LVC DATA FROM ALV OBJECT
*--------------------------------------------------------------------*
* data table
CREATE OBJECT lo_grid
EXPORTING
i_parent = cl_gui_container=>screen0.
CALL METHOD lo_grid->get_alv_attributes
EXPORTING
io_grid = io_alv
IMPORTING
et_table = lt_alv.
ASSIGN lt_alv->* TO <f_alv_tab>.
* fieldcat
CALL METHOD io_alv->get_frontend_fieldcatalog
IMPORTING
et_fieldcatalog = lt_fieldcat_lvc.
* table name
LOOP AT lt_fieldcat_lvc INTO wa_fieldcat_lvc
WHERE NOT tabname IS INITIAL.
l_tabname = wa_fieldcat_lvc-tabname.
EXIT.
ENDLOOP.
IF sy-subrc NE 0.
l_tabname = '1'.
ENDIF.
CLEAR: wa_fieldcat_lvc.
* sort table
CALL METHOD io_alv->get_sort_criteria
IMPORTING
et_sort = lt_sort_lvc.
* filter index
CALL METHOD io_alv->get_filtered_entries
IMPORTING
et_filtered_entries = lt_filter_idx_lvc.
* group level + subtotal
CALL METHOD io_alv->get_subtotals
IMPORTING
ep_collect00 = lt_collect00
ep_collect01 = lt_collect01
ep_collect02 = lt_collect02
ep_collect03 = lt_collect03
ep_collect04 = lt_collect04
ep_collect05 = lt_collect05
ep_collect06 = lt_collect06
ep_collect07 = lt_collect07
ep_collect08 = lt_collect08
ep_collect09 = lt_collect09
et_grouplevels = lt_grouplevels_lvc.
ASSIGN lt_collect00->* TO <f_collect00>.
ASSIGN lt_collect01->* TO <f_collect01>.
ASSIGN lt_collect02->* TO <f_collect02>.
ASSIGN lt_collect03->* TO <f_collect03>.
ASSIGN lt_collect04->* TO <f_collect04>.
ASSIGN lt_collect05->* TO <f_collect05>.
ASSIGN lt_collect06->* TO <f_collect06>.
ASSIGN lt_collect07->* TO <f_collect07>.
ASSIGN lt_collect08->* TO <f_collect08>.
ASSIGN lt_collect09->* TO <f_collect09>.
* transfer to KKBLO struct
CALL FUNCTION 'LVC_TRANSFER_TO_KKBLO'
EXPORTING
it_fieldcat_lvc = lt_fieldcat_lvc
it_sort_lvc = lt_sort_lvc
it_filter_index_lvc = lt_filter_idx_lvc
it_grouplevels_lvc = lt_grouplevels_lvc
IMPORTING
et_fieldcat_kkblo = lt_fieldcat_kkblo
et_sort_kkblo = lt_sort_kkblo
et_filtered_entries_kkblo = lt_filter_idx_kkblo
et_grouplevels_kkblo = lt_grouplevels_kkblo
TABLES
it_data = <f_alv_tab>
EXCEPTIONS
it_data_missing = 1
it_fieldcat_lvc_missing = 2
OTHERS = 3.
IF sy-subrc <> 0.
RAISE ex_transfer_kkblo_error.
ENDIF.
CLEAR:
wa_fieldcat_lvc,
lt_fieldcat_lvc,
lt_sort_lvc,
lt_filter_idx_lvc,
lt_grouplevels_lvc.
CLEAR:
lo_grid.
*--------------------------------------------------------------------*
* SESSION 2: SORT, FILTER AND CALCULATE TOTAL / SUBTOTAL
*--------------------------------------------------------------------*
* append subtotal & total line
CREATE DATA lt_excel LIKE <f_alv_tab>.
ASSIGN lt_excel->* TO <f_excel_tab>.
LOOP AT <f_alv_tab> ASSIGNING <f_line>.
l_save_index = sy-tabix.
* filter base on filter index table
READ TABLE lt_filter_idx_kkblo ASSIGNING <f_filter_idx_line>
WITH KEY index = l_save_index
BINARY SEARCH.
IF sy-subrc NE 0.
APPEND <f_line> TO <f_excel_tab>.
ENDIF.
* append subtotal lines
READ TABLE lt_grouplevels_kkblo ASSIGNING <f_grouplevels_line>
WITH KEY index_to = l_save_index
BINARY SEARCH.
IF sy-subrc = 0.
l_tabix = sy-tabix.
DO.
IF <f_grouplevels_line>-subtot EQ 'X' AND
<f_grouplevels_line>-hide_level IS INITIAL AND
<f_grouplevels_line>-cindex_from NE 0.
* dynamic append subtotal line to excel table base on grouplevel table
* ex <f_GROUPLEVELS_line>-level = 1
* then <f_collect_tab> = '<F_COLLECT01>'
l_collect = <f_grouplevels_line>-level.
CONDENSE l_collect.
CONCATENATE '<F_COLLECT0'
l_collect '>'
* '->*'
INTO l_collect.
ASSIGN (l_collect) TO <f_collect_tab>.
* incase there're more than 1 total line of group, at the same level
* for example: subtotal of multi currency
LOOP AT <f_collect_tab> ASSIGNING <f_collect_line>.
IF sy-tabix BETWEEN <f_grouplevels_line>-cindex_from
AND <f_grouplevels_line>-cindex_to.
APPEND <f_collect_line> TO <f_excel_tab>.
* save subtotal lines index
wa_subtot_indexs-index = sy-tabix.
APPEND wa_subtot_indexs TO lt_subtot_indexs.
* append sub total ranges table for format later
ADD 1 TO l_sub_index.
subrangeitem-name = l_sub_index.
CONDENSE subrangeitem-name.
CONCATENATE 'SUBTOT'
subrangeitem-name
INTO subrangeitem-name.
subrangeitem-rows = wa_subtot_indexs-index.
subrangeitem-columns = 1. " start col
APPEND subrangeitem TO subranges.
CLEAR: subrangeitem.
ENDIF.
ENDLOOP.
UNASSIGN: <f_collect_tab>.
UNASSIGN: <f_collect_line>.
CLEAR: l_collect.
ENDIF.
* check next subtotal level of group
UNASSIGN: <f_grouplevels_line>.
ADD 1 TO l_tabix.
READ TABLE lt_grouplevels_kkblo ASSIGNING <f_grouplevels_line>
INDEX l_tabix.
IF sy-subrc NE 0
OR <f_grouplevels_line>-index_to NE l_save_index.
EXIT.
ENDIF.
UNASSIGN:
<f_collect_tab>,
<f_collect_line>.
ENDDO.
ENDIF.
CLEAR:
l_tabix,
l_save_index.
UNASSIGN:
<f_filter_idx_line>,
<f_grouplevels_line>.
ENDLOOP.
* free local data
UNASSIGN:
<f_line>,
<f_collect_tab>,
<f_collect_line>,
<f_fieldcat_line>.
* append grand total line
IF <f_collect00> IS ASSIGNED.
ASSIGN <f_collect00> TO <f_collect_tab>.
IF <f_collect_tab> IS NOT INITIAL.
LOOP AT <f_collect_tab> ASSIGNING <f_collect_line>.
APPEND <f_collect_line> TO <f_excel_tab>.
* save total line index
wa_subtot_indexs-index = sy-tabix.
APPEND wa_subtot_indexs TO lt_subtot_indexs.
* append grand total range (to format)
ADD 1 TO l_sub_index.
subrangeitem-name = l_sub_index.
CONDENSE subrangeitem-name.
CONCATENATE 'TOTAL'
subrangeitem-name
INTO subrangeitem-name.
subrangeitem-rows = wa_subtot_indexs-index.
subrangeitem-columns = 1. " start col
APPEND subrangeitem TO subranges.
ENDLOOP.
ENDIF.
ENDIF.
CLEAR:
subrangeitem,
lt_sort_kkblo,
<f_collect00>,
<f_collect01>,
<f_collect02>,
<f_collect03>,
<f_collect04>,
<f_collect05>,
<f_collect06>,
<f_collect07>,
<f_collect08>,
<f_collect09>.
UNASSIGN:
<f_collect00>,
<f_collect01>,
<f_collect02>,
<f_collect03>,
<f_collect04>,
<f_collect05>,
<f_collect06>,
<f_collect07>,
<f_collect08>,
<f_collect09>,
<f_collect_tab>,
<f_collect_line>.
*--------------------------------------------------------------------*
* SESSION 3: MAP DATA TO SEMANTIC TABLE
*--------------------------------------------------------------------*
* get dependent field field: currency and quantity
CREATE DATA wa LIKE LINE OF <f_excel_tab>.
ASSIGN wa->* TO <f_excel_line>.
DESCRIBE FIELD <f_excel_line> TYPE l_typ COMPONENTS l_num.
DO l_num TIMES.
l_save_index = sy-index.
ASSIGN COMPONENT l_save_index OF STRUCTURE <f_excel_line>
TO <f_excel_column>.
IF sy-subrc NE 0.
MESSAGE e059(0k) WITH 'FATAL ERROR' RAISING fatal_error.
ENDIF.
LOOP AT lt_fieldcat_kkblo ASSIGNING <f_fieldcat_line>
WHERE tabname = l_tabname.
ASSIGN COMPONENT <f_fieldcat_line>-fieldname
OF STRUCTURE <f_excel_line> TO <f_fcat_column>.
DESCRIBE DISTANCE BETWEEN <f_excel_column> AND <f_fcat_column>
INTO l_int IN BYTE MODE.
* append column index
* this columns index is of table, not fieldcat
IF l_int = 0.
wa_column_index-fieldname = <f_fieldcat_line>-fieldname.
wa_column_index-tabname = <f_fieldcat_line>-tabname.
wa_column_index-col = l_save_index.
APPEND wa_column_index TO lt_column_index.
ENDIF.
* append dependent fields (currency and quantity unit)
IF <f_fieldcat_line>-cfieldname IS NOT INITIAL.
CLEAR wa_fieldcat_depf.
wa_fieldcat_depf-fieldname = <f_fieldcat_line>-cfieldname.
wa_fieldcat_depf-tabname = <f_fieldcat_line>-ctabname.
COLLECT wa_fieldcat_depf INTO lt_fieldcat_depf.
ENDIF.
IF <f_fieldcat_line>-qfieldname IS NOT INITIAL.
CLEAR wa_fieldcat_depf.
wa_fieldcat_depf-fieldname = <f_fieldcat_line>-qfieldname.
wa_fieldcat_depf-tabname = <f_fieldcat_line>-qtabname.
COLLECT wa_fieldcat_depf INTO lt_fieldcat_depf.
ENDIF.
* rewrite field data type
IF <f_fieldcat_line>-inttype = 'X'
AND <f_fieldcat_line>-datatype(3) = 'INT'.
<f_fieldcat_line>-inttype = 'I'.
ENDIF.
ENDLOOP.
CLEAR: l_save_index.
UNASSIGN: <f_fieldcat_line>.
ENDDO.
* build semantic tables
l_n_hrz_keys = 1.
* Get keyfigures
LOOP AT lt_fieldcat_kkblo ASSIGNING <f_fieldcat_line>
WHERE tabname = l_tabname
AND tech NE 'X'
AND no_out NE 'X'.
CLEAR wa_sema.
CLEAR wa_hkey.
* Units belong to keyfigures -> display as str
READ TABLE lt_fieldcat_depf INTO wa_fieldcat_depf WITH KEY
fieldname = <f_fieldcat_line>-fieldname
tabname = <f_fieldcat_line>-tabname.
IF sy-subrc = 0.
wa_sema-col_typ = 'STR'.
wa_sema-col_ops = 'DFT'.
* Keyfigures
ELSE.
CASE <f_fieldcat_line>-datatype.
WHEN 'QUAN'.
wa_sema-col_typ = 'N03'.
IF <f_fieldcat_line>-no_sum NE 'X'.
wa_sema-col_ops = 'ADD'.
ELSE.
wa_sema-col_ops = 'NOP'. " no dependent field
ENDIF.
WHEN 'DATS'.
wa_sema-col_typ = 'DAT'.
wa_sema-col_ops = 'NOP'.
WHEN 'CHAR' OR 'UNIT' OR 'CUKY'. " Added fieldformats UNIT and CUKY - dd. 26-10-2012 Wouter Heuvelmans
wa_sema-col_typ = 'STR'.
wa_sema-col_ops = 'DFT'. " dependent field
* incase numeric, ex '00120' -> display as '12'
WHEN 'NUMC'.
wa_sema-col_typ = 'STR'.
wa_sema-col_ops = 'DFT'.
WHEN OTHERS.
wa_sema-col_typ = 'NUM'.
IF <f_fieldcat_line>-no_sum NE 'X'.
wa_sema-col_ops = 'ADD'.
ELSE.
wa_sema-col_ops = 'NOP'.
ENDIF.
ENDCASE.
ENDIF.
l_counter = l_counter + 1.
l_n_att_cols = l_n_att_cols + 1.
wa_sema-col_no = l_counter.
READ TABLE lt_column_index INTO wa_column_index WITH KEY
fieldname = <f_fieldcat_line>-fieldname
tabname = <f_fieldcat_line>-tabname.
IF sy-subrc = 0.
wa_sema-col_src = wa_column_index-col.
ELSE.
RAISE fatal_error.
ENDIF.
* columns index of ref currency field in table
IF NOT <f_fieldcat_line>-cfieldname IS INITIAL.
READ TABLE lt_column_index INTO wa_column_index WITH KEY
fieldname = <f_fieldcat_line>-cfieldname
tabname = <f_fieldcat_line>-ctabname.
IF sy-subrc = 0.
wa_sema-col_cur = wa_column_index-col.
ENDIF.
* quantities fields
* treat as currency when display on excel
ELSEIF NOT <f_fieldcat_line>-qfieldname IS INITIAL.
READ TABLE lt_column_index INTO wa_column_index WITH KEY
fieldname = <f_fieldcat_line>-qfieldname
tabname = <f_fieldcat_line>-qtabname.
IF sy-subrc = 0.
wa_sema-col_cur = wa_column_index-col.
ENDIF.
ENDIF.
* Treat of fixed currency in the fieldcatalog for column
DATA: l_num_help(2) TYPE n.
IF NOT <f_fieldcat_line>-currency IS INITIAL.
SELECT * FROM tcurx INTO TABLE lt_tcurx.
SORT lt_tcurx.
READ TABLE lt_tcurx INTO wa_tcurx
WITH KEY currkey = <f_fieldcat_line>-currency.
IF sy-subrc = 0.
l_num_help = wa_tcurx-currdec.
CONCATENATE 'N' l_num_help INTO wa_sema-col_typ.
wa_sema-col_cur = sy-tabix * ( -1 ).
ENDIF.
ENDIF.
wa_hkey-col_no = l_n_att_cols.
wa_hkey-row_no = l_n_hrz_keys.
wa_hkey-col_name = <f_fieldcat_line>-reptext.
APPEND wa_hkey TO lt_hkey.
APPEND wa_sema TO lt_sema.
ENDLOOP.
* free local data
CLEAR:
lt_column_index,
wa_column_index,
lt_fieldcat_depf,
wa_fieldcat_depf,
lt_tcurx,
wa_tcurx,
l_num,
l_typ,
wa,
l_int,
l_counter.
UNASSIGN:
<f_fieldcat_line>,
<f_excel_line>,
<f_excel_column>,
<f_fcat_column>.
*--------------------------------------------------------------------*
* SESSION 4: WRITE TO EXCEL
*--------------------------------------------------------------------*
CLEAR: wa_tcurx.
REFRESH: lt_tcurx.
* if spreadsheet dun have proxy yet
IF li_has IS INITIAL.
l_retcode = c_oi_errors=>ret_interface_not_supported.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING
retcode = l_retcode
no_flush = no_flush
IMPORTING
error = lo_error_w.
EXIT.
ENDIF.
CREATE OBJECT l_error
EXPORTING
object_name = 'OLE_DOCUMENT_PROXY'
method_name = 'get_ranges_names'.
CALL METHOD c_oi_errors=>add_error
EXPORTING
error = l_error.
DESCRIBE TABLE lt_sema LINES datareal.
DESCRIBE TABLE <f_excel_tab> LINES datac.
DESCRIBE TABLE lt_vkey LINES vkeycount.
IF datac = 0.
RAISE inv_data_range.
ENDIF.
IF vkeycount NE l_n_vrt_keys.
RAISE dim_mismatch_vkey.
ENDIF.
all = l_n_vrt_keys + l_n_att_cols.
IF datareal NE all.
RAISE dim_mismatch_sema.
ENDIF.
DATA: decimal TYPE c.
* get decimal separator format ('.', ',', ...) in Office config
CALL METHOD lo_proxy->get_application_property
EXPORTING
property_name = 'INTERNATIONAL'
subproperty_name = 'DECIMAL_SEPARATOR'
CHANGING
retvalue = decimal.
DATA: wa_usr TYPE usr01.
SELECT * FROM usr01 INTO wa_usr WHERE bname = sy-uname.
ENDSELECT.
DATA: comma_elim(4) TYPE c.
FIELD-SYMBOLS <g> TYPE any.
DATA search_item(4) VALUE ' #'.
CONCATENATE ',' decimal '.' decimal INTO comma_elim.
DATA help TYPE i. " table (with subtotal) line number
help = datac.
DATA: rowmax TYPE i VALUE 1. " header row number
DATA: columnmax TYPE i VALUE 0. " header columns number
LOOP AT lt_hkey INTO hkeyitem.
IF hkeyitem-col_no > columnmax.
columnmax = hkeyitem-col_no.
ENDIF.
IF hkeyitem-row_no > rowmax.
rowmax = hkeyitem-row_no.
ENDIF.
ENDLOOP.
DATA: hkeycolumns TYPE i. " header columns no
hkeycolumns = columnmax.
IF hkeycolumns < l_n_att_cols.
hkeycolumns = l_n_att_cols.
ENDIF.
columnmax = 0.
LOOP AT lt_vkey INTO vkeyitem.
IF vkeyitem-col_no > columnmax.
columnmax = vkeyitem-col_no.
ENDIF.
ENDLOOP.
DATA overflow TYPE i VALUE 1.
DATA testname(10) TYPE c.
DATA temp2 TYPE i. " 1st item row position in excel
DATA realmit TYPE i VALUE 1.
DATA realoverflow TYPE i VALUE 1. " row index in content
CALL METHOD lo_spreadsheet->screen_update
EXPORTING
updating = ''.
CALL METHOD lo_spreadsheet->load_lib.
DATA: str(40) TYPE c. " range names of columns range (w/o col header)
DATA: rows TYPE i. " row postion of 1st item line in ecxel
* calculate row position of data table
DESCRIBE TABLE it_listheader LINES li_commentary_rows.
* if grid had title, add 1 empy line between title and table
IF li_commentary_rows NE 0.
ADD 1 TO li_commentary_rows.
ENDIF.
* add top position of block data
li_commentary_rows = li_commentary_rows + i_top - 1.
* write header (commentary rows)
DATA: li_commentary_row_index TYPE i VALUE 1.
DATA: li_content_index TYPE i VALUE 1.
DATA: ls_index(10) TYPE c.
DATA ls_commentary_range(40) TYPE c VALUE 'TITLE'.
DATA: li_font_bold TYPE i.
DATA: li_font_italic TYPE i.
DATA: li_font_size TYPE i.
LOOP AT it_listheader INTO wa_listheader.
li_commentary_row_index = i_top + li_content_index - 1.
ls_index = li_content_index.
CONDENSE ls_index.
CONCATENATE ls_commentary_range(5) ls_index
INTO ls_commentary_range.
CONDENSE ls_commentary_range.
* insert title range
CALL METHOD lo_spreadsheet->insert_range_dim
EXPORTING
name = ls_commentary_range
top = li_commentary_row_index
left = i_left
rows = 1
columns = 1
no_flush = no_flush.
* format range
CASE wa_listheader-typ.
WHEN 'H'. "title
li_font_size = 16.
li_font_bold = 1.
li_font_italic = -1.
WHEN 'S'. "subtile
li_font_size = -1.
li_font_bold = 1.
li_font_italic = -1.
WHEN OTHERS. "'A' comment
li_font_size = -1.
li_font_bold = -1.
li_font_italic = 1.
ENDCASE.
CALL METHOD lo_spreadsheet->set_font
EXPORTING
rangename = ls_commentary_range
family = ''
size = li_font_size
bold = li_font_bold
italic = li_font_italic
align = 0
no_flush = no_flush.
* title: range content
rangeitem-name = ls_commentary_range.
rangeitem-columns = 1.
rangeitem-rows = 1.
APPEND rangeitem TO ranges.
contentsitem-row = li_content_index.
contentsitem-column = 1.
CONCATENATE wa_listheader-key
wa_listheader-info
INTO contentsitem-value
SEPARATED BY space.
CONDENSE contentsitem-value.
APPEND contentsitem TO contents.
ADD 1 TO li_content_index.
CLEAR:
rangeitem,
contentsitem,
ls_index.
ENDLOOP.
* set range data title
CALL METHOD lo_spreadsheet->set_ranges_data
EXPORTING
ranges = ranges
contents = contents
no_flush = no_flush.
REFRESH:
ranges,
contents.
rows = rowmax + li_commentary_rows + 1.
all = wa_usr-datfm.
all = all + 3.
LOOP AT lt_sema INTO semaitem.
IF semaitem-col_typ = 'DAT' OR semaitem-col_typ = 'MON' OR
semaitem-col_typ = 'N00' OR semaitem-col_typ = 'N01' OR
semaitem-col_typ = 'N01' OR semaitem-col_typ = 'N02' OR
semaitem-col_typ = 'N03' OR semaitem-col_typ = 'PCT' OR
semaitem-col_typ = 'STR' OR semaitem-col_typ = 'NUM'.
CLEAR str.
str = semaitem-col_no.
CONDENSE str.
CONCATENATE 'DATA' str INTO str.
mit = semaitem-col_no.
li_col_pos = semaitem-col_no + i_left - 1.
* range from data1 to data(n), for each columns of table
CALL METHOD lo_spreadsheet->insert_range_dim
EXPORTING
name = str
top = rows
left = li_col_pos
rows = help
columns = 1
no_flush = no_flush.
DATA dec TYPE i VALUE -1.
DATA typeinfo TYPE sydes_typeinfo.
LOOP AT <f_excel_tab> ASSIGNING <line>.
ASSIGN COMPONENT semaitem-col_no OF STRUCTURE <line> TO <item>.
DESCRIBE FIELD <item> INTO td.
READ TABLE td-types INDEX 1 INTO typeinfo.
IF typeinfo-type = 'P'.
dec = typeinfo-decimals.
ELSEIF typeinfo-type = 'I'.
dec = 0.
ENDIF.
DESCRIBE FIELD <line> TYPE typ COMPONENTS count.
mit = 1.
DO count TIMES.
IF mit = semaitem-col_src.
ASSIGN COMPONENT sy-index OF STRUCTURE <line> TO <item>.
DESCRIBE FIELD <item> INTO td.
READ TABLE td-types INDEX 1 INTO typeinfo.
IF typeinfo-type = 'P'.
dec = typeinfo-decimals.
ENDIF.
EXIT.
ENDIF.
mit = mit + 1.
ENDDO.
EXIT.
ENDLOOP.
* format for each columns of table (w/o columns headers)
IF semaitem-col_typ = 'DAT'.
IF semaitem-col_no > vkeycount.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = all
no_flush = no_flush.
ELSE.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 0
no_flush = no_flush.
ENDIF.
ELSEIF semaitem-col_typ = 'STR'.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 0
no_flush = no_flush.
ELSEIF semaitem-col_typ = 'MON'.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 10
no_flush = no_flush.
ELSEIF semaitem-col_typ = 'N00'.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 1
decimals = 0
no_flush = no_flush.
ELSEIF semaitem-col_typ = 'N01'.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 1
decimals = 1
no_flush = no_flush.
ELSEIF semaitem-col_typ = 'N02'.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 1
decimals = 2
no_flush = no_flush.
ELSEIF semaitem-col_typ = 'N03'.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 1
decimals = 3
no_flush = no_flush.
ELSEIF semaitem-col_typ = 'N04'.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 1
decimals = 4
no_flush = no_flush.
ELSEIF semaitem-col_typ = 'NUM'.
IF dec EQ -1.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 1
decimals = 2
no_flush = no_flush.
ELSE.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 1
decimals = dec
no_flush = no_flush.
ENDIF.
ELSEIF semaitem-col_typ = 'PCT'.
CALL METHOD lo_spreadsheet->set_format
EXPORTING
rangename = str
currency = ''
typ = 3
decimals = 0
no_flush = no_flush.
ENDIF.
ENDIF.
ENDLOOP.
* get item contents for set_range_data method
* get currency cell also
mit = 1.
DATA: currcells TYPE soi_cell_table.
DATA: curritem TYPE soi_cell_item.
curritem-rows = 1.
curritem-columns = 1.
curritem-front = -1.
curritem-back = -1.
curritem-font = ''.
curritem-size = -1.
curritem-bold = -1.
curritem-italic = -1.
curritem-align = -1.
curritem-frametyp = -1.
curritem-framecolor = -1.
curritem-currency = ''.
curritem-number = 1.
curritem-input = -1.
DATA: const TYPE i.
* Change for Correction request
* Initial 10000 lines are missing in Excel Export
* if there are only 2 columns in exported List object.
IF datareal GT 2.
const = 20000 / datareal.
ELSE.
const = 20000 / ( datareal + 2 ).
ENDIF.
DATA: lines TYPE i.
DATA: innerlines TYPE i.
DATA: counter TYPE i.
DATA: curritem2 LIKE curritem.
DATA: curritem3 LIKE curritem.
DATA: length TYPE i.
DATA: found.
* append content table (for method set_range_content)
LOOP AT <f_excel_tab> ASSIGNING <line>.
* save line index to compare with lt_subtot_indexs,
* to discover line is a subtotal / totale line or not
* ex use to set 'dun display zero in subtotal / total line'
l_save_index = sy-tabix.
DO datareal TIMES.
READ TABLE lt_sema INTO semaitem WITH KEY col_no = sy-index.
IF semaitem-col_src NE 0.
ASSIGN COMPONENT semaitem-col_src
OF STRUCTURE <line> TO <item>.
ELSE.
ASSIGN COMPONENT sy-index
OF STRUCTURE <line> TO <item>.
ENDIF.
contentsitem-row = realoverflow.
IF sy-subrc = 0.
MOVE semaitem-col_ops TO search_item(3).
SEARCH 'ADD#CNT#MIN#MAX#AVG#NOP#DFT#'
FOR search_item.
IF sy-subrc NE 0.
RAISE error_in_sema.
ENDIF.
MOVE semaitem-col_typ TO search_item(3).
SEARCH 'NUM#N00#N01#N02#N03#N04#PCT#DAT#MON#STR#'
FOR search_item.
IF sy-subrc NE 0.
RAISE error_in_sema.
ENDIF.
contentsitem-column = sy-index.
IF semaitem-col_typ EQ 'DAT' OR semaitem-col_typ EQ 'MON'.
IF semaitem-col_no > vkeycount.
" Hinweis 512418
" EXCEL bezieht Datumsangaben
" auf den 31.12.1899, behandelt
" aber 1900 als ein Schaltjahr
" d.h. ab 1.3.1900 korrekt
" 1.3.1900 als Zahl = 61
DATA: genesis TYPE d VALUE '18991230'.
DATA: number_of_days TYPE p.
* change for date in char format & sema_type = X
DATA: temp_date TYPE d.
IF NOT <item> IS INITIAL AND NOT <item> CO ' ' AND NOT
<item> CO '0'.
* change for date in char format & sema_type = X starts
IF sema_type = 'X'.
DESCRIBE FIELD <item> TYPE typ.
IF typ = 'C'.
temp_date = <item>.
number_of_days = temp_date - genesis.
ELSE.
number_of_days = <item> - genesis.
ENDIF.
ELSE.
number_of_days = <item> - genesis.
ENDIF.
* change for date in char format & sema_type = X ends
IF number_of_days < 61.
number_of_days = number_of_days - 1.
ENDIF.
SET COUNTRY 'DE'.
WRITE number_of_days TO contentsitem-value
NO-GROUPING
LEFT-JUSTIFIED.
SET COUNTRY space.
TRANSLATE contentsitem-value USING comma_elim.
ELSE.
CLEAR contentsitem-value.
ENDIF.
ELSE.
MOVE <item> TO contentsitem-value.
ENDIF.
ELSEIF semaitem-col_typ EQ 'NUM' OR
semaitem-col_typ EQ 'N00' OR
semaitem-col_typ EQ 'N01' OR
semaitem-col_typ EQ 'N02' OR
semaitem-col_typ EQ 'N03' OR
semaitem-col_typ EQ 'N04' OR
semaitem-col_typ EQ 'PCT'.
SET COUNTRY 'DE'.
DESCRIBE FIELD <item> TYPE typ.
IF semaitem-col_cur IS INITIAL.
IF typ NE 'F'.
WRITE <item> TO contentsitem-value NO-GROUPING
NO-SIGN DECIMALS 14.
ELSE.
WRITE <item> TO contentsitem-value NO-GROUPING
NO-SIGN.
ENDIF.
ELSE.
* Treat of fixed curreny for column >>Y9CK007319
IF semaitem-col_cur < 0.
semaitem-col_cur = semaitem-col_cur * ( -1 ).
SELECT * FROM tcurx INTO TABLE lt_tcurx.
SORT lt_tcurx.
READ TABLE lt_tcurx INTO
wa_tcurx INDEX semaitem-col_cur.
IF sy-subrc = 0.
IF typ NE 'F'.
WRITE <item> TO contentsitem-value NO-GROUPING
CURRENCY wa_tcurx-currkey NO-SIGN DECIMALS 14.
ELSE.
WRITE <item> TO contentsitem-value NO-GROUPING
CURRENCY wa_tcurx-currkey NO-SIGN.
ENDIF.
ENDIF.
ELSE.
ASSIGN COMPONENT semaitem-col_cur
OF STRUCTURE <line> TO <g>.
* mit = index of recent row
curritem-top = rowmax + mit + li_commentary_rows.
li_col_pos = sy-index + i_left - 1.
curritem-left = li_col_pos.
* if filed is quantity field (qfieldname ne space)
* or amount field (cfieldname ne space), then format decimal place
* corresponding with config
CLEAR: l_def.
READ TABLE lt_fieldcat_kkblo ASSIGNING <f_fieldcat_line>
WITH KEY tabname = l_tabname
tech = space
no_out = space
col_pos = semaitem-col_no.
IF sy-subrc = 0.
IF <f_fieldcat_line>-cfieldname IS NOT INITIAL.
l_def = 'C'.
ELSE."if <f_fieldcat_line>-qfieldname is not initial.
l_def = 'Q'.
ENDIF.
ENDIF.
* if field is amount field
* exporting of amount field base on currency decimal table: TCURX
IF l_def = 'C'. "field is amount field
SELECT SINGLE * FROM tcurx INTO wa_tcurx
WHERE currkey = <g>.
* if amount ref to un-know currency -> default decimal = 2
IF sy-subrc EQ 0.
curritem-decimals = wa_tcurx-currdec.
ELSE.
curritem-decimals = 2.
ENDIF.
APPEND curritem TO currcells.
IF typ NE 'F'.
WRITE <item> TO contentsitem-value
CURRENCY <g>
NO-SIGN NO-GROUPING.
ELSE.
WRITE <item> TO contentsitem-value
DECIMALS 14 CURRENCY <g>
NO-SIGN NO-GROUPING.
ENDIF.
* if field is quantity field
* exporting of quantity field base on quantity decimal table: T006
ELSE."if l_def = 'Q'. " field is quantity field
CLEAR: wa_t006.
SELECT SINGLE * FROM t006 INTO wa_t006
WHERE msehi = <g>.
* if quantity ref to un-know unit-> default decimal = 2
IF sy-subrc EQ 0.
curritem-decimals = wa_t006-decan.
ELSE.
curritem-decimals = 2.
ENDIF.
APPEND curritem TO currcells.
WRITE <item> TO contentsitem-value
UNIT <g>
NO-SIGN NO-GROUPING.
CONDENSE contentsitem-value.
ENDIF.
ENDIF. "Y9CK007319
ENDIF.
CONDENSE contentsitem-value.
* add function fieldcat-no zero display
LOOP AT lt_fieldcat_kkblo ASSIGNING <f_fieldcat_line>
WHERE tabname = l_tabname
AND tech NE 'X'
AND no_out NE 'X'.
IF <f_fieldcat_line>-col_pos = semaitem-col_no.
IF <f_fieldcat_line>-no_zero = 'X'.
IF <item> = '0'.
CLEAR: contentsitem-value.
ENDIF.
* dun display zero in total/subtotal line too
ELSE.
CLEAR: wa_subtot_indexs.
READ TABLE lt_subtot_indexs INTO wa_subtot_indexs
WITH KEY index = l_save_index.
IF sy-subrc = 0 AND <item> = '0'.
CLEAR: contentsitem-value.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
UNASSIGN: <f_fieldcat_line>.
IF <item> LT 0.
SEARCH contentsitem-value FOR 'E'.
IF sy-fdpos EQ 0.
* use prefix notation for signed numbers
TRANSLATE contentsitem-value USING '- '.
CONDENSE contentsitem-value NO-GAPS.
CONCATENATE '-' contentsitem-value
INTO contentsitem-value.
ELSE.
CONCATENATE '-' contentsitem-value
INTO contentsitem-value.
ENDIF.
ENDIF.
SET COUNTRY space.
* Hier wird nur die korrekte Kommaseparatierung gemacht, wenn die
* Zeichen einer
* Zahl enthalten sind. Das ist für Timestamps, die auch ":" enthalten.
* Für die
* darf keine Kommaseparierung stattfinden.
* Changing for correction request - Y6BK041073
IF contentsitem-value CO '0123456789.,-+E '.
TRANSLATE contentsitem-value USING comma_elim.
ENDIF.
ELSE.
CLEAR contentsitem-value.
* if type is not numeric -> dun display with zero
WRITE <item> TO contentsitem-value NO-ZERO.
SHIFT contentsitem-value LEFT DELETING LEADING space.
ENDIF.
APPEND contentsitem TO contents.
ENDIF.
ENDDO.
realmit = realmit + 1.
realoverflow = realoverflow + 1.
mit = mit + 1.
* overflow = current row index in content table
overflow = overflow + 1.
ENDLOOP.
UNASSIGN: <f_fieldcat_line>.
* set item range for set_range_data method
testname = mit / const.
CONDENSE testname.
CONCATENATE 'TEST' testname INTO testname.
realoverflow = realoverflow - 1.
realmit = realmit - 1.
help = realoverflow.
rangeitem-name = testname.
rangeitem-columns = datareal.
rangeitem-rows = help.
APPEND rangeitem TO ranges.
* insert item range dim
temp2 = rowmax + 1 + li_commentary_rows + realmit - realoverflow.
* items data
CALL METHOD lo_spreadsheet->insert_range_dim
EXPORTING
name = testname
top = temp2
left = i_left
rows = help
columns = datareal
no_flush = no_flush.
* get columns header contents for set_range_data method
* export columns header only if no columns header option = space
DATA: rowcount TYPE i.
DATA: columncount TYPE i.
IF i_columns_header = 'X'.
* append columns header to contents: hkey
rowcount = 1.
DO rowmax TIMES.
columncount = 1.
DO hkeycolumns TIMES.
LOOP AT lt_hkey INTO hkeyitem WHERE col_no = columncount
AND row_no = rowcount.
ENDLOOP.
IF sy-subrc = 0.
str = hkeyitem-col_name.
contentsitem-value = hkeyitem-col_name.
ELSE.
contentsitem-value = str.
ENDIF.
contentsitem-column = columncount.
contentsitem-row = rowcount.
APPEND contentsitem TO contents.
columncount = columncount + 1.
ENDDO.
rowcount = rowcount + 1.
ENDDO.
* incase columns header in multiline
DATA: rowmaxtemp TYPE i.
IF rowmax > 1.
rowmaxtemp = rowmax - 1.
rowcount = 1.
DO rowmaxtemp TIMES.
columncount = 1.
DO columnmax TIMES.
contentsitem-column = columncount.
contentsitem-row = rowcount.
contentsitem-value = ''.
APPEND contentsitem TO contents.
columncount = columncount + 1.
ENDDO.
rowcount = rowcount + 1.
ENDDO.
ENDIF.
* append columns header to contents: vkey
columncount = 1.
DO columnmax TIMES.
LOOP AT lt_vkey INTO vkeyitem WHERE col_no = columncount.
ENDLOOP.
contentsitem-value = vkeyitem-col_name.
contentsitem-row = rowmax.
contentsitem-column = columncount.
APPEND contentsitem TO contents.
columncount = columncount + 1.
ENDDO.
*--------------------------------------------------------------------*
* set header range for method set_range_data
* insert header keys range dim
li_head_top = li_commentary_rows + 1.
li_col_pos = i_left.
* insert range headers
IF hkeycolumns NE 0.
rangeitem-name = 'TESTHKEY'.
rangeitem-rows = rowmax.
rangeitem-columns = hkeycolumns.
APPEND rangeitem TO ranges.
CLEAR: rangeitem.
CALL METHOD lo_spreadsheet->insert_range_dim
EXPORTING
name = 'TESTHKEY'
top = li_head_top
left = li_col_pos
rows = rowmax
columns = hkeycolumns
no_flush = no_flush.
ENDIF.
ENDIF.
* format for columns header + total + subtotal
* ------------------------------------------
help = rowmax + realmit. " table + header lines
DATA: lt_format TYPE soi_format_table.
DATA: wa_format LIKE LINE OF lt_format.
DATA: wa_format_temp LIKE LINE OF lt_format.
FIELD-SYMBOLS: <f_source> TYPE any.
FIELD-SYMBOLS: <f_des> TYPE any.
* columns header format
wa_format-front = -1.
wa_format-back = 15. "grey
wa_format-font = space.
wa_format-size = -1.
wa_format-bold = 1.
wa_format-align = 0.
wa_format-frametyp = -1.
wa_format-framecolor = -1.
* get column header format from input record
* -> map input format
IF i_columns_header = 'X'.
wa_format-name = 'TESTHKEY'.
IF i_format_col_header IS NOT INITIAL.
DESCRIBE FIELD i_format_col_header TYPE l_typ COMPONENTS
li_col_num.
DO li_col_num TIMES.
IF sy-index NE 1. " dun map range name
ASSIGN COMPONENT sy-index OF STRUCTURE i_format_col_header
TO <f_source>.
IF <f_source> IS NOT INITIAL.
ASSIGN COMPONENT sy-index OF STRUCTURE wa_format TO <f_des>.
<f_des> = <f_source>.
UNASSIGN: <f_des>.
ENDIF.
UNASSIGN: <f_source>.
ENDIF.
ENDDO.
CLEAR: li_col_num.
ENDIF.
APPEND wa_format TO lt_format.
ENDIF.
* Zusammenfassen der Spalten mit gleicher Nachkommastellenzahl
* collect vertical cells (col) with the same number of decimal places
* to increase perfomance in currency cell format
DESCRIBE TABLE currcells LINES lines.
lines = lines - 1.
DO lines TIMES.
DESCRIBE TABLE currcells LINES innerlines.
innerlines = innerlines - 1.
SORT currcells BY left top.
CLEAR found.
DO innerlines TIMES.
READ TABLE currcells INDEX sy-index INTO curritem.
counter = sy-index + 1.
READ TABLE currcells INDEX counter INTO curritem2.
IF curritem-left EQ curritem2-left.
length = curritem-top + curritem-rows.
IF length EQ curritem2-top AND curritem-decimals EQ curritem2-decimals.
MOVE curritem TO curritem3.
curritem3-rows = curritem3-rows + curritem2-rows.
curritem-left = -1.
MODIFY currcells INDEX sy-index FROM curritem.
curritem2-left = -1.
MODIFY currcells INDEX counter FROM curritem2.
APPEND curritem3 TO currcells.
found = 'X'.
ENDIF.
ENDIF.
ENDDO.
IF found IS INITIAL.
EXIT.
ENDIF.
DELETE currcells WHERE left = -1.
ENDDO.
* Zusammenfassen der Zeilen mit gleicher Nachkommastellenzahl
* collect horizontal cells (row) with the same number of decimal places
* to increase perfomance in currency cell format
DESCRIBE TABLE currcells LINES lines.
lines = lines - 1.
DO lines TIMES.
DESCRIBE TABLE currcells LINES innerlines.
innerlines = innerlines - 1.
SORT currcells BY top left.
CLEAR found.
DO innerlines TIMES.
READ TABLE currcells INDEX sy-index INTO curritem.
counter = sy-index + 1.
READ TABLE currcells INDEX counter INTO curritem2.
IF curritem-top EQ curritem2-top AND curritem-rows EQ
curritem2-rows.
length = curritem-left + curritem-columns.
IF length EQ curritem2-left AND curritem-decimals EQ curritem2-decimals.
MOVE curritem TO curritem3.
curritem3-columns = curritem3-columns + curritem2-columns.
curritem-left = -1.
MODIFY currcells INDEX sy-index FROM curritem.
curritem2-left = -1.
MODIFY currcells INDEX counter FROM curritem2.
APPEND curritem3 TO currcells.
found = 'X'.
ENDIF.
ENDIF.
ENDDO.
IF found IS INITIAL.
EXIT.
ENDIF.
DELETE currcells WHERE left = -1.
ENDDO.
* Ende der Zusammenfassung
* item data: format for currency cell, corresponding with currency
CALL METHOD lo_spreadsheet->cell_format
EXPORTING
cells = currcells
no_flush = no_flush.
* item data: write item table content
CALL METHOD lo_spreadsheet->set_ranges_data
EXPORTING
ranges = ranges
contents = contents
no_flush = no_flush.
* whole table range to format all table
IF i_columns_header = 'X'.
li_head_top = li_commentary_rows + 1.
ELSE.
li_head_top = li_commentary_rows + 2.
help = help - 1.
ENDIF.
CALL METHOD lo_spreadsheet->insert_range_dim
EXPORTING
name = 'WHOLE_TABLE'
top = li_head_top
left = i_left
rows = help
columns = datareal
no_flush = no_flush.
* columns width auto fix
* this parameter = space in case use with exist template
IF i_columns_autofit = 'X'.
CALL METHOD lo_spreadsheet->fit_widest
EXPORTING
name = 'WHOLE_TABLE'
no_flush = no_flush.
ENDIF.
* frame
* The parameter has 8 bits
*0 Left margin
*1 Top marginT
*2 Bottom margin
*3 Right margin
*4 Horizontal line
*5 Vertical line
*6 Thinness
*7 Thickness
* here 127 = 1111111 6-5-4-3-2-1 mean Thin-ver-hor-right-bot-top-left
* ( final DOI method call, set no_flush = space
* equal to call method CL_GUI_CFW=>FLUSH )
CALL METHOD lo_spreadsheet->set_frame
EXPORTING
rangename = 'WHOLE_TABLE'
typ = 127
color = 1
no_flush = space
IMPORTING
error = lo_error
retcode = lc_retcode.
error_doi.
* reformat subtotal / total line after format wholw table
LOOP AT subranges INTO subrangeitem.
l_sub_index = subrangeitem-rows + li_commentary_rows + rowmax.
CALL METHOD lo_spreadsheet->insert_range_dim
EXPORTING
name = subrangeitem-name
left = i_left
top = l_sub_index
rows = 1
columns = datareal
no_flush = no_flush.
wa_format-name = subrangeitem-name.
* default format:
* - clolor: subtotal = light yellow, subtotal = yellow
* - frame: box
IF subrangeitem-name(3) = 'SUB'.
wa_format-back = 36. "subtotal line
wa_format_temp = i_format_subtotal.
ELSE.
wa_format-back = 27. "total line
wa_format_temp = i_format_total.
ENDIF.
wa_format-frametyp = 79.
wa_format-framecolor = 1.
wa_format-number = -1.
wa_format-align = -1.
* get subtoal + total format from intput parameter
* overwrite default format
IF wa_format_temp IS NOT INITIAL.
DESCRIBE FIELD wa_format_temp TYPE l_typ COMPONENTS li_col_num.
DO li_col_num TIMES.
IF sy-index NE 1. " dun map range name
ASSIGN COMPONENT sy-index OF STRUCTURE wa_format_temp
TO <f_source>.
IF <f_source> IS NOT INITIAL.
ASSIGN COMPONENT sy-index OF STRUCTURE wa_format TO <f_des>.
<f_des> = <f_source>.
UNASSIGN: <f_des>.
ENDIF.
UNASSIGN: <f_source>.
ENDIF.
ENDDO.
CLEAR: li_col_num.
ENDIF.
APPEND wa_format TO lt_format.
CLEAR: wa_format-name.
CLEAR: l_sub_index.
CLEAR: wa_format_temp.
ENDLOOP.
IF lt_format[] IS NOT INITIAL.
CALL METHOD lo_spreadsheet->set_ranges_format
EXPORTING
formattable = lt_format
no_flush = no_flush.
REFRESH: lt_format.
ENDIF.
*--------------------------------------------------------------------*
CALL METHOD lo_spreadsheet->screen_update
EXPORTING
updating = 'X'.
CALL METHOD c_oi_errors=>flush_errors.
lo_error_w = l_error.
lc_retcode = lo_error_w->error_code.
** catch no_flush -> led to dump ( optional )
* go_error = l_error.
* gc_retcode = go_error->error_code.
* error_doi.
CLEAR:
lt_sema,
wa_sema,
lt_hkey,
wa_hkey,
lt_vkey,
wa_vkey,
l_n_hrz_keys,
l_n_att_cols,
l_n_vrt_keys,
count,
datac,
datareal,
vkeycount,
all,
mit,
li_col_pos,
li_col_num,
ranges,
rangeitem,
contents,
contentsitem,
semaitem,
hkeyitem,
vkeyitem,
li_commentary_rows,
l_retcode,
li_head_top,
<f_excel_tab>.
CLEAR:
lo_error_w.
UNASSIGN:
<line>,
<item>,
<f_excel_tab>.
*--------------------------------------------------------------------*
* SESSION 5: SAVE AND CLOSE FILE
*--------------------------------------------------------------------*
* ex of save path: 'FILE://C:\temp\test.xlsx'
CONCATENATE 'FILE://' i_save_path
INTO ls_path.
CALL METHOD lo_proxy->save_document_to_url
EXPORTING
no_flush = 'X'
url = ls_path
IMPORTING
error = lo_error
retcode = lc_retcode
CHANGING
document_size = li_document_size.
error_doi.
* if save successfully -> raise successful message
* message i499(sy) with 'Document is Exported to ' p_path.
MESSAGE i499(sy) WITH 'Data has been exported successfully'.
CLEAR:
ls_path,
li_document_size.
close_document.
ENDMETHOD. "BIND_ALV_OLE2
METHOD bind_table.
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (wi p) 2012-12-01
* - ...
* aligning code
* message made to support multilinguality
*--------------------------------------------------------------------*
* issue #237 - Check if overlapping areas exist
* - Alessandro Iannacci 2012-12-01
* changes: - Added raise if overlaps are detected
*--------------------------------------------------------------------*
CONSTANTS:
lc_top_left_column TYPE zexcel_cell_column_alpha VALUE 'A',
lc_top_left_row TYPE zexcel_cell_row VALUE 1.
DATA:
lv_row_int TYPE zexcel_cell_row,
lv_first_row TYPE zexcel_cell_row,
lv_last_row TYPE zexcel_cell_row,
lv_column_int TYPE zexcel_cell_column,
lv_column_alpha TYPE zexcel_cell_column_alpha,
lt_field_catalog TYPE zexcel_t_fieldcatalog,
lv_id TYPE i,
lv_rows TYPE i,
lv_formula TYPE string,
ls_settings TYPE zexcel_s_table_settings,
lo_table TYPE REF TO zcl_excel_table,
lt_column_name_buffer TYPE SORTED TABLE OF string WITH UNIQUE KEY table_line,
lv_value TYPE string,
lv_value_lowercase TYPE string,
lv_syindex TYPE char3,
lv_errormessage TYPE string, "ins issue #237
lv_columns TYPE i,
lt_columns TYPE zexcel_t_fieldcatalog,
lv_maxcol TYPE i,
lv_maxrow TYPE i,
lo_iterator TYPE REF TO cl_object_collection_iterator,
lo_style_cond TYPE REF TO zcl_excel_style_cond,
lo_curtable TYPE REF TO zcl_excel_table.
FIELD-SYMBOLS:
<ls_field_catalog> TYPE zexcel_s_fieldcatalog,
<ls_field_catalog_custom> TYPE zexcel_s_fieldcatalog,
<fs_table_line> TYPE any,
<fs_fldval> TYPE any.
ls_settings = is_table_settings.
IF ls_settings-top_left_column IS INITIAL.
ls_settings-top_left_column = lc_top_left_column.
ENDIF.
IF ls_settings-table_style IS INITIAL.
ls_settings-table_style = zcl_excel_table=>builtinstyle_medium2.
ENDIF.
IF ls_settings-top_left_row IS INITIAL.
ls_settings-top_left_row = lc_top_left_row.
ENDIF.
IF it_field_catalog IS NOT SUPPLIED.
lt_field_catalog = zcl_excel_common=>get_fieldcatalog( ip_table = ip_table ).
ELSE.
lt_field_catalog = it_field_catalog.
ENDIF.
SORT lt_field_catalog BY position.
*--------------------------------------------------------------------*
* issue #237 Check if overlapping areas exist Start
*--------------------------------------------------------------------*
"Get the number of columns for the current table
lt_columns = lt_field_catalog.
DELETE lt_columns WHERE dynpfld NE abap_true.
DESCRIBE TABLE lt_columns LINES lv_columns.
"Calculate the top left row of the current table
lv_column_int = zcl_excel_common=>convert_column2int( ls_settings-top_left_column ).
lv_row_int = ls_settings-top_left_row.
"Get number of row for the current table
DESCRIBE TABLE ip_table LINES lv_rows.
"Calculate the bottom right row for the current table
lv_maxcol = lv_column_int + lv_columns - 1.
lv_maxrow = lv_row_int + lv_rows - 1.
ls_settings-bottom_right_column = zcl_excel_common=>convert_column2alpha( lv_maxcol ).
ls_settings-bottom_right_row = lv_maxrow.
lv_column_int = zcl_excel_common=>convert_column2int( ls_settings-top_left_column ).
lo_iterator = me->tables->if_object_collection~get_iterator( ).
WHILE lo_iterator->if_object_collection_iterator~has_next( ) EQ abap_true.
lo_curtable ?= lo_iterator->if_object_collection_iterator~get_next( ).
IF ( ( ls_settings-top_left_row GE lo_curtable->settings-top_left_row AND ls_settings-top_left_row LE lo_curtable->settings-bottom_right_row )
OR
( ls_settings-bottom_right_row GE lo_curtable->settings-top_left_row AND ls_settings-bottom_right_row LE lo_curtable->settings-bottom_right_row )
)
AND
( ( lv_column_int GE zcl_excel_common=>convert_column2int( lo_curtable->settings-top_left_column ) AND lv_column_int LE zcl_excel_common=>convert_column2int( lo_curtable->settings-bottom_right_column ) )
OR
( lv_maxcol GE zcl_excel_common=>convert_column2int( lo_curtable->settings-top_left_column ) AND lv_maxcol LE zcl_excel_common=>convert_column2int( lo_curtable->settings-bottom_right_column ) )
).
lv_errormessage = 'Table overlaps with previously bound table and will not be added to worksheet.'(400).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
ENDWHILE.
*--------------------------------------------------------------------*
* issue #237 Check if overlapping areas exist End
*--------------------------------------------------------------------*
CREATE OBJECT lo_table.
lo_table->settings = ls_settings.
lo_table->set_data( ir_data = ip_table ).
lv_id = me->excel->get_next_table_id( ).
lo_table->set_id( iv_id = lv_id ).
* lo_table->fieldcat = lt_field_catalog[].
me->tables->add( lo_table ).
* It is better to loop column by column (only visible column)
LOOP AT lt_field_catalog ASSIGNING <ls_field_catalog> WHERE dynpfld EQ abap_true.
lv_column_alpha = zcl_excel_common=>convert_column2alpha( lv_column_int ).
" Due restrinction of new table object we cannot have two column with the same name
" Check if a column with the same name exists, if exists add a counter
" If no medium description is provided we try to use small or long
* lv_value = <ls_field_catalog>-scrtext_m.
FIELD-SYMBOLS: <scrtxt1> TYPE any,
<scrtxt2> TYPE any,
<scrtxt3> TYPE any.
CASE iv_default_descr.
WHEN 'M'.
ASSIGN <ls_field_catalog>-scrtext_m TO <scrtxt1>.
ASSIGN <ls_field_catalog>-scrtext_s TO <scrtxt2>.
ASSIGN <ls_field_catalog>-scrtext_l TO <scrtxt3>.
WHEN 'S'.
ASSIGN <ls_field_catalog>-scrtext_s TO <scrtxt1>.
ASSIGN <ls_field_catalog>-scrtext_m TO <scrtxt2>.
ASSIGN <ls_field_catalog>-scrtext_l TO <scrtxt3>.
WHEN 'L'.
ASSIGN <ls_field_catalog>-scrtext_l TO <scrtxt1>.
ASSIGN <ls_field_catalog>-scrtext_m TO <scrtxt2>.
ASSIGN <ls_field_catalog>-scrtext_s TO <scrtxt3>.
WHEN OTHERS.
ASSIGN <ls_field_catalog>-scrtext_m TO <scrtxt1>.
ASSIGN <ls_field_catalog>-scrtext_s TO <scrtxt2>.
ASSIGN <ls_field_catalog>-scrtext_l TO <scrtxt3>.
ENDCASE.
IF <scrtxt1> IS NOT INITIAL.
lv_value = <scrtxt1>.
<ls_field_catalog>-scrtext_l = lv_value.
ELSEIF <scrtxt2> IS NOT INITIAL.
lv_value = <scrtxt2>.
<ls_field_catalog>-scrtext_l = lv_value.
ELSEIF <scrtxt3> IS NOT INITIAL.
lv_value = <scrtxt3>.
<ls_field_catalog>-scrtext_l = lv_value.
ELSE.
lv_value = 'Column'. " default value as Excel does
<ls_field_catalog>-scrtext_l = lv_value.
ENDIF.
WHILE 1 = 1.
lv_value_lowercase = lv_value.
TRANSLATE lv_value_lowercase TO LOWER CASE.
READ TABLE lt_column_name_buffer TRANSPORTING NO FIELDS WITH KEY table_line = lv_value_lowercase BINARY SEARCH.
IF sy-subrc <> 0.
<ls_field_catalog>-scrtext_l = lv_value.
INSERT lv_value_lowercase INTO TABLE lt_column_name_buffer.
EXIT.
ELSE.
lv_syindex = sy-index.
CONCATENATE <ls_field_catalog>-scrtext_l lv_syindex INTO lv_value.
ENDIF.
ENDWHILE.
" First of all write column header
IF <ls_field_catalog>-style_header IS NOT INITIAL.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_value = lv_value
ip_style = <ls_field_catalog>-style_header ).
ELSE.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_value = lv_value ).
ENDIF.
ADD 1 TO lv_row_int.
LOOP AT ip_table ASSIGNING <fs_table_line>.
ASSIGN COMPONENT <ls_field_catalog>-fieldname OF STRUCTURE <fs_table_line> TO <fs_fldval>.
" issue #290 Add formula support in table
IF <ls_field_catalog>-formula EQ abap_true.
IF <ls_field_catalog>-style IS NOT INITIAL.
IF <ls_field_catalog>-abap_type IS NOT INITIAL.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_formula = <fs_fldval>
ip_abap_type = <ls_field_catalog>-abap_type
ip_style = <ls_field_catalog>-style ).
ELSE.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_formula = <fs_fldval>
ip_style = <ls_field_catalog>-style ).
ENDIF.
ELSEIF <ls_field_catalog>-abap_type IS NOT INITIAL.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_formula = <fs_fldval>
ip_abap_type = <ls_field_catalog>-abap_type ).
ELSE.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_formula = <fs_fldval> ).
ENDIF.
ELSE.
IF <ls_field_catalog>-style IS NOT INITIAL.
IF <ls_field_catalog>-abap_type IS NOT INITIAL.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_value = <fs_fldval>
ip_abap_type = <ls_field_catalog>-abap_type
ip_style = <ls_field_catalog>-style ).
ELSE.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_value = <fs_fldval>
ip_style = <ls_field_catalog>-style ).
ENDIF.
ELSE.
IF <ls_field_catalog>-abap_type IS NOT INITIAL.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_abap_type = <ls_field_catalog>-abap_type
ip_value = <fs_fldval> ).
ELSE.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_value = <fs_fldval> ).
ENDIF.
ENDIF.
ENDIF.
ADD 1 TO lv_row_int.
ENDLOOP.
IF sy-subrc <> 0. "create empty row if table has no data
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_value = space ).
ADD 1 TO lv_row_int.
ENDIF.
*--------------------------------------------------------------------*
" totals
*--------------------------------------------------------------------*
IF <ls_field_catalog>-totals_function IS NOT INITIAL.
lv_formula = lo_table->get_totals_formula( ip_column = <ls_field_catalog>-scrtext_l ip_function = <ls_field_catalog>-totals_function ).
IF <ls_field_catalog>-style_total IS NOT INITIAL.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_formula = lv_formula
ip_style = <ls_field_catalog>-style_total ).
ELSE.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_formula = lv_formula ).
ENDIF.
ENDIF.
lv_row_int = ls_settings-top_left_row.
ADD 1 TO lv_column_int.
*--------------------------------------------------------------------*
" conditional formatting
*--------------------------------------------------------------------*
IF <ls_field_catalog>-style_cond IS NOT INITIAL.
lv_first_row = ls_settings-top_left_row + 1. " +1 to exclude header
lv_last_row = ls_settings-top_left_row + lv_rows.
lo_style_cond = me->get_style_cond( <ls_field_catalog>-style_cond ).
lo_style_cond->set_range( ip_start_column = lv_column_alpha
ip_start_row = lv_first_row
ip_stop_column = lv_column_alpha
ip_stop_row = lv_last_row ).
ENDIF.
ENDLOOP.
*--------------------------------------------------------------------*
" Set field catalog
*--------------------------------------------------------------------*
lo_table->fieldcat = lt_field_catalog[].
es_table_settings = ls_settings.
es_table_settings-bottom_right_column = lv_column_alpha.
" >> Issue #291
IF ip_table IS INITIAL.
es_table_settings-bottom_right_row = ls_settings-top_left_row + 2. "Last rows
ELSE.
es_table_settings-bottom_right_row = ls_settings-top_left_row + lv_rows + 1. "Last rows
ENDIF.
" << Issue #291
ENDMETHOD. "BIND_TABLE
METHOD calculate_cell_width.
*--------------------------------------------------------------------*
* issue #293 - Roberto Bianco
* - Christian Assig 2014-03-14
*
* changes: - Calculate widths using SAPscript font metrics
* (transaction SE73)
* - Calculate the width of dates
* - Add additional width for auto filter buttons
* - Add cell padding to simulate Excel behavior
*--------------------------------------------------------------------*
CONSTANTS:
lc_default_font_name TYPE zexcel_style_font_name VALUE 'Calibri', "#EC NOTEXT
lc_default_font_height TYPE tdfontsize VALUE '110',
lc_excel_cell_padding TYPE float VALUE '0.75'.
DATA: ld_cell_value TYPE zexcel_cell_value,
ld_current_character TYPE c LENGTH 1,
ld_style_guid TYPE zexcel_cell_style,
ls_stylemapping TYPE zexcel_s_stylemapping,
lo_table_object TYPE REF TO object,
lo_table TYPE REF TO zcl_excel_table,
ld_table_top_left_column TYPE zexcel_cell_column,
ld_table_bottom_right_column TYPE zexcel_cell_column,
ld_flag_contains_auto_filter TYPE abap_bool VALUE abap_false,
ld_flag_bold TYPE abap_bool VALUE abap_false,
ld_flag_italic TYPE abap_bool VALUE abap_false,
ld_date TYPE d,
ld_date_char TYPE c LENGTH 50,
ld_font_height TYPE tdfontsize VALUE lc_default_font_height,
lt_itcfc TYPE STANDARD TABLE OF itcfc,
ld_offset TYPE i,
ld_length TYPE i,
ld_uccp TYPE i,
ls_font_metric TYPE mty_s_font_metric,
ld_width_from_font_metrics TYPE i,
ld_font_family TYPE itcfh-tdfamily,
ld_font_name TYPE zexcel_style_font_name VALUE lc_default_font_name,
lt_font_families LIKE STANDARD TABLE OF ld_font_family,
ls_font_cache TYPE mty_s_font_cache.
FIELD-SYMBOLS: <ls_font_cache> TYPE mty_s_font_cache,
<ls_font_metric> TYPE mty_s_font_metric,
<ls_itcfc> TYPE itcfc.
" Determine cell content and cell style
me->get_cell( EXPORTING ip_column = ip_column
ip_row = ip_row
IMPORTING ep_value = ld_cell_value
ep_guid = ld_style_guid ).
" ABAP2XLSX uses tables to define areas containing headers and
" auto-filters. Find out if the current cell is in the header
" of one of these tables.
LOOP AT me->tables->collection INTO lo_table_object.
" Downcast: OBJECT -> ZCL_EXCEL_TABLE
lo_table ?= lo_table_object.
" Convert column letters to corresponding integer values
ld_table_top_left_column =
zcl_excel_common=>convert_column2int(
lo_table->settings-top_left_column ).
ld_table_bottom_right_column =
zcl_excel_common=>convert_column2int(
lo_table->settings-bottom_right_column ).
" Is the current cell part of the table header?
IF ip_column BETWEEN ld_table_top_left_column AND
ld_table_bottom_right_column AND
ip_row EQ lo_table->settings-top_left_row.
" Current cell is part of the table header
" -> Assume that an auto filter is present and that the font is
" bold
ld_flag_contains_auto_filter = abap_true.
ld_flag_bold = abap_true.
ENDIF.
ENDLOOP.
" If a style GUID is present, read style attributes
IF ld_style_guid IS NOT INITIAL.
TRY.
" Read style attributes
ls_stylemapping = me->excel->get_style_to_guid( ld_style_guid ).
" If the current cell contains the default date format,
" convert the cell value to a date and calculate its length
IF ls_stylemapping-complete_style-number_format-format_code =
zcl_excel_style_number_format=>c_format_date_std.
" Convert excel date to ABAP date
ld_date =
zcl_excel_common=>excel_string_to_date( ld_cell_value ).
" Format ABAP date using user's formatting settings
WRITE ld_date TO ld_date_char.
" Remember the formatted date to calculate the cell size
ld_cell_value = ld_date_char.
ENDIF.
" Read the font size and convert it to the font height
" used by SAPscript (multiplication by 10)
IF ls_stylemapping-complete_stylex-font-size = abap_true.
ld_font_height = ls_stylemapping-complete_style-font-size * 10.
ENDIF.
" If set, remember the font name
IF ls_stylemapping-complete_stylex-font-name = abap_true.
ld_font_name = ls_stylemapping-complete_style-font-name.
ENDIF.
" If set, remember whether font is bold and italic.
IF ls_stylemapping-complete_stylex-font-bold = abap_true.
ld_flag_bold = ls_stylemapping-complete_style-font-bold.
ENDIF.
IF ls_stylemapping-complete_stylex-font-italic = abap_true.
ld_flag_italic = ls_stylemapping-complete_style-font-italic.
ENDIF.
CATCH zcx_excel. "#EC NO_HANDLER
" Style GUID is present, but style was not found
" Continue with default values
ENDTRY.
ENDIF.
" Check if the same font (font name and font attributes) was already
" used before
READ TABLE mth_font_cache
WITH TABLE KEY
font_name = ld_font_name
font_height = ld_font_height
flag_bold = ld_flag_bold
flag_italic = ld_flag_italic
ASSIGNING <ls_font_cache>.
IF sy-subrc <> 0.
" Font is used for the first time
" Add the font to our local font cache
ls_font_cache-font_name = ld_font_name.
ls_font_cache-font_height = ld_font_height.
ls_font_cache-flag_bold = ld_flag_bold.
ls_font_cache-flag_italic = ld_flag_italic.
INSERT ls_font_cache INTO TABLE mth_font_cache
ASSIGNING <ls_font_cache>.
" Determine the SAPscript font family name from the Excel
" font name
SELECT tdfamily
FROM tfo01
INTO TABLE lt_font_families
UP TO 1 ROWS
WHERE tdtext = ld_font_name
ORDER BY PRIMARY KEY.
" Check if a matching font family was found
" Fonts can be uploaded from TTF files using transaction SE73
IF lines( lt_font_families ) > 0.
READ TABLE lt_font_families INDEX 1 INTO ld_font_family.
" Load font metrics (returns a table with the size of each letter
" in the font)
CALL FUNCTION 'LOAD_FONT'
EXPORTING
family = ld_font_family
height = ld_font_height
printer = 'SWIN'
bold = ld_flag_bold
italic = ld_flag_italic
TABLES
metric = lt_itcfc
EXCEPTIONS
font_family = 1
codepage = 2
device_type = 3
OTHERS = 4.
IF sy-subrc <> 0.
CLEAR lt_itcfc.
ENDIF.
" For faster access, convert each character number to the actual
" character, and store the characters and their sizes in a hash
" table
LOOP AT lt_itcfc ASSIGNING <ls_itcfc>.
ld_uccp = <ls_itcfc>-cpcharno.
ls_font_metric-char =
cl_abap_conv_in_ce=>uccpi( ld_uccp ).
ls_font_metric-char_width = <ls_itcfc>-tdcwidths.
INSERT ls_font_metric
INTO TABLE <ls_font_cache>-th_font_metrics.
ENDLOOP.
ENDIF.
ENDIF.
" Calculate the cell width
" If available, use font metrics
IF lines( <ls_font_cache>-th_font_metrics ) = 0.
" Font metrics are not available
" -> Calculate the cell width using only the font size
ld_length = strlen( ld_cell_value ).
ep_width = ld_length * ld_font_height / lc_default_font_height + lc_excel_cell_padding.
ELSE.
" Font metrics are available
" Calculate the size of the text by adding the sizes of each
" letter
ld_length = strlen( ld_cell_value ).
DO ld_length TIMES.
" Subtract 1, because the first character is at offset 0
ld_offset = sy-index - 1.
" Read the current character from the cell value
ld_current_character = ld_cell_value+ld_offset(1).
" Look up the size of the current letter
READ TABLE <ls_font_cache>-th_font_metrics
WITH TABLE KEY char = ld_current_character
ASSIGNING <ls_font_metric>.
IF sy-subrc = 0.
" The size of the letter is known
" -> Add the actual size of the letter
ADD <ls_font_metric>-char_width TO ld_width_from_font_metrics.
ELSE.
" The size of the letter is unknown
" -> Add the font height as the default letter size
ADD ld_font_height TO ld_width_from_font_metrics.
ENDIF.
ENDDO.
" Add cell padding (Excel makes columns a bit wider than the space
" that is needed for the text itself) and convert unit
" (division by 100)
ep_width = ld_width_from_font_metrics / 100 + lc_excel_cell_padding.
ENDIF.
" If the current cell contains an auto filter, make it a bit wider.
" The size used by the auto filter button does not depend on the font
" size.
IF ld_flag_contains_auto_filter = abap_true.
ADD 2 TO ep_width.
ENDIF.
ENDMETHOD. "CALCULATE_CELL_WIDTH
METHOD calculate_column_widths.
TYPES:
BEGIN OF t_auto_size,
col_index TYPE int4,
width TYPE float,
END OF t_auto_size.
TYPES: tt_auto_size TYPE TABLE OF t_auto_size.
DATA: lo_column_iterator TYPE REF TO cl_object_collection_iterator,
lo_column TYPE REF TO zcl_excel_column.
DATA: auto_size TYPE flag.
DATA: auto_sizes TYPE tt_auto_size.
DATA: count TYPE int4.
DATA: highest_row TYPE int4.
DATA: width TYPE float.
FIELD-SYMBOLS: <auto_size> LIKE LINE OF auto_sizes.
lo_column_iterator = me->get_columns_iterator( ).
WHILE lo_column_iterator->has_next( ) = abap_true.
lo_column ?= lo_column_iterator->get_next( ).
auto_size = lo_column->get_auto_size( ).
IF auto_size = abap_true.
APPEND INITIAL LINE TO auto_sizes ASSIGNING <auto_size>.
<auto_size>-col_index = lo_column->get_column_index( ).
<auto_size>-width = -1.
ENDIF.
ENDWHILE.
" There is only something to do if there are some auto-size columns
IF NOT auto_sizes IS INITIAL.
highest_row = me->get_highest_row( ).
LOOP AT auto_sizes ASSIGNING <auto_size>.
count = 1.
WHILE count <= highest_row.
* Do not check merged cells
IF is_cell_merged(
ip_column = <auto_size>-col_index
ip_row = count ) = abap_false.
width = calculate_cell_width( ip_column = <auto_size>-col_index " issue #155 - less restrictive typing for ip_column
ip_row = count ).
IF width > <auto_size>-width.
<auto_size>-width = width.
ENDIF.
ENDIF.
count = count + 1.
ENDWHILE.
lo_column = me->get_column( <auto_size>-col_index ). " issue #155 - less restrictive typing for ip_column
lo_column->set_width( <auto_size>-width ).
ENDLOOP.
ENDIF.
ENDMETHOD. "CALCULATE_COLUMN_WIDTHS
METHOD change_cell_style.
" issue # 139
DATA: stylemapping TYPE zexcel_s_stylemapping,
complete_style TYPE zexcel_s_cstyle_complete,
complete_stylex TYPE zexcel_s_cstylex_complete,
borderx TYPE zexcel_s_cstylex_border,
l_guid TYPE zexcel_cell_style. "issue # 177
* We have a lot of parameters. Use some macros to make the coding more structured
DEFINE clear_initial_colorxfields.
if &1-rgb is initial.
clear &2-rgb.
endif.
if &1-indexed is initial.
clear &2-indexed.
endif.
if &1-theme is initial.
clear &2-theme.
endif.
if &1-tint is initial.
clear &2-tint.
endif.
END-OF-DEFINITION.
DEFINE move_supplied_borders.
if ip_&1 is supplied. " only act if parameter was supplied
if ip_x&1 is supplied. "
borderx = ip_x&1. " use supplied x-parameter
else.
clear borderx with 'X'.
* clear in a way that would be expected to work easily
if ip_&1-border_style is initial.
clear borderx-border_style.
endif.
clear_initial_colorxfields ip_&1-border_color borderx-border_color.
endif.
move-corresponding ip_&1 to complete_style-&2.
move-corresponding borderx to complete_stylex-&2.
endif.
END-OF-DEFINITION.
* First get current stylsettings
TRY.
me->get_cell( EXPORTING ip_column = ip_column " Cell Column
ip_row = ip_row " Cell Row
IMPORTING ep_guid = l_guid )." Cell Value ). "issue # 177
stylemapping = me->excel->get_style_to_guid( l_guid ). "issue # 177
complete_style = stylemapping-complete_style.
complete_stylex = stylemapping-complete_stylex.
CATCH zcx_excel.
* Error --> use submitted style
ENDTRY.
* move_supplied_multistyles: complete.
IF ip_complete IS SUPPLIED.
IF ip_xcomplete IS NOT SUPPLIED.
zcx_excel=>raise_text( 'Complete styleinfo has to be supplied with corresponding X-field' ).
ENDIF.
MOVE-CORRESPONDING ip_complete TO complete_style.
MOVE-CORRESPONDING ip_xcomplete TO complete_stylex.
ENDIF.
IF ip_font IS SUPPLIED.
DATA: fontx LIKE ip_xfont.
IF ip_xfont IS SUPPLIED.
fontx = ip_xfont.
ELSE.
* Only supplied values should be used - exception: Flags bold and italic strikethrough underline
MOVE 'X' TO: fontx-bold,
fontx-italic,
fontx-strikethrough,
fontx-underline_mode.
CLEAR fontx-color WITH 'X'.
clear_initial_colorxfields ip_font-color fontx-color.
IF ip_font-family IS NOT INITIAL.
fontx-family = 'X'.
ENDIF.
IF ip_font-name IS NOT INITIAL.
fontx-name = 'X'.
ENDIF.
IF ip_font-scheme IS NOT INITIAL.
fontx-scheme = 'X'.
ENDIF.
IF ip_font-size IS NOT INITIAL.
fontx-size = 'X'.
ENDIF.
IF ip_font-underline_mode IS NOT INITIAL.
fontx-underline_mode = 'X'.
ENDIF.
ENDIF.
MOVE-CORRESPONDING ip_font TO complete_style-font.
MOVE-CORRESPONDING fontx TO complete_stylex-font.
* Correction for undeline mode
ENDIF.
IF ip_fill IS SUPPLIED.
DATA: fillx LIKE ip_xfill.
IF ip_xfill IS SUPPLIED.
fillx = ip_xfill.
ELSE.
CLEAR fillx WITH 'X'.
IF ip_fill-filltype IS INITIAL.
CLEAR fillx-filltype.
ENDIF.
clear_initial_colorxfields ip_fill-fgcolor fillx-fgcolor.
clear_initial_colorxfields ip_fill-bgcolor fillx-bgcolor.
ENDIF.
MOVE-CORRESPONDING ip_fill TO complete_style-fill.
MOVE-CORRESPONDING fillx TO complete_stylex-fill.
ENDIF.
IF ip_borders IS SUPPLIED.
DATA: bordersx LIKE ip_xborders.
IF ip_xborders IS SUPPLIED.
bordersx = ip_xborders.
ELSE.
CLEAR bordersx WITH 'X'.
IF ip_borders-allborders-border_style IS INITIAL.
CLEAR bordersx-allborders-border_style.
ENDIF.
IF ip_borders-diagonal-border_style IS INITIAL.
CLEAR bordersx-diagonal-border_style.
ENDIF.
IF ip_borders-down-border_style IS INITIAL.
CLEAR bordersx-down-border_style.
ENDIF.
IF ip_borders-left-border_style IS INITIAL.
CLEAR bordersx-left-border_style.
ENDIF.
IF ip_borders-right-border_style IS INITIAL.
CLEAR bordersx-right-border_style.
ENDIF.
IF ip_borders-top-border_style IS INITIAL.
CLEAR bordersx-top-border_style.
ENDIF.
clear_initial_colorxfields ip_borders-allborders-border_color bordersx-allborders-border_color.
clear_initial_colorxfields ip_borders-diagonal-border_color bordersx-diagonal-border_color.
clear_initial_colorxfields ip_borders-down-border_color bordersx-down-border_color.
clear_initial_colorxfields ip_borders-left-border_color bordersx-left-border_color.
clear_initial_colorxfields ip_borders-right-border_color bordersx-right-border_color.
clear_initial_colorxfields ip_borders-top-border_color bordersx-top-border_color.
ENDIF.
MOVE-CORRESPONDING ip_borders TO complete_style-borders.
MOVE-CORRESPONDING bordersx TO complete_stylex-borders.
ENDIF.
IF ip_alignment IS SUPPLIED.
DATA: alignmentx LIKE ip_xalignment.
IF ip_xalignment IS SUPPLIED.
alignmentx = ip_xalignment.
ELSE.
CLEAR alignmentx WITH 'X'.
IF ip_alignment-horizontal IS INITIAL.
CLEAR alignmentx-horizontal.
ENDIF.
IF ip_alignment-vertical IS INITIAL.
CLEAR alignmentx-vertical.
ENDIF.
ENDIF.
MOVE-CORRESPONDING ip_alignment TO complete_style-alignment.
MOVE-CORRESPONDING alignmentx TO complete_stylex-alignment.
ENDIF.
IF ip_protection IS SUPPLIED.
MOVE-CORRESPONDING ip_protection TO complete_style-protection.
IF ip_xprotection IS SUPPLIED.
MOVE-CORRESPONDING ip_xprotection TO complete_stylex-protection.
ELSE.
IF ip_protection-hidden IS NOT INITIAL.
complete_stylex-protection-hidden = 'X'.
ENDIF.
IF ip_protection-locked IS NOT INITIAL.
complete_stylex-protection-locked = 'X'.
ENDIF.
ENDIF.
ENDIF.
move_supplied_borders : borders_allborders borders-allborders,
borders_diagonal borders-diagonal ,
borders_down borders-down ,
borders_left borders-left ,
borders_right borders-right ,
borders_top borders-top .
DEFINE move_supplied_singlestyles.
if ip_&1 is supplied.
complete_style-&2 = ip_&1.
complete_stylex-&2 = 'X'.
endif.
END-OF-DEFINITION.
move_supplied_singlestyles: number_format_format_code number_format-format_code,
font_bold font-bold,
font_color font-color,
font_color_rgb font-color-rgb,
font_color_indexed font-color-indexed,
font_color_theme font-color-theme,
font_color_tint font-color-tint,
font_family font-family,
font_italic font-italic,
font_name font-name,
font_scheme font-scheme,
font_size font-size,
font_strikethrough font-strikethrough,
font_underline font-underline,
font_underline_mode font-underline_mode,
fill_filltype fill-filltype,
fill_rotation fill-rotation,
fill_fgcolor fill-fgcolor,
fill_fgcolor_rgb fill-fgcolor-rgb,
fill_fgcolor_indexed fill-fgcolor-indexed,
fill_fgcolor_theme fill-fgcolor-theme,
fill_fgcolor_tint fill-fgcolor-tint,
fill_bgcolor fill-bgcolor,
fill_bgcolor_rgb fill-bgcolor-rgb,
fill_bgcolor_indexed fill-bgcolor-indexed,
fill_bgcolor_theme fill-bgcolor-theme,
fill_bgcolor_tint fill-bgcolor-tint,
fill_gradtype_type fill-gradtype-type,
fill_gradtype_degree fill-gradtype-degree,
fill_gradtype_bottom fill-gradtype-bottom,
fill_gradtype_left fill-gradtype-left,
fill_gradtype_top fill-gradtype-top,
fill_gradtype_right fill-gradtype-right,
fill_gradtype_position1 fill-gradtype-position1,
fill_gradtype_position2 fill-gradtype-position2,
fill_gradtype_position3 fill-gradtype-position3,
borders_diagonal_mode borders-diagonal_mode,
alignment_horizontal alignment-horizontal,
alignment_vertical alignment-vertical,
alignment_textrotation alignment-textrotation,
alignment_wraptext alignment-wraptext,
alignment_shrinktofit alignment-shrinktofit,
alignment_indent alignment-indent,
protection_hidden protection-hidden,
protection_locked protection-locked,
borders_allborders_style borders-allborders-border_style,
borders_allborders_color borders-allborders-border_color,
borders_allbo_color_rgb borders-allborders-border_color-rgb,
borders_allbo_color_indexed borders-allborders-border_color-indexed,
borders_allbo_color_theme borders-allborders-border_color-theme,
borders_allbo_color_tint borders-allborders-border_color-tint,
borders_diagonal_style borders-diagonal-border_style,
borders_diagonal_color borders-diagonal-border_color,
borders_diagonal_color_rgb borders-diagonal-border_color-rgb,
borders_diagonal_color_inde borders-diagonal-border_color-indexed,
borders_diagonal_color_them borders-diagonal-border_color-theme,
borders_diagonal_color_tint borders-diagonal-border_color-tint,
borders_down_style borders-down-border_style,
borders_down_color borders-down-border_color,
borders_down_color_rgb borders-down-border_color-rgb,
borders_down_color_indexed borders-down-border_color-indexed,
borders_down_color_theme borders-down-border_color-theme,
borders_down_color_tint borders-down-border_color-tint,
borders_left_style borders-left-border_style,
borders_left_color borders-left-border_color,
borders_left_color_rgb borders-left-border_color-rgb,
borders_left_color_indexed borders-left-border_color-indexed,
borders_left_color_theme borders-left-border_color-theme,
borders_left_color_tint borders-left-border_color-tint,
borders_right_style borders-right-border_style,
borders_right_color borders-right-border_color,
borders_right_color_rgb borders-right-border_color-rgb,
borders_right_color_indexed borders-right-border_color-indexed,
borders_right_color_theme borders-right-border_color-theme,
borders_right_color_tint borders-right-border_color-tint,
borders_top_style borders-top-border_style,
borders_top_color borders-top-border_color,
borders_top_color_rgb borders-top-border_color-rgb,
borders_top_color_indexed borders-top-border_color-indexed,
borders_top_color_theme borders-top-border_color-theme,
borders_top_color_tint borders-top-border_color-tint.
* Now we have a completly filled styles.
* This can be used to get the guid
* Return guid if requested. Might be used if copy&paste of styles is requested
ep_guid = me->excel->get_static_cellstyle_guid( ip_cstyle_complete = complete_style
ip_cstylex_complete = complete_stylex ).
me->set_cell_style( ip_column = ip_column
ip_row = ip_row
ip_style = ep_guid ).
ENDMETHOD. "CHANGE_CELL_STYLE
METHOD constructor.
DATA: lv_title TYPE zexcel_sheet_title.
me->excel = ip_excel.
* CALL FUNCTION 'GUID_CREATE' " del issue #379 - function is outdated in newer releases
* IMPORTING
* ev_guid_16 = me->guid.
me->guid = zcl_excel_obsolete_func_wrap=>guid_create( ). " ins issue #379 - replacement for outdated function call
IF ip_title IS NOT INITIAL.
lv_title = ip_title.
ELSE.
* lv_title = me->guid. " del issue #154 - Names of worksheets
lv_title = me->generate_title( ). " ins issue #154 - Names of worksheets
ENDIF.
me->set_title( ip_title = lv_title ).
CREATE OBJECT sheet_setup.
CREATE OBJECT styles_cond.
CREATE OBJECT data_validations.
CREATE OBJECT tables.
CREATE OBJECT columns.
CREATE OBJECT rows.
CREATE OBJECT ranges. " issue #163
CREATE OBJECT mo_pagebreaks.
CREATE OBJECT drawings
EXPORTING
ip_type = zcl_excel_drawing=>type_image.
CREATE OBJECT charts
EXPORTING
ip_type = zcl_excel_drawing=>type_chart.
me->zif_excel_sheet_protection~initialize( ).
me->zif_excel_sheet_properties~initialize( ).
CREATE OBJECT hyperlinks.
CREATE OBJECT comments. " (+) Issue #180
* initialize active cell coordinates
active_cell-cell_row = 1.
active_cell-cell_column = 1.
* inizialize dimension range
lower_cell-cell_row = 1.
lower_cell-cell_column = 1.
upper_cell-cell_row = 1.
upper_cell-cell_column = 1.
ENDMETHOD. "CONSTRUCTOR
METHOD delete_merge.
DATA: lv_column TYPE i.
*--------------------------------------------------------------------*
* If cell information is passed delete merge including this cell,
* otherwise delete all merges
*--------------------------------------------------------------------*
IF ip_cell_column IS INITIAL
OR ip_cell_row IS INITIAL.
CLEAR me->mt_merged_cells.
ELSE.
lv_column = zcl_excel_common=>convert_column2int( ip_cell_column ).
LOOP AT me->mt_merged_cells TRANSPORTING NO FIELDS
WHERE
( row_from <= ip_cell_row AND row_to >= ip_cell_row )
AND
( col_from <= lv_column AND col_to >= lv_column ).
DELETE me->mt_merged_cells.
EXIT.
ENDLOOP.
ENDIF.
ENDMETHOD. "DELETE_MERGE
METHOD delete_row_outline.
DELETE me->mt_row_outlines WHERE row_from = iv_row_from
AND row_to = iv_row_to.
IF sy-subrc <> 0. " didn't find outline that was to be deleted
zcx_excel=>raise_text( 'Row outline to be deleted does not exist' ).
ENDIF.
ENDMETHOD. "DELETE_ROW_OUTLINE
METHOD freeze_panes.
IF ip_num_columns IS NOT SUPPLIED AND ip_num_rows IS NOT SUPPLIED.
zcx_excel=>raise_text( 'Pleas provide number of rows and/or columns to freeze' ).
ENDIF.
IF ip_num_columns IS SUPPLIED AND ip_num_columns <= 0.
zcx_excel=>raise_text( 'Number of columns to freeze should be positive' ).
ENDIF.
IF ip_num_rows IS SUPPLIED AND ip_num_rows <= 0.
zcx_excel=>raise_text( 'Number of rows to freeze should be positive' ).
ENDIF.
freeze_pane_cell_column = ip_num_columns + 1.
freeze_pane_cell_row = ip_num_rows + 1.
ENDMETHOD. "FREEZE_PANES
METHOD generate_title.
DATA: lo_worksheets_iterator TYPE REF TO cl_object_collection_iterator,
lo_worksheet TYPE REF TO zcl_excel_worksheet.
DATA: t_titles TYPE HASHED TABLE OF zexcel_sheet_title WITH UNIQUE KEY table_line,
title TYPE zexcel_sheet_title,
sheetnumber TYPE i.
* Get list of currently used titles
lo_worksheets_iterator = me->excel->get_worksheets_iterator( ).
WHILE lo_worksheets_iterator->has_next( ) = abap_true.
lo_worksheet ?= lo_worksheets_iterator->get_next( ).
title = lo_worksheet->get_title( ).
INSERT title INTO TABLE t_titles.
ADD 1 TO sheetnumber.
ENDWHILE.
* Now build sheetnumber. Increase counter until we hit a number that is not used so far
ADD 1 TO sheetnumber. " Start counting with next number
DO.
title = sheetnumber.
SHIFT title LEFT DELETING LEADING space.
CONCATENATE 'Sheet'(001) title INTO ep_title.
INSERT ep_title INTO TABLE t_titles.
IF sy-subrc = 0. " Title not used so far --> take it
EXIT.
ENDIF.
ADD 1 TO sheetnumber.
ENDDO.
ENDMETHOD. "GENERATE_TITLE
METHOD get_active_cell.
DATA: lv_active_column TYPE zexcel_cell_column_alpha,
lv_active_row TYPE string.
lv_active_column = zcl_excel_common=>convert_column2alpha( active_cell-cell_column ).
lv_active_row = active_cell-cell_row.
SHIFT lv_active_row RIGHT DELETING TRAILING space.
SHIFT lv_active_row LEFT DELETING LEADING space.
CONCATENATE lv_active_column lv_active_row INTO ep_active_cell.
ENDMETHOD. "GET_ACTIVE_CELL
METHOD get_cell.
DATA: lv_column TYPE zexcel_cell_column,
ls_sheet_content TYPE zexcel_s_cell_data.
lv_column = zcl_excel_common=>convert_column2int( ip_column ).
READ TABLE sheet_content INTO ls_sheet_content WITH TABLE KEY cell_row = ip_row
cell_column = lv_column.
ep_rc = sy-subrc.
ep_value = ls_sheet_content-cell_value.
ep_guid = ls_sheet_content-cell_style. " issue 139 - added this to be used for columnwidth calculation
ep_formula = ls_sheet_content-cell_formula.
" Addition to solve issue #120, contribution by Stefan Schmöcker
DATA: style_iterator TYPE REF TO cl_object_collection_iterator,
style TYPE REF TO zcl_excel_style.
IF ep_style IS REQUESTED.
style_iterator = me->excel->get_styles_iterator( ).
WHILE style_iterator->has_next( ) = 'X'.
style ?= style_iterator->get_next( ).
IF style->get_guid( ) = ls_sheet_content-cell_style.
ep_style = style.
EXIT.
ENDIF.
ENDWHILE.
ENDIF.
ENDMETHOD. "GET_CELL
METHOD get_column.
DATA: lv_column TYPE zexcel_cell_column.
lv_column = zcl_excel_common=>convert_column2int( ip_column ).
eo_column = me->columns->get( ip_index = lv_column ).
IF eo_column IS NOT BOUND.
eo_column = me->add_new_column( ip_column ).
ENDIF.
ENDMETHOD. "GET_COLUMN
METHOD get_columns.
eo_columns = me->columns.
ENDMETHOD. "GET_COLUMNS
METHOD get_columns_iterator.
eo_iterator = me->columns->get_iterator( ).
ENDMETHOD. "GET_COLUMNS_ITERATOR
METHOD get_comments.
DATA: lo_comment TYPE REF TO zcl_excel_comment,
lo_iterator TYPE REF TO cl_object_collection_iterator.
CREATE OBJECT r_comments.
lo_iterator = comments->get_iterator( ).
WHILE lo_iterator->has_next( ) = abap_true.
lo_comment ?= lo_iterator->get_next( ).
r_comments->include( lo_comment ).
ENDWHILE.
ENDMETHOD. "get_comments
METHOD get_comments_iterator.
eo_iterator = comments->get_iterator( ).
ENDMETHOD. "get_comments_iterator
METHOD get_data_validations_iterator.
eo_iterator = me->data_validations->get_iterator( ).
ENDMETHOD. "GET_DATA_VALIDATIONS_ITERATOR
METHOD get_data_validations_size.
ep_size = me->data_validations->size( ).
ENDMETHOD. "GET_DATA_VALIDATIONS_SIZE
METHOD get_default_column.
IF me->column_default IS NOT BOUND.
CREATE OBJECT me->column_default
EXPORTING
ip_index = 'A' " ????
ip_worksheet = me
ip_excel = me->excel.
ENDIF.
eo_column = me->column_default.
ENDMETHOD. "GET_DEFAULT_COLUMN
METHOD get_default_excel_date_format.
CONSTANTS: c_lang_e TYPE lang VALUE 'E'.
IF default_excel_date_format IS NOT INITIAL.
ep_default_excel_date_format = default_excel_date_format.
RETURN.
ENDIF.
"try to get defaults
TRY.
cl_abap_datfm=>get_date_format_des( EXPORTING im_langu = c_lang_e
IMPORTING ex_dateformat = default_excel_date_format ).
CATCH cx_abap_datfm_format_unknown.
ENDTRY.
" and fallback to fixed format
IF default_excel_date_format IS INITIAL.
default_excel_date_format = zcl_excel_style_number_format=>c_format_date_ddmmyyyydot.
ENDIF.
ep_default_excel_date_format = default_excel_date_format.
ENDMETHOD. "GET_DEFAULT_EXCEL_DATE_FORMAT
METHOD get_default_excel_time_format.
DATA: l_timefm TYPE xutimefm.
IF default_excel_time_format IS NOT INITIAL.
ep_default_excel_time_format = default_excel_time_format.
RETURN.
ENDIF.
* Let's get default
l_timefm = cl_abap_timefm=>get_environment_timefm( ).
CASE l_timefm.
WHEN 0.
*0 24 Hour Format (Example: 12:05:10)
default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time6.
WHEN 1.
*1 12 Hour Format (Example: 12:05:10 PM)
default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time2.
WHEN 2.
*2 12 Hour Format (Example: 12:05:10 pm) for now all the same. no chnage upper lower
default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time2.
WHEN 3.
*3 Hours from 0 to 11 (Example: 00:05:10 PM) for now all the same. no chnage upper lower
default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time2.
WHEN 4.
*4 Hours from 0 to 11 (Example: 00:05:10 pm) for now all the same. no chnage upper lower
default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time2.
WHEN OTHERS.
" and fallback to fixed format
default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time6.
ENDCASE.
ep_default_excel_time_format = default_excel_time_format.
ENDMETHOD. "GET_DEFAULT_EXCEL_TIME_FORMAT
METHOD get_default_row.
IF me->row_default IS NOT BOUND.
CREATE OBJECT me->row_default.
ENDIF.
eo_row = me->row_default.
ENDMETHOD. "GET_DEFAULT_ROW
METHOD get_dimension_range.
me->update_dimension_range( ).
IF upper_cell EQ lower_cell. "only one cell
" Worksheet not filled
* IF upper_cell-cell_coords = '0'.
IF upper_cell-cell_coords IS INITIAL.
ep_dimension_range = 'A1'.
ELSE.
ep_dimension_range = upper_cell-cell_coords.
ENDIF.
ELSE.
CONCATENATE upper_cell-cell_coords ':' lower_cell-cell_coords INTO ep_dimension_range.
ENDIF.
ENDMETHOD. "GET_DIMENSION_RANGE
METHOD get_drawings.
DATA: lo_drawing TYPE REF TO zcl_excel_drawing,
lo_iterator TYPE REF TO cl_object_collection_iterator.
CASE ip_type.
WHEN zcl_excel_drawing=>type_image.
r_drawings = drawings.
WHEN zcl_excel_drawing=>type_chart.
r_drawings = charts.
WHEN space.
CREATE OBJECT r_drawings
EXPORTING
ip_type = ''.
lo_iterator = drawings->get_iterator( ).
WHILE lo_iterator->has_next( ) = abap_true.
lo_drawing ?= lo_iterator->get_next( ).
r_drawings->include( lo_drawing ).
ENDWHILE.
lo_iterator = charts->get_iterator( ).
WHILE lo_iterator->has_next( ) = abap_true.
lo_drawing ?= lo_iterator->get_next( ).
r_drawings->include( lo_drawing ).
ENDWHILE.
WHEN OTHERS.
ENDCASE.
ENDMETHOD. "GET_DRAWINGS
METHOD get_drawings_iterator.
CASE ip_type.
WHEN zcl_excel_drawing=>type_image.
eo_iterator = drawings->get_iterator( ).
WHEN zcl_excel_drawing=>type_chart.
eo_iterator = charts->get_iterator( ).
ENDCASE.
ENDMETHOD. "GET_DRAWINGS_ITERATOR
METHOD get_freeze_cell.
ep_row = me->freeze_pane_cell_row.
ep_column = me->freeze_pane_cell_column.
ENDMETHOD. "GET_FREEZE_CELL
METHOD get_guid.
ep_guid = me->guid.
ENDMETHOD. "GET_GUID
METHOD get_header_footer_drawings.
DATA: ls_odd_header TYPE zexcel_s_worksheet_head_foot,
ls_odd_footer TYPE zexcel_s_worksheet_head_foot,
ls_even_header TYPE zexcel_s_worksheet_head_foot,
ls_even_footer TYPE zexcel_s_worksheet_head_foot,
ls_hd_ft TYPE zexcel_s_worksheet_head_foot.
FIELD-SYMBOLS: <fs_drawings> TYPE zexcel_s_drawings.
me->sheet_setup->get_header_footer( IMPORTING ep_odd_header = ls_odd_header
ep_odd_footer = ls_odd_footer
ep_even_header = ls_even_header
ep_even_footer = ls_even_footer ).
**********************************************************************
*** Odd header
ls_hd_ft = ls_odd_header.
IF ls_hd_ft-left_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-left_image.
ENDIF.
IF ls_hd_ft-right_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-right_image.
ENDIF.
IF ls_hd_ft-center_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-center_image.
ENDIF.
**********************************************************************
*** Odd footer
ls_hd_ft = ls_odd_footer.
IF ls_hd_ft-left_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-left_image.
ENDIF.
IF ls_hd_ft-right_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-right_image.
ENDIF.
IF ls_hd_ft-center_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-center_image.
ENDIF.
**********************************************************************
*** Even header
ls_hd_ft = ls_even_header.
IF ls_hd_ft-left_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-left_image.
ENDIF.
IF ls_hd_ft-right_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-right_image.
ENDIF.
IF ls_hd_ft-center_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-center_image.
ENDIF.
**********************************************************************
*** Even footer
ls_hd_ft = ls_even_footer.
IF ls_hd_ft-left_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-left_image.
ENDIF.
IF ls_hd_ft-right_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-right_image.
ENDIF.
IF ls_hd_ft-center_image IS NOT INITIAL.
APPEND INITIAL LINE TO rt_drawings ASSIGNING <fs_drawings>.
<fs_drawings>-drawing = ls_hd_ft-center_image.
ENDIF.
ENDMETHOD. "get_header_footer_drawings
METHOD get_highest_column.
me->update_dimension_range( ).
r_highest_column = me->lower_cell-cell_column.
ENDMETHOD. "GET_HIGHEST_COLUMN
METHOD get_highest_row.
me->update_dimension_range( ).
r_highest_row = me->lower_cell-cell_row.
ENDMETHOD. "GET_HIGHEST_ROW
METHOD get_hyperlinks_iterator.
eo_iterator = hyperlinks->get_iterator( ).
ENDMETHOD. "GET_HYPERLINKS_ITERATOR
METHOD get_hyperlinks_size.
ep_size = hyperlinks->size( ).
ENDMETHOD. "GET_HYPERLINKS_SIZE
METHOD get_merge.
FIELD-SYMBOLS: <ls_merged_cell> LIKE LINE OF me->mt_merged_cells.
DATA: lv_col_from TYPE string,
lv_col_to TYPE string,
lv_row_from TYPE string,
lv_row_to TYPE string,
lv_merge_range TYPE string.
LOOP AT me->mt_merged_cells ASSIGNING <ls_merged_cell>.
lv_col_from = zcl_excel_common=>convert_column2alpha( <ls_merged_cell>-col_from ).
lv_col_to = zcl_excel_common=>convert_column2alpha( <ls_merged_cell>-col_to ).
lv_row_from = <ls_merged_cell>-row_from.
lv_row_to = <ls_merged_cell>-row_to .
CONCATENATE lv_col_from lv_row_from ':' lv_col_to lv_row_to
INTO lv_merge_range.
CONDENSE lv_merge_range NO-GAPS.
APPEND lv_merge_range TO merge_range.
ENDLOOP.
ENDMETHOD. "GET_MERGE
METHOD get_pagebreaks.
ro_pagebreaks = mo_pagebreaks.
ENDMETHOD. "GET_PAGEBREAKS
METHOD get_ranges_iterator.
eo_iterator = me->ranges->get_iterator( ).
ENDMETHOD. "GET_RANGES_ITERATOR
METHOD get_row.
eo_row = me->rows->get( ip_index = ip_row ).
IF eo_row IS NOT BOUND.
eo_row = me->add_new_row( ip_row ).
ENDIF.
ENDMETHOD. "GET_ROW
METHOD get_rows.
eo_rows = me->rows.
ENDMETHOD. "GET_ROWS
METHOD get_rows_iterator.
eo_iterator = me->rows->get_iterator( ).
ENDMETHOD. "GET_ROWS_ITERATOR
METHOD get_row_outlines.
rt_row_outlines = me->mt_row_outlines.
ENDMETHOD. "GET_ROW_OUTLINES
METHOD get_style_cond.
DATA: lo_style_iterator TYPE REF TO cl_object_collection_iterator,
lo_style_cond TYPE REF TO zcl_excel_style_cond.
lo_style_iterator = me->get_style_cond_iterator( ).
WHILE lo_style_iterator->has_next( ) = abap_true.
lo_style_cond ?= lo_style_iterator->get_next( ).
IF lo_style_cond->get_guid( ) = ip_guid.
eo_style_cond = lo_style_cond.
EXIT.
ENDIF.
ENDWHILE.
ENDMETHOD. "GET_STYLE_COND
METHOD get_style_cond_iterator.
eo_iterator = styles_cond->get_iterator( ).
ENDMETHOD. "GET_STYLE_COND_ITERATOR
METHOD get_tabcolor.
ev_tabcolor = me->tabcolor.
ENDMETHOD. "GET_TABCOLOR
METHOD get_table.
*--------------------------------------------------------------------*
* Comment D. Rauchenstein
* With this method, we get a fully functional Excel Upload, which solves
* a few issues of the other excel upload tools
* ZBCABA_ALSM_EXCEL_UPLOAD_EXT: Reads only up to 50 signs per Cell, Limit
* in row-Numbers. Other have Limitations of Lines, or you are not able
* to ignore filters or choosing the right tab.
*
* To get a fully functional XLSX Upload, you can use it e.g. with method
* CL_EXCEL_READER_2007->ZIF_EXCEL_READER~LOAD_FILE()
*--------------------------------------------------------------------*
FIELD-SYMBOLS: <ls_line> TYPE data.
FIELD-SYMBOLS: <lv_value> TYPE data.
DATA lv_actual_row TYPE int4.
DATA lv_actual_row_string TYPE string.
DATA lv_actual_col TYPE int4.
DATA lv_actual_col_string TYPE string.
DATA lv_errormessage TYPE string.
DATA lv_max_col TYPE zexcel_cell_column.
DATA lv_max_row TYPE int4.
DATA lv_delta_col TYPE int4.
DATA lv_value TYPE zexcel_cell_value.
DATA lv_rc TYPE sysubrc.
lv_max_col = me->get_highest_column( ).
lv_max_row = me->get_highest_row( ).
*--------------------------------------------------------------------*
* The row counter begins with 1 and should be corrected with the skips
*--------------------------------------------------------------------*
lv_actual_row = iv_skipped_rows + 1.
lv_actual_col = iv_skipped_cols + 1.
TRY.
*--------------------------------------------------------------------*
* Check if we the basic features are possible with given "any table"
*--------------------------------------------------------------------*
APPEND INITIAL LINE TO et_table ASSIGNING <ls_line>.
IF sy-subrc <> 0 OR <ls_line> IS NOT ASSIGNED.
lv_errormessage = 'Error at inserting new Line to internal Table'(002).
zcx_excel=>raise_text( lv_errormessage ).
ELSE.
lv_delta_col = lv_max_col - iv_skipped_cols.
ASSIGN COMPONENT lv_delta_col OF STRUCTURE <ls_line> TO <lv_value>.
IF sy-subrc <> 0 OR <lv_value> IS NOT ASSIGNED.
lv_errormessage = 'Internal table has less columns than excel'(003).
zcx_excel=>raise_text( lv_errormessage ).
ELSE.
*--------------------------------------------------------------------*
*now we are ready for handle the table data
*--------------------------------------------------------------------*
REFRESH et_table.
*--------------------------------------------------------------------*
* Handle each Row until end on right side
*--------------------------------------------------------------------*
WHILE lv_actual_row <= lv_max_row .
*--------------------------------------------------------------------*
* Handle each Column until end on bottom
* First step is to step back on first column
*--------------------------------------------------------------------*
lv_actual_col = iv_skipped_cols + 1.
UNASSIGN <ls_line>.
APPEND INITIAL LINE TO et_table ASSIGNING <ls_line>.
IF sy-subrc <> 0 OR <ls_line> IS NOT ASSIGNED.
lv_errormessage = 'Error at inserting new Line to internal Table'(002).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
WHILE lv_actual_col <= lv_max_col.
lv_delta_col = lv_actual_col - iv_skipped_cols.
ASSIGN COMPONENT lv_delta_col OF STRUCTURE <ls_line> TO <lv_value>.
IF sy-subrc <> 0.
lv_actual_col_string = lv_actual_col.
lv_actual_row_string = lv_actual_row.
CONCATENATE 'Error at assigning field (Col:'(004) lv_actual_col_string ' Row:'(005) lv_actual_row_string INTO lv_errormessage.
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
me->get_cell(
EXPORTING
ip_column = lv_actual_col " Cell Column
ip_row = lv_actual_row " Cell Row
IMPORTING
ep_value = lv_value " Cell Value
ep_rc = lv_rc " Return Value of ABAP Statements
).
IF lv_rc <> 0
AND lv_rc <> 4. "No found error means, zero/no value in cell
lv_actual_col_string = lv_actual_col.
lv_actual_row_string = lv_actual_row.
CONCATENATE 'Error at reading field value (Col:'(007) lv_actual_col_string ' Row:'(005) lv_actual_row_string INTO lv_errormessage.
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
<lv_value> = lv_value.
* CATCH zcx_excel. "
ADD 1 TO lv_actual_col.
ENDWHILE.
ADD 1 TO lv_actual_row.
ENDWHILE.
ENDIF.
ENDIF.
CATCH cx_sy_assign_cast_illegal_cast.
lv_actual_col_string = lv_actual_col.
lv_actual_row_string = lv_actual_row.
CONCATENATE 'Error at assigning field (Col:'(004) lv_actual_col_string ' Row:'(005) lv_actual_row_string INTO lv_errormessage.
zcx_excel=>raise_text( lv_errormessage ).
CATCH cx_sy_assign_cast_unknown_type.
lv_actual_col_string = lv_actual_col.
lv_actual_row_string = lv_actual_row.
CONCATENATE 'Error at assigning field (Col:'(004) lv_actual_col_string ' Row:'(005) lv_actual_row_string INTO lv_errormessage.
zcx_excel=>raise_text( lv_errormessage ).
CATCH cx_sy_assign_out_of_range.
lv_errormessage = 'Internal table has less columns than excel'(003).
zcx_excel=>raise_text( lv_errormessage ).
CATCH cx_sy_conversion_error.
lv_actual_col_string = lv_actual_col.
lv_actual_row_string = lv_actual_row.
CONCATENATE 'Error at converting field value (Col:'(006) lv_actual_col_string ' Row:'(005) lv_actual_row_string INTO lv_errormessage.
zcx_excel=>raise_text( lv_errormessage ).
ENDTRY.
ENDMETHOD. "get_table
METHOD get_tables_iterator.
eo_iterator = tables->if_object_collection~get_iterator( ).
ENDMETHOD. "GET_TABLES_ITERATOR
METHOD get_tables_size.
ep_size = tables->if_object_collection~size( ).
ENDMETHOD. "GET_TABLES_SIZE
METHOD get_title.
DATA lv_value TYPE string.
IF ip_escaped EQ abap_true.
lv_value = me->title.
ep_title = zcl_excel_common=>escape_string( lv_value ).
ELSE.
ep_title = me->title.
ENDIF.
ENDMETHOD. "GET_TITLE
METHOD get_value_type.
DATA: lo_addit TYPE REF TO cl_abap_elemdescr,
ls_dfies TYPE dfies,
l_function TYPE funcname,
l_value(50) TYPE c.
ep_value = ip_value.
ep_value_type = cl_abap_typedescr=>typekind_string. " Thats our default if something goes wrong.
TRY.
lo_addit ?= cl_abap_typedescr=>describe_by_data( ip_value ).
CATCH cx_sy_move_cast_error.
CLEAR lo_addit.
ENDTRY.
IF lo_addit IS BOUND.
lo_addit->get_ddic_field( RECEIVING p_flddescr = ls_dfies
EXCEPTIONS not_found = 1
no_ddic_type = 2
OTHERS = 3 ) .
IF sy-subrc = 0.
ep_value_type = ls_dfies-inttype.
IF ls_dfies-convexit IS NOT INITIAL.
* We need to convert with output conversion function
CONCATENATE 'CONVERSION_EXIT_' ls_dfies-convexit '_OUTPUT' INTO l_function.
SELECT SINGLE funcname INTO l_function
FROM tfdir
WHERE funcname = l_function.
IF sy-subrc = 0.
CALL FUNCTION l_function
EXPORTING
input = ip_value
IMPORTING
* LONG_TEXT =
output = l_value
* SHORT_TEXT =
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
TRY.
ep_value = l_value.
CATCH cx_root.
ep_value = ip_value.
ENDTRY.
ENDIF.
ENDIF.
ENDIF.
ELSE.
ep_value_type = lo_addit->get_data_type_kind( ip_value ).
ENDIF.
ENDIF.
ENDMETHOD. "GET_VALUE_TYPE
METHOD is_cell_merged.
DATA: lv_column TYPE i.
FIELD-SYMBOLS: <ls_merged_cell> LIKE LINE OF me->mt_merged_cells.
lv_column = zcl_excel_common=>convert_column2int( ip_column ).
rp_is_merged = abap_false. " Assume not in merged area
LOOP AT me->mt_merged_cells ASSIGNING <ls_merged_cell>.
IF <ls_merged_cell>-col_from <= lv_column
AND <ls_merged_cell>-col_to >= lv_column
AND <ls_merged_cell>-row_from <= ip_row
AND <ls_merged_cell>-row_to >= ip_row.
rp_is_merged = abap_true. " until we are proven different
RETURN.
ENDIF.
ENDLOOP.
ENDMETHOD. "IS_CELL_MERGED
METHOD print_title_set_range.
*--------------------------------------------------------------------*
* issue#235 - repeat rows/columns
* - Stefan Schmoecker, 2012-12-02
*--------------------------------------------------------------------*
DATA: lo_range_iterator TYPE REF TO cl_object_collection_iterator,
lo_range TYPE REF TO zcl_excel_range,
lv_repeat_range_sheetname TYPE string,
lv_repeat_range_col TYPE string,
lv_row_char_from TYPE char10,
lv_row_char_to TYPE char10,
lv_repeat_range_row TYPE string,
lv_repeat_range TYPE string.
*--------------------------------------------------------------------*
* Get range that represents printarea
* if non-existant, create it
*--------------------------------------------------------------------*
lo_range_iterator = me->get_ranges_iterator( ).
WHILE lo_range_iterator->has_next( ) = abap_true.
lo_range ?= lo_range_iterator->get_next( ).
IF lo_range->name = zif_excel_sheet_printsettings=>gcv_print_title_name.
EXIT. " Found it
ENDIF.
CLEAR lo_range.
ENDWHILE.
IF me->print_title_col_from IS INITIAL AND
me->print_title_row_from IS INITIAL.
*--------------------------------------------------------------------*
* No print titles are present,
*--------------------------------------------------------------------*
IF lo_range IS BOUND.
me->ranges->remove( lo_range ).
ENDIF.
ELSE.
*--------------------------------------------------------------------*
* Print titles are present,
*--------------------------------------------------------------------*
IF lo_range IS NOT BOUND.
lo_range = me->add_new_range( ).
lo_range->name = zif_excel_sheet_printsettings=>gcv_print_title_name.
ENDIF.
lv_repeat_range_sheetname = me->get_title( ).
lv_repeat_range_sheetname = zcl_excel_common=>escape_string( lv_repeat_range_sheetname ).
*--------------------------------------------------------------------*
* Repeat-columns
*--------------------------------------------------------------------*
IF me->print_title_col_from IS NOT INITIAL.
CONCATENATE lv_repeat_range_sheetname
'!$' me->print_title_col_from
':$' me->print_title_col_to
INTO lv_repeat_range_col.
ENDIF.
*--------------------------------------------------------------------*
* Repeat-rows
*--------------------------------------------------------------------*
IF me->print_title_row_from IS NOT INITIAL.
lv_row_char_from = me->print_title_row_from.
lv_row_char_to = me->print_title_row_to.
CONCATENATE '!$' lv_row_char_from
':$' lv_row_char_to
INTO lv_repeat_range_row.
CONDENSE lv_repeat_range_row NO-GAPS.
CONCATENATE lv_repeat_range_sheetname
lv_repeat_range_row
INTO lv_repeat_range_row.
ENDIF.
*--------------------------------------------------------------------*
* Concatenate repeat-rows and columns
*--------------------------------------------------------------------*
IF lv_repeat_range_col IS INITIAL.
lv_repeat_range = lv_repeat_range_row.
ELSEIF lv_repeat_range_row IS INITIAL.
lv_repeat_range = lv_repeat_range_col.
ELSE.
CONCATENATE lv_repeat_range_col lv_repeat_range_row
INTO lv_repeat_range SEPARATED BY ','.
ENDIF.
lo_range->set_range_value( lv_repeat_range ).
ENDIF.
ENDMETHOD. "PRINT_TITLE_SET_RANGE
METHOD set_area.
DATA: lv_row TYPE zexcel_cell_row,
lv_row_end TYPE zexcel_cell_row,
lv_column_start TYPE zexcel_cell_column_alpha,
lv_column_end TYPE zexcel_cell_column_alpha,
lv_column_start_int TYPE zexcel_cell_column_alpha,
lv_column_end_int TYPE zexcel_cell_column_alpha.
MOVE: ip_row_to TO lv_row_end,
ip_row TO lv_row.
IF lv_row_end IS INITIAL OR ip_row_to IS NOT SUPPLIED.
lv_row_end = lv_row.
ENDIF.
MOVE: ip_column_start TO lv_column_start,
ip_column_end TO lv_column_end.
IF lv_column_end IS INITIAL OR ip_column_end IS NOT SUPPLIED.
lv_column_end = lv_column_start.
ENDIF.
lv_column_start_int = zcl_excel_common=>convert_column2int( lv_column_start ).
lv_column_end_int = zcl_excel_common=>convert_column2int( lv_column_end ).
IF lv_column_start_int > lv_column_end_int OR lv_row > lv_row_end.
RAISE EXCEPTION TYPE zcx_excel
EXPORTING
error = 'Wrong Merging Parameters'.
ENDIF.
IF ip_data_type IS SUPPLIED OR
ip_abap_type IS SUPPLIED.
me->set_cell( ip_column = lv_column_start
ip_row = lv_row
ip_value = ip_value
ip_formula = ip_formula
ip_style = ip_style
ip_hyperlink = ip_hyperlink
ip_data_type = ip_data_type
ip_abap_type = ip_abap_type ).
ELSE.
me->set_cell( ip_column = lv_column_start
ip_row = lv_row
ip_value = ip_value
ip_formula = ip_formula
ip_style = ip_style
ip_hyperlink = ip_hyperlink ).
ENDIF.
IF ip_style IS SUPPLIED.
me->set_area_style( ip_column_start = lv_column_start
ip_column_end = lv_column_end
ip_row = lv_row
ip_row_to = lv_row_end
ip_style = ip_style ).
ENDIF.
IF ip_merge IS SUPPLIED AND ip_merge = abap_true.
me->set_merge( ip_column_start = lv_column_start
ip_column_end = lv_column_end
ip_row = lv_row
ip_row_to = lv_row_end ).
ENDIF.
ENDMETHOD. "set_area
METHOD set_area_formula.
DATA: ld_row TYPE zexcel_cell_row,
ld_row_end TYPE zexcel_cell_row,
ld_column TYPE zexcel_cell_column_alpha,
ld_column_end TYPE zexcel_cell_column_alpha,
ld_column_int TYPE zexcel_cell_column_alpha,
ld_column_end_int TYPE zexcel_cell_column_alpha.
MOVE: ip_row_to TO ld_row_end,
ip_row TO ld_row.
IF ld_row_end IS INITIAL OR ip_row_to IS NOT SUPPLIED.
ld_row_end = ld_row.
ENDIF.
MOVE: ip_column_start TO ld_column,
ip_column_end TO ld_column_end.
IF ld_column_end IS INITIAL OR ip_column_end IS NOT SUPPLIED.
ld_column_end = ld_column.
ENDIF.
ld_column_int = zcl_excel_common=>convert_column2int( ld_column ).
ld_column_end_int = zcl_excel_common=>convert_column2int( ld_column_end ).
IF ld_column_int > ld_column_end_int OR ld_row > ld_row_end.
RAISE EXCEPTION TYPE zcx_excel
EXPORTING
error = 'Wrong Merging Parameters'.
ENDIF.
me->set_cell_formula( ip_column = ld_column ip_row = ld_row
ip_formula = ip_formula ).
IF ip_merge IS SUPPLIED AND ip_merge = abap_true.
me->set_merge( ip_column_start = ld_column ip_row = ld_row
ip_column_end = ld_column_end ip_row_to = ld_row_end ).
ENDIF.
ENDMETHOD. "set_area_formula
METHOD set_area_style.
DATA: ld_row_start TYPE zexcel_cell_row,
ld_row_end TYPE zexcel_cell_row,
ld_column_start_int TYPE zexcel_cell_column,
ld_column_end_int TYPE zexcel_cell_column,
ld_current_column TYPE zexcel_cell_column_alpha,
ld_current_row TYPE zexcel_cell_row.
MOVE: ip_row_to TO ld_row_end,
ip_row TO ld_row_start.
IF ld_row_end IS INITIAL OR ip_row_to IS NOT SUPPLIED.
ld_row_end = ld_row_start.
ENDIF.
ld_column_start_int = zcl_excel_common=>convert_column2int( ip_column_start ).
ld_column_end_int = zcl_excel_common=>convert_column2int( ip_column_end ).
IF ld_column_end_int IS INITIAL OR ip_column_end IS NOT SUPPLIED.
ld_column_end_int = ld_column_start_int.
ENDIF.
WHILE ld_column_start_int <= ld_column_end_int.
ld_current_column = zcl_excel_common=>convert_column2alpha( ld_column_start_int ).
ld_current_row = ld_row_start.
WHILE ld_current_row <= ld_row_end.
me->set_cell_style( ip_row = ld_current_row ip_column = ld_current_column
ip_style = ip_style ).
ADD 1 TO ld_current_row.
ENDWHILE.
ADD 1 TO ld_column_start_int.
ENDWHILE.
IF ip_merge IS SUPPLIED AND ip_merge = abap_true.
me->set_merge( ip_column_start = ip_column_start ip_row = ld_row_start
ip_column_end = ld_current_column ip_row_to = ld_row_end ).
ENDIF.
ENDMETHOD. "SET_AREA_STYLE
METHOD set_cell.
DATA: lv_column TYPE zexcel_cell_column,
ls_sheet_content TYPE zexcel_s_cell_data,
lv_row_alpha TYPE string,
lv_col_alpha TYPE zexcel_cell_column_alpha,
lv_value TYPE zexcel_cell_value,
lv_data_type TYPE zexcel_cell_data_type,
lv_value_type TYPE abap_typekind,
lv_style_guid TYPE zexcel_cell_style,
lo_addit TYPE REF TO cl_abap_elemdescr,
lo_value TYPE REF TO data,
lo_value_new TYPE REF TO data.
FIELD-SYMBOLS: <fs_sheet_content> TYPE zexcel_s_cell_data,
<fs_numeric> TYPE numeric,
<fs_date> TYPE d,
<fs_time> TYPE t,
<fs_value> TYPE simple.
IF ip_value IS NOT SUPPLIED AND ip_formula IS NOT SUPPLIED.
zcx_excel=>raise_text( 'Please provide the value or formula' ).
ENDIF.
* Begin of change issue #152 - don't touch exisiting style if only value is passed
* lv_style_guid = ip_style.
lv_column = zcl_excel_common=>convert_column2int( ip_column ).
READ TABLE sheet_content ASSIGNING <fs_sheet_content> WITH TABLE KEY cell_row = ip_row " Changed to access via table key , Stefan Schmöcker, 2013-08-03
cell_column = lv_column.
IF sy-subrc = 0.
IF ip_style IS INITIAL.
" If no style is provided as method-parameter and cell is found use cell's current style
lv_style_guid = <fs_sheet_content>-cell_style.
ELSE.
" Style provided as method-parameter --> use this
lv_style_guid = ip_style.
ENDIF.
ELSE.
" No cell found --> use supplied style even if empty
lv_style_guid = ip_style.
ENDIF.
* End of change issue #152 - don't touch exisiting style if only value is passed
IF ip_value IS SUPPLIED.
"if data type is passed just write the value. Otherwise map abap type to excel and perform conversion
"IP_DATA_TYPE is passed by excel reader so source types are preserved
*First we get reference into local var.
CREATE DATA lo_value LIKE ip_value.
ASSIGN lo_value->* TO <fs_value>.
<fs_value> = ip_value.
IF ip_data_type IS SUPPLIED.
IF ip_abap_type IS NOT SUPPLIED.
get_value_type( EXPORTING ip_value = ip_value
IMPORTING ep_value = <fs_value> ) .
ENDIF.
lv_value = <fs_value>.
lv_data_type = ip_data_type.
ELSE.
IF ip_abap_type IS SUPPLIED.
lv_value_type = ip_abap_type.
ELSE.
get_value_type( EXPORTING ip_value = ip_value
IMPORTING ep_value = <fs_value>
ep_value_type = lv_value_type ).
ENDIF.
CASE lv_value_type.
WHEN cl_abap_typedescr=>typekind_int OR cl_abap_typedescr=>typekind_int1 OR cl_abap_typedescr=>typekind_int2
OR cl_abap_typedescr=>typekind_int8. "Allow INT8 types columns
lo_addit = cl_abap_elemdescr=>get_i( ).
CREATE DATA lo_value_new TYPE HANDLE lo_addit.
ASSIGN lo_value_new->* TO <fs_numeric>.
IF sy-subrc = 0.
<fs_numeric> = <fs_value>.
lv_value = zcl_excel_common=>number_to_excel_string( ip_value = <fs_numeric> ).
ENDIF.
WHEN cl_abap_typedescr=>typekind_float OR cl_abap_typedescr=>typekind_packed.
lo_addit = cl_abap_elemdescr=>get_f( ).
CREATE DATA lo_value_new TYPE HANDLE lo_addit.
ASSIGN lo_value_new->* TO <fs_numeric>.
IF sy-subrc = 0.
<fs_numeric> = <fs_value>.
lv_value = zcl_excel_common=>number_to_excel_string( ip_value = <fs_numeric> ).
ENDIF.
WHEN cl_abap_typedescr=>typekind_char OR cl_abap_typedescr=>typekind_string OR cl_abap_typedescr=>typekind_num OR
cl_abap_typedescr=>typekind_hex.
lv_value = <fs_value>.
lv_data_type = 's'.
WHEN cl_abap_typedescr=>typekind_date.
lo_addit = cl_abap_elemdescr=>get_d( ).
CREATE DATA lo_value_new TYPE HANDLE lo_addit.
ASSIGN lo_value_new->* TO <fs_date>.
IF sy-subrc = 0.
<fs_date> = <fs_value>.
lv_value = zcl_excel_common=>date_to_excel_string( ip_value = <fs_date> ) .
ENDIF.
* Begin of change issue #152 - don't touch exisiting style if only value is passed
* Moved to end of routine - apply date-format even if other styleinformation is passed
* IF ip_style IS NOT SUPPLIED. "get default date format in case parameter is initial
* lo_style = excel->add_new_style( ).
* lo_style->number_format->format_code = get_default_excel_date_format( ).
* lv_style_guid = lo_style->get_guid( ).
* ENDIF.
* End of change issue #152 - don't touch exisiting style if only value is passed
WHEN cl_abap_typedescr=>typekind_time.
lo_addit = cl_abap_elemdescr=>get_t( ).
CREATE DATA lo_value_new TYPE HANDLE lo_addit.
ASSIGN lo_value_new->* TO <fs_time>.
IF sy-subrc = 0.
<fs_time> = <fs_value>.
lv_value = zcl_excel_common=>time_to_excel_string( ip_value = <fs_time> ).
ENDIF.
* Begin of change issue #152 - don't touch exisiting style if only value is passed
* Moved to end of routine - apply time-format even if other styleinformation is passed
* IF ip_style IS NOT SUPPLIED. "get default time format for user in case parameter is initial
* lo_style = excel->add_new_style( ).
* lo_style->number_format->format_code = zcl_excel_style_number_format=>c_format_date_time6.
* lv_style_guid = lo_style->get_guid( ).
* ENDIF.
* End of change issue #152 - don't touch exisiting style if only value is passed
WHEN OTHERS.
zcx_excel=>raise_text( 'Invalid data type of input value' ).
ENDCASE.
ENDIF.
ENDIF.
IF ip_hyperlink IS BOUND.
ip_hyperlink->set_cell_reference( ip_column = ip_column
ip_row = ip_row ).
me->hyperlinks->add( ip_hyperlink ).
ENDIF.
* Begin of change issue #152 - don't touch exisiting style if only value is passed
* Read table moved up, so that current style may be evaluated
* lv_column = zcl_excel_common=>convert_column2int( ip_column ).
* READ TABLE sheet_content ASSIGNING <fs_sheet_content> WITH KEY cell_row = ip_row
* cell_column = lv_column.
*
* IF sy-subrc EQ 0.
IF <fs_sheet_content> IS ASSIGNED.
* End of change issue #152 - don't touch exisiting style if only value is passed
<fs_sheet_content>-cell_value = lv_value.
<fs_sheet_content>-cell_formula = ip_formula.
<fs_sheet_content>-cell_style = lv_style_guid.
<fs_sheet_content>-data_type = lv_data_type.
ELSE.
ls_sheet_content-cell_row = ip_row.
ls_sheet_content-cell_column = lv_column.
ls_sheet_content-cell_value = lv_value.
ls_sheet_content-cell_formula = ip_formula.
ls_sheet_content-cell_style = lv_style_guid.
ls_sheet_content-data_type = lv_data_type.
lv_row_alpha = ip_row.
* SHIFT lv_row_alpha RIGHT DELETING TRAILING space."del #152 - replaced with condense - should be faster
* SHIFT lv_row_alpha LEFT DELETING LEADING space. "del #152 - replaced with condense - should be faster
CONDENSE lv_row_alpha NO-GAPS. "ins #152 - replaced 2 shifts - should be faster
lv_col_alpha = zcl_excel_common=>convert_column2alpha( ip_column ). " issue #155 - less restrictive typing for ip_column
CONCATENATE lv_col_alpha lv_row_alpha INTO ls_sheet_content-cell_coords. " issue #155 - less restrictive typing for ip_column
INSERT ls_sheet_content INTO TABLE sheet_content ASSIGNING <fs_sheet_content>. "ins #152 - Now <fs_sheet_content> always holds the data
* APPEND ls_sheet_content TO sheet_content.
* SORT sheet_content BY cell_row cell_column.
" me->update_dimension_range( ).
ENDIF.
* Begin of change issue #152 - don't touch exisiting style if only value is passed
* For Date- or Timefields change the formatcode if nothing is set yet
* Enhancement option: Check if existing formatcode is a date/ or timeformat
* If not, use default
DATA: lo_format_code_datetime TYPE zexcel_number_format.
DATA: stylemapping TYPE zexcel_s_stylemapping.
CASE lv_value_type.
WHEN cl_abap_typedescr=>typekind_date.
TRY.
stylemapping = me->excel->get_style_to_guid( <fs_sheet_content>-cell_style ).
CATCH zcx_excel .
ENDTRY.
IF stylemapping-complete_stylex-number_format-format_code IS INITIAL OR
stylemapping-complete_style-number_format-format_code IS INITIAL.
lo_format_code_datetime = zcl_excel_style_number_format=>c_format_date_std.
ELSE.
lo_format_code_datetime = stylemapping-complete_style-number_format-format_code.
ENDIF.
me->change_cell_style( ip_column = ip_column
ip_row = ip_row
ip_number_format_format_code = lo_format_code_datetime ).
WHEN cl_abap_typedescr=>typekind_time.
TRY.
stylemapping = me->excel->get_style_to_guid( <fs_sheet_content>-cell_style ).
CATCH zcx_excel .
ENDTRY.
IF stylemapping-complete_stylex-number_format-format_code IS INITIAL OR
stylemapping-complete_style-number_format-format_code IS INITIAL.
lo_format_code_datetime = zcl_excel_style_number_format=>c_format_date_time6.
ELSE.
lo_format_code_datetime = stylemapping-complete_style-number_format-format_code.
ENDIF.
me->change_cell_style( ip_column = ip_column
ip_row = ip_row
ip_number_format_format_code = lo_format_code_datetime ).
ENDCASE.
* End of change issue #152 - don't touch exisiting style if only value is passed
* Fix issue #162
lv_value = ip_value.
IF lv_value CS cl_abap_char_utilities=>cr_lf.
me->change_cell_style( ip_column = ip_column
ip_row = ip_row
ip_alignment_wraptext = abap_true ).
ENDIF.
* End of Fix issue #162
ENDMETHOD. "SET_CELL
METHOD set_cell_formula.
DATA:
lv_column TYPE zexcel_cell_column,
ls_sheet_content LIKE LINE OF me->sheet_content.
FIELD-SYMBOLS:
<sheet_content> LIKE LINE OF me->sheet_content.
*--------------------------------------------------------------------*
* Get cell to set formula into
*--------------------------------------------------------------------*
lv_column = zcl_excel_common=>convert_column2int( ip_column ).
READ TABLE me->sheet_content ASSIGNING <sheet_content> WITH TABLE KEY cell_row = ip_row
cell_column = lv_column.
IF sy-subrc <> 0. " Create new entry in sheet_content if necessary
CHECK ip_formula IS INITIAL. " no need to create new entry in sheet_content when no formula is passed
ls_sheet_content-cell_row = ip_row.
ls_sheet_content-cell_column = lv_column.
INSERT ls_sheet_content INTO TABLE me->sheet_content ASSIGNING <sheet_content>.
ENDIF.
*--------------------------------------------------------------------*
* Fieldsymbol now holds the relevant cell
*--------------------------------------------------------------------*
<sheet_content>-cell_formula = ip_formula.
ENDMETHOD. "SET_CELL_FORMULA
METHOD set_cell_style.
DATA: lv_column TYPE zexcel_cell_column,
lv_style_guid TYPE zexcel_cell_style.
FIELD-SYMBOLS: <fs_sheet_content> TYPE zexcel_s_cell_data.
lv_style_guid = ip_style.
lv_column = zcl_excel_common=>convert_column2int( ip_column ).
READ TABLE sheet_content ASSIGNING <fs_sheet_content> WITH KEY cell_row = ip_row
cell_column = lv_column.
IF sy-subrc EQ 0.
<fs_sheet_content>-cell_style = lv_style_guid.
ELSE.
set_cell( ip_column = ip_column ip_row = ip_row ip_value = '' ip_style = ip_style ).
ENDIF.
ENDMETHOD. "SET_CELL_STYLE
METHOD set_column_width.
DATA: lo_column TYPE REF TO zcl_excel_column.
DATA: width TYPE float.
lo_column = me->get_column( ip_column ).
* if a fix size is supplied use this
IF ip_width_fix IS SUPPLIED.
TRY.
width = ip_width_fix.
IF width <= 0.
zcx_excel=>raise_text( 'Please supply a positive number as column-width' ).
ENDIF.
lo_column->set_width( width ).
EXIT.
CATCH cx_sy_conversion_no_number.
* Strange stuff passed --> raise error
zcx_excel=>raise_text( 'Unable to interpret supplied input as number' ).
ENDTRY.
ENDIF.
* If we get down to here, we have to use whatever is found in autosize.
lo_column->set_auto_size( ip_width_autosize ).
ENDMETHOD. "SET_COLUMN_WIDTH
METHOD set_default_excel_date_format.
IF ip_default_excel_date_format IS INITIAL.
zcx_excel=>raise_text( 'Default date format cannot be blank' ).
ENDIF.
default_excel_date_format = ip_default_excel_date_format.
ENDMETHOD. "SET_DEFAULT_EXCEL_DATE_FORMAT
METHOD set_merge.
DATA: ls_merge TYPE mty_merge,
lv_errormessage TYPE string.
...
"just after variables definition
IF ip_value IS SUPPLIED OR ip_formula IS SUPPLIED.
" if there is a value or formula set the value to the top-left cell
"maybe it is necessary to support other paramters for set_cell
IF ip_value IS SUPPLIED.
me->set_cell( ip_row = ip_row ip_column = ip_column_start
ip_value = ip_value ).
ENDIF.
IF ip_formula IS SUPPLIED.
me->set_cell( ip_row = ip_row ip_column = ip_column_start
ip_value = ip_formula ).
ENDIF.
ENDIF.
"call to set_merge_style to apply the style to all cells at the matrix
IF ip_style IS SUPPLIED.
me->set_merge_style( ip_row = ip_row ip_column_start = ip_column_start
ip_row_to = ip_row_to ip_column_end = ip_column_end
ip_style = ip_style ).
ENDIF.
...
*--------------------------------------------------------------------*
* Build new range area to insert into range table
*--------------------------------------------------------------------*
ls_merge-row_from = ip_row.
IF ip_row IS SUPPLIED AND ip_row IS NOT INITIAL AND ip_row_to IS NOT SUPPLIED.
ls_merge-row_to = ls_merge-row_from.
ELSE.
ls_merge-row_to = ip_row_to.
ENDIF.
IF ls_merge-row_from > ls_merge-row_to.
lv_errormessage = 'Merge: First row larger then last row'(405).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
ls_merge-col_from = zcl_excel_common=>convert_column2int( ip_column_start ).
IF ip_column_start IS SUPPLIED AND ip_column_start IS NOT INITIAL AND ip_column_end IS NOT SUPPLIED.
ls_merge-col_to = ls_merge-col_from.
ELSE.
ls_merge-col_to = zcl_excel_common=>convert_column2int( ip_column_end ).
ENDIF.
IF ls_merge-col_from > ls_merge-col_to.
lv_errormessage = 'Merge: First column larger then last column'(406).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
*--------------------------------------------------------------------*
* Check merge not overlapping with existing merges
*--------------------------------------------------------------------*
LOOP AT me->mt_merged_cells TRANSPORTING NO FIELDS WHERE NOT ( row_from > ls_merge-row_to
OR row_to < ls_merge-row_from
OR col_from > ls_merge-col_to
OR col_to < ls_merge-col_from ).
lv_errormessage = 'Overlapping merges'(404).
zcx_excel=>raise_text( lv_errormessage ).
ENDLOOP.
*--------------------------------------------------------------------*
* Everything seems ok --> add to merge table
*--------------------------------------------------------------------*
INSERT ls_merge INTO TABLE me->mt_merged_cells.
ENDMETHOD. "SET_MERGE
METHOD set_merge_style.
DATA: ld_row_start TYPE zexcel_cell_row,
ld_row_end TYPE zexcel_cell_row,
ld_column_start TYPE zexcel_cell_column,
ld_column_end TYPE zexcel_cell_column,
ld_current_column TYPE zexcel_cell_column_alpha,
ld_current_row TYPE zexcel_cell_row.
MOVE: ip_row_to TO ld_row_end,
ip_row TO ld_row_start.
IF ld_row_end IS INITIAL.
ld_row_end = ld_row_start.
ENDIF.
ld_column_start = zcl_excel_common=>convert_column2int( ip_column_start ).
ld_column_end = zcl_excel_common=>convert_column2int( ip_column_end ).
IF ld_column_end IS INITIAL.
ld_column_end = ld_column_start.
ENDIF.
"set the style cell by cell
WHILE ld_column_start <= ld_column_end.
ld_current_column = zcl_excel_common=>convert_column2alpha( ld_column_start ).
ld_current_row = ld_row_start.
WHILE ld_current_row <= ld_row_end.
me->set_cell_style( ip_row = ld_current_row ip_column = ld_current_column
ip_style = ip_style ).
ADD 1 TO ld_current_row.
ENDWHILE.
ADD 1 TO ld_column_start.
ENDWHILE.
ENDMETHOD. "set_merge_style
METHOD set_print_gridlines.
me->print_gridlines = i_print_gridlines.
ENDMETHOD. "SET_PRINT_GRIDLINES
METHOD set_row_height.
DATA: lo_row TYPE REF TO zcl_excel_row.
DATA: height TYPE float.
lo_row = me->get_row( ip_row ).
* if a fix size is supplied use this
TRY.
height = ip_height_fix.
IF height <= 0.
zcx_excel=>raise_text( 'Please supply a positive number as row-height' ).
ENDIF.
lo_row->set_row_height( height ).
EXIT.
CATCH cx_sy_conversion_no_number.
* Strange stuff passed --> raise error
zcx_excel=>raise_text( 'Unable to interpret supplied input as number' ).
ENDTRY.
ENDMETHOD. "SET_ROW_HEIGHT
METHOD set_row_outline.
DATA: ls_row_outline LIKE LINE OF me->mt_row_outlines.
FIELD-SYMBOLS: <ls_row_outline> LIKE LINE OF me->mt_row_outlines.
READ TABLE me->mt_row_outlines ASSIGNING <ls_row_outline> WITH TABLE KEY row_from = iv_row_from
row_to = iv_row_to.
IF sy-subrc <> 0.
IF iv_row_from <= 0.
zcx_excel=>raise_text( 'First row of outline must be a positive number' ).
ENDIF.
IF iv_row_to < iv_row_from.
zcx_excel=>raise_text( 'Last row of outline may not be less than first line of outline' ).
ENDIF.
ls_row_outline-row_from = iv_row_from.
ls_row_outline-row_to = iv_row_to.
INSERT ls_row_outline INTO TABLE me->mt_row_outlines ASSIGNING <ls_row_outline>.
ENDIF.
CASE iv_collapsed.
WHEN abap_true
OR abap_false.
<ls_row_outline>-collapsed = iv_collapsed.
WHEN OTHERS.
zcx_excel=>raise_text( 'Unknown collapse state' ).
ENDCASE.
ENDMETHOD. "SET_ROW_OUTLINE
METHOD set_show_gridlines.
me->show_gridlines = i_show_gridlines.
ENDMETHOD. "SET_SHOW_GRIDLINES
METHOD set_show_rowcolheaders.
me->show_rowcolheaders = i_show_rowcolheaders.
ENDMETHOD. "SET_SHOW_ROWCOLHEADERS
METHOD set_tabcolor.
me->tabcolor = iv_tabcolor.
ENDMETHOD. "SET_TABCOLOR
METHOD set_table.
DATA: lo_tabdescr TYPE REF TO cl_abap_structdescr,
lr_data TYPE REF TO data,
ls_header TYPE x030l,
lt_dfies TYPE ddfields,
lv_row_int TYPE zexcel_cell_row,
lv_column_int TYPE zexcel_cell_column,
lv_column_alpha TYPE zexcel_cell_column_alpha,
lv_cell_value TYPE zexcel_cell_value.
FIELD-SYMBOLS: <fs_table_line> TYPE any,
<fs_fldval> TYPE any,
<fs_dfies> TYPE dfies.
lv_column_int = zcl_excel_common=>convert_column2int( ip_top_left_column ).
lv_row_int = ip_top_left_row.
CREATE DATA lr_data LIKE LINE OF ip_table.
lo_tabdescr ?= cl_abap_structdescr=>describe_by_data_ref( lr_data ).
ls_header = lo_tabdescr->get_ddic_header( ).
lt_dfies = lo_tabdescr->get_ddic_field_list( ).
* It is better to loop column by column
LOOP AT lt_dfies ASSIGNING <fs_dfies>.
lv_column_alpha = zcl_excel_common=>convert_column2alpha( lv_column_int ).
IF ip_no_header = abap_false.
" First of all write column header
lv_cell_value = <fs_dfies>-scrtext_m.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_value = lv_cell_value
ip_style = ip_hdr_style ).
IF ip_transpose = abap_true.
ADD 1 TO lv_column_int.
ELSE.
ADD 1 TO lv_row_int.
ENDIF.
ENDIF.
LOOP AT ip_table ASSIGNING <fs_table_line>.
lv_column_alpha = zcl_excel_common=>convert_column2alpha( lv_column_int ).
ASSIGN COMPONENT <fs_dfies>-fieldname OF STRUCTURE <fs_table_line> TO <fs_fldval>.
MOVE <fs_fldval> TO lv_cell_value.
me->set_cell( ip_column = lv_column_alpha
ip_row = lv_row_int
ip_value = <fs_fldval> "lv_cell_value
ip_style = ip_body_style ).
IF ip_transpose = abap_true.
ADD 1 TO lv_column_int.
ELSE.
ADD 1 TO lv_row_int.
ENDIF.
ENDLOOP.
IF ip_transpose = abap_true.
lv_column_int = zcl_excel_common=>convert_column2int( ip_top_left_column ).
ADD 1 TO lv_row_int.
ELSE.
lv_row_int = ip_top_left_row.
ADD 1 TO lv_column_int.
ENDIF.
ENDLOOP.
ENDMETHOD. "SET_TABLE
METHOD set_title.
*--------------------------------------------------------------------*
* ToDos:
* 2do §1 The current coding for replacing a named ranges name
* after renaming a sheet should be checked if it is
* really working if sheetname should be escaped
*--------------------------------------------------------------------*
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmoecker, (wip ) 2012-12-08
* - ...
* changes: aligning code
* message made to support multilinguality
*--------------------------------------------------------------------*
* issue#243 - ' is not allowed as first character in sheet title
* - Stefan Schmoecker, 2012-12-02
* changes: added additional check for ' as first character
*--------------------------------------------------------------------*
DATA: lo_worksheets_iterator TYPE REF TO cl_object_collection_iterator,
lo_worksheet TYPE REF TO zcl_excel_worksheet,
errormessage TYPE string,
lv_rangesheetname_old TYPE string,
lv_rangesheetname_new TYPE string,
lo_ranges_iterator TYPE REF TO cl_object_collection_iterator,
lo_range TYPE REF TO zcl_excel_range,
lv_range_value TYPE zexcel_range_value,
lv_errormessage TYPE string. " Can't pass '...'(abc) to exception-class
*--------------------------------------------------------------------*
* Check whether title consists only of allowed characters
* Illegal characters are: / \ [ ] * ? : --> http://msdn.microsoft.com/en-us/library/ff837411.aspx
* Illegal characters not in documentation: ' as first character
*--------------------------------------------------------------------*
IF ip_title CA '/\[]*?:'.
lv_errormessage = 'Found illegal character in sheetname. List of forbidden characters: /\[]*?:'(402).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
IF ip_title IS NOT INITIAL AND ip_title(1) = `'`.
lv_errormessage = 'Sheetname may not start with &'(403). " & used instead of ' to allow fallbacklanguage
REPLACE '&' IN lv_errormessage WITH `'`.
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
*--------------------------------------------------------------------*
* Check whether title is unique in workbook
*--------------------------------------------------------------------*
lo_worksheets_iterator = me->excel->get_worksheets_iterator( ).
WHILE lo_worksheets_iterator->has_next( ) = 'X'.
lo_worksheet ?= lo_worksheets_iterator->get_next( ).
CHECK me->guid <> lo_worksheet->get_guid( ). " Don't check against itself
IF ip_title = lo_worksheet->get_title( ). " Not unique --> raise exception
errormessage = 'Duplicate sheetname &'.
REPLACE '&' IN errormessage WITH ip_title.
zcx_excel=>raise_text( errormessage ).
ENDIF.
ENDWHILE.
*--------------------------------------------------------------------*
* Remember old sheetname and rename sheet to desired name
*--------------------------------------------------------------------*
CONCATENATE me->title '!' INTO lv_rangesheetname_old.
me->title = ip_title.
*--------------------------------------------------------------------*
* After changing this worksheet's title we have to adjust
* all ranges that are referring to this worksheet.
*--------------------------------------------------------------------*
* 2do §1 - Check if the following quickfix is solid
* I fear it isn't - but this implementation is better then
* nothing at all since it handles a supposed majority of cases
*--------------------------------------------------------------------*
CONCATENATE me->title '!' INTO lv_rangesheetname_new.
lo_ranges_iterator = me->excel->get_ranges_iterator( ).
WHILE lo_ranges_iterator->has_next( ) = 'X'.
lo_range ?= lo_ranges_iterator->get_next( ).
lv_range_value = lo_range->get_value( ).
REPLACE ALL OCCURRENCES OF lv_rangesheetname_old IN lv_range_value WITH lv_rangesheetname_new.
IF sy-subrc = 0.
lo_range->set_range_value( lv_range_value ).
ENDIF.
ENDWHILE.
ENDMETHOD. "SET_TITLE
METHOD update_dimension_range.
DATA: ls_sheet_content TYPE zexcel_s_cell_data,
lv_row_alpha TYPE string,
lv_column_alpha TYPE zexcel_cell_column_alpha.
CHECK sheet_content IS NOT INITIAL.
upper_cell-cell_row = zcl_excel_common=>c_excel_sheet_max_row.
upper_cell-cell_column = zcl_excel_common=>c_excel_sheet_max_col.
lower_cell-cell_row = zcl_excel_common=>c_excel_sheet_min_row.
lower_cell-cell_column = zcl_excel_common=>c_excel_sheet_min_col.
LOOP AT sheet_content INTO ls_sheet_content.
IF upper_cell-cell_row > ls_sheet_content-cell_row.
upper_cell-cell_row = ls_sheet_content-cell_row.
ENDIF.
IF upper_cell-cell_column > ls_sheet_content-cell_column.
upper_cell-cell_column = ls_sheet_content-cell_column.
ENDIF.
IF lower_cell-cell_row < ls_sheet_content-cell_row.
lower_cell-cell_row = ls_sheet_content-cell_row.
ENDIF.
IF lower_cell-cell_column < ls_sheet_content-cell_column.
lower_cell-cell_column = ls_sheet_content-cell_column.
ENDIF.
ENDLOOP.
lv_row_alpha = upper_cell-cell_row.
lv_column_alpha = zcl_excel_common=>convert_column2alpha( upper_cell-cell_column ).
SHIFT lv_row_alpha RIGHT DELETING TRAILING space.
SHIFT lv_row_alpha LEFT DELETING LEADING space.
CONCATENATE lv_column_alpha lv_row_alpha INTO upper_cell-cell_coords.
lv_row_alpha = lower_cell-cell_row.
lv_column_alpha = zcl_excel_common=>convert_column2alpha( lower_cell-cell_column ).
SHIFT lv_row_alpha RIGHT DELETING TRAILING space.
SHIFT lv_row_alpha LEFT DELETING LEADING space.
CONCATENATE lv_column_alpha lv_row_alpha INTO lower_cell-cell_coords.
ENDMETHOD. "UPDATE_DIMENSION_RANGE
METHOD zif_excel_sheet_printsettings~clear_print_repeat_columns.
*--------------------------------------------------------------------*
* adjust internal representation
*--------------------------------------------------------------------*
CLEAR: me->print_title_col_from,
me->print_title_col_to .
*--------------------------------------------------------------------*
* adjust corresponding range
*--------------------------------------------------------------------*
me->print_title_set_range( ).
ENDMETHOD. "ZIF_EXCEL_SHEET_PRINTSETTINGS~CLEAR_PRINT_REPEAT_COLUMNS
METHOD zif_excel_sheet_printsettings~clear_print_repeat_rows.
*--------------------------------------------------------------------*
* adjust internal representation
*--------------------------------------------------------------------*
CLEAR: me->print_title_row_from,
me->print_title_row_to .
*--------------------------------------------------------------------*
* adjust corresponding range
*--------------------------------------------------------------------*
me->print_title_set_range( ).
ENDMETHOD. "ZIF_EXCEL_SHEET_PRINTSETTINGS~CLEAR_PRINT_REPEAT_ROWS
METHOD zif_excel_sheet_printsettings~get_print_repeat_columns.
ev_columns_from = me->print_title_col_from.
ev_columns_to = me->print_title_col_to.
ENDMETHOD. "ZIF_EXCEL_SHEET_PRINTSETTINGS~GET_PRINT_REPEAT_COLUMNS
METHOD zif_excel_sheet_printsettings~get_print_repeat_rows.
ev_rows_from = me->print_title_row_from.
ev_rows_to = me->print_title_row_to.
ENDMETHOD. "ZIF_EXCEL_SHEET_PRINTSETTINGS~GET_PRINT_REPEAT_ROWS
METHOD zif_excel_sheet_printsettings~set_print_repeat_columns.
*--------------------------------------------------------------------*
* issue#235 - repeat rows/columns
* - Stefan Schmöcker, 2012-12-02
*--------------------------------------------------------------------*
DATA: lv_col_from_int TYPE i,
lv_col_to_int TYPE i,
lv_errormessage TYPE string.
lv_col_from_int = zcl_excel_common=>convert_column2int( iv_columns_from ).
lv_col_to_int = zcl_excel_common=>convert_column2int( iv_columns_to ).
*--------------------------------------------------------------------*
* Check if valid range is supplied
*--------------------------------------------------------------------*
IF lv_col_from_int < 1.
lv_errormessage = 'Invalid range supplied for print-title repeatable columns'(401).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
IF lv_col_from_int > lv_col_to_int.
lv_errormessage = 'Invalid range supplied for print-title repeatable columns'(401).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
*--------------------------------------------------------------------*
* adjust internal representation
*--------------------------------------------------------------------*
me->print_title_col_from = iv_columns_from.
me->print_title_col_to = iv_columns_to.
*--------------------------------------------------------------------*
* adjust corresponding range
*--------------------------------------------------------------------*
me->print_title_set_range( ).
ENDMETHOD. "ZIF_EXCEL_SHEET_PRINTSETTINGS~SET_PRINT_REPEAT_COLUMNS
METHOD zif_excel_sheet_printsettings~set_print_repeat_rows.
*--------------------------------------------------------------------*
* issue#235 - repeat rows/columns
* - Stefan Schmöcker, 2012-12-02
*--------------------------------------------------------------------*
DATA: lv_errormessage TYPE string.
*--------------------------------------------------------------------*
* Check if valid range is supplied
*--------------------------------------------------------------------*
IF iv_rows_from < 1.
lv_errormessage = 'Invalid range supplied for print-title repeatable rowumns'(401).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
IF iv_rows_from > iv_rows_to.
lv_errormessage = 'Invalid range supplied for print-title repeatable rowumns'(401).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
*--------------------------------------------------------------------*
* adjust internal representation
*--------------------------------------------------------------------*
me->print_title_row_from = iv_rows_from.
me->print_title_row_to = iv_rows_to.
*--------------------------------------------------------------------*
* adjust corresponding range
*--------------------------------------------------------------------*
me->print_title_set_range( ).
ENDMETHOD. "ZIF_EXCEL_SHEET_PRINTSETTINGS~SET_PRINT_REPEAT_ROWS
METHOD zif_excel_sheet_properties~get_style.
IF zif_excel_sheet_properties~style IS NOT INITIAL.
ep_style = zif_excel_sheet_properties~style.
ELSE.
ep_style = me->excel->get_default_style( ).
ENDIF.
ENDMETHOD. "ZIF_EXCEL_SHEET_PROPERTIES~GET_STYLE
METHOD zif_excel_sheet_properties~initialize.
zif_excel_sheet_properties~show_zeros = zif_excel_sheet_properties=>c_showzero.
zif_excel_sheet_properties~summarybelow = zif_excel_sheet_properties=>c_below_on.
zif_excel_sheet_properties~summaryright = zif_excel_sheet_properties=>c_right_on.
* inizialize zoomscale values
zif_excel_sheet_properties~zoomscale = 100.
zif_excel_sheet_properties~zoomscale_normal = 100.
zif_excel_sheet_properties~zoomscale_pagelayoutview = 100 .
zif_excel_sheet_properties~zoomscale_sheetlayoutview = 100 .
ENDMETHOD. "ZIF_EXCEL_SHEET_PROPERTIES~INITIALIZE
METHOD zif_excel_sheet_properties~set_style.
zif_excel_sheet_properties~style = ip_style.
ENDMETHOD. "ZIF_EXCEL_SHEET_PROPERTIES~SET_STYLE
METHOD zif_excel_sheet_protection~initialize.
me->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_unprotected.
CLEAR me->zif_excel_sheet_protection~password.
me->zif_excel_sheet_protection~auto_filter = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~delete_columns = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~delete_rows = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~format_cells = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~format_columns = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~format_rows = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~insert_columns = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~insert_hyperlinks = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~insert_rows = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~objects = zif_excel_sheet_protection=>c_noactive.
* me->zif_excel_sheet_protection~password = zif_excel_sheet_protection=>c_noactive. "issue #68
me->zif_excel_sheet_protection~pivot_tables = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~scenarios = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~select_locked_cells = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~select_unlocked_cells = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~sheet = zif_excel_sheet_protection=>c_noactive.
me->zif_excel_sheet_protection~sort = zif_excel_sheet_protection=>c_noactive.
ENDMETHOD. "ZIF_EXCEL_SHEET_PROTECTION~INITIALIZE
METHOD zif_excel_sheet_vba_project~set_codename.
me->zif_excel_sheet_vba_project~codename = ip_codename.
ENDMETHOD. "ZIF_EXCEL_SHEET_VBA_PROJECT~SET_CODENAME
METHOD zif_excel_sheet_vba_project~set_codename_pr.
me->zif_excel_sheet_vba_project~codename_pr = ip_codename_pr.
ENDMETHOD. "ZIF_EXCEL_SHEET_VBA_PROJECT~SET_CODENAME_PR
ENDCLASS.
| [
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
1976,
565,
62,
1069,
5276,
62,
5225,
25473,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
220,
220,
41876,
12,
16402,
3535,
50,
450,
499,
764,
198,
220,
220,
220,
41876,
12,
16402,
3535,
50,
1017,
271,
764,
198,
220,
220,
220,
41876,
12,
16402,
3535,
50,
523,
72,
764,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
1069,
5276,
62,
21760,
62,
4798,
33692,
764,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
1069,
5276,
62,
21760,
62,
48310,
764,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
1069,
5276,
62,
21760,
62,
42846,
764,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
1069,
5276,
62,
21760,
62,
85,
7012,
62,
16302,
764,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
220,
285,
774,
62,
82,
62,
448,
1370,
62,
808,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
62,
6738,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
62,
1462,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14707,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
285,
774,
62,
82,
62,
448,
1370,
62,
808,
764,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
285,
774,
62,
912,
62,
448,
6615,
62,
808,
41876,
311,
9863,
1961,
43679,
3963,
285,
774,
62,
82,
62,
448,
1370,
62,
808,
13315,
4725,
33866,
8924,
35374,
5752,
62,
6738,
5752,
62,
1462,
764,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
9032,
62,
28665,
41876,
1976,
1069,
5276,
62,
9032,
26173,
8924,
362,
13,
220,
220,
220,
220,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
9032,
62,
23108,
41876,
1976,
1069,
5276,
62,
9032,
26173,
8924,
657,
13,
220,
220,
220,
220,
220,
220,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
9032,
62,
808,
41876,
1976,
1069,
5276,
62,
9032,
26173,
8924,
352,
13,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
42865,
27336,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
42865,
3601,
62,
25928,
6615,
41876,
1976,
1069,
5276,
62,
4798,
62,
25928,
6615,
20832,
12,
1340,
11319,
26173,
8924,
450,
499,
62,
9562,
13,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
42865,
9629,
62,
11299,
41876,
1976,
1069,
5276,
62,
83,
62,
3846,
62,
7890,
764,
198,
220,
220,
220,
42865,
9629,
62,
40406,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
21760,
62,
40406,
764,
198,
220,
220,
220,
42865,
905,
62,
25928,
6615,
41876,
1976,
1069,
5276,
62,
12860,
62,
25928,
6615,
20832,
12,
1340,
11319,
26173,
8924,
450,
499,
62,
7942,
13,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
42865,
905,
62,
808,
4033,
50145,
41876,
1976,
1069,
5276,
62,
12860,
62,
25928,
6615,
20832,
12,
1340,
11319,
26173,
8924,
450,
499,
62,
7942,
13,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
42865,
12186,
41876,
1976,
1069,
5276,
62,
83,
62,
21760,
62,
7635,
764,
198,
220,
220,
220,
42865,
7400,
8043,
41876,
1976,
1069,
5276,
62,
82,
62,
8658,
8043,
20832,
12,
1340,
11319,
764,
628,
220,
220,
220,
337,
36252,
50,
751,
62,
23893,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
541,
62,
23893,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
23893,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
19334,
278,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
541,
62,
19334,
278,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
19334,
278,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
3605,
62,
28665,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
541,
62,
28665,
41876,
2829,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
68,
78,
62,
28665,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
28665,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
3605,
62,
7635,
62,
17561,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
68,
78,
62,
7635,
62,
17561,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
7635,
62,
17561,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
3605,
62,
7890,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
68,
78,
62,
7890,
62,
12102,
341,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
7890,
62,
12102,
341,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
3605,
62,
9521,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
68,
78,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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<p class="shorttext synchronized" lang="en">Type of command</p>
TYPES ty_command_type TYPE i.
CONSTANTS:
BEGIN OF c_command_type,
request_menu TYPE ty_command_type VALUE 0,
normal TYPE ty_command_type VALUE 1,
dynpro TYPE ty_command_type VALUE 2,
END OF c_command_type.
DATA mv_function TYPE ui_func READ-ONLY.
DATA mr_params TYPE REF TO data READ-ONLY.
DATA mv_type TYPE ty_command_type READ-ONLY.
"! <p class="shorttext synchronized" lang="en">Adds the given menu to the command</p>
"!
METHODS set_context_menu
IMPORTING
io_menu TYPE REF TO cl_ctmenu.
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
5013,
65,
62,
48317,
62,
21812,
198,
220,
44731,
764,
198,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
6030,
286,
3141,
3556,
79,
29,
198,
220,
24412,
47,
1546,
1259,
62,
21812,
62,
4906,
41876,
1312,
13,
628,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
347,
43312,
3963,
269,
62,
21812,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
2581,
62,
26272,
41876,
1259,
62,
21812,
62,
4906,
26173,
8924,
657,
11,
198,
220,
220,
220,
220,
220,
3487,
220,
220,
220,
220,
220,
220,
41876,
1259,
62,
21812,
62,
4906,
26173,
8924,
352,
11,
198,
220,
220,
220,
220,
220,
37860,
1676,
220,
220,
220,
220,
220,
220,
41876,
1259,
62,
21812,
62,
4906,
26173,
8924,
362,
11,
198,
220,
220,
220,
23578,
3963,
269,
62,
21812,
62,
4906,
13,
628,
220,
42865,
285,
85,
62,
8818,
41876,
334,
72,
62,
20786,
20832,
12,
1340,
11319,
13,
198,
220,
42865,
285,
81,
62,
37266,
41876,
4526,
37,
5390,
1366,
20832,
12,
1340,
11319,
13,
198,
220,
42865,
285,
85,
62,
4906,
41876,
1259,
62,
21812,
62,
4906,
20832,
12,
1340,
11319,
13,
628,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
46245,
262,
1813,
6859,
284,
262,
3141,
3556,
79,
29,
198,
220,
366,
0,
198,
220,
337,
36252,
50,
900,
62,
22866,
62,
26272,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
33245,
62,
26272,
41876,
4526,
37,
5390,
537,
62,
310,
26272,
13,
198,
10619,
41358,
49836,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_BG_INJECTOR definition
public
create private
for testing .
public section.
class-methods SET_OBJECTS
importing
!II_OBJECTS type ref to ZIF_BG_OBJECTS .
class-methods SET_TRANSPORTS
importing
!II_TRANSPORTS type ref to ZIF_BG_TRANSPORTS .
PROTECTED SECTION.
private section.
ENDCLASS.
CLASS ZCL_BG_INJECTOR IMPLEMENTATION.
METHOD set_objects.
zcl_bg_factory=>gi_objects = ii_objects.
ENDMETHOD.
METHOD set_transports.
zcl_bg_factory=>gi_transports = ii_transports.
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
40469,
62,
1268,
23680,
1581,
6770,
198,
220,
1171,
198,
220,
2251,
2839,
198,
220,
329,
4856,
764,
198,
198,
11377,
2665,
13,
628,
220,
1398,
12,
24396,
82,
25823,
62,
9864,
41,
2943,
4694,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3978,
62,
9864,
41,
2943,
4694,
2099,
1006,
284,
1168,
5064,
62,
40469,
62,
9864,
41,
2943,
4694,
764,
198,
220,
1398,
12,
24396,
82,
25823,
62,
5446,
1565,
4303,
33002,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3978,
62,
5446,
1565,
4303,
33002,
2099,
1006,
284,
1168,
5064,
62,
40469,
62,
5446,
1565,
4303,
33002,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
19734,
2665,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
40469,
62,
1268,
23680,
1581,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
900,
62,
48205,
13,
628,
220,
220,
220,
1976,
565,
62,
35904,
62,
69,
9548,
14804,
12397,
62,
48205,
796,
21065,
62,
48205,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
900,
62,
7645,
3742,
13,
628,
220,
220,
220,
1976,
565,
62,
35904,
62,
69,
9548,
14804,
12397,
62,
7645,
3742,
796,
21065,
62,
7645,
3742,
13,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
interface ZIF_MQBA_GUI_MSG_LISTENER
public .
events ON_MSG_ARRIVED
exporting
value(IT_MSG) type ZMQBA_MSG_T_MAIN .
methods DESTROY .
methods SUBSCRIBE_TO
importing
!IV_TOPIC type DATA
returning
value(RR_SELF) type ref to ZIF_MQBA_GUI_MSG_LISTENER .
methods START
returning
value(RV_SUCCESS) type ABAP_BOOL .
methods STOP
returning
value(RV_SUCCESS) type ABAP_BOOL .
methods IS_STARTED
returning
value(RV_STARTED) type ABAP_BOOL .
methods SET_INTERVAL
importing
!IV_INTERVAL type I default 5
returning
value(RR_SELF) type ref to ZIF_MQBA_GUI_MSG_LISTENER .
methods GET_TIMESTAMP_LAST
returning
value(EV_LAST) type ZMQBA_TIMESTAMP .
methods GET_LAST_DATA
returning
value(RS_DATA) type ZMQBA_API_S_BRK_MSG .
methods SET_DELTA_MODE
importing
!IV_ACTIVATE type ABAP_BOOL default ABAP_TRUE
returning
value(RR_SELF) type ref to ZIF_MQBA_GUI_MSG_LISTENER .
endinterface.
| [
39994,
1168,
5064,
62,
49215,
4339,
62,
40156,
62,
5653,
38,
62,
45849,
1677,
1137,
198,
220,
1171,
764,
628,
198,
220,
2995,
6177,
62,
5653,
38,
62,
26465,
3824,
1961,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
1988,
7,
2043,
62,
5653,
38,
8,
2099,
1168,
49215,
4339,
62,
5653,
38,
62,
51,
62,
5673,
1268,
764,
628,
220,
5050,
22196,
5446,
21414,
764,
198,
220,
5050,
13558,
4462,
34,
7112,
12473,
62,
10468,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
35222,
2149,
2099,
42865,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
50,
37738,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
40156,
62,
5653,
38,
62,
45849,
1677,
1137,
764,
198,
220,
5050,
33303,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
53,
62,
12564,
4093,
7597,
8,
2099,
9564,
2969,
62,
8202,
3535,
764,
198,
220,
5050,
44934,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
53,
62,
12564,
4093,
7597,
8,
2099,
9564,
2969,
62,
8202,
3535,
764,
198,
220,
5050,
3180,
62,
2257,
7227,
1961,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
53,
62,
2257,
7227,
1961,
8,
2099,
9564,
2969,
62,
8202,
3535,
764,
198,
220,
5050,
25823,
62,
41358,
23428,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
41358,
23428,
2099,
314,
4277,
642,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
50,
37738,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
40156,
62,
5653,
38,
62,
45849,
1677,
1137,
764,
198,
220,
5050,
17151,
62,
51,
3955,
6465,
23518,
62,
43,
11262,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
20114,
62,
43,
11262,
8,
2099,
1168,
49215,
4339,
62,
51,
3955,
6465,
23518,
764,
198,
220,
5050,
17151,
62,
43,
11262,
62,
26947,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
6998,
62,
26947,
8,
2099,
1168,
49215,
4339,
62,
17614,
62,
50,
62,
11473,
42,
62,
5653,
38,
764,
198,
220,
5050,
25823,
62,
35,
3698,
5603,
62,
49058,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
10659,
3824,
6158,
2099,
9564,
2969,
62,
8202,
3535,
4277,
9564,
2969,
62,
5446,
8924,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
50,
37738,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
40156,
62,
5653,
38,
62,
45849,
1677,
1137,
764,
198,
437,
39994,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class zcl_minesweeper definition
public
final
create public .
public section.
methods sweep importing input type string_table
returning value(result) type string_table.
protected section.
private section.
types syinput(1) type c.
data board type string_table.
data: height type i,
width type i.
methods count_adj_mines importing x type i
y type i
returning value(result) type syinput.
endclass.
class zcl_minesweeper implementation.
method sweep.
data row type c length 255. "To allow substring access with write
height = lines( input ).
check height > 0.
board = input.
width = strlen( board[ 1 ] ).
"Note the differene in coordinate origins:
"y is a table and starts at 1, and x is a string offset and starts at 0. ABAP is fun.
do height times.
data(y) = sy-index.
row = board[ y ].
do width times.
data(x) = sy-index - 1.
if row+x(1) = space.
row+x(1) = count_adj_mines( x = x
y = y ).
endif.
enddo.
append |{ row width = width }| to result.
enddo.
endmethod.
method count_adj_mines.
data row type string.
data sum type i.
data(off) = nmax( val1 = 0
val2 = x - 1 ).
data(len) = nmin( val1 = 3
val2 = width - off
val3 = x + 2 ).
data(check_row) = nmax( val1 = 1
val2 = y - 1 ).
data(last_row) = nmin( val1 = y + 1
val2 = height ).
while check_row <= last_row.
row = board[ check_row ].
sum = sum + count( val = row+off(len)
sub = `*` ).
check_row = check_row + 1.
endwhile.
if sum > 0.
result = sum.
else.
result = space.
endif.
*Alternate solution using REDUCE (Version 7.4 onwards)
*
* data(off) = nmax( val1 = 0
* val2 = x - 1 ).
*
* data(len) = nmin( val1 = 3
* val2 = width - off
* val3 = x + 2 ).
*
* result = reduce i(
* init s = 0
* for i = nmax( val1 = 1
* val2 = y - 1 )
* until
* i > nmin( val1 = y + 1
* val2 = height )
* let row = board[ i ] in
* next s = s + count( val = row+off(len)
* sub = `*` ) ).
*
* result = cond #( when sum = 0 then space else sum ).
endmethod.
endclass.
| [
4871,
1976,
565,
62,
1084,
274,
732,
5723,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
628,
220,
1171,
2665,
13,
198,
220,
220,
220,
5050,
16085,
33332,
5128,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
4731,
62,
11487,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8024,
1988,
7,
20274,
8,
2099,
4731,
62,
11487,
13,
198,
220,
6861,
2665,
13,
198,
220,
2839,
2665,
13,
198,
220,
220,
220,
3858,
827,
15414,
7,
16,
8,
2099,
269,
13,
198,
220,
220,
220,
1366,
3096,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
4731,
62,
11487,
13,
198,
220,
220,
220,
1366,
25,
6001,
2099,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9647,
220,
2099,
1312,
13,
198,
220,
220,
220,
5050,
954,
62,
41255,
62,
1084,
274,
33332,
2124,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8024,
1988,
7,
20274,
8,
2099,
827,
15414,
13,
198,
437,
4871,
13,
628,
198,
198,
4871,
1976,
565,
62,
1084,
274,
732,
5723,
7822,
13,
628,
220,
2446,
16085,
13,
198,
220,
220,
220,
1366,
5752,
2099,
269,
4129,
14280,
13,
366,
2514,
1249,
3293,
1806,
1895,
351,
3551,
628,
220,
220,
220,
6001,
796,
3951,
7,
5128,
6739,
198,
220,
220,
220,
2198,
6001,
1875,
657,
13,
628,
220,
220,
220,
3096,
796,
5128,
13,
198,
220,
220,
220,
9647,
796,
965,
11925,
7,
3096,
58,
352,
2361,
6739,
628,
220,
220,
220,
366,
6425,
262,
980,
710,
287,
20435,
15587,
25,
198,
220,
220,
220,
366,
88,
318,
257,
3084,
290,
4940,
379,
352,
11,
290,
2124,
318,
257,
4731,
11677,
290,
4940,
379,
657,
13,
9564,
2969,
318,
1257,
13,
628,
220,
220,
220,
466,
6001,
1661,
13,
628,
220,
220,
220,
220,
220,
1366,
7,
88,
8,
796,
827,
12,
9630,
13,
198,
220,
220,
220,
220,
220,
5752,
796,
3096,
58,
331,
20740,
628,
220,
220,
220,
220,
220,
466,
9647,
1661,
13,
628,
220,
220,
220,
220,
220,
220,
220,
1366,
7,
87,
8,
796,
827,
12,
9630,
532,
352,
13,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5752,
10,
87,
7,
16,
8,
796,
2272,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
10,
87,
7,
16,
8,
796,
954,
62,
41255,
62,
1084,
274,
7,
2124,
796,
2124,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
796,
331,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
45762,
13,
628,
220,
220,
220,
220,
220,
886,
4598,
13,
628,
220,
220,
220,
220,
220,
24443,
930,
90,
5752,
9647,
796,
9647,
1782,
91,
284,
1255,
13,
198,
220,
220,
220,
886,
4598,
13,
628,
220,
886,
24396,
13,
628,
198,
220,
2446,
954,
62,
41255,
62,
1084,
274,
13,
628,
220,
220,
220,
1366,
5752,
2099,
4731,
13,
198,
220,
220,
220,
1366,
2160,
2099,
1312,
13,
628,
220,
220,
220,
1366,
7,
2364,
8,
796,
299,
9806,
7,
1188,
16,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
17,
796,
2124,
532,
352,
6739,
628,
220,
220,
220,
1366,
7,
11925,
8,
796,
299,
1084,
7,
1188,
16,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
17,
796,
9647,
532,
572,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
18,
796,
2124,
1343,
362,
6739,
628,
220,
220,
220,
1366,
7,
9122,
62,
808,
8,
796,
299,
9806,
7,
1188,
16,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
17,
796,
331,
532,
352,
6739,
628,
220,
220,
220,
1366,
7,
12957,
62,
808,
8,
796,
299,
1084,
7,
1188,
16,
796,
331,
1343,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
17,
796,
6001,
6739,
628,
220,
220,
220,
981,
2198,
62,
808,
19841,
938,
62,
808,
13,
198,
220,
220,
220,
220,
220,
5752,
796,
3096,
58,
2198,
62,
808,
20740,
198,
220,
220,
220,
220,
220,
2160,
796,
2160,
1343,
954,
7,
1188,
796,
5752,
10,
2364,
7,
11925,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
796,
4600,
9,
63,
6739,
198,
220,
220,
220,
220,
220,
2198,
62,
808,
796,
2198,
62,
808,
1343,
352,
13,
198,
220,
220,
220,
886,
4514,
13,
628,
220,
220,
220,
611,
2160,
1875,
657,
13,
198,
220,
220,
220,
220,
220,
1255,
796,
2160,
13,
198,
220,
220,
220,
2073,
13,
198,
220,
220,
220,
220,
220,
1255,
796,
2272,
13,
198,
220,
220,
220,
45762,
13,
198,
198,
9,
23081,
378,
4610,
1262,
23848,
52,
5222,
357,
14815,
767,
13,
19,
31719,
8,
198,
9,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! abapGit general error
CLASS zcx_abapgit_exception DEFINITION
PUBLIC
INHERITING FROM cx_static_check
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_t100_message .
CONSTANTS:
BEGIN OF gc_section_text,
cause TYPE string VALUE `Cause`,
system_response TYPE string VALUE `System response`,
what_to_do TYPE string VALUE `Procedure`,
sys_admin TYPE string VALUE `System administration`,
END OF gc_section_text .
CONSTANTS:
BEGIN OF gc_section_token,
cause TYPE string VALUE `&CAUSE&`,
system_response TYPE string VALUE `&SYSTEM_RESPONSE&`,
what_to_do TYPE string VALUE `&WHAT_TO_DO&`,
sys_admin TYPE string VALUE `&SYS_ADMIN&`,
END OF gc_section_token .
DATA msgv1 TYPE symsgv READ-ONLY .
DATA msgv2 TYPE symsgv READ-ONLY .
DATA msgv3 TYPE symsgv READ-ONLY .
DATA msgv4 TYPE symsgv READ-ONLY .
DATA mt_callstack TYPE abap_callstack READ-ONLY .
DATA mi_log TYPE REF TO zif_abapgit_log READ-ONLY.
"! Raise exception with text
"! @parameter iv_text | Text
"! @parameter ix_previous | Previous exception
"! @raising zcx_abapgit_exception | Exception
CLASS-METHODS raise
IMPORTING
!iv_text TYPE clike
!ix_previous TYPE REF TO cx_root OPTIONAL
!ii_log TYPE REF TO zif_abapgit_log OPTIONAL
RAISING
zcx_abapgit_exception .
"! Raise exception with T100 message
"! <p>
"! Will default to sy-msg* variables. These need to be set right before calling this method.
"! </p>
"! @parameter iv_msgid | Message ID
"! @parameter iv_msgno | Message number
"! @parameter iv_msgv1 | Message variable 1
"! @parameter iv_msgv2 | Message variable 2
"! @parameter iv_msgv3 | Message variable 3
"! @parameter iv_msgv4 | Message variable 4
"! @raising zcx_abapgit_exception | Exception
CLASS-METHODS raise_t100
IMPORTING
VALUE(iv_msgid) TYPE symsgid DEFAULT sy-msgid
VALUE(iv_msgno) TYPE symsgno DEFAULT sy-msgno
VALUE(iv_msgv1) TYPE symsgv DEFAULT sy-msgv1
VALUE(iv_msgv2) TYPE symsgv DEFAULT sy-msgv2
VALUE(iv_msgv3) TYPE symsgv DEFAULT sy-msgv3
VALUE(iv_msgv4) TYPE symsgv DEFAULT sy-msgv4
!ii_log TYPE REF TO zif_abapgit_log OPTIONAL
!ix_previous TYPE REF TO cx_root OPTIONAL
RAISING
zcx_abapgit_exception .
CLASS-METHODS raise_with_text
IMPORTING
!ix_previous TYPE REF TO cx_root
RAISING
zcx_abapgit_exception .
METHODS constructor
IMPORTING
!textid LIKE if_t100_message=>t100key OPTIONAL
!previous LIKE previous OPTIONAL
!ii_log TYPE REF TO zif_abapgit_log OPTIONAL
!msgv1 TYPE symsgv OPTIONAL
!msgv2 TYPE symsgv OPTIONAL
!msgv3 TYPE symsgv OPTIONAL
!msgv4 TYPE symsgv OPTIONAL .
METHODS get_source_position
REDEFINITION .
METHODS if_message~get_longtext
REDEFINITION .
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS c_generic_error_msg TYPE string VALUE `An error occured (ZCX_ABAPGIT_EXCEPTION)` ##NO_TEXT.
CLASS-METHODS split_text_to_symsg
IMPORTING
!iv_text TYPE string
RETURNING
VALUE(rs_msg) TYPE symsg .
METHODS save_callstack .
METHODS itf_to_string
IMPORTING
!it_itf TYPE tline_tab
RETURNING
VALUE(rv_result) TYPE string .
METHODS get_t100_longtext_itf
RETURNING
VALUE(rt_itf) TYPE tline_tab .
METHODS remove_empty_section
IMPORTING
!iv_tabix_from TYPE i
!iv_tabix_to TYPE i
CHANGING
!ct_itf TYPE tline_tab .
METHODS replace_section_head_with_text
CHANGING
!cs_itf TYPE tline .
ENDCLASS.
CLASS zcx_abapgit_exception IMPLEMENTATION.
METHOD constructor ##ADT_SUPPRESS_GENERATION.
super->constructor( previous = previous ).
me->msgv1 = msgv1.
me->msgv2 = msgv2.
me->msgv3 = msgv3.
me->msgv4 = msgv4.
me->mi_log = ii_log.
CLEAR me->textid.
IF textid IS INITIAL.
if_t100_message~t100key = if_t100_message=>default_textid.
ELSE.
if_t100_message~t100key = textid.
ENDIF.
save_callstack( ).
ENDMETHOD.
METHOD get_source_position.
FIELD-SYMBOLS: <ls_callstack> TYPE abap_callstack_line.
READ TABLE mt_callstack ASSIGNING <ls_callstack>
INDEX 1.
IF sy-subrc = 0.
program_name = <ls_callstack>-mainprogram.
include_name = <ls_callstack>-include.
source_line = <ls_callstack>-line.
ELSE.
super->get_source_position(
IMPORTING
program_name = program_name
include_name = include_name
source_line = source_line ).
ENDIF.
ENDMETHOD.
METHOD get_t100_longtext_itf.
DATA: lv_docu_key TYPE doku_obj.
FIELD-SYMBOLS <lv_msgv> TYPE any.
lv_docu_key = if_t100_message~t100key-msgid && if_t100_message~t100key-msgno.
CALL FUNCTION 'DOCU_GET'
EXPORTING
id = 'NA'
langu = sy-langu
object = lv_docu_key
typ = 'E'
TABLES
line = rt_itf
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
ASSIGN me->(if_t100_message~t100key-attr1) TO <lv_msgv>.
IF sy-subrc = 0.
REPLACE ALL OCCURRENCES OF '&V1&' IN TABLE rt_itf WITH <lv_msgv>.
ENDIF.
ASSIGN me->(if_t100_message~t100key-attr2) TO <lv_msgv>.
IF sy-subrc = 0.
REPLACE ALL OCCURRENCES OF '&V2&' IN TABLE rt_itf WITH <lv_msgv>.
ENDIF.
ASSIGN me->(if_t100_message~t100key-attr3) TO <lv_msgv>.
IF sy-subrc = 0.
REPLACE ALL OCCURRENCES OF '&V3&' IN TABLE rt_itf WITH <lv_msgv>.
ENDIF.
ASSIGN me->(if_t100_message~t100key-attr4) TO <lv_msgv>.
IF sy-subrc = 0.
REPLACE ALL OCCURRENCES OF '&V4&' IN TABLE rt_itf WITH <lv_msgv>.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD if_message~get_longtext.
result = super->get_longtext( ).
IF if_t100_message~t100key IS NOT INITIAL.
result = itf_to_string( get_t100_longtext_itf( ) ).
ENDIF.
ENDMETHOD.
METHOD itf_to_string.
CONSTANTS: lc_format_section TYPE string VALUE 'U1'.
DATA:
lt_stream TYPE TABLE OF tdline,
lt_string TYPE TABLE OF string,
lv_string LIKE LINE OF lt_string,
lt_itf TYPE tline_tab,
lv_has_content TYPE abap_bool,
lv_tabix_from TYPE syst-tabix,
lv_tabix_to TYPE syst-tabix.
FIELD-SYMBOLS: <ls_itf_section> TYPE tline,
<ls_itf_section_item> TYPE tline.
lt_itf = it_itf.
" You should remember that we replace the U1 format because
" that preserves the section header of longtexts.
LOOP AT lt_itf ASSIGNING <ls_itf_section>
WHERE tdformat = lc_format_section.
CLEAR:
lv_has_content,
lv_tabix_to.
lv_tabix_from = sy-tabix.
LOOP AT lt_itf ASSIGNING <ls_itf_section_item>
FROM sy-tabix + 1.
IF <ls_itf_section_item>-tdformat = lc_format_section.
lv_tabix_to = sy-tabix.
EXIT.
ELSEIF <ls_itf_section_item>-tdline IS NOT INITIAL.
lv_has_content = abap_true.
ENDIF.
ENDLOOP.
IF lv_has_content = abap_false.
remove_empty_section(
EXPORTING
iv_tabix_from = lv_tabix_from
iv_tabix_to = lv_tabix_to
CHANGING
ct_itf = lt_itf ).
CONTINUE.
ENDIF.
replace_section_head_with_text( CHANGING cs_itf = <ls_itf_section> ).
ENDLOOP.
CALL FUNCTION 'CONVERT_ITF_TO_STREAM_TEXT'
EXPORTING
lf = 'X'
IMPORTING
stream_lines = lt_string
TABLES
itf_text = lt_itf
text_stream = lt_stream.
LOOP AT lt_string INTO lv_string.
IF sy-tabix = 1.
rv_result = lv_string.
ELSE.
CONCATENATE rv_result lv_string
INTO rv_result
SEPARATED BY cl_abap_char_utilities=>newline.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD raise.
DATA lv_text TYPE string.
IF iv_text IS INITIAL.
lv_text = c_generic_error_msg.
ELSE.
lv_text = iv_text.
ENDIF.
split_text_to_symsg( lv_text ).
raise_t100(
ii_log = ii_log
ix_previous = ix_previous ).
ENDMETHOD.
METHOD raise_t100.
DATA: ls_t100_key TYPE scx_t100key.
ls_t100_key-msgid = iv_msgid.
ls_t100_key-msgno = iv_msgno.
ls_t100_key-attr1 = 'MSGV1'.
ls_t100_key-attr2 = 'MSGV2'.
ls_t100_key-attr3 = 'MSGV3'.
ls_t100_key-attr4 = 'MSGV4'.
IF iv_msgid IS INITIAL.
CLEAR ls_t100_key.
ENDIF.
RAISE EXCEPTION TYPE zcx_abapgit_exception
EXPORTING
textid = ls_t100_key
ii_log = ii_log
msgv1 = iv_msgv1
msgv2 = iv_msgv2
msgv3 = iv_msgv3
msgv4 = iv_msgv4
previous = ix_previous.
ENDMETHOD.
METHOD raise_with_text.
raise(
iv_text = ix_previous->get_text( )
ix_previous = ix_previous ).
ENDMETHOD.
METHOD remove_empty_section.
IF iv_tabix_to BETWEEN iv_tabix_from AND lines( ct_itf ).
DELETE ct_itf FROM iv_tabix_from TO iv_tabix_to.
ELSE.
DELETE ct_itf FROM iv_tabix_from.
ENDIF.
ENDMETHOD.
METHOD replace_section_head_with_text.
CASE cs_itf-tdline.
WHEN gc_section_token-cause.
cs_itf-tdline = gc_section_text-cause.
WHEN gc_section_token-system_response.
cs_itf-tdline = gc_section_text-system_response.
WHEN gc_section_token-what_to_do.
cs_itf-tdline = gc_section_text-what_to_do.
WHEN gc_section_token-sys_admin.
cs_itf-tdline = gc_section_text-sys_admin.
ENDCASE.
ENDMETHOD.
METHOD save_callstack.
FIELD-SYMBOLS: <ls_callstack> TYPE abap_callstack_line.
CALL FUNCTION 'SYSTEM_CALLSTACK'
IMPORTING
callstack = mt_callstack.
" You should remember that the first lines are from zcx_abapgit_exception
" and are removed so that highest level in the callstack is the position where
" the exception is raised.
"
" For the merged report it's hard to do that, because zcx_abapgit_exception
" isn't visible in the callstack. Therefore we have to check the Events.
LOOP AT mt_callstack ASSIGNING <ls_callstack>.
IF <ls_callstack>-mainprogram CP |ZCX_ABAPGIT_EXCEPTION*| " full
OR <ls_callstack>-blockname = `SAVE_CALLSTACK` " merged
OR <ls_callstack>-blockname = `CONSTRUCTOR` " merged
OR <ls_callstack>-blockname CP `RAISE*`. "merged
DELETE TABLE mt_callstack FROM <ls_callstack>.
ELSE.
EXIT.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD split_text_to_symsg.
CONSTANTS:
lc_length_of_msgv TYPE i VALUE 50,
lc_offset_of_last_character TYPE i VALUE 49.
DATA:
lv_text TYPE c LENGTH 200,
lv_rest TYPE c LENGTH 200,
ls_msg TYPE symsg,
lv_msg_var TYPE c LENGTH lc_length_of_msgv,
lv_index TYPE sy-index.
lv_text = iv_text.
DO 4 TIMES.
lv_index = sy-index.
CALL FUNCTION 'TEXT_SPLIT'
EXPORTING
length = lc_length_of_msgv
text = lv_text
IMPORTING
line = lv_msg_var
rest = lv_rest.
IF lv_msg_var+lc_offset_of_last_character(1) = space OR
lv_text+lc_length_of_msgv(1) = space.
" keep the space at the beginning of the rest
" because otherwise it's lost
lv_rest = | { lv_rest }|.
ENDIF.
lv_text = lv_rest.
CASE lv_index.
WHEN 1.
ls_msg-msgv1 = lv_msg_var.
WHEN 2.
ls_msg-msgv2 = lv_msg_var.
WHEN 3.
ls_msg-msgv3 = lv_msg_var.
WHEN 4.
ls_msg-msgv4 = lv_msg_var.
ENDCASE.
ENDDO.
" Set syst using generic error message
MESSAGE e001(00) WITH ls_msg-msgv1 ls_msg-msgv2 ls_msg-msgv3 ls_msg-msgv4 INTO sy-lisel.
rs_msg = ls_msg.
ENDMETHOD.
ENDCLASS.
| [
40484,
450,
499,
38,
270,
2276,
4049,
198,
31631,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
43213,
62,
12708,
62,
9122,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
611,
62,
83,
3064,
62,
20500,
764,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
308,
66,
62,
5458,
62,
5239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2728,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
4600,
42323,
47671,
198,
220,
220,
220,
220,
220,
220,
220,
1080,
62,
26209,
41876,
4731,
26173,
8924,
4600,
11964,
2882,
47671,
198,
220,
220,
220,
220,
220,
220,
220,
644,
62,
1462,
62,
4598,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
4600,
2964,
771,
495,
47671,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
62,
28482,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
4600,
11964,
3662,
47671,
198,
220,
220,
220,
220,
220,
23578,
3963,
308,
66,
62,
5458,
62,
5239,
764,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
308,
66,
62,
5458,
62,
30001,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2728,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
4600,
5,
8141,
19108,
5,
47671,
198,
220,
220,
220,
220,
220,
220,
220,
1080,
62,
26209,
41876,
4731,
26173,
8924,
4600,
5,
23060,
25361,
62,
19535,
47,
1340,
5188,
5,
47671,
198,
220,
220,
220,
220,
220,
220,
220,
644,
62,
1462,
62,
4598,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
4600,
5,
32971,
62,
10468,
62,
18227,
5,
47671,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
62,
28482,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
4600,
5,
50,
16309,
62,
2885,
23678,
5,
47671,
198,
220,
220,
220,
220,
220,
23578,
3963,
308,
66,
62,
5458,
62,
30001,
764,
198,
220,
220,
220,
42865,
31456,
85,
16,
41876,
827,
19662,
85,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
42865,
31456,
85,
17,
41876,
827,
19662,
85,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
42865,
31456,
85,
18,
41876,
827,
19662,
85,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
42865,
31456,
85,
19,
41876,
827,
19662,
85,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
42865,
45079,
62,
13345,
25558,
41876,
450,
499,
62,
13345,
25558,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
42865,
21504,
62,
6404,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6404,
20832,
12,
1340,
11319,
13,
628,
220,
220,
220,
366,
0,
35123,
6631,
351,
2420,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
5239,
930,
8255,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
220,
844,
62,
3866,
1442,
930,
21801,
6631,
198,
220,
220,
220,
366,
0,
2488,
32741,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
930,
35528,
198,
220,
220,
220,
42715,
12,
49273,
50,
5298,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
5239,
220,
220,
220,
220,
41876,
537,
522,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
844,
62,
3866,
1442,
41876,
4526,
37,
5390,
43213,
62,
15763,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
6404,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6404,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
366,
0,
35123,
6631,
351,
309,
3064,
3275,
198,
220,
220,
220,
366,
0,
1279,
79,
29,
198,
220,
220,
220,
366,
0,
2561,
4277,
284,
827,
12,
19662,
9,
9633,
13,
2312,
761,
284,
307,
900,
826,
878,
4585,
428,
2446,
13,
198,
220,
220,
220,
366,
0,
7359,
79,
29,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
19662,
312,
930,
16000,
4522,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
19662,
3919,
930,
16000,
1271,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
19662,
85,
16,
930,
16000,
7885,
352,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
19662,
85,
17,
930,
16000,
7885,
362,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
19662,
85,
18,
930,
16000,
7885,
513,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
19662,
85,
19,
930,
16000,
7885,
604,
198,
220,
220,
220,
366,
0,
2488,
32741,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
930,
35528,
198,
220,
220,
220,
42715,
12,
49273,
50,
5298,
62,
83,
3064,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
19662,
312,
8,
41876,
827,
19662,
312,
5550,
38865,
827,
12,
19662,
312,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
19662,
3919,
8,
41876,
827,
19662,
3919,
5550,
38865,
827,
12,
19662,
3919,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
19662,
85,
16,
8,
41876,
827,
19662,
85,
5550,
38865,
827,
12,
19662,
85,
16,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
19662,
85,
17,
8,
41876,
827,
19662,
85,
5550,
38865,
827,
12,
19662,
85,
17,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
19662,
85,
18,
8,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet.
In original definition, 'Cope' means someone who is creating an psychological defence of a more lighter belief to deal with a harsh truth.
However, it could easily be used and misinterpretated by online trolls, usualy from Discord or 4Chan, in an attempt to convey mockery, trolling, defaminate and insulting, usualy those people have pathetic lives so they spend it tossing this word and insult/mock others to feed their superiority complex in online chats and/or forums.
> Discord chat
Person 1: Man, sometimes being shorter than average sucks.
Discord troll: Cope
person 1: How is this a 'Cope'?
Discord troll: Haha, cope manlet.
person 1: This is rude, mind your language.
Discord troll: Cope harder manlet. | [
818,
2656,
6770,
11,
705,
34,
3008,
6,
1724,
2130,
508,
318,
4441,
281,
10590,
9366,
286,
257,
517,
14871,
4901,
284,
1730,
351,
257,
11859,
3872,
13,
201,
198,
201,
198,
4864,
11,
340,
714,
3538,
307,
973,
290,
40882,
515,
416,
2691,
24727,
11,
6678,
88,
422,
39462,
393,
604,
48407,
11,
287,
281,
2230,
284,
13878,
42935,
11,
38098,
11,
825,
321,
4559,
290,
27899,
11,
6678,
88,
883,
661,
423,
29215,
3160,
523,
484,
4341,
340,
37432,
428,
1573,
290,
13277,
14,
76,
735,
1854,
284,
3745,
511,
26883,
3716,
287,
2691,
40815,
290,
14,
273,
14216,
13,
201,
198,
29,
39462,
8537,
201,
198,
15439,
352,
25,
1869,
11,
3360,
852,
12238,
621,
2811,
22523,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
201,
198,
201,
198,
6259,
352,
25,
1374,
318,
428,
257,
705,
34,
3008,
30960,
201,
198,
201,
198,
15642,
585,
13278,
25,
367,
12236,
11,
19271,
582,
1616,
13,
201,
198,
201,
198,
6259,
352,
25,
770,
318,
22066,
11,
2000,
534,
3303,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
7069,
582,
1616,
13,
201,
198,
201,
198,
818,
2656,
6770,
11,
705,
34,
3008,
6,
1724,
2130,
508,
318,
4441,
281,
10590,
9366,
286,
257,
517,
14871,
4901,
284,
1730,
351,
257,
11859,
3872,
13,
201,
198,
201,
198,
4864,
11,
340,
714,
3538,
307,
973,
290,
40882,
515,
416,
2691,
24727,
11,
6678,
88,
422,
39462,
393,
604,
48407,
11,
287,
281,
2230,
284,
13878,
42935,
11,
38098,
11,
825,
321,
4559,
290,
27899,
11,
6678,
88,
883,
661,
423,
29215,
3160,
523,
484,
4341,
340,
37432,
428,
1573,
290,
13277,
14,
76,
735,
1854,
284,
3745,
511,
26883,
3716,
287,
2691,
40815,
290,
14,
273,
14216,
13,
201,
198,
29,
39462,
8537,
201,
198,
15439,
352,
25,
1869,
11,
3360,
852,
12238,
621,
2811,
22523,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
201,
198,
201,
198,
6259,
352,
25,
1374,
318,
428,
257,
705,
34,
3008,
30960,
201,
198,
201,
198,
15642,
585,
13278,
25,
367,
12236,
11,
19271,
582,
1616,
13,
201,
198,
201,
198,
6259,
352,
25,
770,
318,
22066,
11,
2000,
534,
3303,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
7069,
582,
1616,
13,
201,
198,
201,
198,
818,
2656,
6770,
11,
705,
34,
3008,
6,
1724,
2130,
508,
318,
4441,
281,
10590,
9366,
286,
257,
517,
14871,
4901,
284,
1730,
351,
257,
11859,
3872,
13,
201,
198,
201,
198,
4864,
11,
340,
714,
3538,
307,
973,
290,
40882,
515,
416,
2691,
24727,
11,
6678,
88,
422,
39462,
393,
604,
48407,
11,
287,
281,
2230,
284,
13878,
42935,
11,
38098,
11,
825,
321,
4559,
290,
27899,
11,
6678,
88,
883,
661,
423,
29215,
3160,
523,
484,
4341,
340,
37432,
428,
1573,
290,
13277,
14,
76,
735,
1854,
284,
3745,
511,
26883,
3716,
287,
2691,
40815,
290,
14,
273,
14216,
13,
201,
198,
29,
39462,
8537,
201,
198,
15439,
352,
25,
1869,
11,
3360,
852,
12238,
621,
2811,
22523,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
201,
198,
201,
198,
6259,
352,
25,
1374,
318,
428,
257,
705,
34,
3008,
30960,
201,
198,
201,
198,
15642,
585,
13278,
25,
367,
12236,
11,
19271,
582,
1616,
13,
201,
198,
201,
198,
6259,
352,
25,
770,
318,
22066,
11,
2000,
534,
3303,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
7069,
582,
1616,
13,
818,
2656,
6770,
11,
705,
34,
3008,
6,
1724,
2130,
508,
318,
4441,
281,
10590,
9366,
286,
257,
517,
14871,
4901,
284,
1730,
351,
257,
11859,
3872,
13,
201,
198,
201,
198,
4864,
11,
340,
714,
3538,
307,
973,
290,
40882,
515,
416,
2691,
24727,
11,
6678,
88,
422,
39462,
393,
604,
48407,
11,
287,
281,
2230,
284,
13878,
42935,
11,
38098,
11,
825,
321,
4559,
290,
27899,
11,
6678,
88,
883,
661,
423,
29215,
3160,
523,
484,
4341,
340,
37432,
428,
1573,
290,
13277,
14,
76,
735,
1854,
284,
3745,
511,
26883,
3716,
287,
2691,
40815,
290,
14,
273,
14216,
13,
201,
198,
29,
39462,
8537,
201,
198,
15439,
352,
25,
1869,
11,
3360,
852,
12238,
621,
2811,
22523,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
201,
198,
201,
198,
6259,
352,
25,
1374,
318,
428,
257,
705,
34,
3008,
30960,
201,
198,
201,
198,
15642,
585,
13278,
25,
367,
12236,
11,
19271,
582,
1616,
13,
201,
198,
201,
198,
6259,
352,
25,
770,
318,
22066,
11,
2000,
534,
3303,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
7069,
582,
1616,
13,
201,
198,
201,
198,
818,
2656,
6770,
11,
705,
34,
3008,
6,
1724,
2130,
508,
318,
4441,
281,
10590,
9366,
286,
257,
517,
14871,
4901,
284,
1730,
351,
257,
11859,
3872,
13,
201,
198,
201,
198,
4864,
11,
340,
714,
3538,
307,
973,
290,
40882,
515,
416,
2691,
24727,
11,
6678,
88,
422,
39462,
393,
604,
48407,
11,
287,
281,
2230,
284,
13878,
42935,
11,
38098,
11,
825,
321,
4559,
290,
27899,
11,
6678,
88,
883,
661,
423,
29215,
3160,
523,
484,
4341,
340,
37432,
428,
1573,
290,
13277,
14,
76,
735,
1854,
284,
3745,
511,
26883,
3716,
287,
2691,
40815,
290,
14,
273,
14216,
13,
201,
198,
29,
39462,
8537,
201,
198,
15439,
352,
25,
1869,
11,
3360,
852,
12238,
621,
2811,
22523,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
201,
198,
201,
198,
6259,
352,
25,
1374,
318,
428,
257,
705,
34,
3008,
30960,
201,
198,
201,
198,
15642,
585,
13278,
25,
367,
12236,
11,
19271,
582,
1616,
13,
201,
198,
201,
198,
6259,
352,
25,
770,
318,
22066,
11,
2000,
534,
3303,
13,
201,
198,
201,
198,
15642,
585,
13278,
25,
327,
3008,
7069,
582,
1616,
13,
201,
198,
201,
198,
818,
2656,
6770,
11,
705,
34,
3008,
6,
1724,
2130,
508,
318,
4441,
281,
10590,
9366,
286,
257,
517,
14871,
4901,
284,
1730,
351,
257,
11859,
3872,
13,
201,
198,
201,
198,
4864,
11,
340,
714,
3538,
307,
973,
290,
40882,
515,
416,
2691,
24727,
11,
6678,
88,
422,
39462,
393,
604,
48407,
11,
287,
281,
2230,
284
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
REPORT zabap_test_0021 NO STANDARD PAGE HEADING.
DATA: gv_c TYPE c.
IF NOT gv_c IS INITIAL.
WRITE 'initial' ##NO_TEXT.
ELSE.
WRITE 'not' ##NO_TEXT.
ENDIF.
| [
2200,
15490,
1976,
397,
499,
62,
9288,
62,
405,
2481,
8005,
49053,
9795,
48488,
39837,
2751,
13,
198,
198,
26947,
25,
308,
85,
62,
66,
41876,
269,
13,
198,
198,
5064,
5626,
308,
85,
62,
66,
3180,
3268,
2043,
12576,
13,
198,
220,
44423,
705,
36733,
6,
22492,
15285,
62,
32541,
13,
198,
3698,
5188,
13,
198,
220,
44423,
705,
1662,
6,
22492,
15285,
62,
32541,
13,
198,
10619,
5064,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_flifm_gui_fsv_alv_tree DEFINITION
PUBLIC
INHERITING FROM zcl_flifm_gui
CREATE PUBLIC .
PUBLIC SECTION.
METHODS zif_flifm_gui~render
REDEFINITION .
PROTECTED SECTION.
PRIVATE SECTION.
CLASS-DATA mo_fsv_alv_tree TYPE REF TO zcl_flifm_gui_fsv_alv_tree .
DATA mt_list_commentary TYPE slis_t_listheader .
METHODS _initialize_alv_tree
RAISING
zcx_flifm_exception .
METHODS _build_alv_tree_header
RETURNING
VALUE(rs_alv_tree_header) TYPE treev_hhdr .
METHODS _build_alv_tree_excluding
RETURNING
VALUE(rt_excluding) TYPE ui_functions .
METHODS _build_alv_tree_comment .
METHODS _create_alv_tree
RAISING
zcx_flifm_exception .
METHODS _create_fieldcat
RETURNING
VALUE(rt_fcat) TYPE lvc_t_fcat
RAISING
zcx_flifm_exception .
METHODS _change_toolbar .
METHODS _add_button
IMPORTING
!io_toolbar TYPE REF TO cl_gui_toolbar
!iv_fcode TYPE ui_func
!iv_icon TYPE c
!iv_text TYPE text40 OPTIONAL
!iv_type TYPE tb_btype
VALUE(iv_quickinfo) TYPE iconquick OPTIONAL .
METHODS _register_events .
METHODS _update_tree
IMPORTING
!it_exp TYPE lvc_t_nkey .
METHODS _call_account_balance
IMPORTING
!iv_gjahr TYPE gjahr
!is_data TYPE any .
METHODS _on_tree_function_selected
FOR EVENT function_selected OF cl_gui_toolbar
IMPORTING
!fcode .
METHODS _on_tree_node_double_click
FOR EVENT node_double_click OF cl_gui_alv_tree
IMPORTING
!node_key
!sender .
METHODS _on_tree_item_double_click
FOR EVENT item_double_click OF cl_gui_alv_tree
IMPORTING
!fieldname
!node_key .
ENDCLASS.
CLASS ZCL_FLIFM_GUI_FSV_ALV_TREE IMPLEMENTATION.
METHOD zif_flifm_gui~render.
DATA: lt_exp TYPE lvc_t_nkey.
zif_flifm_gui~clean_up( ).
CLEAR ms_route_data.
ms_route_data-menu = iv_menu.
ms_route_data-company = iv_company.
ms_route_data-action = iv_action.
IF mo_process IS BOUND.
CLEAR mo_process.
ENDIF.
mo_process = zcl_flifm_process_factory=>create( iv_menu = ms_route_data-menu
iv_company = ms_route_data-company
iv_action = ms_route_data-action ).
mo_process->build_data( ).
_initialize_alv_tree( ).
lt_exp = mo_process->build_tree( mo_alv_tree ).
_change_toolbar( ).
_register_events( ).
_update_tree( lt_exp ).
ENDMETHOD.
METHOD _add_button.
IF iv_quickinfo IS INITIAL.
iv_quickinfo = iv_text.
ENDIF.
io_toolbar->add_button( fcode = iv_fcode
icon = iv_icon
butn_type = iv_type
text = iv_text
quickinfo = iv_quickinfo ).
ENDMETHOD.
METHOD _build_alv_tree_comment.
DATA: ls_line TYPE slis_listheader.
CLEAR: ls_line, mt_list_commentary.
ls_line-typ = 'S'.
ls_line-info = 'IFM'. "#EC NOTEXT
APPEND ls_line TO mt_list_commentary.
ENDMETHOD.
METHOD _build_alv_tree_excluding.
FIELD-SYMBOLS: <ls_excluding> LIKE LINE OF rt_excluding.
APPEND INITIAL LINE TO rt_excluding ASSIGNING <ls_excluding>.
<ls_excluding> = mo_alv_tree->mc_fc_calculate.
ENDMETHOD.
METHOD _build_alv_tree_header.
rs_alv_tree_header-heading = zcl_flifm_i18n=>get_instance( )->item_account.
rs_alv_tree_header-tooltip = zcl_flifm_i18n=>get_instance( )->item_account.
rs_alv_tree_header-width = 60.
rs_alv_tree_header-width_pix = space.
ENDMETHOD.
METHOD _call_account_balance.
DATA: lt_company TYPE zcl_flifm_fetch=>tyt_company,
ls_company LIKE LINE OF lt_company,
lt_waers TYPE TABLE OF waers WITH DEFAULT KEY,
ls_waers LIKE LINE OF lt_waers.
DATA: ls_sender TYPE rstirec, " Sender report
ls_receiver TYPE rstirec, " Receiver report
lt_sel TYPE STANDARD TABLE OF rstisel WITH DEFAULT KEY, " Selection values
ls_sel LIKE LINE OF lt_sel,
lt_fields TYPE STANDARD TABLE OF rstifields WITH DEFAULT KEY, " Selection fields
ls_fields LIKE LINE OF lt_fields.
FIELD-SYMBOLS: <lv_hkont> TYPE any.
*// Define: Selection fields values
DEFINE _define_field.
ls_sel-field = &1.
ls_sel-sign = 'I'.
ls_sel-option = 'EQ'.
ls_sel-low = &2.
APPEND ls_sel TO lt_sel.
END-OF-DEFINITION.
ASSIGN COMPONENT 'HKONT' OF STRUCTURE is_data TO <lv_hkont>.
CHECK <lv_hkont> IS NOT INITIAL.
IF ms_route_data-company IS NOT INITIAL.
_define_field 'RBUKRS' ms_route_data-company.
ELSE.
" If the currency of the company code is the same, the inquiry is possible.
lt_company = mo_fetch->get_company( ).
LOOP AT lt_company INTO ls_company.
_define_field 'RBUKRS' ls_company-bukrs.
ls_waers = ls_company-waers.
COLLECT ls_waers INTO lt_waers.
ENDLOOP.
IF lines( lt_waers ) > 1.
MESSAGE s022(fagl_account_balance) DISPLAY LIKE 'E'.
RETURN.
ENDIF.
ENDIF.
CLEAR ls_sender. " This report is sender
ls_sender-rtool = 'RT'.
ls_sender-rappl = space.
ls_sender-rsubc = space.
ls_sender-ronam = sy-repid.
"Receiver (from S_ALR_87013019 définition)
CLEAR ls_receiver. " Define receiver (recherche); RONAM syntax depends on RTOOL/RAPPL
ls_receiver-rtool = 'RT'.
ls_receiver-ronam = 'FAGL_ACCOUNT_BALANCE'.
CLEAR: ls_fields.
ls_fields-field = 'RLDNR'.
ls_fields-rollname = 'FAGL_RLDNR'.
ls_fields-domname = 'RLDNR'.
ls_fields-memoryid = 'GLN_FLEX'.
APPEND ls_fields TO lt_fields.
CLEAR ls_fields.
ls_fields-field = 'RYEAR'.
ls_fields-rollname = 'GJAHR'.
ls_fields-domname = 'GJAHR'.
ls_fields-memoryid = 'GJR'.
APPEND ls_fields TO lt_fields.
CLEAR ls_fields.
ls_fields-field = 'RACCT'.
ls_fields-rollname = 'RACCT'.
ls_fields-domname = 'SAKNR'.
ls_fields-memoryid = 'ACC'.
APPEND ls_fields TO lt_fields.
CLEAR ls_fields.
ls_fields-field = 'RBUKRS'.
ls_fields-rollname = 'BUKRS'.
ls_fields-domname = 'BUKRS'.
ls_fields-memoryid = 'BUK'.
APPEND ls_fields TO lt_fields.
CLEAR ls_fields.
ls_fields-field = 'RBUSA'.
ls_fields-rollname = 'GSBER'.
ls_fields-domname = 'GSBER'.
ls_fields-memoryid = 'GSB'.
APPEND ls_fields TO lt_fields.
"FKBER
CLEAR ls_fields.
ls_fields-field = 'RFAREA'.
ls_fields-rollname = 'FKBER'.
ls_fields-domname = 'FKBER'.
ls_fields-memoryid = 'FBE'.
APPEND ls_fields TO lt_fields.
CLEAR ls_sel.
_define_field 'RLDNR' '0L'.
_define_field 'RYEAR' iv_gjahr.
_define_field 'RACCT' <lv_hkont>.
CALL FUNCTION 'RSTI_APPL_STACK_INITIALIZE'
EXPORTING
e_tool = ls_receiver-rtool
e_onam = ls_receiver-ronam.
CALL FUNCTION 'RSTI_SELECTION_EXPORT'
TABLES
it_sel = lt_sel
it_fields = lt_fields.
SUBMIT fagl_account_balance AND RETURN.
ENDMETHOD.
METHOD _change_toolbar.
DATA: lo_toolbar TYPE REF TO cl_gui_toolbar.
CALL METHOD mo_alv_tree->get_toolbar_object
IMPORTING
er_toolbar = lo_toolbar.
CHECK NOT lo_toolbar IS INITIAL.
"Add standard button to toolbar(for Expand tree)
_add_button( io_toolbar = : lo_toolbar
iv_fcode = ''
iv_icon = ''
iv_type = cntb_btype_sep ),
lo_toolbar
iv_fcode = zif_flifm_definitions=>c_action-expd_all
iv_icon = icon_expand_all
iv_type = cntb_btype_button
iv_text = |{ zcl_flifm_i18n=>get_instance( )->expand_all }| ),
lo_toolbar
iv_fcode = zif_flifm_definitions=>c_action-cole_all
iv_icon = icon_collapse_all
iv_type = cntb_btype_button
iv_text = |{ zcl_flifm_i18n=>get_instance( )->collapse_all }| ),
lo_toolbar
iv_fcode = ''
iv_icon = ''
iv_type = cntb_btype_sep ),
lo_toolbar
iv_fcode = zif_flifm_definitions=>c_action-fsv_list_popup
iv_icon = icon_list
iv_type = cntb_btype_button
iv_text = |{ zcl_flifm_i18n=>get_instance( )->fsv_popup }| ),
lo_toolbar
iv_fcode = zif_flifm_definitions=>c_action-fsv_download_excel
iv_icon = icon_export
iv_type = cntb_btype_button
iv_text = |{ zcl_flifm_i18n=>get_instance( )->fsv_excel }| ).
SET HANDLER _on_tree_function_selected FOR lo_toolbar.
ENDMETHOD.
METHOD _create_alv_tree.
*// Create tree control
CREATE OBJECT mo_alv_tree
EXPORTING
parent = mo_splitter_right->get_container( row = 1 column = 1 )
node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
item_selection = 'X'
no_html_header = 'X' "Delete Header
no_toolbar = ' '
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
IF sy-subrc <> 0.
zcx_flifm_exception=>raise_sy_msg( ).
ENDIF.
ENDMETHOD.
METHOD _create_fieldcat.
DATA: lt_dd03t TYPE zcl_flifm_fetch=>tyt_dd03t,
ls_dd03t LIKE LINE OF lt_dd03t.
FIELD-SYMBOLS: <ls_fieldcat> TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_bypassing_buffer = 'X'
i_structure_name = mo_process->gv_strname
CHANGING
ct_fieldcat = rt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
zcx_flifm_exception=>raise_t100( iv_msgno = 001
iv_msgv1 = 'LVC_FIELDCATALOG_MERGE'
iv_msgv2 = |{ sy-subrc }| ).
ENDIF.
lt_dd03t = mo_fetch->get_dd03t( ).
LOOP AT rt_fcat ASSIGNING <ls_fieldcat>.
IF <ls_fieldcat>-fieldname CP 'AMT*'.
<ls_fieldcat>-just = 'R'.
IF <ls_fieldcat>-fieldname+3(2) > zcl_flifm_selection=>get_to_period( ).
<ls_fieldcat>-no_out = abap_true.
ENDIF.
ENDIF.
READ TABLE lt_dd03t INTO ls_dd03t
WITH KEY tabname = mo_process->gv_strname
fieldname = <ls_fieldcat>-fieldname
BINARY SEARCH.
IF sy-subrc = 0.
<ls_fieldcat>-coltext = ls_dd03t-ddtext.
<ls_fieldcat>-just = 'R'.
ENDIF.
IF zcl_flifm_utils=>split_menu( ms_route_data-menu ) = zif_flifm_definitions=>c_flifm_menu_type-bs
AND <ls_fieldcat>-fieldname = 'AMT00'.
<ls_fieldcat>-coltext = zcl_flifm_i18n=>get_instance( )->balance_cf.
ELSEIF zcl_flifm_utils=>split_menu( ms_route_data-menu ) = zif_flifm_definitions=>c_flifm_menu_type-pl
AND <ls_fieldcat>-fieldname = 'AMT00'.
<ls_fieldcat>-coltext = zcl_flifm_i18n=>get_instance( )->ytd.
ENDIF.
ENDLOOP.
APPEND INITIAL LINE TO rt_fcat ASSIGNING <ls_fieldcat>.
<ls_fieldcat>-fieldname = 'NAME'.
<ls_fieldcat>-coltext = |Name|.
<ls_fieldcat>-no_out = abap_true.
APPEND INITIAL LINE TO rt_fcat ASSIGNING <ls_fieldcat>.
<ls_fieldcat>-fieldname = 'HKONT'.
<ls_fieldcat>-ref_table = 'SKA1'.
<ls_fieldcat>-ref_field = 'SAKNR'.
<ls_fieldcat>-no_out = abap_true.
APPEND INITIAL LINE TO rt_fcat ASSIGNING <ls_fieldcat>.
<ls_fieldcat>-fieldname = 'TXT50'.
<ls_fieldcat>-ref_table = 'SKAT'.
<ls_fieldcat>-ref_field = 'TXT50'.
<ls_fieldcat>-outputlen = 20.
<ls_fieldcat>-col_pos = '0'.
<ls_fieldcat>-no_out = abap_true.
APPEND INITIAL LINE TO rt_fcat ASSIGNING <ls_fieldcat>.
<ls_fieldcat>-fieldname = 'WAERS'.
<ls_fieldcat>-ref_table = 'T001'.
<ls_fieldcat>-ref_field = 'WAERS'.
<ls_fieldcat>-no_out = abap_true.
ENDMETHOD.
METHOD _initialize_alv_tree.
DATA: lt_fcat TYPE lvc_t_fcat.
DATA: ls_disvariant TYPE disvariant.
DATA: ls_alv_tree_header TYPE treev_hhdr.
DATA: lt_excluding TYPE ui_functions.
FIELD-SYMBOLS : <lt_outtab> TYPE STANDARD TABLE.
_create_alv_tree( ).
ls_alv_tree_header = _build_alv_tree_header( ).
lt_excluding = _build_alv_tree_excluding( ).
ASSIGN mo_process->gr_data_display->* TO <lt_outtab>.
lt_fcat = _create_fieldcat( ).
ls_disvariant-report = sy-repid.
ls_disvariant-handle = 'IFM'.
ls_disvariant-username = sy-uname.
mo_alv_tree->set_table_for_first_display(
EXPORTING
is_variant = ls_disvariant
is_hierarchy_header = ls_alv_tree_header
i_save = 'A'
it_toolbar_excluding = lt_excluding
CHANGING
it_outtab = <lt_outtab> "must be empty table
it_fieldcatalog = lt_fcat ).
ENDMETHOD.
METHOD _on_tree_function_selected.
DATA lx_exception TYPE REF TO zcx_flifm_exception.
DATA lt_expd_keys TYPE lvc_t_nkey.
FIELD-SYMBOLS: <lt_data> TYPE STANDARD TABLE.
TRY.
CASE fcode.
WHEN zif_flifm_definitions=>c_action-expd_all.
DATA: lv_node_key TYPE tv_nodekey.
DATA: lt_children TYPE lvc_t_nkey.
lv_node_key = 1.
mo_alv_tree->get_children( EXPORTING i_node_key = lv_node_key
IMPORTING et_children = lt_children ).
CHECK lt_children IS NOT INITIAL.
mo_alv_tree->expand_node( i_node_key = lv_node_key
i_expand_subtree = 'X' ).
mo_alv_tree->column_optimize( i_start_column = '&Hierarchy' ).
WHEN zif_flifm_definitions=>c_action-cole_all.
mo_alv_tree->collapse_all_nodes( ).
WHEN zif_flifm_definitions=>c_action-fsv_list_popup.
CALL METHOD mo_alv_tree->get_expanded_nodes
CHANGING
ct_expanded_nodes = lt_expd_keys.
ASSIGN mo_process->gr_popup_data->* TO <lt_data>.
CHECK <lt_data> IS ASSIGNED.
zcl_flifm_popups=>get_instance( )->show_fsv_list_popup(
EXPORTING iv_menu = ms_route_data-menu
it_nkey = lt_expd_keys
it_popup_table = <lt_data> ).
WHEN zif_flifm_definitions=>c_action-fsv_download_excel.
CALL METHOD mo_alv_tree->get_expanded_nodes
CHANGING
ct_expanded_nodes = lt_expd_keys.
ASSIGN mo_process->gr_popup_data->* TO <lt_data>.
CHECK <lt_data> IS ASSIGNED.
DATA li_flifm_excel TYPE REF TO zif_flifm_excel.
DATA lv_object TYPE seoclsname VALUE 'ZCL_EXCEL'.
SELECT SINGLE COUNT( * )
FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'CLAS'
AND obj_name = lv_object.
IF sy-subrc <> 0.
lv_object = 'ZCL_FLIFM_EXCEL'.
ELSE.
lv_object = 'ZCL_FLIFM_ABAP2XLSX'.
ENDIF.
* CREATE OBJECT li_flifm_excel TYPE zcl_flifm_excel.
CREATE OBJECT li_flifm_excel TYPE (lv_object).
li_flifm_excel->download_fsv_list_excel(
EXPORTING
iv_menu = ms_route_data-menu
it_nkey = lt_expd_keys
it_popup_table = <lt_data> ).
ENDCASE.
CATCH zcx_flifm_exception INTO lx_exception.
MESSAGE lx_exception TYPE 'S' DISPLAY LIKE 'E'.
ENDTRY.
ENDMETHOD.
METHOD _on_tree_item_double_click.
DATA: lt_t030 TYPE zif_flifm_definitions=>tyt_t030.
DATA: lv_gjahr TYPE gjahr.
FIELD-SYMBOLS : <lt_display> TYPE STANDARD TABLE,
<ls_display> TYPE any,
<lv_name> TYPE any.
lt_t030 = zcl_flifm_fetch=>get_instance( )->get_t030( ).
ASSIGN mo_process->gr_data_display->* TO <lt_display>.
READ TABLE <lt_display> ASSIGNING <ls_display> INDEX node_key.
ASSIGN COMPONENT 'NAME' OF STRUCTURE <ls_display> TO <lv_name>.
CASE <lv_name>.
WHEN zif_flifm_definitions=>c_add_line_type-np_tot OR
zif_flifm_definitions=>c_add_line_type-np_tot_mc.
DATA: lv_komok TYPE komok,
lv_konts TYPE saknr.
FIELD-SYMBOLS: <lv_text> TYPE any.
ASSIGN COMPONENT 'TEXT' OF STRUCTURE <ls_display> TO <lv_text>.
SPLIT <lv_text> AT space INTO: lv_komok lv_konts.
IF lv_komok IS INITIAL.
MESSAGE s013.
RETURN.
ELSE.
READ TABLE lt_t030 TRANSPORTING NO FIELDS WITH KEY komok = lv_komok.
IF sy-subrc <> 0.
MESSAGE s013.
RETURN.
ENDIF.
ENDIF.
IF <lv_name> = zif_flifm_definitions=>c_add_line_type-np_tot.
ASSIGN mo_process->gr_popup_data_np->* TO <lt_display>.
ELSE.
ASSIGN mo_process->gr_popup_data_np_ytd->* TO <lt_display>.
ENDIF.
IF zcl_flifm_utils=>split_menu( ms_route_data-menu ) = zif_flifm_definitions=>c_flifm_menu_type-bs AND fieldname = 'AMT00'.
IF ms_route_data-menu = zif_flifm_definitions=>c_flifm_menu_type-bs_ry_trend.
lv_gjahr = zcl_flifm_selection=>get_gjahr( ).
ELSE.
lv_gjahr = zcl_flifm_selection=>get_cmp_gjahr( ).
ENDIF.
_call_account_balance( iv_gjahr = lv_gjahr
is_data = <ls_display> ).
ELSE.
zcl_flifm_popups=>get_instance( )->show_net_profit_list_popup( EXPORTING
iv_menu = ms_route_data-menu
iv_name = <lv_name>
iv_fieldname = fieldname
iv_komok = lv_komok
it_popup_table = <lt_display> ).
ENDIF.
WHEN OTHERS.
IF ms_route_data-menu = zif_flifm_definitions=>c_flifm_menu_type-pl_cy_trend OR
ms_route_data-menu = zif_flifm_definitions=>c_flifm_menu_type-bs_cy_trend OR
fieldname = 'CYSPAMT' OR fieldname = 'TCYAMT'.
lv_gjahr = zcl_flifm_selection=>get_cmp_gjahr( ).
ELSE.
lv_gjahr = zcl_flifm_selection=>get_gjahr( ).
ENDIF.
_call_account_balance( iv_gjahr = lv_gjahr
is_data = <ls_display> ).
ENDCASE.
ENDMETHOD.
METHOD _on_tree_node_double_click.
DATA: lt_children TYPE lvc_t_nkey.
*// First check if the node is a leaf, i.e. can not be expanded
CALL METHOD sender->get_children
EXPORTING
i_node_key = node_key
IMPORTING
et_children = lt_children.
IF NOT lt_children IS INITIAL.
CALL METHOD sender->expand_node
EXPORTING
i_node_key = node_key
i_level_count = 2.
ENDIF.
ENDMETHOD.
METHOD _register_events.
DATA: lt_event TYPE cntl_simple_events,
ls_event TYPE cntl_simple_event.
*// Register additional events for your own purposes:
CALL METHOD mo_alv_tree->get_registered_events
IMPORTING
events = lt_event.
ls_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
APPEND ls_event TO lt_event.
CLEAR ls_event.
ls_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
ls_event-appl_event = ' '.
APPEND ls_event TO lt_event.
ls_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
APPEND ls_event TO lt_event.
*// Register event
CALL METHOD mo_alv_tree->set_registered_events
EXPORTING
events = lt_event
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
*// assign event handlers in the application class to each desired event
SET HANDLER _on_tree_node_double_click FOR mo_alv_tree.
SET HANDLER _on_tree_item_double_click FOR mo_alv_tree.
ENDMETHOD.
METHOD _update_tree.
CALL METHOD mo_alv_tree->frontend_update.
CALL METHOD mo_alv_tree->expand_nodes
EXPORTING
it_node_key = it_exp
EXCEPTIONS
failed = 1
cntl_system_error = 2
error_in_node_key_table = 3
dp_error = 4
node_not_found = 5
OTHERS = 6.
CALL METHOD mo_alv_tree->column_optimize
EXPORTING
i_start_column = '&Hierarchy'.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
2704,
361,
76,
62,
48317,
62,
9501,
85,
62,
282,
85,
62,
21048,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
2704,
361,
76,
62,
48317,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
2704,
361,
76,
62,
48317,
93,
13287,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42715,
12,
26947,
6941,
62,
9501,
85,
62,
282,
85,
62,
21048,
41876,
4526,
37,
5390,
1976,
565,
62,
2704,
361,
76,
62,
48317,
62,
9501,
85,
62,
282,
85,
62,
21048,
764,
198,
220,
220,
220,
42865,
45079,
62,
4868,
62,
23893,
560,
41876,
1017,
271,
62,
83,
62,
4868,
25677,
764,
628,
220,
220,
220,
337,
36252,
50,
4808,
36733,
1096,
62,
282,
85,
62,
21048,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
2704,
361,
76,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
11249,
62,
282,
85,
62,
21048,
62,
25677,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
282,
85,
62,
21048,
62,
25677,
8,
41876,
5509,
85,
62,
12337,
7109,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
11249,
62,
282,
85,
62,
21048,
62,
42218,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
42218,
8,
41876,
334,
72,
62,
12543,
2733,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
11249,
62,
282,
85,
62,
21048,
62,
23893,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
17953,
62,
282,
85,
62,
21048,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
2704,
361,
76,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
17953,
62,
3245,
9246,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
69,
9246,
8,
41876,
300,
28435,
62,
83,
62,
69,
9246,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
2704,
361,
76,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
3803,
62,
25981,
5657,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
2860,
62,
16539,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
25981,
5657,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
25981,
5657,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
69,
8189,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
334,
72,
62,
20786,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
4749,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
269,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
5239,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
2420,
1821,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
256,
65,
62,
65,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
24209,
10951,
8,
41876,
7196,
24209,
39852,
2849,
1847,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
30238,
62,
31534,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
19119,
62,
21048,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
11201,
41876,
300,
28435,
62,
83,
62,
77,
2539,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
13345,
62,
23317,
62,
20427,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
70,
31558,
81,
41876,
308,
31558,
81,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
7890,
220,
41876,
597,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
261,
62,
21048,
62,
8818,
62,
34213,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
49261,
2163,
62,
34213,
3963,
537,
62,
48317,
62,
25981,
5657,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
69,
8189,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
261,
62,
21048,
62,
17440,
62,
23352,
62,
12976,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
49261,
10139,
62,
23352,
62,
12976,
3963,
537,
62,
48317,
62,
282,
85,
62,
21048,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
17440,
62,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
82,
2194,
764,
198,
220,
220,
220,
337,
36252,
50,
4808,
261,
62,
21048,
62,
9186,
62,
23352,
62,
12976,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
49261,
2378,
62,
23352,
62,
12976,
3963,
537,
62,
48317,
62,
282,
85,
62,
21048,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
3245,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
17440,
62,
2539,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
3697,
5064,
44,
62,
40156,
62,
10652,
53,
62,
1847,
53,
62,
51,
11587,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
2704,
361,
76,
62,
48317,
93,
13287,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
11201,
41876,
300,
28435,
62,
83,
62,
77,
2539,
13,
628,
220,
220,
220,
1976,
361,
62,
2704
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ycl_abapgit_object_dtel DEFINITION PUBLIC INHERITING FROM ycl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES yif_abapgit_object.
ALIASES mo_files FOR yif_abapgit_object~mo_files.
PRIVATE SECTION.
TYPES: BEGIN OF ty_dd04_texts,
ddlanguage TYPE dd04t-ddlanguage,
ddtext TYPE dd04t-ddtext,
reptext TYPE dd04t-reptext,
scrtext_s TYPE dd04t-scrtext_s,
scrtext_m TYPE dd04t-scrtext_m,
scrtext_l TYPE dd04t-scrtext_l,
END OF ty_dd04_texts,
tt_dd04_texts TYPE STANDARD TABLE OF ty_dd04_texts.
CONSTANTS: c_longtext_id_dtel TYPE dokil-id VALUE 'DE'.
METHODS:
serialize_texts
IMPORTING io_xml TYPE REF TO ycl_abapgit_xml_output
RAISING ycx_abapgit_exception,
deserialize_texts
IMPORTING io_xml TYPE REF TO ycl_abapgit_xml_input
is_dd04v TYPE dd04v
RAISING ycx_abapgit_exception.
ENDCLASS.
CLASS ycl_abapgit_object_dtel IMPLEMENTATION.
METHOD deserialize_texts.
DATA: lv_name TYPE ddobjname,
ls_dd04v_tmp TYPE dd04v,
lt_i18n_langs TYPE TABLE OF langu,
lt_dd04_texts TYPE tt_dd04_texts.
FIELD-SYMBOLS: <lv_lang> LIKE LINE OF lt_i18n_langs,
<ls_dd04_text> TYPE ty_dd04_texts.
lv_name = ms_item-obj_name.
io_xml->read( EXPORTING iv_name = 'I18N_LANGS'
CHANGING cg_data = lt_i18n_langs ).
io_xml->read( EXPORTING iv_name = 'DD04_TEXTS'
CHANGING cg_data = lt_dd04_texts ).
SORT lt_i18n_langs.
SORT lt_dd04_texts BY ddlanguage. " Optimization
LOOP AT lt_i18n_langs ASSIGNING <lv_lang>.
" Data element description
ls_dd04v_tmp = is_dd04v.
READ TABLE lt_dd04_texts ASSIGNING <ls_dd04_text> WITH KEY ddlanguage = <lv_lang>.
IF sy-subrc > 0.
ycx_abapgit_exception=>raise( |DD04_TEXTS cannot find lang { <lv_lang> } in XML| ).
ENDIF.
MOVE-CORRESPONDING <ls_dd04_text> TO ls_dd04v_tmp.
CALL FUNCTION 'DDIF_DTEL_PUT'
EXPORTING
name = lv_name
dd04v_wa = ls_dd04v_tmp
EXCEPTIONS
dtel_not_found = 1
name_inconsistent = 2
dtel_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'error from DDIF_DTEL_PUT @TEXTS' ).
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD serialize_texts.
DATA: lv_name TYPE ddobjname,
lv_index TYPE i,
ls_dd04v TYPE dd04v,
lt_dd04_texts TYPE tt_dd04_texts,
lt_i18n_langs TYPE TABLE OF langu.
FIELD-SYMBOLS: <lv_lang> LIKE LINE OF lt_i18n_langs,
<ls_dd04_text> TYPE ty_dd04_texts.
lv_name = ms_item-obj_name.
" Collect additional languages, skip master lang - it was serialized already
SELECT DISTINCT ddlanguage AS langu INTO TABLE lt_i18n_langs
FROM dd04v
WHERE rollname = lv_name
AND ddlanguage <> mv_language. "#EC CI_SUBRC
LOOP AT lt_i18n_langs ASSIGNING <lv_lang>.
lv_index = sy-tabix.
CALL FUNCTION 'DDIF_DTEL_GET'
EXPORTING
name = lv_name
langu = <lv_lang>
IMPORTING
dd04v_wa = ls_dd04v
EXCEPTIONS
illegal_input = 1
OTHERS = 2.
IF sy-subrc <> 0 OR ls_dd04v-ddlanguage IS INITIAL.
DELETE lt_i18n_langs INDEX lv_index. " Don't save this lang
CONTINUE.
ENDIF.
APPEND INITIAL LINE TO lt_dd04_texts ASSIGNING <ls_dd04_text>.
MOVE-CORRESPONDING ls_dd04v TO <ls_dd04_text>.
ENDLOOP.
SORT lt_i18n_langs ASCENDING.
SORT lt_dd04_texts BY ddlanguage ASCENDING.
IF lines( lt_i18n_langs ) > 0.
io_xml->add( iv_name = 'I18N_LANGS'
ig_data = lt_i18n_langs ).
io_xml->add( iv_name = 'DD04_TEXTS'
ig_data = lt_dd04_texts ).
ENDIF.
ENDMETHOD.
METHOD yif_abapgit_object~changed_by.
SELECT SINGLE as4user FROM dd04l INTO rv_user
WHERE rollname = ms_item-obj_name
AND as4local = 'A'
AND as4vers = '0000'.
IF sy-subrc <> 0.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD yif_abapgit_object~compare_to_remote_version.
CREATE OBJECT ro_comparison_result TYPE ycl_abapgit_comparison_null.
ENDMETHOD.
METHOD yif_abapgit_object~delete.
DATA: lv_objname TYPE rsedd0-ddobjname.
lv_objname = ms_item-obj_name.
CALL FUNCTION 'RS_DD_DELETE_OBJ'
EXPORTING
no_ask = abap_true
objname = lv_objname
objtype = 'E'
EXCEPTIONS
not_executed = 1
object_not_found = 2
object_not_specified = 3
permission_failure = 4.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'error from RS_DD_DELETE_OBJ, DTEL' ).
ENDIF.
delete_longtexts( c_longtext_id_dtel ).
ENDMETHOD.
METHOD yif_abapgit_object~deserialize.
DATA: ls_dd04v TYPE dd04v,
lv_name TYPE ddobjname,
ls_tpara TYPE tpara.
io_xml->read( EXPORTING iv_name = 'DD04V'
CHANGING cg_data = ls_dd04v ).
io_xml->read( EXPORTING iv_name = 'TPARA'
CHANGING cg_data = ls_tpara ).
corr_insert( iv_package ).
lv_name = ms_item-obj_name. " type conversion
CALL FUNCTION 'DDIF_DTEL_PUT'
EXPORTING
name = lv_name
dd04v_wa = ls_dd04v
EXCEPTIONS
dtel_not_found = 1
name_inconsistent = 2
dtel_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'error from DDIF_DTEL_PUT' ).
ENDIF.
deserialize_texts( io_xml = io_xml
is_dd04v = ls_dd04v ).
deserialize_longtexts( io_xml ).
ycl_abapgit_objects_activation=>add_item( ms_item ).
ENDMETHOD.
METHOD yif_abapgit_object~exists.
DATA: lv_rollname TYPE dd04l-rollname.
SELECT SINGLE rollname FROM dd04l INTO lv_rollname
WHERE rollname = ms_item-obj_name
AND as4local = 'A'
AND as4vers = '0000'.
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD yif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-ddic = abap_true.
ENDMETHOD.
METHOD yif_abapgit_object~has_changed_since.
DATA: lv_date TYPE dats,
lv_time TYPE tims.
SELECT SINGLE as4date as4time FROM dd04l
INTO (lv_date, lv_time)
WHERE rollname = ms_item-obj_name
AND as4local = 'A'
AND as4vers = '0000'.
rv_changed = check_timestamp(
iv_timestamp = iv_timestamp
iv_date = lv_date
iv_time = lv_time ).
ENDMETHOD.
METHOD yif_abapgit_object~jump.
jump_se11( iv_radio = 'RSRD1-DDTYPE'
iv_field = 'RSRD1-DDTYPE_VAL' ).
ENDMETHOD.
METHOD yif_abapgit_object~serialize.
* fm DDIF_DTEL_GET bypasses buffer, so SELECTs are
* done directly from here
DATA: lv_name TYPE ddobjname,
ls_dd04v TYPE dd04v,
ls_tpara TYPE tpara.
lv_name = ms_item-obj_name.
SELECT SINGLE * FROM dd04l
INTO CORRESPONDING FIELDS OF ls_dd04v
WHERE rollname = lv_name
AND as4local = 'A'
AND as4vers = '0000'.
IF sy-subrc <> 0 OR ls_dd04v IS INITIAL.
ycx_abapgit_exception=>raise( 'Not found in DD04L' ).
ENDIF.
SELECT SINGLE * FROM dd04t
INTO CORRESPONDING FIELDS OF ls_dd04v
WHERE rollname = lv_name
AND ddlanguage = mv_language
AND as4local = 'A'
AND as4vers = '0000'.
IF NOT ls_dd04v-memoryid IS INITIAL.
SELECT SINGLE tpara~paramid tparat~partext
FROM tpara LEFT JOIN tparat
ON tparat~paramid = tpara~paramid AND
tparat~sprache = mv_language
INTO ls_tpara
WHERE tpara~paramid = ls_dd04v-memoryid. "#EC CI_BUFFJOIN
ENDIF.
CLEAR: ls_dd04v-as4user,
ls_dd04v-as4date,
ls_dd04v-as4time.
IF ls_dd04v-refkind = 'D'.
* clear values inherited from domain
CLEAR: ls_dd04v-datatype,
ls_dd04v-leng,
ls_dd04v-decimals,
ls_dd04v-outputlen,
ls_dd04v-valexi,
ls_dd04v-lowercase,
ls_dd04v-signflag,
ls_dd04v-convexit,
ls_dd04v-entitytab.
ENDIF.
IF ls_dd04v-routputlen = ''.
* numeric field, make sure it is initial or XML serilization will dump
CLEAR ls_dd04v-routputlen.
ENDIF.
IF ls_dd04v-authclass = ''.
CLEAR ls_dd04v-authclass.
ENDIF.
io_xml->add( iv_name = 'DD04V'
ig_data = ls_dd04v ).
io_xml->add( iv_name = 'TPARA'
ig_data = ls_tpara ).
serialize_texts( io_xml ).
serialize_longtexts( io_xml = io_xml
iv_longtext_id = c_longtext_id_dtel ).
ENDMETHOD.
METHOD yif_abapgit_object~is_locked.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'ESDICT'
iv_argument = |{ ms_item-obj_type }{ ms_item-obj_name }| ).
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
565,
62,
397,
499,
18300,
62,
15252,
62,
28664,
417,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
331,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
331,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
331,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
1860,
3023,
62,
5239,
82,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49427,
16129,
41876,
49427,
3023,
83,
12,
1860,
16129,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49427,
5239,
220,
220,
220,
220,
41876,
49427,
3023,
83,
12,
1860,
5239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28761,
2302,
220,
220,
220,
41876,
49427,
3023,
83,
12,
260,
457,
2302,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6040,
5239,
62,
82,
220,
41876,
49427,
3023,
83,
12,
1416,
81,
5239,
62,
82,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6040,
5239,
62,
76,
220,
41876,
49427,
3023,
83,
12,
1416,
81,
5239,
62,
76,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6040,
5239,
62,
75,
220,
41876,
49427,
3023,
83,
12,
1416,
81,
5239,
62,
75,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
1860,
3023,
62,
5239,
82,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
1860,
3023,
62,
5239,
82,
41876,
49053,
9795,
43679,
3963,
1259,
62,
1860,
3023,
62,
5239,
82,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
269,
62,
6511,
5239,
62,
312,
62,
28664,
417,
41876,
466,
34553,
12,
312,
26173,
8924,
705,
7206,
4458,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
11389,
1096,
62,
5239,
82,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
33245,
62,
19875,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
19875,
62,
22915,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
748,
48499,
1096,
62,
5239,
82,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
33245,
62,
19875,
220,
220,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
19875,
62,
15414,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
1860,
3023,
85,
41876,
49427,
3023,
85,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
331,
565,
62,
397,
499,
18300,
62,
15252,
62,
28664,
417,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
748,
48499,
1096,
62,
5239,
82,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
3672,
220,
220,
220,
220,
220,
220,
41876,
49427,
26801,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
1860,
3023,
85,
62,
22065,
220,
41876,
49427,
3023,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
72,
1507,
77,
62,
17204,
82,
41876,
43679,
3963,
2786,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
1860,
3023,
62,
5239,
82,
41876,
256,
83,
62,
1860,
3023,
62,
5239,
82,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
6780,
62,
17204,
29,
220,
220,
220,
220,
220,
34178,
48920,
3963,
300,
83,
62,
72,
1507,
77,
62,
17204,
82,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
1860,
3023,
62,
5239,
29,
41876,
1259,
62,
1860,
3023,
62,
5239,
82,
13,
628,
198,
220,
220,
220,
300,
85,
62,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
40,
1507,
45,
62,
25697,
14313,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
7890,
796,
300,
83,
62,
72,
1507,
77,
62,
17204,
82,
6739,
628,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
3023,
62,
51,
6369,
4694,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
7890,
796,
300,
83,
62,
1860,
3023,
62,
5239,
82,
6739,
628,
220,
220,
220,
311,
9863,
300,
83,
62,
72,
1507,
77,
62,
17204,
82,
13,
198,
220,
220,
220,
311,
9863,
300,
83,
62,
1860,
3023,
62,
5239,
82,
11050,
49427,
16129,
13,
366,
30011,
1634,
628,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
72,
1507,
77,
62,
17204,
82,
24994,
3528,
15871,
1279,
6780,
62,
17204,
28401,
628,
220,
220,
220,
220,
220,
366,
6060,
5002,
6764,
198,
220,
220,
220,
220,
220,
43979,
62,
1860,
3023,
85,
62,
22065,
796,
318,
62,
1860,
3023,
85,
13,
198,
220,
220,
220,
220,
220,
20832,
43679,
300,
83,
62,
1860,
3023,
62,
5239,
82,
24994,
3528,
15871,
1279,
7278,
62,
1860,
3023,
62,
5239,
29,
13315,
35374,
49427,
16129,
796,
1279,
6780,
62,
17204,
28401,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1875,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
930,
16458
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_gtt_sts_factory DEFINITION
PUBLIC
ABSTRACT
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_gtt_sts_factory .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_GTT_STS_FACTORY IMPLEMENTATION.
METHOD zif_gtt_sts_factory~get_bo_reader.
RETURN.
ENDMETHOD.
METHOD zif_gtt_sts_factory~get_ef_parameters.
ro_ef_parameters = NEW zcl_gtt_sts_ef_parameters(
iv_appsys = iv_appsys
is_app_obj_types = is_app_obj_types
it_all_appl_tables = it_all_appl_tables
it_app_type_cntl_tabs = it_app_type_cntl_tabs
it_app_objects = it_app_objects ).
ENDMETHOD.
METHOD zif_gtt_sts_factory~get_ef_processor.
DATA:
lo_ef_parameters TYPE REF TO zif_gtt_sts_ef_parameters,
lo_bo_reader TYPE REF TO zif_gtt_sts_bo_reader,
lo_pe_filler TYPE REF TO zif_gtt_sts_pe_filler.
lo_ef_parameters = zif_gtt_sts_factory~get_ef_parameters(
iv_appsys = iv_appsys
is_app_obj_types = is_app_obj_types
it_all_appl_tables = it_all_appl_tables
it_app_type_cntl_tabs = it_app_type_cntl_tabs
it_app_objects = it_app_objects ).
ro_ef_processor = NEW zcl_gtt_sts_ef_processor(
io_ef_parameters = lo_ef_parameters
io_bo_reader = lo_bo_reader
io_pe_filler = lo_pe_filler
is_definition = is_definition ).
ENDMETHOD.
METHOD zif_gtt_sts_factory~get_pe_filler.
RETURN.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
70,
926,
62,
6448,
62,
69,
9548,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
9564,
18601,
10659,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
70,
926,
62,
6448,
62,
69,
9548,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
38,
15751,
62,
2257,
50,
62,
37,
10659,
15513,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
70,
926,
62,
6448,
62,
69,
9548,
93,
1136,
62,
2127,
62,
46862,
13,
198,
220,
220,
220,
30826,
27064,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
70,
926,
62,
6448,
62,
69,
9548,
93,
1136,
62,
891,
62,
17143,
7307,
13,
628,
220,
220,
220,
686,
62,
891,
62,
17143,
7307,
220,
796,
12682,
1976,
565,
62,
70,
926,
62,
6448,
62,
891,
62,
17143,
7307,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
1324,
17597,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
1324,
17597,
198,
220,
220,
220,
220,
220,
318,
62,
1324,
62,
26801,
62,
19199,
220,
220,
220,
220,
220,
796,
318,
62,
1324,
62,
26801,
62,
19199,
198,
220,
220,
220,
220,
220,
340,
62,
439,
62,
1324,
75,
62,
83,
2977,
220,
220,
220,
796,
340,
62,
439,
62,
1324,
75,
62,
83,
2977,
198,
220,
220,
220,
220,
220,
340,
62,
1324,
62,
4906,
62,
66,
429,
75,
62,
8658,
82,
796,
340,
62,
1324,
62,
4906,
62,
66,
429,
75,
62,
8658,
82,
198,
220,
220,
220,
220,
220,
340,
62,
1324,
62,
48205,
220,
220,
220,
220,
220,
220,
220,
796,
340,
62,
1324,
62,
48205,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
70,
926,
62,
6448,
62,
69,
9548,
93,
1136,
62,
891,
62,
41341,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
2376,
62,
891,
62,
17143,
7307,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
6448,
62,
891,
62,
17143,
7307,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
2127,
62,
46862,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
6448,
62,
2127,
62,
46862,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
431,
62,
69,
4665,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
6448,
62,
431,
62,
69,
4665,
13,
628,
220,
220,
220,
2376,
62,
891,
62,
17143,
7307,
796,
1976,
361,
62,
70,
926,
62,
6448,
62,
69,
9548,
93,
1136,
62,
891,
62,
17143,
7307,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1324,
17597,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
1324,
17597,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
1324,
62,
26801,
62,
19199,
220,
220,
220,
220,
220,
796,
318,
62,
1324,
62,
26801,
62,
19199,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
62,
439,
62,
1324,
75,
62,
83,
2977,
220,
220,
220,
796,
340,
62,
439,
62,
1324,
75,
62,
83,
2977,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
62,
1324,
62,
4906,
62,
66,
429,
75,
62,
8658,
82,
796,
340,
62,
1324,
62,
4906,
62,
66,
429,
75,
62,
8658,
82,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
62,
1324,
62,
48205,
220,
220,
220,
220,
220,
220,
220,
796,
340,
62,
1324,
62,
48205,
6739,
628,
220,
220,
220,
686,
62,
891,
62,
41341,
796,
12682,
1976,
565,
62,
70,
926,
62,
6448,
62,
891,
62,
41341,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
891,
62,
17143,
7307,
796,
2376,
62,
891,
62,
17143,
7307,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
2127,
62,
46862,
220,
220,
220,
220,
796,
2376,
62,
2127,
62,
46862,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
431,
62,
69,
4665,
220,
220,
220,
220,
796,
2376,
62,
431,
62,
69,
4665,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
46758,
220,
220,
220,
796,
318,
62,
46758,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
70,
926,
62,
6448,
62,
69,
9548,
93,
1136,
62,
431,
62,
69,
4665,
13,
198,
220,
220,
220,
30826,
27064,
13,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_msag DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
PRIVATE SECTION.
TYPES: BEGIN OF ty_t100_texts,
sprsl TYPE t100-sprsl,
msgnr TYPE t100-msgnr,
text TYPE t100-text,
END OF ty_t100_texts,
tt_t100_texts TYPE STANDARD TABLE OF ty_t100_texts.
METHODS:
serialize_texts
IMPORTING io_xml TYPE REF TO zcl_abapgit_xml_output
RAISING zcx_abapgit_exception,
deserialize_texts
IMPORTING io_xml TYPE REF TO zcl_abapgit_xml_input
RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS zcl_abapgit_object_msag IMPLEMENTATION.
METHOD zif_abapgit_object~has_changed_since.
rv_changed = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
SELECT SINGLE lastuser FROM t100a INTO rv_user
WHERE arbgb = ms_item-obj_name. "#EC CI_GENBUFF
IF sy-subrc <> 0 OR rv_user = ''.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_arbgb TYPE t100a-arbgb.
SELECT SINGLE arbgb FROM t100a INTO lv_arbgb
WHERE arbgb = ms_item-obj_name. "#EC CI_GENBUFF
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~jump.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = ms_item-obj_name
object_type = 'MSAG'
in_new_window = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
* parameter SUPPRESS_DIALOG doesnt exist in all versions
CALL FUNCTION 'RS_DELETE_MESSAGE_ID'
EXPORTING
nachrichtenklasse = ms_item-obj_name
EXCEPTIONS
not_executed = 1
not_found = 2
no_permission = 3
OTHERS = 4.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Error from RS_DELETE_MESSAGE_ID' ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
* fm RPY_MESSAGE_ID_INSERT almost works, but not in older versions
DATA: ls_t100a TYPE t100a,
ls_t100t TYPE t100t,
ls_t100u TYPE t100u,
lt_t100 TYPE TABLE OF t100,
lt_before TYPE TABLE OF t100u.
FIELD-SYMBOLS: <ls_t100> LIKE LINE OF lt_t100.
io_xml->read( EXPORTING iv_name = 'T100A'
CHANGING cg_data = ls_t100a ).
io_xml->read( EXPORTING iv_name = 'T100'
CHANGING cg_data = lt_t100 ).
CALL FUNCTION 'RS_CORR_INSERT'
EXPORTING
global_lock = abap_true
devclass = iv_package
object = ls_t100a-arbgb
object_class = 'T100'
mode = 'INSERT'
EXCEPTIONS
cancelled = 01
permission_failure = 02
unknown_objectclass = 03.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Error from RS_CORR_INSERT' ).
ENDIF.
SELECT * FROM t100u INTO TABLE lt_before
WHERE arbgb = ls_t100a-arbgb ORDER BY msgnr. "#EC CI_GENBUFF "#EC CI_BYPASS
LOOP AT lt_t100 ASSIGNING <ls_t100>.
DELETE lt_before WHERE msgnr = <ls_t100>-msgnr.
MODIFY t100 FROM <ls_t100>. "#EC CI_SUBRC
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'MSAG: Table T100 modify failed' ).
ENDIF.
CLEAR ls_t100u.
MOVE-CORRESPONDING <ls_t100> TO ls_t100u ##enh_ok.
ls_t100u-name = sy-uname.
ls_t100u-datum = sy-datum.
ls_t100u-selfdef = '3'.
MODIFY t100u FROM ls_t100u. "#EC CI_SUBRC
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'MSAG: Table T100U modify failed' ).
ENDIF.
ENDLOOP.
ls_t100a-masterlang = mv_language.
ls_t100a-lastuser = sy-uname.
ls_t100a-respuser = sy-uname.
ls_t100a-ldate = sy-datum.
ls_t100a-ltime = sy-uzeit.
MODIFY t100a FROM ls_t100a. "#EC CI_SUBRC
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'MSAG: Table T100A modify failed' ).
ENDIF.
ls_t100t-sprsl = mv_language.
ls_t100t-arbgb = ls_t100a-arbgb.
ls_t100t-stext = ls_t100a-stext.
MODIFY t100t FROM ls_t100t. "#EC CI_SUBRC
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'MSAG: Table T100T modify failed' ).
ENDIF.
LOOP AT lt_before INTO ls_t100u.
DELETE FROM t100 WHERE arbgb = ls_t100u-arbgb
AND msgnr = ls_t100u-msgnr. "#EC CI_SUBRC
DELETE FROM t100u WHERE arbgb = ls_t100u-arbgb
AND msgnr = ls_t100u-msgnr. "#EC CI_SUBRC
ENDLOOP.
deserialize_texts( io_xml = io_xml ).
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lv_msg_id TYPE rglif-message_id,
ls_inf TYPE t100a,
lt_source TYPE TABLE OF t100.
lv_msg_id = ms_item-obj_name.
SELECT SINGLE * FROM t100a INTO ls_inf
WHERE arbgb = lv_msg_id. "#EC CI_GENBUFF
IF sy-subrc <> 0.
RETURN.
ENDIF.
CLEAR ls_inf-respuser.
SELECT * FROM t100 INTO TABLE lt_source
WHERE sprsl = mv_language
AND arbgb = lv_msg_id
ORDER BY PRIMARY KEY. "#EC CI_SUBRC "#EC CI_GENBUFF
CLEAR: ls_inf-lastuser,
ls_inf-ldate,
ls_inf-ltime.
io_xml->add( iv_name = 'T100A'
ig_data = ls_inf ).
io_xml->add( ig_data = lt_source
iv_name = 'T100' ).
serialize_texts( io_xml ).
ENDMETHOD.
METHOD serialize_texts.
DATA: lv_msg_id TYPE rglif-message_id,
lt_t100_texts TYPE tt_t100_texts,
lt_t100t TYPE TABLE OF t100t,
lt_i18n_langs TYPE TABLE OF langu.
lv_msg_id = ms_item-obj_name.
" Collect additional languages
" Skip master lang - it has been already serialized
SELECT DISTINCT sprsl AS langu INTO TABLE lt_i18n_langs
FROM t100t
WHERE arbgb = lv_msg_id
AND sprsl <> mv_language. "#EC CI_BYPASS "#EC CI_GENBUFF.
SORT lt_i18n_langs ASCENDING.
IF lines( lt_i18n_langs ) > 0.
SELECT * FROM t100t INTO CORRESPONDING FIELDS OF TABLE lt_t100t
WHERE sprsl <> mv_language
AND arbgb = lv_msg_id. "#EC CI_GENBUFF
SELECT * FROM t100 INTO CORRESPONDING FIELDS OF TABLE lt_t100_texts
FOR ALL ENTRIES IN lt_i18n_langs
WHERE sprsl = lt_i18n_langs-table_line
AND arbgb = lv_msg_id
ORDER BY PRIMARY KEY. "#EC CI_SUBRC "#EC CI_GENBUFF
SORT lt_t100t BY sprsl ASCENDING.
SORT lt_t100_texts BY sprsl msgnr ASCENDING.
io_xml->add( iv_name = 'I18N_LANGS'
ig_data = lt_i18n_langs ).
io_xml->add( iv_name = 'T100T'
ig_data = lt_t100t ).
io_xml->add( iv_name = 'T100_TEXTS'
ig_data = lt_t100_texts ).
ENDIF.
ENDMETHOD.
METHOD deserialize_texts.
DATA: lv_msg_id TYPE rglif-message_id,
ls_t100 TYPE t100,
lt_t100t TYPE TABLE OF t100t,
lt_t100_texts TYPE tt_t100_texts,
lt_t100u TYPE TABLE OF t100u.
FIELD-SYMBOLS: <ls_t100_text> TYPE ty_t100_texts.
lv_msg_id = ms_item-obj_name.
SELECT * FROM t100u INTO TABLE lt_t100u
WHERE arbgb = lv_msg_id ORDER BY PRIMARY KEY. "#EC CI_GENBUFF
io_xml->read( EXPORTING iv_name = 'T100_TEXTS'
CHANGING cg_data = lt_t100_texts ).
io_xml->read( EXPORTING iv_name = 'T100T'
CHANGING cg_data = lt_t100t ).
MODIFY t100t FROM TABLE lt_t100t. "#EC CI_SUBRC
LOOP AT lt_t100_texts ASSIGNING <ls_t100_text>.
"check if message exists
READ TABLE lt_t100u TRANSPORTING NO FIELDS
WITH KEY arbgb = lv_msg_id msgnr = <ls_t100_text>-msgnr BINARY SEARCH.
CHECK sy-subrc = 0. "if original message doesn't exist no translations added
MOVE-CORRESPONDING <ls_t100_text> TO ls_t100.
ls_t100-arbgb = lv_msg_id.
MODIFY t100 FROM ls_t100. "#EC CI_SUBRC
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'MSAG: Table T100 modify failed' ).
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD zif_abapgit_object~compare_to_remote_version.
CREATE OBJECT ro_comparison_result TYPE zcl_abapgit_comparison_null.
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
907,
363,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
83,
3064,
62,
5239,
82,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
599,
3808,
75,
41876,
256,
3064,
12,
34975,
6649,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13845,
4593,
81,
41876,
256,
3064,
12,
907,
4593,
81,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
220,
41876,
256,
3064,
12,
5239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
83,
3064,
62,
5239,
82,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
83,
3064,
62,
5239,
82,
41876,
49053,
9795,
43679,
3963,
1259,
62,
83,
3064,
62,
5239,
82,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
11389,
1096,
62,
5239,
82,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
33245,
62,
19875,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
19875,
62,
22915,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
748,
48499,
1096,
62,
5239,
82,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
33245,
62,
19875,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
19875,
62,
15414,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
198,
10619,
31631,
13,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
907,
363,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
10134,
62,
40985,
62,
20777,
13,
198,
220,
220,
220,
374,
85,
62,
40985,
796,
450,
499,
62,
7942,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
938,
7220,
16034,
256,
3064,
64,
39319,
374,
85,
62,
7220,
198,
220,
220,
220,
220,
220,
33411,
610,
65,
22296,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
14514,
62,
35353,
19499,
5777,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
6375,
374,
85,
62,
7220,
796,
705,
4458,
198,
220,
220,
220,
220,
220,
374,
85,
62,
7220,
796,
269,
62,
7220,
62,
34680,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1136,
62,
38993,
13,
198,
220,
220,
220,
44608,
62,
38993,
796,
651,
62,
38993,
7,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1069,
1023,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
38039,
22296,
41876,
256,
3064,
64,
12,
38039,
22296,
13,
628,
198,
220,
220,
220,
33493,
311,
2751,
2538,
610,
65,
22296,
16034,
256,
3064,
64,
39319,
300,
85,
62,
38039,
22296,
198,
220,
220,
220,
220,
220,
33411,
610,
65,
22296,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
14514,
62,
35353,
19499,
5777,
198,
220,
220,
220,
374,
85,
62,
30388,
796,
20512,
66,
7,
827,
12,
7266,
6015,
796,
657,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
43327,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
6998,
62,
10468,
3535,
62,
26861,
7597,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
4905,
220,
220,
220,
220,
796,
705,
9693,
3913,
6,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
220,
220,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
4906,
220,
220,
796,
705,
44,
4090,
38,
6,
198,
220,
220,
220,
220,
220,
220,
220,
287,
62,
3605,
62,
17497,
796,
450,
499,
62,
7942,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
198,
198,
9,
11507,
19549,
32761,
62,
35,
12576,
7730,
46701,
2152,
287,
477,
6300,
198,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
6998,
62,
7206,
2538,
9328,
62,
44,
1546,
4090,
8264,
62,
2389,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
299,
620,
7527,
1452,
41582,
21612,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
407,
62,
18558,
7241,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
407,
62,
9275,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
645,
62,
525,
3411,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
604,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ltcl_run_checks DEFINITION DEFERRED.
CLASS zcl_abapgit_file_status DEFINITION LOCAL FRIENDS ltcl_run_checks.
CLASS ltcl_run_checks DEFINITION FOR TESTING RISK LEVEL HARMLESS
DURATION SHORT FINAL.
PRIVATE SECTION.
DATA: mt_results TYPE zif_abapgit_definitions=>ty_results_tt,
mo_dot TYPE REF TO zcl_abapgit_dot_abapgit,
mi_log TYPE REF TO zif_abapgit_log.
METHODS:
append_result IMPORTING iv_obj_type TYPE trobjtype
iv_obj_name TYPE sobj_name
iv_match TYPE abap_bool
iv_lstate TYPE char1
iv_rstate TYPE char1
iv_package TYPE devclass
iv_path TYPE string
iv_filename TYPE string
iv_packmove TYPE abap_bool OPTIONAL,
setup,
positive FOR TESTING RAISING zcx_abapgit_exception,
neg_diff_path_for_same_obj FOR TESTING RAISING zcx_abapgit_exception,
neg_incorrect_path_vs_pack FOR TESTING RAISING zcx_abapgit_exception,
neg_similar_filenames FOR TESTING RAISING zcx_abapgit_exception,
neg_empty_filenames FOR TESTING RAISING zcx_abapgit_exception,
package_move FOR TESTING RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS ltcl_run_checks IMPLEMENTATION.
METHOD append_result.
DATA ls_result LIKE LINE OF mt_results.
ls_result-inactive = abap_false.
ls_result-obj_type = iv_obj_type.
ls_result-obj_name = iv_obj_name.
ls_result-match = iv_match.
ls_result-lstate = iv_lstate.
ls_result-rstate = iv_rstate.
ls_result-package = iv_package.
ls_result-path = iv_path.
ls_result-filename = iv_filename.
ls_result-packmove = iv_packmove.
APPEND ls_result TO mt_results.
ENDMETHOD.
METHOD setup.
CREATE OBJECT mi_log TYPE zcl_abapgit_log.
mo_dot = zcl_abapgit_dot_abapgit=>build_default( ).
mo_dot->set_starting_folder( '/' ).
ENDMETHOD.
METHOD positive.
" 0 Positive
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma1.doma.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA2'
iv_match = ' '
iv_lstate = 'M'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma2.doma.xml' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 0 ).
ENDMETHOD.
METHOD neg_diff_path_for_same_obj.
" 1 Negative, different path for same object
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/sub'
iv_filename = 'zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma1.doma.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA2'
iv_match = ' '
iv_lstate = 'M'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma2.doma.xml' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
" This one is not pure - incorrect path also triggers path vs package check
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 2 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '1' )
exp = abap_true ).
ENDMETHOD.
METHOD neg_incorrect_path_vs_pack.
" 2 Negative, incorrect path vs package
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/sub'
iv_filename = '$$zdoma1.doma.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA2'
iv_match = ' '
iv_lstate = 'M'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zdoma2.doma.xml' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 1 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '2' )
exp = abap_true ).
ENDMETHOD.
METHOD neg_similar_filenames.
" 3 Negative, similar filenames
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zdoma1.doma.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA2'
iv_match = ' '
iv_lstate = 'M'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zdoma1.doma.xml' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 1 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '3' )
exp = abap_true ).
ENDMETHOD.
METHOD neg_empty_filenames.
" 4 Negative, empty filenames
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.abap' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = '$$ZCLASS1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '$$zclass1.clas.xml' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_match = 'X'
iv_lstate = ' '
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = '' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 1 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '4' )
exp = abap_true ).
ENDMETHOD.
METHOD package_move.
" 5 Changed package assignment
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.abap'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = 'A'
iv_rstate = ' '
iv_package = '$Z$SUB'
iv_path = '/sub'
iv_filename = 'zclass1.clas.abap'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zclass1.clas.xml'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'CLAS'
iv_obj_name = 'ZCLASS1'
iv_match = ' '
iv_lstate = 'A'
iv_rstate = ' '
iv_package = '$Z$SUB'
iv_path = '/sub'
iv_filename = 'zclass1.clas.xml'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA1'
iv_match = ' '
iv_lstate = 'A'
iv_rstate = ' '
iv_package = '$Z$'
iv_path = '/'
iv_filename = 'zdoma1.doma.xml'
iv_packmove = 'X' ).
append_result( iv_obj_type = 'DOMA'
iv_obj_name = 'ZDOMA2'
iv_match = ' '
iv_lstate = ' '
iv_rstate = 'A'
iv_package = '$Z$SUB'
iv_path = '/sub'
iv_filename = 'zdoma1.doma.xml'
iv_packmove = 'X' ).
zcl_abapgit_file_status=>run_checks(
ii_log = mi_log
it_results = mt_results
io_dot = mo_dot
iv_top = '$Z$' ).
" Three files, but only two msg (for two changed objects)
cl_abap_unit_assert=>assert_equals(
act = mi_log->count( )
exp = 2 ).
cl_abap_unit_assert=>assert_equals(
act = mi_log->has_rc( '5' )
exp = abap_true ).
ENDMETHOD.
ENDCLASS.
CLASS lcl_status_result DEFINITION.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING
it_results TYPE zif_abapgit_definitions=>ty_results_tt,
get_line
IMPORTING
iv_line TYPE i
RETURNING
VALUE(rs_data) TYPE zif_abapgit_definitions=>ty_result,
assert_lines
IMPORTING
iv_lines TYPE i.
PRIVATE SECTION.
DATA: mt_results TYPE zif_abapgit_definitions=>ty_results_tt.
ENDCLASS.
CLASS lcl_status_result IMPLEMENTATION.
METHOD constructor.
mt_results = it_results.
SORT mt_results BY path filename.
ENDMETHOD.
METHOD get_line.
READ TABLE mt_results INDEX iv_line INTO rs_data.
cl_abap_unit_assert=>assert_subrc( ).
ENDMETHOD.
METHOD assert_lines.
cl_abap_unit_assert=>assert_equals(
act = lines( mt_results )
exp = iv_lines ).
ENDMETHOD.
ENDCLASS.
CLASS ltcl_status_helper DEFINITION DEFERRED.
CLASS zcl_abapgit_file_status DEFINITION LOCAL FRIENDS ltcl_status_helper.
CLASS ltcl_status_helper DEFINITION FOR TESTING.
PUBLIC SECTION.
INTERFACES:
zif_abapgit_tadir.
METHODS:
constructor,
add_tadir
IMPORTING
iv_obj_type TYPE tadir-object
iv_obj_name TYPE tadir-obj_name
iv_devclass TYPE tadir-devclass,
add_remote
IMPORTING
iv_path TYPE string DEFAULT '/'
iv_filename TYPE string
iv_sha1 TYPE zif_abapgit_definitions=>ty_sha1,
add_local
IMPORTING
iv_path TYPE string DEFAULT '/'
iv_filename TYPE string
iv_sha1 TYPE zif_abapgit_definitions=>ty_sha1
iv_obj_type TYPE tadir-object OPTIONAL
iv_obj_name TYPE tadir-obj_name OPTIONAL
iv_devclass TYPE devclass DEFAULT '$Z$',
add_state
IMPORTING
iv_path TYPE string DEFAULT '/'
iv_filename TYPE string
iv_sha1 TYPE zif_abapgit_definitions=>ty_sha1,
run
IMPORTING
iv_devclass TYPE devclass DEFAULT '$Z$'
RETURNING
VALUE(ro_result) TYPE REF TO lcl_status_result
RAISING
zcx_abapgit_exception.
PRIVATE SECTION.
TYPES: BEGIN OF ty_tadir,
obj_type TYPE tadir-object,
obj_name TYPE tadir-obj_name,
devclass TYPE tadir-devclass,
END OF ty_tadir.
DATA:
mt_tadir TYPE STANDARD TABLE OF ty_tadir WITH DEFAULT KEY,
mt_local TYPE zif_abapgit_definitions=>ty_files_item_tt,
mt_remote TYPE zif_abapgit_definitions=>ty_files_tt,
mt_state TYPE zif_abapgit_definitions=>ty_file_signatures_tt.
ENDCLASS.
CLASS ltcl_status_helper IMPLEMENTATION.
METHOD constructor.
zcl_abapgit_injector=>set_tadir( me ).
ENDMETHOD.
METHOD add_tadir.
FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF mt_tadir.
APPEND INITIAL LINE TO mt_tadir ASSIGNING <ls_tadir>.
<ls_tadir>-obj_type = iv_obj_type.
<ls_tadir>-obj_name = iv_obj_name.
<ls_tadir>-devclass = iv_devclass.
ENDMETHOD.
METHOD zif_abapgit_tadir~get_object_package.
DATA: ls_tadir LIKE LINE OF mt_tadir.
IF lines( mt_tadir ) > 0.
READ TABLE mt_tadir INTO ls_tadir WITH KEY
obj_type = iv_object
obj_name = iv_obj_name.
cl_abap_unit_assert=>assert_subrc( ).
rv_devclass = ls_tadir-devclass.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_tadir~read.
cl_abap_unit_assert=>fail( ).
ENDMETHOD.
METHOD zif_abapgit_tadir~read_single.
cl_abap_unit_assert=>fail( ).
ENDMETHOD.
METHOD add_remote.
FIELD-SYMBOLS: <ls_remote> LIKE LINE OF mt_remote.
APPEND INITIAL LINE TO mt_remote ASSIGNING <ls_remote>.
<ls_remote>-path = iv_path.
<ls_remote>-filename = iv_filename.
<ls_remote>-sha1 = iv_sha1.
ENDMETHOD.
METHOD add_local.
FIELD-SYMBOLS: <ls_local> LIKE LINE OF mt_local.
APPEND INITIAL LINE TO mt_local ASSIGNING <ls_local>.
<ls_local>-item-obj_type = iv_obj_type.
<ls_local>-item-obj_name = iv_obj_name.
<ls_local>-item-devclass = iv_devclass.
<ls_local>-file-path = iv_path.
<ls_local>-file-filename = iv_filename.
<ls_local>-file-sha1 = iv_sha1.
ENDMETHOD.
METHOD add_state.
FIELD-SYMBOLS: <ls_state> LIKE LINE OF mt_state.
APPEND INITIAL LINE TO mt_state ASSIGNING <ls_state>.
<ls_state>-path = iv_path.
<ls_state>-filename = iv_filename.
<ls_state>-sha1 = iv_sha1.
ENDMETHOD.
METHOD run.
DATA: lt_results TYPE zif_abapgit_definitions=>ty_results_tt,
lo_dot TYPE REF TO zcl_abapgit_dot_abapgit.
lo_dot = zcl_abapgit_dot_abapgit=>build_default( ).
lt_results = zcl_abapgit_file_status=>calculate_status(
iv_devclass = iv_devclass
io_dot = lo_dot
it_local = mt_local
it_remote = mt_remote
it_cur_state = mt_state ).
CREATE OBJECT ro_result
EXPORTING
it_results = lt_results.
ENDMETHOD.
ENDCLASS.
CLASS ltcl_calculate_status DEFINITION DEFERRED.
CLASS zcl_abapgit_file_status DEFINITION LOCAL FRIENDS ltcl_calculate_status.
CLASS ltcl_calculate_status DEFINITION FOR TESTING RISK LEVEL HARMLESS
DURATION SHORT FINAL.
PRIVATE SECTION.
DATA:
mo_helper TYPE REF TO ltcl_status_helper,
mo_result TYPE REF TO lcl_status_result.
METHODS:
setup,
only_remote FOR TESTING RAISING zcx_abapgit_exception,
only_local FOR TESTING RAISING zcx_abapgit_exception,
match FOR TESTING RAISING zcx_abapgit_exception,
diff FOR TESTING RAISING zcx_abapgit_exception,
local_outside_main FOR TESTING RAISING zcx_abapgit_exception,
complete FOR TESTING RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS ltcl_calculate_status IMPLEMENTATION.
METHOD setup.
CREATE OBJECT mo_helper.
ENDMETHOD.
METHOD only_remote.
mo_helper->add_remote(
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = 'D1' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-rstate
exp = zif_abapgit_definitions=>c_state-added ).
ENDMETHOD.
METHOD only_local.
mo_helper->add_local(
iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = 'D1' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-lstate
exp = zif_abapgit_definitions=>c_state-added ).
ENDMETHOD.
METHOD match.
mo_helper->add_local(
iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = 'D1' ).
mo_helper->add_remote(
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = 'D1' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-match
exp = abap_true ).
ENDMETHOD.
METHOD diff.
mo_helper->add_local(
iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = '12345' ).
mo_helper->add_remote(
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = '54321' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-lstate
exp = zif_abapgit_definitions=>c_state-modified ).
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-rstate
exp = zif_abapgit_definitions=>c_state-modified ).
ENDMETHOD.
METHOD local_outside_main.
mo_helper->add_tadir(
iv_obj_type = 'DOMA'
iv_obj_name = '$$ZDOMA1'
iv_devclass = '$OUTSIDE$' ).
mo_helper->add_remote(
iv_filename = '$$zdoma1.doma.xml'
iv_sha1 = '54321' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 1 ).
" it should appear as not existing locally
cl_abap_unit_assert=>assert_equals(
act = mo_result->get_line( 1 )-rstate
exp = zif_abapgit_definitions=>c_state-added ).
ENDMETHOD.
METHOD complete.
DATA:
ls_line TYPE zif_abapgit_definitions=>ty_result,
lv_act TYPE c LENGTH 3,
lv_exp TYPE c LENGTH 3.
mo_helper->add_local(
iv_path = '/'
iv_filename = '.abapgit.xml'
iv_sha1 = '1017' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_created_locally.prog.abap'
iv_sha1 = '1001' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_created_locally.prog.xml'
iv_sha1 = '1022' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_deleted_remotely.prog.abap'
iv_sha1 = '1016' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_deleted_remotely.prog.xml'
iv_sha1 = '1003' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_modified_both.prog.abap'
iv_sha1 = '1028' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_modified_both.prog.xml'
iv_sha1 = '1032' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_modified_locally.prog.abap'
iv_sha1 = '1023' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_modified_locally.prog.xml'
iv_sha1 = '1033' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_modified_remotely.prog.abap'
iv_sha1 = '1018' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_modified_remotely.prog.xml'
iv_sha1 = '1011' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_mod_del.prog.abap'
iv_sha1 = '1012' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'ztest_mod_del.prog.xml'
iv_sha1 = '1006' ).
mo_helper->add_local(
iv_path = '/src/'
iv_filename = 'package.devc.xml'
iv_sha1 = '1027' ).
mo_helper->add_remote(
iv_path = '/'
iv_filename = '.abapgit.xml'
iv_sha1 = '1017' ).
mo_helper->add_remote(
iv_path = '/'
iv_filename = 'README.md'
iv_sha1 = '1007' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'package.devc.xml'
iv_sha1 = '1027' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_created_remotely.prog.abap'
iv_sha1 = '1025' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_created_remotely.prog.xml'
iv_sha1 = '1015' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_del_mod.prog.abap'
iv_sha1 = '1024' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_del_mod.prog.xml'
iv_sha1 = '1013' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_deleted_locally.prog.abap'
iv_sha1 = '1008' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_deleted_locally.prog.xml'
iv_sha1 = '1009' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_modified_both.prog.abap'
iv_sha1 = '1002' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_modified_both.prog.xml'
iv_sha1 = '1030' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_modified_locally.prog.abap'
iv_sha1 = '1026' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_modified_locally.prog.xml'
iv_sha1 = '1021' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_modified_remotely.prog.abap'
iv_sha1 = '1019' ).
mo_helper->add_remote(
iv_path = '/src/'
iv_filename = 'ztest_modified_remotely.prog.xml'
iv_sha1 = '1031' ).
mo_helper->add_state(
iv_path = '/'
iv_filename = '.abapgit.xml'
iv_sha1 = '1017' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'package.devc.xml'
iv_sha1 = '1027' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_deleted_locally.prog.abap'
iv_sha1 = '1008' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_deleted_locally.prog.xml'
iv_sha1 = '1009' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_deleted_remotely.prog.abap'
iv_sha1 = '1016' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_deleted_remotely.prog.xml'
iv_sha1 = '1003' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_del_mod.prog.abap'
iv_sha1 = '1020' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_del_mod.prog.xml'
iv_sha1 = '1029' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_modified_both.prog.abap'
iv_sha1 = '1010' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_modified_both.prog.xml'
iv_sha1 = '1004' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_modified_locally.prog.abap'
iv_sha1 = '1026' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_modified_locally.prog.xml'
iv_sha1 = '1021' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_modified_remotely.prog.abap'
iv_sha1 = '1018' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_modified_remotely.prog.xml'
iv_sha1 = '1011' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_mod_del.prog.abap'
iv_sha1 = '1014' ).
mo_helper->add_state(
iv_path = '/src/'
iv_filename = 'ztest_mod_del.prog.xml'
iv_sha1 = '1005' ).
mo_result = mo_helper->run( ).
mo_result->assert_lines( 21 ).
DO 21 TIMES.
ls_line = mo_result->get_line( sy-index ).
lv_act+0(1) = ls_line-match.
lv_act+1(1) = ls_line-lstate.
lv_act+2(1) = ls_line-rstate.
CASE sy-index.
WHEN 1.
lv_exp = 'X '.
WHEN 2.
lv_exp = ' A'.
WHEN 3.
lv_exp = 'X '.
WHEN 4 OR 5.
lv_exp = ' A '.
WHEN 6 OR 7.
lv_exp = ' A'.
WHEN 8 OR 9.
lv_exp = ' DM'.
WHEN 10 OR 11.
lv_exp = ' D '.
WHEN 12 OR 13.
lv_exp = ' D'.
WHEN 14 OR 15.
lv_exp = ' MD'.
WHEN 16 OR 17.
lv_exp = ' MM'.
WHEN 18 OR 19.
lv_exp = ' M '.
WHEN 20 OR 21.
lv_exp = ' M'.
ENDCASE.
cl_abap_unit_assert=>assert_equals(
act = lv_act
exp = lv_exp
msg = |Line { sy-index }: { ls_line-filename }| ).
ENDDO.
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
83,
565,
62,
5143,
62,
42116,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
7753,
62,
13376,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
83,
565,
62,
5143,
62,
42116,
13,
198,
198,
31631,
300,
83,
565,
62,
5143,
62,
42116,
5550,
20032,
17941,
7473,
43001,
2751,
45698,
42,
49277,
43638,
5805,
7597,
198,
220,
360,
4261,
6234,
6006,
9863,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
45079,
62,
43420,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
43420,
62,
926,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6941,
62,
26518,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21504,
62,
6404,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6404,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
24443,
62,
20274,
30023,
9863,
2751,
21628,
62,
26801,
62,
4906,
41876,
4161,
50007,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26801,
62,
3672,
41876,
27355,
73,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
15699,
220,
220,
220,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
75,
5219,
220,
220,
41876,
1149,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
81,
5219,
220,
220,
41876,
1149,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26495,
220,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
6978,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
34345,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
8002,
21084,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
11,
198,
220,
220,
220,
220,
220,
9058,
11,
198,
220,
220,
220,
220,
220,
3967,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
2469,
62,
26069,
62,
6978,
62,
1640,
62,
31642,
62,
26801,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
2469,
62,
1939,
47315,
62,
6978,
62,
14259,
62,
8002,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
2469,
62,
38610,
62,
10379,
268,
1047,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
2469,
62,
28920,
62,
10379,
268,
1047,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
5301,
62,
21084,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
5143,
62,
42116,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
24443,
62,
20274,
13,
628,
220,
220,
220,
42865,
43979,
62,
20274,
34178,
48920,
3963,
45079,
62,
43420,
13,
628,
220,
220,
220,
43979,
62,
20274,
12,
259,
5275,
796,
450,
499,
62,
9562,
13,
628,
220,
220,
220,
43979,
62,
20274,
12,
26801,
62,
4906,
796,
21628,
62,
26801,
62,
4906,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
26801,
62,
3672,
796,
21628,
62,
26801,
62,
3672,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
15699,
220,
220,
220,
796,
21628,
62,
15699,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
75,
5219,
220,
220,
796,
21628,
62,
75,
5219,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
81,
5219,
220,
220,
796,
21628,
62,
81,
5219,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
26495,
220,
796,
21628,
62,
26495,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
6978,
220,
220,
220,
220,
796,
21628,
62,
6978,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
34345,
796,
21628,
62,
34345,
13,
198,
220,
220,
220,
43979,
62,
20274,
12,
8002,
21084,
796,
21628,
62,
8002,
21084,
13,
628,
220,
220,
220,
43504,
10619,
43979,
62,
20274,
5390,
45079,
62,
43420,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
9058,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
21504,
62,
6404,
41876,
1976,
565,
62,
397,
499,
18300,
62,
6404,
13,
628,
220,
220,
220,
6941,
62,
26518,
796,
1976,
565,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
14804,
11249,
62,
12286,
7,
6739,
198,
220,
220,
220,
6941,
62,
26518,
3784,
2617,
62,
38690,
62,
43551,
7,
31051,
6,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
3967,
13,
628,
220,
220,
220,
366,
657,
33733,
198,
220,
220,
220,
24443,
62,
20274,
7
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ltcl_test DEFINITION DEFERRED.
CLASS zcx_abapgit_exception DEFINITION LOCAL FRIENDS ltcl_test.
CLASS ltcl_test DEFINITION
FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PUBLIC SECTION.
METHODS:
test_direct_text FOR TESTING,
test_t100_text FOR TESTING,
test_no_text FOR TESTING.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF gty_t100_message,
msgid TYPE symsgid,
msgno TYPE symsgno,
msgv1 TYPE symsgv,
msgv2 TYPE symsgv,
msgv3 TYPE symsgv,
msgv4 TYPE symsgv,
END OF gty_t100_message.
CLASS-METHODS:
get_exc_text IMPORTING ix_ex TYPE REF TO cx_root
RETURNING VALUE(rv_text) TYPE string,
get_t100_text IMPORTING is_message TYPE gty_t100_message
RETURNING VALUE(rv_text) TYPE string.
ENDCLASS.
CLASS ltcl_test IMPLEMENTATION.
METHOD test_direct_text.
CONSTANTS: lc_text1 TYPE string VALUE `This is a test error message.`,
lc_text2 TYPE string VALUE ``.
DATA: lx_ex TYPE REF TO zcx_abapgit_exception,
lx_previous TYPE REF TO cx_root.
TRY.
CREATE OBJECT lx_previous TYPE cx_sy_dyn_call_illegal_method
EXPORTING
textid = cx_sy_dyn_call_illegal_method=>private_method
classname = 'CLASS'
methodname = 'METHOD'.
zcx_abapgit_exception=>raise( iv_text = lx_previous->get_text( )
ix_previous = lx_previous ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex )
exp = lx_previous->get_text( ) ).
cl_abap_unit_assert=>assert_equals( act = lx_ex->previous exp = lx_previous ).
ENDTRY.
FREE: lx_ex, lx_previous.
TRY.
zcx_abapgit_exception=>raise( lc_text1 ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lc_text1 ).
ENDTRY.
FREE lx_ex.
TRY.
zcx_abapgit_exception=>raise( lc_text2 ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals(
act = get_exc_text( lx_ex )
exp = zcx_abapgit_exception=>gc_generic_error_msg ).
ENDTRY.
FREE lx_ex.
ENDMETHOD.
METHOD test_no_text.
DATA: lx_ex TYPE REF TO zcx_abapgit_exception.
TRY.
zcx_abapgit_exception=>raise( space ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals(
act = get_exc_text( lx_ex )
exp = zcx_abapgit_exception=>gc_generic_error_msg ).
ENDTRY.
ENDMETHOD.
METHOD test_t100_text.
CONSTANTS: BEGIN OF lc_msg1,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE IS INITIAL,
msgv2 TYPE symsgv VALUE IS INITIAL,
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg1,
BEGIN OF lc_msg2,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE IS INITIAL,
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg2,
BEGIN OF lc_msg3,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE 'Variable 2',
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg3,
BEGIN OF lc_msg4,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE 'Variable 2',
msgv3 TYPE symsgv VALUE'Variable 3',
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg4,
BEGIN OF lc_msg5,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE 'Variable 2',
msgv3 TYPE symsgv VALUE 'Variable 3',
msgv4 TYPE symsgv VALUE 'Variable 4',
END OF lc_msg5,
BEGIN OF lc_msg6,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '003',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE 'Variable 2',
msgv3 TYPE symsgv VALUE 'Variable 3',
msgv4 TYPE symsgv VALUE 'Variable 4',
END OF lc_msg6,
BEGIN OF lc_msg7,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '003',
msgv1 TYPE symsgv VALUE IS INITIAL,
msgv2 TYPE symsgv VALUE IS INITIAL,
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg7,
BEGIN OF lc_msg8,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '002',
msgv1 TYPE symsgv VALUE IS INITIAL,
msgv2 TYPE symsgv VALUE IS INITIAL,
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg8.
DATA: lx_ex TYPE REF TO zcx_abapgit_exception,
lv_text TYPE string.
TRY.
lv_text = get_t100_text( lc_msg1 ).
zcx_abapgit_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
CLEAR lv_text.
FREE lx_ex.
TRY.
lv_text = get_t100_text( lc_msg2 ).
zcx_abapgit_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
CLEAR lv_text.
FREE lx_ex.
TRY.
lv_text = get_t100_text( lc_msg3 ).
zcx_abapgit_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
CLEAR lv_text.
FREE lx_ex.
TRY.
lv_text = get_t100_text( lc_msg4 ).
zcx_abapgit_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
CLEAR lv_text.
FREE lx_ex.
TRY.
lv_text = get_t100_text( lc_msg5 ).
zcx_abapgit_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
CLEAR lv_text.
FREE lx_ex.
TRY.
lv_text = get_t100_text( lc_msg6 ).
zcx_abapgit_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
CLEAR lv_text.
FREE lx_ex.
TRY.
lv_text = get_t100_text( lc_msg7 ).
zcx_abapgit_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
CLEAR lv_text.
FREE lx_ex.
TRY.
lv_text = get_t100_text( lc_msg8 ).
zcx_abapgit_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_abapgit_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
CLEAR lv_text.
FREE lx_ex.
ENDMETHOD.
METHOD get_exc_text.
cl_message_helper=>set_msg_vars_for_if_msg( ix_ex ).
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO rv_text.
ENDMETHOD.
METHOD get_t100_text.
MESSAGE ID is_message-msgid TYPE 'S' NUMBER is_message-msgno
WITH is_message-msgv1 is_message-msgv2 is_message-msgv3 is_message-msgv4
INTO rv_text.
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
83,
565,
62,
9288,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
31631,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
83,
565,
62,
9288,
13,
198,
198,
31631,
300,
83,
565,
62,
9288,
5550,
20032,
17941,
198,
220,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1332,
62,
12942,
62,
5239,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
83,
3064,
62,
5239,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
3919,
62,
5239,
7473,
43001,
2751,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
308,
774,
62,
83,
3064,
62,
20500,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
16,
41876,
827,
19662,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
17,
41876,
827,
19662,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
18,
41876,
827,
19662,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
19,
41876,
827,
19662,
85,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
308,
774,
62,
83,
3064,
62,
20500,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
651,
62,
41194,
62,
5239,
30023,
9863,
2751,
220,
844,
62,
1069,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
43213,
62,
15763,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
5239,
8,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
651,
62,
83,
3064,
62,
5239,
30023,
9863,
2751,
318,
62,
20500,
220,
220,
220,
220,
41876,
308,
774,
62,
83,
3064,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
5239,
8,
41876,
4731,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
9288,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1332,
62,
12942,
62,
5239,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
300,
66,
62,
5239,
16,
41876,
4731,
26173,
8924,
4600,
1212,
318,
257,
1332,
4049,
3275,
13,
47671,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
66,
62,
5239,
17,
41876,
4731,
26173,
8924,
7559,
13,
198,
220,
220,
220,
42865,
25,
300,
87,
62,
1069,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
87,
62,
3866,
1442,
41876,
4526,
37,
5390,
43213,
62,
15763,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
300,
87,
62,
3866,
1442,
41876,
43213,
62,
1837,
62,
67,
2047,
62,
13345,
62,
47749,
62,
24396,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
312,
220,
220,
220,
220,
796,
43213,
62,
1837,
62,
67,
2047,
62,
13345,
62,
47749,
62,
24396,
14804,
19734,
62,
24396,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1398,
3672,
220,
796,
705,
31631,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2446,
3672,
796,
705,
49273,
4458,
628,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
21628,
62,
5239,
220,
220,
220,
220,
796,
300,
87,
62,
3866,
1442,
3784,
1136,
62,
5239,
7,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
844,
62,
3866,
1442,
796,
300,
87,
62,
3866,
1442,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
32165,
7,
6739,
628,
220,
220,
220,
220,
220,
327,
11417,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
39319,
300,
87,
62,
1069,
13,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
719,
796,
651,
62,
41194,
62,
5239,
7,
300,
87,
62,
1069,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1033,
796,
300,
87,
62,
3866,
1442,
3784,
1136,
62,
5239,
7,
1267,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
719,
796,
300,
87,
62,
1069,
3784,
3866,
1442,
1033,
796,
300,
87,
62,
3866,
1442,
6739,
198,
220,
220,
220,
23578,
40405,
13,
628,
220,
220,
220,
17189,
25,
300,
87,
62,
1069,
11,
300,
87,
62,
3866,
1442,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
300,
66,
62,
5239,
16,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
32165,
7,
6739,
198,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-002.
PARAMETERS: p_split TYPE i DEFAULT 10,
p_mview TYPE c AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b2.
******************************************************************
TYPES: BEGIN OF ty_result,
from TYPE string,
count TYPE i,
END OF ty_result.
TYPES: ty_result_tt TYPE STANDARD TABLE OF ty_result WITH DEFAULT KEY.
CLASS lcl_app DEFINITION FINAL.
PUBLIC SECTION.
CLASS-METHODS:
run RETURNING VALUE(rt_result) TYPE ty_result_tt.
PRIVATE SECTION.
CLASS-DATA:
gt_result TYPE ty_result_tt.
CLASS-METHODS:
init_result,
run_package IMPORTING iv_devclass TYPE devclass,
run_program IMPORTING iv_program TYPE program.
ENDCLASS.
CLASS lcl_app IMPLEMENTATION.
METHOD run.
DATA: lt_packages TYPE STANDARD TABLE OF devclass WITH DEFAULT KEY,
lv_package LIKE LINE OF lt_packages.
init_result( ).
SELECT devclass FROM tdevc INTO TABLE lt_packages
WHERE devclass IN s_devc. "#EC CI_GENBUFF "#EC CI_SUBRC
LOOP AT lt_packages INTO lv_package.
run_package( lv_package ).
ENDLOOP.
rt_result = gt_result.
ENDMETHOD.
METHOD init_result.
DATA: lv_length TYPE i.
FIELD-SYMBOLS: <ls_result> LIKE LINE OF gt_result.
CLEAR gt_result.
WHILE lv_length < 255.
APPEND INITIAL LINE TO gt_result ASSIGNING <ls_result>.
<ls_result>-from = |{ lv_length } to { lv_length + p_split - 1 } characters|.
lv_length = lv_length + p_split.
ENDWHILE.
ENDMETHOD.
METHOD run_package.
DATA: lt_programs TYPE scit_program,
lv_program LIKE LINE OF lt_programs.
lt_programs = zcl_aoc_util_programs=>get_programs_in_package(
iv_devclass = iv_devclass
iv_ignore_mview_fugr = p_mview ).
LOOP AT lt_programs INTO lv_program.
IF sy-tabix MOD 100 = 0.
cl_progress_indicator=>progress_indicate(
i_text = iv_devclass
i_processed = sy-tabix
i_total = lines( lt_programs )
i_output_immediately = abap_true ).
ENDIF.
run_program( lv_program ).
ENDLOOP.
ENDMETHOD.
METHOD run_program.
DATA: lt_source TYPE TABLE OF abaptxt255,
lv_index TYPE i,
ls_source LIKE LINE OF lt_source.
FIELD-SYMBOLS: <ls_result> LIKE LINE OF gt_result.
CALL FUNCTION 'RPY_PROGRAM_READ'
EXPORTING
program_name = iv_program
with_includelist = abap_false
only_source = abap_true
with_lowercase = abap_true
TABLES
source_extended = lt_source
EXCEPTIONS
cancelled = 1
not_found = 2
permission_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
RETURN.
ENDIF.
LOOP AT lt_source INTO ls_source.
lv_index = ( strlen( ls_source-line ) DIV p_split ) + 1.
READ TABLE gt_result INDEX lv_index ASSIGNING <ls_result>. "#EC CI_SUBRC
<ls_result>-count = <ls_result>-count + 1.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
CLASS lcl_gui DEFINITION FINAL.
PUBLIC SECTION.
CLASS-METHODS:
show
IMPORTING VALUE(it_result) TYPE ty_result_tt
RAISING cx_salv_msg.
ENDCLASS.
CLASS lcl_gui IMPLEMENTATION.
METHOD show.
DATA: lo_salv TYPE REF TO cl_salv_table.
cl_salv_table=>factory(
IMPORTING
r_salv_table = lo_salv
CHANGING
t_table = it_result ).
lo_salv->get_columns( )->set_optimize( ).
lo_salv->get_functions( )->set_all( ).
lo_salv->display( ).
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
lcl_gui=>show( lcl_app=>run( ) ).
| [
2200,
15490,
1976,
64,
420,
62,
1370,
62,
13664,
13,
198,
198,
9,
450,
499,
11505,
7376,
4657,
198,
9,
3740,
1378,
12567,
13,
785,
14,
75,
5406,
79,
14,
397,
499,
11505,
7376,
4657,
198,
9,
17168,
13789,
198,
198,
5603,
9148,
1546,
25,
256,
7959,
66,
13,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
275,
16,
13315,
8782,
10067,
37977,
2538,
40383,
12,
8298,
13,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
7959,
66,
7473,
256,
7959,
66,
12,
7959,
4871,
440,
9148,
3528,
1404,
15513,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
275,
16,
13,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
275,
17,
13315,
8782,
10067,
37977,
2538,
40383,
12,
21601,
13,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
35312,
41876,
1312,
5550,
38865,
838,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
76,
1177,
41876,
269,
7054,
5870,
25171,
39758,
5550,
38865,
705,
55,
4458,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
275,
17,
13,
198,
198,
17174,
17174,
1174,
198,
198,
9936,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
20274,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
422,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
954,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
20274,
13,
198,
198,
9936,
47,
1546,
25,
1259,
62,
20274,
62,
926,
41876,
49053,
9795,
43679,
3963,
1259,
62,
20274,
13315,
5550,
38865,
35374,
13,
198,
198,
31631,
300,
565,
62,
1324,
5550,
20032,
17941,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
1057,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
20274,
8,
41876,
1259,
62,
20274,
62,
926,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42715,
12,
26947,
25,
198,
220,
220,
220,
220,
220,
308,
83,
62,
20274,
41876,
1259,
62,
20274,
62,
926,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
2315,
62,
20274,
11,
198,
220,
220,
220,
220,
220,
1057,
62,
26495,
30023,
9863,
2751,
21628,
62,
7959,
4871,
41876,
1614,
4871,
11,
198,
220,
220,
220,
220,
220,
1057,
62,
23065,
30023,
9863,
2751,
21628,
62,
23065,
41876,
1430,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
1324,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
1057,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
43789,
41876,
49053,
9795,
43679,
3963,
1614,
4871,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26495,
220,
34178,
48920,
3963,
300,
83,
62,
43789,
13,
628,
198,
220,
220,
220,
2315,
62,
20274,
7,
6739,
628,
220,
220,
220,
33493,
1614,
4871,
16034,
256,
7959,
66,
39319,
43679,
300,
83,
62,
43789,
198,
220,
220,
220,
220,
220,
33411,
1614,
4871,
3268,
264,
62,
7959,
66,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
14514,
62,
35353,
19499,
5777,
25113,
2943,
14514,
62,
50,
10526,
7397,
628,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
43789,
39319,
300,
85,
62,
26495,
13,
198,
220,
220,
220,
220,
220,
1057,
62,
26495,
7,
300,
85,
62,
26495,
6739,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
374,
83,
62,
20274,
796,
308,
83,
62,
20274,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
2315,
62,
20274,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
13664,
41876,
1312,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
20274,
29,
34178,
48920,
3963,
308,
83,
62,
20274,
13,
628,
198,
220,
220,
220,
30301,
1503,
308,
83,
62,
20274,
13,
628,
220,
220,
220,
7655,
41119,
300,
85,
62,
13664,
1279,
14280,
13,
198,
220,
220,
220,
220,
220,
43504,
10619,
3268,
2043,
12576,
48920,
5390,
308,
83,
62,
20274,
24994,
3528,
15871,
1279,
7278,
62,
20274,
28401,
198,
220,
220,
220,
220,
220,
1279,
7278,
62,
20274,
29,
12,
6738,
796,
930,
90,
300,
85,
62,
13664,
1782,
284,
1391,
300,
85,
62,
13664,
1343,
279,
62,
35312,
532,
352,
1782,
3435,
91,
13,
628,
220,
220,
220,
220,
220,
300,
85,
62,
13664,
796,
300,
85,
62,
13664,
1343,
279,
62,
35312,
13,
198,
220,
220,
220,
23578,
12418,
41119,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1057,
62,
26495,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
23065,
82,
41876,
629,
270,
62,
23065,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
23065,
220,
34178,
48920,
3963,
300,
83,
62,
23065,
82,
13,
628,
198,
220,
220,
220,
300,
83,
62,
23065,
82,
796,
1976,
565,
62,
64,
420,
62,
22602,
62,
23065,
82,
14804,
1136,
62,
23065,
82,
62,
259,
62,
26495,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
7959,
4871,
796,
21628,
62,
7959,
4871,
198,
220,
220,
220,
220,
220,
21628,
62,
46430,
62,
76,
1177,
62,
69,
1018,
81,
796,
279,
62,
76,
1177,
6739,
628,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
23065,
82,
39319,
300,
85,
62,
23065,
13,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
8658,
844,
19164,
1802,
796,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
33723,
62,
521,
26407,
14804,
33723,
62,
521,
5344,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
5239,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
7959,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report ZDOMA
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zdoma2.
PARAMETERS: p_ddmass TYPE ddmass-device OBLIGATORY.
WRITE 'hesdfllo'.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
1168,
39170,
32,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
2200,
15490,
1976,
3438,
64,
17,
13,
198,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
1860,
22208,
41876,
49427,
22208,
12,
25202,
440,
9148,
3528,
1404,
15513,
13,
198,
198,
18564,
12709,
705,
956,
7568,
18798,
4458,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_gtt_mia_sh_data_old DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor
IMPORTING
!io_ef_parameters TYPE REF TO zif_gtt_mia_ef_parameters
RAISING
cx_udm_message .
METHODS get_vttk
RETURNING
VALUE(rr_vttk) TYPE REF TO data .
METHODS get_vttp
RETURNING
VALUE(rr_vttp) TYPE REF TO data .
METHODS get_vtts
RETURNING
VALUE(rr_vtts) TYPE REF TO data .
METHODS get_vtsp
RETURNING
VALUE(rr_vtsp) TYPE REF TO data .
PROTECTED SECTION.
PRIVATE SECTION.
DATA mo_ef_parameters TYPE REF TO zif_gtt_mia_ef_parameters .
DATA mt_vttk TYPE zif_gtt_mia_app_types=>tt_vttkvb .
DATA mt_vttp TYPE zif_gtt_mia_app_types=>tt_vttpvb .
DATA mt_vtts TYPE zif_gtt_mia_app_types=>tt_vttsvb .
DATA mt_vtsp TYPE zif_gtt_mia_app_types=>tt_vtspvb .
METHODS init
RAISING
cx_udm_message .
METHODS init_vttk
RAISING
cx_udm_message .
METHODS init_vttp
RAISING
cx_udm_message .
METHODS init_vtts
RAISING
cx_udm_message .
METHODS init_vtsp
RAISING
cx_udm_message .
ENDCLASS.
CLASS zcl_gtt_mia_sh_data_old IMPLEMENTATION.
METHOD constructor.
mo_ef_parameters = io_ef_parameters.
init( ).
ENDMETHOD.
METHOD get_vtsp.
rr_vtsp = REF #( mt_vtsp ).
ENDMETHOD.
METHOD get_vttk.
rr_vttk = REF #( mt_vttk ).
ENDMETHOD.
METHOD get_vttp.
rr_vttp = REF #( mt_vttp ).
ENDMETHOD.
METHOD get_vtts.
rr_vtts = REF #( mt_vtts ).
ENDMETHOD.
METHOD init.
init_vttk( ).
init_vttp( ).
init_vtts( ).
init_vtsp( ).
ENDMETHOD.
METHOD init_vtsp.
FIELD-SYMBOLS: <lt_vtsp_new> TYPE zif_gtt_mia_app_types=>tt_vtspvb,
<lt_vtsp_old> TYPE zif_gtt_mia_app_types=>tt_vtspvb.
DATA(lr_vtsp_new) = mo_ef_parameters->get_appl_table(
iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_item_stage_new ).
DATA(lr_vtsp_old) = mo_ef_parameters->get_appl_table(
iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_item_stage_old ).
ASSIGN lr_vtsp_new->* TO <lt_vtsp_new>.
ASSIGN lr_vtsp_old->* TO <lt_vtsp_old>.
IF <lt_vtsp_new> IS ASSIGNED AND
<lt_vtsp_old> IS ASSIGNED.
mt_vtsp = <lt_vtsp_old>.
SORT mt_vtsp BY tknum tsnum tpnum.
LOOP AT <lt_vtsp_new> ASSIGNING FIELD-SYMBOL(<ls_vtsp_new>)
WHERE updkz IS INITIAL.
READ TABLE mt_vtsp
WITH KEY tknum = <ls_vtsp_new>-tknum
tsnum = <ls_vtsp_new>-tsnum
tpnum = <ls_vtsp_new>-tpnum
TRANSPORTING NO FIELDS
BINARY SEARCH.
IF sy-subrc <> 0.
INSERT <ls_vtsp_new> INTO mt_vtsp INDEX sy-tabix.
ENDIF.
ENDLOOP.
ELSE.
MESSAGE e002(zgtt_mia) WITH 'VTSP' INTO DATA(lv_dummy).
zcl_gtt_mia_tools=>throw_exception( ).
ENDIF.
ENDMETHOD.
METHOD init_vttk.
FIELD-SYMBOLS: <lt_vttk_new> TYPE zif_gtt_mia_app_types=>tt_vttkvb,
<lt_vttk_old> TYPE zif_gtt_mia_app_types=>tt_vttkvb.
DATA(lr_vttk_new) = mo_ef_parameters->get_appl_table(
iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_header_new ).
DATA(lr_vttk_old) = mo_ef_parameters->get_appl_table(
iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_header_old ).
ASSIGN lr_vttk_new->* TO <lt_vttk_new>.
ASSIGN lr_vttk_old->* TO <lt_vttk_old>.
IF <lt_vttk_new> IS ASSIGNED AND
<lt_vttk_old> IS ASSIGNED.
mt_vttk = <lt_vttk_old>.
SORT mt_vttk BY tknum.
LOOP AT <lt_vttk_new> ASSIGNING FIELD-SYMBOL(<ls_vttk_new>)
WHERE updkz IS INITIAL.
READ TABLE mt_vttk
WITH KEY tknum = <ls_vttk_new>-tknum
TRANSPORTING NO FIELDS
BINARY SEARCH.
IF sy-subrc <> 0.
INSERT <ls_vttk_new> INTO mt_vttk INDEX sy-tabix.
ENDIF.
ENDLOOP.
ELSE.
MESSAGE e002(zgtt_mia) WITH 'VTTK' INTO DATA(lv_dummy).
zcl_gtt_mia_tools=>throw_exception( ).
ENDIF.
ENDMETHOD.
METHOD init_vttp.
FIELD-SYMBOLS: <lt_vttp_new> TYPE zif_gtt_mia_app_types=>tt_vttpvb,
<lt_vttp_old> TYPE zif_gtt_mia_app_types=>tt_vttpvb.
DATA(lr_vttp_new) = mo_ef_parameters->get_appl_table(
iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_item_new ).
DATA(lr_vttp_old) = mo_ef_parameters->get_appl_table(
iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_item_old ).
ASSIGN lr_vttp_new->* TO <lt_vttp_new>.
ASSIGN lr_vttp_old->* TO <lt_vttp_old>.
IF <lt_vttp_new> IS ASSIGNED AND
<lt_vttp_old> IS ASSIGNED.
mt_vttp = <lt_vttp_old>.
SORT mt_vttp BY tknum tpnum.
LOOP AT <lt_vttp_new> ASSIGNING FIELD-SYMBOL(<ls_vttp_new>)
WHERE updkz IS INITIAL.
READ TABLE mt_vttp
WITH KEY tknum = <ls_vttp_new>-tknum
tpnum = <ls_vttp_new>-tpnum
TRANSPORTING NO FIELDS
BINARY SEARCH.
IF sy-subrc <> 0.
INSERT <ls_vttp_new> INTO mt_vttp INDEX sy-tabix.
ENDIF.
ENDLOOP.
ELSE.
MESSAGE e002(zgtt_mia) WITH 'VTTP' INTO DATA(lv_dummy).
zcl_gtt_mia_tools=>throw_exception( ).
ENDIF.
ENDMETHOD.
METHOD init_vtts.
FIELD-SYMBOLS: <lt_vtts_new> TYPE zif_gtt_mia_app_types=>tt_vttsvb,
<lt_vtts_old> TYPE zif_gtt_mia_app_types=>tt_vttsvb.
DATA(lr_vtts_new) = mo_ef_parameters->get_appl_table(
iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_stage_new ).
DATA(lr_vtts_old) = mo_ef_parameters->get_appl_table(
iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_stage_old ).
ASSIGN lr_vtts_new->* TO <lt_vtts_new>.
ASSIGN lr_vtts_old->* TO <lt_vtts_old>.
IF <lt_vtts_new> IS ASSIGNED AND
<lt_vtts_old> IS ASSIGNED.
mt_vtts = <lt_vtts_old>.
SORT mt_vtts BY tknum tsnum.
LOOP AT <lt_vtts_new> ASSIGNING FIELD-SYMBOL(<ls_vtts_new>)
WHERE updkz IS INITIAL.
READ TABLE mt_vtts
WITH KEY tknum = <ls_vtts_new>-tknum
tsnum = <ls_vtts_new>-tsnum
TRANSPORTING NO FIELDS
BINARY SEARCH.
IF sy-subrc <> 0.
INSERT <ls_vtts_new> INTO mt_vtts INDEX sy-tabix.
ENDIF.
ENDLOOP.
ELSE.
MESSAGE e002(zgtt_mia) WITH 'VTTS' INTO DATA(lv_dummy).
zcl_gtt_mia_tools=>throw_exception( ).
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
70,
926,
62,
20730,
62,
1477,
62,
7890,
62,
727,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
891,
62,
17143,
7307,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
891,
62,
17143,
7307,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
463,
76,
62,
20500,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
85,
926,
74,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
21062,
62,
85,
926,
74,
8,
41876,
4526,
37,
5390,
1366,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
85,
29281,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
21062,
62,
85,
29281,
8,
41876,
4526,
37,
5390,
1366,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
36540,
912,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
21062,
62,
36540,
912,
8,
41876,
4526,
37,
5390,
1366,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
85,
912,
79,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
21062,
62,
85,
912,
79,
8,
41876,
4526,
37,
5390,
1366,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42865,
6941,
62,
891,
62,
17143,
7307,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
891,
62,
17143,
7307,
764,
198,
220,
220,
220,
42865,
45079,
62,
85,
926,
74,
41876,
1976,
361,
62,
70,
926,
62,
20730,
62,
1324,
62,
19199,
14804,
926,
62,
85,
926,
74,
85,
65,
764,
198,
220,
220,
220,
42865,
45079,
62,
85,
29281,
41876,
1976,
361,
62,
70,
926,
62,
20730,
62,
1324,
62,
19199,
14804,
926,
62,
85,
29281,
85,
65,
764,
198,
220,
220,
220,
42865,
45079,
62,
36540,
912,
41876,
1976,
361,
62,
70,
926,
62,
20730,
62,
1324,
62,
19199,
14804,
926,
62,
36540,
912,
85,
65,
764,
198,
220,
220,
220,
42865,
45079,
62,
85,
912,
79,
41876,
1976,
361,
62,
70,
926,
62,
20730,
62,
1324,
62,
19199,
14804,
926,
62,
85,
912,
79,
85,
65,
764,
628,
220,
220,
220,
337,
36252,
50,
2315,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
463,
76,
62,
20500,
764,
198,
220,
220,
220,
337,
36252,
50,
2315,
62,
85,
926,
74,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
463,
76,
62,
20500,
764,
198,
220,
220,
220,
337,
36252,
50,
2315,
62,
85,
29281,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
463,
76,
62,
20500,
764,
198,
220,
220,
220,
337,
36252,
50,
2315,
62,
36540,
912,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
463,
76,
62,
20500,
764,
198,
220,
220,
220,
337,
36252,
50,
2315,
62,
85,
912,
79,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
463,
76,
62,
20500,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
70,
926,
62,
20730,
62,
1477,
62,
7890,
62,
727,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
6941,
62,
891,
62,
17143,
7307,
220,
796,
33245,
62,
891,
62,
17143,
7307,
13,
628,
220,
220,
220,
2315,
7,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
85,
912,
79,
13,
628,
220,
220,
220,
374,
81,
62,
85,
912,
79,
220,
220,
796,
4526,
37,
1303,
7,
45079,
62,
85,
912,
79,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
85,
926,
74,
13,
628,
220,
220,
220,
374,
81,
62,
85,
926,
74,
220,
220,
796,
4526,
37,
1303,
7,
45079,
62,
85,
926,
74,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
85,
29281,
13,
628,
220,
220,
220,
374,
81,
62,
85,
29281,
220,
220,
796,
4526,
37,
1303,
7,
45079,
62,
85,
29281,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
36540,
912,
13,
628,
220,
220,
220,
374,
81,
62,
36540,
912,
220,
220,
796,
4526,
37,
1303,
7,
45079,
62,
36540,
912,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
2315,
13,
628,
220,
220,
220,
2315,
62,
85,
926,
74,
7,
6739,
628,
220,
220,
220,
2315,
62,
85,
29281,
7,
6739,
628,
220,
220,
220,
2315,
62,
36540,
912,
7,
6739,
628,
220,
220,
220,
2315,
62,
85,
912,
79,
7,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
2315,
62,
85,
912,
79,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
2528,
62,
85,
912,
79,
62,
3605,
29,
41876,
1976,
361,
62,
70,
926,
62,
20730,
62,
1324,
62,
19199,
14804,
926,
62,
85,
912,
79,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
2528,
62,
85,
912,
79,
62,
727,
29,
41876,
1976,
361,
62,
70,
926,
62,
20730,
62,
1324,
62,
19199,
14804,
926,
62,
85,
912,
79,
85,
65,
13,
628,
220,
220,
220,
42865,
7,
14050,
62,
85,
912,
79,
62,
3605,
8,
796,
6941,
62,
891,
62,
17143,
7307,
3784,
1136,
62,
1324,
75,
62,
11487,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS y_check_check_in_loop DEFINITION PUBLIC INHERITING FROM y_check_base CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor .
PROTECTED SECTION.
METHODS inspect_tokens REDEFINITION.
PRIVATE SECTION.
METHODS get_back_statement IMPORTING structure TYPE sstruc
RETURNING VALUE(result) TYPE sstmnt.
ENDCLASS.
CLASS y_check_check_in_loop IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
settings-pseudo_comment = '"#EC CHECK_IN_LOOP' ##NO_TEXT.
settings-disable_threshold_selection = abap_true.
settings-threshold = 0.
settings-documentation = |{ c_docs_path-checks }check-in-loop.md|.
relevant_statement_types = VALUE #( ( scan_struc_stmnt_type-check ) ).
relevant_structure_types = VALUE #( ).
set_check_message( 'Use an IF statement in combination with CONTINUE instead CHECK!' ).
ENDMETHOD.
METHOD inspect_tokens.
CHECK get_token_abs( statement-from ) = 'CHECK'.
CHECK get_token_abs( get_back_statement( structure )-from ) = 'LOOP'.
DATA(check_configuration) = detect_check_configuration( statement ).
raise_error( statement_level = statement-level
statement_index = index
statement_from = statement-from
check_configuration = check_configuration ).
ENDMETHOD.
METHOD get_back_statement.
TRY.
DATA(back_structure) = ref_scan->structures[ structure-back ].
result = ref_scan->statements[ back_structure-stmnt_from ].
CATCH cx_sy_itab_line_not_found.
CLEAR result.
ENDTRY.
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
62,
9122,
62,
9122,
62,
259,
62,
26268,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
331,
62,
9122,
62,
8692,
29244,
6158,
44731,
764,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
23772,
764,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
10104,
62,
83,
482,
641,
23848,
36,
20032,
17941,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
1891,
62,
26090,
30023,
9863,
2751,
4645,
220,
220,
220,
220,
41876,
264,
19554,
66,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
20274,
8,
41876,
264,
301,
76,
429,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
331,
62,
9122,
62,
9122,
62,
259,
62,
26268,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
2208,
3784,
41571,
273,
7,
6739,
628,
220,
220,
220,
6460,
12,
7752,
12003,
62,
23893,
796,
705,
1,
2,
2943,
5870,
25171,
62,
1268,
62,
21982,
3185,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
6460,
12,
40223,
62,
400,
10126,
62,
49283,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
6460,
12,
400,
10126,
796,
657,
13,
198,
220,
220,
220,
6460,
12,
22897,
341,
796,
930,
90,
269,
62,
31628,
62,
6978,
12,
42116,
1782,
9122,
12,
259,
12,
26268,
13,
9132,
91,
13,
628,
220,
220,
220,
5981,
62,
26090,
62,
19199,
796,
26173,
8924,
1303,
7,
357,
9367,
62,
19554,
66,
62,
301,
76,
429,
62,
4906,
12,
9122,
1267,
6739,
198,
220,
220,
220,
5981,
62,
301,
5620,
62,
19199,
796,
26173,
8924,
1303,
7,
6739,
628,
220,
220,
220,
900,
62,
9122,
62,
20500,
7,
705,
11041,
281,
16876,
2643,
287,
6087,
351,
43659,
8924,
2427,
5870,
25171,
13679,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
10104,
62,
83,
482,
641,
13,
198,
220,
220,
220,
5870,
25171,
651,
62,
30001,
62,
8937,
7,
2643,
12,
6738,
1267,
796,
705,
50084,
4458,
198,
220,
220,
220,
5870,
25171,
651,
62,
30001,
62,
8937,
7,
651,
62,
1891,
62,
26090,
7,
4645,
1267,
12,
6738,
1267,
796,
705,
21982,
3185,
4458,
628,
220,
220,
220,
42865,
7,
9122,
62,
11250,
3924,
8,
796,
4886,
62,
9122,
62,
11250,
3924,
7,
2643,
6739,
628,
220,
220,
220,
5298,
62,
18224,
7,
2643,
62,
5715,
796,
2643,
12,
5715,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2643,
62,
9630,
796,
6376,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2643,
62,
6738,
796,
2643,
12,
6738,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2198,
62,
11250,
3924,
796,
2198,
62,
11250,
3924,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
1891,
62,
26090,
13,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
42865,
7,
1891,
62,
301,
5620,
8,
796,
1006,
62,
35836,
3784,
7249,
942,
58,
4645,
12,
1891,
20740,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
1006,
62,
35836,
3784,
14269,
3196,
58,
736,
62,
301,
5620,
12,
301,
76,
429,
62,
6738,
20740,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
1837,
62,
270,
397,
62,
1370,
62,
1662,
62,
9275,
13,
198,
220,
220,
220,
220,
220,
220,
220,
30301,
1503,
1255,
13,
198,
220,
220,
220,
23578,
40405,
13,
198,
220,
23578,
49273,
13,
628,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*"* use this source file for any type of declarations (class
*"* definitions, interfaces or type declarations) you need for
*"* components in the private section
CLASS lcl_query_executor_base DEFINITION
ABSTRACT.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING
if_count_only TYPE abap_bool
iv_row_count TYPE i
io_query TYPE REF TO zcl_dbbr_sql_query.
PROTECTED SECTION.
TYPES:
BEGIN OF ty_s_tab_field_type,
typekind TYPE typekind,
length TYPE i,
decimals TYPE i,
type_ref TYPE REF TO cl_abap_elemdescr,
END OF ty_s_tab_field_type,
ty_t_tab_field_type TYPE HASHED TABLE OF ty_s_tab_field_type WITH UNIQUE KEY typekind length decimals.
CONSTANTS:
c_dec_types_table TYPE tabname VALUE 'DDDDLDECTYPES'.
DATA:
"! <p class="shorttext synchronized" lang="en">Query Result</p>
ms_query_result TYPE zdbbr_dp_table_data,
mr_query_result TYPE REF TO data,
mf_count_only TYPE abap_bool,
mo_query TYPE REF TO zcl_dbbr_sql_query,
mt_tab_field_types TYPE ty_t_tab_field_type,
mv_row_count TYPE i.
METHODS:
process_query_result,
get_fallback_type
IMPORTING
iv_type_kind TYPE typekind
iv_length TYPE i OPTIONAL
iv_decimals TYPE i OPTIONAL
RETURNING
VALUE(result) TYPE REF TO cl_abap_elemdescr.
PRIVATE SECTION.
ENDCLASS.
CLASS lcl_query_executor DEFINITION
INHERITING FROM lcl_query_executor_base.
PUBLIC SECTION.
METHODS:
"! <p class="shorttext synchronized" lang="en">Execute the entered query and display the results</p>
execute_query
EXPORTING
et_data_info TYPE zdbbr_dp_col_metadata_t
ev_execution_time TYPE string
ev_message TYPE string
ev_message_type TYPE sy-msgty
ev_line_count TYPE zdbbr_no_of_lines
er_data TYPE REF TO data,
"! <p class="shorttext synchronized" lang="en">Will be called upon finished query execution</p>
execute_query_finished
IMPORTING
p_task TYPE clike.
PROTECTED SECTION.
PRIVATE SECTION.
DATA:
"! <p class="shorttext synchronized" lang="en">Completion Check for asynchronous syntax check</p>
mf_async_finished TYPE abap_bool.
ENDCLASS.
CLASS lcl_query_async_executor DEFINITION
INHERITING FROM lcl_query_executor_base.
PUBLIC SECTION.
METHODS:
execute_query,
"! <p class="shorttext synchronized" lang="en">Will be called upon finished query execution</p>
execute_query_finished
IMPORTING
p_task TYPE clike.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_dbbr_sql_query_exec DEFINITION LOCAL FRIENDS lcl_query_async_executor.
| [
9,
1,
9,
779,
428,
2723,
2393,
329,
597,
2099,
286,
31713,
357,
4871,
198,
9,
1,
9,
17336,
11,
20314,
393,
2099,
31713,
8,
345,
761,
329,
198,
9,
1,
9,
6805,
287,
262,
2839,
2665,
198,
31631,
300,
565,
62,
22766,
62,
18558,
38409,
62,
8692,
5550,
20032,
17941,
198,
220,
9564,
18601,
10659,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
62,
9127,
62,
8807,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
808,
62,
9127,
220,
41876,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
22766,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
9945,
1671,
62,
25410,
62,
22766,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
82,
62,
8658,
62,
3245,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2099,
11031,
41876,
2099,
11031,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4129,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
875,
320,
874,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2099,
62,
5420,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
11129,
9132,
3798,
81,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
82,
62,
8658,
62,
3245,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
1259,
62,
83,
62,
8658,
62,
3245,
62,
4906,
41876,
367,
11211,
1961,
43679,
3963,
1259,
62,
82,
62,
8658,
62,
3245,
62,
4906,
13315,
4725,
33866,
8924,
35374,
2099,
11031,
4129,
875,
320,
874,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
269,
62,
12501,
62,
19199,
62,
11487,
220,
41876,
7400,
3672,
26173,
8924,
705,
16458,
16458,
11163,
9782,
48232,
1546,
4458,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
20746,
25414,
3556,
79,
29,
198,
220,
220,
220,
220,
220,
13845,
62,
22766,
62,
20274,
220,
220,
220,
41876,
1976,
9945,
1671,
62,
26059,
62,
11487,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
285,
81,
62,
22766,
62,
20274,
220,
220,
220,
41876,
4526,
37,
5390,
1366,
11,
198,
220,
220,
220,
220,
220,
285,
69,
62,
9127,
62,
8807,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
6941,
62,
22766,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
9945,
1671,
62,
25410,
62,
22766,
11,
198,
220,
220,
220,
220,
220,
45079,
62,
8658,
62,
3245,
62,
19199,
41876,
1259,
62,
83,
62,
8658,
62,
3245,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
285,
85,
62,
808,
62,
9127,
220,
220,
220,
220,
220,
220,
41876,
1312,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1429,
62,
22766,
62,
20274,
11,
198,
220,
220,
220,
220,
220,
651,
62,
7207,
1891,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
4906,
62,
11031,
220,
41876,
2099,
11031,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
13664,
220,
220,
220,
220,
41876,
1312,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
12501,
320,
874,
220,
220,
41876,
1312,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
11129,
9132,
3798,
81,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
22766,
62,
18558,
38409,
5550,
20032,
17941,
198,
220,
3268,
16879,
2043,
2751,
16034,
300,
565,
62,
22766,
62,
18558,
38409,
62,
8692,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
23002,
1133,
262,
5982,
12405,
290,
3359,
262,
2482,
3556,
79,
29,
198,
220,
220,
220,
220,
220,
12260,
62,
22766,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2123,
62,
7890,
62,
10951,
220,
220,
220,
220,
220,
41876,
1976,
9945,
1671,
62,
26059,
62,
4033,
62,
38993,
62,
83,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
819,
62,
18558,
1009,
62,
2435,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
819,
62,
20500,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
819,
62,
20500,
62,
4906,
220,
220,
41876,
827,
12,
19662,
774,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
819,
62,
1370,
62,
9127,
220,
220,
220,
220,
41876,
1976,
9945,
1671,
62,
3919,
62,
1659,
62,
6615,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1931,
62,
7890,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1366,
11,
198,
220,
220,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
8743,
307,
1444,
2402,
5201,
12405,
9706,
3556,
79,
29,
198,
220,
220,
220,
220,
220,
12260,
62,
22766,
62,
43952,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
35943,
41876,
537,
522,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
REPORT zags_migration_03.
START-OF-SELECTION.
PERFORM run.
FORM run.
DATA: lt_branches TYPE STANDARD TABLE OF zags_branches WITH DEFAULT KEY,
ls_branch LIKE LINE OF lt_branches,
lt_repos TYPE STANDARD TABLE OF zags_repos WITH DEFAULT KEY,
ls_repo LIKE LINE OF lt_repos,
lv_name TYPE zags_branches-name.
SELECT * FROM zags_branches INTO TABLE lt_branches.
LOOP AT lt_branches INTO ls_branch WHERE NOT name CA '/'.
CONCATENATE 'refs/heads/' ls_branch-name INTO lv_name.
UPDATE zags_branches SET name = lv_name
WHERE repo = ls_branch-repo
AND branch = ls_branch-branch.
ASSERT sy-subrc = 0.
ENDLOOP.
SELECT * FROM zags_repos INTO TABLE lt_repos.
LOOP AT lt_repos INTO ls_repo WHERE NOT head CA '/'.
CONCATENATE 'refs/heads/' ls_repo-head INTO lv_name.
UPDATE zags_repos SET head = lv_name
WHERE repo = ls_repo-repo.
ASSERT sy-subrc = 0.
ENDLOOP.
WRITE: / 'Done'.
ENDFORM.
| [
2200,
15490,
1976,
3775,
62,
76,
4254,
62,
3070,
13,
198,
198,
2257,
7227,
12,
19238,
12,
46506,
2849,
13,
198,
220,
19878,
21389,
1057,
13,
198,
198,
21389,
1057,
13,
628,
220,
42865,
25,
300,
83,
62,
1671,
12140,
41876,
49053,
9795,
43679,
3963,
1976,
3775,
62,
1671,
12140,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
1671,
3702,
220,
220,
34178,
48920,
3963,
300,
83,
62,
1671,
12140,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
260,
1930,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
1976,
3775,
62,
260,
1930,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
260,
7501,
220,
220,
220,
220,
34178,
48920,
3963,
300,
83,
62,
260,
1930,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
3672,
220,
220,
220,
220,
41876,
1976,
3775,
62,
1671,
12140,
12,
3672,
13,
628,
198,
220,
33493,
1635,
16034,
1976,
3775,
62,
1671,
12140,
39319,
43679,
300,
83,
62,
1671,
12140,
13,
198,
220,
17579,
3185,
5161,
300,
83,
62,
1671,
12140,
39319,
43979,
62,
1671,
3702,
33411,
5626,
1438,
7257,
31051,
4458,
198,
220,
220,
220,
39962,
1404,
1677,
6158,
705,
5420,
82,
14,
16600,
14,
6,
43979,
62,
1671,
3702,
12,
3672,
39319,
300,
85,
62,
3672,
13,
198,
220,
220,
220,
35717,
1976,
3775,
62,
1671,
12140,
25823,
1438,
796,
300,
85,
62,
3672,
198,
220,
220,
220,
220,
220,
33411,
29924,
796,
43979,
62,
1671,
3702,
12,
260,
7501,
198,
220,
220,
220,
220,
220,
5357,
8478,
796,
43979,
62,
1671,
3702,
12,
1671,
3702,
13,
198,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
23578,
21982,
3185,
13,
628,
220,
33493,
1635,
16034,
1976,
3775,
62,
260,
1930,
39319,
43679,
300,
83,
62,
260,
1930,
13,
198,
220,
17579,
3185,
5161,
300,
83,
62,
260,
1930,
39319,
43979,
62,
260,
7501,
33411,
5626,
1182,
7257,
31051,
4458,
198,
220,
220,
220,
39962,
1404,
1677,
6158,
705,
5420,
82,
14,
16600,
14,
6,
43979,
62,
260,
7501,
12,
2256,
39319,
300,
85,
62,
3672,
13,
198,
220,
220,
220,
35717,
1976,
3775,
62,
260,
1930,
25823,
1182,
796,
300,
85,
62,
3672,
198,
220,
220,
220,
220,
220,
33411,
29924,
796,
43979,
62,
260,
7501,
12,
260,
7501,
13,
198,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
23578,
21982,
3185,
13,
628,
220,
44423,
25,
1220,
705,
45677,
4458,
198,
198,
1677,
8068,
1581,
44,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1
] |
CLASS zcl_wasm_memory DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
METHODS stack_push
IMPORTING
!ii_value TYPE REF TO zif_wasm_value .
METHODS stack_pop
RETURNING
VALUE(ri_value) TYPE REF TO zif_wasm_value .
METHODS stack_pop_i32
RETURNING
VALUE(ro_value) TYPE REF TO zcl_wasm_i32 .
METHODS stack_peek
RETURNING
VALUE(ri_value) TYPE REF TO zif_wasm_value .
METHODS stack_length
RETURNING
VALUE(rv_length) TYPE i .
METHODS local_push
IMPORTING
!ii_value TYPE REF TO zif_wasm_value .
METHODS local_get
IMPORTING
!iv_index TYPE i
RETURNING
VALUE(ri_value) TYPE REF TO zif_wasm_value .
PROTECTED SECTION.
DATA mt_stack TYPE STANDARD TABLE OF REF TO zif_wasm_value WITH DEFAULT KEY.
DATA mt_locals TYPE STANDARD TABLE OF REF TO zif_wasm_value WITH DEFAULT KEY.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_WASM_MEMORY IMPLEMENTATION.
METHOD local_get.
DATA(lv_index) = iv_index + 1.
READ TABLE mt_locals INDEX lv_index INTO ri_value.
ASSERT sy-subrc = 0.
ENDMETHOD.
METHOD local_push.
APPEND ii_value TO mt_locals.
ENDMETHOD.
METHOD stack_length.
rv_length = lines( mt_stack ).
ENDMETHOD.
METHOD stack_peek.
DATA(lv_last) = lines( mt_stack ).
READ TABLE mt_stack INDEX lv_last INTO ri_value.
ENDMETHOD.
METHOD stack_pop.
ASSERT lines( mt_stack ) > 0.
DATA(lv_last) = lines( mt_stack ).
READ TABLE mt_stack INDEX lv_last INTO ri_value.
DELETE mt_stack INDEX lv_last.
ENDMETHOD.
METHOD stack_pop_i32.
DATA(li_pop) = stack_pop( ).
ASSERT li_pop->get_type( ) = zcl_wasm_types=>c_value_type-i32.
ro_value ?= li_pop.
ENDMETHOD.
METHOD stack_push.
APPEND ii_value TO mt_stack.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
86,
8597,
62,
31673,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
8931,
62,
14689,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
8367,
41876,
4526,
37,
5390,
1976,
361,
62,
86,
8597,
62,
8367,
764,
198,
220,
220,
220,
337,
36252,
50,
8931,
62,
12924,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
8367,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
86,
8597,
62,
8367,
764,
198,
220,
220,
220,
337,
36252,
50,
8931,
62,
12924,
62,
72,
2624,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
8367,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
86,
8597,
62,
72,
2624,
764,
198,
220,
220,
220,
337,
36252,
50,
8931,
62,
431,
988,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
8367,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
86,
8597,
62,
8367,
764,
198,
220,
220,
220,
337,
36252,
50,
8931,
62,
13664,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
13664,
8,
41876,
1312,
764,
198,
220,
220,
220,
337,
36252,
50,
1957,
62,
14689,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
8367,
41876,
4526,
37,
5390,
1976,
361,
62,
86,
8597,
62,
8367,
764,
198,
220,
220,
220,
337,
36252,
50,
1957,
62,
1136,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
9630,
220,
220,
220,
220,
220,
220,
41876,
1312,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
8367,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
86,
8597,
62,
8367,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
42865,
45079,
62,
25558,
41876,
49053,
9795,
43679,
3963,
4526,
37,
5390,
1976,
361,
62,
86,
8597,
62,
8367,
13315,
5550,
38865,
35374,
13,
198,
220,
220,
220,
42865,
45079,
62,
17946,
874,
41876,
49053,
9795,
43679,
3963,
4526,
37,
5390,
1976,
361,
62,
86,
8597,
62,
8367,
13315,
5550,
38865,
35374,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
54,
1921,
44,
62,
44,
3620,
15513,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1957,
62,
1136,
13,
628,
220,
220,
220,
42865,
7,
6780,
62,
9630,
8,
796,
21628,
62,
9630,
1343,
352,
13,
198,
220,
220,
220,
20832,
43679,
45079,
62,
17946,
874,
24413,
6369,
300,
85,
62,
9630,
39319,
374,
72,
62,
8367,
13,
198,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1957,
62,
14689,
13,
628,
220,
220,
220,
43504,
10619,
21065,
62,
8367,
5390,
45079,
62,
17946,
874,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
8931,
62,
13664,
13,
628,
220,
220,
220,
374,
85,
62,
13664,
796,
3951,
7,
45079,
62,
25558,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
8931,
62,
431,
988,
13,
628,
220,
220,
220,
42865,
7,
6780,
62,
12957,
8,
796,
3951,
7,
45079,
62,
25558,
6739,
198,
220,
220,
220,
20832,
43679,
45079,
62,
25558,
24413,
6369,
300,
85,
62,
12957,
39319,
374,
72,
62,
8367,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
8931,
62,
12924,
13,
628,
220,
220,
220,
24994,
17395,
3951,
7,
45079,
62,
25558,
1267,
1875,
657,
13,
628,
220,
220,
220,
42865,
7,
6780,
62,
12957,
8,
796,
3951,
7,
45079,
62,
25558,
6739,
198,
220,
220,
220,
20832,
43679,
45079,
62,
25558,
24413,
6369,
300,
85,
62,
12957,
39319,
374,
72,
62,
8367,
13,
198,
220,
220,
220,
5550,
2538,
9328,
45079,
62,
25558,
24413,
6369,
300,
85,
62,
12957,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
8931,
62,
12924,
62,
72,
2624,
13,
628,
220,
220,
220,
42865,
7,
4528,
62,
12924,
8,
796,
8931,
62,
12924,
7,
6739,
628,
220,
220,
220,
24994,
17395,
7649,
62,
12924,
3784,
1136,
62,
4906,
7,
1267,
796,
1976,
565,
62,
86,
8597,
62,
19199,
14804,
66,
62,
8367,
62,
4906,
12,
72,
2624,
13,
628,
220,
220,
220,
686,
62,
8367,
5633,
28,
7649,
62,
12924,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
8931,
62,
14689,
13,
628,
220,
220,
220,
43504,
10619,
21065,
62,
8367,
5390,
45079,
62,
25558,
13,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class zcl_oo_plugin_provider definition
public final.
public section.
types:
begin of t_implementation,
info type zif_oo_plugin=>t_plugin_info,
instance type ref to zif_oo_plugin,
end of t_implementation,
tt_implementations type sorted table of t_implementation with unique key info.
class-methods get_all
importing
category type zif_oo_plugin=>t_plugin_info-category
returning
value(results) type tt_implementations.
class-methods get_by_id
importing
category type zif_oo_plugin=>t_plugin_info-category
id type zif_oo_plugin=>t_plugin_info-id
returning
value(results) type t_implementation.
class-methods get_enabled
importing
category type zif_oo_plugin=>t_plugin_info-category
returning
value(results) type tt_implementations.
class-data: cache type tt_implementations.
endclass.
class zcl_oo_plugin_provider implementation.
method get_all.
if cache is not initial.
results = cache.
return.
endif.
try.
data: impl type ref to zif_oo_plugin.
data(intf) = new cl_oo_interface( zif_oo_plugin=>plugin_interface ).
data(implementations) = intf->get_implementing_classes( ).
loop at implementations assigning field-symbol(<impl>).
create object impl type (<impl>-clsname).
data(info) = impl->get_info( ).
if info-category = category.
insert value #(
info = impl->get_info( )
instance = impl ) into table results.
endif.
endloop.
catch cx_root.
endtry.
cache = results.
endmethod.
method get_enabled.
data(all) = get_all( category ).
loop at all assigning field-symbol(<one>).
if <one>-instance->is_enabled( ).
insert <one> into table results.
endif.
endloop.
endmethod.
method get_by_id.
try.
data(sane_category) = to_upper( condense( category ) ).
data(sane_id) = to_upper( condense( id ) ).
results = cache[ info-category = sane_category info-id = sane_id ].
catch cx_root.
endtry.
endmethod.
endclass.
| [
4871,
1976,
565,
62,
2238,
62,
33803,
62,
15234,
1304,
6770,
198,
220,
1171,
2457,
13,
628,
220,
1171,
2665,
13,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
2221,
286,
256,
62,
320,
32851,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7508,
220,
220,
220,
220,
2099,
1976,
361,
62,
2238,
62,
33803,
14804,
83,
62,
33803,
62,
10951,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4554,
2099,
1006,
284,
1976,
361,
62,
2238,
62,
33803,
11,
198,
220,
220,
220,
220,
220,
886,
286,
256,
62,
320,
32851,
11,
198,
220,
220,
220,
220,
220,
256,
83,
62,
320,
26908,
602,
2099,
23243,
3084,
286,
256,
62,
320,
32851,
351,
3748,
1994,
7508,
13,
628,
220,
220,
220,
1398,
12,
24396,
82,
651,
62,
439,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
6536,
220,
220,
220,
220,
220,
220,
2099,
1976,
361,
62,
2238,
62,
33803,
14804,
83,
62,
33803,
62,
10951,
12,
22872,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
43420,
8,
2099,
256,
83,
62,
320,
26908,
602,
13,
628,
220,
220,
220,
1398,
12,
24396,
82,
651,
62,
1525,
62,
312,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
6536,
220,
220,
220,
220,
220,
220,
2099,
1976,
361,
62,
2238,
62,
33803,
14804,
83,
62,
33803,
62,
10951,
12,
22872,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
1976,
361,
62,
2238,
62,
33803,
14804,
83,
62,
33803,
62,
10951,
12,
312,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
43420,
8,
2099,
256,
62,
320,
32851,
13,
628,
198,
220,
220,
220,
1398,
12,
24396,
82,
651,
62,
25616,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
6536,
220,
220,
220,
220,
220,
220,
2099,
1976,
361,
62,
2238,
62,
33803,
14804,
83,
62,
33803,
62,
10951,
12,
22872,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
43420,
8,
2099,
256,
83,
62,
320,
26908,
602,
13,
628,
220,
220,
220,
1398,
12,
7890,
25,
12940,
2099,
256,
83,
62,
320,
26908,
602,
13,
198,
198,
437,
4871,
13,
628,
198,
4871,
1976,
565,
62,
2238,
62,
33803,
62,
15234,
1304,
7822,
13,
628,
220,
2446,
651,
62,
439,
13,
628,
220,
220,
220,
611,
12940,
318,
407,
4238,
13,
198,
220,
220,
220,
220,
220,
2482,
796,
12940,
13,
198,
220,
220,
220,
220,
220,
1441,
13,
198,
220,
220,
220,
45762,
13,
628,
220,
220,
220,
1949,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
25,
4114,
2099,
1006,
284,
1976,
361,
62,
2238,
62,
33803,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
7,
600,
69,
8,
796,
649,
537,
62,
2238,
62,
39994,
7,
1976,
361,
62,
2238,
62,
33803,
14804,
33803,
62,
39994,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
7,
320,
26908,
602,
8,
796,
493,
69,
3784,
1136,
62,
320,
26908,
278,
62,
37724,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
9052,
379,
25504,
38875,
2214,
12,
1837,
23650,
7,
27,
23928,
29,
737,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2251,
2134,
4114,
2099,
38155,
23928,
29,
12,
565,
82,
3672,
737,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
7,
10951,
8,
796,
4114,
3784,
1136,
62,
10951,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
7508,
12,
22872,
796,
6536,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7550,
1988,
1303,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7508,
796,
4114,
3784,
1136,
62,
10951,
7,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4554,
796,
4114,
1267,
656,
3084,
2482,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45762,
13,
198,
220,
220,
220,
220,
220,
220,
220,
886,
26268,
13,
198,
220,
220,
220,
220,
220,
4929,
43213,
62,
15763,
13,
198,
220,
220,
220,
886,
28311,
13,
628,
220,
220,
220,
12940,
796,
2482,
13,
198,
220,
886,
24396,
13,
628,
220,
2446,
651,
62,
25616,
13,
198,
220,
220,
220,
1366,
7,
439,
8,
796,
651,
62,
439,
7,
6536,
6739,
198,
220,
220,
220,
9052,
379,
477,
38875,
2214,
12,
1837,
23650,
7,
27,
505,
29,
737,
198,
220,
220,
220,
220,
220,
611,
1279,
505,
29,
12,
39098,
3784,
271,
62,
25616,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
7550,
1279,
505,
29,
656,
3084,
2482,
13,
198,
220,
220,
220,
220,
220,
45762,
13,
198,
220,
220,
220,
886,
26268,
13,
198,
220,
886,
24396,
13,
628,
220,
2446,
651,
62,
1525,
62,
312,
13,
198,
220,
220,
220,
1949,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
7,
82,
1531,
62,
22872,
8,
796,
284,
62,
45828,
7,
1779,
1072,
7,
6536,
1267,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
7,
82,
1531,
62,
312,
8,
796,
284,
62,
45828,
7,
1779,
1072,
7,
4686,
1267,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
2482,
796,
12940,
58,
7508,
12,
22872,
796,
33241,
62,
22872,
7508,
12,
312,
796,
33241,
62,
312,
20740,
198,
220,
220,
220,
220,
220,
4929,
43213,
62,
15763,
13,
198,
220,
220,
220,
886,
28311,
13,
198,
220,
886,
24396,
13,
198,
198,
437,
4871,
13,
198
] | [
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">Provides available features</p>
CLASS zcl_adcoset_adt_res_features DEFINITION
PUBLIC
INHERITING FROM cl_adt_rest_resource
FINAL
CREATE PUBLIC.
PUBLIC SECTION.
METHODS:
get REDEFINITION.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS:
c_pcre_available_feature TYPE string VALUE 'pcreAvailable' ##NO_TEXT.
ENDCLASS.
CLASS zcl_adcoset_adt_res_features IMPLEMENTATION.
METHOD get.
DATA(features) = VALUE zif_adcoset_ty_adt_types=>ty_adt_plugin_features(
( endpoint = zcl_adcoset_adt_disc_app=>search_settings_uri
name = c_pcre_available_feature
type = 'Boolean'
category = 'RequestAttribute'
enabled = zcl_adcoset_matcher_factory=>is_pcre_supported( )
description = 'Indicates if Perl-Compatible-Regular-Expressions are available' ) ).
response->set_body_data(
content_handler = zcl_adcoset_adt_ch_factory=>create_feature_list_ch( )
data = features ).
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
15946,
1460,
1695,
3033,
3556,
79,
29,
198,
31631,
1976,
565,
62,
324,
6966,
316,
62,
324,
83,
62,
411,
62,
40890,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
537,
62,
324,
83,
62,
2118,
62,
31092,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
651,
23848,
36,
20032,
17941,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
269,
62,
79,
7513,
62,
15182,
62,
30053,
41876,
4731,
26173,
8924,
705,
79,
7513,
10493,
6,
22492,
15285,
62,
32541,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
324,
6966,
316,
62,
324,
83,
62,
411,
62,
40890,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
651,
13,
198,
220,
220,
220,
42865,
7,
40890,
8,
796,
26173,
8924,
1976,
361,
62,
324,
6966,
316,
62,
774,
62,
324,
83,
62,
19199,
14804,
774,
62,
324,
83,
62,
33803,
62,
40890,
7,
198,
220,
220,
220,
220,
220,
357,
36123,
220,
220,
220,
796,
1976,
565,
62,
324,
6966,
316,
62,
324,
83,
62,
15410,
62,
1324,
14804,
12947,
62,
33692,
62,
9900,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
220,
220,
796,
269,
62,
79,
7513,
62,
15182,
62,
30053,
198,
220,
220,
220,
220,
220,
220,
220,
2099,
220,
220,
220,
220,
220,
220,
220,
796,
705,
46120,
13087,
6,
198,
220,
220,
220,
220,
220,
220,
220,
6536,
220,
220,
220,
796,
705,
18453,
33682,
6,
198,
220,
220,
220,
220,
220,
220,
220,
9343,
220,
220,
220,
220,
796,
1976,
565,
62,
324,
6966,
316,
62,
6759,
2044,
62,
69,
9548,
14804,
271,
62,
79,
7513,
62,
15999,
7,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6764,
796,
705,
5497,
16856,
611,
24316,
12,
7293,
16873,
12,
40164,
12,
38839,
507,
389,
1695,
6,
1267,
6739,
628,
220,
220,
220,
2882,
3784,
2617,
62,
2618,
62,
7890,
7,
198,
220,
220,
220,
220,
220,
2695,
62,
30281,
796,
1976,
565,
62,
324,
6966,
316,
62,
324,
83,
62,
354,
62,
69,
9548,
14804,
17953,
62,
30053,
62,
4868,
62,
354,
7,
1267,
198,
220,
220,
220,
220,
220,
1366,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
3033,
6739,
198,
220,
23578,
49273,
13,
628,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_ABAK_CONTENT_FACTORY definition
public
final
create public .
public section.
class-methods GET_INSTANCE
importing
!I_CONTENT_TYPE type ZABAK_CONTENT_TYPE
!I_CONTENT_PARAM type STRING
returning
value(RO_CONTENT) type ref to ZIF_ABAK_CONTENT
raising
ZCX_ABAK .
PROTECTED SECTION.
private section.
types:
BEGIN OF ty_s_param,
name TYPE string,
value TYPE string,
END OF ty_s_param .
types:
ty_t_param TYPE SORTED TABLE OF ty_s_param WITH UNIQUE KEY name .
constants:
begin of gc_regex,
so10_param TYPE string VALUE '(ID|NAME|SPRAS)=(\w+)', "#EC NOTEXT
end of gc_regex .
class-methods GET_PARAMS
importing
!I_TEXT type STRING
returning
value(RT_PARAM) type TY_T_PARAM
raising
ZCX_ABAK .
ENDCLASS.
CLASS ZCL_ABAK_CONTENT_FACTORY IMPLEMENTATION.
METHOD get_instance.
DATA: so10_name TYPE tdobname.
CASE i_content_type.
WHEN zif_abak_consts=>content_type-inline.
CREATE OBJECT ro_content TYPE zcl_abak_content_inline
EXPORTING
i_text = i_content_param.
WHEN zif_abak_consts=>content_type-url.
CREATE OBJECT ro_content TYPE zcl_abak_content_url
EXPORTING
i_url = i_content_param.
WHEN zif_abak_consts=>content_type-file.
CREATE OBJECT ro_content TYPE zcl_abak_content_file
EXPORTING
i_filepath = i_content_param.
WHEN zif_abak_consts=>content_type-standard_text.
so10_name = i_content_param.
CREATE OBJECT ro_content TYPE zcl_abak_content_so10 " TODO
EXPORTING
* i_id = 'ST'
i_name = so10_name.
* i_spras = sy-langu.
WHEN OTHERS.
RAISE EXCEPTION TYPE zcx_abak
EXPORTING
textid = zcx_abak=>invalid_parameters.
ENDCASE.
ENDMETHOD.
METHOD get_params.
DATA: o_regex TYPE REF TO cl_abap_regex,
o_exp TYPE REF TO cx_root,
o_matcher TYPE REF TO cl_abap_matcher,
t_result type match_result_tab.
TRY.
CREATE OBJECT o_regex
EXPORTING
pattern = gc_regex-so10_param
ignore_case = abap_true.
o_matcher = o_regex->create_matcher( text = i_text ).
t_result = o_matcher->find_all( ).
* TODO
CATCH cx_sy_regex cx_sy_matcher INTO o_exp.
RAISE EXCEPTION TYPE zcx_abak
EXPORTING
previous = o_exp.
ENDTRY.
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
32,
4339,
42,
62,
37815,
3525,
62,
37,
10659,
15513,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
1398,
12,
24396,
82,
17151,
62,
38604,
19240,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
40,
62,
37815,
3525,
62,
25216,
2099,
1168,
32,
4339,
42,
62,
37815,
3525,
62,
25216,
198,
220,
220,
220,
220,
220,
5145,
40,
62,
37815,
3525,
62,
27082,
2390,
2099,
19269,
2751,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
13252,
62,
37815,
3525,
8,
2099,
1006,
284,
1168,
5064,
62,
32,
4339,
42,
62,
37815,
3525,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
19734,
2665,
13,
628,
220,
3858,
25,
198,
220,
220,
220,
347,
43312,
3963,
1259,
62,
82,
62,
17143,
11,
198,
220,
220,
220,
220,
220,
1438,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
1988,
41876,
4731,
11,
198,
220,
220,
220,
23578,
3963,
1259,
62,
82,
62,
17143,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
1259,
62,
83,
62,
17143,
41876,
311,
9863,
1961,
43679,
3963,
1259,
62,
82,
62,
17143,
13315,
4725,
33866,
8924,
35374,
1438,
764,
628,
220,
38491,
25,
198,
220,
220,
220,
2221,
286,
308,
66,
62,
260,
25636,
11,
198,
220,
220,
220,
220,
220,
523,
940,
62,
17143,
41876,
4731,
26173,
8924,
29513,
2389,
91,
20608,
91,
4303,
49,
1921,
35793,
59,
86,
28988,
3256,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
886,
286,
308,
66,
62,
260,
25636,
764,
628,
220,
1398,
12,
24396,
82,
17151,
62,
27082,
40834,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
40,
62,
32541,
2099,
19269,
2751,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
14181,
62,
27082,
2390,
8,
2099,
24412,
62,
51,
62,
27082,
2390,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
32,
4339,
42,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
4339,
42,
62,
37815,
3525,
62,
37,
10659,
15513,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
651,
62,
39098,
13,
198,
220,
220,
220,
42865,
25,
523,
940,
62,
3672,
41876,
41560,
672,
3672,
13,
628,
220,
220,
220,
42001,
1312,
62,
11299,
62,
4906,
13,
198,
220,
220,
220,
220,
220,
42099,
1976,
361,
62,
397,
461,
62,
1102,
6448,
14804,
11299,
62,
4906,
12,
45145,
13,
198,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
11299,
41876,
1976,
565,
62,
397,
461,
62,
11299,
62,
45145,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
5239,
796,
1312,
62,
11299,
62,
17143,
13,
628,
220,
220,
220,
220,
220,
42099,
1976,
361,
62,
397,
461,
62,
1102,
6448,
14804,
11299,
62,
4906,
12,
6371,
13,
198,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
11299,
41876,
1976,
565,
62,
397,
461,
62,
11299,
62,
6371,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
6371,
796,
1312,
62,
11299,
62,
17143,
13,
628,
220,
220,
220,
220,
220,
42099,
1976,
361,
62,
397,
461,
62,
1102,
6448,
14804,
11299,
62,
4906,
12,
7753,
13,
198,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
11299,
41876,
1976,
565,
62,
397,
461,
62,
11299,
62,
7753,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
7753,
6978,
796,
1312,
62,
11299,
62,
17143,
13,
628,
220,
220,
220,
220,
220,
42099,
1976,
361,
62,
397,
461,
62,
1102,
6448,
14804,
11299,
62,
4906,
12,
20307,
62,
5239,
13,
198,
220,
220,
220,
220,
220,
220,
220,
523,
940,
62,
3672,
796,
1312,
62,
11299,
62,
17143,
13,
198,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
11299,
41876,
1976,
565,
62,
397,
461,
62,
11299,
62,
568,
940,
366,
16926,
46,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
9,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
312,
220,
220,
220,
796,
705,
2257,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
3672,
220,
796,
523,
940,
62,
3672,
13,
198,
9,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
34975,
292,
796,
827,
12,
75,
2303,
13,
628,
220,
220,
220,
220,
220,
42099,
440,
4221,
4877,
13,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
24352,
7788,
42006,
2849,
41876,
1976,
66,
87,
62,
397,
461,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
312,
796,
1976,
66,
87,
62,
397,
461,
14804,
259,
12102,
62,
17143,
7307,
13,
198,
220,
220,
220,
23578,
34,
11159,
13,
628,
220,
23578,
49273,
13,
628,
198,
49273,
651,
62,
37266,
13,
628,
220,
42865,
25,
267,
62,
260,
25636,
220,
220,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
260,
25636,
11,
198,
220,
220,
220,
220,
220,
220,
220,
267,
62,
11201,
220,
220,
220,
220,
41876,
4526,
37,
5390,
43213,
62,
15763,
11,
198,
220,
220,
220,
220,
220,
220,
220,
267,
62,
6759,
2044,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
6759,
2044,
11,
198,
220,
220,
220,
220,
220,
220,
220,
256,
62,
20274,
220,
2099,
2872,
62,
20274,
62,
8658,
13,
628,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
267,
62,
260,
25636,
198,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">ABAP Constructor Expression Examples</p>
CLASS ZCL_CONSTRUCTOR_EXPRESSION DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES IF_OO_ADT_CLASSRUN.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES: BEGIN OF STRUCT,
C1 TYPE I,
C2 TYPE C LENGTH 10,
END OF STRUCT.
TYPES T_TAB TYPE STANDARD TABLE OF STRUCT WITH EMPTY KEY.
DATA OTHERTAB TYPE ZCL_SIMPLE_EXAMPLE=>EXAMPLE_TABLE_TYPE.
constants: EXPORTING type string value 'E'.
ENDCLASS.
CLASS ZCL_CONSTRUCTOR_EXPRESSION IMPLEMENTATION.
METHOD IF_OO_ADT_CLASSRUN~MAIN.
****Old Way
DATA DREF TYPE REF TO DATA.
FIELD-SYMBOLS <FS> TYPE STRUCT.
CREATE DATA DREF TYPE STRUCT.
ASSIGN DREF->* TO <FS>.
<FS>-C1 = 10.
<FS>-C2 = 'a'.
****New Way
DATA DREF2 TYPE REF TO DATA.
DREF2 = NEW STRUCT( C1 = 10 C2 = 'a' ).
****Old Way
DATA OREF TYPE REF TO ZCL_SIMPLE_EXAMPLE.
CREATE OBJECT OREF
EXPORTING
INPUT1 = 'a1'
INPUT2 = 'a2'.
****New Way
DATA(OREF2) = NEW ZCL_SIMPLE_EXAMPLE(
INPUT1 = 'a1'
INPUT2 = 'a2' ).
****Old Way
DATA TAB TYPE ZCL_SIMPLE_EXAMPLE=>EXAMPLE_TABLE_TYPE.
DATA LINE LIKE LINE OF TAB.
LINE-C1 = 10.
LINE-C2 = 'a'.
APPEND LINE TO TAB.
LINE-C2 = 'b'.
APPEND LINE TO TAB.
APPEND LINES OF OTHERTAB TO TAB.
ZCL_SIMPLE_EXAMPLE=>METHOD1( TAB ).
****New Way
DATA(TAB2) = VALUE ZCL_SIMPLE_EXAMPLE=>EXAMPLE_TABLE_TYPE(
( C1 = 10 C2 = 'a' )
( C1 = 10 C2 = 'b' )
( LINES OF OTHERTAB ) ).
ZCL_SIMPLE_EXAMPLE=>METHOD1( TAB2 ).
****New Way - Extreme
ZCL_SIMPLE_EXAMPLE=>METHOD1( VALUE #(
C1 = 10
( C2 = 'a' )
( C2 = 'b' )
( LINES OF OTHERTAB ) ) ).
****Dynamic Parameter - Somewhat New Way
DATA DATAREF TYPE REF TO ZCL_SIMPLE_EXAMPLE=>EXAMPLE_TABLE_TYPE.
GET REFERENCE OF TAB INTO DATAREF.
DATA(PTAB) = VALUE ABAP_PARMBIND_TAB(
( NAME = 'TABLE'
KIND = EXPORTING
VALUE = DATAREF ) ).
CALL METHOD ('ZCL_SIMPLE_EXAMPLE')=>('METHOD1') PARAMETER-TABLE PTAB.
****Dynamic Parameter - Really New Way
DATA(PTAB2) = VALUE ABAP_PARMBIND_TAB(
( NAME = 'TABLE'
KIND = EXPORTING
VALUE = REF #( TAB ) ) ).
CALL METHOD ('ZCL_SIMPLE_EXAMPLE')=>('METHOD1') PARAMETER-TABLE PTAB2.
****Old Way
DATA HELPER TYPE STRING.
HELPER = CL_ABAP_CONTEXT_INFO=>GET_USER_FORMATTED_NAME( ).
DATA(XSTR) = CL_ABAP_CONV_CODEPAGE=>CREATE_OUT( )->CONVERT( SOURCE = HELPER ).
****New Way
DATA(XSTR2) = CL_ABAP_CONV_CODEPAGE=>CREATE_OUT( )->CONVERT( SOURCE = CONV #( CL_ABAP_CONTEXT_INFO=>GET_USER_FORMATTED_NAME( ) ) ).
****Old
DATA(I) = 1 / 4.
OUT->WRITE( I ). "output 0
****New
DATA(DF) = CONV DECFLOAT34( 1 / 4 ).
OUT->WRITE( DF ). "output .25
*****Old
* CHECK ` ` = abap_false.
*
*****New
* CHECK CONV abap_bool( ` ` ) = abap_false.
****New
DATA(SQSIZE) = CONV I( LET S = ZCL_SIMPLE_EXAMPLE=>GET_SIZE( )
IN S * S ).
****Old
* DATA STRUCTDESCR TYPE REF TO CL_ABAP_STRUCTDESCR.
* STRUCTDESCR ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( 'T100' ).
* DATA(COMPONENTS) = STRUCTDESCR->COMPONENTS.
****New
* DATA(COMPONENTS2) = CAST CL_ABAP_STRUCTDESCR(
* CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( 'T100' ) )->COMPONENTS.
****Old
TYPES NUMTEXT TYPE N LENGTH 255.
DATA NUMBER TYPE NUMTEXT.
TRY.
* MOVE EXACT '4 Apples + 3 Oranges' TO number. "Not allowed in Steampunk
CATCH CX_SY_CONVERSION_ERROR INTO DATA(EXC).
OUT->WRITE( 'Caught Exact #1' ).
ENDTRY.
****New
TRY.
DATA(NUMBER2) = EXACT NUMTEXT( '4 Apples + 3 Oranges' ).
CATCH CX_SY_CONVERSION_ERROR INTO DATA(EXC2).
OUT->WRITE( 'Caught Exact #2' ).
ENDTRY.
***Old
DATA TIME TYPE STRING.
DATA(NOW) = CL_ABAP_CONTEXT_INFO=>GET_SYSTEM_TIME( ). " sy-timlo.
IF NOW < '120000'.
TIME = |{ NOW TIME = ISO } AM |.
ELSEIF NOW > '120000'.
TIME = |{ CONV T( NOW - 12 * 3600 ) TIME = ISO } PM|.
ELSEIF NOW = '120000'.
TIME = `High Noon`.
ELSE.
TIME = `Call The Doctor, the Tardis is broken`.
ENDIF.
OUT->WRITE( TIME ).
***New
DATA(TIME2) =
COND STRING(
LET NOW2 = CL_ABAP_CONTEXT_INFO=>GET_SYSTEM_TIME( ) IN
WHEN NOW2 < '120000' THEN
|{ NOW2 TIME = ISO } AM |
WHEN NOW2 > '120000' THEN
|{ CONV T( NOW2 - 12 * 3600 ) TIME = ISO } PM|
WHEN NOW2 = '120000' THEN
`High Noon`
ELSE
`Call The Doctor, the Tardis is broken` ).
OUT->WRITE( TIME2 ).
****Old
DATA NUMBER3 TYPE STRING.
CASE SY-INDEX.
WHEN 1.
NUMBER3 = 'one'.
WHEN 2.
NUMBER3 = 'two'.
WHEN 3.
NUMBER3 = 'three'.
WHEN OTHERS.
NUMBER3 = `Who cares?`.
ENDCASE.
OUT->WRITE( NUMBER3 ).
****New
DATA(NUMBER4) = SWITCH STRING( SY-INDEX
WHEN 1 THEN 'one'
WHEN 2 THEN 'two'
WHEN 3 THEN 'three'
ELSE `Who cares?` ).
OUT->WRITE( NUMBER4 ).
DATA FLIGHTS TYPE STANDARD TABLE OF /DMO/FLIGHT.
DATA FLIGHTS2 TYPE STANDARD TABLE OF /DMO/FLIGHT.
DATA LINE2 LIKE LINE OF FLIGHTS2.
SELECT * FROM /DMO/FLIGHT INTO TABLE @FLIGHTS.
****Old
LOOP AT FLIGHTS ASSIGNING FIELD-SYMBOL(<FLIGHT>).
MOVE-CORRESPONDING <FLIGHT> TO LINE2.
LINE2-SEATS_MAX = <FLIGHT>-SEATS_MAX - 10. "Make more room in plane
INSERT LINE2 INTO TABLE FLIGHTS2.
ENDLOOP.
CLEAR: FLIGHTS2, LINE2.
****New
FLIGHTS2 = CORRESPONDING #( FLIGHTS
MAPPING SEATS_MAX = SEATS_MAX "Entire flight is now business class
EXCEPT SEATS_OCCUPIED ). "Empty the plane
****Breakpoint helper
IF SY-SUBRC = 0.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
6242,
2969,
28407,
273,
41986,
21066,
3556,
79,
29,
198,
31631,
1168,
5097,
62,
10943,
46126,
1581,
62,
6369,
32761,
2849,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
16876,
62,
6684,
62,
2885,
51,
62,
31631,
49,
4944,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
19269,
18415,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
327,
16,
41876,
314,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
327,
17,
41876,
327,
406,
49494,
838,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
19269,
18415,
13,
198,
220,
220,
220,
24412,
47,
1546,
309,
62,
5603,
33,
41876,
49053,
9795,
43679,
3963,
19269,
18415,
13315,
38144,
9936,
35374,
13,
198,
220,
220,
220,
42865,
25401,
5603,
33,
41876,
1168,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
14804,
6369,
2390,
16437,
62,
38148,
62,
25216,
13,
628,
220,
220,
220,
38491,
25,
7788,
15490,
2751,
2099,
4731,
1988,
705,
36,
4458,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
10943,
46126,
1581,
62,
6369,
32761,
2849,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
16876,
62,
6684,
62,
2885,
51,
62,
31631,
49,
4944,
93,
5673,
1268,
13,
198,
198,
2466,
19620,
6378,
198,
220,
220,
220,
42865,
360,
31688,
41876,
4526,
37,
5390,
42865,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
1279,
10652,
29,
41876,
19269,
18415,
13,
198,
220,
220,
220,
29244,
6158,
42865,
360,
31688,
41876,
19269,
18415,
13,
198,
220,
220,
220,
24994,
16284,
360,
31688,
3784,
9,
5390,
1279,
10652,
28401,
198,
220,
220,
220,
1279,
10652,
29,
12,
34,
16,
796,
838,
13,
198,
220,
220,
220,
1279,
10652,
29,
12,
34,
17,
796,
705,
64,
4458,
628,
198,
2466,
3791,
6378,
198,
220,
220,
220,
42865,
360,
31688,
17,
41876,
4526,
37,
5390,
42865,
13,
198,
220,
220,
220,
360,
31688,
17,
796,
12682,
19269,
18415,
7,
327,
16,
796,
838,
327,
17,
796,
705,
64,
6,
6739,
628,
198,
2466,
19620,
6378,
198,
220,
220,
220,
42865,
440,
31688,
41876,
4526,
37,
5390,
1168,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
13,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
440,
31688,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
3268,
30076,
16,
796,
705,
64,
16,
6,
198,
220,
220,
220,
220,
220,
220,
220,
3268,
30076,
17,
796,
705,
64,
17,
4458,
628,
198,
2466,
3791,
6378,
198,
220,
220,
220,
42865,
7,
6965,
37,
17,
8,
796,
12682,
1168,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
7,
198,
220,
220,
220,
220,
220,
220,
220,
3268,
30076,
16,
796,
705,
64,
16,
6,
198,
220,
220,
220,
220,
220,
220,
220,
3268,
30076,
17,
796,
705,
64,
17,
6,
6739,
198,
198,
2466,
19620,
6378,
198,
220,
220,
220,
42865,
309,
6242,
41876,
1168,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
14804,
6369,
2390,
16437,
62,
38148,
62,
25216,
13,
198,
220,
220,
220,
42865,
48920,
34178,
48920,
3963,
309,
6242,
13,
198,
220,
220,
220,
48920,
12,
34,
16,
796,
838,
13,
198,
220,
220,
220,
48920,
12,
34,
17,
796,
705,
64,
4458,
198,
220,
220,
220,
43504,
10619,
48920,
5390,
309,
6242,
13,
198,
220,
220,
220,
48920,
12,
34,
17,
796,
705,
65,
4458,
198,
220,
220,
220,
43504,
10619,
48920,
5390,
309,
6242,
13,
198,
220,
220,
220,
43504,
10619,
43277,
1546,
3963,
25401,
5603,
33,
5390,
309,
6242,
13,
198,
220,
220,
220,
1168,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
14804,
49273,
16,
7,
309,
6242,
6739,
198,
198,
2466,
3791,
6378,
198,
220,
220,
220,
42865,
7,
5603,
33,
17,
8,
796,
220,
26173,
8924,
1168,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
14804,
6369,
2390,
16437,
62,
38148,
62,
25216,
7,
198,
220,
220,
220,
220,
220,
220,
220,
357,
327,
16,
796,
838,
327,
17,
796,
705,
64,
6,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
357,
327,
16,
796,
838,
327,
17,
796,
705,
65,
6,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
357,
43277,
1546,
3963,
25401,
5603,
33,
1267,
6739,
198,
220,
220,
220,
1168,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
14804,
49273,
16,
7,
309,
6242,
17,
6739,
198,
198,
2466,
3791,
6378,
532,
18111,
198,
220,
220,
220,
1168,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
14804,
49273,
16,
7,
26173,
8924,
1303,
7,
198,
220,
220,
220,
220,
220,
327,
16,
796,
838,
198,
220,
220,
220,
220,
220,
220,
220,
357,
327,
17,
796,
705,
64,
6,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
357,
327,
17,
796,
705,
65,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
43277,
1546,
3963,
25401,
5603,
33,
1267,
1267,
6739,
628,
198,
2466,
44090,
25139,
2357,
532,
32499,
5183,
968,
6378,
198,
220,
220,
220,
42865,
360,
1404,
12203,
37,
41876,
4526,
37,
5390,
1168,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
14804,
6369,
2390,
16437,
62,
38148,
62,
25216,
13,
198,
220,
220,
220,
17151,
4526,
24302,
18310,
3963,
309,
6242,
39319,
360,
1404,
12203,
37,
13,
198,
220,
220,
220,
42865,
7,
47,
5603,
33,
8,
796,
26173,
8924,
9564,
2969,
62,
27082,
10744,
12115,
62,
5603,
33,
7,
198,
220,
220,
220,
220,
357,
36751,
220,
796,
705,
38148,
6,
198,
220,
220,
220,
220,
220,
220,
509,
12115,
220,
796,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
26173,
8924,
796,
360,
1404,
12203,
37,
1267,
6739,
198,
220,
220,
220,
42815,
337,
36252,
19203,
57,
5097,
62,
48913,
16437,
62,
6369,
2390,
16437,
11537,
14804,
10786,
49273,
16,
11537,
29463,
2390,
2767,
1137,
12,
38148,
350
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Include ZHRO_ACTIVE_DIR_D0
*&---------------------------------------------------------------------*
TABLES: pernr.
INFOTYPES: 0000, 0001, 0002, 0105.
TYPES: BEGIN OF ts_data,
pernr LIKE p0001-pernr,
usrid LIKE p0105-usrid,
nachn LIKE p0002-nachn,
vorna LIKE p0002-vorna,
begda TYPE c LENGTH 10,
mntxt LIKE t529t-mntxt,
stat2 LIKE t529u-text1,
bukrs LIKE p0001-bukrs,
butxt LIKE t001-butxt,
ort01 LIKE t777a-ort01,
kltxt LIKE cskt-ltext,
region TYPE c LENGTH 2,
END OF ts_data.
TYPES: tt_data TYPE STANDARD TABLE OF ts_data,
ts_line TYPE c LENGTH 342,
tt_file TYPE STANDARD TABLE OF ts_line.
DATA: gt_data TYPE tt_data.
DATA: gv_sfile TYPE c LENGTH 255,
gv_path TYPE string,
gv_fullpath TYPE string,
gv_filename TYPE string,
gt_dynpfields TYPE STANDARD TABLE OF dynpread,
gs_dynpfields TYPE dynpread.
CONSTANTS: gc_path1 TYPE c LENGTH 40 VALUE '\\ilnoad08.stericorp.com\AS-SAP Disable\',
gc_path2 TYPE c LENGTH 29 VALUE '\\scvmerpfs\HCM\SRCL AD\',
gc_archive TYPE c LENGTH 7 VALUE 'Archive',
gc_filename TYPE c LENGTH 12 VALUE 'disablelist'.
CONSTANTS: gc_ext TYPE c LENGTH 3 VALUE 'csv'.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
40348,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1168,
39,
13252,
62,
10659,
9306,
62,
34720,
62,
35,
15,
198,
9,
5,
10097,
30934,
9,
198,
5603,
9148,
1546,
25,
583,
48624,
13,
198,
198,
1268,
37,
2394,
48232,
1546,
25,
220,
17643,
11,
3571,
486,
11,
12877,
17,
11,
5534,
2713,
13,
198,
198,
9936,
47,
1546,
25,
347,
43312,
3963,
40379,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
583,
48624,
220,
220,
34178,
279,
18005,
12,
525,
48624,
11,
198,
220,
220,
220,
220,
220,
220,
220,
514,
6058,
220,
220,
34178,
279,
486,
2713,
12,
385,
6058,
11,
198,
220,
220,
220,
220,
220,
220,
220,
299,
620,
77,
220,
220,
34178,
279,
34215,
12,
77,
620,
77,
11,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1211,
64,
220,
220,
34178,
279,
34215,
12,
85,
1211,
64,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4123,
6814,
220,
220,
41876,
269,
406,
49494,
838,
11,
198,
220,
220,
220,
220,
220,
220,
220,
285,
429,
742,
220,
220,
34178,
256,
49721,
83,
12,
76,
429,
742,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1185,
17,
220,
220,
34178,
256,
49721,
84,
12,
5239,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
809,
74,
3808,
220,
220,
34178,
279,
18005,
12,
65,
2724,
3808,
11,
198,
220,
220,
220,
220,
220,
220,
220,
475,
742,
220,
220,
34178,
256,
8298,
12,
4360,
742,
11,
198,
220,
220,
220,
220,
220,
220,
220,
393,
83,
486,
220,
220,
34178,
256,
29331,
64,
12,
419,
486,
11,
198,
220,
220,
220,
220,
220,
220,
220,
479,
2528,
742,
220,
220,
34178,
269,
8135,
83,
12,
75,
5239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3814,
220,
41876,
269,
406,
49494,
362,
11,
198,
220,
220,
220,
220,
220,
220,
23578,
3963,
40379,
62,
7890,
13,
198,
198,
9936,
47,
1546,
25,
256,
83,
62,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
40379,
62,
1370,
41876,
269,
406,
49494,
44341,
11,
198,
220,
220,
220,
220,
220,
220,
256,
83,
62,
7753,
41876,
49053,
9795,
43679,
3963,
40379,
62,
1370,
13,
198,
198,
26947,
25,
308,
83,
62,
7890,
41876,
256,
83,
62,
7890,
13,
198,
198,
26947,
25,
220,
220,
220,
220,
308,
85,
62,
82,
7753,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
269,
406,
49494,
14280,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
308,
85,
62,
6978,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
308,
85,
62,
12853,
6978,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
308,
85,
62,
34345,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
308,
83,
62,
67,
2047,
79,
25747,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
37860,
9681,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
308,
82,
62,
67,
2047,
79,
25747,
220,
220,
220,
220,
41876,
37860,
9681,
13,
198,
198,
10943,
2257,
1565,
4694,
25,
308,
66,
62,
6978,
16,
220,
220,
220,
220,
41876,
269,
406,
49494,
2319,
220,
26173,
8924,
705,
6852,
346,
77,
1170,
2919,
13,
1706,
291,
16300,
13,
785,
59,
1921,
12,
50,
2969,
31529,
59,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
308,
66,
62,
6978,
17,
220,
220,
220,
220,
41876,
269,
406,
49494,
2808,
220,
26173,
8924,
705,
6852,
1416,
85,
647,
79,
9501,
59,
16045,
44,
59,
12562,
5097,
5984,
59,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
308,
66,
62,
17474,
220,
220,
41876,
269,
406,
49494,
767,
220,
220,
26173,
8924,
705,
19895,
425,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
308,
66,
62,
34345,
220,
41876,
269,
406,
49494,
1105,
220,
26173,
8924,
705,
40223,
4868,
4458,
198,
198,
10943,
2257,
1565,
4694,
25,
308,
66,
62,
2302,
41876,
269,
406,
49494,
513,
26173,
8924,
705,
40664,
4458,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Include ZREST_SCHED_BATCH_SEL
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Modification History *
*----------------------------------------------------------------------*
* Date | USER ID | VSTF | Transport | Remarks *
*-----------|----------|--------|------------|-------------------------*
*Feb' 2018 | V-MYAL | 3019845| MP2K905030 | Initial development *
*05/17/2018 | V-MYAL | 3454161| MP2K905442 | More enhancements *
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_id FOR zrest_config-interface_id MEMORY ID interface_id.
SELECT-OPTIONS: s_user FOR zrest_monitor-zuser MEMORY ID zuser .
SELECT-OPTIONS: s_exedat FOR zrest_monitor-zexedate MEMORY ID zexedate .
SELECT-OPTIONS: s_exetim FOR zrest_monitor-zexetime MEMORY ID zexetime .
SELECT-OPTIONS: s_retdat FOR zrest_monitor-zretrydate .
SELECT-OPTIONS: s_rettim FOR zrest_monitor-zretrytime .
SELECT-OPTIONS: s_subdat FOR zrest_monitor-submit_date .
SELECT-OPTIONS: s_subtim FOR zrest_monitor-submit_time .
SELECT-OPTIONS: s_callpr FOR zrest_monitor-calling_program MEMORY ID calling_program.
SELECT-OPTIONS: s_callme FOR zrest_monitor-calling_method MEMORY ID calling_method .
SELECT-OPTIONS: s_busine FOR zrest_monitor-businessid MEMORY ID businessid .
SELECT-OPTIONS: s_messag FOR zrest_monitor-zmessageid.
PARAMETERS: p_retain(03) TYPE n DEFAULT 30.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_batch TYPE i DEFAULT 5 OBLIGATORY, "MP2K905225
p_jobs TYPE i OBLIGATORY DEFAULT 3.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(79) text-005 MODIF ID m1.
SELECTION-SCREEN END OF LINE.
PARAMETERS: p_mjobs TYPE i OBLIGATORY DEFAULT 5. "MP2K905442
PARAMETERS: p_bsname TYPE bpsrvgrp. "batch server group name
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(79) text-006 MODIF ID m1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bsname.
PERFORM f4_batch_server CHANGING p_bsname.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'M1'.
screen-intensified = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
40348,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1168,
49,
6465,
62,
50,
3398,
1961,
62,
33,
11417,
62,
50,
3698,
198,
9,
5,
10097,
30934,
9,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3401,
2649,
7443,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
9,
10097,
23031,
9,
198,
9,
7536,
220,
220,
220,
220,
220,
930,
1294,
1137,
4522,
220,
930,
220,
569,
2257,
37,
220,
930,
19940,
220,
930,
3982,
5558,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
9,
32284,
91,
35937,
91,
982,
91,
10541,
91,
22369,
12,
9,
198,
9,
15146,
6,
2864,
220,
930,
569,
12,
26708,
1847,
220,
220,
930,
25643,
4089,
2231,
91,
4904,
17,
42,
3829,
1120,
1270,
220,
930,
20768,
2478,
220,
220,
220,
1635,
198,
9,
2713,
14,
1558,
14,
7908,
930,
569,
12,
26708,
1847,
220,
220,
930,
513,
34229,
25948,
91,
4904,
17,
42,
44928,
39506,
930,
3125,
29754,
220,
220,
220,
220,
220,
220,
1635,
198,
9,
10097,
23031,
9,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
275,
16,
13315,
8782,
10067,
37977,
2538,
2420,
12,
8298,
13,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
312,
7473,
1976,
2118,
62,
11250,
12,
39994,
62,
312,
220,
220,
220,
220,
220,
220,
220,
220,
35153,
15513,
4522,
7071,
62,
312,
13,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
7220,
220,
220,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
89,
7220,
220,
220,
220,
220,
220,
220,
220,
220,
35153,
15513,
4522,
1976,
7220,
220,
220,
220,
764,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
1069,
276,
265,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
89,
1069,
276,
378,
220,
220,
220,
220,
220,
35153,
15513,
4522,
1976,
1069,
276,
378,
220,
764,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
1069,
316,
320,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
89,
1069,
8079,
220,
220,
220,
220,
220,
35153,
15513,
4522,
1976,
1069,
8079,
220,
764,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
1186,
19608,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
89,
1186,
563,
4475,
220,
220,
220,
220,
764,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
11489,
320,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
89,
1186,
563,
2435,
220,
220,
220,
220,
764,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
7266,
19608,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
46002,
62,
4475,
220,
220,
220,
764,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
7266,
16514,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
46002,
62,
2435,
220,
220,
220,
764,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
13345,
1050,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
44714,
62,
23065,
220,
35153,
15513,
4522,
4585,
62,
23065,
13,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
13345,
1326,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
44714,
62,
24396,
220,
220,
35153,
15513,
4522,
4585,
62,
24396,
764,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
10885,
500,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
22680,
312,
220,
220,
220,
220,
220,
220,
35153,
15513,
4522,
1597,
312,
220,
220,
220,
220,
764,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
37348,
363,
220,
220,
7473,
1976,
2118,
62,
41143,
12,
89,
20500,
312,
13,
198,
27082,
2390,
2767,
4877,
25,
220,
220,
220,
220,
279,
62,
1186,
391,
7,
3070,
8,
220,
220,
41876,
299,
5550,
38865,
1542,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
275,
16,
13,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
275,
17,
13315,
8782,
10067,
37977,
2538,
2420,
12,
21601,
13,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
43501,
41876,
1312,
5550,
38865,
642,
440,
9148,
3528,
1404,
15513,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7378,
17,
42,
44928,
18182,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
43863,
220,
41876,
1312,
440,
9148,
3528,
1404,
15513,
5550,
38865,
513,
13,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
48920,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
9440,
10979,
352,
7,
3720,
8,
2420,
12,
22544,
19164,
5064,
4522,
285,
16,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
48920,
13,
198,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
76,
43863,
41876,
1312,
440,
9148,
3528,
1404,
15513,
5550,
38865,
642,
13,
220,
220,
220,
220,
366,
7378,
17,
42,
44928,
39506,
198,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
1443,
3672,
41876,
275,
862,
81,
85,
2164,
79,
13,
220,
220,
366,
43501,
4382,
1448,
1438,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
48920,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
9440,
10979,
352,
7,
3720,
8,
2420,
12,
28041,
19164,
5064,
4522,
285,
16,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
48920,
13,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
275,
17,
13,
628,
198,
1404,
33493,
2849,
12,
6173,
2200,
1677,
13,
198,
198,
1404,
33493,
2849,
12,
6173,
2200,
1677,
6177,
26173,
8924,
12,
2200,
35780,
7473,
279,
62,
1443,
3672,
13,
198,
220,
19878,
21389,
277,
19,
62,
43501,
62,
15388,
5870,
15567,
2751,
279,
62,
1443,
3672,
13,
198,
198,
1404,
33493,
2849,
12,
6173,
2200,
1677,
16289,
30076,
13,
628,
220,
17579,
3185,
5161,
6374,
2200,
1677,
13,
198,
220,
220,
220,
16876,
3159,
12,
8094,
16,
796,
705,
44,
16,
4458,
198,
220,
220,
220,
220,
220,
3159,
12,
600,
641,
1431,
796,
352,
13,
198,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS lcl_gui DEFINITION FINAL.
PUBLIC SECTION.
CLASS-METHODS f4_folder RETURNING VALUE(rv_folder) TYPE string RAISING zcx_abapgit_exception.
CLASS-METHODS open_folder_frontend IMPORTING iv_folder TYPE string.
CLASS-METHODS select_tr_requests RETURNING VALUE(rt_trkorr) TYPE trwbo_request_headers.
PRIVATE SECTION.
CLASS-DATA: gv_last_folder TYPE string.
ENDCLASS.
CLASS lcl_gui IMPLEMENTATION.
METHOD f4_folder.
DATA: lv_title TYPE string.
lv_title = 'Choose the destination folder for the ZIP files'.
cl_gui_frontend_services=>directory_browse(
EXPORTING
window_title = lv_title
initial_folder = gv_last_folder
CHANGING
selected_folder = rv_folder
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4 ).
IF sy-subrc = 0.
gv_last_folder = rv_folder. "Store the last directory for user friendly UI
ELSE.
zcx_abapgit_exception=>raise( 'Folder matchcode exception' ).
ENDIF.
ENDMETHOD.
METHOD open_folder_frontend.
IF NOT iv_folder IS INITIAL.
cl_gui_frontend_services=>execute(
EXPORTING
document = iv_folder
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
OTHERS = 8 ).
IF sy-subrc <> 0.
MESSAGE 'Problem when opening output folder' TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD select_tr_requests.
DATA: ls_popup TYPE strhi_popup,
ls_selection TYPE trwbo_selection.
ls_popup-start_column = 5.
ls_popup-start_row = 5.
*- Prepare the selection ----------------------------------------------*
ls_selection-trkorrpattern = space.
ls_selection-client = space.
ls_selection-stdrequest = space.
ls_selection-reqfunctions = 'K'.
ls_selection-reqstatus = 'RNODL'.
*- Call transport selection popup -------------------------------------*
CALL FUNCTION 'TRINT_SELECT_REQUESTS'
EXPORTING
iv_username_pattern = '*'
iv_via_selscreen = 'X'
is_selection = ls_selection
iv_complete_projects = space
iv_title = 'ABAPGit Transport Mass Downloader'
is_popup = ls_popup
IMPORTING
et_requests = rt_trkorr
EXCEPTIONS
action_aborted_by_user = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR rt_trkorr.
ELSE.
SORT rt_trkorr BY trkorr.
DELETE ADJACENT DUPLICATES FROM rt_trkorr COMPARING trkorr.
ENDIF.
ENDMETHOD.
ENDCLASS.
CLASS lcl_transport_zipper DEFINITION FINAL.
PUBLIC SECTION.
* Folder
TYPES ty_folder TYPE string.
* Filename
TYPES ty_filename TYPE string.
* File extension
CONSTANTS gc_zip_ext TYPE string VALUE '.zip' ##NO_TEXT.
DATA: gv_timestamp TYPE string,
gv_separator TYPE c,
gv_full_folder TYPE ty_folder READ-ONLY.
METHODS constructor IMPORTING iv_folder TYPE ty_folder
RAISING zcx_abapgit_exception.
METHODS generate_files IMPORTING it_trkorr TYPE trwbo_request_headers
iv_logic TYPE any
RAISING zcx_abapgit_exception.
CLASS-METHODS does_folder_exist IMPORTING iv_folder TYPE string
RETURNING VALUE(rv_folder_exist) TYPE abap_bool
RAISING zcx_abapgit_exception.
PRIVATE SECTION.
METHODS get_full_folder IMPORTING iv_folder TYPE ty_folder
RETURNING VALUE(rv_full_folder) TYPE ty_folder
RAISING zcx_abapgit_exception.
METHODS get_filename IMPORTING is_trkorr TYPE trwbo_request_header
RETURNING VALUE(rv_filename) TYPE ty_filename.
ENDCLASS.
CLASS lcl_transport_zipper IMPLEMENTATION.
METHOD constructor.
CONCATENATE sy-datlo sy-timlo INTO me->gv_timestamp SEPARATED BY '_'.
me->gv_full_folder = get_full_folder( iv_folder = iv_folder ).
cl_gui_frontend_services=>get_file_separator(
CHANGING
file_separator = gv_separator
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4 ).
IF sy-subrc <> 0.
gv_separator = '\'. "Default MS Windows separator
ENDIF.
ENDMETHOD.
METHOD does_folder_exist.
cl_gui_frontend_services=>directory_exist(
EXPORTING
directory = iv_folder
RECEIVING
result = rv_folder_exist
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
OTHERS = 5 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Error from cl_gui_frontend_services=>directory_exist' ).
ENDIF.
ENDMETHOD.
METHOD get_full_folder.
DATA: lv_sep TYPE c,
lv_rc TYPE i.
*-obtain file separator character---------------------------------------
cl_gui_frontend_services=>get_file_separator(
CHANGING
file_separator = lv_sep
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Internal error getting file separator' ).
ENDIF.
CONCATENATE iv_folder
gv_timestamp
INTO rv_full_folder SEPARATED BY lv_sep.
IF does_folder_exist( iv_folder = rv_full_folder ) = abap_false.
cl_gui_frontend_services=>directory_create(
EXPORTING
directory = rv_full_folder
CHANGING
rc = lv_rc " Return Code
EXCEPTIONS
directory_create_failed = 1
cntl_error = 2
error_no_gui = 3
directory_access_denied = 4
directory_already_exists = 5
path_not_found = 6
unknown_error = 7
not_supported_by_gui = 8
wrong_parameter = 9
OTHERS = 10 ).
IF sy-subrc <> 0 AND sy-subrc <> 5.
zcx_abapgit_exception=>raise( 'Error from cl_gui_frontend_services=>directory_create' ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD get_filename .
* Generate filename
CONCATENATE is_trkorr-trkorr '_' is_trkorr-as4text '_' gv_timestamp gc_zip_ext
INTO rv_filename.
* Remove reserved characters (for Windows based systems)
TRANSLATE rv_filename USING '/ \ : " * > < ? | '.
CONCATENATE gv_full_folder rv_filename INTO rv_filename SEPARATED BY gv_separator.
ENDMETHOD.
METHOD generate_files.
DATA: ls_trkorr LIKE LINE OF it_trkorr,
lv_zipbinstring TYPE xstring.
LOOP AT it_trkorr INTO ls_trkorr.
lv_zipbinstring = zcl_abapgit_transport_mass=>zip( is_trkorr = ls_trkorr
iv_logic = iv_logic
iv_show_log_popup = abap_false ).
zcl_abapgit_zip=>save_binstring_to_localfile( iv_binstring = lv_zipbinstring
iv_filename = get_filename( ls_trkorr ) ).
ENDLOOP. "it_trkorr
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
565,
62,
48317,
5550,
20032,
17941,
25261,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
277,
19,
62,
43551,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
43551,
8,
41876,
4731,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
1280,
62,
43551,
62,
8534,
437,
30023,
9863,
2751,
21628,
62,
43551,
41876,
4731,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
2922,
62,
2213,
62,
8897,
3558,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
2213,
74,
38890,
8,
41876,
491,
86,
2127,
62,
25927,
62,
50145,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42715,
12,
26947,
25,
308,
85,
62,
12957,
62,
43551,
41876,
4731,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
48317,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
277,
19,
62,
43551,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
7839,
220,
41876,
4731,
13,
628,
220,
220,
220,
300,
85,
62,
7839,
796,
705,
31851,
262,
10965,
9483,
329,
262,
42977,
3696,
4458,
628,
220,
220,
220,
537,
62,
48317,
62,
8534,
437,
62,
30416,
14804,
34945,
62,
25367,
325,
7,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
4324,
62,
7839,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
7839,
198,
220,
220,
220,
220,
220,
220,
220,
4238,
62,
43551,
220,
220,
220,
220,
220,
220,
796,
308,
85,
62,
12957,
62,
43551,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
6163,
62,
43551,
220,
220,
220,
220,
220,
796,
374,
85,
62,
43551,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
269,
429,
75,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
3919,
62,
48317,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
407,
62,
15999,
62,
1525,
62,
48317,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
604,
6739,
628,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
220,
220,
308,
85,
62,
12957,
62,
43551,
796,
374,
85,
62,
43551,
13,
366,
22658,
262,
938,
8619,
329,
2836,
8030,
12454,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
41092,
2872,
8189,
6631,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1280,
62,
43551,
62,
8534,
437,
13,
628,
220,
220,
220,
16876,
5626,
21628,
62,
43551,
3180,
3268,
2043,
12576,
13,
628,
220,
220,
220,
220,
220,
537,
62,
48317,
62,
8534,
437,
62,
30416,
14804,
41049,
7,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3188,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
43551,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
429,
75,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
3919,
62,
48317,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2089,
62,
17143,
2357,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
62,
1662,
62,
9275,
220,
220,
220,
220,
220,
220,
220,
220,
796,
604,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3108,
62,
1662,
62,
9275,
220,
220,
220,
220,
220,
220,
220,
220,
796,
642,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
62,
2302,
3004,
62,
34680,
796,
718,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
41049,
62,
47904,
220,
220,
796,
767,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
807,
6739,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
705,
40781,
618,
4756,
5072,
9483,
6,
41876,
705,
50,
6,
13954,
31519,
34178,
705,
36,
4458,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
2922,
62,
2213,
62,
8897,
3558,
13,
628,
220,
220,
220,
42865,
25,
43979,
62,
12924,
929,
220,
220,
220,
220,
41876,
965,
5303,
62,
12924,
929,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
49283,
41876,
491,
86,
2127,
62,
49283,
13,
628,
220,
220,
220,
43979,
62,
12924,
929,
12,
9688,
62,
28665,
796,
642,
13,
198,
220,
220,
220,
43979,
62,
12924,
929,
12,
9688,
62,
808,
220,
220,
220,
796,
642,
13,
198,
198,
9,
12,
43426,
262,
6356,
20368,
26171,
9,
198,
220,
220,
220,
43979,
62,
49283,
12,
2213,
74,
38890,
33279,
796,
2272,
13,
198,
220,
220,
220,
43979,
62,
49283,
12,
16366,
220,
220,
220,
220,
220,
220,
220,
796,
2272,
13,
198,
220,
220,
220,
43979,
62,
49283,
12,
19282,
25927,
220,
220,
220,
796,
2272,
13,
198,
220,
220,
220,
43979,
62,
49283,
12,
42180,
12543,
2733,
220,
796,
705,
42,
4458,
198,
220,
220,
220,
43979,
62,
49283,
12,
42180,
13376,
220,
220,
220,
220,
796,
705,
42336,
3727,
43
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_USUARIO definition
public
inheriting from ZCL_ENTITY
final
create public .
public section.
*"* public components of class ZCL_USUARIO
*"* do not include other source files here!!!
methods CONSTRUCTOR
importing
!USUARIO type ZBT_USUARIO-USUARIO optional .
methods GET_EMAIL
returning
value(RETURN) type ZBT_USUARIO-MAIL .
methods IS_ASSIGNED
returning
value(RETURN) type ZBT_USUARIO-IS_ASSIGNED .
methods IS_DEVELOPER
returning
value(RETURN) type ZBT_USUARIO-IS_DEVELOPER .
methods IS_REPORTER
returning
value(RETURN) type ZBT_USUARIO-IS_REPORTER .
methods IS_TESTER
returning
value(RETURN) type ZBT_USUARIO-IS_TESTER .
methods SET_DEVELOPER
importing
!DEVELOPER type ZBT_USUARIO-IS_DEVELOPER .
methods SET_ASSIGNED
importing
!ASSIGNED type ZBT_USUARIO-IS_ASSIGNED .
methods SET_EMAIL
importing
!EMAIL type ZBT_USUARIO-MAIL .
methods SET_REPORTER
importing
!REPORTER type ZBT_USUARIO-IS_REPORTER .
methods SET_TESTER
importing
!TESTER type ZBT_USUARIO-IS_TESTER .
methods GET_ID
returning
value(RESULT) type ZBT_USUARIO-USUARIO .
methods GET_NAME
returning
value(NAME) type STRING .
protected section.
*"* protected components of class ZCL_USUARIO
*"* do not include other source files here!!!
methods PREPARE_HASH_STRUCTURE
redefinition .
private section.
*"* private components of class ZCL_USUARIO
*"* do not include other source files here!!!
data USUARIO type ZBT_USUARIO-USUARIO .
data REPORTER type ZBT_USUARIO-IS_REPORTER .
data TESTER type ZBT_USUARIO-IS_TESTER .
data DEVELOPER type ZBT_USUARIO-IS_DEVELOPER .
data ASSIGNED type ZBT_USUARIO-IS_ASSIGNED .
data MAIL type ZBT_USUARIO-MAIL .
ENDCLASS.
CLASS ZCL_USUARIO IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
me->usuario = usuario.
ENDMETHOD.
method GET_EMAIL.
RETURN = me->mail.
endmethod.
METHOD get_id.
result = me->usuario.
ENDMETHOD.
METHOD get_name.
DATA: lt_return TYPE STANDARD TABLE OF bapiret2,
l_address TYPE bapiaddr3.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = usuario
IMPORTING
address = l_address
TABLES
return = lt_return[].
name = l_address-fullname.
ENDMETHOD.
method IS_ASSIGNED.
return = me->assigned.
endmethod.
method IS_DEVELOPER.
return = me->developer.
endmethod.
method IS_REPORTER.
return = me->reporter.
endmethod.
method IS_TESTER.
return = me->tester.
endmethod.
METHOD prepare_hash_structure.
DATA: id TYPE zbt_usuario-usuario,
value TYPE LINE OF zbt_objectvalue_hash_calcul.
value = id = get_id( ).
SHIFT value LEFT DELETING LEADING space.
INSERT value INTO TABLE values[].
ENDMETHOD.
method SET_ASSIGNED.
me->assigned = assigned.
endmethod.
method SET_DEVELOPER.
me->developer = developer.
endmethod.
method SET_EMAIL.
me->mail = email.
endmethod.
method SET_REPORTER.
me->reporter = reporter.
endmethod.
method SET_TESTER.
me->tester = tester.
endmethod.
ENDCLASS.
| [
4871,
1168,
5097,
62,
2937,
52,
1503,
9399,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
1168,
5097,
62,
3525,
9050,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
2937,
52,
1503,
9399,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
628,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
2937,
52,
1503,
9399,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
2937,
52,
1503,
9399,
11902,
764,
198,
220,
5050,
17151,
62,
27630,
4146,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
27064,
8,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
5673,
4146,
764,
198,
220,
5050,
3180,
62,
10705,
16284,
1961,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
27064,
8,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
10705,
16284,
1961,
764,
198,
220,
5050,
3180,
62,
7206,
18697,
31054,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
27064,
8,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
7206,
18697,
31054,
764,
198,
220,
5050,
3180,
62,
35316,
1581,
5781,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
27064,
8,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
35316,
1581,
5781,
764,
198,
220,
5050,
3180,
62,
51,
1546,
5781,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
27064,
8,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
51,
1546,
5781,
764,
198,
220,
5050,
25823,
62,
7206,
18697,
31054,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
7206,
18697,
31054,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
7206,
18697,
31054,
764,
198,
220,
5050,
25823,
62,
10705,
16284,
1961,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
10705,
16284,
1961,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
10705,
16284,
1961,
764,
198,
220,
5050,
25823,
62,
27630,
4146,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
27630,
4146,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
5673,
4146,
764,
198,
220,
5050,
25823,
62,
35316,
1581,
5781,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
35316,
1581,
5781,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
35316,
1581,
5781,
764,
198,
220,
5050,
25823,
62,
51,
1546,
5781,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
51,
1546,
5781,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
51,
1546,
5781,
764,
198,
220,
5050,
17151,
62,
2389,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
19535,
16724,
8,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
2937,
52,
1503,
9399,
764,
198,
220,
5050,
17151,
62,
20608,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
20608,
8,
2099,
19269,
2751,
764,
198,
24326,
2665,
13,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
5097,
62,
2937,
52,
1503,
9399,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
628,
220,
5050,
22814,
47,
12203,
62,
39,
11211,
62,
46126,
11335,
198,
220,
220,
220,
34087,
17750,
764,
198,
19734,
2665,
13,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
5097,
62,
2937,
52,
1503,
9399,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
628,
220,
1366,
1294,
52,
1503,
9399,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
2937,
52,
1503,
9399,
764,
198,
220,
1366,
4526,
44680,
5781,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
35316,
1581,
5781,
764,
198,
220,
1366,
309,
1546,
5781,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
51,
1546,
5781,
764,
198,
220,
1366,
5550,
18697,
31054,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
7206,
18697,
31054,
764,
198,
220,
1366,
24994,
16284,
1961,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
1797,
62,
10705,
16284,
1961,
764,
198,
220,
1366,
8779,
4146,
2099,
1168,
19313,
62,
2937,
52,
1503,
9399,
12,
5673,
4146,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
2937,
52,
1503,
9399,
30023,
2538,
10979,
6234,
13,
628,
198,
49273,
23772,
13,
198,
220,
2208,
3784,
41571,
273,
7,
6739,
198,
220,
502,
3784,
385,
84,
4982,
796,
514,
84,
4982,
13,
198,
10619,
49273,
13,
628,
198,
24396,
17151,
62,
27630,
4146,
13,
198,
220,
30826,
27064,
796,
502,
3784,
4529,
13,
198,
437,
24396,
13,
628,
198,
49273,
651,
62,
312,
13,
198,
220,
1255,
796,
502,
3784,
385,
84,
4982,
13,
198,
10619,
49273,
13,
628,
198,
49273,
651,
62,
3672,
13,
198,
220,
42865,
25,
300,
83,
62,
7783,
41876,
49053,
9795,
43679,
3963,
275,
499,
557,
83,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
62,
21975,
41876,
275,
15042,
29851,
18,
13,
628,
220,
42815,
29397,
4177,
2849,
705,
33,
17614,
62,
29904,
62,
18851,
62,
35,
20892,
4146,
6,
198,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
20579,
796,
514,
84,
4982,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
2209,
220,
796,
300,
62,
21975,
198,
220,
220,
220,
309,
6242,
28378,
198,
220,
220,
220,
220,
220,
1441,
220,
220,
796,
300,
83,
62,
7783,
58,
4083,
628,
220,
1438,
796,
300,
62,
21975,
12,
12853,
3672,
13,
198,
198,
10619,
49273,
13,
628,
198,
24396,
3180,
62,
10705,
16284,
1961,
13,
198,
220,
1441,
796,
502,
3784,
562,
3916,
13,
198,
437,
24396,
13,
628,
198,
24396,
3180,
62,
7206,
18697,
31054,
13,
198,
220,
1441,
796,
502,
3784,
16244,
263,
13,
198,
437,
24396,
13,
628,
198,
24396,
3180,
62,
35316,
1581,
5781,
13,
198,
220,
1441,
796
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report ZABAP2XLSX_DEMO_SHOW
*&---------------------------------------------------------------------*
REPORT zabap2xlsx_demo_show.
*----------------------------------------------------------------------*
* CLASS lcl_perform DEFINITION
*----------------------------------------------------------------------*
CLASS lcl_perform DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
CLASS-METHODS: setup_objects,
collect_reports,
handle_nav FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row.
PRIVATE SECTION.
TYPES: BEGIN OF ty_reports,
progname TYPE reposrc-progname,
sort TYPE reposrc-progname,
description TYPE repti,
filename TYPE string,
END OF ty_reports.
CLASS-DATA:
lo_grid TYPE REF TO cl_gui_alv_grid,
lo_text TYPE REF TO cl_gui_textedit,
cl_document TYPE REF TO i_oi_document_proxy,
t_reports TYPE STANDARD TABLE OF ty_reports WITH NON-UNIQUE DEFAULT KEY.
CLASS-DATA:error TYPE REF TO i_oi_error,
t_errors TYPE STANDARD TABLE OF REF TO i_oi_error WITH NON-UNIQUE DEFAULT KEY,
cl_control TYPE REF TO i_oi_container_control. "Office Dokument
ENDCLASS. "lcl_perform DEFINITION
START-OF-SELECTION.
lcl_perform=>collect_reports( ).
lcl_perform=>setup_objects( ).
END-OF-SELECTION.
WRITE '.'. " Force output
*----------------------------------------------------------------------*
* CLASS lcl_perform IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_perform IMPLEMENTATION.
METHOD setup_objects.
DATA: lo_split TYPE REF TO cl_gui_splitter_container,
lo_container TYPE REF TO cl_gui_container.
DATA: it_fieldcat TYPE lvc_t_fcat,
is_layout TYPE lvc_s_layo,
is_variant TYPE disvariant.
FIELD-SYMBOLS: <fc> LIKE LINE OF it_fieldcat.
CREATE OBJECT lo_split
EXPORTING
parent = cl_gui_container=>screen0
rows = 1
columns = 3
no_autodef_progid_dynnr = 'X'.
lo_split->set_column_width( EXPORTING id = 1
width = 20 ).
lo_split->set_column_width( EXPORTING id = 2
width = 40 ).
* Left: List of reports
lo_container = lo_split->get_container( row = 1
column = 1 ).
CREATE OBJECT lo_grid
EXPORTING
i_parent = lo_container.
SET HANDLER lcl_perform=>handle_nav FOR lo_grid.
is_variant-report = sy-repid.
is_variant-handle = '0001'.
is_layout-cwidth_opt = 'X'.
APPEND INITIAL LINE TO it_fieldcat ASSIGNING <fc>.
<fc>-fieldname = 'PROGNAME'.
<fc>-tabname = 'REPOSRC'.
APPEND INITIAL LINE TO it_fieldcat ASSIGNING <fc>.
<fc>-fieldname = 'SORT'.
<fc>-ref_field = 'PROGNAME'.
<fc>-ref_table = 'REPOSRC'.
<fc>-tech = abap_true. "No need to display this help field
APPEND INITIAL LINE TO it_fieldcat ASSIGNING <fc>.
<fc>-fieldname = 'DESCRIPTION'.
<fc>-ref_field = 'REPTI'.
<fc>-ref_table = 'RS38M'.
lo_grid->set_table_for_first_display( EXPORTING
is_variant = is_variant
i_save = 'A'
is_layout = is_layout
CHANGING
it_outtab = t_reports
it_fieldcatalog = it_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4 ).
* Middle: Text with coding
lo_container = lo_split->get_container( row = 1
column = 2 ).
CREATE OBJECT lo_text
EXPORTING
parent = lo_container.
lo_text->set_readonly_mode( cl_gui_textedit=>true ).
lo_text->set_font_fixed( ).
* right: DemoOutput
lo_container = lo_split->get_container( row = 1
column = 3 ).
c_oi_container_control_creator=>get_container_control( IMPORTING control = cl_control
error = error ).
APPEND error TO t_errors.
cl_control->init_control( EXPORTING inplace_enabled = 'X'
no_flush = 'X'
r3_application_name = 'Demo Document Container'
parent = lo_container
IMPORTING error = error
EXCEPTIONS OTHERS = 2 ).
APPEND error TO t_errors.
cl_control->get_document_proxy( EXPORTING document_type = 'Excel.Sheet' " EXCEL
no_flush = ' '
IMPORTING document_proxy = cl_document
error = error ).
APPEND error TO t_errors.
* Errorhandling should be inserted here
ENDMETHOD. "setup_objects
"collect_reports
METHOD collect_reports.
FIELD-SYMBOLS <report> LIKE LINE OF t_reports.
DATA t_source TYPE STANDARD TABLE OF text255 WITH NON-UNIQUE DEFAULT KEY.
DATA texts TYPE STANDARD TABLE OF textpool.
DATA description TYPE textpool.
* Get all demoreports
SELECT progname
INTO CORRESPONDING FIELDS OF TABLE t_reports
FROM reposrc
WHERE progname LIKE 'ZDEMO_EXCEL%'
AND progname <> sy-repid
AND subc = '1'.
LOOP AT t_reports ASSIGNING <report>.
* Check if already switched to new outputoptions
READ REPORT <report>-progname INTO t_source.
IF sy-subrc = 0.
FIND 'INCLUDE zdemo_excel_outputopt_incl.' IN TABLE t_source IGNORING CASE.
ENDIF.
IF sy-subrc <> 0.
DELETE t_reports.
CONTINUE.
ENDIF.
* Build half-numeric sort
<report>-sort = <report>-progname.
REPLACE REGEX '(ZDEMO_EXCEL)(\d\d)\s*$' IN <report>-sort WITH '$1\0$2'. " REPLACE REGEX '(ZDEMO_EXCEL)([^][^])*$' IN <report>-sort WITH '$1$2'.REPLACE REGEX '(ZDEMO_EXCEL)([^][^])*$' IN <report>-sort WITH '$1$2'.REPLACE
REPLACE REGEX '(ZDEMO_EXCEL)(\d)\s*$' IN <report>-sort WITH '$1\0\0$2'.
* get report text
READ TEXTPOOL <report>-progname INTO texts LANGUAGE sy-langu.
READ TABLE texts INTO description WITH KEY id = 'R'.
IF sy-subrc > 0.
"If not available in logon language, use english
READ TEXTPOOL <report>-progname INTO texts LANGUAGE 'E'.
READ TABLE texts INTO description WITH KEY id = 'R'.
ENDIF.
"set report title
<report>-description = description-entry.
ENDLOOP.
SORT t_reports BY sort progname.
ENDMETHOD. "collect_reports
METHOD handle_nav.
CONSTANTS: filename TYPE text80 VALUE 'ZABAP2XLSX_DEMO_SHOW.xlsx'.
DATA: wa_report LIKE LINE OF t_reports,
t_source TYPE STANDARD TABLE OF text255,
t_rawdata TYPE solix_tab,
wa_rawdata LIKE LINE OF t_rawdata,
bytecount TYPE i,
length TYPE i,
add_selopt TYPE flag.
READ TABLE t_reports INTO wa_report INDEX e_row-index.
CHECK sy-subrc = 0.
* Set new text into middle frame
READ REPORT wa_report-progname INTO t_source.
lo_text->set_text_as_r3table( EXPORTING table = t_source ).
* Unload old xls-file
cl_document->close_document( ).
* Get the demo
* If additional parameters found on selection screen, start via selection screen , otherwise start w/o
CLEAR add_selopt.
FIND 'PARAMETERS' IN TABLE t_source.
IF sy-subrc = 0.
add_selopt = 'X'.
ELSE.
FIND 'SELECT-OPTIONS' IN TABLE t_source.
IF sy-subrc = 0.
add_selopt = 'X'.
ENDIF.
ENDIF.
IF add_selopt IS INITIAL.
SUBMIT (wa_report-progname) AND RETURN "#EC CI_SUBMIT
WITH p_backfn = filename
WITH rb_back = 'X'
WITH rb_down = ' '
WITH rb_send = ' '
WITH rb_show = ' '.
ELSE.
SUBMIT (wa_report-progname) VIA SELECTION-SCREEN AND RETURN "#EC CI_SUBMIT
WITH p_backfn = filename
WITH rb_back = 'X'
WITH rb_down = ' '
WITH rb_send = ' '
WITH rb_show = ' '.
ENDIF.
OPEN DATASET filename FOR INPUT IN BINARY MODE.
IF sy-subrc = 0.
DO.
CLEAR wa_rawdata.
READ DATASET filename INTO wa_rawdata LENGTH length.
IF sy-subrc <> 0.
APPEND wa_rawdata TO t_rawdata.
ADD length TO bytecount.
EXIT.
ENDIF.
APPEND wa_rawdata TO t_rawdata.
ADD length TO bytecount.
ENDDO.
CLOSE DATASET filename.
ENDIF.
cl_control->get_document_proxy( EXPORTING document_type = 'Excel.Sheet' " EXCEL
no_flush = ' '
IMPORTING document_proxy = cl_document
error = error ).
cl_document->open_document_from_table( EXPORTING document_size = bytecount
document_table = t_rawdata
open_inplace = 'X' ).
ENDMETHOD. "handle_nav
ENDCLASS. "lcl_perform IMPLEMENTATION
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
220,
1168,
6242,
2969,
17,
55,
6561,
55,
62,
39429,
46,
62,
9693,
3913,
198,
9,
5,
10097,
30934,
9,
198,
2200,
15490,
1976,
397,
499,
17,
87,
7278,
87,
62,
9536,
78,
62,
12860,
13,
628,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
525,
687,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
31631,
300,
565,
62,
525,
687,
5550,
20032,
17941,
29244,
6158,
4810,
3824,
6158,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
9058,
62,
48205,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2824,
62,
48922,
11,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5412,
62,
28341,
7473,
49261,
4274,
62,
12976,
3963,
537,
62,
48317,
62,
282,
85,
62,
25928,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
304,
62,
808,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
48922,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1172,
3672,
41876,
1128,
418,
6015,
12,
1676,
70,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3297,
220,
220,
220,
220,
41876,
1128,
418,
6015,
12,
1676,
70,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6764,
41876,
28761,
72,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29472,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
48922,
13,
628,
220,
220,
220,
42715,
12,
26947,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
25928,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
282,
85,
62,
25928,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
5239,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
5239,
19312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
537,
62,
22897,
220,
220,
41876,
4526,
37,
5390,
1312,
62,
23013,
62,
22897,
62,
36436,
11,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
62,
48922,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
1259,
62,
48922,
13315,
44521,
12,
4944,
33866,
8924,
5550,
38865,
35374,
13,
198,
220,
220,
220,
42715,
12,
26947,
25,
18224,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1312,
62,
23013,
62,
18224,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
256,
62,
48277,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
4526,
37,
5390,
1312,
62,
23013,
62,
18224,
13315,
44521,
12,
4944,
33866,
8924,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
537,
62,
13716,
220,
220,
220,
41876,
4526,
37,
5390,
1312,
62,
23013,
62,
34924,
62,
13716,
13,
220,
220,
366,
27743,
360,
482,
1713,
198,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
75,
565,
62,
525,
687,
5550,
20032,
17941,
628,
198,
2257,
7227,
12,
19238,
12,
46506,
2849,
13,
198,
220,
300,
565,
62,
525,
687,
14804,
33327,
62,
48922,
7,
6739,
198,
220,
300,
565,
62,
525,
687,
14804,
40406,
62,
48205,
7,
6739,
198,
198,
10619,
12,
19238,
12,
46506,
2849,
13,
628,
220,
44423,
705,
2637,
13,
220,
366,
5221,
5072,
628,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
525,
687,
30023,
2538,
10979,
6234,
198,
9,
10097,
23031,
9,
198,
31631,
300,
565,
62,
525,
687,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
9058,
62,
48205,
13,
198,
220,
220,
220,
42865,
25,
2376,
62,
35312,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
22018,
1967,
62,
34924,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
34924,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
34924,
13,
628,
220,
220,
220,
42865,
25,
340,
62,
3245,
9246,
41876,
300,
28435,
62,
83,
62,
69,
9246,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
39786,
220,
220,
41876,
300,
28435,
62,
82,
62,
10724,
78,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
25641,
415,
220,
41876,
595,
25641,
415,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
16072,
29,
34178,
48920,
3963,
340,
62,
3245,
9246,
13,
628,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
2376,
62,
35312,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2560,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
537,
62,
48317,
62,
34924,
14804,
9612,
15,
198,
220,
220,
220,
220,
220,
220,
220,
15274,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
15180,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
645,
62,
2306,
375,
891,
62,
1676,
70,
312,
62,
67,
2047,
48624,
796,
705,
55,
4458,
198,
220,
220,
220,
2376,
62,
35312,
3784,
2617,
62,
28665,
62,
10394,
7,
220,
7788,
15490,
2751,
4686,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_form DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
METHODS constructor
IMPORTING
is_item TYPE zif_abapgit_definitions=>ty_item
iv_language TYPE spras.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS: c_objectname_form TYPE thead-tdobject VALUE 'FORM' ##NO_TEXT.
CONSTANTS: c_objectname_tdlines TYPE thead-tdobject VALUE 'TDLINES' ##NO_TEXT.
CONSTANTS: c_extension_xml TYPE string VALUE 'xml' ##NO_TEXT.
DATA: mv_form_name TYPE itcta-tdform.
TYPES: BEGIN OF tys_form_data,
form_header TYPE itcta,
text_header TYPE thead,
orig_language TYPE sy-langu,
pages TYPE STANDARD TABLE OF itctg WITH DEFAULT KEY,
page_windows TYPE STANDARD TABLE OF itcth WITH DEFAULT KEY,
paragraphs TYPE STANDARD TABLE OF itcdp WITH DEFAULT KEY,
strings TYPE STANDARD TABLE OF itcds WITH DEFAULT KEY,
tabs TYPE STANDARD TABLE OF itcdq WITH DEFAULT KEY,
windows TYPE STANDARD TABLE OF itctw WITH DEFAULT KEY,
END OF tys_form_data,
tyt_form_data TYPE STANDARD TABLE OF tys_form_data WITH DEFAULT KEY,
tyt_form_header TYPE STANDARD TABLE OF itcta WITH DEFAULT KEY,
tys_form_header TYPE LINE OF tyt_form_header,
tyt_text_header TYPE STANDARD TABLE OF thead WITH DEFAULT KEY,
tys_text_header TYPE LINE OF tyt_text_header,
tyt_lines TYPE tline_tab.
METHODS get_last_changes
IMPORTING
iv_form_name TYPE zif_abapgit_definitions=>ty_item-obj_name
RETURNING
VALUE(rs_last_changed) TYPE tys_form_header.
METHODS build_extra_from_header
IMPORTING
is_header TYPE tys_form_header
RETURNING
VALUE(rv_result) TYPE string.
METHODS build_extra_from_header_old
IMPORTING
is_header TYPE tys_form_header
RETURNING
VALUE(rv_result) TYPE string.
METHODS _save_form
IMPORTING
it_lines TYPE zcl_abapgit_object_form=>tyt_lines
CHANGING
cs_form_data TYPE zcl_abapgit_object_form=>tys_form_data.
METHODS extract_tdlines
IMPORTING
is_form_data TYPE zcl_abapgit_object_form=>tys_form_data
RETURNING
VALUE(rt_lines) TYPE zcl_abapgit_object_form=>tyt_lines
RAISING
zcx_abapgit_exception.
METHODS _clear_changed_fields
CHANGING
cs_form_data TYPE zcl_abapgit_object_form=>tys_form_data.
METHODS compress_lines
IMPORTING
is_form_data TYPE zcl_abapgit_object_form=>tys_form_data
it_lines TYPE zcl_abapgit_object_form=>tyt_lines
RAISING
zcx_abapgit_exception.
METHODS find_form
IMPORTING
iv_object_name TYPE zif_abapgit_definitions=>ty_item-obj_name
RETURNING
VALUE(rt_text_header) TYPE zcl_abapgit_object_form=>tyt_text_header.
METHODS _read_form
IMPORTING
is_text_header TYPE zcl_abapgit_object_form=>tys_text_header
EXPORTING
ev_form_found TYPE abap_bool
es_form_data TYPE zcl_abapgit_object_form=>tys_form_data
et_lines TYPE zcl_abapgit_object_form=>tyt_lines.
METHODS _sort_tdlines_by_windows
CHANGING
ct_form_windows TYPE zcl_abapgit_object_form=>tys_form_data-windows
ct_lines TYPE zcl_abapgit_object_form=>tyt_lines.
METHODS order_check_and_insert
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_FORM IMPLEMENTATION.
METHOD build_extra_from_header.
DATA: lv_tdspras TYPE laiso.
CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTPUT'
EXPORTING
input = is_header-tdspras
IMPORTING
output = lv_tdspras.
rv_result = c_objectname_tdlines && '_' && lv_tdspras.
ENDMETHOD.
METHOD build_extra_from_header_old.
rv_result = c_objectname_tdlines && '_' && is_header-tdspras.
ENDMETHOD.
METHOD compress_lines.
DATA lv_string TYPE string.
DATA lo_xml TYPE REF TO zcl_abapgit_xml_output.
CREATE OBJECT lo_xml.
lo_xml->add( iv_name = c_objectname_tdlines
ig_data = it_lines ).
lv_string = lo_xml->render( ).
IF lv_string IS NOT INITIAL.
mo_files->add_string( iv_extra =
build_extra_from_header( is_form_data-form_header )
iv_ext = c_extension_xml
iv_string = lv_string ).
ENDIF.
ENDMETHOD.
METHOD constructor.
super->constructor( is_item = is_item
iv_language = iv_language ).
mv_form_name = ms_item-obj_name.
ENDMETHOD.
METHOD extract_tdlines.
DATA lv_string TYPE string.
DATA lo_xml TYPE REF TO zcl_abapgit_xml_input.
TRY.
lv_string = mo_files->read_string( iv_extra =
build_extra_from_header( is_form_data-form_header )
iv_ext = c_extension_xml ).
CATCH zcx_abapgit_exception.
lv_string = mo_files->read_string( iv_extra =
build_extra_from_header_old( is_form_data-form_header )
iv_ext = c_extension_xml ).
ENDTRY.
CREATE OBJECT lo_xml EXPORTING iv_xml = lv_string.
lo_xml->read( EXPORTING iv_name = c_objectname_tdlines
CHANGING cg_data = rt_lines ).
ENDMETHOD.
METHOD find_form.
DATA: lv_text_name TYPE thead-tdname.
lv_text_name = iv_object_name.
CALL FUNCTION 'SELECT_TEXT'
EXPORTING
database_only = abap_true
id = 'TXT'
language = '*'
name = lv_text_name
object = c_objectname_form
TABLES
selections = rt_text_header
EXCEPTIONS
OTHERS = 1 ##fm_subrc_ok ##NO_TEXT. "#EC CI_SUBRC
ENDMETHOD.
METHOD get_last_changes.
DATA: lv_form_name TYPE thead-tdform.
CLEAR rs_last_changed.
lv_form_name = iv_form_name.
CALL FUNCTION 'READ_FORM'
EXPORTING
form = lv_form_name
read_only_header = abap_true
IMPORTING
form_header = rs_last_changed.
ENDMETHOD.
METHOD order_check_and_insert.
DATA: ls_order TYPE e071k-trkorr.
CALL FUNCTION 'SAPSCRIPT_ORDER_CHECK'
EXPORTING
objecttype = ms_item-obj_type
form = mv_form_name
EXCEPTIONS
invalid_input = 1
object_locked = 2
object_not_available = 3
OTHERS = 4.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
CALL FUNCTION 'SAPSCRIPT_ORDER_INSERT'
EXPORTING
objecttype = ms_item-obj_type
form = mv_form_name
masterlang = mv_language
CHANGING
order = ls_order
EXCEPTIONS
invalid_input = 1
order_canceled = 2
OTHERS = 3.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
DATA: ls_last_changed TYPE tys_form_header.
ls_last_changed = get_last_changes( ms_item-obj_name ).
IF ls_last_changed-tdluser IS NOT INITIAL.
rv_user = ls_last_changed-tdluser.
ELSE.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
CALL FUNCTION 'DELETE_FORM'
EXPORTING
form = mv_form_name
language = '*'.
order_check_and_insert( ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: lt_form_data TYPE tyt_form_data.
DATA: lt_lines TYPE tyt_lines.
FIELD-SYMBOLS: <ls_form_data> TYPE LINE OF tyt_form_data.
io_xml->read( EXPORTING iv_name = c_objectname_form
CHANGING cg_data = lt_form_data ).
LOOP AT lt_form_data ASSIGNING <ls_form_data>.
lt_lines = extract_tdlines( <ls_form_data> ).
_save_form( EXPORTING it_lines = lt_lines
CHANGING cs_form_data = <ls_form_data> ).
ENDLOOP.
CALL FUNCTION 'SAPSCRIPT_DELETE_LOAD'
EXPORTING
delete = abap_true
form = '*'
write = space.
tadir_insert( iv_package ).
order_check_and_insert( ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
CALL FUNCTION 'READ_FORM'
EXPORTING
form = mv_form_name
read_only_header = abap_true
IMPORTING
found = rv_bool.
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
DATA: ls_meta TYPE zif_abapgit_definitions=>ty_metadata.
ls_meta = zif_abapgit_object~get_metadata( ).
IF ls_meta-late_deser = abap_true.
APPEND zif_abapgit_object=>gc_step_id-late TO rt_steps.
ELSEIF ls_meta-ddic = abap_true.
APPEND zif_abapgit_object=>gc_step_id-ddic TO rt_steps.
ELSE.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
DATA: lv_object TYPE seqg3-garg.
" example lock entry
"'001FORM ZTEST_SAPSCRIPT TXT'
lv_object = |{ sy-mandt }{ ms_item-obj_type } { ms_item-obj_name }|.
OVERLAY lv_object WITH ' '.
lv_object = lv_object && '*'.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'ESSFORM'
iv_argument = lv_object ).
ENDMETHOD.
METHOD zif_abapgit_object~jump.
DATA: lt_bdcdata TYPE TABLE OF bdcdata.
FIELD-SYMBOLS: <ls_bdcdata> LIKE LINE OF lt_bdcdata.
APPEND INITIAL LINE TO lt_bdcdata ASSIGNING <ls_bdcdata>.
<ls_bdcdata>-program = 'SAPMSSCF' ##NO_TEXT.
<ls_bdcdata>-dynpro = '1102' ##NO_TEXT.
<ls_bdcdata>-dynbegin = abap_true.
APPEND INITIAL LINE TO lt_bdcdata ASSIGNING <ls_bdcdata>.
<ls_bdcdata>-fnam = 'BDC_OKCODE' ##NO_TEXT.
<ls_bdcdata>-fval = '=SHOW' ##NO_TEXT.
APPEND INITIAL LINE TO lt_bdcdata ASSIGNING <ls_bdcdata>.
<ls_bdcdata>-fnam = 'RSSCF-TDFORM' ##NO_TEXT.
<ls_bdcdata>-fval = ms_item-obj_name.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
STARTING NEW TASK 'GIT'
EXPORTING
tcode = 'SE71'
mode_val = 'E'
TABLES
using_tab = lt_bdcdata
EXCEPTIONS
OTHERS = 1
##fm_subrc_ok. "#EC CI_SUBRC
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lt_form_data TYPE tyt_form_data.
DATA: ls_form_data TYPE tys_form_data.
DATA: lt_text_header TYPE tyt_text_header.
DATA: lt_lines TYPE tyt_lines.
DATA: lv_form_found TYPE abap_bool.
FIELD-SYMBOLS: <ls_text_header> LIKE LINE OF lt_text_header.
lt_text_header = find_form( ms_item-obj_name ).
LOOP AT lt_text_header ASSIGNING <ls_text_header>.
CLEAR lt_lines.
CLEAR ls_form_data.
_read_form( EXPORTING is_text_header = <ls_text_header>
IMPORTING ev_form_found = lv_form_found
es_form_data = ls_form_data
et_lines = lt_lines ).
IF lv_form_found = abap_true.
_clear_changed_fields( CHANGING cs_form_data = ls_form_data ).
compress_lines( is_form_data = ls_form_data
it_lines = lt_lines ).
INSERT ls_form_data INTO TABLE lt_form_data.
ENDIF.
ENDLOOP.
IF lt_form_data IS NOT INITIAL.
io_xml->add( iv_name = c_objectname_form
ig_data = lt_form_data ).
ENDIF.
ENDMETHOD.
METHOD _clear_changed_fields.
CLEAR: cs_form_data-form_header-tdfuser,
cs_form_data-form_header-tdfdate,
cs_form_data-form_header-tdftime,
cs_form_data-form_header-tdfreles,
cs_form_data-form_header-tdluser,
cs_form_data-form_header-tdldate,
cs_form_data-form_header-tdltime,
cs_form_data-form_header-tdlreles.
CLEAR: cs_form_data-text_header-tdfuser,
cs_form_data-text_header-tdfdate,
cs_form_data-text_header-tdftime,
cs_form_data-text_header-tdfreles,
cs_form_data-text_header-tdluser,
cs_form_data-text_header-tdldate,
cs_form_data-text_header-tdltime,
cs_form_data-text_header-tdlreles.
ENDMETHOD.
METHOD _read_form.
CLEAR es_form_data.
CALL FUNCTION 'READ_FORM'
EXPORTING
form = is_text_header-tdform
language = is_text_header-tdspras
status = ' '
IMPORTING
form_header = es_form_data-form_header
found = ev_form_found
header = es_form_data-text_header
olanguage = es_form_data-orig_language
TABLES
form_lines = et_lines
pages = es_form_data-pages
page_windows = es_form_data-page_windows
paragraphs = es_form_data-paragraphs
strings = es_form_data-strings
tabs = es_form_data-tabs
windows = es_form_data-windows.
_sort_tdlines_by_windows( CHANGING ct_form_windows = es_form_data-windows
ct_lines = et_lines ).
ENDMETHOD.
METHOD _save_form.
CALL FUNCTION 'SAVE_FORM'
EXPORTING
form_header = cs_form_data-form_header
TABLES
form_lines = it_lines
pages = cs_form_data-pages
page_windows = cs_form_data-page_windows
paragraphs = cs_form_data-paragraphs
strings = cs_form_data-strings
tabs = cs_form_data-tabs
windows = cs_form_data-windows.
CALL FUNCTION 'SAPSCRIPT_CHANGE_OLANGUAGE'
EXPORTING
forced = abap_true
name = cs_form_data-text_header-tdname
object = cs_form_data-text_header-tdobject
olanguage = cs_form_data-orig_language
EXCEPTIONS
OTHERS = 1
##fm_subrc_ok. "#EC CI_SUBRC
ENDMETHOD.
METHOD _sort_tdlines_by_windows.
DATA lt_lines TYPE zcl_abapgit_object_form=>tyt_lines.
DATA ls_lines LIKE LINE OF lt_lines.
DATA ls_form_windows LIKE LINE OF ct_form_windows.
DATA lv_elt_windows TYPE tdformat VALUE '/W'.
DATA lv_firstloop TYPE abap_bool.
lt_lines = ct_lines.
CLEAR ct_lines.
SORT ct_form_windows BY tdwindow.
LOOP AT ct_form_windows INTO ls_form_windows.
lv_firstloop = abap_true.
READ TABLE lt_lines INTO ls_lines WITH KEY tdformat = lv_elt_windows
tdline = ls_form_windows-tdwindow.
LOOP AT lt_lines INTO ls_lines FROM sy-tabix.
IF lv_firstloop = abap_false AND
ls_lines-tdformat = lv_elt_windows.
EXIT.
ENDIF.
APPEND ls_lines TO ct_lines.
lv_firstloop = abap_false.
ENDLOOP.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
687,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
9186,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
41876,
7500,
292,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
269,
62,
15252,
3672,
62,
687,
220,
220,
220,
41876,
262,
324,
12,
8671,
15252,
26173,
8924,
705,
21389,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
269,
62,
15252,
3672,
62,
8671,
6615,
41876,
262,
324,
12,
8671,
15252,
26173,
8924,
705,
51,
19260,
1268,
1546,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
269,
62,
2302,
3004,
62,
19875,
220,
220,
220,
220,
220,
41876,
4731,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
705,
19875,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
42865,
25,
285,
85,
62,
687,
62,
3672,
220,
41876,
340,
310,
64,
12,
8671,
687,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
256,
893,
62,
687,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1296,
62,
25677,
220,
220,
41876,
340,
310,
64,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
62,
25677,
220,
220,
41876,
262,
324,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1796,
62,
16129,
41876,
827,
12,
75,
2303,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5468,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
340,
310,
70,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2443,
62,
28457,
220,
41876,
49053,
9795,
43679,
3963,
340,
310,
71,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23549,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
340,
10210,
79,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13042,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
340,
66,
9310,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22524,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
340,
10210,
80,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9168,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
340,
310,
86,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
256,
893,
62,
687,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
83,
62,
687,
62,
7890,
220,
220,
41876,
49053,
9795,
43679,
3963,
256,
893,
62,
687,
62,
7890,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
83,
62,
687,
62,
25677,
41876,
49053,
9795,
43679,
3963,
340,
310,
64,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
893,
62,
687,
62,
25677,
41876,
48920,
3963,
1259,
83,
62,
687,
62,
25677,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
83,
62,
5239,
62,
25677,
41876,
49053,
9795,
43679,
3963,
262,
324,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
893,
62,
5239,
62,
25677,
41876,
48920,
3963,
1259,
83,
62,
5239,
62,
25677,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
83,
62,
6615,
220,
220,
220,
220,
220,
220,
41876,
256,
1370,
62,
8658,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
12957,
62,
36653,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
687,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
12957,
62,
40985,
8,
41876,
256,
893,
62,
687,
62,
25677,
13,
628,
220,
220,
220,
337,
36252,
50,
1382,
62,
26086,
62,
6738,
62,
25677,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
25677,
220,
220,
220,
220,
220,
220,
220,
41876,
256,
893,
62,
687,
62,
25677,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
20274,
8,
41876,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
1382,
62,
26086,
62,
6738,
62,
25677,
62,
727,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
25677,
220,
220,
220,
220,
220,
220,
220,
41876,
256,
893,
62,
687,
62,
25677,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
20274,
8,
41876,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
4808,
21928,
62,
687,
198,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1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final
create private
global friends ZCL_BOPF_MANAGER .
public section.
data MO_CONFIG type ref to /BOBF/IF_FRW_CONFIGURATION read-only .
data MV_ROOT_NODE type /BOBF/OBM_NODE_KEY read-only .
data MV_BO_KEY type /BOBF/OBM_BO_KEY read-only .
data MV_BOPF_NAME type /BOBF/OBM_OBJ-NAME read-only .
methods CONSTRUCTOR
importing
!IV_BOPF_NAME type CSEQUENCE
raising
/BOBF/CX_FRW .
methods GET_NODE
importing
!IV_NODE_TYPE type /BOBF/OBM_NODE_KEY
exporting
!ES_NODE type /BOBF/S_CONFRO_NODE
!ER_DATA type ref to DATA
!ER_DATA_TABLE type ref to DATA .
methods GET_NODE_ASSOC
importing
!IV_PARENT_TYPE type /BOBF/OBM_NODE_KEY
!IV_ASSOC_TYPE type /BOBF/OBM_NODE_KEY
exporting
!ES_ASSOC type /BOBF/S_CONFRO_ASSOC
!ER_DATA type ref to DATA
!ER_DATA_TABLE type ref to DATA
raising
/BOBF/CX_FRW .
methods GET_INTF_NODE_NAME
importing
!IV_NODE type /BOBF/OBM_NODE_KEY
exporting
!EV_NAME type STRING
!EV_FULL_NAME type STRING .
methods GET_INTF_NODE_NAME_NESTED
importing
!IV_NODE type /BOBF/OBM_NODE_KEY
!IV_STRUC type CSEQUENCE
exporting
!EV_NAME type STRING
!EV_FULL_NAME type STRING .
protected section.
private section.
data MV_INTERFACE type SEOCLASS-CLSNAME .
data MV_SELECT_ALL type /BOBF/OBM_QUERY_KEY .
data MV_SELECT_BY_ELEMENTS type /BOBF/OBM_QUERY_KEY .
methods _GET_QUERY
importing
!IV_QUERY type CSEQUENCE
!IV_ROOT_NAME type CSEQUENCE
returning
value(RV_QUERY_KEY) type /BOBF/OBM_QUERY_KEY
raising
/BOBF/CX_FRW .
ENDCLASS.
CLASS ZCL_BOPF_METADATA IMPLEMENTATION.
METHOD constructor.
mv_bopf_name = iv_bopf_name.
SELECT SINGLE bo_key,
root_node_key,
objcat,
const_interface INTO @DATA(ls_obj)
FROM /bobf/obm_obj
WHERE name = @mv_bopf_name.
IF sy-subrc <> 0.
zcl_bopf_messages=>raise_error( iv_message = |'{ mv_bopf_name }' BOPF is not found | ).
ENDIF.
mv_bo_key = ls_obj-bo_key.
mv_interface = ls_obj-const_interface.
mo_config = /bobf/cl_frw_factory=>get_configuration( mv_bo_key ).
mv_root_node = ls_obj-root_node_key.
get_intf_node_name( EXPORTING iv_node = mv_root_node
IMPORTING ev_name = DATA(lv_root_name) ).
IF lv_root_name IS INITIAL.
zcl_bopf_messages=>raise_error( iv_message = |ROOT node in '{ mv_bopf_name }' is not found| ).
ENDIF.
IF ls_obj-objcat = /bobf/if_conf_c=>sc_objcat_bo OR ls_obj-objcat = /bobf/if_conf_c=>sc_objcat_mdo.
mv_select_all = _get_query( iv_query = 'SELECT_ALL'
iv_root_name = lv_root_name ).
mv_select_by_elements = _get_query( iv_query = 'SELECT_BY_ELEMENTS'
iv_root_name = lv_root_name ).
ENDIF.
" Check 'ROOT' node
DATA(lv_name) = |{ mv_interface }=>SC_NODE-{ lv_root_name }|.
ASSIGN (lv_name) TO FIELD-SYMBOL(<lv_root_node>) CASTING TYPE /bobf/obm_node_key.
IF mv_root_node <> <lv_root_node>.
zcl_bopf_messages=>raise_error( iv_message = |Wrong version of '{ mv_bopf_name }' was loaded| ).
ENDIF.
" Check BO key
lv_name = |{ mv_interface }=>SC_BO_KEY|.
ASSIGN (lv_name) TO FIELD-SYMBOL(<lv_bo_key>) CASTING TYPE /bobf/obm_bo_key.
IF sy-subrc <> 0 OR ls_obj-bo_key <> ls_obj-bo_key.
zcl_bopf_messages=>raise_error( iv_message = |Wrong version of '{ mv_bopf_name }' was loaded| ).
ENDIF.
ENDMETHOD.
METHOD get_intf_node_name.
CLEAR: ev_name,
ev_full_name.
" All nodes
DATA(lv_name) = |{ mv_interface }=>SC_NODE|.
ASSIGN (lv_name) TO FIELD-SYMBOL(<ls_sc_node>).
DATA(lo_struc) = CAST cl_abap_structdescr( cl_abap_structdescr=>describe_by_data( <ls_sc_node> ) ).
LOOP AT lo_struc->components ASSIGNING FIELD-SYMBOL(<ls_comp>).
DATA(lv_full_name) = |{ mv_interface }=>SC_NODE-{ <ls_comp>-name }|.
ASSIGN (lv_full_name) TO FIELD-SYMBOL(<lv_node_key>).
CHECK <lv_node_key> = iv_node.
ev_name = <ls_comp>-name.
ev_full_name = lv_full_name.
RETURN.
ENDLOOP.
ENDMETHOD.
METHOD get_intf_node_name_nested.
CLEAR: ev_name,
ev_full_name.
" All nodes
DATA(lv_name) = |{ mv_interface }=>{ iv_struc }|.
ASSIGN (lv_name) TO FIELD-SYMBOL(<ls_sc_node>).
DATA(lo_struc) = CAST cl_abap_structdescr( cl_abap_structdescr=>describe_by_data( <ls_sc_node> ) ).
LOOP AT lo_struc->components ASSIGNING FIELD-SYMBOL(<ls_comp>).
DATA(lv_assoc_name) = |{ mv_interface }=>{ iv_struc }-{ <ls_comp>-name }|.
ASSIGN (lv_assoc_name) TO FIELD-SYMBOL(<lv_node_stuc>).
" Structure in structure %)
DATA(lo_struc2) = CAST cl_abap_structdescr( cl_abap_structdescr=>describe_by_data( <lv_node_stuc> ) ).
LOOP AT lo_struc2->components ASSIGNING FIELD-SYMBOL(<ls_comp2>).
DATA(lv_full_name) = |{ mv_interface }=>{ iv_struc }-{ <ls_comp>-name }-{ <ls_comp2>-name }|.
ASSIGN (lv_full_name) TO FIELD-SYMBOL(<lv_node_key>).
CHECK <lv_node_key> = iv_node.
ev_name = <ls_comp>-name.
ev_full_name = lv_full_name.
RETURN.
ENDLOOP.
ENDLOOP.
ENDMETHOD.
METHOD get_node.
CLEAR: es_node,
er_data,
"er_data_data,
er_data_table.
mo_config->get_node(
EXPORTING iv_node_key = iv_node_type
IMPORTING es_node = es_node ).
IF er_data IS REQUESTED.
CREATE DATA er_data TYPE (es_node-data_type).
ENDIF.
* IF er_data_data IS REQUESTED.
* CREATE DATA er_data_data TYPE (es_node-data_data_type).
* ENDIF.
IF er_data_table IS REQUESTED.
CREATE DATA er_data_table TYPE (es_node-data_table_type).
ENDIF.
ENDMETHOD.
METHOD get_node_assoc.
CLEAR: es_assoc,
er_data,
"er_data_data,
er_data_table.
mo_config->get_assoc(
EXPORTING iv_assoc_key = iv_assoc_type
iv_node_key = iv_parent_type
IMPORTING es_assoc = es_assoc ).
IF es_assoc-target_node IS NOT BOUND.
RAISE EXCEPTION TYPE /bobf/cx_conf
EXPORTING
textid = /bobf/cx_conf=>type_not_existing
mv_type_name = es_assoc-assoc_name.
ENDIF.
" Business objects
IF es_assoc-target_node->node_type = /bobf/if_conf_c=>sc_node_type_bo AND
( es_assoc-target_node->data_type IS INITIAL OR es_assoc-target_node->data_table_type IS INITIAL ).
DATA(lo_manager) = zcl_bopf_manager=>create( es_assoc-target_node->node_esr_name ).
lo_manager->mo_metadata->get_node(
EXPORTING iv_node_type = lo_manager->mo_metadata->mv_root_node
IMPORTING er_data = er_data
er_data_table = er_data_table
es_node = DATA(ls_node) ).
RETURN.
ENDIF.
IF er_data IS REQUESTED.
CREATE DATA er_data TYPE (es_assoc-target_node->data_type).
ENDIF.
* IF er_data_data IS REQUESTED.
* CREATE DATA er_data_data TYPE (es_assoc-target_node->data_data_type).
* ENDIF.
IF er_data_table IS REQUESTED.
CREATE DATA er_data_table TYPE (es_assoc-target_node->data_table_type).
ENDIF.
ENDMETHOD.
METHOD _get_query.
DATA(lv_name) = |{ mv_interface }=>SC_QUERY-{ iv_root_name }-{ iv_query }|.
ASSIGN (lv_name) TO FIELD-SYMBOL(<lv_query_key>) CASTING TYPE /bobf/obm_query_key.
IF sy-subrc <> 0.
zcl_bopf_messages=>raise_error( iv_message = |{ iv_query } node in '{ mv_bopf_name }' is not found| ).
ENDIF.
rv_query_key = <lv_query_key>.
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
33,
3185,
37,
62,
47123,
2885,
13563,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
2839,
628,
220,
3298,
2460,
1168,
5097,
62,
33,
3185,
37,
62,
10725,
4760,
1137,
764,
198,
198,
11377,
2665,
13,
628,
220,
1366,
13070,
62,
10943,
16254,
2099,
1006,
284,
1220,
8202,
29499,
14,
5064,
62,
10913,
54,
62,
10943,
16254,
4261,
6234,
1100,
12,
8807,
764,
198,
220,
1366,
32947,
62,
13252,
2394,
62,
45,
16820,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
45,
16820,
62,
20373,
1100,
12,
8807,
764,
198,
220,
1366,
32947,
62,
8202,
62,
20373,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
8202,
62,
20373,
1100,
12,
8807,
764,
198,
220,
1366,
32947,
62,
33,
3185,
37,
62,
20608,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
9864,
41,
12,
20608,
1100,
12,
8807,
764,
628,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
33,
3185,
37,
62,
20608,
2099,
327,
5188,
10917,
18310,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1220,
8202,
29499,
14,
34,
55,
62,
10913,
54,
764,
198,
220,
5050,
17151,
62,
45,
16820,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
45,
16820,
62,
25216,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
45,
16820,
62,
20373,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
1546,
62,
45,
16820,
2099,
1220,
8202,
29499,
14,
50,
62,
10943,
10913,
46,
62,
45,
16820,
198,
220,
220,
220,
220,
220,
5145,
1137,
62,
26947,
2099,
1006,
284,
42865,
198,
220,
220,
220,
220,
220,
5145,
1137,
62,
26947,
62,
38148,
2099,
1006,
284,
42865,
764,
198,
220,
5050,
17151,
62,
45,
16820,
62,
10705,
4503,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
27082,
3525,
62,
25216,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
45,
16820,
62,
20373,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
10705,
4503,
62,
25216,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
45,
16820,
62,
20373,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
1546,
62,
10705,
4503,
2099,
1220,
8202,
29499,
14,
50,
62,
10943,
10913,
46,
62,
10705,
4503,
198,
220,
220,
220,
220,
220,
5145,
1137,
62,
26947,
2099,
1006,
284,
42865,
198,
220,
220,
220,
220,
220,
5145,
1137,
62,
26947,
62,
38148,
2099,
1006,
284,
42865,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1220,
8202,
29499,
14,
34,
55,
62,
10913,
54,
764,
198,
220,
5050,
17151,
62,
1268,
10234,
62,
45,
16820,
62,
20608,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
45,
16820,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
45,
16820,
62,
20373,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
20114,
62,
20608,
2099,
19269,
2751,
198,
220,
220,
220,
220,
220,
5145,
20114,
62,
37,
9994,
62,
20608,
2099,
19269,
2751,
764,
198,
220,
5050,
17151,
62,
1268,
10234,
62,
45,
16820,
62,
20608,
62,
45,
6465,
1961,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
45,
16820,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
45,
16820,
62,
20373,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
18601,
9598,
2099,
327,
5188,
10917,
18310,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
20114,
62,
20608,
2099,
19269,
2751,
198,
220,
220,
220,
220,
220,
5145,
20114,
62,
37,
9994,
62,
20608,
2099,
19269,
2751,
764,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
628,
220,
1366,
32947,
62,
41358,
49836,
2099,
7946,
4503,
43,
10705,
12,
5097,
15571,
10067,
764,
198,
220,
1366,
32947,
62,
46506,
62,
7036,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
10917,
19664,
62,
20373,
764,
198,
220,
1366,
32947,
62,
46506,
62,
17513,
62,
36,
2538,
28957,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
10917,
19664,
62,
20373,
764,
628,
220,
5050,
4808,
18851,
62,
10917,
19664,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
10917,
19664,
2099,
327,
5188,
10917,
18310,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
13252,
2394,
62,
20608,
2099,
327,
5188,
10917,
18310,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
53,
62,
10917,
19664,
62,
20373,
8,
2099,
1220,
8202,
29499,
14,
9864,
44,
62,
10917,
19664,
62,
20373,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1220,
8202,
29499,
14,
34,
55,
62,
10913,
54,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
33,
3185,
37,
62,
47123,
2885,
13563,
30023,
2538,
10979,
6234,
13,
628,
198,
49273,
23772,
13,
198,
220,
285,
85,
62,
65,
404,
69,
62,
3672,
796,
21628,
62,
65,
404,
69,
62,
3672,
13,
628,
220,
33493,
311,
2751,
2538,
1489,
62,
2539,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6808,
62,
17440,
62,
2539,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26181,
9246,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1500,
62,
39994,
39319,
2488,
26947,
7,
7278,
62,
26801,
8,
198,
220,
16034,
1220,
65,
672,
69,
14,
672,
76,
62,
26801,
198,
220,
33411,
1438,
796,
2488,
76,
85,
62,
65,
404,
69,
62,
3672,
13,
198,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
1976,
565,
62,
65,
404,
69,
62,
37348,
1095,
14804,
40225,
62,
18224,
7,
21628,
62,
20500,
796,
930,
6,
90,
285,
85,
62,
65,
404,
69,
62,
3672,
1782,
6,
347,
3185,
37,
318,
407,
1043,
930,
6739,
198,
220,
23578,
5064,
13,
628,
220,
285,
85,
62,
2127,
62,
2539,
220,
220,
220,
796,
43979,
62,
26801,
12,
2127,
62,
2539,
13,
198,
220,
285,
85,
62,
39994,
796,
43979,
62,
26801,
12,
9979,
62,
39994
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
FUNCTION /gal/js_check_preconditions.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(RFC_ROUTE_INFO) TYPE /GAL/RFC_ROUTE_INFO OPTIONAL
*" REFERENCE(JOB_ID) TYPE /GAL/JOB_ID
*" EXPORTING
*" REFERENCE(FULFILLED) TYPE FLAG
*" EXCEPTIONS
*" RFC_EXCEPTION
*"----------------------------------------------------------------------
* Initialize result
CLEAR fulfilled.
* Follow RFC route
cfw_custom_auth /gal/cfw_auth=>const_cab_no_check.
cfw_follow_rfc_route rfc_route_info.
cfw_pass_exception rfc_exception.
cfw_remote_coding.
* Check if preconditions for job are met
SELECT COUNT( * ) UP TO 1 ROWS
FROM /gal/jobdata01 AS j1 INNER JOIN /gal/jobdata02 AS j2
ON j1~id = j2~job_id
WHERE j2~status = 'N' AND j1~id = job_id. "#EC CI_SUBRC
IF sy-dbcnt = 0.
fulfilled = abap_true.
ELSE.
fulfilled = abap_false.
ENDIF.
ENDFUNCTION.
| [
42296,
4177,
2849,
1220,
13528,
14,
8457,
62,
9122,
62,
3866,
17561,
1756,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
43,
482,
1000,
45606,
715,
301,
13485,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
41150,
62,
49,
2606,
9328,
62,
10778,
8,
41876,
220,
1220,
38,
1847,
14,
41150,
62,
49,
2606,
9328,
62,
10778,
39852,
2849,
1847,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
41,
9864,
62,
2389,
8,
41876,
220,
1220,
38,
1847,
14,
41,
9864,
62,
2389,
198,
9,
1,
220,
7788,
15490,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
46476,
37,
8267,
1961,
8,
41876,
220,
9977,
4760,
198,
9,
1,
220,
7788,
42006,
11053,
198,
9,
1,
220,
220,
220,
220,
220,
30978,
62,
6369,
42006,
2849,
198,
9,
1,
10097,
23031,
198,
198,
9,
20768,
1096,
1255,
198,
220,
30301,
1503,
23085,
13,
198,
198,
9,
7281,
30978,
6339,
198,
220,
30218,
86,
62,
23144,
62,
18439,
1220,
13528,
14,
12993,
86,
62,
18439,
14804,
9979,
62,
66,
397,
62,
3919,
62,
9122,
13,
198,
220,
30218,
86,
62,
27780,
62,
81,
16072,
62,
38629,
374,
16072,
62,
38629,
62,
10951,
13,
198,
220,
30218,
86,
62,
6603,
62,
1069,
4516,
374,
16072,
62,
1069,
4516,
13,
198,
220,
30218,
86,
62,
47960,
62,
66,
7656,
13,
198,
198,
9,
6822,
611,
3718,
623,
1756,
329,
1693,
389,
1138,
198,
220,
33493,
327,
28270,
7,
1635,
1267,
15958,
5390,
352,
371,
22845,
198,
220,
220,
220,
220,
220,
220,
220,
220,
16034,
1220,
13528,
14,
21858,
7890,
486,
7054,
474,
16,
3268,
21479,
32357,
1268,
1220,
13528,
14,
21858,
7890,
2999,
7054,
474,
17,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6177,
474,
16,
93,
312,
796,
474,
17,
93,
21858,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33411,
474,
17,
93,
13376,
796,
705,
45,
6,
5357,
474,
16,
93,
312,
796,
1693,
62,
312,
13,
220,
220,
25113,
2943,
14514,
62,
50,
10526,
7397,
198,
220,
16876,
827,
12,
9945,
66,
429,
796,
657,
13,
198,
220,
220,
220,
23085,
796,
450,
499,
62,
7942,
13,
198,
220,
17852,
5188,
13,
198,
220,
220,
220,
23085,
796,
450,
499,
62,
9562,
13,
198,
220,
23578,
5064,
13,
198,
1677,
8068,
4944,
4177,
2849,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
INTERFACE zif_abapgit_gui_renderable
PUBLIC .
METHODS render
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception.
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
13287,
540,
198,
220,
44731,
764,
628,
220,
337,
36252,
50,
8543,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6494,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
41358,
49836,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ycl_a2g_json_batchupdate_req DEFINITION
PUBLIC
INHERITING FROM ycl_a2g_jsonbase
CREATE PUBLIC .
PUBLIC SECTION.
"! Build the class
"! @parameter if_msg_manager | message managere where soter alla message triggered by the applicaition
METHODS constructor
IMPORTING if_msg_manager TYPE REF TO yif_a2g_msg_manager.
METHODS: yif_a2g_json~new_element REDEFINITION.
METHODS: yif_a2g_json~get_element REDEFINITION.
METHODS: yif_a2g_json~set_attribute REDEFINITION.
METHODS: yif_a2g_json~get_attribute REDEFINITION.
TYPES: BEGIN OF ty_s_json_batchupdate_req,
valueinputoption TYPE string,
data TYPE ycl_a2g_json_valuerange=>ty_t_json_value_range,
includevaluesinresponse TYPE string,
responsevaluerenderoption TYPE string,
responsedatetimerenderoption TYPE string,
END OF ty_s_json_batchupdate_req.
CONSTANTS: gc_fnam_valueinputoption TYPE string VALUE 'VALUEINPUTOPTION'.
CONSTANTS: gc_fnam_data TYPE string VALUE 'DATA'.
CONSTANTS: gc_fnam_includevaluesinres TYPE string VALUE 'INCLUDEVALUESRES'.
CONSTANTS: gc_fnam_resvaluerenderoption TYPE string VALUE 'RESVALUERENDEROPTION'.
CONSTANTS: gc_fnam_resdatetimerenderopt TYPE string VALUE 'RESDATETIMERENDEROPT'.
PROTECTED SECTION.
METHODS generate_rules REDEFINITION.
METHODS rebuild_data REDEFINITION.
METHODS push_data REDEFINITION.
DATA: gs_batchupdate_req TYPE ty_s_json_batchupdate_req.
METHODS SET_valueinputoption IMPORTING !i_value TYPE REF TO data.
METHODS SET_includevaluesinres IMPORTING !i_value TYPE REF TO data.
METHODS SET_resvaluerenderoption IMPORTING !i_value TYPE REF TO data.
METHODS SET_resdatetimerenderopt IMPORTING !i_value TYPE REF TO data.
METHODS new_datafilters RETURNING VALUE(return) TYPE REF TO yif_a2g_json.
PRIVATE SECTION.
ENDCLASS.
CLASS YCL_A2G_JSON_BATCHUPDATE_REQ IMPLEMENTATION.
METHOD constructor.
super->constructor( if_msg_manager ).
me->gv_data = REF #( me->gs_batchupdate_req ).
ENDMETHOD.
METHOD generate_rules.
ENDMETHOD.
METHOD new_datafilters.
DATA: lo_object TYPE REF TO object.
return = me->go_json_factory->build_json_instance( 'YCL_A2G_JSON_VALUERANGE' ).
lo_object ?= return.
DATA: lv_line TYPE numc4.
DATA(lt_names) = me->go_json_array->getpartnamesofinstances( me->gc_fnam_data ).
lv_line = lines( lt_names ).
me->go_json_array->setinstance( im_name = me->gc_fnam_data && lv_line
im_object = lo_object ).
ENDMETHOD.
METHOD push_data.
LOOP AT me->gs_batchupdate_req-DATA INTO DATA(ls_datafilter).
DATA(lif_a2g_json_grid) = me->new_datafilters( ).
lif_a2g_json_grid->yif_a2g_context~write_data( REF #( ls_datafilter ) ).
ENDLOOP.
ENDMETHOD.
METHOD rebuild_data.
DATA: lif_a2g_json TYPE REF TO yif_a2g_json.
FIELD-SYMBOLS <fs_value_range> TYPE any.
DATA(lt_names) = me->go_json_array->getpartnamesofinstances( me->gc_fnam_data ).
LOOP AT lt_names INTO DATA(lv_name).
lif_a2g_json ?= me->go_json_array->getinstance( lv_name ).
DATA(dref_data) = lif_a2g_json->yif_a2g_context~read_data( ).
ASSIGN dref_data->* TO <fs_value_range>.
APPEND <fs_value_range> TO me->gs_batchupdate_req-datA.
ENDLOOP.
ENDMETHOD.
METHOD SET_includevaluesinres.
FIELD-SYMBOLS <fs_value> TYPE STRING.
ASSIGN i_value->* TO <fs_value>.
IF <fs_value> IS ASSIGNED.
CHECK me->gs_batchupdate_req-includevaluesinresponse <> <fs_value>.
me->gs_batchupdate_req-includevaluesinresponse = <fs_value>.
ENDIF.
ENDMETHOD.
METHOD SET_resdatetimerenderopt .
FIELD-SYMBOLS <fs_value> TYPE STRING.
ASSIGN i_value->* TO <fs_value>.
IF <fs_value> IS ASSIGNED.
CHECK me->gs_batchupdate_req-responsedatetimerenderoption <> <fs_value>.
me->gs_batchupdate_req-responsedatetimerenderoption = <fs_value>.
ENDIF.
ENDMETHOD.
METHOD SET_resvaluerenderoption.
FIELD-SYMBOLS <fs_value> TYPE STRING.
ASSIGN i_value->* TO <fs_value>.
IF <fs_value> IS ASSIGNED.
CHECK me->gs_batchupdate_req-responsevaluerenderoption <> <fs_value>.
me->gs_batchupdate_req-responsevaluerenderoption = <fs_value>.
ENDIF.
ENDMETHOD.
METHOD SET_valueinputoption.
FIELD-SYMBOLS <fs_value> TYPE STRING.
ASSIGN i_value->* TO <fs_value>.
IF <fs_value> IS ASSIGNED.
CHECK me->gs_batchupdate_req-valueinputoption <> <fs_value>.
me->gs_batchupdate_req-valueinputoption = <fs_value>.
ENDIF.
ENDMETHOD.
METHOD yif_a2g_json~get_attribute.
CASE i_name.
WHEN gc_fnam_valueinputoption . return = REF #( me->gs_batchupdate_req-valueinputoption ).
WHEN gc_fnam_includevaluesinres . return = REF #( me->gs_batchupdate_req-includevaluesinresponse ).
WHEN gc_fnam_resvaluerenderoption . return = REF #( me->gs_batchupdate_req-responsevaluerenderoption ).
WHEN gc_fnam_resdatetimerenderopt . return = REF #( me->gs_batchupdate_req-responsedatetimerenderoption ).
ENDCASE.
ENDMETHOD.
METHOD yif_a2g_json~get_element.
CASE i_name .
WHEN gc_fnam_data.
DATA(lt_names) = me->go_json_array->getpartnamesofinstances( me->gc_fnam_data ).
TRY.
DATA(lv_name) = lt_names[ i_enum ].
return ?= me->go_json_array->getinstance( lv_name ).
CATCH cx_sy_itab_line_not_found.
ENDTRY.
ENDCASE.
ENDMETHOD.
METHOD yif_a2g_json~new_element.
CASE i_name .
WHEN gc_fnam_data . return = me->new_datafilters( ).
ENDCASE.
ENDMETHOD.
METHOD yif_a2g_json~set_attribute.
CASE i_name.
WHEN gc_fnam_valueinputoption . me->SET_valueinputoption( i_value ).
WHEN gc_fnam_includevaluesinres . me->SET_includevaluesinres( i_value ).
WHEN gc_fnam_resdatetimerenderopt . me->SET_resvaluerenderoption( i_value ).
WHEN gc_fnam_resdatetimerenderopt . me->SET_resdatetimerenderopt( i_value ).
ENDCASE.
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
565,
62,
64,
17,
70,
62,
17752,
62,
43501,
19119,
62,
42180,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
331,
565,
62,
64,
17,
70,
62,
17752,
8692,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
366,
0,
10934,
262,
1398,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
611,
62,
19662,
62,
37153,
930,
3275,
6687,
260,
810,
264,
19543,
477,
64,
3275,
13973,
416,
262,
2161,
64,
653,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
611,
62,
19662,
62,
37153,
41876,
4526,
37,
5390,
331,
361,
62,
64,
17,
70,
62,
19662,
62,
37153,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
331,
361,
62,
64,
17,
70,
62,
17752,
93,
3605,
62,
30854,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
331,
361,
62,
64,
17,
70,
62,
17752,
93,
1136,
62,
30854,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
331,
361,
62,
64,
17,
70,
62,
17752,
93,
2617,
62,
42348,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
331,
361,
62,
64,
17,
70,
62,
17752,
93,
1136,
62,
42348,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
82,
62,
17752,
62,
43501,
19119,
62,
42180,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
15414,
18076,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
331,
565,
62,
64,
17,
70,
62,
17752,
62,
2100,
15573,
858,
14804,
774,
62,
83,
62,
17752,
62,
8367,
62,
9521,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
846,
18206,
947,
259,
26209,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2882,
8367,
13287,
18076,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2424,
276,
265,
8079,
13287,
18076,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
82,
62,
17752,
62,
43501,
19119,
62,
42180,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
308,
66,
62,
69,
7402,
62,
8367,
15414,
18076,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
39488,
1268,
30076,
3185,
24131,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
308,
66,
62,
69,
7402,
62,
7890,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
26947,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
308,
66,
62,
69,
7402,
62,
259,
758,
18206,
947,
259,
411,
220,
220,
41876,
4731,
26173,
8924,
705,
1268,
5097,
52,
7206,
23428,
35409,
19535,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
308,
66,
62,
69,
7402,
62,
411,
8367,
13287,
18076,
41876,
4731,
26173,
8924,
705,
19535,
23428,
52,
1137,
10619,
1137,
3185,
24131,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
308,
66,
62,
69,
7402,
62,
411,
19608,
8079,
13287,
8738,
41876,
4731,
26173,
8924,
705,
19535,
35,
1404,
2767,
3955,
1137,
10619,
1137,
3185,
51,
4458,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
7716,
62,
38785,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
17884,
62,
7890,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
4574,
62,
7890,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
628,
220,
220,
220,
42865,
25,
308,
82,
62,
43501,
19119,
62,
42180,
41876,
1259,
62,
82,
62,
17752,
62,
43501,
19119,
62,
42180,
13,
628,
220,
220,
220,
337,
36252,
50,
25823,
62,
8367,
15414,
18076,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
5145,
72,
62,
8367,
41876,
4526,
37,
5390,
1366,
13,
198,
220,
220,
220,
337,
36252,
50,
25823,
62,
259,
758,
18206,
947,
259,
411,
220,
220,
220,
220,
30023,
9863,
2751,
5145,
72,
62,
8367,
41876,
4526,
37,
5390,
1366,
13,
198,
220,
220,
220,
337,
36252,
50,
25823,
62,
411,
8367,
13287,
18076,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
5145,
72,
62,
8367,
41876,
4526,
37,
5390,
1366,
13,
198,
220,
220,
220,
337,
36252,
50,
25823,
62,
411,
19608,
8079,
13287,
8738,
220,
220,
30023,
9863,
2751,
5145,
72,
62,
8367,
41876,
4526,
37,
5390,
1366,
13,
628,
220,
220,
220,
337,
36252,
50,
649,
62,
7890,
10379,
1010,
30826,
4261,
15871,
26173,
8924,
7,
7783,
8,
41876,
4526,
37,
5390,
331,
361,
62,
64,
17,
70,
62,
17752,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
575,
5097,
62,
32,
17,
38,
62,
40386,
62,
33,
11417,
16977,
62,
2200,
48,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
2208,
3784,
41571,
273,
7,
611,
62,
19662,
62,
37153,
6739,
198,
220,
220,
220,
502,
3784,
70,
85,
62,
7890,
796,
4526,
37,
1303,
7,
502,
3784,
14542,
62,
43501,
19119,
62,
42180,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
7716,
62,
38785,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
649,
62,
7890,
10379,
1010,
13,
198,
220,
220,
220,
42865,
25,
2376,
62,
15252,
41876,
4526,
37,
5390,
2134,
13,
198,
220,
220,
220,
1441,
796,
502,
3784,
2188,
62,
17752,
62,
69,
9548,
3784,
11249,
62,
17752,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*---------------------------------------------------------------------*
* program for: TABLEPROC_ZBUGTRACKERMODEL
* generation date: 17.03.2013 at 21:51:26 by user BCUSER
* view maintenance generator version: #001407#
*---------------------------------------------------------------------*
FUNCTION TABLEPROC_ZBUGTRACKERMODEL .
PERFORM TABLEPROC.
ENDFUNCTION.
| [
9,
10097,
30934,
9,
198,
9,
220,
220,
220,
1430,
329,
25,
220,
220,
43679,
4805,
4503,
62,
57,
12953,
5446,
8120,
1137,
33365,
3698,
198,
9,
220,
220,
5270,
3128,
25,
1596,
13,
3070,
13,
6390,
379,
2310,
25,
4349,
25,
2075,
416,
2836,
11843,
29904,
198,
9,
220,
220,
1570,
9262,
17301,
2196,
25,
1303,
405,
1415,
2998,
2,
198,
9,
10097,
30934,
9,
198,
42296,
4177,
2849,
43679,
4805,
4503,
62,
57,
12953,
5446,
8120,
1137,
33365,
3698,
220,
220,
220,
764,
628,
220,
19878,
21389,
43679,
4805,
4503,
13,
198,
198,
1677,
8068,
4944,
4177,
2849,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
INTERFACE zif_github PUBLIC.
* Generated by abap-openapi-client
* GitHub v3 REST API, 1.1.4
* Component schema: nullable-simple-user, object
TYPES: BEGIN OF nullable_simple_user,
name TYPE string,
email TYPE string,
login TYPE string,
id TYPE i,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
events_url TYPE string,
received_events_url TYPE string,
type TYPE string,
site_admin TYPE abap_bool,
starred_at TYPE string,
END OF nullable_simple_user.
* Component schema: integration, object
TYPES: BEGIN OF subintegration_permissions,
issues TYPE string,
checks TYPE string,
metadata TYPE string,
contents TYPE string,
deployments TYPE string,
END OF subintegration_permissions.
TYPES: BEGIN OF integration,
id TYPE i,
slug TYPE string,
node_id TYPE string,
owner TYPE nullable_simple_user,
name TYPE string,
description TYPE string,
external_url TYPE string,
html_url TYPE string,
created_at TYPE string,
updated_at TYPE string,
permissions TYPE subintegration_permissions,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
installations_count TYPE i,
client_id TYPE string,
client_secret TYPE string,
webhook_secret TYPE string,
pem TYPE string,
END OF integration.
* Component schema: basic-error, object
TYPES: BEGIN OF basic_error,
message TYPE string,
documentation_url TYPE string,
url TYPE string,
status TYPE string,
END OF basic_error.
* Component schema: validation-error-simple, object
TYPES: BEGIN OF validation_error_simple,
message TYPE string,
documentation_url TYPE string,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF validation_error_simple.
* Component schema: webhook-config-url, string
TYPES webhook_config_url TYPE string.
* Component schema: webhook-config-content-type, string
TYPES webhook_config_content_type TYPE string.
* Component schema: webhook-config-secret, string
TYPES webhook_config_secret TYPE string.
* Component schema: webhook-config-insecure-ssl, string
TYPES webhook_config_insecure_ssl TYPE string.
* Component schema: webhook-config, object
TYPES: BEGIN OF webhook_config,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
END OF webhook_config.
* Component schema: hook-delivery-item, object
TYPES: BEGIN OF hook_delivery_item,
id TYPE i,
guid TYPE string,
delivered_at TYPE string,
redelivery TYPE abap_bool,
duration TYPE f,
status TYPE string,
status_code TYPE i,
event TYPE string,
action TYPE string,
installation_id TYPE i,
repository_id TYPE i,
END OF hook_delivery_item.
* Component schema: scim-error, object
TYPES: BEGIN OF scim_error,
message TYPE string,
documentation_url TYPE string,
detail TYPE string,
status TYPE i,
scimtype TYPE string,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF scim_error.
* Component schema: validation-error, object
TYPES: BEGIN OF validation_error,
message TYPE string,
documentation_url TYPE string,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF validation_error.
* Component schema: hook-delivery, object
TYPES: BEGIN OF subsubhook_delivery_response_h,
dummy_workaround TYPE i,
END OF subsubhook_delivery_response_h.
TYPES: BEGIN OF subhook_delivery_response,
headers TYPE subsubhook_delivery_response_h,
payload TYPE string,
END OF subhook_delivery_response.
TYPES: BEGIN OF subsubhook_delivery_request_pa,
dummy_workaround TYPE i,
END OF subsubhook_delivery_request_pa.
TYPES: BEGIN OF subsubhook_delivery_request_he,
dummy_workaround TYPE i,
END OF subsubhook_delivery_request_he.
TYPES: BEGIN OF subhook_delivery_request,
headers TYPE subsubhook_delivery_request_he,
payload TYPE subsubhook_delivery_request_pa,
END OF subhook_delivery_request.
TYPES: BEGIN OF hook_delivery,
id TYPE i,
guid TYPE string,
delivered_at TYPE string,
redelivery TYPE abap_bool,
duration TYPE f,
status TYPE string,
status_code TYPE i,
event TYPE string,
action TYPE string,
installation_id TYPE i,
repository_id TYPE i,
url TYPE string,
request TYPE subhook_delivery_request,
response TYPE subhook_delivery_response,
END OF hook_delivery.
* Component schema: simple-user, object
TYPES: BEGIN OF simple_user,
name TYPE string,
email TYPE string,
login TYPE string,
id TYPE i,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
events_url TYPE string,
received_events_url TYPE string,
type TYPE string,
site_admin TYPE abap_bool,
starred_at TYPE string,
END OF simple_user.
* Component schema: enterprise, object
TYPES: BEGIN OF enterprise,
description TYPE string,
html_url TYPE string,
website_url TYPE string,
id TYPE i,
node_id TYPE string,
name TYPE string,
slug TYPE string,
created_at TYPE string,
updated_at TYPE string,
avatar_url TYPE string,
END OF enterprise.
* Component schema: app-permissions, object
TYPES: BEGIN OF app_permissions,
actions TYPE string,
administration TYPE string,
checks TYPE string,
contents TYPE string,
deployments TYPE string,
environments TYPE string,
issues TYPE string,
metadata TYPE string,
packages TYPE string,
pages TYPE string,
pull_requests TYPE string,
repository_hooks TYPE string,
repository_projects TYPE string,
secret_scanning_alerts TYPE string,
secrets TYPE string,
security_events TYPE string,
single_file TYPE string,
statuses TYPE string,
vulnerability_alerts TYPE string,
workflows TYPE string,
members TYPE string,
organization_administration TYPE string,
organization_hooks TYPE string,
organization_plan TYPE string,
organization_projects TYPE string,
organization_packages TYPE string,
organization_secrets TYPE string,
organization_self_hosted_runne TYPE string,
organization_user_blocking TYPE string,
team_discussions TYPE string,
END OF app_permissions.
* Component schema: installation, object
TYPES: BEGIN OF installation,
id TYPE i,
account TYPE string,
repository_selection TYPE string,
access_tokens_url TYPE string,
repositories_url TYPE string,
html_url TYPE string,
app_id TYPE i,
target_id TYPE i,
target_type TYPE string,
permissions TYPE app_permissions,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
created_at TYPE string,
updated_at TYPE string,
single_file_name TYPE string,
has_multiple_single_files TYPE abap_bool,
single_file_paths TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
app_slug TYPE string,
suspended_by TYPE nullable_simple_user,
suspended_at TYPE string,
contact_email TYPE string,
END OF installation.
* Component schema: nullable-license-simple, object
TYPES: BEGIN OF nullable_license_simple,
key TYPE string,
name TYPE string,
url TYPE string,
spdx_id TYPE string,
node_id TYPE string,
html_url TYPE string,
END OF nullable_license_simple.
* Component schema: repository, object
TYPES: BEGIN OF subsubrepository_template_re01,
admin TYPE abap_bool,
maintain TYPE abap_bool,
push TYPE abap_bool,
triage TYPE abap_bool,
pull TYPE abap_bool,
END OF subsubrepository_template_re01.
TYPES: BEGIN OF subsubrepository_template_repo,
login TYPE string,
id TYPE i,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
events_url TYPE string,
received_events_url TYPE string,
type TYPE string,
site_admin TYPE abap_bool,
END OF subsubrepository_template_repo.
TYPES: BEGIN OF subrepository_template_reposit,
id TYPE i,
node_id TYPE string,
name TYPE string,
full_name TYPE string,
owner TYPE subsubrepository_template_repo,
private TYPE abap_bool,
html_url TYPE string,
description TYPE string,
fork TYPE abap_bool,
url TYPE string,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
downloads_url TYPE string,
events_url TYPE string,
forks_url TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
git_url TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
notifications_url TYPE string,
pulls_url TYPE string,
releases_url TYPE string,
ssh_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
clone_url TYPE string,
mirror_url TYPE string,
hooks_url TYPE string,
svn_url TYPE string,
homepage TYPE string,
language TYPE string,
forks_count TYPE i,
stargazers_count TYPE i,
watchers_count TYPE i,
size TYPE i,
default_branch TYPE string,
open_issues_count TYPE i,
is_template TYPE abap_bool,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
has_downloads TYPE abap_bool,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
pushed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
permissions TYPE subsubrepository_template_re01,
allow_rebase_merge TYPE abap_bool,
temp_clone_token TYPE string,
allow_squash_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
allow_update_branch TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
subscribers_count TYPE i,
network_count TYPE i,
END OF subrepository_template_reposit.
TYPES: BEGIN OF subrepository_permissions,
admin TYPE abap_bool,
pull TYPE abap_bool,
triage TYPE abap_bool,
push TYPE abap_bool,
maintain TYPE abap_bool,
END OF subrepository_permissions.
TYPES: BEGIN OF repository,
id TYPE i,
node_id TYPE string,
name TYPE string,
full_name TYPE string,
license TYPE nullable_license_simple,
organization TYPE nullable_simple_user,
forks TYPE i,
permissions TYPE subrepository_permissions,
owner TYPE simple_user,
private TYPE abap_bool,
html_url TYPE string,
description TYPE string,
fork TYPE abap_bool,
url TYPE string,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
downloads_url TYPE string,
events_url TYPE string,
forks_url TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
git_url TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
notifications_url TYPE string,
pulls_url TYPE string,
releases_url TYPE string,
ssh_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
clone_url TYPE string,
mirror_url TYPE string,
hooks_url TYPE string,
svn_url TYPE string,
homepage TYPE string,
language TYPE string,
forks_count TYPE i,
stargazers_count TYPE i,
watchers_count TYPE i,
size TYPE i,
default_branch TYPE string,
open_issues_count TYPE i,
is_template TYPE abap_bool,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
has_downloads TYPE abap_bool,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
pushed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
allow_rebase_merge TYPE abap_bool,
template_repository TYPE subrepository_template_reposit,
temp_clone_token TYPE string,
allow_squash_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
allow_forking TYPE abap_bool,
subscribers_count TYPE i,
network_count TYPE i,
open_issues TYPE i,
watchers TYPE i,
master_branch TYPE string,
starred_at TYPE string,
END OF repository.
* Component schema: installation-token, object
TYPES: BEGIN OF installation_token,
token TYPE string,
expires_at TYPE string,
permissions TYPE app_permissions,
repository_selection TYPE string,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
single_file TYPE string,
has_multiple_single_files TYPE abap_bool,
single_file_paths TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF installation_token.
* Component schema: application-grant, object
TYPES: BEGIN OF subapplication_grant_app,
client_id TYPE string,
name TYPE string,
url TYPE string,
END OF subapplication_grant_app.
TYPES: BEGIN OF application_grant,
id TYPE i,
url TYPE string,
app TYPE subapplication_grant_app,
created_at TYPE string,
updated_at TYPE string,
scopes TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
user TYPE nullable_simple_user,
END OF application_grant.
* Component schema: nullable-scoped-installation, object
TYPES: BEGIN OF nullable_scoped_installation,
permissions TYPE app_permissions,
repository_selection TYPE string,
single_file_name TYPE string,
has_multiple_single_files TYPE abap_bool,
single_file_paths TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
repositories_url TYPE string,
account TYPE simple_user,
END OF nullable_scoped_installation.
* Component schema: authorization, object
TYPES: BEGIN OF subauthorization_app,
client_id TYPE string,
name TYPE string,
url TYPE string,
END OF subauthorization_app.
TYPES: BEGIN OF authorization,
id TYPE i,
url TYPE string,
scopes TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
token TYPE string,
token_last_eight TYPE string,
hashed_token TYPE string,
app TYPE subauthorization_app,
note TYPE string,
note_url TYPE string,
updated_at TYPE string,
created_at TYPE string,
fingerprint TYPE string,
user TYPE nullable_simple_user,
installation TYPE nullable_scoped_installation,
expires_at TYPE string,
END OF authorization.
* Component schema: code-of-conduct, object
TYPES: BEGIN OF code_of_conduct,
key TYPE string,
name TYPE string,
url TYPE string,
body TYPE string,
html_url TYPE string,
END OF code_of_conduct.
* Component schema: enabled-organizations, string
TYPES enabled_organizations TYPE string.
* Component schema: allowed-actions, string
TYPES allowed_actions TYPE string.
* Component schema: selected-actions-url, string
TYPES selected_actions_url TYPE string.
* Component schema: actions-enterprise-permissions, object
TYPES: BEGIN OF actions_enterprise_permissions,
enabled_organizations TYPE enabled_organizations,
selected_organizations_url TYPE string,
allowed_actions TYPE allowed_actions,
selected_actions_url TYPE selected_actions_url,
END OF actions_enterprise_permissions.
* Component schema: organization-simple, object
TYPES: BEGIN OF organization_simple,
login TYPE string,
id TYPE i,
node_id TYPE string,
url TYPE string,
repos_url TYPE string,
events_url TYPE string,
hooks_url TYPE string,
issues_url TYPE string,
members_url TYPE string,
public_members_url TYPE string,
avatar_url TYPE string,
description TYPE string,
END OF organization_simple.
* Component schema: selected-actions, object
TYPES: BEGIN OF selected_actions,
github_owned_allowed TYPE abap_bool,
verified_allowed TYPE abap_bool,
patterns_allowed TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF selected_actions.
* Component schema: runner-groups-enterprise, object
TYPES: BEGIN OF runner_groups_enterprise,
id TYPE f,
name TYPE string,
visibility TYPE string,
default TYPE abap_bool,
selected_organizations_url TYPE string,
runners_url TYPE string,
allows_public_repositories TYPE abap_bool,
END OF runner_groups_enterprise.
* Component schema: runner-label, object
TYPES: BEGIN OF runner_label,
id TYPE i,
name TYPE string,
type TYPE string,
END OF runner_label.
* Component schema: runner, object
TYPES: BEGIN OF runner,
id TYPE i,
name TYPE string,
os TYPE string,
status TYPE string,
busy TYPE abap_bool,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF runner.
* Component schema: runner-application, object
TYPES: BEGIN OF runner_application,
os TYPE string,
architecture TYPE string,
download_url TYPE string,
filename TYPE string,
temp_download_token TYPE string,
sha256_checksum TYPE string,
END OF runner_application.
* Component schema: authentication-token, object
TYPES: BEGIN OF subauthentication_token_permis,
dummy_workaround TYPE i,
END OF subauthentication_token_permis.
TYPES: BEGIN OF authentication_token,
token TYPE string,
expires_at TYPE string,
permissions TYPE subauthentication_token_permis,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
single_file TYPE string,
repository_selection TYPE string,
END OF authentication_token.
* Component schema: audit-log-event, object
TYPES: BEGIN OF subaudit_log_event_data,
dummy_workaround TYPE i,
END OF subaudit_log_event_data.
TYPES: BEGIN OF subaudit_log_event_actor_locat,
country_name TYPE string,
END OF subaudit_log_event_actor_locat.
TYPES: BEGIN OF audit_log_event,
timestamp TYPE i,
action TYPE string,
active TYPE abap_bool,
active_was TYPE abap_bool,
actor TYPE string,
actor_id TYPE i,
actor_location TYPE subaudit_log_event_actor_locat,
data TYPE subaudit_log_event_data,
org_id TYPE i,
blocked_user TYPE string,
business TYPE string,
config TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
config_was TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
content_type TYPE string,
created_at TYPE i,
deploy_key_fingerprint TYPE string,
_document_id TYPE string,
emoji TYPE string,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
events_were TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
explanation TYPE string,
fingerprint TYPE string,
hook_id TYPE i,
limited_availability TYPE abap_bool,
message TYPE string,
name TYPE string,
old_user TYPE string,
openssh_public_key TYPE string,
org TYPE string,
previous_visibility TYPE string,
read_only TYPE abap_bool,
repo TYPE string,
repository TYPE string,
repository_public TYPE abap_bool,
target_login TYPE string,
team TYPE string,
transport_protocol TYPE i,
transport_protocol_name TYPE string,
user TYPE string,
visibility TYPE string,
END OF audit_log_event.
* Component schema: alert-number, integer
TYPES alert_number TYPE i.
* Component schema: alert-created-at, string
TYPES alert_created_at TYPE string.
* Component schema: alert-url, string
TYPES alert_url TYPE string.
* Component schema: alert-html-url, string
TYPES alert_html_url TYPE string.
* Component schema: secret-scanning-alert-state, string
TYPES secret_scanning_alert_state TYPE string.
* Component schema: secret-scanning-alert-resolution, string
TYPES secret_scanning_alert_resoluti TYPE string.
* Component schema: nullable-repository, object
TYPES: BEGIN OF subsubnullable_repository_te01,
admin TYPE abap_bool,
maintain TYPE abap_bool,
push TYPE abap_bool,
triage TYPE abap_bool,
pull TYPE abap_bool,
END OF subsubnullable_repository_te01.
TYPES: BEGIN OF subsubnullable_repository_temp,
login TYPE string,
id TYPE i,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
events_url TYPE string,
received_events_url TYPE string,
type TYPE string,
site_admin TYPE abap_bool,
END OF subsubnullable_repository_temp.
TYPES: BEGIN OF subnullable_repository_templat,
id TYPE i,
node_id TYPE string,
name TYPE string,
full_name TYPE string,
owner TYPE subsubnullable_repository_temp,
private TYPE abap_bool,
html_url TYPE string,
description TYPE string,
fork TYPE abap_bool,
url TYPE string,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
downloads_url TYPE string,
events_url TYPE string,
forks_url TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
git_url TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
notifications_url TYPE string,
pulls_url TYPE string,
releases_url TYPE string,
ssh_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
clone_url TYPE string,
mirror_url TYPE string,
hooks_url TYPE string,
svn_url TYPE string,
homepage TYPE string,
language TYPE string,
forks_count TYPE i,
stargazers_count TYPE i,
watchers_count TYPE i,
size TYPE i,
default_branch TYPE string,
open_issues_count TYPE i,
is_template TYPE abap_bool,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
has_downloads TYPE abap_bool,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
pushed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
permissions TYPE subsubnullable_repository_te01,
allow_rebase_merge TYPE abap_bool,
temp_clone_token TYPE string,
allow_squash_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
allow_update_branch TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
subscribers_count TYPE i,
network_count TYPE i,
END OF subnullable_repository_templat.
TYPES: BEGIN OF subnullable_repository_permiss,
admin TYPE abap_bool,
pull TYPE abap_bool,
triage TYPE abap_bool,
push TYPE abap_bool,
maintain TYPE abap_bool,
END OF subnullable_repository_permiss.
TYPES: BEGIN OF nullable_repository,
id TYPE i,
node_id TYPE string,
name TYPE string,
full_name TYPE string,
license TYPE nullable_license_simple,
organization TYPE nullable_simple_user,
forks TYPE i,
permissions TYPE subnullable_repository_permiss,
owner TYPE simple_user,
private TYPE abap_bool,
html_url TYPE string,
description TYPE string,
fork TYPE abap_bool,
url TYPE string,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
downloads_url TYPE string,
events_url TYPE string,
forks_url TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
git_url TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
notifications_url TYPE string,
pulls_url TYPE string,
releases_url TYPE string,
ssh_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
clone_url TYPE string,
mirror_url TYPE string,
hooks_url TYPE string,
svn_url TYPE string,
homepage TYPE string,
language TYPE string,
forks_count TYPE i,
stargazers_count TYPE i,
watchers_count TYPE i,
size TYPE i,
default_branch TYPE string,
open_issues_count TYPE i,
is_template TYPE abap_bool,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
has_downloads TYPE abap_bool,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
pushed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
allow_rebase_merge TYPE abap_bool,
template_repository TYPE subnullable_repository_templat,
temp_clone_token TYPE string,
allow_squash_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
allow_forking TYPE abap_bool,
subscribers_count TYPE i,
network_count TYPE i,
open_issues TYPE i,
watchers TYPE i,
master_branch TYPE string,
starred_at TYPE string,
END OF nullable_repository.
* Component schema: minimal-repository, object
TYPES: BEGIN OF subminimal_repository_license,
key TYPE string,
name TYPE string,
spdx_id TYPE string,
url TYPE string,
node_id TYPE string,
END OF subminimal_repository_license.
TYPES: BEGIN OF subminimal_repository_permissi,
admin TYPE abap_bool,
maintain TYPE abap_bool,
push TYPE abap_bool,
triage TYPE abap_bool,
pull TYPE abap_bool,
END OF subminimal_repository_permissi.
TYPES: BEGIN OF minimal_repository,
id TYPE i,
node_id TYPE string,
name TYPE string,
full_name TYPE string,
owner TYPE simple_user,
private TYPE abap_bool,
html_url TYPE string,
description TYPE string,
fork TYPE abap_bool,
url TYPE string,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
downloads_url TYPE string,
events_url TYPE string,
forks_url TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
git_url TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
notifications_url TYPE string,
pulls_url TYPE string,
releases_url TYPE string,
ssh_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
clone_url TYPE string,
mirror_url TYPE string,
hooks_url TYPE string,
svn_url TYPE string,
homepage TYPE string,
language TYPE string,
forks_count TYPE i,
stargazers_count TYPE i,
watchers_count TYPE i,
size TYPE i,
default_branch TYPE string,
open_issues_count TYPE i,
is_template TYPE abap_bool,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
has_downloads TYPE abap_bool,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
pushed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
permissions TYPE subminimal_repository_permissi,
role_name TYPE string,
template_repository TYPE nullable_repository,
temp_clone_token TYPE string,
delete_branch_on_merge TYPE abap_bool,
subscribers_count TYPE i,
network_count TYPE i,
code_of_conduct TYPE code_of_conduct,
license TYPE subminimal_repository_license,
forks TYPE i,
open_issues TYPE i,
watchers TYPE i,
allow_forking TYPE abap_bool,
END OF minimal_repository.
* Component schema: organization-secret-scanning-alert, object
TYPES: BEGIN OF organization_secret_scanning_a,
number TYPE alert_number,
created_at TYPE alert_created_at,
url TYPE alert_url,
html_url TYPE alert_html_url,
locations_url TYPE string,
state TYPE secret_scanning_alert_state,
resolution TYPE secret_scanning_alert_resoluti,
resolved_at TYPE string,
resolved_by TYPE nullable_simple_user,
secret_type TYPE string,
secret TYPE string,
repository TYPE minimal_repository,
END OF organization_secret_scanning_a.
* Component schema: actions-billing-usage, object
TYPES: BEGIN OF subactions_billing_usage_minut,
ubuntu TYPE i,
macos TYPE i,
windows TYPE i,
END OF subactions_billing_usage_minut.
TYPES: BEGIN OF actions_billing_usage,
total_minutes_used TYPE i,
total_paid_minutes_used TYPE i,
included_minutes TYPE i,
minutes_used_breakdown TYPE subactions_billing_usage_minut,
END OF actions_billing_usage.
* Component schema: advanced-security-active-committers-user, object
TYPES: BEGIN OF advanced_security_active_commi,
user_login TYPE string,
last_pushed_date TYPE string,
END OF advanced_security_active_commi.
* Component schema: advanced-security-active-committers-repository, object
TYPES: BEGIN OF advanced_security_active_com01,
name TYPE string,
advanced_security_committers TYPE i,
advanced_security_committers_b TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF advanced_security_active_com01.
* Component schema: advanced-security-active-committers, object
TYPES: BEGIN OF advanced_security_active_com02,
total_advanced_security_commit TYPE i,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF advanced_security_active_com02.
* Component schema: packages-billing-usage, object
TYPES: BEGIN OF packages_billing_usage,
total_gigabytes_bandwidth_used TYPE i,
total_paid_gigabytes_bandwidth TYPE i,
included_gigabytes_bandwidth TYPE i,
END OF packages_billing_usage.
* Component schema: combined-billing-usage, object
TYPES: BEGIN OF combined_billing_usage,
days_left_in_billing_cycle TYPE i,
estimated_paid_storage_for_mon TYPE i,
estimated_storage_for_month TYPE i,
END OF combined_billing_usage.
* Component schema: actor, object
TYPES: BEGIN OF actor,
id TYPE i,
login TYPE string,
display_login TYPE string,
gravatar_id TYPE string,
url TYPE string,
avatar_url TYPE string,
END OF actor.
* Component schema: nullable-milestone, object
TYPES: BEGIN OF nullable_milestone,
url TYPE string,
html_url TYPE string,
labels_url TYPE string,
id TYPE i,
node_id TYPE string,
number TYPE i,
state TYPE string,
title TYPE string,
description TYPE string,
creator TYPE nullable_simple_user,
open_issues TYPE i,
closed_issues TYPE i,
created_at TYPE string,
updated_at TYPE string,
closed_at TYPE string,
due_on TYPE string,
END OF nullable_milestone.
* Component schema: nullable-integration, object
TYPES: BEGIN OF subnullable_integration_permis,
issues TYPE string,
checks TYPE string,
metadata TYPE string,
contents TYPE string,
deployments TYPE string,
END OF subnullable_integration_permis.
TYPES: BEGIN OF nullable_integration,
id TYPE i,
slug TYPE string,
node_id TYPE string,
owner TYPE nullable_simple_user,
name TYPE string,
description TYPE string,
external_url TYPE string,
html_url TYPE string,
created_at TYPE string,
updated_at TYPE string,
permissions TYPE subnullable_integration_permis,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
installations_count TYPE i,
client_id TYPE string,
client_secret TYPE string,
webhook_secret TYPE string,
pem TYPE string,
END OF nullable_integration.
* Component schema: author_association, string
TYPES author_association TYPE string.
* Component schema: reaction-rollup, object
TYPES: BEGIN OF reaction_rollup,
url TYPE string,
total_count TYPE i,
n1 TYPE i,
_1 TYPE i,
laugh TYPE i,
confused TYPE i,
heart TYPE i,
hooray TYPE i,
eyes TYPE i,
rocket TYPE i,
END OF reaction_rollup.
* Component schema: issue, object
TYPES: BEGIN OF subissue_pull_request,
merged_at TYPE string,
diff_url TYPE string,
html_url TYPE string,
patch_url TYPE string,
url TYPE string,
END OF subissue_pull_request.
TYPES: BEGIN OF issue,
id TYPE i,
node_id TYPE string,
url TYPE string,
repository_url TYPE string,
labels_url TYPE string,
comments_url TYPE string,
events_url TYPE string,
html_url TYPE string,
number TYPE i,
state TYPE string,
title TYPE string,
body TYPE string,
user TYPE nullable_simple_user,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
assignee TYPE nullable_simple_user,
assignees TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
milestone TYPE nullable_milestone,
locked TYPE abap_bool,
active_lock_reason TYPE string,
comments TYPE i,
pull_request TYPE subissue_pull_request,
closed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
draft TYPE abap_bool,
closed_by TYPE nullable_simple_user,
body_html TYPE string,
body_text TYPE string,
timeline_url TYPE string,
repository TYPE repository,
performed_via_github_app TYPE nullable_integration,
author_association TYPE author_association,
reactions TYPE reaction_rollup,
END OF issue.
* Component schema: issue-comment, object
TYPES: BEGIN OF issue_comment,
id TYPE i,
node_id TYPE string,
url TYPE string,
body TYPE string,
body_text TYPE string,
body_html TYPE string,
html_url TYPE string,
user TYPE nullable_simple_user,
created_at TYPE string,
updated_at TYPE string,
issue_url TYPE string,
author_association TYPE author_association,
performed_via_github_app TYPE nullable_integration,
reactions TYPE reaction_rollup,
END OF issue_comment.
* Component schema: event, object
TYPES: BEGIN OF subevent_payload,
action TYPE string,
issue TYPE issue,
comment TYPE issue_comment,
pages TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subevent_payload.
TYPES: BEGIN OF subevent_repo,
id TYPE i,
name TYPE string,
url TYPE string,
END OF subevent_repo.
TYPES: BEGIN OF event,
id TYPE string,
type TYPE string,
actor TYPE actor,
repo TYPE subevent_repo,
org TYPE actor,
payload TYPE subevent_payload,
public TYPE abap_bool,
created_at TYPE string,
END OF event.
* Component schema: link-with-type, object
TYPES: BEGIN OF link_with_type,
href TYPE string,
type TYPE string,
END OF link_with_type.
* Component schema: feed, object
TYPES: BEGIN OF subfeed__links,
timeline TYPE link_with_type,
user TYPE link_with_type,
security_advisories TYPE link_with_type,
current_user TYPE link_with_type,
current_user_public TYPE link_with_type,
current_user_actor TYPE link_with_type,
current_user_organization TYPE link_with_type,
current_user_organizations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subfeed__links.
TYPES: BEGIN OF feed,
timeline_url TYPE string,
user_url TYPE string,
current_user_public_url TYPE string,
current_user_url TYPE string,
current_user_actor_url TYPE string,
current_user_organization_url TYPE string,
current_user_organization_urls TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
security_advisories_url TYPE string,
_links TYPE subfeed__links,
END OF feed.
* Component schema: base-gist, object
TYPES: BEGIN OF subbase_gist_files,
dummy_workaround TYPE i,
END OF subbase_gist_files.
TYPES: BEGIN OF base_gist,
url TYPE string,
forks_url TYPE string,
commits_url TYPE string,
id TYPE string,
node_id TYPE string,
git_pull_url TYPE string,
git_push_url TYPE string,
html_url TYPE string,
files TYPE subbase_gist_files,
public TYPE abap_bool,
created_at TYPE string,
updated_at TYPE string,
description TYPE string,
comments TYPE i,
user TYPE nullable_simple_user,
comments_url TYPE string,
owner TYPE simple_user,
truncated TYPE abap_bool,
forks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
history TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF base_gist.
* Component schema: public-user, object
TYPES: BEGIN OF subpublic_user_plan,
collaborators TYPE i,
name TYPE string,
space TYPE i,
private_repos TYPE i,
END OF subpublic_user_plan.
TYPES: BEGIN OF public_user,
login TYPE string,
id TYPE i,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
events_url TYPE string,
received_events_url TYPE string,
type TYPE string,
site_admin TYPE abap_bool,
name TYPE string,
company TYPE string,
blog TYPE string,
location TYPE string,
email TYPE string,
hireable TYPE abap_bool,
bio TYPE string,
twitter_username TYPE string,
public_repos TYPE i,
public_gists TYPE i,
followers TYPE i,
following TYPE i,
created_at TYPE string,
updated_at TYPE string,
plan TYPE subpublic_user_plan,
suspended_at TYPE string,
private_gists TYPE i,
total_private_repos TYPE i,
owned_private_repos TYPE i,
disk_usage TYPE i,
collaborators TYPE i,
END OF public_user.
* Component schema: gist-history, object
TYPES: BEGIN OF subgist_history_change_status,
total TYPE i,
additions TYPE i,
deletions TYPE i,
END OF subgist_history_change_status.
TYPES: BEGIN OF gist_history,
user TYPE nullable_simple_user,
version TYPE string,
committed_at TYPE string,
change_status TYPE subgist_history_change_status,
url TYPE string,
END OF gist_history.
* Component schema: gist-simple, object
TYPES: BEGIN OF subgist_simple_files,
dummy_workaround TYPE i,
END OF subgist_simple_files.
TYPES: BEGIN OF subsubgist_simple_fork_of_file,
dummy_workaround TYPE i,
END OF subsubgist_simple_fork_of_file.
TYPES: BEGIN OF subgist_simple_fork_of,
url TYPE string,
forks_url TYPE string,
commits_url TYPE string,
id TYPE string,
node_id TYPE string,
git_pull_url TYPE string,
git_push_url TYPE string,
html_url TYPE string,
files TYPE subsubgist_simple_fork_of_file,
public TYPE abap_bool,
created_at TYPE string,
updated_at TYPE string,
description TYPE string,
comments TYPE i,
user TYPE nullable_simple_user,
comments_url TYPE string,
owner TYPE nullable_simple_user,
truncated TYPE abap_bool,
forks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
history TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subgist_simple_fork_of.
TYPES: BEGIN OF gist_simple,
forks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
history TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
fork_of TYPE subgist_simple_fork_of,
url TYPE string,
forks_url TYPE string,
commits_url TYPE string,
id TYPE string,
node_id TYPE string,
git_pull_url TYPE string,
git_push_url TYPE string,
html_url TYPE string,
files TYPE subgist_simple_files,
public TYPE abap_bool,
created_at TYPE string,
updated_at TYPE string,
description TYPE string,
comments TYPE i,
user TYPE string,
comments_url TYPE string,
owner TYPE simple_user,
truncated TYPE abap_bool,
END OF gist_simple.
* Component schema: gist-comment, object
TYPES: BEGIN OF gist_comment,
id TYPE i,
node_id TYPE string,
url TYPE string,
body TYPE string,
user TYPE nullable_simple_user,
created_at TYPE string,
updated_at TYPE string,
author_association TYPE author_association,
END OF gist_comment.
* Component schema: gist-commit, object
TYPES: BEGIN OF subgist_commit_change_status,
total TYPE i,
additions TYPE i,
deletions TYPE i,
END OF subgist_commit_change_status.
TYPES: BEGIN OF gist_commit,
url TYPE string,
version TYPE string,
user TYPE nullable_simple_user,
change_status TYPE subgist_commit_change_status,
committed_at TYPE string,
END OF gist_commit.
* Component schema: gitignore-template, object
TYPES: BEGIN OF gitignore_template,
name TYPE string,
source TYPE string,
END OF gitignore_template.
* Component schema: license-simple, object
TYPES: BEGIN OF license_simple,
key TYPE string,
name TYPE string,
url TYPE string,
spdx_id TYPE string,
node_id TYPE string,
html_url TYPE string,
END OF license_simple.
* Component schema: license, object
TYPES: BEGIN OF license,
key TYPE string,
name TYPE string,
spdx_id TYPE string,
url TYPE string,
node_id TYPE string,
html_url TYPE string,
description TYPE string,
implementation TYPE string,
permissions TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
conditions TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
limitations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
body TYPE string,
featured TYPE abap_bool,
END OF license.
* Component schema: marketplace-listing-plan, object
TYPES: BEGIN OF marketplace_listing_plan,
url TYPE string,
accounts_url TYPE string,
id TYPE i,
number TYPE i,
name TYPE string,
description TYPE string,
monthly_price_in_cents TYPE i,
yearly_price_in_cents TYPE i,
price_model TYPE string,
has_free_trial TYPE abap_bool,
unit_name TYPE string,
state TYPE string,
bullets TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF marketplace_listing_plan.
* Component schema: marketplace-purchase, object
TYPES: BEGIN OF submarketplace_purchase_mark01,
billing_cycle TYPE string,
next_billing_date TYPE string,
is_installed TYPE abap_bool,
unit_count TYPE i,
on_free_trial TYPE abap_bool,
free_trial_ends_on TYPE string,
updated_at TYPE string,
plan TYPE marketplace_listing_plan,
END OF submarketplace_purchase_mark01.
TYPES: BEGIN OF submarketplace_purchase_market,
is_installed TYPE abap_bool,
effective_date TYPE string,
unit_count TYPE i,
id TYPE i,
plan TYPE marketplace_listing_plan,
END OF submarketplace_purchase_market.
TYPES: BEGIN OF marketplace_purchase,
url TYPE string,
type TYPE string,
id TYPE i,
login TYPE string,
organization_billing_email TYPE string,
email TYPE string,
marketplace_pending_change TYPE submarketplace_purchase_market,
marketplace_purchase TYPE submarketplace_purchase_mark01,
END OF marketplace_purchase.
* Component schema: api-overview, object
TYPES: BEGIN OF subapi_overview_ssh_key_finger,
sha256_rsa TYPE string,
sha256_dsa TYPE string,
sha256_ecdsa TYPE string,
sha256_ed25519 TYPE string,
END OF subapi_overview_ssh_key_finger.
TYPES: BEGIN OF api_overview,
verifiable_password_authentica TYPE abap_bool,
ssh_key_fingerprints TYPE subapi_overview_ssh_key_finger,
ssh_keys TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
hooks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
web TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
api TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
git TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
packages TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
pages TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
importer TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
actions TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
dependabot TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF api_overview.
* Component schema: thread, object
TYPES: BEGIN OF subthread_subject,
title TYPE string,
url TYPE string,
latest_comment_url TYPE string,
type TYPE string,
END OF subthread_subject.
TYPES: BEGIN OF thread,
id TYPE string,
repository TYPE minimal_repository,
subject TYPE subthread_subject,
reason TYPE string,
unread TYPE abap_bool,
updated_at TYPE string,
last_read_at TYPE string,
url TYPE string,
subscription_url TYPE string,
END OF thread.
* Component schema: thread-subscription, object
TYPES: BEGIN OF thread_subscription,
subscribed TYPE abap_bool,
ignored TYPE abap_bool,
reason TYPE string,
created_at TYPE string,
url TYPE string,
thread_url TYPE string,
repository_url TYPE string,
END OF thread_subscription.
* Component schema: organization-custom-repository-role, object
TYPES: BEGIN OF organization_custom_repository,
id TYPE i,
name TYPE string,
END OF organization_custom_repository.
* Component schema: external-groups, object
TYPES: BEGIN OF external_groups,
groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF external_groups.
* Component schema: organization-full, object
TYPES: BEGIN OF suborganization_full_plan,
name TYPE string,
space TYPE i,
private_repos TYPE i,
filled_seats TYPE i,
seats TYPE i,
END OF suborganization_full_plan.
TYPES: BEGIN OF organization_full,
login TYPE string,
id TYPE i,
node_id TYPE string,
url TYPE string,
repos_url TYPE string,
events_url TYPE string,
hooks_url TYPE string,
issues_url TYPE string,
members_url TYPE string,
public_members_url TYPE string,
avatar_url TYPE string,
description TYPE string,
name TYPE string,
company TYPE string,
blog TYPE string,
location TYPE string,
email TYPE string,
twitter_username TYPE string,
is_verified TYPE abap_bool,
has_organization_projects TYPE abap_bool,
has_repository_projects TYPE abap_bool,
public_repos TYPE i,
public_gists TYPE i,
followers TYPE i,
following TYPE i,
html_url TYPE string,
created_at TYPE string,
type TYPE string,
total_private_repos TYPE i,
owned_private_repos TYPE i,
private_gists TYPE i,
disk_usage TYPE i,
collaborators TYPE i,
billing_email TYPE string,
plan TYPE suborganization_full_plan,
default_repository_permission TYPE string,
members_can_create_repositorie TYPE abap_bool,
two_factor_requirement_enabled TYPE abap_bool,
members_allowed_repository_cre TYPE string,
members_can_create_public_repo TYPE abap_bool,
members_can_create_private_rep TYPE abap_bool,
members_can_create_internal_re TYPE abap_bool,
members_can_create_pages TYPE abap_bool,
members_can_create_public_page TYPE abap_bool,
members_can_create_private_pag TYPE abap_bool,
members_can_fork_private_repos TYPE abap_bool,
updated_at TYPE string,
END OF organization_full.
* Component schema: enabled-repositories, string
TYPES enabled_repositories TYPE string.
* Component schema: actions-organization-permissions, object
TYPES: BEGIN OF actions_organization_permissio,
enabled_repositories TYPE enabled_repositories,
selected_repositories_url TYPE string,
allowed_actions TYPE allowed_actions,
selected_actions_url TYPE selected_actions_url,
END OF actions_organization_permissio.
* Component schema: actions-default-workflow-permissions, string
TYPES actions_default_workflow_permi TYPE string.
* Component schema: actions-can-approve-pull-request-reviews, boolean
TYPES actions_can_approve_pull_reque TYPE abap_bool.
* Component schema: actions-get-default-workflow-permissions, object
TYPES: BEGIN OF actions_get_default_workflow_p,
default_workflow_permissions TYPE actions_default_workflow_permi,
can_approve_pull_request_revie TYPE actions_can_approve_pull_reque,
END OF actions_get_default_workflow_p.
* Component schema: actions-set-default-workflow-permissions, object
TYPES: BEGIN OF actions_set_default_workflow_p,
default_workflow_permissions TYPE actions_default_workflow_permi,
can_approve_pull_request_revie TYPE actions_can_approve_pull_reque,
END OF actions_set_default_workflow_p.
* Component schema: runner-groups-org, object
TYPES: BEGIN OF runner_groups_org,
id TYPE f,
name TYPE string,
visibility TYPE string,
default TYPE abap_bool,
selected_repositories_url TYPE string,
runners_url TYPE string,
inherited TYPE abap_bool,
inherited_allows_public_reposi TYPE abap_bool,
allows_public_repositories TYPE abap_bool,
END OF runner_groups_org.
* Component schema: organization-actions-secret, object
TYPES: BEGIN OF organization_actions_secret,
name TYPE string,
created_at TYPE string,
updated_at TYPE string,
visibility TYPE string,
selected_repositories_url TYPE string,
END OF organization_actions_secret.
* Component schema: actions-public-key, object
TYPES: BEGIN OF actions_public_key,
key_id TYPE string,
key TYPE string,
id TYPE i,
url TYPE string,
title TYPE string,
created_at TYPE string,
END OF actions_public_key.
* Component schema: empty-object, object
TYPES: BEGIN OF empty_object,
dummy_workaround TYPE i,
END OF empty_object.
* Component schema: code-scanning-alert-state, string
TYPES code_scanning_alert_state TYPE string.
* Component schema: alert-updated-at, string
TYPES alert_updated_at TYPE string.
* Component schema: alert-instances-url, string
TYPES alert_instances_url TYPE string.
* Component schema: code-scanning-alert-fixed-at, string
TYPES code_scanning_alert_fixed_at TYPE string.
* Component schema: code-scanning-alert-dismissed-at, string
TYPES code_scanning_alert_dismissed_ TYPE string.
* Component schema: code-scanning-alert-dismissed-reason, string
TYPES code_scanning_alert_dismisse01 TYPE string.
* Component schema: code-scanning-alert-rule, object
TYPES: BEGIN OF code_scanning_alert_rule,
id TYPE string,
name TYPE string,
severity TYPE string,
security_severity_level TYPE string,
description TYPE string,
full_description TYPE string,
tags TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
help TYPE string,
END OF code_scanning_alert_rule.
* Component schema: code-scanning-analysis-tool-name, string
TYPES code_scanning_analysis_tool_na TYPE string.
* Component schema: code-scanning-analysis-tool-version, string
TYPES code_scanning_analysis_tool_ve TYPE string.
* Component schema: code-scanning-analysis-tool-guid, string
TYPES code_scanning_analysis_tool_gu TYPE string.
* Component schema: code-scanning-analysis-tool, object
TYPES: BEGIN OF code_scanning_analysis_tool,
name TYPE code_scanning_analysis_tool_na,
version TYPE code_scanning_analysis_tool_ve,
guid TYPE code_scanning_analysis_tool_gu,
END OF code_scanning_analysis_tool.
* Component schema: code-scanning-ref, string
TYPES code_scanning_ref TYPE string.
* Component schema: code-scanning-analysis-analysis-key, string
TYPES code_scanning_analysis_analysi TYPE string.
* Component schema: code-scanning-alert-environment, string
TYPES code_scanning_alert_environmen TYPE string.
* Component schema: code-scanning-analysis-category, string
TYPES code_scanning_analysis_categor TYPE string.
* Component schema: code-scanning-alert-location, object
TYPES: BEGIN OF code_scanning_alert_location,
path TYPE string,
start_line TYPE i,
end_line TYPE i,
start_column TYPE i,
end_column TYPE i,
END OF code_scanning_alert_location.
* Component schema: code-scanning-alert-classification, string
TYPES code_scanning_alert_classifica TYPE string.
* Component schema: code-scanning-alert-instance, object
TYPES: BEGIN OF subcode_scanning_alert_instanc,
text TYPE string,
END OF subcode_scanning_alert_instanc.
TYPES: BEGIN OF code_scanning_alert_instance,
ref TYPE code_scanning_ref,
analysis_key TYPE code_scanning_analysis_analysi,
environment TYPE code_scanning_alert_environmen,
category TYPE code_scanning_analysis_categor,
state TYPE code_scanning_alert_state,
commit_sha TYPE string,
message TYPE subcode_scanning_alert_instanc,
location TYPE code_scanning_alert_location,
html_url TYPE string,
classifications TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF code_scanning_alert_instance.
* Component schema: code-scanning-organization-alert-items, object
TYPES: BEGIN OF code_scanning_organization_ale,
number TYPE alert_number,
created_at TYPE alert_created_at,
updated_at TYPE alert_updated_at,
url TYPE alert_url,
html_url TYPE alert_html_url,
instances_url TYPE alert_instances_url,
state TYPE code_scanning_alert_state,
fixed_at TYPE code_scanning_alert_fixed_at,
dismissed_by TYPE nullable_simple_user,
dismissed_at TYPE code_scanning_alert_dismissed_,
dismissed_reason TYPE code_scanning_alert_dismisse01,
rule TYPE code_scanning_alert_rule,
tool TYPE code_scanning_analysis_tool,
most_recent_instance TYPE code_scanning_alert_instance,
repository TYPE minimal_repository,
END OF code_scanning_organization_ale.
* Component schema: credential-authorization, object
TYPES: BEGIN OF credential_authorization,
login TYPE string,
credential_id TYPE i,
credential_type TYPE string,
token_last_eight TYPE string,
credential_authorized_at TYPE string,
scopes TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
fingerprint TYPE string,
credential_accessed_at TYPE string,
authorized_credential_id TYPE i,
authorized_credential_title TYPE string,
authorized_credential_note TYPE string,
authorized_credential_expires_ TYPE string,
END OF credential_authorization.
* Component schema: organization-dependabot-secret, object
TYPES: BEGIN OF organization_dependabot_secret,
name TYPE string,
created_at TYPE string,
updated_at TYPE string,
visibility TYPE string,
selected_repositories_url TYPE string,
END OF organization_dependabot_secret.
* Component schema: dependabot-public-key, object
TYPES: BEGIN OF dependabot_public_key,
key_id TYPE string,
key TYPE string,
END OF dependabot_public_key.
* Component schema: external-group, object
TYPES: BEGIN OF external_group,
group_id TYPE i,
group_name TYPE string,
updated_at TYPE string,
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
members TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF external_group.
* Component schema: organization-invitation, object
TYPES: BEGIN OF organization_invitation,
id TYPE i,
login TYPE string,
email TYPE string,
role TYPE string,
created_at TYPE string,
failed_at TYPE string,
failed_reason TYPE string,
inviter TYPE simple_user,
team_count TYPE i,
node_id TYPE string,
invitation_teams_url TYPE string,
END OF organization_invitation.
* Component schema: org-hook, object
TYPES: BEGIN OF suborg_hook_config,
url TYPE string,
insecure_ssl TYPE string,
content_type TYPE string,
secret TYPE string,
END OF suborg_hook_config.
TYPES: BEGIN OF org_hook,
id TYPE i,
url TYPE string,
ping_url TYPE string,
deliveries_url TYPE string,
name TYPE string,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
config TYPE suborg_hook_config,
updated_at TYPE string,
created_at TYPE string,
type TYPE string,
END OF org_hook.
* Component schema: interaction-group, string
TYPES interaction_group TYPE string.
* Component schema: interaction-limit-response, object
TYPES: BEGIN OF interaction_limit_response,
limit TYPE interaction_group,
origin TYPE string,
expires_at TYPE string,
END OF interaction_limit_response.
* Component schema: interaction-expiry, string
TYPES interaction_expiry TYPE string.
* Component schema: interaction-limit, object
TYPES: BEGIN OF interaction_limit,
limit TYPE interaction_group,
expiry TYPE interaction_expiry,
END OF interaction_limit.
* Component schema: nullable-team-simple, object
TYPES: BEGIN OF nullable_team_simple,
id TYPE i,
node_id TYPE string,
url TYPE string,
members_url TYPE string,
name TYPE string,
description TYPE string,
permission TYPE string,
privacy TYPE string,
html_url TYPE string,
repositories_url TYPE string,
slug TYPE string,
ldap_dn TYPE string,
END OF nullable_team_simple.
* Component schema: team, object
TYPES: BEGIN OF subteam_permissions,
pull TYPE abap_bool,
triage TYPE abap_bool,
push TYPE abap_bool,
maintain TYPE abap_bool,
admin TYPE abap_bool,
END OF subteam_permissions.
TYPES: BEGIN OF team,
id TYPE i,
node_id TYPE string,
name TYPE string,
slug TYPE string,
description TYPE string,
privacy TYPE string,
permission TYPE string,
permissions TYPE subteam_permissions,
url TYPE string,
html_url TYPE string,
members_url TYPE string,
repositories_url TYPE string,
parent TYPE nullable_team_simple,
END OF team.
* Component schema: org-membership, object
TYPES: BEGIN OF suborg_membership_permissions,
can_create_repository TYPE abap_bool,
END OF suborg_membership_permissions.
TYPES: BEGIN OF org_membership,
url TYPE string,
state TYPE string,
role TYPE string,
organization_url TYPE string,
organization TYPE organization_simple,
user TYPE nullable_simple_user,
permissions TYPE suborg_membership_permissions,
END OF org_membership.
* Component schema: migration, object
TYPES: BEGIN OF migration,
id TYPE i,
owner TYPE nullable_simple_user,
guid TYPE string,
state TYPE string,
lock_repositories TYPE abap_bool,
exclude_metadata TYPE abap_bool,
exclude_git_data TYPE abap_bool,
exclude_attachments TYPE abap_bool,
exclude_releases TYPE abap_bool,
exclude_owner_projects TYPE abap_bool,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
url TYPE string,
created_at TYPE string,
updated_at TYPE string,
node_id TYPE string,
archive_url TYPE string,
exclude TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF migration.
* Component schema: nullable-minimal-repository, object
TYPES: BEGIN OF subnullable_minimal_reposito01,
key TYPE string,
name TYPE string,
spdx_id TYPE string,
url TYPE string,
node_id TYPE string,
END OF subnullable_minimal_reposito01.
TYPES: BEGIN OF subnullable_minimal_repository,
admin TYPE abap_bool,
maintain TYPE abap_bool,
push TYPE abap_bool,
triage TYPE abap_bool,
pull TYPE abap_bool,
END OF subnullable_minimal_repository.
TYPES: BEGIN OF nullable_minimal_repository,
id TYPE i,
node_id TYPE string,
name TYPE string,
full_name TYPE string,
owner TYPE simple_user,
private TYPE abap_bool,
html_url TYPE string,
description TYPE string,
fork TYPE abap_bool,
url TYPE string,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
downloads_url TYPE string,
events_url TYPE string,
forks_url TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
git_url TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
notifications_url TYPE string,
pulls_url TYPE string,
releases_url TYPE string,
ssh_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
clone_url TYPE string,
mirror_url TYPE string,
hooks_url TYPE string,
svn_url TYPE string,
homepage TYPE string,
language TYPE string,
forks_count TYPE i,
stargazers_count TYPE i,
watchers_count TYPE i,
size TYPE i,
default_branch TYPE string,
open_issues_count TYPE i,
is_template TYPE abap_bool,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
has_downloads TYPE abap_bool,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
pushed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
permissions TYPE subnullable_minimal_repository,
role_name TYPE string,
template_repository TYPE nullable_repository,
temp_clone_token TYPE string,
delete_branch_on_merge TYPE abap_bool,
subscribers_count TYPE i,
network_count TYPE i,
code_of_conduct TYPE code_of_conduct,
license TYPE subnullable_minimal_reposito01,
forks TYPE i,
open_issues TYPE i,
watchers TYPE i,
allow_forking TYPE abap_bool,
END OF nullable_minimal_repository.
* Component schema: package, object
TYPES: BEGIN OF package,
id TYPE i,
name TYPE string,
package_type TYPE string,
url TYPE string,
html_url TYPE string,
version_count TYPE i,
visibility TYPE string,
owner TYPE nullable_simple_user,
repository TYPE nullable_minimal_repository,
created_at TYPE string,
updated_at TYPE string,
END OF package.
* Component schema: package-version, object
TYPES: BEGIN OF subsubpackage_version_metada01,
tag TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubpackage_version_metada01.
TYPES: BEGIN OF subsubpackage_version_metadata,
tags TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubpackage_version_metadata.
TYPES: BEGIN OF subpackage_version_metadata,
package_type TYPE string,
container TYPE subsubpackage_version_metadata,
docker TYPE subsubpackage_version_metada01,
END OF subpackage_version_metadata.
TYPES: BEGIN OF package_version,
id TYPE i,
name TYPE string,
url TYPE string,
package_html_url TYPE string,
html_url TYPE string,
license TYPE string,
description TYPE string,
created_at TYPE string,
updated_at TYPE string,
deleted_at TYPE string,
metadata TYPE subpackage_version_metadata,
END OF package_version.
* Component schema: project, object
TYPES: BEGIN OF project,
owner_url TYPE string,
url TYPE string,
html_url TYPE string,
columns_url TYPE string,
id TYPE i,
node_id TYPE string,
name TYPE string,
body TYPE string,
number TYPE i,
state TYPE string,
creator TYPE nullable_simple_user,
created_at TYPE string,
updated_at TYPE string,
organization_permission TYPE string,
private TYPE abap_bool,
END OF project.
* Component schema: group-mapping, object
TYPES: BEGIN OF group_mapping,
groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF group_mapping.
* Component schema: team-full, object
TYPES: BEGIN OF team_full,
id TYPE i,
node_id TYPE string,
url TYPE string,
html_url TYPE string,
name TYPE string,
slug TYPE string,
description TYPE string,
privacy TYPE string,
permission TYPE string,
members_url TYPE string,
repositories_url TYPE string,
parent TYPE nullable_team_simple,
members_count TYPE i,
repos_count TYPE i,
created_at TYPE string,
updated_at TYPE string,
organization TYPE organization_full,
ldap_dn TYPE string,
END OF team_full.
* Component schema: team-discussion, object
TYPES: BEGIN OF team_discussion,
author TYPE nullable_simple_user,
body TYPE string,
body_html TYPE string,
body_version TYPE string,
comments_count TYPE i,
comments_url TYPE string,
created_at TYPE string,
last_edited_at TYPE string,
html_url TYPE string,
node_id TYPE string,
number TYPE i,
pinned TYPE abap_bool,
private TYPE abap_bool,
team_url TYPE string,
title TYPE string,
updated_at TYPE string,
url TYPE string,
reactions TYPE reaction_rollup,
END OF team_discussion.
* Component schema: team-discussion-comment, object
TYPES: BEGIN OF team_discussion_comment,
author TYPE nullable_simple_user,
body TYPE string,
body_html TYPE string,
body_version TYPE string,
created_at TYPE string,
last_edited_at TYPE string,
discussion_url TYPE string,
html_url TYPE string,
node_id TYPE string,
number TYPE i,
updated_at TYPE string,
url TYPE string,
reactions TYPE reaction_rollup,
END OF team_discussion_comment.
* Component schema: reaction, object
TYPES: BEGIN OF reaction,
id TYPE i,
node_id TYPE string,
user TYPE nullable_simple_user,
content TYPE string,
created_at TYPE string,
END OF reaction.
* Component schema: team-membership, object
TYPES: BEGIN OF team_membership,
url TYPE string,
role TYPE string,
state TYPE string,
END OF team_membership.
* Component schema: team-project, object
TYPES: BEGIN OF subteam_project_permissions,
read TYPE abap_bool,
write TYPE abap_bool,
admin TYPE abap_bool,
END OF subteam_project_permissions.
TYPES: BEGIN OF team_project,
owner_url TYPE string,
url TYPE string,
html_url TYPE string,
columns_url TYPE string,
id TYPE i,
node_id TYPE string,
name TYPE string,
body TYPE string,
number TYPE i,
state TYPE string,
creator TYPE simple_user,
created_at TYPE string,
updated_at TYPE string,
organization_permission TYPE string,
private TYPE abap_bool,
permissions TYPE subteam_project_permissions,
END OF team_project.
* Component schema: team-repository, object
TYPES: BEGIN OF subteam_repository_permissions,
admin TYPE abap_bool,
pull TYPE abap_bool,
triage TYPE abap_bool,
push TYPE abap_bool,
maintain TYPE abap_bool,
END OF subteam_repository_permissions.
TYPES: BEGIN OF team_repository,
id TYPE i,
node_id TYPE string,
name TYPE string,
full_name TYPE string,
license TYPE nullable_license_simple,
forks TYPE i,
permissions TYPE subteam_repository_permissions,
role_name TYPE string,
owner TYPE nullable_simple_user,
private TYPE abap_bool,
html_url TYPE string,
description TYPE string,
fork TYPE abap_bool,
url TYPE string,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
downloads_url TYPE string,
events_url TYPE string,
forks_url TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
git_url TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
notifications_url TYPE string,
pulls_url TYPE string,
releases_url TYPE string,
ssh_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
clone_url TYPE string,
mirror_url TYPE string,
hooks_url TYPE string,
svn_url TYPE string,
homepage TYPE string,
language TYPE string,
forks_count TYPE i,
stargazers_count TYPE i,
watchers_count TYPE i,
size TYPE i,
default_branch TYPE string,
open_issues_count TYPE i,
is_template TYPE abap_bool,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
has_downloads TYPE abap_bool,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
pushed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
allow_rebase_merge TYPE abap_bool,
template_repository TYPE nullable_repository,
temp_clone_token TYPE string,
allow_squash_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
allow_forking TYPE abap_bool,
subscribers_count TYPE i,
network_count TYPE i,
open_issues TYPE i,
watchers TYPE i,
master_branch TYPE string,
END OF team_repository.
* Component schema: project-card, object
TYPES: BEGIN OF project_card,
url TYPE string,
id TYPE i,
node_id TYPE string,
note TYPE string,
creator TYPE nullable_simple_user,
created_at TYPE string,
updated_at TYPE string,
archived TYPE abap_bool,
column_name TYPE string,
project_id TYPE string,
column_url TYPE string,
content_url TYPE string,
project_url TYPE string,
END OF project_card.
* Component schema: project-column, object
TYPES: BEGIN OF project_column,
url TYPE string,
project_url TYPE string,
cards_url TYPE string,
id TYPE i,
node_id TYPE string,
name TYPE string,
created_at TYPE string,
updated_at TYPE string,
END OF project_column.
* Component schema: project-collaborator-permission, object
TYPES: BEGIN OF project_collaborator_permissio,
permission TYPE string,
user TYPE nullable_simple_user,
END OF project_collaborator_permissio.
* Component schema: rate-limit, object
TYPES: BEGIN OF rate_limit,
limit TYPE i,
remaining TYPE i,
reset TYPE i,
used TYPE i,
END OF rate_limit.
* Component schema: rate-limit-overview, object
TYPES: BEGIN OF subrate_limit_overview_resourc,
core TYPE rate_limit,
graphql TYPE rate_limit,
search TYPE rate_limit,
source_import TYPE rate_limit,
integration_manifest TYPE rate_limit,
code_scanning_upload TYPE rate_limit,
actions_runner_registration TYPE rate_limit,
scim TYPE rate_limit,
END OF subrate_limit_overview_resourc.
TYPES: BEGIN OF rate_limit_overview,
resources TYPE subrate_limit_overview_resourc,
rate TYPE rate_limit,
END OF rate_limit_overview.
* Component schema: code-of-conduct-simple, object
TYPES: BEGIN OF code_of_conduct_simple,
url TYPE string,
key TYPE string,
name TYPE string,
html_url TYPE string,
END OF code_of_conduct_simple.
* Component schema: full-repository, object
TYPES: BEGIN OF subsubfull_repository_securi01,
status TYPE string,
END OF subsubfull_repository_securi01.
TYPES: BEGIN OF subsubfull_repository_security,
status TYPE string,
END OF subsubfull_repository_security.
TYPES: BEGIN OF subfull_repository_security_an,
advanced_security TYPE subsubfull_repository_security,
secret_scanning TYPE subsubfull_repository_securi01,
END OF subfull_repository_security_an.
TYPES: BEGIN OF subfull_repository_permissions,
admin TYPE abap_bool,
maintain TYPE abap_bool,
push TYPE abap_bool,
triage TYPE abap_bool,
pull TYPE abap_bool,
END OF subfull_repository_permissions.
TYPES: BEGIN OF full_repository,
id TYPE i,
node_id TYPE string,
name TYPE string,
full_name TYPE string,
owner TYPE simple_user,
private TYPE abap_bool,
html_url TYPE string,
description TYPE string,
fork TYPE abap_bool,
url TYPE string,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
downloads_url TYPE string,
events_url TYPE string,
forks_url TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
git_url TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
notifications_url TYPE string,
pulls_url TYPE string,
releases_url TYPE string,
ssh_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
clone_url TYPE string,
mirror_url TYPE string,
hooks_url TYPE string,
svn_url TYPE string,
homepage TYPE string,
language TYPE string,
forks_count TYPE i,
stargazers_count TYPE i,
watchers_count TYPE i,
size TYPE i,
default_branch TYPE string,
open_issues_count TYPE i,
is_template TYPE abap_bool,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
has_downloads TYPE abap_bool,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
pushed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
permissions TYPE subfull_repository_permissions,
allow_rebase_merge TYPE abap_bool,
template_repository TYPE nullable_repository,
temp_clone_token TYPE string,
allow_squash_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
allow_forking TYPE abap_bool,
subscribers_count TYPE i,
network_count TYPE i,
license TYPE nullable_license_simple,
organization TYPE nullable_simple_user,
parent TYPE repository,
source TYPE repository,
forks TYPE i,
master_branch TYPE string,
open_issues TYPE i,
watchers TYPE i,
anonymous_access_enabled TYPE abap_bool,
code_of_conduct TYPE code_of_conduct_simple,
security_and_analysis TYPE subfull_repository_security_an,
END OF full_repository.
* Component schema: artifact, object
TYPES: BEGIN OF artifact,
id TYPE i,
node_id TYPE string,
name TYPE string,
size_in_bytes TYPE i,
url TYPE string,
archive_download_url TYPE string,
expired TYPE abap_bool,
created_at TYPE string,
expires_at TYPE string,
updated_at TYPE string,
END OF artifact.
* Component schema: job, object
TYPES: BEGIN OF job,
id TYPE i,
run_id TYPE i,
run_url TYPE string,
run_attempt TYPE i,
node_id TYPE string,
head_sha TYPE string,
url TYPE string,
html_url TYPE string,
status TYPE string,
conclusion TYPE string,
started_at TYPE string,
completed_at TYPE string,
name TYPE string,
steps TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
check_run_url TYPE string,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
runner_id TYPE i,
runner_name TYPE string,
runner_group_id TYPE i,
runner_group_name TYPE string,
END OF job.
* Component schema: actions-enabled, boolean
TYPES actions_enabled TYPE abap_bool.
* Component schema: actions-repository-permissions, object
TYPES: BEGIN OF actions_repository_permissions,
enabled TYPE actions_enabled,
allowed_actions TYPE allowed_actions,
selected_actions_url TYPE selected_actions_url,
END OF actions_repository_permissions.
* Component schema: pull-request-minimal, object
TYPES: BEGIN OF subsubpull_request_minimal_bas,
id TYPE i,
url TYPE string,
name TYPE string,
END OF subsubpull_request_minimal_bas.
TYPES: BEGIN OF subpull_request_minimal_base,
ref TYPE string,
sha TYPE string,
repo TYPE subsubpull_request_minimal_bas,
END OF subpull_request_minimal_base.
TYPES: BEGIN OF subsubpull_request_minimal_hea,
id TYPE i,
url TYPE string,
name TYPE string,
END OF subsubpull_request_minimal_hea.
TYPES: BEGIN OF subpull_request_minimal_head,
ref TYPE string,
sha TYPE string,
repo TYPE subsubpull_request_minimal_hea,
END OF subpull_request_minimal_head.
TYPES: BEGIN OF pull_request_minimal,
id TYPE i,
number TYPE i,
url TYPE string,
head TYPE subpull_request_minimal_head,
base TYPE subpull_request_minimal_base,
END OF pull_request_minimal.
* Component schema: nullable-simple-commit, object
TYPES: BEGIN OF subnullable_simple_commit_comm,
name TYPE string,
email TYPE string,
END OF subnullable_simple_commit_comm.
TYPES: BEGIN OF subnullable_simple_commit_auth,
name TYPE string,
email TYPE string,
END OF subnullable_simple_commit_auth.
TYPES: BEGIN OF nullable_simple_commit,
id TYPE string,
tree_id TYPE string,
message TYPE string,
timestamp TYPE string,
author TYPE subnullable_simple_commit_auth,
committer TYPE subnullable_simple_commit_comm,
END OF nullable_simple_commit.
* Component schema: workflow-run, object
TYPES: BEGIN OF workflow_run,
id TYPE i,
name TYPE string,
node_id TYPE string,
check_suite_id TYPE i,
check_suite_node_id TYPE string,
head_branch TYPE string,
head_sha TYPE string,
run_number TYPE i,
run_attempt TYPE i,
event TYPE string,
status TYPE string,
conclusion TYPE string,
workflow_id TYPE i,
url TYPE string,
html_url TYPE string,
pull_requests TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
created_at TYPE string,
updated_at TYPE string,
run_started_at TYPE string,
jobs_url TYPE string,
logs_url TYPE string,
check_suite_url TYPE string,
artifacts_url TYPE string,
cancel_url TYPE string,
rerun_url TYPE string,
previous_attempt_url TYPE string,
workflow_url TYPE string,
head_commit TYPE nullable_simple_commit,
repository TYPE minimal_repository,
head_repository TYPE minimal_repository,
head_repository_id TYPE i,
END OF workflow_run.
* Component schema: environment-approvals, object
TYPES: BEGIN OF environment_approvals,
environments TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
state TYPE string,
user TYPE simple_user,
comment TYPE string,
END OF environment_approvals.
* Component schema: deployment-reviewer-type, string
TYPES deployment_reviewer_type TYPE string.
* Component schema: pending-deployment, object
TYPES: BEGIN OF subpending_deployment_environm,
id TYPE i,
node_id TYPE string,
name TYPE string,
url TYPE string,
html_url TYPE string,
END OF subpending_deployment_environm.
TYPES: BEGIN OF pending_deployment,
environment TYPE subpending_deployment_environm,
wait_timer TYPE i,
wait_timer_started_at TYPE string,
current_user_can_approve TYPE abap_bool,
reviewers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF pending_deployment.
* Component schema: deployment, object
TYPES: BEGIN OF deployment,
url TYPE string,
id TYPE i,
node_id TYPE string,
sha TYPE string,
ref TYPE string,
task TYPE string,
payload TYPE string,
original_environment TYPE string,
environment TYPE string,
description TYPE string,
creator TYPE nullable_simple_user,
created_at TYPE string,
updated_at TYPE string,
statuses_url TYPE string,
repository_url TYPE string,
transient_environment TYPE abap_bool,
production_environment TYPE abap_bool,
performed_via_github_app TYPE nullable_integration,
END OF deployment.
* Component schema: workflow-run-usage, object
TYPES: BEGIN OF subsubworkflow_run_usage_bil02,
total_ms TYPE i,
jobs TYPE i,
job_runs TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubworkflow_run_usage_bil02.
TYPES: BEGIN OF subsubworkflow_run_usage_bil01,
total_ms TYPE i,
jobs TYPE i,
job_runs TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubworkflow_run_usage_bil01.
TYPES: BEGIN OF subsubworkflow_run_usage_billa,
total_ms TYPE i,
jobs TYPE i,
job_runs TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubworkflow_run_usage_billa.
TYPES: BEGIN OF subworkflow_run_usage_billable,
ubuntu TYPE subsubworkflow_run_usage_billa,
macos TYPE subsubworkflow_run_usage_bil01,
windows TYPE subsubworkflow_run_usage_bil02,
END OF subworkflow_run_usage_billable.
TYPES: BEGIN OF workflow_run_usage,
billable TYPE subworkflow_run_usage_billable,
run_duration_ms TYPE i,
END OF workflow_run_usage.
* Component schema: actions-secret, object
TYPES: BEGIN OF actions_secret,
name TYPE string,
created_at TYPE string,
updated_at TYPE string,
END OF actions_secret.
* Component schema: workflow, object
TYPES: BEGIN OF workflow,
id TYPE i,
node_id TYPE string,
name TYPE string,
path TYPE string,
state TYPE string,
created_at TYPE string,
updated_at TYPE string,
url TYPE string,
html_url TYPE string,
badge_url TYPE string,
deleted_at TYPE string,
END OF workflow.
* Component schema: workflow-usage, object
TYPES: BEGIN OF subsubworkflow_usage_billabl02,
total_ms TYPE i,
END OF subsubworkflow_usage_billabl02.
TYPES: BEGIN OF subsubworkflow_usage_billabl01,
total_ms TYPE i,
END OF subsubworkflow_usage_billabl01.
TYPES: BEGIN OF subsubworkflow_usage_billable_,
total_ms TYPE i,
END OF subsubworkflow_usage_billable_.
TYPES: BEGIN OF subworkflow_usage_billable,
ubuntu TYPE subsubworkflow_usage_billable_,
macos TYPE subsubworkflow_usage_billabl01,
windows TYPE subsubworkflow_usage_billabl02,
END OF subworkflow_usage_billable.
TYPES: BEGIN OF workflow_usage,
billable TYPE subworkflow_usage_billable,
END OF workflow_usage.
* Component schema: autolink, object
TYPES: BEGIN OF autolink,
id TYPE i,
key_prefix TYPE string,
url_template TYPE string,
END OF autolink.
* Component schema: protected-branch-required-status-check, object
TYPES: BEGIN OF protected_branch_required_stat,
url TYPE string,
enforcement_level TYPE string,
contexts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
checks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
contexts_url TYPE string,
strict TYPE abap_bool,
END OF protected_branch_required_stat.
* Component schema: protected-branch-admin-enforced, object
TYPES: BEGIN OF protected_branch_admin_enforce,
url TYPE string,
enabled TYPE abap_bool,
END OF protected_branch_admin_enforce.
* Component schema: protected-branch-pull-request-review, object
TYPES: BEGIN OF subprotected_branch_pull_req01,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subprotected_branch_pull_req01.
TYPES: BEGIN OF subprotected_branch_pull_reque,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
url TYPE string,
users_url TYPE string,
teams_url TYPE string,
END OF subprotected_branch_pull_reque.
TYPES: BEGIN OF protected_branch_pull_request_,
url TYPE string,
dismissal_restrictions TYPE subprotected_branch_pull_reque,
bypass_pull_request_allowances TYPE subprotected_branch_pull_req01,
dismiss_stale_reviews TYPE abap_bool,
require_code_owner_reviews TYPE abap_bool,
required_approving_review_coun TYPE i,
END OF protected_branch_pull_request_.
* Component schema: branch-restriction-policy, object
TYPES: BEGIN OF branch_restriction_policy,
url TYPE string,
users_url TYPE string,
teams_url TYPE string,
apps_url TYPE string,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
apps TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF branch_restriction_policy.
* Component schema: branch-protection, object
TYPES: BEGIN OF subbranch_protection_require02,
url TYPE string,
enabled TYPE abap_bool,
END OF subbranch_protection_require02.
TYPES: BEGIN OF subbranch_protection_require01,
enabled TYPE abap_bool,
END OF subbranch_protection_require01.
TYPES: BEGIN OF subbranch_protection_allow_del,
enabled TYPE abap_bool,
END OF subbranch_protection_allow_del.
TYPES: BEGIN OF subbranch_protection_allow_for,
enabled TYPE abap_bool,
END OF subbranch_protection_allow_for.
TYPES: BEGIN OF subbranch_protection_required_,
enabled TYPE abap_bool,
END OF subbranch_protection_required_.
TYPES: BEGIN OF branch_protection,
url TYPE string,
enabled TYPE abap_bool,
required_status_checks TYPE protected_branch_required_stat,
enforce_admins TYPE protected_branch_admin_enforce,
required_pull_request_reviews TYPE protected_branch_pull_request_,
restrictions TYPE branch_restriction_policy,
required_linear_history TYPE subbranch_protection_required_,
allow_force_pushes TYPE subbranch_protection_allow_for,
allow_deletions TYPE subbranch_protection_allow_del,
required_conversation_resoluti TYPE subbranch_protection_require01,
name TYPE string,
protection_url TYPE string,
required_signatures TYPE subbranch_protection_require02,
END OF branch_protection.
* Component schema: short-branch, object
TYPES: BEGIN OF subshort_branch_commit,
sha TYPE string,
url TYPE string,
END OF subshort_branch_commit.
TYPES: BEGIN OF short_branch,
name TYPE string,
commit TYPE subshort_branch_commit,
protected TYPE abap_bool,
protection TYPE branch_protection,
protection_url TYPE string,
END OF short_branch.
* Component schema: nullable-git-user, object
TYPES: BEGIN OF nullable_git_user,
name TYPE string,
email TYPE string,
date TYPE string,
END OF nullable_git_user.
* Component schema: verification, object
TYPES: BEGIN OF verification,
verified TYPE abap_bool,
reason TYPE string,
payload TYPE string,
signature TYPE string,
END OF verification.
* Component schema: diff-entry, object
TYPES: BEGIN OF diff_entry,
sha TYPE string,
filename TYPE string,
status TYPE string,
additions TYPE i,
deletions TYPE i,
changes TYPE i,
blob_url TYPE string,
raw_url TYPE string,
contents_url TYPE string,
patch TYPE string,
previous_filename TYPE string,
END OF diff_entry.
* Component schema: commit, object
TYPES: BEGIN OF subcommit_stats,
additions TYPE i,
deletions TYPE i,
total TYPE i,
END OF subcommit_stats.
TYPES: BEGIN OF subsubcommit_commit_tree,
sha TYPE string,
url TYPE string,
END OF subsubcommit_commit_tree.
TYPES: BEGIN OF subcommit_commit,
url TYPE string,
author TYPE nullable_git_user,
committer TYPE nullable_git_user,
message TYPE string,
comment_count TYPE i,
tree TYPE subsubcommit_commit_tree,
verification TYPE verification,
END OF subcommit_commit.
TYPES: BEGIN OF commit,
url TYPE string,
sha TYPE string,
node_id TYPE string,
html_url TYPE string,
comments_url TYPE string,
commit TYPE subcommit_commit,
author TYPE nullable_simple_user,
committer TYPE nullable_simple_user,
parents TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
stats TYPE subcommit_stats,
files TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF commit.
* Component schema: branch-with-protection, object
TYPES: BEGIN OF subbranch_with_protection__lin,
html TYPE string,
self TYPE string,
END OF subbranch_with_protection__lin.
TYPES: BEGIN OF branch_with_protection,
name TYPE string,
commit TYPE commit,
_links TYPE subbranch_with_protection__lin,
protected TYPE abap_bool,
protection TYPE branch_protection,
protection_url TYPE string,
pattern TYPE string,
required_approving_review_coun TYPE i,
END OF branch_with_protection.
* Component schema: status-check-policy, object
TYPES: BEGIN OF status_check_policy,
url TYPE string,
strict TYPE abap_bool,
contexts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
checks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
contexts_url TYPE string,
END OF status_check_policy.
* Component schema: protected-branch, object
TYPES: BEGIN OF subprotected_branch_required_c,
enabled TYPE abap_bool,
END OF subprotected_branch_required_c.
TYPES: BEGIN OF subprotected_branch_allow_dele,
enabled TYPE abap_bool,
END OF subprotected_branch_allow_dele.
TYPES: BEGIN OF subprotected_branch_allow_forc,
enabled TYPE abap_bool,
END OF subprotected_branch_allow_forc.
TYPES: BEGIN OF subprotected_branch_required_l,
enabled TYPE abap_bool,
END OF subprotected_branch_required_l.
TYPES: BEGIN OF subprotected_branch_enforce_ad,
url TYPE string,
enabled TYPE abap_bool,
END OF subprotected_branch_enforce_ad.
TYPES: BEGIN OF subprotected_branch_required_s,
url TYPE string,
enabled TYPE abap_bool,
END OF subprotected_branch_required_s.
TYPES: BEGIN OF subsubprotected_branch_requi01,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubprotected_branch_requi01.
TYPES: BEGIN OF subsubprotected_branch_require,
url TYPE string,
users_url TYPE string,
teams_url TYPE string,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubprotected_branch_require.
TYPES: BEGIN OF subprotected_branch_required_p,
url TYPE string,
dismiss_stale_reviews TYPE abap_bool,
require_code_owner_reviews TYPE abap_bool,
required_approving_review_coun TYPE i,
dismissal_restrictions TYPE subsubprotected_branch_require,
bypass_pull_request_allowances TYPE subsubprotected_branch_requi01,
END OF subprotected_branch_required_p.
TYPES: BEGIN OF protected_branch,
url TYPE string,
required_status_checks TYPE status_check_policy,
required_pull_request_reviews TYPE subprotected_branch_required_p,
required_signatures TYPE subprotected_branch_required_s,
enforce_admins TYPE subprotected_branch_enforce_ad,
required_linear_history TYPE subprotected_branch_required_l,
allow_force_pushes TYPE subprotected_branch_allow_forc,
allow_deletions TYPE subprotected_branch_allow_dele,
restrictions TYPE branch_restriction_policy,
required_conversation_resoluti TYPE subprotected_branch_required_c,
END OF protected_branch.
* Component schema: deployment-simple, object
TYPES: BEGIN OF deployment_simple,
url TYPE string,
id TYPE i,
node_id TYPE string,
task TYPE string,
original_environment TYPE string,
environment TYPE string,
description TYPE string,
created_at TYPE string,
updated_at TYPE string,
statuses_url TYPE string,
repository_url TYPE string,
transient_environment TYPE abap_bool,
production_environment TYPE abap_bool,
performed_via_github_app TYPE nullable_integration,
END OF deployment_simple.
* Component schema: check-run, object
TYPES: BEGIN OF subcheck_run_check_suite,
id TYPE i,
END OF subcheck_run_check_suite.
TYPES: BEGIN OF subcheck_run_output,
title TYPE string,
summary TYPE string,
text TYPE string,
annotations_count TYPE i,
annotations_url TYPE string,
END OF subcheck_run_output.
TYPES: BEGIN OF check_run,
id TYPE i,
head_sha TYPE string,
node_id TYPE string,
external_id TYPE string,
url TYPE string,
html_url TYPE string,
details_url TYPE string,
status TYPE string,
conclusion TYPE string,
started_at TYPE string,
completed_at TYPE string,
output TYPE subcheck_run_output,
name TYPE string,
check_suite TYPE subcheck_run_check_suite,
app TYPE nullable_integration,
pull_requests TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
deployment TYPE deployment_simple,
END OF check_run.
* Component schema: check-annotation, object
TYPES: BEGIN OF check_annotation,
path TYPE string,
start_line TYPE i,
end_line TYPE i,
start_column TYPE i,
end_column TYPE i,
annotation_level TYPE string,
title TYPE string,
message TYPE string,
raw_details TYPE string,
blob_href TYPE string,
END OF check_annotation.
* Component schema: simple-commit, object
TYPES: BEGIN OF subsimple_commit_committer,
name TYPE string,
email TYPE string,
END OF subsimple_commit_committer.
TYPES: BEGIN OF subsimple_commit_author,
name TYPE string,
email TYPE string,
END OF subsimple_commit_author.
TYPES: BEGIN OF simple_commit,
id TYPE string,
tree_id TYPE string,
message TYPE string,
timestamp TYPE string,
author TYPE subsimple_commit_author,
committer TYPE subsimple_commit_committer,
END OF simple_commit.
* Component schema: check-suite, object
TYPES: BEGIN OF check_suite,
id TYPE i,
node_id TYPE string,
head_branch TYPE string,
head_sha TYPE string,
status TYPE string,
conclusion TYPE string,
url TYPE string,
before TYPE string,
after TYPE string,
pull_requests TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
app TYPE nullable_integration,
repository TYPE minimal_repository,
created_at TYPE string,
updated_at TYPE string,
head_commit TYPE simple_commit,
latest_check_runs_count TYPE i,
check_runs_url TYPE string,
rerequestable TYPE abap_bool,
runs_rerequestable TYPE abap_bool,
END OF check_suite.
* Component schema: check-suite-preference, object
TYPES: BEGIN OF subcheck_suite_preference_pref,
auto_trigger_checks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subcheck_suite_preference_pref.
TYPES: BEGIN OF check_suite_preference,
preferences TYPE subcheck_suite_preference_pref,
repository TYPE minimal_repository,
END OF check_suite_preference.
* Component schema: code-scanning-alert-rule-summary, object
TYPES: BEGIN OF code_scanning_alert_rule_summa,
id TYPE string,
name TYPE string,
tags TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
severity TYPE string,
description TYPE string,
END OF code_scanning_alert_rule_summa.
* Component schema: code-scanning-alert-items, object
TYPES: BEGIN OF code_scanning_alert_items,
number TYPE alert_number,
created_at TYPE alert_created_at,
updated_at TYPE alert_updated_at,
url TYPE alert_url,
html_url TYPE alert_html_url,
instances_url TYPE alert_instances_url,
state TYPE code_scanning_alert_state,
fixed_at TYPE code_scanning_alert_fixed_at,
dismissed_by TYPE nullable_simple_user,
dismissed_at TYPE code_scanning_alert_dismissed_,
dismissed_reason TYPE code_scanning_alert_dismisse01,
rule TYPE code_scanning_alert_rule_summa,
tool TYPE code_scanning_analysis_tool,
most_recent_instance TYPE code_scanning_alert_instance,
END OF code_scanning_alert_items.
* Component schema: code-scanning-alert, object
TYPES: BEGIN OF code_scanning_alert,
number TYPE alert_number,
created_at TYPE alert_created_at,
updated_at TYPE alert_updated_at,
url TYPE alert_url,
html_url TYPE alert_html_url,
instances_url TYPE alert_instances_url,
state TYPE code_scanning_alert_state,
fixed_at TYPE code_scanning_alert_fixed_at,
dismissed_by TYPE nullable_simple_user,
dismissed_at TYPE code_scanning_alert_dismissed_,
dismissed_reason TYPE code_scanning_alert_dismisse01,
rule TYPE code_scanning_alert_rule,
tool TYPE code_scanning_analysis_tool,
most_recent_instance TYPE code_scanning_alert_instance,
END OF code_scanning_alert.
* Component schema: code-scanning-alert-set-state, string
TYPES code_scanning_alert_set_state TYPE string.
* Component schema: code-scanning-analysis-sarif-id, string
TYPES code_scanning_analysis_sarif_i TYPE string.
* Component schema: code-scanning-analysis-commit-sha, string
TYPES code_scanning_analysis_commit_ TYPE string.
* Component schema: code-scanning-analysis-environment, string
TYPES code_scanning_analysis_environ TYPE string.
* Component schema: code-scanning-analysis-created-at, string
TYPES code_scanning_analysis_created TYPE string.
* Component schema: code-scanning-analysis-url, string
TYPES code_scanning_analysis_url TYPE string.
* Component schema: code-scanning-analysis, object
TYPES: BEGIN OF code_scanning_analysis,
ref TYPE code_scanning_ref,
commit_sha TYPE code_scanning_analysis_commit_,
analysis_key TYPE code_scanning_analysis_analysi,
environment TYPE code_scanning_analysis_environ,
category TYPE code_scanning_analysis_categor,
error TYPE string,
created_at TYPE code_scanning_analysis_created,
results_count TYPE i,
rules_count TYPE i,
id TYPE i,
url TYPE code_scanning_analysis_url,
sarif_id TYPE code_scanning_analysis_sarif_i,
tool TYPE code_scanning_analysis_tool,
deletable TYPE abap_bool,
warning TYPE string,
END OF code_scanning_analysis.
* Component schema: code-scanning-analysis-deletion, object
TYPES: BEGIN OF code_scanning_analysis_deletio,
next_analysis_url TYPE string,
confirm_delete_url TYPE string,
END OF code_scanning_analysis_deletio.
* Component schema: code-scanning-analysis-sarif-file, string
TYPES code_scanning_analysis_sarif_f TYPE string.
* Component schema: code-scanning-sarifs-receipt, object
TYPES: BEGIN OF code_scanning_sarifs_receipt,
id TYPE code_scanning_analysis_sarif_i,
url TYPE string,
END OF code_scanning_sarifs_receipt.
* Component schema: code-scanning-sarifs-status, object
TYPES: BEGIN OF code_scanning_sarifs_status,
processing_status TYPE string,
analyses_url TYPE string,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF code_scanning_sarifs_status.
* Component schema: codeowners-errors, object
TYPES: BEGIN OF codeowners_errors,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF codeowners_errors.
* Component schema: nullable-codespace-machine, object
TYPES: BEGIN OF nullable_codespace_machine,
name TYPE string,
display_name TYPE string,
operating_system TYPE string,
storage_in_bytes TYPE i,
memory_in_bytes TYPE i,
cpus TYPE i,
prebuild_availability TYPE string,
END OF nullable_codespace_machine.
* Component schema: codespace, object
TYPES: BEGIN OF subcodespace_runtime_constrain,
allowed_port_privacy_settings TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subcodespace_runtime_constrain.
TYPES: BEGIN OF subcodespace_git_status,
ahead TYPE i,
behind TYPE i,
has_unpushed_changes TYPE abap_bool,
has_uncommitted_changes TYPE abap_bool,
ref TYPE string,
END OF subcodespace_git_status.
TYPES: BEGIN OF codespace,
id TYPE i,
name TYPE string,
display_name TYPE string,
environment_id TYPE string,
owner TYPE simple_user,
billable_owner TYPE simple_user,
repository TYPE minimal_repository,
machine TYPE nullable_codespace_machine,
prebuild TYPE abap_bool,
created_at TYPE string,
updated_at TYPE string,
last_used_at TYPE string,
state TYPE string,
url TYPE string,
git_status TYPE subcodespace_git_status,
location TYPE string,
idle_timeout_minutes TYPE i,
web_url TYPE string,
machines_url TYPE string,
start_url TYPE string,
stop_url TYPE string,
pulls_url TYPE string,
recent_folders TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
runtime_constraints TYPE subcodespace_runtime_constrain,
END OF codespace.
* Component schema: codespace-machine, object
TYPES: BEGIN OF codespace_machine,
name TYPE string,
display_name TYPE string,
operating_system TYPE string,
storage_in_bytes TYPE i,
memory_in_bytes TYPE i,
cpus TYPE i,
prebuild_availability TYPE string,
END OF codespace_machine.
* Component schema: collaborator, object
TYPES: BEGIN OF subcollaborator_permissions,
pull TYPE abap_bool,
triage TYPE abap_bool,
push TYPE abap_bool,
maintain TYPE abap_bool,
admin TYPE abap_bool,
END OF subcollaborator_permissions.
TYPES: BEGIN OF collaborator,
login TYPE string,
id TYPE i,
email TYPE string,
name TYPE string,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
events_url TYPE string,
received_events_url TYPE string,
type TYPE string,
site_admin TYPE abap_bool,
permissions TYPE subcollaborator_permissions,
role_name TYPE string,
END OF collaborator.
* Component schema: repository-invitation, object
TYPES: BEGIN OF repository_invitation,
id TYPE i,
repository TYPE minimal_repository,
invitee TYPE nullable_simple_user,
inviter TYPE nullable_simple_user,
permissions TYPE string,
created_at TYPE string,
expired TYPE abap_bool,
url TYPE string,
html_url TYPE string,
node_id TYPE string,
END OF repository_invitation.
* Component schema: nullable-collaborator, object
TYPES: BEGIN OF subnullable_collaborator_permi,
pull TYPE abap_bool,
triage TYPE abap_bool,
push TYPE abap_bool,
maintain TYPE abap_bool,
admin TYPE abap_bool,
END OF subnullable_collaborator_permi.
TYPES: BEGIN OF nullable_collaborator,
login TYPE string,
id TYPE i,
email TYPE string,
name TYPE string,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
events_url TYPE string,
received_events_url TYPE string,
type TYPE string,
site_admin TYPE abap_bool,
permissions TYPE subnullable_collaborator_permi,
role_name TYPE string,
END OF nullable_collaborator.
* Component schema: repository-collaborator-permission, object
TYPES: BEGIN OF repository_collaborator_permis,
permission TYPE string,
role_name TYPE string,
user TYPE nullable_collaborator,
END OF repository_collaborator_permis.
* Component schema: commit-comment, object
TYPES: BEGIN OF commit_comment,
html_url TYPE string,
url TYPE string,
id TYPE i,
node_id TYPE string,
body TYPE string,
path TYPE string,
position TYPE i,
line TYPE i,
commit_id TYPE string,
user TYPE nullable_simple_user,
created_at TYPE string,
updated_at TYPE string,
author_association TYPE author_association,
reactions TYPE reaction_rollup,
END OF commit_comment.
* Component schema: branch-short, object
TYPES: BEGIN OF subbranch_short_commit,
sha TYPE string,
url TYPE string,
END OF subbranch_short_commit.
TYPES: BEGIN OF branch_short,
name TYPE string,
commit TYPE subbranch_short_commit,
protected TYPE abap_bool,
END OF branch_short.
* Component schema: link, object
TYPES: BEGIN OF link,
href TYPE string,
END OF link.
* Component schema: auto_merge, object
TYPES: BEGIN OF auto_merge,
enabled_by TYPE simple_user,
merge_method TYPE string,
commit_title TYPE string,
commit_message TYPE string,
END OF auto_merge.
* Component schema: pull-request-simple, object
TYPES: BEGIN OF subpull_request_simple__links,
comments TYPE link,
commits TYPE link,
statuses TYPE link,
html TYPE link,
issue TYPE link,
review_comments TYPE link,
review_comment TYPE link,
self TYPE link,
END OF subpull_request_simple__links.
TYPES: BEGIN OF subpull_request_simple_base,
label TYPE string,
ref TYPE string,
repo TYPE repository,
sha TYPE string,
user TYPE nullable_simple_user,
END OF subpull_request_simple_base.
TYPES: BEGIN OF subpull_request_simple_head,
label TYPE string,
ref TYPE string,
repo TYPE repository,
sha TYPE string,
user TYPE nullable_simple_user,
END OF subpull_request_simple_head.
TYPES: BEGIN OF pull_request_simple,
url TYPE string,
id TYPE i,
node_id TYPE string,
html_url TYPE string,
diff_url TYPE string,
patch_url TYPE string,
issue_url TYPE string,
commits_url TYPE string,
review_comments_url TYPE string,
review_comment_url TYPE string,
comments_url TYPE string,
statuses_url TYPE string,
number TYPE i,
state TYPE string,
locked TYPE abap_bool,
title TYPE string,
user TYPE nullable_simple_user,
body TYPE string,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
milestone TYPE nullable_milestone,
active_lock_reason TYPE string,
created_at TYPE string,
updated_at TYPE string,
closed_at TYPE string,
merged_at TYPE string,
merge_commit_sha TYPE string,
assignee TYPE nullable_simple_user,
assignees TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
requested_reviewers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
requested_teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
head TYPE subpull_request_simple_head,
base TYPE subpull_request_simple_base,
_links TYPE subpull_request_simple__links,
author_association TYPE author_association,
auto_merge TYPE auto_merge,
draft TYPE abap_bool,
END OF pull_request_simple.
* Component schema: simple-commit-status, object
TYPES: BEGIN OF simple_commit_status,
description TYPE string,
id TYPE i,
node_id TYPE string,
state TYPE string,
context TYPE string,
target_url TYPE string,
required TYPE abap_bool,
avatar_url TYPE string,
url TYPE string,
created_at TYPE string,
updated_at TYPE string,
END OF simple_commit_status.
* Component schema: combined-commit-status, object
TYPES: BEGIN OF combined_commit_status,
state TYPE string,
statuses TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
sha TYPE string,
total_count TYPE i,
repository TYPE minimal_repository,
commit_url TYPE string,
url TYPE string,
END OF combined_commit_status.
* Component schema: status, object
TYPES: BEGIN OF status,
url TYPE string,
avatar_url TYPE string,
id TYPE i,
node_id TYPE string,
state TYPE string,
description TYPE string,
target_url TYPE string,
context TYPE string,
created_at TYPE string,
updated_at TYPE string,
creator TYPE nullable_simple_user,
END OF status.
* Component schema: nullable-code-of-conduct-simple, object
TYPES: BEGIN OF nullable_code_of_conduct_simpl,
url TYPE string,
key TYPE string,
name TYPE string,
html_url TYPE string,
END OF nullable_code_of_conduct_simpl.
* Component schema: nullable-community-health-file, object
TYPES: BEGIN OF nullable_community_health_file,
url TYPE string,
html_url TYPE string,
END OF nullable_community_health_file.
* Component schema: community-profile, object
TYPES: BEGIN OF subcommunity_profile_files,
code_of_conduct TYPE nullable_code_of_conduct_simpl,
code_of_conduct_file TYPE nullable_community_health_file,
license TYPE nullable_license_simple,
contributing TYPE nullable_community_health_file,
readme TYPE nullable_community_health_file,
issue_template TYPE nullable_community_health_file,
pull_request_template TYPE nullable_community_health_file,
END OF subcommunity_profile_files.
TYPES: BEGIN OF community_profile,
health_percentage TYPE i,
description TYPE string,
documentation TYPE string,
files TYPE subcommunity_profile_files,
updated_at TYPE string,
content_reports_enabled TYPE abap_bool,
END OF community_profile.
* Component schema: commit-comparison, object
TYPES: BEGIN OF commit_comparison,
url TYPE string,
html_url TYPE string,
permalink_url TYPE string,
diff_url TYPE string,
patch_url TYPE string,
base_commit TYPE commit,
merge_base_commit TYPE commit,
status TYPE string,
ahead_by TYPE i,
behind_by TYPE i,
total_commits TYPE i,
commits TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
files TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF commit_comparison.
* Component schema: content-tree, object
TYPES: BEGIN OF subcontent_tree__links,
git TYPE string,
html TYPE string,
self TYPE string,
END OF subcontent_tree__links.
TYPES: BEGIN OF content_tree,
type TYPE string,
size TYPE i,
name TYPE string,
path TYPE string,
sha TYPE string,
url TYPE string,
git_url TYPE string,
html_url TYPE string,
download_url TYPE string,
entries TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
_links TYPE subcontent_tree__links,
END OF content_tree.
* Component schema: content-directory, array
TYPES content_directory TYPE string. " array todo
* Component schema: content-file, object
TYPES: BEGIN OF subcontent_file__links,
git TYPE string,
html TYPE string,
self TYPE string,
END OF subcontent_file__links.
TYPES: BEGIN OF content_file,
type TYPE string,
encoding TYPE string,
size TYPE i,
name TYPE string,
path TYPE string,
content TYPE string,
sha TYPE string,
url TYPE string,
git_url TYPE string,
html_url TYPE string,
download_url TYPE string,
_links TYPE subcontent_file__links,
target TYPE string,
submodule_git_url TYPE string,
END OF content_file.
* Component schema: content-symlink, object
TYPES: BEGIN OF subcontent_symlink__links,
git TYPE string,
html TYPE string,
self TYPE string,
END OF subcontent_symlink__links.
TYPES: BEGIN OF content_symlink,
type TYPE string,
target TYPE string,
size TYPE i,
name TYPE string,
path TYPE string,
sha TYPE string,
url TYPE string,
git_url TYPE string,
html_url TYPE string,
download_url TYPE string,
_links TYPE subcontent_symlink__links,
END OF content_symlink.
* Component schema: content-submodule, object
TYPES: BEGIN OF subcontent_submodule__links,
git TYPE string,
html TYPE string,
self TYPE string,
END OF subcontent_submodule__links.
TYPES: BEGIN OF content_submodule,
type TYPE string,
submodule_git_url TYPE string,
size TYPE i,
name TYPE string,
path TYPE string,
sha TYPE string,
url TYPE string,
git_url TYPE string,
html_url TYPE string,
download_url TYPE string,
_links TYPE subcontent_submodule__links,
END OF content_submodule.
* Component schema: file-commit, object
TYPES: BEGIN OF subsubfile_commit_commit_verif,
verified TYPE abap_bool,
reason TYPE string,
signature TYPE string,
payload TYPE string,
END OF subsubfile_commit_commit_verif.
TYPES: BEGIN OF subsubfile_commit_commit_tree,
url TYPE string,
sha TYPE string,
END OF subsubfile_commit_commit_tree.
TYPES: BEGIN OF subsubfile_commit_commit_commi,
date TYPE string,
name TYPE string,
email TYPE string,
END OF subsubfile_commit_commit_commi.
TYPES: BEGIN OF subsubfile_commit_commit_autho,
date TYPE string,
name TYPE string,
email TYPE string,
END OF subsubfile_commit_commit_autho.
TYPES: BEGIN OF subfile_commit_commit,
sha TYPE string,
node_id TYPE string,
url TYPE string,
html_url TYPE string,
author TYPE subsubfile_commit_commit_autho,
committer TYPE subsubfile_commit_commit_commi,
message TYPE string,
tree TYPE subsubfile_commit_commit_tree,
parents TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
verification TYPE subsubfile_commit_commit_verif,
END OF subfile_commit_commit.
TYPES: BEGIN OF subsubfile_commit_content__lin,
self TYPE string,
git TYPE string,
html TYPE string,
END OF subsubfile_commit_content__lin.
TYPES: BEGIN OF subfile_commit_content,
name TYPE string,
path TYPE string,
sha TYPE string,
size TYPE i,
url TYPE string,
html_url TYPE string,
git_url TYPE string,
download_url TYPE string,
type TYPE string,
_links TYPE subsubfile_commit_content__lin,
END OF subfile_commit_content.
TYPES: BEGIN OF file_commit,
content TYPE subfile_commit_content,
commit TYPE subfile_commit_commit,
END OF file_commit.
* Component schema: contributor, object
TYPES: BEGIN OF contributor,
login TYPE string,
id TYPE i,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
events_url TYPE string,
received_events_url TYPE string,
type TYPE string,
site_admin TYPE abap_bool,
contributions TYPE i,
email TYPE string,
name TYPE string,
END OF contributor.
* Component schema: dependabot-secret, object
TYPES: BEGIN OF dependabot_secret,
name TYPE string,
created_at TYPE string,
updated_at TYPE string,
END OF dependabot_secret.
* Component schema: deployment-status, object
TYPES: BEGIN OF deployment_status,
url TYPE string,
id TYPE i,
node_id TYPE string,
state TYPE string,
creator TYPE nullable_simple_user,
description TYPE string,
environment TYPE string,
target_url TYPE string,
created_at TYPE string,
updated_at TYPE string,
deployment_url TYPE string,
repository_url TYPE string,
environment_url TYPE string,
log_url TYPE string,
performed_via_github_app TYPE nullable_integration,
END OF deployment_status.
* Component schema: wait-timer, integer
TYPES wait_timer TYPE i.
* Component schema: deployment_branch_policy, object
TYPES: BEGIN OF deployment_branch_policy,
protected_branches TYPE abap_bool,
custom_branch_policies TYPE abap_bool,
END OF deployment_branch_policy.
* Component schema: environment, object
TYPES: BEGIN OF environment,
id TYPE i,
node_id TYPE string,
name TYPE string,
url TYPE string,
html_url TYPE string,
created_at TYPE string,
updated_at TYPE string,
protection_rules TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
deployment_branch_policy TYPE deployment_branch_policy,
END OF environment.
* Component schema: short-blob, object
TYPES: BEGIN OF short_blob,
url TYPE string,
sha TYPE string,
END OF short_blob.
* Component schema: blob, object
TYPES: BEGIN OF blob,
content TYPE string,
encoding TYPE string,
url TYPE string,
sha TYPE string,
size TYPE i,
node_id TYPE string,
highlighted_content TYPE string,
END OF blob.
* Component schema: git-commit, object
TYPES: BEGIN OF subgit_commit_verification,
verified TYPE abap_bool,
reason TYPE string,
signature TYPE string,
payload TYPE string,
END OF subgit_commit_verification.
TYPES: BEGIN OF subgit_commit_tree,
sha TYPE string,
url TYPE string,
END OF subgit_commit_tree.
TYPES: BEGIN OF subgit_commit_committer,
date TYPE string,
email TYPE string,
name TYPE string,
END OF subgit_commit_committer.
TYPES: BEGIN OF subgit_commit_author,
date TYPE string,
email TYPE string,
name TYPE string,
END OF subgit_commit_author.
TYPES: BEGIN OF git_commit,
sha TYPE string,
node_id TYPE string,
url TYPE string,
author TYPE subgit_commit_author,
committer TYPE subgit_commit_committer,
message TYPE string,
tree TYPE subgit_commit_tree,
parents TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
verification TYPE subgit_commit_verification,
html_url TYPE string,
END OF git_commit.
* Component schema: git-ref, object
TYPES: BEGIN OF subgit_ref_object,
type TYPE string,
sha TYPE string,
url TYPE string,
END OF subgit_ref_object.
TYPES: BEGIN OF git_ref,
ref TYPE string,
node_id TYPE string,
url TYPE string,
object TYPE subgit_ref_object,
END OF git_ref.
* Component schema: git-tag, object
TYPES: BEGIN OF subgit_tag_object,
sha TYPE string,
type TYPE string,
url TYPE string,
END OF subgit_tag_object.
TYPES: BEGIN OF subgit_tag_tagger,
date TYPE string,
email TYPE string,
name TYPE string,
END OF subgit_tag_tagger.
TYPES: BEGIN OF git_tag,
node_id TYPE string,
tag TYPE string,
sha TYPE string,
url TYPE string,
message TYPE string,
tagger TYPE subgit_tag_tagger,
object TYPE subgit_tag_object,
verification TYPE verification,
END OF git_tag.
* Component schema: git-tree, object
TYPES: BEGIN OF git_tree,
sha TYPE string,
url TYPE string,
truncated TYPE abap_bool,
tree TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF git_tree.
* Component schema: hook-response, object
TYPES: BEGIN OF hook_response,
code TYPE i,
status TYPE string,
message TYPE string,
END OF hook_response.
* Component schema: hook, object
TYPES: BEGIN OF subhook_config,
email TYPE string,
password TYPE string,
room TYPE string,
subdomain TYPE string,
url TYPE webhook_config_url,
insecure_ssl TYPE webhook_config_insecure_ssl,
content_type TYPE webhook_config_content_type,
digest TYPE string,
secret TYPE webhook_config_secret,
token TYPE string,
END OF subhook_config.
TYPES: BEGIN OF hook,
type TYPE string,
id TYPE i,
name TYPE string,
active TYPE abap_bool,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
config TYPE subhook_config,
updated_at TYPE string,
created_at TYPE string,
url TYPE string,
test_url TYPE string,
ping_url TYPE string,
deliveries_url TYPE string,
last_response TYPE hook_response,
END OF hook.
* Component schema: import, object
TYPES: BEGIN OF import,
vcs TYPE string,
use_lfs TYPE abap_bool,
vcs_url TYPE string,
svc_root TYPE string,
tfvc_project TYPE string,
status TYPE string,
status_text TYPE string,
failed_step TYPE string,
error_message TYPE string,
import_percent TYPE i,
commit_count TYPE i,
push_percent TYPE i,
has_large_files TYPE abap_bool,
large_files_size TYPE i,
large_files_count TYPE i,
project_choices TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
message TYPE string,
authors_count TYPE i,
url TYPE string,
html_url TYPE string,
authors_url TYPE string,
repository_url TYPE string,
svn_root TYPE string,
END OF import.
* Component schema: porter-author, object
TYPES: BEGIN OF porter_author,
id TYPE i,
remote_id TYPE string,
remote_name TYPE string,
email TYPE string,
name TYPE string,
url TYPE string,
import_url TYPE string,
END OF porter_author.
* Component schema: porter-large-file, object
TYPES: BEGIN OF porter_large_file,
ref_name TYPE string,
path TYPE string,
oid TYPE string,
size TYPE i,
END OF porter_large_file.
* Component schema: nullable-issue, object
TYPES: BEGIN OF subnullable_issue_pull_request,
merged_at TYPE string,
diff_url TYPE string,
html_url TYPE string,
patch_url TYPE string,
url TYPE string,
END OF subnullable_issue_pull_request.
TYPES: BEGIN OF nullable_issue,
id TYPE i,
node_id TYPE string,
url TYPE string,
repository_url TYPE string,
labels_url TYPE string,
comments_url TYPE string,
events_url TYPE string,
html_url TYPE string,
number TYPE i,
state TYPE string,
title TYPE string,
body TYPE string,
user TYPE nullable_simple_user,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
assignee TYPE nullable_simple_user,
assignees TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
milestone TYPE nullable_milestone,
locked TYPE abap_bool,
active_lock_reason TYPE string,
comments TYPE i,
pull_request TYPE subnullable_issue_pull_request,
closed_at TYPE string,
created_at TYPE string,
updated_at TYPE string,
draft TYPE abap_bool,
closed_by TYPE nullable_simple_user,
body_html TYPE string,
body_text TYPE string,
timeline_url TYPE string,
repository TYPE repository,
performed_via_github_app TYPE nullable_integration,
author_association TYPE author_association,
reactions TYPE reaction_rollup,
END OF nullable_issue.
* Component schema: issue-event-label, object
TYPES: BEGIN OF issue_event_label,
name TYPE string,
color TYPE string,
END OF issue_event_label.
* Component schema: issue-event-dismissed-review, object
TYPES: BEGIN OF issue_event_dismissed_review,
state TYPE string,
review_id TYPE i,
dismissal_message TYPE string,
dismissal_commit_id TYPE string,
END OF issue_event_dismissed_review.
* Component schema: issue-event-milestone, object
TYPES: BEGIN OF issue_event_milestone,
title TYPE string,
END OF issue_event_milestone.
* Component schema: issue-event-project-card, object
TYPES: BEGIN OF issue_event_project_card,
url TYPE string,
id TYPE i,
project_url TYPE string,
project_id TYPE i,
column_name TYPE string,
previous_column_name TYPE string,
END OF issue_event_project_card.
* Component schema: issue-event-rename, object
TYPES: BEGIN OF issue_event_rename,
from TYPE string,
to TYPE string,
END OF issue_event_rename.
* Component schema: issue-event, object
TYPES: BEGIN OF issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE nullable_simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
issue TYPE nullable_issue,
label TYPE issue_event_label,
assignee TYPE nullable_simple_user,
assigner TYPE nullable_simple_user,
review_requester TYPE nullable_simple_user,
requested_reviewer TYPE nullable_simple_user,
requested_team TYPE team,
dismissed_review TYPE issue_event_dismissed_review,
milestone TYPE issue_event_milestone,
project_card TYPE issue_event_project_card,
rename TYPE issue_event_rename,
author_association TYPE author_association,
lock_reason TYPE string,
performed_via_github_app TYPE nullable_integration,
END OF issue_event.
* Component schema: labeled-issue-event, object
TYPES: BEGIN OF sublabeled_issue_event_label,
name TYPE string,
color TYPE string,
END OF sublabeled_issue_event_label.
TYPES: BEGIN OF labeled_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
label TYPE sublabeled_issue_event_label,
END OF labeled_issue_event.
* Component schema: unlabeled-issue-event, object
TYPES: BEGIN OF subunlabeled_issue_event_label,
name TYPE string,
color TYPE string,
END OF subunlabeled_issue_event_label.
TYPES: BEGIN OF unlabeled_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
label TYPE subunlabeled_issue_event_label,
END OF unlabeled_issue_event.
* Component schema: assigned-issue-event, object
TYPES: BEGIN OF assigned_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE integration,
assignee TYPE simple_user,
assigner TYPE simple_user,
END OF assigned_issue_event.
* Component schema: unassigned-issue-event, object
TYPES: BEGIN OF unassigned_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
assignee TYPE simple_user,
assigner TYPE simple_user,
END OF unassigned_issue_event.
* Component schema: milestoned-issue-event, object
TYPES: BEGIN OF submilestoned_issue_event_mile,
title TYPE string,
END OF submilestoned_issue_event_mile.
TYPES: BEGIN OF milestoned_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
milestone TYPE submilestoned_issue_event_mile,
END OF milestoned_issue_event.
* Component schema: demilestoned-issue-event, object
TYPES: BEGIN OF subdemilestoned_issue_event_mi,
title TYPE string,
END OF subdemilestoned_issue_event_mi.
TYPES: BEGIN OF demilestoned_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
milestone TYPE subdemilestoned_issue_event_mi,
END OF demilestoned_issue_event.
* Component schema: renamed-issue-event, object
TYPES: BEGIN OF subrenamed_issue_event_rename,
from TYPE string,
to TYPE string,
END OF subrenamed_issue_event_rename.
TYPES: BEGIN OF renamed_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
rename TYPE subrenamed_issue_event_rename,
END OF renamed_issue_event.
* Component schema: review-requested-issue-event, object
TYPES: BEGIN OF review_requested_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
review_requester TYPE simple_user,
requested_team TYPE team,
requested_reviewer TYPE simple_user,
END OF review_requested_issue_event.
* Component schema: review-request-removed-issue-event, object
TYPES: BEGIN OF review_request_removed_issue_e,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
review_requester TYPE simple_user,
requested_team TYPE team,
requested_reviewer TYPE simple_user,
END OF review_request_removed_issue_e.
* Component schema: review-dismissed-issue-event, object
TYPES: BEGIN OF subreview_dismissed_issue_even,
state TYPE string,
review_id TYPE i,
dismissal_message TYPE string,
dismissal_commit_id TYPE string,
END OF subreview_dismissed_issue_even.
TYPES: BEGIN OF review_dismissed_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
dismissed_review TYPE subreview_dismissed_issue_even,
END OF review_dismissed_issue_event.
* Component schema: locked-issue-event, object
TYPES: BEGIN OF locked_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
lock_reason TYPE string,
END OF locked_issue_event.
* Component schema: added-to-project-issue-event, object
TYPES: BEGIN OF subadded_to_project_issue_even,
id TYPE i,
url TYPE string,
project_id TYPE i,
project_url TYPE string,
column_name TYPE string,
previous_column_name TYPE string,
END OF subadded_to_project_issue_even.
TYPES: BEGIN OF added_to_project_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
project_card TYPE subadded_to_project_issue_even,
END OF added_to_project_issue_event.
* Component schema: moved-column-in-project-issue-event, object
TYPES: BEGIN OF submoved_column_in_project_iss,
id TYPE i,
url TYPE string,
project_id TYPE i,
project_url TYPE string,
column_name TYPE string,
previous_column_name TYPE string,
END OF submoved_column_in_project_iss.
TYPES: BEGIN OF moved_column_in_project_issue_,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
project_card TYPE submoved_column_in_project_iss,
END OF moved_column_in_project_issue_.
* Component schema: removed-from-project-issue-event, object
TYPES: BEGIN OF subremoved_from_project_issue_,
id TYPE i,
url TYPE string,
project_id TYPE i,
project_url TYPE string,
column_name TYPE string,
previous_column_name TYPE string,
END OF subremoved_from_project_issue_.
TYPES: BEGIN OF removed_from_project_issue_eve,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
project_card TYPE subremoved_from_project_issue_,
END OF removed_from_project_issue_eve.
* Component schema: converted-note-to-issue-issue-event, object
TYPES: BEGIN OF subconverted_note_to_issue_iss,
id TYPE i,
url TYPE string,
project_id TYPE i,
project_url TYPE string,
column_name TYPE string,
previous_column_name TYPE string,
END OF subconverted_note_to_issue_iss.
TYPES: BEGIN OF converted_note_to_issue_issue_,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE integration,
project_card TYPE subconverted_note_to_issue_iss,
END OF converted_note_to_issue_issue_.
* Component schema: issue-event-for-issue, string
TYPES issue_event_for_issue TYPE string.
* Component schema: label, object
TYPES: BEGIN OF label,
id TYPE i,
node_id TYPE string,
url TYPE string,
name TYPE string,
description TYPE string,
color TYPE string,
default TYPE abap_bool,
END OF label.
* Component schema: timeline-comment-event, object
TYPES: BEGIN OF timeline_comment_event,
event TYPE string,
actor TYPE simple_user,
id TYPE i,
node_id TYPE string,
url TYPE string,
body TYPE string,
body_text TYPE string,
body_html TYPE string,
html_url TYPE string,
user TYPE simple_user,
created_at TYPE string,
updated_at TYPE string,
issue_url TYPE string,
author_association TYPE author_association,
performed_via_github_app TYPE nullable_integration,
reactions TYPE reaction_rollup,
END OF timeline_comment_event.
* Component schema: timeline-cross-referenced-event, object
TYPES: BEGIN OF subtimeline_cross_referenced_e,
type TYPE string,
issue TYPE issue,
END OF subtimeline_cross_referenced_e.
TYPES: BEGIN OF timeline_cross_referenced_even,
event TYPE string,
actor TYPE simple_user,
created_at TYPE string,
updated_at TYPE string,
source TYPE subtimeline_cross_referenced_e,
END OF timeline_cross_referenced_even.
* Component schema: timeline-committed-event, object
TYPES: BEGIN OF subtimeline_committed_event_ve,
verified TYPE abap_bool,
reason TYPE string,
signature TYPE string,
payload TYPE string,
END OF subtimeline_committed_event_ve.
TYPES: BEGIN OF subtimeline_committed_event_tr,
sha TYPE string,
url TYPE string,
END OF subtimeline_committed_event_tr.
TYPES: BEGIN OF subtimeline_committed_event_co,
date TYPE string,
email TYPE string,
name TYPE string,
END OF subtimeline_committed_event_co.
TYPES: BEGIN OF subtimeline_committed_event_au,
date TYPE string,
email TYPE string,
name TYPE string,
END OF subtimeline_committed_event_au.
TYPES: BEGIN OF timeline_committed_event,
event TYPE string,
sha TYPE string,
node_id TYPE string,
url TYPE string,
author TYPE subtimeline_committed_event_au,
committer TYPE subtimeline_committed_event_co,
message TYPE string,
tree TYPE subtimeline_committed_event_tr,
parents TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
verification TYPE subtimeline_committed_event_ve,
html_url TYPE string,
END OF timeline_committed_event.
* Component schema: timeline-reviewed-event, object
TYPES: BEGIN OF subsubtimeline_reviewed_even01,
href TYPE string,
END OF subsubtimeline_reviewed_even01.
TYPES: BEGIN OF subsubtimeline_reviewed_event_,
href TYPE string,
END OF subsubtimeline_reviewed_event_.
TYPES: BEGIN OF subtimeline_reviewed_event__li,
html TYPE subsubtimeline_reviewed_event_,
pull_request TYPE subsubtimeline_reviewed_even01,
END OF subtimeline_reviewed_event__li.
TYPES: BEGIN OF timeline_reviewed_event,
event TYPE string,
id TYPE i,
node_id TYPE string,
user TYPE simple_user,
body TYPE string,
state TYPE string,
html_url TYPE string,
pull_request_url TYPE string,
_links TYPE subtimeline_reviewed_event__li,
submitted_at TYPE string,
commit_id TYPE string,
body_html TYPE string,
body_text TYPE string,
author_association TYPE author_association,
END OF timeline_reviewed_event.
* Component schema: pull-request-review-comment, object
TYPES: BEGIN OF subsubpull_request_review_co02,
href TYPE string,
END OF subsubpull_request_review_co02.
TYPES: BEGIN OF subsubpull_request_review_co01,
href TYPE string,
END OF subsubpull_request_review_co01.
TYPES: BEGIN OF subsubpull_request_review_comm,
href TYPE string,
END OF subsubpull_request_review_comm.
TYPES: BEGIN OF subpull_request_review_comment,
self TYPE subsubpull_request_review_comm,
html TYPE subsubpull_request_review_co01,
pull_request TYPE subsubpull_request_review_co02,
END OF subpull_request_review_comment.
TYPES: BEGIN OF pull_request_review_comment,
url TYPE string,
pull_request_review_id TYPE i,
id TYPE i,
node_id TYPE string,
diff_hunk TYPE string,
path TYPE string,
position TYPE i,
original_position TYPE i,
commit_id TYPE string,
original_commit_id TYPE string,
in_reply_to_id TYPE i,
user TYPE simple_user,
body TYPE string,
created_at TYPE string,
updated_at TYPE string,
html_url TYPE string,
pull_request_url TYPE string,
author_association TYPE author_association,
_links TYPE subpull_request_review_comment,
start_line TYPE i,
original_start_line TYPE i,
start_side TYPE string,
line TYPE i,
original_line TYPE i,
side TYPE string,
reactions TYPE reaction_rollup,
body_html TYPE string,
body_text TYPE string,
END OF pull_request_review_comment.
* Component schema: timeline-line-commented-event, object
TYPES: BEGIN OF timeline_line_commented_event,
event TYPE string,
node_id TYPE string,
comments TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF timeline_line_commented_event.
* Component schema: timeline-commit-commented-event, object
TYPES: BEGIN OF timeline_commit_commented_even,
event TYPE string,
node_id TYPE string,
commit_id TYPE string,
comments TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF timeline_commit_commented_even.
* Component schema: timeline-assigned-issue-event, object
TYPES: BEGIN OF timeline_assigned_issue_event,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
assignee TYPE simple_user,
END OF timeline_assigned_issue_event.
* Component schema: timeline-unassigned-issue-event, object
TYPES: BEGIN OF timeline_unassigned_issue_even,
id TYPE i,
node_id TYPE string,
url TYPE string,
actor TYPE simple_user,
event TYPE string,
commit_id TYPE string,
commit_url TYPE string,
created_at TYPE string,
performed_via_github_app TYPE nullable_integration,
assignee TYPE simple_user,
END OF timeline_unassigned_issue_even.
* Component schema: timeline-issue-events, object
TYPES: BEGIN OF timeline_issue_events,
dummy_workaround TYPE i,
END OF timeline_issue_events.
* Component schema: deploy-key, object
TYPES: BEGIN OF deploy_key,
id TYPE i,
key TYPE string,
url TYPE string,
title TYPE string,
verified TYPE abap_bool,
created_at TYPE string,
read_only TYPE abap_bool,
END OF deploy_key.
* Component schema: language, object
TYPES: BEGIN OF language,
dummy_workaround TYPE i,
END OF language.
* Component schema: license-content, object
TYPES: BEGIN OF sublicense_content__links,
git TYPE string,
html TYPE string,
self TYPE string,
END OF sublicense_content__links.
TYPES: BEGIN OF license_content,
name TYPE string,
path TYPE string,
sha TYPE string,
size TYPE i,
url TYPE string,
html_url TYPE string,
git_url TYPE string,
download_url TYPE string,
type TYPE string,
content TYPE string,
encoding TYPE string,
_links TYPE sublicense_content__links,
license TYPE nullable_license_simple,
END OF license_content.
* Component schema: merged-upstream, object
TYPES: BEGIN OF merged_upstream,
message TYPE string,
merge_type TYPE string,
base_branch TYPE string,
END OF merged_upstream.
* Component schema: milestone, object
TYPES: BEGIN OF milestone,
url TYPE string,
html_url TYPE string,
labels_url TYPE string,
id TYPE i,
node_id TYPE string,
number TYPE i,
state TYPE string,
title TYPE string,
description TYPE string,
creator TYPE nullable_simple_user,
open_issues TYPE i,
closed_issues TYPE i,
created_at TYPE string,
updated_at TYPE string,
closed_at TYPE string,
due_on TYPE string,
END OF milestone.
* Component schema: pages-source-hash, object
TYPES: BEGIN OF pages_source_hash,
branch TYPE string,
path TYPE string,
END OF pages_source_hash.
* Component schema: pages-https-certificate, object
TYPES: BEGIN OF pages_https_certificate,
state TYPE string,
description TYPE string,
domains TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
expires_at TYPE string,
END OF pages_https_certificate.
* Component schema: page, object
TYPES: BEGIN OF page,
url TYPE string,
status TYPE string,
cname TYPE string,
protected_domain_state TYPE string,
pending_domain_unverified_at TYPE string,
custom_404 TYPE abap_bool,
html_url TYPE string,
source TYPE pages_source_hash,
public TYPE abap_bool,
https_certificate TYPE pages_https_certificate,
https_enforced TYPE abap_bool,
END OF page.
* Component schema: page-build, object
TYPES: BEGIN OF subpage_build_error,
message TYPE string,
END OF subpage_build_error.
TYPES: BEGIN OF page_build,
url TYPE string,
status TYPE string,
error TYPE subpage_build_error,
pusher TYPE nullable_simple_user,
commit TYPE string,
duration TYPE i,
created_at TYPE string,
updated_at TYPE string,
END OF page_build.
* Component schema: page-build-status, object
TYPES: BEGIN OF page_build_status,
url TYPE string,
status TYPE string,
END OF page_build_status.
* Component schema: pages-health-check, object
TYPES: BEGIN OF subpages_health_check_alt_doma,
host TYPE string,
uri TYPE string,
nameservers TYPE string,
dns_resolves TYPE abap_bool,
is_proxied TYPE abap_bool,
is_cloudflare_ip TYPE abap_bool,
is_fastly_ip TYPE abap_bool,
is_old_ip_address TYPE abap_bool,
is_a_record TYPE abap_bool,
has_cname_record TYPE abap_bool,
has_mx_records_present TYPE abap_bool,
is_valid_domain TYPE abap_bool,
is_apex_domain TYPE abap_bool,
should_be_a_record TYPE abap_bool,
is_cname_to_github_user_domain TYPE abap_bool,
is_cname_to_pages_dot_github_d TYPE abap_bool,
is_cname_to_fastly TYPE abap_bool,
is_pointed_to_github_pages_ip TYPE abap_bool,
is_non_github_pages_ip_present TYPE abap_bool,
is_pages_domain TYPE abap_bool,
is_served_by_pages TYPE abap_bool,
is_valid TYPE abap_bool,
reason TYPE string,
responds_to_https TYPE abap_bool,
enforces_https TYPE abap_bool,
https_error TYPE string,
is_https_eligible TYPE abap_bool,
caa_error TYPE string,
END OF subpages_health_check_alt_doma.
TYPES: BEGIN OF subpages_health_check_domain,
host TYPE string,
uri TYPE string,
nameservers TYPE string,
dns_resolves TYPE abap_bool,
is_proxied TYPE abap_bool,
is_cloudflare_ip TYPE abap_bool,
is_fastly_ip TYPE abap_bool,
is_old_ip_address TYPE abap_bool,
is_a_record TYPE abap_bool,
has_cname_record TYPE abap_bool,
has_mx_records_present TYPE abap_bool,
is_valid_domain TYPE abap_bool,
is_apex_domain TYPE abap_bool,
should_be_a_record TYPE abap_bool,
is_cname_to_github_user_domain TYPE abap_bool,
is_cname_to_pages_dot_github_d TYPE abap_bool,
is_cname_to_fastly TYPE abap_bool,
is_pointed_to_github_pages_ip TYPE abap_bool,
is_non_github_pages_ip_present TYPE abap_bool,
is_pages_domain TYPE abap_bool,
is_served_by_pages TYPE abap_bool,
is_valid TYPE abap_bool,
reason TYPE string,
responds_to_https TYPE abap_bool,
enforces_https TYPE abap_bool,
https_error TYPE string,
is_https_eligible TYPE abap_bool,
caa_error TYPE string,
END OF subpages_health_check_domain.
TYPES: BEGIN OF pages_health_check,
domain TYPE subpages_health_check_domain,
alt_domain TYPE subpages_health_check_alt_doma,
END OF pages_health_check.
* Component schema: team-simple, object
TYPES: BEGIN OF team_simple,
id TYPE i,
node_id TYPE string,
url TYPE string,
members_url TYPE string,
name TYPE string,
description TYPE string,
permission TYPE string,
privacy TYPE string,
html_url TYPE string,
repositories_url TYPE string,
slug TYPE string,
ldap_dn TYPE string,
END OF team_simple.
* Component schema: pull-request, object
TYPES: BEGIN OF subpull_request__links,
comments TYPE link,
commits TYPE link,
statuses TYPE link,
html TYPE link,
issue TYPE link,
review_comments TYPE link,
review_comment TYPE link,
self TYPE link,
END OF subpull_request__links.
TYPES: BEGIN OF subsubpull_request_base_user,
avatar_url TYPE string,
events_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
gravatar_id TYPE string,
html_url TYPE string,
id TYPE i,
node_id TYPE string,
login TYPE string,
organizations_url TYPE string,
received_events_url TYPE string,
repos_url TYPE string,
site_admin TYPE abap_bool,
starred_url TYPE string,
subscriptions_url TYPE string,
type TYPE string,
url TYPE string,
END OF subsubpull_request_base_user.
TYPES: BEGIN OF subsubsubpull_request_base_r01,
admin TYPE abap_bool,
maintain TYPE abap_bool,
push TYPE abap_bool,
triage TYPE abap_bool,
pull TYPE abap_bool,
END OF subsubsubpull_request_base_r01.
TYPES: BEGIN OF subsubsubpull_request_base_rep,
avatar_url TYPE string,
events_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
gravatar_id TYPE string,
html_url TYPE string,
id TYPE i,
node_id TYPE string,
login TYPE string,
organizations_url TYPE string,
received_events_url TYPE string,
repos_url TYPE string,
site_admin TYPE abap_bool,
starred_url TYPE string,
subscriptions_url TYPE string,
type TYPE string,
url TYPE string,
END OF subsubsubpull_request_base_rep.
TYPES: BEGIN OF subsubpull_request_base_repo,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
description TYPE string,
downloads_url TYPE string,
events_url TYPE string,
fork TYPE abap_bool,
forks_url TYPE string,
full_name TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
hooks_url TYPE string,
html_url TYPE string,
id TYPE i,
is_template TYPE abap_bool,
node_id TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
name TYPE string,
notifications_url TYPE string,
owner TYPE subsubsubpull_request_base_rep,
private TYPE abap_bool,
pulls_url TYPE string,
releases_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
url TYPE string,
clone_url TYPE string,
default_branch TYPE string,
forks TYPE i,
forks_count TYPE i,
git_url TYPE string,
has_downloads TYPE abap_bool,
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
homepage TYPE string,
language TYPE string,
master_branch TYPE string,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
mirror_url TYPE string,
open_issues TYPE i,
open_issues_count TYPE i,
permissions TYPE subsubsubpull_request_base_r01,
temp_clone_token TYPE string,
allow_merge_commit TYPE abap_bool,
allow_squash_merge TYPE abap_bool,
allow_rebase_merge TYPE abap_bool,
license TYPE nullable_license_simple,
pushed_at TYPE string,
size TYPE i,
ssh_url TYPE string,
stargazers_count TYPE i,
svn_url TYPE string,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
watchers TYPE i,
watchers_count TYPE i,
created_at TYPE string,
updated_at TYPE string,
allow_forking TYPE abap_bool,
END OF subsubpull_request_base_repo.
TYPES: BEGIN OF subpull_request_base,
label TYPE string,
ref TYPE string,
repo TYPE subsubpull_request_base_repo,
sha TYPE string,
user TYPE subsubpull_request_base_user,
END OF subpull_request_base.
TYPES: BEGIN OF subsubpull_request_head_user,
avatar_url TYPE string,
events_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
gravatar_id TYPE string,
html_url TYPE string,
id TYPE i,
node_id TYPE string,
login TYPE string,
organizations_url TYPE string,
received_events_url TYPE string,
repos_url TYPE string,
site_admin TYPE abap_bool,
starred_url TYPE string,
subscriptions_url TYPE string,
type TYPE string,
url TYPE string,
END OF subsubpull_request_head_user.
TYPES: BEGIN OF subsubsubpull_request_head_r02,
key TYPE string,
name TYPE string,
url TYPE string,
spdx_id TYPE string,
node_id TYPE string,
END OF subsubsubpull_request_head_r02.
TYPES: BEGIN OF subsubsubpull_request_head_r01,
admin TYPE abap_bool,
maintain TYPE abap_bool,
push TYPE abap_bool,
triage TYPE abap_bool,
pull TYPE abap_bool,
END OF subsubsubpull_request_head_r01.
TYPES: BEGIN OF subsubsubpull_request_head_rep,
avatar_url TYPE string,
events_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
gravatar_id TYPE string,
html_url TYPE string,
id TYPE i,
node_id TYPE string,
login TYPE string,
organizations_url TYPE string,
received_events_url TYPE string,
repos_url TYPE string,
site_admin TYPE abap_bool,
starred_url TYPE string,
subscriptions_url TYPE string,
type TYPE string,
url TYPE string,
END OF subsubsubpull_request_head_rep.
TYPES: BEGIN OF subsubpull_request_head_repo,
archive_url TYPE string,
assignees_url TYPE string,
blobs_url TYPE string,
branches_url TYPE string,
collaborators_url TYPE string,
comments_url TYPE string,
commits_url TYPE string,
compare_url TYPE string,
contents_url TYPE string,
contributors_url TYPE string,
deployments_url TYPE string,
description TYPE string,
downloads_url TYPE string,
events_url TYPE string,
fork TYPE abap_bool,
forks_url TYPE string,
full_name TYPE string,
git_commits_url TYPE string,
git_refs_url TYPE string,
git_tags_url TYPE string,
hooks_url TYPE string,
html_url TYPE string,
id TYPE i,
node_id TYPE string,
issue_comment_url TYPE string,
issue_events_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
labels_url TYPE string,
languages_url TYPE string,
merges_url TYPE string,
milestones_url TYPE string,
name TYPE string,
notifications_url TYPE string,
owner TYPE subsubsubpull_request_head_rep,
private TYPE abap_bool,
pulls_url TYPE string,
releases_url TYPE string,
stargazers_url TYPE string,
statuses_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
tags_url TYPE string,
teams_url TYPE string,
trees_url TYPE string,
url TYPE string,
clone_url TYPE string,
default_branch TYPE string,
forks TYPE i,
forks_count TYPE i,
git_url TYPE string,
has_downloads TYPE abap_bool,
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
has_pages TYPE abap_bool,
homepage TYPE string,
language TYPE string,
master_branch TYPE string,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
mirror_url TYPE string,
open_issues TYPE i,
open_issues_count TYPE i,
permissions TYPE subsubsubpull_request_head_r01,
temp_clone_token TYPE string,
allow_merge_commit TYPE abap_bool,
allow_squash_merge TYPE abap_bool,
allow_rebase_merge TYPE abap_bool,
license TYPE subsubsubpull_request_head_r02,
pushed_at TYPE string,
size TYPE i,
ssh_url TYPE string,
stargazers_count TYPE i,
svn_url TYPE string,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
watchers TYPE i,
watchers_count TYPE i,
created_at TYPE string,
updated_at TYPE string,
allow_forking TYPE abap_bool,
is_template TYPE abap_bool,
END OF subsubpull_request_head_repo.
TYPES: BEGIN OF subpull_request_head,
label TYPE string,
ref TYPE string,
repo TYPE subsubpull_request_head_repo,
sha TYPE string,
user TYPE subsubpull_request_head_user,
END OF subpull_request_head.
TYPES: BEGIN OF pull_request,
url TYPE string,
id TYPE i,
node_id TYPE string,
html_url TYPE string,
diff_url TYPE string,
patch_url TYPE string,
issue_url TYPE string,
commits_url TYPE string,
review_comments_url TYPE string,
review_comment_url TYPE string,
comments_url TYPE string,
statuses_url TYPE string,
number TYPE i,
state TYPE string,
locked TYPE abap_bool,
title TYPE string,
user TYPE nullable_simple_user,
body TYPE string,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
milestone TYPE nullable_milestone,
active_lock_reason TYPE string,
created_at TYPE string,
updated_at TYPE string,
closed_at TYPE string,
merged_at TYPE string,
merge_commit_sha TYPE string,
assignee TYPE nullable_simple_user,
assignees TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
requested_reviewers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
requested_teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
head TYPE subpull_request_head,
base TYPE subpull_request_base,
_links TYPE subpull_request__links,
author_association TYPE author_association,
auto_merge TYPE auto_merge,
draft TYPE abap_bool,
merged TYPE abap_bool,
mergeable TYPE abap_bool,
rebaseable TYPE abap_bool,
mergeable_state TYPE string,
merged_by TYPE nullable_simple_user,
comments TYPE i,
review_comments TYPE i,
maintainer_can_modify TYPE abap_bool,
commits TYPE i,
additions TYPE i,
deletions TYPE i,
changed_files TYPE i,
END OF pull_request.
* Component schema: pull-request-merge-result, object
TYPES: BEGIN OF pull_request_merge_result,
sha TYPE string,
merged TYPE abap_bool,
message TYPE string,
END OF pull_request_merge_result.
* Component schema: pull-request-review-request, object
TYPES: BEGIN OF pull_request_review_request,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF pull_request_review_request.
* Component schema: pull-request-review, object
TYPES: BEGIN OF subsubpull_request_review__l01,
href TYPE string,
END OF subsubpull_request_review__l01.
TYPES: BEGIN OF subsubpull_request_review__lin,
href TYPE string,
END OF subsubpull_request_review__lin.
TYPES: BEGIN OF subpull_request_review__links,
html TYPE subsubpull_request_review__lin,
pull_request TYPE subsubpull_request_review__l01,
END OF subpull_request_review__links.
TYPES: BEGIN OF pull_request_review,
id TYPE i,
node_id TYPE string,
user TYPE nullable_simple_user,
body TYPE string,
state TYPE string,
html_url TYPE string,
pull_request_url TYPE string,
_links TYPE subpull_request_review__links,
submitted_at TYPE string,
commit_id TYPE string,
body_html TYPE string,
body_text TYPE string,
author_association TYPE author_association,
END OF pull_request_review.
* Component schema: review-comment, object
TYPES: BEGIN OF subreview_comment__links,
self TYPE link,
html TYPE link,
pull_request TYPE link,
END OF subreview_comment__links.
TYPES: BEGIN OF review_comment,
url TYPE string,
pull_request_review_id TYPE i,
id TYPE i,
node_id TYPE string,
diff_hunk TYPE string,
path TYPE string,
position TYPE i,
original_position TYPE i,
commit_id TYPE string,
original_commit_id TYPE string,
in_reply_to_id TYPE i,
user TYPE nullable_simple_user,
body TYPE string,
created_at TYPE string,
updated_at TYPE string,
html_url TYPE string,
pull_request_url TYPE string,
author_association TYPE author_association,
_links TYPE subreview_comment__links,
body_text TYPE string,
body_html TYPE string,
reactions TYPE reaction_rollup,
side TYPE string,
start_side TYPE string,
line TYPE i,
original_line TYPE i,
start_line TYPE i,
original_start_line TYPE i,
END OF review_comment.
* Component schema: release-asset, object
TYPES: BEGIN OF release_asset,
url TYPE string,
browser_download_url TYPE string,
id TYPE i,
node_id TYPE string,
name TYPE string,
label TYPE string,
state TYPE string,
content_type TYPE string,
size TYPE i,
download_count TYPE i,
created_at TYPE string,
updated_at TYPE string,
uploader TYPE nullable_simple_user,
END OF release_asset.
* Component schema: release, object
TYPES: BEGIN OF release,
url TYPE string,
html_url TYPE string,
assets_url TYPE string,
upload_url TYPE string,
tarball_url TYPE string,
zipball_url TYPE string,
id TYPE i,
node_id TYPE string,
tag_name TYPE string,
target_commitish TYPE string,
name TYPE string,
body TYPE string,
draft TYPE abap_bool,
prerelease TYPE abap_bool,
created_at TYPE string,
published_at TYPE string,
author TYPE simple_user,
assets TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
body_html TYPE string,
body_text TYPE string,
mentions_count TYPE i,
discussion_url TYPE string,
reactions TYPE reaction_rollup,
END OF release.
* Component schema: release-notes-content, object
TYPES: BEGIN OF release_notes_content,
name TYPE string,
body TYPE string,
END OF release_notes_content.
* Component schema: secret-scanning-alert, object
TYPES: BEGIN OF secret_scanning_alert,
number TYPE alert_number,
created_at TYPE alert_created_at,
url TYPE alert_url,
html_url TYPE alert_html_url,
locations_url TYPE string,
state TYPE secret_scanning_alert_state,
resolution TYPE secret_scanning_alert_resoluti,
resolved_at TYPE string,
resolved_by TYPE nullable_simple_user,
secret_type TYPE string,
secret TYPE string,
END OF secret_scanning_alert.
* Component schema: secret-scanning-location-commit, object
TYPES: BEGIN OF secret_scanning_location_commi,
path TYPE string,
start_line TYPE f,
end_line TYPE f,
start_column TYPE f,
end_column TYPE f,
blob_sha TYPE string,
blob_url TYPE string,
commit_sha TYPE string,
commit_url TYPE string,
END OF secret_scanning_location_commi.
* Component schema: secret-scanning-location, object
TYPES: BEGIN OF secret_scanning_location,
type TYPE string,
details TYPE string,
END OF secret_scanning_location.
* Component schema: stargazer, object
TYPES: BEGIN OF stargazer,
starred_at TYPE string,
user TYPE nullable_simple_user,
END OF stargazer.
* Component schema: code-frequency-stat, array
TYPES code_frequency_stat TYPE string. " array todo
* Component schema: commit-activity, object
TYPES: BEGIN OF commit_activity,
days TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
total TYPE i,
week TYPE i,
END OF commit_activity.
* Component schema: contributor-activity, object
TYPES: BEGIN OF contributor_activity,
author TYPE nullable_simple_user,
total TYPE i,
weeks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF contributor_activity.
* Component schema: participation-stats, object
TYPES: BEGIN OF participation_stats,
all TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
owner TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF participation_stats.
* Component schema: repository-subscription, object
TYPES: BEGIN OF repository_subscription,
subscribed TYPE abap_bool,
ignored TYPE abap_bool,
reason TYPE string,
created_at TYPE string,
url TYPE string,
repository_url TYPE string,
END OF repository_subscription.
* Component schema: tag, object
TYPES: BEGIN OF subtag_commit,
sha TYPE string,
url TYPE string,
END OF subtag_commit.
TYPES: BEGIN OF tag,
name TYPE string,
commit TYPE subtag_commit,
zipball_url TYPE string,
tarball_url TYPE string,
node_id TYPE string,
END OF tag.
* Component schema: topic, object
TYPES: BEGIN OF topic,
names TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF topic.
* Component schema: traffic, object
TYPES: BEGIN OF traffic,
timestamp TYPE string,
uniques TYPE i,
count TYPE i,
END OF traffic.
* Component schema: clone-traffic, object
TYPES: BEGIN OF clone_traffic,
count TYPE i,
uniques TYPE i,
clones TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF clone_traffic.
* Component schema: content-traffic, object
TYPES: BEGIN OF content_traffic,
path TYPE string,
title TYPE string,
count TYPE i,
uniques TYPE i,
END OF content_traffic.
* Component schema: referrer-traffic, object
TYPES: BEGIN OF referrer_traffic,
referrer TYPE string,
count TYPE i,
uniques TYPE i,
END OF referrer_traffic.
* Component schema: view-traffic, object
TYPES: BEGIN OF view_traffic,
count TYPE i,
uniques TYPE i,
views TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF view_traffic.
* Component schema: scim-group-list-enterprise, object
TYPES: BEGIN OF scim_group_list_enterprise,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
totalresults TYPE f,
itemsperpage TYPE f,
startindex TYPE f,
resources TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF scim_group_list_enterprise.
* Component schema: scim-enterprise-group, object
TYPES: BEGIN OF subscim_enterprise_group_meta,
resourcetype TYPE string,
created TYPE string,
lastmodified TYPE string,
location TYPE string,
END OF subscim_enterprise_group_meta.
TYPES: BEGIN OF scim_enterprise_group,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
id TYPE string,
externalid TYPE string,
displayname TYPE string,
members TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
meta TYPE subscim_enterprise_group_meta,
END OF scim_enterprise_group.
* Component schema: scim-user-list-enterprise, object
TYPES: BEGIN OF scim_user_list_enterprise,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
totalresults TYPE f,
itemsperpage TYPE f,
startindex TYPE f,
resources TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF scim_user_list_enterprise.
* Component schema: scim-enterprise-user, object
TYPES: BEGIN OF subscim_enterprise_user_meta,
resourcetype TYPE string,
created TYPE string,
lastmodified TYPE string,
location TYPE string,
END OF subscim_enterprise_user_meta.
TYPES: BEGIN OF subscim_enterprise_user_name,
givenname TYPE string,
familyname TYPE string,
END OF subscim_enterprise_user_name.
TYPES: BEGIN OF scim_enterprise_user,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
id TYPE string,
externalid TYPE string,
username TYPE string,
name TYPE subscim_enterprise_user_name,
emails TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
meta TYPE subscim_enterprise_user_meta,
END OF scim_enterprise_user.
* Component schema: scim-user, object
TYPES: BEGIN OF subscim_user_meta,
resourcetype TYPE string,
created TYPE string,
lastmodified TYPE string,
location TYPE string,
END OF subscim_user_meta.
TYPES: BEGIN OF subscim_user_name,
givenname TYPE string,
familyname TYPE string,
formatted TYPE string,
END OF subscim_user_name.
TYPES: BEGIN OF scim_user,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
id TYPE string,
externalid TYPE string,
username TYPE string,
displayname TYPE string,
name TYPE subscim_user_name,
emails TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
meta TYPE subscim_user_meta,
organization_id TYPE i,
operations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF scim_user.
* Component schema: scim-user-list, object
TYPES: BEGIN OF scim_user_list,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
totalresults TYPE i,
itemsperpage TYPE i,
startindex TYPE i,
resources TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF scim_user_list.
* Component schema: search-result-text-matches, array
TYPES search_result_text_matches TYPE string. " array todo
* Component schema: code-search-result-item, object
TYPES: BEGIN OF code_search_result_item,
name TYPE string,
path TYPE string,
sha TYPE string,
url TYPE string,
git_url TYPE string,
html_url TYPE string,
repository TYPE minimal_repository,
score TYPE f,
file_size TYPE i,
language TYPE string,
last_modified_at TYPE string,
line_numbers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
text_matches TYPE search_result_text_matches,
END OF code_search_result_item.
* Component schema: commit-search-result-item, object
TYPES: BEGIN OF subsubcommit_search_result_i01,
sha TYPE string,
url TYPE string,
END OF subsubcommit_search_result_i01.
TYPES: BEGIN OF subsubcommit_search_result_ite,
name TYPE string,
email TYPE string,
date TYPE string,
END OF subsubcommit_search_result_ite.
TYPES: BEGIN OF subcommit_search_result_item_c,
author TYPE subsubcommit_search_result_ite,
committer TYPE nullable_git_user,
comment_count TYPE i,
message TYPE string,
tree TYPE subsubcommit_search_result_i01,
url TYPE string,
verification TYPE verification,
END OF subcommit_search_result_item_c.
TYPES: BEGIN OF commit_search_result_item,
url TYPE string,
sha TYPE string,
html_url TYPE string,
comments_url TYPE string,
commit TYPE subcommit_search_result_item_c,
author TYPE nullable_simple_user,
committer TYPE nullable_git_user,
parents TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
repository TYPE minimal_repository,
score TYPE f,
node_id TYPE string,
text_matches TYPE search_result_text_matches,
END OF commit_search_result_item.
* Component schema: issue-search-result-item, object
TYPES: BEGIN OF subissue_search_result_item_pu,
merged_at TYPE string,
diff_url TYPE string,
html_url TYPE string,
patch_url TYPE string,
url TYPE string,
END OF subissue_search_result_item_pu.
TYPES: BEGIN OF issue_search_result_item,
url TYPE string,
repository_url TYPE string,
labels_url TYPE string,
comments_url TYPE string,
events_url TYPE string,
html_url TYPE string,
id TYPE i,
node_id TYPE string,
number TYPE i,
title TYPE string,
locked TYPE abap_bool,
active_lock_reason TYPE string,
assignees TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
user TYPE nullable_simple_user,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
state TYPE string,
assignee TYPE nullable_simple_user,
milestone TYPE nullable_milestone,
comments TYPE i,
created_at TYPE string,
updated_at TYPE string,
closed_at TYPE string,
text_matches TYPE search_result_text_matches,
pull_request TYPE subissue_search_result_item_pu,
body TYPE string,
score TYPE f,
author_association TYPE author_association,
draft TYPE abap_bool,
repository TYPE repository,
body_html TYPE string,
body_text TYPE string,
timeline_url TYPE string,
performed_via_github_app TYPE nullable_integration,
reactions TYPE reaction_rollup,
END OF issue_search_result_item.
* Component schema: label-search-result-item, object
TYPES: BEGIN OF label_search_result_item,
id TYPE i,
node_id TYPE string,
url TYPE string,
name TYPE string,
color TYPE string,
default TYPE abap_bool,
description TYPE string,
score TYPE f,
text_matches TYPE search_result_text_matches,
END OF label_search_result_item.
* Component schema: repo-search-result-item, object
TYPES: BEGIN OF subrepo_search_result_item_per,
admin TYPE abap_bool,
maintain TYPE abap_bool,
push TYPE abap_bool,
triage TYPE abap_bool,
pull TYPE abap_bool,
END OF subrepo_search_result_item_per.
TYPES: BEGIN OF repo_search_result_item,
id TYPE i,
node_id TYPE string,
name TYPE string,
full_name TYPE string,
owner TYPE nullable_simple_user,
private TYPE abap_bool,
html_url TYPE string,
description TYPE string,
fork TYPE abap_bool,
url TYPE string,
created_at TYPE string,
updated_at TYPE string,
pushed_at TYPE string,
homepage TYPE string,
size TYPE i,
stargazers_count TYPE i,
watchers_count TYPE i,
language TYPE string,
forks_count TYPE i,
open_issues_count TYPE i,
master_branch TYPE string,
default_branch TYPE string,
score TYPE f,
forks_url TYPE string,
keys_url TYPE string,
collaborators_url TYPE string,
teams_url TYPE string,
hooks_url TYPE string,
issue_events_url TYPE string,
events_url TYPE string,
assignees_url TYPE string,
branches_url TYPE string,
tags_url TYPE string,
blobs_url TYPE string,
git_tags_url TYPE string,
git_refs_url TYPE string,
trees_url TYPE string,
statuses_url TYPE string,
languages_url TYPE string,
stargazers_url TYPE string,
contributors_url TYPE string,
subscribers_url TYPE string,
subscription_url TYPE string,
commits_url TYPE string,
git_commits_url TYPE string,
comments_url TYPE string,
issue_comment_url TYPE string,
contents_url TYPE string,
compare_url TYPE string,
merges_url TYPE string,
archive_url TYPE string,
downloads_url TYPE string,
issues_url TYPE string,
pulls_url TYPE string,
milestones_url TYPE string,
notifications_url TYPE string,
labels_url TYPE string,
releases_url TYPE string,
deployments_url TYPE string,
git_url TYPE string,
ssh_url TYPE string,
clone_url TYPE string,
svn_url TYPE string,
forks TYPE i,
open_issues TYPE i,
watchers TYPE i,
topics TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
mirror_url TYPE string,
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_pages TYPE abap_bool,
has_wiki TYPE abap_bool,
has_downloads TYPE abap_bool,
archived TYPE abap_bool,
disabled TYPE abap_bool,
visibility TYPE string,
license TYPE nullable_license_simple,
permissions TYPE subrepo_search_result_item_per,
text_matches TYPE search_result_text_matches,
temp_clone_token TYPE string,
allow_merge_commit TYPE abap_bool,
allow_squash_merge TYPE abap_bool,
allow_rebase_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
allow_forking TYPE abap_bool,
is_template TYPE abap_bool,
END OF repo_search_result_item.
* Component schema: topic-search-result-item, object
TYPES: BEGIN OF topic_search_result_item,
name TYPE string,
display_name TYPE string,
short_description TYPE string,
description TYPE string,
created_by TYPE string,
released TYPE string,
created_at TYPE string,
updated_at TYPE string,
featured TYPE abap_bool,
curated TYPE abap_bool,
score TYPE f,
repository_count TYPE i,
logo_url TYPE string,
text_matches TYPE search_result_text_matches,
related TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
aliases TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF topic_search_result_item.
* Component schema: user-search-result-item, object
TYPES: BEGIN OF user_search_result_item,
login TYPE string,
id TYPE i,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
received_events_url TYPE string,
type TYPE string,
score TYPE f,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
events_url TYPE string,
public_repos TYPE i,
public_gists TYPE i,
followers TYPE i,
following TYPE i,
created_at TYPE string,
updated_at TYPE string,
name TYPE string,
bio TYPE string,
email TYPE string,
location TYPE string,
site_admin TYPE abap_bool,
hireable TYPE abap_bool,
text_matches TYPE search_result_text_matches,
blog TYPE string,
company TYPE string,
suspended_at TYPE string,
END OF user_search_result_item.
* Component schema: private-user, object
TYPES: BEGIN OF subprivate_user_plan,
collaborators TYPE i,
name TYPE string,
space TYPE i,
private_repos TYPE i,
END OF subprivate_user_plan.
TYPES: BEGIN OF private_user,
login TYPE string,
id TYPE i,
node_id TYPE string,
avatar_url TYPE string,
gravatar_id TYPE string,
url TYPE string,
html_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
starred_url TYPE string,
subscriptions_url TYPE string,
organizations_url TYPE string,
repos_url TYPE string,
events_url TYPE string,
received_events_url TYPE string,
type TYPE string,
site_admin TYPE abap_bool,
name TYPE string,
company TYPE string,
blog TYPE string,
location TYPE string,
email TYPE string,
hireable TYPE abap_bool,
bio TYPE string,
twitter_username TYPE string,
public_repos TYPE i,
public_gists TYPE i,
followers TYPE i,
following TYPE i,
created_at TYPE string,
updated_at TYPE string,
private_gists TYPE i,
total_private_repos TYPE i,
owned_private_repos TYPE i,
disk_usage TYPE i,
collaborators TYPE i,
two_factor_authentication TYPE abap_bool,
plan TYPE subprivate_user_plan,
suspended_at TYPE string,
business_plus TYPE abap_bool,
ldap_dn TYPE string,
END OF private_user.
* Component schema: codespaces-secret, object
TYPES: BEGIN OF codespaces_secret,
name TYPE string,
created_at TYPE string,
updated_at TYPE string,
visibility TYPE string,
selected_repositories_url TYPE string,
END OF codespaces_secret.
* Component schema: codespaces-user-public-key, object
TYPES: BEGIN OF codespaces_user_public_key,
key_id TYPE string,
key TYPE string,
END OF codespaces_user_public_key.
* Component schema: codespace-export-details, object
TYPES: BEGIN OF codespace_export_details,
state TYPE string,
completed_at TYPE string,
branch TYPE string,
sha TYPE string,
id TYPE string,
export_url TYPE string,
END OF codespace_export_details.
* Component schema: email, object
TYPES: BEGIN OF email,
email TYPE string,
primary TYPE abap_bool,
verified TYPE abap_bool,
visibility TYPE string,
END OF email.
* Component schema: gpg-key, object
TYPES: BEGIN OF gpg_key,
id TYPE i,
primary_key_id TYPE i,
key_id TYPE string,
public_key TYPE string,
emails TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
subkeys TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
can_sign TYPE abap_bool,
can_encrypt_comms TYPE abap_bool,
can_encrypt_storage TYPE abap_bool,
can_certify TYPE abap_bool,
created_at TYPE string,
expires_at TYPE string,
raw_key TYPE string,
END OF gpg_key.
* Component schema: key, object
TYPES: BEGIN OF key,
key TYPE string,
id TYPE i,
url TYPE string,
title TYPE string,
created_at TYPE string,
verified TYPE abap_bool,
read_only TYPE abap_bool,
END OF key.
* Component schema: marketplace-account, object
TYPES: BEGIN OF marketplace_account,
url TYPE string,
id TYPE i,
type TYPE string,
node_id TYPE string,
login TYPE string,
email TYPE string,
organization_billing_email TYPE string,
END OF marketplace_account.
* Component schema: user-marketplace-purchase, object
TYPES: BEGIN OF user_marketplace_purchase,
billing_cycle TYPE string,
next_billing_date TYPE string,
unit_count TYPE i,
on_free_trial TYPE abap_bool,
free_trial_ends_on TYPE string,
updated_at TYPE string,
account TYPE marketplace_account,
plan TYPE marketplace_listing_plan,
END OF user_marketplace_purchase.
* Component schema: starred-repository, object
TYPES: BEGIN OF starred_repository,
starred_at TYPE string,
repo TYPE repository,
END OF starred_repository.
* Component schema: hovercard, object
TYPES: BEGIN OF hovercard,
contexts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF hovercard.
* Component schema: key-simple, object
TYPES: BEGIN OF key_simple,
id TYPE i,
key TYPE string,
END OF key_simple.
* Component schema: bodyapps_create_from_manifest, object
TYPES: BEGIN OF bodyapps_create_from_manifest,
dummy_workaround TYPE i,
END OF bodyapps_create_from_manifest.
* Component schema: bodyapps_update_webhook_config, object
TYPES: BEGIN OF bodyapps_update_webhook_config,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
END OF bodyapps_update_webhook_config.
* Component schema: bodyapps_create_installation_a, object
TYPES: BEGIN OF bodyapps_create_installation_a,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
permissions TYPE app_permissions,
END OF bodyapps_create_installation_a.
* Component schema: bodyapps_delete_authorization, object
TYPES: BEGIN OF bodyapps_delete_authorization,
access_token TYPE string,
END OF bodyapps_delete_authorization.
* Component schema: bodyapps_check_token, object
TYPES: BEGIN OF bodyapps_check_token,
access_token TYPE string,
END OF bodyapps_check_token.
* Component schema: bodyapps_reset_token, object
TYPES: BEGIN OF bodyapps_reset_token,
access_token TYPE string,
END OF bodyapps_reset_token.
* Component schema: bodyapps_delete_token, object
TYPES: BEGIN OF bodyapps_delete_token,
access_token TYPE string,
END OF bodyapps_delete_token.
* Component schema: bodyapps_scope_token, object
TYPES: BEGIN OF bodyapps_scope_token,
access_token TYPE string,
target TYPE string,
target_id TYPE i,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
permissions TYPE app_permissions,
END OF bodyapps_scope_token.
* Component schema: bodyenterprise_admin_set_githu, object
TYPES: BEGIN OF bodyenterprise_admin_set_githu,
enabled_organizations TYPE enabled_organizations,
allowed_actions TYPE allowed_actions,
END OF bodyenterprise_admin_set_githu.
* Component schema: bodyenterprise_admin_set_selec, object
TYPES: BEGIN OF bodyenterprise_admin_set_selec,
selected_organization_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_set_selec.
* Component schema: bodyenterprise_admin_create_se, object
TYPES: BEGIN OF bodyenterprise_admin_create_se,
name TYPE string,
visibility TYPE string,
selected_organization_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
runners TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
allows_public_repositories TYPE abap_bool,
END OF bodyenterprise_admin_create_se.
* Component schema: bodyenterprise_admin_update_se, object
TYPES: BEGIN OF bodyenterprise_admin_update_se,
name TYPE string,
visibility TYPE string,
allows_public_repositories TYPE abap_bool,
END OF bodyenterprise_admin_update_se.
* Component schema: bodyenterprise_admin_delete_se, object
TYPES: BEGIN OF bodyenterprise_admin_delete_se,
name TYPE string,
visibility TYPE string,
allows_public_repositories TYPE abap_bool,
END OF bodyenterprise_admin_delete_se.
* Component schema: bodyenterprise_admin_set_org_a, object
TYPES: BEGIN OF bodyenterprise_admin_set_org_a,
selected_organization_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_set_org_a.
* Component schema: bodyenterprise_admin_set_self_, object
TYPES: BEGIN OF bodyenterprise_admin_set_self_,
runners TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_set_self_.
* Component schema: bodyenterprise_admin_add_custo, object
TYPES: BEGIN OF bodyenterprise_admin_add_custo,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_add_custo.
* Component schema: bodyenterprise_admin_set_custo, object
TYPES: BEGIN OF bodyenterprise_admin_set_custo,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_set_custo.
* Component schema: bodyenterprise_admin_remove_al, object
TYPES: BEGIN OF bodyenterprise_admin_remove_al,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_remove_al.
* Component schema: bodygists_create, object
TYPES: BEGIN OF subbodygists_create_files,
dummy_workaround TYPE i,
END OF subbodygists_create_files.
TYPES: BEGIN OF bodygists_create,
description TYPE string,
files TYPE subbodygists_create_files,
public TYPE string,
END OF bodygists_create.
* Component schema: bodygists_update, object
TYPES: BEGIN OF subbodygists_update_files,
dummy_workaround TYPE i,
END OF subbodygists_update_files.
TYPES: BEGIN OF bodygists_update,
description TYPE string,
files TYPE subbodygists_update_files,
END OF bodygists_update.
* Component schema: bodygists_delete, object
TYPES: BEGIN OF subbodygists_delete_files,
dummy_workaround TYPE i,
END OF subbodygists_delete_files.
TYPES: BEGIN OF bodygists_delete,
description TYPE string,
files TYPE subbodygists_delete_files,
END OF bodygists_delete.
* Component schema: bodygists_create_comment, object
TYPES: BEGIN OF bodygists_create_comment,
body TYPE string,
END OF bodygists_create_comment.
* Component schema: bodygists_update_comment, object
TYPES: BEGIN OF bodygists_update_comment,
body TYPE string,
END OF bodygists_update_comment.
* Component schema: bodygists_delete_comment, object
TYPES: BEGIN OF bodygists_delete_comment,
body TYPE string,
END OF bodygists_delete_comment.
* Component schema: bodymarkdown_render, object
TYPES: BEGIN OF bodymarkdown_render,
text TYPE string,
mode TYPE string,
context TYPE string,
END OF bodymarkdown_render.
* Component schema: bodyactivity_mark_notification, object
TYPES: BEGIN OF bodyactivity_mark_notification,
last_read_at TYPE string,
read TYPE abap_bool,
END OF bodyactivity_mark_notification.
* Component schema: bodyactivity_set_thread_subscr, object
TYPES: BEGIN OF bodyactivity_set_thread_subscr,
ignored TYPE abap_bool,
END OF bodyactivity_set_thread_subscr.
* Component schema: bodyactivity_delete_thread_sub, object
TYPES: BEGIN OF bodyactivity_delete_thread_sub,
ignored TYPE abap_bool,
END OF bodyactivity_delete_thread_sub.
* Component schema: bodyorgs_update, object
TYPES: BEGIN OF bodyorgs_update,
billing_email TYPE string,
company TYPE string,
email TYPE string,
twitter_username TYPE string,
location TYPE string,
name TYPE string,
description TYPE string,
has_organization_projects TYPE abap_bool,
has_repository_projects TYPE abap_bool,
default_repository_permission TYPE string,
members_can_create_repositorie TYPE abap_bool,
members_can_create_internal_re TYPE abap_bool,
members_can_create_private_rep TYPE abap_bool,
members_can_create_public_repo TYPE abap_bool,
members_allowed_repository_cre TYPE string,
members_can_create_pages TYPE abap_bool,
members_can_create_public_page TYPE abap_bool,
members_can_create_private_pag TYPE abap_bool,
members_can_fork_private_repos TYPE abap_bool,
blog TYPE string,
END OF bodyorgs_update.
* Component schema: bodyactions_set_github_actions, object
TYPES: BEGIN OF bodyactions_set_github_actions,
enabled_repositories TYPE enabled_repositories,
allowed_actions TYPE allowed_actions,
END OF bodyactions_set_github_actions.
* Component schema: bodyactions_set_selected_repos, object
TYPES: BEGIN OF bodyactions_set_selected_repos,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_set_selected_repos.
* Component schema: bodyactions_create_self_hosted, object
TYPES: BEGIN OF bodyactions_create_self_hosted,
name TYPE string,
visibility TYPE string,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
runners TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
allows_public_repositories TYPE abap_bool,
END OF bodyactions_create_self_hosted.
* Component schema: bodyactions_update_self_hosted, object
TYPES: BEGIN OF bodyactions_update_self_hosted,
name TYPE string,
visibility TYPE string,
allows_public_repositories TYPE abap_bool,
END OF bodyactions_update_self_hosted.
* Component schema: bodyactions_delete_self_hosted, object
TYPES: BEGIN OF bodyactions_delete_self_hosted,
name TYPE string,
visibility TYPE string,
allows_public_repositories TYPE abap_bool,
END OF bodyactions_delete_self_hosted.
* Component schema: bodyactions_set_repo_access_to, object
TYPES: BEGIN OF bodyactions_set_repo_access_to,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_set_repo_access_to.
* Component schema: bodyactions_set_self_hosted_ru, object
TYPES: BEGIN OF bodyactions_set_self_hosted_ru,
runners TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_set_self_hosted_ru.
* Component schema: bodyactions_add_custom_labels_, object
TYPES: BEGIN OF bodyactions_add_custom_labels_,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_add_custom_labels_.
* Component schema: bodyactions_set_custom_labels_, object
TYPES: BEGIN OF bodyactions_set_custom_labels_,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_set_custom_labels_.
* Component schema: bodyactions_remove_all_custom_, object
TYPES: BEGIN OF bodyactions_remove_all_custom_,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_remove_all_custom_.
* Component schema: bodyactions_create_or_update_o, object
TYPES: BEGIN OF bodyactions_create_or_update_o,
encrypted_value TYPE string,
key_id TYPE string,
visibility TYPE string,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_create_or_update_o.
* Component schema: bodyactions_delete_org_secret, object
TYPES: BEGIN OF bodyactions_delete_org_secret,
encrypted_value TYPE string,
key_id TYPE string,
visibility TYPE string,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_delete_org_secret.
* Component schema: bodyactions_set_selected_rep01, object
TYPES: BEGIN OF bodyactions_set_selected_rep01,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_set_selected_rep01.
* Component schema: bodydependabot_create_or_updat, object
TYPES: BEGIN OF bodydependabot_create_or_updat,
encrypted_value TYPE string,
key_id TYPE string,
visibility TYPE string,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodydependabot_create_or_updat.
* Component schema: bodydependabot_delete_org_secr, object
TYPES: BEGIN OF bodydependabot_delete_org_secr,
encrypted_value TYPE string,
key_id TYPE string,
visibility TYPE string,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodydependabot_delete_org_secr.
* Component schema: bodydependabot_set_selected_re, object
TYPES: BEGIN OF bodydependabot_set_selected_re,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodydependabot_set_selected_re.
* Component schema: bodyorgs_create_webhook, object
TYPES: BEGIN OF subbodyorgs_create_webhook_con,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
username TYPE string,
password TYPE string,
END OF subbodyorgs_create_webhook_con.
TYPES: BEGIN OF bodyorgs_create_webhook,
name TYPE string,
config TYPE subbodyorgs_create_webhook_con,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
END OF bodyorgs_create_webhook.
* Component schema: bodyorgs_update_webhook, object
TYPES: BEGIN OF subbodyorgs_update_webhook_con,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
END OF subbodyorgs_update_webhook_con.
TYPES: BEGIN OF bodyorgs_update_webhook,
config TYPE subbodyorgs_update_webhook_con,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
name TYPE string,
END OF bodyorgs_update_webhook.
* Component schema: bodyorgs_delete_webhook, object
TYPES: BEGIN OF subbodyorgs_delete_webhook_con,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
END OF subbodyorgs_delete_webhook_con.
TYPES: BEGIN OF bodyorgs_delete_webhook,
config TYPE subbodyorgs_delete_webhook_con,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
name TYPE string,
END OF bodyorgs_delete_webhook.
* Component schema: bodyorgs_update_webhook_config, object
TYPES: BEGIN OF bodyorgs_update_webhook_config,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
END OF bodyorgs_update_webhook_config.
* Component schema: bodyorgs_create_invitation, object
TYPES: BEGIN OF bodyorgs_create_invitation,
invitee_id TYPE i,
email TYPE string,
role TYPE string,
team_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyorgs_create_invitation.
* Component schema: bodyorgs_set_membership_for_us, object
TYPES: BEGIN OF bodyorgs_set_membership_for_us,
role TYPE string,
END OF bodyorgs_set_membership_for_us.
* Component schema: bodyorgs_remove_membership_for, object
TYPES: BEGIN OF bodyorgs_remove_membership_for,
role TYPE string,
END OF bodyorgs_remove_membership_for.
* Component schema: bodymigrations_start_for_org, object
TYPES: BEGIN OF bodymigrations_start_for_org,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
lock_repositories TYPE abap_bool,
exclude_attachments TYPE abap_bool,
exclude_releases TYPE abap_bool,
exclude_owner_projects TYPE abap_bool,
exclude TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodymigrations_start_for_org.
* Component schema: bodyprojects_create_for_org, object
TYPES: BEGIN OF bodyprojects_create_for_org,
name TYPE string,
body TYPE string,
END OF bodyprojects_create_for_org.
* Component schema: bodyrepos_create_in_org, object
TYPES: BEGIN OF bodyrepos_create_in_org,
name TYPE string,
description TYPE string,
homepage TYPE string,
private TYPE abap_bool,
visibility TYPE string,
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
is_template TYPE abap_bool,
team_id TYPE i,
auto_init TYPE abap_bool,
gitignore_template TYPE string,
license_template TYPE string,
allow_squash_merge TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
allow_rebase_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
END OF bodyrepos_create_in_org.
* Component schema: bodyteams_create, object
TYPES: BEGIN OF bodyteams_create,
name TYPE string,
description TYPE string,
maintainers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
repo_names TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
privacy TYPE string,
permission TYPE string,
parent_team_id TYPE i,
END OF bodyteams_create.
* Component schema: bodyteams_update_in_org, object
TYPES: BEGIN OF bodyteams_update_in_org,
name TYPE string,
description TYPE string,
privacy TYPE string,
permission TYPE string,
parent_team_id TYPE i,
END OF bodyteams_update_in_org.
* Component schema: bodyteams_delete_in_org, object
TYPES: BEGIN OF bodyteams_delete_in_org,
name TYPE string,
description TYPE string,
privacy TYPE string,
permission TYPE string,
parent_team_id TYPE i,
END OF bodyteams_delete_in_org.
* Component schema: bodyteams_create_discussion_in, object
TYPES: BEGIN OF bodyteams_create_discussion_in,
title TYPE string,
body TYPE string,
private TYPE abap_bool,
END OF bodyteams_create_discussion_in.
* Component schema: bodyteams_update_discussion_in, object
TYPES: BEGIN OF bodyteams_update_discussion_in,
title TYPE string,
body TYPE string,
END OF bodyteams_update_discussion_in.
* Component schema: bodyteams_delete_discussion_in, object
TYPES: BEGIN OF bodyteams_delete_discussion_in,
title TYPE string,
body TYPE string,
END OF bodyteams_delete_discussion_in.
* Component schema: bodyteams_create_discussion_co, object
TYPES: BEGIN OF bodyteams_create_discussion_co,
body TYPE string,
END OF bodyteams_create_discussion_co.
* Component schema: bodyteams_update_discussion_co, object
TYPES: BEGIN OF bodyteams_update_discussion_co,
body TYPE string,
END OF bodyteams_update_discussion_co.
* Component schema: bodyteams_delete_discussion_co, object
TYPES: BEGIN OF bodyteams_delete_discussion_co,
body TYPE string,
END OF bodyteams_delete_discussion_co.
* Component schema: bodyreactions_create_for_team_, object
TYPES: BEGIN OF bodyreactions_create_for_team_,
content TYPE string,
END OF bodyreactions_create_for_team_.
* Component schema: bodyreactions_create_for_tea01, object
TYPES: BEGIN OF bodyreactions_create_for_tea01,
content TYPE string,
END OF bodyreactions_create_for_tea01.
* Component schema: bodyteams_link_external_idp_gr, object
TYPES: BEGIN OF bodyteams_link_external_idp_gr,
group_id TYPE i,
END OF bodyteams_link_external_idp_gr.
* Component schema: bodyteams_unlink_external_idp_, object
TYPES: BEGIN OF bodyteams_unlink_external_idp_,
group_id TYPE i,
END OF bodyteams_unlink_external_idp_.
* Component schema: bodyteams_add_or_update_member, object
TYPES: BEGIN OF bodyteams_add_or_update_member,
role TYPE string,
END OF bodyteams_add_or_update_member.
* Component schema: bodyteams_remove_membership_fo, object
TYPES: BEGIN OF bodyteams_remove_membership_fo,
role TYPE string,
END OF bodyteams_remove_membership_fo.
* Component schema: bodyteams_add_or_update_projec, object
TYPES: BEGIN OF bodyteams_add_or_update_projec,
permission TYPE string,
END OF bodyteams_add_or_update_projec.
* Component schema: bodyteams_remove_project_in_or, object
TYPES: BEGIN OF bodyteams_remove_project_in_or,
permission TYPE string,
END OF bodyteams_remove_project_in_or.
* Component schema: bodyteams_add_or_update_repo_p, object
TYPES: BEGIN OF bodyteams_add_or_update_repo_p,
permission TYPE string,
END OF bodyteams_add_or_update_repo_p.
* Component schema: bodyteams_remove_repo_in_org, object
TYPES: BEGIN OF bodyteams_remove_repo_in_org,
permission TYPE string,
END OF bodyteams_remove_repo_in_org.
* Component schema: bodyteams_create_or_update_idp, object
TYPES: BEGIN OF bodyteams_create_or_update_idp,
groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyteams_create_or_update_idp.
* Component schema: bodyprojects_update_card, object
TYPES: BEGIN OF bodyprojects_update_card,
note TYPE string,
archived TYPE abap_bool,
END OF bodyprojects_update_card.
* Component schema: bodyprojects_delete_card, object
TYPES: BEGIN OF bodyprojects_delete_card,
note TYPE string,
archived TYPE abap_bool,
END OF bodyprojects_delete_card.
* Component schema: bodyprojects_move_card, object
TYPES: BEGIN OF bodyprojects_move_card,
position TYPE string,
column_id TYPE i,
END OF bodyprojects_move_card.
* Component schema: bodyprojects_update_column, object
TYPES: BEGIN OF bodyprojects_update_column,
name TYPE string,
END OF bodyprojects_update_column.
* Component schema: bodyprojects_delete_column, object
TYPES: BEGIN OF bodyprojects_delete_column,
name TYPE string,
END OF bodyprojects_delete_column.
* Component schema: bodyprojects_move_column, object
TYPES: BEGIN OF bodyprojects_move_column,
position TYPE string,
END OF bodyprojects_move_column.
* Component schema: bodyprojects_update, object
TYPES: BEGIN OF bodyprojects_update,
name TYPE string,
body TYPE string,
state TYPE string,
organization_permission TYPE string,
private TYPE abap_bool,
END OF bodyprojects_update.
* Component schema: bodyprojects_delete, object
TYPES: BEGIN OF bodyprojects_delete,
name TYPE string,
body TYPE string,
state TYPE string,
organization_permission TYPE string,
private TYPE abap_bool,
END OF bodyprojects_delete.
* Component schema: bodyprojects_add_collaborator, object
TYPES: BEGIN OF bodyprojects_add_collaborator,
permission TYPE string,
END OF bodyprojects_add_collaborator.
* Component schema: bodyprojects_remove_collaborat, object
TYPES: BEGIN OF bodyprojects_remove_collaborat,
permission TYPE string,
END OF bodyprojects_remove_collaborat.
* Component schema: bodyprojects_create_column, object
TYPES: BEGIN OF bodyprojects_create_column,
name TYPE string,
END OF bodyprojects_create_column.
* Component schema: bodyrepos_update, object
TYPES: BEGIN OF subsubbodyrepos_update_secur01,
status TYPE string,
END OF subsubbodyrepos_update_secur01.
TYPES: BEGIN OF subsubbodyrepos_update_securit,
status TYPE string,
END OF subsubbodyrepos_update_securit.
TYPES: BEGIN OF subbodyrepos_update_security_a,
advanced_security TYPE subsubbodyrepos_update_securit,
secret_scanning TYPE subsubbodyrepos_update_secur01,
END OF subbodyrepos_update_security_a.
TYPES: BEGIN OF bodyrepos_update,
name TYPE string,
description TYPE string,
homepage TYPE string,
private TYPE abap_bool,
visibility TYPE string,
security_and_analysis TYPE subbodyrepos_update_security_a,
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
is_template TYPE abap_bool,
default_branch TYPE string,
allow_squash_merge TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
allow_rebase_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
archived TYPE abap_bool,
allow_forking TYPE abap_bool,
END OF bodyrepos_update.
* Component schema: bodyrepos_delete, object
TYPES: BEGIN OF subsubbodyrepos_delete_secur01,
status TYPE string,
END OF subsubbodyrepos_delete_secur01.
TYPES: BEGIN OF subsubbodyrepos_delete_securit,
status TYPE string,
END OF subsubbodyrepos_delete_securit.
TYPES: BEGIN OF subbodyrepos_delete_security_a,
advanced_security TYPE subsubbodyrepos_delete_securit,
secret_scanning TYPE subsubbodyrepos_delete_secur01,
END OF subbodyrepos_delete_security_a.
TYPES: BEGIN OF bodyrepos_delete,
name TYPE string,
description TYPE string,
homepage TYPE string,
private TYPE abap_bool,
visibility TYPE string,
security_and_analysis TYPE subbodyrepos_delete_security_a,
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
is_template TYPE abap_bool,
default_branch TYPE string,
allow_squash_merge TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
allow_rebase_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
archived TYPE abap_bool,
allow_forking TYPE abap_bool,
END OF bodyrepos_delete.
* Component schema: bodyactions_set_github_actio01, object
TYPES: BEGIN OF bodyactions_set_github_actio01,
enabled TYPE actions_enabled,
allowed_actions TYPE allowed_actions,
END OF bodyactions_set_github_actio01.
* Component schema: bodyactions_add_custom_label01, object
TYPES: BEGIN OF bodyactions_add_custom_label01,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_add_custom_label01.
* Component schema: bodyactions_set_custom_label01, object
TYPES: BEGIN OF bodyactions_set_custom_label01,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_set_custom_label01.
* Component schema: bodyactions_remove_all_custo01, object
TYPES: BEGIN OF bodyactions_remove_all_custo01,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyactions_remove_all_custo01.
* Component schema: bodyactions_review_pending_dep, object
TYPES: BEGIN OF bodyactions_review_pending_dep,
environment_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
state TYPE string,
comment TYPE string,
END OF bodyactions_review_pending_dep.
* Component schema: bodyactions_create_or_update_r, object
TYPES: BEGIN OF bodyactions_create_or_update_r,
encrypted_value TYPE string,
key_id TYPE string,
END OF bodyactions_create_or_update_r.
* Component schema: bodyactions_delete_repo_secret, object
TYPES: BEGIN OF bodyactions_delete_repo_secret,
encrypted_value TYPE string,
key_id TYPE string,
END OF bodyactions_delete_repo_secret.
* Component schema: bodyactions_create_workflow_di, object
TYPES: BEGIN OF subbodyactions_create_workflow,
dummy_workaround TYPE i,
END OF subbodyactions_create_workflow.
TYPES: BEGIN OF bodyactions_create_workflow_di,
ref TYPE string,
inputs TYPE subbodyactions_create_workflow,
END OF bodyactions_create_workflow_di.
* Component schema: bodyrepos_create_autolink, object
TYPES: BEGIN OF bodyrepos_create_autolink,
key_prefix TYPE string,
url_template TYPE string,
END OF bodyrepos_create_autolink.
* Component schema: bodyrepos_update_branch_protec, object
TYPES: BEGIN OF subbodyrepos_update_branch_p02,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
apps TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodyrepos_update_branch_p02.
TYPES: BEGIN OF subsubbodyrepos_update_branc01,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubbodyrepos_update_branc01.
TYPES: BEGIN OF subsubbodyrepos_update_branch_,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubbodyrepos_update_branch_.
TYPES: BEGIN OF subbodyrepos_update_branch_p01,
dismissal_restrictions TYPE subsubbodyrepos_update_branch_,
dismiss_stale_reviews TYPE abap_bool,
require_code_owner_reviews TYPE abap_bool,
required_approving_review_coun TYPE i,
bypass_pull_request_allowances TYPE subsubbodyrepos_update_branc01,
END OF subbodyrepos_update_branch_p01.
TYPES: BEGIN OF subbodyrepos_update_branch_pro,
strict TYPE abap_bool,
contexts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
checks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodyrepos_update_branch_pro.
TYPES: BEGIN OF bodyrepos_update_branch_protec,
required_status_checks TYPE subbodyrepos_update_branch_pro,
enforce_admins TYPE abap_bool,
required_pull_request_reviews TYPE subbodyrepos_update_branch_p01,
restrictions TYPE subbodyrepos_update_branch_p02,
required_linear_history TYPE abap_bool,
allow_force_pushes TYPE abap_bool,
allow_deletions TYPE abap_bool,
required_conversation_resoluti TYPE abap_bool,
END OF bodyrepos_update_branch_protec.
* Component schema: bodyrepos_delete_branch_protec, object
TYPES: BEGIN OF subbodyrepos_delete_branch_p02,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
apps TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodyrepos_delete_branch_p02.
TYPES: BEGIN OF subsubbodyrepos_delete_branc01,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubbodyrepos_delete_branc01.
TYPES: BEGIN OF subsubbodyrepos_delete_branch_,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subsubbodyrepos_delete_branch_.
TYPES: BEGIN OF subbodyrepos_delete_branch_p01,
dismissal_restrictions TYPE subsubbodyrepos_delete_branch_,
dismiss_stale_reviews TYPE abap_bool,
require_code_owner_reviews TYPE abap_bool,
required_approving_review_coun TYPE i,
bypass_pull_request_allowances TYPE subsubbodyrepos_delete_branc01,
END OF subbodyrepos_delete_branch_p01.
TYPES: BEGIN OF subbodyrepos_delete_branch_pro,
strict TYPE abap_bool,
contexts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
checks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodyrepos_delete_branch_pro.
TYPES: BEGIN OF bodyrepos_delete_branch_protec,
required_status_checks TYPE subbodyrepos_delete_branch_pro,
enforce_admins TYPE abap_bool,
required_pull_request_reviews TYPE subbodyrepos_delete_branch_p01,
restrictions TYPE subbodyrepos_delete_branch_p02,
required_linear_history TYPE abap_bool,
allow_force_pushes TYPE abap_bool,
allow_deletions TYPE abap_bool,
required_conversation_resoluti TYPE abap_bool,
END OF bodyrepos_delete_branch_protec.
* Component schema: bodyrepos_update_pull_request_, object
TYPES: BEGIN OF subbodyrepos_update_pull_req01,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodyrepos_update_pull_req01.
TYPES: BEGIN OF subbodyrepos_update_pull_reque,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodyrepos_update_pull_reque.
TYPES: BEGIN OF bodyrepos_update_pull_request_,
dismissal_restrictions TYPE subbodyrepos_update_pull_reque,
dismiss_stale_reviews TYPE abap_bool,
require_code_owner_reviews TYPE abap_bool,
required_approving_review_coun TYPE i,
bypass_pull_request_allowances TYPE subbodyrepos_update_pull_req01,
END OF bodyrepos_update_pull_request_.
* Component schema: bodyrepos_delete_pull_request_, object
TYPES: BEGIN OF subbodyrepos_delete_pull_req01,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodyrepos_delete_pull_req01.
TYPES: BEGIN OF subbodyrepos_delete_pull_reque,
users TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
teams TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodyrepos_delete_pull_reque.
TYPES: BEGIN OF bodyrepos_delete_pull_request_,
dismissal_restrictions TYPE subbodyrepos_delete_pull_reque,
dismiss_stale_reviews TYPE abap_bool,
require_code_owner_reviews TYPE abap_bool,
required_approving_review_coun TYPE i,
bypass_pull_request_allowances TYPE subbodyrepos_delete_pull_req01,
END OF bodyrepos_delete_pull_request_.
* Component schema: bodyrepos_update_status_check_, object
TYPES: BEGIN OF bodyrepos_update_status_check_,
strict TYPE abap_bool,
contexts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
checks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyrepos_update_status_check_.
* Component schema: bodyrepos_remove_status_check_, object
TYPES: BEGIN OF bodyrepos_remove_status_check_,
strict TYPE abap_bool,
contexts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
checks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyrepos_remove_status_check_.
* Component schema: bodyrepos_rename_branch, object
TYPES: BEGIN OF bodyrepos_rename_branch,
new_name TYPE string,
END OF bodyrepos_rename_branch.
* Component schema: bodychecks_create, object
TYPES: BEGIN OF subbodychecks_create_output,
title TYPE string,
summary TYPE string,
text TYPE string,
annotations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
images TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodychecks_create_output.
TYPES: BEGIN OF bodychecks_create,
name TYPE string,
head_sha TYPE string,
details_url TYPE string,
external_id TYPE string,
status TYPE string,
started_at TYPE string,
conclusion TYPE string,
completed_at TYPE string,
output TYPE subbodychecks_create_output,
actions TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodychecks_create.
* Component schema: bodychecks_update, object
TYPES: BEGIN OF subbodychecks_update_output,
title TYPE string,
summary TYPE string,
text TYPE string,
annotations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
images TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF subbodychecks_update_output.
TYPES: BEGIN OF bodychecks_update,
name TYPE string,
details_url TYPE string,
external_id TYPE string,
started_at TYPE string,
status TYPE string,
conclusion TYPE string,
completed_at TYPE string,
output TYPE subbodychecks_update_output,
actions TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodychecks_update.
* Component schema: bodychecks_create_suite, object
TYPES: BEGIN OF bodychecks_create_suite,
head_sha TYPE string,
END OF bodychecks_create_suite.
* Component schema: bodychecks_set_suites_preferen, object
TYPES: BEGIN OF bodychecks_set_suites_preferen,
auto_trigger_checks TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodychecks_set_suites_preferen.
* Component schema: bodycode_scanning_update_alert, object
TYPES: BEGIN OF bodycode_scanning_update_alert,
state TYPE code_scanning_alert_set_state,
dismissed_reason TYPE code_scanning_alert_dismisse01,
END OF bodycode_scanning_update_alert.
* Component schema: bodycode_scanning_upload_sarif, object
TYPES: BEGIN OF bodycode_scanning_upload_sarif,
commit_sha TYPE code_scanning_analysis_commit_,
ref TYPE code_scanning_ref,
sarif TYPE code_scanning_analysis_sarif_f,
checkout_uri TYPE string,
started_at TYPE string,
tool_name TYPE string,
END OF bodycode_scanning_upload_sarif.
* Component schema: bodycodespaces_create_with_rep, object
TYPES: BEGIN OF bodycodespaces_create_with_rep,
ref TYPE string,
location TYPE string,
machine TYPE string,
working_directory TYPE string,
idle_timeout_minutes TYPE i,
display_name TYPE string,
END OF bodycodespaces_create_with_rep.
* Component schema: bodyrepos_add_collaborator, object
TYPES: BEGIN OF bodyrepos_add_collaborator,
permission TYPE string,
permissions TYPE string,
END OF bodyrepos_add_collaborator.
* Component schema: bodyrepos_remove_collaborator, object
TYPES: BEGIN OF bodyrepos_remove_collaborator,
permission TYPE string,
permissions TYPE string,
END OF bodyrepos_remove_collaborator.
* Component schema: bodyrepos_update_commit_commen, object
TYPES: BEGIN OF bodyrepos_update_commit_commen,
body TYPE string,
END OF bodyrepos_update_commit_commen.
* Component schema: bodyrepos_delete_commit_commen, object
TYPES: BEGIN OF bodyrepos_delete_commit_commen,
body TYPE string,
END OF bodyrepos_delete_commit_commen.
* Component schema: bodyreactions_create_for_commi, object
TYPES: BEGIN OF bodyreactions_create_for_commi,
content TYPE string,
END OF bodyreactions_create_for_commi.
* Component schema: bodyrepos_create_commit_commen, object
TYPES: BEGIN OF bodyrepos_create_commit_commen,
body TYPE string,
path TYPE string,
position TYPE i,
line TYPE i,
END OF bodyrepos_create_commit_commen.
* Component schema: bodyrepos_create_or_update_fil, object
TYPES: BEGIN OF subbodyrepos_create_or_updat01,
name TYPE string,
email TYPE string,
date TYPE string,
END OF subbodyrepos_create_or_updat01.
TYPES: BEGIN OF subbodyrepos_create_or_update_,
name TYPE string,
email TYPE string,
date TYPE string,
END OF subbodyrepos_create_or_update_.
TYPES: BEGIN OF bodyrepos_create_or_update_fil,
message TYPE string,
content TYPE string,
sha TYPE string,
branch TYPE string,
committer TYPE subbodyrepos_create_or_update_,
author TYPE subbodyrepos_create_or_updat01,
END OF bodyrepos_create_or_update_fil.
* Component schema: bodyrepos_delete_file, object
TYPES: BEGIN OF subbodyrepos_delete_file_autho,
name TYPE string,
email TYPE string,
END OF subbodyrepos_delete_file_autho.
TYPES: BEGIN OF subbodyrepos_delete_file_commi,
name TYPE string,
email TYPE string,
END OF subbodyrepos_delete_file_commi.
TYPES: BEGIN OF bodyrepos_delete_file,
message TYPE string,
sha TYPE string,
branch TYPE string,
committer TYPE subbodyrepos_delete_file_commi,
author TYPE subbodyrepos_delete_file_autho,
END OF bodyrepos_delete_file.
* Component schema: bodydependabot_create_or_upd01, object
TYPES: BEGIN OF bodydependabot_create_or_upd01,
encrypted_value TYPE string,
key_id TYPE string,
END OF bodydependabot_create_or_upd01.
* Component schema: bodydependabot_delete_repo_sec, object
TYPES: BEGIN OF bodydependabot_delete_repo_sec,
encrypted_value TYPE string,
key_id TYPE string,
END OF bodydependabot_delete_repo_sec.
* Component schema: bodyrepos_create_deployment, object
TYPES: BEGIN OF bodyrepos_create_deployment,
ref TYPE string,
task TYPE string,
auto_merge TYPE abap_bool,
required_contexts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
payload TYPE string,
environment TYPE string,
description TYPE string,
transient_environment TYPE abap_bool,
production_environment TYPE abap_bool,
END OF bodyrepos_create_deployment.
* Component schema: bodyrepos_create_deployment_st, object
TYPES: BEGIN OF bodyrepos_create_deployment_st,
state TYPE string,
target_url TYPE string,
log_url TYPE string,
description TYPE string,
environment TYPE string,
environment_url TYPE string,
auto_inactive TYPE abap_bool,
END OF bodyrepos_create_deployment_st.
* Component schema: bodyrepos_create_dispatch_even, object
TYPES: BEGIN OF subbodyrepos_create_dispatch_e,
dummy_workaround TYPE i,
END OF subbodyrepos_create_dispatch_e.
TYPES: BEGIN OF bodyrepos_create_dispatch_even,
event_type TYPE string,
client_payload TYPE subbodyrepos_create_dispatch_e,
END OF bodyrepos_create_dispatch_even.
* Component schema: bodyrepos_create_or_update_env, object
TYPES: BEGIN OF bodyrepos_create_or_update_env,
wait_timer TYPE wait_timer,
reviewers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
deployment_branch_policy TYPE deployment_branch_policy,
END OF bodyrepos_create_or_update_env.
* Component schema: bodyrepos_delete_an_environmen, object
TYPES: BEGIN OF bodyrepos_delete_an_environmen,
wait_timer TYPE wait_timer,
reviewers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
deployment_branch_policy TYPE deployment_branch_policy,
END OF bodyrepos_delete_an_environmen.
* Component schema: bodyrepos_create_fork, object
TYPES: BEGIN OF bodyrepos_create_fork,
organization TYPE string,
END OF bodyrepos_create_fork.
* Component schema: bodygit_create_blob, object
TYPES: BEGIN OF bodygit_create_blob,
content TYPE string,
encoding TYPE string,
END OF bodygit_create_blob.
* Component schema: bodygit_create_commit, object
TYPES: BEGIN OF subbodygit_create_commit_commi,
name TYPE string,
email TYPE string,
date TYPE string,
END OF subbodygit_create_commit_commi.
TYPES: BEGIN OF subbodygit_create_commit_autho,
name TYPE string,
email TYPE string,
date TYPE string,
END OF subbodygit_create_commit_autho.
TYPES: BEGIN OF bodygit_create_commit,
message TYPE string,
tree TYPE string,
parents TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
author TYPE subbodygit_create_commit_autho,
committer TYPE subbodygit_create_commit_commi,
signature TYPE string,
END OF bodygit_create_commit.
* Component schema: bodygit_create_ref, object
TYPES: BEGIN OF bodygit_create_ref,
ref TYPE string,
sha TYPE string,
key TYPE string,
END OF bodygit_create_ref.
* Component schema: bodygit_update_ref, object
TYPES: BEGIN OF bodygit_update_ref,
sha TYPE string,
force TYPE abap_bool,
END OF bodygit_update_ref.
* Component schema: bodygit_delete_ref, object
TYPES: BEGIN OF bodygit_delete_ref,
sha TYPE string,
force TYPE abap_bool,
END OF bodygit_delete_ref.
* Component schema: bodygit_create_tag, object
TYPES: BEGIN OF subbodygit_create_tag_tagger,
name TYPE string,
email TYPE string,
date TYPE string,
END OF subbodygit_create_tag_tagger.
TYPES: BEGIN OF bodygit_create_tag,
tag TYPE string,
message TYPE string,
object TYPE string,
type TYPE string,
tagger TYPE subbodygit_create_tag_tagger,
END OF bodygit_create_tag.
* Component schema: bodygit_create_tree, object
TYPES: BEGIN OF bodygit_create_tree,
tree TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
base_tree TYPE string,
END OF bodygit_create_tree.
* Component schema: bodyrepos_create_webhook, object
TYPES: BEGIN OF subbodyrepos_create_webhook_co,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
token TYPE string,
digest TYPE string,
END OF subbodyrepos_create_webhook_co.
TYPES: BEGIN OF bodyrepos_create_webhook,
name TYPE string,
config TYPE subbodyrepos_create_webhook_co,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
END OF bodyrepos_create_webhook.
* Component schema: bodyrepos_update_webhook, object
TYPES: BEGIN OF subbodyrepos_update_webhook_co,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
address TYPE string,
room TYPE string,
END OF subbodyrepos_update_webhook_co.
TYPES: BEGIN OF bodyrepos_update_webhook,
config TYPE subbodyrepos_update_webhook_co,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
add_events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
remove_events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
END OF bodyrepos_update_webhook.
* Component schema: bodyrepos_delete_webhook, object
TYPES: BEGIN OF subbodyrepos_delete_webhook_co,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
address TYPE string,
room TYPE string,
END OF subbodyrepos_delete_webhook_co.
TYPES: BEGIN OF bodyrepos_delete_webhook,
config TYPE subbodyrepos_delete_webhook_co,
events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
add_events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
remove_events TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
END OF bodyrepos_delete_webhook.
* Component schema: bodyrepos_update_webhook_confi, object
TYPES: BEGIN OF bodyrepos_update_webhook_confi,
url TYPE webhook_config_url,
content_type TYPE webhook_config_content_type,
secret TYPE webhook_config_secret,
insecure_ssl TYPE webhook_config_insecure_ssl,
END OF bodyrepos_update_webhook_confi.
* Component schema: bodymigrations_start_import, object
TYPES: BEGIN OF bodymigrations_start_import,
vcs_url TYPE string,
vcs TYPE string,
vcs_username TYPE string,
vcs_password TYPE string,
tfvc_project TYPE string,
END OF bodymigrations_start_import.
* Component schema: bodymigrations_update_import, object
TYPES: BEGIN OF bodymigrations_update_import,
vcs_username TYPE string,
vcs_password TYPE string,
vcs TYPE string,
tfvc_project TYPE string,
END OF bodymigrations_update_import.
* Component schema: bodymigrations_cancel_import, object
TYPES: BEGIN OF bodymigrations_cancel_import,
vcs_username TYPE string,
vcs_password TYPE string,
vcs TYPE string,
tfvc_project TYPE string,
END OF bodymigrations_cancel_import.
* Component schema: bodymigrations_map_commit_auth, object
TYPES: BEGIN OF bodymigrations_map_commit_auth,
email TYPE string,
name TYPE string,
END OF bodymigrations_map_commit_auth.
* Component schema: bodymigrations_set_lfs_prefere, object
TYPES: BEGIN OF bodymigrations_set_lfs_prefere,
use_lfs TYPE string,
END OF bodymigrations_set_lfs_prefere.
* Component schema: bodyrepos_update_invitation, object
TYPES: BEGIN OF bodyrepos_update_invitation,
permissions TYPE string,
END OF bodyrepos_update_invitation.
* Component schema: bodyrepos_delete_invitation, object
TYPES: BEGIN OF bodyrepos_delete_invitation,
permissions TYPE string,
END OF bodyrepos_delete_invitation.
* Component schema: bodyissues_create, object
TYPES: BEGIN OF bodyissues_create,
title TYPE string,
body TYPE string,
assignee TYPE string,
milestone TYPE string,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
assignees TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyissues_create.
* Component schema: bodyissues_update_comment, object
TYPES: BEGIN OF bodyissues_update_comment,
body TYPE string,
END OF bodyissues_update_comment.
* Component schema: bodyissues_delete_comment, object
TYPES: BEGIN OF bodyissues_delete_comment,
body TYPE string,
END OF bodyissues_delete_comment.
* Component schema: bodyreactions_create_for_issue, object
TYPES: BEGIN OF bodyreactions_create_for_issue,
content TYPE string,
END OF bodyreactions_create_for_issue.
* Component schema: bodyissues_update, object
TYPES: BEGIN OF bodyissues_update,
title TYPE string,
body TYPE string,
assignee TYPE string,
state TYPE string,
milestone TYPE string,
labels TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
assignees TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyissues_update.
* Component schema: bodyissues_add_assignees, object
TYPES: BEGIN OF bodyissues_add_assignees,
assignees TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyissues_add_assignees.
* Component schema: bodyissues_remove_assignees, object
TYPES: BEGIN OF bodyissues_remove_assignees,
assignees TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyissues_remove_assignees.
* Component schema: bodyissues_create_comment, object
TYPES: BEGIN OF bodyissues_create_comment,
body TYPE string,
END OF bodyissues_create_comment.
* Component schema: bodyissues_lock, object
TYPES: BEGIN OF bodyissues_lock,
lock_reason TYPE string,
END OF bodyissues_lock.
* Component schema: bodyissues_unlock, object
TYPES: BEGIN OF bodyissues_unlock,
lock_reason TYPE string,
END OF bodyissues_unlock.
* Component schema: bodyreactions_create_for_iss01, object
TYPES: BEGIN OF bodyreactions_create_for_iss01,
content TYPE string,
END OF bodyreactions_create_for_iss01.
* Component schema: bodyrepos_create_deploy_key, object
TYPES: BEGIN OF bodyrepos_create_deploy_key,
title TYPE string,
key TYPE string,
read_only TYPE abap_bool,
END OF bodyrepos_create_deploy_key.
* Component schema: bodyissues_create_label, object
TYPES: BEGIN OF bodyissues_create_label,
name TYPE string,
color TYPE string,
description TYPE string,
END OF bodyissues_create_label.
* Component schema: bodyissues_update_label, object
TYPES: BEGIN OF bodyissues_update_label,
new_name TYPE string,
color TYPE string,
description TYPE string,
END OF bodyissues_update_label.
* Component schema: bodyissues_delete_label, object
TYPES: BEGIN OF bodyissues_delete_label,
new_name TYPE string,
color TYPE string,
description TYPE string,
END OF bodyissues_delete_label.
* Component schema: bodyrepos_merge_upstream, object
TYPES: BEGIN OF bodyrepos_merge_upstream,
branch TYPE string,
END OF bodyrepos_merge_upstream.
* Component schema: bodyrepos_merge, object
TYPES: BEGIN OF bodyrepos_merge,
base TYPE string,
head TYPE string,
commit_message TYPE string,
END OF bodyrepos_merge.
* Component schema: bodyissues_create_milestone, object
TYPES: BEGIN OF bodyissues_create_milestone,
title TYPE string,
state TYPE string,
description TYPE string,
due_on TYPE string,
END OF bodyissues_create_milestone.
* Component schema: bodyissues_update_milestone, object
TYPES: BEGIN OF bodyissues_update_milestone,
title TYPE string,
state TYPE string,
description TYPE string,
due_on TYPE string,
END OF bodyissues_update_milestone.
* Component schema: bodyissues_delete_milestone, object
TYPES: BEGIN OF bodyissues_delete_milestone,
title TYPE string,
state TYPE string,
description TYPE string,
due_on TYPE string,
END OF bodyissues_delete_milestone.
* Component schema: bodyactivity_mark_repo_notific, object
TYPES: BEGIN OF bodyactivity_mark_repo_notific,
last_read_at TYPE string,
END OF bodyactivity_mark_repo_notific.
* Component schema: bodyrepos_create_pages_site, object
TYPES: BEGIN OF subbodyrepos_create_pages_site,
branch TYPE string,
path TYPE string,
END OF subbodyrepos_create_pages_site.
TYPES: BEGIN OF bodyrepos_create_pages_site,
source TYPE subbodyrepos_create_pages_site,
END OF bodyrepos_create_pages_site.
* Component schema: bodyrepos_update_information_a, object
TYPES: BEGIN OF bodyrepos_update_information_a,
cname TYPE string,
https_enforced TYPE abap_bool,
public TYPE abap_bool,
source TYPE string,
END OF bodyrepos_update_information_a.
* Component schema: bodyrepos_delete_pages_site, object
TYPES: BEGIN OF bodyrepos_delete_pages_site,
cname TYPE string,
https_enforced TYPE abap_bool,
public TYPE abap_bool,
source TYPE string,
END OF bodyrepos_delete_pages_site.
* Component schema: bodyprojects_create_for_repo, object
TYPES: BEGIN OF bodyprojects_create_for_repo,
name TYPE string,
body TYPE string,
END OF bodyprojects_create_for_repo.
* Component schema: bodypulls_create, object
TYPES: BEGIN OF bodypulls_create,
title TYPE string,
head TYPE string,
base TYPE string,
body TYPE string,
maintainer_can_modify TYPE abap_bool,
draft TYPE abap_bool,
issue TYPE i,
END OF bodypulls_create.
* Component schema: bodypulls_update_review_commen, object
TYPES: BEGIN OF bodypulls_update_review_commen,
body TYPE string,
END OF bodypulls_update_review_commen.
* Component schema: bodypulls_delete_review_commen, object
TYPES: BEGIN OF bodypulls_delete_review_commen,
body TYPE string,
END OF bodypulls_delete_review_commen.
* Component schema: bodyreactions_create_for_pull_, object
TYPES: BEGIN OF bodyreactions_create_for_pull_,
content TYPE string,
END OF bodyreactions_create_for_pull_.
* Component schema: bodypulls_update, object
TYPES: BEGIN OF bodypulls_update,
title TYPE string,
body TYPE string,
state TYPE string,
base TYPE string,
maintainer_can_modify TYPE abap_bool,
END OF bodypulls_update.
* Component schema: bodycodespaces_create_with_pr_, object
TYPES: BEGIN OF bodycodespaces_create_with_pr_,
location TYPE string,
machine TYPE string,
working_directory TYPE string,
idle_timeout_minutes TYPE i,
display_name TYPE string,
END OF bodycodespaces_create_with_pr_.
* Component schema: bodypulls_create_review_commen, object
TYPES: BEGIN OF bodypulls_create_review_commen,
body TYPE string,
commit_id TYPE string,
path TYPE string,
position TYPE i,
side TYPE string,
line TYPE i,
start_line TYPE i,
start_side TYPE string,
in_reply_to TYPE i,
END OF bodypulls_create_review_commen.
* Component schema: bodypulls_create_reply_for_rev, object
TYPES: BEGIN OF bodypulls_create_reply_for_rev,
body TYPE string,
END OF bodypulls_create_reply_for_rev.
* Component schema: bodypulls_merge, object
TYPES: BEGIN OF bodypulls_merge,
commit_title TYPE string,
commit_message TYPE string,
sha TYPE string,
merge_method TYPE string,
END OF bodypulls_merge.
* Component schema: bodypulls_request_reviewers, object
TYPES: BEGIN OF bodypulls_request_reviewers,
reviewers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
team_reviewers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodypulls_request_reviewers.
* Component schema: bodypulls_remove_requested_rev, object
TYPES: BEGIN OF bodypulls_remove_requested_rev,
reviewers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
team_reviewers TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodypulls_remove_requested_rev.
* Component schema: bodypulls_create_review, object
TYPES: BEGIN OF bodypulls_create_review,
commit_id TYPE string,
body TYPE string,
event TYPE string,
comments TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodypulls_create_review.
* Component schema: bodypulls_update_review, object
TYPES: BEGIN OF bodypulls_update_review,
body TYPE string,
END OF bodypulls_update_review.
* Component schema: bodypulls_delete_pending_revie, object
TYPES: BEGIN OF bodypulls_delete_pending_revie,
body TYPE string,
END OF bodypulls_delete_pending_revie.
* Component schema: bodypulls_dismiss_review, object
TYPES: BEGIN OF bodypulls_dismiss_review,
message TYPE string,
event TYPE string,
END OF bodypulls_dismiss_review.
* Component schema: bodypulls_submit_review, object
TYPES: BEGIN OF bodypulls_submit_review,
body TYPE string,
event TYPE string,
END OF bodypulls_submit_review.
* Component schema: bodypulls_update_branch, object
TYPES: BEGIN OF bodypulls_update_branch,
expected_head_sha TYPE string,
END OF bodypulls_update_branch.
* Component schema: bodyrepos_create_release, object
TYPES: BEGIN OF bodyrepos_create_release,
tag_name TYPE string,
target_commitish TYPE string,
name TYPE string,
body TYPE string,
draft TYPE abap_bool,
prerelease TYPE abap_bool,
discussion_category_name TYPE string,
generate_release_notes TYPE abap_bool,
END OF bodyrepos_create_release.
* Component schema: bodyrepos_update_release_asset, object
TYPES: BEGIN OF bodyrepos_update_release_asset,
name TYPE string,
label TYPE string,
state TYPE string,
END OF bodyrepos_update_release_asset.
* Component schema: bodyrepos_delete_release_asset, object
TYPES: BEGIN OF bodyrepos_delete_release_asset,
name TYPE string,
label TYPE string,
state TYPE string,
END OF bodyrepos_delete_release_asset.
* Component schema: bodyrepos_generate_release_not, object
TYPES: BEGIN OF bodyrepos_generate_release_not,
tag_name TYPE string,
target_commitish TYPE string,
previous_tag_name TYPE string,
configuration_file_path TYPE string,
END OF bodyrepos_generate_release_not.
* Component schema: bodyrepos_update_release, object
TYPES: BEGIN OF bodyrepos_update_release,
tag_name TYPE string,
target_commitish TYPE string,
name TYPE string,
body TYPE string,
draft TYPE abap_bool,
prerelease TYPE abap_bool,
discussion_category_name TYPE string,
END OF bodyrepos_update_release.
* Component schema: bodyrepos_delete_release, object
TYPES: BEGIN OF bodyrepos_delete_release,
tag_name TYPE string,
target_commitish TYPE string,
name TYPE string,
body TYPE string,
draft TYPE abap_bool,
prerelease TYPE abap_bool,
discussion_category_name TYPE string,
END OF bodyrepos_delete_release.
* Component schema: bodyreactions_create_for_relea, object
TYPES: BEGIN OF bodyreactions_create_for_relea,
content TYPE string,
END OF bodyreactions_create_for_relea.
* Component schema: bodysecret_scanning_update_ale, object
TYPES: BEGIN OF bodysecret_scanning_update_ale,
state TYPE secret_scanning_alert_state,
resolution TYPE secret_scanning_alert_resoluti,
END OF bodysecret_scanning_update_ale.
* Component schema: bodyrepos_create_commit_status, object
TYPES: BEGIN OF bodyrepos_create_commit_status,
state TYPE string,
target_url TYPE string,
description TYPE string,
context TYPE string,
END OF bodyrepos_create_commit_status.
* Component schema: bodyactivity_set_repo_subscrip, object
TYPES: BEGIN OF bodyactivity_set_repo_subscrip,
subscribed TYPE abap_bool,
ignored TYPE abap_bool,
END OF bodyactivity_set_repo_subscrip.
* Component schema: bodyactivity_delete_repo_subsc, object
TYPES: BEGIN OF bodyactivity_delete_repo_subsc,
subscribed TYPE abap_bool,
ignored TYPE abap_bool,
END OF bodyactivity_delete_repo_subsc.
* Component schema: bodyrepos_replace_all_topics, object
TYPES: BEGIN OF bodyrepos_replace_all_topics,
names TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyrepos_replace_all_topics.
* Component schema: bodyrepos_transfer, object
TYPES: BEGIN OF bodyrepos_transfer,
new_owner TYPE string,
team_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyrepos_transfer.
* Component schema: bodyrepos_create_using_templat, object
TYPES: BEGIN OF bodyrepos_create_using_templat,
owner TYPE string,
name TYPE string,
description TYPE string,
include_all_branches TYPE abap_bool,
private TYPE abap_bool,
END OF bodyrepos_create_using_templat.
* Component schema: bodyactions_create_or_update_e, object
TYPES: BEGIN OF bodyactions_create_or_update_e,
encrypted_value TYPE string,
key_id TYPE string,
END OF bodyactions_create_or_update_e.
* Component schema: bodyactions_delete_environment, object
TYPES: BEGIN OF bodyactions_delete_environment,
encrypted_value TYPE string,
key_id TYPE string,
END OF bodyactions_delete_environment.
* Component schema: bodyenterprise_admin_provision, object
TYPES: BEGIN OF bodyenterprise_admin_provision,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
displayname TYPE string,
members TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_provision.
* Component schema: bodyenterprise_admin_set_infor, object
TYPES: BEGIN OF bodyenterprise_admin_set_infor,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
displayname TYPE string,
members TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_set_infor.
* Component schema: bodyenterprise_admin_update_at, object
TYPES: BEGIN OF bodyenterprise_admin_update_at,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
operations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_update_at.
* Component schema: bodyenterprise_admin_delete_sc, object
TYPES: BEGIN OF bodyenterprise_admin_delete_sc,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
operations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_delete_sc.
* Component schema: bodyenterprise_admin_provisi01, object
TYPES: BEGIN OF subbodyenterprise_admin_provis,
givenname TYPE string,
familyname TYPE string,
END OF subbodyenterprise_admin_provis.
TYPES: BEGIN OF bodyenterprise_admin_provisi01,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
username TYPE string,
name TYPE subbodyenterprise_admin_provis,
emails TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_provisi01.
* Component schema: bodyenterprise_admin_set_inf01, object
TYPES: BEGIN OF subbodyenterprise_admin_set_in,
givenname TYPE string,
familyname TYPE string,
END OF subbodyenterprise_admin_set_in.
TYPES: BEGIN OF bodyenterprise_admin_set_inf01,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
username TYPE string,
name TYPE subbodyenterprise_admin_set_in,
emails TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_set_inf01.
* Component schema: bodyenterprise_admin_update_01, object
TYPES: BEGIN OF bodyenterprise_admin_update_01,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
operations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_update_01.
* Component schema: bodyenterprise_admin_delete_us, object
TYPES: BEGIN OF bodyenterprise_admin_delete_us,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
operations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyenterprise_admin_delete_us.
* Component schema: bodyscim_provision_and_invite_, object
TYPES: BEGIN OF subbodyscim_provision_and_invi,
givenname TYPE string,
familyname TYPE string,
formatted TYPE string,
END OF subbodyscim_provision_and_invi.
TYPES: BEGIN OF bodyscim_provision_and_invite_,
username TYPE string,
displayname TYPE string,
name TYPE subbodyscim_provision_and_invi,
emails TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
externalid TYPE string,
groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
END OF bodyscim_provision_and_invite_.
* Component schema: bodyscim_set_information_for_p, object
TYPES: BEGIN OF subbodyscim_set_information_fo,
givenname TYPE string,
familyname TYPE string,
formatted TYPE string,
END OF subbodyscim_set_information_fo.
TYPES: BEGIN OF bodyscim_set_information_for_p,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
displayname TYPE string,
externalid TYPE string,
groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
active TYPE abap_bool,
username TYPE string,
name TYPE subbodyscim_set_information_fo,
emails TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyscim_set_information_for_p.
* Component schema: bodyscim_update_attribute_for_, object
TYPES: BEGIN OF bodyscim_update_attribute_for_,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
operations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyscim_update_attribute_for_.
* Component schema: bodyscim_delete_user_from_org, object
TYPES: BEGIN OF bodyscim_delete_user_from_org,
schemas TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
operations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodyscim_delete_user_from_org.
* Component schema: bodyusers_update_authenticated, object
TYPES: BEGIN OF bodyusers_update_authenticated,
name TYPE string,
email TYPE string,
blog TYPE string,
twitter_username TYPE string,
company TYPE string,
location TYPE string,
hireable TYPE abap_bool,
bio TYPE string,
END OF bodyusers_update_authenticated.
* Component schema: bodycodespaces_create_or_updat, object
TYPES: BEGIN OF bodycodespaces_create_or_updat,
encrypted_value TYPE string,
key_id TYPE string,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodycodespaces_create_or_updat.
* Component schema: bodycodespaces_delete_secret_f, object
TYPES: BEGIN OF bodycodespaces_delete_secret_f,
encrypted_value TYPE string,
key_id TYPE string,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodycodespaces_delete_secret_f.
* Component schema: bodycodespaces_set_repositorie, object
TYPES: BEGIN OF bodycodespaces_set_repositorie,
selected_repository_ids TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodycodespaces_set_repositorie.
* Component schema: bodycodespaces_update_for_auth, object
TYPES: BEGIN OF bodycodespaces_update_for_auth,
machine TYPE string,
display_name TYPE string,
recent_folders TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodycodespaces_update_for_auth.
* Component schema: bodycodespaces_delete_for_auth, object
TYPES: BEGIN OF bodycodespaces_delete_for_auth,
machine TYPE string,
display_name TYPE string,
recent_folders TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodycodespaces_delete_for_auth.
* Component schema: bodyusers_set_primary_email_vi, object
TYPES: BEGIN OF bodyusers_set_primary_email_vi,
visibility TYPE string,
END OF bodyusers_set_primary_email_vi.
* Component schema: bodyusers_create_gpg_key_for_a, object
TYPES: BEGIN OF bodyusers_create_gpg_key_for_a,
armored_public_key TYPE string,
END OF bodyusers_create_gpg_key_for_a.
* Component schema: bodyusers_create_public_ssh_ke, object
TYPES: BEGIN OF bodyusers_create_public_ssh_ke,
title TYPE string,
key TYPE string,
END OF bodyusers_create_public_ssh_ke.
* Component schema: bodyorgs_update_membership_for, object
TYPES: BEGIN OF bodyorgs_update_membership_for,
state TYPE string,
END OF bodyorgs_update_membership_for.
* Component schema: bodymigrations_start_for_authe, object
TYPES: BEGIN OF bodymigrations_start_for_authe,
lock_repositories TYPE abap_bool,
exclude_attachments TYPE abap_bool,
exclude_releases TYPE abap_bool,
exclude_owner_projects TYPE abap_bool,
exclude TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF bodymigrations_start_for_authe.
* Component schema: bodyprojects_create_for_authen, object
TYPES: BEGIN OF bodyprojects_create_for_authen,
name TYPE string,
body TYPE string,
END OF bodyprojects_create_for_authen.
* Component schema: bodyrepos_create_for_authentic, object
TYPES: BEGIN OF bodyrepos_create_for_authentic,
name TYPE string,
description TYPE string,
homepage TYPE string,
private TYPE abap_bool,
has_issues TYPE abap_bool,
has_projects TYPE abap_bool,
has_wiki TYPE abap_bool,
team_id TYPE i,
auto_init TYPE abap_bool,
gitignore_template TYPE string,
license_template TYPE string,
allow_squash_merge TYPE abap_bool,
allow_merge_commit TYPE abap_bool,
allow_rebase_merge TYPE abap_bool,
allow_auto_merge TYPE abap_bool,
delete_branch_on_merge TYPE abap_bool,
has_downloads TYPE abap_bool,
is_template TYPE abap_bool,
END OF bodyrepos_create_for_authentic.
* Component schema: response_meta_root, object
TYPES: BEGIN OF response_meta_root,
current_user_url TYPE string,
current_user_authorizations_ht TYPE string,
authorizations_url TYPE string,
code_search_url TYPE string,
commit_search_url TYPE string,
emails_url TYPE string,
emojis_url TYPE string,
events_url TYPE string,
feeds_url TYPE string,
followers_url TYPE string,
following_url TYPE string,
gists_url TYPE string,
hub_url TYPE string,
issue_search_url TYPE string,
issues_url TYPE string,
keys_url TYPE string,
label_search_url TYPE string,
notifications_url TYPE string,
organization_url TYPE string,
organization_repositories_url TYPE string,
organization_teams_url TYPE string,
public_gists_url TYPE string,
rate_limit_url TYPE string,
repository_url TYPE string,
repository_search_url TYPE string,
current_user_repositories_url TYPE string,
starred_url TYPE string,
starred_gists_url TYPE string,
topic_search_url TYPE string,
user_url TYPE string,
user_organizations_url TYPE string,
user_repositories_url TYPE string,
user_search_url TYPE string,
END OF response_meta_root.
* Component schema: response_apps_list_webhook_deliveries, array
TYPES response_apps_list_webhook_del TYPE STANDARD TABLE OF hook_delivery_item WITH DEFAULT KEY.
* Component schema: response_apps_list_installations, array
TYPES response_apps_list_installatio TYPE STANDARD TABLE OF installation WITH DEFAULT KEY.
* Component schema: response_codes_of_conduct_get_all_codes, array
TYPES response_codes_of_conduct_get_ TYPE STANDARD TABLE OF code_of_conduct WITH DEFAULT KEY.
* Component schema: response_emojis_get, object
TYPES: BEGIN OF response_emojis_get,
dummy_workaround TYPE i,
END OF response_emojis_get.
* Component schema: response_enterprise_admin_list_selected, object
TYPES: BEGIN OF response_enterprise_admin_list,
total_count TYPE f,
organizations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_enterprise_admin_list.
* Component schema: response_enterprise_admin_list_self_hos, object
TYPES: BEGIN OF response_enterprise_admin_li01,
total_count TYPE f,
runner_groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_enterprise_admin_li01.
* Component schema: response_enterprise_admin_list_org_acce, object
TYPES: BEGIN OF response_enterprise_admin_li02,
total_count TYPE f,
organizations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_enterprise_admin_li02.
* Component schema: response_enterprise_admin_list_self_h01, object
TYPES: BEGIN OF response_enterprise_admin_li03,
total_count TYPE f,
runners TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_enterprise_admin_li03.
* Component schema: response_enterprise_admin_list_self_h02, object
TYPES: BEGIN OF response_enterprise_admin_li04,
total_count TYPE f,
runners TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_enterprise_admin_li04.
* Component schema: response_enterprise_admin_list_runner_a, array
TYPES response_enterprise_admin_li05 TYPE STANDARD TABLE OF runner_application WITH DEFAULT KEY.
* Component schema: response_enterprise_admin_get_audit_log, array
TYPES response_enterprise_admin_get_ TYPE STANDARD TABLE OF audit_log_event WITH DEFAULT KEY.
* Component schema: response_secret_scanning_list_alerts_fo, array
TYPES response_secret_scanning_list_ TYPE STANDARD TABLE OF organization_secret_scanning_a WITH DEFAULT KEY.
* Component schema: response_activity_list_public_events, array
TYPES response_activity_list_public_ TYPE STANDARD TABLE OF event WITH DEFAULT KEY.
* Component schema: response_gists_list, array
TYPES response_gists_list TYPE STANDARD TABLE OF base_gist WITH DEFAULT KEY.
* Component schema: response_gists_list_public, array
TYPES response_gists_list_public TYPE STANDARD TABLE OF base_gist WITH DEFAULT KEY.
* Component schema: response_gists_list_starred, array
TYPES response_gists_list_starred TYPE STANDARD TABLE OF base_gist WITH DEFAULT KEY.
* Component schema: response_gists_list_comments, array
TYPES response_gists_list_comments TYPE STANDARD TABLE OF gist_comment WITH DEFAULT KEY.
* Component schema: response_gists_list_commits, array
TYPES response_gists_list_commits TYPE STANDARD TABLE OF gist_commit WITH DEFAULT KEY.
* Component schema: response_gists_list_forks, array
TYPES response_gists_list_forks TYPE STANDARD TABLE OF gist_simple WITH DEFAULT KEY.
* Component schema: response_gists_check_is_starred, object
TYPES: BEGIN OF response_gists_check_is_starre,
dummy_workaround TYPE i,
END OF response_gists_check_is_starre.
* Component schema: response_gitignore_get_all_templates, array
TYPES response_gitignore_get_all_tem TYPE string. " array todo
* Component schema: response_apps_list_repos_accessible_to_, object
TYPES: BEGIN OF response_apps_list_repos_acces,
total_count TYPE i,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
repository_selection TYPE string,
END OF response_apps_list_repos_acces.
* Component schema: response_issues_list, array
TYPES response_issues_list TYPE STANDARD TABLE OF issue WITH DEFAULT KEY.
* Component schema: response_licenses_get_all_commonly_used, array
TYPES response_licenses_get_all_comm TYPE STANDARD TABLE OF license_simple WITH DEFAULT KEY.
* Component schema: response_apps_list_plans, array
TYPES response_apps_list_plans TYPE STANDARD TABLE OF marketplace_listing_plan WITH DEFAULT KEY.
* Component schema: response_apps_list_accounts_for_plan, array
TYPES response_apps_list_accounts_fo TYPE STANDARD TABLE OF marketplace_purchase WITH DEFAULT KEY.
* Component schema: response_apps_list_plans_stubbed, array
TYPES response_apps_list_plans_stubb TYPE STANDARD TABLE OF marketplace_listing_plan WITH DEFAULT KEY.
* Component schema: response_apps_list_accounts_for_plan_st, array
TYPES response_apps_list_accounts_01 TYPE STANDARD TABLE OF marketplace_purchase WITH DEFAULT KEY.
* Component schema: response_activity_list_public_events_fo, array
TYPES response_activity_list_publi01 TYPE STANDARD TABLE OF event WITH DEFAULT KEY.
* Component schema: response_activity_list_notifications_fo, array
TYPES response_activity_list_notific TYPE STANDARD TABLE OF thread WITH DEFAULT KEY.
* Component schema: response_activity_mark_notifications_as, object
TYPES: BEGIN OF response_activity_mark_notific,
message TYPE string,
END OF response_activity_mark_notific.
* Component schema: response_orgs_list, array
TYPES response_orgs_list TYPE STANDARD TABLE OF organization_simple WITH DEFAULT KEY.
* Component schema: response_orgs_list_custom_roles, object
TYPES: BEGIN OF response_orgs_list_custom_role,
total_count TYPE i,
custom_roles TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_orgs_list_custom_role.
* Component schema: response_actions_list_selected_reposito, object
TYPES: BEGIN OF response_actions_list_selected,
total_count TYPE f,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_selected.
* Component schema: response_actions_list_self_hosted_runne, object
TYPES: BEGIN OF response_actions_list_self_hos,
total_count TYPE f,
runner_groups TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_self_hos.
* Component schema: response_actions_list_repo_access_to_se, object
TYPES: BEGIN OF response_actions_list_repo_acc,
total_count TYPE f,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_repo_acc.
* Component schema: response_actions_list_self_hosted_run01, object
TYPES: BEGIN OF response_actions_list_self_h01,
total_count TYPE f,
runners TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_self_h01.
* Component schema: response_actions_list_self_hosted_run02, object
TYPES: BEGIN OF response_actions_list_self_h02,
total_count TYPE i,
runners TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_self_h02.
* Component schema: response_actions_list_runner_applicatio, array
TYPES response_actions_list_runner_a TYPE STANDARD TABLE OF runner_application WITH DEFAULT KEY.
* Component schema: response_actions_list_org_secrets, object
TYPES: BEGIN OF response_actions_list_org_secr,
total_count TYPE i,
secrets TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_org_secr.
* Component schema: response_actions_list_selected_repos_fo, object
TYPES: BEGIN OF response_actions_list_select01,
total_count TYPE i,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_select01.
* Component schema: response_orgs_get_audit_log, array
TYPES response_orgs_get_audit_log TYPE STANDARD TABLE OF audit_log_event WITH DEFAULT KEY.
* Component schema: response_orgs_list_blocked_users, array
TYPES response_orgs_list_blocked_use TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_code_scanning_list_alerts_for_, array
TYPES response_code_scanning_list_al TYPE STANDARD TABLE OF code_scanning_organization_ale WITH DEFAULT KEY.
* Component schema: response_orgs_list_saml_sso_authorizati, array
TYPES response_orgs_list_saml_sso_au TYPE STANDARD TABLE OF credential_authorization WITH DEFAULT KEY.
* Component schema: response_dependabot_list_org_secrets, object
TYPES: BEGIN OF response_dependabot_list_org_s,
total_count TYPE i,
secrets TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_dependabot_list_org_s.
* Component schema: response_dependabot_list_selected_repos, object
TYPES: BEGIN OF response_dependabot_list_selec,
total_count TYPE i,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_dependabot_list_selec.
* Component schema: response_activity_list_public_org_event, array
TYPES response_activity_list_publi02 TYPE STANDARD TABLE OF event WITH DEFAULT KEY.
* Component schema: response_orgs_list_failed_invitations, array
TYPES response_orgs_list_failed_invi TYPE STANDARD TABLE OF organization_invitation WITH DEFAULT KEY.
* Component schema: response_orgs_list_webhooks, array
TYPES response_orgs_list_webhooks TYPE STANDARD TABLE OF org_hook WITH DEFAULT KEY.
* Component schema: response_orgs_list_webhook_deliveries, array
TYPES response_orgs_list_webhook_del TYPE STANDARD TABLE OF hook_delivery_item WITH DEFAULT KEY.
* Component schema: response_orgs_list_app_installations, object
TYPES: BEGIN OF response_orgs_list_app_install,
total_count TYPE i,
installations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_orgs_list_app_install.
* Component schema: response_orgs_list_pending_invitations, array
TYPES response_orgs_list_pending_inv TYPE STANDARD TABLE OF organization_invitation WITH DEFAULT KEY.
* Component schema: response_orgs_list_invitation_teams, array
TYPES response_orgs_list_invitation_ TYPE STANDARD TABLE OF team WITH DEFAULT KEY.
* Component schema: response_issues_list_for_org, array
TYPES response_issues_list_for_org TYPE STANDARD TABLE OF issue WITH DEFAULT KEY.
* Component schema: response_orgs_list_members, array
TYPES response_orgs_list_members TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_migrations_list_for_org, array
TYPES response_migrations_list_for_o TYPE STANDARD TABLE OF migration WITH DEFAULT KEY.
* Component schema: response_migrations_list_repos_for_org, array
TYPES response_migrations_list_repos TYPE STANDARD TABLE OF minimal_repository WITH DEFAULT KEY.
* Component schema: response_orgs_list_outside_collaborator, array
TYPES response_orgs_list_outside_col TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_orgs_convert_member_to_outside, object
TYPES: BEGIN OF response_orgs_convert_member_t,
dummy_workaround TYPE i,
END OF response_orgs_convert_member_t.
* Component schema: response_orgs_remove_outside_collaborat, object
TYPES: BEGIN OF response_orgs_remove_outside_c,
message TYPE string,
documentation_url TYPE string,
END OF response_orgs_remove_outside_c.
* Component schema: response_packages_list_packages_for_org, array
TYPES response_packages_list_package TYPE STANDARD TABLE OF package WITH DEFAULT KEY.
* Component schema: response_packages_get_all_package_versi, array
TYPES response_packages_get_all_pack TYPE STANDARD TABLE OF package_version WITH DEFAULT KEY.
* Component schema: response_projects_list_for_org, array
TYPES response_projects_list_for_org TYPE STANDARD TABLE OF project WITH DEFAULT KEY.
* Component schema: response_orgs_list_public_members, array
TYPES response_orgs_list_public_memb TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_repos_list_for_org, array
TYPES response_repos_list_for_org TYPE STANDARD TABLE OF minimal_repository WITH DEFAULT KEY.
* Component schema: response_secret_scanning_list_alerts_01, array
TYPES response_secret_scanning_lis01 TYPE STANDARD TABLE OF organization_secret_scanning_a WITH DEFAULT KEY.
* Component schema: response_teams_list, array
TYPES response_teams_list TYPE STANDARD TABLE OF team WITH DEFAULT KEY.
* Component schema: response_teams_list_discussions_in_org, array
TYPES response_teams_list_discussion TYPE STANDARD TABLE OF team_discussion WITH DEFAULT KEY.
* Component schema: response_teams_list_discussion_comments, array
TYPES response_teams_list_discussi01 TYPE STANDARD TABLE OF team_discussion_comment WITH DEFAULT KEY.
* Component schema: response_reactions_list_for_team_discus, array
TYPES response_reactions_list_for_te TYPE STANDARD TABLE OF reaction WITH DEFAULT KEY.
* Component schema: response_reactions_list_for_team_disc01, array
TYPES response_reactions_list_for_01 TYPE STANDARD TABLE OF reaction WITH DEFAULT KEY.
* Component schema: response_teams_list_pending_invitations, array
TYPES response_teams_list_pending_in TYPE STANDARD TABLE OF organization_invitation WITH DEFAULT KEY.
* Component schema: response_teams_list_members_in_org, array
TYPES response_teams_list_members_in TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_teams_list_projects_in_org, array
TYPES response_teams_list_projects_i TYPE STANDARD TABLE OF team_project WITH DEFAULT KEY.
* Component schema: response_teams_add_or_update_project_pe, object
TYPES: BEGIN OF response_teams_add_or_update_p,
message TYPE string,
documentation_url TYPE string,
END OF response_teams_add_or_update_p.
* Component schema: response_teams_list_repos_in_org, array
TYPES response_teams_list_repos_in_o TYPE STANDARD TABLE OF minimal_repository WITH DEFAULT KEY.
* Component schema: response_teams_list_child_in_org, array
TYPES response_teams_list_child_in_o TYPE STANDARD TABLE OF team WITH DEFAULT KEY.
* Component schema: response_projects_delete_card, object
TYPES: BEGIN OF response_projects_delete_card,
message TYPE string,
documentation_url TYPE string,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_projects_delete_card.
* Component schema: response_projects_move_card, object
TYPES: BEGIN OF response_projects_move_card,
dummy_workaround TYPE i,
END OF response_projects_move_card.
* Component schema: response_projects_move_card, object
TYPES: BEGIN OF response_projects_move_card01,
message TYPE string,
documentation_url TYPE string,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_projects_move_card01.
* Component schema: response_projects_move_card, object
TYPES: BEGIN OF response_projects_move_card02,
code TYPE string,
message TYPE string,
documentation_url TYPE string,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_projects_move_card02.
* Component schema: response_projects_list_cards, array
TYPES response_projects_list_cards TYPE STANDARD TABLE OF project_card WITH DEFAULT KEY.
* Component schema: response_projects_create_card, object
TYPES: BEGIN OF response_projects_create_card,
code TYPE string,
message TYPE string,
documentation_url TYPE string,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_projects_create_card.
* Component schema: response_projects_move_column, object
TYPES: BEGIN OF response_projects_move_column,
dummy_workaround TYPE i,
END OF response_projects_move_column.
* Component schema: response_projects_update, object
TYPES: BEGIN OF response_projects_update,
message TYPE string,
documentation_url TYPE string,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_projects_update.
* Component schema: response_projects_delete, object
TYPES: BEGIN OF response_projects_delete,
message TYPE string,
documentation_url TYPE string,
errors TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_projects_delete.
* Component schema: response_projects_list_collaborators, array
TYPES response_projects_list_collabo TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_projects_list_columns, array
TYPES response_projects_list_columns TYPE STANDARD TABLE OF project_column WITH DEFAULT KEY.
* Component schema: response_repos_delete, object
TYPES: BEGIN OF response_repos_delete,
message TYPE string,
documentation_url TYPE string,
END OF response_repos_delete.
* Component schema: response_actions_list_artifacts_for_rep, object
TYPES: BEGIN OF response_actions_list_artifact,
total_count TYPE i,
artifacts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_artifact.
* Component schema: response_actions_list_self_hosted_run03, object
TYPES: BEGIN OF response_actions_list_self_h03,
total_count TYPE i,
runners TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_self_h03.
* Component schema: response_actions_list_runner_applicat01, array
TYPES response_actions_list_runner01 TYPE STANDARD TABLE OF runner_application WITH DEFAULT KEY.
* Component schema: response_actions_list_workflow_runs_for, object
TYPES: BEGIN OF response_actions_list_workflow,
total_count TYPE i,
workflow_runs TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_workflow.
* Component schema: response_actions_get_reviews_for_run, array
TYPES response_actions_get_reviews_f TYPE STANDARD TABLE OF environment_approvals WITH DEFAULT KEY.
* Component schema: response_actions_list_workflow_run_arti, object
TYPES: BEGIN OF response_actions_list_workfl01,
total_count TYPE i,
artifacts TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_workfl01.
* Component schema: response_actions_list_jobs_for_workflow, object
TYPES: BEGIN OF response_actions_list_jobs_for,
total_count TYPE i,
jobs TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_jobs_for.
* Component schema: response_actions_cancel_workflow_run, object
TYPES: BEGIN OF response_actions_cancel_workfl,
dummy_workaround TYPE i,
END OF response_actions_cancel_workfl.
* Component schema: response_actions_list_jobs_for_workfl01, object
TYPES: BEGIN OF response_actions_list_jobs_f01,
total_count TYPE i,
jobs TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_jobs_f01.
* Component schema: response_actions_get_pending_deployment, array
TYPES response_actions_get_pending_d TYPE STANDARD TABLE OF pending_deployment WITH DEFAULT KEY.
* Component schema: response_actions_review_pending_deploym, array
TYPES response_actions_review_pendin TYPE STANDARD TABLE OF deployment WITH DEFAULT KEY.
* Component schema: response_actions_list_repo_secrets, object
TYPES: BEGIN OF response_actions_list_repo_sec,
total_count TYPE i,
secrets TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_repo_sec.
* Component schema: response_actions_create_or_update_repo_, object
TYPES: BEGIN OF response_actions_create_or_upd,
dummy_workaround TYPE i,
END OF response_actions_create_or_upd.
* Component schema: response_actions_list_repo_workflows, object
TYPES: BEGIN OF response_actions_list_repo_wor,
total_count TYPE i,
workflows TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_repo_wor.
* Component schema: response_actions_list_workflow_runs, object
TYPES: BEGIN OF response_actions_list_workfl02,
total_count TYPE i,
workflow_runs TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_workfl02.
* Component schema: response_issues_list_assignees, array
TYPES response_issues_list_assignees TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_repos_list_autolinks, array
TYPES response_repos_list_autolinks TYPE STANDARD TABLE OF autolink WITH DEFAULT KEY.
* Component schema: response_repos_list_branches, array
TYPES response_repos_list_branches TYPE STANDARD TABLE OF short_branch WITH DEFAULT KEY.
* Component schema: response_repos_get_all_status_check_con, array
TYPES response_repos_get_all_status_ TYPE string. " array todo
* Component schema: response_repos_add_status_check_context, array
TYPES response_repos_add_status_chec TYPE string. " array todo
* Component schema: response_repos_set_status_check_context, array
TYPES response_repos_set_status_chec TYPE string. " array todo
* Component schema: response_repos_remove_status_check_cont, array
TYPES response_repos_remove_status_c TYPE string. " array todo
* Component schema: response_repos_get_apps_with_access_to_, array
TYPES response_repos_get_apps_with_a TYPE STANDARD TABLE OF integration WITH DEFAULT KEY.
* Component schema: response_repos_add_app_access_restricti, array
TYPES response_repos_add_app_access_ TYPE STANDARD TABLE OF integration WITH DEFAULT KEY.
* Component schema: response_repos_set_app_access_restricti, array
TYPES response_repos_set_app_access_ TYPE STANDARD TABLE OF integration WITH DEFAULT KEY.
* Component schema: response_repos_remove_app_access_restri, array
TYPES response_repos_remove_app_acce TYPE STANDARD TABLE OF integration WITH DEFAULT KEY.
* Component schema: response_repos_get_teams_with_access_to, array
TYPES response_repos_get_teams_with_ TYPE STANDARD TABLE OF team WITH DEFAULT KEY.
* Component schema: response_repos_add_team_access_restrict, array
TYPES response_repos_add_team_access TYPE STANDARD TABLE OF team WITH DEFAULT KEY.
* Component schema: response_repos_set_team_access_restrict, array
TYPES response_repos_set_team_access TYPE STANDARD TABLE OF team WITH DEFAULT KEY.
* Component schema: response_repos_remove_team_access_restr, array
TYPES response_repos_remove_team_acc TYPE STANDARD TABLE OF team WITH DEFAULT KEY.
* Component schema: response_repos_get_users_with_access_to, array
TYPES response_repos_get_users_with_ TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_repos_add_user_access_restrict, array
TYPES response_repos_add_user_access TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_repos_set_user_access_restrict, array
TYPES response_repos_set_user_access TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_repos_remove_user_access_restr, array
TYPES response_repos_remove_user_acc TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_checks_list_annotations, array
TYPES response_checks_list_annotatio TYPE STANDARD TABLE OF check_annotation WITH DEFAULT KEY.
* Component schema: response_checks_rerequest_run, object
TYPES: BEGIN OF response_checks_rerequest_run,
dummy_workaround TYPE i,
END OF response_checks_rerequest_run.
* Component schema: response_checks_list_for_suite, object
TYPES: BEGIN OF response_checks_list_for_suite,
total_count TYPE i,
check_runs TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_checks_list_for_suite.
* Component schema: response_checks_rerequest_suite, object
TYPES: BEGIN OF response_checks_rerequest_suit,
dummy_workaround TYPE i,
END OF response_checks_rerequest_suit.
* Component schema: response_code_scanning_list_alerts_fo01, array
TYPES response_code_scanning_list_01 TYPE STANDARD TABLE OF code_scanning_alert_items WITH DEFAULT KEY.
* Component schema: response_code_scanning_list_alert_insta, array
TYPES response_code_scanning_list_02 TYPE STANDARD TABLE OF code_scanning_alert_instance WITH DEFAULT KEY.
* Component schema: response_code_scanning_list_recent_anal, array
TYPES response_code_scanning_list_re TYPE STANDARD TABLE OF code_scanning_analysis WITH DEFAULT KEY.
* Component schema: response_codespaces_list_in_repository_, object
TYPES: BEGIN OF response_codespaces_list_in_re,
total_count TYPE i,
codespaces TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_codespaces_list_in_re.
* Component schema: response_codespaces_repo_machines_for_a, object
TYPES: BEGIN OF response_codespaces_repo_machi,
total_count TYPE i,
machines TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_codespaces_repo_machi.
* Component schema: response_repos_list_collaborators, array
TYPES response_repos_list_collaborat TYPE STANDARD TABLE OF collaborator WITH DEFAULT KEY.
* Component schema: response_repos_list_commit_comments_for, array
TYPES response_repos_list_commit_com TYPE STANDARD TABLE OF commit_comment WITH DEFAULT KEY.
* Component schema: response_reactions_list_for_commit_comm, array
TYPES response_reactions_list_for_co TYPE STANDARD TABLE OF reaction WITH DEFAULT KEY.
* Component schema: response_repos_list_commits, array
TYPES response_repos_list_commits TYPE STANDARD TABLE OF commit WITH DEFAULT KEY.
* Component schema: response_repos_list_branches_for_head_c, array
TYPES response_repos_list_branches_f TYPE STANDARD TABLE OF branch_short WITH DEFAULT KEY.
* Component schema: response_repos_list_comments_for_commit, array
TYPES response_repos_list_comments_f TYPE STANDARD TABLE OF commit_comment WITH DEFAULT KEY.
* Component schema: response_repos_list_pull_requests_assoc, array
TYPES response_repos_list_pull_reque TYPE STANDARD TABLE OF pull_request_simple WITH DEFAULT KEY.
* Component schema: response_checks_list_for_ref, object
TYPES: BEGIN OF response_checks_list_for_ref,
total_count TYPE i,
check_runs TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_checks_list_for_ref.
* Component schema: response_checks_list_suites_for_ref, object
TYPES: BEGIN OF response_checks_list_suites_fo,
total_count TYPE i,
check_suites TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_checks_list_suites_fo.
* Component schema: response_repos_list_commit_statuses_for, array
TYPES response_repos_list_commit_sta TYPE STANDARD TABLE OF status WITH DEFAULT KEY.
* Component schema: response_repos_list_contributors, array
TYPES response_repos_list_contributo TYPE STANDARD TABLE OF contributor WITH DEFAULT KEY.
* Component schema: response_dependabot_list_repo_secrets, object
TYPES: BEGIN OF response_dependabot_list_repo_,
total_count TYPE i,
secrets TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_dependabot_list_repo_.
* Component schema: response_dependabot_create_or_update_re, object
TYPES: BEGIN OF response_dependabot_create_or_,
dummy_workaround TYPE i,
END OF response_dependabot_create_or_.
* Component schema: response_repos_list_deployments, array
TYPES response_repos_list_deployment TYPE STANDARD TABLE OF deployment WITH DEFAULT KEY.
* Component schema: response_repos_create_deployment, object
TYPES: BEGIN OF response_repos_create_deployme,
message TYPE string,
END OF response_repos_create_deployme.
* Component schema: response_repos_list_deployment_statuses, array
TYPES response_repos_list_deployme01 TYPE STANDARD TABLE OF deployment_status WITH DEFAULT KEY.
* Component schema: response_repos_get_all_environments, object
TYPES: BEGIN OF response_repos_get_all_environ,
total_count TYPE i,
environments TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_repos_get_all_environ.
* Component schema: response_activity_list_repo_events, array
TYPES response_activity_list_repo_ev TYPE STANDARD TABLE OF event WITH DEFAULT KEY.
* Component schema: response_repos_list_forks, array
TYPES response_repos_list_forks TYPE STANDARD TABLE OF minimal_repository WITH DEFAULT KEY.
* Component schema: response_git_list_matching_refs, array
TYPES response_git_list_matching_ref TYPE STANDARD TABLE OF git_ref WITH DEFAULT KEY.
* Component schema: response_repos_list_webhooks, array
TYPES response_repos_list_webhooks TYPE STANDARD TABLE OF hook WITH DEFAULT KEY.
* Component schema: response_repos_list_webhook_deliveries, array
TYPES response_repos_list_webhook_de TYPE STANDARD TABLE OF hook_delivery_item WITH DEFAULT KEY.
* Component schema: response_migrations_get_commit_authors, array
TYPES response_migrations_get_commit TYPE STANDARD TABLE OF porter_author WITH DEFAULT KEY.
* Component schema: response_migrations_get_large_files, array
TYPES response_migrations_get_large_ TYPE STANDARD TABLE OF porter_large_file WITH DEFAULT KEY.
* Component schema: response_repos_list_invitations, array
TYPES response_repos_list_invitation TYPE STANDARD TABLE OF repository_invitation WITH DEFAULT KEY.
* Component schema: response_issues_list_for_repo, array
TYPES response_issues_list_for_repo TYPE STANDARD TABLE OF issue WITH DEFAULT KEY.
* Component schema: response_issues_list_comments_for_repo, array
TYPES response_issues_list_comments_ TYPE STANDARD TABLE OF issue_comment WITH DEFAULT KEY.
* Component schema: response_reactions_list_for_issue_comme, array
TYPES response_reactions_list_for_is TYPE STANDARD TABLE OF reaction WITH DEFAULT KEY.
* Component schema: response_issues_list_events_for_repo, array
TYPES response_issues_list_events_fo TYPE STANDARD TABLE OF issue_event WITH DEFAULT KEY.
* Component schema: response_issues_list_comments, array
TYPES response_issues_list_comments TYPE STANDARD TABLE OF issue_comment WITH DEFAULT KEY.
* Component schema: response_issues_list_events, array
TYPES response_issues_list_events TYPE STANDARD TABLE OF issue_event_for_issue WITH DEFAULT KEY.
* Component schema: response_issues_list_labels_on_issue, array
TYPES response_issues_list_labels_on TYPE STANDARD TABLE OF label WITH DEFAULT KEY.
* Component schema: response_issues_add_labels, array
TYPES response_issues_add_labels TYPE STANDARD TABLE OF label WITH DEFAULT KEY.
* Component schema: response_issues_set_labels, array
TYPES response_issues_set_labels TYPE STANDARD TABLE OF label WITH DEFAULT KEY.
* Component schema: response_issues_remove_label, array
TYPES response_issues_remove_label TYPE STANDARD TABLE OF label WITH DEFAULT KEY.
* Component schema: response_reactions_list_for_issue, array
TYPES response_reactions_list_for_02 TYPE STANDARD TABLE OF reaction WITH DEFAULT KEY.
* Component schema: response_issues_list_events_for_timelin, array
TYPES response_issues_list_events_01 TYPE STANDARD TABLE OF timeline_issue_events WITH DEFAULT KEY.
* Component schema: response_repos_list_deploy_keys, array
TYPES response_repos_list_deploy_key TYPE STANDARD TABLE OF deploy_key WITH DEFAULT KEY.
* Component schema: response_issues_list_labels_for_repo, array
TYPES response_issues_list_labels_fo TYPE STANDARD TABLE OF label WITH DEFAULT KEY.
* Component schema: response_issues_list_milestones, array
TYPES response_issues_list_milestone TYPE STANDARD TABLE OF milestone WITH DEFAULT KEY.
* Component schema: response_issues_list_labels_for_milesto, array
TYPES response_issues_list_labels_01 TYPE STANDARD TABLE OF label WITH DEFAULT KEY.
* Component schema: response_activity_list_repo_notificatio, array
TYPES response_activity_list_repo_no TYPE STANDARD TABLE OF thread WITH DEFAULT KEY.
* Component schema: response_activity_mark_repo_notificatio, object
TYPES: BEGIN OF response_activity_mark_repo_no,
message TYPE string,
url TYPE string,
END OF response_activity_mark_repo_no.
* Component schema: response_repos_list_pages_builds, array
TYPES response_repos_list_pages_buil TYPE STANDARD TABLE OF page_build WITH DEFAULT KEY.
* Component schema: response_projects_list_for_repo, array
TYPES response_projects_list_for_rep TYPE STANDARD TABLE OF project WITH DEFAULT KEY.
* Component schema: response_pulls_list, array
TYPES response_pulls_list TYPE STANDARD TABLE OF pull_request_simple WITH DEFAULT KEY.
* Component schema: response_pulls_list_review_comments_for, array
TYPES response_pulls_list_review_com TYPE STANDARD TABLE OF pull_request_review_comment WITH DEFAULT KEY.
* Component schema: response_reactions_list_for_pull_reques, array
TYPES response_reactions_list_for_pu TYPE STANDARD TABLE OF reaction WITH DEFAULT KEY.
* Component schema: response_pulls_list_review_comments, array
TYPES response_pulls_list_review_c01 TYPE STANDARD TABLE OF pull_request_review_comment WITH DEFAULT KEY.
* Component schema: response_pulls_list_commits, array
TYPES response_pulls_list_commits TYPE STANDARD TABLE OF commit WITH DEFAULT KEY.
* Component schema: response_pulls_list_files, array
TYPES response_pulls_list_files TYPE STANDARD TABLE OF diff_entry WITH DEFAULT KEY.
* Component schema: response_pulls_merge, object
TYPES: BEGIN OF response_pulls_merge,
message TYPE string,
documentation_url TYPE string,
END OF response_pulls_merge.
* Component schema: response_pulls_merge, object
TYPES: BEGIN OF response_pulls_merge01,
message TYPE string,
documentation_url TYPE string,
END OF response_pulls_merge01.
* Component schema: response_pulls_list_reviews, array
TYPES response_pulls_list_reviews TYPE STANDARD TABLE OF pull_request_review WITH DEFAULT KEY.
* Component schema: response_pulls_list_comments_for_review, array
TYPES response_pulls_list_comments_f TYPE STANDARD TABLE OF review_comment WITH DEFAULT KEY.
* Component schema: response_pulls_update_branch, object
TYPES: BEGIN OF response_pulls_update_branch,
message TYPE string,
url TYPE string,
END OF response_pulls_update_branch.
* Component schema: response_repos_list_releases, array
TYPES response_repos_list_releases TYPE STANDARD TABLE OF release WITH DEFAULT KEY.
* Component schema: response_repos_list_release_assets, array
TYPES response_repos_list_release_as TYPE STANDARD TABLE OF release_asset WITH DEFAULT KEY.
* Component schema: response_secret_scanning_list_alerts_02, array
TYPES response_secret_scanning_lis02 TYPE STANDARD TABLE OF secret_scanning_alert WITH DEFAULT KEY.
* Component schema: response_secret_scanning_list_locations, array
TYPES response_secret_scanning_lis03 TYPE STANDARD TABLE OF secret_scanning_location WITH DEFAULT KEY.
* Component schema: response_repos_get_code_frequency_stats, array
TYPES response_repos_get_code_freque TYPE STANDARD TABLE OF code_frequency_stat WITH DEFAULT KEY.
* Component schema: response_repos_get_commit_activity_stat, array
TYPES response_repos_get_commit_acti TYPE STANDARD TABLE OF commit_activity WITH DEFAULT KEY.
* Component schema: response_repos_get_contributors_stats, array
TYPES response_repos_get_contributor TYPE STANDARD TABLE OF contributor_activity WITH DEFAULT KEY.
* Component schema: response_repos_get_punch_card_stats, array
TYPES response_repos_get_punch_card_ TYPE STANDARD TABLE OF code_frequency_stat WITH DEFAULT KEY.
* Component schema: response_activity_list_watchers_for_rep, array
TYPES response_activity_list_watcher TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_repos_list_tags, array
TYPES response_repos_list_tags TYPE STANDARD TABLE OF tag WITH DEFAULT KEY.
* Component schema: response_repos_list_teams, array
TYPES response_repos_list_teams TYPE STANDARD TABLE OF team WITH DEFAULT KEY.
* Component schema: response_repos_get_top_paths, array
TYPES response_repos_get_top_paths TYPE STANDARD TABLE OF content_traffic WITH DEFAULT KEY.
* Component schema: response_repos_get_top_referrers, array
TYPES response_repos_get_top_referre TYPE STANDARD TABLE OF referrer_traffic WITH DEFAULT KEY.
* Component schema: response_repos_list_public, array
TYPES response_repos_list_public TYPE STANDARD TABLE OF minimal_repository WITH DEFAULT KEY.
* Component schema: response_actions_list_environment_secre, object
TYPES: BEGIN OF response_actions_list_environm,
total_count TYPE i,
secrets TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_actions_list_environm.
* Component schema: response_search_code, object
TYPES: BEGIN OF response_search_code,
total_count TYPE i,
incomplete_results TYPE abap_bool,
items TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_search_code.
* Component schema: response_search_commits, object
TYPES: BEGIN OF response_search_commits,
total_count TYPE i,
incomplete_results TYPE abap_bool,
items TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_search_commits.
* Component schema: response_search_issues_and_pull_request, object
TYPES: BEGIN OF response_search_issues_and_pul,
total_count TYPE i,
incomplete_results TYPE abap_bool,
items TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_search_issues_and_pul.
* Component schema: response_search_labels, object
TYPES: BEGIN OF response_search_labels,
total_count TYPE i,
incomplete_results TYPE abap_bool,
items TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_search_labels.
* Component schema: response_search_repos, object
TYPES: BEGIN OF response_search_repos,
total_count TYPE i,
incomplete_results TYPE abap_bool,
items TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_search_repos.
* Component schema: response_search_topics, object
TYPES: BEGIN OF response_search_topics,
total_count TYPE i,
incomplete_results TYPE abap_bool,
items TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_search_topics.
* Component schema: response_search_users, object
TYPES: BEGIN OF response_search_users,
total_count TYPE i,
incomplete_results TYPE abap_bool,
items TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_search_users.
* Component schema: response_users_list_blocked_by_authenti, array
TYPES response_users_list_blocked_by TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_codespaces_list_for_authentica, object
TYPES: BEGIN OF response_codespaces_list_for_a,
total_count TYPE i,
codespaces TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_codespaces_list_for_a.
* Component schema: response_codespaces_list_secrets_for_au, object
TYPES: BEGIN OF response_codespaces_list_secre,
total_count TYPE i,
secrets TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_codespaces_list_secre.
* Component schema: response_codespaces_create_or_update_se, object
TYPES: BEGIN OF response_codespaces_create_or_,
dummy_workaround TYPE i,
END OF response_codespaces_create_or_.
* Component schema: response_codespaces_list_repositories_f, object
TYPES: BEGIN OF response_codespaces_list_repos,
total_count TYPE i,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_codespaces_list_repos.
* Component schema: response_codespaces_codespace_machines_, object
TYPES: BEGIN OF response_codespaces_codespace_,
total_count TYPE i,
machines TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_codespaces_codespace_.
* Component schema: response_users_set_primary_email_visibi, array
TYPES response_users_set_primary_ema TYPE STANDARD TABLE OF email WITH DEFAULT KEY.
* Component schema: response_users_list_emails_for_authenti, array
TYPES response_users_list_emails_for TYPE STANDARD TABLE OF email WITH DEFAULT KEY.
* Component schema: response_users_add_email_for_authentica, array
TYPES response_users_add_email_for_a TYPE STANDARD TABLE OF email WITH DEFAULT KEY.
* Component schema: response_users_list_followers_for_authe, array
TYPES response_users_list_followers_ TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_users_list_followed_by_authent, array
TYPES response_users_list_followed_b TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_users_list_gpg_keys_for_authen, array
TYPES response_users_list_gpg_keys_f TYPE STANDARD TABLE OF gpg_key WITH DEFAULT KEY.
* Component schema: response_apps_list_installations_for_au, object
TYPES: BEGIN OF response_apps_list_installat01,
total_count TYPE i,
installations TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_apps_list_installat01.
* Component schema: response_apps_list_installation_repos_f, object
TYPES: BEGIN OF response_apps_list_installat02,
total_count TYPE i,
repository_selection TYPE string,
repositories TYPE STANDARD TABLE OF string WITH DEFAULT KEY, " todo, handle array
END OF response_apps_list_installat02.
* Component schema: response_issues_list_for_authenticated_, array
TYPES response_issues_list_for_authe TYPE STANDARD TABLE OF issue WITH DEFAULT KEY.
* Component schema: response_users_list_public_ssh_keys_for, array
TYPES response_users_list_public_ssh TYPE STANDARD TABLE OF key WITH DEFAULT KEY.
* Component schema: response_apps_list_subscriptions_for_au, array
TYPES response_apps_list_subscriptio TYPE STANDARD TABLE OF user_marketplace_purchase WITH DEFAULT KEY.
* Component schema: response_apps_list_subscriptions_for_01, array
TYPES response_apps_list_subscript01 TYPE STANDARD TABLE OF user_marketplace_purchase WITH DEFAULT KEY.
* Component schema: response_orgs_list_memberships_for_auth, array
TYPES response_orgs_list_memberships TYPE STANDARD TABLE OF org_membership WITH DEFAULT KEY.
* Component schema: response_migrations_list_for_authentica, array
TYPES response_migrations_list_for_a TYPE STANDARD TABLE OF migration WITH DEFAULT KEY.
* Component schema: response_migrations_list_repos_for_auth, array
TYPES response_migrations_list_rep01 TYPE STANDARD TABLE OF minimal_repository WITH DEFAULT KEY.
* Component schema: response_orgs_list_for_authenticated_us, array
TYPES response_orgs_list_for_authent TYPE STANDARD TABLE OF organization_simple WITH DEFAULT KEY.
* Component schema: response_packages_list_packages_for_aut, array
TYPES response_packages_list_packa01 TYPE STANDARD TABLE OF package WITH DEFAULT KEY.
* Component schema: response_packages_get_all_package_ver01, array
TYPES response_packages_get_all_pa01 TYPE STANDARD TABLE OF package_version WITH DEFAULT KEY.
* Component schema: response_users_list_public_emails_for_a, array
TYPES response_users_list_public_ema TYPE STANDARD TABLE OF email WITH DEFAULT KEY.
* Component schema: response_repos_list_for_authenticated_u, array
TYPES response_repos_list_for_authen TYPE STANDARD TABLE OF repository WITH DEFAULT KEY.
* Component schema: response_repos_list_invitations_for_aut, array
TYPES response_repos_list_invitati01 TYPE STANDARD TABLE OF repository_invitation WITH DEFAULT KEY.
* Component schema: response_activity_list_repos_starred_by, array
TYPES response_activity_list_repos_s TYPE STANDARD TABLE OF repository WITH DEFAULT KEY.
* Component schema: response_activity_list_watched_repos_fo, array
TYPES response_activity_list_watched TYPE STANDARD TABLE OF minimal_repository WITH DEFAULT KEY.
* Component schema: response_teams_list_for_authenticated_u, array
TYPES response_teams_list_for_authen TYPE STANDARD TABLE OF team_full WITH DEFAULT KEY.
* Component schema: response_users_list, array
TYPES response_users_list TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_activity_list_events_for_authe, array
TYPES response_activity_list_events_ TYPE STANDARD TABLE OF event WITH DEFAULT KEY.
* Component schema: response_activity_list_org_events_for_a, array
TYPES response_activity_list_org_eve TYPE STANDARD TABLE OF event WITH DEFAULT KEY.
* Component schema: response_activity_list_public_events_01, array
TYPES response_activity_list_publi03 TYPE STANDARD TABLE OF event WITH DEFAULT KEY.
* Component schema: response_users_list_followers_for_user, array
TYPES response_users_list_follower01 TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_users_list_following_for_user, array
TYPES response_users_list_following_ TYPE STANDARD TABLE OF simple_user WITH DEFAULT KEY.
* Component schema: response_gists_list_for_user, array
TYPES response_gists_list_for_user TYPE STANDARD TABLE OF base_gist WITH DEFAULT KEY.
* Component schema: response_users_list_gpg_keys_for_user, array
TYPES response_users_list_gpg_keys01 TYPE STANDARD TABLE OF gpg_key WITH DEFAULT KEY.
* Component schema: response_users_list_public_keys_for_use, array
TYPES response_users_list_public_key TYPE STANDARD TABLE OF key_simple WITH DEFAULT KEY.
* Component schema: response_orgs_list_for_user, array
TYPES response_orgs_list_for_user TYPE STANDARD TABLE OF organization_simple WITH DEFAULT KEY.
* Component schema: response_packages_list_packages_for_use, array
TYPES response_packages_list_packa02 TYPE STANDARD TABLE OF package WITH DEFAULT KEY.
* Component schema: response_packages_get_all_package_ver02, array
TYPES response_packages_get_all_pa02 TYPE STANDARD TABLE OF package_version WITH DEFAULT KEY.
* Component schema: response_projects_list_for_user, array
TYPES response_projects_list_for_use TYPE STANDARD TABLE OF project WITH DEFAULT KEY.
* Component schema: response_activity_list_received_events_, array
TYPES response_activity_list_receive TYPE STANDARD TABLE OF event WITH DEFAULT KEY.
* Component schema: response_activity_list_received_public_, array
TYPES response_activity_list_recei01 TYPE STANDARD TABLE OF event WITH DEFAULT KEY.
* Component schema: response_repos_list_for_user, array
TYPES response_repos_list_for_user TYPE STANDARD TABLE OF minimal_repository WITH DEFAULT KEY.
* Component schema: response_activity_list_repos_watched_by, array
TYPES response_activity_list_repos_w TYPE STANDARD TABLE OF minimal_repository WITH DEFAULT KEY.
* GET - "GitHub API Root"
* Operation id: meta/root
* Response: 200
* application/json, #/components/schemas/response_meta_root
METHODS meta_root
RETURNING
VALUE(return_data) TYPE response_meta_root
RAISING cx_static_check.
* GET - "Get the authenticated app"
* Operation id: apps/get-authenticated
* Response: 200
* application/json, #/components/schemas/integration
METHODS apps_get_authenticated
RETURNING
VALUE(return_data) TYPE integration
RAISING cx_static_check.
* POST - "Create a GitHub App from a manifest"
* Operation id: apps/create-from-manifest
* Parameter: code, required, path
* Response: 201
* application/json, string
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyapps_create_from_manifest
METHODS apps_create_from_manifest
IMPORTING
code TYPE string
body TYPE bodyapps_create_from_manifest
RAISING cx_static_check.
* GET - "Get a webhook configuration for an app"
* Operation id: apps/get-webhook-config-for-app
* Response: 200
* application/json, #/components/schemas/webhook-config
METHODS apps_get_webhook_config_for_ap
RETURNING
VALUE(return_data) TYPE webhook_config
RAISING cx_static_check.
* PATCH - "Update a webhook configuration for an app"
* Operation id: apps/update-webhook-config-for-app
* Response: 200
* application/json, #/components/schemas/webhook-config
* Body ref: #/components/schemas/bodyapps_update_webhook_config
METHODS apps_update_webhook_config_for
IMPORTING
body TYPE bodyapps_update_webhook_config
RETURNING
VALUE(return_data) TYPE webhook_config
RAISING cx_static_check.
* GET - "List deliveries for an app webhook"
* Operation id: apps/list-webhook-deliveries
* Parameter: per_page, optional, query
* Parameter: cursor, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_webhook_deliveries
* Response: 400
* Response: 422
METHODS apps_list_webhook_deliveries
IMPORTING
per_page TYPE i DEFAULT 30
cursor TYPE string OPTIONAL
RETURNING
VALUE(return_data) TYPE response_apps_list_webhook_del
RAISING cx_static_check.
* GET - "Get a delivery for an app webhook"
* Operation id: apps/get-webhook-delivery
* Parameter: delivery_id, required, path
* Response: 200
* application/json, #/components/schemas/hook-delivery
* Response: 400
* Response: 422
METHODS apps_get_webhook_delivery
IMPORTING
delivery_id TYPE i
RETURNING
VALUE(return_data) TYPE hook_delivery
RAISING cx_static_check.
* POST - "Redeliver a delivery for an app webhook"
* Operation id: apps/redeliver-webhook-delivery
* Parameter: delivery_id, required, path
* Response: 202
* Response: 400
* Response: 422
METHODS apps_redeliver_webhook_deliver
IMPORTING
delivery_id TYPE i
RAISING cx_static_check.
* GET - "List installations for the authenticated app"
* Operation id: apps/list-installations
* Parameter: outdated, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Parameter: since, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_installations
METHODS apps_list_installations
IMPORTING
outdated TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
since TYPE string OPTIONAL
RETURNING
VALUE(return_data) TYPE response_apps_list_installatio
RAISING cx_static_check.
* GET - "Get an installation for the authenticated app"
* Operation id: apps/get-installation
* Parameter: installation_id, required, path
* Response: 200
* application/json, #/components/schemas/installation
* Response: 404
* Response: 415
METHODS apps_get_installation
IMPORTING
installation_id TYPE i
RETURNING
VALUE(return_data) TYPE installation
RAISING cx_static_check.
* DELETE - "Delete an installation for the authenticated app"
* Operation id: apps/delete-installation
* Parameter: installation_id, required, path
* Response: 204
* Response: 404
METHODS apps_delete_installation
IMPORTING
installation_id TYPE i
RAISING cx_static_check.
* POST - "Create an installation access token for an app"
* Operation id: apps/create-installation-access-token
* Parameter: installation_id, required, path
* Response: 201
* application/json, #/components/schemas/installation-token
* Response: 401
* Response: 403
* Response: 404
* Response: 415
* Response: 422
* Body ref: #/components/schemas/bodyapps_create_installation_a
METHODS apps_create_installation_acces
IMPORTING
installation_id TYPE i
body TYPE bodyapps_create_installation_a
RETURNING
VALUE(return_data) TYPE installation_token
RAISING cx_static_check.
* PUT - "Suspend an app installation"
* Operation id: apps/suspend-installation
* Parameter: installation_id, required, path
* Response: 204
* Response: 404
METHODS apps_suspend_installation
IMPORTING
installation_id TYPE i
RAISING cx_static_check.
* DELETE - "Unsuspend an app installation"
* Operation id: apps/unsuspend-installation
* Parameter: installation_id, required, path
* Response: 204
* Response: 404
METHODS apps_unsuspend_installation
IMPORTING
installation_id TYPE i
RAISING cx_static_check.
* DELETE - "Delete an app authorization"
* Operation id: apps/delete-authorization
* Parameter: client_id, required, path
* Response: 204
* Response: 422
* Body ref: #/components/schemas/bodyapps_delete_authorization
METHODS apps_delete_authorization
IMPORTING
client_id TYPE string
body TYPE bodyapps_delete_authorization
RAISING cx_static_check.
* POST - "Check a token"
* Operation id: apps/check-token
* Parameter: client_id, required, path
* Response: 200
* application/json, #/components/schemas/authorization
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyapps_check_token
METHODS apps_check_token
IMPORTING
client_id TYPE string
body TYPE bodyapps_check_token
RETURNING
VALUE(return_data) TYPE authorization
RAISING cx_static_check.
* PATCH - "Reset a token"
* Operation id: apps/reset-token
* Parameter: client_id, required, path
* Response: 200
* application/json, #/components/schemas/authorization
* Response: 422
* Body ref: #/components/schemas/bodyapps_reset_token
METHODS apps_reset_token
IMPORTING
client_id TYPE string
body TYPE bodyapps_reset_token
RETURNING
VALUE(return_data) TYPE authorization
RAISING cx_static_check.
* DELETE - "Delete an app token"
* Operation id: apps/delete-token
* Parameter: client_id, required, path
* Response: 204
* Response: 422
* Body ref: #/components/schemas/bodyapps_delete_token
METHODS apps_delete_token
IMPORTING
client_id TYPE string
body TYPE bodyapps_delete_token
RAISING cx_static_check.
* POST - "Create a scoped access token"
* Operation id: apps/scope-token
* Parameter: client_id, required, path
* Response: 200
* application/json, #/components/schemas/authorization
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyapps_scope_token
METHODS apps_scope_token
IMPORTING
client_id TYPE string
body TYPE bodyapps_scope_token
RETURNING
VALUE(return_data) TYPE authorization
RAISING cx_static_check.
* GET - "Get an app"
* Operation id: apps/get-by-slug
* Parameter: app_slug, required, path
* Response: 200
* application/json, #/components/schemas/integration
* Response: 403
* Response: 404
* Response: 415
METHODS apps_get_by_slug
IMPORTING
app_slug TYPE string
RETURNING
VALUE(return_data) TYPE integration
RAISING cx_static_check.
* GET - "Get all codes of conduct"
* Operation id: codes-of-conduct/get-all-codes-of-conduct
* Response: 200
* application/json, #/components/schemas/response_codes_of_conduct_get_all_codes
* Response: 304
METHODS codes_of_conduct_get_all_codes
RETURNING
VALUE(return_data) TYPE response_codes_of_conduct_get_
RAISING cx_static_check.
* GET - "Get a code of conduct"
* Operation id: codes-of-conduct/get-conduct-code
* Parameter: key, required, path
* Response: 200
* application/json, #/components/schemas/code-of-conduct
* Response: 304
* Response: 404
METHODS codes_of_conduct_get_conduct_c
IMPORTING
key TYPE string
RETURNING
VALUE(return_data) TYPE code_of_conduct
RAISING cx_static_check.
* GET - "Get emojis"
* Operation id: emojis/get
* Response: 200
* application/json, #/components/schemas/response_emojis_get
* Response: 304
METHODS emojis_get
RETURNING
VALUE(return_data) TYPE response_emojis_get
RAISING cx_static_check.
* GET - "Get GitHub Actions permissions for an enterprise"
* Operation id: enterprise-admin/get-github-actions-permissions-enterprise
* Parameter: enterprise, required, path
* Response: 200
* application/json, #/components/schemas/actions-enterprise-permissions
METHODS enterprise_admin_get_github_ac
IMPORTING
enterprise TYPE string
RETURNING
VALUE(return_data) TYPE actions_enterprise_permissions
RAISING cx_static_check.
* PUT - "Set GitHub Actions permissions for an enterprise"
* Operation id: enterprise-admin/set-github-actions-permissions-enterprise
* Parameter: enterprise, required, path
* Response: 204
* Body ref: #/components/schemas/bodyenterprise_admin_set_githu
METHODS enterprise_admin_set_github_ac
IMPORTING
enterprise TYPE string
body TYPE bodyenterprise_admin_set_githu
RAISING cx_static_check.
* GET - "List selected organizations enabled for GitHub Actions in an enterprise"
* Operation id: enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise
* Parameter: enterprise, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_enterprise_admin_list_selected
METHODS enterprise_admin_list_selected
IMPORTING
enterprise TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_enterprise_admin_list
RAISING cx_static_check.
* PUT - "Set selected organizations enabled for GitHub Actions in an enterprise"
* Operation id: enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise
* Parameter: enterprise, required, path
* Response: 204
* Body ref: #/components/schemas/bodyenterprise_admin_set_selec
METHODS enterprise_admin_set_selected_
IMPORTING
enterprise TYPE string
body TYPE bodyenterprise_admin_set_selec
RAISING cx_static_check.
* PUT - "Enable a selected organization for GitHub Actions in an enterprise"
* Operation id: enterprise-admin/enable-selected-organization-github-actions-enterprise
* Parameter: enterprise, required, path
* Parameter: org_id, required, path
* Response: 204
METHODS enterprise_admin_enable_select
IMPORTING
enterprise TYPE string
org_id TYPE i
RAISING cx_static_check.
* DELETE - "Disable a selected organization for GitHub Actions in an enterprise"
* Operation id: enterprise-admin/disable-selected-organization-github-actions-enterprise
* Parameter: enterprise, required, path
* Parameter: org_id, required, path
* Response: 204
METHODS enterprise_admin_disable_selec
IMPORTING
enterprise TYPE string
org_id TYPE i
RAISING cx_static_check.
* GET - "Get allowed actions for an enterprise"
* Operation id: enterprise-admin/get-allowed-actions-enterprise
* Parameter: enterprise, required, path
* Response: 200
* application/json, #/components/schemas/selected-actions
METHODS enterprise_admin_get_allowed_a
IMPORTING
enterprise TYPE string
RETURNING
VALUE(return_data) TYPE selected_actions
RAISING cx_static_check.
* PUT - "Set allowed actions for an enterprise"
* Operation id: enterprise-admin/set-allowed-actions-enterprise
* Parameter: enterprise, required, path
* Response: 204
* Body ref: #/components/schemas/selected-actions
METHODS enterprise_admin_set_allowed_a
IMPORTING
enterprise TYPE string
body TYPE selected_actions
RAISING cx_static_check.
* GET - "List self-hosted runner groups for an enterprise"
* Operation id: enterprise-admin/list-self-hosted-runner-groups-for-enterprise
* Parameter: enterprise, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_enterprise_admin_list_self_hos
METHODS enterprise_admin_list_self_hos
IMPORTING
enterprise TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_enterprise_admin_li01
RAISING cx_static_check.
* POST - "Create a self-hosted runner group for an enterprise"
* Operation id: enterprise-admin/create-self-hosted-runner-group-for-enterprise
* Parameter: enterprise, required, path
* Response: 201
* application/json, #/components/schemas/runner-groups-enterprise
* Body ref: #/components/schemas/bodyenterprise_admin_create_se
METHODS enterprise_admin_create_self_h
IMPORTING
enterprise TYPE string
body TYPE bodyenterprise_admin_create_se
RETURNING
VALUE(return_data) TYPE runner_groups_enterprise
RAISING cx_static_check.
* GET - "Get a self-hosted runner group for an enterprise"
* Operation id: enterprise-admin/get-self-hosted-runner-group-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Response: 200
* application/json, #/components/schemas/runner-groups-enterprise
METHODS enterprise_admin_get_self_host
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
RETURNING
VALUE(return_data) TYPE runner_groups_enterprise
RAISING cx_static_check.
* PATCH - "Update a self-hosted runner group for an enterprise"
* Operation id: enterprise-admin/update-self-hosted-runner-group-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Response: 200
* application/json, #/components/schemas/runner-groups-enterprise
* Body ref: #/components/schemas/bodyenterprise_admin_update_se
METHODS enterprise_admin_update_self_h
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
body TYPE bodyenterprise_admin_update_se
RETURNING
VALUE(return_data) TYPE runner_groups_enterprise
RAISING cx_static_check.
* DELETE - "Delete a self-hosted runner group from an enterprise"
* Operation id: enterprise-admin/delete-self-hosted-runner-group-from-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyenterprise_admin_delete_se
METHODS enterprise_admin_delete_self_h
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
body TYPE bodyenterprise_admin_delete_se
RAISING cx_static_check.
* GET - "List organization access to a self-hosted runner group in an enterprise"
* Operation id: enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_enterprise_admin_list_org_acce
METHODS enterprise_admin_list_org_acce
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_enterprise_admin_li02
RAISING cx_static_check.
* PUT - "Set organization access for a self-hosted runner group in an enterprise"
* Operation id: enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyenterprise_admin_set_org_a
METHODS enterprise_admin_set_org_acces
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
body TYPE bodyenterprise_admin_set_org_a
RAISING cx_static_check.
* PUT - "Add organization access to a self-hosted runner group in an enterprise"
* Operation id: enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Parameter: org_id, required, path
* Response: 204
METHODS enterprise_admin_add_org_acces
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
org_id TYPE i
RAISING cx_static_check.
* DELETE - "Remove organization access to a self-hosted runner group in an enterprise"
* Operation id: enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Parameter: org_id, required, path
* Response: 204
METHODS enterprise_admin_remove_org_ac
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
org_id TYPE i
RAISING cx_static_check.
* GET - "List self-hosted runners in a group for an enterprise"
* Operation id: enterprise-admin/list-self-hosted-runners-in-group-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_enterprise_admin_list_self_h01
METHODS enterprise_admin_list_self_h01
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_enterprise_admin_li03
RAISING cx_static_check.
* PUT - "Set self-hosted runners in a group for an enterprise"
* Operation id: enterprise-admin/set-self-hosted-runners-in-group-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyenterprise_admin_set_self_
METHODS enterprise_admin_set_self_host
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
body TYPE bodyenterprise_admin_set_self_
RAISING cx_static_check.
* PUT - "Add a self-hosted runner to a group for an enterprise"
* Operation id: enterprise-admin/add-self-hosted-runner-to-group-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Parameter: runner_id, required, path
* Response: 204
METHODS enterprise_admin_add_self_host
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
runner_id TYPE i
RAISING cx_static_check.
* DELETE - "Remove a self-hosted runner from a group for an enterprise"
* Operation id: enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_group_id, required, path
* Parameter: runner_id, required, path
* Response: 204
METHODS enterprise_admin_remove_self_h
IMPORTING
enterprise TYPE string
runner_group_id TYPE i
runner_id TYPE i
RAISING cx_static_check.
* GET - "List self-hosted runners for an enterprise"
* Operation id: enterprise-admin/list-self-hosted-runners-for-enterprise
* Parameter: enterprise, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_enterprise_admin_list_self_h02
METHODS enterprise_admin_list_self_h02
IMPORTING
enterprise TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_enterprise_admin_li04
RAISING cx_static_check.
* GET - "List runner applications for an enterprise"
* Operation id: enterprise-admin/list-runner-applications-for-enterprise
* Parameter: enterprise, required, path
* Response: 200
* application/json, #/components/schemas/response_enterprise_admin_list_runner_a
METHODS enterprise_admin_list_runner_a
IMPORTING
enterprise TYPE string
RETURNING
VALUE(return_data) TYPE response_enterprise_admin_li05
RAISING cx_static_check.
* POST - "Create a registration token for an enterprise"
* Operation id: enterprise-admin/create-registration-token-for-enterprise
* Parameter: enterprise, required, path
* Response: 201
* application/json, #/components/schemas/authentication-token
METHODS enterprise_admin_create_regist
IMPORTING
enterprise TYPE string
RETURNING
VALUE(return_data) TYPE authentication_token
RAISING cx_static_check.
* POST - "Create a remove token for an enterprise"
* Operation id: enterprise-admin/create-remove-token-for-enterprise
* Parameter: enterprise, required, path
* Response: 201
* application/json, #/components/schemas/authentication-token
METHODS enterprise_admin_create_remove
IMPORTING
enterprise TYPE string
RETURNING
VALUE(return_data) TYPE authentication_token
RAISING cx_static_check.
* GET - "Get a self-hosted runner for an enterprise"
* Operation id: enterprise-admin/get-self-hosted-runner-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_id, required, path
* Response: 200
* application/json, #/components/schemas/runner
METHODS enterprise_admin_get_self_ho01
IMPORTING
enterprise TYPE string
runner_id TYPE i
RETURNING
VALUE(return_data) TYPE runner
RAISING cx_static_check.
* DELETE - "Delete a self-hosted runner from an enterprise"
* Operation id: enterprise-admin/delete-self-hosted-runner-from-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_id, required, path
* Response: 204
METHODS enterprise_admin_delete_self01
IMPORTING
enterprise TYPE string
runner_id TYPE i
RAISING cx_static_check.
* GET - "List labels for a self-hosted runner for an enterprise"
* Operation id: enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
METHODS enterprise_admin_list_labels_f
IMPORTING
enterprise TYPE string
runner_id TYPE i
RAISING cx_static_check.
* POST - "Add custom labels to a self-hosted runner for an enterprise"
* Operation id: enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyenterprise_admin_add_custo
METHODS enterprise_admin_add_custom_la
IMPORTING
enterprise TYPE string
runner_id TYPE i
body TYPE bodyenterprise_admin_add_custo
RAISING cx_static_check.
* PUT - "Set custom labels for a self-hosted runner for an enterprise"
* Operation id: enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyenterprise_admin_set_custo
METHODS enterprise_admin_set_custom_la
IMPORTING
enterprise TYPE string
runner_id TYPE i
body TYPE bodyenterprise_admin_set_custo
RAISING cx_static_check.
* DELETE - "Remove all custom labels from a self-hosted runner for an enterprise"
* Operation id: enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyenterprise_admin_remove_al
METHODS enterprise_admin_remove_all_cu
IMPORTING
enterprise TYPE string
runner_id TYPE i
body TYPE bodyenterprise_admin_remove_al
RAISING cx_static_check.
* DELETE - "Remove a custom label from a self-hosted runner for an enterprise"
* Operation id: enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise
* Parameter: enterprise, required, path
* Parameter: runner_id, required, path
* Parameter: name, required, path
* Response: 200
* Response: 404
* Response: 422
METHODS enterprise_admin_remove_custom
IMPORTING
enterprise TYPE string
runner_id TYPE i
name TYPE string
RAISING cx_static_check.
* GET - "Get the audit log for an enterprise"
* Operation id: enterprise-admin/get-audit-log
* Parameter: enterprise, required, path
* Parameter: phrase, optional, query
* Parameter: include, optional, query
* Parameter: after, optional, query
* Parameter: before, optional, query
* Parameter: order, optional, query
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_enterprise_admin_get_audit_log
METHODS enterprise_admin_get_audit_log
IMPORTING
enterprise TYPE string
phrase TYPE string OPTIONAL
include TYPE string OPTIONAL
after TYPE string OPTIONAL
before TYPE string OPTIONAL
order TYPE string OPTIONAL
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_enterprise_admin_get_
RAISING cx_static_check.
* GET - "List secret scanning alerts for an enterprise"
* Operation id: secret-scanning/list-alerts-for-enterprise
* Parameter: enterprise, required, path
* Parameter: state, optional, query
* Parameter: secret_type, optional, query
* Parameter: resolution, optional, query
* Parameter: per_page, optional, query
* Parameter: before, optional, query
* Parameter: after, optional, query
* Response: 200
* application/json, #/components/schemas/response_secret_scanning_list_alerts_fo
* Response: 404
* Response: 503
METHODS secret_scanning_list_alerts_fo
IMPORTING
enterprise TYPE string
state TYPE string OPTIONAL
secret_type TYPE string OPTIONAL
resolution TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
before TYPE string OPTIONAL
after TYPE string OPTIONAL
RETURNING
VALUE(return_data) TYPE response_secret_scanning_list_
RAISING cx_static_check.
* GET - "Get GitHub Actions billing for an enterprise"
* Operation id: billing/get-github-actions-billing-ghe
* Parameter: enterprise, required, path
* Response: 200
* application/json, #/components/schemas/actions-billing-usage
METHODS billing_get_github_actions_bil
IMPORTING
enterprise TYPE string
RETURNING
VALUE(return_data) TYPE actions_billing_usage
RAISING cx_static_check.
* GET - "Get GitHub Advanced Security active committers for an enterprise"
* Operation id: billing/get-github-advanced-security-billing-ghe
* Parameter: enterprise, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/advanced-security-active-committers
* Response: 403
METHODS billing_get_github_advanced_se
IMPORTING
enterprise TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE advanced_security_active_com02
RAISING cx_static_check.
* GET - "Get GitHub Packages billing for an enterprise"
* Operation id: billing/get-github-packages-billing-ghe
* Parameter: enterprise, required, path
* Response: 200
* application/json, #/components/schemas/packages-billing-usage
METHODS billing_get_github_packages_bi
IMPORTING
enterprise TYPE string
RETURNING
VALUE(return_data) TYPE packages_billing_usage
RAISING cx_static_check.
* GET - "Get shared storage billing for an enterprise"
* Operation id: billing/get-shared-storage-billing-ghe
* Parameter: enterprise, required, path
* Response: 200
* application/json, #/components/schemas/combined-billing-usage
METHODS billing_get_shared_storage_bil
IMPORTING
enterprise TYPE string
RETURNING
VALUE(return_data) TYPE combined_billing_usage
RAISING cx_static_check.
* GET - "List public events"
* Operation id: activity/list-public-events
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_public_events
* Response: 304
* Response: 403
* Response: 503
METHODS activity_list_public_events
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_public_
RAISING cx_static_check.
* GET - "Get feeds"
* Operation id: activity/get-feeds
* Response: 200
* application/json, #/components/schemas/feed
METHODS activity_get_feeds
RETURNING
VALUE(return_data) TYPE feed
RAISING cx_static_check.
* GET - "List gists for the authenticated user"
* Operation id: gists/list
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_gists_list
* Response: 304
* Response: 403
METHODS gists_list
IMPORTING
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_gists_list
RAISING cx_static_check.
* POST - "Create a gist"
* Operation id: gists/create
* Response: 201
* application/json, #/components/schemas/gist-simple
* Response: 304
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodygists_create
METHODS gists_create
IMPORTING
body TYPE bodygists_create
RETURNING
VALUE(return_data) TYPE gist_simple
RAISING cx_static_check.
* GET - "List public gists"
* Operation id: gists/list-public
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_gists_list_public
* Response: 304
* Response: 403
* Response: 422
METHODS gists_list_public
IMPORTING
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_gists_list_public
RAISING cx_static_check.
* GET - "List starred gists"
* Operation id: gists/list-starred
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_gists_list_starred
* Response: 304
* Response: 401
* Response: 403
METHODS gists_list_starred
IMPORTING
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_gists_list_starred
RAISING cx_static_check.
* GET - "Get a gist"
* Operation id: gists/get
* Parameter: gist_id, required, path
* Response: 200
* application/json, #/components/schemas/gist-simple
* Response: 304
* Response: 403
* Response: 404
METHODS gists_get
IMPORTING
gist_id TYPE string
RETURNING
VALUE(return_data) TYPE gist_simple
RAISING cx_static_check.
* PATCH - "Update a gist"
* Operation id: gists/update
* Parameter: gist_id, required, path
* Response: 200
* application/json, #/components/schemas/gist-simple
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodygists_update
METHODS gists_update
IMPORTING
gist_id TYPE string
body TYPE bodygists_update
RETURNING
VALUE(return_data) TYPE gist_simple
RAISING cx_static_check.
* DELETE - "Delete a gist"
* Operation id: gists/delete
* Parameter: gist_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodygists_delete
METHODS gists_delete
IMPORTING
gist_id TYPE string
body TYPE bodygists_delete
RAISING cx_static_check.
* GET - "List gist comments"
* Operation id: gists/list-comments
* Parameter: gist_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_gists_list_comments
* Response: 304
* Response: 403
* Response: 404
METHODS gists_list_comments
IMPORTING
gist_id TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_gists_list_comments
RAISING cx_static_check.
* POST - "Create a gist comment"
* Operation id: gists/create-comment
* Parameter: gist_id, required, path
* Response: 201
* application/json, #/components/schemas/gist-comment
* Response: 304
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodygists_create_comment
METHODS gists_create_comment
IMPORTING
gist_id TYPE string
body TYPE bodygists_create_comment
RETURNING
VALUE(return_data) TYPE gist_comment
RAISING cx_static_check.
* GET - "Get a gist comment"
* Operation id: gists/get-comment
* Parameter: gist_id, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/gist-comment
* Response: 304
* Response: 403
* Response: 404
METHODS gists_get_comment
IMPORTING
gist_id TYPE string
comment_id TYPE i
RETURNING
VALUE(return_data) TYPE gist_comment
RAISING cx_static_check.
* PATCH - "Update a gist comment"
* Operation id: gists/update-comment
* Parameter: gist_id, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/gist-comment
* Response: 404
* Body ref: #/components/schemas/bodygists_update_comment
METHODS gists_update_comment
IMPORTING
gist_id TYPE string
comment_id TYPE i
body TYPE bodygists_update_comment
RETURNING
VALUE(return_data) TYPE gist_comment
RAISING cx_static_check.
* DELETE - "Delete a gist comment"
* Operation id: gists/delete-comment
* Parameter: gist_id, required, path
* Parameter: comment_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodygists_delete_comment
METHODS gists_delete_comment
IMPORTING
gist_id TYPE string
comment_id TYPE i
body TYPE bodygists_delete_comment
RAISING cx_static_check.
* GET - "List gist commits"
* Operation id: gists/list-commits
* Parameter: gist_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_gists_list_commits
* Response: 304
* Response: 403
* Response: 404
METHODS gists_list_commits
IMPORTING
gist_id TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_gists_list_commits
RAISING cx_static_check.
* GET - "List gist forks"
* Operation id: gists/list-forks
* Parameter: gist_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_gists_list_forks
* Response: 304
* Response: 403
* Response: 404
METHODS gists_list_forks
IMPORTING
gist_id TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_gists_list_forks
RAISING cx_static_check.
* POST - "Fork a gist"
* Operation id: gists/fork
* Parameter: gist_id, required, path
* Response: 201
* application/json, #/components/schemas/base-gist
* Response: 304
* Response: 403
* Response: 404
* Response: 422
METHODS gists_fork
IMPORTING
gist_id TYPE string
RETURNING
VALUE(return_data) TYPE base_gist
RAISING cx_static_check.
* GET - "Check if a gist is starred"
* Operation id: gists/check-is-starred
* Parameter: gist_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
* application/json, #/components/schemas/response_gists_check_is_starred
METHODS gists_check_is_starred
IMPORTING
gist_id TYPE string
RAISING cx_static_check.
* PUT - "Star a gist"
* Operation id: gists/star
* Parameter: gist_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
METHODS gists_star
IMPORTING
gist_id TYPE string
RAISING cx_static_check.
* DELETE - "Unstar a gist"
* Operation id: gists/unstar
* Parameter: gist_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
METHODS gists_unstar
IMPORTING
gist_id TYPE string
RAISING cx_static_check.
* GET - "Get a gist revision"
* Operation id: gists/get-revision
* Parameter: sha, required, path
* Parameter: gist_id, required, path
* Response: 200
* application/json, #/components/schemas/gist-simple
* Response: 403
* Response: 404
* Response: 422
METHODS gists_get_revision
IMPORTING
sha TYPE string
gist_id TYPE string
RETURNING
VALUE(return_data) TYPE gist_simple
RAISING cx_static_check.
* GET - "Get all gitignore templates"
* Operation id: gitignore/get-all-templates
* Response: 200
* application/json, #/components/schemas/response_gitignore_get_all_templates
* Response: 304
METHODS gitignore_get_all_templates
RETURNING
VALUE(return_data) TYPE response_gitignore_get_all_tem
RAISING cx_static_check.
* GET - "Get a gitignore template"
* Operation id: gitignore/get-template
* Parameter: name, required, path
* Response: 200
* application/json, #/components/schemas/gitignore-template
* Response: 304
METHODS gitignore_get_template
IMPORTING
name TYPE string
RETURNING
VALUE(return_data) TYPE gitignore_template
RAISING cx_static_check.
* GET - "List repositories accessible to the app installation"
* Operation id: apps/list-repos-accessible-to-installation
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_repos_accessible_to_
* Response: 304
* Response: 401
* Response: 403
METHODS apps_list_repos_accessible_to_
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_apps_list_repos_acces
RAISING cx_static_check.
* DELETE - "Revoke an installation access token"
* Operation id: apps/revoke-installation-access-token
* Response: 204
METHODS apps_revoke_installation_acces
RAISING cx_static_check.
* GET - "List issues assigned to the authenticated user"
* Operation id: issues/list
* Parameter: filter, optional, query
* Parameter: state, optional, query
* Parameter: sort, optional, query
* Parameter: collab, optional, query
* Parameter: orgs, optional, query
* Parameter: owned, optional, query
* Parameter: pulls, optional, query
* Parameter: labels, optional, query
* Parameter: direction, optional, query
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list
* Response: 304
* Response: 404
* Response: 422
METHODS issues_list
IMPORTING
filter TYPE string DEFAULT 'assigned'
state TYPE string DEFAULT 'open'
sort TYPE string DEFAULT 'created'
collab TYPE abap_bool OPTIONAL
orgs TYPE abap_bool OPTIONAL
owned TYPE abap_bool OPTIONAL
pulls TYPE abap_bool OPTIONAL
labels TYPE string OPTIONAL
direction TYPE string DEFAULT 'desc'
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list
RAISING cx_static_check.
* GET - "Get all commonly used licenses"
* Operation id: licenses/get-all-commonly-used
* Parameter: featured, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_licenses_get_all_commonly_used
* Response: 304
METHODS licenses_get_all_commonly_used
IMPORTING
featured TYPE abap_bool OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_licenses_get_all_comm
RAISING cx_static_check.
* GET - "Get a license"
* Operation id: licenses/get
* Parameter: license, required, path
* Response: 200
* application/json, #/components/schemas/license
* Response: 304
* Response: 403
* Response: 404
METHODS licenses_get
IMPORTING
license TYPE string
RETURNING
VALUE(return_data) TYPE license
RAISING cx_static_check.
* POST - "Render a Markdown document"
* Operation id: markdown/render
* Response: 200
* text/html, string
* Response: 304
* Body ref: #/components/schemas/bodymarkdown_render
METHODS markdown_render
IMPORTING
body TYPE bodymarkdown_render
RAISING cx_static_check.
* POST - "Render a Markdown document in raw mode"
* Operation id: markdown/render-raw
* Response: 200
* text/html, string
* Response: 304
METHODS markdown_render_raw
RAISING cx_static_check.
* GET - "Get a subscription plan for an account"
* Operation id: apps/get-subscription-plan-for-account
* Parameter: account_id, required, path
* Response: 200
* application/json, #/components/schemas/marketplace-purchase
* Response: 401
* Response: 404
* application/json, #/components/schemas/basic-error
METHODS apps_get_subscription_plan_for
IMPORTING
account_id TYPE i
RETURNING
VALUE(return_data) TYPE marketplace_purchase
RAISING cx_static_check.
* GET - "List plans"
* Operation id: apps/list-plans
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_plans
* Response: 401
* Response: 404
METHODS apps_list_plans
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_apps_list_plans
RAISING cx_static_check.
* GET - "List accounts for a plan"
* Operation id: apps/list-accounts-for-plan
* Parameter: direction, optional, query
* Parameter: plan_id, required, path
* Parameter: sort, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_accounts_for_plan
* Response: 401
* Response: 404
* Response: 422
METHODS apps_list_accounts_for_plan
IMPORTING
direction TYPE string OPTIONAL
plan_id TYPE i
sort TYPE string DEFAULT 'created'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_apps_list_accounts_fo
RAISING cx_static_check.
* GET - "Get a subscription plan for an account (stubbed)"
* Operation id: apps/get-subscription-plan-for-account-stubbed
* Parameter: account_id, required, path
* Response: 200
* application/json, #/components/schemas/marketplace-purchase
* Response: 401
* Response: 404
METHODS apps_get_subscription_plan_f01
IMPORTING
account_id TYPE i
RETURNING
VALUE(return_data) TYPE marketplace_purchase
RAISING cx_static_check.
* GET - "List plans (stubbed)"
* Operation id: apps/list-plans-stubbed
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_plans_stubbed
* Response: 401
METHODS apps_list_plans_stubbed
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_apps_list_plans_stubb
RAISING cx_static_check.
* GET - "List accounts for a plan (stubbed)"
* Operation id: apps/list-accounts-for-plan-stubbed
* Parameter: direction, optional, query
* Parameter: plan_id, required, path
* Parameter: sort, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_accounts_for_plan_st
* Response: 401
METHODS apps_list_accounts_for_plan_st
IMPORTING
direction TYPE string OPTIONAL
plan_id TYPE i
sort TYPE string DEFAULT 'created'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_apps_list_accounts_01
RAISING cx_static_check.
* GET - "Get GitHub meta information"
* Operation id: meta/get
* Response: 200
* application/json, #/components/schemas/api-overview
* Response: 304
METHODS meta_get
RETURNING
VALUE(return_data) TYPE api_overview
RAISING cx_static_check.
* GET - "List public events for a network of repositories"
* Operation id: activity/list-public-events-for-repo-network
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_public_events_fo
* Response: 301
* Response: 304
* Response: 403
* Response: 404
METHODS activity_list_public_events_fo
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_publi01
RAISING cx_static_check.
* GET - "List notifications for the authenticated user"
* Operation id: activity/list-notifications-for-authenticated-user
* Parameter: all, optional, query
* Parameter: participating, optional, query
* Parameter: since, optional, query
* Parameter: before, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_notifications_fo
* Response: 304
* Response: 401
* Response: 403
* Response: 422
METHODS activity_list_notifications_fo
IMPORTING
all TYPE abap_bool DEFAULT abap_false
participating TYPE abap_bool DEFAULT abap_false
since TYPE string OPTIONAL
before TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_notific
RAISING cx_static_check.
* PUT - "Mark notifications as read"
* Operation id: activity/mark-notifications-as-read
* Response: 202
* application/json, #/components/schemas/response_activity_mark_notifications_as
* Response: 205
* Response: 304
* Response: 401
* Response: 403
* Body ref: #/components/schemas/bodyactivity_mark_notification
METHODS activity_mark_notifications_as
IMPORTING
body TYPE bodyactivity_mark_notification
RAISING cx_static_check.
* GET - "Get a thread"
* Operation id: activity/get-thread
* Parameter: thread_id, required, path
* Response: 200
* application/json, #/components/schemas/thread
* Response: 304
* Response: 401
* Response: 403
METHODS activity_get_thread
IMPORTING
thread_id TYPE i
RETURNING
VALUE(return_data) TYPE thread
RAISING cx_static_check.
* PATCH - "Mark a thread as read"
* Operation id: activity/mark-thread-as-read
* Parameter: thread_id, required, path
* Response: 205
* Response: 304
* Response: 403
METHODS activity_mark_thread_as_read
IMPORTING
thread_id TYPE i
RAISING cx_static_check.
* GET - "Get a thread subscription for the authenticated user"
* Operation id: activity/get-thread-subscription-for-authenticated-user
* Parameter: thread_id, required, path
* Response: 200
* application/json, #/components/schemas/thread-subscription
* Response: 304
* Response: 401
* Response: 403
METHODS activity_get_thread_subscripti
IMPORTING
thread_id TYPE i
RETURNING
VALUE(return_data) TYPE thread_subscription
RAISING cx_static_check.
* PUT - "Set a thread subscription"
* Operation id: activity/set-thread-subscription
* Parameter: thread_id, required, path
* Response: 200
* application/json, #/components/schemas/thread-subscription
* Response: 304
* Response: 401
* Response: 403
* Body ref: #/components/schemas/bodyactivity_set_thread_subscr
METHODS activity_set_thread_subscripti
IMPORTING
thread_id TYPE i
body TYPE bodyactivity_set_thread_subscr
RETURNING
VALUE(return_data) TYPE thread_subscription
RAISING cx_static_check.
* DELETE - "Delete a thread subscription"
* Operation id: activity/delete-thread-subscription
* Parameter: thread_id, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Body ref: #/components/schemas/bodyactivity_delete_thread_sub
METHODS activity_delete_thread_subscri
IMPORTING
thread_id TYPE i
body TYPE bodyactivity_delete_thread_sub
RAISING cx_static_check.
* GET - "Get Octocat"
* Operation id: meta/get-octocat
* Parameter: s, optional, query
* Response: 200
* application/octocat-stream, string
METHODS meta_get_octocat
IMPORTING
s TYPE string OPTIONAL
RAISING cx_static_check.
* GET - "List organizations"
* Operation id: orgs/list
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list
* Response: 304
METHODS orgs_list
IMPORTING
since TYPE i OPTIONAL
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_orgs_list
RAISING cx_static_check.
* GET - "List custom repository roles in an organization"
* Operation id: orgs/list-custom-roles
* Parameter: organization_id, required, path
* Response: 200
* application/json, #/components/schemas/response_orgs_list_custom_roles
METHODS orgs_list_custom_roles
IMPORTING
organization_id TYPE string
RETURNING
VALUE(return_data) TYPE response_orgs_list_custom_role
RAISING cx_static_check.
* GET - "List a connection between an external group and a team"
* Operation id: teams/list-linked-external-idp-groups-to-team-for-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Response: 200
* application/json, #/components/schemas/external-groups
METHODS teams_list_linked_external_idp
IMPORTING
org TYPE string
team_slug TYPE string
RETURNING
VALUE(return_data) TYPE external_groups
RAISING cx_static_check.
* GET - "Get an organization"
* Operation id: orgs/get
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/organization-full
* Response: 404
METHODS orgs_get
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE organization_full
RAISING cx_static_check.
* PATCH - "Update an organization"
* Operation id: orgs/update
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/organization-full
* Response: 409
* Response: 422
* application/json, string
* Body ref: #/components/schemas/bodyorgs_update
METHODS orgs_update
IMPORTING
org TYPE string
body TYPE bodyorgs_update
RETURNING
VALUE(return_data) TYPE organization_full
RAISING cx_static_check.
* GET - "Get GitHub Actions permissions for an organization"
* Operation id: actions/get-github-actions-permissions-organization
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/actions-organization-permissions
METHODS actions_get_github_actions_per
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE actions_organization_permissio
RAISING cx_static_check.
* PUT - "Set GitHub Actions permissions for an organization"
* Operation id: actions/set-github-actions-permissions-organization
* Parameter: org, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_set_github_actions
METHODS actions_set_github_actions_per
IMPORTING
org TYPE string
body TYPE bodyactions_set_github_actions
RAISING cx_static_check.
* GET - "List selected repositories enabled for GitHub Actions in an organization"
* Operation id: actions/list-selected-repositories-enabled-github-actions-organization
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_selected_reposito
METHODS actions_list_selected_reposito
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_selected
RAISING cx_static_check.
* PUT - "Set selected repositories enabled for GitHub Actions in an organization"
* Operation id: actions/set-selected-repositories-enabled-github-actions-organization
* Parameter: org, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_set_selected_repos
METHODS actions_set_selected_repositor
IMPORTING
org TYPE string
body TYPE bodyactions_set_selected_repos
RAISING cx_static_check.
* PUT - "Enable a selected repository for GitHub Actions in an organization"
* Operation id: actions/enable-selected-repository-github-actions-organization
* Parameter: org, required, path
* Parameter: repository_id, required, path
* Response: 204
METHODS actions_enable_selected_reposi
IMPORTING
org TYPE string
repository_id TYPE i
RAISING cx_static_check.
* DELETE - "Disable a selected repository for GitHub Actions in an organization"
* Operation id: actions/disable-selected-repository-github-actions-organization
* Parameter: org, required, path
* Parameter: repository_id, required, path
* Response: 204
METHODS actions_disable_selected_repos
IMPORTING
org TYPE string
repository_id TYPE i
RAISING cx_static_check.
* GET - "Get allowed actions for an organization"
* Operation id: actions/get-allowed-actions-organization
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/selected-actions
METHODS actions_get_allowed_actions_or
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE selected_actions
RAISING cx_static_check.
* PUT - "Set allowed actions for an organization"
* Operation id: actions/set-allowed-actions-organization
* Parameter: org, required, path
* Response: 204
* Body ref: #/components/schemas/selected-actions
METHODS actions_set_allowed_actions_or
IMPORTING
org TYPE string
body TYPE selected_actions
RAISING cx_static_check.
* GET - "Get default workflow permissions"
* Operation id: actions/get-github-actions-default-workflow-permissions-organization
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/actions-get-default-workflow-permissions
METHODS actions_get_github_actions_def
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE actions_get_default_workflow_p
RAISING cx_static_check.
* PUT - "Set default workflow permissions"
* Operation id: actions/set-github-actions-default-workflow-permissions-organization
* Parameter: org, required, path
* Response: 204
* Body ref: #/components/schemas/actions-set-default-workflow-permissions
METHODS actions_set_github_actions_def
IMPORTING
org TYPE string
body TYPE actions_set_default_workflow_p
RAISING cx_static_check.
* GET - "List self-hosted runner groups for an organization"
* Operation id: actions/list-self-hosted-runner-groups-for-org
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_self_hosted_runne
METHODS actions_list_self_hosted_runne
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_self_hos
RAISING cx_static_check.
* POST - "Create a self-hosted runner group for an organization"
* Operation id: actions/create-self-hosted-runner-group-for-org
* Parameter: org, required, path
* Response: 201
* application/json, #/components/schemas/runner-groups-org
* Body ref: #/components/schemas/bodyactions_create_self_hosted
METHODS actions_create_self_hosted_run
IMPORTING
org TYPE string
body TYPE bodyactions_create_self_hosted
RETURNING
VALUE(return_data) TYPE runner_groups_org
RAISING cx_static_check.
* GET - "Get a self-hosted runner group for an organization"
* Operation id: actions/get-self-hosted-runner-group-for-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Response: 200
* application/json, #/components/schemas/runner-groups-org
METHODS actions_get_self_hosted_runner
IMPORTING
org TYPE string
runner_group_id TYPE i
RETURNING
VALUE(return_data) TYPE runner_groups_org
RAISING cx_static_check.
* PATCH - "Update a self-hosted runner group for an organization"
* Operation id: actions/update-self-hosted-runner-group-for-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Response: 200
* application/json, #/components/schemas/runner-groups-org
* Body ref: #/components/schemas/bodyactions_update_self_hosted
METHODS actions_update_self_hosted_run
IMPORTING
org TYPE string
runner_group_id TYPE i
body TYPE bodyactions_update_self_hosted
RETURNING
VALUE(return_data) TYPE runner_groups_org
RAISING cx_static_check.
* DELETE - "Delete a self-hosted runner group from an organization"
* Operation id: actions/delete-self-hosted-runner-group-from-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_delete_self_hosted
METHODS actions_delete_self_hosted_run
IMPORTING
org TYPE string
runner_group_id TYPE i
body TYPE bodyactions_delete_self_hosted
RAISING cx_static_check.
* GET - "List repository access to a self-hosted runner group in an organization"
* Operation id: actions/list-repo-access-to-self-hosted-runner-group-in-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_repo_access_to_se
METHODS actions_list_repo_access_to_se
IMPORTING
org TYPE string
runner_group_id TYPE i
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_actions_list_repo_acc
RAISING cx_static_check.
* PUT - "Set repository access for a self-hosted runner group in an organization"
* Operation id: actions/set-repo-access-to-self-hosted-runner-group-in-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_set_repo_access_to
METHODS actions_set_repo_access_to_sel
IMPORTING
org TYPE string
runner_group_id TYPE i
body TYPE bodyactions_set_repo_access_to
RAISING cx_static_check.
* PUT - "Add repository access to a self-hosted runner group in an organization"
* Operation id: actions/add-repo-access-to-self-hosted-runner-group-in-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Parameter: repository_id, required, path
* Response: 204
METHODS actions_add_repo_access_to_sel
IMPORTING
org TYPE string
runner_group_id TYPE i
repository_id TYPE i
RAISING cx_static_check.
* DELETE - "Remove repository access to a self-hosted runner group in an organization"
* Operation id: actions/remove-repo-access-to-self-hosted-runner-group-in-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Parameter: repository_id, required, path
* Response: 204
METHODS actions_remove_repo_access_to_
IMPORTING
org TYPE string
runner_group_id TYPE i
repository_id TYPE i
RAISING cx_static_check.
* GET - "List self-hosted runners in a group for an organization"
* Operation id: actions/list-self-hosted-runners-in-group-for-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_self_hosted_run01
METHODS actions_list_self_hosted_run01
IMPORTING
org TYPE string
runner_group_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_self_h01
RAISING cx_static_check.
* PUT - "Set self-hosted runners in a group for an organization"
* Operation id: actions/set-self-hosted-runners-in-group-for-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_set_self_hosted_ru
METHODS actions_set_self_hosted_runner
IMPORTING
org TYPE string
runner_group_id TYPE i
body TYPE bodyactions_set_self_hosted_ru
RAISING cx_static_check.
* PUT - "Add a self-hosted runner to a group for an organization"
* Operation id: actions/add-self-hosted-runner-to-group-for-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Parameter: runner_id, required, path
* Response: 204
METHODS actions_add_self_hosted_runner
IMPORTING
org TYPE string
runner_group_id TYPE i
runner_id TYPE i
RAISING cx_static_check.
* DELETE - "Remove a self-hosted runner from a group for an organization"
* Operation id: actions/remove-self-hosted-runner-from-group-for-org
* Parameter: org, required, path
* Parameter: runner_group_id, required, path
* Parameter: runner_id, required, path
* Response: 204
METHODS actions_remove_self_hosted_run
IMPORTING
org TYPE string
runner_group_id TYPE i
runner_id TYPE i
RAISING cx_static_check.
* GET - "List self-hosted runners for an organization"
* Operation id: actions/list-self-hosted-runners-for-org
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_self_hosted_run02
METHODS actions_list_self_hosted_run02
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_self_h02
RAISING cx_static_check.
* GET - "List runner applications for an organization"
* Operation id: actions/list-runner-applications-for-org
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/response_actions_list_runner_applicatio
METHODS actions_list_runner_applicatio
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE response_actions_list_runner_a
RAISING cx_static_check.
* POST - "Create a registration token for an organization"
* Operation id: actions/create-registration-token-for-org
* Parameter: org, required, path
* Response: 201
* application/json, #/components/schemas/authentication-token
METHODS actions_create_registration_to
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE authentication_token
RAISING cx_static_check.
* POST - "Create a remove token for an organization"
* Operation id: actions/create-remove-token-for-org
* Parameter: org, required, path
* Response: 201
* application/json, #/components/schemas/authentication-token
METHODS actions_create_remove_token_fo
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE authentication_token
RAISING cx_static_check.
* GET - "Get a self-hosted runner for an organization"
* Operation id: actions/get-self-hosted-runner-for-org
* Parameter: org, required, path
* Parameter: runner_id, required, path
* Response: 200
* application/json, #/components/schemas/runner
METHODS actions_get_self_hosted_runn01
IMPORTING
org TYPE string
runner_id TYPE i
RETURNING
VALUE(return_data) TYPE runner
RAISING cx_static_check.
* DELETE - "Delete a self-hosted runner from an organization"
* Operation id: actions/delete-self-hosted-runner-from-org
* Parameter: org, required, path
* Parameter: runner_id, required, path
* Response: 204
METHODS actions_delete_self_hosted_r01
IMPORTING
org TYPE string
runner_id TYPE i
RAISING cx_static_check.
* GET - "List labels for a self-hosted runner for an organization"
* Operation id: actions/list-labels-for-self-hosted-runner-for-org
* Parameter: org, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
METHODS actions_list_labels_for_self_h
IMPORTING
org TYPE string
runner_id TYPE i
RAISING cx_static_check.
* POST - "Add custom labels to a self-hosted runner for an organization"
* Operation id: actions/add-custom-labels-to-self-hosted-runner-for-org
* Parameter: org, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyactions_add_custom_labels_
METHODS actions_add_custom_labels_to_s
IMPORTING
org TYPE string
runner_id TYPE i
body TYPE bodyactions_add_custom_labels_
RAISING cx_static_check.
* PUT - "Set custom labels for a self-hosted runner for an organization"
* Operation id: actions/set-custom-labels-for-self-hosted-runner-for-org
* Parameter: org, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyactions_set_custom_labels_
METHODS actions_set_custom_labels_for_
IMPORTING
org TYPE string
runner_id TYPE i
body TYPE bodyactions_set_custom_labels_
RAISING cx_static_check.
* DELETE - "Remove all custom labels from a self-hosted runner for an organization"
* Operation id: actions/remove-all-custom-labels-from-self-hosted-runner-for-org
* Parameter: org, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
* Body ref: #/components/schemas/bodyactions_remove_all_custom_
METHODS actions_remove_all_custom_labe
IMPORTING
org TYPE string
runner_id TYPE i
body TYPE bodyactions_remove_all_custom_
RAISING cx_static_check.
* DELETE - "Remove a custom label from a self-hosted runner for an organization"
* Operation id: actions/remove-custom-label-from-self-hosted-runner-for-org
* Parameter: org, required, path
* Parameter: runner_id, required, path
* Parameter: name, required, path
* Response: 200
* Response: 404
* Response: 422
METHODS actions_remove_custom_label_fr
IMPORTING
org TYPE string
runner_id TYPE i
name TYPE string
RAISING cx_static_check.
* GET - "List organization secrets"
* Operation id: actions/list-org-secrets
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_org_secrets
METHODS actions_list_org_secrets
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_org_secr
RAISING cx_static_check.
* GET - "Get an organization public key"
* Operation id: actions/get-org-public-key
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/actions-public-key
METHODS actions_get_org_public_key
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE actions_public_key
RAISING cx_static_check.
* GET - "Get an organization secret"
* Operation id: actions/get-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 200
* application/json, #/components/schemas/organization-actions-secret
METHODS actions_get_org_secret
IMPORTING
org TYPE string
secret_name TYPE string
RETURNING
VALUE(return_data) TYPE organization_actions_secret
RAISING cx_static_check.
* PUT - "Create or update an organization secret"
* Operation id: actions/create-or-update-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 201
* application/json, #/components/schemas/empty-object
* Response: 204
* Body ref: #/components/schemas/bodyactions_create_or_update_o
METHODS actions_create_or_update_org_s
IMPORTING
org TYPE string
secret_name TYPE string
body TYPE bodyactions_create_or_update_o
RETURNING
VALUE(return_data) TYPE empty_object
RAISING cx_static_check.
* DELETE - "Delete an organization secret"
* Operation id: actions/delete-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_delete_org_secret
METHODS actions_delete_org_secret
IMPORTING
org TYPE string
secret_name TYPE string
body TYPE bodyactions_delete_org_secret
RAISING cx_static_check.
* GET - "List selected repositories for an organization secret"
* Operation id: actions/list-selected-repos-for-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_selected_repos_fo
METHODS actions_list_selected_repos_fo
IMPORTING
org TYPE string
secret_name TYPE string
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_actions_list_select01
RAISING cx_static_check.
* PUT - "Set selected repositories for an organization secret"
* Operation id: actions/set-selected-repos-for-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_set_selected_rep01
METHODS actions_set_selected_repos_for
IMPORTING
org TYPE string
secret_name TYPE string
body TYPE bodyactions_set_selected_rep01
RAISING cx_static_check.
* PUT - "Add selected repository to an organization secret"
* Operation id: actions/add-selected-repo-to-org-secret
* Parameter: repository_id, required, path
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 204
* Response: 409
METHODS actions_add_selected_repo_to_o
IMPORTING
repository_id TYPE i
org TYPE string
secret_name TYPE string
RAISING cx_static_check.
* DELETE - "Remove selected repository from an organization secret"
* Operation id: actions/remove-selected-repo-from-org-secret
* Parameter: repository_id, required, path
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 204
* Response: 409
METHODS actions_remove_selected_repo_f
IMPORTING
repository_id TYPE i
org TYPE string
secret_name TYPE string
RAISING cx_static_check.
* GET - "Get the audit log for an organization"
* Operation id: orgs/get-audit-log
* Parameter: org, required, path
* Parameter: phrase, optional, query
* Parameter: include, optional, query
* Parameter: after, optional, query
* Parameter: before, optional, query
* Parameter: order, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_get_audit_log
METHODS orgs_get_audit_log
IMPORTING
org TYPE string
phrase TYPE string OPTIONAL
include TYPE string OPTIONAL
after TYPE string OPTIONAL
before TYPE string OPTIONAL
order TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_orgs_get_audit_log
RAISING cx_static_check.
* GET - "List users blocked by an organization"
* Operation id: orgs/list-blocked-users
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/response_orgs_list_blocked_users
* Response: 415
METHODS orgs_list_blocked_users
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE response_orgs_list_blocked_use
RAISING cx_static_check.
* GET - "Check if a user is blocked by an organization"
* Operation id: orgs/check-blocked-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
* Response: 404
* application/json, #/components/schemas/basic-error
METHODS orgs_check_blocked_user
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* PUT - "Block a user from an organization"
* Operation id: orgs/block-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
* Response: 422
METHODS orgs_block_user
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* DELETE - "Unblock a user from an organization"
* Operation id: orgs/unblock-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
METHODS orgs_unblock_user
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* GET - "List code scanning alerts for an organization"
* Operation id: code-scanning/list-alerts-for-org
* Parameter: state, optional, query
* Parameter: sort, optional, query
* Parameter: org, required, path
* Parameter: before, optional, query
* Parameter: after, optional, query
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Parameter: direction, optional, query
* Response: 200
* application/json, #/components/schemas/response_code_scanning_list_alerts_for_
* Response: 403
* Response: 404
* Response: 503
METHODS code_scanning_list_alerts_for_
IMPORTING
state TYPE code_scanning_alert_state OPTIONAL
sort TYPE string DEFAULT 'created'
org TYPE string
before TYPE string OPTIONAL
after TYPE string OPTIONAL
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
direction TYPE string DEFAULT 'desc'
RETURNING
VALUE(return_data) TYPE response_code_scanning_list_al
RAISING cx_static_check.
* GET - "List SAML SSO authorizations for an organization"
* Operation id: orgs/list-saml-sso-authorizations
* Parameter: page, optional, query
* Parameter: login, optional, query
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_saml_sso_authorizati
METHODS orgs_list_saml_sso_authorizati
IMPORTING
page TYPE i OPTIONAL
login TYPE string OPTIONAL
org TYPE string
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_orgs_list_saml_sso_au
RAISING cx_static_check.
* DELETE - "Remove a SAML SSO authorization for an organization"
* Operation id: orgs/remove-saml-sso-authorization
* Parameter: credential_id, required, path
* Parameter: org, required, path
* Response: 204
* Response: 404
METHODS orgs_remove_saml_sso_authoriza
IMPORTING
credential_id TYPE i
org TYPE string
RAISING cx_static_check.
* GET - "List organization secrets"
* Operation id: dependabot/list-org-secrets
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_dependabot_list_org_secrets
METHODS dependabot_list_org_secrets
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_dependabot_list_org_s
RAISING cx_static_check.
* GET - "Get an organization public key"
* Operation id: dependabot/get-org-public-key
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/dependabot-public-key
METHODS dependabot_get_org_public_key
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE dependabot_public_key
RAISING cx_static_check.
* GET - "Get an organization secret"
* Operation id: dependabot/get-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 200
* application/json, #/components/schemas/organization-dependabot-secret
METHODS dependabot_get_org_secret
IMPORTING
org TYPE string
secret_name TYPE string
RETURNING
VALUE(return_data) TYPE organization_dependabot_secret
RAISING cx_static_check.
* PUT - "Create or update an organization secret"
* Operation id: dependabot/create-or-update-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 201
* application/json, #/components/schemas/empty-object
* Response: 204
* Body ref: #/components/schemas/bodydependabot_create_or_updat
METHODS dependabot_create_or_update_or
IMPORTING
org TYPE string
secret_name TYPE string
body TYPE bodydependabot_create_or_updat
RETURNING
VALUE(return_data) TYPE empty_object
RAISING cx_static_check.
* DELETE - "Delete an organization secret"
* Operation id: dependabot/delete-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 204
* Body ref: #/components/schemas/bodydependabot_delete_org_secr
METHODS dependabot_delete_org_secret
IMPORTING
org TYPE string
secret_name TYPE string
body TYPE bodydependabot_delete_org_secr
RAISING cx_static_check.
* GET - "List selected repositories for an organization secret"
* Operation id: dependabot/list-selected-repos-for-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_dependabot_list_selected_repos
METHODS dependabot_list_selected_repos
IMPORTING
org TYPE string
secret_name TYPE string
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_dependabot_list_selec
RAISING cx_static_check.
* PUT - "Set selected repositories for an organization secret"
* Operation id: dependabot/set-selected-repos-for-org-secret
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 204
* Body ref: #/components/schemas/bodydependabot_set_selected_re
METHODS dependabot_set_selected_repos_
IMPORTING
org TYPE string
secret_name TYPE string
body TYPE bodydependabot_set_selected_re
RAISING cx_static_check.
* PUT - "Add selected repository to an organization secret"
* Operation id: dependabot/add-selected-repo-to-org-secret
* Parameter: repository_id, required, path
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 204
* Response: 409
METHODS dependabot_add_selected_repo_t
IMPORTING
repository_id TYPE i
org TYPE string
secret_name TYPE string
RAISING cx_static_check.
* DELETE - "Remove selected repository from an organization secret"
* Operation id: dependabot/remove-selected-repo-from-org-secret
* Parameter: repository_id, required, path
* Parameter: org, required, path
* Parameter: secret_name, required, path
* Response: 204
* Response: 409
METHODS dependabot_remove_selected_rep
IMPORTING
repository_id TYPE i
org TYPE string
secret_name TYPE string
RAISING cx_static_check.
* GET - "List public organization events"
* Operation id: activity/list-public-org-events
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_public_org_event
METHODS activity_list_public_org_event
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_publi02
RAISING cx_static_check.
* GET - "Get an external group"
* Operation id: teams/external-idp-group-info-for-org
* Parameter: org, required, path
* Parameter: group_id, required, path
* Response: 200
* application/json, #/components/schemas/external-group
METHODS teams_external_idp_group_info_
IMPORTING
org TYPE string
group_id TYPE i
RETURNING
VALUE(return_data) TYPE external_group
RAISING cx_static_check.
* GET - "List external groups in an organization"
* Operation id: teams/list-external-idp-groups-for-org
* Parameter: page, optional, query
* Parameter: display_name, optional, query
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/external-groups
METHODS teams_list_external_idp_groups
IMPORTING
page TYPE i OPTIONAL
display_name TYPE string OPTIONAL
org TYPE string
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE external_groups
RAISING cx_static_check.
* GET - "List failed organization invitations"
* Operation id: orgs/list-failed-invitations
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_failed_invitations
* Response: 404
METHODS orgs_list_failed_invitations
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_failed_invi
RAISING cx_static_check.
* GET - "List organization webhooks"
* Operation id: orgs/list-webhooks
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_webhooks
* Response: 404
METHODS orgs_list_webhooks
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_webhooks
RAISING cx_static_check.
* POST - "Create an organization webhook"
* Operation id: orgs/create-webhook
* Parameter: org, required, path
* Response: 201
* application/json, #/components/schemas/org-hook
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyorgs_create_webhook
METHODS orgs_create_webhook
IMPORTING
org TYPE string
body TYPE bodyorgs_create_webhook
RETURNING
VALUE(return_data) TYPE org_hook
RAISING cx_static_check.
* GET - "Get an organization webhook"
* Operation id: orgs/get-webhook
* Parameter: org, required, path
* Parameter: hook_id, required, path
* Response: 200
* application/json, #/components/schemas/org-hook
* Response: 404
METHODS orgs_get_webhook
IMPORTING
org TYPE string
hook_id TYPE i
RETURNING
VALUE(return_data) TYPE org_hook
RAISING cx_static_check.
* PATCH - "Update an organization webhook"
* Operation id: orgs/update-webhook
* Parameter: org, required, path
* Parameter: hook_id, required, path
* Response: 200
* application/json, #/components/schemas/org-hook
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyorgs_update_webhook
METHODS orgs_update_webhook
IMPORTING
org TYPE string
hook_id TYPE i
body TYPE bodyorgs_update_webhook
RETURNING
VALUE(return_data) TYPE org_hook
RAISING cx_static_check.
* DELETE - "Delete an organization webhook"
* Operation id: orgs/delete-webhook
* Parameter: org, required, path
* Parameter: hook_id, required, path
* Response: 204
* Response: 404
* Body ref: #/components/schemas/bodyorgs_delete_webhook
METHODS orgs_delete_webhook
IMPORTING
org TYPE string
hook_id TYPE i
body TYPE bodyorgs_delete_webhook
RAISING cx_static_check.
* GET - "Get a webhook configuration for an organization"
* Operation id: orgs/get-webhook-config-for-org
* Parameter: org, required, path
* Parameter: hook_id, required, path
* Response: 200
* application/json, #/components/schemas/webhook-config
METHODS orgs_get_webhook_config_for_or
IMPORTING
org TYPE string
hook_id TYPE i
RETURNING
VALUE(return_data) TYPE webhook_config
RAISING cx_static_check.
* PATCH - "Update a webhook configuration for an organization"
* Operation id: orgs/update-webhook-config-for-org
* Parameter: org, required, path
* Parameter: hook_id, required, path
* Response: 200
* application/json, #/components/schemas/webhook-config
* Body ref: #/components/schemas/bodyorgs_update_webhook_config
METHODS orgs_update_webhook_config_for
IMPORTING
org TYPE string
hook_id TYPE i
body TYPE bodyorgs_update_webhook_config
RETURNING
VALUE(return_data) TYPE webhook_config
RAISING cx_static_check.
* GET - "List deliveries for an organization webhook"
* Operation id: orgs/list-webhook-deliveries
* Parameter: org, required, path
* Parameter: hook_id, required, path
* Parameter: per_page, optional, query
* Parameter: cursor, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_webhook_deliveries
* Response: 400
* Response: 422
METHODS orgs_list_webhook_deliveries
IMPORTING
org TYPE string
hook_id TYPE i
per_page TYPE i DEFAULT 30
cursor TYPE string OPTIONAL
RETURNING
VALUE(return_data) TYPE response_orgs_list_webhook_del
RAISING cx_static_check.
* GET - "Get a webhook delivery for an organization webhook"
* Operation id: orgs/get-webhook-delivery
* Parameter: org, required, path
* Parameter: hook_id, required, path
* Parameter: delivery_id, required, path
* Response: 200
* application/json, #/components/schemas/hook-delivery
* Response: 400
* Response: 422
METHODS orgs_get_webhook_delivery
IMPORTING
org TYPE string
hook_id TYPE i
delivery_id TYPE i
RETURNING
VALUE(return_data) TYPE hook_delivery
RAISING cx_static_check.
* POST - "Redeliver a delivery for an organization webhook"
* Operation id: orgs/redeliver-webhook-delivery
* Parameter: org, required, path
* Parameter: hook_id, required, path
* Parameter: delivery_id, required, path
* Response: 202
* Response: 400
* Response: 422
METHODS orgs_redeliver_webhook_deliver
IMPORTING
org TYPE string
hook_id TYPE i
delivery_id TYPE i
RAISING cx_static_check.
* POST - "Ping an organization webhook"
* Operation id: orgs/ping-webhook
* Parameter: org, required, path
* Parameter: hook_id, required, path
* Response: 204
* Response: 404
METHODS orgs_ping_webhook
IMPORTING
org TYPE string
hook_id TYPE i
RAISING cx_static_check.
* GET - "Get an organization installation for the authenticated app"
* Operation id: apps/get-org-installation
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/installation
METHODS apps_get_org_installation
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE installation
RAISING cx_static_check.
* GET - "List app installations for an organization"
* Operation id: orgs/list-app-installations
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_app_installations
METHODS orgs_list_app_installations
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_app_install
RAISING cx_static_check.
* GET - "Get interaction restrictions for an organization"
* Operation id: interactions/get-restrictions-for-org
* Parameter: org, required, path
* Response: 200
* application/json, string
METHODS interactions_get_restrictions_
IMPORTING
org TYPE string
RAISING cx_static_check.
* PUT - "Set interaction restrictions for an organization"
* Operation id: interactions/set-restrictions-for-org
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/interaction-limit-response
* Response: 422
* Body ref: #/components/schemas/interaction-limit
METHODS interactions_set_restrictions_
IMPORTING
org TYPE string
body TYPE interaction_limit
RETURNING
VALUE(return_data) TYPE interaction_limit_response
RAISING cx_static_check.
* DELETE - "Remove interaction restrictions for an organization"
* Operation id: interactions/remove-restrictions-for-org
* Parameter: org, required, path
* Response: 204
METHODS interactions_remove_restrictio
IMPORTING
org TYPE string
RAISING cx_static_check.
* GET - "List pending organization invitations"
* Operation id: orgs/list-pending-invitations
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_pending_invitations
* Response: 404
METHODS orgs_list_pending_invitations
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_pending_inv
RAISING cx_static_check.
* POST - "Create an organization invitation"
* Operation id: orgs/create-invitation
* Parameter: org, required, path
* Response: 201
* application/json, #/components/schemas/organization-invitation
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyorgs_create_invitation
METHODS orgs_create_invitation
IMPORTING
org TYPE string
body TYPE bodyorgs_create_invitation
RETURNING
VALUE(return_data) TYPE organization_invitation
RAISING cx_static_check.
* DELETE - "Cancel an organization invitation"
* Operation id: orgs/cancel-invitation
* Parameter: org, required, path
* Parameter: invitation_id, required, path
* Response: 204
* Response: 404
* Response: 422
METHODS orgs_cancel_invitation
IMPORTING
org TYPE string
invitation_id TYPE i
RAISING cx_static_check.
* GET - "List organization invitation teams"
* Operation id: orgs/list-invitation-teams
* Parameter: org, required, path
* Parameter: invitation_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_invitation_teams
* Response: 404
METHODS orgs_list_invitation_teams
IMPORTING
org TYPE string
invitation_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_invitation_
RAISING cx_static_check.
* GET - "List organization issues assigned to the authenticated user"
* Operation id: issues/list-for-org
* Parameter: filter, optional, query
* Parameter: state, optional, query
* Parameter: sort, optional, query
* Parameter: org, required, path
* Parameter: labels, optional, query
* Parameter: direction, optional, query
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_for_org
* Response: 404
METHODS issues_list_for_org
IMPORTING
filter TYPE string DEFAULT 'assigned'
state TYPE string DEFAULT 'open'
sort TYPE string DEFAULT 'created'
org TYPE string
labels TYPE string OPTIONAL
direction TYPE string DEFAULT 'desc'
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_for_org
RAISING cx_static_check.
* GET - "List organization members"
* Operation id: orgs/list-members
* Parameter: filter, optional, query
* Parameter: role, optional, query
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_members
* Response: 302
* Response: 422
METHODS orgs_list_members
IMPORTING
filter TYPE string DEFAULT 'all'
role TYPE string DEFAULT 'all'
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_members
RAISING cx_static_check.
* GET - "Check organization membership for a user"
* Operation id: orgs/check-membership-for-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
* Response: 302
* Response: 404
METHODS orgs_check_membership_for_user
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* DELETE - "Remove an organization member"
* Operation id: orgs/remove-member
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
* Response: 403
METHODS orgs_remove_member
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* GET - "Get organization membership for a user"
* Operation id: orgs/get-membership-for-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/org-membership
* Response: 403
* Response: 404
METHODS orgs_get_membership_for_user
IMPORTING
org TYPE string
username TYPE string
RETURNING
VALUE(return_data) TYPE org_membership
RAISING cx_static_check.
* PUT - "Set organization membership for a user"
* Operation id: orgs/set-membership-for-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/org-membership
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodyorgs_set_membership_for_us
METHODS orgs_set_membership_for_user
IMPORTING
org TYPE string
username TYPE string
body TYPE bodyorgs_set_membership_for_us
RETURNING
VALUE(return_data) TYPE org_membership
RAISING cx_static_check.
* DELETE - "Remove organization membership for a user"
* Operation id: orgs/remove-membership-for-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodyorgs_remove_membership_for
METHODS orgs_remove_membership_for_use
IMPORTING
org TYPE string
username TYPE string
body TYPE bodyorgs_remove_membership_for
RAISING cx_static_check.
* GET - "List organization migrations"
* Operation id: migrations/list-for-org
* Parameter: exclude, optional, query
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_migrations_list_for_org
METHODS migrations_list_for_org
IMPORTING
exclude TYPE string OPTIONAL
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_migrations_list_for_o
RAISING cx_static_check.
* POST - "Start an organization migration"
* Operation id: migrations/start-for-org
* Parameter: org, required, path
* Response: 201
* application/json, #/components/schemas/migration
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodymigrations_start_for_org
METHODS migrations_start_for_org
IMPORTING
org TYPE string
body TYPE bodymigrations_start_for_org
RETURNING
VALUE(return_data) TYPE migration
RAISING cx_static_check.
* GET - "Get an organization migration status"
* Operation id: migrations/get-status-for-org
* Parameter: exclude, optional, query
* Parameter: org, required, path
* Parameter: migration_id, required, path
* Response: 200
* application/json, #/components/schemas/migration
* Response: 404
METHODS migrations_get_status_for_org
IMPORTING
exclude TYPE string OPTIONAL
org TYPE string
migration_id TYPE i
RETURNING
VALUE(return_data) TYPE migration
RAISING cx_static_check.
* GET - "Download an organization migration archive"
* Operation id: migrations/download-archive-for-org
* Parameter: org, required, path
* Parameter: migration_id, required, path
* Response: 302
* Response: 404
METHODS migrations_download_archive_fo
IMPORTING
org TYPE string
migration_id TYPE i
RAISING cx_static_check.
* DELETE - "Delete an organization migration archive"
* Operation id: migrations/delete-archive-for-org
* Parameter: org, required, path
* Parameter: migration_id, required, path
* Response: 204
* Response: 404
METHODS migrations_delete_archive_for_
IMPORTING
org TYPE string
migration_id TYPE i
RAISING cx_static_check.
* DELETE - "Unlock an organization repository"
* Operation id: migrations/unlock-repo-for-org
* Parameter: org, required, path
* Parameter: migration_id, required, path
* Parameter: repo_name, required, path
* Response: 204
* Response: 404
METHODS migrations_unlock_repo_for_org
IMPORTING
org TYPE string
migration_id TYPE i
repo_name TYPE string
RAISING cx_static_check.
* GET - "List repositories in an organization migration"
* Operation id: migrations/list-repos-for-org
* Parameter: org, required, path
* Parameter: migration_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_migrations_list_repos_for_org
* Response: 404
METHODS migrations_list_repos_for_org
IMPORTING
org TYPE string
migration_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_migrations_list_repos
RAISING cx_static_check.
* GET - "List outside collaborators for an organization"
* Operation id: orgs/list-outside-collaborators
* Parameter: filter, optional, query
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_outside_collaborator
METHODS orgs_list_outside_collaborator
IMPORTING
filter TYPE string DEFAULT 'all'
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_outside_col
RAISING cx_static_check.
* PUT - "Convert an organization member to outside collaborator"
* Operation id: orgs/convert-member-to-outside-collaborator
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 202
* application/json, #/components/schemas/response_orgs_convert_member_to_outside
* Response: 204
* Response: 403
* Response: 404
METHODS orgs_convert_member_to_outside
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* DELETE - "Remove outside collaborator from an organization"
* Operation id: orgs/remove-outside-collaborator
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
* Response: 422
* application/json, #/components/schemas/response_orgs_remove_outside_collaborat
METHODS orgs_remove_outside_collaborat
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* GET - "List packages for an organization"
* Operation id: packages/list-packages-for-organization
* Parameter: package_type, required, query
* Parameter: org, required, path
* Parameter: visibility, optional, query
* Response: 200
* application/json, #/components/schemas/response_packages_list_packages_for_org
* Response: 401
* Response: 403
METHODS packages_list_packages_for_org
IMPORTING
package_type TYPE string
org TYPE string
visibility TYPE string OPTIONAL
RETURNING
VALUE(return_data) TYPE response_packages_list_package
RAISING cx_static_check.
* GET - "Get a package for an organization"
* Operation id: packages/get-package-for-organization
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/package
METHODS packages_get_package_for_organ
IMPORTING
package_type TYPE string
package_name TYPE string
org TYPE string
RETURNING
VALUE(return_data) TYPE package
RAISING cx_static_check.
* DELETE - "Delete a package for an organization"
* Operation id: packages/delete-package-for-org
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: org, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_delete_package_for_or
IMPORTING
package_type TYPE string
package_name TYPE string
org TYPE string
RAISING cx_static_check.
* POST - "Restore a package for an organization"
* Operation id: packages/restore-package-for-org
* Parameter: token, optional, query
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: org, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_restore_package_for_o
IMPORTING
token TYPE string OPTIONAL
package_type TYPE string
package_name TYPE string
org TYPE string
RAISING cx_static_check.
* GET - "Get all package versions for a package owned by an organization"
* Operation id: packages/get-all-package-versions-for-package-owned-by-org
* Parameter: state, optional, query
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: org, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_packages_get_all_package_versi
* Response: 401
* Response: 403
* Response: 404
METHODS packages_get_all_package_versi
IMPORTING
state TYPE string DEFAULT 'active'
package_type TYPE string
package_name TYPE string
org TYPE string
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_packages_get_all_pack
RAISING cx_static_check.
* GET - "Get a package version for an organization"
* Operation id: packages/get-package-version-for-organization
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: org, required, path
* Parameter: package_version_id, required, path
* Response: 200
* application/json, #/components/schemas/package-version
METHODS packages_get_package_version_f
IMPORTING
package_type TYPE string
package_name TYPE string
org TYPE string
package_version_id TYPE i
RETURNING
VALUE(return_data) TYPE package_version
RAISING cx_static_check.
* DELETE - "Delete package version for an organization"
* Operation id: packages/delete-package-version-for-org
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: org, required, path
* Parameter: package_version_id, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_delete_package_versio
IMPORTING
package_type TYPE string
package_name TYPE string
org TYPE string
package_version_id TYPE i
RAISING cx_static_check.
* POST - "Restore package version for an organization"
* Operation id: packages/restore-package-version-for-org
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: org, required, path
* Parameter: package_version_id, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_restore_package_versi
IMPORTING
package_type TYPE string
package_name TYPE string
org TYPE string
package_version_id TYPE i
RAISING cx_static_check.
* GET - "List organization projects"
* Operation id: projects/list-for-org
* Parameter: state, optional, query
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_projects_list_for_org
* Response: 422
METHODS projects_list_for_org
IMPORTING
state TYPE string DEFAULT 'open'
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_projects_list_for_org
RAISING cx_static_check.
* POST - "Create an organization project"
* Operation id: projects/create-for-org
* Parameter: org, required, path
* Response: 201
* application/json, #/components/schemas/project
* Response: 401
* Response: 403
* Response: 404
* Response: 410
* Response: 422
* Body ref: #/components/schemas/bodyprojects_create_for_org
METHODS projects_create_for_org
IMPORTING
org TYPE string
body TYPE bodyprojects_create_for_org
RETURNING
VALUE(return_data) TYPE project
RAISING cx_static_check.
* GET - "List public organization members"
* Operation id: orgs/list-public-members
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_public_members
METHODS orgs_list_public_members
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_public_memb
RAISING cx_static_check.
* GET - "Check public organization membership for a user"
* Operation id: orgs/check-public-membership-for-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
* Response: 404
METHODS orgs_check_public_membership_f
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* PUT - "Set public organization membership for the authenticated user"
* Operation id: orgs/set-public-membership-for-authenticated-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
* Response: 403
METHODS orgs_set_public_membership_for
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* DELETE - "Remove public organization membership for the authenticated user"
* Operation id: orgs/remove-public-membership-for-authenticated-user
* Parameter: org, required, path
* Parameter: username, required, path
* Response: 204
METHODS orgs_remove_public_membership_
IMPORTING
org TYPE string
username TYPE string
RAISING cx_static_check.
* GET - "List organization repositories"
* Operation id: repos/list-for-org
* Parameter: type, optional, query
* Parameter: sort, optional, query
* Parameter: direction, optional, query
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_for_org
METHODS repos_list_for_org
IMPORTING
type TYPE string OPTIONAL
sort TYPE string DEFAULT 'created'
direction TYPE string OPTIONAL
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_for_org
RAISING cx_static_check.
* POST - "Create an organization repository"
* Operation id: repos/create-in-org
* Parameter: org, required, path
* Response: 201
* application/json, #/components/schemas/repository
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_in_org
METHODS repos_create_in_org
IMPORTING
org TYPE string
body TYPE bodyrepos_create_in_org
RETURNING
VALUE(return_data) TYPE repository
RAISING cx_static_check.
* GET - "List secret scanning alerts for an organization"
* Operation id: secret-scanning/list-alerts-for-org
* Parameter: org, required, path
* Parameter: state, optional, query
* Parameter: secret_type, optional, query
* Parameter: resolution, optional, query
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_secret_scanning_list_alerts_01
* Response: 404
* Response: 503
METHODS secret_scanning_list_alerts_01
IMPORTING
org TYPE string
state TYPE string OPTIONAL
secret_type TYPE string OPTIONAL
resolution TYPE string OPTIONAL
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_secret_scanning_lis01
RAISING cx_static_check.
* GET - "Get GitHub Actions billing for an organization"
* Operation id: billing/get-github-actions-billing-org
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/actions-billing-usage
METHODS billing_get_github_actions_b01
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE actions_billing_usage
RAISING cx_static_check.
* GET - "Get GitHub Advanced Security active committers for an organization"
* Operation id: billing/get-github-advanced-security-billing-org
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/advanced-security-active-committers
* Response: 403
METHODS billing_get_github_advanced_01
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE advanced_security_active_com02
RAISING cx_static_check.
* GET - "Get GitHub Packages billing for an organization"
* Operation id: billing/get-github-packages-billing-org
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/packages-billing-usage
METHODS billing_get_github_packages_01
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE packages_billing_usage
RAISING cx_static_check.
* GET - "Get shared storage billing for an organization"
* Operation id: billing/get-shared-storage-billing-org
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/combined-billing-usage
METHODS billing_get_shared_storage_b01
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE combined_billing_usage
RAISING cx_static_check.
* GET - "List IdP groups for an organization"
* Operation id: teams/list-idp-groups-for-org
* Parameter: page, optional, query
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/group-mapping
METHODS teams_list_idp_groups_for_org
IMPORTING
page TYPE string OPTIONAL
org TYPE string
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE group_mapping
RAISING cx_static_check.
* GET - "List teams"
* Operation id: teams/list
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_teams_list
* Response: 403
METHODS teams_list
IMPORTING
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_teams_list
RAISING cx_static_check.
* POST - "Create a team"
* Operation id: teams/create
* Parameter: org, required, path
* Response: 201
* application/json, #/components/schemas/team-full
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodyteams_create
METHODS teams_create
IMPORTING
org TYPE string
body TYPE bodyteams_create
RETURNING
VALUE(return_data) TYPE team_full
RAISING cx_static_check.
* GET - "Get a team by name"
* Operation id: teams/get-by-name
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Response: 200
* application/json, #/components/schemas/team-full
* Response: 404
METHODS teams_get_by_name
IMPORTING
org TYPE string
team_slug TYPE string
RETURNING
VALUE(return_data) TYPE team_full
RAISING cx_static_check.
* PATCH - "Update a team"
* Operation id: teams/update-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Response: 201
* application/json, #/components/schemas/team-full
* Body ref: #/components/schemas/bodyteams_update_in_org
METHODS teams_update_in_org
IMPORTING
org TYPE string
team_slug TYPE string
body TYPE bodyteams_update_in_org
RETURNING
VALUE(return_data) TYPE team_full
RAISING cx_static_check.
* DELETE - "Delete a team"
* Operation id: teams/delete-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Response: 204
* Body ref: #/components/schemas/bodyteams_delete_in_org
METHODS teams_delete_in_org
IMPORTING
org TYPE string
team_slug TYPE string
body TYPE bodyteams_delete_in_org
RAISING cx_static_check.
* GET - "List discussions"
* Operation id: teams/list-discussions-in-org
* Parameter: pinned, optional, query
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: direction, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_teams_list_discussions_in_org
METHODS teams_list_discussions_in_org
IMPORTING
pinned TYPE string OPTIONAL
org TYPE string
team_slug TYPE string
direction TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_teams_list_discussion
RAISING cx_static_check.
* POST - "Create a discussion"
* Operation id: teams/create-discussion-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Response: 201
* application/json, #/components/schemas/team-discussion
* Body ref: #/components/schemas/bodyteams_create_discussion_in
METHODS teams_create_discussion_in_org
IMPORTING
org TYPE string
team_slug TYPE string
body TYPE bodyteams_create_discussion_in
RETURNING
VALUE(return_data) TYPE team_discussion
RAISING cx_static_check.
* GET - "Get a discussion"
* Operation id: teams/get-discussion-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Response: 200
* application/json, #/components/schemas/team-discussion
METHODS teams_get_discussion_in_org
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
RETURNING
VALUE(return_data) TYPE team_discussion
RAISING cx_static_check.
* PATCH - "Update a discussion"
* Operation id: teams/update-discussion-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Response: 200
* application/json, #/components/schemas/team-discussion
* Body ref: #/components/schemas/bodyteams_update_discussion_in
METHODS teams_update_discussion_in_org
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
body TYPE bodyteams_update_discussion_in
RETURNING
VALUE(return_data) TYPE team_discussion
RAISING cx_static_check.
* DELETE - "Delete a discussion"
* Operation id: teams/delete-discussion-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Response: 204
* Body ref: #/components/schemas/bodyteams_delete_discussion_in
METHODS teams_delete_discussion_in_org
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
body TYPE bodyteams_delete_discussion_in
RAISING cx_static_check.
* GET - "List discussion comments"
* Operation id: teams/list-discussion-comments-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Parameter: direction, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_teams_list_discussion_comments
METHODS teams_list_discussion_comments
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
direction TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_teams_list_discussi01
RAISING cx_static_check.
* POST - "Create a discussion comment"
* Operation id: teams/create-discussion-comment-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Response: 201
* application/json, #/components/schemas/team-discussion-comment
* Body ref: #/components/schemas/bodyteams_create_discussion_co
METHODS teams_create_discussion_commen
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
body TYPE bodyteams_create_discussion_co
RETURNING
VALUE(return_data) TYPE team_discussion_comment
RAISING cx_static_check.
* GET - "Get a discussion comment"
* Operation id: teams/get-discussion-comment-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Parameter: comment_number, required, path
* Response: 200
* application/json, #/components/schemas/team-discussion-comment
METHODS teams_get_discussion_comment_i
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
comment_number TYPE i
RETURNING
VALUE(return_data) TYPE team_discussion_comment
RAISING cx_static_check.
* PATCH - "Update a discussion comment"
* Operation id: teams/update-discussion-comment-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Parameter: comment_number, required, path
* Response: 200
* application/json, #/components/schemas/team-discussion-comment
* Body ref: #/components/schemas/bodyteams_update_discussion_co
METHODS teams_update_discussion_commen
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
comment_number TYPE i
body TYPE bodyteams_update_discussion_co
RETURNING
VALUE(return_data) TYPE team_discussion_comment
RAISING cx_static_check.
* DELETE - "Delete a discussion comment"
* Operation id: teams/delete-discussion-comment-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Parameter: comment_number, required, path
* Response: 204
* Body ref: #/components/schemas/bodyteams_delete_discussion_co
METHODS teams_delete_discussion_commen
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
comment_number TYPE i
body TYPE bodyteams_delete_discussion_co
RAISING cx_static_check.
* GET - "List reactions for a team discussion comment"
* Operation id: reactions/list-for-team-discussion-comment-in-org
* Parameter: content, optional, query
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Parameter: comment_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_reactions_list_for_team_discus
METHODS reactions_list_for_team_discus
IMPORTING
content TYPE string OPTIONAL
org TYPE string
team_slug TYPE string
discussion_number TYPE i
comment_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_reactions_list_for_te
RAISING cx_static_check.
* POST - "Create reaction for a team discussion comment"
* Operation id: reactions/create-for-team-discussion-comment-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Parameter: comment_number, required, path
* Response: 200
* application/json, #/components/schemas/reaction
* Response: 201
* application/json, #/components/schemas/reaction
* Body ref: #/components/schemas/bodyreactions_create_for_team_
METHODS reactions_create_for_team_disc
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
comment_number TYPE i
body TYPE bodyreactions_create_for_team_
RETURNING
VALUE(return_data) TYPE reaction
RAISING cx_static_check.
* DELETE - "Delete team discussion comment reaction"
* Operation id: reactions/delete-for-team-discussion-comment
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Parameter: comment_number, required, path
* Parameter: reaction_id, required, path
* Response: 204
METHODS reactions_delete_for_team_disc
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
comment_number TYPE i
reaction_id TYPE i
RAISING cx_static_check.
* GET - "List reactions for a team discussion"
* Operation id: reactions/list-for-team-discussion-in-org
* Parameter: content, optional, query
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_reactions_list_for_team_disc01
METHODS reactions_list_for_team_disc01
IMPORTING
content TYPE string OPTIONAL
org TYPE string
team_slug TYPE string
discussion_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_reactions_list_for_01
RAISING cx_static_check.
* POST - "Create reaction for a team discussion"
* Operation id: reactions/create-for-team-discussion-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Response: 200
* application/json, #/components/schemas/reaction
* Response: 201
* application/json, #/components/schemas/reaction
* Body ref: #/components/schemas/bodyreactions_create_for_tea01
METHODS reactions_create_for_team_di01
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
body TYPE bodyreactions_create_for_tea01
RETURNING
VALUE(return_data) TYPE reaction
RAISING cx_static_check.
* DELETE - "Delete team discussion reaction"
* Operation id: reactions/delete-for-team-discussion
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: discussion_number, required, path
* Parameter: reaction_id, required, path
* Response: 204
METHODS reactions_delete_for_team_di01
IMPORTING
org TYPE string
team_slug TYPE string
discussion_number TYPE i
reaction_id TYPE i
RAISING cx_static_check.
* PATCH - "Update the connection between an external group and a team"
* Operation id: teams/link-external-idp-group-to-team-for-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Response: 200
* application/json, #/components/schemas/external-group
* Body ref: #/components/schemas/bodyteams_link_external_idp_gr
METHODS teams_link_external_idp_group_
IMPORTING
org TYPE string
team_slug TYPE string
body TYPE bodyteams_link_external_idp_gr
RETURNING
VALUE(return_data) TYPE external_group
RAISING cx_static_check.
* DELETE - "Remove the connection between an external group and a team"
* Operation id: teams/unlink-external-idp-group-from-team-for-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Response: 204
* Body ref: #/components/schemas/bodyteams_unlink_external_idp_
METHODS teams_unlink_external_idp_grou
IMPORTING
org TYPE string
team_slug TYPE string
body TYPE bodyteams_unlink_external_idp_
RAISING cx_static_check.
* GET - "List pending team invitations"
* Operation id: teams/list-pending-invitations-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_teams_list_pending_invitations
METHODS teams_list_pending_invitations
IMPORTING
org TYPE string
team_slug TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_teams_list_pending_in
RAISING cx_static_check.
* GET - "List team members"
* Operation id: teams/list-members-in-org
* Parameter: role, optional, query
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_teams_list_members_in_org
METHODS teams_list_members_in_org
IMPORTING
role TYPE string DEFAULT 'all'
org TYPE string
team_slug TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_teams_list_members_in
RAISING cx_static_check.
* GET - "Get team membership for a user"
* Operation id: teams/get-membership-for-user-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/team-membership
* Response: 404
METHODS teams_get_membership_for_user_
IMPORTING
org TYPE string
team_slug TYPE string
username TYPE string
RETURNING
VALUE(return_data) TYPE team_membership
RAISING cx_static_check.
* PUT - "Add or update team membership for a user"
* Operation id: teams/add-or-update-membership-for-user-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/team-membership
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodyteams_add_or_update_member
METHODS teams_add_or_update_membership
IMPORTING
org TYPE string
team_slug TYPE string
username TYPE string
body TYPE bodyteams_add_or_update_member
RETURNING
VALUE(return_data) TYPE team_membership
RAISING cx_static_check.
* DELETE - "Remove team membership for a user"
* Operation id: teams/remove-membership-for-user-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: username, required, path
* Response: 204
* Response: 403
* Body ref: #/components/schemas/bodyteams_remove_membership_fo
METHODS teams_remove_membership_for_us
IMPORTING
org TYPE string
team_slug TYPE string
username TYPE string
body TYPE bodyteams_remove_membership_fo
RAISING cx_static_check.
* GET - "List team projects"
* Operation id: teams/list-projects-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_teams_list_projects_in_org
METHODS teams_list_projects_in_org
IMPORTING
org TYPE string
team_slug TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_teams_list_projects_i
RAISING cx_static_check.
* GET - "Check team permissions for a project"
* Operation id: teams/check-permissions-for-project-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: project_id, required, path
* Response: 200
* application/json, #/components/schemas/team-project
* Response: 404
METHODS teams_check_permissions_for_pr
IMPORTING
org TYPE string
team_slug TYPE string
project_id TYPE i
RETURNING
VALUE(return_data) TYPE team_project
RAISING cx_static_check.
* PUT - "Add or update team project permissions"
* Operation id: teams/add-or-update-project-permissions-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: project_id, required, path
* Response: 204
* Response: 403
* application/json, #/components/schemas/response_teams_add_or_update_project_pe
* Body ref: #/components/schemas/bodyteams_add_or_update_projec
METHODS teams_add_or_update_project_pe
IMPORTING
org TYPE string
team_slug TYPE string
project_id TYPE i
body TYPE bodyteams_add_or_update_projec
RAISING cx_static_check.
* DELETE - "Remove a project from a team"
* Operation id: teams/remove-project-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: project_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyteams_remove_project_in_or
METHODS teams_remove_project_in_org
IMPORTING
org TYPE string
team_slug TYPE string
project_id TYPE i
body TYPE bodyteams_remove_project_in_or
RAISING cx_static_check.
* GET - "List team repositories"
* Operation id: teams/list-repos-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_teams_list_repos_in_org
METHODS teams_list_repos_in_org
IMPORTING
org TYPE string
team_slug TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_teams_list_repos_in_o
RAISING cx_static_check.
* GET - "Check team permissions for a repository"
* Operation id: teams/check-permissions-for-repo-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/team-repository
* Response: 204
* Response: 404
METHODS teams_check_permissions_for_re
IMPORTING
org TYPE string
team_slug TYPE string
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE team_repository
RAISING cx_static_check.
* PUT - "Add or update team repository permissions"
* Operation id: teams/add-or-update-repo-permissions-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Body ref: #/components/schemas/bodyteams_add_or_update_repo_p
METHODS teams_add_or_update_repo_permi
IMPORTING
org TYPE string
team_slug TYPE string
owner TYPE string
repo TYPE string
body TYPE bodyteams_add_or_update_repo_p
RAISING cx_static_check.
* DELETE - "Remove a repository from a team"
* Operation id: teams/remove-repo-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Body ref: #/components/schemas/bodyteams_remove_repo_in_org
METHODS teams_remove_repo_in_org
IMPORTING
org TYPE string
team_slug TYPE string
owner TYPE string
repo TYPE string
body TYPE bodyteams_remove_repo_in_org
RAISING cx_static_check.
* GET - "List IdP groups for a team"
* Operation id: teams/list-idp-groups-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Response: 200
* application/json, #/components/schemas/group-mapping
METHODS teams_list_idp_groups_in_org
IMPORTING
org TYPE string
team_slug TYPE string
RETURNING
VALUE(return_data) TYPE group_mapping
RAISING cx_static_check.
* PATCH - "Create or update IdP group connections"
* Operation id: teams/create-or-update-idp-group-connections-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Response: 200
* application/json, #/components/schemas/group-mapping
* Body ref: #/components/schemas/bodyteams_create_or_update_idp
METHODS teams_create_or_update_idp_gro
IMPORTING
org TYPE string
team_slug TYPE string
body TYPE bodyteams_create_or_update_idp
RETURNING
VALUE(return_data) TYPE group_mapping
RAISING cx_static_check.
* GET - "List child teams"
* Operation id: teams/list-child-in-org
* Parameter: org, required, path
* Parameter: team_slug, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_teams_list_child_in_org
METHODS teams_list_child_in_org
IMPORTING
org TYPE string
team_slug TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_teams_list_child_in_o
RAISING cx_static_check.
* GET - "Get a project card"
* Operation id: projects/get-card
* Parameter: card_id, required, path
* Response: 200
* application/json, #/components/schemas/project-card
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS projects_get_card
IMPORTING
card_id TYPE i
RETURNING
VALUE(return_data) TYPE project_card
RAISING cx_static_check.
* PATCH - "Update an existing project card"
* Operation id: projects/update-card
* Parameter: card_id, required, path
* Response: 200
* application/json, #/components/schemas/project-card
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyprojects_update_card
METHODS projects_update_card
IMPORTING
card_id TYPE i
body TYPE bodyprojects_update_card
RETURNING
VALUE(return_data) TYPE project_card
RAISING cx_static_check.
* DELETE - "Delete a project card"
* Operation id: projects/delete-card
* Parameter: card_id, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* application/json, #/components/schemas/response_projects_delete_card
* Response: 404
* Body ref: #/components/schemas/bodyprojects_delete_card
METHODS projects_delete_card
IMPORTING
card_id TYPE i
body TYPE bodyprojects_delete_card
RAISING cx_static_check.
* POST - "Move a project card"
* Operation id: projects/move-card
* Parameter: card_id, required, path
* Response: 201
* application/json, #/components/schemas/response_projects_move_card
* Response: 304
* Response: 401
* Response: 403
* application/json, #/components/schemas/response_projects_move_card
* Response: 422
* Response: 503
* application/json, #/components/schemas/response_projects_move_card
* Body ref: #/components/schemas/bodyprojects_move_card
METHODS projects_move_card
IMPORTING
card_id TYPE i
body TYPE bodyprojects_move_card
RETURNING
VALUE(return_data) TYPE response_projects_move_card
RAISING cx_static_check.
* GET - "Get a project column"
* Operation id: projects/get-column
* Parameter: column_id, required, path
* Response: 200
* application/json, #/components/schemas/project-column
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS projects_get_column
IMPORTING
column_id TYPE i
RETURNING
VALUE(return_data) TYPE project_column
RAISING cx_static_check.
* PATCH - "Update an existing project column"
* Operation id: projects/update-column
* Parameter: column_id, required, path
* Response: 200
* application/json, #/components/schemas/project-column
* Response: 304
* Response: 401
* Response: 403
* Body ref: #/components/schemas/bodyprojects_update_column
METHODS projects_update_column
IMPORTING
column_id TYPE i
body TYPE bodyprojects_update_column
RETURNING
VALUE(return_data) TYPE project_column
RAISING cx_static_check.
* DELETE - "Delete a project column"
* Operation id: projects/delete-column
* Parameter: column_id, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Body ref: #/components/schemas/bodyprojects_delete_column
METHODS projects_delete_column
IMPORTING
column_id TYPE i
body TYPE bodyprojects_delete_column
RAISING cx_static_check.
* GET - "List project cards"
* Operation id: projects/list-cards
* Parameter: archived_state, optional, query
* Parameter: column_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_projects_list_cards
* Response: 304
* Response: 401
* Response: 403
METHODS projects_list_cards
IMPORTING
archived_state TYPE string DEFAULT 'not_archived'
column_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_projects_list_cards
RAISING cx_static_check.
* POST - "Create a project card"
* Operation id: projects/create-card
* Parameter: column_id, required, path
* Response: 201
* application/json, #/components/schemas/project-card
* Response: 304
* Response: 401
* Response: 403
* Response: 422
* application/json, string
* Response: 503
* application/json, #/components/schemas/response_projects_create_card
* Body schema: string
METHODS projects_create_card
IMPORTING
column_id TYPE i
body TYPE string
RETURNING
VALUE(return_data) TYPE project_card
RAISING cx_static_check.
* POST - "Move a project column"
* Operation id: projects/move-column
* Parameter: column_id, required, path
* Response: 201
* application/json, #/components/schemas/response_projects_move_column
* Response: 304
* Response: 401
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodyprojects_move_column
METHODS projects_move_column
IMPORTING
column_id TYPE i
body TYPE bodyprojects_move_column
RETURNING
VALUE(return_data) TYPE response_projects_move_column
RAISING cx_static_check.
* GET - "Get a project"
* Operation id: projects/get
* Parameter: project_id, required, path
* Response: 200
* application/json, #/components/schemas/project
* Response: 304
* Response: 401
* Response: 403
METHODS projects_get
IMPORTING
project_id TYPE i
RETURNING
VALUE(return_data) TYPE project
RAISING cx_static_check.
* PATCH - "Update a project"
* Operation id: projects/update
* Parameter: project_id, required, path
* Response: 200
* application/json, #/components/schemas/project
* Response: 304
* Response: 401
* Response: 403
* application/json, #/components/schemas/response_projects_update
* Response: 404
* Response: 410
* Response: 422
* Body ref: #/components/schemas/bodyprojects_update
METHODS projects_update
IMPORTING
project_id TYPE i
body TYPE bodyprojects_update
RETURNING
VALUE(return_data) TYPE project
RAISING cx_static_check.
* DELETE - "Delete a project"
* Operation id: projects/delete
* Parameter: project_id, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* application/json, #/components/schemas/response_projects_delete
* Response: 404
* Response: 410
* Body ref: #/components/schemas/bodyprojects_delete
METHODS projects_delete
IMPORTING
project_id TYPE i
body TYPE bodyprojects_delete
RAISING cx_static_check.
* GET - "List project collaborators"
* Operation id: projects/list-collaborators
* Parameter: affiliation, optional, query
* Parameter: project_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_projects_list_collaborators
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
METHODS projects_list_collaborators
IMPORTING
affiliation TYPE string DEFAULT 'all'
project_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_projects_list_collabo
RAISING cx_static_check.
* PUT - "Add project collaborator"
* Operation id: projects/add-collaborator
* Parameter: project_id, required, path
* Parameter: username, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyprojects_add_collaborator
METHODS projects_add_collaborator
IMPORTING
project_id TYPE i
username TYPE string
body TYPE bodyprojects_add_collaborator
RAISING cx_static_check.
* DELETE - "Remove user as a collaborator"
* Operation id: projects/remove-collaborator
* Parameter: project_id, required, path
* Parameter: username, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyprojects_remove_collaborat
METHODS projects_remove_collaborator
IMPORTING
project_id TYPE i
username TYPE string
body TYPE bodyprojects_remove_collaborat
RAISING cx_static_check.
* GET - "Get project permission for a user"
* Operation id: projects/get-permission-for-user
* Parameter: project_id, required, path
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/project-collaborator-permission
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
METHODS projects_get_permission_for_us
IMPORTING
project_id TYPE i
username TYPE string
RETURNING
VALUE(return_data) TYPE project_collaborator_permissio
RAISING cx_static_check.
* GET - "List project columns"
* Operation id: projects/list-columns
* Parameter: project_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_projects_list_columns
* Response: 304
* Response: 401
* Response: 403
METHODS projects_list_columns
IMPORTING
project_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_projects_list_columns
RAISING cx_static_check.
* POST - "Create a project column"
* Operation id: projects/create-column
* Parameter: project_id, required, path
* Response: 201
* application/json, #/components/schemas/project-column
* Response: 304
* Response: 401
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodyprojects_create_column
METHODS projects_create_column
IMPORTING
project_id TYPE i
body TYPE bodyprojects_create_column
RETURNING
VALUE(return_data) TYPE project_column
RAISING cx_static_check.
* GET - "Get rate limit status for the authenticated user"
* Operation id: rate-limit/get
* Response: 200
* application/json, #/components/schemas/rate-limit-overview
* Response: 304
* Response: 404
METHODS rate_limit_get
RETURNING
VALUE(return_data) TYPE rate_limit_overview
RAISING cx_static_check.
* GET - "Get a repository"
* Operation id: repos/get
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/full-repository
* Response: 301
* Response: 403
* Response: 404
METHODS repos_get
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE full_repository
RAISING cx_static_check.
* PATCH - "Update a repository"
* Operation id: repos/update
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/full-repository
* Response: 307
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_update
METHODS repos_update
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_update
RETURNING
VALUE(return_data) TYPE full_repository
RAISING cx_static_check.
* DELETE - "Delete a repository"
* Operation id: repos/delete
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 307
* Response: 403
* application/json, #/components/schemas/response_repos_delete
* Response: 404
* Body ref: #/components/schemas/bodyrepos_delete
METHODS repos_delete
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_delete
RAISING cx_static_check.
* GET - "List artifacts for a repository"
* Operation id: actions/list-artifacts-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_artifacts_for_rep
METHODS actions_list_artifacts_for_rep
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_artifact
RAISING cx_static_check.
* GET - "Get an artifact"
* Operation id: actions/get-artifact
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: artifact_id, required, path
* Response: 200
* application/json, #/components/schemas/artifact
METHODS actions_get_artifact
IMPORTING
owner TYPE string
repo TYPE string
artifact_id TYPE i
RETURNING
VALUE(return_data) TYPE artifact
RAISING cx_static_check.
* DELETE - "Delete an artifact"
* Operation id: actions/delete-artifact
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: artifact_id, required, path
* Response: 204
METHODS actions_delete_artifact
IMPORTING
owner TYPE string
repo TYPE string
artifact_id TYPE i
RAISING cx_static_check.
* GET - "Download an artifact"
* Operation id: actions/download-artifact
* Parameter: archive_format, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: artifact_id, required, path
* Response: 302
METHODS actions_download_artifact
IMPORTING
archive_format TYPE string
owner TYPE string
repo TYPE string
artifact_id TYPE i
RAISING cx_static_check.
* GET - "Get a job for a workflow run"
* Operation id: actions/get-job-for-workflow-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: job_id, required, path
* Response: 200
* application/json, #/components/schemas/job
METHODS actions_get_job_for_workflow_r
IMPORTING
owner TYPE string
repo TYPE string
job_id TYPE i
RETURNING
VALUE(return_data) TYPE job
RAISING cx_static_check.
* GET - "Download job logs for a workflow run"
* Operation id: actions/download-job-logs-for-workflow-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: job_id, required, path
* Response: 302
METHODS actions_download_job_logs_for_
IMPORTING
owner TYPE string
repo TYPE string
job_id TYPE i
RAISING cx_static_check.
* GET - "Get GitHub Actions permissions for a repository"
* Operation id: actions/get-github-actions-permissions-repository
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/actions-repository-permissions
METHODS actions_get_github_actions_p01
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE actions_repository_permissions
RAISING cx_static_check.
* PUT - "Set GitHub Actions permissions for a repository"
* Operation id: actions/set-github-actions-permissions-repository
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_set_github_actio01
METHODS actions_set_github_actions_p01
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyactions_set_github_actio01
RAISING cx_static_check.
* GET - "Get allowed actions for a repository"
* Operation id: actions/get-allowed-actions-repository
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/selected-actions
METHODS actions_get_allowed_actions_re
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE selected_actions
RAISING cx_static_check.
* PUT - "Set allowed actions for a repository"
* Operation id: actions/set-allowed-actions-repository
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Body ref: #/components/schemas/selected-actions
METHODS actions_set_allowed_actions_re
IMPORTING
owner TYPE string
repo TYPE string
body TYPE selected_actions
RAISING cx_static_check.
* GET - "List self-hosted runners for a repository"
* Operation id: actions/list-self-hosted-runners-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_self_hosted_run03
METHODS actions_list_self_hosted_run03
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_self_h03
RAISING cx_static_check.
* GET - "List runner applications for a repository"
* Operation id: actions/list-runner-applications-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_actions_list_runner_applicat01
METHODS actions_list_runner_applicat01
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_actions_list_runner01
RAISING cx_static_check.
* POST - "Create a registration token for a repository"
* Operation id: actions/create-registration-token-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/authentication-token
METHODS actions_create_registration_01
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE authentication_token
RAISING cx_static_check.
* POST - "Create a remove token for a repository"
* Operation id: actions/create-remove-token-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/authentication-token
METHODS actions_create_remove_token_01
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE authentication_token
RAISING cx_static_check.
* GET - "Get a self-hosted runner for a repository"
* Operation id: actions/get-self-hosted-runner-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: runner_id, required, path
* Response: 200
* application/json, #/components/schemas/runner
METHODS actions_get_self_hosted_runn02
IMPORTING
owner TYPE string
repo TYPE string
runner_id TYPE i
RETURNING
VALUE(return_data) TYPE runner
RAISING cx_static_check.
* DELETE - "Delete a self-hosted runner from a repository"
* Operation id: actions/delete-self-hosted-runner-from-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: runner_id, required, path
* Response: 204
METHODS actions_delete_self_hosted_r02
IMPORTING
owner TYPE string
repo TYPE string
runner_id TYPE i
RAISING cx_static_check.
* GET - "List labels for a self-hosted runner for a repository"
* Operation id: actions/list-labels-for-self-hosted-runner-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
METHODS actions_list_labels_for_self01
IMPORTING
owner TYPE string
repo TYPE string
runner_id TYPE i
RAISING cx_static_check.
* POST - "Add custom labels to a self-hosted runner for a repository"
* Operation id: actions/add-custom-labels-to-self-hosted-runner-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyactions_add_custom_label01
METHODS actions_add_custom_labels_to01
IMPORTING
owner TYPE string
repo TYPE string
runner_id TYPE i
body TYPE bodyactions_add_custom_label01
RAISING cx_static_check.
* PUT - "Set custom labels for a self-hosted runner for a repository"
* Operation id: actions/set-custom-labels-for-self-hosted-runner-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyactions_set_custom_label01
METHODS actions_set_custom_labels_fo01
IMPORTING
owner TYPE string
repo TYPE string
runner_id TYPE i
body TYPE bodyactions_set_custom_label01
RAISING cx_static_check.
* DELETE - "Remove all custom labels from a self-hosted runner for a repository"
* Operation id: actions/remove-all-custom-labels-from-self-hosted-runner-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: runner_id, required, path
* Response: 200
* Response: 404
* Body ref: #/components/schemas/bodyactions_remove_all_custo01
METHODS actions_remove_all_custom_la01
IMPORTING
owner TYPE string
repo TYPE string
runner_id TYPE i
body TYPE bodyactions_remove_all_custo01
RAISING cx_static_check.
* DELETE - "Remove a custom label from a self-hosted runner for a repository"
* Operation id: actions/remove-custom-label-from-self-hosted-runner-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: runner_id, required, path
* Parameter: name, required, path
* Response: 200
* Response: 404
* Response: 422
METHODS actions_remove_custom_label_01
IMPORTING
owner TYPE string
repo TYPE string
runner_id TYPE i
name TYPE string
RAISING cx_static_check.
* GET - "List workflow runs for a repository"
* Operation id: actions/list-workflow-runs-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: actor, optional, query
* Parameter: branch, optional, query
* Parameter: event, optional, query
* Parameter: status, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Parameter: created, optional, query
* Parameter: exclude_pull_requests, optional, query
* Parameter: check_suite_id, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_workflow_runs_for
METHODS actions_list_workflow_runs_for
IMPORTING
owner TYPE string
repo TYPE string
actor TYPE string OPTIONAL
branch TYPE string OPTIONAL
event TYPE string OPTIONAL
status TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
created TYPE string OPTIONAL
exclude_pull_requests TYPE abap_bool DEFAULT abap_false
check_suite_id TYPE i OPTIONAL
RETURNING
VALUE(return_data) TYPE response_actions_list_workflow
RAISING cx_static_check.
* GET - "Get a workflow run"
* Operation id: actions/get-workflow-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Parameter: exclude_pull_requests, optional, query
* Response: 200
* application/json, #/components/schemas/workflow-run
METHODS actions_get_workflow_run
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
exclude_pull_requests TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(return_data) TYPE workflow_run
RAISING cx_static_check.
* DELETE - "Delete a workflow run"
* Operation id: actions/delete-workflow-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Response: 204
METHODS actions_delete_workflow_run
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
RAISING cx_static_check.
* GET - "Get the review history for a workflow run"
* Operation id: actions/get-reviews-for-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Response: 200
* application/json, #/components/schemas/response_actions_get_reviews_for_run
METHODS actions_get_reviews_for_run
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
RETURNING
VALUE(return_data) TYPE response_actions_get_reviews_f
RAISING cx_static_check.
* POST - "Approve a workflow run for a fork pull request"
* Operation id: actions/approve-workflow-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Response: 201
* application/json, #/components/schemas/empty-object
* Response: 403
* Response: 404
METHODS actions_approve_workflow_run
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
RETURNING
VALUE(return_data) TYPE empty_object
RAISING cx_static_check.
* GET - "List workflow run artifacts"
* Operation id: actions/list-workflow-run-artifacts
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_workflow_run_arti
METHODS actions_list_workflow_run_arti
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_workfl01
RAISING cx_static_check.
* GET - "Get a workflow run attempt"
* Operation id: actions/get-workflow-run-attempt
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Parameter: attempt_number, required, path
* Parameter: exclude_pull_requests, optional, query
* Response: 200
* application/json, #/components/schemas/workflow-run
METHODS actions_get_workflow_run_attem
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
attempt_number TYPE i
exclude_pull_requests TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(return_data) TYPE workflow_run
RAISING cx_static_check.
* GET - "List jobs for a workflow run attempt"
* Operation id: actions/list-jobs-for-workflow-run-attempt
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Parameter: attempt_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_jobs_for_workflow
* Response: 404
METHODS actions_list_jobs_for_workflow
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
attempt_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_jobs_for
RAISING cx_static_check.
* GET - "Download workflow run attempt logs"
* Operation id: actions/download-workflow-run-attempt-logs
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Parameter: attempt_number, required, path
* Response: 302
METHODS actions_download_workflow_run_
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
attempt_number TYPE i
RAISING cx_static_check.
* POST - "Cancel a workflow run"
* Operation id: actions/cancel-workflow-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Response: 202
* application/json, #/components/schemas/response_actions_cancel_workflow_run
METHODS actions_cancel_workflow_run
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
RAISING cx_static_check.
* GET - "List jobs for a workflow run"
* Operation id: actions/list-jobs-for-workflow-run
* Parameter: filter, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_jobs_for_workfl01
METHODS actions_list_jobs_for_workfl01
IMPORTING
filter TYPE string DEFAULT 'latest'
owner TYPE string
repo TYPE string
run_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_jobs_f01
RAISING cx_static_check.
* GET - "Download workflow run logs"
* Operation id: actions/download-workflow-run-logs
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Response: 302
METHODS actions_download_workflow_ru01
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
RAISING cx_static_check.
* DELETE - "Delete workflow run logs"
* Operation id: actions/delete-workflow-run-logs
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Response: 204
* Response: 403
* Response: 500
METHODS actions_delete_workflow_run_lo
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
RAISING cx_static_check.
* GET - "Get pending deployments for a workflow run"
* Operation id: actions/get-pending-deployments-for-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Response: 200
* application/json, #/components/schemas/response_actions_get_pending_deployment
METHODS actions_get_pending_deployment
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
RETURNING
VALUE(return_data) TYPE response_actions_get_pending_d
RAISING cx_static_check.
* POST - "Review pending deployments for a workflow run"
* Operation id: actions/review-pending-deployments-for-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Response: 200
* application/json, #/components/schemas/response_actions_review_pending_deploym
* Body ref: #/components/schemas/bodyactions_review_pending_dep
METHODS actions_review_pending_deploym
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
body TYPE bodyactions_review_pending_dep
RETURNING
VALUE(return_data) TYPE response_actions_review_pendin
RAISING cx_static_check.
* GET - "Get workflow run usage"
* Operation id: actions/get-workflow-run-usage
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: run_id, required, path
* Response: 200
* application/json, #/components/schemas/workflow-run-usage
METHODS actions_get_workflow_run_usage
IMPORTING
owner TYPE string
repo TYPE string
run_id TYPE i
RETURNING
VALUE(return_data) TYPE workflow_run_usage
RAISING cx_static_check.
* GET - "List repository secrets"
* Operation id: actions/list-repo-secrets
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_repo_secrets
METHODS actions_list_repo_secrets
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_repo_sec
RAISING cx_static_check.
* GET - "Get a repository public key"
* Operation id: actions/get-repo-public-key
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/actions-public-key
METHODS actions_get_repo_public_key
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE actions_public_key
RAISING cx_static_check.
* GET - "Get a repository secret"
* Operation id: actions/get-repo-secret
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: secret_name, required, path
* Response: 200
* application/json, #/components/schemas/actions-secret
METHODS actions_get_repo_secret
IMPORTING
owner TYPE string
repo TYPE string
secret_name TYPE string
RETURNING
VALUE(return_data) TYPE actions_secret
RAISING cx_static_check.
* PUT - "Create or update a repository secret"
* Operation id: actions/create-or-update-repo-secret
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: secret_name, required, path
* Response: 201
* application/json, #/components/schemas/response_actions_create_or_update_repo_
* Response: 204
* Body ref: #/components/schemas/bodyactions_create_or_update_r
METHODS actions_create_or_update_repo_
IMPORTING
owner TYPE string
repo TYPE string
secret_name TYPE string
body TYPE bodyactions_create_or_update_r
RETURNING
VALUE(return_data) TYPE response_actions_create_or_upd
RAISING cx_static_check.
* DELETE - "Delete a repository secret"
* Operation id: actions/delete-repo-secret
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: secret_name, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_delete_repo_secret
METHODS actions_delete_repo_secret
IMPORTING
owner TYPE string
repo TYPE string
secret_name TYPE string
body TYPE bodyactions_delete_repo_secret
RAISING cx_static_check.
* GET - "List repository workflows"
* Operation id: actions/list-repo-workflows
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_repo_workflows
METHODS actions_list_repo_workflows
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_repo_wor
RAISING cx_static_check.
* GET - "Get a workflow"
* Operation id: actions/get-workflow
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: workflow_id, required, path
* Response: 200
* application/json, #/components/schemas/workflow
METHODS actions_get_workflow
IMPORTING
owner TYPE string
repo TYPE string
workflow_id TYPE string
RETURNING
VALUE(return_data) TYPE workflow
RAISING cx_static_check.
* PUT - "Disable a workflow"
* Operation id: actions/disable-workflow
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: workflow_id, required, path
* Response: 204
METHODS actions_disable_workflow
IMPORTING
owner TYPE string
repo TYPE string
workflow_id TYPE string
RAISING cx_static_check.
* POST - "Create a workflow dispatch event"
* Operation id: actions/create-workflow-dispatch
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: workflow_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_create_workflow_di
METHODS actions_create_workflow_dispat
IMPORTING
owner TYPE string
repo TYPE string
workflow_id TYPE string
body TYPE bodyactions_create_workflow_di
RAISING cx_static_check.
* PUT - "Enable a workflow"
* Operation id: actions/enable-workflow
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: workflow_id, required, path
* Response: 204
METHODS actions_enable_workflow
IMPORTING
owner TYPE string
repo TYPE string
workflow_id TYPE string
RAISING cx_static_check.
* GET - "List workflow runs"
* Operation id: actions/list-workflow-runs
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: workflow_id, required, path
* Parameter: actor, optional, query
* Parameter: branch, optional, query
* Parameter: event, optional, query
* Parameter: status, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Parameter: created, optional, query
* Parameter: exclude_pull_requests, optional, query
* Parameter: check_suite_id, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_workflow_runs
METHODS actions_list_workflow_runs
IMPORTING
owner TYPE string
repo TYPE string
workflow_id TYPE string
actor TYPE string OPTIONAL
branch TYPE string OPTIONAL
event TYPE string OPTIONAL
status TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
created TYPE string OPTIONAL
exclude_pull_requests TYPE abap_bool DEFAULT abap_false
check_suite_id TYPE i OPTIONAL
RETURNING
VALUE(return_data) TYPE response_actions_list_workfl02
RAISING cx_static_check.
* GET - "Get workflow usage"
* Operation id: actions/get-workflow-usage
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: workflow_id, required, path
* Response: 200
* application/json, #/components/schemas/workflow-usage
METHODS actions_get_workflow_usage
IMPORTING
owner TYPE string
repo TYPE string
workflow_id TYPE string
RETURNING
VALUE(return_data) TYPE workflow_usage
RAISING cx_static_check.
* GET - "List assignees"
* Operation id: issues/list-assignees
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_assignees
* Response: 404
METHODS issues_list_assignees
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_assignees
RAISING cx_static_check.
* GET - "Check if a user can be assigned"
* Operation id: issues/check-user-can-be-assigned
* Parameter: assignee, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 404
* application/json, #/components/schemas/basic-error
METHODS issues_check_user_can_be_assig
IMPORTING
assignee TYPE string
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* GET - "List all autolinks of a repository"
* Operation id: repos/list-autolinks
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_autolinks
METHODS repos_list_autolinks
IMPORTING
owner TYPE string
repo TYPE string
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_autolinks
RAISING cx_static_check.
* POST - "Create an autolink reference for a repository"
* Operation id: repos/create-autolink
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/autolink
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_autolink
METHODS repos_create_autolink
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_autolink
RETURNING
VALUE(return_data) TYPE autolink
RAISING cx_static_check.
* GET - "Get an autolink reference of a repository"
* Operation id: repos/get-autolink
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: autolink_id, required, path
* Response: 200
* application/json, #/components/schemas/autolink
* Response: 404
METHODS repos_get_autolink
IMPORTING
owner TYPE string
repo TYPE string
autolink_id TYPE i
RETURNING
VALUE(return_data) TYPE autolink
RAISING cx_static_check.
* DELETE - "Delete an autolink reference from a repository"
* Operation id: repos/delete-autolink
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: autolink_id, required, path
* Response: 204
* Response: 404
METHODS repos_delete_autolink
IMPORTING
owner TYPE string
repo TYPE string
autolink_id TYPE i
RAISING cx_static_check.
* PUT - "Enable automated security fixes"
* Operation id: repos/enable-automated-security-fixes
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
METHODS repos_enable_automated_securit
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* DELETE - "Disable automated security fixes"
* Operation id: repos/disable-automated-security-fixes
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
METHODS repos_disable_automated_securi
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* GET - "List branches"
* Operation id: repos/list-branches
* Parameter: protected, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_branches
* Response: 404
METHODS repos_list_branches
IMPORTING
protected TYPE abap_bool OPTIONAL
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_branches
RAISING cx_static_check.
* GET - "Get a branch"
* Operation id: repos/get-branch
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/branch-with-protection
* Response: 301
* Response: 404
* Response: 415
METHODS repos_get_branch
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE branch_with_protection
RAISING cx_static_check.
* GET - "Get branch protection"
* Operation id: repos/get-branch-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/branch-protection
* Response: 404
METHODS repos_get_branch_protection
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE branch_protection
RAISING cx_static_check.
* PUT - "Update branch protection"
* Operation id: repos/update-branch-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/protected-branch
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_update_branch_protec
METHODS repos_update_branch_protection
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE bodyrepos_update_branch_protec
RETURNING
VALUE(return_data) TYPE protected_branch
RAISING cx_static_check.
* DELETE - "Delete branch protection"
* Operation id: repos/delete-branch-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 204
* Response: 403
* Body ref: #/components/schemas/bodyrepos_delete_branch_protec
METHODS repos_delete_branch_protection
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE bodyrepos_delete_branch_protec
RAISING cx_static_check.
* GET - "Get admin branch protection"
* Operation id: repos/get-admin-branch-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/protected-branch-admin-enforced
METHODS repos_get_admin_branch_protect
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE protected_branch_admin_enforce
RAISING cx_static_check.
* POST - "Set admin branch protection"
* Operation id: repos/set-admin-branch-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/protected-branch-admin-enforced
METHODS repos_set_admin_branch_protect
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE protected_branch_admin_enforce
RAISING cx_static_check.
* DELETE - "Delete admin branch protection"
* Operation id: repos/delete-admin-branch-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 204
* Response: 404
METHODS repos_delete_admin_branch_prot
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RAISING cx_static_check.
* GET - "Get pull request review protection"
* Operation id: repos/get-pull-request-review-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/protected-branch-pull-request-review
METHODS repos_get_pull_request_review_
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE protected_branch_pull_request_
RAISING cx_static_check.
* PATCH - "Update pull request review protection"
* Operation id: repos/update-pull-request-review-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/protected-branch-pull-request-review
* Response: 422
* Body ref: #/components/schemas/bodyrepos_update_pull_request_
METHODS repos_update_pull_request_revi
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE bodyrepos_update_pull_request_
RETURNING
VALUE(return_data) TYPE protected_branch_pull_request_
RAISING cx_static_check.
* DELETE - "Delete pull request review protection"
* Operation id: repos/delete-pull-request-review-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 204
* Response: 404
* Body ref: #/components/schemas/bodyrepos_delete_pull_request_
METHODS repos_delete_pull_request_revi
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE bodyrepos_delete_pull_request_
RAISING cx_static_check.
* GET - "Get commit signature protection"
* Operation id: repos/get-commit-signature-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/protected-branch-admin-enforced
* Response: 404
METHODS repos_get_commit_signature_pro
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE protected_branch_admin_enforce
RAISING cx_static_check.
* POST - "Create commit signature protection"
* Operation id: repos/create-commit-signature-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/protected-branch-admin-enforced
* Response: 404
METHODS repos_create_commit_signature_
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE protected_branch_admin_enforce
RAISING cx_static_check.
* DELETE - "Delete commit signature protection"
* Operation id: repos/delete-commit-signature-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 204
* Response: 404
METHODS repos_delete_commit_signature_
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RAISING cx_static_check.
* GET - "Get status checks protection"
* Operation id: repos/get-status-checks-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/status-check-policy
* Response: 404
METHODS repos_get_status_checks_protec
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE status_check_policy
RAISING cx_static_check.
* PATCH - "Update status check protection"
* Operation id: repos/update-status-check-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/status-check-policy
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_update_status_check_
METHODS repos_update_status_check_prot
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE bodyrepos_update_status_check_
RETURNING
VALUE(return_data) TYPE status_check_policy
RAISING cx_static_check.
* DELETE - "Remove status check protection"
* Operation id: repos/remove-status-check-protection
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 204
* Body ref: #/components/schemas/bodyrepos_remove_status_check_
METHODS repos_remove_status_check_prot
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE bodyrepos_remove_status_check_
RAISING cx_static_check.
* GET - "Get all status check contexts"
* Operation id: repos/get-all-status-check-contexts
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_all_status_check_con
* Response: 404
METHODS repos_get_all_status_check_con
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_all_status_
RAISING cx_static_check.
* POST - "Add status check contexts"
* Operation id: repos/add-status-check-contexts
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_add_status_check_context
* Response: 403
* Response: 404
* Response: 422
* Body schema: string
METHODS repos_add_status_check_context
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_add_status_chec
RAISING cx_static_check.
* PUT - "Set status check contexts"
* Operation id: repos/set-status-check-contexts
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_set_status_check_context
* Response: 404
* Response: 422
* Body schema: string
METHODS repos_set_status_check_context
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_set_status_chec
RAISING cx_static_check.
* DELETE - "Remove status check contexts"
* Operation id: repos/remove-status-check-contexts
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_remove_status_check_cont
* Response: 404
* Response: 422
* Body schema: string
METHODS repos_remove_status_check_cont
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_remove_status_c
RAISING cx_static_check.
* GET - "Get access restrictions"
* Operation id: repos/get-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/branch-restriction-policy
* Response: 404
METHODS repos_get_access_restrictions
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE branch_restriction_policy
RAISING cx_static_check.
* DELETE - "Delete access restrictions"
* Operation id: repos/delete-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 204
METHODS repos_delete_access_restrictio
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RAISING cx_static_check.
* GET - "Get apps with access to the protected branch"
* Operation id: repos/get-apps-with-access-to-protected-branch
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_apps_with_access_to_
* Response: 404
METHODS repos_get_apps_with_access_to_
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_apps_with_a
RAISING cx_static_check.
* POST - "Add app access restrictions"
* Operation id: repos/add-app-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_add_app_access_restricti
* Response: 422
* Body schema: string
METHODS repos_add_app_access_restricti
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_add_app_access_
RAISING cx_static_check.
* PUT - "Set app access restrictions"
* Operation id: repos/set-app-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_set_app_access_restricti
* Response: 422
* Body schema: string
METHODS repos_set_app_access_restricti
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_set_app_access_
RAISING cx_static_check.
* DELETE - "Remove app access restrictions"
* Operation id: repos/remove-app-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_remove_app_access_restri
* Response: 422
* Body schema: string
METHODS repos_remove_app_access_restri
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_remove_app_acce
RAISING cx_static_check.
* GET - "Get teams with access to the protected branch"
* Operation id: repos/get-teams-with-access-to-protected-branch
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_teams_with_access_to
* Response: 404
METHODS repos_get_teams_with_access_to
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_teams_with_
RAISING cx_static_check.
* POST - "Add team access restrictions"
* Operation id: repos/add-team-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_add_team_access_restrict
* Response: 422
* Body schema: string
METHODS repos_add_team_access_restrict
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_add_team_access
RAISING cx_static_check.
* PUT - "Set team access restrictions"
* Operation id: repos/set-team-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_set_team_access_restrict
* Response: 422
* Body schema: string
METHODS repos_set_team_access_restrict
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_set_team_access
RAISING cx_static_check.
* DELETE - "Remove team access restrictions"
* Operation id: repos/remove-team-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_remove_team_access_restr
* Response: 422
* Body schema: string
METHODS repos_remove_team_access_restr
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_remove_team_acc
RAISING cx_static_check.
* GET - "Get users with access to the protected branch"
* Operation id: repos/get-users-with-access-to-protected-branch
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_users_with_access_to
* Response: 404
METHODS repos_get_users_with_access_to
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_users_with_
RAISING cx_static_check.
* POST - "Add user access restrictions"
* Operation id: repos/add-user-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_add_user_access_restrict
* Response: 422
* Body schema: string
METHODS repos_add_user_access_restrict
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_add_user_access
RAISING cx_static_check.
* PUT - "Set user access restrictions"
* Operation id: repos/set-user-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_set_user_access_restrict
* Response: 422
* Body schema: string
METHODS repos_set_user_access_restrict
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_set_user_access
RAISING cx_static_check.
* DELETE - "Remove user access restrictions"
* Operation id: repos/remove-user-access-restrictions
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_remove_user_access_restr
* Response: 422
* Body schema: string
METHODS repos_remove_user_access_restr
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_remove_user_acc
RAISING cx_static_check.
* POST - "Rename a branch"
* Operation id: repos/rename-branch
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: branch, required, path
* Response: 201
* application/json, #/components/schemas/branch-with-protection
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_rename_branch
METHODS repos_rename_branch
IMPORTING
owner TYPE string
repo TYPE string
branch TYPE string
body TYPE bodyrepos_rename_branch
RETURNING
VALUE(return_data) TYPE branch_with_protection
RAISING cx_static_check.
* POST - "Create a check run"
* Operation id: checks/create
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/check-run
* Body ref: #/components/schemas/bodychecks_create
METHODS checks_create
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodychecks_create
RETURNING
VALUE(return_data) TYPE check_run
RAISING cx_static_check.
* GET - "Get a check run"
* Operation id: checks/get
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: check_run_id, required, path
* Response: 200
* application/json, #/components/schemas/check-run
METHODS checks_get
IMPORTING
owner TYPE string
repo TYPE string
check_run_id TYPE i
RETURNING
VALUE(return_data) TYPE check_run
RAISING cx_static_check.
* PATCH - "Update a check run"
* Operation id: checks/update
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: check_run_id, required, path
* Response: 200
* application/json, #/components/schemas/check-run
* Body ref: #/components/schemas/bodychecks_update
METHODS checks_update
IMPORTING
owner TYPE string
repo TYPE string
check_run_id TYPE i
body TYPE bodychecks_update
RETURNING
VALUE(return_data) TYPE check_run
RAISING cx_static_check.
* GET - "List check run annotations"
* Operation id: checks/list-annotations
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: check_run_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_checks_list_annotations
METHODS checks_list_annotations
IMPORTING
owner TYPE string
repo TYPE string
check_run_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_checks_list_annotatio
RAISING cx_static_check.
* POST - "Rerequest a check run"
* Operation id: checks/rerequest-run
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: check_run_id, required, path
* Response: 201
* application/json, #/components/schemas/response_checks_rerequest_run
* Response: 403
* application/json, #/components/schemas/basic-error
* Response: 404
* Response: 422
* application/json, #/components/schemas/basic-error
METHODS checks_rerequest_run
IMPORTING
owner TYPE string
repo TYPE string
check_run_id TYPE i
RETURNING
VALUE(return_data) TYPE response_checks_rerequest_run
RAISING cx_static_check.
* POST - "Create a check suite"
* Operation id: checks/create-suite
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/check-suite
* Response: 201
* application/json, #/components/schemas/check-suite
* Body ref: #/components/schemas/bodychecks_create_suite
METHODS checks_create_suite
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodychecks_create_suite
RETURNING
VALUE(return_data) TYPE check_suite
RAISING cx_static_check.
* PATCH - "Update repository preferences for check suites"
* Operation id: checks/set-suites-preferences
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/check-suite-preference
* Body ref: #/components/schemas/bodychecks_set_suites_preferen
METHODS checks_set_suites_preferences
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodychecks_set_suites_preferen
RETURNING
VALUE(return_data) TYPE check_suite_preference
RAISING cx_static_check.
* GET - "Get a check suite"
* Operation id: checks/get-suite
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: check_suite_id, required, path
* Response: 200
* application/json, #/components/schemas/check-suite
METHODS checks_get_suite
IMPORTING
owner TYPE string
repo TYPE string
check_suite_id TYPE i
RETURNING
VALUE(return_data) TYPE check_suite
RAISING cx_static_check.
* GET - "List check runs in a check suite"
* Operation id: checks/list-for-suite
* Parameter: filter, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: check_suite_id, required, path
* Parameter: check_name, optional, query
* Parameter: status, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_checks_list_for_suite
METHODS checks_list_for_suite
IMPORTING
filter TYPE string DEFAULT 'latest'
owner TYPE string
repo TYPE string
check_suite_id TYPE i
check_name TYPE string OPTIONAL
status TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_checks_list_for_suite
RAISING cx_static_check.
* POST - "Rerequest a check suite"
* Operation id: checks/rerequest-suite
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: check_suite_id, required, path
* Response: 201
* application/json, #/components/schemas/response_checks_rerequest_suite
METHODS checks_rerequest_suite
IMPORTING
owner TYPE string
repo TYPE string
check_suite_id TYPE i
RETURNING
VALUE(return_data) TYPE response_checks_rerequest_suit
RAISING cx_static_check.
* GET - "List code scanning alerts for a repository"
* Operation id: code-scanning/list-alerts-for-repo
* Parameter: sort, optional, query
* Parameter: state, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: tool_name, optional, query
* Parameter: tool_guid, optional, query
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Parameter: ref, optional, query
* Parameter: direction, optional, query
* Response: 200
* application/json, #/components/schemas/response_code_scanning_list_alerts_fo01
* Response: 304
* Response: 403
* Response: 404
* Response: 503
METHODS code_scanning_list_alerts_fo01
IMPORTING
sort TYPE string DEFAULT 'number'
state TYPE code_scanning_alert_state OPTIONAL
owner TYPE string
repo TYPE string
tool_name TYPE code_scanning_analysis_tool_na OPTIONAL
tool_guid TYPE code_scanning_analysis_tool_gu OPTIONAL
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
ref TYPE code_scanning_ref OPTIONAL
direction TYPE string DEFAULT 'desc'
RETURNING
VALUE(return_data) TYPE response_code_scanning_list_01
RAISING cx_static_check.
* GET - "Get a code scanning alert"
* Operation id: code-scanning/get-alert
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: alert_number, required, path
* Response: 200
* application/json, #/components/schemas/code-scanning-alert
* Response: 304
* Response: 403
* Response: 404
* Response: 503
METHODS code_scanning_get_alert
IMPORTING
owner TYPE string
repo TYPE string
alert_number TYPE alert_number
RETURNING
VALUE(return_data) TYPE code_scanning_alert
RAISING cx_static_check.
* PATCH - "Update a code scanning alert"
* Operation id: code-scanning/update-alert
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: alert_number, required, path
* Response: 200
* application/json, #/components/schemas/code-scanning-alert
* Response: 403
* Response: 404
* Response: 503
* Body ref: #/components/schemas/bodycode_scanning_update_alert
METHODS code_scanning_update_alert
IMPORTING
owner TYPE string
repo TYPE string
alert_number TYPE alert_number
body TYPE bodycode_scanning_update_alert
RETURNING
VALUE(return_data) TYPE code_scanning_alert
RAISING cx_static_check.
* GET - "List instances of a code scanning alert"
* Operation id: code-scanning/list-alert-instances
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: alert_number, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Parameter: ref, optional, query
* Response: 200
* application/json, #/components/schemas/response_code_scanning_list_alert_insta
* Response: 403
* Response: 404
* Response: 503
METHODS code_scanning_list_alert_insta
IMPORTING
owner TYPE string
repo TYPE string
alert_number TYPE alert_number
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
ref TYPE code_scanning_ref OPTIONAL
RETURNING
VALUE(return_data) TYPE response_code_scanning_list_02
RAISING cx_static_check.
* GET - "List code scanning analyses for a repository"
* Operation id: code-scanning/list-recent-analyses
* Parameter: ref, optional, query
* Parameter: sarif_id, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: tool_name, optional, query
* Parameter: tool_guid, optional, query
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_code_scanning_list_recent_anal
* Response: 403
* Response: 404
* Response: 503
METHODS code_scanning_list_recent_anal
IMPORTING
ref TYPE code_scanning_ref OPTIONAL
sarif_id TYPE code_scanning_analysis_sarif_i OPTIONAL
owner TYPE string
repo TYPE string
tool_name TYPE code_scanning_analysis_tool_na OPTIONAL
tool_guid TYPE code_scanning_analysis_tool_gu OPTIONAL
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_code_scanning_list_re
RAISING cx_static_check.
* GET - "Get a code scanning analysis for a repository"
* Operation id: code-scanning/get-analysis
* Parameter: analysis_id, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json+sarif, string
* application/json, #/components/schemas/code-scanning-analysis
* Response: 403
* Response: 404
* Response: 503
METHODS code_scanning_get_analysis
IMPORTING
analysis_id TYPE i
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE code_scanning_analysis
RAISING cx_static_check.
* DELETE - "Delete a code scanning analysis from a repository"
* Operation id: code-scanning/delete-analysis
* Parameter: analysis_id, required, path
* Parameter: confirm_delete, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/code-scanning-analysis-deletion
* Response: 400
* Response: 403
* Response: 404
* Response: 503
METHODS code_scanning_delete_analysis
IMPORTING
analysis_id TYPE i
confirm_delete TYPE string OPTIONAL
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE code_scanning_analysis_deletio
RAISING cx_static_check.
* POST - "Upload an analysis as SARIF data"
* Operation id: code-scanning/upload-sarif
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 202
* application/json, #/components/schemas/code-scanning-sarifs-receipt
* Response: 400
* Response: 403
* Response: 404
* Response: 413
* Response: 503
* Body ref: #/components/schemas/bodycode_scanning_upload_sarif
METHODS code_scanning_upload_sarif
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodycode_scanning_upload_sarif
RAISING cx_static_check.
* GET - "Get information about a SARIF upload"
* Operation id: code-scanning/get-sarif
* Parameter: sarif_id, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/code-scanning-sarifs-status
* Response: 403
* Response: 404
* Response: 503
METHODS code_scanning_get_sarif
IMPORTING
sarif_id TYPE string
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE code_scanning_sarifs_status
RAISING cx_static_check.
* GET - "List CODEOWNERS errors"
* Operation id: repos/codeowners-errors
* Parameter: ref, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/codeowners-errors
* Response: 404
METHODS repos_codeowners_errors
IMPORTING
ref TYPE string OPTIONAL
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE codeowners_errors
RAISING cx_static_check.
* GET - "List codespaces in a repository for the authenticated user"
* Operation id: codespaces/list-in-repository-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_codespaces_list_in_repository_
* Response: 401
* Response: 403
* Response: 404
* Response: 500
METHODS codespaces_list_in_repository_
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_codespaces_list_in_re
RAISING cx_static_check.
* POST - "Create a codespace in a repository"
* Operation id: codespaces/create-with-repo-for-authenticated-user
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/codespace
* Response: 202
* application/json, #/components/schemas/codespace
* Response: 401
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodycodespaces_create_with_rep
METHODS codespaces_create_with_repo_fo
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodycodespaces_create_with_rep
RETURNING
VALUE(return_data) TYPE codespace
RAISING cx_static_check.
* GET - "List available machine types for a repository"
* Operation id: codespaces/repo-machines-for-authenticated-user
* Parameter: location, required, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_codespaces_repo_machines_for_a
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 500
METHODS codespaces_repo_machines_for_a
IMPORTING
location TYPE string
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_codespaces_repo_machi
RAISING cx_static_check.
* GET - "List repository collaborators"
* Operation id: repos/list-collaborators
* Parameter: affiliation, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_collaborators
* Response: 404
METHODS repos_list_collaborators
IMPORTING
affiliation TYPE string DEFAULT 'all'
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_collaborat
RAISING cx_static_check.
* GET - "Check if a user is a repository collaborator"
* Operation id: repos/check-collaborator
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: username, required, path
* Response: 204
* Response: 404
METHODS repos_check_collaborator
IMPORTING
owner TYPE string
repo TYPE string
username TYPE string
RAISING cx_static_check.
* PUT - "Add a repository collaborator"
* Operation id: repos/add-collaborator
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: username, required, path
* Response: 201
* application/json, #/components/schemas/repository-invitation
* Response: 204
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodyrepos_add_collaborator
METHODS repos_add_collaborator
IMPORTING
owner TYPE string
repo TYPE string
username TYPE string
body TYPE bodyrepos_add_collaborator
RETURNING
VALUE(return_data) TYPE repository_invitation
RAISING cx_static_check.
* DELETE - "Remove a repository collaborator"
* Operation id: repos/remove-collaborator
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: username, required, path
* Response: 204
* Body ref: #/components/schemas/bodyrepos_remove_collaborator
METHODS repos_remove_collaborator
IMPORTING
owner TYPE string
repo TYPE string
username TYPE string
body TYPE bodyrepos_remove_collaborator
RAISING cx_static_check.
* GET - "Get repository permissions for a user"
* Operation id: repos/get-collaborator-permission-level
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/repository-collaborator-permission
* Response: 404
METHODS repos_get_collaborator_permiss
IMPORTING
owner TYPE string
repo TYPE string
username TYPE string
RETURNING
VALUE(return_data) TYPE repository_collaborator_permis
RAISING cx_static_check.
* GET - "List commit comments for a repository"
* Operation id: repos/list-commit-comments-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_commit_comments_for
METHODS repos_list_commit_comments_for
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_commit_com
RAISING cx_static_check.
* GET - "Get a commit comment"
* Operation id: repos/get-commit-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/commit-comment
* Response: 404
METHODS repos_get_commit_comment
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
RETURNING
VALUE(return_data) TYPE commit_comment
RAISING cx_static_check.
* PATCH - "Update a commit comment"
* Operation id: repos/update-commit-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/commit-comment
* Response: 404
* Body ref: #/components/schemas/bodyrepos_update_commit_commen
METHODS repos_update_commit_comment
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
body TYPE bodyrepos_update_commit_commen
RETURNING
VALUE(return_data) TYPE commit_comment
RAISING cx_static_check.
* DELETE - "Delete a commit comment"
* Operation id: repos/delete-commit-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 204
* Response: 404
* Body ref: #/components/schemas/bodyrepos_delete_commit_commen
METHODS repos_delete_commit_comment
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
body TYPE bodyrepos_delete_commit_commen
RAISING cx_static_check.
* GET - "List reactions for a commit comment"
* Operation id: reactions/list-for-commit-comment
* Parameter: content, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_reactions_list_for_commit_comm
* Response: 404
METHODS reactions_list_for_commit_comm
IMPORTING
content TYPE string OPTIONAL
owner TYPE string
repo TYPE string
comment_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_reactions_list_for_co
RAISING cx_static_check.
* POST - "Create reaction for a commit comment"
* Operation id: reactions/create-for-commit-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/reaction
* Response: 201
* application/json, #/components/schemas/reaction
* Response: 415
* Response: 422
* Body ref: #/components/schemas/bodyreactions_create_for_commi
METHODS reactions_create_for_commit_co
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
body TYPE bodyreactions_create_for_commi
RETURNING
VALUE(return_data) TYPE reaction
RAISING cx_static_check.
* DELETE - "Delete a commit comment reaction"
* Operation id: reactions/delete-for-commit-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Parameter: reaction_id, required, path
* Response: 204
METHODS reactions_delete_for_commit_co
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
reaction_id TYPE i
RAISING cx_static_check.
* GET - "List commits"
* Operation id: repos/list-commits
* Parameter: sha, optional, query
* Parameter: path, optional, query
* Parameter: author, optional, query
* Parameter: until, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_commits
* Response: 400
* Response: 404
* Response: 409
* Response: 500
METHODS repos_list_commits
IMPORTING
sha TYPE string OPTIONAL
path TYPE string OPTIONAL
author TYPE string OPTIONAL
until TYPE string OPTIONAL
owner TYPE string
repo TYPE string
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_commits
RAISING cx_static_check.
* GET - "List branches for HEAD commit"
* Operation id: repos/list-branches-for-head-commit
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: commit_sha, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_list_branches_for_head_c
* Response: 422
METHODS repos_list_branches_for_head_c
IMPORTING
owner TYPE string
repo TYPE string
commit_sha TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_list_branches_f
RAISING cx_static_check.
* GET - "List commit comments"
* Operation id: repos/list-comments-for-commit
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: commit_sha, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_comments_for_commit
METHODS repos_list_comments_for_commit
IMPORTING
owner TYPE string
repo TYPE string
commit_sha TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_comments_f
RAISING cx_static_check.
* POST - "Create a commit comment"
* Operation id: repos/create-commit-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: commit_sha, required, path
* Response: 201
* application/json, #/components/schemas/commit-comment
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_commit_commen
METHODS repos_create_commit_comment
IMPORTING
owner TYPE string
repo TYPE string
commit_sha TYPE string
body TYPE bodyrepos_create_commit_commen
RETURNING
VALUE(return_data) TYPE commit_comment
RAISING cx_static_check.
* GET - "List pull requests associated with a commit"
* Operation id: repos/list-pull-requests-associated-with-commit
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: commit_sha, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_pull_requests_assoc
METHODS repos_list_pull_requests_assoc
IMPORTING
owner TYPE string
repo TYPE string
commit_sha TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_pull_reque
RAISING cx_static_check.
* GET - "Get a commit"
* Operation id: repos/get-commit
* Parameter: ref, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/commit
* Response: 404
* Response: 422
* Response: 500
METHODS repos_get_commit
IMPORTING
ref TYPE string
owner TYPE string
repo TYPE string
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE commit
RAISING cx_static_check.
* GET - "List check runs for a Git reference"
* Operation id: checks/list-for-ref
* Parameter: ref, required, path
* Parameter: filter, optional, query
* Parameter: app_id, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: check_name, optional, query
* Parameter: status, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_checks_list_for_ref
METHODS checks_list_for_ref
IMPORTING
ref TYPE string
filter TYPE string DEFAULT 'latest'
app_id TYPE i OPTIONAL
owner TYPE string
repo TYPE string
check_name TYPE string OPTIONAL
status TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_checks_list_for_ref
RAISING cx_static_check.
* GET - "List check suites for a Git reference"
* Operation id: checks/list-suites-for-ref
* Parameter: ref, required, path
* Parameter: app_id, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: check_name, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_checks_list_suites_for_ref
METHODS checks_list_suites_for_ref
IMPORTING
ref TYPE string
app_id TYPE i OPTIONAL
owner TYPE string
repo TYPE string
check_name TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_checks_list_suites_fo
RAISING cx_static_check.
* GET - "Get the combined status for a specific reference"
* Operation id: repos/get-combined-status-for-ref
* Parameter: ref, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/combined-commit-status
* Response: 404
METHODS repos_get_combined_status_for_
IMPORTING
ref TYPE string
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE combined_commit_status
RAISING cx_static_check.
* GET - "List commit statuses for a reference"
* Operation id: repos/list-commit-statuses-for-ref
* Parameter: ref, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_commit_statuses_for
* Response: 301
METHODS repos_list_commit_statuses_for
IMPORTING
ref TYPE string
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_commit_sta
RAISING cx_static_check.
* GET - "Get community profile metrics"
* Operation id: repos/get-community-profile-metrics
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/community-profile
METHODS repos_get_community_profile_me
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE community_profile
RAISING cx_static_check.
* GET - "Compare two commits"
* Operation id: repos/compare-commits
* Parameter: basehead, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/commit-comparison
* Response: 404
* Response: 500
METHODS repos_compare_commits
IMPORTING
basehead TYPE string
owner TYPE string
repo TYPE string
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE commit_comparison
RAISING cx_static_check.
* GET - "Get repository content"
* Operation id: repos/get-content
* Parameter: path, required, path
* Parameter: ref, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/vnd.github.v3.object, #/components/schemas/content-tree
* application/json, string
* Response: 302
* Response: 403
* Response: 404
METHODS repos_get_content
IMPORTING
path TYPE string
ref TYPE string OPTIONAL
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* PUT - "Create or update file contents"
* Operation id: repos/create-or-update-file-contents
* Parameter: path, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/file-commit
* Response: 201
* application/json, #/components/schemas/file-commit
* Response: 404
* Response: 409
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_or_update_fil
METHODS repos_create_or_update_file_co
IMPORTING
path TYPE string
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_or_update_fil
RETURNING
VALUE(return_data) TYPE file_commit
RAISING cx_static_check.
* DELETE - "Delete a file"
* Operation id: repos/delete-file
* Parameter: path, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/file-commit
* Response: 404
* Response: 409
* Response: 422
* Response: 503
* Body ref: #/components/schemas/bodyrepos_delete_file
METHODS repos_delete_file
IMPORTING
path TYPE string
owner TYPE string
repo TYPE string
body TYPE bodyrepos_delete_file
RETURNING
VALUE(return_data) TYPE file_commit
RAISING cx_static_check.
* GET - "List repository contributors"
* Operation id: repos/list-contributors
* Parameter: anon, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_contributors
* Response: 204
* Response: 403
* Response: 404
METHODS repos_list_contributors
IMPORTING
anon TYPE string OPTIONAL
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_contributo
RAISING cx_static_check.
* GET - "List repository secrets"
* Operation id: dependabot/list-repo-secrets
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_dependabot_list_repo_secrets
METHODS dependabot_list_repo_secrets
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_dependabot_list_repo_
RAISING cx_static_check.
* GET - "Get a repository public key"
* Operation id: dependabot/get-repo-public-key
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/dependabot-public-key
METHODS dependabot_get_repo_public_key
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE dependabot_public_key
RAISING cx_static_check.
* GET - "Get a repository secret"
* Operation id: dependabot/get-repo-secret
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: secret_name, required, path
* Response: 200
* application/json, #/components/schemas/dependabot-secret
METHODS dependabot_get_repo_secret
IMPORTING
owner TYPE string
repo TYPE string
secret_name TYPE string
RETURNING
VALUE(return_data) TYPE dependabot_secret
RAISING cx_static_check.
* PUT - "Create or update a repository secret"
* Operation id: dependabot/create-or-update-repo-secret
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: secret_name, required, path
* Response: 201
* application/json, #/components/schemas/response_dependabot_create_or_update_re
* Response: 204
* Body ref: #/components/schemas/bodydependabot_create_or_upd01
METHODS dependabot_create_or_update_re
IMPORTING
owner TYPE string
repo TYPE string
secret_name TYPE string
body TYPE bodydependabot_create_or_upd01
RETURNING
VALUE(return_data) TYPE response_dependabot_create_or_
RAISING cx_static_check.
* DELETE - "Delete a repository secret"
* Operation id: dependabot/delete-repo-secret
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: secret_name, required, path
* Response: 204
* Body ref: #/components/schemas/bodydependabot_delete_repo_sec
METHODS dependabot_delete_repo_secret
IMPORTING
owner TYPE string
repo TYPE string
secret_name TYPE string
body TYPE bodydependabot_delete_repo_sec
RAISING cx_static_check.
* GET - "List deployments"
* Operation id: repos/list-deployments
* Parameter: sha, optional, query
* Parameter: ref, optional, query
* Parameter: task, optional, query
* Parameter: environment, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_deployments
METHODS repos_list_deployments
IMPORTING
sha TYPE string DEFAULT 'none'
ref TYPE string DEFAULT 'none'
task TYPE string DEFAULT 'none'
environment TYPE string DEFAULT 'none'
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_deployment
RAISING cx_static_check.
* POST - "Create a deployment"
* Operation id: repos/create-deployment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/deployment
* Response: 202
* application/json, #/components/schemas/response_repos_create_deployment
* Response: 409
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_deployment
METHODS repos_create_deployment
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_deployment
RETURNING
VALUE(return_data) TYPE deployment
RAISING cx_static_check.
* GET - "Get a deployment"
* Operation id: repos/get-deployment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: deployment_id, required, path
* Response: 200
* application/json, #/components/schemas/deployment
* Response: 404
METHODS repos_get_deployment
IMPORTING
owner TYPE string
repo TYPE string
deployment_id TYPE i
RETURNING
VALUE(return_data) TYPE deployment
RAISING cx_static_check.
* DELETE - "Delete a deployment"
* Operation id: repos/delete-deployment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: deployment_id, required, path
* Response: 204
* Response: 404
* Response: 422
METHODS repos_delete_deployment
IMPORTING
owner TYPE string
repo TYPE string
deployment_id TYPE i
RAISING cx_static_check.
* GET - "List deployment statuses"
* Operation id: repos/list-deployment-statuses
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: deployment_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_deployment_statuses
* Response: 404
METHODS repos_list_deployment_statuses
IMPORTING
owner TYPE string
repo TYPE string
deployment_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_deployme01
RAISING cx_static_check.
* POST - "Create a deployment status"
* Operation id: repos/create-deployment-status
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: deployment_id, required, path
* Response: 201
* application/json, #/components/schemas/deployment-status
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_deployment_st
METHODS repos_create_deployment_status
IMPORTING
owner TYPE string
repo TYPE string
deployment_id TYPE i
body TYPE bodyrepos_create_deployment_st
RETURNING
VALUE(return_data) TYPE deployment_status
RAISING cx_static_check.
* GET - "Get a deployment status"
* Operation id: repos/get-deployment-status
* Parameter: status_id, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: deployment_id, required, path
* Response: 200
* application/json, #/components/schemas/deployment-status
* Response: 404
METHODS repos_get_deployment_status
IMPORTING
status_id TYPE i
owner TYPE string
repo TYPE string
deployment_id TYPE i
RETURNING
VALUE(return_data) TYPE deployment_status
RAISING cx_static_check.
* POST - "Create a repository dispatch event"
* Operation id: repos/create-dispatch-event
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_dispatch_even
METHODS repos_create_dispatch_event
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_dispatch_even
RAISING cx_static_check.
* GET - "Get all environments"
* Operation id: repos/get-all-environments
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_all_environments
METHODS repos_get_all_environments
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_all_environ
RAISING cx_static_check.
* GET - "Get an environment"
* Operation id: repos/get-environment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: environment_name, required, path
* Response: 200
* application/json, #/components/schemas/environment
METHODS repos_get_environment
IMPORTING
owner TYPE string
repo TYPE string
environment_name TYPE string
RETURNING
VALUE(return_data) TYPE environment
RAISING cx_static_check.
* PUT - "Create or update an environment"
* Operation id: repos/create-or-update-environment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: environment_name, required, path
* Response: 200
* application/json, #/components/schemas/environment
* Response: 422
* application/json, #/components/schemas/basic-error
* Body ref: #/components/schemas/bodyrepos_create_or_update_env
METHODS repos_create_or_update_environ
IMPORTING
owner TYPE string
repo TYPE string
environment_name TYPE string
body TYPE bodyrepos_create_or_update_env
RETURNING
VALUE(return_data) TYPE environment
RAISING cx_static_check.
* DELETE - "Delete an environment"
* Operation id: repos/delete-an-environment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: environment_name, required, path
* Response: 204
* Body ref: #/components/schemas/bodyrepos_delete_an_environmen
METHODS repos_delete_an_environment
IMPORTING
owner TYPE string
repo TYPE string
environment_name TYPE string
body TYPE bodyrepos_delete_an_environmen
RAISING cx_static_check.
* GET - "List repository events"
* Operation id: activity/list-repo-events
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_repo_events
METHODS activity_list_repo_events
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_repo_ev
RAISING cx_static_check.
* GET - "List forks"
* Operation id: repos/list-forks
* Parameter: sort, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_forks
* Response: 400
METHODS repos_list_forks
IMPORTING
sort TYPE string DEFAULT 'newest'
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_forks
RAISING cx_static_check.
* POST - "Create a fork"
* Operation id: repos/create-fork
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 202
* application/json, #/components/schemas/full-repository
* Response: 400
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_fork
METHODS repos_create_fork
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_fork
RAISING cx_static_check.
* POST - "Create a blob"
* Operation id: git/create-blob
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/short-blob
* Response: 403
* Response: 404
* Response: 409
* Response: 422
* Body ref: #/components/schemas/bodygit_create_blob
METHODS git_create_blob
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodygit_create_blob
RETURNING
VALUE(return_data) TYPE short_blob
RAISING cx_static_check.
* GET - "Get a blob"
* Operation id: git/get-blob
* Parameter: file_sha, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/blob
* Response: 403
* Response: 404
* Response: 422
METHODS git_get_blob
IMPORTING
file_sha TYPE string
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE blob
RAISING cx_static_check.
* POST - "Create a commit"
* Operation id: git/create-commit
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/git-commit
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodygit_create_commit
METHODS git_create_commit
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodygit_create_commit
RETURNING
VALUE(return_data) TYPE git_commit
RAISING cx_static_check.
* GET - "Get a commit"
* Operation id: git/get-commit
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: commit_sha, required, path
* Response: 200
* application/json, #/components/schemas/git-commit
* Response: 404
METHODS git_get_commit
IMPORTING
owner TYPE string
repo TYPE string
commit_sha TYPE string
RETURNING
VALUE(return_data) TYPE git_commit
RAISING cx_static_check.
* GET - "List matching references"
* Operation id: git/list-matching-refs
* Parameter: ref, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_git_list_matching_refs
METHODS git_list_matching_refs
IMPORTING
ref TYPE string
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_git_list_matching_ref
RAISING cx_static_check.
* GET - "Get a reference"
* Operation id: git/get-ref
* Parameter: ref, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/git-ref
* Response: 404
METHODS git_get_ref
IMPORTING
ref TYPE string
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE git_ref
RAISING cx_static_check.
* POST - "Create a reference"
* Operation id: git/create-ref
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/git-ref
* Response: 422
* Body ref: #/components/schemas/bodygit_create_ref
METHODS git_create_ref
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodygit_create_ref
RETURNING
VALUE(return_data) TYPE git_ref
RAISING cx_static_check.
* PATCH - "Update a reference"
* Operation id: git/update-ref
* Parameter: ref, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/git-ref
* Response: 422
* Body ref: #/components/schemas/bodygit_update_ref
METHODS git_update_ref
IMPORTING
ref TYPE string
owner TYPE string
repo TYPE string
body TYPE bodygit_update_ref
RETURNING
VALUE(return_data) TYPE git_ref
RAISING cx_static_check.
* DELETE - "Delete a reference"
* Operation id: git/delete-ref
* Parameter: ref, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 422
* Body ref: #/components/schemas/bodygit_delete_ref
METHODS git_delete_ref
IMPORTING
ref TYPE string
owner TYPE string
repo TYPE string
body TYPE bodygit_delete_ref
RAISING cx_static_check.
* POST - "Create a tag object"
* Operation id: git/create-tag
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/git-tag
* Response: 422
* Body ref: #/components/schemas/bodygit_create_tag
METHODS git_create_tag
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodygit_create_tag
RETURNING
VALUE(return_data) TYPE git_tag
RAISING cx_static_check.
* GET - "Get a tag"
* Operation id: git/get-tag
* Parameter: tag_sha, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/git-tag
* Response: 404
METHODS git_get_tag
IMPORTING
tag_sha TYPE string
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE git_tag
RAISING cx_static_check.
* POST - "Create a tree"
* Operation id: git/create-tree
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/git-tree
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodygit_create_tree
METHODS git_create_tree
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodygit_create_tree
RETURNING
VALUE(return_data) TYPE git_tree
RAISING cx_static_check.
* GET - "Get a tree"
* Operation id: git/get-tree
* Parameter: tree_sha, required, path
* Parameter: recursive, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/git-tree
* Response: 404
* Response: 422
METHODS git_get_tree
IMPORTING
tree_sha TYPE string
recursive TYPE string OPTIONAL
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE git_tree
RAISING cx_static_check.
* GET - "List repository webhooks"
* Operation id: repos/list-webhooks
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_webhooks
* Response: 404
METHODS repos_list_webhooks
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_webhooks
RAISING cx_static_check.
* POST - "Create a repository webhook"
* Operation id: repos/create-webhook
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/hook
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_webhook
METHODS repos_create_webhook
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_webhook
RETURNING
VALUE(return_data) TYPE hook
RAISING cx_static_check.
* GET - "Get a repository webhook"
* Operation id: repos/get-webhook
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Response: 200
* application/json, #/components/schemas/hook
* Response: 404
METHODS repos_get_webhook
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
RETURNING
VALUE(return_data) TYPE hook
RAISING cx_static_check.
* PATCH - "Update a repository webhook"
* Operation id: repos/update-webhook
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Response: 200
* application/json, #/components/schemas/hook
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_update_webhook
METHODS repos_update_webhook
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
body TYPE bodyrepos_update_webhook
RETURNING
VALUE(return_data) TYPE hook
RAISING cx_static_check.
* DELETE - "Delete a repository webhook"
* Operation id: repos/delete-webhook
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Response: 204
* Response: 404
* Body ref: #/components/schemas/bodyrepos_delete_webhook
METHODS repos_delete_webhook
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
body TYPE bodyrepos_delete_webhook
RAISING cx_static_check.
* GET - "Get a webhook configuration for a repository"
* Operation id: repos/get-webhook-config-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Response: 200
* application/json, #/components/schemas/webhook-config
METHODS repos_get_webhook_config_for_r
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
RETURNING
VALUE(return_data) TYPE webhook_config
RAISING cx_static_check.
* PATCH - "Update a webhook configuration for a repository"
* Operation id: repos/update-webhook-config-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Response: 200
* application/json, #/components/schemas/webhook-config
* Body ref: #/components/schemas/bodyrepos_update_webhook_confi
METHODS repos_update_webhook_config_fo
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
body TYPE bodyrepos_update_webhook_confi
RETURNING
VALUE(return_data) TYPE webhook_config
RAISING cx_static_check.
* GET - "List deliveries for a repository webhook"
* Operation id: repos/list-webhook-deliveries
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Parameter: per_page, optional, query
* Parameter: cursor, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_webhook_deliveries
* Response: 400
* Response: 422
METHODS repos_list_webhook_deliveries
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
per_page TYPE i DEFAULT 30
cursor TYPE string OPTIONAL
RETURNING
VALUE(return_data) TYPE response_repos_list_webhook_de
RAISING cx_static_check.
* GET - "Get a delivery for a repository webhook"
* Operation id: repos/get-webhook-delivery
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Parameter: delivery_id, required, path
* Response: 200
* application/json, #/components/schemas/hook-delivery
* Response: 400
* Response: 422
METHODS repos_get_webhook_delivery
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
delivery_id TYPE i
RETURNING
VALUE(return_data) TYPE hook_delivery
RAISING cx_static_check.
* POST - "Redeliver a delivery for a repository webhook"
* Operation id: repos/redeliver-webhook-delivery
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Parameter: delivery_id, required, path
* Response: 202
* Response: 400
* Response: 422
METHODS repos_redeliver_webhook_delive
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
delivery_id TYPE i
RAISING cx_static_check.
* POST - "Ping a repository webhook"
* Operation id: repos/ping-webhook
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Response: 204
* Response: 404
METHODS repos_ping_webhook
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
RAISING cx_static_check.
* POST - "Test the push repository webhook"
* Operation id: repos/test-push-webhook
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: hook_id, required, path
* Response: 204
* Response: 404
METHODS repos_test_push_webhook
IMPORTING
owner TYPE string
repo TYPE string
hook_id TYPE i
RAISING cx_static_check.
* GET - "Get an import status"
* Operation id: migrations/get-import-status
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/import
* Response: 404
METHODS migrations_get_import_status
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE import
RAISING cx_static_check.
* PUT - "Start an import"
* Operation id: migrations/start-import
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/import
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodymigrations_start_import
METHODS migrations_start_import
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodymigrations_start_import
RETURNING
VALUE(return_data) TYPE import
RAISING cx_static_check.
* PATCH - "Update an import"
* Operation id: migrations/update-import
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/import
* Body ref: #/components/schemas/bodymigrations_update_import
METHODS migrations_update_import
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodymigrations_update_import
RETURNING
VALUE(return_data) TYPE import
RAISING cx_static_check.
* DELETE - "Cancel an import"
* Operation id: migrations/cancel-import
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Body ref: #/components/schemas/bodymigrations_cancel_import
METHODS migrations_cancel_import
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodymigrations_cancel_import
RAISING cx_static_check.
* GET - "Get commit authors"
* Operation id: migrations/get-commit-authors
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: since, optional, query
* Response: 200
* application/json, #/components/schemas/response_migrations_get_commit_authors
* Response: 404
METHODS migrations_get_commit_authors
IMPORTING
owner TYPE string
repo TYPE string
since TYPE i OPTIONAL
RETURNING
VALUE(return_data) TYPE response_migrations_get_commit
RAISING cx_static_check.
* PATCH - "Map a commit author"
* Operation id: migrations/map-commit-author
* Parameter: author_id, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/porter-author
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodymigrations_map_commit_auth
METHODS migrations_map_commit_author
IMPORTING
author_id TYPE i
owner TYPE string
repo TYPE string
body TYPE bodymigrations_map_commit_auth
RETURNING
VALUE(return_data) TYPE porter_author
RAISING cx_static_check.
* GET - "Get large files"
* Operation id: migrations/get-large-files
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_migrations_get_large_files
METHODS migrations_get_large_files
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_migrations_get_large_
RAISING cx_static_check.
* PATCH - "Update Git LFS preference"
* Operation id: migrations/set-lfs-preference
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/import
* Response: 422
* Body ref: #/components/schemas/bodymigrations_set_lfs_prefere
METHODS migrations_set_lfs_preference
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodymigrations_set_lfs_prefere
RETURNING
VALUE(return_data) TYPE import
RAISING cx_static_check.
* GET - "Get a repository installation for the authenticated app"
* Operation id: apps/get-repo-installation
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/installation
* Response: 301
* Response: 404
METHODS apps_get_repo_installation
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE installation
RAISING cx_static_check.
* GET - "Get interaction restrictions for a repository"
* Operation id: interactions/get-restrictions-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, string
METHODS interactions_get_restriction01
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* PUT - "Set interaction restrictions for a repository"
* Operation id: interactions/set-restrictions-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/interaction-limit-response
* Response: 409
* Body ref: #/components/schemas/interaction-limit
METHODS interactions_set_restriction01
IMPORTING
owner TYPE string
repo TYPE string
body TYPE interaction_limit
RETURNING
VALUE(return_data) TYPE interaction_limit_response
RAISING cx_static_check.
* DELETE - "Remove interaction restrictions for a repository"
* Operation id: interactions/remove-restrictions-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 409
METHODS interactions_remove_restrict01
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* GET - "List repository invitations"
* Operation id: repos/list-invitations
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_invitations
METHODS repos_list_invitations
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_invitation
RAISING cx_static_check.
* PATCH - "Update a repository invitation"
* Operation id: repos/update-invitation
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: invitation_id, required, path
* Response: 200
* application/json, #/components/schemas/repository-invitation
* Body ref: #/components/schemas/bodyrepos_update_invitation
METHODS repos_update_invitation
IMPORTING
owner TYPE string
repo TYPE string
invitation_id TYPE i
body TYPE bodyrepos_update_invitation
RETURNING
VALUE(return_data) TYPE repository_invitation
RAISING cx_static_check.
* DELETE - "Delete a repository invitation"
* Operation id: repos/delete-invitation
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: invitation_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyrepos_delete_invitation
METHODS repos_delete_invitation
IMPORTING
owner TYPE string
repo TYPE string
invitation_id TYPE i
body TYPE bodyrepos_delete_invitation
RAISING cx_static_check.
* GET - "List repository issues"
* Operation id: issues/list-for-repo
* Parameter: milestone, optional, query
* Parameter: state, optional, query
* Parameter: assignee, optional, query
* Parameter: creator, optional, query
* Parameter: mentioned, optional, query
* Parameter: sort, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: labels, optional, query
* Parameter: direction, optional, query
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_for_repo
* Response: 301
* Response: 404
* Response: 422
METHODS issues_list_for_repo
IMPORTING
milestone TYPE string OPTIONAL
state TYPE string DEFAULT 'open'
assignee TYPE string OPTIONAL
creator TYPE string OPTIONAL
mentioned TYPE string OPTIONAL
sort TYPE string DEFAULT 'created'
owner TYPE string
repo TYPE string
labels TYPE string OPTIONAL
direction TYPE string DEFAULT 'desc'
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_for_repo
RAISING cx_static_check.
* POST - "Create an issue"
* Operation id: issues/create
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/issue
* Response: 403
* Response: 404
* Response: 410
* Response: 422
* Response: 503
* Body ref: #/components/schemas/bodyissues_create
METHODS issues_create
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyissues_create
RETURNING
VALUE(return_data) TYPE issue
RAISING cx_static_check.
* GET - "List issue comments for a repository"
* Operation id: issues/list-comments-for-repo
* Parameter: direction, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: sort, optional, query
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_comments_for_repo
* Response: 404
* Response: 422
METHODS issues_list_comments_for_repo
IMPORTING
direction TYPE string OPTIONAL
owner TYPE string
repo TYPE string
sort TYPE string DEFAULT 'created'
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_comments_
RAISING cx_static_check.
* GET - "Get an issue comment"
* Operation id: issues/get-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/issue-comment
* Response: 404
METHODS issues_get_comment
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
RETURNING
VALUE(return_data) TYPE issue_comment
RAISING cx_static_check.
* PATCH - "Update an issue comment"
* Operation id: issues/update-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/issue-comment
* Response: 422
* Body ref: #/components/schemas/bodyissues_update_comment
METHODS issues_update_comment
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
body TYPE bodyissues_update_comment
RETURNING
VALUE(return_data) TYPE issue_comment
RAISING cx_static_check.
* DELETE - "Delete an issue comment"
* Operation id: issues/delete-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyissues_delete_comment
METHODS issues_delete_comment
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
body TYPE bodyissues_delete_comment
RAISING cx_static_check.
* GET - "List reactions for an issue comment"
* Operation id: reactions/list-for-issue-comment
* Parameter: content, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_reactions_list_for_issue_comme
* Response: 404
METHODS reactions_list_for_issue_comme
IMPORTING
content TYPE string OPTIONAL
owner TYPE string
repo TYPE string
comment_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_reactions_list_for_is
RAISING cx_static_check.
* POST - "Create reaction for an issue comment"
* Operation id: reactions/create-for-issue-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/reaction
* Response: 201
* application/json, #/components/schemas/reaction
* Response: 422
* Body ref: #/components/schemas/bodyreactions_create_for_issue
METHODS reactions_create_for_issue_com
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
body TYPE bodyreactions_create_for_issue
RETURNING
VALUE(return_data) TYPE reaction
RAISING cx_static_check.
* DELETE - "Delete an issue comment reaction"
* Operation id: reactions/delete-for-issue-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Parameter: reaction_id, required, path
* Response: 204
METHODS reactions_delete_for_issue_com
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
reaction_id TYPE i
RAISING cx_static_check.
* GET - "List issue events for a repository"
* Operation id: issues/list-events-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_events_for_repo
* Response: 422
METHODS issues_list_events_for_repo
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_events_fo
RAISING cx_static_check.
* GET - "Get an issue event"
* Operation id: issues/get-event
* Parameter: event_id, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/issue-event
* Response: 403
* Response: 404
* Response: 410
METHODS issues_get_event
IMPORTING
event_id TYPE i
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE issue_event
RAISING cx_static_check.
* GET - "Get an issue"
* Operation id: issues/get
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 200
* application/json, #/components/schemas/issue
* Response: 301
* Response: 304
* Response: 404
* Response: 410
METHODS issues_get
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
RETURNING
VALUE(return_data) TYPE issue
RAISING cx_static_check.
* PATCH - "Update an issue"
* Operation id: issues/update
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 200
* application/json, #/components/schemas/issue
* Response: 301
* Response: 403
* Response: 404
* Response: 410
* Response: 422
* Response: 503
* Body ref: #/components/schemas/bodyissues_update
METHODS issues_update
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE bodyissues_update
RETURNING
VALUE(return_data) TYPE issue
RAISING cx_static_check.
* POST - "Add assignees to an issue"
* Operation id: issues/add-assignees
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 201
* application/json, #/components/schemas/issue
* Body ref: #/components/schemas/bodyissues_add_assignees
METHODS issues_add_assignees
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE bodyissues_add_assignees
RETURNING
VALUE(return_data) TYPE issue
RAISING cx_static_check.
* DELETE - "Remove assignees from an issue"
* Operation id: issues/remove-assignees
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 200
* application/json, #/components/schemas/issue
* Body ref: #/components/schemas/bodyissues_remove_assignees
METHODS issues_remove_assignees
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE bodyissues_remove_assignees
RETURNING
VALUE(return_data) TYPE issue
RAISING cx_static_check.
* GET - "List issue comments"
* Operation id: issues/list-comments
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_comments
* Response: 404
* Response: 410
METHODS issues_list_comments
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_comments
RAISING cx_static_check.
* POST - "Create an issue comment"
* Operation id: issues/create-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 201
* application/json, #/components/schemas/issue-comment
* Response: 403
* Response: 404
* Response: 410
* Response: 422
* Body ref: #/components/schemas/bodyissues_create_comment
METHODS issues_create_comment
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE bodyissues_create_comment
RETURNING
VALUE(return_data) TYPE issue_comment
RAISING cx_static_check.
* GET - "List issue events"
* Operation id: issues/list-events
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_events
* Response: 410
METHODS issues_list_events
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_events
RAISING cx_static_check.
* GET - "List labels for an issue"
* Operation id: issues/list-labels-on-issue
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_labels_on_issue
* Response: 410
METHODS issues_list_labels_on_issue
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_labels_on
RAISING cx_static_check.
* POST - "Add labels to an issue"
* Operation id: issues/add-labels
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 200
* application/json, #/components/schemas/response_issues_add_labels
* Response: 410
* Response: 422
* Body schema: string
METHODS issues_add_labels
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE string
RETURNING
VALUE(return_data) TYPE response_issues_add_labels
RAISING cx_static_check.
* PUT - "Set labels for an issue"
* Operation id: issues/set-labels
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 200
* application/json, #/components/schemas/response_issues_set_labels
* Response: 410
* Response: 422
* Body schema: string
METHODS issues_set_labels
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE string
RETURNING
VALUE(return_data) TYPE response_issues_set_labels
RAISING cx_static_check.
* DELETE - "Remove all labels from an issue"
* Operation id: issues/remove-all-labels
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 204
* Response: 410
* Body schema: string
METHODS issues_remove_all_labels
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE string
RAISING cx_static_check.
* DELETE - "Remove a label from an issue"
* Operation id: issues/remove-label
* Parameter: name, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 200
* application/json, #/components/schemas/response_issues_remove_label
* Response: 404
* Response: 410
METHODS issues_remove_label
IMPORTING
name TYPE string
owner TYPE string
repo TYPE string
issue_number TYPE i
RETURNING
VALUE(return_data) TYPE response_issues_remove_label
RAISING cx_static_check.
* PUT - "Lock an issue"
* Operation id: issues/lock
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 204
* Response: 403
* Response: 404
* Response: 410
* Response: 422
* Body ref: #/components/schemas/bodyissues_lock
METHODS issues_lock
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE bodyissues_lock
RAISING cx_static_check.
* DELETE - "Unlock an issue"
* Operation id: issues/unlock
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 204
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodyissues_unlock
METHODS issues_unlock
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE bodyissues_unlock
RAISING cx_static_check.
* GET - "List reactions for an issue"
* Operation id: reactions/list-for-issue
* Parameter: content, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_reactions_list_for_issue
* Response: 404
* Response: 410
METHODS reactions_list_for_issue
IMPORTING
content TYPE string OPTIONAL
owner TYPE string
repo TYPE string
issue_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_reactions_list_for_02
RAISING cx_static_check.
* POST - "Create reaction for an issue"
* Operation id: reactions/create-for-issue
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Response: 200
* application/json, #/components/schemas/reaction
* Response: 201
* application/json, #/components/schemas/reaction
* Response: 422
* Body ref: #/components/schemas/bodyreactions_create_for_iss01
METHODS reactions_create_for_issue
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
body TYPE bodyreactions_create_for_iss01
RETURNING
VALUE(return_data) TYPE reaction
RAISING cx_static_check.
* DELETE - "Delete an issue reaction"
* Operation id: reactions/delete-for-issue
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Parameter: reaction_id, required, path
* Response: 204
METHODS reactions_delete_for_issue
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
reaction_id TYPE i
RAISING cx_static_check.
* GET - "List timeline events for an issue"
* Operation id: issues/list-events-for-timeline
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: issue_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_events_for_timelin
* Response: 404
* Response: 410
METHODS issues_list_events_for_timelin
IMPORTING
owner TYPE string
repo TYPE string
issue_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_events_01
RAISING cx_static_check.
* GET - "List deploy keys"
* Operation id: repos/list-deploy-keys
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_deploy_keys
METHODS repos_list_deploy_keys
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_deploy_key
RAISING cx_static_check.
* POST - "Create a deploy key"
* Operation id: repos/create-deploy-key
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/deploy-key
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_deploy_key
METHODS repos_create_deploy_key
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_deploy_key
RETURNING
VALUE(return_data) TYPE deploy_key
RAISING cx_static_check.
* GET - "Get a deploy key"
* Operation id: repos/get-deploy-key
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: key_id, required, path
* Response: 200
* application/json, #/components/schemas/deploy-key
* Response: 404
METHODS repos_get_deploy_key
IMPORTING
owner TYPE string
repo TYPE string
key_id TYPE i
RETURNING
VALUE(return_data) TYPE deploy_key
RAISING cx_static_check.
* DELETE - "Delete a deploy key"
* Operation id: repos/delete-deploy-key
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: key_id, required, path
* Response: 204
METHODS repos_delete_deploy_key
IMPORTING
owner TYPE string
repo TYPE string
key_id TYPE i
RAISING cx_static_check.
* GET - "List labels for a repository"
* Operation id: issues/list-labels-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_labels_for_repo
* Response: 404
METHODS issues_list_labels_for_repo
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_labels_fo
RAISING cx_static_check.
* POST - "Create a label"
* Operation id: issues/create-label
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/label
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyissues_create_label
METHODS issues_create_label
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyissues_create_label
RETURNING
VALUE(return_data) TYPE label
RAISING cx_static_check.
* GET - "Get a label"
* Operation id: issues/get-label
* Parameter: name, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/label
* Response: 404
METHODS issues_get_label
IMPORTING
name TYPE string
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE label
RAISING cx_static_check.
* PATCH - "Update a label"
* Operation id: issues/update-label
* Parameter: name, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/label
* Body ref: #/components/schemas/bodyissues_update_label
METHODS issues_update_label
IMPORTING
name TYPE string
owner TYPE string
repo TYPE string
body TYPE bodyissues_update_label
RETURNING
VALUE(return_data) TYPE label
RAISING cx_static_check.
* DELETE - "Delete a label"
* Operation id: issues/delete-label
* Parameter: name, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Body ref: #/components/schemas/bodyissues_delete_label
METHODS issues_delete_label
IMPORTING
name TYPE string
owner TYPE string
repo TYPE string
body TYPE bodyissues_delete_label
RAISING cx_static_check.
* GET - "List repository languages"
* Operation id: repos/list-languages
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/language
METHODS repos_list_languages
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE language
RAISING cx_static_check.
* PUT - "Enable Git LFS for a repository"
* Operation id: repos/enable-lfs-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 202
* Response: 403
METHODS repos_enable_lfs_for_repo
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* DELETE - "Disable Git LFS for a repository"
* Operation id: repos/disable-lfs-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
METHODS repos_disable_lfs_for_repo
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* GET - "Get the license for a repository"
* Operation id: licenses/get-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/license-content
METHODS licenses_get_for_repo
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE license_content
RAISING cx_static_check.
* POST - "Sync a fork branch with the upstream repository"
* Operation id: repos/merge-upstream
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/merged-upstream
* Response: 409
* Response: 422
* Body ref: #/components/schemas/bodyrepos_merge_upstream
METHODS repos_merge_upstream
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_merge_upstream
RETURNING
VALUE(return_data) TYPE merged_upstream
RAISING cx_static_check.
* POST - "Merge a branch"
* Operation id: repos/merge
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/commit
* Response: 204
* Response: 403
* Response: 404
* Response: 409
* Response: 422
* Body ref: #/components/schemas/bodyrepos_merge
METHODS repos_merge
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_merge
RETURNING
VALUE(return_data) TYPE commit
RAISING cx_static_check.
* GET - "List milestones"
* Operation id: issues/list-milestones
* Parameter: state, optional, query
* Parameter: sort, optional, query
* Parameter: direction, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_milestones
* Response: 404
METHODS issues_list_milestones
IMPORTING
state TYPE string DEFAULT 'open'
sort TYPE string DEFAULT 'due_on'
direction TYPE string DEFAULT 'asc'
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_milestone
RAISING cx_static_check.
* POST - "Create a milestone"
* Operation id: issues/create-milestone
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/milestone
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyissues_create_milestone
METHODS issues_create_milestone
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyissues_create_milestone
RETURNING
VALUE(return_data) TYPE milestone
RAISING cx_static_check.
* GET - "Get a milestone"
* Operation id: issues/get-milestone
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: milestone_number, required, path
* Response: 200
* application/json, #/components/schemas/milestone
* Response: 404
METHODS issues_get_milestone
IMPORTING
owner TYPE string
repo TYPE string
milestone_number TYPE i
RETURNING
VALUE(return_data) TYPE milestone
RAISING cx_static_check.
* PATCH - "Update a milestone"
* Operation id: issues/update-milestone
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: milestone_number, required, path
* Response: 200
* application/json, #/components/schemas/milestone
* Body ref: #/components/schemas/bodyissues_update_milestone
METHODS issues_update_milestone
IMPORTING
owner TYPE string
repo TYPE string
milestone_number TYPE i
body TYPE bodyissues_update_milestone
RETURNING
VALUE(return_data) TYPE milestone
RAISING cx_static_check.
* DELETE - "Delete a milestone"
* Operation id: issues/delete-milestone
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: milestone_number, required, path
* Response: 204
* Response: 404
* Body ref: #/components/schemas/bodyissues_delete_milestone
METHODS issues_delete_milestone
IMPORTING
owner TYPE string
repo TYPE string
milestone_number TYPE i
body TYPE bodyissues_delete_milestone
RAISING cx_static_check.
* GET - "List labels for issues in a milestone"
* Operation id: issues/list-labels-for-milestone
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: milestone_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_labels_for_milesto
METHODS issues_list_labels_for_milesto
IMPORTING
owner TYPE string
repo TYPE string
milestone_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_labels_01
RAISING cx_static_check.
* GET - "List repository notifications for the authenticated user"
* Operation id: activity/list-repo-notifications-for-authenticated-user
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: all, optional, query
* Parameter: participating, optional, query
* Parameter: since, optional, query
* Parameter: before, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_repo_notificatio
METHODS activity_list_repo_notificatio
IMPORTING
owner TYPE string
repo TYPE string
all TYPE abap_bool DEFAULT abap_false
participating TYPE abap_bool DEFAULT abap_false
since TYPE string OPTIONAL
before TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_repo_no
RAISING cx_static_check.
* PUT - "Mark repository notifications as read"
* Operation id: activity/mark-repo-notifications-as-read
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 202
* application/json, #/components/schemas/response_activity_mark_repo_notificatio
* Response: 205
* Body ref: #/components/schemas/bodyactivity_mark_repo_notific
METHODS activity_mark_repo_notificatio
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyactivity_mark_repo_notific
RAISING cx_static_check.
* GET - "Get a GitHub Pages site"
* Operation id: repos/get-pages
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/page
* Response: 404
METHODS repos_get_pages
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE page
RAISING cx_static_check.
* POST - "Create a GitHub Pages site"
* Operation id: repos/create-pages-site
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/page
* Response: 409
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_pages_site
METHODS repos_create_pages_site
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_pages_site
RETURNING
VALUE(return_data) TYPE page
RAISING cx_static_check.
* PUT - "Update information about a GitHub Pages site"
* Operation id: repos/update-information-about-pages-site
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 400
* Response: 422
* Body ref: #/components/schemas/bodyrepos_update_information_a
METHODS repos_update_information_about
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_update_information_a
RAISING cx_static_check.
* DELETE - "Delete a GitHub Pages site"
* Operation id: repos/delete-pages-site
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_delete_pages_site
METHODS repos_delete_pages_site
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_delete_pages_site
RAISING cx_static_check.
* GET - "List GitHub Pages builds"
* Operation id: repos/list-pages-builds
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_pages_builds
METHODS repos_list_pages_builds
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_pages_buil
RAISING cx_static_check.
* POST - "Request a GitHub Pages build"
* Operation id: repos/request-pages-build
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/page-build-status
METHODS repos_request_pages_build
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE page_build_status
RAISING cx_static_check.
* GET - "Get latest Pages build"
* Operation id: repos/get-latest-pages-build
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/page-build
METHODS repos_get_latest_pages_build
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE page_build
RAISING cx_static_check.
* GET - "Get GitHub Pages build"
* Operation id: repos/get-pages-build
* Parameter: build_id, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/page-build
METHODS repos_get_pages_build
IMPORTING
build_id TYPE i
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE page_build
RAISING cx_static_check.
* GET - "Get a DNS health check for GitHub Pages"
* Operation id: repos/get-pages-health-check
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/pages-health-check
* Response: 202
* application/json, #/components/schemas/empty-object
* Response: 400
* Response: 404
* Response: 422
METHODS repos_get_pages_health_check
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE pages_health_check
RAISING cx_static_check.
* GET - "List repository projects"
* Operation id: projects/list-for-repo
* Parameter: state, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_projects_list_for_repo
* Response: 401
* Response: 403
* Response: 404
* Response: 410
* Response: 422
METHODS projects_list_for_repo
IMPORTING
state TYPE string DEFAULT 'open'
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_projects_list_for_rep
RAISING cx_static_check.
* POST - "Create a repository project"
* Operation id: projects/create-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/project
* Response: 401
* Response: 403
* Response: 404
* Response: 410
* Response: 422
* Body ref: #/components/schemas/bodyprojects_create_for_repo
METHODS projects_create_for_repo
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyprojects_create_for_repo
RETURNING
VALUE(return_data) TYPE project
RAISING cx_static_check.
* GET - "List pull requests"
* Operation id: pulls/list
* Parameter: state, optional, query
* Parameter: head, optional, query
* Parameter: base, optional, query
* Parameter: sort, optional, query
* Parameter: direction, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_pulls_list
* Response: 304
* Response: 422
METHODS pulls_list
IMPORTING
state TYPE string DEFAULT 'open'
head TYPE string OPTIONAL
base TYPE string OPTIONAL
sort TYPE string DEFAULT 'created'
direction TYPE string OPTIONAL
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_pulls_list
RAISING cx_static_check.
* POST - "Create a pull request"
* Operation id: pulls/create
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/pull-request
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodypulls_create
METHODS pulls_create
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodypulls_create
RETURNING
VALUE(return_data) TYPE pull_request
RAISING cx_static_check.
* GET - "List review comments in a repository"
* Operation id: pulls/list-review-comments-for-repo
* Parameter: sort, optional, query
* Parameter: direction, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_pulls_list_review_comments_for
METHODS pulls_list_review_comments_for
IMPORTING
sort TYPE string OPTIONAL
direction TYPE string OPTIONAL
owner TYPE string
repo TYPE string
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_pulls_list_review_com
RAISING cx_static_check.
* GET - "Get a review comment for a pull request"
* Operation id: pulls/get-review-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-review-comment
* Response: 404
METHODS pulls_get_review_comment
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
RETURNING
VALUE(return_data) TYPE pull_request_review_comment
RAISING cx_static_check.
* PATCH - "Update a review comment for a pull request"
* Operation id: pulls/update-review-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-review-comment
* Body ref: #/components/schemas/bodypulls_update_review_commen
METHODS pulls_update_review_comment
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
body TYPE bodypulls_update_review_commen
RETURNING
VALUE(return_data) TYPE pull_request_review_comment
RAISING cx_static_check.
* DELETE - "Delete a review comment for a pull request"
* Operation id: pulls/delete-review-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 204
* Response: 404
* Body ref: #/components/schemas/bodypulls_delete_review_commen
METHODS pulls_delete_review_comment
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
body TYPE bodypulls_delete_review_commen
RAISING cx_static_check.
* GET - "List reactions for a pull request review comment"
* Operation id: reactions/list-for-pull-request-review-comment
* Parameter: content, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_reactions_list_for_pull_reques
* Response: 404
METHODS reactions_list_for_pull_reques
IMPORTING
content TYPE string OPTIONAL
owner TYPE string
repo TYPE string
comment_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_reactions_list_for_pu
RAISING cx_static_check.
* POST - "Create reaction for a pull request review comment"
* Operation id: reactions/create-for-pull-request-review-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Response: 200
* application/json, #/components/schemas/reaction
* Response: 201
* application/json, #/components/schemas/reaction
* Response: 422
* Body ref: #/components/schemas/bodyreactions_create_for_pull_
METHODS reactions_create_for_pull_requ
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
body TYPE bodyreactions_create_for_pull_
RETURNING
VALUE(return_data) TYPE reaction
RAISING cx_static_check.
* DELETE - "Delete a pull request comment reaction"
* Operation id: reactions/delete-for-pull-request-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: comment_id, required, path
* Parameter: reaction_id, required, path
* Response: 204
METHODS reactions_delete_for_pull_requ
IMPORTING
owner TYPE string
repo TYPE string
comment_id TYPE i
reaction_id TYPE i
RAISING cx_static_check.
* GET - "Get a pull request"
* Operation id: pulls/get
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 200
* application/json, #/components/schemas/pull-request
* Response: 304
* Response: 404
* Response: 500
METHODS pulls_get
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
RETURNING
VALUE(return_data) TYPE pull_request
RAISING cx_static_check.
* PATCH - "Update a pull request"
* Operation id: pulls/update
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 200
* application/json, #/components/schemas/pull-request
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodypulls_update
METHODS pulls_update
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
body TYPE bodypulls_update
RETURNING
VALUE(return_data) TYPE pull_request
RAISING cx_static_check.
* POST - "Create a codespace from a pull request"
* Operation id: codespaces/create-with-pr-for-authenticated-user
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 201
* application/json, #/components/schemas/codespace
* Response: 202
* application/json, #/components/schemas/codespace
* Response: 401
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodycodespaces_create_with_pr_
METHODS codespaces_create_with_pr_for_
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
body TYPE bodycodespaces_create_with_pr_
RETURNING
VALUE(return_data) TYPE codespace
RAISING cx_static_check.
* GET - "List review comments on a pull request"
* Operation id: pulls/list-review-comments
* Parameter: direction, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: sort, optional, query
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_pulls_list_review_comments
METHODS pulls_list_review_comments
IMPORTING
direction TYPE string OPTIONAL
owner TYPE string
repo TYPE string
pull_number TYPE i
sort TYPE string DEFAULT 'created'
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_pulls_list_review_c01
RAISING cx_static_check.
* POST - "Create a review comment for a pull request"
* Operation id: pulls/create-review-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 201
* application/json, #/components/schemas/pull-request-review-comment
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodypulls_create_review_commen
METHODS pulls_create_review_comment
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
body TYPE bodypulls_create_review_commen
RETURNING
VALUE(return_data) TYPE pull_request_review_comment
RAISING cx_static_check.
* POST - "Create a reply for a review comment"
* Operation id: pulls/create-reply-for-review-comment
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: comment_id, required, path
* Response: 201
* application/json, #/components/schemas/pull-request-review-comment
* Response: 404
* Body ref: #/components/schemas/bodypulls_create_reply_for_rev
METHODS pulls_create_reply_for_review_
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
comment_id TYPE i
body TYPE bodypulls_create_reply_for_rev
RETURNING
VALUE(return_data) TYPE pull_request_review_comment
RAISING cx_static_check.
* GET - "List commits on a pull request"
* Operation id: pulls/list-commits
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_pulls_list_commits
METHODS pulls_list_commits
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_pulls_list_commits
RAISING cx_static_check.
* GET - "List pull requests files"
* Operation id: pulls/list-files
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_pulls_list_files
* Response: 422
* Response: 500
METHODS pulls_list_files
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_pulls_list_files
RAISING cx_static_check.
* GET - "Check if a pull request has been merged"
* Operation id: pulls/check-if-merged
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 204
* Response: 404
METHODS pulls_check_if_merged
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
RAISING cx_static_check.
* PUT - "Merge a pull request"
* Operation id: pulls/merge
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-merge-result
* Response: 403
* Response: 404
* Response: 405
* application/json, #/components/schemas/response_pulls_merge
* Response: 409
* application/json, #/components/schemas/response_pulls_merge
* Response: 422
* Body ref: #/components/schemas/bodypulls_merge
METHODS pulls_merge
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
body TYPE bodypulls_merge
RETURNING
VALUE(return_data) TYPE pull_request_merge_result
RAISING cx_static_check.
* GET - "List requested reviewers for a pull request"
* Operation id: pulls/list-requested-reviewers
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/pull-request-review-request
METHODS pulls_list_requested_reviewers
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE pull_request_review_request
RAISING cx_static_check.
* POST - "Request reviewers for a pull request"
* Operation id: pulls/request-reviewers
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 201
* application/json, #/components/schemas/pull-request-simple
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodypulls_request_reviewers
METHODS pulls_request_reviewers
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
body TYPE bodypulls_request_reviewers
RETURNING
VALUE(return_data) TYPE pull_request_simple
RAISING cx_static_check.
* DELETE - "Remove requested reviewers from a pull request"
* Operation id: pulls/remove-requested-reviewers
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-simple
* Response: 422
* Body ref: #/components/schemas/bodypulls_remove_requested_rev
METHODS pulls_remove_requested_reviewe
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
body TYPE bodypulls_remove_requested_rev
RETURNING
VALUE(return_data) TYPE pull_request_simple
RAISING cx_static_check.
* GET - "List reviews for a pull request"
* Operation id: pulls/list-reviews
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_pulls_list_reviews
METHODS pulls_list_reviews
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_pulls_list_reviews
RAISING cx_static_check.
* POST - "Create a review for a pull request"
* Operation id: pulls/create-review
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-review
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodypulls_create_review
METHODS pulls_create_review
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
body TYPE bodypulls_create_review
RETURNING
VALUE(return_data) TYPE pull_request_review
RAISING cx_static_check.
* GET - "Get a review for a pull request"
* Operation id: pulls/get-review
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: review_id, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-review
* Response: 404
METHODS pulls_get_review
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
review_id TYPE i
RETURNING
VALUE(return_data) TYPE pull_request_review
RAISING cx_static_check.
* PUT - "Update a review for a pull request"
* Operation id: pulls/update-review
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: review_id, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-review
* Response: 422
* Body ref: #/components/schemas/bodypulls_update_review
METHODS pulls_update_review
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
review_id TYPE i
body TYPE bodypulls_update_review
RETURNING
VALUE(return_data) TYPE pull_request_review
RAISING cx_static_check.
* DELETE - "Delete a pending review for a pull request"
* Operation id: pulls/delete-pending-review
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: review_id, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-review
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodypulls_delete_pending_revie
METHODS pulls_delete_pending_review
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
review_id TYPE i
body TYPE bodypulls_delete_pending_revie
RETURNING
VALUE(return_data) TYPE pull_request_review
RAISING cx_static_check.
* GET - "List comments for a pull request review"
* Operation id: pulls/list-comments-for-review
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: review_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_pulls_list_comments_for_review
* Response: 404
METHODS pulls_list_comments_for_review
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
review_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_pulls_list_comments_f
RAISING cx_static_check.
* PUT - "Dismiss a review for a pull request"
* Operation id: pulls/dismiss-review
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: review_id, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-review
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodypulls_dismiss_review
METHODS pulls_dismiss_review
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
review_id TYPE i
body TYPE bodypulls_dismiss_review
RETURNING
VALUE(return_data) TYPE pull_request_review
RAISING cx_static_check.
* POST - "Submit a review for a pull request"
* Operation id: pulls/submit-review
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Parameter: review_id, required, path
* Response: 200
* application/json, #/components/schemas/pull-request-review
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodypulls_submit_review
METHODS pulls_submit_review
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
review_id TYPE i
body TYPE bodypulls_submit_review
RETURNING
VALUE(return_data) TYPE pull_request_review
RAISING cx_static_check.
* PUT - "Update a pull request branch"
* Operation id: pulls/update-branch
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: pull_number, required, path
* Response: 202
* application/json, #/components/schemas/response_pulls_update_branch
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodypulls_update_branch
METHODS pulls_update_branch
IMPORTING
owner TYPE string
repo TYPE string
pull_number TYPE i
body TYPE bodypulls_update_branch
RAISING cx_static_check.
* GET - "Get a repository README"
* Operation id: repos/get-readme
* Parameter: ref, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/content-file
* Response: 404
* Response: 422
METHODS repos_get_readme
IMPORTING
ref TYPE string OPTIONAL
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE content_file
RAISING cx_static_check.
* GET - "Get a repository README for a directory"
* Operation id: repos/get-readme-in-directory
* Parameter: dir, required, path
* Parameter: ref, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/content-file
* Response: 404
* Response: 422
METHODS repos_get_readme_in_directory
IMPORTING
dir TYPE string
ref TYPE string OPTIONAL
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE content_file
RAISING cx_static_check.
* GET - "List releases"
* Operation id: repos/list-releases
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_releases
* Response: 404
METHODS repos_list_releases
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_releases
RAISING cx_static_check.
* POST - "Create a release"
* Operation id: repos/create-release
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/release
* Response: 404
* application/json, #/components/schemas/basic-error
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_release
METHODS repos_create_release
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_release
RETURNING
VALUE(return_data) TYPE release
RAISING cx_static_check.
* GET - "Get a release asset"
* Operation id: repos/get-release-asset
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: asset_id, required, path
* Response: 200
* application/json, #/components/schemas/release-asset
* Response: 302
* Response: 404
* Response: 415
METHODS repos_get_release_asset
IMPORTING
owner TYPE string
repo TYPE string
asset_id TYPE i
RETURNING
VALUE(return_data) TYPE release_asset
RAISING cx_static_check.
* PATCH - "Update a release asset"
* Operation id: repos/update-release-asset
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: asset_id, required, path
* Response: 200
* application/json, #/components/schemas/release-asset
* Body ref: #/components/schemas/bodyrepos_update_release_asset
METHODS repos_update_release_asset
IMPORTING
owner TYPE string
repo TYPE string
asset_id TYPE i
body TYPE bodyrepos_update_release_asset
RETURNING
VALUE(return_data) TYPE release_asset
RAISING cx_static_check.
* DELETE - "Delete a release asset"
* Operation id: repos/delete-release-asset
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: asset_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyrepos_delete_release_asset
METHODS repos_delete_release_asset
IMPORTING
owner TYPE string
repo TYPE string
asset_id TYPE i
body TYPE bodyrepos_delete_release_asset
RAISING cx_static_check.
* POST - "Generate release notes content for a release"
* Operation id: repos/generate-release-notes
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/release-notes-content
* Response: 404
* Body ref: #/components/schemas/bodyrepos_generate_release_not
METHODS repos_generate_release_notes
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_generate_release_not
RETURNING
VALUE(return_data) TYPE release_notes_content
RAISING cx_static_check.
* GET - "Get the latest release"
* Operation id: repos/get-latest-release
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/release
METHODS repos_get_latest_release
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE release
RAISING cx_static_check.
* GET - "Get a release by tag name"
* Operation id: repos/get-release-by-tag
* Parameter: tag, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/release
* Response: 404
METHODS repos_get_release_by_tag
IMPORTING
tag TYPE string
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE release
RAISING cx_static_check.
* GET - "Get a release"
* Operation id: repos/get-release
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: release_id, required, path
* Response: 200
* application/json, #/components/schemas/release
* Response: 404
METHODS repos_get_release
IMPORTING
owner TYPE string
repo TYPE string
release_id TYPE i
RETURNING
VALUE(return_data) TYPE release
RAISING cx_static_check.
* PATCH - "Update a release"
* Operation id: repos/update-release
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: release_id, required, path
* Response: 200
* application/json, #/components/schemas/release
* Response: 404
* application/json, #/components/schemas/basic-error
* Body ref: #/components/schemas/bodyrepos_update_release
METHODS repos_update_release
IMPORTING
owner TYPE string
repo TYPE string
release_id TYPE i
body TYPE bodyrepos_update_release
RETURNING
VALUE(return_data) TYPE release
RAISING cx_static_check.
* DELETE - "Delete a release"
* Operation id: repos/delete-release
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: release_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyrepos_delete_release
METHODS repos_delete_release
IMPORTING
owner TYPE string
repo TYPE string
release_id TYPE i
body TYPE bodyrepos_delete_release
RAISING cx_static_check.
* GET - "List release assets"
* Operation id: repos/list-release-assets
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: release_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_release_assets
METHODS repos_list_release_assets
IMPORTING
owner TYPE string
repo TYPE string
release_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_release_as
RAISING cx_static_check.
* POST - "Upload a release asset"
* Operation id: repos/upload-release-asset
* Parameter: name, required, query
* Parameter: label, optional, query
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: release_id, required, path
* Response: 201
* application/json, #/components/schemas/release-asset
* Response: 422
METHODS repos_upload_release_asset
IMPORTING
name TYPE string
label TYPE string OPTIONAL
owner TYPE string
repo TYPE string
release_id TYPE i
RETURNING
VALUE(return_data) TYPE release_asset
RAISING cx_static_check.
* POST - "Create reaction for a release"
* Operation id: reactions/create-for-release
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: release_id, required, path
* Response: 200
* application/json, #/components/schemas/reaction
* Response: 201
* application/json, #/components/schemas/reaction
* Response: 422
* Body ref: #/components/schemas/bodyreactions_create_for_relea
METHODS reactions_create_for_release
IMPORTING
owner TYPE string
repo TYPE string
release_id TYPE i
body TYPE bodyreactions_create_for_relea
RETURNING
VALUE(return_data) TYPE reaction
RAISING cx_static_check.
* GET - "List secret scanning alerts for a repository"
* Operation id: secret-scanning/list-alerts-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: state, optional, query
* Parameter: secret_type, optional, query
* Parameter: resolution, optional, query
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_secret_scanning_list_alerts_02
* Response: 404
* Response: 503
METHODS secret_scanning_list_alerts_02
IMPORTING
owner TYPE string
repo TYPE string
state TYPE string OPTIONAL
secret_type TYPE string OPTIONAL
resolution TYPE string OPTIONAL
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_secret_scanning_lis02
RAISING cx_static_check.
* GET - "Get a secret scanning alert"
* Operation id: secret-scanning/get-alert
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: alert_number, required, path
* Response: 200
* application/json, #/components/schemas/secret-scanning-alert
* Response: 304
* Response: 404
* Response: 503
METHODS secret_scanning_get_alert
IMPORTING
owner TYPE string
repo TYPE string
alert_number TYPE alert_number
RETURNING
VALUE(return_data) TYPE secret_scanning_alert
RAISING cx_static_check.
* PATCH - "Update a secret scanning alert"
* Operation id: secret-scanning/update-alert
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: alert_number, required, path
* Response: 200
* application/json, #/components/schemas/secret-scanning-alert
* Response: 404
* Response: 422
* Response: 503
* Body ref: #/components/schemas/bodysecret_scanning_update_ale
METHODS secret_scanning_update_alert
IMPORTING
owner TYPE string
repo TYPE string
alert_number TYPE alert_number
body TYPE bodysecret_scanning_update_ale
RETURNING
VALUE(return_data) TYPE secret_scanning_alert
RAISING cx_static_check.
* GET - "List locations for a secret scanning alert"
* Operation id: secret-scanning/list-locations-for-alert
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: alert_number, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_secret_scanning_list_locations
* Response: 404
* Response: 503
METHODS secret_scanning_list_locations
IMPORTING
owner TYPE string
repo TYPE string
alert_number TYPE alert_number
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_secret_scanning_lis03
RAISING cx_static_check.
* GET - "List stargazers"
* Operation id: activity/list-stargazers-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, string
* Response: 422
METHODS activity_list_stargazers_for_r
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RAISING cx_static_check.
* GET - "Get the weekly commit activity"
* Operation id: repos/get-code-frequency-stats
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_code_frequency_stats
* Response: 202
* Response: 204
METHODS repos_get_code_frequency_stats
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_code_freque
RAISING cx_static_check.
* GET - "Get the last year of commit activity"
* Operation id: repos/get-commit-activity-stats
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_commit_activity_stat
* Response: 202
* Response: 204
METHODS repos_get_commit_activity_stat
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_commit_acti
RAISING cx_static_check.
* GET - "Get all contributor commit activity"
* Operation id: repos/get-contributors-stats
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_contributors_stats
* Response: 202
* Response: 204
METHODS repos_get_contributors_stats
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_contributor
RAISING cx_static_check.
* GET - "Get the weekly commit count"
* Operation id: repos/get-participation-stats
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/participation-stats
* Response: 404
METHODS repos_get_participation_stats
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE participation_stats
RAISING cx_static_check.
* GET - "Get the hourly commit count for each day"
* Operation id: repos/get-punch-card-stats
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_punch_card_stats
* Response: 204
METHODS repos_get_punch_card_stats
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_punch_card_
RAISING cx_static_check.
* POST - "Create a commit status"
* Operation id: repos/create-commit-status
* Parameter: sha, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 201
* application/json, #/components/schemas/status
* Body ref: #/components/schemas/bodyrepos_create_commit_status
METHODS repos_create_commit_status
IMPORTING
sha TYPE string
owner TYPE string
repo TYPE string
body TYPE bodyrepos_create_commit_status
RETURNING
VALUE(return_data) TYPE status
RAISING cx_static_check.
* GET - "List watchers"
* Operation id: activity/list-watchers-for-repo
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_watchers_for_rep
METHODS activity_list_watchers_for_rep
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_watcher
RAISING cx_static_check.
* GET - "Get a repository subscription"
* Operation id: activity/get-repo-subscription
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/repository-subscription
* Response: 403
* Response: 404
METHODS activity_get_repo_subscription
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE repository_subscription
RAISING cx_static_check.
* PUT - "Set a repository subscription"
* Operation id: activity/set-repo-subscription
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/repository-subscription
* Body ref: #/components/schemas/bodyactivity_set_repo_subscrip
METHODS activity_set_repo_subscription
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyactivity_set_repo_subscrip
RETURNING
VALUE(return_data) TYPE repository_subscription
RAISING cx_static_check.
* DELETE - "Delete a repository subscription"
* Operation id: activity/delete-repo-subscription
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactivity_delete_repo_subsc
METHODS activity_delete_repo_subscript
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyactivity_delete_repo_subsc
RAISING cx_static_check.
* GET - "List repository tags"
* Operation id: repos/list-tags
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_tags
METHODS repos_list_tags
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_tags
RAISING cx_static_check.
* GET - "Download a repository archive (tar)"
* Operation id: repos/download-tarball-archive
* Parameter: ref, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 302
METHODS repos_download_tarball_archive
IMPORTING
ref TYPE string
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* GET - "List repository teams"
* Operation id: repos/list-teams
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_teams
METHODS repos_list_teams
IMPORTING
owner TYPE string
repo TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_teams
RAISING cx_static_check.
* GET - "Get all repository topics"
* Operation id: repos/get-all-topics
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/topic
* Response: 404
METHODS repos_get_all_topics
IMPORTING
owner TYPE string
repo TYPE string
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE topic
RAISING cx_static_check.
* PUT - "Replace all repository topics"
* Operation id: repos/replace-all-topics
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/topic
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_replace_all_topics
METHODS repos_replace_all_topics
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_replace_all_topics
RETURNING
VALUE(return_data) TYPE topic
RAISING cx_static_check.
* GET - "Get repository clones"
* Operation id: repos/get-clones
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per, optional, query
* Response: 200
* application/json, #/components/schemas/clone-traffic
* Response: 403
METHODS repos_get_clones
IMPORTING
owner TYPE string
repo TYPE string
per TYPE string DEFAULT 'day'
RETURNING
VALUE(return_data) TYPE clone_traffic
RAISING cx_static_check.
* GET - "Get top referral paths"
* Operation id: repos/get-top-paths
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_top_paths
* Response: 403
METHODS repos_get_top_paths
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_top_paths
RAISING cx_static_check.
* GET - "Get top referral sources"
* Operation id: repos/get-top-referrers
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 200
* application/json, #/components/schemas/response_repos_get_top_referrers
* Response: 403
METHODS repos_get_top_referrers
IMPORTING
owner TYPE string
repo TYPE string
RETURNING
VALUE(return_data) TYPE response_repos_get_top_referre
RAISING cx_static_check.
* GET - "Get page views"
* Operation id: repos/get-views
* Parameter: owner, required, path
* Parameter: repo, required, path
* Parameter: per, optional, query
* Response: 200
* application/json, #/components/schemas/view-traffic
* Response: 403
METHODS repos_get_views
IMPORTING
owner TYPE string
repo TYPE string
per TYPE string DEFAULT 'day'
RETURNING
VALUE(return_data) TYPE view_traffic
RAISING cx_static_check.
* POST - "Transfer a repository"
* Operation id: repos/transfer
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 202
* application/json, #/components/schemas/minimal-repository
* Body ref: #/components/schemas/bodyrepos_transfer
METHODS repos_transfer
IMPORTING
owner TYPE string
repo TYPE string
body TYPE bodyrepos_transfer
RAISING cx_static_check.
* GET - "Check if vulnerability alerts are enabled for a repository"
* Operation id: repos/check-vulnerability-alerts
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 404
METHODS repos_check_vulnerability_aler
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* PUT - "Enable vulnerability alerts"
* Operation id: repos/enable-vulnerability-alerts
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
METHODS repos_enable_vulnerability_ale
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* DELETE - "Disable vulnerability alerts"
* Operation id: repos/disable-vulnerability-alerts
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
METHODS repos_disable_vulnerability_al
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* GET - "Download a repository archive (zip)"
* Operation id: repos/download-zipball-archive
* Parameter: ref, required, path
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 302
METHODS repos_download_zipball_archive
IMPORTING
ref TYPE string
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* POST - "Create a repository using a template"
* Operation id: repos/create-using-template
* Parameter: template_owner, required, path
* Parameter: template_repo, required, path
* Response: 201
* application/json, #/components/schemas/repository
* Body ref: #/components/schemas/bodyrepos_create_using_templat
METHODS repos_create_using_template
IMPORTING
template_owner TYPE string
template_repo TYPE string
body TYPE bodyrepos_create_using_templat
RETURNING
VALUE(return_data) TYPE repository
RAISING cx_static_check.
* GET - "List public repositories"
* Operation id: repos/list-public
* Parameter: since, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_public
* Response: 304
* Response: 422
METHODS repos_list_public
IMPORTING
since TYPE i OPTIONAL
RETURNING
VALUE(return_data) TYPE response_repos_list_public
RAISING cx_static_check.
* GET - "List environment secrets"
* Operation id: actions/list-environment-secrets
* Parameter: repository_id, required, path
* Parameter: environment_name, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_actions_list_environment_secre
METHODS actions_list_environment_secre
IMPORTING
repository_id TYPE i
environment_name TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_actions_list_environm
RAISING cx_static_check.
* GET - "Get an environment public key"
* Operation id: actions/get-environment-public-key
* Parameter: repository_id, required, path
* Parameter: environment_name, required, path
* Response: 200
* application/json, #/components/schemas/actions-public-key
METHODS actions_get_environment_public
IMPORTING
repository_id TYPE i
environment_name TYPE string
RETURNING
VALUE(return_data) TYPE actions_public_key
RAISING cx_static_check.
* GET - "Get an environment secret"
* Operation id: actions/get-environment-secret
* Parameter: repository_id, required, path
* Parameter: environment_name, required, path
* Parameter: secret_name, required, path
* Response: 200
* application/json, #/components/schemas/actions-secret
METHODS actions_get_environment_secret
IMPORTING
repository_id TYPE i
environment_name TYPE string
secret_name TYPE string
RETURNING
VALUE(return_data) TYPE actions_secret
RAISING cx_static_check.
* PUT - "Create or update an environment secret"
* Operation id: actions/create-or-update-environment-secret
* Parameter: repository_id, required, path
* Parameter: environment_name, required, path
* Parameter: secret_name, required, path
* Response: 201
* application/json, #/components/schemas/empty-object
* Response: 204
* Body ref: #/components/schemas/bodyactions_create_or_update_e
METHODS actions_create_or_update_envir
IMPORTING
repository_id TYPE i
environment_name TYPE string
secret_name TYPE string
body TYPE bodyactions_create_or_update_e
RETURNING
VALUE(return_data) TYPE empty_object
RAISING cx_static_check.
* DELETE - "Delete an environment secret"
* Operation id: actions/delete-environment-secret
* Parameter: repository_id, required, path
* Parameter: environment_name, required, path
* Parameter: secret_name, required, path
* Response: 204
* Body ref: #/components/schemas/bodyactions_delete_environment
METHODS actions_delete_environment_sec
IMPORTING
repository_id TYPE i
environment_name TYPE string
secret_name TYPE string
body TYPE bodyactions_delete_environment
RAISING cx_static_check.
* GET - "List provisioned SCIM groups for an enterprise"
* Operation id: enterprise-admin/list-provisioned-groups-enterprise
* Parameter: filter, optional, query
* Parameter: excludedAttributes, optional, query
* Parameter: enterprise, required, path
* Parameter: startIndex, optional, query
* Parameter: count, optional, query
* Response: 200
* application/json, #/components/schemas/scim-group-list-enterprise
METHODS enterprise_admin_list_provisio
IMPORTING
filter TYPE string OPTIONAL
excludedattributes TYPE string OPTIONAL
enterprise TYPE string
startindex TYPE i OPTIONAL
count TYPE i OPTIONAL
RETURNING
VALUE(return_data) TYPE scim_group_list_enterprise
RAISING cx_static_check.
* POST - "Provision a SCIM enterprise group and invite users"
* Operation id: enterprise-admin/provision-and-invite-enterprise-group
* Parameter: enterprise, required, path
* Response: 201
* application/json, #/components/schemas/scim-enterprise-group
* Body ref: #/components/schemas/bodyenterprise_admin_provision
METHODS enterprise_admin_provision_and
IMPORTING
enterprise TYPE string
body TYPE bodyenterprise_admin_provision
RETURNING
VALUE(return_data) TYPE scim_enterprise_group
RAISING cx_static_check.
* GET - "Get SCIM provisioning information for an enterprise group"
* Operation id: enterprise-admin/get-provisioning-information-for-enterprise-group
* Parameter: excludedAttributes, optional, query
* Parameter: enterprise, required, path
* Parameter: scim_group_id, required, path
* Response: 200
* application/json, #/components/schemas/scim-enterprise-group
METHODS enterprise_admin_get_provision
IMPORTING
excludedattributes TYPE string OPTIONAL
enterprise TYPE string
scim_group_id TYPE string
RETURNING
VALUE(return_data) TYPE scim_enterprise_group
RAISING cx_static_check.
* PUT - "Set SCIM information for a provisioned enterprise group"
* Operation id: enterprise-admin/set-information-for-provisioned-enterprise-group
* Parameter: enterprise, required, path
* Parameter: scim_group_id, required, path
* Response: 200
* application/json, #/components/schemas/scim-enterprise-group
* Body ref: #/components/schemas/bodyenterprise_admin_set_infor
METHODS enterprise_admin_set_informati
IMPORTING
enterprise TYPE string
scim_group_id TYPE string
body TYPE bodyenterprise_admin_set_infor
RETURNING
VALUE(return_data) TYPE scim_enterprise_group
RAISING cx_static_check.
* PATCH - "Update an attribute for a SCIM enterprise group"
* Operation id: enterprise-admin/update-attribute-for-enterprise-group
* Parameter: enterprise, required, path
* Parameter: scim_group_id, required, path
* Response: 200
* application/json, #/components/schemas/scim-enterprise-group
* Body ref: #/components/schemas/bodyenterprise_admin_update_at
METHODS enterprise_admin_update_attrib
IMPORTING
enterprise TYPE string
scim_group_id TYPE string
body TYPE bodyenterprise_admin_update_at
RETURNING
VALUE(return_data) TYPE scim_enterprise_group
RAISING cx_static_check.
* DELETE - "Delete a SCIM group from an enterprise"
* Operation id: enterprise-admin/delete-scim-group-from-enterprise
* Parameter: enterprise, required, path
* Parameter: scim_group_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyenterprise_admin_delete_sc
METHODS enterprise_admin_delete_scim_g
IMPORTING
enterprise TYPE string
scim_group_id TYPE string
body TYPE bodyenterprise_admin_delete_sc
RAISING cx_static_check.
* GET - "List SCIM provisioned identities for an enterprise"
* Operation id: enterprise-admin/list-provisioned-identities-enterprise
* Parameter: filter, optional, query
* Parameter: enterprise, required, path
* Parameter: startIndex, optional, query
* Parameter: count, optional, query
* Response: 200
* application/json, #/components/schemas/scim-user-list-enterprise
METHODS enterprise_admin_list_provis01
IMPORTING
filter TYPE string OPTIONAL
enterprise TYPE string
startindex TYPE i OPTIONAL
count TYPE i OPTIONAL
RETURNING
VALUE(return_data) TYPE scim_user_list_enterprise
RAISING cx_static_check.
* POST - "Provision and invite a SCIM enterprise user"
* Operation id: enterprise-admin/provision-and-invite-enterprise-user
* Parameter: enterprise, required, path
* Response: 201
* application/json, #/components/schemas/scim-enterprise-user
* Body ref: #/components/schemas/bodyenterprise_admin_provisi01
METHODS enterprise_admin_provision_a01
IMPORTING
enterprise TYPE string
body TYPE bodyenterprise_admin_provisi01
RETURNING
VALUE(return_data) TYPE scim_enterprise_user
RAISING cx_static_check.
* GET - "Get SCIM provisioning information for an enterprise user"
* Operation id: enterprise-admin/get-provisioning-information-for-enterprise-user
* Parameter: enterprise, required, path
* Parameter: scim_user_id, required, path
* Response: 200
* application/json, #/components/schemas/scim-enterprise-user
METHODS enterprise_admin_get_provisi01
IMPORTING
enterprise TYPE string
scim_user_id TYPE string
RETURNING
VALUE(return_data) TYPE scim_enterprise_user
RAISING cx_static_check.
* PUT - "Set SCIM information for a provisioned enterprise user"
* Operation id: enterprise-admin/set-information-for-provisioned-enterprise-user
* Parameter: enterprise, required, path
* Parameter: scim_user_id, required, path
* Response: 200
* application/json, #/components/schemas/scim-enterprise-user
* Body ref: #/components/schemas/bodyenterprise_admin_set_inf01
METHODS enterprise_admin_set_informa01
IMPORTING
enterprise TYPE string
scim_user_id TYPE string
body TYPE bodyenterprise_admin_set_inf01
RETURNING
VALUE(return_data) TYPE scim_enterprise_user
RAISING cx_static_check.
* PATCH - "Update an attribute for a SCIM enterprise user"
* Operation id: enterprise-admin/update-attribute-for-enterprise-user
* Parameter: enterprise, required, path
* Parameter: scim_user_id, required, path
* Response: 200
* application/json, #/components/schemas/scim-enterprise-user
* Body ref: #/components/schemas/bodyenterprise_admin_update_01
METHODS enterprise_admin_update_attr01
IMPORTING
enterprise TYPE string
scim_user_id TYPE string
body TYPE bodyenterprise_admin_update_01
RETURNING
VALUE(return_data) TYPE scim_enterprise_user
RAISING cx_static_check.
* DELETE - "Delete a SCIM user from an enterprise"
* Operation id: enterprise-admin/delete-user-from-enterprise
* Parameter: enterprise, required, path
* Parameter: scim_user_id, required, path
* Response: 204
* Body ref: #/components/schemas/bodyenterprise_admin_delete_us
METHODS enterprise_admin_delete_user_f
IMPORTING
enterprise TYPE string
scim_user_id TYPE string
body TYPE bodyenterprise_admin_delete_us
RAISING cx_static_check.
* GET - "List SCIM provisioned identities"
* Operation id: scim/list-provisioned-identities
* Parameter: startIndex, optional, query
* Parameter: count, optional, query
* Parameter: filter, optional, query
* Parameter: org, required, path
* Response: 200
* application/scim+json, #/components/schemas/scim-user-list
* Response: 304
* Response: 400
* Response: 403
* Response: 404
METHODS scim_list_provisioned_identiti
IMPORTING
startindex TYPE i OPTIONAL
count TYPE i OPTIONAL
filter TYPE string OPTIONAL
org TYPE string
RAISING cx_static_check.
* POST - "Provision and invite a SCIM user"
* Operation id: scim/provision-and-invite-user
* Parameter: org, required, path
* Response: 201
* application/scim+json, #/components/schemas/scim-user
* Response: 304
* Response: 400
* Response: 403
* Response: 404
* Response: 409
* Response: 500
* Body ref: #/components/schemas/bodyscim_provision_and_invite_
METHODS scim_provision_and_invite_user
IMPORTING
org TYPE string
body TYPE bodyscim_provision_and_invite_
RAISING cx_static_check.
* GET - "Get SCIM provisioning information for a user"
* Operation id: scim/get-provisioning-information-for-user
* Parameter: org, required, path
* Parameter: scim_user_id, required, path
* Response: 200
* application/scim+json, #/components/schemas/scim-user
* Response: 304
* Response: 403
* Response: 404
METHODS scim_get_provisioning_informat
IMPORTING
org TYPE string
scim_user_id TYPE string
RAISING cx_static_check.
* PUT - "Update a provisioned organization membership"
* Operation id: scim/set-information-for-provisioned-user
* Parameter: org, required, path
* Parameter: scim_user_id, required, path
* Response: 200
* application/scim+json, #/components/schemas/scim-user
* Response: 304
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodyscim_set_information_for_p
METHODS scim_set_information_for_provi
IMPORTING
org TYPE string
scim_user_id TYPE string
body TYPE bodyscim_set_information_for_p
RAISING cx_static_check.
* PATCH - "Update an attribute for a SCIM user"
* Operation id: scim/update-attribute-for-user
* Parameter: org, required, path
* Parameter: scim_user_id, required, path
* Response: 200
* application/scim+json, #/components/schemas/scim-user
* Response: 304
* Response: 400
* Response: 403
* Response: 404
* Response: 429
* application/json, #/components/schemas/basic-error
* Body ref: #/components/schemas/bodyscim_update_attribute_for_
METHODS scim_update_attribute_for_user
IMPORTING
org TYPE string
scim_user_id TYPE string
body TYPE bodyscim_update_attribute_for_
RAISING cx_static_check.
* DELETE - "Delete a SCIM user from an organization"
* Operation id: scim/delete-user-from-org
* Parameter: org, required, path
* Parameter: scim_user_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodyscim_delete_user_from_org
METHODS scim_delete_user_from_org
IMPORTING
org TYPE string
scim_user_id TYPE string
body TYPE bodyscim_delete_user_from_org
RAISING cx_static_check.
* GET - "Search code"
* Operation id: search/code
* Parameter: q, required, query
* Parameter: sort, optional, query
* Parameter: order, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_search_code
* Response: 304
* Response: 403
* Response: 422
* Response: 503
METHODS search_code
IMPORTING
q TYPE string
sort TYPE string OPTIONAL
order TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_search_code
RAISING cx_static_check.
* GET - "Search commits"
* Operation id: search/commits
* Parameter: q, required, query
* Parameter: sort, optional, query
* Parameter: order, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_search_commits
* Response: 304
METHODS search_commits
IMPORTING
q TYPE string
sort TYPE string OPTIONAL
order TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_search_commits
RAISING cx_static_check.
* GET - "Search issues and pull requests"
* Operation id: search/issues-and-pull-requests
* Parameter: q, required, query
* Parameter: sort, optional, query
* Parameter: order, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_search_issues_and_pull_request
* Response: 304
* Response: 403
* Response: 422
* Response: 503
METHODS search_issues_and_pull_request
IMPORTING
q TYPE string
sort TYPE string OPTIONAL
order TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_search_issues_and_pul
RAISING cx_static_check.
* GET - "Search labels"
* Operation id: search/labels
* Parameter: repository_id, required, query
* Parameter: q, required, query
* Parameter: sort, optional, query
* Parameter: order, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_search_labels
* Response: 304
* Response: 403
* Response: 404
* Response: 422
METHODS search_labels
IMPORTING
repository_id TYPE i
q TYPE string
sort TYPE string OPTIONAL
order TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_search_labels
RAISING cx_static_check.
* GET - "Search repositories"
* Operation id: search/repos
* Parameter: q, required, query
* Parameter: sort, optional, query
* Parameter: order, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_search_repos
* Response: 304
* Response: 422
* Response: 503
METHODS search_repos
IMPORTING
q TYPE string
sort TYPE string OPTIONAL
order TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_search_repos
RAISING cx_static_check.
* GET - "Search topics"
* Operation id: search/topics
* Parameter: q, required, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_search_topics
* Response: 304
METHODS search_topics
IMPORTING
q TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_search_topics
RAISING cx_static_check.
* GET - "Search users"
* Operation id: search/users
* Parameter: q, required, query
* Parameter: sort, optional, query
* Parameter: order, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_search_users
* Response: 304
* Response: 422
* Response: 503
METHODS search_users
IMPORTING
q TYPE string
sort TYPE string OPTIONAL
order TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_search_users
RAISING cx_static_check.
* GET - "Get the authenticated user"
* Operation id: users/get-authenticated
* Response: 200
* application/json, string
* Response: 304
* Response: 401
* Response: 403
METHODS users_get_authenticated
RAISING cx_static_check.
* PATCH - "Update the authenticated user"
* Operation id: users/update-authenticated
* Response: 200
* application/json, #/components/schemas/private-user
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyusers_update_authenticated
METHODS users_update_authenticated
IMPORTING
body TYPE bodyusers_update_authenticated
RETURNING
VALUE(return_data) TYPE private_user
RAISING cx_static_check.
* GET - "List users blocked by the authenticated user"
* Operation id: users/list-blocked-by-authenticated-user
* Response: 200
* application/json, #/components/schemas/response_users_list_blocked_by_authenti
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 415
METHODS users_list_blocked_by_authenti
RETURNING
VALUE(return_data) TYPE response_users_list_blocked_by
RAISING cx_static_check.
* GET - "Check if a user is blocked by the authenticated user"
* Operation id: users/check-blocked
* Parameter: username, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* application/json, #/components/schemas/basic-error
METHODS users_check_blocked
IMPORTING
username TYPE string
RAISING cx_static_check.
* PUT - "Block a user"
* Operation id: users/block
* Parameter: username, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
METHODS users_block
IMPORTING
username TYPE string
RAISING cx_static_check.
* DELETE - "Unblock a user"
* Operation id: users/unblock
* Parameter: username, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_unblock
IMPORTING
username TYPE string
RAISING cx_static_check.
* GET - "List codespaces for the authenticated user"
* Operation id: codespaces/list-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Parameter: repository_id, optional, query
* Response: 200
* application/json, #/components/schemas/response_codespaces_list_for_authentica
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 500
METHODS codespaces_list_for_authentica
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
repository_id TYPE i OPTIONAL
RETURNING
VALUE(return_data) TYPE response_codespaces_list_for_a
RAISING cx_static_check.
* POST - "Create a codespace for the authenticated user"
* Operation id: codespaces/create-for-authenticated-user
* Response: 201
* application/json, #/components/schemas/codespace
* Response: 202
* application/json, #/components/schemas/codespace
* Response: 401
* Response: 403
* Response: 404
* Body schema: string
METHODS codespaces_create_for_authenti
IMPORTING
body TYPE string
RETURNING
VALUE(return_data) TYPE codespace
RAISING cx_static_check.
* GET - "List secrets for the authenticated user"
* Operation id: codespaces/list-secrets-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_codespaces_list_secrets_for_au
METHODS codespaces_list_secrets_for_au
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_codespaces_list_secre
RAISING cx_static_check.
* GET - "Get public key for the authenticated user"
* Operation id: codespaces/get-public-key-for-authenticated-user
* Response: 200
* application/json, #/components/schemas/codespaces-user-public-key
METHODS codespaces_get_public_key_for_
RETURNING
VALUE(return_data) TYPE codespaces_user_public_key
RAISING cx_static_check.
* GET - "Get a secret for the authenticated user"
* Operation id: codespaces/get-secret-for-authenticated-user
* Parameter: secret_name, required, path
* Response: 200
* application/json, #/components/schemas/codespaces-secret
METHODS codespaces_get_secret_for_auth
IMPORTING
secret_name TYPE string
RETURNING
VALUE(return_data) TYPE codespaces_secret
RAISING cx_static_check.
* PUT - "Create or update a secret for the authenticated user"
* Operation id: codespaces/create-or-update-secret-for-authenticated-user
* Parameter: secret_name, required, path
* Response: 201
* application/json, #/components/schemas/response_codespaces_create_or_update_se
* Response: 204
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodycodespaces_create_or_updat
METHODS codespaces_create_or_update_se
IMPORTING
secret_name TYPE string
body TYPE bodycodespaces_create_or_updat
RETURNING
VALUE(return_data) TYPE response_codespaces_create_or_
RAISING cx_static_check.
* DELETE - "Delete a secret for the authenticated user"
* Operation id: codespaces/delete-secret-for-authenticated-user
* Parameter: secret_name, required, path
* Response: 204
* Body ref: #/components/schemas/bodycodespaces_delete_secret_f
METHODS codespaces_delete_secret_for_a
IMPORTING
secret_name TYPE string
body TYPE bodycodespaces_delete_secret_f
RAISING cx_static_check.
* GET - "List selected repositories for a user secret"
* Operation id: codespaces/list-repositories-for-secret-for-authenticated-user
* Parameter: secret_name, required, path
* Response: 200
* application/json, #/components/schemas/response_codespaces_list_repositories_f
* Response: 401
* Response: 403
* Response: 404
* Response: 500
METHODS codespaces_list_repositories_f
IMPORTING
secret_name TYPE string
RETURNING
VALUE(return_data) TYPE response_codespaces_list_repos
RAISING cx_static_check.
* PUT - "Set selected repositories for a user secret"
* Operation id: codespaces/set-repositories-for-secret-for-authenticated-user
* Parameter: secret_name, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
* Response: 500
* Body ref: #/components/schemas/bodycodespaces_set_repositorie
METHODS codespaces_set_repositories_fo
IMPORTING
secret_name TYPE string
body TYPE bodycodespaces_set_repositorie
RAISING cx_static_check.
* PUT - "Add a selected repository to a user secret"
* Operation id: codespaces/add-repository-for-secret-for-authenticated-user
* Parameter: repository_id, required, path
* Parameter: secret_name, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
* Response: 500
METHODS codespaces_add_repository_for_
IMPORTING
repository_id TYPE i
secret_name TYPE string
RAISING cx_static_check.
* DELETE - "Remove a selected repository from a user secret"
* Operation id: codespaces/remove-repository-for-secret-for-authenticated-user
* Parameter: repository_id, required, path
* Parameter: secret_name, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
* Response: 500
METHODS codespaces_remove_repository_f
IMPORTING
repository_id TYPE i
secret_name TYPE string
RAISING cx_static_check.
* GET - "Get a codespace for the authenticated user"
* Operation id: codespaces/get-for-authenticated-user
* Parameter: codespace_name, required, path
* Response: 200
* application/json, #/components/schemas/codespace
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 500
METHODS codespaces_get_for_authenticat
IMPORTING
codespace_name TYPE string
RETURNING
VALUE(return_data) TYPE codespace
RAISING cx_static_check.
* PATCH - "Update a codespace for the authenticated user"
* Operation id: codespaces/update-for-authenticated-user
* Parameter: codespace_name, required, path
* Response: 200
* application/json, #/components/schemas/codespace
* Response: 401
* Response: 403
* Response: 404
* Body ref: #/components/schemas/bodycodespaces_update_for_auth
METHODS codespaces_update_for_authenti
IMPORTING
codespace_name TYPE string
body TYPE bodycodespaces_update_for_auth
RETURNING
VALUE(return_data) TYPE codespace
RAISING cx_static_check.
* DELETE - "Delete a codespace for the authenticated user"
* Operation id: codespaces/delete-for-authenticated-user
* Parameter: codespace_name, required, path
* Response: 202
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 500
* Body ref: #/components/schemas/bodycodespaces_delete_for_auth
METHODS codespaces_delete_for_authenti
IMPORTING
codespace_name TYPE string
body TYPE bodycodespaces_delete_for_auth
RAISING cx_static_check.
* POST - "Export a codespace for the authenticated user"
* Operation id: codespaces/export-for-authenticated-user
* Parameter: codespace_name, required, path
* Response: 202
* application/json, #/components/schemas/codespace-export-details
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Response: 500
METHODS codespaces_export_for_authenti
IMPORTING
codespace_name TYPE string
RAISING cx_static_check.
* GET - "Get details about a codespace export"
* Operation id: codespaces/get-export-details-for-authenticated-user
* Parameter: codespace_name, required, path
* Parameter: export_id, required, path
* Response: 200
* application/json, #/components/schemas/codespace-export-details
* Response: 404
METHODS codespaces_get_export_details_
IMPORTING
codespace_name TYPE string
export_id TYPE string
RETURNING
VALUE(return_data) TYPE codespace_export_details
RAISING cx_static_check.
* GET - "List machine types for a codespace"
* Operation id: codespaces/codespace-machines-for-authenticated-user
* Parameter: codespace_name, required, path
* Response: 200
* application/json, #/components/schemas/response_codespaces_codespace_machines_
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 500
METHODS codespaces_codespace_machines_
IMPORTING
codespace_name TYPE string
RETURNING
VALUE(return_data) TYPE response_codespaces_codespace_
RAISING cx_static_check.
* POST - "Start a codespace for the authenticated user"
* Operation id: codespaces/start-for-authenticated-user
* Parameter: codespace_name, required, path
* Response: 200
* application/json, #/components/schemas/codespace
* Response: 304
* Response: 400
* Response: 401
* Response: 402
* application/json, #/components/schemas/basic-error
* Response: 403
* Response: 404
* Response: 409
* Response: 500
METHODS codespaces_start_for_authentic
IMPORTING
codespace_name TYPE string
RETURNING
VALUE(return_data) TYPE codespace
RAISING cx_static_check.
* POST - "Stop a codespace for the authenticated user"
* Operation id: codespaces/stop-for-authenticated-user
* Parameter: codespace_name, required, path
* Response: 200
* application/json, #/components/schemas/codespace
* Response: 401
* Response: 403
* Response: 404
* Response: 500
METHODS codespaces_stop_for_authentica
IMPORTING
codespace_name TYPE string
RETURNING
VALUE(return_data) TYPE codespace
RAISING cx_static_check.
* PATCH - "Set primary email visibility for the authenticated user"
* Operation id: users/set-primary-email-visibility-for-authenticated-user
* Response: 200
* application/json, #/components/schemas/response_users_set_primary_email_visibi
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyusers_set_primary_email_vi
METHODS users_set_primary_email_visibi
IMPORTING
body TYPE bodyusers_set_primary_email_vi
RETURNING
VALUE(return_data) TYPE response_users_set_primary_ema
RAISING cx_static_check.
* GET - "List email addresses for the authenticated user"
* Operation id: users/list-emails-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_emails_for_authenti
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_list_emails_for_authenti
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_emails_for
RAISING cx_static_check.
* POST - "Add an email address for the authenticated user"
* Operation id: users/add-email-for-authenticated-user
* Response: 201
* application/json, #/components/schemas/response_users_add_email_for_authentica
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body schema: string
METHODS users_add_email_for_authentica
IMPORTING
body TYPE string
RETURNING
VALUE(return_data) TYPE response_users_add_email_for_a
RAISING cx_static_check.
* DELETE - "Delete an email address for the authenticated user"
* Operation id: users/delete-email-for-authenticated-user
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body schema: string
METHODS users_delete_email_for_authent
IMPORTING
body TYPE string
RAISING cx_static_check.
* GET - "List followers of the authenticated user"
* Operation id: users/list-followers-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_followers_for_authe
* Response: 304
* Response: 401
* Response: 403
METHODS users_list_followers_for_authe
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_followers_
RAISING cx_static_check.
* GET - "List the people the authenticated user follows"
* Operation id: users/list-followed-by-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_followed_by_authent
* Response: 304
* Response: 401
* Response: 403
METHODS users_list_followed_by_authent
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_followed_b
RAISING cx_static_check.
* GET - "Check if a person is followed by the authenticated user"
* Operation id: users/check-person-is-followed-by-authenticated
* Parameter: username, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* application/json, #/components/schemas/basic-error
METHODS users_check_person_is_followed
IMPORTING
username TYPE string
RAISING cx_static_check.
* PUT - "Follow a user"
* Operation id: users/follow
* Parameter: username, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_follow
IMPORTING
username TYPE string
RAISING cx_static_check.
* DELETE - "Unfollow a user"
* Operation id: users/unfollow
* Parameter: username, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_unfollow
IMPORTING
username TYPE string
RAISING cx_static_check.
* GET - "List GPG keys for the authenticated user"
* Operation id: users/list-gpg-keys-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_gpg_keys_for_authen
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_list_gpg_keys_for_authen
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_gpg_keys_f
RAISING cx_static_check.
* POST - "Create a GPG key for the authenticated user"
* Operation id: users/create-gpg-key-for-authenticated-user
* Response: 201
* application/json, #/components/schemas/gpg-key
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyusers_create_gpg_key_for_a
METHODS users_create_gpg_key_for_authe
IMPORTING
body TYPE bodyusers_create_gpg_key_for_a
RETURNING
VALUE(return_data) TYPE gpg_key
RAISING cx_static_check.
* GET - "Get a GPG key for the authenticated user"
* Operation id: users/get-gpg-key-for-authenticated-user
* Parameter: gpg_key_id, required, path
* Response: 200
* application/json, #/components/schemas/gpg-key
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_get_gpg_key_for_authenti
IMPORTING
gpg_key_id TYPE i
RETURNING
VALUE(return_data) TYPE gpg_key
RAISING cx_static_check.
* DELETE - "Delete a GPG key for the authenticated user"
* Operation id: users/delete-gpg-key-for-authenticated-user
* Parameter: gpg_key_id, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
METHODS users_delete_gpg_key_for_authe
IMPORTING
gpg_key_id TYPE i
RAISING cx_static_check.
* GET - "List app installations accessible to the user access token"
* Operation id: apps/list-installations-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_installations_for_au
* Response: 304
* Response: 401
* Response: 403
* Response: 415
METHODS apps_list_installations_for_au
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_apps_list_installat01
RAISING cx_static_check.
* GET - "List repositories accessible to the user access token"
* Operation id: apps/list-installation-repos-for-authenticated-user
* Parameter: installation_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_installation_repos_f
* Response: 304
* Response: 403
* Response: 404
METHODS apps_list_installation_repos_f
IMPORTING
installation_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_apps_list_installat02
RAISING cx_static_check.
* PUT - "Add a repository to an app installation"
* Operation id: apps/add-repo-to-installation-for-authenticated-user
* Parameter: installation_id, required, path
* Parameter: repository_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
METHODS apps_add_repo_to_installation_
IMPORTING
installation_id TYPE i
repository_id TYPE i
RAISING cx_static_check.
* DELETE - "Remove a repository from an app installation"
* Operation id: apps/remove-repo-from-installation-for-authenticated-user
* Parameter: installation_id, required, path
* Parameter: repository_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
METHODS apps_remove_repo_from_installa
IMPORTING
installation_id TYPE i
repository_id TYPE i
RAISING cx_static_check.
* GET - "Get interaction restrictions for your public repositories"
* Operation id: interactions/get-restrictions-for-authenticated-user
* Response: 200
* application/json, string
* Response: 204
METHODS interactions_get_restriction02
RAISING cx_static_check.
* PUT - "Set interaction restrictions for your public repositories"
* Operation id: interactions/set-restrictions-for-authenticated-user
* Response: 200
* application/json, #/components/schemas/interaction-limit-response
* Response: 422
* Body ref: #/components/schemas/interaction-limit
METHODS interactions_set_restriction02
IMPORTING
body TYPE interaction_limit
RETURNING
VALUE(return_data) TYPE interaction_limit_response
RAISING cx_static_check.
* DELETE - "Remove interaction restrictions from your public repositories"
* Operation id: interactions/remove-restrictions-for-authenticated-user
* Response: 204
METHODS interactions_remove_restrict02
RAISING cx_static_check.
* GET - "List user account issues assigned to the authenticated user"
* Operation id: issues/list-for-authenticated-user
* Parameter: filter, optional, query
* Parameter: state, optional, query
* Parameter: sort, optional, query
* Parameter: labels, optional, query
* Parameter: direction, optional, query
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_issues_list_for_authenticated_
* Response: 304
* Response: 404
METHODS issues_list_for_authenticated_
IMPORTING
filter TYPE string DEFAULT 'assigned'
state TYPE string DEFAULT 'open'
sort TYPE string DEFAULT 'created'
labels TYPE string OPTIONAL
direction TYPE string DEFAULT 'desc'
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_issues_list_for_authe
RAISING cx_static_check.
* GET - "List public SSH keys for the authenticated user"
* Operation id: users/list-public-ssh-keys-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_public_ssh_keys_for
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_list_public_ssh_keys_for
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_public_ssh
RAISING cx_static_check.
* POST - "Create a public SSH key for the authenticated user"
* Operation id: users/create-public-ssh-key-for-authenticated-user
* Response: 201
* application/json, #/components/schemas/key
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyusers_create_public_ssh_ke
METHODS users_create_public_ssh_key_fo
IMPORTING
body TYPE bodyusers_create_public_ssh_ke
RETURNING
VALUE(return_data) TYPE key
RAISING cx_static_check.
* GET - "Get a public SSH key for the authenticated user"
* Operation id: users/get-public-ssh-key-for-authenticated-user
* Parameter: key_id, required, path
* Response: 200
* application/json, #/components/schemas/key
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_get_public_ssh_key_for_a
IMPORTING
key_id TYPE i
RETURNING
VALUE(return_data) TYPE key
RAISING cx_static_check.
* DELETE - "Delete a public SSH key for the authenticated user"
* Operation id: users/delete-public-ssh-key-for-authenticated-user
* Parameter: key_id, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_delete_public_ssh_key_fo
IMPORTING
key_id TYPE i
RAISING cx_static_check.
* GET - "List subscriptions for the authenticated user"
* Operation id: apps/list-subscriptions-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_subscriptions_for_au
* Response: 304
* Response: 401
* Response: 404
METHODS apps_list_subscriptions_for_au
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_apps_list_subscriptio
RAISING cx_static_check.
* GET - "List subscriptions for the authenticated user (stubbed)"
* Operation id: apps/list-subscriptions-for-authenticated-user-stubbed
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_apps_list_subscriptions_for_01
* Response: 304
* Response: 401
METHODS apps_list_subscriptions_for_01
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_apps_list_subscript01
RAISING cx_static_check.
* GET - "List organization memberships for the authenticated user"
* Operation id: orgs/list-memberships-for-authenticated-user
* Parameter: state, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_memberships_for_auth
* Response: 304
* Response: 401
* Response: 403
* Response: 422
METHODS orgs_list_memberships_for_auth
IMPORTING
state TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_memberships
RAISING cx_static_check.
* GET - "Get an organization membership for the authenticated user"
* Operation id: orgs/get-membership-for-authenticated-user
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/org-membership
* Response: 403
* Response: 404
METHODS orgs_get_membership_for_authen
IMPORTING
org TYPE string
RETURNING
VALUE(return_data) TYPE org_membership
RAISING cx_static_check.
* PATCH - "Update an organization membership for the authenticated user"
* Operation id: orgs/update-membership-for-authenticated-user
* Parameter: org, required, path
* Response: 200
* application/json, #/components/schemas/org-membership
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyorgs_update_membership_for
METHODS orgs_update_membership_for_aut
IMPORTING
org TYPE string
body TYPE bodyorgs_update_membership_for
RETURNING
VALUE(return_data) TYPE org_membership
RAISING cx_static_check.
* GET - "List user migrations"
* Operation id: migrations/list-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_migrations_list_for_authentica
* Response: 304
* Response: 401
* Response: 403
METHODS migrations_list_for_authentica
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_migrations_list_for_a
RAISING cx_static_check.
* POST - "Start a user migration"
* Operation id: migrations/start-for-authenticated-user
* Response: 201
* application/json, #/components/schemas/migration
* Response: 304
* Response: 401
* Response: 403
* Response: 422
* Body ref: #/components/schemas/bodymigrations_start_for_authe
METHODS migrations_start_for_authentic
IMPORTING
body TYPE bodymigrations_start_for_authe
RETURNING
VALUE(return_data) TYPE migration
RAISING cx_static_check.
* GET - "Get a user migration status"
* Operation id: migrations/get-status-for-authenticated-user
* Parameter: exclude, optional, query
* Parameter: migration_id, required, path
* Response: 200
* application/json, #/components/schemas/migration
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS migrations_get_status_for_auth
IMPORTING
exclude TYPE string OPTIONAL
migration_id TYPE i
RETURNING
VALUE(return_data) TYPE migration
RAISING cx_static_check.
* GET - "Download a user migration archive"
* Operation id: migrations/get-archive-for-authenticated-user
* Parameter: migration_id, required, path
* Response: 302
* Response: 304
* Response: 401
* Response: 403
METHODS migrations_get_archive_for_aut
IMPORTING
migration_id TYPE i
RAISING cx_static_check.
* DELETE - "Delete a user migration archive"
* Operation id: migrations/delete-archive-for-authenticated-user
* Parameter: migration_id, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS migrations_delete_archive_fo01
IMPORTING
migration_id TYPE i
RAISING cx_static_check.
* DELETE - "Unlock a user repository"
* Operation id: migrations/unlock-repo-for-authenticated-user
* Parameter: migration_id, required, path
* Parameter: repo_name, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS migrations_unlock_repo_for_aut
IMPORTING
migration_id TYPE i
repo_name TYPE string
RAISING cx_static_check.
* GET - "List repositories for a user migration"
* Operation id: migrations/list-repos-for-authenticated-user
* Parameter: migration_id, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_migrations_list_repos_for_auth
* Response: 404
METHODS migrations_list_repos_for_auth
IMPORTING
migration_id TYPE i
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_migrations_list_rep01
RAISING cx_static_check.
* GET - "List organizations for the authenticated user"
* Operation id: orgs/list-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_for_authenticated_us
* Response: 304
* Response: 401
* Response: 403
METHODS orgs_list_for_authenticated_us
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_for_authent
RAISING cx_static_check.
* GET - "List packages for the authenticated user's namespace"
* Operation id: packages/list-packages-for-authenticated-user
* Parameter: package_type, required, query
* Parameter: visibility, optional, query
* Response: 200
* application/json, #/components/schemas/response_packages_list_packages_for_aut
METHODS packages_list_packages_for_aut
IMPORTING
package_type TYPE string
visibility TYPE string OPTIONAL
RETURNING
VALUE(return_data) TYPE response_packages_list_packa01
RAISING cx_static_check.
* GET - "Get a package for the authenticated user"
* Operation id: packages/get-package-for-authenticated-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Response: 200
* application/json, #/components/schemas/package
METHODS packages_get_package_for_authe
IMPORTING
package_type TYPE string
package_name TYPE string
RETURNING
VALUE(return_data) TYPE package
RAISING cx_static_check.
* DELETE - "Delete a package for the authenticated user"
* Operation id: packages/delete-package-for-authenticated-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_delete_package_for_au
IMPORTING
package_type TYPE string
package_name TYPE string
RAISING cx_static_check.
* POST - "Restore a package for the authenticated user"
* Operation id: packages/restore-package-for-authenticated-user
* Parameter: token, optional, query
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_restore_package_for_a
IMPORTING
token TYPE string OPTIONAL
package_type TYPE string
package_name TYPE string
RAISING cx_static_check.
* GET - "Get all package versions for a package owned by the authenticated user"
* Operation id: packages/get-all-package-versions-for-package-owned-by-authenticated-user
* Parameter: state, optional, query
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: page, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_packages_get_all_package_ver01
* Response: 401
* Response: 403
* Response: 404
METHODS packages_get_all_package_ver01
IMPORTING
state TYPE string DEFAULT 'active'
package_type TYPE string
package_name TYPE string
page TYPE i DEFAULT 1
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_packages_get_all_pa01
RAISING cx_static_check.
* GET - "Get a package version for the authenticated user"
* Operation id: packages/get-package-version-for-authenticated-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: package_version_id, required, path
* Response: 200
* application/json, #/components/schemas/package-version
METHODS packages_get_package_version01
IMPORTING
package_type TYPE string
package_name TYPE string
package_version_id TYPE i
RETURNING
VALUE(return_data) TYPE package_version
RAISING cx_static_check.
* DELETE - "Delete a package version for the authenticated user"
* Operation id: packages/delete-package-version-for-authenticated-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: package_version_id, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_delete_package_vers01
IMPORTING
package_type TYPE string
package_name TYPE string
package_version_id TYPE i
RAISING cx_static_check.
* POST - "Restore a package version for the authenticated user"
* Operation id: packages/restore-package-version-for-authenticated-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: package_version_id, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_restore_package_ver01
IMPORTING
package_type TYPE string
package_name TYPE string
package_version_id TYPE i
RAISING cx_static_check.
* POST - "Create a user project"
* Operation id: projects/create-for-authenticated-user
* Response: 201
* application/json, #/components/schemas/project
* Response: 304
* Response: 401
* Response: 403
* Response: 415
* Response: 422
* Body ref: #/components/schemas/bodyprojects_create_for_authen
METHODS projects_create_for_authentica
IMPORTING
body TYPE bodyprojects_create_for_authen
RETURNING
VALUE(return_data) TYPE project
RAISING cx_static_check.
* GET - "List public email addresses for the authenticated user"
* Operation id: users/list-public-emails-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_public_emails_for_a
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS users_list_public_emails_for_a
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_public_ema
RAISING cx_static_check.
* GET - "List repositories for the authenticated user"
* Operation id: repos/list-for-authenticated-user
* Parameter: visibility, optional, query
* Parameter: affiliation, optional, query
* Parameter: type, optional, query
* Parameter: sort, optional, query
* Parameter: direction, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Parameter: since, optional, query
* Parameter: before, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_for_authenticated_u
* Response: 304
* Response: 401
* Response: 403
* Response: 422
METHODS repos_list_for_authenticated_u
IMPORTING
visibility TYPE string DEFAULT 'all'
affiliation TYPE string DEFAULT 'owner,collaborator,organization_member'
type TYPE string DEFAULT 'all'
sort TYPE string DEFAULT 'full_name'
direction TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
since TYPE string OPTIONAL
before TYPE string OPTIONAL
RETURNING
VALUE(return_data) TYPE response_repos_list_for_authen
RAISING cx_static_check.
* POST - "Create a repository for the authenticated user"
* Operation id: repos/create-for-authenticated-user
* Response: 201
* application/json, #/components/schemas/repository
* Response: 304
* Response: 400
* Response: 401
* Response: 403
* Response: 404
* Response: 422
* Body ref: #/components/schemas/bodyrepos_create_for_authentic
METHODS repos_create_for_authenticated
IMPORTING
body TYPE bodyrepos_create_for_authentic
RETURNING
VALUE(return_data) TYPE repository
RAISING cx_static_check.
* GET - "List repository invitations for the authenticated user"
* Operation id: repos/list-invitations-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_invitations_for_aut
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS repos_list_invitations_for_aut
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_invitati01
RAISING cx_static_check.
* PATCH - "Accept a repository invitation"
* Operation id: repos/accept-invitation-for-authenticated-user
* Parameter: invitation_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
* Response: 409
METHODS repos_accept_invitation_for_au
IMPORTING
invitation_id TYPE i
RAISING cx_static_check.
* DELETE - "Decline a repository invitation"
* Operation id: repos/decline-invitation-for-authenticated-user
* Parameter: invitation_id, required, path
* Response: 204
* Response: 304
* Response: 403
* Response: 404
* Response: 409
METHODS repos_decline_invitation_for_a
IMPORTING
invitation_id TYPE i
RAISING cx_static_check.
* GET - "List repositories starred by the authenticated user"
* Operation id: activity/list-repos-starred-by-authenticated-user
* Parameter: sort, optional, query
* Parameter: direction, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_repos_starred_by
* application/vnd.github.v3.star+json, array
* Response: 304
* Response: 401
* Response: 403
METHODS activity_list_repos_starred_by
IMPORTING
sort TYPE string DEFAULT 'created'
direction TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_repos_s
RAISING cx_static_check.
* GET - "Check if a repository is starred by the authenticated user"
* Operation id: activity/check-repo-is-starred-by-authenticated-user
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
* application/json, #/components/schemas/basic-error
METHODS activity_check_repo_is_starred
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* PUT - "Star a repository for the authenticated user"
* Operation id: activity/star-repo-for-authenticated-user
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS activity_star_repo_for_authent
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* DELETE - "Unstar a repository for the authenticated user"
* Operation id: activity/unstar-repo-for-authenticated-user
* Parameter: owner, required, path
* Parameter: repo, required, path
* Response: 204
* Response: 304
* Response: 401
* Response: 403
* Response: 404
METHODS activity_unstar_repo_for_authe
IMPORTING
owner TYPE string
repo TYPE string
RAISING cx_static_check.
* GET - "List repositories watched by the authenticated user"
* Operation id: activity/list-watched-repos-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_watched_repos_fo
* Response: 304
* Response: 401
* Response: 403
METHODS activity_list_watched_repos_fo
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_watched
RAISING cx_static_check.
* GET - "List teams for the authenticated user"
* Operation id: teams/list-for-authenticated-user
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_teams_list_for_authenticated_u
* Response: 304
* Response: 403
* Response: 404
METHODS teams_list_for_authenticated_u
IMPORTING
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_teams_list_for_authen
RAISING cx_static_check.
* GET - "List users"
* Operation id: users/list
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list
* Response: 304
METHODS users_list
IMPORTING
since TYPE i OPTIONAL
per_page TYPE i DEFAULT 30
RETURNING
VALUE(return_data) TYPE response_users_list
RAISING cx_static_check.
* GET - "Get a user"
* Operation id: users/get-by-username
* Parameter: username, required, path
* Response: 200
* application/json, string
* Response: 404
METHODS users_get_by_username
IMPORTING
username TYPE string
RAISING cx_static_check.
* GET - "List events for the authenticated user"
* Operation id: activity/list-events-for-authenticated-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_events_for_authe
METHODS activity_list_events_for_authe
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_events_
RAISING cx_static_check.
* GET - "List organization events for the authenticated user"
* Operation id: activity/list-org-events-for-authenticated-user
* Parameter: username, required, path
* Parameter: org, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_org_events_for_a
METHODS activity_list_org_events_for_a
IMPORTING
username TYPE string
org TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_org_eve
RAISING cx_static_check.
* GET - "List public events for a user"
* Operation id: activity/list-public-events-for-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_public_events_01
METHODS activity_list_public_events_01
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_publi03
RAISING cx_static_check.
* GET - "List followers of a user"
* Operation id: users/list-followers-for-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_followers_for_user
METHODS users_list_followers_for_user
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_follower01
RAISING cx_static_check.
* GET - "List the people a user follows"
* Operation id: users/list-following-for-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_following_for_user
METHODS users_list_following_for_user
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_following_
RAISING cx_static_check.
* GET - "Check if a user follows another user"
* Operation id: users/check-following-for-user
* Parameter: target_user, required, path
* Parameter: username, required, path
* Response: 204
* Response: 404
METHODS users_check_following_for_user
IMPORTING
target_user TYPE string
username TYPE string
RAISING cx_static_check.
* GET - "List gists for a user"
* Operation id: gists/list-for-user
* Parameter: username, required, path
* Parameter: since, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_gists_list_for_user
* Response: 422
METHODS gists_list_for_user
IMPORTING
username TYPE string
since TYPE string OPTIONAL
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_gists_list_for_user
RAISING cx_static_check.
* GET - "List GPG keys for a user"
* Operation id: users/list-gpg-keys-for-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_gpg_keys_for_user
METHODS users_list_gpg_keys_for_user
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_gpg_keys01
RAISING cx_static_check.
* GET - "Get contextual information for a user"
* Operation id: users/get-context-for-user
* Parameter: subject_type, optional, query
* Parameter: subject_id, optional, query
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/hovercard
* Response: 404
* Response: 422
METHODS users_get_context_for_user
IMPORTING
subject_type TYPE string OPTIONAL
subject_id TYPE string OPTIONAL
username TYPE string
RETURNING
VALUE(return_data) TYPE hovercard
RAISING cx_static_check.
* GET - "Get a user installation for the authenticated app"
* Operation id: apps/get-user-installation
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/installation
METHODS apps_get_user_installation
IMPORTING
username TYPE string
RETURNING
VALUE(return_data) TYPE installation
RAISING cx_static_check.
* GET - "List public keys for a user"
* Operation id: users/list-public-keys-for-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_users_list_public_keys_for_use
METHODS users_list_public_keys_for_use
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_users_list_public_key
RAISING cx_static_check.
* GET - "List organizations for a user"
* Operation id: orgs/list-for-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_orgs_list_for_user
METHODS orgs_list_for_user
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_orgs_list_for_user
RAISING cx_static_check.
* GET - "List packages for a user"
* Operation id: packages/list-packages-for-user
* Parameter: package_type, required, query
* Parameter: visibility, optional, query
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/response_packages_list_packages_for_use
* Response: 401
* Response: 403
METHODS packages_list_packages_for_use
IMPORTING
package_type TYPE string
visibility TYPE string OPTIONAL
username TYPE string
RETURNING
VALUE(return_data) TYPE response_packages_list_packa02
RAISING cx_static_check.
* GET - "Get a package for a user"
* Operation id: packages/get-package-for-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/package
METHODS packages_get_package_for_user
IMPORTING
package_type TYPE string
package_name TYPE string
username TYPE string
RETURNING
VALUE(return_data) TYPE package
RAISING cx_static_check.
* DELETE - "Delete a package for a user"
* Operation id: packages/delete-package-for-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: username, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_delete_package_for_us
IMPORTING
package_type TYPE string
package_name TYPE string
username TYPE string
RAISING cx_static_check.
* POST - "Restore a package for a user"
* Operation id: packages/restore-package-for-user
* Parameter: token, optional, query
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: username, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_restore_package_for_u
IMPORTING
token TYPE string OPTIONAL
package_type TYPE string
package_name TYPE string
username TYPE string
RAISING cx_static_check.
* GET - "Get all package versions for a package owned by a user"
* Operation id: packages/get-all-package-versions-for-package-owned-by-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/response_packages_get_all_package_ver02
* Response: 401
* Response: 403
* Response: 404
METHODS packages_get_all_package_ver02
IMPORTING
package_type TYPE string
package_name TYPE string
username TYPE string
RETURNING
VALUE(return_data) TYPE response_packages_get_all_pa02
RAISING cx_static_check.
* GET - "Get a package version for a user"
* Operation id: packages/get-package-version-for-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: package_version_id, required, path
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/package-version
METHODS packages_get_package_version02
IMPORTING
package_type TYPE string
package_name TYPE string
package_version_id TYPE i
username TYPE string
RETURNING
VALUE(return_data) TYPE package_version
RAISING cx_static_check.
* DELETE - "Delete package version for a user"
* Operation id: packages/delete-package-version-for-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: username, required, path
* Parameter: package_version_id, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_delete_package_vers02
IMPORTING
package_type TYPE string
package_name TYPE string
username TYPE string
package_version_id TYPE i
RAISING cx_static_check.
* POST - "Restore package version for a user"
* Operation id: packages/restore-package-version-for-user
* Parameter: package_type, required, path
* Parameter: package_name, required, path
* Parameter: username, required, path
* Parameter: package_version_id, required, path
* Response: 204
* Response: 401
* Response: 403
* Response: 404
METHODS packages_restore_package_ver02
IMPORTING
package_type TYPE string
package_name TYPE string
username TYPE string
package_version_id TYPE i
RAISING cx_static_check.
* GET - "List user projects"
* Operation id: projects/list-for-user
* Parameter: state, optional, query
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_projects_list_for_user
* Response: 422
METHODS projects_list_for_user
IMPORTING
state TYPE string DEFAULT 'open'
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_projects_list_for_use
RAISING cx_static_check.
* GET - "List events received by the authenticated user"
* Operation id: activity/list-received-events-for-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_received_events_
METHODS activity_list_received_events_
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_receive
RAISING cx_static_check.
* GET - "List public events received by a user"
* Operation id: activity/list-received-public-events-for-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_received_public_
METHODS activity_list_received_public_
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_recei01
RAISING cx_static_check.
* GET - "List repositories for a user"
* Operation id: repos/list-for-user
* Parameter: type, optional, query
* Parameter: sort, optional, query
* Parameter: direction, optional, query
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_repos_list_for_user
METHODS repos_list_for_user
IMPORTING
type TYPE string DEFAULT 'owner'
sort TYPE string DEFAULT 'full_name'
direction TYPE string OPTIONAL
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_repos_list_for_user
RAISING cx_static_check.
* GET - "Get GitHub Actions billing for a user"
* Operation id: billing/get-github-actions-billing-user
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/actions-billing-usage
METHODS billing_get_github_actions_b02
IMPORTING
username TYPE string
RETURNING
VALUE(return_data) TYPE actions_billing_usage
RAISING cx_static_check.
* GET - "Get GitHub Packages billing for a user"
* Operation id: billing/get-github-packages-billing-user
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/packages-billing-usage
METHODS billing_get_github_packages_02
IMPORTING
username TYPE string
RETURNING
VALUE(return_data) TYPE packages_billing_usage
RAISING cx_static_check.
* GET - "Get shared storage billing for a user"
* Operation id: billing/get-shared-storage-billing-user
* Parameter: username, required, path
* Response: 200
* application/json, #/components/schemas/combined-billing-usage
METHODS billing_get_shared_storage_b02
IMPORTING
username TYPE string
RETURNING
VALUE(return_data) TYPE combined_billing_usage
RAISING cx_static_check.
* GET - "List repositories starred by a user"
* Operation id: activity/list-repos-starred-by-user
* Parameter: username, required, path
* Parameter: sort, optional, query
* Parameter: direction, optional, query
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, string
METHODS activity_list_repos_starred_01
IMPORTING
username TYPE string
sort TYPE string DEFAULT 'created'
direction TYPE string DEFAULT 'desc'
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RAISING cx_static_check.
* GET - "List repositories watched by a user"
* Operation id: activity/list-repos-watched-by-user
* Parameter: username, required, path
* Parameter: per_page, optional, query
* Parameter: page, optional, query
* Response: 200
* application/json, #/components/schemas/response_activity_list_repos_watched_by
METHODS activity_list_repos_watched_by
IMPORTING
username TYPE string
per_page TYPE i DEFAULT 30
page TYPE i DEFAULT 1
RETURNING
VALUE(return_data) TYPE response_activity_list_repos_w
RAISING cx_static_check.
* GET - "Get the Zen of GitHub"
* Operation id: meta/get-zen
* Response: 200
* text/plain, string
METHODS meta_get_zen
RAISING cx_static_check.
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
12567,
44731,
13,
198,
9,
2980,
515,
416,
450,
499,
12,
9654,
15042,
12,
16366,
198,
9,
21722,
410,
18,
30617,
7824,
11,
352,
13,
16,
13,
19,
198,
198,
9,
35100,
32815,
25,
9242,
540,
12,
36439,
12,
7220,
11,
2134,
198,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
9242,
540,
62,
36439,
62,
7220,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3053,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17594,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
312,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30919,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9067,
9459,
62,
312,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19016,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27711,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10569,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1708,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
308,
1023,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31636,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
35675,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5745,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1128,
418,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2995,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2722,
62,
31534,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2524,
62,
28482,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31636,
62,
265,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
9242,
540,
62,
36439,
62,
7220,
13,
198,
198,
9,
35100,
32815,
25,
11812,
11,
2134,
198,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
850,
18908,
1358,
62,
525,
8481,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2428,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8794,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20150,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10154,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
40854,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
850,
18908,
1358,
62,
525,
8481,
13,
198,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
11812,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31065,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
312,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4870,
41876,
9242,
540,
62,
36439,
62,
7220,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6764,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7097,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27711,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2727,
62,
265,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6153,
62,
265,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21627,
41876,
850,
18908,
1358,
62,
525,
8481,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2995,
41876,
49053,
9795,
43679,
3963,
4731,
13315,
5550,
38865,
35374,
11,
366,
284,
4598,
11,
5412,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26162,
62,
9127,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5456,
62,
312,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5456,
62,
21078,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3992,
25480,
62,
21078,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
368,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
11812,
13,
198,
198,
9,
35100,
32815,
25,
4096,
12,
18224,
11,
2134,
198,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
4096,
62,
18224,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3275,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10314,
62,
6371,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19016,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3722,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
4096,
62,
18224,
13,
198,
198,
9,
35100,
32815,
25,
21201,
12,
18224,
12,
36439,
11,
2134,
198,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
21201,
62,
18224,
62,
36439,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3275,
41876,
4731,
11,
198,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class zcl_ftp_client definition
public
final
create public .
public section.
type-pools abap .
data dest type rfcdest .
data handle type i read-only .
data local type abap_bool read-only .
data host type string read-only .
data user type string read-only .
data password type string read-only .
methods constructor
importing
!i_host type simple optional
!i_user type simple optional
!i_password type simple optional
!i_local type abap_bool default abap_false .
methods connect
importing
!i_host type simple optional
!i_user type simple optional
!i_password type simple optional
raising
zcx_generic .
methods disconnect
raising
zcx_generic .
methods are_files_exist
importing
!i_path type simple
returning
value(e_is) type abap_bool
raising
zcx_generic .
methods get_files
importing
!i_path type simple
returning
value(et_list) type stringtab
raising
zcx_generic .
methods delete_files
importing
!i_path type simple
raising
zcx_generic .
methods is_file_exist
importing
!i_path type simple
!i_name type simple
returning
value(e_is) type abap_bool
raising
zcx_generic .
methods get_file
importing
!i_path type simple
returning
value(e_data) type xstring
raising
zcx_generic .
methods create_file
importing
!i_path type simple
!i_data type xstring
raising
zcx_generic .
methods delete_file
importing
!i_path type simple
raising
zcx_generic .
methods copy_file
importing
!i_from type simple
!i_to type simple
raising
zcx_generic .
methods move_file
importing
!i_from type simple
!i_to type simple
raising
zcx_generic .
methods is_directories_exist
importing
!i_path type simple
returning
value(e_is) type abap_bool
raising
zcx_generic .
methods get_directories
importing
!i_path type simple
returning
value(et_list) type stringtab
raising
zcx_generic .
methods delete_directories
importing
!i_path type simple
raising
zcx_generic .
methods is_directory_exist
importing
!i_path type simple
!i_name type simple
returning
value(e_is) type abap_bool
raising
zcx_generic .
methods create_directory
importing
!i_path type simple
raising
zcx_generic .
methods delete_directory
importing
!i_path type simple
raising
zcx_generic .
protected section.
private section.
methods command
importing
!i_command type simple
returning
value(et_data) type stringtab
raising
zcx_generic .
ENDCLASS.
CLASS ZCL_FTP_CLIENT IMPLEMENTATION.
method are_files_exist.
data lt_list type stringtab.
lt_list = get_files( i_path ).
check lt_list is not initial.
e_is = abap_true.
endmethod.
method command.
data l_command(255).
l_command = i_command.
data lt_data type table of text255.
call function 'FTP_COMMAND'
exporting
handle = handle
command = l_command
compress = 'N'
tables
data = lt_data
exceptions
tcpip_error = 1
command_error = 2
data_error = 3.
if sy-subrc ne 0.
zcx_generic=>raise( ).
endif.
zcl_abap_static=>list2list(
exporting it_data = lt_data
importing et_data = et_data ).
endmethod.
method connect.
if i_host is initial.
data l_host(255).
l_host = host.
else.
l_host = i_host.
endif.
if i_user is initial.
data l_user(255).
l_user = user.
else.
l_user = i_user.
endif.
if i_password is initial.
data l_password(255).
l_password = password.
else.
l_password = i_password.
endif.
if l_user is initial.
l_user = 'anonymous'.
l_password = 'anonymous'.
endif.
data l_length type i.
l_length = strlen( l_password ).
call function 'HTTP_SCRAMBLE'
exporting
source = l_password
sourcelen = l_length
key = '26101957'
importing
destination = l_password.
call function 'FTP_CONNECT'
exporting
host = l_host
user = l_user
password = l_password
rfc_destination = dest
importing
handle = handle
exceptions
not_connected = 1
others = 2.
if sy-subrc ne 0.
zcx_generic=>raise( ).
endif.
command( 'set passive on' ).
endmethod.
method constructor.
host = i_host.
user = i_user.
password = i_password.
if i_local eq abap_true.
dest = 'SAPFTP'.
else.
dest = 'SAPFTPA'.
endif.
endmethod.
method copy_file.
data l_data type xstring.
l_data = get_file( i_from ).
create_file(
i_path = i_to
i_data = l_data ).
endmethod.
method create_directory.
data lt_result type stringtab.
lt_result = command( `mkdir ` && i_path ).
endmethod.
method create_file.
data l_file(255).
l_file = i_path.
data l_length type i.
l_length = xstrlen( i_data ).
data lt_data type table of raw255.
zcl_convert_static=>xtext2xtable(
exporting i_data = i_data
importing et_data = lt_data ).
call function 'FTP_R3_TO_SERVER'
exporting
handle = handle
fname = l_file
blob_length = l_length
tables
blob = lt_data
exceptions
tcpip_error = 1
command_error = 2
data_error = 3
others = 4.
if sy-subrc ne 0.
zcx_generic=>raise( ).
endif.
endmethod.
method delete_directories.
data lt_list type stringtab.
lt_list = get_directories( i_path ).
data l_directory like line of lt_list.
loop at lt_list into l_directory.
delete_directory( i_path && `/` && l_directory ).
endloop.
endmethod.
method delete_directory.
" Удаление всех директорий
delete_directories( i_path ).
" Удаление всех файлов
delete_files( i_path ).
data lt_result type stringtab.
lt_result = command( `rmdir ` && i_path ).
endmethod.
method delete_file.
data lt_result type stringtab.
lt_result = command( `delete ` && i_path ).
endmethod.
method delete_files.
data lt_list type stringtab.
lt_list = get_files( i_path ).
data l_file like line of lt_list.
loop at lt_list into l_file.
delete_file( i_path && `/` && l_file ).
endloop.
endmethod.
method disconnect.
check handle is not initial.
call function 'FTP_DISCONNECT'
exporting
handle = handle.
call function 'RFC_CONNECTION_CLOSE'
exporting
destination = dest
exceptions
others = 1.
endmethod.
method get_directories.
data lt_result type stringtab.
lt_result = command( `ls ` && i_path ).
"drw-rw-r-- 1 572 572 252 Oct 11 2012 dirname
data l_result like line of lt_result.
loop at lt_result into l_result.
check l_result(1) eq 'd'.
condense l_result.
data lt_data type table of string.
clear lt_data.
split l_result at space into table lt_data.
data l_index type i.
l_index = lines( lt_data ).
data l_data like line of lt_data.
read table lt_data into l_data index l_index.
check sy-subrc eq 0.
check
l_data ne '.' and
l_data ne '..'.
insert l_data into table et_list.
endloop.
endmethod.
method get_file.
data l_file(255).
l_file = i_path.
data l_length type i.
data lt_data type table of raw255.
call function 'FTP_SERVER_TO_R3'
exporting
handle = handle
fname = l_file
importing
blob_length = l_length
tables
blob = lt_data
exceptions
tcpip_error = 1
command_error = 2
data_error = 3
others = 4.
if sy-subrc ne 0.
zcx_generic=>raise( ).
endif.
e_data =
zcl_convert_static=>xtable2xtext(
i_length = l_length
it_data = lt_data ).
endmethod.
method get_files.
data lt_result type stringtab.
lt_result = command( `ls ` && i_path ).
"-rw-rw-r-- 1 572 572 252 Oct 11 2012 file.zip
data l_result like line of lt_result.
loop at lt_result into l_result.
check l_result(1) eq '-'.
condense l_result.
data lt_data type table of string.
clear lt_data.
split l_result at space into table lt_data.
data l_index type i.
l_index = lines( lt_data ).
data l_data like line of lt_data.
read table lt_data into l_data index l_index.
check sy-subrc eq 0.
insert l_data into table et_list.
endloop.
endmethod.
method is_directories_exist.
data lt_list type stringtab.
lt_list = get_directories( i_path ).
check lt_list is not initial.
e_is = abap_true.
endmethod.
method is_directory_exist.
data lt_list type stringtab.
lt_list = get_directories( i_path ).
read table lt_list transporting no fields
with key
table_line = i_name.
check sy-subrc eq 0.
e_is = abap_true.
endmethod.
method is_file_exist.
data lt_list type stringtab.
lt_list = get_files( i_path ).
read table lt_list transporting no fields
with key
table_line = i_name.
check sy-subrc eq 0.
e_is = abap_true.
endmethod.
method move_file.
copy_file(
i_from = i_from
i_to = i_to ).
delete_file( i_from ).
endmethod.
ENDCLASS.
| [
4871,
1976,
565,
62,
701,
79,
62,
16366,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
628,
220,
1171,
2665,
13,
198,
220,
220,
220,
2099,
12,
7742,
82,
450,
499,
764,
628,
220,
220,
220,
1366,
2244,
2099,
374,
69,
10210,
395,
764,
198,
220,
220,
220,
1366,
5412,
2099,
1312,
1100,
12,
8807,
764,
198,
220,
220,
220,
1366,
1957,
2099,
450,
499,
62,
30388,
1100,
12,
8807,
764,
198,
220,
220,
220,
1366,
2583,
2099,
4731,
1100,
12,
8807,
764,
198,
220,
220,
220,
1366,
2836,
2099,
4731,
1100,
12,
8807,
764,
198,
220,
220,
220,
1366,
9206,
2099,
4731,
1100,
12,
8807,
764,
628,
220,
220,
220,
5050,
23772,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
4774,
220,
220,
220,
220,
2099,
2829,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
7220,
220,
220,
220,
220,
2099,
2829,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
28712,
2099,
2829,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
12001,
220,
220,
220,
2099,
450,
499,
62,
30388,
4277,
450,
499,
62,
9562,
764,
198,
220,
220,
220,
5050,
2018,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
4774,
220,
220,
220,
220,
2099,
2829,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
7220,
220,
220,
220,
220,
2099,
2829,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
28712,
2099,
2829,
11902,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
22837,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
389,
62,
16624,
62,
38476,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6978,
220,
220,
220,
220,
2099,
2829,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
68,
62,
271,
8,
2099,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
651,
62,
16624,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6978,
220,
220,
220,
220,
220,
220,
220,
2099,
2829,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
316,
62,
4868,
8,
2099,
4731,
8658,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
12233,
62,
16624,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6978,
2099,
2829,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
318,
62,
7753,
62,
38476,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6978,
220,
220,
220,
220,
2099,
2829,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
3672,
220,
220,
220,
220,
2099,
2829,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
68,
62,
271,
8,
2099,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
651,
62,
7753,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6978,
220,
220,
220,
220,
220,
220,
2099,
2829,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
68,
62,
7890,
8,
2099,
2124,
8841,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
2251,
62,
7753,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6978,
2099,
2829,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
7890,
2099,
2124,
8841,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
12233,
62,
7753,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6978,
2099,
2829,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
4866,
62,
7753,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6738,
2099,
2829,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
1462,
220,
220,
2099,
2829,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
1445,
62,
7753,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6738,
2099,
2829,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
1462,
220,
220,
2099,
2829,
198,
220,
220,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
41357,
764,
198,
220,
220,
220,
5050,
318,
62,
12942,
1749,
62,
38476,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
6978,
220,
220,
220,
220,
2099,
2829,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
68,
62,
271,
8,
2099,
450,
499,
62,
30388,
198,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Modulpool SAPMZBOOK_TICKET
*&---------------------------------------------------------------------*
INCLUDE mzbook_tickettop . " global Data
INCLUDE mzbook_ticket_lcl_applicatip01.
INCLUDE mzbook_ticket_class_drawer.
INCLUDE mzbook_ticket_status_0100o01.
INCLUDE mzbook_ticket_user_command_i01.
INCLUDE mzbook_ticket_user_commandf01.
INCLUDE mzbook_ticket_savef01.
INCLUDE mzbook_ticket_get_values_arf01.
INCLUDE mzbook_ticket_check_areai01.
INCLUDE mzbook_ticket_init_controlsf01.
INCLUDE mzbook_ticket_init_control_f02.
INCLUDE mzbook_ticket_status_0050o01.
INCLUDE mzbook_ticket_user_command_i02.
INCLUDE mzbook_ticket_get_dataf01.
INCLUDE mzbook_ticket_get_datai01.
INCLUDE mzbook_ticket_user_command_i03.
INCLUDE mzbook_ticket_status_0200o01.
INCLUDE mzbook_ticket_location1i01.
INCLUDE mzbook_ticket_init_ticketf01.
INCLUDE mzbook_ticket_status_0500o01.
INCLUDE mzbook_ticket_user_command_i04.
INCLUDE mzbook_ticket_status_1120o01.
INCLUDE mzbook_ticket_user_command_i05.
INCLUDE mzbook_ticket_init_personalf01.
INCLUDE mzbook_ticket_init_control_f03.
INCLUDE mzbook_ticket_init_html_butf01.
INCLUDE mzbook_ticket_init_control_f04.
INCLUDE mzbook_ticket_var_valuesf01.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
3401,
377,
7742,
220,
220,
220,
220,
220,
220,
220,
220,
48323,
44,
57,
39453,
62,
51,
11860,
2767,
198,
9,
5,
10097,
30934,
9,
628,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
42298,
3087,
404,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
220,
220,
220,
366,
3298,
6060,
198,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
75,
565,
62,
1324,
677,
265,
541,
486,
13,
198,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
4871,
62,
19334,
263,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
13376,
62,
39103,
78,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
7220,
62,
21812,
62,
72,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
7220,
62,
21812,
69,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
21928,
69,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
1136,
62,
27160,
62,
37595,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
9122,
62,
533,
1872,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
15003,
62,
13716,
28202,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
15003,
62,
13716,
62,
69,
2999,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
13376,
62,
405,
1120,
78,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
7220,
62,
21812,
62,
72,
2999,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
1136,
62,
7890,
69,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
1136,
62,
7890,
72,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
7220,
62,
21812,
62,
72,
3070,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
13376,
62,
44613,
78,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
24886,
16,
72,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
15003,
62,
43350,
69,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
13376,
62,
2713,
405,
78,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
7220,
62,
21812,
62,
72,
3023,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
13376,
62,
16,
10232,
78,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
7220,
62,
21812,
62,
72,
2713,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
15003,
62,
6259,
1604,
486,
13,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
15003,
62,
13716,
62,
69,
3070,
13,
198,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
15003,
62,
6494,
62,
4360,
69,
486,
13,
198,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
15003,
62,
13716,
62,
69,
3023,
13,
198,
198,
1268,
5097,
52,
7206,
285,
89,
2070,
62,
43350,
62,
7785,
62,
27160,
69,
486,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_gui_page_main DEFINITION
PUBLIC
FINAL
CREATE PUBLIC INHERITING FROM zcl_abapgit_gui_page.
PUBLIC SECTION.
INTERFACES: zif_abapgit_gui_hotkeys.
METHODS:
constructor
RAISING zcx_abapgit_exception,
zif_abapgit_gui_event_handler~on_event REDEFINITION.
PROTECTED SECTION.
METHODS:
render_content REDEFINITION.
PRIVATE SECTION.
CONSTANTS:
BEGIN OF c_actions,
show TYPE string VALUE 'show' ##NO_TEXT,
overview TYPE string VALUE 'overview',
select TYPE string VALUE 'select',
apply_filter TYPE string VALUE 'apply_filter',
abapgit_home TYPE string VALUE 'abapgit_home',
END OF c_actions.
DATA: mo_repo_overview TYPE REF TO zcl_abapgit_gui_page_repo_over,
mv_repo_key TYPE zif_abapgit_persistence=>ty_value.
METHODS build_main_menu
RETURNING VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar.
ENDCLASS.
CLASS zcl_abapgit_gui_page_main IMPLEMENTATION.
METHOD build_main_menu.
CREATE OBJECT ro_menu EXPORTING iv_id = 'toolbar-main'.
ro_menu->add(
iv_txt = zcl_abapgit_gui_buttons=>new_online( )
iv_act = zif_abapgit_definitions=>c_action-repo_newonline
)->add(
iv_txt = zcl_abapgit_gui_buttons=>new_offline( )
iv_act = zif_abapgit_definitions=>c_action-repo_newoffline
)->add(
iv_txt = zcl_abapgit_gui_buttons=>settings( )
iv_act = zif_abapgit_definitions=>c_action-go_settings
)->add(
iv_txt = zcl_abapgit_gui_buttons=>advanced( )
iv_title = 'Utilities'
io_sub = zcl_abapgit_gui_chunk_lib=>advanced_submenu( )
)->add(
iv_txt = zcl_abapgit_gui_buttons=>help( )
iv_title = 'Help'
io_sub = zcl_abapgit_gui_chunk_lib=>help_submenu( ) ).
ENDMETHOD.
METHOD constructor.
super->constructor( ).
ms_control-page_menu = build_main_menu( ).
ms_control-page_title = 'Repository List'.
ENDMETHOD.
METHOD render_content.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
gui_services( )->get_hotkeys_ctl( )->register_hotkeys( me ).
IF mo_repo_overview IS INITIAL.
CREATE OBJECT mo_repo_overview.
ENDIF.
ri_html->add( mo_repo_overview->zif_abapgit_gui_renderable~render( ) ).
register_deferred_script( zcl_abapgit_gui_chunk_lib=>render_repo_palette( c_actions-select ) ).
ENDMETHOD.
METHOD zif_abapgit_gui_event_handler~on_event.
DATA: lv_key TYPE zif_abapgit_persistence=>ty_value.
lv_key = ii_event->query( )->get( 'KEY' ).
CASE ii_event->mv_action.
WHEN c_actions-abapgit_home.
CLEAR mv_repo_key.
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN c_actions-select.
zcl_abapgit_persistence_user=>get_instance( )->set_repo_show( lv_key ).
TRY.
zcl_abapgit_repo_srv=>get_instance( )->get( lv_key )->refresh( ).
CATCH zcx_abapgit_exception ##NO_HANDLER.
ENDTRY.
mv_repo_key = lv_key.
CREATE OBJECT rs_handled-page TYPE zcl_abapgit_gui_page_repo_view
EXPORTING
iv_key = lv_key.
rs_handled-state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-change_order_by.
mo_repo_overview->set_order_by( ii_event->query( )->get( 'ORDERBY' ) ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-direction.
mo_repo_overview->set_order_direction(
boolc( ii_event->query( )->get( 'DIRECTION' ) = 'DESCENDING' ) ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN c_actions-apply_filter.
mo_repo_overview->set_filter( ii_event->mt_postdata ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-go_patch.
CREATE OBJECT rs_handled-page TYPE zcl_abapgit_gui_page_patch
EXPORTING
iv_key = lv_key.
rs_handled-state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN OTHERS.
rs_handled = super->zif_abapgit_gui_event_handler~on_event( ii_event ).
ENDCASE.
ENDMETHOD.
METHOD zif_abapgit_gui_hotkeys~get_hotkey_actions.
DATA: ls_hotkey_action LIKE LINE OF rt_hotkey_actions.
ls_hotkey_action-ui_component = 'Main'.
ls_hotkey_action-description = |abapGit settings|.
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_settings.
ls_hotkey_action-hotkey = |x|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ls_hotkey_action-description = |New online repository|.
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_newonline.
ls_hotkey_action-hotkey = |n|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ls_hotkey_action-description = |New offline repository|.
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_newoffline.
ls_hotkey_action-hotkey = |o|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ls_hotkey_action-description = |Stage|.
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_stage.
ls_hotkey_action-hotkey = |s|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ls_hotkey_action-description = |Check|.
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_code_inspector.
ls_hotkey_action-hotkey = |c|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ls_hotkey_action-description = |Patch|.
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_patch.
ls_hotkey_action-hotkey = |p|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
" registered/handled in js
ls_hotkey_action-description = |Previous repository|.
ls_hotkey_action-action = `#`.
ls_hotkey_action-hotkey = |4|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ls_hotkey_action-description = |Next repository|.
ls_hotkey_action-action = `##`.
ls_hotkey_action-hotkey = |6|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ls_hotkey_action-description = |Open repository|.
ls_hotkey_action-action = `###`.
ls_hotkey_action-hotkey = |Enter|.
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
12417,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
25,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
8940,
13083,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
15596,
62,
30281,
93,
261,
62,
15596,
23848,
36,
20032,
17941,
13,
628,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
8543,
62,
11299,
23848,
36,
20032,
17941,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
4658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
905,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
12860,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
16700,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
2502,
1177,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
2922,
220,
220,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
19738,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
4174,
62,
24455,
41876,
4731,
26173,
8924,
705,
39014,
62,
24455,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
450,
499,
18300,
62,
11195,
41876,
4731,
26173,
8924,
705,
397,
499,
18300,
62,
11195,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
4658,
13,
628,
220,
220,
220,
42865,
25,
6941,
62,
260,
7501,
62,
2502,
1177,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
260,
7501,
62,
2502,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
85,
62,
260,
7501,
62,
2539,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
8367,
13,
628,
220,
220,
220,
337,
36252,
50,
1382,
62,
12417,
62,
26272,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
26272,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
62,
25981,
5657,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
12417,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1382,
62,
12417,
62,
26272,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
26272,
7788,
15490,
2751,
21628,
62,
312,
796,
705,
25981,
5657,
12,
12417,
4458,
628,
220,
220,
220,
686,
62,
26272,
3784,
2860,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
14116,
796,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
4360,
27288,
14804,
3605,
62,
25119,
7,
1267,
198,
220,
220,
220,
220,
220,
21628,
62,
529,
796,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
66,
62,
2673,
12,
260,
7501,
62,
3605,
25119,
198,
220,
220,
220,
1267,
3784,
2860,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
14116,
796,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
4360,
27288,
14804,
3605,
62,
2364,
1370,
7,
1267,
198,
220,
220,
220,
220,
220,
21628,
62,
529,
796,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
66,
62,
2673,
12,
260,
7501,
62,
3605,
2364,
1370,
198,
220,
220,
220,
1267,
3784,
2860,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
14116,
796,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
4360,
27288,
14804,
33692,
7,
1267,
198,
220,
220,
220,
220,
220,
21628,
62,
529,
796,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
66,
62,
2673,
12,
2188,
62,
33692,
198,
220,
220,
220,
1267,
3784,
2860,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
14116,
796,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
4360,
27288,
14804,
32225,
2903,
7,
1267,
198,
220,
220,
220,
220,
220,
21628,
62,
7839,
796,
705,
18274,
2410,
6,
198,
220,
220,
220,
220,
220,
33245,
62,
7266,
796,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
354,
2954,
62,
8019,
14804,
32225,
2903,
62,
7266,
26272,
7,
1267,
198,
220,
220,
220,
1267,
3784,
2860,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
14116,
796,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
4360,
27288,
14804,
16794,
7,
1267,
198,
220,
220,
220,
220,
220,
21628,
62,
7839,
796,
705,
22087,
6,
198,
220,
220,
220,
220,
220,
33245,
62,
7266,
796,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
354,
2954,
62,
8019,
14804,
16794,
62,
7266,
26272,
7,
1267,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
2208,
3784,
41571,
273,
7,
6739,
198,
220,
220,
220,
13845,
62,
13716,
12,
7700,
62,
26272,
220,
796,
1382,
62,
12417,
62,
26272,
7,
6739,
198,
220,
220,
220,
13845,
62,
13716,
12,
7700,
62,
7839,
796,
705,
6207,
13264,
7343,
4458,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
8543,
62,
11299,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
374,
72,
62,
6494,
41876,
1976,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
11774,
62,
30416,
7,
1267,
3784,
1136,
62,
8940,
13083,
62,
34168,
7,
1267,
3784,
30238,
62,
8940,
13083,
7,
502,
6739,
628,
220,
220,
220,
16876,
6941,
62,
260,
7501,
62,
2502,
1177,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
6941,
62,
260,
7501,
62,
2502,
1177,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
374,
72,
62,
6494,
3784,
2860,
7,
6941,
62,
260,
7501,
62,
2502,
1177
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_enhc DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_objects_super.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
METHODS:
constructor
IMPORTING
is_item TYPE zif_abapgit_definitions=>ty_item
iv_language TYPE spras.
PROTECTED SECTION.
PRIVATE SECTION.
DATA:
mv_composite_id TYPE enhcompositename.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_ENHC IMPLEMENTATION.
METHOD constructor.
super->constructor( is_item = is_item
iv_language = iv_language ).
mv_composite_id = ms_item-obj_name.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = c_user_unknown.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lx_error TYPE REF TO cx_enh_root,
li_enh_object TYPE REF TO if_enh_object.
TRY.
li_enh_object = cl_enh_factory=>load_enhancement_composite(
name = mv_composite_id
lock = abap_true ).
li_enh_object->delete( ).
li_enh_object->save( ).
li_enh_object->unlock( ).
CATCH cx_enh_root INTO lx_error.
zcx_abapgit_exception=>raise( lx_error->get_text( ) ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: lx_error TYPE REF TO cx_enh_root,
li_enh_composite TYPE REF TO if_enh_composite,
lv_package TYPE devclass,
lt_composite_childs TYPE enhcompositename_it,
lt_enh_childs TYPE enhname_it,
lv_longtext_id TYPE enhdocuobject,
lv_shorttext TYPE string.
FIELD-SYMBOLS: <lv_composite_child> TYPE enhcompositename,
<lv_enh_child> LIKE LINE OF lt_enh_childs.
lv_package = iv_package.
io_xml->read( EXPORTING iv_name = 'SHORTTEXT'
CHANGING cg_data = lv_shorttext ).
io_xml->read( EXPORTING iv_name = 'COMPOSITE_CHILDS'
CHANGING cg_data = lt_composite_childs ).
io_xml->read( EXPORTING iv_name = 'ENH_CHILDS'
CHANGING cg_data = lt_enh_childs ).
io_xml->read( EXPORTING iv_name = 'LONGTEXT_ID'
CHANGING cg_data = lv_longtext_id ).
TRY.
cl_enh_factory=>create_enhancement_composite(
EXPORTING
name = mv_composite_id
run_dark = abap_true
IMPORTING
composite = li_enh_composite
CHANGING
devclass = lv_package ).
li_enh_composite->if_enh_object_docu~set_shorttext( lv_shorttext ).
LOOP AT lt_composite_childs ASSIGNING <lv_composite_child>.
li_enh_composite->add_composite_child( <lv_composite_child> ).
ENDLOOP.
LOOP AT lt_enh_childs ASSIGNING <lv_enh_child>.
li_enh_composite->add_enh_child( <lv_enh_child> ).
ENDLOOP.
li_enh_composite->set_longtext_id( lv_longtext_id ).
li_enh_composite->if_enh_object~save( ).
li_enh_composite->if_enh_object~activate( ).
li_enh_composite->if_enh_object~unlock( ).
CATCH cx_enh_root INTO lx_error.
zcx_abapgit_exception=>raise( lx_error->get_text( ) ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~exists.
TRY.
cl_enh_factory=>load_enhancement_composite(
name = mv_composite_id
lock = abap_false ).
rv_bool = abap_true.
CATCH cx_enh_root.
rv_bool = abap_false.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
DATA: lv_argument TYPE seqg3-garg.
lv_argument = |{ mv_composite_id }|.
OVERLAY lv_argument WITH ' '.
lv_argument = |{ lv_argument }*|.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = |E_ENHANCE|
iv_argument = lv_argument ).
ENDMETHOD.
METHOD zif_abapgit_object~jump.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = ms_item-obj_name
object_type = ms_item-obj_type
in_new_window = abap_true
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lx_error TYPE REF TO cx_enh_root,
li_enh_composite TYPE REF TO if_enh_composite,
lt_composite_childs TYPE enhcompositename_it,
lt_enh_childs TYPE enhname_it,
lv_longtext_id TYPE enhdocuobject,
lv_shorttext TYPE string.
TRY.
li_enh_composite = cl_enh_factory=>load_enhancement_composite(
name = mv_composite_id
lock = abap_false ).
lv_shorttext = li_enh_composite->if_enh_object_docu~get_shorttext( ).
lt_composite_childs = li_enh_composite->get_composite_childs( ).
lt_enh_childs = li_enh_composite->get_enh_childs( ).
lv_longtext_id = li_enh_composite->get_longtext_id( ).
io_xml->add( iv_name = 'SHORTTEXT'
ig_data = lv_shorttext ).
io_xml->add( iv_name = 'COMPOSITE_CHILDS'
ig_data = lt_composite_childs ).
io_xml->add( iv_name = 'ENH_CHILDS'
ig_data = lt_enh_childs ).
io_xml->add( iv_name = 'LONGTEXT_ID'
ig_data = lv_longtext_id ).
CATCH cx_enh_root INTO lx_error.
zcx_abapgit_exception=>raise( lx_error->get_text( ) ).
ENDTRY.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
16550,
66,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
9186,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
41876,
7500,
292,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
285,
85,
62,
785,
1930,
578,
62,
312,
41876,
5881,
785,
1930,
270,
12453,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
23680,
62,
1677,
16045,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
2208,
3784,
41571,
273,
7,
318,
62,
9186,
220,
220,
220,
220,
796,
318,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
796,
21628,
62,
16129,
6739,
628,
220,
220,
220,
285,
85,
62,
785,
1930,
578,
62,
312,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
628,
220,
220,
220,
374,
85,
62,
7220,
796,
269,
62,
7220,
62,
34680,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
628,
220,
220,
220,
42865,
25,
300,
87,
62,
18224,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
43213,
62,
16550,
62,
15763,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
16550,
62,
15252,
41876,
4526,
37,
5390,
611,
62,
16550,
62,
15252,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
16550,
62,
15252,
796,
537,
62,
16550,
62,
69,
9548,
14804,
2220,
62,
16550,
590,
434,
62,
785,
1930,
578,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
796,
285,
85,
62,
785,
1930,
578,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5793,
796,
450,
499,
62,
7942,
6739,
628,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
16550,
62,
15252,
3784,
33678,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
16550,
62,
15252,
3784,
21928,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
16550,
62,
15252,
3784,
403,
5354,
7,
6739,
628,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
16550,
62,
15763,
39319,
300,
87,
62,
18224,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
300,
87,
62,
18224,
3784,
1136,
62,
5239,
7,
1267,
6739,
198,
220,
220,
220,
23578,
40405,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
8906,
48499,
1096,
13,
628,
220,
220,
220,
42865,
25,
300,
87,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
43213,
62,
16550,
62,
15763,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
16550,
62,
785,
1930,
578,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
16550,
62,
785,
1930,
578,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26495,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1614,
4871,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
785,
1930,
578,
62,
9410,
82,
41876,
5881,
785,
1930,
270,
12453,
62,
270,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
16550,
62,
9410,
82,
220,
220,
220,
220,
220,
220,
41876,
5881,
3672,
62,
270,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
6511,
5239,
62,
312,
220,
220,
220,
220,
220,
41876,
5881,
15390,
84,
15252,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
19509,
5239,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
6780,
62,
785,
1930,
578,
62,
9410,
29,
41876,
5881,
785,
1930,
270,
12453,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
6780,
62,
16550,
62,
9410,
29,
220,
220,
220,
220,
220,
220,
34178,
48920,
3963,
300,
83,
62,
16550,
62,
9410,
82,
13,
628,
220,
220,
220,
300,
85,
62,
26495,
796,
21628,
62,
26495,
13,
628,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
9693,
9863,
32541,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
7890,
796,
300,
85,
62,
19509,
5239,
6739,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
9858,
37997,
12709,
62,
3398,
4146,
5258,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
7890,
796,
300,
83,
62,
785,
1930,
578,
62,
9410,
82,
6739
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! API for Saving the Transactional Buffer of the Travel API
"!
FUNCTION /DMO/FLIGHT_TRAVEL_SAVE06.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------
/dmo/cl_flight_legacy06=>get_instance( )->save( ).
ENDFUNCTION.
| [
40484,
7824,
329,
34689,
262,
3602,
529,
1538,
47017,
286,
262,
13524,
7824,
198,
40484,
198,
42296,
4177,
2849,
1220,
35,
11770,
14,
3697,
9947,
62,
51,
3861,
18697,
62,
4090,
6089,
3312,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
10097,
23031,
198,
220,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
3312,
14804,
1136,
62,
39098,
7,
1267,
3784,
21928,
7,
6739,
198,
1677,
8068,
4944,
4177,
2849,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report YDK_TAB_ROW_COUNT
*& Report with the number of entries in the tables
*&---------------------------------------------------------------------*
*& Developed by Kiyanov Dmitry in 2019 year.
*& MIT License
*&---------------------------------------------------------------------*
REPORT ydk_tab_row_count.
DATA: xtabname TYPE dd02l-tabname.
SELECT-OPTIONS tabname FOR xtabname NO INTERVALS.
PARAMETERS: where TYPE string LOWER CASE.
DATA: xfield TYPE dd03l-fieldname.
SELECT-OPTIONS sfield FOR xfield NO INTERVALS.
DATA: BEGIN OF ittab OCCURS 0,
tabname TYPE dd02l-tabname,
count TYPE i,
END OF ittab.
START-OF-SELECTION.
PERFORM get_data.
PERFORM alv_show.
FORM get_data.
FIELD-SYMBOLS <tab> LIKE LINE OF ittab.
SELECT dd02l~tabname INTO CORRESPONDING FIELDS OF TABLE @ittab
FROM dd02l
JOIN tadir
ON tadir~pgmid = 'R3TR'
AND tadir~object = 'TABL'
AND tadir~obj_name = dd02l~tabname
WHERE dd02l~tabname IN @tabname
AND dd02l~as4local = 'A'
AND dd02l~as4vers = '0000'
AND dd02l~tabclass IN ('TRANSP', 'CLUSTER', 'POOL').
* AND dd02l~clidep = 'X'
* AND tadir~devclass <> '$TMP'.
CHECK NOT ittab[] IS INITIAL.
DATA: wfield_count TYPE i.
DATA: tfield_count TYPE i.
wfield_count = lines( sfield ).
LOOP AT ittab ASSIGNING <tab>.
IF wfield_count > 0.
SELECT COUNT( * ) INTO tfield_count
FROM dd03l
WHERE tabname = <tab>-tabname
AND fieldname IN sfield
AND as4local = 'A'
AND as4vers = '0000'.
IF tfield_count <> wfield_count.
<tab>-count = -1.
CONTINUE.
ENDIF.
ENDIF.
IF where IS INITIAL.
SELECT COUNT( * ) AS count INTO CORRESPONDING FIELDS OF <tab>
FROM (<tab>-tabname).
ELSE.
SELECT COUNT( * ) AS count INTO CORRESPONDING FIELDS OF <tab>
FROM (<tab>-tabname)
WHERE (where).
ENDIF.
ENDLOOP.
DELETE ittab WHERE count < 0.
ENDFORM.
FORM alv_show.
DATA: fc TYPE lvc_t_fcat WITH HEADER LINE.
DATA: repid TYPE sy-repid.
CALL FUNCTION 'YDK_ALV_FCAT_BUILD'
EXPORTING
alv_strut_key = 'YDK_TAB_ROW_COUNT'
* structures = ''
TABLES
alv_tab = ittab
fcat = fc.
repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
i_callback_program = repid
* i_callback_pf_status_set = 'ALV_STATUS_SET'
* i_callback_user_command = 'ALV_USER_COMMAND'
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT_LVC =
it_fieldcat_lvc = fc[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS_LVC =
* IT_SORT_LVC =
* IT_FILTER_LVC =
* IT_HYPERLINK =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT_LVC =
* IS_REPREP_ID_LVC =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP =
* I_HTML_HEIGHT_END =
* IT_ALV_GRAPHICS =
* IT_EXCEPT_QINFO_LVC =
* IR_SALV_FULLSCREEN_ADAPTER =
TABLES
t_outtab = ittab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "alv_show
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
220,
575,
48510,
62,
5603,
33,
62,
49,
3913,
62,
34,
28270,
198,
9,
5,
6358,
351,
262,
1271,
286,
12784,
287,
262,
8893,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
6013,
276,
416,
21927,
4121,
709,
45181,
287,
13130,
614,
13,
198,
9,
5,
17168,
13789,
198,
9,
5,
10097,
30934,
9,
198,
198,
2200,
15490,
331,
34388,
62,
8658,
62,
808,
62,
9127,
13,
198,
198,
26947,
25,
220,
742,
397,
3672,
41876,
49427,
2999,
75,
12,
8658,
3672,
13,
198,
46506,
12,
3185,
51,
11053,
7400,
3672,
7473,
220,
742,
397,
3672,
8005,
23255,
53,
23333,
13,
198,
27082,
2390,
2767,
4877,
25,
810,
41876,
4731,
406,
36048,
42001,
13,
198,
198,
26947,
25,
2124,
3245,
41876,
49427,
3070,
75,
12,
3245,
3672,
13,
198,
46506,
12,
3185,
51,
11053,
264,
3245,
7473,
2124,
3245,
8005,
23255,
53,
23333,
13,
198,
198,
26947,
25,
347,
43312,
3963,
340,
8658,
440,
4093,
4261,
50,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7400,
3672,
41876,
49427,
2999,
75,
12,
8658,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
954,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
23578,
220,
220,
3963,
340,
8658,
13,
198,
198,
2257,
7227,
12,
19238,
12,
46506,
2849,
13,
198,
220,
19878,
21389,
651,
62,
7890,
13,
198,
220,
19878,
21389,
435,
85,
62,
12860,
13,
198,
198,
21389,
651,
62,
7890,
13,
198,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
1279,
8658,
29,
34178,
48920,
3963,
340,
8658,
13,
628,
220,
33493,
49427,
2999,
75,
93,
8658,
3672,
39319,
23929,
19535,
47,
18672,
2751,
18930,
3698,
5258,
3963,
43679,
2488,
715,
397,
198,
220,
220,
220,
16034,
49427,
2999,
75,
198,
220,
220,
220,
32357,
1268,
36264,
343,
198,
220,
220,
220,
220,
220,
6177,
36264,
343,
93,
6024,
13602,
220,
220,
220,
220,
796,
705,
49,
18,
5446,
6,
198,
220,
220,
220,
220,
5357,
36264,
343,
93,
15252,
220,
220,
220,
796,
705,
5603,
9148,
6,
198,
220,
220,
220,
220,
5357,
36264,
343,
93,
26801,
62,
3672,
220,
796,
49427,
2999,
75,
93,
8658,
3672,
198,
220,
220,
33411,
49427,
2999,
75,
93,
8658,
3672,
220,
220,
3268,
2488,
8658,
3672,
198,
220,
220,
220,
220,
5357,
49427,
2999,
75,
93,
292,
19,
12001,
220,
796,
705,
32,
6,
198,
220,
220,
220,
220,
5357,
49427,
2999,
75,
93,
292,
19,
690,
220,
220,
796,
705,
2388,
6,
198,
220,
220,
220,
220,
5357,
49427,
2999,
75,
93,
8658,
4871,
220,
3268,
19203,
5446,
1565,
4303,
3256,
705,
5097,
7759,
1137,
3256,
705,
16402,
3535,
27691,
198,
9,
220,
220,
220,
220,
5357,
49427,
2999,
75,
93,
565,
485,
79,
220,
220,
220,
796,
705,
55,
6,
198,
9,
220,
220,
220,
220,
5357,
36264,
343,
93,
7959,
4871,
220,
1279,
29,
705,
3,
51,
7378,
4458,
198,
220,
5870,
25171,
5626,
340,
8658,
21737,
3180,
3268,
2043,
12576,
13,
628,
220,
42865,
25,
266,
3245,
62,
9127,
41876,
1312,
13,
198,
220,
42865,
25,
256,
3245,
62,
9127,
41876,
1312,
13,
628,
220,
266,
3245,
62,
9127,
796,
3951,
7,
264,
3245,
6739,
628,
220,
17579,
3185,
5161,
340,
8658,
24994,
3528,
15871,
1279,
8658,
28401,
198,
220,
220,
220,
16876,
266,
3245,
62,
9127,
1875,
657,
13,
198,
220,
220,
220,
220,
220,
33493,
327,
28270,
7,
1635,
1267,
39319,
256,
3245,
62,
9127,
198,
220,
220,
220,
220,
220,
220,
220,
16034,
49427,
3070,
75,
198,
220,
220,
220,
220,
220,
220,
33411,
7400,
3672,
796,
1279,
8658,
29,
12,
8658,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
2214,
3672,
3268,
264,
3245,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
355,
19,
12001,
796,
705,
32,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
355,
19,
690,
220,
796,
705,
2388,
4458,
628,
220,
220,
220,
220,
220,
16876,
256,
3245,
62,
9127,
1279,
29,
266,
3245,
62,
9127,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1279,
8658,
29,
12,
9127,
796,
532,
16,
13,
198,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
16876,
810,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
33493,
327,
28270,
7,
1635,
1267,
7054,
954,
39319,
23929,
19535,
47,
18672,
2751,
18930,
3698,
5258,
3963,
1279,
8658,
29,
198,
220,
220,
220,
220,
220,
220,
220,
16034,
38155,
8658,
29,
12,
8658,
3672,
737,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
33493,
327,
28270,
7,
1635,
1267,
7054,
954,
39319,
23929,
19535,
47,
18672,
2751,
18930,
3698,
5258,
3963,
1279,
8658,
29,
198,
220,
220,
220,
220,
220,
220,
220,
16034,
38155,
8658,
29,
12,
8658,
3672,
8,
198,
220,
220,
220,
220,
220,
220,
33411,
357,
3003,
737,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
21982,
3185,
13,
628,
220,
5550,
2538,
9328,
340,
8658,
33411,
954,
1279,
657,
13,
198,
1677,
8068,
1581,
44,
13,
198,
198,
21389,
435,
85,
62,
12860,
13,
198,
220,
42865,
25,
277,
66,
41876,
300,
28435,
62,
83,
62,
69,
9246,
13315,
39837,
1137,
48920,
13,
198,
220,
42865,
25,
1128,
312,
41876,
827,
12,
7856,
312,
13,
628,
220,
42815,
29397,
4177,
2849,
705,
35755,
42,
62,
1847,
53,
62,
4851,
1404,
62,
19499,
26761,
6,
198,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
435,
85,
62,
2536,
315,
62,
2539,
796,
705,
35755,
42,
62,
5603,
33,
62,
49,
3913,
62,
34,
28270,
6,
198,
9,
220,
220,
220,
220,
8573,
220,
220,
220,
796,
10148,
198,
220,
220,
220,
309,
6242,
28378,
198,
220,
220,
220,
220,
220,
435,
85,
62,
8658,
220,
220,
220,
220,
220,
220,
796,
340,
8658,
198,
220,
220,
220,
220,
220,
277,
9246,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
277,
66,
13,
628,
220,
1128,
312,
796,
827,
12,
7856,
312,
13
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
FUNCTION-POOL zabaplint_ui.
TABLES: zabaplint_glob_data.
TYPES: BEGIN OF ty_node.
INCLUDE STRUCTURE treev_node.
TYPES: text TYPE text50,
END OF ty_node.
TYPES: ty_nodes TYPE STANDARD TABLE OF ty_node WITH DEFAULT KEY.
DATA: gv_read_only TYPE abap_bool,
gv_ok_code LIKE sy-ucomm,
go_container TYPE REF TO cl_gui_custom_container,
go_editor TYPE REF TO cl_gui_textedit,
go_splitter TYPE REF TO cl_gui_easy_splitter_container,
go_tree TYPE REF TO cl_gui_simple_tree.
| [
42296,
4177,
2849,
12,
16402,
3535,
1976,
15498,
489,
600,
62,
9019,
13,
198,
198,
5603,
9148,
1546,
25,
1976,
15498,
489,
600,
62,
4743,
672,
62,
7890,
13,
198,
198,
9936,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
17440,
13,
198,
220,
220,
220,
3268,
5097,
52,
7206,
19269,
18415,
11335,
5509,
85,
62,
17440,
13,
198,
9936,
47,
1546,
25,
2420,
41876,
2420,
1120,
11,
198,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
17440,
13,
198,
198,
9936,
47,
1546,
25,
1259,
62,
77,
4147,
41876,
49053,
9795,
43679,
3963,
1259,
62,
17440,
13315,
5550,
38865,
35374,
13,
198,
198,
26947,
25,
308,
85,
62,
961,
62,
8807,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
308,
85,
62,
482,
62,
8189,
220,
220,
34178,
827,
12,
84,
9503,
11,
198,
220,
220,
220,
220,
220,
467,
62,
34924,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
23144,
62,
34924,
11,
198,
220,
220,
220,
220,
220,
467,
62,
35352,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
5239,
19312,
11,
198,
220,
220,
220,
220,
220,
467,
62,
22018,
1967,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
38171,
62,
22018,
1967,
62,
34924,
11,
198,
220,
220,
220,
220,
220,
467,
62,
21048,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
36439,
62,
21048,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report RSUSR006 *
*& *
*&---------------------------------------------------------------------*
*& Display locked users and users with failed logon. *
*& *
*&---------------------------------------------------------------------*
*
*&---------------------------------------------------------------------*
* 04.07.2005 D040499 ( note 858641 ) 4.6B+
* Change LINE-SIZE from 90 to 255 to aviod line-break after 90
* characters in batch processing (not relevant for online process)
*
* 11.12.2006 R000731 (Note 1007027) 7.00+
* - bugfix on options for select via report RSUSR200 corrected
*&---------------------------------------------------------------------*
REPORT zdop_rsusr006 LINE-SIZE 255 NO STANDARD PAGE HEADING. "note (858641)
* Definition of the parameters for printing and archiving
DATA: pri_params LIKE pri_params,
arc_params LIKE arc_params,
valid TYPE c,
gf_rsusr006.
IF sy-batch EQ 'X'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
no_dialog = 'X'
mode = 'CURRENT'
report = 'RSUSR200'
IMPORTING
out_parameters = pri_params
out_archive_parameters = arc_params
valid = valid.
SUBMIT rsusr200 WITH notvalid EQ space
WITH succlog EQ space
TO SAP-SPOOL SPOOL PARAMETERS pri_params
ARCHIVE PARAMETERS arc_params
WITHOUT SPOOL DYNPRO.
ELSE.
gf_rsusr006 = 'X'.
EXPORT gf_rsusr006 TO MEMORY ID 'FLAG'.
SUBMIT rsusr200 WITH notvalid EQ space
WITH succlog EQ space
and return.
ENDIF.
write :/ 'DOĞUKAN PADEL INSERT 07.01.2022'.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
220,
19340,
2937,
49,
28041,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
9,
5,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
16531,
8970,
2985,
290,
2985,
351,
4054,
2604,
261,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
9,
5,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
9,
5,
10097,
30934,
9,
198,
9,
198,
9,
5,
10097,
30934,
9,
198,
9,
220,
8702,
13,
2998,
13,
14315,
360,
15,
26429,
2079,
357,
3465,
807,
3365,
42759,
1267,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
604,
13,
21,
33,
10,
198,
9,
220,
9794,
48920,
12,
33489,
422,
4101,
284,
14280,
284,
1196,
2101,
1627,
12,
9032,
706,
4101,
198,
9,
220,
3435,
287,
15458,
7587,
357,
1662,
5981,
329,
2691,
1429,
8,
198,
9,
198,
9,
220,
1367,
13,
1065,
13,
13330,
371,
830,
22,
3132,
357,
6425,
1802,
2154,
1983,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
767,
13,
405,
10,
198,
9,
220,
532,
5434,
13049,
319,
3689,
329,
2922,
2884,
989,
19340,
2937,
49,
2167,
19267,
198,
9,
5,
10097,
30934,
9,
198,
198,
2200,
15490,
220,
1976,
67,
404,
62,
3808,
14629,
28041,
48920,
12,
33489,
14280,
8005,
49053,
9795,
48488,
39837,
2751,
13,
366,
11295,
357,
23,
3365,
42759,
8,
198,
198,
9,
30396,
286,
262,
10007,
329,
13570,
290,
3934,
1412,
198,
26947,
25,
1293,
62,
37266,
34178,
1293,
62,
37266,
11,
198,
220,
220,
220,
220,
220,
10389,
62,
37266,
34178,
10389,
62,
37266,
11,
198,
220,
220,
220,
220,
220,
4938,
220,
220,
220,
220,
220,
41876,
269,
11,
198,
220,
220,
220,
220,
220,
308,
69,
62,
3808,
14629,
28041,
13,
198,
198,
5064,
827,
12,
43501,
36529,
705,
55,
4458,
198,
220,
42815,
29397,
4177,
2849,
705,
18851,
62,
4805,
12394,
62,
27082,
2390,
2767,
4877,
6,
198,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
645,
62,
38969,
519,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
55,
6,
198,
220,
220,
220,
220,
220,
4235,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
34,
39237,
6,
198,
220,
220,
220,
220,
220,
989,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
6998,
2937,
49,
2167,
6,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
503,
62,
17143,
7307,
220,
220,
220,
220,
220,
220,
220,
220,
796,
1293,
62,
37266,
198,
220,
220,
220,
220,
220,
503,
62,
17474,
62,
17143,
7307,
796,
10389,
62,
37266,
198,
220,
220,
220,
220,
220,
4938,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
4938,
13,
198,
220,
28932,
36393,
44608,
14629,
2167,
13315,
407,
12102,
36529,
2272,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
17458,
6404,
220,
36529,
2272,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5390,
48323,
12,
4303,
31559,
6226,
31559,
29463,
2390,
2767,
4877,
1293,
62,
37266,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5923,
3398,
9306,
29463,
2390,
2767,
4877,
10389,
62,
37266,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42881,
6226,
31559,
360,
40760,
31190,
13,
198,
3698,
5188,
13,
198,
220,
308,
69,
62,
3808,
14629,
28041,
796,
705,
55,
4458,
198,
220,
7788,
15490,
308,
69,
62,
3808,
14629,
28041,
5390,
35153,
15513,
4522,
705,
38948,
4458,
198,
220,
28932,
36393,
44608,
14629,
2167,
13315,
407,
12102,
36529,
2272,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
17458,
6404,
220,
36529,
2272,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
1441,
13,
198,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
* DATA, TYPE and TYPES
* Declaring variable using 'Data' and giving it a predefined type using 'TYPE' statement:
DATA lv_001(10) TYPE i.
* Creating a new type using 'TYPES:' statement:
TYPES: ty_str(50).
* Now we can declare variables of the type we created:
DATA: lv_002 TYPE ty_str,
lv_003 TYPE ty_str,
lv_004 TYPE ty_str,
lv_005 LIKE lv_004. " We can also use 'LIKE' to refer to the type of an existing
* local or global object ONLY (e.g. local variable 'lv_004' type).
* 'LIKE' statement can be used only referring a global or declared local object type.
* A created type can also be of the same type of an existing object.
* e.g. created type 'ty_matnr001' created with the same type of 'matnr' column of 'mara' table:
TYPES: ty_matnr001 TYPE mara-matnr,
ty_matnr002 LIKE mara-matnr, " or reffered to an object type with 'LIKE'
ty_matnr003 TYPE ty_matnr002. "or can also make reference to another 'created type type'
* Structures and Internal Tables
* Creating a structure and internal table of the same type of 'sflight' SAP table:
DATA: wa_sflight TYPE sflight, " structure
it_sflight TYPE TABLE OF sflight. " internal table
* Creating a structure and internal table of the same type of 'sflight' SAP table but adding a new column:
TYPES: BEGIN OF mod_sflight.
INCLUDE TYPE sflight.
TYPES: new_column TYPE i,
END OF mod_sflight.
DATA: wa_sflight_custom TYPE mod_sflight, " creating structure the same type of newly modified sflight
it_sflight_custom TYPE TABLE OF mod_sflight. " creating internal table the same type of newly modified sflight
* Creating a table from zero:
* to be continued...
| [
9,
42865,
11,
41876,
290,
24412,
47,
1546,
198,
198,
9,
16691,
1723,
7885,
1262,
705,
6601,
6,
290,
3501,
340,
257,
2747,
18156,
2099,
1262,
705,
25216,
6,
2643,
25,
198,
26947,
300,
85,
62,
8298,
7,
940,
8,
41876,
1312,
13,
198,
198,
9,
30481,
257,
649,
2099,
1262,
705,
9936,
47,
1546,
32105,
2643,
25,
198,
9936,
47,
1546,
25,
1259,
62,
2536,
7,
1120,
737,
198,
198,
9,
2735,
356,
460,
13627,
9633,
286,
262,
2099,
356,
2727,
25,
198,
26947,
25,
300,
85,
62,
21601,
41876,
1259,
62,
2536,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
11245,
41876,
1259,
62,
2536,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
22914,
41876,
1259,
62,
2536,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
22544,
34178,
300,
85,
62,
22914,
13,
366,
775,
460,
635,
779,
705,
31271,
7336,
6,
284,
3522,
284,
262,
2099,
286,
281,
4683,
198,
9,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1957,
393,
3298,
2134,
22224,
357,
68,
13,
70,
13,
1957,
7885,
705,
6780,
62,
22914,
6,
2099,
737,
198,
9,
705,
31271,
7336,
6,
2643,
460,
307,
973,
691,
9759,
257,
3298,
393,
6875,
1957,
2134,
2099,
13,
198,
198,
9,
317,
2727,
2099,
460,
635,
307,
286,
262,
976,
2099,
286,
281,
4683,
2134,
13,
198,
9,
304,
13,
70,
13,
2727,
2099,
705,
774,
62,
6759,
48624,
8298,
6,
2727,
351,
262,
976,
2099,
286,
705,
6759,
48624,
6,
5721,
286,
705,
76,
3301,
6,
3084,
25,
198,
9936,
47,
1546,
25,
1259,
62,
6759,
48624,
8298,
41876,
1667,
64,
12,
6759,
48624,
11,
198,
220,
220,
220,
220,
220,
220,
1259,
62,
6759,
48624,
21601,
34178,
1667,
64,
12,
6759,
48624,
11,
366,
393,
302,
487,
1068,
284,
281,
2134,
2099,
351,
705,
31271,
7336,
6,
198,
220,
220,
220,
220,
220,
220,
1259,
62,
6759,
48624,
11245,
41876,
1259,
62,
6759,
48624,
21601,
13,
366,
273,
460,
635,
787,
4941,
284,
1194,
705,
25598,
2099,
2099,
6,
628,
198,
9,
32112,
942,
290,
18628,
33220,
198,
198,
9,
30481,
257,
4645,
290,
5387,
3084,
286,
262,
976,
2099,
286,
705,
82,
22560,
6,
48323,
3084,
25,
198,
26947,
25,
2082,
62,
82,
22560,
41876,
264,
22560,
11,
366,
4645,
220,
198,
220,
220,
220,
220,
220,
340,
62,
82,
22560,
41876,
43679,
3963,
264,
22560,
13,
366,
5387,
3084,
198,
198,
9,
30481,
257,
4645,
290,
5387,
3084,
286,
262,
976,
2099,
286,
705,
82,
22560,
6,
48323,
3084,
475,
4375,
257,
649,
5721,
25,
198,
9936,
47,
1546,
25,
347,
43312,
3963,
953,
62,
82,
22560,
13,
198,
220,
220,
220,
220,
220,
220,
3268,
5097,
52,
7206,
41876,
264,
22560,
13,
198,
9936,
47,
1546,
25,
649,
62,
28665,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
23578,
3963,
953,
62,
82,
22560,
13,
198,
198,
26947,
25,
2082,
62,
82,
22560,
62,
23144,
41876,
953,
62,
82,
22560,
11,
366,
4441,
4645,
262,
976,
2099,
286,
8308,
9518,
264,
22560,
198,
220,
220,
220,
220,
220,
340,
62,
82,
22560,
62,
23144,
41876,
43679,
3963,
953,
62,
82,
22560,
13,
366,
4441,
5387,
3084,
262,
976,
2099,
286,
8308,
9518,
264,
22560,
198,
198,
9,
30481,
257,
3084,
422,
6632,
25,
198,
198,
9,
284,
307,
3767,
986,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS y_ref_scan_manager DEFINITION PUBLIC CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES y_if_scan_manager.
PRIVATE SECTION.
DATA ref_scan TYPE REF TO cl_ci_scan.
ENDCLASS.
CLASS y_ref_scan_manager IMPLEMENTATION.
METHOD y_if_scan_manager~is_scan_ok.
CONSTANTS ok TYPE syst_subrc VALUE 0.
CHECK ref_scan IS NOT INITIAL.
result = xsdbool( ref_scan->subrc = ok ).
ENDMETHOD.
METHOD y_if_scan_manager~set_ref_scan.
ref_scan = io_ref_scan.
y_if_scan_manager~levels = ref_scan->levels.
y_if_scan_manager~structures = ref_scan->structures.
y_if_scan_manager~statements = ref_scan->statements.
y_if_scan_manager~tokens = ref_scan->tokens.
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
62,
5420,
62,
35836,
62,
37153,
5550,
20032,
17941,
44731,
29244,
6158,
44731,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
331,
62,
361,
62,
35836,
62,
37153,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
1006,
62,
35836,
41876,
4526,
37,
5390,
537,
62,
979,
62,
35836,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
331,
62,
5420,
62,
35836,
62,
37153,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
331,
62,
361,
62,
35836,
62,
37153,
93,
271,
62,
35836,
62,
482,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
12876,
41876,
827,
301,
62,
7266,
6015,
26173,
8924,
657,
13,
198,
220,
220,
220,
5870,
25171,
1006,
62,
35836,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
1255,
796,
2124,
82,
9945,
970,
7,
1006,
62,
35836,
3784,
7266,
6015,
796,
12876,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
331,
62,
361,
62,
35836,
62,
37153,
93,
2617,
62,
5420,
62,
35836,
13,
198,
220,
220,
220,
1006,
62,
35836,
796,
33245,
62,
5420,
62,
35836,
13,
628,
220,
220,
220,
331,
62,
361,
62,
35836,
62,
37153,
93,
46170,
796,
1006,
62,
35836,
3784,
46170,
13,
198,
220,
220,
220,
331,
62,
361,
62,
35836,
62,
37153,
93,
7249,
942,
796,
1006,
62,
35836,
3784,
7249,
942,
13,
198,
220,
220,
220,
331,
62,
361,
62,
35836,
62,
37153,
93,
14269,
3196,
796,
1006,
62,
35836,
3784,
14269,
3196,
13,
198,
220,
220,
220,
331,
62,
361,
62,
35836,
62,
37153,
93,
83,
482,
641,
796,
1006,
62,
35836,
3784,
83,
482,
641,
13,
198,
220,
23578,
49273,
13,
628,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class zcl_abap_graph_string_template definition public create public .
public section.
data template type string read-only .
data:
varnames type table of string read-only .
data varvalues type tihttpnvp read-only .
data var_not_found type flag read-only .
class-methods create
importing
!i_template type csequence
returning
value(r_result) type ref to zcl_abap_graph_string_template .
methods set_variable
importing
!name type string
!value type any .
methods render
returning
value(output) type string .
protected section.
private section.
types:
begin of ty_chunk,
offset type i,
length type i,
replace type flag,
variablename type string,
value type string,
end of ty_chunk .
data:
chunks type table of ty_chunk .
methods parse .
methods decode
importing
!encoded type string
returning
value(decoded) type string .
methods varname
importing
!match type string
returning
value(varname) type string .
methods get_var_value
importing
!i_variablename type string
returning
value(r_result) type string .
ENDCLASS.
CLASS ZCL_ABAP_GRAPH_STRING_TEMPLATE IMPLEMENTATION.
method create.
create object r_result.
r_result->template = i_template.
r_result->parse( ).
endmethod.
method decode.
case encoded.
when '\T'.
decoded = cl_abap_char_utilities=>horizontal_tab.
when '\N'.
decoded = cl_abap_char_utilities=>newline.
when '\R'.
decoded = cl_abap_char_utilities=>cr_lf(1).
when '\F'.
decoded = cl_abap_char_utilities=>form_feed.
when others.
decoded = encoded+1.
endcase.
endmethod.
method get_var_value.
field-symbols: <var> like line of varvalues.
read table varvalues assigning <var> with key name = i_variablename.
if sy-subrc = 0.
r_result = <var>-value.
else.
var_not_found = 'X'.
endif.
endmethod.
method parse.
data: regex type ref to cl_abap_regex,
matcher type ref to cl_abap_matcher,
matches type match_result_tab,
lastchunk like line of chunks,
tmp type string.
field-symbols: <match> like line of matches,
<chunk> like line of chunks.
create object regex
exporting
pattern =
'(\\.)|(\{\s*(?:(?:[a-zA-Z_][a-z_0-9]*)|(?:<[a-zA-Z_][a-z_0-9]*>))(?:(?:->?|=>)[a-zA-Z_][a-z_0-9]*)*\s*\})'
ignore_case = abap_false.
matcher = regex->create_matcher( text = template ).
matches = matcher->find_all( ).
sort matches by offset.
loop at matches assigning <match>.
append initial line to chunks assigning <chunk>.
"if there's something between matches, add it
lastchunk-offset = lastchunk-offset + lastchunk-length.
if lastchunk-offset < <match>-offset.
<chunk>-length = <match>-offset - lastchunk-offset.
<chunk>-offset = lastchunk-offset.
append initial line to chunks assigning <chunk>.
endif.
"now the actual variable to be replaced
<chunk>-length = <match>-length.
<chunk>-offset = <match>-offset.
<chunk>-replace = 'X'.
tmp = template+<chunk>-offset(<chunk>-length).
translate tmp to upper case.
if tmp(1) = '\'.
<chunk>-value = decode( tmp ).
else.
<chunk>-variablename = varname( tmp ).
endif.
lastchunk = <chunk>.
endloop.
lastchunk-offset = lastchunk-offset + lastchunk-length.
if strlen( template ) > lastchunk-offset.
append initial line to chunks assigning <chunk>.
<chunk>-length = strlen( template ) - lastchunk-offset.
<chunk>-offset = lastchunk-offset.
endif.
endmethod.
method render.
data: varvalue type string.
field-symbols: <chunk> like line of chunks,
<var> type data.
loop at chunks assigning <chunk>.
if <chunk>-replace = ''.
concatenate output template+<chunk>-offset(<chunk>-length) into output respecting blanks.
elseif <chunk>-variablename = ''.
concatenate output <chunk>-value into output respecting blanks.
else.
varvalue = get_var_value( <chunk>-variablename ).
concatenate output varvalue into output respecting blanks.
endif.
endloop.
endmethod.
method set_variable.
data: var like line of varvalues,
td type ref to cl_abap_typedescr,
temp(50) type c.
var-name = name.
translate var-name to upper case.
td = cl_abap_typedescr=>describe_by_data( value ).
if td->kind = cl_abap_typedescr=>kind_elem.
case td->type_kind.
when cl_abap_typedescr=>typekind_float.
if value < 1000000000.
write value to temp style cl_abap_format=>o_simple.
else.
write value to temp style cl_abap_format=>o_engineering.
endif.
var-value = temp.
condense var-value no-gaps.
when cl_abap_typedescr=>typekind_date
or cl_abap_typedescr=>typekind_time
or cl_abap_typedescr=>typekind_decfloat
or cl_abap_typedescr=>typekind_decfloat16
or cl_abap_typedescr=>typekind_decfloat34.
write value to temp.
var-value = temp.
condense var-value.
when cl_abap_typedescr=>typekind_int
or cl_abap_typedescr=>typekind_int1
or '8' " cl_abap_typedescr=>typekind_int8
or cl_abap_typedescr=>typekind_int2
or cl_abap_typedescr=>typekind_hex.
var-value = value.
condense var-value.
when others.
var-value = value.
endcase.
endif.
delete varvalues where name = var-name.
append var to varvalues.
endmethod.
method varname.
data: l type i.
l = strlen( match ) - 2.
varname = match+1(l).
condense varname no-gaps.
collect varname into varnames.
endmethod.
ENDCLASS.
| [
4871,
1976,
565,
62,
397,
499,
62,
34960,
62,
8841,
62,
28243,
6770,
1171,
2251,
1171,
764,
628,
220,
1171,
2665,
13,
628,
220,
220,
220,
1366,
11055,
2099,
4731,
1100,
12,
8807,
764,
198,
220,
220,
220,
1366,
25,
198,
220,
220,
220,
220,
220,
1401,
14933,
220,
220,
220,
220,
220,
2099,
3084,
286,
4731,
1100,
12,
8807,
764,
198,
220,
220,
220,
1366,
1401,
27160,
2099,
46668,
4023,
77,
36133,
1100,
12,
8807,
764,
198,
220,
220,
220,
1366,
1401,
62,
1662,
62,
9275,
2099,
6056,
1100,
12,
8807,
764,
628,
220,
220,
220,
1398,
12,
24396,
82,
2251,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
28243,
220,
220,
220,
220,
2099,
269,
43167,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
81,
62,
20274,
8,
2099,
1006,
284,
1976,
565,
62,
397,
499,
62,
34960,
62,
8841,
62,
28243,
764,
198,
220,
220,
220,
5050,
900,
62,
45286,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
3672,
220,
2099,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
8367,
2099,
597,
764,
198,
220,
220,
220,
5050,
8543,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
22915,
8,
2099,
4731,
764,
198,
220,
6861,
2665,
13,
198,
220,
2839,
2665,
13,
628,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
2221,
286,
1259,
62,
354,
2954,
11,
198,
220,
220,
220,
220,
220,
220,
220,
11677,
220,
220,
220,
220,
220,
220,
2099,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4129,
220,
220,
220,
220,
220,
220,
2099,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6330,
220,
220,
220,
220,
220,
2099,
6056,
11,
198,
220,
220,
220,
220,
220,
220,
220,
5553,
397,
11925,
480,
2099,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
220,
220,
220,
220,
220,
220,
220,
2099,
4731,
11,
198,
220,
220,
220,
220,
220,
886,
286,
1259,
62,
354,
2954,
764,
628,
220,
220,
220,
1366,
25,
198,
220,
220,
220,
220,
220,
22716,
2099,
3084,
286,
1259,
62,
354,
2954,
764,
628,
220,
220,
220,
5050,
21136,
764,
198,
220,
220,
220,
5050,
36899,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
12685,
9043,
220,
220,
220,
220,
220,
220,
2099,
4731,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
12501,
9043,
8,
2099,
4731,
764,
198,
220,
220,
220,
5050,
1401,
3672,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
15699,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
4731,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
85,
1501,
480,
8,
2099,
4731,
764,
198,
220,
220,
220,
5050,
651,
62,
7785,
62,
8367,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
25641,
397,
11925,
480,
2099,
4731,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
81,
62,
20274,
8,
2099,
4731,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
62,
10761,
31300,
62,
18601,
2751,
62,
51,
3620,
6489,
6158,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
2446,
2251,
13,
628,
198,
220,
220,
220,
2251,
2134,
374,
62,
20274,
13,
628,
220,
220,
220,
374,
62,
20274,
3784,
28243,
796,
1312,
62,
28243,
13,
198,
220,
220,
220,
374,
62,
20274,
3784,
29572,
7,
6739,
628,
198,
220,
886,
24396,
13,
628,
198,
220,
2446,
36899,
13,
628,
220,
220,
220,
1339,
30240,
13,
198,
220,
220,
220,
220,
220,
618,
705,
59,
51,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
875,
9043,
796,
537,
62,
397,
499,
62,
10641,
62,
315,
2410,
14804,
17899,
38342,
62,
8658,
13,
198,
220,
220,
220,
220,
220,
618,
705,
59,
45,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
875,
9043,
796,
537,
62,
397,
499,
62,
10641,
62,
315,
2410,
14804,
3605,
1370,
13,
198,
220,
220,
220,
220,
220,
618,
705,
59,
49,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
875,
9043,
796,
537,
62,
397,
499,
62,
10641,
62,
315,
2410,
14804,
6098,
62,
1652,
7,
16,
737,
198,
220,
220,
220,
220,
220,
618,
705,
59,
37,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
875,
9043,
796,
537,
62,
397,
499,
62,
10641,
62,
315,
2410,
14804,
687,
62,
12363,
13,
198,
220,
220,
220,
220,
220,
618,
1854,
13,
198,
220,
220,
220,
220,
220,
220,
220,
875,
9043,
796,
30240,
10,
16,
13,
198,
220,
220,
220,
886,
7442,
13,
628,
198,
220,
886,
24396,
13,
628,
198,
220,
2446,
651,
62,
7785,
62,
8367,
13,
628,
220,
220,
220,
2214,
12,
1837,
2022,
10220,
25,
1279,
7785,
29,
588,
1627,
286,
1401,
27160,
13,
198,
220,
220,
220,
1100,
3084,
1401,
27160,
38875,
1279,
7785,
29,
351,
1994,
1438,
796,
1312,
62,
25641,
397,
11925,
480,
13,
198,
220,
220,
220,
611,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
220,
220,
374,
62,
20274,
796,
1279,
7785,
29,
12,
8367,
13,
198,
220,
220,
220,
2073,
13,
198,
220,
220,
220,
220,
220,
1401,
62,
1662,
62,
9275,
796,
705,
55,
4458,
198,
220,
220,
220,
45762,
13,
628,
220,
886,
24396,
13,
628,
198,
220,
2446,
21136,
13,
628,
220,
220,
220,
1366,
25,
40364,
220,
220,
220,
220,
2099,
1006,
284,
537,
62,
397,
499,
62,
260,
25636,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2603,
2044,
220,
220,
2099,
1006,
284,
537,
62,
397,
499,
62,
6759,
2044,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7466,
220,
220,
2099,
2872,
62,
20274,
62,
8658,
11,
198,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_ZDEMO_FE_ADD_COLUM_DPC_EXT definition
public
inheriting from ZCL_ZDEMO_FE_ADD_COLUM_DPC
create public .
public section.
protected section.
private section.
ENDCLASS.
CLASS ZCL_ZDEMO_FE_ADD_COLUM_DPC_EXT IMPLEMENTATION.
ENDCLASS.
| [
4871,
1168,
5097,
62,
57,
39429,
46,
62,
15112,
62,
29266,
62,
25154,
5883,
62,
35,
5662,
62,
13918,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
1168,
5097,
62,
57,
39429,
46,
62,
15112,
62,
29266,
62,
25154,
5883,
62,
35,
5662,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
57,
39429,
46,
62,
15112,
62,
29266,
62,
25154,
5883,
62,
35,
5662,
62,
13918,
30023,
2538,
10979,
6234,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |