content
stringlengths 4
1.04M
| input_ids
sequencelengths 2
1.02k
| attention_mask
sequencelengths 2
1.02k
|
---|---|---|
*&---------------------------------------------------------------------*
*& Report ZIS_EXAMPLE
*&---------------------------------------------------------------------*
report zis_example.
include zis_example_top.
include zis_example_f01.
start-of-selection.
include = 'X'.
perform perform_write.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
220,
1168,
1797,
62,
6369,
2390,
16437,
198,
9,
5,
10097,
30934,
9,
198,
13116,
1976,
271,
62,
20688,
13,
198,
198,
17256,
1976,
271,
62,
20688,
62,
4852,
13,
198,
17256,
1976,
271,
62,
20688,
62,
69,
486,
13,
198,
198,
9688,
12,
1659,
12,
49283,
13,
198,
198,
17256,
796,
705,
55,
4458,
198,
525,
687,
1620,
62,
13564,
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
] |
FUNCTION zcafm_customer_delete.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(PI_CUSTOMER) TYPE KNA1-KUNNR
*" VALUE(PI_TEST) TYPE CHAR1
*" EXPORTING
*" VALUE(SE_RETURN) TYPE BAPIRET2
*"----------------------------------------------------------------------
*----------------------------------------------------------------------*
* Function Module ZCAFM_CUSTOMER_DELETE *
* *----------------------------------------------------------------------*
* * *
* * ID-Reference: MuleSoft templates *
* * *
* * This BAPI aims to set deletion flag for particular customer. If par. *
* * PI_TEST is provided no change is performed. *
* *----------------------------------------------------------------------*
* * Change Log: *
* * *
* * Who Date Text *
* * MMARUSKIN 03.07.2014 Init creation. *
* *----------------------------------------------------------------------*
* Global data declarations
CONSTANTS: lc_obj_task TYPE cmd_ei_object_task VALUE 'M', "M=Create/Change
lc_msg_cls TYPE sy-msgid VALUE 'ZMULESOFTINTEGRATION'.
DATA: ls_customer TYPE cmds_ei_extern,
lt_customers TYPE cmds_ei_main,
ls_mes_error TYPE cvis_message,
lv_par TYPE sy-msgv1.
*- Prepare data
ls_customer-header-object_instance-kunnr = pi_customer.
ls_customer-header-object_task = lc_obj_task.
ls_customer-central_data-central-data-loevm = 'X'.
ls_customer-central_data-central-datax-loevm = 'X'.
APPEND ls_customer TO lt_customers-customers.
lv_par = pi_customer.
*- Run change of material via standard functionality
CALL METHOD cmd_ei_api=>maintain_bapi
EXPORTING
iv_test_run = pi_test
iv_collect_messages = 'X'
is_master_data = lt_customers
IMPORTING
es_message_defective = ls_mes_error.
*- Error handling
IF ls_mes_error-is_error IS INITIAL AND pi_test IS INITIAL.
COMMIT WORK AND WAIT.
CALL FUNCTION 'BALW_BAPIRETURN_GET2' "okay: flag set!
EXPORTING
type = 'I'
cl = lc_msg_cls
number = 100
par1 = lv_par
parameter = ''
field = ''
IMPORTING
return = se_return.
ELSE.
ROLLBACK WORK. "#EC CI_ROLLBACK
CALL FUNCTION 'BALW_BAPIRETURN_GET2' "problem: flag NOT set!
EXPORTING
type = 'E'
cl = lc_msg_cls
number = 101
par1 = lv_par
parameter = ''
field = ''
IMPORTING
return = se_return.
ENDIF.
ENDFUNCTION. | [
42296,
4177,
2849,
1849,
89,
66,
1878,
76,
62,
23144,
263,
62,
33678,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
1849,
39317,
25,
198,
9,
1,
1849,
1849,
3955,
15490,
2751,
198,
9,
1,
8828,
1849,
39488,
7,
11901,
62,
34,
7759,
2662,
1137,
8,
1849,
25216,
1849,
1849,
42,
4535,
16,
12,
42,
4944,
24723,
198,
9,
1,
8828,
1849,
39488,
7,
11901,
62,
51,
6465,
8,
1849,
25216,
1849,
1849,
38019,
16,
198,
9,
1,
1849,
1849,
6369,
15490,
2751,
198,
9,
1,
8828,
1849,
39488,
7,
5188,
62,
26087,
27064,
8,
1849,
25216,
1849,
1849,
33,
17614,
26087,
17,
198,
9,
1,
10097,
23031,
198,
198,
9,
10097,
23031,
9,
198,
9,
1849,
1849,
22203,
1849,
26796,
1849,
57,
8141,
23264,
62,
34,
7759,
2662,
1137,
62,
7206,
2538,
9328,
1849,
9,
198,
9,
1849,
9,
10097,
23031,
9,
198,
9,
1849,
9,
1849,
9,
198,
9,
1849,
9,
1849,
2389,
12,
26687,
25,
1849,
44,
2261,
18380,
1849,
11498,
17041,
1849,
9,
198,
9,
1849,
9,
1849,
9,
198,
9,
1849,
9,
1849,
1212,
1849,
33,
17614,
1849,
1385,
82,
1849,
1462,
1849,
2617,
1849,
2934,
1616,
295,
1849,
32109,
1849,
1640,
1849,
3911,
13174,
1849,
23144,
263,
13,
1849,
1532,
1849,
1845,
13,
1849,
9,
198,
9,
1849,
9,
1849,
11901,
62,
51,
6465,
1849,
271,
1849,
41279,
1849,
3919,
1849,
3803,
1849,
271,
1849,
525,
12214,
13,
1849,
9,
198,
9,
1849,
9,
10097,
23031,
9,
198,
9,
1849,
9,
1849,
19400,
1849,
11187,
25,
1849,
9,
198,
9,
1849,
9,
1849,
9,
198,
9,
1849,
9,
1849,
8241,
1849,
10430,
1849,
8206,
1849,
9,
198,
9,
1849,
9,
1849,
12038,
1503,
2937,
42,
1268,
1849,
3070,
13,
2998,
13,
4967,
1849,
31768,
1849,
38793,
13,
1849,
9,
198,
9,
1849,
9,
10097,
23031,
9,
198,
198,
9,
1849,
22289,
1849,
7890,
1849,
32446,
24355,
628,
44320,
1849,
10943,
2257,
1565,
4694,
25,
1849,
44601,
62,
26801,
62,
35943,
1849,
25216,
1849,
28758,
62,
20295,
62,
15252,
62,
35943,
1849,
39488,
1849,
6,
44,
3256,
1849,
1,
44,
28,
16447,
14,
19400,
198,
17811,
8828,
1849,
44601,
62,
19662,
62,
565,
82,
1849,
1849,
25216,
1849,
1837,
12,
19662,
312,
1849,
39488,
1849,
6,
57,
44,
6239,
1546,
46,
9792,
12394,
7156,
49,
6234,
4458,
44320,
1849,
26947,
25,
1849,
7278,
62,
23144,
263,
1849,
1849,
25216,
1849,
28758,
82,
62,
20295,
62,
1069,
759,
11,
198,
8828,
33477,
1849,
2528,
62,
23144,
364,
1849,
25216,
1849,
28758,
82,
62,
20295,
62,
12417,
11,
198,
8828,
33477,
1849,
7278,
62,
6880,
62,
18224,
1849,
25216,
1849,
66,
4703,
62,
20500,
11,
198,
8828,
33477,
1849,
6780,
62,
1845,
8828,
4603,
1849,
25216,
1849,
1837,
12,
19662,
85,
16,
13,
628,
198,
198,
9,
12,
1849,
37534,
533,
1849,
7890,
628,
44320,
1849,
7278,
62,
23144,
263,
12,
25677,
12,
15252,
62,
39098,
12,
74,
20935,
81,
1849,
28,
1849,
14415,
62,
23144,
263,
13,
44320,
1849,
7278,
62,
23144,
263,
12,
25677,
12,
15252,
62,
35943,
1849,
28,
1849,
44601,
62,
26801,
62,
35943,
13,
44320,
1849,
7278,
62,
23144,
263,
12,
31463,
62,
7890,
12,
31463,
12,
7890,
12,
5439,
1990,
76,
1849,
28,
1849,
6,
55,
4458,
44320,
1849,
7278,
62,
23144,
263,
12,
31463,
62,
7890,
12,
31463,
12,
19608,
897,
12,
5439,
1990,
76,
1849,
28,
1849,
6,
55,
4458,
44320,
1849,
24805,
10619,
1849,
7278,
62,
23144,
263,
1849,
10468,
1849,
2528,
62,
23144,
364,
12,
23144,
364,
13,
44320,
1849,
6780,
62,
1845,
1849,
28,
1849,
14415,
62,
23144,
263,
13,
628,
198,
9,
12,
1849,
10987,
1849,
3803,
1849,
1659,
1849,
33665,
1849,
8869,
1849,
20307,
1849,
8818,
1483,
628,
44320,
1849,
34,
7036,
1849,
49273,
1849,
28758,
62,
20295,
62,
15042,
14804,
76,
32725,
62,
65,
15042,
198,
33477,
1849,
6369,
15490,
2751,
198,
8828,
1849,
1849,
452,
62,
9288,
62,
5143,
17811,
1849,
1849,
28,
1849,
14415,
62,
9288,
198,
8828,
1849,
1849,
452,
62,
33327,
62,
37348,
1095,
1849,
1849,
28,
1849,
6,
55,
6,
198,
8828,
1849,
1849,
271,
62,
9866,
62,
7890,
8828,
4603,
1849,
28,
1849,
2528,
62,
23144,
364,
198,
33477,
1849,
3955,
15490,
2751,
198,
8828,
1849,
1849,
274,
62,
20500,
62,
4299,
13967,
1849,
28,
1849,
7278,
62,
6880,
62,
18224,
13,
628,
198,
9,
12,
1849,
12331,
1849,
4993,
1359,
628,
44320,
1849,
5064,
1849,
7278,
62,
6880,
62,
18224,
12,
271,
62,
18224,
1849,
1797,
1849,
1268,
2043,
12576,
1849,
6981,
1849,
14415,
62,
9288,
1849,
1797,
1849,
1268,
2043,
12576,
13,
198,
33477,
1849,
9858,
36393,
1849,
33249,
1849,
6981,
1849,
15543,
2043,
13,
198,
33477,
1849,
34,
7036,
1849,
42296,
4177,
2849,
1849,
6,
33,
1847,
54,
62,
33,
17614,
26087,
27064,
62,
18851,
17,
6,
8828,
1849,
1,
482,
323,
25,
1849,
32109,
1849,
2617,
0,
198,
8828,
1849,
1849,
6369,
15490,
2751,
198,
8828,
33477,
1849,
4906,
8828,
1849,
1849,
28,
1849,
6,
40,
6,
198,
8828,
33477,
1849,
565,
8828,
33477,
1849,
28,
1849,
44601,
62,
19662,
62,
565,
82,
198,
8828,
33477,
1849,
17618,
33477,
1849,
28,
1849,
3064,
198,
8828,
33477,
1849,
1845,
16,
8828,
1849,
1849,
28,
1849,
6780,
62,
1845,
198,
8828,
33477,
1849,
17143,
2357,
1849,
28,
1849,
7061,
198,
8828,
33477,
1849,
3245,
8828,
1849,
28,
1849,
7061,
198,
8828,
1849,
1849,
3955,
15490,
2751,
198,
8828,
33477,
1849,
7783,
33477,
1849,
28,
1849,
325,
62,
7783,
13,
44320,
1849,
3698,
5188,
13,
198,
33477,
1849,
13252,
3069,
31098,
1849,
33249,
13,
39172,
39172,
8828,
1849,
1,
2,
2943,
1849,
25690,
62,
13252,
3069,
31098,
198,
33477,
1849,
34,
7036,
1849,
42296,
4177,
2849,
1849,
6,
33,
1847,
54,
62,
33,
17614,
26087,
27064,
62,
18851,
17,
6,
8828,
1849,
1,
45573,
25,
1849,
32109,
1849,
11929,
1849,
2617,
0,
198,
8828,
1849,
1849,
6369,
15490,
2751,
198,
8828,
33477,
1849,
4906,
8828,
1849,
1849,
28,
1849,
6,
36,
6,
198,
8828,
33477,
1849,
565,
8828,
33477,
1849,
28,
1849,
44601,
62,
19662,
62,
565,
82,
198,
8828,
33477,
1849,
17618,
33477,
1849,
28,
1849,
8784,
198,
8828,
33477,
1849,
1845,
16,
8828,
1849
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
*&---------------------------------------------------------------------*
*& Report zdemo_ain_cl25
*&---------------------------------------------------------------------*
*& This is the demo program written for book:
*& ALV grid in nutshell by Łukasz Pęgiel
*&---------------------------------------------------------------------*
*&- 1st character ='C' if we're using custom colour or 'X' for default *
*&- 2nd character = colour code (from 0 to 7) *
*& 0 = background colour *
*& 1 = blue *
*& 2 = gray *
*& 3 = yellow *
*& 4 = blue/gray *
*& 5 = green *
*& 6 = red *
*& 7 = orange *
*&- 3rd character = intensified (0=off, 1=on) *
*&- 4th character = inverse display (0=off, 1=on) *
*&---------------------------------------------------------------------*
report zdemo_ain_cl25.
include zdemo_ain_include_screen.
start-of-selection.
types: begin of t_data,
no_emphasize type spfli-carrid,
standard type spfli-carrid,
c100 type spfli-carrid,
c101 type spfli-carrid,
c110 type spfli-carrid,
c111 type spfli-carrid,
c200 type spfli-carrid,
c201 type spfli-carrid,
c210 type spfli-carrid,
c211 type spfli-carrid,
c300 type spfli-carrid,
c301 type spfli-carrid,
c310 type spfli-carrid,
c311 type spfli-carrid,
c400 type spfli-carrid,
c401 type spfli-carrid,
c410 type spfli-carrid,
c411 type spfli-carrid,
c500 type spfli-carrid,
c501 type spfli-carrid,
c510 type spfli-carrid,
c511 type spfli-carrid,
c600 type spfli-carrid,
c601 type spfli-carrid,
c610 type spfli-carrid,
c611 type spfli-carrid,
c700 type spfli-carrid,
c701 type spfli-carrid,
c710 type spfli-carrid,
c711 type spfli-carrid,
c000 type spfli-carrid,
c001 type spfli-carrid,
c010 type spfli-carrid,
c011 type spfli-carrid,
end of t_data.
data flights type standard table of t_data.
select carrid as no_emphasize
up to 50 rows from spfli
into corresponding fields of table @flights.
loop at flights assigning field-symbol(<fl>).
<fl>-standard = <fl>-c100 = <fl>-c101 = <fl>-c110 = <fl>-c111 =
<fl>-c200 = <fl>-c201 = <fl>-c210 = <fl>-c211 =
<fl>-c300 = <fl>-c301 = <fl>-c310 = <fl>-c311 =
<fl>-c400 = <fl>-c401 = <fl>-c410 = <fl>-c411 =
<fl>-c500 = <fl>-c501 = <fl>-c510 = <fl>-c511 =
<fl>-c600 = <fl>-c601 = <fl>-c610 = <fl>-c611 =
<fl>-c700 = <fl>-c701 = <fl>-c710 = <fl>-c711 =
<fl>-c000 = <fl>-c001 = <fl>-c010 = <fl>-c011 = <fl>-no_emphasize.
endloop.
data(grid) = new cl_gui_alv_grid(
i_parent = new cl_gui_custom_container( container_name = 'CC' )
).
data(fcat) = value lvc_t_fcat(
( fieldname = 'NO_EMPHASIZE' reptext = 'NO_EMPHASIZE' )
( fieldname = 'STANDARD' emphasize = abap_true reptext = 'STANDARD' )
( fieldname = 'C100' emphasize = 'C100' reptext = 'C100')
( fieldname = 'C101' emphasize = 'C101' reptext = 'C101')
( fieldname = 'C110' emphasize = 'C110' reptext = 'C110')
( fieldname = 'C111' emphasize = 'C111' reptext = 'C111')
( fieldname = 'C200' emphasize = 'C200' reptext = 'C200')
( fieldname = 'C201' emphasize = 'C201' reptext = 'C201')
( fieldname = 'C210' emphasize = 'C210' reptext = 'C210')
( fieldname = 'C211' emphasize = 'C211' reptext = 'C211')
( fieldname = 'C300' emphasize = 'C300' reptext = 'C300')
( fieldname = 'C301' emphasize = 'C301' reptext = 'C301')
( fieldname = 'C310' emphasize = 'C310' reptext = 'C310')
( fieldname = 'C311' emphasize = 'C311' reptext = 'C311')
( fieldname = 'C400' emphasize = 'C400' reptext = 'C400')
( fieldname = 'C401' emphasize = 'C401' reptext = 'C401')
( fieldname = 'C410' emphasize = 'C410' reptext = 'C410')
( fieldname = 'C411' emphasize = 'C411' reptext = 'C411')
( fieldname = 'C500' emphasize = 'C500' reptext = 'C500')
( fieldname = 'C501' emphasize = 'C501' reptext = 'C501')
( fieldname = 'C510' emphasize = 'C510' reptext = 'C510')
( fieldname = 'C511' emphasize = 'C511' reptext = 'C511')
( fieldname = 'C600' emphasize = 'C600' reptext = 'C600')
( fieldname = 'C601' emphasize = 'C601' reptext = 'C601')
( fieldname = 'C610' emphasize = 'C610' reptext = 'C610')
( fieldname = 'C611' emphasize = 'C611' reptext = 'C611')
( fieldname = 'C700' emphasize = 'C700' reptext = 'C700')
( fieldname = 'C701' emphasize = 'C701' reptext = 'C701')
( fieldname = 'C710' emphasize = 'C710' reptext = 'C710')
( fieldname = 'C711' emphasize = 'C711' reptext = 'C711')
( fieldname = 'C000' emphasize = 'C000' reptext = 'C000')
( fieldname = 'C001' emphasize = 'C001' reptext = 'C001')
( fieldname = 'C010' emphasize = 'C010' reptext = 'C010')
( fieldname = 'C011' emphasize = 'C011' reptext = 'C011')
).
grid->set_table_for_first_display(
exporting
is_layout = value #( col_opt = abap_true )
changing
it_fieldcatalog = fcat
it_outtab = flights
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4
).
if sy-subrc eq 0.
call screen 0100.
endif.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
1976,
9536,
78,
62,
391,
62,
565,
1495,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
770,
318,
262,
13605,
1430,
3194,
329,
1492,
25,
198,
9,
5,
8355,
53,
10706,
287,
43875,
416,
25370,
223,
2724,
292,
89,
350,
128,
247,
70,
8207,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
12,
352,
301,
2095,
796,
6,
34,
6,
611,
356,
821,
1262,
2183,
9568,
393,
705,
55,
6,
329,
4277,
1635,
198,
9,
5,
12,
362,
358,
2095,
796,
9568,
2438,
357,
6738,
657,
284,
767,
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,
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,
657,
796,
4469,
9568,
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,
352,
796,
4171,
220,
220,
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,
362,
796,
12768,
220,
220,
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,
513,
796,
7872,
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,
604,
796,
4171,
14,
44605,
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,
642,
796,
4077,
220,
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,
718,
796,
2266,
220,
220,
220,
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,
767,
796,
10912,
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,
12,
513,
4372,
2095,
796,
32413,
357,
15,
28,
2364,
11,
352,
28,
261,
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,
1635,
198,
9,
5,
12,
604,
400,
2095,
796,
34062,
3359,
357,
15,
28,
2364,
11,
352,
28,
261,
8,
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,
13116,
1976,
9536,
78,
62,
391,
62,
565,
1495,
13,
198,
198,
17256,
1976,
9536,
78,
62,
391,
62,
17256,
62,
9612,
13,
198,
198,
9688,
12,
1659,
12,
49283,
13,
628,
220,
3858,
25,
2221,
286,
256,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
645,
62,
368,
5902,
1096,
2099,
599,
2704,
72,
12,
66,
3258,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3210,
220,
220,
220,
220,
2099,
599,
2704,
72,
12,
66,
3258,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
3064,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
599,
2704,
72,
12,
66,
3258,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
8784,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
599,
2704,
72,
12,
66,
3258,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
11442,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
599,
2704,
72,
12,
66,
3258,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
16243,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
599,
2704,
72,
12,
66,
3258,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
2167,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
599,
2704,
72,
12,
66,
3258,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
1264,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
599,
2704,
72,
12,
66,
3258,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
21536,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
599,
2704,
72,
12
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
**********************************************************************
* FILTER EMPTY VALUES
**********************************************************************
CLASS lcl_empty_filter DEFINITION FINAL.
PUBLIC SECTION.
INTERFACES /mbtools/if_ajson_filter.
ENDCLASS.
CLASS lcl_empty_filter IMPLEMENTATION.
METHOD /mbtools/if_ajson_filter~keep_node.
rv_keep = boolc(
( iv_visit = /mbtools/if_ajson_filter=>visit_type-value AND is_node-value IS NOT INITIAL ) OR
( iv_visit <> /mbtools/if_ajson_filter=>visit_type-value AND is_node-children > 0 ) ).
" children = 0 on open for initially empty nodes and on close for filtered ones
ENDMETHOD.
ENDCLASS.
**********************************************************************
* FILTER PREDEFINED PATHS
**********************************************************************
CLASS lcl_paths_filter DEFINITION FINAL.
PUBLIC SECTION.
INTERFACES /mbtools/if_ajson_filter.
METHODS constructor
IMPORTING
it_skip_paths TYPE string_table OPTIONAL
iv_skip_paths TYPE string OPTIONAL
RAISING
/mbtools/cx_ajson_error.
PRIVATE SECTION.
DATA mt_skip_paths TYPE HASHED TABLE OF string WITH UNIQUE KEY table_line.
ENDCLASS.
CLASS lcl_paths_filter IMPLEMENTATION.
METHOD /mbtools/if_ajson_filter~keep_node.
DATA lv_path TYPE string.
lv_path = is_node-path && is_node-name.
READ TABLE mt_skip_paths WITH KEY table_line = lv_path TRANSPORTING NO FIELDS.
rv_keep = boolc( sy-subrc <> 0 ).
ENDMETHOD.
METHOD constructor.
DATA lv_s TYPE string.
DATA lt_tab TYPE string_table.
FIELD-SYMBOLS <s> TYPE string.
IF boolc( iv_skip_paths IS INITIAL ) = boolc( it_skip_paths IS INITIAL ). " XOR
/mbtools/cx_ajson_error=>raise( 'no filter path specified' ).
ENDIF.
LOOP AT it_skip_paths INTO lv_s.
lv_s = to_lower( lv_s ).
APPEND lv_s TO lt_tab.
ENDLOOP.
IF iv_skip_paths IS NOT INITIAL.
SPLIT iv_skip_paths AT ',' INTO TABLE lt_tab.
LOOP AT lt_tab ASSIGNING <s>.
IF <s> IS INITIAL.
DELETE lt_tab INDEX sy-tabix.
CONTINUE.
ENDIF.
<s> = condense( to_lower( <s> ) ).
ENDLOOP.
ENDIF.
SORT lt_tab BY table_line.
DELETE ADJACENT DUPLICATES FROM lt_tab.
mt_skip_paths = lt_tab.
ENDMETHOD.
ENDCLASS.
**********************************************************************
* MULTI FILTER
**********************************************************************
CLASS lcl_and_filter DEFINITION FINAL.
PUBLIC SECTION.
INTERFACES /mbtools/if_ajson_filter.
METHODS constructor
IMPORTING
it_filters TYPE /mbtools/if_ajson_filter=>ty_filter_tab
RAISING
/mbtools/cx_ajson_error.
PRIVATE SECTION.
DATA mt_filters TYPE /mbtools/if_ajson_filter=>ty_filter_tab.
ENDCLASS.
CLASS lcl_and_filter IMPLEMENTATION.
METHOD /mbtools/if_ajson_filter~keep_node.
DATA li_filter LIKE LINE OF mt_filters.
rv_keep = abap_true.
LOOP AT mt_filters INTO li_filter.
rv_keep = li_filter->keep_node(
is_node = is_node
iv_visit = iv_visit ).
IF rv_keep = abap_false.
RETURN.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD constructor.
DATA li_filter LIKE LINE OF it_filters.
LOOP AT it_filters INTO li_filter WHERE table_line IS BOUND.
APPEND li_filter TO mt_filters.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
17174,
17174,
2466,
1174,
198,
9,
220,
34020,
5781,
38144,
9936,
26173,
35409,
198,
17174,
17174,
2466,
1174,
198,
198,
31631,
300,
565,
62,
28920,
62,
24455,
5550,
20032,
17941,
25261,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1220,
2022,
31391,
14,
361,
62,
1228,
1559,
62,
24455,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
28920,
62,
24455,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1220,
2022,
31391,
14,
361,
62,
1228,
1559,
62,
24455,
93,
14894,
62,
17440,
13,
628,
220,
220,
220,
374,
85,
62,
14894,
796,
20512,
66,
7,
198,
220,
220,
220,
220,
220,
357,
21628,
62,
4703,
270,
796,
1220,
2022,
31391,
14,
361,
62,
1228,
1559,
62,
24455,
14804,
4703,
270,
62,
4906,
12,
8367,
5357,
318,
62,
17440,
12,
8367,
3180,
5626,
3268,
2043,
12576,
1267,
6375,
198,
220,
220,
220,
220,
220,
357,
21628,
62,
4703,
270,
1279,
29,
1220,
2022,
31391,
14,
361,
62,
1228,
1559,
62,
24455,
14804,
4703,
270,
62,
4906,
12,
8367,
5357,
318,
62,
17440,
12,
17197,
1875,
657,
1267,
6739,
198,
220,
220,
220,
366,
1751,
796,
657,
319,
1280,
329,
7317,
6565,
13760,
290,
319,
1969,
329,
29083,
3392,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198,
198,
17174,
17174,
2466,
1174,
198,
9,
220,
34020,
5781,
4810,
1961,
36,
20032,
1961,
28748,
7998,
198,
17174,
17174,
2466,
1174,
198,
198,
31631,
300,
565,
62,
6978,
82,
62,
24455,
5550,
20032,
17941,
25261,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1220,
2022,
31391,
14,
361,
62,
1228,
1559,
62,
24455,
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,
340,
62,
48267,
62,
6978,
82,
41876,
4731,
62,
11487,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
48267,
62,
6978,
82,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1220,
2022,
31391,
14,
66,
87,
62,
1228,
1559,
62,
18224,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
45079,
62,
48267,
62,
6978,
82,
41876,
367,
11211,
1961,
43679,
3963,
4731,
13315,
4725,
33866,
8924,
35374,
3084,
62,
1370,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
6978,
82,
62,
24455,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
1220,
2022,
31391,
14,
361,
62,
1228,
1559,
62,
24455,
93,
14894,
62,
17440,
13,
628,
220,
220,
220,
42865,
300,
85,
62,
6978,
41876,
4731,
13,
628,
220,
220,
220,
300,
85,
62,
6978,
796,
318,
62,
17440,
12,
6978,
11405,
318,
62,
17440,
12,
3672,
13,
198,
220,
220,
220,
20832,
43679,
45079,
62,
48267,
62,
6978,
82,
13315,
35374,
3084,
62,
1370,
796,
300,
85,
62,
6978,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
13,
198,
220,
220,
220,
374,
85,
62,
14894,
796,
20512,
66,
7,
827,
12,
7266,
6015,
1279,
29,
657,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
42865,
300,
85,
62,
82,
41876,
4731,
13,
198,
220,
220,
220,
42865,
300,
83,
62,
8658,
41876,
4731,
62,
11487,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
1279,
82,
29,
41876,
4731,
13,
628,
220,
220,
220,
16876,
20512,
66,
7,
21628,
62,
48267,
62,
6978,
82,
3180,
3268,
2043,
12576,
1267,
796,
20512,
66,
7,
340,
62,
48267,
62,
6978,
82,
3180,
3268,
2043,
12576,
6739,
366,
1395,
1581,
198,
220,
220,
220,
220,
220,
1220,
2022,
31391,
14,
66,
87,
62,
1228,
1559,
62,
18224,
14804,
40225,
7,
705,
3919,
8106,
3108,
7368,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
17579,
3185,
5161,
340,
62,
48267,
62,
6978,
82,
39319,
300,
85,
62,
82,
13,
198,
220,
220,
220,
220,
220,
300,
85,
62,
82,
796,
284,
62,
21037,
7,
300,
85,
62,
82,
6739,
198,
220,
220,
220,
220,
220,
43504,
10619,
300,
85,
62,
82,
5390,
300,
83,
62,
8658,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
16876,
21628,
62,
48267,
62,
6978,
82,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
46341,
2043,
21628,
62,
48267,
62,
6978,
82,
5161,
705,
4032,
39319,
43679,
300,
83,
62,
8658,
13,
198,
220,
220,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
8658,
24994,
3528,
15871,
1279,
82,
28401,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
1279,
82,
29,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5550,
2538,
9328,
300,
83,
62,
8658,
24413,
6369,
827,
12,
8658,
844,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1279,
82,
29,
796,
1779,
1072,
7,
284,
62,
21037,
7,
1279,
82,
29,
1267,
6739,
198,
220,
220,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
311,
9863,
300,
83,
62,
8658,
11050,
3084,
62,
1370,
13,
198,
220,
220,
220,
5550,
2538,
9328,
5984,
41,
2246,
3525,
35480,
31484,
29462,
16034,
300,
83,
62,
8658,
13,
628,
220,
220,
220,
45079,
62,
48267,
62,
6978,
82,
796,
300,
83,
62,
8658,
13,
628,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198,
198,
17174,
17174,
2466,
1174,
198,
9,
337,
16724,
40,
34020,
5781,
198,
17174,
17174,
2466,
1174,
198,
198,
31631,
300,
565,
62,
392,
62,
24455,
5550,
20032,
17941,
25261,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1220,
2022,
31391,
14,
361,
62,
1228,
1559,
62,
24455,
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,
340,
62,
10379,
1010,
41876,
1220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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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3535,
1168,
49864,
3955,
47,
62,
53,
55,
62,
35353,
1137,
62,
51,
6465,
62,
34,
16820,
13,
220,
220,
366,
44,
1546,
4090,
8264,
12,
2389,
11485,
198,
198,
9,
3268,
5097,
52,
7206,
406,
57,
49864,
3955,
47,
62,
35353,
1137,
6158,
62,
51,
6465,
62,
34,
3727,
1961,
986,
220,
220,
220,
366,
10714,
1398,
6770,
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
] |
CLASS zcl_abapgit_object_ssst DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
CONSTANTS: c_style_active TYPE tdactivate VALUE 'A'.
PRIVATE SECTION.
METHODS validate_font
IMPORTING iv_tdfamily TYPE tdfamily
RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_SSST IMPLEMENTATION.
METHOD validate_font.
DATA: lv_tdfamily TYPE tfo01-tdfamily.
SELECT SINGLE tdfamily FROM tfo01 INTO lv_tdfamily
WHERE tdfamily = iv_tdfamily.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Font family not found' ).
ENDIF.
ENDMETHOD. "validate_font
METHOD zif_abapgit_object~changed_by.
SELECT SINGLE lastuser FROM stxsadm INTO rv_user
WHERE stylename = ms_item-obj_name.
IF sy-subrc <> 0.
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: lv_stylename TYPE tdssname.
lv_stylename = ms_item-obj_name.
CALL FUNCTION 'SSF_DELETE_STYLE'
EXPORTING
i_stylename = lv_stylename
i_with_dialog = abap_false
i_with_confirm_dialog = abap_false
EXCEPTIONS
no_name = 1
no_style = 2
style_locked = 3
cancelled = 4
no_access_permission = 5
illegal_language = 6
OTHERS = 7.
IF sy-subrc <> 0 AND sy-subrc <> 2.
zcx_abapgit_exception=>raise( 'error from SSF_DELETE_STYLE' ).
ENDIF.
ENDMETHOD. "delete
METHOD zif_abapgit_object~deserialize.
* see fm SSF_UPLOAD_STYLE
DATA: ls_header TYPE ssfcats,
ls_new_header TYPE ssfcats,
lt_paragraphs TYPE TABLE OF ssfparas,
lt_strings TYPE TABLE OF ssfstrings,
lt_tabstops TYPE TABLE OF stxstab.
FIELD-SYMBOLS: <lv_spras> TYPE spras.
io_xml->read( EXPORTING iv_name = 'HEADER'
CHANGING cg_data = ls_header ).
io_xml->read( EXPORTING iv_name = 'SSFPARAS'
CHANGING cg_data = lt_paragraphs ).
io_xml->read( EXPORTING iv_name = 'SSFSTRINGS'
CHANGING cg_data = lt_strings ).
io_xml->read( EXPORTING iv_name = 'STXSTAB'
CHANGING cg_data = lt_tabstops ).
validate_font( ls_header-tdfamily ).
CALL FUNCTION 'SSF_READ_STYLE' "Just load FG
EXPORTING
i_style_name = ls_header-stylename
i_style_active_flag = 'A'
EXCEPTIONS
OTHERS = 0.
SET PARAMETER ID 'EUK' FIELD iv_package.
ASSIGN ('(SAPLSTXBS)MASTER_LANGUAGE') TO <lv_spras>.
IF sy-subrc = 0.
<lv_spras> = ls_header-masterlang.
ENDIF.
CALL FUNCTION 'SSF_SAVE_STYLE'
EXPORTING
i_header = ls_header
IMPORTING
e_header = ls_new_header
TABLES
i_paragraphs = lt_paragraphs
i_strings = lt_strings
i_tabstops = lt_tabstops.
IF ls_new_header IS NOT INITIAL.
CALL FUNCTION 'SSF_ACTIVATE_STYLE'
EXPORTING
i_stylename = ls_header-stylename
EXCEPTIONS
no_name = 1
no_style = 2
cancelled = 3
no_access_permission = 4
illegal_language = 5
OTHERS = 6.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from SSF_ACTIVATE_STYLE' ).
ENDIF.
ENDIF.
ENDMETHOD. "deserialize
METHOD zif_abapgit_object~exists.
DATA: lv_stylename TYPE stxsadm-stylename.
SELECT SINGLE stylename
FROM stxshead INTO lv_stylename
WHERE active = c_style_active
AND stylename = ms_item-obj_name
AND vari = ''.
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD. "zif_abapgit_object~exists
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
ENDMETHOD. "zif_abapgit_object~get_metadata
METHOD zif_abapgit_object~has_changed_since.
rv_changed = abap_true.
ENDMETHOD. "zif_abapgit_object~has_changed_since
METHOD zif_abapgit_object~jump.
DATA: ls_bcdata TYPE bdcdata,
lt_bcdata TYPE STANDARD TABLE OF bdcdata.
ls_bcdata-program = 'SAPMSSFS'.
ls_bcdata-dynpro = '0100'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO lt_bcdata.
CLEAR ls_bcdata.
ls_bcdata-fnam = 'SSFSCREENS-SNAME'.
ls_bcdata-fval = ms_item-obj_name.
APPEND ls_bcdata TO lt_bcdata.
CLEAR ls_bcdata.
ls_bcdata-fnam = 'BDC_OKCODE'.
ls_bcdata-fval = '=DISPLAY'.
APPEND ls_bcdata TO lt_bcdata.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
STARTING NEW TASK 'GIT'
EXPORTING
tcode = 'SMARTSTYLES'
mode_val = 'E'
TABLES
using_tab = lt_bcdata
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from ABAP4_CALL_TRANSACTION, SSST' ).
ENDIF.
ENDMETHOD. "jump
METHOD zif_abapgit_object~serialize.
* see fm SSF_DOWNLOAD_STYLE
DATA: lv_style_name TYPE tdssname,
ls_header TYPE ssfcats,
lt_paragraphs TYPE TABLE OF ssfparas,
lt_strings TYPE TABLE OF ssfstrings,
lt_tabstops TYPE TABLE OF stxstab.
lv_style_name = ms_item-obj_name.
CALL FUNCTION 'SSF_READ_STYLE'
EXPORTING
i_style_name = lv_style_name
i_style_active_flag = c_style_active
i_style_variant = '%MAIN'
i_style_language = mv_language
IMPORTING
e_header = ls_header
TABLES
e_paragraphs = lt_paragraphs
e_strings = lt_strings
e_tabstops = lt_tabstops
EXCEPTIONS
no_name = 1
no_style = 2
active_style_not_found = 3
inactive_style_not_found = 4
no_variant = 5
no_main_variant = 6
cancelled = 7
no_access_permission = 8
OTHERS = 9.
IF sy-subrc = 2.
RETURN.
ELSEIF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from SSF_READ_STYLE' ).
ENDIF.
CLEAR ls_header-version.
CLEAR ls_header-firstuser.
CLEAR ls_header-firstdate.
CLEAR ls_header-firsttime.
CLEAR ls_header-lastuser.
CLEAR ls_header-lastdate.
CLEAR ls_header-lasttime.
io_xml->add( iv_name = 'HEADER'
ig_data = ls_header ).
io_xml->add( ig_data = lt_paragraphs
iv_name = 'SSFPARAS' ).
io_xml->add( ig_data = lt_strings
iv_name = 'SSFSTRINGS' ).
io_xml->add( ig_data = lt_tabstops
iv_name = 'STXSTAB' ).
ENDMETHOD. "serialize
METHOD zif_abapgit_object~is_locked.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'E_SMSTYLE'
iv_argument = |{ ms_item-obj_name }| ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
824,
301,
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,
7102,
2257,
1565,
4694,
25,
269,
62,
7635,
62,
5275,
41876,
41560,
39022,
26173,
8924,
705,
32,
4458,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
26571,
62,
10331,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
83,
7568,
5993,
41876,
256,
7568,
5993,
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,
5432,
2257,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
26571,
62,
10331,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
83,
7568,
5993,
41876,
256,
6513,
486,
12,
83,
7568,
5993,
13,
628,
198,
220,
220,
220,
33493,
311,
2751,
2538,
256,
7568,
5993,
16034,
256,
6513,
486,
39319,
300,
85,
62,
83,
7568,
5993,
198,
220,
220,
220,
220,
220,
33411,
256,
7568,
5993,
796,
21628,
62,
83,
7568,
5993,
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,
23252,
1641,
407,
1043,
6,
6739,
198,
220,
220,
220,
23578,
5064,
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,
12102,
378,
62,
10331,
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,
938,
7220,
16034,
336,
34223,
324,
76,
39319,
374,
85,
62,
7220,
198,
220,
220,
220,
220,
220,
33411,
22152,
12453,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
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,
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,
301,
2645,
12453,
41876,
41560,
824,
3672,
13,
628,
198,
220,
220,
220,
300,
85,
62,
301,
2645,
12453,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
5432,
37,
62,
7206,
2538,
9328,
62,
2257,
56,
2538,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
301,
2645,
12453,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
301,
2645,
12453,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
4480,
62,
38969,
519,
220,
220,
220,
220,
220,
220,
220,
220,
796,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
4480,
62,
10414,
2533,
62,
38969,
519,
796,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
645,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
645,
62,
7635,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
3918,
62,
24162,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
16769,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
604,
198,
220,
220,
220,
220,
220,
220,
220,
645,
62,
15526,
62,
525,
3411,
220,
796,
642,
198,
220,
220,
220,
220,
220,
220,
220,
5293,
62,
16129,
220,
220,
220,
220,
220,
796,
718,
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,
796,
767,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
5357,
827,
12,
7266,
6015,
1279,
29,
362,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
18224,
422,
6723,
37,
62,
7206,
2538,
9328,
62,
2257,
56,
2538,
6,
6739,
198,
220,
220,
220,
23578,
5064,
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,
33678,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
8906,
48499,
1096,
13,
198,
9,
766,
277,
76,
6723,
37,
62,
52,
6489,
41048,
62,
2257,
56,
2538,
628,
220,
220,
220,
42865,
25,
43979,
62,
25677,
220,
220,
220,
220,
41876,
37786,
16072,
1381,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
3605,
62,
25677,
41876,
37786,
16072,
1381,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
20360,
82,
41876,
43679,
3963,
264,
28202,
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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
] |
class ZCX_AOF_NOT_FOUND definition
public
inheriting from ZCX_AOF_ERROR
create public .
public section.
methods CONSTRUCTOR
importing
!TEXTID like IF_T100_MESSAGE=>T100KEY optional
!PREVIOUS like PREVIOUS optional .
protected section.
private section.
ENDCLASS.
CLASS ZCX_AOF_NOT_FOUND IMPLEMENTATION.
method CONSTRUCTOR.
CALL METHOD SUPER->CONSTRUCTOR
EXPORTING
PREVIOUS = PREVIOUS
.
clear me->textid.
if textid is initial.
IF_T100_MESSAGE~T100KEY = IF_T100_MESSAGE=>DEFAULT_TEXTID.
else.
IF_T100_MESSAGE~T100KEY = TEXTID.
endif.
endmethod.
ENDCLASS.
| [
4871,
1168,
34,
55,
62,
32,
19238,
62,
11929,
62,
37,
15919,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
1168,
34,
55,
62,
32,
19238,
62,
24908,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
32541,
2389,
588,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
14804,
51,
3064,
20373,
11902,
198,
220,
220,
220,
220,
220,
5145,
46437,
12861,
20958,
588,
22814,
12861,
20958,
11902,
764,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
34,
55,
62,
32,
19238,
62,
11929,
62,
37,
15919,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
2446,
7102,
46126,
1581,
13,
198,
34,
7036,
337,
36252,
33088,
3784,
10943,
46126,
1581,
198,
6369,
15490,
2751,
198,
46437,
12861,
20958,
796,
22814,
12861,
20958,
198,
13,
198,
20063,
502,
3784,
5239,
312,
13,
198,
361,
2420,
312,
318,
4238,
13,
198,
220,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
93,
51,
3064,
20373,
796,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
14804,
7206,
38865,
62,
32541,
2389,
13,
198,
17772,
13,
198,
220,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
93,
51,
3064,
20373,
796,
40383,
2389,
13,
198,
32088,
13,
198,
220,
886,
24396,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report ZMCI_DENEME10
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZMCI_DENEME10.
select *
FROM lfa1
INTO TABLE @DATA(lt_lfa1).
"xxxx
LOOP AT lt_lfa1 INTO DATA(ls_lfa1).
WRITE:/ ls_lfa1-name1, ls_lfa1-name2.
ENDLOOP.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
1168,
9655,
40,
62,
41819,
3620,
36,
940,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
2200,
15490,
1168,
9655,
40,
62,
41819,
3620,
36,
940,
13,
198,
198,
19738,
1635,
198,
220,
16034,
300,
13331,
16,
198,
220,
39319,
43679,
2488,
26947,
7,
2528,
62,
1652,
64,
16,
737,
198,
1,
12343,
198,
220,
17579,
3185,
5161,
300,
83,
62,
1652,
64,
16,
39319,
42865,
7,
7278,
62,
1652,
64,
16,
737,
198,
220,
220,
220,
44423,
14079,
43979,
62,
1652,
64,
16,
12,
3672,
16,
11,
43979,
62,
1652,
64,
16,
12,
3672,
17,
13,
198,
220,
23578,
21982,
3185,
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
] |
CLASS zcl_amp_customizing DEFINITION PUBLIC ABSTRACT.
PUBLIC SECTION.
TYPES ty_metric_collectors TYPE STANDARD TABLE OF zamp_config_prov WITH KEY metric_group.
METHODS constructor
IMPORTING scenario TYPE zamp_config_scen-metric_scenario.
METHODS get_metric_collectors ABSTRACT
RETURNING VALUE(metric_collectors) TYPE ty_metric_collectors.
METHODS get_metric_converter ABSTRACT
RETURNING VALUE(converter_class) TYPE REF TO zif_amp_converter.
PROTECTED SECTION.
DATA scenario TYPE zamp_config_scen-metric_scenario.
DATA metric_collectors TYPE ty_metric_collectors.
DATA metric_converter_class_name TYPE zamp_config_scen-converter_class.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_amp_customizing IMPLEMENTATION.
METHOD constructor.
me->scenario = scenario.
SELECT SINGLE converter_class
FROM zamp_config_scen
INTO @me->metric_converter_class_name
WHERE metric_scenario = @me->scenario.
IF sy-subrc <> 0.
ASSERT 1 = 2.
ENDIF.
SELECT *
FROM zamp_config_prov
INTO TABLE @metric_collectors
WHERE metric_scenario = @me->scenario.
IF sy-subrc <> 0.
ASSERT 1 = 2.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
696,
62,
23144,
2890,
5550,
20032,
17941,
44731,
9564,
18601,
10659,
13,
198,
220,
44731,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
1259,
62,
4164,
1173,
62,
33327,
669,
41876,
49053,
9795,
43679,
3963,
1976,
696,
62,
11250,
62,
15234,
13315,
35374,
18663,
62,
8094,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
8883,
41876,
1976,
696,
62,
11250,
62,
1416,
268,
12,
4164,
1173,
62,
1416,
39055,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
4164,
1173,
62,
33327,
669,
9564,
18601,
10659,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
4164,
1173,
62,
33327,
669,
8,
41876,
1259,
62,
4164,
1173,
62,
33327,
669,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
4164,
1173,
62,
1102,
332,
353,
9564,
18601,
10659,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
1102,
332,
353,
62,
4871,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
696,
62,
1102,
332,
353,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
42865,
8883,
41876,
1976,
696,
62,
11250,
62,
1416,
268,
12,
4164,
1173,
62,
1416,
39055,
13,
198,
220,
220,
220,
42865,
18663,
62,
33327,
669,
41876,
1259,
62,
4164,
1173,
62,
33327,
669,
13,
198,
220,
220,
220,
42865,
18663,
62,
1102,
332,
353,
62,
4871,
62,
3672,
41876,
1976,
696,
62,
11250,
62,
1416,
268,
12,
1102,
332,
353,
62,
4871,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
1976,
565,
62,
696,
62,
23144,
2890,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
502,
3784,
1416,
39055,
796,
8883,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
38394,
62,
4871,
198,
220,
220,
220,
16034,
1976,
696,
62,
11250,
62,
1416,
268,
198,
220,
220,
220,
39319,
2488,
1326,
3784,
4164,
1173,
62,
1102,
332,
353,
62,
4871,
62,
3672,
198,
220,
220,
220,
33411,
18663,
62,
1416,
39055,
796,
2488,
1326,
3784,
1416,
39055,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
24994,
17395,
352,
796,
362,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
33493,
1635,
198,
220,
220,
220,
16034,
1976,
696,
62,
11250,
62,
15234,
198,
220,
220,
220,
39319,
43679,
2488,
4164,
1173,
62,
33327,
669,
198,
220,
220,
220,
33411,
18663,
62,
1416,
39055,
796,
2488,
1326,
3784,
1416,
39055,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
24994,
17395,
352,
796,
362,
13,
198,
220,
220,
220,
23578,
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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
] |
FUNCTION SELECT_COUNT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_KEY) TYPE KEY
*" EXPORTING
*" REFERENCE(E_COUNT) TYPE SY-DBCNT
*"----------------------------------------------------------------------
SELECT COUNT(*) FROM some_table INTO e_count
WHERE key = i_key AND
state >= '000' AND state <= '999'.
ENDFUNCTION. | [
42296,
4177,
2849,
33493,
62,
34,
28270,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
20373,
8,
41876,
220,
35374,
198,
9,
1,
220,
7788,
15490,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
36,
62,
34,
28270,
8,
41876,
220,
19704,
12,
35,
2749,
11251,
198,
9,
1,
10097,
23031,
628,
198,
220,
33493,
327,
28270,
7,
28104,
16034,
617,
62,
11487,
39319,
304,
62,
9127,
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,
33411,
1994,
796,
1312,
62,
2539,
5357,
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,
1181,
18189,
705,
830,
6,
5357,
1181,
19841,
705,
17032,
4458,
220,
220,
628,
198,
1677,
8068,
4944,
4177,
2849,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 ZADF_DEMO_AZURE_EVENTHUB
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zadf_demo_azure_eventhub.
CONSTANTS: gc_interface TYPE zinterface_id VALUE 'DEMO_EHUB'.
TYPES: BEGIN OF lty_data,
carrid TYPE s_carr_id,
connid TYPE s_conn_id,
fldate TYPE s_date,
planetype TYPE s_planetye,
END OF lty_data.
DATA: it_headers TYPE tihttpnvp,
wa_headers TYPE LINE OF tihttpnvp,
lv_string TYPE string,
lv_response TYPE string,
cx_interface TYPE REF TO zcx_interace_config_missing,
cx_http TYPE REF TO zcx_http_client_failed,
cx_adf_service TYPE REF TO zcx_adf_service,
oref_eventhub TYPE REF TO zcl_adf_service_eventhub,
oref TYPE REF TO zcl_adf_service,
filter TYPE zbusinessid,
lv_http_status TYPE i,
lo_json TYPE REF TO cl_trex_json_serializer,
lv1_string TYPE string,
lv_xstring TYPE xstring,
it_data TYPE STANDARD TABLE OF lty_data.
*Sample data population for sending it to Azure eventhub
SELECT carrid connid fldate planetype
FROM sflight UP TO 10 ROWS
INTO TABLE it_data.
IF sy-subrc EQ 0.
TRY.
**Calling Factory method to instantiate eventhub client
oref = zcl_adf_service_factory=>create( iv_interface_id = gc_interface
iv_business_identifier = filter ).
oref_eventhub ?= oref.
**Setting Expiry time
CALL METHOD oref_eventhub->add_expiry_time
EXPORTING
iv_expiry_hour = 0
iv_expiry_min = 15
iv_expiry_sec = 0.
CREATE OBJECT lo_json
EXPORTING
data = it_data.
lo_json->serialize( ).
lv1_string = lo_json->get_data( ).
*Convert input string data to Xstring format
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = lv1_string
IMPORTING
buffer = lv_xstring
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
**Sending Converted SAP data to Azure Eventhub
CALL METHOD oref_eventhub->send
EXPORTING
request = lv_xstring "Input XSTRING of SAP Business Event data
it_headers = it_headers "Header attributes
IMPORTING
response = lv_response "Response from EventHub
ev_http_status = lv_http_status. "Status
CATCH zcx_interace_config_missing INTO cx_interface.
lv_string = cx_interface->get_text( ).
MESSAGE lv_string TYPE 'E'.
CATCH zcx_http_client_failed INTO cx_http .
lv_string = cx_http->get_text( ).
MESSAGE lv_string TYPE 'E'.
CATCH zcx_adf_service INTO cx_adf_service.
lv_string = cx_adf_service->get_text( ).
MESSAGE lv_string TYPE 'E'.
ENDTRY.
IF lv_http_status NE '201' AND
lv_http_status NE '200'.
MESSAGE 'SAP data not sent to Azure EventHub' TYPE 'E'.
ELSE.
MESSAGE 'SAP data sent to Azure EventHub' TYPE 'I'.
ENDIF.
ELSE.
MESSAGE 'No data in SFLIFHT' TYPE 'E'.
ENDIF.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
220,
1168,
2885,
37,
62,
39429,
46,
62,
22778,
11335,
62,
20114,
3525,
39,
10526,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
2200,
15490,
1976,
324,
69,
62,
9536,
78,
62,
1031,
495,
62,
15596,
40140,
13,
198,
198,
10943,
2257,
1565,
4694,
25,
308,
66,
62,
39994,
41876,
1976,
39994,
62,
312,
26173,
8924,
705,
39429,
46,
62,
42413,
10526,
4458,
198,
198,
9936,
47,
1546,
25,
347,
43312,
3963,
300,
774,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1097,
6058,
220,
220,
220,
41876,
220,
220,
220,
220,
264,
62,
66,
3258,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
48260,
312,
220,
220,
220,
41876,
220,
220,
220,
264,
62,
37043,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
277,
335,
378,
220,
220,
220,
41876,
220,
220,
220,
264,
62,
4475,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1410,
2963,
431,
41876,
220,
220,
220,
264,
62,
11578,
2963,
68,
11,
198,
220,
220,
220,
220,
220,
220,
23578,
3963,
300,
774,
62,
7890,
13,
198,
198,
26947,
25,
220,
220,
220,
220,
220,
220,
340,
62,
50145,
220,
220,
220,
220,
41876,
46668,
4023,
77,
36133,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2082,
62,
50145,
220,
220,
220,
220,
41876,
48920,
3963,
46668,
4023,
77,
36133,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
8841,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26209,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
39994,
220,
220,
41876,
4526,
37,
5390,
1976,
66,
87,
62,
3849,
558,
62,
11250,
62,
45688,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
4023,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
66,
87,
62,
4023,
62,
16366,
62,
47904,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
324,
69,
62,
15271,
41876,
4526,
37,
5390,
1976,
66,
87,
62,
324,
69,
62,
15271,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
267,
5420,
62,
15596,
40140,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
324,
69,
62,
15271,
62,
15596,
40140,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
267,
5420,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
324,
69,
62,
15271,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8106,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
22680,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
4023,
62,
13376,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
17752,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
83,
21510,
62,
17752,
62,
46911,
7509,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
16,
62,
8841,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
87,
8841,
220,
220,
220,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
62,
7890,
220,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
300,
774,
62,
7890,
13,
198,
198,
9,
36674,
1366,
3265,
329,
7216,
340,
284,
22134,
1785,
40140,
198,
46506,
220,
1097,
6058,
48260,
312,
277,
335,
378,
1410,
2963,
431,
198,
220,
220,
220,
220,
220,
220,
220,
16034,
264,
22560,
15958,
5390,
838,
371,
22845,
198,
220,
220,
220,
220,
220,
220,
220,
39319,
43679,
340,
62,
7890,
13,
198,
198,
5064,
827,
12,
7266,
6015,
36529,
657,
13,
628,
220,
7579,
56,
13,
198,
1174,
48593,
19239,
2446,
284,
9113,
9386,
1785,
40140,
5456,
628,
220,
220,
220,
220,
220,
267,
5420,
796,
1976,
565,
62,
324,
69,
62,
15271,
62,
69,
9548,
14804,
17953,
7,
21628,
62,
39994,
62,
312,
796,
308,
66,
62,
39994,
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,
21628,
62,
22680,
62,
738,
7483,
796,
8106,
6739,
198,
220,
220,
220,
220,
220,
267,
5420,
62,
15596,
40140,
5633,
28,
267,
5420,
13,
198,
198,
1174,
34149,
1475,
4063,
88,
640,
198,
220,
220,
220,
220,
220,
42815,
337,
36252,
267,
5420,
62,
15596,
40140,
3784,
2860,
62,
1069,
4063,
88,
62,
2435,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1069,
4063,
88,
62,
9769,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1069,
4063,
88,
62,
1084,
220,
796,
1315,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1069,
4063,
88,
62,
2363,
220,
796,
657,
13,
628,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
2376,
62,
17752,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
340,
62,
7890,
13,
198,
220,
220,
220,
220,
220,
2376,
62,
17752,
3784,
46911,
1096,
7,
6739,
198,
220,
220,
220,
220,
220,
300,
85,
16,
62,
8841,
220,
796,
2376,
62,
17752,
3784,
1136,
62,
7890,
7,
6739,
628,
198,
9,
3103,
1851,
5128,
4731,
1366,
284,
1395,
8841,
5794,
198,
220,
220,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
6173,
5653
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 ZCL_IM__GTT_SOF_LE_SHIPMNT definition
public
final
create public .
public section.
interfaces IF_EX_BADI_LE_SHIPMENT .
protected section.
private section.
ENDCLASS.
CLASS ZCL_IM__GTT_SOF_LE_SHIPMNT IMPLEMENTATION.
method IF_EX_BADI_LE_SHIPMENT~AT_SAVE.
endmethod.
METHOD if_ex_badi_le_shipment~before_update.
INCLUDE /saptrx/constants.
TYPE-POOLS: trxas.
DATA: l_structure_package TYPE devclass,
l_extflag TYPE flag.
DATA: lv_count TYPE i,
ls_comwa5 TYPE vbco5,
ls_comwa6 TYPE vbco6,
lv_fstop TYPE char255,
lv_lstop TYPE char255,
* Location Id
lv_locid TYPE zgtt_locid,
lv_appobjid TYPE /saptrx/aoid.
DATA: ls_vttk_old TYPE vttkvb,
ls_vttk TYPE vttkvb,
ls_vttk_tmp TYPE vttk,
ls_vtts_old TYPE vttsvb,
ls_vtts_delta TYPE vttsvb,
ls_vttp_delta TYPE vttpvb,
ls_vtsp_delta TYPE vtspvb,
ls_likp_delta TYPE likpvb,
ls_likp TYPE likp,
ls_likp_tmp TYPE likp,
ls_vbfas TYPE vbfas,
ls_vbfa_new TYPE vbfavb,
ls_likp_new TYPE likp,
ls_lips TYPE lips,
ls_stop TYPE zgtt_stop_info,
ls_dlv_watching_stop TYPE zgtt_dlv_watch_stop,
ls_eerel TYPE zgtt_sof_ee_rel.
DATA: lt_vbfas TYPE STANDARD TABLE OF vbfas,
lt_vbfa_new TYPE STANDARD TABLE OF vbfavb,
lt_vttk TYPE STANDARD TABLE OF vttkvb,
lt_vtts_delta TYPE STANDARD TABLE OF vttsvb,
lt_vttp_delta TYPE STANDARD TABLE OF vttpvb,
lt_vttp_delta_tmp TYPE STANDARD TABLE OF vttpvb,
lt_vtsp_delta TYPE STANDARD TABLE OF vtspvb,
lt_vtsp_delta_tmp TYPE STANDARD TABLE OF vtspvb,
lt_likp_delta TYPE STANDARD TABLE OF likpvb,
lt_likp_new TYPE STANDARD TABLE OF likp,
lt_lips TYPE STANDARD TABLE OF lips.
DATA: lt_stops_tmp TYPE zgtt_stops,
lt_dlv_watching_stops_tmp TYPE zgtt_dlv_watch_stops,
lt_stops TYPE zgtt_stops,
lt_dlv_watching_stops TYPE zgtt_dlv_watch_stops.
DATA: lt_control TYPE /saptrx/bapi_trk_control_tab,
lt_tracking_id TYPE /saptrx/bapi_trk_trkid_tab,
ls_trxserv TYPE /saptrx/trxserv,
lv_appsys TYPE logsys,
lt_appobj_ctabs TYPE trxas_appobj_ctabs,
lt_bapireturn TYPE bapiret2_t,
lv_trxserver_id TYPE /saptrx/trxservername,
lv_tzone TYPE timezone,
lt_exp_events TYPE /saptrx/bapi_trk_ee_tab.
DATA: ls_control TYPE LINE OF /saptrx/bapi_trk_control_tab,
ls_tracking_id TYPE LINE OF /saptrx/bapi_trk_trkid_tab,
ls_appobj_ctabs TYPE LINE OF trxas_appobj_ctabs,
ls_expeventdata TYPE LINE OF /saptrx/bapi_trk_ee_tab.
DATA: BEGIN OF ls_aotype,
obj_type TYPE /saptrx/trk_obj_type,
aot_type TYPE /saptrx/aotype,
END OF ls_aotype.
DATA: lt_aotype LIKE STANDARD TABLE OF ls_aotype,
lt_aotype_item LIKE STANDARD TABLE OF ls_aotype.
* Check package dependent BADI disabling
l_structure_package = '/SAPTRX/SCEM_AI_R3'.
CALL FUNCTION 'GET_R3_EXTENSION_SWITCH'
EXPORTING
i_structure_package = l_structure_package
IMPORTING
e_active = l_extflag
EXCEPTIONS
not_existing = 1
object_not_existing = 2
no_extension_object = 3
OTHERS = 4.
IF sy-subrc <> 0.
EXIT.
ENDIF.
IF l_extflag <> 'X'.
EXIT.
ENDIF.
* Check if any tracking server defined
CHECK im_shipments_before_update-tra_save_caller <> 'TRX'.
CALL FUNCTION '/SAPTRX/EVENT_MGR_CHECK'
EXCEPTIONS
no_event_mgr_available = 1.
IF sy-subrc <> 0.
EXIT.
ENDIF.
* Check if at least 1 active extractor exists
SELECT COUNT(*) INTO lv_count FROM /saptrx/aotypes
WHERE trk_obj_type EQ 'ESC_SHIPMT'
AND torelevant EQ 'X'.
CHECK lv_count GE 1. CLEAR lv_count.
SELECT COUNT(*) INTO lv_count FROM /saptrx/aotypes
WHERE trk_obj_type EQ 'ESC_DELIV'
AND torelevant EQ 'X'.
CHECK lv_count GE 1.
* GET CURRENT LOGICAL SYSTEM
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = lv_appsys.
* Actual Business Time zone
CALL FUNCTION 'GET_SYSTEM_TIMEZONE'
IMPORTING
timezone = lv_tzone
EXCEPTIONS
customizing_missing = 1
OTHERS = 2.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_INT_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_AZ_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_IF_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PF_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PR_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PT_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_DM_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_INT_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_AZ_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_IF_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PF_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PR_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PT_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_DM_ITEM'. APPEND ls_aotype TO lt_aotype_item.
* get the shipment header
MOVE im_shipments_before_update-new_vttk TO lt_vttk.
LOOP AT im_shipments_before_update-old_vttk INTO ls_vttk_old WHERE updkz = 'D'.
APPEND ls_vttk_old TO lt_vttk.
ENDLOOP.
LOOP AT lt_vttk INTO ls_vttk WHERE shtyp EQ '0003'.
CLEAR: lt_vttp_delta, lt_likp_delta, lt_vttp_delta_tmp, lt_vtsp_delta, lt_vtsp_delta_tmp, lt_vtts_delta.
MOVE im_shipments_before_update-new_vttp TO lt_vttp_delta.
APPEND LINES OF im_shipments_before_update-old_vttp TO lt_vttp_delta.
MOVE lt_vttp_delta TO lt_vttp_delta_tmp.
DELETE lt_vttp_delta WHERE ( updkz NE 'I' AND updkz NE 'D' ) OR tknum NE ls_vttk-tknum.
IF lt_vttp_delta IS NOT INITIAL.
LOOP AT lt_vttp_delta INTO ls_vttp_delta.
MOVE ls_vttp_delta-vbeln TO ls_likp_delta-vbeln.
COLLECT ls_likp_delta INTO lt_likp_delta.
ENDLOOP.
ENDIF.
MOVE im_shipments_before_update-new_vtsp TO lt_vtsp_delta.
APPEND LINES OF im_shipments_before_update-old_vtsp TO lt_vtsp_delta.
MOVE lt_vtsp_delta TO lt_vtsp_delta_tmp.
DELETE lt_vtsp_delta WHERE ( updkz NE 'I' AND updkz NE 'D' ) OR tknum NE ls_vttk-tknum.
IF lt_vtsp_delta IS NOT INITIAL.
LOOP AT lt_vtsp_delta INTO ls_vtsp_delta.
READ TABLE lt_vttp_delta_tmp INTO ls_vttp_delta WITH KEY tknum = ls_vtsp_delta-tknum
tpnum = ls_vtsp_delta-tpnum BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE ls_vttp_delta-vbeln TO ls_likp_delta-vbeln.
COLLECT ls_likp_delta INTO lt_likp_delta.
ENDIF.
ENDLOOP.
ENDIF.
MOVE im_shipments_before_update-new_vtts TO lt_vtts_delta.
APPEND LINES OF im_shipments_before_update-old_vtts TO lt_vtts_delta.
DELETE lt_vtts_delta WHERE tknum NE ls_vttk-tknum.
IF lt_vtts_delta IS NOT INITIAL.
LOOP AT lt_vtts_delta INTO ls_vtts_delta WHERE updkz = 'I' OR updkz = 'D'.
CLEAR: ls_vtsp_delta, ls_vttp_delta.
LOOP AT lt_vtsp_delta_tmp INTO ls_vtsp_delta WHERE tknum = ls_vtts_delta-tknum
AND tsnum = ls_vtts_delta-tsnum.
READ TABLE lt_vttp_delta_tmp INTO ls_vttp_delta WITH KEY tknum = ls_vtsp_delta-tknum
tpnum = ls_vtsp_delta-tpnum BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE ls_vttp_delta-vbeln TO ls_likp_delta-vbeln.
COLLECT ls_likp_delta INTO lt_likp_delta.
ENDIF.
ENDLOOP.
ENDLOOP.
LOOP AT lt_vtts_delta INTO ls_vtts_delta WHERE updkz <> 'I' AND updkz <> 'D'.
READ TABLE im_shipments_before_update-old_vtts INTO ls_vtts_old WITH KEY tknum = ls_vtts_delta-tknum
tsnum = ls_vtts_delta-tsnum BINARY SEARCH.
CHECK sy-subrc IS INITIAL.
IF ls_vtts_delta-knota NE ls_vtts_old-knota OR
ls_vtts_delta-vstel NE ls_vtts_old-vstel OR
ls_vtts_delta-werka NE ls_vtts_old-werka OR
ls_vtts_delta-kunna NE ls_vtts_old-kunna OR
ls_vtts_delta-lifna NE ls_vtts_old-lifna OR
ls_vtts_delta-kunnz NE ls_vtts_old-kunnz OR
ls_vtts_delta-vstez NE ls_vtts_old-vstez OR
ls_vtts_delta-lifnz NE ls_vtts_old-lifnz OR
ls_vtts_delta-werkz NE ls_vtts_old-werkz OR
ls_vtts_delta-knotz NE ls_vtts_old-knotz OR
ls_vtts_delta-dptbg NE ls_vtts_old-dptbg OR
ls_vtts_delta-uptbg NE ls_vtts_old-uptbg OR
ls_vtts_delta-dpten NE ls_vtts_old-dpten OR
ls_vtts_delta-upten NE ls_vtts_old-upten. .
CLEAR: ls_vtsp_delta, ls_vttp_delta.
LOOP AT lt_vtsp_delta_tmp INTO ls_vtsp_delta WHERE tknum = ls_vtts_delta-tknum
AND tsnum = ls_vtts_delta-tsnum.
READ TABLE lt_vttp_delta_tmp INTO ls_vttp_delta WITH KEY tknum = ls_vtsp_delta-tknum
tpnum = ls_vtsp_delta-tpnum BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE ls_vttp_delta-vbeln TO ls_likp_delta-vbeln.
COLLECT ls_likp_delta INTO lt_likp_delta.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR: lt_vbfa_new, lt_likp_new.
LOOP AT lt_likp_delta INTO ls_likp_delta.
CLEAR: ls_comwa6, lt_vbfas.
MOVE-CORRESPONDING ls_likp_delta TO ls_comwa6.
CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
EXPORTING
comwa = ls_comwa6
TABLES
vbfa_tab = lt_vbfas.
LOOP AT lt_vbfas INTO ls_vbfas WHERE vbtyp_n EQ '8' AND vbtyp_v EQ 'J'.
SELECT SINGLE * INTO ls_likp FROM likp WHERE vbeln = ls_vbfas-vbelv
AND lfart = 'LBNP'.
CHECK sy-subrc EQ 0.
SELECT SINGLE * INTO ls_vttk_tmp FROM vttk WHERE tknum = ls_vbfas-vbeln
AND shtyp EQ '0003'.
CHECK sy-subrc EQ 0.
MOVE-CORRESPONDING ls_vbfas TO ls_vbfa_new.
APPEND ls_vbfa_new TO lt_vbfa_new.
ENDLOOP.
SELECT SINGLE * INTO ls_likp FROM likp WHERE vbeln = ls_likp_delta-vbeln
AND lfart = 'LBNP'.
IF sy-subrc = 0.
COLLECT ls_likp INTO lt_likp_new.
ENDIF.
ENDLOOP.
LOOP AT lt_vttp_delta INTO ls_vttp_delta WHERE updkz = 'D'.
DELETE lt_vbfa_new WHERE vbeln = ls_vttp_delta-tknum
AND vbelv = ls_vttp_delta-vbeln.
ENDLOOP.
LOOP AT lt_vttp_delta INTO ls_vttp_delta WHERE updkz = 'I'.
READ TABLE lt_vbfa_new WITH KEY vbeln = ls_vttp_delta-tknum
vbelv = ls_vttp_delta-vbeln
TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
SELECT SINGLE * INTO ls_likp FROM likp WHERE vbeln = ls_vttp_delta-vbeln
AND lfart = 'LBNP'.
CHECK sy-subrc EQ 0.
CLEAR ls_vbfa_new.
ls_vbfa_new-vbelv = ls_vttp_delta-vbeln.
ls_vbfa_new-vbeln = ls_vttp_delta-tknum.
COLLECT ls_vbfa_new INTO lt_vbfa_new.
ENDIF.
ENDLOOP.
CHECK lt_likp_new IS NOT INITIAL.
CLEAR: lt_stops, lt_dlv_watching_stops.
LOOP AT lt_vbfa_new INTO ls_vbfa_new.
CLEAR: lt_stops_tmp, lt_dlv_watching_stops_tmp.
IF ls_vbfa_new-vbeln = ls_vttk-tknum.
CALL FUNCTION 'ZGTT_GET_STOPS_FROM_SHIPMENT'
EXPORTING
iv_tknum = ls_vttk-tknum
it_vtts_new = im_shipments_before_update-new_vtts
it_vtsp_new = im_shipments_before_update-new_vtsp
it_vttp_new = im_shipments_before_update-new_vttp
IMPORTING
et_stops = lt_stops_tmp
et_dlv_watching_stops = lt_dlv_watching_stops_tmp.
ELSE.
CALL FUNCTION 'ZGTT_GET_STOPS_FROM_SHIPMENT'
EXPORTING
iv_tknum = ls_vbfa_new-vbeln
IMPORTING
et_stops = lt_stops_tmp
et_dlv_watching_stops = lt_dlv_watching_stops_tmp.
ENDIF.
APPEND LINES OF lt_stops_tmp TO lt_stops.
APPEND LINES OF lt_dlv_watching_stops_tmp TO lt_dlv_watching_stops.
ENDLOOP.
SORT lt_stops BY stopid loccat.
SORT lt_dlv_watching_stops BY vbeln stopid loccat.
DELETE ADJACENT DUPLICATES FROM lt_stops COMPARING stopid loccat.
DELETE ADJACENT DUPLICATES FROM lt_dlv_watching_stops COMPARING vbeln stopid loccat.
* *************************************************************COMPOSE IDOC->
LOOP AT lt_aotype INTO ls_aotype.
SELECT SINGLE trxservername INTO lv_trxserver_id FROM /saptrx/aotypes
WHERE trk_obj_type EQ ls_aotype-obj_type
AND aotype EQ ls_aotype-aot_type.
SELECT SINGLE trx_server_id trx_server INTO ( ls_trxserv-trx_server_id, ls_trxserv-trx_server )
FROM /saptrx/trxserv
WHERE trx_server_id = lv_trxserver_id.
CLEAR: lt_appobj_ctabs, lt_control, lt_tracking_id, lt_exp_events.
LOOP AT lt_likp_new INTO ls_likp_new.
CLEAR: ls_appobj_ctabs.
ls_appobj_ctabs-trxservername = ls_trxserv-trx_server_id.
ls_appobj_ctabs-appobjtype = ls_aotype-aot_type.
ls_appobj_ctabs-appobjid = ls_likp_new-vbeln.
APPEND ls_appobj_ctabs TO lt_appobj_ctabs.
* update the impacted deliveries' shipment composition and tracking id table=>
CLEAR: ls_control.
ls_control-appsys = lv_appsys.
ls_control-appobjtype = ls_aotype-aot_type.
ls_control-appobjid = ls_likp_new-vbeln.
ls_control-paramname = 'YN_DLV_NO'.
ls_control-value = ls_likp_new-vbeln.
APPEND ls_control TO lt_control.
ls_control-paramname = 'ACTUAL_BUSINESS_TIMEZONE'.
ls_control-value = lv_tzone.
APPEND ls_control TO lt_control.
ls_control-paramname = 'ACTUAL_BUSINESS_DATETIME'.
CONCATENATE '0' sy-datum sy-uzeit INTO ls_control-value.
APPEND ls_control TO lt_control.
CLEAR: lv_count.
LOOP AT lt_vbfa_new INTO ls_vbfa_new WHERE vbelv = ls_likp_new-vbeln.
lv_count = lv_count + 1.
ls_control-paramname = 'YN_SHP_LINE_COUNT'.
ls_control-paramindex = lv_count.
ls_control-value = lv_count.
SHIFT ls_control-value LEFT DELETING LEADING space.
APPEND ls_control TO lt_control.
ls_control-paramname = 'YN_SHP_NO'.
ls_control-paramindex = lv_count.
ls_control-value = ls_vbfa_new-vbeln.
APPEND ls_control TO lt_control.
CLEAR: lv_fstop, lv_lstop.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_vbfa_new-vbelv
AND stopid(10) = ls_vbfa_new-vbeln.
IF lv_fstop IS INITIAL.
lv_fstop = ls_dlv_watching_stop-stopid.
ENDIF.
lv_lstop = ls_dlv_watching_stop-stopid.
ENDLOOP.
ls_control-paramname = 'YN_SHP_FIRST_STOP'.
ls_control-paramindex = lv_count.
ls_control-value = lv_fstop.
APPEND ls_control TO lt_control.
ls_control-paramname = 'YN_SHP_LAST_STOP'.
ls_control-paramindex = lv_count.
ls_control-value = lv_lstop.
APPEND ls_control TO lt_control.
ENDLOOP.
IF sy-subrc NE 0.
ls_control-paramname = 'YN_SHP_LINE_COUNT'.
ls_control-paramindex = '1'.
ls_control-value = ''.
APPEND ls_control TO lt_control.
ENDIF.
CLEAR: ls_tracking_id.
ls_tracking_id-appsys = lv_appsys.
ls_tracking_id-appobjtype = ls_aotype-aot_type.
ls_tracking_id-appobjid = ls_likp_new-vbeln.
ls_tracking_id-trxcod = 'OUTBOUND_DELIVERY'.
ls_tracking_id-trxid = ls_likp_new-vbeln.
CONCATENATE '0' sy-datum sy-uzeit INTO ls_tracking_id-start_date.
ls_tracking_id-end_date = '099991231000000'.
ls_tracking_id-timzon = lv_tzone.
APPEND ls_tracking_id TO lt_tracking_id.
CLEAR ls_tracking_id-start_date.
CLEAR ls_tracking_id-end_date.
CLEAR ls_tracking_id-timzon.
LOOP AT lt_vttp_delta INTO ls_vttp_delta WHERE vbeln = ls_likp_new-vbeln.
CLEAR ls_tracking_id-action.
ls_tracking_id-trxcod = 'SHIPMENT_ORDER'.
ls_tracking_id-trxid = ls_vttp_delta-tknum.
IF ls_vttp_delta-updkz = 'D'.
ls_tracking_id-action = 'D'.
ENDIF.
APPEND ls_tracking_id TO lt_tracking_id.
ENDLOOP.
* update the impacted deliveries' shipment composition and tracking id table=<
* update the impacted deliveries' planned event table=>
CLEAR ls_expeventdata.
ls_expeventdata-appsys = lv_appsys.
ls_expeventdata-appobjtype = ls_aotype-aot_type.
ls_expeventdata-language = sy-langu.
ls_expeventdata-appobjid = ls_likp_new-vbeln.
ls_expeventdata-evt_exp_tzone = lv_tzone.
CLEAR ls_eerel.
SELECT SINGLE * INTO ls_eerel FROM zgtt_sof_ee_rel WHERE appobjid = ls_expeventdata-appobjid.
IF ls_eerel-z_wbstk = 'X'.
ls_expeventdata-milestone = 'GOODS_ISSUE'.
IF ls_likp_new-wadat IS INITIAL.
CLEAR ls_expeventdata-evt_exp_datetime.
ELSE.
CONCATENATE '0' ls_likp_new-wadat ls_likp_new-wauhr INTO ls_expeventdata-evt_exp_datetime.
ENDIF.
ls_expeventdata-loctype = 'ShippingPoint'.
ls_expeventdata-locid1 = ls_likp_new-vstel.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ls_expeventdata-milestone = 'DEPARTURE'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_likp_new-vbeln
AND loccat = 'S'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDLOOP.
ls_expeventdata-milestone = 'ARRIV_DEST'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_likp_new-vbeln
AND loccat = 'D'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDLOOP.
ls_expeventdata-milestone = 'POD'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_likp_new-vbeln
AND loccat = 'D'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
CLEAR: lv_locid.
SELECT SINGLE kunnr INTO lv_locid FROM likp WHERE vbeln = ls_likp_new-vbeln.
IF lv_locid EQ ls_stop-locid AND ls_eerel-z_pdstk = 'X'.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ENDLOOP.
READ TABLE lt_exp_events WITH KEY appobjid = ls_likp_new-vbeln TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
ls_expeventdata-evt_exp_datetime = '000000000000000'.
ls_expeventdata-milestone = ''.
ls_expeventdata-evt_exp_tzone = ''.
ls_expeventdata-loctype = ''.
ls_expeventdata-locid1 = ''.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
* update the impacted deliveries' planned event table=<
ENDLOOP.
IF lt_control IS NOT INITIAL.
CALL METHOD zcl_gtt_sof_upd_xtp_references=>send_idoc_ehpost01
EXPORTING
it_control = lt_control
it_tracking_id = lt_tracking_id
it_exp_event = lt_exp_events
is_trxserv = ls_trxserv
iv_appsys = lv_appsys
it_appobj_ctabs = lt_appobj_ctabs.
ENDIF.
ENDLOOP.
* update the impacted delivery items' planned event table=>
CLEAR lt_lips.
IF lt_likp_new IS NOT INITIAL.
SELECT * INTO TABLE lt_lips FROM lips FOR ALL ENTRIES IN lt_likp_new WHERE vbeln = lt_likp_new-vbeln.
ENDIF.
LOOP AT lt_aotype_item INTO ls_aotype.
SELECT SINGLE trxservername INTO lv_trxserver_id FROM /saptrx/aotypes
WHERE trk_obj_type EQ ls_aotype-obj_type
AND aotype EQ ls_aotype-aot_type.
SELECT SINGLE trx_server_id trx_server INTO ( ls_trxserv-trx_server_id, ls_trxserv-trx_server )
FROM /saptrx/trxserv
WHERE trx_server_id = lv_trxserver_id.
CLEAR: lt_appobj_ctabs, lt_control, lt_tracking_id, lt_exp_events.
LOOP AT lt_lips INTO ls_lips.
CLEAR: ls_appobj_ctabs.
ls_appobj_ctabs-trxservername = ls_trxserv-trx_server_id.
ls_appobj_ctabs-appobjtype = ls_aotype-aot_type.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_appobj_ctabs-appobjid.
APPEND ls_appobj_ctabs TO lt_appobj_ctabs.
CLEAR: ls_control.
ls_control-appsys = lv_appsys.
ls_control-appobjtype = ls_aotype-aot_type.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_control-appobjid.
ls_control-paramname = 'YN_DLV_NO'.
ls_control-value = ls_lips-vbeln.
APPEND ls_control TO lt_control.
ls_control-paramname = 'YN_DLV_ITEM_NO'.
ls_control-value = ls_lips-posnr.
APPEND ls_control TO lt_control.
ls_control-paramname = 'ACTUAL_BUSINESS_TIMEZONE'.
ls_control-value = lv_tzone.
APPEND ls_control TO lt_control.
ls_control-paramname = 'ACTUAL_BUSINESS_DATETIME'.
CONCATENATE '0' sy-datum sy-uzeit INTO ls_control-value.
APPEND ls_control TO lt_control.
CLEAR: ls_tracking_id.
ls_tracking_id-appsys = lv_appsys.
ls_tracking_id-appobjtype = ls_aotype-aot_type.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_tracking_id-appobjid.
ls_tracking_id-trxcod = 'OUTBOUND_DELIVERY_IT'.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_tracking_id-trxid.
CONCATENATE '0' sy-datum sy-uzeit INTO ls_tracking_id-start_date.
ls_tracking_id-end_date = '099991231000000'.
ls_tracking_id-timzon = lv_tzone.
APPEND ls_tracking_id TO lt_tracking_id.
CLEAR ls_expeventdata.
ls_expeventdata-appsys = lv_appsys.
ls_expeventdata-appobjtype = ls_aotype-aot_type.
ls_expeventdata-language = sy-langu.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_expeventdata-appobjid.
ls_expeventdata-evt_exp_tzone = lv_tzone.
SELECT SINGLE * INTO ls_likp_tmp FROM likp WHERE vbeln = ls_lips-vbeln.
CLEAR ls_eerel.
SELECT SINGLE * INTO ls_eerel FROM zgtt_sof_ee_rel WHERE appobjid = ls_expeventdata-appobjid.
IF ls_eerel-z_kostk = 'X'.
ls_expeventdata-milestone = 'PICKING'.
IF ls_likp_tmp-kodat IS INITIAL.
CLEAR ls_expeventdata-evt_exp_datetime.
ELSE.
CONCATENATE '0' ls_likp_tmp-kodat ls_likp_tmp-kouhr INTO ls_expeventdata-evt_exp_datetime.
ENDIF.
ls_expeventdata-loctype = 'ShippingPoint'.
ls_expeventdata-locid1 = ls_likp_tmp-vstel.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
IF ls_eerel-z_pkstk = 'X'.
CLEAR ls_expeventdata-evt_exp_datetime.
ls_expeventdata-milestone = 'PACKING'.
ls_expeventdata-loctype = 'ShippingPoint'.
ls_expeventdata-locid1 = ls_likp_tmp-vstel.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
IF ls_eerel-z_wbstk = 'X'.
ls_expeventdata-milestone = 'GOODS_ISSUE'.
IF ls_likp_tmp-wadat IS INITIAL.
CLEAR ls_expeventdata-evt_exp_datetime.
ELSE.
CONCATENATE '0' ls_likp_tmp-wadat ls_likp_tmp-wauhr INTO ls_expeventdata-evt_exp_datetime.
ENDIF.
ls_expeventdata-loctype = 'ShippingPoint'.
ls_expeventdata-locid1 = ls_likp_tmp-vstel.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
IF ls_eerel-z_pdstk = 'X'.
CLEAR ls_expeventdata-evt_exp_datetime.
ls_expeventdata-milestone = 'POD'.
ls_expeventdata-loctype = 'Customer'.
ls_expeventdata-locid1 = ls_likp_tmp-kunnr.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ls_expeventdata-milestone = 'DEPARTURE'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_lips-vbeln
AND loccat = 'S'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDLOOP.
ls_expeventdata-milestone = 'ARRIV_DEST'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_lips-vbeln
AND loccat = 'D'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDLOOP.
ls_expeventdata-milestone = 'POD'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_lips-vbeln
AND loccat = 'D'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
CLEAR: lv_locid.
SELECT SINGLE kunnr INTO lv_locid FROM likp WHERE vbeln = ls_lips-vbeln.
IF lv_locid EQ ls_stop-locid AND ls_eerel-z_pdstk = 'X'.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ENDLOOP.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO lv_appobjid.
READ TABLE lt_exp_events WITH KEY appobjid = lv_appobjid TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
ls_expeventdata-evt_exp_datetime = '000000000000000'.
ls_expeventdata-milestone = ''.
ls_expeventdata-evt_exp_tzone = ''.
ls_expeventdata-loctype = ''.
ls_expeventdata-locid1 = ''.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ENDLOOP.
IF lt_control IS NOT INITIAL.
CALL METHOD zcl_gtt_sof_upd_xtp_references=>send_idoc_ehpost01
EXPORTING
it_control = lt_control
it_tracking_id = lt_tracking_id
it_exp_event = lt_exp_events
is_trxserv = ls_trxserv
iv_appsys = lv_appsys
it_appobj_ctabs = lt_appobj_ctabs.
ENDIF.
ENDLOOP.
* update the impacted delivery items' planned event table=<
ENDLOOP.
ENDMETHOD.
method IF_EX_BADI_LE_SHIPMENT~IN_UPDATE.
endmethod.
ENDCLASS.
| [
4871,
1168,
5097,
62,
3955,
834,
38,
15751,
62,
15821,
37,
62,
2538,
62,
49423,
44,
11251,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
20314,
16876,
62,
6369,
62,
33,
2885,
40,
62,
2538,
62,
49423,
10979,
764,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
3955,
834,
38,
15751,
62,
15821,
37,
62,
2538,
62,
49423,
44,
11251,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
2446,
16876,
62,
6369,
62,
33,
2885,
40,
62,
2538,
62,
49423,
10979,
93,
1404,
62,
4090,
6089,
13,
198,
220,
886,
24396,
13,
628,
198,
49273,
611,
62,
1069,
62,
65,
9189,
62,
293,
62,
6720,
434,
93,
19052,
62,
19119,
13,
198,
220,
3268,
5097,
52,
7206,
1220,
82,
2373,
40914,
14,
9979,
1187,
13,
198,
220,
41876,
12,
16402,
3535,
50,
25,
491,
87,
292,
13,
628,
220,
42865,
25,
300,
62,
301,
5620,
62,
26495,
41876,
1614,
4871,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
62,
2302,
32109,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
6056,
13,
628,
220,
42865,
25,
300,
85,
62,
9127,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
785,
10247,
20,
220,
220,
41876,
410,
65,
1073,
20,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
785,
10247,
21,
220,
220,
41876,
410,
65,
1073,
21,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
69,
11338,
220,
220,
220,
41876,
1149,
13381,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
75,
11338,
220,
220,
220,
41876,
1149,
13381,
11,
198,
9,
220,
220,
13397,
5121,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
17946,
312,
220,
220,
220,
41876,
1976,
70,
926,
62,
17946,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
1324,
26801,
312,
41876,
1220,
82,
2373,
40914,
14,
64,
1868,
13,
628,
220,
42865,
25,
43979,
62,
85,
926,
74,
62,
727,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
410,
926,
74,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
85,
926,
74,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
410,
926,
74,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
85,
926,
74,
62,
22065,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
410,
926,
74,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
36540,
912,
62,
727,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
410,
83,
912,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
36540,
912,
62,
67,
12514,
220,
220,
220,
220,
220,
220,
220,
41876,
410,
83,
912,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
85,
29281,
62,
67,
12514,
220,
220,
220,
220,
220,
220,
220,
41876,
410,
29281,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
85,
912,
79,
62,
67,
12514,
220,
220,
220,
220,
220,
220,
220,
41876,
410,
912,
79,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
46965,
79,
62,
67,
12514,
220,
220,
220,
220,
220,
220,
220,
41876,
4300,
79,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
46965,
79,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4300,
79,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
46965,
79,
62,
22065,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4300,
79,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
85,
19881,
292,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
410,
19881,
292,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
85,
65,
13331,
62,
3605,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
410,
19881,
615,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
46965,
79,
62,
3605,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4300,
79,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
75,
2419,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
11914,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
11338,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
70,
926,
62,
11338,
62,
10951,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
67,
6780,
62,
50042,
62,
11338,
41876,
220,
1976,
70,
926,
62,
67,
6780,
62,
8340,
62,
11338,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
68,
567,
75,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
70,
926,
62,
568,
69,
62,
1453,
62,
2411,
13,
628,
220,
42865,
25,
300,
83,
62,
85,
19881,
292,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
410,
19881,
292,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
85,
65,
13331,
62,
3605,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
410,
19881,
615,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
85,
926,
74,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
410,
926,
74,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
36540,
912,
62,
67,
12514,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
410,
83,
912,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
85,
29281,
62,
67,
12514,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
410,
29281,
85,
65,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
85,
29281,
62,
67,
12514,
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,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,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
20314,
16876,
62,
6369,
62,
15039,
44,
62,
20114,
62,
21389,
6239,
32,
764
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_uom_alv_ida DEFINITION PUBLIC FINAL CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES zif_uom_alv_ida.
TYPES ty_uom_selection TYPE RANGE OF msehi.
TYPES ty_language_selection TYPE RANGE OF spras.
METHODS constructor
IMPORTING
it_uom_selection TYPE ty_uom_selection
it_language_selection TYPE ty_language_selection.
CLASS-METHODS get_instance
IMPORTING
it_uom_selection TYPE ty_uom_selection
it_language_selection TYPE ty_language_selection
RETURNING
VALUE(ro_result) TYPE REF TO zif_uom_alv_ida.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS mc_cds_view_name TYPE dbtabl VALUE 'zb_uom'.
CLASS-DATA mo_instance TYPE REF TO zcl_uom_alv_ida.
DATA mo_alv_with_ida TYPE REF TO if_salv_gui_table_ida.
METHODS on_double_click_on_cell FOR EVENT double_click OF if_salv_gui_table_display_opt
IMPORTING
ev_field_name
eo_row_data.
METHODS on_toolbar_function_selected FOR EVENT function_selected OF if_salv_gui_toolbar_ida
IMPORTING ev_fcode.
METHODS create_alv_with_ida.
METHODS provide_select_options
IMPORTING
it_uom_selection TYPE ty_uom_selection
it_language_selection TYPE ty_language_selection.
METHODS activate_text_search.
METHODS activate_layout_persistence.
METHODS register_double_click_event.
METHODS get_row_data
IMPORTING
row_object TYPE REF TO if_salv_gui_row_data_ida
RETURNING
VALUE(rs_result) TYPE zb_uom.
METHODS add_buttons_to_toolbar.
METHODS change_toolbar.
METHODS register_toolbar_event.
ENDCLASS.
CLASS zcl_uom_alv_ida IMPLEMENTATION.
METHOD activate_text_search.
mo_alv_with_ida->standard_functions( )->set_text_search_active( abap_true ).
TRY.
mo_alv_with_ida->field_catalog( )->enable_text_search( 'SHORT_TEXT' ).
mo_alv_with_ida->field_catalog( )->enable_text_search( 'LONG_TEXT' ).
CATCH cx_salv_ida_unknown_name.
CATCH cx_salv_call_after_1st_display.
ENDTRY.
ENDMETHOD.
METHOD activate_layout_persistence.
DATA(ls_persistence_key) = VALUE if_salv_gui_layout_persistence=>ys_persistence_key( report_name = sy-repid
handle = 'ZUOM' ).
TRY.
mo_alv_with_ida->layout_persistence( )->set_persistence_options(
EXPORTING
is_persistence_key = ls_persistence_key
* i_global_save_allowed = ABAP_TRUE
* i_user_specific_save_allowed = ABAP_TRUE
).
CATCH cx_salv_ida_layout_key_invalid.
ENDTRY.
ENDMETHOD.
METHOD constructor.
create_alv_with_ida( ).
provide_select_options( it_uom_selection = it_uom_selection
it_language_selection = it_language_selection ).
activate_text_search( ).
activate_layout_persistence( ).
change_toolbar( ).
register_double_click_event( ).
ENDMETHOD.
METHOD create_alv_with_ida.
TRY.
mo_alv_with_ida = cl_salv_gui_table_ida=>create_for_cds_view(
EXPORTING
iv_cds_view_name = mc_cds_view_name
* io_gui_container =
* io_calc_field_handler =
).
CATCH cx_salv_db_connection.
CATCH cx_salv_db_table_not_supported.
CATCH cx_salv_ida_contract_violation.
CATCH cx_salv_function_not_supported.
ENDTRY.
ENDMETHOD.
METHOD on_double_click_on_cell.
DATA(ls_row_data) = get_row_data( eo_row_data ).
DATA(lv_message_text) = |Double click on field in column { ev_field_name }|.
MESSAGE lv_message_text TYPE 'S'.
ENDMETHOD.
METHOD get_row_data.
TRY.
row_object->get_row_data(
EXPORTING
iv_request_type = if_salv_gui_selection_ida=>cs_request_type-all_fields
* its_requested_fields =
IMPORTING
es_row = rs_result ).
CATCH cx_salv_ida_contract_violation.
CATCH cx_salv_ida_sel_row_deleted.
ENDTRY.
ENDMETHOD.
METHOD provide_select_options.
DATA(lo_collector) = NEW cl_salv_range_tab_collector( ).
lo_collector->add_ranges_for_name( iv_name = 'UNIT_OF_MEASUREMENT'
it_ranges = it_uom_selection ).
lo_collector->add_ranges_for_name( iv_name = 'LANGUAGE'
it_ranges = it_language_selection ).
lo_collector->get_collected_ranges( IMPORTING et_named_ranges = DATA(lt_ranges) ).
TRY.
mo_alv_with_ida->set_select_options(
EXPORTING
it_ranges = lt_ranges
* io_condition =
).
CATCH cx_salv_ida_associate_invalid.
CATCH cx_salv_db_connection.
CATCH cx_salv_ida_condition_invalid.
CATCH cx_salv_ida_unknown_name.
ENDTRY.
ENDMETHOD.
METHOD register_double_click_event.
TRY.
mo_alv_with_ida->selection( )->set_selection_mode( if_salv_gui_selection_ida=>cs_selection_mode-single ).
CATCH cx_salv_ida_contract_violation.
ENDTRY.
mo_alv_with_ida->display_options( )->enable_double_click( ).
SET HANDLER on_double_click_on_cell FOR mo_alv_with_ida->display_options( ).
ENDMETHOD.
METHOD on_toolbar_function_selected.
mo_alv_with_ida->refresh( ).
ENDMETHOD.
METHOD add_buttons_to_toolbar.
mo_alv_with_ida->toolbar( )->add_button( iv_fcode = 'REFRESH'
iv_icon = icon_refresh
iv_is_checked = abap_false
iv_text = space
iv_quickinfo = 'Refresh list'
iv_before_standard_functions = abap_false ).
mo_alv_with_ida->toolbar( )->add_separator( EXPORTING iv_before_standard_functions = abap_true ).
ENDMETHOD.
METHOD change_toolbar.
add_buttons_to_toolbar( ).
register_toolbar_event( ).
ENDMETHOD.
METHOD register_toolbar_event.
SET HANDLER on_toolbar_function_selected FOR mo_alv_with_ida->toolbar( ).
ENDMETHOD.
METHOD zif_uom_alv_ida~display.
TRY.
mo_alv_with_ida->fullscreen( )->display( ).
CATCH cx_salv_ida_contract_violation.
ENDTRY.
ENDMETHOD.
METHOD get_instance.
IF mo_instance IS NOT BOUND.
mo_instance = NEW zcl_uom_alv_ida(
it_uom_selection = it_uom_selection
it_language_selection = it_language_selection ).
ENDIF.
ro_result = mo_instance.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
84,
296,
62,
282,
85,
62,
3755,
5550,
20032,
17941,
44731,
25261,
29244,
6158,
4810,
3824,
6158,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
84,
296,
62,
282,
85,
62,
3755,
13,
628,
220,
220,
220,
24412,
47,
1546,
1259,
62,
84,
296,
62,
49283,
41876,
371,
27746,
3963,
285,
325,
5303,
13,
198,
220,
220,
220,
24412,
47,
1546,
1259,
62,
16129,
62,
49283,
41876,
371,
27746,
3963,
7500,
292,
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,
340,
62,
84,
296,
62,
49283,
220,
220,
220,
220,
220,
41876,
1259,
62,
84,
296,
62,
49283,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
16129,
62,
49283,
41876,
1259,
62,
16129,
62,
49283,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
39098,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
84,
296,
62,
49283,
220,
220,
220,
220,
220,
41876,
1259,
62,
84,
296,
62,
49283,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
16129,
62,
49283,
41876,
1259,
62,
16129,
62,
49283,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
20274,
8,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
84,
296,
62,
282,
85,
62,
3755,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
36650,
62,
66,
9310,
62,
1177,
62,
3672,
41876,
20613,
8658,
75,
26173,
8924,
705,
14969,
62,
84,
296,
4458,
628,
220,
220,
220,
42715,
12,
26947,
6941,
62,
39098,
41876,
4526,
37,
5390,
1976,
565,
62,
84,
296,
62,
282,
85,
62,
3755,
13,
628,
220,
220,
220,
42865,
6941,
62,
282,
85,
62,
4480,
62,
3755,
41876,
4526,
37,
5390,
611,
62,
21680,
85,
62,
48317,
62,
11487,
62,
3755,
13,
628,
220,
220,
220,
337,
36252,
50,
319,
62,
23352,
62,
12976,
62,
261,
62,
3846,
7473,
49261,
4274,
62,
12976,
3963,
611,
62,
21680,
85,
62,
48317,
62,
11487,
62,
13812,
62,
8738,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
819,
62,
3245,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
78,
62,
808,
62,
7890,
13,
628,
220,
220,
220,
337,
36252,
50,
319,
62,
25981,
5657,
62,
8818,
62,
34213,
7473,
49261,
2163,
62,
34213,
3963,
611,
62,
21680,
85,
62,
48317,
62,
25981,
5657,
62,
3755,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
819,
62,
69,
8189,
13,
628,
220,
220,
220,
337,
36252,
50,
2251,
62,
282,
85,
62,
4480,
62,
3755,
13,
628,
220,
220,
220,
337,
36252,
50,
2148,
62,
19738,
62,
25811,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
84,
296,
62,
49283,
220,
220,
220,
220,
220,
41876,
1259,
62,
84,
296,
62,
49283,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
16129,
62,
49283,
41876,
1259,
62,
16129,
62,
49283,
13,
628,
220,
220,
220,
337,
36252,
50,
15155,
62,
5239,
62,
12947,
13,
628,
220,
220,
220,
337,
36252,
50,
15155,
62,
39786,
62,
19276,
13274,
13,
628,
220,
220,
220,
337,
36252,
50,
7881,
62,
23352,
62,
12976,
62,
15596,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
808,
62,
7890,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5752,
62,
15252,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
21680,
85,
62,
48317,
62,
808,
62,
7890,
62,
3755,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
20274,
8,
41876,
1976,
65,
62,
84,
296,
13,
628,
220,
220,
220,
337,
36252,
50,
751,
62,
4360,
27288,
62,
1462,
62,
25981,
5657,
13,
628,
220,
220,
220,
337,
36252,
50,
1487,
62,
25981,
5657,
13,
628,
220,
220,
220,
337,
36252,
50,
7881,
62,
25981,
5657,
62,
15596,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
84,
296,
62,
282,
85,
62,
3755,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
15155,
62,
5239,
62,
12947,
13,
198,
220,
220,
220,
6941,
62,
282,
85,
62,
4480,
62,
3755,
3784,
20307,
62,
12543,
2733,
7,
1267,
3784,
2617,
62,
5239,
62,
12947,
62,
5275,
7,
450,
499,
62,
7942,
6739,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
6941,
62,
282,
85,
62,
4480,
62,
3755,
3784,
3245,
62,
9246,
11794,
7,
1267,
3784,
21633,
62,
5239,
62,
12947,
7,
705,
9693,
9863,
62,
32541,
6,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
6941,
62,
282,
85,
62,
4480,
62,
3755,
3784,
3245,
62,
9246,
11794,
7,
1267,
3784,
21633,
62,
5239,
62,
12947,
7,
705,
43,
18494,
62,
32541,
6,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
21680,
85,
62,
3755,
62,
34680,
62,
3672,
13,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
21680,
85,
62,
13345,
62,
8499,
62,
16,
301,
62,
13812,
13,
198,
220,
220,
220,
23578,
40405,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
15155,
62,
39786,
62,
19276,
13274,
13,
198,
220,
220,
220,
42865,
7,
7278,
62,
19276,
13274,
62,
2539,
8,
796,
26173,
8924,
611,
62,
21680,
85,
62,
48317,
62,
39786,
62,
19276,
13274,
14804,
893,
62,
19276,
13274,
62,
2539,
7,
989,
62,
3672,
796,
827,
12,
7856,
312,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
FUNCTION Z_DEMOS_QRFC_MOD_PROCESS.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_DATA) TYPE VTEXT OPTIONAL
*" EXCEPTIONS
*" ERROR_1
*" ERROR_2
*"----------------------------------------------------------------------
* ----------- local data
DATA: lv_rc TYPE i VALUE 0.
DATA: lr_qrfc TYPE REF TO ZCL_DEMOS_QRFC_UTIL.
* ----------- init
lr_qrfc ?= ZCL_DEMOS_QRFC_UTIL=>get_instance( ).
* ----------- process
WAIT UP TO 1 SECONDS.
* ---------- error handling
CASE lv_rc.
WHEN 0.
" OK
WHEN 1.
RAISE error_1.
WHEN 2.
RAISE error_2.
WHEN OTHERS.
lr_qrfc->set_status_retry_later( ).
ENDCASE.
ENDFUNCTION.
| [
42296,
4177,
2849,
1168,
62,
39429,
2640,
62,
48,
41150,
62,
33365,
62,
4805,
4503,
7597,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
26173,
8924,
7,
3824,
62,
26947,
8,
41876,
220,
569,
32541,
39852,
2849,
1847,
198,
9,
1,
220,
7788,
42006,
11053,
198,
9,
1,
220,
220,
220,
220,
220,
33854,
62,
16,
198,
9,
1,
220,
220,
220,
220,
220,
33854,
62,
17,
198,
9,
1,
10097,
23031,
198,
9,
24200,
6329,
1957,
1366,
198,
220,
42865,
25,
300,
85,
62,
6015,
41876,
1312,
26173,
8924,
657,
13,
198,
220,
42865,
25,
300,
81,
62,
80,
81,
16072,
41876,
4526,
37,
5390,
1168,
5097,
62,
39429,
2640,
62,
48,
41150,
62,
3843,
4146,
13,
628,
198,
9,
24200,
6329,
2315,
198,
220,
300,
81,
62,
80,
81,
16072,
5633,
28,
1168,
5097,
62,
39429,
2640,
62,
48,
41150,
62,
3843,
4146,
14804,
1136,
62,
39098,
7,
6739,
628,
198,
9,
24200,
6329,
1429,
198,
220,
16400,
2043,
15958,
5390,
352,
10729,
1340,
5258,
13,
628,
198,
9,
24200,
438,
4049,
9041,
198,
220,
42001,
300,
85,
62,
6015,
13,
198,
220,
220,
220,
42099,
657,
13,
198,
220,
220,
220,
220,
220,
366,
7477,
198,
220,
220,
220,
42099,
352,
13,
198,
220,
220,
220,
220,
220,
17926,
24352,
4049,
62,
16,
13,
198,
220,
220,
220,
42099,
362,
13,
198,
220,
220,
220,
220,
220,
17926,
24352,
4049,
62,
17,
13,
198,
220,
220,
220,
42099,
440,
4221,
4877,
13,
198,
220,
220,
220,
220,
220,
300,
81,
62,
80,
81,
16072,
3784,
2617,
62,
13376,
62,
1186,
563,
62,
36760,
7,
6739,
198,
220,
23578,
34,
11159,
13,
628,
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
] |
CLASS zcl_abapgit_gui_router DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abapgit_gui_event_handler.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_event_data,
action TYPE string,
prev_page TYPE string,
getdata TYPE string,
postdata TYPE cnht_post_data_tab,
END OF ty_event_data .
METHODS general_page_routing
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS abapgit_services_actions
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS db_actions
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
CLASS-METHODS file_download
IMPORTING
!iv_package TYPE devclass
!iv_xstr TYPE xstring
RAISING
zcx_abapgit_exception .
METHODS git_services
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS remote_origin_manipulations
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS sap_gui_actions
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS zip_services
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS repository_services
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS get_page_diff
IMPORTING
!iv_getdata TYPE clike
RETURNING
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
RAISING
zcx_abapgit_exception .
METHODS get_page_branch_overview
IMPORTING
!iv_getdata TYPE clike
RETURNING
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
RAISING
zcx_abapgit_exception .
METHODS get_page_stage
IMPORTING
!iv_getdata TYPE clike
RETURNING
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
RAISING
zcx_abapgit_exception .
METHODS get_page_background
IMPORTING
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
RETURNING
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
RAISING
zcx_abapgit_exception .
CLASS-METHODS jump_display_transport
IMPORTING
!iv_getdata TYPE clike
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS zcl_abapgit_gui_router IMPLEMENTATION.
METHOD abapgit_services_actions.
DATA: li_main_page TYPE REF TO zcl_abapgit_gui_page_main.
CASE is_event_data-action.
" ABAPGIT services actions
WHEN zif_abapgit_definitions=>c_action-abapgit_home.
CREATE OBJECT li_main_page.
ei_page = li_main_page.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-abapgit_install. " Install abapGit
zcl_abapgit_services_abapgit=>install_abapgit( ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
ENDCASE.
ENDMETHOD.
METHOD db_actions.
CASE is_event_data-action.
" DB actions
WHEN zif_abapgit_definitions=>c_action-db_edit.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_db_edit
EXPORTING
is_key = zcl_abapgit_html_action_utils=>dbkey_decode( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
IF is_event_data-prev_page = 'PAGE_DB_DIS'.
ev_state = zcl_abapgit_gui=>c_event_state-new_page_replacing.
ENDIF.
WHEN zif_abapgit_definitions=>c_action-db_display.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_db_dis
EXPORTING
is_key = zcl_abapgit_html_action_utils=>dbkey_decode( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ENDCASE.
ENDMETHOD.
METHOD file_download.
DATA:
lv_path TYPE string,
lv_default TYPE string,
li_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.
li_fe_serv = zcl_abapgit_ui_factory=>get_frontend_services( ).
lv_path = li_fe_serv->show_file_save_dialog(
iv_title = 'Export ZIP'
iv_extension = 'zip'
iv_default_filename = lv_default ).
li_fe_serv->file_download(
iv_path = lv_path
iv_xstr = iv_xstr ).
ENDMETHOD.
METHOD general_page_routing.
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
lv_last_repo_key TYPE zif_abapgit_persistence=>ty_repo-key.
lv_key = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" General PAGE routing
WHEN zcl_abapgit_gui=>c_action-go_home.
IF zcl_abapgit_persist_settings=>get_instance( )->read( )->get_show_default_repo( ) = abap_true.
lv_last_repo_key = zcl_abapgit_persistence_user=>get_instance( )->get_repo_show( ).
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_view_repo
EXPORTING iv_key = lv_last_repo_key.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ELSE.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_main.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ENDIF.
WHEN zif_abapgit_definitions=>c_action-go_repo_overview. " Go Repository overview
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_repo_over.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_db. " Go DB util page
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_db.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_debuginfo.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_debuginfo.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_settings.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_settings.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_background_run. " Go background run page
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_bkg_run.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_background. " Go Background page
ei_page = get_page_background( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_diff. " Go Diff page
ei_page = get_page_diff( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page_w_bookmark.
WHEN zif_abapgit_definitions=>c_action-go_stage. " Go Staging page
ei_page = get_page_stage( is_event_data-getdata ).
IF is_event_data-prev_page = 'PAGE_DIFF'.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ELSE.
ev_state = zcl_abapgit_gui=>c_event_state-new_page_w_bookmark.
ENDIF.
WHEN zif_abapgit_definitions=>c_action-go_branch_overview. " Go repo branch overview
ei_page = get_page_branch_overview( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_tutorial. " Go to tutorial
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_tutorial.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ENDCASE.
ENDMETHOD.
METHOD get_page_background.
CREATE OBJECT ri_page TYPE zcl_abapgit_gui_page_bkg
EXPORTING
iv_key = iv_key.
ENDMETHOD.
METHOD get_page_branch_overview.
DATA: lo_repo TYPE REF TO zcl_abapgit_repo_online,
lo_page TYPE REF TO zcl_abapgit_gui_page_boverview,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key.
lv_key = iv_getdata.
lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
CREATE OBJECT lo_page
EXPORTING
io_repo = lo_repo.
ri_page = lo_page.
ENDMETHOD.
METHOD get_page_diff.
DATA: ls_file TYPE zif_abapgit_definitions=>ty_file,
ls_object TYPE zif_abapgit_definitions=>ty_item,
lo_page TYPE REF TO zcl_abapgit_gui_page_diff,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key.
zcl_abapgit_html_action_utils=>file_obj_decode(
EXPORTING
iv_string = iv_getdata
IMPORTING
ev_key = lv_key
eg_file = ls_file
eg_object = ls_object ).
CREATE OBJECT lo_page
EXPORTING
iv_key = lv_key
is_file = ls_file
is_object = ls_object.
ri_page = lo_page.
ENDMETHOD.
METHOD get_page_stage.
DATA: lo_repo TYPE REF TO zcl_abapgit_repo_online,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
lv_seed TYPE string,
lo_stage_page TYPE REF TO zcl_abapgit_gui_page_stage,
lo_code_inspector_page TYPE REF TO zcl_abapgit_gui_page_code_insp.
FIND FIRST OCCURRENCE OF '=' IN iv_getdata.
IF sy-subrc <> 0. " Not found ? -> just repo key in params
lv_key = iv_getdata.
ELSE.
zcl_abapgit_html_action_utils=>stage_decode(
EXPORTING iv_getdata = iv_getdata
IMPORTING ev_key = lv_key
ev_seed = lv_seed ).
ENDIF.
lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
IF lo_repo->get_local_settings( )-code_inspector_check_variant IS NOT INITIAL.
CREATE OBJECT lo_code_inspector_page
EXPORTING
io_repo = lo_repo.
ri_page = lo_code_inspector_page.
ELSE.
" force refresh on stage, to make sure the latest local and remote files are used
lo_repo->refresh( ).
CREATE OBJECT lo_stage_page
EXPORTING
io_repo = lo_repo
iv_seed = lv_seed.
ri_page = lo_stage_page.
ENDIF.
ENDMETHOD.
METHOD git_services.
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key.
lv_key = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" GIT actions
WHEN zif_abapgit_definitions=>c_action-git_pull. " GIT Pull
zcl_abapgit_services_git=>pull( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_reset. " GIT Reset
zcl_abapgit_services_git=>reset( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_branch_create. " GIT Create new branch
zcl_abapgit_services_git=>create_branch( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_branch_delete. " GIT Delete remote branch
zcl_abapgit_services_git=>delete_branch( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_branch_switch. " GIT Switch branch
zcl_abapgit_services_git=>switch_branch( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-go_tag_overview. " GIT Tag overview
zcl_abapgit_services_git=>tag_overview( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_tag_create. " GIT Tag create
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_tag
EXPORTING
io_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-git_tag_delete. " GIT Tag create
zcl_abapgit_services_git=>delete_tag( lv_key ).
zcl_abapgit_services_repo=>refresh( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_tag_switch. " GIT Switch Tag
zcl_abapgit_services_git=>switch_tag( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
ENDCASE.
ENDMETHOD.
METHOD jump_display_transport.
DATA: lv_transport TYPE trkorr,
lv_transport_adt_uri TYPE string,
lv_adt_link TYPE string,
lv_adt_jump_enabled TYPE abap_bool.
lv_transport = iv_getdata.
lv_adt_jump_enabled = zcl_abapgit_persist_settings=>get_instance( )->read( )->get_adt_jump_enabled( ).
IF lv_adt_jump_enabled = abap_true.
TRY.
CALL METHOD ('CL_CTS_ADT_TM_URI_BUILDER')=>('CREATE_ADT_URI')
EXPORTING
trnumber = lv_transport
RECEIVING
result = lv_transport_adt_uri.
lv_adt_link = |adt://{ sy-sysid }{ lv_transport_adt_uri }|.
cl_gui_frontend_services=>execute( EXPORTING document = lv_adt_link
EXCEPTIONS OTHERS = 1 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'ADT Jump Error' ).
ENDIF.
CATCH cx_root.
CALL FUNCTION 'TR_DISPLAY_REQUEST'
EXPORTING
i_trkorr = lv_transport.
ENDTRY.
ELSE.
CALL FUNCTION 'TR_DISPLAY_REQUEST'
EXPORTING
i_trkorr = lv_transport.
ENDIF.
ENDMETHOD.
METHOD remote_origin_manipulations.
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key.
lv_key = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" Remote ORIGIN manipulations
WHEN zif_abapgit_definitions=>c_action-repo_remote_attach. " Remote attach
zcl_abapgit_services_repo=>remote_attach( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_remote_detach. " Remote detach
zcl_abapgit_services_repo=>remote_detach( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_remote_change. " Remote change
zcl_abapgit_services_repo=>remote_change( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
ENDCASE.
ENDMETHOD.
METHOD repository_services.
DATA: lv_url TYPE string,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
li_log TYPE REF TO zif_abapgit_log.
lv_key = is_event_data-getdata. " TODO refactor
lv_url = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" REPOSITORY services actions
WHEN zif_abapgit_definitions=>c_action-repo_newoffline. " New offline repo
zcl_abapgit_services_repo=>new_offline( ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_add_all_obj_to_trans_req.
zcl_abapgit_transport=>add_all_objects_to_trans_req( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_refresh. " Repo refresh
zcl_abapgit_services_repo=>refresh( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_syntax_check.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_syntax
EXPORTING
io_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-repo_code_inspector.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_code_insp
EXPORTING
io_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-repo_purge. " Repo remove & purge all objects
zcl_abapgit_services_repo=>purge( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_remove. " Repo remove
zcl_abapgit_services_repo=>remove( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_newonline.
zcl_abapgit_services_repo=>new_online( lv_url ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_refresh_checksums. " Rebuild local checksums
zcl_abapgit_services_repo=>refresh_local_checksums( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_toggle_fav. " Toggle repo as favorite
zcl_abapgit_services_repo=>toggle_favorite( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_transport_to_branch.
zcl_abapgit_services_repo=>transport_to_branch( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_settings.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_repo_sett
EXPORTING
io_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-repo_log.
li_log = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key )->get_log( ).
zcl_abapgit_log_viewer=>show_log( ii_log = li_log
iv_header_text = li_log->get_title( ) ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
ENDCASE.
ENDMETHOD.
METHOD sap_gui_actions.
DATA: ls_item TYPE zif_abapgit_definitions=>ty_item.
CASE is_event_data-action.
" SAP GUI actions
WHEN zif_abapgit_definitions=>c_action-jump. " Open object editor
zcl_abapgit_html_action_utils=>jump_decode(
EXPORTING iv_string = is_event_data-getdata
IMPORTING ev_obj_type = ls_item-obj_type
ev_obj_name = ls_item-obj_name ).
zcl_abapgit_objects=>jump( ls_item ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
WHEN zif_abapgit_definitions=>c_action-jump_transport.
jump_display_transport( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
ENDCASE.
ENDMETHOD.
METHOD zif_abapgit_gui_event_handler~on_event.
DATA: ls_event_data TYPE ty_event_data.
ls_event_data-action = iv_action.
ls_event_data-getdata = iv_getdata.
ls_event_data-postdata = it_postdata.
general_page_routing(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
repository_services(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
git_services(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
zip_services(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
db_actions(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
abapgit_services_actions(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
remote_origin_manipulations(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
sap_gui_actions(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
IF ev_state IS INITIAL.
ev_state = zcl_abapgit_gui=>c_event_state-not_handled.
ENDIF.
ENDMETHOD.
METHOD zip_services.
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
lo_repo TYPE REF TO zcl_abapgit_repo,
lv_package TYPE devclass,
lv_path TYPE string,
lv_xstr TYPE xstring.
lv_key = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" ZIP services actions
WHEN zif_abapgit_definitions=>c_action-zip_import. " Import repo from ZIP
lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
lv_path = zcl_abapgit_ui_factory=>get_frontend_services( )->show_file_open_dialog(
iv_title = 'Import ZIP'
iv_extension = 'zip'
iv_default_filename = '*.zip' ).
lv_xstr = zcl_abapgit_ui_factory=>get_frontend_services( )->file_upload( lv_path ).
lo_repo->set_files_remote( zcl_abapgit_zip=>load( lv_xstr ) ).
zcl_abapgit_services_repo=>refresh( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-zip_export. " Export repo as ZIP
lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
lv_xstr = zcl_abapgit_zip=>export( lo_repo ).
file_download( iv_package = lo_repo->get_package( )
iv_xstr = lv_xstr ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
WHEN zif_abapgit_definitions=>c_action-zip_package. " Export package as ZIP
zcl_abapgit_zip=>export_package( IMPORTING
ev_xstr = lv_xstr
ev_package = lv_package ).
file_download( iv_package = lv_package
iv_xstr = lv_xstr ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
WHEN zif_abapgit_definitions=>c_action-zip_transport. " Export transports as ZIP
zcl_abapgit_transport_mass=>run( ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
WHEN zif_abapgit_definitions=>c_action-zip_object. " Export object as ZIP
zcl_abapgit_zip=>export_object( ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
ENDCASE.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
472,
353,
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,
397,
499,
18300,
62,
48317,
62,
15596,
62,
30281,
13,
628,
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,
15596,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2223,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
8654,
62,
7700,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
651,
7890,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1281,
7890,
220,
41876,
269,
77,
4352,
62,
7353,
62,
7890,
62,
8658,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
15596,
62,
7890,
764,
628,
220,
220,
220,
337,
36252,
50,
2276,
62,
7700,
62,
81,
13660,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
15596,
62,
7890,
41876,
1259,
62,
15596,
62,
7890,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
20295,
62,
7700,
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,
1990,
62,
5219,
220,
220,
220,
220,
220,
41876,
1312,
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,
220,
220,
220,
337,
36252,
50,
450,
499,
18300,
62,
30416,
62,
4658,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
15596,
62,
7890,
41876,
1259,
62,
15596,
62,
7890,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
20295,
62,
7700,
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,
1990,
62,
5219,
220,
220,
220,
220,
220,
41876,
1312,
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,
220,
220,
220,
337,
36252,
50,
20613,
62,
4658,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
15596,
62,
7890,
41876,
1259,
62,
15596,
62,
7890,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
20295,
62,
7700,
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,
1990,
62,
5219,
220,
220,
220,
220,
220,
41876,
1312,
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,
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,
337,
36252,
50,
17606,
62,
30416,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
15596,
62,
7890,
41876,
1259,
62,
15596,
62,
7890,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
20295,
62,
7700,
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,
1990,
62,
5219,
220,
220,
220,
220,
220,
41876,
1312,
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,
220,
220,
220,
337,
36252,
50,
6569,
62,
47103,
62,
805,
541,
5768,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
15596,
62,
7890,
41876,
1259,
62,
15596,
62,
7890,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
20295,
62,
7700,
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,
1990,
62,
5219,
220,
220,
220,
220,
220,
41876,
1312,
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,
220,
220,
220,
337,
36252,
50,
31841,
62,
48317,
62,
4658,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
15596,
62,
7890,
41876,
1259,
62,
15596,
62,
7890,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
20295,
62,
7700,
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,
1990,
62,
5219,
220,
220,
220,
220,
220,
41876,
1312,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
TYPES: BEGIN OF t_input,
row TYPE string,
END OF t_input.
* Input declaration
DATA: lv_input TYPE TABLE OF t_input,
wa_input LIKE LINE OF lv_input.
* Assign with the puzzle input.
lv_input = VALUE #(
( row = '33' )
( row = '18' )
( row = '22' )
( row = '44' )
( row = '49' )
( row = '15' )
( row = '12' )
( row = '38' )
( row = '41' )
( row = '46' )
( row = '3' )
( row = '42' )
( row = '37' )
( row = '19' )
( row = '13' )
( row = '7' )
( row = '21' )
( row = '29' )
( row = '34' )
( row = '40' )
( row = '39' )
( row = '35' )
( row = '27' )
( row = '25' )
( row = '48' )
( row = '87' )
( row = '10' )
( row = '16' )
( row = '17' )
( row = '45' )
( row = '18' )
( row = '30' )
( row = '20' )
( row = '22' )
( row = '23' )
( row = '73' )
( row = '24' )
( row = '26' )
( row = '28' )
( row = '53' )
( row = '31' )
( row = '37' )
( row = '51' )
( row = '32' )
( row = '33' )
( row = '34' )
( row = '36' )
( row = '35' )
( row = '54' )
( row = '27' )
( row = '38' )
( row = '39' )
( row = '40' )
( row = '74' )
( row = '70' )
( row = '41' )
( row = '93' )
( row = '144' )
( row = '45' )
( row = '63' )
( row = '87' )
( row = '66' )
( row = '65' )
( row = '55' )
( row = '58' )
( row = '62' )
( row = '72' )
( row = '105' )
( row = '59' )
( row = '76' )
( row = '61' )
( row = '67' )
( row = '68' )
( row = '77' )
( row = '106' )
( row = '78' )
( row = '79' )
( row = '183' )
( row = '86' )
( row = '117' )
( row = '96' )
( row = '100' )
( row = '108' )
( row = '104' )
( row = '123' )
( row = '113' )
( row = '114' )
( row = '116' )
( row = '129' )
( row = '119' )
( row = '178' )
( row = '120' )
( row = '196' )
( row = '126' )
( row = '177' )
( row = '184' )
( row = '135' )
( row = '182' )
( row = '192' )
( row = '201' )
( row = '174' )
( row = '360' )
( row = '186' )
( row = '190' )
( row = '210' )
( row = '248' )
( row = '214' )
( row = '282' )
( row = '217' )
( row = '227' )
( row = '229' )
( row = '304' )
( row = '235' )
( row = '370' )
( row = '308' )
( row = '261' )
( row = '302' )
( row = '300' )
( row = '542' )
( row = '376' )
( row = '309' )
( row = '317' )
( row = '356' )
( row = '364' )
( row = '375' )
( row = '407' )
( row = '396' )
( row = '400' )
( row = '404' )
( row = '585' )
( row = '599' )
( row = '514' )
( row = '444' )
( row = '907' )
( row = '456' )
( row = '633' )
( row = '687' )
( row = '496' )
( row = '665' )
( row = '561' )
( row = '563' )
( row = '832' )
( row = '1056' )
( row = '626' )
( row = '673' )
( row = '681' )
( row = '720' )
( row = '731' )
( row = '840' )
( row = '819' )
( row = '796' )
( row = '800' )
( row = '1033' )
( row = '1117' )
( row = '900' )
( row = '958' )
( row = '940' )
( row = '952' )
( row = '1017' )
( row = '1019' )
( row = '1748' )
( row = '1177' )
( row = '1422' )
( row = '1124' )
( row = '1578' )
( row = '1189' )
( row = '1299' )
( row = '1678' )
( row = '1307' )
( row = '1354' )
( row = '2702' )
( row = '2476' )
( row = '1689' )
( row = '3775' )
( row = '1740' )
( row = '2813' )
( row = '2706' )
( row = '1977' )
( row = '1898' )
( row = '1840' )
( row = '2630' )
( row = '2864' )
( row = '1971' )
( row = '2439' )
( row = '2143' )
( row = '2932' )
( row = '2301' )
( row = '2313' )
( row = '2423' )
( row = '2488' )
( row = '2496' )
( row = '3194' )
( row = '2661' )
( row = '2996' )
( row = '3043' )
( row = '4416' )
( row = '3429' )
( row = '3529' )
( row = '3580' )
( row = '3638' )
( row = '3738' )
( row = '3983' )
( row = '4830' )
( row = '3811' )
( row = '4114' )
( row = '4724' )
( row = '5782' )
( row = '4394' )
( row = '4444' )
( row = '7143' )
( row = '6623' )
( row = '6882' )
( row = '7267' )
( row = '5149' )
( row = '7823' )
( row = '5855' )
( row = '5657' )
( row = '5704' )
( row = '6425' )
( row = '7026' )
( row = '6958' )
( row = '9666' )
( row = '7109' )
( row = '7218' )
( row = '10249' )
( row = '8535' )
( row = '7794' )
( row = '11512' )
( row = '14327' )
( row = '9969' )
( row = '15906' )
( row = '8838' )
( row = '10101' )
( row = '9593' )
( row = '12082' )
( row = '10806' )
( row = '10853' )
( row = '13451' )
( row = '17489' )
( row = '13073' )
( row = '11361' )
( row = '12129' )
( row = '17210' )
( row = '13383' )
( row = '13984' )
( row = '30562' )
( row = '16329' )
( row = '14903' )
( row = '15753' )
( row = '19306' )
( row = '16632' )
( row = '23920' )
( row = '26456' )
( row = '26113' )
( row = '18431' )
( row = '27032' )
( row = '19644' )
( row = '27882' )
( row = '20399' )
( row = '37885' )
( row = '21659' )
( row = '27976' )
( row = '24812' )
( row = '23490' )
( row = '24744' )
( row = '25345' )
( row = '25512' )
( row = '42785' )
( row = '27367' )
( row = '29737' )
( row = '30656' )
( row = '45579' )
( row = '31535' )
( row = '32385' )
( row = '35063' )
( row = '52788' )
( row = '38075' )
( row = '38830' )
( row = '44544' )
( row = '40090' )
( row = '40043' )
( row = '55249' )
( row = '57897' )
( row = '42058' )
( row = '45149' )
( row = '52712' )
( row = '48234' )
( row = '48302' )
( row = '72946' )
( row = '50089' )
( row = '64342' )
( row = '52879' )
( row = '103551' )
( row = '57104' )
( row = '72428' )
( row = '62191' )
( row = '79837' )
( row = '63920' )
( row = '71215' )
( row = '73138' )
( row = '80133' )
( row = '84587' )
( row = '82148' )
( row = '156430' )
( row = '90132' )
( row = '152323' )
( row = '113146' )
( row = '90360' )
( row = '197733' )
( row = '100946' )
( row = '105591' )
( row = '101113' )
( row = '98391' )
( row = '288093' )
( row = '154280' )
( row = '109983' )
( row = '204497' )
( row = '164424' )
( row = '152975' )
( row = '137058' )
( row = '126111' )
( row = '191473' )
( row = '181079' )
( row = '144353' )
( row = '153271' )
( row = '170265' )
( row = '166735' )
( row = '183261' )
( row = '180492' )
( row = '188523' )
( row = '236094' )
( row = '235449' )
( row = '188751' )
( row = '202059' )
( row = '262815' )
( row = '305610' )
( row = '199504' )
( row = '208374' )
( row = '247041' )
( row = '312042' )
( row = '254336' )
( row = '440591' )
( row = '353175' )
( row = '442859' )
( row = '263169' )
( row = '270464' )
( row = '616344' )
( row = '297624' )
( row = '311088' )
( row = '320006' )
( row = '402829' )
( row = '377274' )
( row = '363753' )
( row = '369015' )
( row = '501377' )
( row = '388255' )
( row = '390810' )
( row = '397125' )
( row = '401563' )
( row = '407878' )
( row = '446545' )
( row = '455415' )
( row = '471543' )
( row = '732768' )
( row = '524800' )
( row = '751679' )
( row = '1043856' )
( row = '533633' )
( row = '626922' )
( row = '568088' )
( row = '581552' )
( row = '608712' )
( row = '699343' )
( row = '631094' )
( row = '697280' )
( row = '779065' )
( row = '926958' )
( row = '921925' )
( row = '868668' )
( row = '785380' )
( row = '969651' )
( row = '856978' )
( row = '798688' )
( row = '809441' )
( row = '989430' )
( row = '901960' )
( row = '1036967' )
( row = '996343' )
( row = '1285312' )
( row = '1133512' )
( row = '1101721' )
( row = '1195010' )
( row = '1115185' )
( row = '1149640' )
( row = '1330437' )
( row = '1911355' )
( row = '1239806' )
( row = '1328374' )
( row = '1912577' )
( row = '1476345' )
( row = '3239729' )
( row = '1654048' )
( row = '1655666' )
( row = '1594821' )
( row = '1584068' )
( row = '1608129' )
( row = '1758938' )
( row = '1700648' )
( row = '1711401' )
( row = '2365341' )
( row = '1898303' )
( row = '2895658' )
( row = '2098064' )
( row = '2216906' )
( row = '4654596' )
( row = '3293074' )
( row = '2769233' )
( row = '2354991' )
( row = '3039775' )
( row = '2834627' )
( row = '3238116' )
( row = '3810880' )
( row = '3132011' )
( row = '3060413' )
( row = '3178889' )
( row = '3284716' )
( row = '3192197' )
( row = '3202950' )
( row = '3295469' )
( row = '4253294' )
( row = '3928307' )
( row = '3412049' )
( row = '4720332' )
( row = '4993722' )
( row = '4867297' )
( row = '3996367' )
( row = '4571897' )
( row = '8152013' )
( row = '4986139' )
( row = '5124224' )
( row = '5189618' )
( row = '6472462' )
( row = '5394766' )
( row = '5874402' )
( row = '5895040' )
( row = '7003077' )
( row = '6192424' )
( row = '7385305' )
( row = '8181601' )
( row = '6476913' )
( row = '6395147' )
( row = '6487666' )
( row = '8716699' )
( row = '6707518' )
( row = '7408416' )
( row = '8398188' )
( row = '7983946' )
( row = '8568264' )
( row = '8863664' )
( row = '8982506' )
( row = '9120591' )
( row = '13184431' )
( row = '10860541' )
( row = '10110363' )
( row = '10313842' )
( row = '10584384' )
( row = '11289806' )
( row = '15470172' )
( row = '11769442' )
( row = '12382706' )
( row = '16579789' )
( row = '15056088' )
( row = '12872060' )
( row = '13896082' )
( row = '12964579' )
( row = '13102665' )
( row = '25185888' )
( row = '24474237' )
( row = '14115934' )
( row = '20633106' )
( row = '16382134' )
( row = '16552210' )
( row = '23098440' )
( row = '19092869' )
( row = '18103097' )
( row = '24209924' )
( row = '24392471' )
( row = '27842016' )
( row = '24254385' )
( row = '28687481' )
( row = '24152148' )
( row = '23059248' )
( row = '38150467' )
( row = '24641502' )
( row = '25347285' )
( row = '25836639' )
( row = '42357482' )
( row = '36023827' )
( row = '26067244' )
( row = '27080513' )
( row = '35645079' )
( row = '49033973' )
( row = '30498068' )
( row = '39463219' )
( row = '42619454' )
( row = '32934344' )
( row = '34655307' )
( row = '29221323' )
( row = '37195966' )
( row = '60665329' )
( row = '62725592' )
( row = '47313633' )
( row = '50901264' )
( row = '47211396' )
( row = '82958712' )
( row = '47700750' )
( row = '48406533' )
( row = '49988787' )
( row = '50708746' )
( row = '51183924' )
( row = '51903883' )
( row = '53147757' )
( row = '88497192' )
( row = '77789259' )
( row = '56301836' )
( row = '86546343' )
( row = '67694034' )
( row = '59719391' )
( row = '70130310' )
( row = '81340877' )
( row = '101892670' )
( row = '63876630' )
( row = '66417289' )
( row = '84407362' )
( row = '96107283' )
( row = '94525029' )
( row = '146096070' )
( row = '94912146' )
( row = '95617929' )
( row = '103087807' )
( row = '101554290' )
( row = '180025291' )
( row = '103136544' )
( row = '102612629' )
( row = '110903315' )
( row = '105051640' )
( row = '109449593' )
( row = '116021227' )
( row = '120178466' )
( row = '122719125' )
( row = '178932391' )
( row = '197661573' )
( row = '123596021' )
( row = '167971579' )
( row = '130293919' )
( row = '283113098' )
( row = '199576669' )
( row = '245349680' )
( row = '199243827' )
( row = '189437175' )
( row = '213515944' )
( row = '190530075' )
( row = '196466436' )
( row = '197172219' )
( row = '233045614' )
( row = '390106744' )
( row = '223315010' )
( row = '225331754' )
( row = '207664269' )
( row = '214501233' )
( row = '396748888' )
( row = '225470820' )
( row = '291567600' )
( row = '312156300' )
( row = '478395294' )
( row = '343809863' )
( row = '253889940' )
( row = '298265498' )
( row = '509328519' )
( row = '319731094' )
( row = '472550273' )
( row = '379967250' )
( row = '385903611' )
( row = '386609394' )
( row = '479221694' )
( row = '711440908' )
( row = '545201914' )
( row = '393638655' )
( row = '629794502' )
( row = '422165502' )
( row = '439972053' )
( row = '680214542' )
( row = '461554209' )
( row = '433135089' )
( row = '468391173' )
( row = '1024423608' )
( row = '479360760' )
( row = '545457540' )
( row = '552155438' )
( row = '854294784' )
( row = '573621034' )
( row = '617996592' )
( row = '678232748' )
( row = '705634705' )
( row = '699698344' )
( row = '938840569' )
( row = '773605905' )
( row = '772513005' )
( row = '780248049' )
( row = '815804157' )
( row = '1170152030' )
( row = '826773744' )
( row = '855192864' )
( row = '1418201329' )
( row = '862137555' )
( row = '1794033433' )
( row = '1024818300' )
( row = '894689298' )
( row = '1051131681' )
( row = '1163454132' )
( row = '1031516198' )
( row = '1052981794' )
( row = '1119078574' )
( row = '1125776472' )
( row = '1191617626' )
( row = '1450745753' )
( row = '1485882754' )
( row = '1377931092' )
( row = '1405333049' )
( row = '1472211349' )
( row = '2266130803' )
( row = '1546118910' )
( row = '1552761054' )
( row = '2576522225' )
( row = '1642577901' )
( row = '1717330419' )
( row = '1681966608' )
( row = '1749882162' )
( row = '2300022347' )
( row = '1886955855' )
( row = '2216435926' )
( row = '1919507598' )
( row = '2242749307' )
( row = '2084497992' )
( row = '2150594772' )
( row = '2157292670' )
( row = '2172060368' )
( row = '2244855046' )
( row = '2317394098' )
( row = '2569548718' )
( row = '2891215803' )
( row = '2783264141' )
( row = '2850142441' )
( row = '2877544398' )
( row = '3762554836' )
( row = '3098879964' )
( row = '4533830024' )
( row = '3195338955' )
( row = '4384520339' )
( row = '5066578367' )
( row = '3399297027' )
( row = '3568922463' )
( row = '3636838017' )
( row = '8170668041' )
( row = '6514382415' )
( row = '4373728596' )
( row = '4467988870' )
( row = '4322655140' )
( row = '6446466861' )
( row = '4307887442' )
( row = '5674479944' )
( row = '4416915414' )
( row = '7406767406' )
( row = '5100658239' )
( row = '5352812859' )
( row = '5978603096' )
( row = '7105919281' )
( row = '6498176991' )
( row = '8669580702' )
( row = '6294218919' )
( row = '6735717981' )
( row = '11048212439' )
( row = '8021358356' )
( row = '6968219490' )
( row = '11573908151' )
( row = '7036135044' )
( row = '7205760480' )
( row = '7944725459' )
( row = '9423313379' )
( row = '8630542582' )
( row = '8790644010' )
( row = '17868127070' )
( row = '8724802856' )
( row = '9408545681' )
( row = '9982367386' )
( row = '10453471098' )
( row = '9517573653' )
( row = '11079261335' )
( row = '12792395910' )
( row = '18253972919' )
( row = '12272822015' )
( row = '13400138200' )
( row = '13233894972' )
( row = '13029936900' )
( row = '13262438409' )
( row = '14912944949' )
( row = '14004354534' )
( row = '27677286298' )
( row = '17188127866' )
( row = '20436273244' )
( row = '14241895524' )
( row = '21790395668' )
( row = '20502574714' )
( row = '17421186592' )
( row = '19499941039' )
( row = '17515446866' )
( row = '25912930722' )
( row = '23687366070' )
( row = '18926119334' )
( row = '20435838484' )
( row = '25672960215' )
( row = '24109198235' )
( row = '44865414164' )
( row = '25065217925' )
( row = '25302758915' )
( row = '25506716987' )
( row = '26263831872' )
( row = '30683625001' )
( row = '27034291434' )
( row = '27504333933' )
( row = '28246250058' )
( row = '31192482400' )
( row = '48104811593' )
( row = '36921127631' )
( row = '33168014858' )
( row = '31663082116' )
( row = '42486404517' )
( row = '34936633458' )
( row = '43188407081' )
( row = '50683461724' )
( row = '36441566200' )
( row = '43991337259' )
( row = '81786541795' )
( row = '39361957818' )
( row = '44545036719' )
( row = '49174416160' )
( row = '49411957150' )
( row = '61876107401' )
( row = '50367976840' )
( row = '53549008973' )
( row = '51770548859' )
( row = '53298123306' )
( row = '54538625367' )
( row = '55280541492' )
( row = '59909332174' )
( row = '84348590608' )
( row = '87706640225' )
( row = '64831096974' )
( row = '82346543840' )
( row = '71025039934' )
( row = '66599715574' )
( row = '71378199658' )
( row = '126331578514' )
( row = '75803524018' )
( row = '121746176498' )
( row = '93956993869' )
( row = '115923236377' )
( row = '89729934658' )
( row = '83906994537' )
( row = '93719452879' )
( row = '143131410029' )
( row = '99779933990' )
( row = '102138525699' )
( row = '136119139467' )
( row = '125563665301' )
( row = '106309174226' )
( row = '107836748673' )
( row = '109819166859' )
( row = '115189873666' )
( row = '126509047748' )
( row = '185622690877' )
( row = '147177640814' )
( row = '131430812548' )
( row = '287761216576' )
( row = '137624755508' )
( row = '192931294088' )
( row = '165533458676' )
( row = '159710518555' )
( row = '177626447416' )
( row = '201793742542' )
( row = '173636929195' )
( row = '183449387537' )
( row = '183686928527' )
( row = '186045520236' )
( row = '193499386869' )
( row = '206089108216' )
( row = '217655915532' )
( row = '208447699925' )
( row = '407882850758' )
( row = '423745023748' )
( row = '232818221974' )
( row = '239267561221' )
( row = '300145976943' )
( row = '241698921414' )
( row = '314880200085' )
( row = '269055568056' )
( row = '330627028351' )
( row = '291141331103' )
( row = '353209905424' )
( row = '343159906092' )
( row = '392134628452' )
( row = '325243977231' )
( row = '351263376611' )
( row = '363671967652' )
( row = '357086316732' )
( row = '416505150501' )
( row = '367136316064' )
( row = '399588495085' )
( row = '394493220161' )
( row = '745756596772' )
( row = '414536808141' )
( row = '426103615457' )
( row = '441265921899' )
( row = '472085783195' )
( row = '584858827506' )
( row = '474517143388' )
( row = '592477466645' )
( row = '709373420246' )
( row = '510754489470' )
( row = '783641466565' )
( row = '560196899159' )
( row = '841653459452' )
( row = '616385308334' )
( row = '694423282703' )
( row = '719737197392' )
( row = '676507353842' )
( row = '886622591336' )
( row = '720758284384' )
( row = '724222632796' )
( row = '1071000574003' )
( row = '810998370662' )
( row = '1010962442963' )
( row = '794081715246' )
( row = '1208618523387' )
( row = '1150639342145' )
( row = '1001462821058' )
( row = '867369537356' )
( row = '915783065287' )
( row = '946602926583' )
( row = '985271632858' )
( row = '1034714042547' )
( row = '1176582207493' )
( row = '1070951388629' )
( row = '1127139797804' )
( row = '1587106734748' )
( row = '1812461191720' )
( row = '2502889800035' )
( row = '1292892662176' )
( row = '1370930636545' )
( row = '1396244551234' )
( row = '1607380875720' )
( row = '3537603842582' )
( row = '1444980917180' )
( row = '1795174021425' )
( row = '1938370111359' )
( row = '1661451252602' )
( row = '1709864780533' )
( row = '2086974377422' )
( row = '1950497107834' )
( row = '1813972463939' )
( row = '1783152602643' )
( row = '2105665431176' )
( row = '1986734453916' )
( row = '1931874559441' )
( row = '2019985675405' )
( row = '3108456766934' )
( row = '2198091186433' )
( row = '2788591050406' )
( row = '2420032459980' )
( row = '2689137213410' )
( row = '3769887056559' )
( row = '4136461297792' )
( row = '2663823298721' )
( row = '2767175187779' )
( row = '3003625426954' )
( row = '4056162539010' )
( row = '3106432169782' )
( row = '3228133519823' )
( row = '3371316033135' )
( row = '3733649710477' )
( row = '4887228399843' )
( row = '3493017383176' )
( row = '3597125066582' )
( row = '5109290858130' )
( row = '3803138278048' )
( row = '5917270733233' )
( row = '4125651106581' )
( row = '3951860234846' )
( row = '4129965745874' )
( row = '4218076861838' )
( row = '4618123646413' )
( row = '4861914485154' )
( row = '5109169673390' )
( row = '7773114156851' )
( row = '6156840681897' )
( row = '6840081880259' )
( row = '5430998486500' )
( row = '5667448725675' )
( row = '6500824898256' )
( row = '6110057596736' )
( row = '6721150902999' )
( row = '10235708703317' )
( row = '7446210381661' )
( row = '6968441099717' )
( row = '7090142449758' )
( row = '8743774752994' )
( row = '7296155661224' )
( row = '7400263344630' )
( row = '8912307951438' )
( row = '8665052763202' )
( row = '8077511341427' )
( row = '8081825980720' )
( row = '9079991346992' )
( row = '15069148633335' )
( row = '10374917543735' )
( row = '13510320941366' )
( row = '9971084158544' )
( row = '11219227270126' )
( row = '14917593221686' )
( row = '12271080366759' )
( row = '11098447212175' )
( row = '12168273623931' )
( row = '11777506322411' )
( row = '12610882494992' )
( row = '12831208499735' )
( row = '13689592002716' )
( row = '14058583549475' )
( row = '14264596760941' )
( row = '14368704444347' )
( row = '14386298110982' )
( row = '14696419005854' )
( row = '23369527578934' )
( row = '20231471844365' )
( row = '16159337322147' )
( row = '24824390085349' )
( row = '25915646275980' )
( row = '26997180605974' )
( row = '25678594565297' )
( row = '22242164525303' )
( row = '22802292658279' )
( row = '22139357782475' )
( row = '21069531370719' )
( row = '22317674482301' )
( row = '22875953534586' )
( row = '25442090994727' )
( row = '28961015766795' )
( row = '25836089871886' )
( row = '26042103083352' )
( row = '26300474497708' )
( row = '40284350720327' )
( row = '28755002555329' )
( row = '28323180310416' )
( row = '35334128131660' )
( row = '51203180292098' )
( row = '36525655893457' )
( row = '45044457183582' )
( row = '45193628016887' )
( row = '36390809166512' )
( row = '42074983598127' )
( row = '48153764354187' )
( row = '43311695896022' )
( row = '49176428032294' )
( row = '43208889153194' )
( row = '43387205853020' )
( row = '43871824028998' )
( row = '44457032264776' )
( row = '73989854226073' )
( row = '47759765477028' )
( row = '48318044529313' )
( row = '51278180866613' )
( row = '54591092427215' )
( row = '69044979025080' )
( row = '52342577581060' )
( row = '54623654808124' )
( row = '57078182865745' )
( row = '76082945787444' )
( row = '92610796618963' )
( row = '71724937298172' )
( row = '72916465059969' )
( row = '78465792764639' )
( row = '79599698319706' )
( row = '81584437183399' )
( row = '79702505062534' )
( row = '122092893092263' )
( row = '86596095006214' )
( row = '86520585049216' )
( row = '87080713182192' )
( row = '96799609845836' )
( row = '87259029882018' )
( row = '99080687072900' ) ).
DATA: lv_checked TYPE abap_bool VALUE abap_false,
lv_current_index TYPE i VALUE 0.
" Task 1
LOOP AT lv_input INTO wa_input.
IF lines( lv_input ) GE ( sy-tabix + 25 ).
lv_checked = abap_false.
lv_current_index = sy-tabix + 25.
READ TABLE lv_input INTO DATA(wa_cur_result) INDEX lv_current_index.
" Go through the preamble
DO 25 TIMES.
DATA(lv_cur_index_a) = sy-index.
DO 25 TIMES.
DATA(lv_cur_index_b) = sy-index.
READ TABLE lv_input INTO DATA(lv_number_a) INDEX lv_current_index - lv_cur_index_a.
READ TABLE lv_input INTO DATA(lv_number_b) INDEX lv_current_index - lv_cur_index_b.
DATA(lv_check_result) = lv_number_a-row + lv_number_b-row.
IF lv_check_result EQ wa_cur_result-row.
lv_checked = abap_true.
EXIT.
ENDIF.
ENDDO.
IF lv_checked EQ abap_true.
EXIT.
ENDIF.
ENDDO.
IF lv_checked EQ abap_false.
WRITE: 'Task 1 - Found value: ' && wa_cur_result-row.
EXIT.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDLOOP.
" Task 2
LOOP AT lv_input INTO DATA(wa_input_a).
DATA(lv_cur_range) = sy-tabix.
LOOP AT lv_input INTO DATA(wa_input_b).
DATA(lv_cur_range_sum) = 0.
DATA(lv_cur_range_index) = sy-tabix.
DO lv_cur_range TIMES.
READ TABLE lv_input INTO DATA(lv_cur_num) INDEX ( sy-index + lv_cur_range_index - 1 ).
IF sy-index EQ 1.
DATA(lv_cur_range_start) = lv_cur_num-row.
ENDIF.
lv_cur_range_sum = lv_cur_range_sum + lv_cur_num-row.
ENDDO.
DATA(lv_cur_range_end) = lv_cur_num-row.
IF lv_cur_range_sum EQ wa_cur_result-row.
EXIT.
ENDIF.
ENDLOOP.
IF lv_cur_range_sum EQ wa_cur_result-row.
EXIT.
ENDIF.
ENDLOOP.
DATA(lv_result) = lv_cur_range_start + lv_cur_range_end.
WRITE: 'Task 2 - Found range sum: ' && lv_result && ' (' && lv_cur_range_start && '-' && lv_cur_range_start && ')'.
| [
9936,
47,
1546,
25,
347,
43312,
3963,
256,
62,
15414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
23578,
3963,
256,
62,
15414,
13,
198,
198,
9,
23412,
14305,
198,
26947,
25,
300,
85,
62,
15414,
41876,
43679,
3963,
256,
62,
15414,
11,
198,
220,
220,
220,
220,
220,
2082,
62,
15414,
34178,
48920,
3963,
300,
85,
62,
15414,
13,
198,
198,
9,
2195,
570,
351,
262,
15027,
5128,
13,
198,
6780,
62,
15414,
796,
26173,
8924,
1303,
7,
198,
357,
5752,
796,
705,
2091,
6,
1267,
198,
357,
5752,
796,
705,
1507,
6,
1267,
198,
357,
5752,
796,
705,
1828,
6,
1267,
198,
357,
5752,
796,
705,
2598,
6,
1267,
198,
357,
5752,
796,
705,
2920,
6,
1267,
198,
357,
5752,
796,
705,
1314,
6,
1267,
198,
357,
5752,
796,
705,
1065,
6,
1267,
198,
357,
5752,
796,
705,
2548,
6,
1267,
198,
357,
5752,
796,
705,
3901,
6,
1267,
198,
357,
5752,
796,
705,
3510,
6,
1267,
198,
357,
5752,
796,
705,
18,
6,
1267,
198,
357,
5752,
796,
705,
3682,
6,
1267,
198,
357,
5752,
796,
705,
2718,
6,
1267,
198,
357,
5752,
796,
705,
1129,
6,
1267,
198,
357,
5752,
796,
705,
1485,
6,
1267,
198,
357,
5752,
796,
705,
22,
6,
1267,
198,
357,
5752,
796,
705,
2481,
6,
1267,
198,
357,
5752,
796,
705,
1959,
6,
1267,
198,
357,
5752,
796,
705,
2682,
6,
1267,
198,
357,
5752,
796,
705,
1821,
6,
1267,
198,
357,
5752,
796,
705,
2670,
6,
1267,
198,
357,
5752,
796,
705,
2327,
6,
1267,
198,
357,
5752,
796,
705,
1983,
6,
1267,
198,
357,
5752,
796,
705,
1495,
6,
1267,
198,
357,
5752,
796,
705,
2780,
6,
1267,
198,
357,
5752,
796,
705,
5774,
6,
1267,
198,
357,
5752,
796,
705,
940,
6,
1267,
198,
357,
5752,
796,
705,
1433,
6,
1267,
198,
357,
5752,
796,
705,
1558,
6,
1267,
198,
357,
5752,
796,
705,
2231,
6,
1267,
198,
357,
5752,
796,
705,
1507,
6,
1267,
198,
357,
5752,
796,
705,
1270,
6,
1267,
198,
357,
5752,
796,
705,
1238,
6,
1267,
198,
357,
5752,
796,
705,
1828,
6,
1267,
198,
357,
5752,
796,
705,
1954,
6,
1267,
198,
357,
5752,
796,
705,
4790,
6,
1267,
198,
357,
5752,
796,
705,
1731,
6,
1267,
198,
357,
5752,
796,
705,
2075,
6,
1267,
198,
357,
5752,
796,
705,
2078,
6,
1267,
198,
357,
5752,
796,
705,
4310,
6,
1267,
198,
357,
5752,
796,
705,
3132,
6,
1267,
198,
357,
5752,
796,
705,
2718,
6,
1267,
198,
357,
5752,
796,
705,
4349,
6,
1267,
198,
357,
5752,
796,
705,
2624,
6,
1267,
198,
357,
5752,
796,
705,
2091,
6,
1267,
198,
357,
5752,
796,
705,
2682,
6,
1267,
198,
357,
5752,
796,
705,
2623,
6,
1267,
198,
357,
5752,
796,
705,
2327,
6,
1267,
198,
357,
5752,
796,
705,
4051,
6,
1267,
198,
357,
5752,
796,
705,
1983,
6,
1267,
198,
357,
5752,
796,
705,
2548,
6,
1267,
198,
357,
5752,
796,
705,
2670,
6,
1267,
198,
357,
5752,
796,
705,
1821,
6,
1267,
198,
357,
5752,
796,
705,
4524,
6,
1267,
198,
357,
5752,
796,
705,
2154,
6,
1267,
198,
357,
5752,
796,
705,
3901,
6,
1267,
198,
357,
5752,
796,
705,
6052,
6,
1267,
198,
357,
5752,
796,
705,
18444,
6,
1267,
198,
357,
5752,
796,
705,
2231,
6,
1267,
198,
357,
5752,
796,
705,
5066,
6,
1267,
198,
357,
5752,
796,
705,
5774,
6,
1267,
198,
357,
5752,
796,
705,
2791,
6,
1267,
198,
357,
5752,
796,
705,
2996,
6,
1267,
198,
357,
5752,
796,
705,
2816,
6,
1267,
198,
357,
5752,
796,
705,
3365,
6,
1267,
198,
357,
5752,
796,
705,
5237,
6,
1267,
198,
357,
5752,
796,
705,
4761,
6,
1267,
198,
357,
5752,
796,
705,
13348,
6,
1267,
198,
357,
5752,
796,
705,
3270,
6,
1267,
198,
357,
5752,
796,
705,
4304,
6,
1267,
198,
357,
5752,
796,
705,
5333,
6,
1267,
198,
357,
5752,
796,
705,
3134,
6,
1267,
198,
357,
5752,
796,
705,
3104,
6,
1267,
198,
357,
5752,
796,
705,
3324,
6,
1267,
198,
357,
5752,
796,
705,
15801,
6,
1267,
198,
357,
5752,
796,
705,
3695,
6,
1267,
198,
357,
5752,
796,
705,
3720,
6,
1267,
198,
357,
5752,
796,
705,
24839,
6,
1267,
198,
357,
5752,
796,
705,
4521,
6,
1267,
198,
357,
5752,
796,
705,
17657,
6,
1267,
198,
357,
5752,
796,
705,
4846,
6,
1267,
198,
357,
5752,
796,
705,
3064,
6,
1267,
198,
357,
5752,
796,
705,
15711,
6,
1267,
198,
357,
5752,
796,
705,
13464,
6,
1267,
198,
357,
5752,
796,
705,
10163,
6,
1267,
198,
357,
5752,
796,
705,
16616,
6,
1267,
198,
357,
5752,
796,
705,
16562,
6,
1267,
198,
357,
5752,
796,
705,
18298,
6,
1267,
198,
357,
5752,
796,
705,
18741,
6,
1267,
198,
357,
5752,
796,
705,
16315,
6,
1267,
198,
357,
5752,
796,
705,
23188,
6,
1267,
198,
357,
5752,
796,
705,
10232,
6,
1267,
198,
357,
5752,
796,
705,
25272,
6,
1267,
198,
357,
5752,
796,
705,
19420,
6,
1267,
198,
357,
5752,
796,
705,
22413,
6,
1267,
198,
357,
5752,
796,
705,
22883,
6,
1267,
198,
357,
5752,
796,
705,
17059,
6,
1267,
198,
357,
5752,
796,
705,
24294,
6,
1267,
198,
357,
5752,
796,
705,
17477,
6,
1267,
198,
357,
5752,
796,
705,
1264,
6,
1267,
198,
357,
5752,
796,
705,
22985,
6,
1267,
198,
357,
5752,
796,
705,
15277,
6,
1267,
198,
357,
5752,
796,
705,
25096,
6,
1267,
198,
357,
5752,
796,
705,
19782,
6,
1267,
198,
357,
5752,
796,
705,
21536,
6,
1267,
198,
357,
5752,
796,
705,
23045,
6,
1267,
198,
357,
5752,
796,
705,
22291,
6,
1267,
198,
357,
5752,
796,
705,
32568,
6,
1267,
198,
357,
5752,
796,
705,
24591,
6,
1267,
198,
357,
5752,
796,
705,
24403,
6,
1267,
198,
357,
5752,
796,
705,
23539,
6,
1267,
198,
357,
5752,
796,
705,
21288,
6,
1267,
198,
357,
5752,
796,
705,
22370,
6,
1267,
198,
357,
5752,
796,
705,
20167,
6,
1267,
198,
357,
5752,
796,
705,
21495,
6,
1267,
198,
357,
5752,
796,
705,
30057,
6,
1267,
198,
357,
5752,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 ZCX_IDOC_DATA_NOT_FOR_SEND definition
public
inheriting from CX_STATIC_CHECK
final
create public .
public section.
*"* public components of class ZCX_IDOC_DATA_NOT_FOR_SEND
*"* do not include other source files here!!!
constants ZCX_IDOC_DATA_NOT_FOR_SEND type SOTR_CONC value '00505697691A1ED98BBA9DB88013C51D' ##NO_TEXT.
data MSG type STRING .
methods CONSTRUCTOR
importing
!TEXTID like TEXTID optional
!PREVIOUS like PREVIOUS optional
!MSG type STRING optional .
protected section.
*"* protected components of class ZCX_IDOC_DATA_NOT_FOR_SEND
*"* do not include other source files here!!!
private section.
*"* private components of class ZCX_IDOC_DATA_NOT_FOR_SEND
*"* do not include other source files here!!!
ENDCLASS.
CLASS ZCX_IDOC_DATA_NOT_FOR_SEND IMPLEMENTATION.
method CONSTRUCTOR.
CALL METHOD SUPER->CONSTRUCTOR
EXPORTING
TEXTID = TEXTID
PREVIOUS = PREVIOUS
.
IF textid IS INITIAL.
me->textid = ZCX_IDOC_DATA_NOT_FOR_SEND .
ENDIF.
me->MSG = MSG .
endmethod.
ENDCLASS.
| [
4871,
1168,
34,
55,
62,
2389,
4503,
62,
26947,
62,
11929,
62,
13775,
62,
50,
10619,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
327,
55,
62,
35744,
2149,
62,
50084,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
34,
55,
62,
2389,
4503,
62,
26947,
62,
11929,
62,
13775,
62,
50,
10619,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
38491,
1168,
34,
55,
62,
2389,
4503,
62,
26947,
62,
11929,
62,
13775,
62,
50,
10619,
2099,
311,
2394,
49,
62,
10943,
34,
1988,
705,
405,
31654,
40035,
49541,
32,
16,
1961,
4089,
33,
4339,
24,
11012,
3459,
30273,
34,
4349,
35,
6,
22492,
15285,
62,
32541,
13,
198,
220,
1366,
49064,
2099,
19269,
2751,
764,
628,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
32541,
2389,
588,
40383,
2389,
11902,
198,
220,
220,
220,
220,
220,
5145,
46437,
12861,
20958,
588,
22814,
12861,
20958,
11902,
198,
220,
220,
220,
220,
220,
5145,
5653,
38,
2099,
19269,
2751,
11902,
764,
198,
24326,
2665,
13,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
34,
55,
62,
2389,
4503,
62,
26947,
62,
11929,
62,
13775,
62,
50,
10619,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
19734,
2665,
13,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
34,
55,
62,
2389,
4503,
62,
26947,
62,
11929,
62,
13775,
62,
50,
10619,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
34,
55,
62,
2389,
4503,
62,
26947,
62,
11929,
62,
13775,
62,
50,
10619,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
2446,
7102,
46126,
1581,
13,
198,
34,
7036,
337,
36252,
33088,
3784,
10943,
46126,
1581,
198,
6369,
15490,
2751,
198,
32541,
2389,
796,
40383,
2389,
198,
46437,
12861,
20958,
796,
22814,
12861,
20958,
198,
13,
198,
16876,
2420,
312,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
502,
3784,
5239,
312,
796,
1168,
34,
55,
62,
2389,
4503,
62,
26947,
62,
11929,
62,
13775,
62,
50,
10619,
764,
198,
23578,
5064,
13,
198,
1326,
3784,
5653,
38,
796,
49064,
764,
198,
220,
886,
24396,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 ZEX_F01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form create_instances
*&---------------------------------------------------------------------*
FORM create_instances .
IF editor IS INITIAL.
* create instance for HTML Editor custom control
CREATE OBJECT editor
EXPORTING
container_name = c_editor
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
IF g_editor IS INITIAL.
* create instance for HTML Editor text editor
CREATE OBJECT g_editor
EXPORTING
wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder
wordwrap_to_linebreak_mode = cl_gui_textedit=>true
parent = editor
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
gui_type_not_supported = 5
OTHERS = 6
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
PERFORM create_viewer_instances.
ENDFORM. " create_instances
*&---------------------------------------------------------------------*
*& Form display_initial
*&---------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM display_initial .
IF html_viewer IS NOT INITIAL.
REFRESH g_text.
APPEND '<HTML><BODY><H4>Press Execute HTML(F5) to view your HTML Output!</H4></BODY></HTML>'
TO g_text.
CALL METHOD html_viewer->load_data
IMPORTING
assigned_url = url
CHANGING
data_table = g_text
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_general = 2
cntl_error = 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.
CALL METHOD html_viewer->show_url
EXPORTING
url = url
EXCEPTIONS
cntl_error = 1
cnht_error_not_allowed = 2
cnht_error_parameter = 3
dp_error_general = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " display_initial
*&---------------------------------------------------------------------*
*& Form check_editor_initial
*&---------------------------------------------------------------------*
FORM check_editor_initial .
IF g_editor IS NOT INITIAL.
CALL METHOD g_editor->get_text_as_stream
IMPORTING
text = g_text
EXCEPTIONS
error_dp = 1
error_cntl_call_method = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF g_text IS NOT INITIAL.
CALL FUNCTION 'C14A_POPUP_SAVE_BEFORE_ACTION'
EXPORTING
i_text1 = 'Unsaved Data will be lost.'
IMPORTING
e_continue = g_continue.
IF g_continue = 'X'.
LEAVE PROGRAM.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " check_editor_initial
*&---------------------------------------------------------------------*
*& Form EXEC_HTML
*&---------------------------------------------------------------------*
FORM exec_html .
DATA: url TYPE c LENGTH 255.
PERFORM free_instances.
REFRESH g_text.
PERFORM create_viewer_instances.
CALL METHOD g_editor->get_text_as_stream
IMPORTING
text = g_text
EXCEPTIONS
error_dp = 1
error_cntl_call_method = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF g_text IS INITIAL.
PERFORM display_initial.
EXIT.
ENDIF.
CALL METHOD html_viewer->load_data " generate url
IMPORTING
assigned_url = url
CHANGING
data_table = g_text
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_general = 2
cntl_error = 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.
html_viewer->show_url( url = url ). " display HTML o/p
ENDFORM. " EXEC_HTML
*&---------------------------------------------------------------------*
*& Form free_instances
*&---------------------------------------------------------------------*
FORM free_instances .
IF html_viewer IS NOT INITIAL.
CALL METHOD html_viewer->free.
FREE html_viewer.
ENDIF.
IF viewer IS NOT INITIAL.
CALL METHOD viewer->free.
FREE viewer.
ENDIF.
ENDFORM. " free_instances
*&---------------------------------------------------------------------*
*& Form CREATE_VIEWER_INSTANCES
*&---------------------------------------------------------------------*
FORM create_viewer_instances .
IF viewer IS INITIAL.
CREATE OBJECT viewer
EXPORTING
container_name = c_viewer
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
CREATE OBJECT html_viewer
EXPORTING
parent = viewer
EXCEPTIONS
cntl_error = 1
cntl_install_error = 2
dp_install_error = 3
dp_error = 4
OTHERS = 5
.
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. " CREATE_VIEWER_INSTANCES
| [
9,
10097,
23031,
9,
198,
9,
1268,
5097,
52,
7206,
1168,
6369,
62,
37,
486,
764,
198,
9,
10097,
23031,
9,
198,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
220,
220,
220,
220,
5178,
220,
2251,
62,
8625,
1817,
198,
9,
5,
10097,
30934,
9,
198,
21389,
2251,
62,
8625,
1817,
764,
198,
220,
16876,
5464,
3180,
3268,
2043,
12576,
13,
198,
9,
220,
220,
2251,
4554,
329,
11532,
12058,
2183,
1630,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
5464,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
9290,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
269,
62,
35352,
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,
220,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
269,
429,
75,
62,
10057,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
2251,
62,
18224,
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,
10869,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
604,
198,
220,
220,
220,
220,
220,
220,
220,
10869,
62,
67,
2047,
1676,
62,
67,
2047,
1676,
62,
8726,
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,
220,
220,
220,
220,
220,
220,
220,
796,
718,
198,
220,
220,
220,
220,
220,
220,
220,
764,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
4522,
827,
12,
19662,
312,
41876,
827,
12,
19662,
774,
36871,
13246,
827,
12,
19662,
3919,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
827,
12,
19662,
85,
16,
827,
12,
19662,
85,
17,
827,
12,
19662,
85,
18,
827,
12,
19662,
85,
19,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
5064,
13,
198,
220,
16876,
308,
62,
35352,
3180,
3268,
2043,
12576,
13,
198,
9,
220,
220,
2251,
4554,
329,
11532,
12058,
2420,
5464,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
308,
62,
35352,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1573,
37150,
62,
14171,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
537,
62,
48317,
62,
5239,
19312,
14804,
4775,
37150,
62,
265,
62,
17497,
20192,
198,
220,
220,
220,
220,
220,
220,
220,
1573,
37150,
62,
1462,
62,
1370,
9032,
62,
14171,
796,
537,
62,
48317,
62,
5239,
19312,
14804,
7942,
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,
220,
220,
220,
796,
5464,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
66,
429,
75,
62,
17953,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
66,
429,
75,
62,
15003,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
66,
429,
75,
62,
8726,
220,
220,
220,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
26059,
62,
17953,
220,
220,
220,
220,
220,
220,
220,
796,
604,
198,
220,
220,
220,
220,
220,
220,
220,
11774,
62,
4906,
62,
1662,
62,
15999,
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,
220,
220,
796,
718,
198,
220,
220,
220,
220,
220,
220,
220,
764,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
4522,
827,
12,
19662,
312,
41876,
827,
12,
19662,
774,
36871,
13246,
827,
12,
19662,
3919,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
827,
12,
19662,
85,
16,
827,
12,
19662,
85,
17,
827,
12,
19662,
85,
18,
827,
12,
19662,
85,
19,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
5064,
13,
198,
220,
19878,
21389,
2251,
62,
1177,
263,
62,
8625,
1817,
13,
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,
2251,
62,
8625,
1817,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
220,
220,
220,
220,
5178,
220,
3359,
62,
36733,
198,
9,
5,
10097,
30934,
9,
198,
9,
220,
14610,
220,
279,
16,
220,
220,
220,
220,
220,
220,
220,
2420,
198,
9,
220,
1279,
438,
220,
279,
17,
220,
220,
220,
220,
220,
220,
220,
2420,
198,
9,
10097,
23031,
9,
198,
21389,
3359,
62,
36733,
764,
198,
220,
16876,
27711,
62,
1177,
263,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
4526,
10913,
44011,
308,
62,
5239,
13,
198,
220,
220,
220,
43504,
10619,
705,
27,
28656,
6927,
33,
33076,
6927,
39,
19,
29,
13800,
8393,
1133,
11532,
7,
37,
20,
8,
284,
1570,
534,
11532,
25235,
0,
3556,
39,
19,
12240,
33,
33076,
12240,
28656,
29,
6,
198,
220,
220,
220,
5390,
220,
308,
62,
5239,
13,
198,
220,
220,
220,
42815,
337,
36252,
27711,
62,
1177,
263,
3784,
2220,
62,
7890,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
8686,
62,
6371,
220,
220,
220,
220,
220,
220,
220,
220,
796,
19016,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
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,
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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
] |
class ZDBGL_GET_LOCALS definition
public
INHERITING FROM zdbgl_getter
final
create public .
public section.
TYPES: BEGIN OF _source_position,
abap_program TYPE tpda_program,
include TYPE tpda_include,
line TYPE tpda_sc_line,
END OF _source_position.
class-methods FACTORY
IMPORTING
key_testcase TYPE zdbgl_key_testcases
source_position TYPE _source_position
RETURNING VALUE(instance) TYPE REF TO zdbgl_get_locals
RAISING
zcx_dbgl_testcase.
protected section.
private section.
ENDCLASS.
CLASS ZDBGL_GET_LOCALS IMPLEMENTATION.
method FACTORY.
TYPES: BEGIN OF _record,
locals TYPE zdbgl_locals-locals,
END OF _record.
DATA: full_record TYPE STANDARD TABLE OF _record,
locals_json_string TYPE string,
record TYPE REF TO _record.
SELECT locals FROM zdbgl_locals
INTO CORRESPONDING FIELDS OF TABLE @full_record
WHERE abap_program = @source_position-abap_program
AND include = @source_position-include AND line = @source_position-line
AND key_testcase = @key_testcase.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zcx_dbgl_testcase
EXPORTING
textid = zcx_dbgl_testcase=>testcase_not_found
key_testcase = key_testcase
program = source_position-abap_program.
ENDIF.
LOOP AT full_record REFERENCE INTO record.
locals_json_string = locals_json_string &&
record->*-locals.
ENDLOOP.
CREATE OBJECT instance
EXPORTING
values = locals_json_string
program = source_position-abap_program.
endmethod.
ENDCLASS.
| [
4871,
1168,
11012,
8763,
62,
18851,
62,
29701,
23333,
6770,
198,
220,
1171,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
9945,
4743,
62,
1136,
353,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
198,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
4808,
10459,
62,
9150,
11,
198,
220,
220,
220,
450,
499,
62,
23065,
41876,
256,
79,
6814,
62,
23065,
11,
198,
220,
220,
220,
2291,
41876,
256,
79,
6814,
62,
17256,
11,
198,
220,
220,
220,
1627,
41876,
256,
79,
6814,
62,
1416,
62,
1370,
11,
198,
220,
23578,
3963,
4808,
10459,
62,
9150,
13,
628,
220,
1398,
12,
24396,
82,
376,
10659,
15513,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
1994,
62,
9288,
7442,
41876,
1976,
9945,
4743,
62,
2539,
62,
9288,
33964,
198,
220,
220,
220,
220,
220,
2723,
62,
9150,
41876,
4808,
10459,
62,
9150,
198,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
39098,
8,
41876,
4526,
37,
5390,
1976,
9945,
4743,
62,
1136,
62,
17946,
874,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
9945,
4743,
62,
9288,
7442,
13,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
11012,
8763,
62,
18851,
62,
29701,
23333,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
2446,
376,
10659,
15513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
4808,
22105,
11,
198,
220,
220,
220,
220,
220,
17205,
41876,
1976,
9945,
4743,
62,
17946,
874,
12,
17946,
874,
11,
198,
220,
220,
220,
23578,
3963,
4808,
22105,
13,
198,
220,
220,
220,
42865,
25,
1336,
62,
22105,
41876,
49053,
9795,
43679,
3963,
4808,
22105,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17205,
62,
17752,
62,
8841,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1700,
41876,
4526,
37,
5390,
4808,
22105,
13,
628,
220,
220,
220,
33493,
17205,
16034,
1976,
9945,
4743,
62,
17946,
874,
198,
220,
220,
220,
220,
220,
39319,
23929,
19535,
47,
18672,
2751,
18930,
3698,
5258,
3963,
43679,
2488,
12853,
62,
22105,
198,
220,
220,
220,
220,
220,
33411,
450,
499,
62,
23065,
796,
2488,
10459,
62,
9150,
12,
397,
499,
62,
23065,
198,
220,
220,
220,
220,
220,
5357,
2291,
796,
2488,
10459,
62,
9150,
12,
17256,
5357,
1627,
796,
2488,
10459,
62,
9150,
12,
1370,
198,
220,
220,
220,
220,
220,
5357,
1994,
62,
9288,
7442,
796,
2488,
2539,
62,
9288,
7442,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
17926,
24352,
7788,
42006,
2849,
41876,
1976,
66,
87,
62,
9945,
4743,
62,
9288,
7442,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
312,
796,
1976,
66,
87,
62,
9945,
4743,
62,
9288,
7442,
14804,
9288,
7442,
62,
1662,
62,
9275,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1994,
62,
9288,
7442,
796,
1994,
62,
9288,
7442,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1430,
796,
2723,
62,
9150,
12,
397,
499,
62,
23065,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
17579,
3185,
5161,
1336,
62,
22105,
4526,
24302,
18310,
39319,
1700,
13,
198,
220,
220,
220,
220,
220,
17205,
62,
17752,
62,
8841,
796,
17205,
62,
17752,
62,
8841,
11405,
198,
220,
220,
220,
220,
220,
220,
220,
1700,
3784,
9,
12,
17946,
874,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
4554,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
3815,
796,
17205,
62,
17752,
62,
8841,
198,
220,
220,
220,
220,
220,
220,
220,
1430,
796,
2723,
62,
9150,
12,
397,
499,
62,
23065,
13,
628,
220,
886,
24396,
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,
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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 zcl_abapgit_object_tran 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.
TYPES:
ty_param_values TYPE STANDARD TABLE OF rsparam
WITH NON-UNIQUE DEFAULT KEY ,
ty_tstca TYPE STANDARD TABLE OF tstca
WITH DEFAULT KEY.
CONSTANTS:
c_oo_program TYPE c LENGTH 9 VALUE '\PROGRAM=' ##NO_TEXT,
c_oo_class TYPE c LENGTH 7 VALUE '\CLASS=' ##NO_TEXT,
c_oo_method TYPE c LENGTH 8 VALUE '\METHOD=' ##NO_TEXT,
c_oo_tcode TYPE tcode VALUE 'OS_APPLICATION' ##NO_TEXT,
c_oo_frclass TYPE c LENGTH 30 VALUE 'CLASS' ##NO_TEXT,
c_oo_frmethod TYPE c LENGTH 30 VALUE 'METHOD' ##NO_TEXT,
c_oo_frupdtask TYPE c LENGTH 30 VALUE 'UPDATE_MODE' ##NO_TEXT,
c_oo_synchron TYPE c VALUE 'S' ##NO_TEXT,
c_oo_asynchron TYPE c VALUE 'U' ##NO_TEXT,
c_true TYPE c VALUE 'X' ##NO_TEXT,
c_false TYPE c VALUE space ##NO_TEXT,
BEGIN OF c_variant_type,
dialog TYPE rglif-docutype VALUE 'D' ##NO_TEXT,
report TYPE rglif-docutype VALUE 'R' ##NO_TEXT,
variant TYPE rglif-docutype VALUE 'V' ##NO_TEXT,
parameters TYPE rglif-docutype VALUE 'P' ##NO_TEXT,
object TYPE rglif-docutype VALUE 'O' ##NO_TEXT,
END OF c_variant_type.
DATA:
mt_bcdata TYPE STANDARD TABLE OF bdcdata .
METHODS transaction_read
IMPORTING
iv_transaction TYPE tcode
EXPORTING
es_transaction TYPE tstc
es_gui_attr TYPE tstcc
RAISING
zcx_abapgit_exception.
METHODS shift_param
CHANGING
!ct_rsparam TYPE s_param
!cs_tstcp TYPE tstcp .
METHODS add_data
IMPORTING
!iv_fnam TYPE bdcdata-fnam
!iv_fval TYPE clike .
METHODS call_se93
RAISING
zcx_abapgit_exception .
METHODS set_oo_parameters
IMPORTING
!it_rsparam TYPE s_param
CHANGING
!cs_rsstcd TYPE rsstcd .
METHODS split_parameters
CHANGING
!ct_rsparam TYPE s_param
!cs_rsstcd TYPE rsstcd
!cs_tstcp TYPE tstcp
!cs_tstc TYPE tstc .
METHODS split_parameters_comp
IMPORTING
!ig_type TYPE any
!ig_param TYPE any
CHANGING
!cg_value TYPE any .
METHODS serialize_texts
IMPORTING
!io_xml TYPE REF TO zif_abapgit_xml_output
RAISING
zcx_abapgit_exception .
METHODS deserialize_texts
IMPORTING
!io_xml TYPE REF TO zif_abapgit_xml_input
RAISING
zcx_abapgit_exception .
METHODS deserialize_oo_transaction
IMPORTING
!iv_package TYPE devclass
!is_tstc TYPE tstc
!is_tstcc TYPE tstcc
!is_tstct TYPE tstct
!is_rsstcd TYPE rsstcd
RAISING
zcx_abapgit_exception .
METHODS save_authorizations
IMPORTING
iv_transaction TYPE tstc-tcode
it_authorizations TYPE ty_tstca
RAISING
zcx_abapgit_exception.
METHODS clear_functiongroup_globals.
METHODS is_variant_transaction IMPORTING is_tstcp TYPE tstcp
RETURNING VALUE(rv_variant_transaction) TYPE abap_bool.
ENDCLASS.
CLASS zcl_abapgit_object_tran IMPLEMENTATION.
METHOD add_data.
DATA: ls_bcdata LIKE LINE OF mt_bcdata.
ls_bcdata-fnam = iv_fnam.
ls_bcdata-fval = iv_fval.
APPEND ls_bcdata TO mt_bcdata.
ENDMETHOD.
METHOD call_se93.
DATA: lt_message TYPE STANDARD TABLE OF bdcmsgcoll.
FIELD-SYMBOLS: <ls_message> TYPE bdcmsgcoll.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
EXPORTING
tcode = 'SE93'
mode_val = 'N'
TABLES
using_tab = mt_bcdata
mess_tab = lt_message
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error deserializing { ms_item-obj_type } { ms_item-obj_name }| ).
ENDIF.
LOOP AT lt_message ASSIGNING <ls_message> WHERE msgtyp CA 'EAX'.
MESSAGE ID <ls_message>-msgid
TYPE <ls_message>-msgtyp
NUMBER <ls_message>-msgnr
WITH <ls_message>-msgv1 <ls_message>-msgv2 <ls_message>-msgv3 <ls_message>-msgv4
INTO sy-msgli.
zcx_abapgit_exception=>raise_t100( ).
ENDLOOP.
ENDMETHOD.
METHOD clear_functiongroup_globals.
TYPES ty_param_vari TYPE abap_bool.
DATA lt_error_list TYPE STANDARD TABLE OF rsmp_check WITH DEFAULT KEY.
FIELD-SYMBOLS <lv_param_vari> TYPE ty_param_vari.
" only way to clear global fields in function group
CALL FUNCTION 'RS_TRANSACTION_INCONSISTENCIES'
EXPORTING
transaction_code = 'ZTHISTCODENEVEREXIST'
TABLES
error_list = lt_error_list
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
"Expected - fine
" but there is no other way to clear this field
ASSIGN ('(SAPLSEUK)PARAM_VARI') TO <lv_param_vari>.
IF sy-subrc = 0.
CLEAR <lv_param_vari>.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD deserialize_oo_transaction.
" You should remember that we don't use batch input just for fun,
" but because FM RPY_TRANSACTION_INSERT doesn't support OO transactions.
DATA: ls_bcdata TYPE bdcdata.
CLEAR mt_bcdata.
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0390'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'TSTC-TCODE'
iv_fval = is_tstc-tcode ).
IF zif_abapgit_object~exists( ) = abap_true.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=CHNG' ).
ELSE.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=ADD' ).
ENDIF.
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0300'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'TSTCT-TTEXT'
iv_fval = is_tstct-ttext ).
add_data( iv_fnam = 'RSSTCD-S_CLASS'
iv_fval = 'X' ).
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=ENTR' ).
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'RSSTCD-S_TRFRAME'
iv_fval = is_rsstcd-s_trframe ).
add_data( iv_fnam = 'RSSTCD-S_UPDTASK'
iv_fval = is_rsstcd-s_updtask ).
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=TR_FRAMEWORK' ).
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'RSSTCD-CLASSNAME'
iv_fval = is_rsstcd-classname ).
add_data( iv_fnam = 'RSSTCD-METHOD'
iv_fval = is_rsstcd-method ).
IF is_rsstcd-s_local IS NOT INITIAL.
add_data( iv_fnam = 'RSSTCD-S_LOCAL'
iv_fval = is_rsstcd-s_local ).
ENDIF.
IF is_rsstcd-s_updlok IS NOT INITIAL.
add_data( iv_fnam = 'RSSTCD-S_UPDLOK'
iv_fval = is_rsstcd-s_updlok ).
ENDIF.
add_data( iv_fnam = 'TSTC-PGMNA'
iv_fval = is_tstc-pgmna ).
IF is_tstcc-s_webgui = '2'.
add_data( iv_fnam = 'G_IAC_EWT'
iv_fval = abap_true ).
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = 'MAKE_PROFI' ).
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
ELSEIF is_tstcc-s_webgui IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_WEBGUI'
iv_fval = is_tstcc-s_webgui ).
ENDIF.
IF is_tstcc-s_pervas IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_PERVAS'
iv_fval = is_tstcc-s_pervas ).
ENDIF.
IF is_tstcc-s_service IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_SERVICE'
iv_fval = is_tstcc-s_service ).
ENDIF.
IF is_tstcc-s_platin IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_PLATIN'
iv_fval = is_tstcc-s_platin ).
ENDIF.
IF is_tstcc-s_win32 IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_WIN32'
iv_fval = is_tstcc-s_win32 ).
ENDIF.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=WB_SAVE' ).
ls_bcdata-program = 'SAPLSTRD'.
ls_bcdata-dynpro = '0100'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'KO007-L_DEVCLASS'
iv_fval = iv_package ).
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=ADD' ).
ls_bcdata-program = 'BDC_OKCODE'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=WB_BACK' ).
ls_bcdata-program = 'BDC_OKCODE'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=WB_BACK' ).
call_se93( ).
ENDMETHOD.
METHOD deserialize_texts.
DATA lt_tpool_i18n TYPE TABLE OF tstct.
FIELD-SYMBOLS <ls_tpool> LIKE LINE OF lt_tpool_i18n.
" Read XML-files data
io_xml->read( EXPORTING iv_name = 'I18N_TPOOL'
CHANGING cg_data = lt_tpool_i18n ).
" Force t-code name (security reasons)
LOOP AT lt_tpool_i18n ASSIGNING <ls_tpool>.
<ls_tpool>-tcode = ms_item-obj_name.
ENDLOOP.
IF lines( lt_tpool_i18n ) > 0.
MODIFY tstct FROM TABLE lt_tpool_i18n.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Update of t-code translations failed' ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD is_variant_transaction.
rv_variant_transaction = boolc( is_tstcp-param(1) = '@' ).
ENDMETHOD.
METHOD save_authorizations.
CONSTANTS: lc_hex_chk TYPE x VALUE '04'.
DATA: ls_transaction TYPE tstc.
transaction_read( EXPORTING iv_transaction = iv_transaction
IMPORTING es_transaction = ls_transaction ).
DELETE FROM tstca WHERE tcode = iv_transaction.
IF ls_transaction IS NOT INITIAL.
INSERT tstca FROM TABLE it_authorizations.
ls_transaction-cinfo = ls_transaction-cinfo + lc_hex_chk.
UPDATE tstc SET cinfo = ls_transaction-cinfo WHERE tcode = ls_transaction-tcode.
ENDIF.
ENDMETHOD.
METHOD serialize_texts.
DATA lt_tpool_i18n TYPE TABLE OF tstct.
IF io_xml->i18n_params( )-main_language_only = abap_true.
RETURN.
ENDIF.
" Skip main language - it was already serialized
" Don't serialize t-code itself
SELECT sprsl ttext
INTO CORRESPONDING FIELDS OF TABLE lt_tpool_i18n
FROM tstct
WHERE sprsl <> mv_language
AND tcode = ms_item-obj_name ##TOO_MANY_ITAB_FIELDS. "#EC CI_GENBUFF
IF lines( lt_tpool_i18n ) > 0.
SORT lt_tpool_i18n BY sprsl ASCENDING.
io_xml->add( iv_name = 'I18N_TPOOL'
ig_data = lt_tpool_i18n ).
ENDIF.
ENDMETHOD.
METHOD set_oo_parameters.
DATA: ls_param LIKE LINE OF it_rsparam.
IF cs_rsstcd-call_tcode = c_oo_tcode.
cs_rsstcd-s_trframe = c_true.
LOOP AT it_rsparam INTO ls_param.
CASE ls_param-field.
WHEN c_oo_frclass.
cs_rsstcd-classname = ls_param-value.
WHEN c_oo_frmethod.
cs_rsstcd-method = ls_param-value.
WHEN c_oo_frupdtask.
IF ls_param-value = c_oo_synchron.
cs_rsstcd-s_upddir = c_true.
cs_rsstcd-s_updtask = c_false.
cs_rsstcd-s_updlok = c_false.
ELSEIF ls_param-value = c_oo_asynchron.
cs_rsstcd-s_upddir = c_false.
cs_rsstcd-s_updtask = c_true.
cs_rsstcd-s_updlok = c_false.
ELSE.
cs_rsstcd-s_upddir = c_false.
cs_rsstcd-s_updtask = c_false.
cs_rsstcd-s_updlok = c_true.
ENDIF.
ENDCASE.
ENDLOOP.
ENDIF.
ENDMETHOD.
METHOD shift_param.
DATA: ls_param LIKE LINE OF ct_rsparam,
lv_length TYPE i.
FIELD-SYMBOLS <lg_f> TYPE any.
DO 254 TIMES.
IF cs_tstcp-param = space.
EXIT.
ENDIF.
CLEAR ls_param.
IF cs_tstcp-param CA '='.
CHECK sy-fdpos <> 0.
ASSIGN cs_tstcp-param(sy-fdpos) TO <lg_f>.
ls_param-field = <lg_f>.
IF ls_param-field(1) = space.
SHIFT ls_param-field.
ENDIF.
sy-fdpos = sy-fdpos + 1.
SHIFT cs_tstcp-param BY sy-fdpos PLACES.
IF cs_tstcp-param CA ';'.
IF sy-fdpos <> 0.
ASSIGN cs_tstcp-param(sy-fdpos) TO <lg_f>.
ls_param-value = <lg_f>.
IF ls_param-value(1) = space.
SHIFT ls_param-value.
ENDIF.
ENDIF.
sy-fdpos = sy-fdpos + 1.
SHIFT cs_tstcp-param BY sy-fdpos PLACES.
APPEND ls_param TO ct_rsparam.
ELSE.
lv_length = strlen( cs_tstcp-param ).
CHECK lv_length > 0.
ASSIGN cs_tstcp-param(lv_length) TO <lg_f>.
ls_param-value = <lg_f>.
IF ls_param-value(1) = space.
SHIFT ls_param-value.
ENDIF.
lv_length = lv_length + 1.
SHIFT cs_tstcp-param BY lv_length PLACES.
APPEND ls_param TO ct_rsparam.
ENDIF.
ENDIF.
ENDDO.
ENDMETHOD.
METHOD split_parameters.
* see subroutine split_parameters in include LSEUKF01
DATA: lv_off TYPE i,
lv_param_beg TYPE i.
CLEAR cs_rsstcd-s_vari.
IF cs_tstcp-param(1) = '\'. " OO-Transaktion ohne FR
split_parameters_comp( EXPORTING ig_type = c_oo_program
ig_param = cs_tstcp-param
CHANGING cg_value = cs_tstc-pgmna ).
split_parameters_comp( EXPORTING ig_type = c_oo_class
ig_param = cs_tstcp-param
CHANGING cg_value = cs_rsstcd-classname ).
split_parameters_comp( EXPORTING ig_type = c_oo_method
ig_param = cs_tstcp-param
CHANGING cg_value = cs_rsstcd-method ).
IF NOT cs_tstc-pgmna IS INITIAL.
cs_rsstcd-s_local = c_true.
ENDIF.
RETURN.
ELSEIF cs_tstcp-param(1) = '@'. " Transaktionsvariante
cs_rsstcd-s_vari = c_true.
IF cs_tstcp-param(2) = '@@'.
cs_rsstcd-s_ind_vari = c_true.
lv_off = 2.
ELSE.
CLEAR cs_rsstcd-s_ind_vari.
lv_off = 1.
ENDIF.
IF cs_tstcp-param CA ' '.
ENDIF.
sy-fdpos = sy-fdpos - lv_off.
IF sy-fdpos > 0.
cs_rsstcd-call_tcode = cs_tstcp-param+lv_off(sy-fdpos).
sy-fdpos = sy-fdpos + 1 + lv_off.
cs_rsstcd-variant = cs_tstcp-param+sy-fdpos.
ENDIF.
ELSEIF cs_tstcp-param(1) = '/'.
cs_rsstcd-st_tcode = c_true.
cs_rsstcd-st_prog = space.
IF cs_tstcp-param+1(1) = '*'.
cs_rsstcd-st_skip_1 = c_true.
ELSE.
CLEAR cs_rsstcd-st_skip_1.
ENDIF.
IF cs_tstcp-param CA ' '.
ENDIF.
lv_param_beg = sy-fdpos + 1.
sy-fdpos = sy-fdpos - 2.
IF sy-fdpos > 0.
cs_rsstcd-call_tcode = cs_tstcp-param+2(sy-fdpos).
ENDIF.
SHIFT cs_tstcp-param BY lv_param_beg PLACES.
ELSE.
cs_rsstcd-st_tcode = space.
cs_rsstcd-st_prog = c_true.
ENDIF.
shift_param(
CHANGING ct_rsparam = ct_rsparam
cs_tstcp = cs_tstcp ).
set_oo_parameters(
EXPORTING it_rsparam = ct_rsparam
CHANGING cs_rsstcd = cs_rsstcd ).
ENDMETHOD.
METHOD split_parameters_comp.
DATA: lv_off TYPE i.
IF ig_param CS ig_type.
lv_off = sy-fdpos + strlen( ig_type ).
cg_value = ig_param+lv_off.
IF cg_value CA '\'.
CLEAR cg_value+sy-fdpos.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD transaction_read.
DATA: lt_tcodes TYPE TABLE OF tstc,
lt_gui_attr TYPE TABLE OF tstcc.
CLEAR: es_transaction, es_gui_attr.
CALL FUNCTION 'RPY_TRANSACTION_READ'
EXPORTING
transaction = iv_transaction
TABLES
tcodes = lt_tcodes
gui_attributes = lt_gui_attr
EXCEPTIONS
permission_error = 1
cancelled = 2
not_found = 3
object_not_found = 4
OTHERS = 5.
IF sy-subrc = 4 OR sy-subrc = 3.
RETURN.
ELSEIF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
READ TABLE lt_tcodes INDEX 1 INTO es_transaction.
ASSERT sy-subrc = 0.
READ TABLE lt_gui_attr INDEX 1 INTO es_gui_attr.
ASSERT sy-subrc = 0.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = c_user_unknown. " todo
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_transaction TYPE tstc-tcode.
lv_transaction = ms_item-obj_name.
CALL FUNCTION 'RPY_TRANSACTION_DELETE'
EXPORTING
transaction = lv_transaction
EXCEPTIONS
not_excecuted = 1
object_not_found = 0
OTHERS = 3.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
CONSTANTS: lc_hex_tra TYPE x VALUE '00',
* lc_hex_men TYPE x VALUE '01',
lc_hex_par TYPE x VALUE '02',
lc_hex_rep TYPE x VALUE '80',
* lc_hex_rpv TYPE x VALUE '10',
lc_hex_obj TYPE x VALUE '08'.
DATA: lv_dynpro TYPE d020s-dnum,
ls_tstc TYPE tstc,
lv_type TYPE rglif-docutype,
ls_tstct TYPE tstct,
ls_tstcc TYPE tstcc,
ls_tstcp TYPE tstcp,
lt_tstca TYPE ty_tstca,
lt_param_values TYPE ty_param_values,
ls_rsstcd TYPE rsstcd.
IF zif_abapgit_object~exists( ) = abap_true.
zif_abapgit_object~delete( iv_package = iv_package
iv_transport = iv_transport ).
ENDIF.
io_xml->read( EXPORTING iv_name = 'TSTC'
CHANGING cg_data = ls_tstc ).
io_xml->read( EXPORTING iv_name = 'TSTCC'
CHANGING cg_data = ls_tstcc ).
io_xml->read( EXPORTING iv_name = 'TSTCT'
CHANGING cg_data = ls_tstct ).
io_xml->read( EXPORTING iv_name = 'TSTCP'
CHANGING cg_data = ls_tstcp ).
io_xml->read( EXPORTING iv_name = 'AUTHORIZATIONS'
CHANGING cg_data = lt_tstca ).
lv_dynpro = ls_tstc-dypno.
IF ls_tstc-cinfo O lc_hex_rep.
lv_type = c_variant_type-report.
ELSEIF ls_tstc-cinfo O lc_hex_obj.
lv_type = c_variant_type-object.
ELSEIF ls_tstc-cinfo O lc_hex_par.
IF is_variant_transaction( ls_tstcp ) = abap_true.
lv_type = c_variant_type-variant.
ELSE.
lv_type = c_variant_type-parameters.
ENDIF.
ELSEIF ls_tstc-cinfo O lc_hex_tra.
lv_type = c_variant_type-dialog.
ELSE.
zcx_abapgit_exception=>raise( 'Transaction, unknown CINFO' ).
ENDIF.
IF ls_tstcp IS NOT INITIAL.
split_parameters( CHANGING ct_rsparam = lt_param_values
cs_rsstcd = ls_rsstcd
cs_tstcp = ls_tstcp
cs_tstc = ls_tstc ).
ENDIF.
CASE lv_type.
WHEN c_variant_type-object.
deserialize_oo_transaction( iv_package = iv_package
is_tstc = ls_tstc
is_tstcc = ls_tstcc
is_tstct = ls_tstct
is_rsstcd = ls_rsstcd ).
WHEN OTHERS.
clear_functiongroup_globals( ).
CALL FUNCTION 'RPY_TRANSACTION_INSERT'
EXPORTING
transaction = ls_tstc-tcode
program = ls_tstc-pgmna
dynpro = lv_dynpro
language = mv_language
development_class = iv_package
transaction_type = lv_type
shorttext = ls_tstct-ttext
called_transaction = ls_rsstcd-call_tcode
called_transaction_skip = ls_rsstcd-st_skip_1
variant = ls_rsstcd-variant
cl_independend = ls_rsstcd-s_ind_vari
html_enabled = ls_tstcc-s_webgui
java_enabled = ls_tstcc-s_platin
wingui_enabled = ls_tstcc-s_win32
TABLES
param_values = lt_param_values
EXCEPTIONS
cancelled = 1
already_exist = 2
permission_error = 3
name_not_allowed = 4
name_conflict = 5
illegal_type = 6
object_inconsistent = 7
db_access_error = 8
OTHERS = 9.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDCASE.
IF lt_tstca IS NOT INITIAL.
save_authorizations( iv_transaction = ls_tstc-tcode
it_authorizations = lt_tstca ).
ENDIF.
" Texts deserializing (translations)
deserialize_texts( io_xml ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_tcode TYPE tstc-tcode.
SELECT SINGLE tcode FROM tstc INTO lv_tcode
WHERE tcode = ms_item-obj_name. "#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-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_object TYPE eqegraarg.
lv_object = |TN{ ms_item-obj_name }|.
OVERLAY lv_object WITH ' '.
lv_object = lv_object && '*'.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'EEUDB'
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 = 'SAPLSEUK'.
<ls_bdcdata>-dynpro = '0390'.
<ls_bdcdata>-dynbegin = abap_true.
APPEND INITIAL LINE TO lt_bdcdata ASSIGNING <ls_bdcdata>.
<ls_bdcdata>-fnam = 'BDC_OKCODE'.
<ls_bdcdata>-fval = '=SHOW'.
APPEND INITIAL LINE TO lt_bdcdata ASSIGNING <ls_bdcdata>.
<ls_bdcdata>-fnam = 'TSTC-TCODE'.
<ls_bdcdata>-fval = ms_item-obj_name.
zcl_abapgit_ui_factory=>get_gui_jumper( )->jump_batch_input(
iv_tcode = 'SE93'
it_bdcdata = lt_bdcdata ).
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lv_transaction TYPE tstc-tcode,
ls_tcode TYPE tstc,
ls_tstct TYPE tstct,
ls_tstcp TYPE tstcp,
lt_tstca TYPE ty_tstca,
ls_gui_attr TYPE tstcc.
lv_transaction = ms_item-obj_name.
transaction_read( EXPORTING iv_transaction = lv_transaction
IMPORTING es_transaction = ls_tcode
es_gui_attr = ls_gui_attr ).
IF ls_tcode IS INITIAL.
RETURN.
ENDIF.
SELECT SINGLE * FROM tstct INTO ls_tstct
WHERE sprsl = mv_language
AND tcode = lv_transaction. "#EC CI_SUBRC "#EC CI_GENBUFF
SELECT SINGLE * FROM tstcp INTO ls_tstcp
WHERE tcode = lv_transaction. "#EC CI_SUBRC "#EC CI_GENBUFF
SELECT * FROM tstca INTO TABLE lt_tstca
WHERE tcode = lv_transaction.
IF sy-subrc <> 0.
CLEAR: lt_tstca.
ENDIF.
io_xml->add( iv_name = 'TSTC'
ig_data = ls_tcode ).
io_xml->add( iv_name = 'TSTCC'
ig_data = ls_gui_attr ).
io_xml->add( iv_name = 'TSTCT'
ig_data = ls_tstct ).
IF ls_tstcp IS NOT INITIAL.
io_xml->add( iv_name = 'TSTCP'
ig_data = ls_tstcp ).
ENDIF.
io_xml->add( iv_name = 'AUTHORIZATIONS'
ig_data = lt_tstca ).
" Texts serializing (translations)
serialize_texts( io_xml ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
2213,
272,
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,
198,
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,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
1259,
62,
17143,
62,
27160,
41876,
49053,
9795,
43679,
3963,
44608,
17143,
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,
13315,
44521,
12,
4944,
33866,
8924,
5550,
38865,
35374,
837,
198,
220,
220,
220,
220,
220,
1259,
62,
83,
301,
6888,
220,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
256,
301,
6888,
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,
13315,
5550,
38865,
35374,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
269,
62,
2238,
62,
23065,
220,
220,
41876,
269,
406,
49494,
860,
26173,
8924,
705,
59,
4805,
7730,
24115,
11639,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
2238,
62,
4871,
220,
220,
220,
220,
41876,
269,
406,
49494,
767,
26173,
8924,
705,
59,
31631,
11639,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
2238,
62,
24396,
220,
220,
220,
41876,
269,
406,
49494,
807,
26173,
8924,
705,
59,
49273,
11639,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
2238,
62,
83,
8189,
220,
220,
220,
220,
41876,
256,
8189,
26173,
8924,
705,
2640,
62,
2969,
31484,
6234,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
2238,
62,
8310,
4871,
220,
220,
41876,
269,
406,
49494,
1542,
26173,
8924,
705,
31631,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
2238,
62,
8310,
24396,
220,
41876,
269,
406,
49494,
1542,
26173,
8924,
705,
49273,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
2238,
62,
69,
12618,
28664,
2093,
41876,
269,
406,
49494,
1542,
26173,
8924,
705,
16977,
62,
49058,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
2238,
62,
28869,
11413,
220,
41876,
269,
26173,
8924,
705,
50,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
2238,
62,
292,
24871,
41876,
269,
26173,
8924,
705,
52,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
7942,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
269,
26173,
8924,
705,
55,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
9562,
220,
220,
220,
220,
220,
220,
220,
41876,
269,
26173,
8924,
2272,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
25641,
415,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
220,
220,
17310,
220,
220,
220,
220,
41876,
374,
4743,
361,
12,
15390,
315,
2981,
26173,
8924,
705,
35,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
989,
220,
220,
220,
220,
41876,
374,
4743,
361,
12,
15390,
315,
2981,
26173,
8924,
705,
49,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15304,
220,
220,
220,
41876,
374,
4743,
361,
12,
15390,
315,
2981,
26173,
8924,
705,
53,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
10007,
41876,
374,
4743,
361,
12,
15390,
315,
2981,
26173,
8924,
705,
47,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
220,
220,
220,
220,
41876,
374,
4743,
361,
12,
15390,
315,
2981,
26173,
8924,
705,
46,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
25641,
415,
62,
4906,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
45079,
62,
15630,
7890,
41876,
49053,
9795,
43679,
3963,
275,
17896,
7890,
764,
628,
220,
220,
220,
337,
36252,
50,
8611,
62,
961,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
7645,
2673,
41876,
256,
8189,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1658,
62,
7645,
2673,
41876,
256,
301,
66,
198,
220,
220,
220,
220,
220,
220,
220,
1658,
62,
48317,
62,
35226,
220,
220,
220,
41876,
256,
301,
535,
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,
220,
220,
220,
337,
36252,
50,
6482,
62,
17143,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
310,
62,
3808,
17143,
41876,
264,
62,
17143,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
6359,
62,
83,
301,
13155,
220,
220,
41876,
256,
301,
13155,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
7890,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
69,
7402,
41876,
275,
17896,
7890,
12,
69,
7402,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
69,
2100,
41876,
537,
522,
764,
198,
220,
220,
220,
337,
36252,
50,
869,
62,
325,
6052,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
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,
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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
] |
CLASS zcl_abapgit_gui_page_tag DEFINITION PUBLIC FINAL
CREATE PUBLIC INHERITING FROM zcl_abapgit_gui_page.
PUBLIC SECTION.
CONSTANTS: BEGIN OF c_action,
commit_post TYPE string VALUE 'commit_post',
commit_cancel TYPE string VALUE 'commit_cancel',
change_tag_type TYPE string VALUE 'change_tag_type',
END OF c_action.
METHODS:
constructor
IMPORTING io_repo TYPE REF TO zcl_abapgit_repo
RAISING zcx_abapgit_exception,
zif_abapgit_gui_event_handler~on_event REDEFINITION.
PROTECTED SECTION.
METHODS:
render_content REDEFINITION.
PRIVATE SECTION.
CONSTANTS:
BEGIN OF c_tag_type,
lightweight TYPE string VALUE 'lightweight',
annotated TYPE string VALUE 'annotated',
END OF c_tag_type .
DATA mo_repo_online TYPE REF TO zcl_abapgit_repo_online .
DATA mv_selected_type TYPE string .
METHODS render_menu
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS render_form
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
METHODS render_text_input
IMPORTING
!iv_name TYPE string
!iv_label TYPE string
!iv_value TYPE string OPTIONAL
!iv_max_length TYPE string OPTIONAL
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS create_tag
IMPORTING
!ii_event TYPE REF TO zif_abapgit_gui_event
RAISING
zcx_abapgit_exception .
METHODS parse_tag_request
IMPORTING
!ii_event TYPE REF TO zif_abapgit_gui_event
RETURNING
VALUE(rs_git_tag) TYPE zif_abapgit_definitions=>ty_git_tag
RAISING
zcx_abapgit_exception .
METHODS parse_change_tag_type_request
IMPORTING
!it_postdata TYPE zif_abapgit_html_viewer=>ty_post_data .
METHODS render_scripts
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
ENDCLASS.
CLASS ZCL_ABAPGIT_GUI_PAGE_TAG IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
mo_repo_online ?= io_repo.
ms_control-page_title = 'Tag'.
mv_selected_type = c_tag_type-lightweight.
ENDMETHOD.
METHOD create_tag.
DATA:
ls_tag TYPE zif_abapgit_definitions=>ty_git_tag,
lx_error TYPE REF TO zcx_abapgit_exception,
lv_text TYPE string.
ls_tag = parse_tag_request( ii_event ).
IF ls_tag-name IS INITIAL.
zcx_abapgit_exception=>raise( |Please supply a tag name| ).
ENDIF.
ls_tag-name = zcl_abapgit_git_tag=>add_tag_prefix( ls_tag-name ).
ASSERT ls_tag-name CP zif_abapgit_definitions=>c_git_branch-tags.
CASE mv_selected_type.
WHEN c_tag_type-lightweight.
ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
WHEN c_tag_type-annotated.
ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag.
WHEN OTHERS.
zcx_abapgit_exception=>raise( |Invalid tag type: { mv_selected_type }| ).
ENDCASE.
TRY.
zcl_abapgit_git_porcelain=>create_tag( iv_url = mo_repo_online->get_url( )
is_tag = ls_tag ).
CATCH zcx_abapgit_exception INTO lx_error.
zcx_abapgit_exception=>raise( |Cannot create tag { ls_tag-name }. Error: '{ lx_error->get_text( ) }'| ).
ENDTRY.
IF ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
lv_text = |Lightweight tag { zcl_abapgit_git_tag=>remove_tag_prefix( ls_tag-name ) } created|.
ELSEIF ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag.
lv_text = |Annotated tag { zcl_abapgit_git_tag=>remove_tag_prefix( ls_tag-name ) } created|.
ENDIF.
MESSAGE lv_text TYPE 'S'.
ENDMETHOD.
METHOD parse_change_tag_type_request.
FIELD-SYMBOLS <lv_postdata> LIKE LINE OF it_postdata.
READ TABLE it_postdata ASSIGNING <lv_postdata> INDEX 1.
IF sy-subrc = 0.
FIND FIRST OCCURRENCE OF REGEX `type=(.*)` IN <lv_postdata> SUBMATCHES mv_selected_type.
ENDIF.
mv_selected_type = condense( mv_selected_type ).
ENDMETHOD.
METHOD parse_tag_request.
DATA lo_map TYPE REF TO zcl_abapgit_string_map.
lo_map = ii_event->form_data( ).
lo_map->strict( abap_false ). " Hack, refactor !
lo_map->to_abap( CHANGING cs_container = rs_git_tag ).
REPLACE ALL OCCURRENCES
OF zif_abapgit_definitions=>c_crlf
IN rs_git_tag-body
WITH zif_abapgit_definitions=>c_newline.
ENDMETHOD.
METHOD render_content.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( '<div class="repo">' ).
ri_html->add( render_menu( ) ).
ri_html->add( render_form( ) ).
ri_html->add( '</div>' ).
register_deferred_script( render_scripts( ) ).
ENDMETHOD.
METHOD render_form.
CONSTANTS: lc_body_col_max TYPE i VALUE 150.
DATA: li_user TYPE REF TO zif_abapgit_persist_user,
lv_user TYPE string,
lv_email TYPE string,
lv_s_param TYPE string,
lo_settings TYPE REF TO zcl_abapgit_settings,
lv_body_size TYPE i,
lt_type TYPE string_table,
lv_selected TYPE string.
FIELD-SYMBOLS: <lv_type> LIKE LINE OF lt_type.
li_user = zcl_abapgit_persistence_user=>get_instance( ).
lv_user = li_user->get_repo_git_user_name( mo_repo_online->get_url( ) ).
IF lv_user IS INITIAL.
lv_user = li_user->get_default_git_user_name( ).
ENDIF.
IF lv_user IS INITIAL.
" get default from user record
lv_user = zcl_abapgit_user_record=>get_instance( sy-uname )->get_name( ).
ENDIF.
lv_email = li_user->get_repo_git_user_email( mo_repo_online->get_url( ) ).
IF lv_email IS INITIAL.
lv_email = li_user->get_default_git_user_email( ).
ENDIF.
IF lv_email IS INITIAL.
" get default from user record
lv_email = zcl_abapgit_user_record=>get_instance( sy-uname )->get_email( ).
ENDIF.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( '<div class="form-container">' ).
ri_html->add( '<form id="commit_form" class="aligned-form grey70"'
&& ' method="post" action="sapevent:commit_post">' ).
INSERT c_tag_type-lightweight
INTO TABLE lt_type.
INSERT c_tag_type-annotated
INTO TABLE lt_type.
ri_html->add( '<div class="row">' ).
ri_html->add( 'Tag type <select name="folder_logic" onchange="onTagTypeChange(this)">' ).
LOOP AT lt_type ASSIGNING <lv_type>.
IF mv_selected_type = <lv_type>.
lv_selected = 'selected'.
ELSE.
CLEAR: lv_selected.
ENDIF.
ri_html->add( |<option value="{ <lv_type> }" | && |{ lv_selected }>| && |{ <lv_type> }</option>| ).
ENDLOOP.
ri_html->add( '</div>' ).
ri_html->add( '</select>' ).
ri_html->add( '<br>' ).
ri_html->add( '<br>' ).
ri_html->add( render_text_input( iv_name = 'sha1'
iv_label = 'SHA1'
iv_value = mo_repo_online->get_current_remote( ) ) ).
ri_html->add( render_text_input( iv_name = 'name'
iv_label = 'tag name' ) ).
IF mv_selected_type = c_tag_type-annotated.
ri_html->add( render_text_input( iv_name = 'tagger_name'
iv_label = 'tagger name'
iv_value = lv_user ) ).
ri_html->add( render_text_input( iv_name = 'tagger_email'
iv_label = 'tagger e-mail'
iv_value = lv_email ) ).
lo_settings = zcl_abapgit_persist_factory=>get_settings( )->read( ).
lv_s_param = lo_settings->get_commitmsg_comment_length( ).
ri_html->add( render_text_input( iv_name = 'message'
iv_label = 'message'
iv_max_length = lv_s_param ) ).
ri_html->add( '<div class="row">' ).
ri_html->add( '<label for="c-body">body</label>' ).
lv_body_size = lo_settings->get_commitmsg_body_size( ).
IF lv_body_size > lc_body_col_max.
lv_body_size = lc_body_col_max.
ENDIF.
ri_html->add( |<textarea id="c-body" name="body" rows="10" cols="{ lv_body_size }"></textarea>| ).
ENDIF.
ri_html->add( '<input type="submit" class="hidden-submit">' ).
ri_html->add( '</div>' ).
ri_html->add( '</form>' ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD render_menu.
DATA lo_toolbar TYPE REF TO zcl_abapgit_html_toolbar.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
CREATE OBJECT lo_toolbar.
lo_toolbar->add( iv_act = 'submitFormById(''commit_form'');'
iv_txt = 'Create'
iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_opt = zif_abapgit_html=>c_html_opt-strong ).
lo_toolbar->add( iv_act = c_action-commit_cancel
iv_txt = 'Cancel'
iv_opt = zif_abapgit_html=>c_html_opt-cancel ).
ri_html->add( '<div class="paddings">' ).
ri_html->add( lo_toolbar->render( ) ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD render_scripts.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->set_title( cl_abap_typedescr=>describe_by_object_ref( me )->get_relative_name( ) ).
ri_html->add( 'setInitialFocus("name");' ).
ENDMETHOD.
METHOD render_text_input.
DATA lv_attrs TYPE string.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF iv_value IS NOT INITIAL.
lv_attrs = | value="{ iv_value }"|.
ENDIF.
IF iv_max_length IS NOT INITIAL.
lv_attrs = | maxlength="{ iv_max_length }"|.
ENDIF.
ri_html->add( '<div class="row">' ).
ri_html->add( |<label for="{ iv_name }">{ iv_label }</label>| ).
ri_html->add( |<input id="{ iv_name }" name="{ iv_name }" type="text"{ lv_attrs }>| ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD zif_abapgit_gui_event_handler~on_event.
CASE ii_event->mv_action.
WHEN c_action-commit_post.
create_tag( ii_event ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-go_back.
WHEN c_action-change_tag_type.
parse_change_tag_type_request( ii_event->mt_postdata ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN c_action-commit_cancel.
rs_handled-state = zcl_abapgit_gui=>c_event_state-go_back.
ENDCASE.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
12985,
5550,
20032,
17941,
44731,
25261,
198,
220,
220,
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,
347,
43312,
3963,
269,
62,
2673,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4589,
62,
7353,
220,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
41509,
62,
7353,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4589,
62,
66,
21130,
220,
220,
41876,
4731,
26173,
8924,
705,
41509,
62,
66,
21130,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1487,
62,
12985,
62,
4906,
41876,
4731,
26173,
8924,
705,
3803,
62,
12985,
62,
4906,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
2673,
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,
33245,
62,
260,
7501,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
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,
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,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
12985,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
220,
220,
18700,
41876,
4731,
26173,
8924,
705,
2971,
6551,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
24708,
515,
220,
220,
41876,
4731,
26173,
8924,
705,
34574,
515,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
12985,
62,
4906,
764,
198,
220,
220,
220,
42865,
6941,
62,
260,
7501,
62,
25119,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
62,
25119,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
34213,
62,
4906,
41876,
4731,
764,
628,
220,
220,
220,
337,
36252,
50,
8543,
62,
26272,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
687,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
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,
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,
8543,
62,
5239,
62,
15414,
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,
18242,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8367,
220,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
9806,
62,
13664,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
337,
36252,
50,
2251,
62,
12985,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
15596,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
15596,
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,
21136,
62,
12985,
62,
25927,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
15596,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
48317,
62,
15596,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
18300,
62,
12985,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
18300,
62,
12985,
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,
21136,
62,
3803,
62,
12985,
62,
4906,
62,
25927,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
7353,
7890,
41876,
1976,
361,
62,
397,
499,
18300,
62,
6494,
62,
1177,
263,
14804,
774,
62,
7353,
62,
7890,
764,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
46521,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
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,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
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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definition
*"* public declarations
include ZCL_ZGWSO_DPC_EXT=============cu.
*"* protected declarations
include ZCL_ZGWSO_DPC_EXT=============co.
*"* private declarations
include ZCL_ZGWSO_DPC_EXT=============ci.
endclass. "ZCL_ZGWSO_DPC_EXT definition
*"* macro definitions
include ZCL_ZGWSO_DPC_EXT=============ccmac.
*"* local class implementation
include ZCL_ZGWSO_DPC_EXT=============ccimp.
class ZCL_ZGWSO_DPC_EXT implementation.
*"* method's implementations
include methods.
endclass. "ZCL_ZGWSO_DPC_EXT implementation
| [
4871,
12,
7742,
764,
198,
9,
1,
9,
1398,
5933,
329,
1398,
1168,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
198,
198,
9,
1,
9,
1957,
2099,
17336,
198,
17256,
1168,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
25609,
28,
535,
4299,
13,
198,
198,
9,
1,
9,
1398,
1168,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
6770,
198,
9,
1,
9,
1171,
31713,
198,
220,
2291,
1168,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
25609,
28,
27399,
13,
198,
9,
1,
9,
6861,
31713,
198,
220,
2291,
1168,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
25609,
28,
1073,
13,
198,
9,
1,
9,
2839,
31713,
198,
220,
2291,
1168,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
25609,
28,
979,
13,
198,
437,
4871,
13,
366,
57,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
6770,
198,
198,
9,
1,
9,
15021,
17336,
198,
17256,
1168,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
25609,
28,
535,
20285,
13,
198,
9,
1,
9,
1957,
1398,
7822,
198,
17256,
1168,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
25609,
28,
535,
11011,
13,
198,
198,
4871,
1168,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
7822,
13,
198,
9,
1,
9,
2446,
338,
25504,
198,
220,
2291,
5050,
13,
198,
437,
4871,
13,
366,
57,
5097,
62,
57,
33191,
15821,
62,
35,
5662,
62,
13918,
7822,
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
] |
CLASS zcl_abapgit_object_chdo DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_objects_super
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
METHODS constructor
IMPORTING
is_item TYPE zif_abapgit_definitions=>ty_item
iv_language TYPE spras.
PROTECTED SECTION.
METHODS after_import
RAISING
zcx_abapgit_exception .
METHODS delete_tadir_cdnames
IMPORTING
!is_cdnames TYPE cdnames
RAISING
zcx_abapgit_exception .
METHODS delete_tadir_tabl
IMPORTING
!is_tcdrs TYPE tcdrs
RAISING
zcx_abapgit_exception .
PRIVATE SECTION.
TYPES: BEGIN OF ty_change_document,
reports_generated TYPE SORTED TABLE OF tcdrps WITH UNIQUE KEY object reportname,
objects TYPE SORTED TABLE OF tcdobs WITH UNIQUE KEY object tabname,
objects_text TYPE SORTED TABLE OF tcdobts WITH UNIQUE KEY spras object,
END OF ty_change_document.
DATA: mv_object TYPE cdobjectcl.
ENDCLASS.
CLASS zcl_abapgit_object_chdo IMPLEMENTATION.
METHOD after_import.
DATA: lt_cts_object_entry TYPE STANDARD TABLE OF e071 WITH DEFAULT KEY,
ls_cts_object_entry LIKE LINE OF lt_cts_object_entry,
lt_errormsg TYPE STANDARD TABLE OF sprot_u WITH DEFAULT KEY.
ls_cts_object_entry-pgmid = seok_pgmid_r3tr.
ls_cts_object_entry-object = ms_item-obj_type.
ls_cts_object_entry-obj_name = ms_item-obj_name.
INSERT ls_cts_object_entry INTO TABLE lt_cts_object_entry.
CALL FUNCTION 'AFTER_IMP_CHDO'
EXPORTING
iv_tarclient = sy-mandt
iv_is_upgrade = abap_false
TABLES
tt_e071 = lt_cts_object_entry
tt_errormsg = lt_errormsg.
LOOP AT lt_errormsg TRANSPORTING NO FIELDS WHERE severity = 'E' OR severity = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
zcx_abapgit_exception=>raise( 'Error from AFTER_IMP_CHDO' ).
ENDIF.
ENDMETHOD.
METHOD constructor.
super->constructor( is_item = is_item
iv_language = iv_language ).
mv_object = is_item-obj_name.
ENDMETHOD.
METHOD delete_tadir_cdnames.
DATA: lv_obj_name TYPE sobj_name.
IF is_cdnames-repnamec IS NOT INITIAL.
lv_obj_name = is_cdnames-repnamec.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
wi_delete_tadir_entry = abap_true
wi_tadir_pgmid = 'R3TR'
wi_tadir_object = 'PROG'
wi_tadir_obj_name = lv_obj_name
wi_test_modus = abap_false
EXCEPTIONS
tadir_entry_not_existing = 1
OTHERS = 2.
IF sy-subrc > 1.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDIF.
IF is_cdnames-repnamet IS NOT INITIAL.
lv_obj_name = is_cdnames-repnamet.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
wi_delete_tadir_entry = abap_true
wi_tadir_pgmid = 'R3TR'
wi_tadir_object = 'PROG'
wi_tadir_obj_name = lv_obj_name
wi_test_modus = abap_false
EXCEPTIONS
tadir_entry_not_existing = 1
OTHERS = 2.
IF sy-subrc > 1.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDIF.
IF is_cdnames-repnamefix IS NOT INITIAL.
lv_obj_name = is_cdnames-repnamefix.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
wi_delete_tadir_entry = abap_true
wi_tadir_pgmid = 'R3TR'
wi_tadir_object = 'PROG'
wi_tadir_obj_name = lv_obj_name
wi_test_modus = abap_false
EXCEPTIONS
tadir_entry_not_existing = 1
OTHERS = 2.
IF sy-subrc > 1.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDIF.
IF is_cdnames-repnamevar IS NOT INITIAL.
lv_obj_name = is_cdnames-repnamevar.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
wi_delete_tadir_entry = abap_true
wi_tadir_pgmid = 'R3TR'
wi_tadir_object = 'PROG'
wi_tadir_obj_name = lv_obj_name
wi_test_modus = abap_false
EXCEPTIONS
tadir_entry_not_existing = 1
OTHERS = 2.
IF sy-subrc > 1.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDIF.
IF is_cdnames-fgrp IS NOT INITIAL.
lv_obj_name = is_cdnames-fgrp.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
wi_delete_tadir_entry = abap_true
wi_tadir_pgmid = 'R3TR'
wi_tadir_object = 'FUGR'
wi_tadir_obj_name = lv_obj_name
wi_test_modus = abap_false
EXCEPTIONS
tadir_entry_not_existing = 1
OTHERS = 2.
IF sy-subrc > 1.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD delete_tadir_tabl.
DATA: lv_obj_name TYPE sobj_name.
IF is_tcdrs-tabname IS NOT INITIAL.
lv_obj_name = is_tcdrs-tabname.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
wi_delete_tadir_entry = abap_true
wi_tadir_pgmid = 'R3TR'
wi_tadir_object = 'TABL'
wi_tadir_obj_name = lv_obj_name
wi_test_modus = abap_false
EXCEPTIONS
tadir_entry_not_existing = 1
OTHERS = 2.
IF sy-subrc > 1.
zcx_abapgit_exception=>raise( |Error from TR_TADIR_INTERFACE (subrc={ sy-subrc } ).| ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
SELECT SINGLE updname INTO rv_user
FROM tcdrp
WHERE object = mv_object.
IF sy-subrc <> 0.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lt_cdnames TYPE STANDARD TABLE OF cdnames,
ls_cdnames TYPE cdnames,
lt_tcdrs TYPE STANDARD TABLE OF tcdrs,
ls_tcdrs TYPE tcdrs,
lv_msg TYPE symsgv.
CALL FUNCTION 'CDNAMES_GET'
EXPORTING
iv_object = mv_object
TABLES
it_tcdrs = lt_tcdrs
it_names = lt_cdnames
EXCEPTIONS
object_space = 1
object_not_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
CALL FUNCTION 'CHDO_DELETE'
EXPORTING
iv_object = mv_object
iv_with_tadir = abap_true
EXCEPTIONS
object_is_space = 1
object_not_found = 2
other_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
lv_msg = mv_object.
zcx_abapgit_exception=>raise_t100( iv_msgid = 'CD'
iv_msgno = '869'
iv_msgv1 = lv_msg ).
ENDIF.
LOOP AT lt_cdnames INTO ls_cdnames.
delete_tadir_cdnames( ls_cdnames ).
ENDLOOP.
LOOP AT lt_tcdrs INTO ls_tcdrs.
delete_tadir_tabl( ls_tcdrs ).
ENDLOOP.
corr_insert( iv_package ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: ls_change_object TYPE ty_change_document.
FIELD-SYMBOLS: <ls_report_generated> LIKE LINE OF ls_change_object-reports_generated.
io_xml->read( EXPORTING iv_name = 'CHDO'
CHANGING cg_data = ls_change_object ).
DELETE FROM tcdobs WHERE object = mv_object.
DELETE FROM tcdobts WHERE object = mv_object.
DELETE FROM tcdrps WHERE object = mv_object.
LOOP AT ls_change_object-reports_generated ASSIGNING <ls_report_generated>.
<ls_report_generated>-devclass = iv_package.
ENDLOOP.
INSERT tcdobs FROM TABLE ls_change_object-objects.
INSERT tcdobts FROM TABLE ls_change_object-objects_text.
INSERT tcdrps FROM TABLE ls_change_object-reports_generated.
tadir_insert( iv_package ).
after_import( ).
corr_insert( iv_package ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
SELECT COUNT(*)
FROM tcdrp
WHERE object = mv_object.
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-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.
DATA: lt_bdcdata TYPE STANDARD TABLE OF bdcdata,
ls_bdcdata LIKE LINE OF lt_bdcdata.
CLEAR: ls_bdcdata.
ls_bdcdata-program = 'SAPMSCDO_NEW'.
ls_bdcdata-dynpro = '0100'.
ls_bdcdata-dynbegin = abap_true.
APPEND ls_bdcdata TO lt_bdcdata.
CLEAR: ls_bdcdata.
ls_bdcdata-fnam = 'TCDOB-OBJECT'.
ls_bdcdata-fval = mv_object.
APPEND ls_bdcdata TO lt_bdcdata.
CLEAR: ls_bdcdata.
ls_bdcdata-fnam = 'BDC_OKCODE'.
ls_bdcdata-fval = '=DISP'.
APPEND ls_bdcdata TO lt_bdcdata.
zcl_abapgit_ui_factory=>get_gui_jumper( )->jump_batch_input(
iv_tcode = 'SCDO'
it_bdcdata = lt_bdcdata ).
rv_exit = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: ls_change_object TYPE ty_change_document,
lt_tcdrp TYPE STANDARD TABLE OF tcdrp,
lt_tcdob TYPE STANDARD TABLE OF tcdob,
lt_tcdobt TYPE STANDARD TABLE OF tcdobt,
BEGIN OF ls_nulldatetime, " hack ro reset fields when they exist without syntax errors when they don't
udate TYPE sy-datum,
utime TYPE sy-uzeit,
END OF ls_nulldatetime.
FIELD-SYMBOLS: <ls_reports_generated> LIKE LINE OF ls_change_object-reports_generated,
<ls_objects> LIKE LINE OF ls_change_object-objects,
<ls_objects_text> LIKE LINE OF ls_change_object-objects_text.
CALL FUNCTION 'CDNAMES_GET'
EXPORTING
iv_object = mv_object
TABLES
it_tcdrp = lt_tcdrp
it_tcdob = lt_tcdob
it_tcdobt = lt_tcdobt
EXCEPTIONS
object_space = 1
object_not_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ls_change_object-reports_generated = lt_tcdrp.
ls_change_object-objects = lt_tcdob.
ls_change_object-objects_text = lt_tcdobt.
" At import, when CHDO is generated date & time change, so always detects changes for this fields
LOOP AT ls_change_object-reports_generated ASSIGNING <ls_reports_generated>.
CLEAR: <ls_reports_generated>-datum, <ls_reports_generated>-uzeit,
<ls_reports_generated>-author, <ls_reports_generated>-updname,
<ls_reports_generated>-devclass.
ENDLOOP.
LOOP AT ls_change_object-objects ASSIGNING <ls_objects>.
MOVE-CORRESPONDING ls_nulldatetime TO <ls_objects>. " reset date and time
ENDLOOP.
LOOP AT ls_change_object-objects_text ASSIGNING <ls_objects_text>.
MOVE-CORRESPONDING ls_nulldatetime TO <ls_objects_text>. " reset date and time
ENDLOOP.
io_xml->add( iv_name = 'CHDO'
ig_data = ls_change_object ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
354,
4598,
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,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
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,
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,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
706,
62,
11748,
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,
12233,
62,
83,
324,
343,
62,
10210,
14933,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
10210,
14933,
41876,
22927,
14933,
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,
12233,
62,
83,
324,
343,
62,
8658,
75,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
83,
10210,
3808,
41876,
256,
10210,
3808,
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,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
3803,
62,
22897,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3136,
62,
27568,
41876,
311,
9863,
1961,
43679,
3963,
37096,
7109,
862,
13315,
4725,
33866,
8924,
35374,
2134,
989,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5563,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
311,
9863,
1961,
43679,
3963,
256,
10210,
8158,
13315,
4725,
33866,
8924,
35374,
2134,
7400,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5563,
62,
5239,
220,
220,
220,
220,
220,
41876,
311,
9863,
1961,
43679,
3963,
256,
10210,
672,
912,
13315,
4725,
33866,
8924,
35374,
7500,
292,
2134,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
3803,
62,
22897,
13,
628,
220,
220,
220,
42865,
25,
285,
85,
62,
15252,
41876,
22927,
15252,
565,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
354,
4598,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
706,
62,
11748,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
310,
82,
62,
15252,
62,
13000,
41876,
49053,
9795,
43679,
3963,
304,
2998,
16,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
310,
82,
62,
15252,
62,
13000,
34178,
48920,
3963,
300,
83,
62,
310,
82,
62,
15252,
62,
13000,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
8056,
579,
45213,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
599,
10599,
62,
84,
13315,
5550,
38865,
35374,
13,
628,
220,
220,
220,
43979,
62,
310,
82,
62,
15252,
62,
13000,
12,
6024,
13602,
220,
220,
220,
796,
384,
482,
62,
6024,
13602,
62,
81,
18,
2213,
13,
198,
220,
220,
220,
43979,
62,
310,
82,
62,
15252,
62,
13000,
12,
15252,
220,
220,
796,
13845,
62,
9186,
12,
26801,
62,
4906,
13,
198,
220,
220,
220,
43979,
62,
310,
82,
62,
15252,
62,
13000,
12,
26801,
62,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
198,
220,
220,
220,
29194,
17395,
43979,
62,
310,
82,
62,
15252,
62,
13000,
39319,
43679,
300,
83,
62,
310,
82,
62,
15252,
62,
13000,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
8579,
5781,
62,
3955,
47,
62,
3398,
18227,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
18870,
16366,
220,
796,
827,
12,
22249,
83,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
271,
62,
929,
9526,
796,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
309,
6242,
28378,
198,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
68,
2998,
16,
220,
220,
220,
220,
220,
220,
796,
300,
83,
62,
310,
82,
62,
15252,
62,
13000,
198,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
8056,
579,
45213,
220,
220,
796,
300,
83,
62,
8056,
579,
45213,
13,
628,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
8056,
579,
45213,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
33411,
19440,
796,
705,
36,
6,
6375,
19440,
796,
705,
32,
4458,
198,
220,
220,
220,
220,
220,
7788,
2043,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
12331,
422,
36050,
62,
3955,
47,
62,
3398,
18227,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
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,
15252,
796,
318,
62,
9186,
12
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
*&---------------------------------------------------------------------*
*& Include ZCA_UMDI_R_UML_DIAGRAM_TOP
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Variables
*----------------------------------------------------------------------*
DATA mv_object TYPE seoclass-clsname.
DATA mv_package TYPE devclass.
DATA mv_report TYPE reposrc-progname.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
40348,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1168,
8141,
62,
5883,
17931,
62,
49,
62,
52,
5805,
62,
35,
3539,
10761,
2390,
62,
35222,
198,
9,
5,
10097,
30934,
9,
198,
198,
9,
10097,
23031,
9,
198,
9,
15965,
2977,
198,
9,
10097,
23031,
9,
198,
26947,
285,
85,
62,
15252,
41876,
384,
420,
31172,
12,
565,
82,
3672,
13,
198,
26947,
285,
85,
62,
26495,
41876,
1614,
4871,
13,
198,
26947,
285,
85,
62,
13116,
41876,
1128,
418,
6015,
12,
1676,
70,
3672,
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
] |
*----------------------------------------------------------------------*
* MODULE exit_command_9000 INPUT
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
module exit_command_9000 input.
perform exit.
endmodule. "exit_command_9000 INPUT
*----------------------------------------------------------------------*
* MODULE user_command_9000 INPUT
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
module user_command_9000 input.
perform process_okcode_9000 changing gv_okcode.
endmodule. "user_command_9000 INPUT | [
9,
10097,
23031,
9,
198,
9,
220,
33893,
8420,
62,
21812,
62,
24,
830,
3268,
30076,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
21412,
8420,
62,
21812,
62,
24,
830,
5128,
13,
198,
220,
1620,
8420,
13,
198,
437,
21412,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
37023,
62,
21812,
62,
24,
830,
3268,
30076,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
33893,
2836,
62,
21812,
62,
24,
830,
3268,
30076,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
21412,
2836,
62,
21812,
62,
24,
830,
5128,
13,
198,
220,
1620,
1429,
62,
482,
8189,
62,
24,
830,
5609,
308,
85,
62,
482,
8189,
13,
198,
437,
21412,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7220,
62,
21812,
62,
24,
830,
3268,
30076
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_att_trace_connector
PUBLIC.
METHODS connect
IMPORTING converted_trace TYPE zif_att_trace_converter=>ty_converted_trace
customizing TYPE REF TO zcl_att_customizing.
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
1078,
62,
40546,
62,
8443,
273,
198,
220,
44731,
13,
628,
220,
337,
36252,
50,
2018,
198,
220,
220,
220,
30023,
9863,
2751,
11513,
62,
40546,
41876,
1976,
361,
62,
1078,
62,
40546,
62,
1102,
332,
353,
14804,
774,
62,
1102,
13658,
62,
40546,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2183,
2890,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
1078,
62,
23144,
2890,
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,
1,
1
] |
MODULE get_focus INPUT.
CALL FUNCTION 'TPDA_GET_FOCUS'.
ENDMODULE. " get_focus INPUT
MODULE exit INPUT.
CLEAR dynp_vars-set_bp.
lcl_dynpro_0300=>clear( ).
CLEAR tpda_bp_cr.
CLEAR: it_statements, it_functions, it_bp_set.
CLEAR ok_code.
LEAVE TO SCREEN 0.
ENDMODULE. " exit INPUT
MODULE init OUTPUT.
IF init IS INITIAL.
init = 'X'.
tab_ctrl_bp_create-activetab = start_tab.
CLEAR wa_condition_0210.
CLEAR wa_condition_0220.
CLEAR wa_condition_0230.
CLEAR wa_condition_0250.
ENDIF.
ENDMODULE. " init OUTPUT
MODULE exit_800 INPUT.
cancel_800 = 'X'.
LEAVE TO SCREEN 0.
ENDMODULE. " exit_800 INPUT
| [
33365,
24212,
651,
62,
37635,
3268,
30076,
13,
201,
198,
220,
42815,
29397,
4177,
2849,
705,
7250,
5631,
62,
18851,
62,
37,
4503,
2937,
4458,
201,
198,
10619,
33365,
24212,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
651,
62,
37635,
220,
3268,
30076,
201,
198,
201,
198,
33365,
24212,
8420,
3268,
30076,
13,
201,
198,
220,
30301,
1503,
37860,
79,
62,
85,
945,
12,
2617,
62,
46583,
13,
201,
198,
220,
300,
565,
62,
67,
2047,
1676,
62,
3070,
405,
14804,
20063,
7,
6739,
201,
198,
220,
30301,
1503,
256,
79,
6814,
62,
46583,
62,
6098,
13,
201,
198,
220,
30301,
1503,
25,
340,
62,
14269,
3196,
11,
340,
62,
12543,
2733,
11,
340,
62,
46583,
62,
2617,
13,
201,
198,
220,
30301,
1503,
12876,
62,
8189,
13,
201,
198,
220,
12509,
32,
6089,
5390,
6374,
2200,
1677,
657,
13,
201,
198,
10619,
33365,
24212,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8420,
220,
3268,
30076,
201,
198,
201,
198,
33365,
24212,
2315,
16289,
30076,
13,
201,
198,
220,
16876,
2315,
3180,
3268,
2043,
12576,
13,
201,
198,
220,
220,
220,
2315,
796,
705,
55,
4458,
201,
198,
220,
220,
220,
7400,
62,
44755,
62,
46583,
62,
17953,
12,
5275,
8658,
796,
923,
62,
8658,
13,
201,
198,
220,
220,
220,
30301,
1503,
2082,
62,
31448,
62,
2999,
940,
13,
201,
198,
220,
220,
220,
30301,
1503,
2082,
62,
31448,
62,
2999,
1238,
13,
201,
198,
220,
220,
220,
30301,
1503,
2082,
62,
31448,
62,
2999,
1270,
13,
201,
198,
220,
220,
220,
30301,
1503,
2082,
62,
31448,
62,
2999,
1120,
13,
201,
198,
220,
23578,
5064,
13,
201,
198,
10619,
33365,
24212,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
2315,
220,
16289,
30076,
201,
198,
201,
198,
33365,
24212,
8420,
62,
7410,
3268,
30076,
13,
201,
198,
220,
14241,
62,
7410,
796,
705,
55,
4458,
201,
198,
220,
12509,
32,
6089,
5390,
6374,
2200,
1677,
657,
13,
201,
198,
10619,
33365,
24212,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8420,
62,
7410,
220,
3268,
30076,
201,
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,
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abapgit_object_acid 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.
METHODS: create_object
RETURNING VALUE(ro_aab) TYPE REF TO cl_aab_id
RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_ACID IMPLEMENTATION.
METHOD create_object.
DATA: lv_name TYPE aab_id_name.
lv_name = ms_item-obj_name.
CREATE OBJECT ro_aab
EXPORTING
im_name = lv_name
EXCEPTIONS
name_not_allowed = 1
OTHERS = 2.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error creating CL_AAB_ID object' ).
ENDIF.
ENDMETHOD.
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~delete.
DATA: lo_aab TYPE REF TO cl_aab_id.
lo_aab = create_object( ).
lo_aab->enqueue( ).
lo_aab->delete(
EXCEPTIONS
prop_error = 1
propt_error = 2
act_error = 3
cts_error = 4
cts_devclass = 5
id_not_found = 6
no_authorization = 7
id_still_used = 8
where_used_error = 9
OTHERS = 10 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error deleting ACID object' ).
ENDIF.
lo_aab->dequeue( ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: lv_description TYPE aab_id_descript,
lo_aab TYPE REF TO cl_aab_id.
io_xml->read( EXPORTING iv_name = 'DESCRIPTION'
CHANGING cg_data = lv_description ).
lo_aab = create_object( ).
lo_aab->enqueue( ).
lo_aab->set_descript( lv_description ).
tadir_insert( iv_package ).
lo_aab->save( ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_state TYPE abap_bool,
lo_aab TYPE REF TO cl_aab_id.
lo_aab = create_object( ).
lo_aab->get_state(
IMPORTING
ex_state = lv_state ).
rv_bool = boolc( lv_state = abap_true ).
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 = 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( ).
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.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = ms_item-obj_name
object_type = 'ACID'
in_new_window = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lo_aab TYPE REF TO cl_aab_id,
lv_description TYPE aab_id_descript.
IF zif_abapgit_object~exists( ) = abap_false.
RETURN.
ENDIF.
lo_aab = create_object( ).
lo_aab->get_descript(
IMPORTING ex_descript = lv_description
EXCEPTIONS no_description_found = 1 ).
io_xml->add( iv_name = 'DESCRIPTION'
ig_data = lv_description ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
46309,
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,
337,
36252,
50,
25,
2251,
62,
15252,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
64,
397,
8,
41876,
4526,
37,
5390,
537,
62,
64,
397,
62,
312,
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,
2246,
2389,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
2251,
62,
15252,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
3672,
41876,
257,
397,
62,
312,
62,
3672,
13,
628,
198,
220,
220,
220,
300,
85,
62,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
64,
397,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
545,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
3672,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
62,
1662,
62,
40845,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
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,
4441,
7852,
62,
3838,
33,
62,
2389,
2134,
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,
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,
33678,
13,
628,
220,
220,
220,
42865,
25,
2376,
62,
64,
397,
41876,
4526,
37,
5390,
537,
62,
64,
397,
62,
312,
13,
628,
198,
220,
220,
220,
2376,
62,
64,
397,
796,
2251,
62,
15252,
7,
6739,
198,
220,
220,
220,
2376,
62,
64,
397,
3784,
268,
36560,
7,
6739,
198,
220,
220,
220,
2376,
62,
64,
397,
3784,
33678,
7,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
2632,
62,
18224,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
386,
457,
62,
18224,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
719,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
269,
912,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
796,
604,
198,
220,
220,
220,
220,
220,
220,
220,
269,
912,
62,
7959,
4871,
220,
220,
220,
220,
796,
642,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
62,
1662,
62,
9275,
220,
220,
220,
220,
796,
718,
198,
220,
220,
220,
220,
220,
220,
220,
645,
62,
9800,
1634,
796,
767,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
62,
24219,
62,
1484,
220,
220,
220,
796,
807,
198,
220,
220,
220,
220,
220,
220,
220,
810,
62,
1484,
62,
18224,
796,
860,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
838,
6739,
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,
34817,
7125,
2389,
2134,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
2376,
62,
64,
397,
3784,
2934,
36560,
7,
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,
300,
85,
62,
11213,
41876,
257,
397,
62,
312,
62,
20147,
1968,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
64,
397,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
64,
397,
62,
312,
13,
628,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
30910,
40165,
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,
11213,
6739,
628,
220,
220,
220,
2376,
62,
64,
397,
796,
2251,
62,
15252,
7,
6739,
198,
220,
220,
220,
2376,
62,
64,
397,
3784,
268,
36560,
7,
6739,
198,
220,
220,
220,
2376,
62,
64,
397,
3784,
2617,
62,
20147,
1968,
7,
300,
85,
62,
11213,
6739,
198,
220,
220,
220,
36264,
343,
62,
28463,
7,
21628,
62,
26495,
6739,
198,
220,
220,
220,
2376,
62,
64,
397,
3784,
21928,
7,
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,
5219,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
64,
397,
220,
220,
41876,
4526,
37,
5390,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
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0500 INPUT
*&---------------------------------------------------------------------*
MODULE user_command_0500 INPUT.
PERFORM user_command.
ENDMODULE. " USER_COMMAND_0500 INPUT
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
220,
220,
220,
220,
19937,
220,
1294,
1137,
62,
9858,
44,
6981,
62,
2713,
405,
220,
3268,
30076,
198,
9,
5,
10097,
30934,
9,
198,
33365,
24212,
2836,
62,
21812,
62,
2713,
405,
3268,
30076,
13,
628,
220,
19878,
21389,
2836,
62,
21812,
13,
198,
198,
10619,
33365,
24212,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1294,
1137,
62,
9858,
44,
6981,
62,
2713,
405,
220,
3268,
30076,
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
] |
CLASS cl_rest_http_handler DEFINITION PUBLIC.
PUBLIC SECTION.
INTERFACES:
if_http_extension,
if_rest_application.
ENDCLASS.
CLASS cl_rest_http_handler IMPLEMENTATION.
METHOD if_http_extension~handle_request.
RETURN.
ENDMETHOD.
METHOD if_rest_application~get_root_handler.
RETURN.
ENDMETHOD.
ENDCLASS. | [
31631,
537,
62,
2118,
62,
4023,
62,
30281,
5550,
20032,
17941,
44731,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
25,
198,
220,
220,
220,
220,
220,
611,
62,
4023,
62,
2302,
3004,
11,
198,
220,
220,
220,
220,
220,
611,
62,
2118,
62,
31438,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
537,
62,
2118,
62,
4023,
62,
30281,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
611,
62,
4023,
62,
2302,
3004,
93,
28144,
62,
25927,
13,
198,
220,
220,
220,
30826,
27064,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
611,
62,
2118,
62,
31438,
93,
1136,
62,
15763,
62,
30281,
13,
198,
220,
220,
220,
30826,
27064,
13,
198,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
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,
1,
1,
1
] |
class ZCL_GTT_STS_ACTUAL_EVENT definition
public
create public .
public section.
interfaces ZIF_GTT_STS_ACTUAL_EVENT .
class-methods GET_TOR_ACTUAL_EVENT_CLASS
importing
!IS_EVENT type TRXAS_EVT_CTAB_WA
returning
value(RO_ACTUAL_EVENT) type ref to ZIF_GTT_STS_ACTUAL_EVENT
raising
CX_UDM_MESSAGE .
methods GET_STOP
importing
!IT_ALL_APPL_TABLES type TRXAS_TABCONTAINER
returning
value(RT_STOP) type /SCMTMS/T_EM_BO_TOR_STOP .
methods GET_CAPA_STOP
importing
!IT_ALL_APPL_TABLES type TRXAS_TABCONTAINER
returning
value(RT_STOP) type /SCMTMS/T_EM_BO_TOR_STOP .
methods GET_CAPA_ROOT
importing
!IT_ALL_APPL_TABLES type TRXAS_TABCONTAINER
returning
value(RT_ROOT) type /SCMTMS/T_EM_BO_TOR_ROOT .
methods GET_EXECUTION
importing
!IT_ALL_APPL_TABLES type TRXAS_TABCONTAINER
!IV_OLD type ABAP_BOOL default ABAP_FALSE
exporting
value(ET_EXECUTION) type /SCMTMS/T_EM_BO_TOR_EXECINFO .
methods EXTRACT_GENERAL_EVENT_DATA
importing
!IS_EXECINFO type /SCMTMS/S_EM_BO_TOR_EXECINFO
!IV_EVT_CNT type /SAPTRX/EVTCNT
!IV_EVENTID type /SAPTRX/EVTCNT
!IS_TRACKINGHEADER type /SAPTRX/BAPI_EVM_HEADER
changing
!CS_TRACKINGHEADER type /SAPTRX/BAPI_EVM_HEADER
!CS_TRACKLOCATION type /SAPTRX/BAPI_EVM_LOCATIONID
!CT_TRACKPARAMETERS type ZIF_GTT_STS_ACTUAL_EVENT~TT_TRACKPARAMETERS
!CT_EVENTID_MAP type TRXAS_EVTID_EVTCNT_MAP
raising
CX_UDM_MESSAGE .
methods HANDLE_DELAY_EVENT
importing
!IS_TOR_ROOT type /SCMTMS/S_EM_BO_TOR_ROOT
!IS_EXECINFO type /SCMTMS/S_EM_BO_TOR_EXECINFO
!IV_EVT_CNT type /SAPTRX/EVTCNT
changing
!CS_TRACKLOCATION type /SAPTRX/BAPI_EVM_LOCATIONID
!CT_TRACKPARAMETERS type ZIF_GTT_STS_ACTUAL_EVENT~TT_TRACKPARAMETERS .
protected section.
class-data GV_EVENT_COUNT type /SAPTRX/EVTCNT .
methods GET_MODEL_EVENT_ID
importing
!IV_STANDARD_EVENT_ID type /SAPTRX/EV_EVTID
returning
value(RV_MODEL_EVENT_ID) type /SAPTRX/EV_EVTID .
methods CHECK_APPLICATION_EVENT_SOURCE
importing
!IT_ALL_APPL_TABLES type TRXAS_TABCONTAINER
!IV_EVENT_CODE type /SCMTMS/TOR_EVENT
!IS_EVENT type TRXAS_EVT_CTAB_WA
exporting
!EV_RESULT like SY-BINPT .
methods CHECK_TOR_SENT_TO_GTT
importing
!IS_EVENT type TRXAS_EVT_CTAB_WA
exporting
!EV_IS_SENT type ABAP_BOOL .
methods CHECK_TRXSERVERNAME
importing
!IS_EVENT type TRXAS_EVT_CTAB_WA
exporting
!EV_RESULT like SY-BINPT .
methods CHECK_TOR_TYPE_SPECIFIC_EVENTS
importing
!IV_EVENT_CODE type /SCMTMS/TOR_EVENT
returning
value(EV_RESULT) like SY-BINPT .
private section.
methods ADD_ADDITIONAL_MATCH_KEY
importing
!IV_EXECUTION_INFO_SOURCE type /SCMTMS/EXECINFO_SOURCE
!IV_EVTCNT type /SAPTRX/EVTCNT
changing
!CT_TRACKPARAMETERS type ZIF_GTT_STS_ACTUAL_EVENT=>TT_TRACKPARAMETERS .
ENDCLASS.
CLASS ZCL_GTT_STS_ACTUAL_EVENT IMPLEMENTATION.
METHOD check_application_event_source.
FIELD-SYMBOLS <ls_tor_root> TYPE /scmtms/s_em_bo_tor_root.
CLEAR ev_result.
get_execution(
EXPORTING
it_all_appl_tables = it_all_appl_tables
IMPORTING
et_execution = DATA(lt_tor_execinfo) ).
get_execution(
EXPORTING
it_all_appl_tables = it_all_appl_tables
iv_old = abap_true
IMPORTING
et_execution = DATA(lt_tor_execinfo_old) ).
ASSIGN is_event-maintabref->* TO <ls_tor_root>.
LOOP AT lt_tor_execinfo ASSIGNING FIELD-SYMBOL(<ls_tor_execinfo>) WHERE parent_node_id = <ls_tor_root>-node_id.
ASSIGN lt_tor_execinfo_old[ KEY node_id COMPONENTS node_id = <ls_tor_execinfo>-node_id ]
TO FIELD-SYMBOL(<ls_tor_execinfo_old>).
IF ( sy-subrc = 0 AND <ls_tor_execinfo_old> <> <ls_tor_execinfo> ) OR sy-subrc <> 0 ##BOOL_OK.
CHECK <ls_tor_execinfo>-event_code = iv_event_code.
CHECK NOT ( <ls_tor_execinfo>-execinfo_source = /scmtms/if_tor_const=>sc_tor_event_source-application OR
<ls_tor_execinfo>-execinfo_source = /scmtms/if_tor_const=>sc_tor_event_source-prop_predecessor OR
<ls_tor_execinfo>-execinfo_source = /scmtms/if_tor_const=>sc_tor_event_source-prop_successor ).
ev_result = zif_gtt_sts_ef_constants=>cs_condition-false.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD check_tor_sent_to_gtt.
FIELD-SYMBOLS: <ls_tor_root> TYPE /scmtms/s_em_bo_tor_root.
CLEAR ev_is_sent.
ASSIGN is_event-maintabref->* TO <ls_tor_root>.
IF sy-subrc <> 0.
RETURN.
ENDIF.
IF <ls_tor_root>-tspid IS NOT INITIAL AND
<ls_tor_root>-lifecycle = zif_gtt_sts_constants=>cs_lifecycle_status-in_process OR
<ls_tor_root>-lifecycle = zif_gtt_sts_constants=>cs_lifecycle_status-completed AND
( <ls_tor_root>-execution = zif_gtt_sts_constants=>cs_execution_status-in_execution OR
<ls_tor_root>-execution = zif_gtt_sts_constants=>cs_execution_status-executed OR
<ls_tor_root>-execution = zif_gtt_sts_constants=>cs_execution_status-ready_for_transp_exec ).
ev_is_sent = abap_true.
ELSE.
ev_is_sent = abap_false.
ENDIF.
ENDMETHOD.
METHOD check_tor_type_specific_events.
RETURN.
ENDMETHOD.
METHOD check_trxservername.
FIELD-SYMBOLS <ls_tor_root> TYPE /scmtms/s_em_bo_tor_root.
CLEAR ev_result.
ASSIGN is_event-maintabref->* TO <ls_tor_root>.
TEST-SEAM lv_trxservername.
SELECT SINGLE /saptrx/aotypes~trxservername
FROM /scmtms/c_torty
JOIN /saptrx/aotypes ON /scmtms/c_torty~aotype = /saptrx/aotypes~aotype
INTO @DATA(lv_trxservername)
WHERE /scmtms/c_torty~type = @<ls_tor_root>-tor_type AND
/saptrx/aotypes~trk_obj_type = @zif_gtt_sts_actual_event~cv_tor_trk_obj_typ ##WARN_OK. "#EC CI_BUFFJOIN
END-TEST-SEAM.
IF is_event-trxservername <> lv_trxservername.
ev_result = zif_gtt_sts_ef_constants=>cs_condition-false.
ENDIF.
ENDMETHOD.
METHOD extract_general_event_data.
DATA:
ls_eventid_map TYPE trxas_evtid_evtcnt_map_wa,
ls_trackparameters TYPE /saptrx/bapi_evm_parameters,
ls_loc_root TYPE /scmtms/s_bo_loc_root_k,
ls_loc_geo_addr_details TYPE /scmtms/s_bo_loc_addr_detailsk,
ls_loc_descr TYPE /scmtms/s_bo_loc_description_k.
ls_eventid_map-eventid = iv_eventid.
ls_eventid_map-evtcnt = iv_evt_cnt.
APPEND ls_eventid_map TO ct_eventid_map.
cs_trackingheader = is_trackingheader.
cs_trackingheader-evtcnt = iv_evt_cnt.
cs_tracklocation-evtcnt = iv_evt_cnt.
cs_tracklocation-addnum = iv_evt_cnt.
IF cs_trackingheader-datacs IS INITIAL AND cs_trackingheader-dataid IS INITIAL.
cs_trackingheader-datacs = is_execinfo-datacs.
cs_trackingheader-dataid = is_execinfo-dataid.
ENDIF.
IF is_execinfo-event_reason IS NOT INITIAL.
cs_trackingheader-srctx = is_execinfo-event_reason.
ENDIF.
IF is_execinfo-actual_date IS NOT INITIAL.
cs_trackingheader-evttst = is_execinfo-actual_date.
ENDIF.
CLEAR ls_loc_root.
CLEAR ls_loc_geo_addr_details.
CLEAR ls_loc_descr.
" Note: 2276001
cs_trackingheader-srcid = is_execinfo-event_reason_code.
IF is_execinfo-sndid IS NOT INITIAL. " Note: 2280769
cs_trackingheader-sndid = is_execinfo-sndid.
ENDIF. " Note: 2280769
IF is_execinfo-sndcod IS NOT INITIAL. " Note: 2280769
cs_trackingheader-sndcod = is_execinfo-sndcod.
ENDIF. " Note: 2280769
cs_trackingheader-msgsrctyp = /scmtms/cl_scem_int_c=>sc_ev_srctyp-tm.
IF is_execinfo-ext_loc_id IS NOT INITIAL.
/scmtms/cl_em_tm_helper=>get_loc_descr(
EXPORTING
iv_loc_id = is_execinfo-ext_loc_id
iv_loc_uuid = is_execinfo-ext_loc_uuid
CHANGING
cs_loc_geo_addr_details = ls_loc_geo_addr_details
cs_loc_root = ls_loc_root
cs_loc_descr = ls_loc_descr ).
ENDIF.
cs_trackingheader-evtzon = ls_loc_root-time_zone_code.
cs_tracklocation-locnam = ls_loc_descr-loc_description.
IF is_execinfo-actual_tzone IS NOT INITIAL.
cs_trackingheader-evtzon = is_execinfo-actual_tzone.
ENDIF.
CLEAR ls_trackparameters.
ls_trackparameters-evtcnt = cs_trackingheader-evtcnt.
ls_trackparameters-param_name = zif_gtt_sts_ef_constants=>cs_system_fields-actual_technical_timezone.
ls_trackparameters-param_value = zcl_gtt_sts_tools=>get_system_time_zone( ).
APPEND ls_trackparameters TO ct_trackparameters.
CLEAR ls_trackparameters.
ls_trackparameters-evtcnt = cs_trackingheader-evtcnt.
ls_trackparameters-param_name = zif_gtt_sts_ef_constants=>cs_system_fields-actual_technical_datetime.
ls_trackparameters-param_value = zcl_gtt_sts_tools=>get_system_date_time( ).
APPEND ls_trackparameters TO ct_trackparameters.
ENDMETHOD.
METHOD get_capa_root.
FIELD-SYMBOLS <lt_capa_root> TYPE /scmtms/t_em_bo_tor_root.
ASSIGN it_all_appl_tables[ tabledef = /scmtms/cl_scem_int_c=>sc_table_definition-bo_tor-capa_root ]-tableref
TO FIELD-SYMBOL(<lr_tabref>).
IF sy-subrc = 0.
ASSIGN <lr_tabref>->* TO <lt_capa_root>.
IF sy-subrc = 0.
rt_root = <lt_capa_root>.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD get_capa_stop.
FIELD-SYMBOLS <lt_capa_stop> TYPE /scmtms/t_em_bo_tor_stop.
ASSIGN it_all_appl_tables[ tabledef = /scmtms/cl_scem_int_c=>sc_table_definition-bo_tor-capa_stop ]-tableref
TO FIELD-SYMBOL(<lr_tabref>).
IF sy-subrc = 0.
ASSIGN <lr_tabref>->* TO <lt_capa_stop>.
IF sy-subrc = 0.
rt_stop = <lt_capa_stop>.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD get_execution.
FIELD-SYMBOLS <lt_execution> TYPE /scmtms/t_em_bo_tor_execinfo.
CLEAR et_execution.
ASSIGN it_all_appl_tables[ tabledef = SWITCH #( iv_old WHEN abap_false
THEN zif_gtt_sts_actual_event~cs_tabledef-tor_execution_info
ELSE zif_gtt_sts_actual_event~cs_tabledef-tor_execution_info_before )
]-tableref TO FIELD-SYMBOL(<lr_tabref>).
IF sy-subrc = 0.
ASSIGN <lr_tabref>->* TO <lt_execution>.
IF sy-subrc = 0.
et_execution = <lt_execution>.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD get_model_event_id.
CASE iv_standard_event_id.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-arrival.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-shp_arrival.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-departure.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-shp_departure.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-pod.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-shp_pod.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-popu.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-popu.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-load_begin.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-load_start.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-load_end.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-load_end.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-coupling.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-coupling.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-decoupling.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-decoupling.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-unload_begin.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-unload_begin.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-unload_end.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-unload_end.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-delay.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-delay.
WHEN zif_gtt_sts_actual_event~cs_event_id-standard-delay_fu.
rv_model_event_id = zif_gtt_sts_actual_event~cs_event_id-model-delay.
WHEN OTHERS.
RETURN.
ENDCASE.
ENDMETHOD.
METHOD get_stop.
FIELD-SYMBOLS <lt_stop> TYPE /scmtms/t_em_bo_tor_stop.
ASSIGN it_all_appl_tables[ tabledef = zif_gtt_sts_actual_event~cs_tabledef-tor_stop ]-tableref
TO FIELD-SYMBOL(<lr_tabref>) ##WARN_OK.
IF sy-subrc = 0.
ASSIGN <lr_tabref>->* TO <lt_stop>.
IF sy-subrc = 0.
rt_stop = <lt_stop>.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD get_tor_actual_event_class.
FIELD-SYMBOLS <ls_tor_root> TYPE /scmtms/s_em_bo_tor_root.
ASSIGN is_event-maintabref->* TO <ls_tor_root>.
IF sy-subrc = 0.
CASE <ls_tor_root>-tor_cat.
WHEN /scmtms/if_tor_const=>sc_tor_category-active.
ro_actual_event = NEW zcl_gtt_sts_fo_actual_event( ).
WHEN /scmtms/if_tor_const=>sc_tor_category-booking.
ro_actual_event = NEW zcl_gtt_sts_fb_actual_event( ).
WHEN /scmtms/if_tor_const=>sc_tor_category-freight_unit.
ro_actual_event = NEW zcl_gtt_sts_fu_actual_event( ).
WHEN OTHERS.
MESSAGE i009(zsst_gtt) WITH <ls_tor_root>-tor_cat INTO DATA(lv_dummy) ##needed.
zcl_gtt_sts_tools=>throw_exception( ).
ENDCASE.
ENDIF.
ENDMETHOD.
METHOD handle_delay_event.
DATA:
lt_execinfo_tr TYPE /scmtms/t_tor_exec_tr_k,
lv_timezone TYPE /scmtms/tzone,
lv_locno TYPE /sapapo/locno,
lv_loctype TYPE /saptrx/loc_id_type.
DATA(lo_tor_srv_mgr) = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( iv_bo_key = /scmtms/if_tor_c=>sc_bo_key ).
TEST-SEAM lt_execinfo_tr.
lo_tor_srv_mgr->retrieve_by_association(
EXPORTING
iv_node_key = /scmtms/if_tor_c=>sc_node-root
it_key = VALUE #( ( key = is_tor_root-node_id ) )
iv_association = /scmtms/if_tor_c=>sc_association-root-executioninformation_tr
iv_fill_data = abap_true
IMPORTING
et_data = lt_execinfo_tr ).
END-TEST-SEAM.
ASSIGN lt_execinfo_tr[ parent_key = is_execinfo-parent_node_id
execution_id = is_execinfo-execution_id ] TO FIELD-SYMBOL(<ls_execinfo_tr>) ##PRIMKEY
##WARN_OK.
IF sy-subrc = 0.
IF <ls_execinfo_tr>-estimated_date IS NOT INITIAL.
INSERT VALUE #( evtcnt = iv_evt_cnt
param_name = zif_gtt_sts_ef_constants=>cs_parameter-estimated_datetime
param_index = 1
param_value = <ls_execinfo_tr>-estimated_date ) INTO TABLE ct_trackparameters.
INSERT VALUE #( evtcnt = iv_evt_cnt
param_name = zif_gtt_sts_ef_constants=>cs_parameter-stop_id
param_index = 1
param_value = cs_tracklocation-locid2 ) INTO TABLE ct_trackparameters.
IF <ls_execinfo_tr>-actual_date_tz_em IS NOT INITIAL.
lv_timezone = <ls_execinfo_tr>-actual_date_tz_em.
ELSE.
lv_timezone = <ls_execinfo_tr>-actual_tzone.
ENDIF.
IF lv_timezone IS NOT INITIAL.
INSERT VALUE #( evtcnt = iv_evt_cnt
param_name = zif_gtt_sts_ef_constants=>cs_parameter-estimated_timezone
param_index = 1
param_value = lv_timezone ) INTO TABLE ct_trackparameters.
ENDIF.
ENDIF.
ENDIF.
IF is_execinfo-ref_event_code IS NOT INITIAL.
lv_locno = cs_tracklocation-locid1.
lv_loctype = zcl_gtt_sts_tools=>get_location_type( iv_locno = lv_locno ).
INSERT VALUE #( evtcnt = iv_evt_cnt
param_name = zif_gtt_sts_ef_constants=>cs_parameter-ref_planned_event_milestone
param_value = is_execinfo-ref_event_code ) INTO TABLE ct_trackparameters.
INSERT VALUE #( evtcnt = iv_evt_cnt
param_name = zif_gtt_sts_ef_constants=>cs_parameter-ref_planned_event_loctype
param_value = lv_loctype ) INTO TABLE ct_trackparameters.
INSERT VALUE #( evtcnt = iv_evt_cnt
param_name = zif_gtt_sts_ef_constants=>cs_parameter-ref_planned_event_locid1
param_value = cs_tracklocation-locid1 ) INTO TABLE ct_trackparameters.
INSERT VALUE #( evtcnt = iv_evt_cnt
param_name = zif_gtt_sts_ef_constants=>cs_parameter-ref_planned_event_locid2
param_value = cs_tracklocation-locid2 ) INTO TABLE ct_trackparameters.
ENDIF.
CLEAR: cs_tracklocation-loccod,
cs_tracklocation-locid1,
cs_tracklocation-locid2.
ENDMETHOD.
METHOD zif_gtt_sts_actual_event~check_event_relevance.
CLEAR ev_result.
IF check_tor_type_specific_events( iv_event_code ) = zif_gtt_sts_ef_constants=>cs_condition-false.
RETURN.
ENDIF.
check_application_event_source(
EXPORTING
it_all_appl_tables = it_all_appl_tables
iv_event_code = iv_event_code
is_event = is_event
IMPORTING
ev_result = ev_result ).
IF ev_result = zif_gtt_sts_ef_constants=>cs_condition-false.
RETURN.
ENDIF.
check_tor_sent_to_gtt(
EXPORTING
is_event = is_event
IMPORTING
ev_is_sent = DATA(lv_is_sent) ).
IF lv_is_sent = abap_false.
ev_result = zif_gtt_sts_ef_constants=>cs_condition-false.
RETURN.
ENDIF.
check_trxservername(
EXPORTING
is_event = is_event
IMPORTING
ev_result = ev_result ).
ENDMETHOD.
METHOD zif_gtt_sts_actual_event~extract_event.
DATA:
ls_trackingheader TYPE /saptrx/bapi_evm_header,
ls_tracklocation TYPE /saptrx/bapi_evm_locationid,
lv_loctype TYPE /saptrx/loc_id_type,
lv_locno TYPE /sapapo/locno.
FIELD-SYMBOLS <ls_root> TYPE /scmtms/s_em_bo_tor_root.
extract_general_event_data(
EXPORTING
is_execinfo = is_execinfo
iv_evt_cnt = iv_evt_cnt
iv_eventid = is_event-eventid
is_trackingheader = is_trackingheader
CHANGING
cs_trackingheader = ls_trackingheader
cs_tracklocation = ls_tracklocation
ct_trackparameters = ct_trackparameters
ct_eventid_map = ct_eventid_map ).
add_additional_match_key(
EXPORTING
iv_evtcnt = iv_evt_cnt
iv_execution_info_source = is_execinfo-execinfo_source
CHANGING
ct_trackparameters = ct_trackparameters ).
ASSIGN is_event-maintabref->* TO <ls_root>.
IF sy-subrc <> 0.
RETURN.
ENDIF.
DATA(lt_stop) = get_stop( it_all_appl_tables ).
zcl_gtt_sts_tools=>get_stop_points(
EXPORTING
iv_root_id = <ls_root>-tor_id
it_stop = VALUE #( FOR <ls_stop> IN lt_stop USING KEY parent_seqnum
WHERE ( parent_node_id = <ls_root>-node_id ) ( <ls_stop> ) )
IMPORTING
et_stop_points = DATA(lt_stop_points) ).
lv_locno = is_execinfo-ext_loc_id.
ls_tracklocation-loccod = zcl_gtt_sts_tools=>get_location_type( iv_locno = lv_locno ).
ls_tracklocation-locid1 = is_execinfo-ext_loc_id.
ASSIGN lt_stop_points[ log_locid = is_execinfo-ext_loc_id ]-stop_id TO FIELD-SYMBOL(<lv_stop_id>) ##WARN_OK.
IF sy-subrc = 0.
SHIFT <lv_stop_id> LEFT DELETING LEADING '0'.
ls_tracklocation-locid2 = <lv_stop_id>.
ENDIF.
IF iv_event_code = /scmtms/if_tor_const=>sc_tor_event-delay OR
iv_event_code = /scmtms/if_tor_const=>sc_tor_event-delay_fu.
handle_delay_event(
EXPORTING
is_tor_root = <ls_root>
is_execinfo = is_execinfo
iv_evt_cnt = ls_trackingheader-evtcnt
CHANGING
cs_tracklocation = ls_tracklocation
ct_trackparameters = ct_trackparameters ).
ENDIF.
APPEND ls_trackingheader TO ct_trackingheader.
APPEND ls_tracklocation TO ct_tracklocation.
ENDMETHOD.
METHOD zif_gtt_sts_actual_event~process_actual_event.
FIELD-SYMBOLS: <ls_tor_root> TYPE /scmtms/s_em_bo_tor_root.
DATA:
ls_trackingheader TYPE /saptrx/bapi_evm_header,
lv_tmp_fotrxcod TYPE /saptrx/trxcod,
lv_tmp_futrxcod TYPE /saptrx/trxcod,
lv_fotrxcod TYPE /saptrx/trxcod,
lv_futrxcod TYPE /saptrx/trxcod.
get_execution(
EXPORTING
it_all_appl_tables = it_all_appl_tables
IMPORTING
et_execution = DATA(lt_tor_execinfo) ).
get_execution(
EXPORTING
it_all_appl_tables = it_all_appl_tables
iv_old = abap_true
IMPORTING
et_execution = DATA(lt_tor_execinfo_before) ).
LOOP AT it_events ASSIGNING FIELD-SYMBOL(<ls_event>).
CLEAR ls_trackingheader.
ls_trackingheader-language = sy-langu.
ls_trackingheader-evtid = get_model_event_id( CONV #( iv_event_code ) ).
DATA(zcl_gtt_sts_tor_actual_event) = get_tor_actual_event_class( <ls_event> ).
ASSIGN <ls_event>-maintabref->* TO <ls_tor_root>.
CHECK sy-subrc = 0.
ls_trackingheader-trxid = |{ <ls_tor_root>-tor_id ALPHA = OUT }|.
CASE <ls_tor_root>-tor_cat.
WHEN /scmtms/if_tor_const=>sc_tor_category-active.
ls_trackingheader-trxcod = zif_gtt_sts_constants=>cs_trxcod-fo_number.
WHEN /scmtms/if_tor_const=>sc_tor_category-booking.
ls_trackingheader-trxcod = zif_gtt_sts_constants=>cs_trxcod-fo_number.
WHEN /scmtms/if_tor_const=>sc_tor_category-freight_unit.
ls_trackingheader-trxcod = zif_gtt_sts_constants=>cs_trxcod-fu_number.
ENDCASE.
TRY.
CALL FUNCTION 'ZGTT_SOF_GET_TRACKID'
EXPORTING
iv_type = <ls_event>-eventtype
iv_app = 'STS'
IMPORTING
ev_shptrxcod = lv_tmp_fotrxcod
ev_futrxcod = lv_tmp_futrxcod.
CASE <ls_tor_root>-tor_cat.
WHEN /scmtms/if_tor_const=>sc_tor_category-active.
IF lv_tmp_fotrxcod IS NOT INITIAL.
ls_trackingheader-trxcod = lv_tmp_fotrxcod.
ENDIF.
WHEN /scmtms/if_tor_const=>sc_tor_category-booking.
IF lv_tmp_fotrxcod IS NOT INITIAL.
ls_trackingheader-trxcod = lv_tmp_fotrxcod.
ENDIF.
WHEN /scmtms/if_tor_const=>sc_tor_category-freight_unit.
IF lv_tmp_futrxcod IS NOT INITIAL.
ls_trackingheader-trxcod = lv_tmp_futrxcod.
ENDIF.
ENDCASE.
CATCH cx_sy_dyn_call_illegal_func.
ENDTRY.
GET TIME STAMP FIELD DATA(lv_timestamp).
ls_trackingheader-evttst = lv_timestamp.
ls_trackingheader-sndnam = /scmtms/cl_scem_int_c=>gc_sendername_tm.
" lt_tor_execinfo is SORTED by parent_node_id event_code
READ TABLE lt_tor_execinfo BINARY SEARCH TRANSPORTING NO FIELDS
WITH KEY parent_node_id = <ls_tor_root>-node_id
event_code = iv_event_code.
LOOP AT lt_tor_execinfo ASSIGNING FIELD-SYMBOL(<ls_tor_execinfo>) FROM sy-tabix.
IF <ls_tor_execinfo>-parent_node_id <> <ls_tor_root>-node_id OR
<ls_tor_execinfo>-event_code <> iv_event_code.
EXIT.
ENDIF.
READ TABLE lt_tor_execinfo_before WITH KEY node_id COMPONENTS node_id = <ls_tor_execinfo>-node_id
ASSIGNING FIELD-SYMBOL(<ls_tor_execinfo_before>).
IF ( sy-subrc = 0 AND <ls_tor_execinfo_before> <> <ls_tor_execinfo> ) OR sy-subrc <> 0 ##BOOL_OK.
zcl_gtt_sts_actual_event=>gv_event_count += 1.
zcl_gtt_sts_tor_actual_event->extract_event(
EXPORTING
is_execinfo = <ls_tor_execinfo>
iv_evt_cnt = zcl_gtt_sts_actual_event=>gv_event_count
is_event = <ls_event>
is_trackingheader = ls_trackingheader
it_all_appl_tables = it_all_appl_tables
iv_event_code = iv_event_code
CHANGING
ct_trackingheader = ct_trackingheader
ct_tracklocation = ct_tracklocation
ct_trackparameters = ct_trackparameters
ct_eventid_map = ct_eventid_map ).
ENDIF.
ENDLOOP.
ENDLOOP.
ENDMETHOD.
METHOD add_additional_match_key.
IF iv_execution_info_source = /scmtms/if_tor_const=>sc_tor_event_source-prop_predecessor.
INSERT VALUE #( evtcnt = iv_evtcnt
param_name = zif_gtt_sts_ef_constants=>cs_parameter-additional_match_key
param_value = 'TMFU' ) INTO TABLE ct_trackparameters.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
38,
15751,
62,
2257,
50,
62,
10659,
25620,
62,
20114,
3525,
6770,
198,
220,
1171,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
20314,
1168,
5064,
62,
38,
15751,
62,
2257,
50,
62,
10659,
25620,
62,
20114,
3525,
764,
628,
220,
1398,
12,
24396,
82,
17151,
62,
32961,
62,
10659,
25620,
62,
20114,
3525,
62,
31631,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
20114,
3525,
2099,
7579,
55,
1921,
62,
20114,
51,
62,
4177,
6242,
62,
15543,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
13252,
62,
10659,
25620,
62,
20114,
3525,
8,
2099,
1006,
284,
1168,
5064,
62,
38,
15751,
62,
2257,
50,
62,
10659,
25620,
62,
20114,
3525,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
327,
55,
62,
8322,
44,
62,
44,
1546,
4090,
8264,
764,
198,
220,
5050,
17151,
62,
2257,
3185,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
7036,
62,
2969,
6489,
62,
5603,
9148,
1546,
2099,
7579,
55,
1921,
62,
5603,
2749,
1340,
30339,
1137,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
14181,
62,
2257,
3185,
8,
2099,
1220,
6173,
13752,
5653,
14,
51,
62,
3620,
62,
8202,
62,
32961,
62,
2257,
3185,
764,
198,
220,
5050,
17151,
62,
33177,
32,
62,
2257,
3185,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
7036,
62,
2969,
6489,
62,
5603,
9148,
1546,
2099,
7579,
55,
1921,
62,
5603,
2749,
1340,
30339,
1137,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
14181,
62,
2257,
3185,
8,
2099,
1220,
6173,
13752,
5653,
14,
51,
62,
3620,
62,
8202,
62,
32961,
62,
2257,
3185,
764,
198,
220,
5050,
17151,
62,
33177,
32,
62,
13252,
2394,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
7036,
62,
2969,
6489,
62,
5603,
9148,
1546,
2099,
7579,
55,
1921,
62,
5603,
2749,
1340,
30339,
1137,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
14181,
62,
13252,
2394,
8,
2099,
1220,
6173,
13752,
5653,
14,
51,
62,
3620,
62,
8202,
62,
32961,
62,
13252,
2394,
764,
198,
220,
5050,
17151,
62,
6369,
2943,
35354,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
7036,
62,
2969,
6489,
62,
5603,
9148,
1546,
2099,
7579,
55,
1921,
62,
5603,
2749,
1340,
30339,
1137,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
15173,
2099,
9564,
2969,
62,
8202,
3535,
4277,
9564,
2969,
62,
37,
23719,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
1988,
7,
2767,
62,
6369,
2943,
35354,
8,
2099,
1220,
6173,
13752,
5653,
14,
51,
62,
3620,
62,
8202,
62,
32961,
62,
6369,
2943,
10778,
764,
198,
220,
5050,
7788,
5446,
10659,
62,
35353,
27130,
62,
20114,
3525,
62,
26947,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
6369,
2943,
10778,
2099,
1220,
6173,
13752,
5653,
14,
50,
62,
3620,
62,
8202,
62,
32961,
62,
6369,
2943,
10778,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
20114,
51,
62,
34,
11251,
2099,
1220,
50,
2969,
5446,
55,
14,
20114,
4825,
11251,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
20114,
3525,
2389,
2099,
1220,
50,
2969,
5446,
55,
14,
20114,
4825,
11251,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
5446,
8120,
2751,
37682,
1137,
2099,
1220,
50,
2969,
5446,
55,
14,
33,
17614,
62,
36,
15996,
62,
37682,
1137,
198,
220,
220,
220,
5609,
198,
220,
220,
220,
220,
220,
5145,
7902,
62,
5446,
8120,
2751,
37682,
1137,
2099,
1220,
50,
2969,
5446,
55,
14,
33,
17614,
62,
36,
15996,
62,
37682,
1137,
198,
220,
220,
220,
220,
220,
5145,
7902,
62,
5446,
8120,
29701,
6234,
2099,
1220,
50,
2969,
5446,
55,
14,
33,
17614,
62,
36,
15996,
62,
29701,
6234,
2389,
198,
220,
220,
220,
220,
220,
5145,
4177,
62,
5446,
8120,
27082,
2390,
2767,
4877,
2099,
1168,
5064,
62,
38,
15751,
62,
2257,
50,
62,
10659,
25620,
62,
20114,
3525,
93,
15751,
62,
5446,
8120,
27082,
2390,
2767,
4877,
198,
220,
220,
220,
220,
220,
5145,
4177,
62,
20114,
3525,
2389,
62,
33767,
2099,
7579,
55,
1921,
62,
20114,
51,
2389,
62,
20114,
4825,
11251,
62,
33767,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
327,
55,
62,
8322,
44,
62,
44,
1546,
4090,
8264,
764,
198,
220,
5050,
367,
6981,
2538,
62,
35,
3698,
4792,
62,
20114,
3525,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
32961,
62,
13252,
2394,
2099,
1220,
6173,
13752,
5653,
14,
50,
62,
3620,
62,
8202,
62,
32961,
62,
13252,
2394,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
6369,
2943,
10778,
2099,
1220,
6173,
13752,
5653,
14,
50,
62,
3620,
62,
8202,
62,
32961,
62,
6369,
2943,
10778,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
20114,
51,
62,
34,
11251,
2099,
1220,
50,
2969,
5446,
55,
14,
20114,
4825,
11251,
198,
220,
220,
220,
5609,
198,
220,
220,
220,
220,
220,
5145,
7902,
62,
5446,
8120,
29701,
6234,
2099,
1220,
50,
2969,
5446,
55,
14,
33,
17614,
62,
36,
15996,
62,
29701,
6234,
2389,
198,
220,
220,
220,
220,
220,
5145,
4177,
62,
5446,
8120,
27082,
2390,
2767,
4877,
2099,
1168,
5064,
62,
38,
15751,
62,
2257,
50,
62,
10659,
25620,
62,
20114,
3525,
93,
15751,
62,
5446,
8120,
27082,
2390,
2767,
4877,
764,
198,
24326,
2665,
13,
628,
220,
1398,
12,
7890,
402,
53,
62,
20114,
3525,
62,
34,
28270,
2099,
1220,
50,
2969,
5446,
55,
14,
20114,
4825,
11251,
764,
628,
220,
5050,
17151,
62,
33365,
3698,
62,
20114,
3525,
62,
2389,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
2257,
6981,
9795,
62,
20114,
3525,
62,
2389,
2099,
1220,
50,
2969,
5446,
55,
14,
20114,
62,
20114,
51,
2389,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
53,
62,
33365,
3698,
62,
20114,
3525,
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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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
] |
"! <h1>API for Deleting a Travel</h1>
"!
"! <p>
"! Function module to delete a single Travel instance.
"! It will also delete all related subnodes of Booking and Booking Supplement.
"! </p>
"!
"! @parameter iv_travel_id | ID of the Travel to be deleted
"! @parameter et_messages | Table of occurred messages
"!
FUNCTION /DMO/FLIGHT_TRAVEL_DELETE03.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IV_TRAVEL_ID) TYPE /DMO/TRAVEL_ID03
*" EXPORTING
*" REFERENCE(ET_MESSAGES) TYPE /DMO/IF_FLIGHT_LEGACY03=>TT_MESSAGE
*"----------------------------------------------------------------------
CLEAR et_messages.
/dmo/cl_flight_legacy03=>get_instance( )->delete_travel( EXPORTING iv_travel_id = iv_travel_id
IMPORTING et_messages = DATA(lt_messages) ).
/dmo/cl_flight_legacy03=>get_instance( )->convert_messages( EXPORTING it_messages = lt_messages
IMPORTING et_messages = et_messages ).
ENDFUNCTION.
| [
40484,
1279,
71,
16,
29,
17614,
329,
42226,
889,
257,
13524,
3556,
71,
16,
29,
198,
40484,
198,
40484,
1279,
79,
29,
198,
40484,
15553,
8265,
284,
12233,
257,
2060,
13524,
4554,
13,
198,
40484,
632,
481,
635,
12233,
477,
3519,
850,
77,
4147,
286,
4897,
278,
290,
4897,
278,
23150,
13,
198,
40484,
7359,
79,
29,
198,
40484,
198,
40484,
2488,
17143,
2357,
21628,
62,
35927,
62,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
4522,
286,
262,
13524,
284,
307,
13140,
198,
40484,
2488,
17143,
2357,
2123,
62,
37348,
1095,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
8655,
286,
5091,
6218,
198,
40484,
198,
42296,
4177,
2849,
1220,
35,
11770,
14,
3697,
9947,
62,
51,
3861,
18697,
62,
7206,
2538,
9328,
3070,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
3824,
62,
51,
3861,
18697,
62,
2389,
8,
41876,
220,
1220,
35,
11770,
14,
51,
3861,
18697,
62,
2389,
3070,
198,
9,
1,
220,
7788,
15490,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
2767,
62,
44,
1546,
4090,
48075,
8,
41876,
220,
1220,
35,
11770,
14,
5064,
62,
3697,
9947,
62,
2538,
38,
43300,
3070,
14804,
15751,
62,
44,
1546,
4090,
8264,
198,
9,
1,
10097,
23031,
198,
220,
30301,
1503,
2123,
62,
37348,
1095,
13,
628,
220,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
3070,
14804,
1136,
62,
39098,
7,
1267,
3784,
33678,
62,
35927,
7,
7788,
15490,
2751,
21628,
62,
35927,
62,
312,
796,
21628,
62,
35927,
62,
312,
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,
220,
220,
30023,
9863,
2751,
2123,
62,
37348,
1095,
220,
796,
42865,
7,
2528,
62,
37348,
1095,
8,
6739,
628,
220,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
3070,
14804,
1136,
62,
39098,
7,
1267,
3784,
1102,
1851,
62,
37348,
1095,
7,
7788,
15490,
2751,
340,
62,
37348,
1095,
796,
300,
83,
62,
37348,
1095,
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,
220,
220,
220,
220,
220,
30023,
9863,
2751,
2123,
62,
37348,
1095,
796,
2123,
62,
37348,
1095,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_MDG_BP_HELPER_ACTIVE definition
public
inheriting from ZCL_MDG_BP_HELPER
final
create private .
public section.
class-methods GET_INSTANCE
importing
!IV_BP_ID type BU_PARTNER
returning
value(RO_BP_DATA) type ref to ZCL_MDG_BP_HELPER
exceptions
INSTANCE_CREATION_FAILED
ENTITY_DATA_ALL_READ_ERROR
APP_CONTEXT_GET_FAILED
APPCONTEXT_ATTRIBUTE_GET_ERROR
UNEXPECTED_ERROR
MODEL_GET_FAILED .
class-methods DESTRUCT_INSTANCE
importing
!IV_BP_ID type BU_PARTNER .
class-methods DESTRUCT_INSTANCES .
protected section.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_s_instance,
bp TYPE bu_partner,
instance TYPE REF TO zcl_mdg_bp_helper,
END OF ty_s_instance .
TYPES:
ty_t_instance TYPE SORTED TABLE OF ty_s_instance WITH UNIQUE KEY bp .
DATA gt_all_changed_detail TYPE usmd_th_change_document_change . ##NEEDED
DATA gt_all_changed_value TYPE usmd_ts_change_document_value . ##NEEDED
DATA gt_change_documents TYPE zif_mdg_datatypes=>gty_t_change_document . ##NEEDED
CLASS-DATA gt_instances TYPE ty_t_instance .
METHODS constructor
IMPORTING
!iv_bp_id TYPE bu_partner
EXCEPTIONS
entity_data_all_read_error
app_context_get_failed
appcontext_attribute_get_error
model_get_failed
discard_instance
unexpected_error .
METHODS read_data_from_bp
IMPORTING
!iv_bp_id TYPE bu_partner .
ENDCLASS.
CLASS ZCL_MDG_BP_HELPER_ACTIVE IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
IF iv_bp_id IS NOT INITIAL.
CALL METHOD read_data_from_bp
EXPORTING
iv_bp_id = iv_bp_id.
IF sy-subrc <> 0. ##SUBRC_OK
CASE sy-subrc.
WHEN 1.
RAISE entity_data_all_read_error.
WHEN 2.
RAISE app_context_get_failed.
WHEN 3.
RAISE appcontext_attribute_get_error.
WHEN 4.
RAISE model_get_failed.
WHEN 5.
RAISE discard_instance.
WHEN OTHERS.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_gen TYPE 'X' NUMBER 000 RAISING unexpected_error.
ENDCASE.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD destruct_instance.
DELETE gt_instances WHERE bp EQ iv_bp_id.
ENDMETHOD.
METHOD destruct_instances.
CLEAR gt_instances.
ENDMETHOD.
METHOD get_instance.
DATA:
ls_instance TYPE ty_s_instance,
lv_bp_id TYPE bu_partner.
FIELD-SYMBOLS:
<ls_instance> TYPE ty_s_instance.
IF NOT iv_bp_id(1) = '$'.
lv_bp_id = iv_bp_id.
ENDIF.
READ TABLE gt_instances ASSIGNING <ls_instance> WITH TABLE KEY bp = iv_bp_id.
IF sy-subrc = 0 AND <ls_instance>-instance IS NOT INITIAL.
ro_bp_data = <ls_instance>-instance.
ELSE.
* ls_instance-bp = iv_bp_id.
ls_instance-bp = lv_bp_id.
CREATE OBJECT ls_instance-instance TYPE zcl_mdg_bp_helper_active
EXPORTING
* iv_bp_id = iv_bp_id
iv_bp_id = lv_bp_id
EXCEPTIONS
entity_data_all_read_error = 1
app_context_get_failed = 2
appcontext_attribute_get_error = 3
model_get_failed = 4
discard_instance = 5
unexpected_error = 6
OTHERS = 7.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 1.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_bp TYPE 'X' NUMBER 001 RAISING entity_data_all_read_error.
WHEN 2.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_br_bp TYPE 'X' NUMBER 004 RAISING app_context_get_failed.
WHEN 3.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_br_bp TYPE 'X' NUMBER 004 RAISING app_context_get_failed .
WHEN 4.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_gen TYPE 'X' NUMBER 001 RAISING model_get_failed.
WHEN 5.
CALL METHOD destruct_instance
EXPORTING
iv_bp_id = iv_bp_id.
RETURN.
WHEN 6.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_gen TYPE 'X' NUMBER 000 RAISING unexpected_error.
WHEN OTHERS.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_gen TYPE 'X' NUMBER 000 RAISING unexpected_error.
ENDCASE.
ENDIF.
INSERT ls_instance INTO TABLE gt_instances.
ro_bp_data = ls_instance-instance.
ENDIF.
IF ro_bp_data IS NOT BOUND.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_gen TYPE 'X' NUMBER 002 RAISING instance_creation_failed.
ENDIF.
ENDMETHOD.
METHOD READ_DATA_FROM_BP.
CONSTANTS:
lc_prefix TYPE string VALUE 'GT_',
lc_suffix_text TYPE string VALUE '_TXT'.
DATA:
lt_data_entity_bp TYPE usmd_ts_data_entity,
lt_data_entity_bp_rel TYPE usmd_ts_data_entity,
lt_data_entity_bp_ad TYPE usmd_ts_data_entity,
lt_data_entity_all TYPE usmd_ts_data_entity,
lt_message TYPE usmd_t_message,
lv_entity_tabname TYPE seocpdname,
lt_bp_selection TYPE usmd_ts_sel,
ls_bp_selection TYPE usmd_s_sel,
lt_ad_selection TYPE usmd_ts_sel,
ls_ad_selection TYPE usmd_s_sel,
lt_bp_rel_sel TYPE usmd_ts_sel,
ls_bp_rel_sel TYPE usmd_s_sel,
lr_entity TYPE REF TO data,
lv_active TYPE abap_bool.
FIELD-SYMBOLS:
<ls_bp_entity_rel_data> TYPE usmd_sx_data_entity,
<lt_bp_rel_data> TYPE ANY TABLE,
<ls_bp_rel_data> TYPE any,
<lv_partner2> TYPE any,
<ls_data> TYPE any,
<ls_data_entity> TYPE usmd_sx_data_entity,
<lt_mt_entity> TYPE SORTED TABLE,
<ls_entity> TYPE any,
<lt_data> TYPE ANY TABLE,
<lv_addrno> TYPE ad_addrnum.
IF iv_bp_id IS INITIAL.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_gen TYPE 'X' NUMBER 000.
ENDIF.
IF iv_bp_id CA '$'.
lv_active = abap_false.
ELSE.
lv_active = abap_true.
ENDIF.
IF sy-subrc = 0 AND iv_bp_id IS NOT INITIAL.
ls_bp_selection-fieldname = if_mdg_bp_constants=>gc_bp_model_entity-bp.
ls_bp_selection-sign = usmd0_cs_ra-sign_i.
ls_bp_selection-option = usmd0_cs_ra-option_eq.
ls_bp_selection-low = iv_bp_id .
INSERT ls_bp_selection INTO TABLE lt_bp_selection.
*********************
*special handling for BP_REL and corresponding contact persons
** build selection parameters to read relevant relations
ls_bp_rel_sel-sign = usmd0_cs_ra-sign_i.
ls_bp_rel_sel-option = usmd0_cs_ra-option_eq.
ls_bp_rel_sel-fieldname = ZCL_MDG_BP_HELPER=>if_mdg_bp_constants~gc_field-partner1.
ls_bp_rel_sel-low = iv_bp_id .
INSERT ls_bp_rel_sel INTO TABLE lt_bp_rel_sel.
ENDIF.
IF lt_bp_rel_sel IS NOT INITIAL.
CALL METHOD go_model->read_entity_data_all
EXPORTING
i_fieldname = ZCL_MDG_BP_HELPER=>if_mdg_bp_constants~gc_field-bp_rel
it_sel = lt_bp_rel_sel
if_active = lv_active
IMPORTING
et_message = lt_message
et_data_entity = lt_data_entity_bp_rel.
IF lt_message IS NOT INITIAL.
RETURN.
ENDIF.
ENDIF.
* also fill contact person into selection of BPs that need to be read
LOOP AT lt_data_entity_bp_rel ASSIGNING <ls_bp_entity_rel_data>
WHERE usmd_entity = ZCL_MDG_BP_HELPER=>if_mdg_bp_constants~gc_bp_model_entity-relation
AND usmd_entity_cont IS INITIAL.
UNASSIGN: <lt_bp_rel_data>, <ls_bp_rel_data>, <lv_partner2>.
CLEAR ls_bp_selection-low.
ASSIGN <ls_bp_entity_rel_data>-r_t_data->* TO <lt_bp_rel_data>.
LOOP AT <lt_bp_rel_data> ASSIGNING <ls_bp_rel_data>. "#EC CI_NESTED
ASSIGN COMPONENT ZCL_MDG_BP_HELPER=>if_mdg_bp_constants~gc_field-partner2 OF STRUCTURE <ls_bp_rel_data> TO <lv_partner2>.
IF <lv_partner2> IS ASSIGNED AND <lv_partner2> IS NOT INITIAL.
ls_bp_selection-low = <lv_partner2>.
INSERT ls_bp_selection INTO TABLE lt_bp_selection.
ENDIF.
ENDLOOP.
ENDLOOP.
IF lt_bp_selection IS NOT INITIAL.
* Look for entity in active data, if an existent business partner is changed (business activity = BPP2)
* This call triggers the derivations BAdI
CALL METHOD go_model->read_entity_data_all
EXPORTING
i_fieldname = ZCL_MDG_BP_HELPER=>if_mdg_bp_constants~gc_field-bp_header
it_sel = lt_bp_selection
if_active = lv_active
IMPORTING
et_message = lt_message
et_data_entity = lt_data_entity_bp.
IF lt_message IS NOT INITIAL.
RETURN.
ENDIF.
ENDIF.
* Get all address numbers
LOOP AT lt_data_entity_bp ASSIGNING <ls_data_entity> WHERE usmd_entity_cont EQ ZCL_MDG_BP_HELPER=>if_mdg_bp_constants~gc_bp_model_entity-address. "#EC CI_SORTSEQ
CLEAR ls_ad_selection.
ls_ad_selection-sign = usmd0_cs_ra-sign_i.
ls_ad_selection-option = usmd0_cs_ra-option_eq.
ls_ad_selection-fieldname = ZCL_MDG_BP_HELPER=>if_mdg_bp_constants~gc_bp_model_entity-address_number.
ASSIGN <ls_data_entity>-r_t_data->* TO <lt_data>.
CHECK sy-subrc IS INITIAL.
LOOP AT <lt_data> ASSIGNING <ls_data>. "#EC CI_NESTED
ASSIGN COMPONENT if_mdg_bp_constants~gc_bp_model_entity-address_number OF STRUCTURE <ls_data> TO <lv_addrno>.
CHECK sy-subrc IS INITIAL.
ls_ad_selection-low = <lv_addrno>.
INSERT ls_ad_selection INTO TABLE lt_ad_selection.
ENDLOOP.
ENDLOOP.
IF lt_ad_selection IS NOT INITIAL.
CALL METHOD go_model->read_entity_data_all
EXPORTING
i_fieldname = 'ADDRNO'
it_sel = lt_ad_selection
if_active = lv_active
IMPORTING
et_message = lt_message
et_data_entity = lt_data_entity_bp_ad.
IF lt_message IS NOT INITIAL.
RETURN.
ENDIF.
ENDIF.
INSERT LINES OF lt_data_entity_bp INTO TABLE lt_data_entity_all.
INSERT LINES OF lt_data_entity_bp_rel INTO TABLE lt_data_entity_all.
INSERT LINES OF lt_data_entity_bp_ad INTO TABLE lt_data_entity_all.
* Transform untyped to typed data
LOOP AT lt_data_entity_all ASSIGNING <ls_data_entity>.
CLEAR: lv_entity_tabname, lr_entity.
UNASSIGN: <ls_entity>, <lt_mt_entity>.
* Construct export table name and assign it to field symbol (it's used to fill the related mt)
CASE <ls_data_entity>-struct.
WHEN if_usmd_model_ext=>gc_struct_key_attr.
IF <ls_data_entity>-usmd_entity_cont IS INITIAL.
CONCATENATE lc_prefix <ls_data_entity>-usmd_entity INTO lv_entity_tabname.
ELSE.
CONCATENATE lc_prefix <ls_data_entity>-usmd_entity_cont INTO lv_entity_tabname.
ENDIF.
WHEN if_usmd_model_ext=>gc_struct_key_txt_langu.
IF <ls_data_entity>-usmd_entity_cont IS INITIAL.
CONCATENATE lc_prefix <ls_data_entity>-usmd_entity lc_suffix_text INTO lv_entity_tabname.
ELSE.
CONCATENATE lc_prefix <ls_data_entity>-usmd_entity_cont lc_suffix_text INTO lv_entity_tabname.
ENDIF.
ENDCASE.
* write data to gt
ASSIGN (lv_entity_tabname) TO <lt_mt_entity>. "#EC CI_SUBRC
IF <lt_mt_entity> IS NOT ASSIGNED.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_gen TYPE 'X' NUMBER 000.
ENDIF.
CREATE DATA lr_entity LIKE LINE OF <lt_mt_entity>.
ASSIGN lr_entity->* TO <ls_entity>.
IF <ls_entity> IS NOT ASSIGNED.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_gen TYPE 'X' NUMBER 000.
ENDIF.
CLEAR: <ls_entity>, <lt_mt_entity>.
ASSIGN <ls_data_entity>-r_t_data->* TO <lt_data>.
IF sy-subrc <> 0.
MESSAGE ID zcl_mdg_general_functions=>gc_msg_class_dm_gen TYPE 'X' NUMBER 000.
ENDIF.
IF <lt_data> IS ASSIGNED.
MOVE-CORRESPONDING <lt_data> TO <lt_mt_entity>.
ENDIF.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
12740,
38,
62,
20866,
62,
39,
3698,
18973,
62,
10659,
9306,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
1168,
5097,
62,
12740,
38,
62,
20866,
62,
39,
3698,
18973,
198,
220,
2457,
198,
220,
2251,
2839,
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,
3824,
62,
20866,
62,
2389,
2099,
20571,
62,
30709,
21479,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
13252,
62,
20866,
62,
26947,
8,
2099,
1006,
284,
1168,
5097,
62,
12740,
38,
62,
20866,
62,
39,
3698,
18973,
198,
220,
220,
220,
13269,
198,
220,
220,
220,
220,
220,
40589,
19240,
62,
43387,
6234,
62,
7708,
4146,
1961,
198,
220,
220,
220,
220,
220,
47353,
9050,
62,
26947,
62,
7036,
62,
15675,
62,
24908,
198,
220,
220,
220,
220,
220,
43504,
62,
10943,
32541,
62,
18851,
62,
7708,
4146,
1961,
198,
220,
220,
220,
220,
220,
3486,
5662,
1340,
32541,
62,
1404,
5446,
9865,
37780,
62,
18851,
62,
24908,
198,
220,
220,
220,
220,
220,
4725,
49864,
9782,
1961,
62,
24908,
198,
220,
220,
220,
220,
220,
19164,
3698,
62,
18851,
62,
7708,
4146,
1961,
764,
198,
220,
1398,
12,
24396,
82,
22196,
5446,
18415,
62,
38604,
19240,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
20866,
62,
2389,
2099,
20571,
62,
30709,
21479,
764,
198,
220,
1398,
12,
24396,
82,
22196,
5446,
18415,
62,
38604,
20940,
1546,
764,
198,
24326,
2665,
13,
198,
4805,
3824,
6158,
44513,
13,
628,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
347,
43312,
3963,
1259,
62,
82,
62,
39098,
11,
198,
220,
220,
220,
220,
220,
275,
79,
220,
220,
220,
220,
220,
220,
41876,
809,
62,
3911,
1008,
11,
198,
220,
220,
220,
220,
220,
4554,
41876,
4526,
37,
5390,
1976,
565,
62,
9132,
70,
62,
46583,
62,
2978,
525,
11,
198,
220,
220,
220,
23578,
3963,
1259,
62,
82,
62,
39098,
764,
198,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
1259,
62,
83,
62,
39098,
41876,
311,
9863,
1961,
43679,
3963,
1259,
62,
82,
62,
39098,
13315,
4725,
33866,
8924,
35374,
275,
79,
764,
628,
220,
42865,
308,
83,
62,
439,
62,
40985,
62,
49170,
41876,
514,
9132,
62,
400,
62,
3803,
62,
22897,
62,
3803,
764,
22492,
12161,
1961,
1961,
198,
220,
42865,
308,
83,
62,
439,
62,
40985,
62,
8367,
41876,
514,
9132,
62,
912,
62,
3803,
62,
22897,
62,
8367,
764,
22492,
12161,
1961,
1961,
198,
220,
42865,
308,
83,
62,
3803,
62,
15390,
2886,
41876,
1976,
361,
62,
9132,
70,
62,
19608,
265,
9497,
14804,
70,
774,
62,
83,
62,
3803,
62,
22897,
764,
22492,
12161,
1961,
1961,
198,
220,
42715,
12,
26947,
308,
83,
62,
8625,
1817,
41876,
1259,
62,
83,
62,
39098,
764,
628,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
46583,
62,
312,
41876,
809,
62,
3911,
1008,
198,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
9312,
62,
7890,
62,
439,
62,
961,
62,
18224,
198,
220,
220,
220,
220,
220,
598,
62,
22866,
62,
1136,
62,
47904,
198,
220,
220,
220,
220,
220,
598,
22866,
62,
42348,
62,
1136,
62,
18224,
198,
220,
220,
220,
220,
220,
2746,
62,
1136,
62,
47904,
198,
220,
220,
220,
220,
220,
27537,
62,
39098,
198,
220,
220,
220,
220,
220,
10059,
62,
18224,
764,
198,
220,
337,
36252,
50,
1100,
62,
7890,
62,
6738,
62,
46583,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
46583,
62,
312,
41876,
809,
62,
3911,
1008,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
12740,
38,
62,
20866,
62,
39,
3698,
18973,
62,
10659,
9306,
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,
16876,
21628,
62,
46583,
62,
312,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
42815,
337,
36252,
1100,
62,
7890,
62,
6738,
62,
46583,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
46583,
62,
312,
796,
21628,
62,
46583,
62,
312,
13,
628,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
22492,
50,
10526,
7397,
62,
11380,
198,
220,
220,
220,
220,
220,
220,
220,
42001,
827,
12,
7266,
6015,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
352,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
24352,
9312,
62,
7890,
62,
439,
62,
961,
62,
18224,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
362,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
24352,
598,
62,
22866,
62,
1136,
62,
47904,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
513,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
24352,
598,
22866,
62,
42348,
62,
1136,
62,
18224,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
604,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
24352,
2746,
62,
1136,
62,
47904,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
642,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
24352,
27537,
62,
39098,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
440,
4221,
4877,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
4522,
1976,
565,
62,
9132,
70,
62,
24622,
62,
12543,
2733,
14804,
36484,
62,
19662,
62,
4871,
62,
36020,
62,
5235,
41876,
705,
55,
6,
36871,
13246,
12877,
17926,
1797,
2751,
10059,
62,
18224,
13,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
34,
11159,
13,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
FUNCTION-POOL zdbbr_output. "MESSAGE-ID ..
* INCLUDE LZDBBR_SELECTD... " Local class definition
TABLES: sscrfields.
DATA: gr_controller TYPE REF TO zif_uitb_screen_controller,
ok_code TYPE sy-ucomm.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" dynamic functions
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
DATA: userfunc01 TYPE smp_dyntxt,
userfunc02 TYPE smp_dyntxt,
userfunc03 TYPE smp_dyntxt.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" SELECTION SCREEN DEFINITIONS
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
| [
42296,
4177,
2849,
12,
16402,
3535,
1976,
9945,
1671,
62,
22915,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44,
1546,
4090,
8264,
12,
2389,
11485,
198,
198,
9,
3268,
5097,
52,
7206,
406,
57,
11012,
11473,
62,
46506,
35,
986,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10714,
1398,
6770,
198,
198,
5603,
9148,
1546,
25,
264,
1416,
81,
25747,
13,
198,
198,
26947,
25,
1036,
62,
36500,
41876,
4526,
37,
5390,
1976,
361,
62,
5013,
65,
62,
9612,
62,
36500,
11,
198,
220,
220,
220,
220,
220,
12876,
62,
8189,
220,
220,
220,
220,
220,
220,
41876,
827,
12,
84,
9503,
13,
198,
198,
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,
15931,
15931,
15931,
198,
1,
8925,
5499,
198,
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,
15931,
15931,
15931,
198,
26947,
25,
2836,
20786,
486,
41876,
895,
79,
62,
9892,
429,
742,
11,
198,
220,
220,
220,
220,
220,
2836,
20786,
2999,
41876,
895,
79,
62,
9892,
429,
742,
11,
198,
220,
220,
220,
220,
220,
2836,
20786,
3070,
41876,
895,
79,
62,
9892,
429,
742,
13,
198,
198,
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,
1,
33493,
2849,
6374,
2200,
1677,
5550,
20032,
2043,
11053,
198,
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,
37811,
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,
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TRXAS_TABCONTAINER
*" REFERENCE(I_APP_TYPE_CNTL_TABS) TYPE TRXAS_APPTYPE_TABS
*" REFERENCE(I_APP_OBJECTS) TYPE TRXAS_APPOBJ_CTABS
*" TABLES
*" E_EXPEVENTDATA STRUCTURE /SAPTRX/EXP_EVENTS
*" E_MEASRMNTDATA STRUCTURE /SAPTRX/MEASR_DATA OPTIONAL
*" E_INFODATA STRUCTURE /SAPTRX/INFO_DATA OPTIONAL
*" E_LOGTABLE STRUCTURE BAPIRET2 OPTIONAL
*" EXCEPTIONS
*" PARAMETER_ERROR
*" EXP_EVENT_DETERM_ERROR
*" TABLE_DETERMINATION_ERROR
*" STOP_PROCESSING
*"----------------------------------------------------------------------
DATA: lo_udm_message TYPE REF TO cx_udm_message,
ls_bapiret TYPE bapiret2.
CLEAR e_logtable[].
TRY.
zcl_gtt_mia_ef_performer=>get_planned_events(
EXPORTING
is_definition = VALUE #(
maintab = zif_gtt_mia_app_constants=>cs_tabledef-sh_header_new )
io_factory = NEW zcl_gtt_mia_tp_factory_shh( )
iv_appsys = i_appsys
is_app_obj_types = i_app_obj_types
it_all_appl_tables = i_all_appl_tables
it_app_type_cntl_tabs = i_app_type_cntl_tabs
it_app_objects = i_app_objects
CHANGING
ct_expeventdata = e_expeventdata[]
ct_measrmntdata = e_measrmntdata[]
ct_infodata = e_infodata[]
).
CATCH cx_udm_message INTO lo_udm_message.
zcl_gtt_mia_tools=>get_errors_log(
EXPORTING
io_umd_message = lo_udm_message
iv_appsys = i_appsys
IMPORTING
es_bapiret = ls_bapiret ).
" add error message
APPEND ls_bapiret TO e_logtable.
" throw corresponding exception
CASE lo_udm_message->textid.
WHEN zif_gtt_mia_ef_constants=>cs_errors-stop_processing.
RAISE stop_processing.
WHEN zif_gtt_mia_ef_constants=>cs_errors-table_determination.
RAISE table_determination_error.
ENDCASE.
ENDTRY.
ENDFUNCTION.
| [
42296,
4177,
2849,
1976,
70,
926,
62,
20730,
62,
1453,
62,
1477,
62,
71,
7109,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
2969,
3705,
16309,
8,
41876,
220,
1220,
50,
2969,
5446,
55,
14,
2969,
6489,
23060,
25361,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
24805,
62,
9864,
41,
62,
9936,
47,
1546,
8,
41876,
220,
1220,
50,
2969,
5446,
55,
14,
32,
2394,
48232,
1546,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
7036,
62,
2969,
6489,
62,
5603,
9148,
1546,
8,
41876,
220,
7579,
55,
1921,
62,
5603,
2749,
1340,
30339,
1137,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
24805,
62,
25216,
62,
34,
11251,
43,
62,
5603,
4462,
8,
41876,
220,
7579,
55,
1921,
62,
24805,
25216,
62,
5603,
4462,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
24805,
62,
9864,
41,
2943,
4694,
8,
41876,
220,
7579,
55,
1921,
62,
24805,
9864,
41,
62,
4177,
32,
4462,
198,
9,
1,
220,
309,
6242,
28378,
198,
9,
1,
220,
220,
220,
220,
220,
412,
62,
6369,
11401,
53,
3525,
26947,
19269,
18415,
11335,
220,
1220,
50,
2969,
5446,
55,
14,
49864,
62,
20114,
15365,
198,
9,
1,
220,
220,
220,
220,
220,
412,
62,
11682,
1921,
29138,
11251,
26947,
19269,
18415,
11335,
220,
1220,
50,
2969,
5446,
55,
14,
11682,
1921,
49,
62,
26947,
39852,
2849,
1847,
198,
9,
1,
220,
220,
220,
220,
220,
412,
62,
1268,
37,
3727,
13563,
19269,
18415,
11335,
220,
1220,
50,
2969,
5446,
55,
14,
10778,
62,
26947,
39852,
2849,
1847,
198,
9,
1,
220,
220,
220,
220,
220,
412,
62,
25294,
38148,
19269,
18415,
11335,
220,
347,
17614,
26087,
17,
39852,
2849,
1847,
198,
9,
1,
220,
7788,
42006,
11053,
198,
9,
1,
220,
220,
220,
220,
220,
29463,
2390,
2767,
1137,
62,
24908,
198,
9,
1,
220,
220,
220,
220,
220,
25703,
62,
20114,
3525,
62,
35,
2767,
1137,
44,
62,
24908,
198,
9,
1,
220,
220,
220,
220,
220,
43679,
62,
35,
2767,
1137,
23678,
6234,
62,
24908,
198,
9,
1,
220,
220,
220,
220,
220,
44934,
62,
4805,
4503,
7597,
2751,
198,
9,
1,
10097,
23031,
628,
220,
42865,
25,
2376,
62,
463,
76,
62,
20500,
41876,
4526,
37,
5390,
43213,
62,
463,
76,
62,
20500,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
65,
499,
557,
83,
220,
220,
220,
220,
41876,
275,
499,
557,
83,
17,
13,
628,
220,
30301,
1503,
304,
62,
6404,
11487,
58,
4083,
628,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
1976,
565,
62,
70,
926,
62,
20730,
62,
891,
62,
525,
16354,
14804,
1136,
62,
36800,
62,
31534,
7,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
46758,
220,
220,
220,
220,
220,
220,
220,
220,
796,
26173,
8924,
1303,
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,
220,
220,
220,
220,
220,
220,
1388,
8658,
220,
220,
796,
1976,
361,
62,
70,
926,
62,
20730,
62,
1324,
62,
9979,
1187,
14804,
6359,
62,
83,
4510,
891,
12,
1477,
62,
25677,
62,
3605,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
69,
9548,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
12682,
1976,
565,
62,
70,
926,
62,
20730,
62,
34788,
62,
69,
9548,
62,
1477,
71,
7,
1267,
198,
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,
1312,
62,
1324,
17597,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
1324,
62,
26801,
62,
19199,
220,
220,
220,
220,
220,
796,
1312,
62,
1324,
62,
26801,
62,
19199,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
62,
439,
62,
1324,
75,
62,
83,
2977,
220,
220,
220,
796,
1312,
62,
439,
62,
1324,
75,
62,
83,
2977,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
62,
1324,
62,
4906,
62,
66,
429,
75,
62,
8658,
82,
796,
1312,
62,
1324,
62,
4906,
62,
66,
429,
75,
62,
8658,
82,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
62,
1324,
62,
48205,
220,
220,
220,
220,
220,
220,
220,
796,
1312,
62,
1324,
62,
48205,
198,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
83,
62,
1069,
431,
1151,
7890,
220,
220,
220,
220,
220,
220,
796,
304,
62,
1069,
431,
1151,
7890,
21737,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
83,
62,
1326,
292,
26224,
429,
7890,
220,
220,
220,
220,
220,
220,
796,
304,
62,
1326,
292,
26224,
429,
7890,
21737,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
83,
62,
10745,
375,
1045,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
304,
62,
10745,
375,
1045,
21737,
198,
220,
220,
220,
220,
220,
6739,
198,
220,
220,
220,
327,
11417,
43213,
62,
463,
76,
62,
20500,
39319,
2376,
62,
463,
76,
62,
20500,
13,
198,
220,
220,
220,
220,
220,
1976,
565,
62,
70,
926,
62,
20730,
62,
31391,
14804,
1136,
62,
48277,
62,
6404,
7,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
388,
67,
62,
20500,
796,
2376,
62,
463,
76,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1324,
17597,
220,
220,
220,
220,
220,
796,
1312,
62,
1324,
17597,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1658
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
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.
PROTECTED SECTION.
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 .
TYPES:
tt_t100_texts TYPE STANDARD TABLE OF ty_t100_texts .
TYPES:
tty_t100 TYPE STANDARD TABLE OF t100
WITH NON-UNIQUE DEFAULT KEY .
METHODS serialize_texts
IMPORTING
!io_xml TYPE REF TO zcl_abapgit_xml_output
RAISING
zcx_abapgit_exception .
METHODS deserialize_texts
IMPORTING
!io_xml TYPE REF TO zcl_abapgit_xml_input
RAISING
zcx_abapgit_exception .
METHODS serialize_longtexts_msag
IMPORTING
!it_t100 TYPE zcl_abapgit_object_msag=>tty_t100
!io_xml TYPE REF TO zcl_abapgit_xml_output
RAISING
zcx_abapgit_exception .
METHODS delete_msgid
IMPORTING
!iv_message_id TYPE arbgb .
METHODS free_access_permission
IMPORTING
!iv_message_id TYPE arbgb .
METHODS delete_documentation
IMPORTING
!iv_message_id TYPE arbgb .
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_MSAG IMPLEMENTATION.
METHOD delete_documentation.
DATA: lv_key_s TYPE dokhl-object.
CLEAR lv_key_s.
CALL FUNCTION 'DOCU_OBJECT_NAME_CONCATENATE'
EXPORTING
docu_id = 'NA'
element = iv_message_id
addition = ' '
IMPORTING
object = lv_key_s
EXCEPTIONS
OTHERS = 0.
CALL FUNCTION 'DOKU_DELETE_ALL'
EXPORTING
doku_id = 'NA'
doku_object = lv_key_s
generic_use = 'X'
suppress_authority = space
suppress_enqueue = space
suppress_transport = space
EXCEPTIONS
header_without_text = 01
index_without_header = 02
no_authority_for_devclass_xxxx = 03
no_docu_found = 04
object_is_already_enqueued = 05
object_is_enqueued_by_corr = 06
user_break = 07.
ENDMETHOD.
METHOD delete_msgid.
delete_documentation( iv_message_id ).
DELETE FROM t100a WHERE arbgb = iv_message_id.
IF sy-subrc = 0 OR sy-subrc = 4.
CALL FUNCTION 'RS_TREE_OBJECT_PLACEMENT'
EXPORTING
object = iv_message_id
operation = 'DELETE'
program = space
type = 'CN'.
DELETE FROM t100o WHERE arbgb = iv_message_id.
DELETE FROM t100t WHERE arbgb = iv_message_id. "#EC CI_NOFIRST
DELETE FROM t100u WHERE arbgb = iv_message_id.
DELETE FROM t100x WHERE arbgb = iv_message_id.
DELETE FROM t100 WHERE arbgb = iv_message_id.
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.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'MSAG: Table T100 modify failed' ).
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD free_access_permission.
CALL FUNCTION 'RS_ACCESS_PERMISSION'
EXPORTING
mode = 'FREE'
object = iv_message_id
object_class = 'T100'.
ENDMETHOD.
METHOD serialize_longtexts_msag.
DATA: lv_object TYPE dokhl-object,
lt_objects TYPE STANDARD TABLE OF dokhl-object
WITH NON-UNIQUE DEFAULT KEY,
lt_dokil TYPE zif_abapgit_definitions=>tty_dokil.
FIELD-SYMBOLS: <ls_t100> TYPE t100.
IF lines( it_t100 ) = 0.
RETURN.
ENDIF.
LOOP AT it_t100 ASSIGNING <ls_t100>.
lv_object = <ls_t100>-arbgb && <ls_t100>-msgnr.
INSERT lv_object INTO TABLE lt_objects.
ENDLOOP.
SELECT * FROM dokil
INTO TABLE lt_dokil
FOR ALL ENTRIES IN lt_objects
WHERE id = 'NA'
AND object = lt_objects-table_line.
IF lines( lt_dokil ) > 0.
serialize_longtexts( io_xml = io_xml
it_dokil = lt_dokil ).
ENDIF.
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 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~compare_to_remote_version.
CREATE OBJECT ro_comparison_result TYPE zcl_abapgit_comparison_null.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_t100a TYPE t100a,
lv_frozen TYPE abap_bool,
lv_message_id TYPE arbgb,
lv_access_granted TYPE abap_bool.
* parameter SUPPRESS_DIALOG doesnt exist in all versions of FM RS_DELETE_MESSAGE_ID
* replaced with a copy
lv_message_id = ms_item-obj_name.
IF ms_item-obj_name EQ space.
zcx_abapgit_exception=>raise( 'Error from (copy of) RS_DELETE_MESSAGE_ID' )."blank message id
ENDIF.
SELECT SINGLE * FROM t100a INTO lv_t100a WHERE arbgb = ms_item-obj_name.
IF sy-subrc NE 0.
zcx_abapgit_exception=>raise( 'Error from (copy of) RS_DELETE_MESSAGE_ID' )."not found
ENDIF.
CLEAR lv_frozen.
CALL FUNCTION 'RS_ACCESS_PERMISSION'
EXPORTING
authority_check = 'X'
global_lock = 'X'
mode = 'MODIFY'
object = lv_message_id
object_class = 'T100'
IMPORTING
frozen = lv_frozen
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0 OR lv_frozen NE space.
zcx_abapgit_exception=>raise( 'Error from (copy of) RS_DELETE_MESSAGE_ID' )."can't access
ENDIF.
lv_access_granted = abap_true.
CALL FUNCTION 'RS_CORR_INSERT'
EXPORTING
global_lock = 'X'
object = lv_message_id
object_class = 'MSAG'
mode = 'D'
EXCEPTIONS
cancelled = 01
permission_failure = 02.
IF sy-subrc NE 0.
IF lv_access_granted = abap_true.
free_access_permission( lv_message_id ).
ENDIF.
zcx_abapgit_exception=>raise( 'Error from (copy of) RS_DELETE_MESSAGE_ID' )."can't access
ENDIF.
delete_msgid( lv_message_id ).
IF lv_access_granted = abap_true.
free_access_permission( lv_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>.
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.
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.
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.
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_longtexts( io_xml ).
deserialize_texts( io_xml ).
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~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD.
METHOD zif_abapgit_object~has_changed_since.
rv_changed = abap_true.
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 = |{ ms_item-obj_name }|.
OVERLAY lv_argument WITH ' '.
lv_argument = lv_argument && '*'.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = |ES_MSGSI|
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 = 'MSAG'
in_new_window = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lv_msg_id TYPE rglif-message_id,
ls_inf TYPE t100a,
lt_source TYPE tty_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_longtexts_msag( it_t100 = lt_source
io_xml = io_xml ).
serialize_texts( io_xml ).
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,
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,
83,
3064,
62,
5239,
82,
11,
198,
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,
13845,
4593,
81,
41876,
256,
3064,
12,
907,
4593,
81,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2420,
220,
41876,
256,
3064,
12,
5239,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
83,
3064,
62,
5239,
82,
764,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
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,
764,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
256,
774,
62,
83,
3064,
220,
220,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
256,
3064,
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,
13315,
44521,
12,
4944,
33866,
8924,
5550,
38865,
35374,
764,
628,
220,
220,
220,
337,
36252,
50,
11389,
1096,
62,
5239,
82,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
19875,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
19875,
62,
22915,
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,
748,
48499,
1096,
62,
5239,
82,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
19875,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
19875,
62,
15414,
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,
11389,
1096,
62,
6511,
5239,
82,
62,
907,
363,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
83,
3064,
41876,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
907,
363,
14804,
42852,
62,
83,
3064,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
19875,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
19875,
62,
22915,
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,
12233,
62,
19662,
312,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
20500,
62,
312,
41876,
610,
65,
22296,
764,
198,
220,
220,
220,
337,
36252,
50,
1479,
62,
15526,
62,
525,
3411,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
20500,
62,
312,
41876,
610,
65,
22296,
764,
198,
220,
220,
220,
337,
36252,
50,
12233,
62,
22897,
341,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
20500,
62,
312,
41876,
610,
65,
22296,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
23680,
62,
44,
4090,
38,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
12233,
62,
22897,
341,
13,
198,
220,
220,
220,
42865,
25,
300,
85,
62,
2539,
62,
82,
41876,
466,
14636,
75,
12,
15252,
13,
628,
220,
220,
220,
30301,
1503,
300,
85,
62,
2539,
62,
82,
13,
198,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
38715,
52,
62,
9864,
23680,
62,
20608,
62,
10943,
34,
1404,
1677,
6158,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2205,
84,
62,
312,
220,
796,
705,
4535,
6,
198,
220,
220,
220,
220,
220,
220,
220,
5002,
220,
796,
21628,
62,
20500,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
3090,
796,
705,
220,
220,
705,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
220,
220,
796,
300,
85,
62,
2539,
62,
82,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
796,
657,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
35,
11380,
52,
62,
7206,
2538,
9328,
62,
7036,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
466,
23063,
62,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
4535,
6,
198,
220,
220,
220,
220,
220,
220,
220,
466,
23063,
62,
15252,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
2539,
62,
82,
198,
220,
220,
220,
220,
220,
220,
220,
14276,
62,
1904,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
55,
6,
198,
220,
220,
220,
220,
220,
220,
220,
18175,
62,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,
1,
1,
1,
1,
1,
1
] |
CLASS zcx_trs_no_key DEFINITION
PUBLIC
FINAL
CREATE PUBLIC
INHERITING FROM cx_static_check.
PUBLIC SECTION.
INTERFACES if_t100_message .
METHODS constructor
IMPORTING
!textid LIKE if_t100_message=>t100key OPTIONAL
!previous LIKE previous OPTIONAL .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcx_trs_no_key IMPLEMENTATION.
METHOD constructor ##ADT_SUPPRESS_GENERATION.
CALL METHOD super->constructor
EXPORTING
previous = previous.
CLEAR me->textid.
IF textid IS INITIAL.
if_t100_message~t100key = if_t100_message=>default_textid.
ELSE.
if_t100_message~t100key = textid.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
66,
87,
62,
2213,
82,
62,
3919,
62,
2539,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
43213,
62,
12708,
62,
9122,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
611,
62,
83,
3064,
62,
20500,
764,
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,
5239,
312,
220,
220,
34178,
611,
62,
83,
3064,
62,
20500,
14804,
83,
3064,
2539,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
3866,
1442,
34178,
2180,
39852,
2849,
1847,
764,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
66,
87,
62,
2213,
82,
62,
3919,
62,
2539,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
23772,
22492,
2885,
51,
62,
40331,
32761,
62,
35353,
1137,
6234,
13,
198,
220,
220,
220,
42815,
337,
36252,
2208,
3784,
41571,
273,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2180,
796,
2180,
13,
198,
220,
220,
220,
30301,
1503,
502,
3784,
5239,
312,
13,
198,
220,
220,
220,
16876,
2420,
312,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
611,
62,
83,
3064,
62,
20500,
93,
83,
3064,
2539,
796,
611,
62,
83,
3064,
62,
20500,
14804,
12286,
62,
5239,
312,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
611,
62,
83,
3064,
62,
20500,
93,
83,
3064,
2539,
796,
2420,
312,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
parse
IMPORTING iv_string TYPE string
RETURNING VALUE(ro_tokens) TYPE REF TO zcl_aoc_boolean_tokens.
ENDCLASS.
CLASS lcl_parse IMPLEMENTATION.
METHOD parse.
DATA: lt_code TYPE string_table,
lt_tokens TYPE stokesx_tab,
lt_statements TYPE sstmnt_tab.
APPEND iv_string TO lt_code.
SCAN ABAP-SOURCE lt_code
TOKENS INTO lt_tokens
STATEMENTS INTO lt_statements
WITH ANALYSIS
WITH COMMENTS
WITH PRAGMAS abap_true.
cl_abap_unit_assert=>assert_subrc( ).
CREATE OBJECT ro_tokens EXPORTING it_tokens = lt_tokens.
ENDMETHOD.
ENDCLASS.
CLASS ltcl_find_end_paren DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS FINAL.
PRIVATE SECTION.
METHODS:
test
IMPORTING
iv_code TYPE string
iv_start TYPE i
iv_exp TYPE i,
find01 FOR TESTING,
find02 FOR TESTING,
find03 FOR TESTING.
ENDCLASS.
CLASS ltcl_find_end_paren IMPLEMENTATION.
METHOD test.
DATA: lv_end TYPE i,
lo_tokens TYPE REF TO zcl_aoc_boolean_tokens.
lo_tokens = lcl_parse=>parse( iv_code ).
lv_end = lo_tokens->find_end_paren( iv_start ).
cl_abap_unit_assert=>assert_equals(
act = lv_end
exp = iv_exp ).
ENDMETHOD.
METHOD find01.
test( iv_code = 'foo( )'
iv_start = 1
iv_exp = 2 ).
ENDMETHOD.
METHOD find02.
test( iv_code = 'foo( )->bar( )'
iv_start = 1
iv_exp = 3 ).
ENDMETHOD.
METHOD find03.
test( iv_code = 'foo( bar( ) )'
iv_start = 1
iv_exp = 4 ).
ENDMETHOD.
ENDCLASS.
CLASS ltcl_to_string DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS FINAL.
PRIVATE SECTION.
METHODS:
test_to_string IMPORTING iv_code TYPE string,
to_string01 FOR TESTING,
to_string02 FOR TESTING,
to_string03 FOR TESTING,
to_string04 FOR TESTING.
ENDCLASS.
CLASS ltcl_to_string IMPLEMENTATION.
METHOD test_to_string.
DATA: lo_tokens TYPE REF TO zcl_aoc_boolean_tokens.
lo_tokens = lcl_parse=>parse( iv_code ).
cl_abap_unit_assert=>assert_equals(
act = lo_tokens->to_string( )
exp = to_upper( iv_code ) ).
ENDMETHOD.
METHOD to_string01.
test_to_string( 'foo = bar' ).
ENDMETHOD.
METHOD to_string02.
test_to_string( 'moo = foo-bar' ).
ENDMETHOD.
METHOD to_string03.
test_to_string( 'moo = foo->bar' ).
ENDMETHOD.
METHOD to_string04.
test_to_string( 'moo = foo->bar( 2 )' ).
ENDMETHOD.
ENDCLASS.
CLASS ltcl_replace DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS FINAL.
PRIVATE SECTION.
METHODS:
test_replace
IMPORTING
iv_code TYPE string
iv_start TYPE i
iv_end TYPE i OPTIONAL
iv_replace TYPE string
iv_expected TYPE string,
replace01 FOR TESTING,
replace02 FOR TESTING.
ENDCLASS.
CLASS ltcl_replace IMPLEMENTATION.
METHOD test_replace.
DATA: lo_tokens TYPE REF TO zcl_aoc_boolean_tokens.
lo_tokens = lcl_parse=>parse( iv_code )->replace( iv_start = iv_start
iv_end = iv_end
iv_str = iv_replace ).
cl_abap_unit_assert=>assert_equals(
act = lo_tokens->to_string( )
exp = to_upper( iv_expected ) ).
ENDMETHOD.
METHOD replace01.
test_replace( iv_code = 'moo boo foo'
iv_start = 2
iv_replace = 'baa'
iv_expected = 'moo baa foo' ).
ENDMETHOD.
METHOD replace02.
test_replace( iv_code = 'moo boo foo'
iv_start = 2
iv_end = 3
iv_replace = 'baa'
iv_expected = 'moo baa' ).
ENDMETHOD.
ENDCLASS.
CLASS ltcl_test DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS FINAL.
PRIVATE SECTION.
METHODS:
test_remove IMPORTING iv_code TYPE string
iv_index TYPE i
iv_expected TYPE string,
remove01 FOR TESTING.
ENDCLASS. "ltcl_Test
CLASS ltcl_test IMPLEMENTATION.
METHOD test_remove.
DATA: lo_tokens TYPE REF TO zcl_aoc_boolean_tokens.
lo_tokens = lcl_parse=>parse( iv_code )->remove( iv_index ).
cl_abap_unit_assert=>assert_equals(
act = lo_tokens->to_string( )
exp = to_upper( iv_expected ) ).
ENDMETHOD.
METHOD remove01.
test_remove( iv_code = 'foo bar'
iv_index = 2
iv_expected = 'foo' ).
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
565,
62,
29572,
5550,
20032,
17941,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
21136,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
8841,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
83,
482,
641,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
64,
420,
62,
2127,
21052,
62,
83,
482,
641,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
29572,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
21136,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
8189,
220,
220,
220,
220,
220,
220,
41876,
4731,
62,
11487,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
83,
482,
641,
220,
220,
220,
220,
41876,
336,
3369,
87,
62,
8658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
14269,
3196,
41876,
264,
301,
76,
429,
62,
8658,
13,
628,
198,
220,
220,
220,
43504,
10619,
21628,
62,
8841,
5390,
300,
83,
62,
8189,
13,
628,
220,
220,
220,
6374,
1565,
9564,
2969,
12,
47690,
300,
83,
62,
8189,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5390,
42,
16938,
220,
220,
220,
220,
220,
220,
220,
39319,
300,
83,
62,
83,
482,
641,
198,
220,
220,
220,
220,
220,
220,
220,
220,
15486,
12529,
50,
220,
220,
220,
39319,
300,
83,
62,
14269,
3196,
198,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
3537,
1847,
16309,
1797,
198,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
9440,
28957,
198,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
350,
3861,
15548,
1921,
220,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
7266,
6015,
7,
6739,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
83,
482,
641,
7788,
15490,
2751,
340,
62,
83,
482,
641,
796,
300,
83,
62,
83,
482,
641,
13,
628,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
19796,
62,
437,
62,
11730,
5550,
20032,
17941,
7473,
43001,
2751,
360,
4261,
6234,
6006,
9863,
45698,
42,
49277,
43638,
5805,
7597,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1332,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
8189,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
9688,
41876,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
11201,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
1064,
486,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1064,
2999,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1064,
3070,
7473,
43001,
2751,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
19796,
62,
437,
62,
11730,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
1332,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
437,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
83,
482,
641,
41876,
4526,
37,
5390,
1976,
565,
62,
64,
420,
62,
2127,
21052,
62,
83,
482,
641,
13,
628,
198,
220,
220,
220,
2376,
62,
83,
482,
641,
796,
300,
565,
62,
29572,
14804,
29572,
7,
21628,
62,
8189,
6739,
628,
220,
220,
220,
300,
85,
62,
437,
796,
2376,
62,
83,
482,
641,
3784,
19796,
62,
437,
62,
11730,
7,
21628,
62,
9688,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
796,
300,
85,
62,
437,
198,
220,
220,
220,
220,
220,
1033,
796,
21628,
62,
11201,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1064,
486,
13,
628,
220,
220,
220,
1332,
7,
21628,
62,
8189,
220,
796,
705,
21943,
7,
1267,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
9688,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
11201,
220,
220,
796,
362,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1064,
2999,
13,
628,
220,
220,
220,
1332,
7,
21628,
62,
8189,
220,
796,
705,
21943,
7,
1267,
3784,
5657,
7,
1267,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
9688,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
11201,
220,
220,
796,
513,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1064,
3070,
13,
628,
220,
220,
220,
1332,
7,
21628,
62,
8189,
220,
796,
705,
21943,
7,
2318,
7,
1267,
1267,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
9688,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
11201,
220,
220,
796,
604,
6739,
628,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
1462,
62,
8841,
5550,
20032,
17941,
7473,
43001,
2751,
360,
4261,
6234,
6006,
9863,
45698,
42,
49277,
43638,
5805,
7597,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1332,
62,
1462,
62,
8841,
30023,
9863,
2751,
21628,
62,
8189,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
284,
62,
8841,
486,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
284,
62,
8841,
2999,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
284,
62,
8841,
3070,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
284,
62,
8841,
3023,
7473,
43001,
2751,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
1462,
62,
8841,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
1332,
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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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
] |
class ZCL_EXCEL_GRAPH definition
public
create public .
public section.
types:
*"* public components of class ZCL_EXCEL_GRAPH
*"* do not include other source files here!!!
BEGIN OF s_style,
c14style type i,
cstyle type i,
end of s_style .
types:
BEGIN OF s_series,
idx TYPE i,
order TYPE i,
invertifnegative TYPE string,
symbol TYPE string,
smooth TYPE string,
lbl TYPE string,
ref TYPE string,
sername TYPE string,
END OF s_series .
types:
t_series TYPE STANDARD TABLE OF s_series .
types:
BEGIN OF s_pagemargins,
b TYPE string,
l TYPE string,
r TYPE string,
t TYPE string,
header TYPE string,
footer TYPE string,
END OF s_pagemargins .
data NS_1904VAL type STRING value '0'. "#EC NOTEXT . . . . . . . . . . " .
data NS_LANGVAL type STRING value 'it-IT'. "#EC NOTEXT . . . . . . . . . . " .
data NS_ROUNDEDCORNERSVAL type STRING value '0'. "#EC NOTEXT . . . . . . . . . . " .
data PAGEMARGINS type S_PAGEMARGINS .
data NS_AUTOTITLEDELETEDVAL type STRING value '0'. "#EC NOTEXT . . . . . . . . . . " .
data NS_PLOTVISONLYVAL type STRING value '1'. "#EC NOTEXT . . . . . . . . . . " .
data NS_DISPBLANKSASVAL type STRING value 'gap'. "#EC NOTEXT . . . . . . . . . . " .
data NS_SHOWDLBLSOVERMAXVAL type STRING value '0'. "#EC NOTEXT . . . . . . . . . . " .
data SERIES type T_SERIES .
data NS_C14STYLEVAL type STRING value '102'. "#EC NOTEXT . . . . . . . . . . " .
data PRINT_LABEL type C value 'X'. "#EC NOTEXT . . . . . . . . . . " .
data NS_STYLEVAL type STRING value '2'. "#EC NOTEXT . . . . . . . . . . " .
constants:
BEGIN OF c_style_default,
c14style type i value 102,
cstyle type i value 2,
END OF c_style_default .
constants:
BEGIN OF c_style_1,
c14style type i value 101,
cstyle type i value 1,
END OF c_style_1 .
constants:
BEGIN OF c_style_3,
c14style type i value 103,
cstyle type i value 3,
END OF c_style_3 .
constants:
BEGIN OF c_style_4,
c14style type i value 104,
cstyle type i value 4,
END OF c_style_4 .
constants:
BEGIN OF c_style_5,
c14style type i value 105,
cstyle type i value 5,
END OF c_style_5 .
constants:
BEGIN OF c_style_6,
c14style type i value 106,
cstyle type i value 6,
END OF c_style_6 .
constants:
BEGIN OF c_style_7,
c14style type i value 107,
cstyle type i value 7,
END OF c_style_7 .
constants:
BEGIN OF c_style_8,
c14style type i value 108,
cstyle type i value 8,
END OF c_style_8 .
constants:
BEGIN OF c_style_9,
c14style type i value 109,
cstyle type i value 9,
END OF c_style_9 .
constants:
BEGIN OF c_style_10,
c14style type i value 110,
cstyle type i value 10,
END OF c_style_10 .
constants:
BEGIN OF c_style_11,
c14style type i value 111,
cstyle type i value 11,
END OF c_style_11 .
constants:
BEGIN OF c_style_12,
c14style type i value 112,
cstyle type i value 12,
END OF c_style_12 .
constants:
BEGIN OF c_style_13,
c14style type i value 113,
cstyle type i value 13,
END OF c_style_13 .
constants:
BEGIN OF c_style_14,
c14style type i value 114,
cstyle type i value 14,
END OF c_style_14 .
constants:
BEGIN OF c_style_15,
c14style type i value 115,
cstyle type i value 15,
END OF c_style_15 .
constants:
BEGIN OF c_style_16,
c14style type i value 116,
cstyle type i value 16,
END OF c_style_16 .
constants:
BEGIN OF c_style_17,
c14style type i value 117,
cstyle type i value 17,
END OF c_style_17 .
constants:
BEGIN OF c_style_18,
c14style type i value 118,
cstyle type i value 18,
END OF c_style_18 .
constants:
BEGIN OF c_style_19,
c14style type i value 119,
cstyle type i value 19,
END OF c_style_19 .
constants:
BEGIN OF c_style_20,
c14style type i value 120,
cstyle type i value 20,
END OF c_style_20 .
constants:
BEGIN OF c_style_21,
c14style type i value 121,
cstyle type i value 21,
END OF c_style_21 .
constants:
BEGIN OF c_style_22,
c14style type i value 122,
cstyle type i value 22,
END OF c_style_22 .
constants:
BEGIN OF c_style_23,
c14style type i value 123,
cstyle type i value 23,
END OF c_style_23 .
constants:
BEGIN OF c_style_24,
c14style type i value 124,
cstyle type i value 24,
END OF c_style_24 .
constants:
BEGIN OF c_style_25,
c14style type i value 125,
cstyle type i value 25,
END OF c_style_25 .
constants:
BEGIN OF c_style_26,
c14style type i value 126,
cstyle type i value 26,
END OF c_style_26 .
constants:
BEGIN OF c_style_27,
c14style type i value 127,
cstyle type i value 27,
END OF c_style_27 .
constants:
BEGIN OF c_style_28,
c14style type i value 128,
cstyle type i value 28,
END OF c_style_28 .
constants:
BEGIN OF c_style_29,
c14style type i value 129,
cstyle type i value 29,
END OF c_style_29 .
constants:
BEGIN OF c_style_30,
c14style type i value 130,
cstyle type i value 30,
END OF c_style_30 .
constants:
BEGIN OF c_style_31,
c14style type i value 131,
cstyle type i value 31,
END OF c_style_31 .
constants:
BEGIN OF c_style_32,
c14style type i value 132,
cstyle type i value 32,
END OF c_style_32 .
constants:
BEGIN OF c_style_33,
c14style type i value 133,
cstyle type i value 33,
END OF c_style_33 .
constants:
BEGIN OF c_style_34,
c14style type i value 134,
cstyle type i value 34,
END OF c_style_34 .
constants:
BEGIN OF c_style_35,
c14style type i value 135,
cstyle type i value 35,
END OF c_style_35 .
constants:
BEGIN OF c_style_36,
c14style type i value 136,
cstyle type i value 36,
END OF c_style_36 .
constants:
BEGIN OF c_style_37,
c14style type i value 137,
cstyle type i value 37,
END OF c_style_37 .
constants:
BEGIN OF c_style_38,
c14style type i value 138,
cstyle type i value 38,
END OF c_style_38 .
constants:
BEGIN OF c_style_39,
c14style type i value 139,
cstyle type i value 39,
END OF c_style_39 .
constants:
BEGIN OF c_style_40,
c14style type i value 140,
cstyle type i value 40,
END OF c_style_40 .
constants:
BEGIN OF c_style_41,
c14style type i value 141,
cstyle type i value 41,
END OF c_style_41 .
constants:
BEGIN OF c_style_42,
c14style type i value 142,
cstyle type i value 42,
END OF c_style_42 .
constants:
BEGIN OF c_style_43,
c14style type i value 143,
cstyle type i value 43,
END OF c_style_43 .
constants:
BEGIN OF c_style_44,
c14style type i value 144,
cstyle type i value 44,
END OF c_style_44 .
constants:
BEGIN OF c_style_45,
c14style type i value 145,
cstyle type i value 45,
END OF c_style_45 .
constants:
BEGIN OF c_style_46,
c14style type i value 146,
cstyle type i value 46,
END OF c_style_46 .
constants:
BEGIN OF c_style_47,
c14style type i value 147,
cstyle type i value 47,
END OF c_style_47 .
constants:
BEGIN OF c_style_48,
c14style type i value 148,
cstyle type i value 48,
END OF c_style_48 .
constants C_SHOW_TRUE type C value '1'. "#EC NOTEXT
constants C_SHOW_FALSE type C value '0'. "#EC NOTEXT
constants C_PRINT_LBL_TRUE type C value '1'. "#EC NOTEXT
constants C_PRINT_LBL_FALSE type C value '0'. "#EC NOTEXT
methods CONSTRUCTOR .
methods CREATE_SERIE
importing
!IP_IDX type I optional
!IP_ORDER type I
!IP_INVERTIFNEGATIVE type STRING optional
!IP_SYMBOL type STRING optional
!IP_SMOOTH type C optional
!IP_LBL_FROM_COL type ZEXCEL_CELL_COLUMN_ALPHA optional
!IP_LBL_FROM_ROW type ZEXCEL_CELL_ROW optional
!IP_LBL_TO_COL type ZEXCEL_CELL_COLUMN_ALPHA optional
!IP_LBL_TO_ROW type ZEXCEL_CELL_ROW optional
!IP_LBL type STRING optional
!IP_REF_FROM_COL type ZEXCEL_CELL_COLUMN_ALPHA optional
!IP_REF_FROM_ROW type ZEXCEL_CELL_ROW optional
!IP_REF_TO_COL type ZEXCEL_CELL_COLUMN_ALPHA optional
!IP_REF_TO_ROW type ZEXCEL_CELL_ROW optional
!IP_REF type STRING optional
!IP_SERNAME type STRING
!IP_SHEET type ZEXCEL_SHEET_TITLE optional .
methods SET_STYLE
importing
!IP_STYLE type S_STYLE .
methods SET_PRINT_LBL
importing
!IP_VALUE type C .
protected section.
*"* protected components of class ZCL_EXCEL_GRAPH
*"* do not include other source files here!!!
private section.
*"* private components of class ZCL_EXCEL_GRAPH
*"* do not include other source files here!!!
ENDCLASS.
CLASS ZCL_EXCEL_GRAPH IMPLEMENTATION.
method CONSTRUCTOR.
"Load default values
me->pagemargins-b = '0.75'.
me->pagemargins-l = '0.7'.
me->pagemargins-r = '0.7'.
me->pagemargins-t = '0.75'.
me->pagemargins-header = '0.3'.
me->pagemargins-footer = '0.3'.
endmethod.
method CREATE_SERIE.
DATA ls_serie TYPE s_series.
DATA: lv_start_row_c TYPE char7,
lv_stop_row_c TYPE char7.
IF ip_lbl IS NOT SUPPLIED.
lv_stop_row_c = ip_lbl_to_row.
SHIFT lv_stop_row_c RIGHT DELETING TRAILING space.
SHIFT lv_stop_row_c LEFT DELETING LEADING space.
lv_start_row_c = ip_lbl_from_row.
SHIFT lv_start_row_c RIGHT DELETING TRAILING space.
SHIFT lv_start_row_c LEFT DELETING LEADING space.
ls_serie-lbl = ip_sheet.
ls_serie-lbl = zcl_excel_common=>escape_string( ip_value = ls_serie-lbl ).
CONCATENATE ls_serie-lbl '!$' ip_lbl_from_col '$' lv_start_row_c ':$' ip_lbl_to_col '$' lv_stop_row_c INTO ls_serie-lbl.
CLEAR: lv_start_row_c, lv_stop_row_c.
ELSE.
ls_serie-lbl = ip_lbl.
ENDIF.
IF ip_ref IS NOT SUPPLIED.
lv_stop_row_c = ip_ref_to_row.
SHIFT lv_stop_row_c RIGHT DELETING TRAILING space.
SHIFT lv_stop_row_c LEFT DELETING LEADING space.
lv_start_row_c = ip_ref_from_row.
SHIFT lv_start_row_c RIGHT DELETING TRAILING space.
SHIFT lv_start_row_c LEFT DELETING LEADING space.
ls_serie-ref = ip_sheet.
ls_serie-ref = zcl_excel_common=>escape_string( ip_value = ls_serie-ref ).
CONCATENATE ls_serie-ref '!$' ip_ref_from_col '$' lv_start_row_c ':$' ip_ref_to_col '$' lv_stop_row_c INTO ls_serie-ref.
CLEAR: lv_start_row_c, lv_stop_row_c.
ELSE.
ls_serie-ref = ip_ref.
ENDIF.
ls_serie-idx = ip_idx.
ls_serie-order = ip_order.
ls_serie-invertifnegative = ip_invertifnegative.
ls_serie-symbol = ip_symbol.
ls_serie-smooth = ip_smooth.
ls_serie-sername = ip_sername.
APPEND ls_serie TO me->series.
SORT me->series BY order ASCENDING.
endmethod.
method SET_PRINT_LBL.
me->print_label = ip_value.
endmethod.
method SET_STYLE.
me->ns_c14styleval = ip_style-c14style.
CONDENSE me->ns_c14styleval NO-GAPS.
me->ns_styleval = ip_style-cstyle.
CONDENSE me->ns_styleval NO-GAPS.
endmethod.
ENDCLASS.
| [
4871,
1168,
5097,
62,
6369,
34,
3698,
62,
10761,
31300,
6770,
198,
220,
1171,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
3858,
25,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
10761,
31300,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
220,
220,
347,
43312,
3963,
264,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
1415,
7635,
2099,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
7635,
220,
220,
2099,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
886,
286,
264,
62,
7635,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
347,
43312,
3963,
264,
62,
25076,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
87,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1502,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
287,
1851,
361,
31591,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6194,
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,
220,
220,
220,
220,
220,
7209,
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,
220,
220,
220,
220,
220,
300,
2436,
220,
220,
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,
220,
220,
220,
220,
220,
1006,
220,
220,
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,
220,
220,
220,
220,
220,
1055,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
264,
62,
25076,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
62,
25076,
41876,
49053,
9795,
43679,
3963,
264,
62,
25076,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
347,
43312,
3963,
264,
62,
79,
363,
368,
853,
1040,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13639,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2366,
263,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
264,
62,
79,
363,
368,
853,
1040,
764,
628,
220,
1366,
10896,
62,
1129,
3023,
23428,
2099,
19269,
2751,
1988,
705,
15,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
1366,
10896,
62,
43,
15567,
23428,
2099,
19269,
2751,
1988,
705,
270,
12,
2043,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
1366,
10896,
62,
49,
15919,
1961,
34,
30649,
4877,
23428,
2099,
19269,
2751,
1988,
705,
15,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
1366,
350,
4760,
3620,
1503,
38,
20913,
2099,
311,
62,
4537,
38,
3620,
1503,
38,
20913,
764,
198,
220,
1366,
10896,
62,
39371,
2394,
2043,
30465,
36,
28882,
1961,
23428,
2099,
19269,
2751,
1988,
705,
15,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
1366,
10896,
62,
6489,
2394,
29817,
1340,
11319,
23428,
2099,
19269,
2751,
1988,
705,
16,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
1366,
10896,
62,
26288,
47,
9148,
15154,
50,
1921,
23428,
2099,
19269,
2751,
1988,
705,
43554,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
1366,
10896,
62,
9693,
3913,
19260,
33,
6561,
41983,
22921,
23428,
2099,
19269,
2751,
1988,
705,
15,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
1366,
18871,
11015,
2099,
309,
62,
35009,
11015,
764,
198,
220,
1366,
10896,
62,
34,
1415,
2257,
56,
2538,
23428,
2099,
19269,
2751,
1988,
705,
15377,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
1366,
4810,
12394,
62,
48780,
3698,
2099,
327,
1988,
705,
55,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
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,
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
] |
CLASS zcl_abapgit_object_dsys DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
METHODS constructor
IMPORTING
is_item TYPE zif_abapgit_definitions=>ty_item
iv_language TYPE spras.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS: c_typ TYPE dokhl-typ VALUE 'E',
c_id TYPE dokhl-id VALUE 'HY'.
DATA: mv_doc_object TYPE sobj_name.
TYPES: BEGIN OF ty_data,
doctitle TYPE dsyst-doktitle,
head TYPE thead,
lines TYPE tline_tab,
END OF ty_data.
METHODS deserialize_dsys
IMPORTING
ii_xml TYPE REF TO zif_abapgit_xml_input
RAISING
zcx_abapgit_exception.
METHODS get_main_lang
RETURNING
VALUE(rv_language) TYPE spras.
ENDCLASS.
CLASS zcl_abapgit_object_dsys IMPLEMENTATION.
METHOD constructor.
DATA: lv_prefix TYPE namespace,
lv_bare_name TYPE progname.
super->constructor( is_item = is_item
iv_language = iv_language ).
IF ms_item-obj_name(1) = '/'.
CALL FUNCTION 'RS_NAME_SPLIT_NAMESPACE'
EXPORTING
name_with_namespace = ms_item-obj_name
IMPORTING
namespace = lv_prefix
name_without_namespace = lv_bare_name.
ELSE.
lv_bare_name = ms_item-obj_name.
ENDIF.
mv_doc_object = |{ lv_bare_name+0(4) }{ lv_prefix }{ lv_bare_name+4(*) }|.
ENDMETHOD.
METHOD deserialize_dsys.
DATA: ls_data TYPE ty_data,
ls_docu_info TYPE dokil,
lv_version TYPE dokvers,
lv_doku_obj TYPE doku_obj.
lv_doku_obj = mv_doc_object.
ii_xml->read( EXPORTING iv_name = 'DSYS'
CHANGING cg_data = ls_data ).
CALL FUNCTION 'DOCU_INIT'
EXPORTING
id = c_id
langu = mv_language
object = lv_doku_obj
typ = c_typ
IMPORTING
xdokil = ls_docu_info.
lv_version = ls_docu_info-version.
CALL FUNCTION 'DOCU_UPDATE'
EXPORTING
head = ls_data-head
state = 'A'
typ = c_typ
version = lv_version
TABLES
line = ls_data-lines.
ENDMETHOD.
METHOD get_main_lang.
SELECT SINGLE langu FROM dokil INTO rv_language
WHERE id = c_id
AND object = mv_doc_object
AND masterlang = abap_true.
IF sy-subrc <> 0.
rv_language = mv_language.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = zcl_abapgit_factory=>get_longtexts( )->changed_by(
iv_object_name = mv_doc_object
iv_longtext_id = c_id ).
ENDMETHOD.
METHOD zif_abapgit_object~delete.
zcl_abapgit_factory=>get_longtexts( )->delete(
iv_object_name = mv_doc_object
iv_longtext_id = c_id ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: ls_metadata TYPE zif_abapgit_definitions=>ty_metadata.
ls_metadata = io_xml->get_metadata( ).
CASE ls_metadata-version.
WHEN 'v1.0.0'.
deserialize_dsys( io_xml ).
WHEN 'v2.0.0'.
zcl_abapgit_factory=>get_longtexts( )->deserialize(
ii_xml = io_xml
iv_main_language = mv_language ).
WHEN OTHERS.
zcx_abapgit_exception=>raise( 'unsupported DSYS version' ).
ENDCASE.
tadir_insert( iv_package ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_count TYPE i.
SELECT SINGLE COUNT( * ) FROM dokil INTO lv_count
WHERE id = c_id
AND object = mv_doc_object. "#EC CI_GENBUFF
rv_bool = boolc( lv_count > 0 ).
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.
rs_metadata-version = 'v2.0.0'.
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 lv_lang TYPE sy-langu.
lv_lang = get_main_lang( ).
CALL FUNCTION 'DSYS_EDIT'
EXPORTING
dokclass = mv_doc_object+0(4)
dokname = mv_doc_object+4(*)
doklangu = lv_lang
EXCEPTIONS
class_unknown = 1
object_not_found = 2
OTHERS = 3.
rv_exit = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
zcl_abapgit_factory=>get_longtexts( )->serialize(
iv_object_name = mv_doc_object
iv_longtext_id = c_id
ii_xml = io_xml ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
9310,
893,
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,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
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,
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,
628,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
269,
62,
28004,
41876,
466,
14636,
75,
12,
28004,
26173,
8924,
705,
36,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
62,
312,
220,
41876,
466,
14636,
75,
12,
312,
26173,
8924,
705,
42598,
4458,
628,
220,
220,
220,
42865,
25,
285,
85,
62,
15390,
62,
15252,
220,
41876,
27355,
73,
62,
3672,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10412,
2578,
41876,
288,
1837,
301,
12,
67,
482,
7839,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1182,
220,
220,
220,
220,
41876,
262,
324,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3951,
220,
220,
220,
41876,
256,
1370,
62,
8658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
7890,
13,
628,
220,
220,
220,
337,
36252,
50,
748,
48499,
1096,
62,
9310,
893,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
19875,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
19875,
62,
15414,
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,
651,
62,
12417,
62,
17204,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
16129,
8,
41876,
7500,
292,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
9310,
893,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
40290,
220,
220,
220,
41876,
25745,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
49382,
62,
3672,
41876,
1172,
3672,
13,
628,
220,
220,
220,
2208,
3784,
41571,
273,
7,
318,
62,
9186,
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,
16876,
13845,
62,
9186,
12,
26801,
62,
3672,
7,
16,
8,
796,
31051,
4458,
198,
220,
220,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
6998,
62,
20608,
62,
4303,
43,
2043,
62,
45,
29559,
47,
11598,
6,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
62,
4480,
62,
14933,
10223,
220,
220,
220,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25745,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
40290,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
62,
19419,
62,
14933,
10223,
796,
300,
85,
62,
49382,
62,
3672,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
300,
85,
62,
49382,
62,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
285,
85,
62,
15390,
62,
15252,
796,
930,
90,
300,
85,
62,
49382,
62,
3672,
10,
15,
7,
19,
8,
1782,
90,
300,
85,
62,
40290,
1782,
90,
300,
85,
62,
49382,
62,
3672,
10,
19,
7,
28104,
1782,
91,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
748,
48499,
1096,
62,
9310,
893,
13,
628,
220,
220,
220,
42865,
25,
43979,
62,
7890,
220,
220,
220,
220,
220,
41876,
1259,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
15390,
84,
62,
10951,
41876,
466,
34553,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
9641,
220,
220,
41876,
466,
74,
690,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
67,
11601,
62,
26801,
220,
41876,
466,
23063,
62,
26801,
13,
628,
220,
220,
220,
300,
85,
62,
67,
11601,
62,
26801,
796,
285,
85,
62,
15390,
62,
15252,
13,
198,
220,
220,
220,
21065,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
5258,
16309,
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,
7890,
6739,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
38715,
52,
62,
1268,
2043,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
220,
220,
220,
220,
796,
269,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
2786,
220,
796,
285,
85,
62,
16129,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
796,
300,
85,
62,
67,
11601,
62,
26801,
198,
220,
220,
220,
220,
220,
220,
220,
2170,
220,
220,
220,
796,
269,
62,
28004,
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,
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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
] |
"! <h1>API for Deleting a Travel</h1>
"!
"! <p>
"! Function module to delete a single Travel instance.
"! It will also delete all related subnodes of Booking and Booking Supplement.
"! </p>
"!
"! @parameter iv_travel_id | ID of the Travel to be deleted
"! @parameter et_messages | Table of occurred messages
"!
FUNCTION flight_travel_delete.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IV_TRAVEL_ID) TYPE TRAVEL_ID
*" EXPORTING
*" REFERENCE(ET_MESSAGES) TYPE T_MESSAGE
*"----------------------------------------------------------------------
CLEAR et_messages.
cl_flight_legacy=>get_instance( )->delete_travel( EXPORTING iv_travel_id = iv_travel_id
IMPORTING et_messages = DATA(lt_messages) ).
cl_flight_legacy=>get_instance( )->convert_messages( EXPORTING it_messages = lt_messages
IMPORTING et_messages = et_messages ).
ENDFUNCTION.
| [
40484,
1279,
71,
16,
29,
17614,
329,
42226,
889,
257,
13524,
3556,
71,
16,
29,
198,
40484,
198,
40484,
1279,
79,
29,
198,
40484,
15553,
8265,
284,
12233,
257,
2060,
13524,
4554,
13,
198,
40484,
632,
481,
635,
12233,
477,
3519,
850,
77,
4147,
286,
4897,
278,
290,
4897,
278,
23150,
13,
198,
40484,
7359,
79,
29,
198,
40484,
198,
40484,
2488,
17143,
2357,
21628,
62,
35927,
62,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
4522,
286,
262,
13524,
284,
307,
13140,
198,
40484,
2488,
17143,
2357,
2123,
62,
37348,
1095,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
8655,
286,
5091,
6218,
198,
40484,
198,
42296,
4177,
2849,
5474,
62,
35927,
62,
33678,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
3824,
62,
51,
3861,
18697,
62,
2389,
8,
41876,
220,
29125,
18697,
62,
2389,
198,
9,
1,
220,
7788,
15490,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
2767,
62,
44,
1546,
4090,
48075,
8,
41876,
220,
309,
62,
44,
1546,
4090,
8264,
198,
9,
1,
10097,
23031,
198,
220,
30301,
1503,
2123,
62,
37348,
1095,
13,
628,
220,
537,
62,
22560,
62,
1455,
1590,
14804,
1136,
62,
39098,
7,
1267,
3784,
33678,
62,
35927,
7,
7788,
15490,
2751,
21628,
62,
35927,
62,
312,
796,
21628,
62,
35927,
62,
312,
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,
220,
220,
30023,
9863,
2751,
2123,
62,
37348,
1095,
220,
796,
42865,
7,
2528,
62,
37348,
1095,
8,
6739,
628,
220,
537,
62,
22560,
62,
1455,
1590,
14804,
1136,
62,
39098,
7,
1267,
3784,
1102,
1851,
62,
37348,
1095,
7,
7788,
15490,
2751,
340,
62,
37348,
1095,
796,
300,
83,
62,
37348,
1095,
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,
220,
220,
220,
220,
220,
30023,
9863,
2751,
2123,
62,
37348,
1095,
796,
2123,
62,
37348,
1095,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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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o_simpl4 IMPLEMENTATION.
METHOD get_actual_day.
DATA: date TYPE sy-datum.
" Test 002
TEST-SEAM sy_datum.
date = sy-datum.
END-TEST-SEAM.
r_result = date+6(2).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
20850,
9536,
78,
62,
14323,
489,
19,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
50039,
62,
820,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
62,
20274,
8,
41876,
997,
66,
17,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
20850,
9536,
78,
62,
14323,
489,
19,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
651,
62,
50039,
62,
820,
13,
628,
220,
220,
220,
42865,
25,
3128,
41876,
827,
12,
19608,
388,
13,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
6208,
3571,
17,
628,
220,
220,
220,
43001,
12,
5188,
2390,
827,
62,
19608,
388,
13,
628,
220,
220,
220,
220,
220,
3128,
796,
827,
12,
19608,
388,
13,
628,
220,
220,
220,
23578,
12,
51,
6465,
12,
5188,
2390,
13,
628,
220,
220,
220,
374,
62,
20274,
796,
3128,
10,
21,
7,
17,
737,
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
] |
CLASS ycl_addict_alv DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
TYPES: BEGIN OF form_dict,
html_end_of_list TYPE slis_formname,
pf_status TYPE slis_formname,
user_command TYPE slis_formname,
END OF form_dict.
TYPES field_list TYPE STANDARD TABLE OF fieldname WITH EMPTY KEY.
TYPES: BEGIN OF build_fcat_input_dict,
structure TYPE tabname,
itab_name TYPE tabname,
tech_fields TYPE field_list,
edit_fields TYPE field_list,
hotspot_fields TYPE field_list,
checkbox_fields TYPE field_list,
END OF build_fcat_input_dict.
CONSTANTS: BEGIN OF default_fields,
alvsl TYPE fieldname VALUE 'ALVSL',
celltab TYPE fieldname VALUE 'CELLTAB',
END OF default_fields.
CONSTANTS: BEGIN OF default_forms,
html_end_of_list TYPE slis_formname VALUE 'HTML_END_OF_LIST',
pf_status TYPE slis_formname VALUE 'PF_STATUS',
user_command TYPE slis_formname VALUE 'USER_COMMAND',
END OF default_forms.
DATA cprog TYPE sycprog.
DATA itab TYPE REF TO data.
DATA forms TYPE form_dict.
DATA layout TYPE slis_layout_alv.
DATA fcat TYPE slis_t_fieldcat_alv.
METHODS constructor
IMPORTING !itab TYPE REF TO data
!cprog TYPE sy-cprog OPTIONAL
!forms TYPE form_dict OPTIONAL
!layout TYPE slis_layout_alv OPTIONAL
!fcat TYPE slis_t_fieldcat_alv OPTIONAL
!fcat_param TYPE build_fcat_input_dict OPTIONAL
RAISING ycx_addict_alv.
METHODS build_fcat
IMPORTING !input TYPE build_fcat_input_dict
RAISING ycx_addict_alv.
METHODS show_grid RAISING ycx_addict_alv.
METHODS show_list RAISING ycx_addict_alv.
METHODS show RAISING ycx_addict_alv.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES field_range TYPE RANGE OF fieldname.
CONSTANTS alv_save TYPE char1 VALUE 'A'.
CLASS-METHODS conv_field_list_to_range
IMPORTING !list TYPE field_list
RETURNING VALUE(range) TYPE field_range.
METHODS set_fcat_from_itab RAISING ycx_addict_alv.
METHODS set_fcat_from_itab_line
IMPORTING !line TYPE REF TO data
RAISING ycx_addict_alv.
ENDCLASS.
CLASS ycl_addict_alv IMPLEMENTATION.
METHOD constructor.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Object creation
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
me->cprog = cprog.
me->itab = itab.
me->forms = forms.
IF fcat IS NOT INITIAL.
me->fcat = fcat.
ELSEIF fcat_param IS NOT INITIAL.
build_fcat( fcat_param ).
ELSE.
TRY.
set_fcat_from_itab( ).
CATCH cx_root ##no_handler .
ENDTRY.
ENDIF.
me->layout = COND #(
WHEN layout IS SUPPLIED THEN layout
ELSE VALUE #( zebra = abap_true
colwidth_optimize = abap_true ) ).
ENDMETHOD.
METHOD build_fcat.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Builds FCAT out of structure
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
TRY.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_internal_tabname = input-itab_name
i_structure_name = input-structure
CHANGING
ct_fieldcat = me->fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3 ##FM_SUBRC_OK.
ycx_addict_function_subrc=>raise_if_sysubrc_not_initial( 'REUSE_ALV_FIELDCATALOG_MERGE' ).
IF input-edit_fields IS NOT INITIAL.
DATA(edit_rng) = conv_field_list_to_range( input-edit_fields ).
MODIFY me->fcat FROM VALUE #( edit = abap_true )
TRANSPORTING edit
WHERE fieldname IN edit_rng.
ENDIF.
IF input-tech_fields IS NOT INITIAL.
DATA(tech_rng) = conv_field_list_to_range( input-tech_fields ).
MODIFY me->fcat FROM VALUE #( tech = abap_true )
TRANSPORTING tech
WHERE fieldname IN tech_rng.
ENDIF.
IF input-hotspot_fields IS NOT INITIAL.
DATA(hotspot_rng) = conv_field_list_to_range( input-hotspot_fields ).
MODIFY me->fcat FROM VALUE #( hotspot = abap_true )
TRANSPORTING hotspot
WHERE fieldname IN hotspot_rng.
ENDIF.
IF input-checkbox_fields IS NOT INITIAL.
DATA(checkbox_rng) = conv_field_list_to_range( input-checkbox_fields ).
MODIFY me->fcat FROM VALUE #( checkbox = abap_true )
TRANSPORTING checkbox
WHERE fieldname IN checkbox_rng.
ENDIF.
CATCH ycx_addict_alv INTO DATA(alv_error).
RAISE EXCEPTION alv_error.
CATCH cx_root INTO DATA(diaper).
RAISE EXCEPTION TYPE ycx_addict_alv
EXPORTING
textid = ycx_addict_alv=>fcat_creation_error
previous = diaper.
ENDTRY.
ENDMETHOD.
METHOD show_grid.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Display grid
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
FIELD-SYMBOLS <itab> TYPE STANDARD TABLE.
TRY.
ASSIGN me->itab->* TO <itab>.
DATA(grid_settings) = VALUE lvc_s_glay( edt_cll_cb = ycl_addict_gui_toolkit=>is_gui_on( ) ).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = me->cprog
i_callback_pf_status_set = me->forms-pf_status
i_callback_user_command = me->forms-user_command
i_callback_html_end_of_list = me->forms-html_end_of_list
i_grid_settings = grid_settings
is_layout = me->layout
it_fieldcat = me->fcat
i_save = me->alv_save
TABLES
t_outtab = <itab>
EXCEPTIONS
program_error = 1
OTHERS = 2 ##FM_SUBRC_OK.
ycx_addict_function_subrc=>raise_if_sysubrc_not_initial( 'REUSE_ALV_GRID_DISPLAY' ).
CATCH ycx_addict_alv INTO DATA(alv_error).
RAISE EXCEPTION alv_error.
CATCH cx_root INTO DATA(diaper).
RAISE EXCEPTION TYPE ycx_addict_alv
EXPORTING
textid = ycx_addict_alv=>grid_error
previous = diaper.
ENDTRY.
ENDMETHOD.
METHOD show_list.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Display list
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
FIELD-SYMBOLS <itab> TYPE STANDARD TABLE.
TRY.
ASSIGN me->itab->* TO <itab>.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = me->cprog
i_callback_pf_status_set = me->forms-pf_status
i_callback_user_command = me->forms-user_command
is_layout = me->layout
it_fieldcat = me->fcat
i_save = me->alv_save
TABLES
t_outtab = <itab>
EXCEPTIONS
program_error = 1
OTHERS = 2 ##FM_SUBRC_OK.
ycx_addict_function_subrc=>raise_if_sysubrc_not_initial( 'REUSE_ALV_LIST_DISPLAY' ).
CATCH ycx_addict_alv INTO DATA(alv_error).
RAISE EXCEPTION alv_error.
CATCH cx_root INTO DATA(diaper).
RAISE EXCEPTION TYPE ycx_addict_alv
EXPORTING
textid = ycx_addict_alv=>grid_error
previous = diaper.
ENDTRY.
ENDMETHOD.
METHOD show.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Display grid or list, depending on SY-BATCH
" Why? Grid produces an error in case the program is in the background
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
CASE sy-batch.
WHEN abap_true . show_list( ).
WHEN abap_false. show_grid( ).
ENDCASE.
ENDMETHOD.
METHOD conv_field_list_to_range.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Convert field list to field range
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
range = VALUE #(
FOR _field IN list (
sign = ycl_addict_toolkit=>sign-include
option = ycl_addict_toolkit=>option-eq
low = _field ) ).
ENDMETHOD.
METHOD set_fcat_from_itab.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets the field catalog from the passed internal table
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
FIELD-SYMBOLS <itab> TYPE STANDARD TABLE.
ASSIGN me->itab->* TO <itab>.
IF <itab> IS INITIAL.
DATA(itab_was_initial) = abap_true.
APPEND INITIAL LINE TO <itab>.
ENDIF.
ASSIGN <itab>[ 1 ] TO FIELD-SYMBOL(<line>).
set_fcat_from_itab_line( REF #( <line> ) ).
IF itab_was_initial = abap_true.
CLEAR <itab>.
ENDIF.
ENDMETHOD.
METHOD set_fcat_from_itab_line.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets the field catalog from the passed internal table line
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
DATA(dscr) = cl_abap_typedescr=>describe_by_data_ref( line ).
DATA(name) = dscr->get_relative_name( ).
build_fcat( VALUE #( structure = name ) ).
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
565,
62,
2860,
713,
62,
282,
85,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1296,
62,
11600,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27711,
62,
437,
62,
1659,
62,
4868,
41876,
1017,
271,
62,
687,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
69,
62,
13376,
220,
220,
220,
220,
220,
220,
220,
41876,
1017,
271,
62,
687,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
21812,
220,
220,
220,
220,
41876,
1017,
271,
62,
687,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1296,
62,
11600,
13,
628,
220,
220,
220,
24412,
47,
1546,
2214,
62,
4868,
41876,
49053,
9795,
43679,
3963,
2214,
3672,
13315,
38144,
9936,
35374,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1382,
62,
69,
9246,
62,
15414,
62,
11600,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4645,
220,
220,
220,
220,
220,
220,
41876,
7400,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
397,
62,
3672,
220,
220,
220,
220,
220,
220,
41876,
7400,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7261,
62,
25747,
220,
220,
220,
220,
41876,
2214,
62,
4868,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4370,
62,
25747,
220,
220,
220,
220,
41876,
2214,
62,
4868,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33915,
13059,
62,
25747,
220,
41876,
2214,
62,
4868,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2198,
3524,
62,
25747,
41876,
2214,
62,
4868,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1382,
62,
69,
9246,
62,
15414,
62,
11600,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
347,
43312,
3963,
4277,
62,
25747,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
435,
85,
6649,
220,
220,
41876,
2214,
3672,
220,
220,
220,
220,
26173,
8924,
705,
1847,
53,
8634,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2685,
8658,
41876,
2214,
3672,
220,
220,
220,
220,
26173,
8924,
705,
5222,
3069,
5603,
33,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
4277,
62,
25747,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
347,
43312,
3963,
4277,
62,
23914,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27711,
62,
437,
62,
1659,
62,
4868,
41876,
1017,
271,
62,
687,
3672,
26173,
8924,
705,
28656,
62,
10619,
62,
19238,
62,
45849,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
69,
62,
13376,
220,
220,
220,
220,
220,
220,
220,
41876,
1017,
271,
62,
687,
3672,
26173,
8924,
705,
42668,
62,
35744,
2937,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
21812,
220,
220,
220,
220,
41876,
1017,
271,
62,
687,
3672,
26173,
8924,
705,
29904,
62,
9858,
44,
6981,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
4277,
62,
23914,
13,
628,
220,
220,
220,
42865,
269,
1676,
70,
220,
41876,
827,
66,
1676,
70,
13,
198,
220,
220,
220,
42865,
340,
397,
220,
220,
41876,
4526,
37,
5390,
1366,
13,
198,
220,
220,
220,
42865,
5107,
220,
41876,
1296,
62,
11600,
13,
198,
220,
220,
220,
42865,
12461,
41876,
1017,
271,
62,
39786,
62,
282,
85,
13,
198,
220,
220,
220,
42865,
277,
9246,
220,
220,
41876,
1017,
271,
62,
83,
62,
3245,
9246,
62,
282,
85,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
5145,
270,
397,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
66,
1676,
70,
220,
220,
220,
220,
220,
41876,
827,
12,
66,
1676,
70,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
23914,
220,
220,
220,
220,
220,
41876,
1296,
62,
11600,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
39786,
220,
220,
220,
220,
41876,
1017,
271,
62,
39786,
62,
282,
85,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
69,
9246,
220,
220,
220,
220,
220,
220,
41876,
1017,
271,
62,
83,
62,
3245,
9246,
62,
282,
85,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5145,
69,
9246,
62,
17143,
41876,
1382,
62,
69,
9246,
62,
15414,
62,
11600,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
331,
66,
87,
62,
2860,
713,
62,
282,
85,
13,
628,
220,
220,
220,
337,
36252,
50,
1382,
62,
69,
9246,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
5145,
15414,
41876,
1382,
62,
69,
9246,
62,
15414,
62,
11600,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
331,
66,
87,
62,
2860,
713,
62,
282,
85,
13,
628,
220,
220,
220,
337,
36252,
50,
905,
62,
25928,
17926,
1797,
2751,
331,
66,
87,
62,
2860,
713,
62,
282,
85,
13,
198,
220,
220,
220,
337,
36252,
50,
905,
62,
4868,
17926,
1797,
2751,
331,
66,
87,
62,
2860,
713,
62,
282,
85,
13,
198,
220,
220,
220,
337
] | [
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_EUI_TYPE definition
public
final
create public .
public section.
*"* public components of class ZCL_EUI_TYPE
*"* do not include other source files here!!!
type-pools ABAP .
types:
BEGIN OF ts_field_desc,
name TYPE zdeui_attr_name, " abap_attrname, " 61 char
sys_type TYPE abap_typekind, " SYSTEM
ui_type TYPE zdeui_ui_type, " Only for KIND = P
length TYPE i, " Only for KIND = P
decimals TYPE i, " Only for KIND = P
" For editing in ALV
rollname TYPE zdeui_db_field,
label TYPE dfies-fieldtext,
f4_table TYPE zdeui_f4_table,
" Table description
table_kind TYPE abap_tablekind,
unique TYPE abap_bool,
key TYPE abap_keydescr_tab,
key_defkind TYPE abap_keydefkind,
sub_fdesc TYPE string,
END OF ts_field_desc .
types:
tt_field_desc TYPE HASHED TABLE OF ts_field_desc WITH UNIQUE KEY name .
types:
tt_unique_type TYPE SORTED TABLE OF string WITH UNIQUE KEY table_line .
constants:
BEGIN OF MC_UI_TYPE,
" Simple UI types
CHAR type ZDEUI_UI_TYPE value 'char',
NUMC type ZDEUI_UI_TYPE value 'numc',
NUMERIC type ZDEUI_UI_TYPE value 'numeric',
BOOLEAN type ZDEUI_UI_TYPE value 'boolean',
DATE type ZDEUI_UI_TYPE value 'date',
TIME type ZDEUI_UI_TYPE value 'time',
DATETIME type ZDEUI_UI_TYPE value 'datetime',
" Complext UI types
STRING type ZDEUI_UI_TYPE value 'string',
RANGE type ZDEUI_UI_TYPE value 'range',
TABLE type ZDEUI_UI_TYPE value 'table',
" For tech only
STRUCT type ZDEUI_UI_TYPE value 'struct',
OBJECT type ZDEUI_UI_TYPE value 'object',
END OF MC_UI_TYPE .
class-methods GET_CATALOG
importing
value(IO_SALV) type ref to CL_SALV_TABLE optional
!IR_TABLE type ref to DATA optional
value(IR_STRUC) type ref to DATA optional
!IO_STRUC type ref to CL_ABAP_STRUCTDESCR optional
!IV_SORT type ABAP_BOOL optional
!IV_TUNE_UP type ABAP_BOOL default ABAP_TRUE
returning
value(RT_FIELDCAT) type LVC_T_FCAT .
class-methods GET_MOD_CATALOG
importing
!IR_TABLE type ref to DATA
!IT_MOD_CATALOG type LVC_T_FCAT
returning
value(RT_CATALOG) type LVC_T_FCAT .
class-methods IS_LIST_BOX
importing
!IV_TABNAME type DFIES-TABNAME
!IV_FIELDNAME type DFIES-FIELDNAME
exporting
!EV_LIST_BOX type ABAP_BOOL
!ES_SH_DESC type SHLP_DESCR .
class-methods SPLIT_TYPE
importing
!IV_DATATYPE type CSEQUENCE
exporting
!EV_TABLE type CSEQUENCE
!EV_FIELD type CSEQUENCE .
class-methods FIND_DROPDOWN
importing
!IO_GRID type ref to CL_GUI_ALV_GRID
changing
!CS_FIELDCAT type LVC_S_FCAT
!CV_DRDN_HNDL type I .
class-methods GET_FIELD_DESC
importing
!IV_FIELD_NAME type CSEQUENCE optional
!IV_DATA type ANY optional
!IS_SH_FIELD type DFIES optional
!IR_UNIQUE_TYPE type ref to TT_UNIQUE_TYPE optional
!IV_TECH type ABAP_BOOL optional
returning
value(RS_FIELD_DESC) type TS_FIELD_DESC
raising
ZCX_EUI_EXCEPTION .
class-methods CREATE_TYPE_DESCR
importing
!IV_ROLLNAME type CSEQUENCE optional
!IS_FIELD_DESC type TS_FIELD_DESC optional
value(IR_TYPE) type ref to DATA optional
returning
value(RO_TYPE) type ref to CL_ABAP_DATADESCR
raising
ZCX_EUI_EXCEPTION .
class-methods CREATE_STRUCTURE
importing
!IO_RANGE type ref to CL_ABAP_DATADESCR optional
!IV_SUB_FDESC type STRING optional
!IT_FIELD_DESC type TT_FIELD_DESC optional
returning
value(RO_STRUCT) type ref to CL_ABAP_STRUCTDESCR
raising
ZCX_EUI_EXCEPTION .
class-methods FIND_TABLE_FIELDNAME
importing
!IR_UNIQUE_TYPE type ref to TT_UNIQUE_TYPE
changing
!CV_ROLLNAME type CSEQUENCE
!CV_LABEL type CSEQUENCE optional .
class-methods GET_SUB_FIELD_DESC
importing
!IS_FIELD_DESC type TS_FIELD_DESC
returning
value(RT_FIELD_DESC) type TT_FIELD_DESC .
protected section.
private section.
*"* private components of class ZCL_EUI_TYPE
*"* do not include other source files here!!!
class-methods _ADD_COMP_INFO
importing
!IO_STRUC type ref to CL_ABAP_STRUCTDESCR
!IS_ROW type ANY
!IV_TECH type ABAP_BOOL
!IR_UNIQUE_TYPE type ref to TT_UNIQUE_TYPE
changing
!CS_FIELD_DESC type TS_FIELD_DESC
raising
ZCX_EUI_EXCEPTION .
class-methods _ADD_COMP_INFO_CLASS
importing
!IO_CLASS type ref to CL_ABAP_CLASSDESCR
!IO_INST type ANY
!IV_TECH type ABAP_BOOL
!IR_UNIQUE_TYPE type ref to TT_UNIQUE_TYPE
changing
!CS_FIELD_DESC type TS_FIELD_DESC
raising
ZCX_EUI_EXCEPTION .
ENDCLASS.
CLASS ZCL_EUI_TYPE IMPLEMENTATION.
METHOD create_structure.
DATA:
lt_comp TYPE abap_component_tab,
lt_sub_fdesc TYPE tt_field_desc,
lv_ok TYPE abap_bool.
FIELD-SYMBOLS:
<ls_field_desc> TYPE ts_field_desc,
<ls_subfield> TYPE ts_field_desc,
<ls_comp> LIKE LINE OF lt_comp.
" №2 For select-options
IF io_range IS NOT INITIAL.
APPEND INITIAL LINE TO lt_comp ASSIGNING <ls_comp>.
<ls_comp>-name = 'SIGN'.
<ls_comp>-type = cl_abap_elemdescr=>get_c( p_length = 1 ).
APPEND INITIAL LINE TO lt_comp ASSIGNING <ls_comp>.
<ls_comp>-name = 'OPTION'.
<ls_comp>-type = cl_abap_elemdescr=>get_c( p_length = 2 ).
APPEND INITIAL LINE TO lt_comp ASSIGNING <ls_comp>.
<ls_comp>-name = 'LOW'.
<ls_comp>-type = io_range.
APPEND INITIAL LINE TO lt_comp ASSIGNING <ls_comp>.
<ls_comp>-name = 'HIGH'.
<ls_comp>-type = io_range.
ENDIF.
" №3 For table's strcuture
DO 1 TIMES.
CHECK iv_sub_fdesc IS NOT INITIAL.
zcl_eui_conv=>from_json(
EXPORTING
iv_json = iv_sub_fdesc
IMPORTING
ex_data = lt_sub_fdesc
ev_ok = lv_ok ).
CHECK lv_ok = abap_true.
LOOP AT lt_sub_fdesc ASSIGNING <ls_subfield>.
APPEND INITIAL LINE TO lt_comp ASSIGNING <ls_comp>.
<ls_comp>-name = <ls_subfield>-name.
<ls_comp>-type = create_type_descr( is_field_desc = <ls_subfield> ).
ENDLOOP.
ENDDO.
" №4 Called from constructor if have in DB cluster
LOOP AT it_field_desc ASSIGNING <ls_field_desc>.
" Create sub levels
APPEND INITIAL LINE TO lt_comp ASSIGNING <ls_comp>.
<ls_comp>-name = <ls_field_desc>-name.
<ls_comp>-type = create_type_descr( is_field_desc = <ls_field_desc> ).
ENDLOOP.
* TRY.
ro_struct = cl_abap_structdescr=>create( lt_comp ).
* CATCH cx_sy_type_creation INTO DATA(lo_prev_error).
* zcx_eui_exception=>raise_sys_error( io_error = lo_prev_error ).
* ENDTRY.
ENDMETHOD.
METHOD create_type_descr.
DATA:
lo_line TYPE REF TO cl_abap_datadescr,
lo_prev_error TYPE REF TO cx_root,
lo_type TYPE REF TO cl_abap_typedescr.
DATA lv_sys_type TYPE abap_typekind.
DATA lv_message TYPE string.
" No type
CLEAR ro_type.
TRY.
" №0
IF is_field_desc IS SUPPLIED.
* " structure for DB
* IF mo_ui_ext IS NOT INITIAL.
* TRY.
* ir_type = mo_ui_ext->create_field_type(
* iv_name = is_field_desc-name
* iv_type = zif_prog_params_ui_ext=>mc_type_db ).
* CATCH cx_sy_dyn_call_illegal_method.
* CLEAR ir_type.
* ENDTRY.
* CHECK ir_type IS INITIAL.
* ENDIF.
" For tables speed 1
IF is_field_desc-rollname IS NOT INITIAL.
" Try to create
TRY.
ro_type = create_type_descr(
iv_rollname = is_field_desc-rollname ).
CATCH zcx_eui_exception.
CLEAR ro_type.
ENDTRY.
ENDIF.
IF ro_type IS INITIAL AND is_field_desc-ui_type <> mc_ui_type-struct.
lv_sys_type = is_field_desc-sys_type.
" For old option wrong is_field_desc-sys_type
IF lv_sys_type = cl_abap_typedescr=>typekind_table AND is_field_desc-ui_type = mc_ui_type-range.
" usually char
lv_sys_type = cl_abap_typedescr=>typekind_char.
" Show waning
CONCATENATE `No right type for ` is_field_desc-name ` ` is_field_desc-rollname `!` INTO lv_message.
MESSAGE lv_message TYPE 'S' DISPLAY LIKE 'W'.
ENDIF.
CASE lv_sys_type.
WHEN cl_abap_typedescr=>typekind_char.
ro_type = cl_abap_elemdescr=>get_c( p_length = is_field_desc-length ).
WHEN cl_abap_typedescr=>typekind_date.
ro_type = cl_abap_elemdescr=>get_d( ).
WHEN cl_abap_typedescr=>typekind_int.
ro_type = cl_abap_elemdescr=>get_i( ).
WHEN cl_abap_typedescr=>typekind_float.
ro_type = cl_abap_elemdescr=>get_f( ).
WHEN cl_abap_typedescr=>typekind_num.
ro_type = cl_abap_elemdescr=>get_n( p_length = is_field_desc-length ).
WHEN cl_abap_typedescr=>typekind_packed.
ro_type = cl_abap_elemdescr=>get_p( p_length = is_field_desc-length p_decimals = is_field_desc-decimals ).
WHEN cl_abap_typedescr=>typekind_string.
ro_type = cl_abap_elemdescr=>get_string( ).
WHEN cl_abap_typedescr=>typekind_time.
ro_type = cl_abap_elemdescr=>get_t( ).
WHEN cl_abap_typedescr=>typekind_table.
" Below in code CASE is_field_desc-ui_type.
WHEN OTHERS.
MESSAGE s015(zeui_message) WITH is_field_desc-name INTO sy-msgli.
zcx_eui_exception=>raise_sys_error( ).
ENDCASE.
ENDIF.
CASE is_field_desc-ui_type.
WHEN mc_ui_type-range.
IF ro_type IS INITIAL.
CONCATENATE `Cannot create range for ` is_field_desc-name ` ` is_field_desc-rollname `!` INTO lv_message.
zcx_eui_exception=>raise_sys_error( iv_message = lv_message ).
ENDIF.
" Call №2 recursion
lo_line = create_structure( io_range = ro_type ).
ro_type = cl_abap_tabledescr=>create( p_line_type = lo_line ).
WHEN mc_ui_type-table.
" Call №3 recursion
IF ro_type IS INITIAL.
ro_type = create_structure( iv_sub_fdesc = is_field_desc-sub_fdesc ).
ENDIF.
IF is_field_desc-table_kind = cl_abap_tabledescr=>tablekind_std
AND is_field_desc-key_defkind = 'U' " From 7.40 KEYDEFKIND_USER
AND is_field_desc-key IS INITIAL.
ro_type = cl_abap_tabledescr=>create( p_line_type = ro_type ). " 'D' - KEYDEFKIND_DEFAULT
ELSE.
ro_type = cl_abap_tabledescr=>create(
p_line_type = ro_type
p_table_kind = is_field_desc-table_kind
p_unique = is_field_desc-unique
p_key = is_field_desc-key
p_key_kind = is_field_desc-key_defkind ).
ENDIF.
WHEN mc_ui_type-struct.
ro_type = create_structure( iv_sub_fdesc = is_field_desc-sub_fdesc ).
ENDCASE.
ENDIF.
CHECK ro_type IS INITIAL.
" №0
IF iv_rollname NP '*-*'.
cl_abap_datadescr=>describe_by_name(
EXPORTING
p_name = iv_rollname
RECEIVING
p_descr_ref = lo_type
EXCEPTIONS
type_not_found = 1 ).
" Handle somewhere else
IF sy-subrc <> 0.
MESSAGE s017(zeui_message) WITH iv_rollname INTO sy-msgli.
zcx_eui_exception=>raise_sys_error( ).
ENDIF.
ro_type ?= lo_type.
RETURN.
ENDIF.
" №1 - Create from text
IF ir_type IS INITIAL AND iv_rollname IS NOT INITIAL.
CREATE DATA ir_type TYPE (iv_rollname).
ENDIF.
" №2 - Based on incoming reference
cl_abap_datadescr=>describe_by_data_ref(
EXPORTING
p_data_ref = ir_type
RECEIVING
p_descr_ref = lo_type
EXCEPTIONS
reference_is_initial = 1 ).
" Handle somewhere else
IF sy-subrc <> 0.
MESSAGE s017(zeui_message) WITH iv_rollname INTO sy-msgli.
zcx_eui_exception=>raise_sys_error( ).
ENDIF.
ro_type ?= lo_type.
CATCH cx_root INTO lo_prev_error.
CLEAR ro_type.
zcx_eui_exception=>raise_sys_error( io_error = lo_prev_error ).
ENDTRY.
ENDMETHOD.
METHOD find_dropdown.
DATA:
ls_sh_desc TYPE shlp_descr,
lv_list_box TYPE abap_bool,
lt_fielddescr TYPE ddfields,
ls_field TYPE REF TO dfies,
lt_field_desc TYPE tt_field_desc,
ls_field_desc TYPE ts_field_desc,
lo_struc TYPE REF TO cl_abap_structdescr,
lo_table TYPE REF TO cl_abap_tabledescr,
lr_table TYPE REF TO data,
lt_shlp_return TYPE STANDARD TABLE OF ddshretval,
ls_shlp_return TYPE REF TO ddshretval,
lv_prev_pos TYPE i,
ls_call_control TYPE ddshf4ctrl,
ls_fld_prop TYPE REF TO ddshfprop,
lt_shlp_descr_tab TYPE shlp_desct,
lt_shlp_record TYPE STANDARD TABLE OF seahlpres,
lt_dropdown TYPE lvc_t_dral,
ls_dropdown TYPE lvc_s_dral.
FIELD-SYMBOLS:
<lt_table> TYPE STANDARD TABLE,
<ls_row> TYPE any,
<lv_value> TYPE any,
<lv_low> TYPE any,
<lv_txt> TYPE csequence.
" No need
IF cs_fieldcat-ref_table = abap_undefined AND cs_fieldcat-ref_field = abap_undefined.
CLEAR cs_fieldcat-ref_table.
CLEAR cs_fieldcat-ref_field.
RETURN.
ENDIF.
" No need
CHECK cs_fieldcat-checkbox <> abap_true
AND cs_fieldcat-hotspot <> abap_true
AND cs_fieldcat-inttype <> cl_abap_typedescr=>typekind_int
AND cs_fieldcat-inttype <> 'b' "cl_abap_typedescr=>typekind_int1
AND cs_fieldcat-inttype <> 's' "cl_abap_typedescr=>typekind_int2
AND cs_fieldcat-inttype <> '8'."cl_abap_typedescr=>typekind_int8.
" Get top SH
is_list_box(
EXPORTING
iv_tabname = cs_fieldcat-ref_table
iv_fieldname = cs_fieldcat-ref_field
IMPORTING
ev_list_box = lv_list_box
es_sh_desc = ls_sh_desc ).
CHECK lv_list_box = abap_true.
" Work with copy
lt_fielddescr[] = ls_sh_desc-fielddescr[].
TRY.
" Strucure fields
LOOP AT lt_fielddescr REFERENCE INTO ls_field.
ls_field_desc = get_field_desc( is_sh_field = ls_field->* ).
INSERT ls_field_desc INTO TABLE lt_field_desc.
ENDLOOP.
" Output table
lo_struc = create_structure( it_field_desc = lt_field_desc ).
lo_table = cl_abap_tabledescr=>create( p_line_type = lo_struc ).
CATCH zcx_eui_exception.
RETURN.
ENDTRY.
" Asign it
CREATE DATA lr_table TYPE HANDLE lo_table.
ASSIGN lr_table->* TO <lt_table>.
CALL FUNCTION 'F4IF_SELECT_VALUES'
EXPORTING
shlp = ls_sh_desc
maxrows = 0 " all values of domain
call_shlp_exit = abap_true " 'SELECT' only!
TABLES
return_tab = lt_shlp_return.
**********************************************************************
" Copied from --> METHOD get_sh_table.
**********************************************************************
" Show all fields
LOOP AT ls_sh_desc-fieldprop REFERENCE INTO ls_fld_prop.
ls_fld_prop->shlpoutput = abap_true.
ENDLOOP.
" Call with SELECT event only (probably no texts)
IF ls_sh_desc-intdescr-selmexit IS INITIAL.
CALL FUNCTION 'F4IF_SELECT_VALUES'
EXPORTING
shlp = ls_sh_desc
maxrows = 0 " all values of domain
call_shlp_exit = abap_true " 'SELECT' only!
TABLES
return_tab = lt_shlp_return.
ELSE.
" Get records first
CALL FUNCTION 'F4IF_SELECT_VALUES'
EXPORTING
shlp = ls_sh_desc
maxrows = 0 " all values of domain
call_shlp_exit = abap_true
TABLES
record_tab = lt_shlp_record.
" Disp event
ls_call_control-step = 'DISP'.
ls_call_control-maxrecords = 0. " all values of domain
APPEND ls_sh_desc TO lt_shlp_descr_tab.
CALL FUNCTION ls_sh_desc-intdescr-selmexit
TABLES
shlp_tab = lt_shlp_descr_tab
record_tab = lt_shlp_record
CHANGING
shlp = ls_sh_desc
callcontrol = ls_call_control.
" To normal state -> lt_shlp_return
CLEAR lt_shlp_return.
PERFORM transform_outval IN PROGRAM saplsdsd
TABLES lt_shlp_record lt_shlp_return
USING ls_call_control ls_sh_desc.
ENDIF.
" Write data to table
lv_prev_pos = 0.
SORT ls_sh_desc-fielddescr BY fieldname.
LOOP AT lt_shlp_return REFERENCE INTO ls_shlp_return.
" New row ?
IF lv_prev_pos <> ls_shlp_return->recordpos.
APPEND INITIAL LINE TO <lt_table> ASSIGNING <ls_row>.
ENDIF.
lv_prev_pos = ls_shlp_return->recordpos.
" value
ASSIGN COMPONENT ls_shlp_return->fieldname OF STRUCTURE <ls_row> TO <lv_value>.
CHECK sy-subrc = 0.
" Copy field field
READ TABLE ls_sh_desc-fielddescr REFERENCE INTO ls_field BINARY SEARCH
WITH KEY fieldname = ls_shlp_return->fieldname.
" Special case for certain types
CASE ls_field->inttype.
WHEN cl_abap_typedescr=>typekind_time.
CONCATENATE ls_shlp_return->fieldval+0(2)
ls_shlp_return->fieldval+3(2)
ls_shlp_return->fieldval+6(2) INTO <lv_value>.
WHEN cl_abap_typedescr=>typekind_date.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = ls_shlp_return->fieldval
IMPORTING
date_internal = <lv_value>
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
CLEAR <lv_value>.
ENDIF.
" Integer, byte, short
WHEN cl_abap_typedescr=>typekind_int OR cl_abap_typedescr=>typekind_int1 OR cl_abap_typedescr=>typekind_int2.
REPLACE ALL OCCURRENCES OF '.' IN ls_shlp_return->fieldval WITH ''.
<lv_value> = ls_shlp_return->fieldval.
WHEN OTHERS.
<lv_value> = ls_shlp_return->fieldval.
ENDCASE.
ENDLOOP.
**********************************************************************
**********************************************************************
" Next handle
ADD 1 TO cv_drdn_hndl.
" Prepare field catalog
cs_fieldcat-drdn_hndl = cv_drdn_hndl.
cs_fieldcat-drdn_alias = abap_true.
LOOP AT <lt_table> ASSIGNING <ls_row>.
ASSIGN COMPONENT:
'_LOW' OF STRUCTURE <ls_row> TO <lv_low>,
'_TEXT' OF STRUCTURE <ls_row> TO <lv_txt>.
ls_dropdown-handle = cs_fieldcat-drdn_hndl.
ls_dropdown-int_value = <lv_low>.
ls_dropdown-value = <lv_low>.
CONCATENATE ls_dropdown-value ` - ` <lv_txt> INTO ls_dropdown-value.
" Add new item to dropdown
APPEND ls_dropdown TO lt_dropdown.
ENDLOOP.
io_grid->set_drop_down_table(
it_drop_down_alias = lt_dropdown ).
ENDMETHOD.
METHOD find_table_fieldname.
TYPES:
BEGIN OF ts_dd03l,
tabname TYPE dd03l-tabname,
fieldname TYPE dd03l-fieldname,
shlporigin TYPE dd03l-shlporigin,
"ddtext TYPE dd03t-ddtext,
tab_len TYPE i,
END OF ts_dd03l.
DATA:
lv_rollname TYPE rollname,
lt_dd03l TYPE STANDARD TABLE OF ts_dd03l,
ls_dd03l TYPE REF TO ts_dd03l,
lv_tabfld TYPE string,
ls_dd04t TYPE dd04t,
lo_type TYPE REF TO cl_abap_datadescr.
FIELD-SYMBOLS:
<lt_unique_type> TYPE tt_unique_type.
" Table Fields
CHECK cv_rollname IS NOT INITIAL.
lv_rollname = cv_rollname.
SELECT d~tabname d~fieldname d~shlporigin INTO CORRESPONDING FIELDS OF TABLE lt_dd03l "#EC TOO_MANY_ITAB_FIELDS
FROM dd03l AS d UP TO 100 ROWS
WHERE d~rollname = lv_rollname AND d~as4local = 'A' AND d~depth = 0.
" Find short table name
LOOP AT lt_dd03l REFERENCE INTO ls_dd03l.
ls_dd03l->tab_len = strlen( ls_dd03l->tabname ).
" In the end
IF ls_dd03l->shlporigin IS NOT INITIAL.
ls_dd03l->tab_len = ls_dd03l->tab_len - 1000.
ENDIF.
IF ls_dd03l->tabname CP '/*'.
ls_dd03l->tab_len = ls_dd03l->tab_len - 1000.
ENDIF.
ENDLOOP.
SORT lt_dd03l BY tab_len ASCENDING.
" Try to find
ASSIGN ir_unique_type->* TO <lt_unique_type>.
LOOP AT lt_dd03l REFERENCE INTO ls_dd03l.
CONCATENATE ls_dd03l->tabname '-' ls_dd03l->fieldname INTO lv_tabfld.
" if type exist
TRY.
lo_type = create_type_descr( iv_rollname = lv_tabfld ).
CATCH zcx_eui_exception.
CLEAR lo_type.
ENDTRY.
CHECK lo_type IS NOT INITIAL.
" Get next item
IF ir_unique_type IS NOT INITIAL.
READ TABLE <lt_unique_type> TRANSPORTING NO FIELDS
WITH TABLE KEY table_line = lv_tabfld.
CHECK sy-subrc <> 0.
" Do not repeat types
INSERT lv_tabfld INTO TABLE <lt_unique_type>.
ENDIF.
cv_rollname = lv_tabfld.
DO 1 TIMES.
" If have no text
CHECK cv_label IS SUPPLIED AND cv_label IS INITIAL.
" №2
SELECT SINGLE * INTO ls_dd04t
FROM dd04t
WHERE rollname = lv_rollname
AND ddlanguage = sy-langu
AND as4local = 'A'
AND as4vers = 0.
CHECK sy-subrc = 0.
IF ls_dd04t-ddtext IS NOT INITIAL.
cv_label = ls_dd04t-ddtext.
ELSE.
cv_label = ls_dd04t-reptext.
ENDIF.
ENDDO.
RETURN.
ENDLOOP.
ENDMETHOD.
METHOD get_catalog.
DATA:
lr_table TYPE REF TO data,
lr_columns TYPE REF TO cl_salv_columns_table,
lr_aggregations TYPE REF TO cl_salv_aggregations,
lo_error TYPE REF TO cx_salv_error.
FIELD-SYMBOLS:
<ls_data> TYPE any,
<lt_table> TYPE STANDARD TABLE,
<ls_fieldcat> LIKE LINE OF rt_fieldcat.
" №0 - If no SALV control
IF io_salv IS INITIAL.
" №1 - Based on structure description
IF io_struc IS NOT INITIAL.
CREATE DATA ir_struc TYPE HANDLE io_struc.
ENDIF.
" №2 - Based on standard table
IF ir_table IS NOT INITIAL.
ASSIGN ir_table->* TO <lt_table>.
ELSEIF ir_struc IS NOT INITIAL.
" №3 - Based on structure reference
ASSIGN ir_struc->* TO <ls_data>.
" Create table
CREATE DATA lr_table LIKE STANDARD TABLE OF <ls_data>.
ASSIGN lr_table->* TO <lt_table>.
ELSE. " zcx_eui_no_check=>raise_sys_error ?
zcx_eui_exception=>raise_dump( iv_message = `Pass 'IR_TABLE' or 'IR_STRUC' parameter` ).
ENDIF.
" Create temporary SALV control
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = io_salv
CHANGING
t_table = <lt_table> ).
CATCH cx_salv_error INTO lo_error. "#EC NO_HANDLER
MESSAGE lo_error TYPE 'S' DISPLAY LIKE 'E'.
RETURN.
ENDTRY.
ENDIF.
" Fields catalog
lr_columns = io_salv->get_columns( ).
lr_aggregations = io_salv->get_aggregations( ).
rt_fieldcat = cl_salv_controller_metadata=>get_lvc_fieldcatalog(
r_columns = lr_columns
r_aggregations = lr_aggregations ).
" For binary search only
IF iv_sort = abap_true.
SORT rt_fieldcat BY fieldname.
ENDIF.
" Default behaviour change field
CHECK iv_tune_up = abap_true.
" Small tune up
LOOP AT rt_fieldcat ASSIGNING <ls_fieldcat>.
<ls_fieldcat>-col_id = <ls_fieldcat>-col_pos = sy-tabix.
IF <ls_fieldcat>-coltext IS INITIAL.
<ls_fieldcat>-coltext = <ls_fieldcat>-reptext.
ENDIF.
IF <ls_fieldcat>-coltext IS INITIAL.
<ls_fieldcat>-coltext = <ls_fieldcat>-scrtext_l.
ENDIF.
IF <ls_fieldcat>-domname = 'XSDBOOLEAN'.
<ls_fieldcat>-checkbox = abap_true.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD get_field_desc.
FIELD-SYMBOLS <lv_row> TYPE any.
IF is_sh_field IS NOT INITIAL.
rs_field_desc-name = is_sh_field-fieldname.
rs_field_desc-sys_type = is_sh_field-inttype.
rs_field_desc-length = is_sh_field-leng.
rs_field_desc-decimals = is_sh_field-decimals.
rs_field_desc-label = is_sh_field-fieldtext.
rs_field_desc-rollname = is_sh_field-rollname.
ELSE.
DATA lo_type TYPE REF TO cl_abap_typedescr.
" №1 Type & value
lo_type = cl_abap_typedescr=>describe_by_data( iv_data ).
ASSIGN iv_data TO <lv_row>.
" With tech info
IF lo_type->type_kind = cl_abap_typedescr=>typekind_dref
AND iv_data IS NOT INITIAL
AND iv_tech = abap_true.
" №2 Type & value
lo_type = cl_abap_typedescr=>describe_by_data_ref( iv_data ).
ASSIGN iv_data->* TO <lv_row>.
ENDIF.
rs_field_desc-name = iv_field_name.
rs_field_desc-sys_type = lo_type->type_kind. "kind.
rs_field_desc-length = lo_type->length.
rs_field_desc-decimals = lo_type->decimals.
IF lo_type->is_ddic_type( ) = abap_true.
rs_field_desc-rollname = lo_type->get_relative_name( ).
ENDIF.
ENDIF.
CASE rs_field_desc-sys_type.
WHEN cl_abap_typedescr=>typekind_char.
" Get all boolean types
DATA lv_domname TYPE dd04l-domname.
SELECT SINGLE domname INTO lv_domname
FROM dd04l
WHERE rollname = rs_field_desc-rollname
AND as4local = 'A'
AND as4vers = 0000.
" Also CHAR
CASE lv_domname.
WHEN 'XSDBOOLEAN' OR 'OS_BOOLEAN'.
rs_field_desc-ui_type = mc_ui_type-boolean.
WHEN 'XSDDATETIME_Z' OR 'XSDDATETIME_LONG_Z' OR
'XSDDATETIME_OFFSET' OR 'XSDDATETIME_LOCAL' OR 'XSDDATETIME_LOCAL_DT'.
rs_field_desc-ui_type = mc_ui_type-datetime.
WHEN OTHERS.
rs_field_desc-ui_type = mc_ui_type-char.
" lv_find_db_field = abap_true.
ENDCASE.
WHEN cl_abap_typedescr=>typekind_num OR cl_abap_typedescr=>typekind_numeric.
rs_field_desc-ui_type = mc_ui_type-numc.
" lv_find_db_field = abap_true.
" Memo text
WHEN cl_abap_typedescr=>typekind_string.
rs_field_desc-ui_type = mc_ui_type-string.
rs_field_desc-rollname = 'STRINGVAL'.
WHEN cl_abap_typedescr=>typekind_struct1 OR cl_abap_typedescr=>typekind_struct2.
DATA lr_struct_descr TYPE REF TO cl_abap_structdescr.
IF iv_tech = abap_true.
lr_struct_descr ?= lo_type.
rs_field_desc-ui_type = mc_ui_type-struct.
ENDIF.
WHEN cl_abap_typedescr=>typekind_oref.
DATA lr_class_descr TYPE REF TO cl_abap_classdescr.
IF iv_tech = abap_true AND iv_data IS NOT INITIAL.
lr_class_descr ?= cl_abap_classdescr=>describe_by_object_ref( iv_data ).
rs_field_desc-ui_type = mc_ui_type-object.
ENDIF.
WHEN cl_abap_typedescr=>typekind_table.
DATA lr_table_descr TYPE REF TO cl_abap_tabledescr.
rs_field_desc-ui_type = mc_ui_type-table.
lr_table_descr ?= lo_type.
rs_field_desc-table_kind = lr_table_descr->table_kind.
rs_field_desc-unique = lr_table_descr->has_unique_key.
rs_field_desc-key = lr_table_descr->key.
rs_field_desc-key_defkind = lr_table_descr->key_defkind.
" No need for standardc table
IF rs_field_desc-table_kind = cl_abap_tabledescr=>tablekind_std.
CLEAR rs_field_desc-key.
ENDIF.
" Only for structures & objects
TRY.
lr_struct_descr ?= lr_table_descr->get_table_line_type( ).
CATCH cx_sy_move_cast_error.
MESSAGE s016(zeui_message) WITH rs_field_desc-name INTO sy-msgli.
zcx_eui_exception=>raise_sys_error( ).
ENDTRY.
" Get first row
FIELD-SYMBOLS <lt_value> TYPE ANY TABLE.
ASSIGN <lv_row> TO <lt_value>.
UNASSIGN <lv_row>.
LOOP AT <lt_value> ASSIGNING <lv_row>.
EXIT.
ENDLOOP.
" Create 1 row on a fly
IF <lv_row> IS NOT ASSIGNED.
" Create STANDARD table for field catalog!
DATA lr_row TYPE REF TO data.
CREATE DATA lr_row TYPE HANDLE lr_struct_descr.
ASSIGN lr_row->* TO <lv_row>.
ENDIF.
" Date
WHEN cl_abap_typedescr=>typekind_date.
rs_field_desc-ui_type = mc_ui_type-date.
" Time
WHEN cl_abap_typedescr=>typekind_time.
rs_field_desc-ui_type = mc_ui_type-time.
" Integer, byte, short
WHEN cl_abap_typedescr=>typekind_int OR cl_abap_typedescr=>typekind_int1 OR cl_abap_typedescr=>typekind_int2.
rs_field_desc-ui_type = mc_ui_type-numeric.
" Double
WHEN cl_abap_typedescr=>typekind_packed OR cl_abap_typedescr=>typekind_float OR
'/' OR 'a' OR 'e'. " cl_abap_typedescr=>typekind_decfloat OR cl_abap_typedescr=>typekind_decfloat16 OR cl_abap_typedescr=>typekind_decfloat34.
rs_field_desc-ui_type = mc_ui_type-numeric.
WHEN OTHERS.
ENDCASE.
" Structure & tables
IF lr_struct_descr IS NOT INITIAL.
_add_comp_info( EXPORTING io_struc = lr_struct_descr
iv_tech = iv_tech
ir_unique_type = ir_unique_type
is_row = <lv_row>
CHANGING cs_field_desc = rs_field_desc ).
ELSEIF lr_class_descr IS NOT INITIAL.
_add_comp_info_class( EXPORTING io_class = lr_class_descr
iv_tech = iv_tech
ir_unique_type = ir_unique_type
io_inst = <lv_row>
CHANGING cs_field_desc = rs_field_desc ).
ENDIF.
" TABLE-FIELDNAME from search help
IF is_sh_field-reffield IS NOT INITIAL.
CONCATENATE is_sh_field-reftable '-' is_sh_field-reffield INTO rs_field_desc-rollname.
ENDIF.
" Try to find TABLE-FIELDNAME
IF " lv_find_db_field = abap_true AND
rs_field_desc-ui_type <> mc_ui_type-table AND
rs_field_desc-ui_type <> mc_ui_type-string AND
rs_field_desc-rollname NP '*-*'.
find_table_fieldname(
EXPORTING
ir_unique_type = ir_unique_type
CHANGING
cv_rollname = rs_field_desc-rollname
cv_label = rs_field_desc-label ).
ENDIF.
" Set default text
IF rs_field_desc-label IS INITIAL.
rs_field_desc-label = rs_field_desc-name.
ENDIF.
ENDMETHOD.
METHOD get_mod_catalog.
DATA lt_catalog_fields TYPE abap_compdescr_tab. " Filled 1 time with all LVC_S_FCAT fields
DATA ls_mod_catalog LIKE LINE OF it_mod_catalog.
FIELD-SYMBOLS <ls_fieldcat> LIKE LINE OF rt_catalog.
FIELD-SYMBOLS <ls_mod_catalog> LIKE LINE OF it_mod_catalog.
" Get field catalog
rt_catalog = zcl_eui_type=>get_catalog( ir_table = ir_table ).
" Change field catalog
CLEAR lt_catalog_fields.
LOOP AT rt_catalog ASSIGNING <ls_fieldcat>.
LOOP AT it_mod_catalog ASSIGNING <ls_mod_catalog>.
" Start of group (1 symbol)
IF <ls_mod_catalog>-fieldname = '+'.
ls_mod_catalog = <ls_mod_catalog>.
CONTINUE.
ELSEIF <ls_mod_catalog>-fieldname(1) = '+'.
" Group continue
ls_mod_catalog-fieldname = <ls_mod_catalog>-fieldname+1.
ELSE.
" No group
ls_mod_catalog = <ls_mod_catalog>.
ENDIF.
" By mask ?
IF ls_mod_catalog-fieldname CS '*'.
CHECK <ls_fieldcat>-fieldname CP ls_mod_catalog-fieldname.
ELSE.
CHECK <ls_fieldcat>-fieldname = ls_mod_catalog-fieldname.
ENDIF.
CLEAR ls_mod_catalog-fieldname. " Do not copy field name
zcl_eui_conv=>move_corresponding(
EXPORTING
is_source = ls_mod_catalog
iv_except_initial = abap_true " <--- Move-corresponding except initial
CHANGING
cs_destination = <ls_fieldcat>
ct_component = lt_catalog_fields ).
ENDLOOP.
ENDLOOP.
ENDMETHOD.
METHOD get_sub_field_desc.
DATA lv_ok TYPE abap_bool.
zcl_eui_conv=>from_json( EXPORTING iv_json = is_field_desc-sub_fdesc
IMPORTING ev_ok = lv_ok
ex_data = rt_field_desc ).
CHECK lv_ok <> abap_true.
MESSAGE s022(zeui_message) WITH is_field_desc-name DISPLAY LIKE 'E'.
ENDMETHOD.
METHOD is_list_box.
CLEAR:
ev_list_box,
es_sh_desc.
CALL FUNCTION 'F4IF_DETERMINE_SEARCHHELP'
EXPORTING
tabname = iv_tabname
fieldname = iv_fieldname
IMPORTING
shlp = es_sh_desc
EXCEPTIONS
OTHERS = 1.
" Fixed values of domains
CHECK sy-subrc = 0 AND es_sh_desc-shlptype = 'FV'.
ev_list_box = abap_true.
ENDMETHOD.
METHOD split_type.
" Check is table and field name
CHECK iv_datatype CP '*-*'.
TRY.
" Exist in data dictionary?
zcl_eui_type=>create_type_descr( iv_rollname = iv_datatype ).
" DB and field
SPLIT iv_datatype AT '-' INTO ev_table ev_field.
CATCH zcx_eui_exception.
CLEAR:
ev_table,
ev_field.
ENDTRY.
ENDMETHOD.
METHOD _add_comp_info.
" For speed creation
IF io_struc->is_ddic_type( ) = abap_true.
DATA ls_header TYPE x030l.
ls_header = io_struc->get_ddic_header( ).
cs_field_desc-rollname = ls_header-tabname.
ENDIF.
CLEAR cs_field_desc-sub_fdesc.
DATA lt_sub_fdesc TYPE tt_field_desc. " lv_find_db_field TYPE abap_bool
DATA ls_subfield TYPE ts_field_desc.
FIELD-SYMBOLS <ls_comp_tab> TYPE abap_compdescr.
FIELD-SYMBOLS <lv_subvalue> TYPE any.
LOOP AT io_struc->components ASSIGNING <ls_comp_tab>.
ASSIGN COMPONENT <ls_comp_tab>-name OF STRUCTURE is_row TO <lv_subvalue>.
" Recursion
ls_subfield = get_field_desc( iv_field_name = <ls_comp_tab>-name
iv_data = <lv_subvalue>
ir_unique_type = ir_unique_type
iv_tech = iv_tech ).
" No need to save
IF cs_field_desc-ui_type = mc_ui_type-table AND iv_tech = abap_true
AND ls_subfield-ui_type IS INITIAL AND ls_subfield-sys_type = cl_abap_typedescr=>typekind_dref.
CONTINUE.
ENDIF.
INSERT ls_subfield INTO TABLE lt_sub_fdesc.
ENDLOOP.
cs_field_desc-sub_fdesc = zcl_eui_conv=>to_json( im_data = lt_sub_fdesc ).
**********************************************************************
" Select option ?
DATA lv_cnt TYPE i. "DO 1 TIMES.
lv_cnt = lines( lt_sub_fdesc ).
CHECK lv_cnt = 4
AND cs_field_desc-ui_type = mc_ui_type-table.
" Check by name
LOOP AT lt_sub_fdesc TRANSPORTING NO FIELDS WHERE
name = 'SIGN' OR name = 'OPTION' OR name = 'LOW' OR name = 'HIGH'. "#EC CI_HASHSEQ
lv_cnt = lv_cnt - 1.
ENDLOOP.
" Select-option
CHECK lv_cnt = 0.
cs_field_desc-ui_type = mc_ui_type-range.
" No need in components
CLEAR cs_field_desc-sub_fdesc.
" Where to find TABLE-FIELDNAME
FIELD-SYMBOLS <ls_subfield> LIKE ls_subfield.
READ TABLE lt_sub_fdesc ASSIGNING <ls_subfield>
WITH TABLE KEY name = 'LOW'.
cs_field_desc-rollname = <ls_subfield>-rollname.
cs_field_desc-label = <ls_subfield>-label.
" TODO Old options!!! cs_field_desc-sys_type = <ls_subfield>-sys_type.
" lv_find_db_field = abap_true.
ENDMETHOD.
METHOD _add_comp_info_class.
" For speed creation
IF io_class->is_ddic_type( ) = abap_true.
DATA ls_header TYPE x030l.
ls_header = io_class->get_ddic_header( ).
cs_field_desc-rollname = ls_header-tabname.
ENDIF.
CLEAR cs_field_desc-sub_fdesc.
DATA lt_sub_fdesc TYPE tt_field_desc. " lv_find_db_field TYPE abap_bool
DATA ls_subfield TYPE ts_field_desc.
FIELD-SYMBOLS <ls_attr> TYPE abap_attrdescr.
FIELD-SYMBOLS <lv_subvalue> TYPE any.
LOOP AT io_class->attributes ASSIGNING <ls_attr> WHERE visibility = cl_abap_objectdescr=>public.
DATA lv_field TYPE string.
CONCATENATE 'IO_INST->' <ls_attr>-name INTO lv_field.
ASSIGN (lv_field) TO <lv_subvalue>.
" Recursion
ls_subfield = get_field_desc( iv_field_name = <ls_attr>-name
iv_data = <lv_subvalue>
ir_unique_type = ir_unique_type
iv_tech = iv_tech ).
" No need to save
IF cs_field_desc-ui_type = mc_ui_type-table AND iv_tech = abap_true
AND ls_subfield-ui_type IS INITIAL AND ls_subfield-sys_type = cl_abap_typedescr=>typekind_dref.
CONTINUE.
ENDIF.
INSERT ls_subfield INTO TABLE lt_sub_fdesc.
ENDLOOP.
cs_field_desc-sub_fdesc = zcl_eui_conv=>to_json( im_data = lt_sub_fdesc ).
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
36,
10080,
62,
25216,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
36,
10080,
62,
25216,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
2099,
12,
7742,
82,
9564,
2969,
764,
628,
220,
3858,
25,
198,
220,
220,
220,
347,
43312,
3963,
40379,
62,
3245,
62,
20147,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
2934,
9019,
62,
35226,
62,
3672,
11,
366,
450,
499,
62,
35226,
3672,
11,
366,
8454,
1149,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
62,
4906,
220,
220,
220,
41876,
450,
499,
62,
4906,
11031,
11,
366,
36230,
198,
220,
220,
220,
220,
220,
220,
220,
334,
72,
62,
4906,
220,
220,
220,
220,
41876,
1976,
2934,
9019,
62,
9019,
62,
4906,
11,
366,
5514,
329,
509,
12115,
796,
350,
198,
220,
220,
220,
220,
220,
220,
220,
4129,
220,
220,
220,
220,
220,
41876,
1312,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5514,
329,
509,
12115,
796,
350,
198,
220,
220,
220,
220,
220,
220,
220,
875,
320,
874,
220,
220,
220,
41876,
1312,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5514,
329,
509,
12115,
796,
350,
198,
220,
220,
220,
220,
220,
220,
220,
366,
1114,
12857,
287,
8355,
53,
198,
220,
220,
220,
220,
220,
220,
220,
4836,
3672,
220,
220,
220,
41876,
1976,
2934,
9019,
62,
9945,
62,
3245,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6167,
220,
220,
220,
220,
220,
220,
41876,
47764,
444,
12,
3245,
5239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
277,
19,
62,
11487,
220,
220,
220,
41876,
1976,
2934,
9019,
62,
69,
19,
62,
11487,
11,
198,
220,
220,
220,
220,
220,
220,
220,
366,
8655,
6764,
198,
220,
220,
220,
220,
220,
220,
220,
3084,
62,
11031,
220,
41876,
450,
499,
62,
11487,
11031,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3748,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1994,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
2539,
20147,
81,
62,
8658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1994,
62,
4299,
11031,
41876,
450,
499,
62,
2539,
4299,
11031,
11,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
16344,
3798,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
40379,
62,
3245,
62,
20147,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
3245,
62,
20147,
41876,
367,
11211,
1961,
43679,
3963,
40379,
62,
3245,
62,
20147,
13315,
4725,
33866,
8924,
35374,
1438,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
34642,
62,
4906,
41876,
311,
9863,
1961,
43679,
3963,
4731,
13315,
4725,
33866,
8924,
35374,
3084,
62,
1370,
764,
628,
220,
38491,
25,
198,
220,
220,
347,
43312,
3963,
13122,
62,
10080,
62,
25216,
11,
198,
220,
220,
220,
366,
17427,
12454,
3858,
198,
220,
220,
220,
28521,
220,
220,
220,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
10641,
3256,
198,
220,
220,
220,
36871,
34,
220,
220,
220,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
22510,
66,
3256,
198,
220,
220,
220,
36871,
1137,
2149,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
77,
39223,
3256,
198,
220,
220,
220,
347,
6684,
2538,
1565,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
2127,
21052,
3256,
198,
220,
220,
220,
360,
6158,
220,
220,
220,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
4475,
3256,
198,
220,
220,
220,
20460,
220,
220,
220,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
2435,
3256,
198,
220,
220,
220,
360,
1404,
2767,
12789,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
19608,
8079,
3256,
198,
220,
220,
220,
366,
955,
1154,
742,
12454,
3858,
198,
220,
220,
220,
19269,
2751,
220,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
8841,
3256,
198,
220,
220,
220,
371,
27746,
220,
220,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
9521,
3256,
198,
220,
220,
220,
43679,
220,
220,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
11487,
3256,
198,
220,
220,
220,
366,
1114,
7261,
691,
198,
220,
220,
220,
19269,
18415,
220,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
7249,
3256,
198,
220,
220,
220,
25334,
23680,
220,
220,
2099,
1168,
7206,
10080,
62,
10080,
62,
25216,
1988,
705,
15252,
3256,
198,
220,
220,
23578,
3963,
13122,
62,
10080,
62,
25216,
764,
628,
220,
1398,
12,
24396,
82,
17151,
62,
34,
1404,
1847,
7730,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
1988,
7,
9399,
62,
50,
1847,
53,
8,
2099,
1006,
284,
7852,
62,
50,
1847,
53,
62,
38148,
11902,
198,
220,
220,
220,
220,
220,
5145,
4663,
62,
38148,
2099,
1006,
284,
42865,
11902,
198,
220,
220,
220,
220,
220,
1988,
7,
4663,
62,
18601,
9598,
8,
2099,
1006,
284,
42865,
11902,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
18601,
9598,
2099,
1006,
284,
7852,
62,
6242,
2969,
62,
46126,
30910,
9419,
11902,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
50,
9863,
2099,
9564,
2969,
62,
8202,
3535,
11902,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
51,
41884,
62,
8577,
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,
14181,
62,
11674,
3698,
9697,
1404,
8,
2099,
406,
15922,
62,
51,
62,
4851,
1404,
764,
198,
220,
1398,
12,
24396,
82,
17151,
62,
33365,
62,
34,
1404,
1847,
7730,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4663,
62,
38148,
2099,
1006,
284,
42865,
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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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
] |
*&---------------------------------------------------------------------*
*& Report ZTEST_BIS
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZTEST_BIS.
select single * from bsis INTO @data(lt_bsis). | [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
1168,
51,
6465,
62,
33,
1797,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
2200,
15490,
1168,
51,
6465,
62,
33,
1797,
13,
628,
198,
19738,
2060,
1635,
422,
275,
13429,
39319,
2488,
7890,
7,
2528,
62,
1443,
271,
737
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 LZFILE_UTILSF02.
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form fill_labels
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM fill_labels .
l_sear3 = 'Searchterm'.
l_sosz = 'File-Size'.
* l_soow = 'Owner'.
l_chd = 'Changed on'.
* l_fil = 'Filter ALV_TREE'.
l_fdd = 'Filter-Opts'.
l_cur = 'R-Cursor'.
l_clear = 'Clear Search-Opts'.
ENDFORM.
| [
9,
10097,
23031,
9,
198,
8162,
1268,
5097,
52,
7206,
406,
57,
25664,
62,
3843,
4146,
20802,
2999,
13,
198,
9,
10097,
23031,
9,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
5178,
6070,
62,
23912,
1424,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
2420,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
14610,
220,
279,
16,
220,
220,
220,
220,
220,
220,
220,
2420,
198,
9,
5,
1279,
438,
220,
279,
17,
220,
220,
220,
220,
220,
220,
220,
2420,
198,
9,
5,
10097,
30934,
9,
198,
21389,
6070,
62,
23912,
1424,
764,
198,
220,
300,
62,
325,
283,
18,
796,
705,
18243,
4354,
4458,
198,
220,
300,
62,
82,
418,
89,
796,
705,
8979,
12,
10699,
4458,
198,
9,
220,
300,
62,
568,
322,
796,
705,
42419,
4458,
198,
220,
300,
62,
354,
67,
796,
705,
31813,
319,
4458,
198,
9,
220,
300,
62,
10379,
796,
705,
22417,
8355,
53,
62,
51,
11587,
4458,
198,
220,
300,
62,
69,
1860,
796,
705,
22417,
12,
27871,
82,
4458,
198,
220,
300,
62,
22019,
796,
705,
49,
12,
34,
21471,
4458,
198,
220,
300,
62,
20063,
796,
705,
19856,
11140,
12,
27871,
82,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_advent2020_day05_joltdx DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_advent2020_joltdx .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_boarding_pass,
id TYPE i,
input TYPE string,
row TYPE i,
column TYPE i,
END OF ty_boarding_pass.
DATA mt_input TYPE STANDARD TABLE OF string WITH EMPTY KEY.
DATA mt_boarding_passes TYPE STANDARD TABLE OF ty_boarding_pass WITH EMPTY KEY.
METHODS part_1
RETURNING
VALUE(result) TYPE string.
METHODS part_2
RETURNING
VALUE(result) TYPE string.
METHODS read_boarding_pass
IMPORTING
input TYPE string
RETURNING
VALUE(result) TYPE ty_boarding_pass.
ENDCLASS.
CLASS ZCL_ADVENT2020_DAY05_joltdx IMPLEMENTATION.
METHOD zif_advent2020_joltdx~solve.
SPLIT input AT |\n| INTO TABLE DATA(lt_input).
LOOP AT lt_input INTO DATA(input_line).
APPEND read_boarding_pass( input_line ) TO mt_boarding_passes.
ENDLOOP.
output = |Part 1: { part_1( ) }. Part 2: { part_2( ) }|.
ENDMETHOD.
METHOD read_boarding_pass.
DATA iteration TYPE i.
DATA low TYPE i.
DATA high TYPE i VALUE 128.
DATA half_range TYPE i.
result-input = input.
DO 7 TIMES.
half_range = ( high - low ) DIV 2.
IF input+iteration(1) = 'F'.
high = high - half_range.
ELSE.
low = low + half_range.
ENDIF.
iteration = iteration + 1.
ENDDO.
result-row = low.
low = 0.
high = 8.
DO 3 TIMES.
half_range = ( high - low ) DIV 2.
IF input+iteration(1) = 'L'.
high = high - half_range.
ELSE.
low = low + half_range.
ENDIF.
iteration = iteration + 1.
ENDDO.
result-column = low.
result-id = ( result-row * 8 ) + result-column.
ENDMETHOD.
METHOD part_1.
DATA highest_id TYPE i.
LOOP AT mt_boarding_passes INTO DATA(boarding_pass).
IF boarding_pass-id > highest_id.
highest_id = boarding_pass-id.
ENDIF.
ENDLOOP.
result = highest_id.
ENDMETHOD.
METHOD part_2.
DATA previous_id TYPE i.
DATA my_seat TYPE ty_boarding_pass.
" SORT mt_boarding_passes BY id.
" LOOP AT mt_boarding_passes INTO DATA(boarding_pass).
" IF previous_id IS INITIAL.
" previous_id = boarding_pass-id.
" ELSEIF boarding_pass-id = previous_id + 2.
" result = boarding_pass-id - 1.
" RETURN.
" ENDIF.
" ENDLOOP.
DATA lt_ids TYPE STANDARD TABLE OF i.
LOOP AT mt_boarding_passes INTO DATA(boarding_pass).
APPEND boarding_pass-id TO lt_ids.
ENDLOOP.
SORT lt_ids.
LOOP AT lt_ids INTO DATA(id).
IF previous_id IS INITIAL.
previous_id = id.
CONTINUE.
ELSEIF id = previous_id + 2.
result = id - 1.
RETURN.
ENDIF.
previous_id = id.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
324,
1151,
42334,
62,
820,
2713,
62,
73,
5978,
34350,
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,
73,
5978,
34350,
764,
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,
1259,
62,
27794,
62,
6603,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
5128,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
5752,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
5721,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
27794,
62,
6603,
13,
628,
220,
220,
220,
42865,
45079,
62,
15414,
41876,
49053,
9795,
43679,
3963,
4731,
13315,
38144,
9936,
35374,
13,
198,
220,
220,
220,
42865,
45079,
62,
27794,
62,
6603,
274,
41876,
49053,
9795,
43679,
3963,
1259,
62,
27794,
62,
6603,
13315,
38144,
9936,
35374,
13,
628,
220,
220,
220,
337,
36252,
50,
636,
62,
16,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
636,
62,
17,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
1100,
62,
27794,
62,
6603,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5128,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
1259,
62,
27794,
62,
6603,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
2885,
53,
3525,
42334,
62,
26442,
2713,
62,
73,
5978,
34350,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
324,
1151,
42334,
62,
73,
5978,
34350,
93,
82,
6442,
13,
628,
220,
220,
220,
46341,
2043,
5128,
5161,
930,
59,
77,
91,
39319,
43679,
42865,
7,
2528,
62,
15414,
737,
198,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
15414,
39319,
42865,
7,
15414,
62,
1370,
737,
198,
220,
220,
220,
220,
220,
43504,
10619,
1100,
62,
27794,
62,
6603,
7,
5128,
62,
1370,
1267,
5390,
45079,
62,
27794,
62,
6603,
274,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
5072,
796,
930,
7841,
352,
25,
1391,
636,
62,
16,
7,
1267,
1782,
13,
2142,
362,
25,
1391,
636,
62,
17,
7,
1267,
1782,
91,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1100,
62,
27794,
62,
6603,
13,
198,
220,
220,
220,
42865,
24415,
41876,
1312,
13,
198,
220,
220,
220,
42865,
1877,
41876,
1312,
13,
198,
220,
220,
220,
42865,
1029,
41876,
1312,
26173,
8924,
13108,
13,
198,
220,
220,
220,
42865,
2063,
62,
9521,
41876,
1312,
13,
628,
220,
220,
220,
1255,
12,
15414,
796,
5128,
13,
628,
220,
220,
220,
8410,
767,
31742,
1546,
13,
198,
220,
220,
220,
220,
220,
2063,
62,
9521,
796,
357,
1029,
532,
1877,
1267,
360,
3824,
362,
13,
198,
220,
220,
220,
220,
220,
16876,
5128,
10,
2676,
341,
7,
16,
8,
796,
705,
37,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
1029,
796,
1029,
532,
2063,
62,
9521,
13,
198,
220,
220,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1877,
796,
1877,
1343,
2063,
62,
9521,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
24415,
796,
24415,
1343,
352,
13,
198,
220,
220,
220,
23578,
18227,
13,
628,
220,
220,
220,
1255,
12,
808,
796,
1877,
13,
628,
220,
220,
220,
1877,
796,
657,
13,
198,
220,
220,
220,
1029,
796,
807,
13,
198,
220,
220,
220,
8410,
513,
31742,
1546,
13,
198,
220,
220,
220,
220,
220,
2063,
62,
9521,
796,
357,
1029,
532,
1877,
1267,
360,
3824,
362,
13,
198,
220,
220,
220,
220,
220,
16876,
5128,
10,
2676,
341,
7,
16,
8,
796,
705,
43,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
1029,
796,
1029,
532,
2063,
62,
9521,
13,
198,
220,
220,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1877,
796,
1877,
1343,
2063,
62,
9521,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
24415,
796,
24415,
1343,
352,
13,
198,
220,
220,
220,
23578,
18227,
13,
198,
220,
220,
220,
1255,
12,
28665,
796,
1877,
13,
628,
220,
220,
220,
1255,
12,
312,
796,
357,
1255,
12,
808,
1635,
807,
1267,
1343,
1255,
12,
28665,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
636,
62,
16,
13,
198,
220,
220,
220,
42865,
4511,
62,
312,
41876,
1312,
13,
628,
220,
220,
220,
17579,
3185,
5161,
45079,
62,
27794,
62,
6603,
274,
39319,
42865,
7,
27794,
62,
6603,
737,
198,
220,
220,
220,
220,
220,
16876,
25523,
62,
6603,
12,
312,
1875,
4511,
62,
312,
13,
198,
220,
220,
220,
220,
220,
220,
220,
4511,
62,
312,
796,
25523,
62,
6603,
12,
312,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
1255,
796,
4511,
62,
312,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
636,
62,
17,
13,
198,
220,
220,
220,
42865,
2180,
62,
312,
41876,
1312,
13,
198,
220,
220,
220,
42865,
616,
62,
24073,
41876,
1259,
62,
27794,
62,
6603,
13,
628,
220,
220,
220,
366,
311,
9863,
45079,
62,
27794,
62,
6603,
274,
11050,
4686,
13,
198,
220,
220,
220,
366,
17579,
3185,
5161,
45079,
62,
27794,
62,
6603,
274,
39319,
42865,
7,
27794,
62,
6603,
737,
198,
220,
220,
220,
366,
220,
220,
16876,
2180,
62,
312,
3180,
3268
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
CLASS zcl_abapgit_item_graph DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor
IMPORTING
!it_items TYPE zif_abapgit_definitions=>ty_items_tt .
METHODS add_edge
IMPORTING
!is_from TYPE zif_abapgit_definitions=>ty_item
!is_to TYPE zif_abapgit_definitions=>ty_item .
METHODS has_vertices
RETURNING
VALUE(rv_bool) TYPE abap_bool .
METHODS get_next
IMPORTING
!ii_log TYPE REF TO zif_abapgit_log
RETURNING
VALUE(rs_item) TYPE zif_abapgit_definitions=>ty_item .
PRIVATE SECTION.
TYPES: BEGIN OF ty_edge,
from TYPE zif_abapgit_definitions=>ty_item,
to TYPE zif_abapgit_definitions=>ty_item,
END OF ty_edge.
DATA mt_vertices TYPE STANDARD TABLE OF zif_abapgit_definitions=>ty_item WITH DEFAULT KEY.
DATA mt_edges TYPE STANDARD TABLE OF ty_edge WITH DEFAULT KEY.
DATA mv_warning TYPE abap_bool.
METHODS remove_vertex IMPORTING iv_index TYPE i.
ENDCLASS.
CLASS ZCL_ABAPGIT_ITEM_GRAPH IMPLEMENTATION.
METHOD add_edge.
DATA ls_edge LIKE LINE OF mt_edges.
ASSERT is_from IS NOT INITIAL.
ASSERT is_to IS NOT INITIAL.
ls_edge-from = is_from.
ls_edge-to = is_to.
APPEND ls_edge TO mt_edges.
ENDMETHOD.
METHOD constructor.
INSERT LINES OF it_items INTO TABLE mt_vertices.
ENDMETHOD.
METHOD get_next.
* find a vertex with no inbound edges, if it does not exist pick anything
DATA ls_vertex LIKE LINE OF mt_vertices.
DATA lv_index TYPE i.
LOOP AT mt_vertices INTO ls_vertex.
lv_index = sy-tabix.
READ TABLE mt_edges WITH KEY
to-obj_type = ls_vertex-obj_type
to-obj_name = ls_vertex-obj_name
TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
remove_vertex( lv_index ).
rs_item = ls_vertex.
RETURN.
ENDIF.
ENDLOOP.
IF mv_warning = abap_false.
* only issue the warning once per graph
ii_log->add_warning( |Cycle detected in item graph| ).
mv_warning = abap_true.
ENDIF.
READ TABLE mt_vertices INTO rs_item INDEX 1.
ASSERT sy-subrc = 0.
remove_vertex( 1 ).
ENDMETHOD.
METHOD has_vertices.
rv_bool = boolc( lines( mt_vertices ) > 0 ).
ENDMETHOD.
METHOD remove_vertex.
DATA ls_vertex LIKE LINE OF mt_vertices.
READ TABLE mt_vertices INDEX iv_index INTO ls_vertex.
ASSERT sy-subrc = 0.
DELETE mt_vertices INDEX iv_index.
DELETE mt_edges WHERE
from-obj_type = ls_vertex-obj_type AND
from-obj_name = ls_vertex-obj_name.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
9186,
62,
34960,
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,
270,
62,
23814,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
23814,
62,
926,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
14907,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
6738,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
1462,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
764,
198,
220,
220,
220,
337,
36252,
50,
468,
62,
1851,
1063,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
30388,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
19545,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
6404,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6404,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
9186,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
14907,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
422,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
14907,
13,
628,
220,
220,
220,
42865,
45079,
62,
1851,
1063,
41876,
49053,
9795,
43679,
3963,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
13315,
5550,
38865,
35374,
13,
198,
220,
220,
220,
42865,
45079,
62,
276,
3212,
41876,
49053,
9795,
43679,
3963,
1259,
62,
14907,
13315,
5550,
38865,
35374,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
43917,
41876,
450,
499,
62,
30388,
13,
628,
220,
220,
220,
337,
36252,
50,
4781,
62,
332,
16886,
30023,
9863,
2751,
21628,
62,
9630,
41876,
1312,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
2043,
3620,
62,
10761,
31300,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
751,
62,
14907,
13,
198,
220,
220,
220,
42865,
43979,
62,
14907,
34178,
48920,
3963,
45079,
62,
276,
3212,
13,
198,
220,
220,
220,
24994,
17395,
318,
62,
6738,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
24994,
17395,
318,
62,
1462,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
43979,
62,
14907,
12,
6738,
796,
318,
62,
6738,
13,
198,
220,
220,
220,
43979,
62,
14907,
12,
1462,
220,
220,
796,
318,
62,
1462,
13,
198,
220,
220,
220,
43504,
10619,
43979,
62,
14907,
5390,
45079,
62,
276,
3212,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
29194,
17395,
43277,
1546,
3963,
340,
62,
23814,
39319,
43679,
45079,
62,
1851,
1063,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
19545,
13,
198,
9,
1064,
257,
37423,
351,
645,
287,
7784,
13015,
11,
611,
340,
857,
407,
2152,
2298,
1997,
628,
220,
220,
220,
42865,
43979,
62,
332,
16886,
34178,
48920,
3963,
45079,
62,
1851,
1063,
13,
198,
220,
220,
220,
42865,
300,
85,
62,
9630,
220,
41876,
1312,
13,
628,
220,
220,
220,
17579,
3185,
5161,
45079,
62,
1851,
1063,
39319,
43979,
62,
332,
16886,
13,
198,
220,
220,
220,
220,
220,
300,
85,
62,
9630,
796,
827,
12,
8658,
844,
13,
198,
220,
220,
220,
220,
220,
20832,
43679,
45079,
62,
276,
3212,
13315,
35374,
198,
220,
220,
220,
220,
220,
220,
220,
284,
12,
26801,
62,
4906,
796,
43979,
62,
332,
16886,
12,
26801,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
284,
12,
26801,
62,
3672,
796,
43979,
62,
332,
16886,
12,
26801,
62,
3672,
198,
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,
4781,
62,
332,
16886,
7,
300,
85,
62,
9630,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
44608,
62,
9186,
796,
43979,
62,
332,
16886,
13,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
16876,
285,
85,
62,
43917,
796,
450,
499,
62,
9562,
13,
198,
9,
691,
2071,
262,
6509,
1752,
583,
4823,
198,
220,
220,
220,
220,
220,
21065,
62,
6404,
3784,
2860,
62,
43917,
7,
930,
20418,
2375,
12326,
287,
2378,
4823,
91,
6739,
198,
220,
220,
220,
220,
220,
285,
85,
62,
43917,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
20832,
43679,
45079,
62,
1851,
1063,
39319,
44608,
62,
9186,
24413,
6369,
352,
13,
198,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
4781,
62,
332,
16886,
7,
352,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
468,
62,
1851,
1063,
13,
198,
220,
220,
220,
374,
85,
62,
30388,
796,
20512,
66,
7,
3951,
7,
45079,
62,
1851,
1063,
1267,
1875,
657,
6739,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
CLASS ycl_abapgit_gui_page_settings DEFINITION
PUBLIC
FINAL
CREATE PUBLIC INHERITING FROM ycl_abapgit_gui_page.
PUBLIC SECTION.
INTERFACES: yif_abapgit_gui_page_hotkey.
CONSTANTS:
BEGIN OF c_action,
save_settings TYPE string VALUE 'save_settings',
END OF c_action.
METHODS constructor.
METHODS yif_abapgit_gui_page~on_event REDEFINITION.
PROTECTED SECTION.
METHODS render_content REDEFINITION.
PRIVATE SECTION.
DATA:
mo_settings TYPE REF TO ycl_abapgit_settings,
mv_error TYPE abap_bool,
mt_post_fields TYPE tihttpnvp.
METHODS render_proxy
RETURNING VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS render_development_internals
RETURNING VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS render_form_begin
RETURNING VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS render_form_end
RETURNING VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS render_max_lines
RETURNING VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS render_adt_jump_enabled
RETURNING VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS render_commit_msg
RETURNING VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS build_settings
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
ycx_abapgit_exception.
METHODS read_settings.
METHODS render_section_begin
IMPORTING
iv_header TYPE csequence
RETURNING VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS render_section_end
RETURNING VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS render_start_up
RETURNING
VALUE(ro_html) TYPE REF TO ycl_abapgit_html.
METHODS render_link_hints
RETURNING
VALUE(ro_html) TYPE REF TO ycl_abapgit_html
RAISING
ycx_abapgit_exception.
METHODS render_hotkeys
RETURNING
VALUE(ro_html) TYPE REF TO ycl_abapgit_html
RAISING
ycx_abapgit_exception.
METHODS get_possible_hotkey_actions
RETURNING
VALUE(rt_hotkey_actions) TYPE yif_abapgit_gui_page_hotkey=>tty_hotkey_action
RAISING
ycx_abapgit_exception.
METHODS get_default_hotkeys
RETURNING
VALUE(rt_default_hotkeys) TYPE yif_abapgit_definitions=>tty_hotkey
RAISING
ycx_abapgit_exception.
METHODS is_post_field_checked
IMPORTING
iv_name TYPE string
RETURNING
value(rv_return) TYPE abap_bool.
ENDCLASS.
CLASS YCL_ABAPGIT_GUI_PAGE_SETTINGS IMPLEMENTATION.
METHOD build_settings.
DATA: lv_i_param_value TYPE i,
lv_column TYPE string,
lt_key_bindings TYPE yif_abapgit_definitions=>tty_hotkey.
FIELD-SYMBOLS: <ls_post_field> TYPE ihttpnvp,
<ls_key_binding> TYPE yif_abapgit_definitions=>ty_hotkey.
CREATE OBJECT mo_settings.
mt_post_fields = it_post_fields.
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.
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.
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.
READ TABLE mt_post_fields ASSIGNING <ls_post_field> WITH KEY name = 'link_hint_background_color'.
IF sy-subrc = 0.
mo_settings->set_link_hint_background_color( |{ <ls_post_field>-value }| ).
ENDIF.
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 < ycl_abapgit_settings=>c_commitmsg_comment_length_dft.
lv_i_param_value = ycl_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( ycl_abapgit_settings=>c_commitmsg_comment_length_dft ).
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 < ycl_abapgit_settings=>c_commitmsg_body_size_dft.
lv_i_param_value = ycl_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( ycl_abapgit_settings=>c_commitmsg_body_size_dft ).
ENDIF.
LOOP AT mt_post_fields ASSIGNING <ls_post_field> WHERE name CP 'key*'.
FIND FIRST OCCURRENCE OF REGEX `key_(.*)_`
IN <ls_post_field>-name
SUBMATCHES lv_column.
INSERT INITIAL LINE INTO TABLE lt_key_bindings ASSIGNING <ls_key_binding>.
CASE lv_column.
WHEN 'sequence'.
<ls_key_binding>-sequence = <ls_post_field>-value.
WHEN 'action'.
<ls_key_binding>-action = <ls_post_field>-value.
ENDCASE.
ENDLOOP.
DELETE lt_key_bindings WHERE sequence IS INITIAL
OR action IS INITIAL.
mo_settings->set_hotkeys( lt_key_bindings ).
ENDMETHOD.
METHOD constructor.
super->constructor( ).
ms_control-page_title = 'SETTINGS'.
ENDMETHOD. " constructor.
METHOD get_default_hotkeys.
DATA: lt_actions TYPE yif_abapgit_gui_page_hotkey=>tty_hotkey_action,
ls_hotkey LIKE LINE OF rt_default_hotkeys.
FIELD-SYMBOLS: <ls_action> LIKE LINE OF lt_actions.
lt_actions = ycl_abapgit_hotkeys=>get_default_hotkeys_from_pages( ).
LOOP AT lt_actions ASSIGNING <ls_action>.
ls_hotkey-action = <ls_action>-action.
ls_hotkey-sequence = <ls_action>-default_hotkey.
INSERT ls_hotkey INTO TABLE rt_default_hotkeys.
ENDLOOP.
ENDMETHOD.
METHOD get_possible_hotkey_actions.
DATA: ls_hotkey_action LIKE LINE OF rt_hotkey_actions.
rt_hotkey_actions = ycl_abapgit_hotkeys=>get_default_hotkeys_from_pages( ).
" insert empty row at the beginning, so that we can unset a hotkey
INSERT ls_hotkey_action INTO rt_hotkey_actions INDEX 1.
ENDMETHOD.
METHOD parse_post.
DATA lv_serialized_post_data TYPE string.
CONCATENATE LINES OF it_postdata INTO lv_serialized_post_data.
rt_post_fields = ycl_abapgit_html_action_utils=>parse_fields( lv_serialized_post_data ).
ENDMETHOD.
METHOD persist_settings.
DATA lo_settings_persistence TYPE REF TO ycl_abapgit_persist_settings.
lo_settings_persistence = ycl_abapgit_persist_settings=>get_instance( ).
lo_settings_persistence->modify( mo_settings ).
MESSAGE 'Settings succesfully saved' TYPE 'S'.
ENDMETHOD.
METHOD read_settings.
DATA lo_settings_persistence TYPE REF TO ycl_abapgit_persist_settings.
lo_settings_persistence = ycl_abapgit_persist_settings=>get_instance( ).
mo_settings = lo_settings_persistence->read( ).
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="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 ro_html.
read_settings( ).
ro_html->add( render_form_begin( ) ).
ro_html->add( render_section_begin( |Global settings| ) ).
ro_html->add( render_proxy( ) ).
ro_html->add( |<hr>| ).
ro_html->add( render_commit_msg( ) ).
ro_html->add( |<hr>| ).
ro_html->add( render_development_internals( ) ).
ro_html->add( render_section_end( ) ).
ro_html->add( render_section_begin( |User specific settings| ) ).
ro_html->add( render_start_up( ) ).
ro_html->add( render_max_lines( ) ).
ro_html->add( |<hr>| ).
ro_html->add( render_adt_jump_enabled( ) ).
ro_html->add( |<hr>| ).
ro_html->add( render_link_hints( ) ).
ro_html->add( |<hr>| ).
ro_html->add( render_hotkeys( ) ).
ro_html->add( render_section_end( ) ).
ro_html->add( render_form_end( ) ).
ENDMETHOD. "render_content
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="submit">' ).
ro_html->add( '</form>' ).
ro_html->add( '</div>' ).
ENDMETHOD.
METHOD render_hotkeys.
DATA: lv_index TYPE i,
lt_hotkeys TYPE yif_abapgit_definitions=>tty_hotkey,
lv_selected TYPE string,
lt_actions TYPE yif_abapgit_gui_page_hotkey=>tty_hotkey_action.
FIELD-SYMBOLS: <ls_key_binding> LIKE LINE OF lt_hotkeys,
<ls_action> LIKE LINE OF lt_actions.
lt_hotkeys = mo_settings->get_hotkeys( ).
IF lines( lt_hotkeys ) = 0.
lt_hotkeys = get_default_hotkeys( ).
ENDIF.
DO 3 TIMES.
APPEND INITIAL LINE TO lt_hotkeys.
ENDDO.
CREATE OBJECT ro_html.
ro_html->add( |<h2>Hotkeys</h2>| ).
ro_html->add( |(Only available with installed abapGit repo)| ).
ro_html->add( |<br/>| ).
ro_html->add( |<br/>| ).
ro_html->add( '<table class="repo_tab" id="key_bindings" style="max-width: 300px;">' ).
ro_html->add( '<tr><th>key</th><th>action</th></tr>' ).
lt_actions = get_possible_hotkey_actions( ).
LOOP AT lt_hotkeys ASSIGNING <ls_key_binding>.
lv_index = sy-tabix.
ro_html->add( '<tr>' ).
ro_html->add( |<td><input name="key_sequence_{ lv_index }" maxlength=1 type="text" | &&
|value="{ <ls_key_binding>-sequence }"></td>| ).
ro_html->add( |<td><select name="key_action_{ lv_index }">| ).
LOOP AT lt_actions ASSIGNING <ls_action>.
IF <ls_key_binding>-action = <ls_action>-action.
lv_selected = 'selected'.
ELSE.
CLEAR: lv_selected.
ENDIF.
ro_html->add( |<option value="{ <ls_action>-action }" |
&& |{ lv_selected }>|
&& |{ <ls_action>-name }</option>| ).
ENDLOOP.
ro_html->add( '</select></td>' ).
ro_html->add( '</tr>' ).
ENDLOOP.
ro_html->add( '</select></td>' ).
ro_html->add( '</tr>' ).
ro_html->add( '</table>' ).
ro_html->add( |<br>| ).
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_link_hints.
DATA: lv_checked TYPE string,
lv_link_hint_key TYPE char01,
lv_link_background_color TYPE string.
IF mo_settings->get_link_hints_enabled( ) = abap_true.
lv_checked = 'checked'.
ENDIF.
lv_link_hint_key = mo_settings->get_link_hint_key( ).
lv_link_background_color = mo_settings->get_link_hint_background_color( ).
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>| ).
ro_html->add( |<input type="text" name="link_hint_background_color" size="20" maxlength="20"|
&& | value="{ lv_link_background_color }"|
&& |> Background Color (HTML colors e.g. lightgreen or #42f47a)| ).
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_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>| ).
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 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 yif_abapgit_gui_page_hotkey~get_hotkey_actions.
ENDMETHOD.
METHOD yif_abapgit_gui_page~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 ).
build_settings( 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 = yif_abapgit_definitions=>c_event_state-go_back.
ENDCASE.
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.
IF <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.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
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,
331,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
25,
331,
361,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
8940,
2539,
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,
41876,
4731,
26173,
8924,
705,
21928,
62,
33692,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
2673,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
13,
198,
220,
220,
220,
337,
36252,
50,
331,
361,
62,
397,
499,
18300,
62,
48317,
62,
7700,
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,
25,
198,
220,
220,
220,
220,
220,
6941,
62,
33692,
220,
220,
220,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
33692,
11,
198,
220,
220,
220,
220,
220,
285,
85,
62,
18224,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
45079,
62,
7353,
62,
25747,
41876,
46668,
4023,
77,
36133,
13,
628,
220,
220,
220,
337,
36252,
50,
8543,
62,
36436,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
31267,
62,
23124,
874,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
687,
62,
27471,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
687,
62,
437,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
9806,
62,
6615,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
324,
83,
62,
43327,
62,
25616,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
41509,
62,
19662,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
1382,
62,
33692,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
7353,
62,
25747,
41876,
46668,
4023,
77,
36133,
13,
198,
220,
220,
220,
337,
36252,
50,
26571,
62,
33692,
13,
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,
340,
62,
7353,
7890,
220,
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,
13,
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,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
220,
220,
220,
337,
36252,
50,
1100,
62,
33692,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
5458,
62,
27471,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
25677,
220,
220,
220,
220,
220,
41876,
269,
43167,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
5458,
62,
437,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
9688,
62,
929,
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,
331,
565,
62,
397,
499,
18300,
62,
6494,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
8726,
62,
71,
29503,
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,
331,
565,
62,
397,
499,
18300,
62,
6494,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
8940,
13083,
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,
331,
565,
62,
397,
499,
18300,
62,
6494,
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,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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
] |
CLASS zcl_excel_common DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
*"* public components of class ZCL_EXCEL_COMMON
*"* do not include other source files here!!!
PUBLIC SECTION.
CONSTANTS c_excel_baseline_date TYPE d VALUE '19000101'. "#EC NOTEXT
CLASS-DATA c_excel_numfmt_offset TYPE int1 VALUE 164. "#EC NOTEXT . . . . . . . . . . . . . . . . " .
CONSTANTS c_excel_sheet_max_col TYPE int4 VALUE 16384. "#EC NOTEXT
CONSTANTS c_excel_sheet_min_col TYPE int4 VALUE 1. "#EC NOTEXT
CONSTANTS c_excel_sheet_max_row TYPE int4 VALUE 1048576. "#EC NOTEXT
CONSTANTS c_excel_sheet_min_row TYPE int4 VALUE 1. "#EC NOTEXT
CLASS-DATA c_spras_en TYPE spras VALUE 'E'. "#EC NOTEXT . . . . . . . . . . . . . . . . " .
CLASS-DATA o_conv TYPE REF TO cl_abap_conv_out_ce .
CONSTANTS c_excel_1900_leap_year TYPE d VALUE '19000228'. "#EC NOTEXT
CLASS-DATA c_xlsx_file_filter TYPE string VALUE 'Excel Workbook (*.xlsx)|*.xlsx|'. "#EC NOTEXT . . . . . . . " .
CLASS-METHODS class_constructor .
CLASS-METHODS describe_structure
IMPORTING
!io_struct TYPE REF TO cl_abap_structdescr
RETURNING
VALUE(rt_dfies) TYPE ddfields .
CLASS-METHODS convert_column2alpha
IMPORTING
!ip_column TYPE simple
RETURNING
VALUE(ep_column) TYPE zexcel_cell_column_alpha
RAISING
zcx_excel .
CLASS-METHODS convert_column2int
IMPORTING
!ip_column TYPE simple
RETURNING
VALUE(ep_column) TYPE zexcel_cell_column
RAISING
zcx_excel .
CLASS-METHODS convert_columnrow2column_a_row
IMPORTING
!i_columnrow TYPE clike
EXPORTING
!e_column TYPE zexcel_cell_column_alpha
!e_row TYPE zexcel_cell_row .
CLASS-METHODS convert_range2column_a_row
IMPORTING
!i_range TYPE clike
EXPORTING
!e_column_start TYPE zexcel_cell_column_alpha
!e_column_end TYPE zexcel_cell_column_alpha
!e_row_start TYPE zexcel_cell_row
!e_row_end TYPE zexcel_cell_row
!e_sheet TYPE clike
RAISING
zcx_excel .
CLASS-METHODS date_to_excel_string
IMPORTING
!ip_value TYPE d
RETURNING
VALUE(ep_value) TYPE zexcel_cell_value .
CLASS-METHODS encrypt_password
IMPORTING
!i_pwd TYPE zexcel_aes_password
RETURNING
VALUE(r_encrypted_pwd) TYPE zexcel_aes_password .
CLASS-METHODS escape_string
IMPORTING
!ip_value TYPE clike
RETURNING
VALUE(ep_escaped_value) TYPE string .
CLASS-METHODS unescape_string
IMPORTING
!iv_escaped TYPE clike
RETURNING
VALUE(ev_unescaped_string) TYPE string
RAISING
zcx_excel .
CLASS-METHODS excel_string_to_date
IMPORTING
!ip_value TYPE zexcel_cell_value
RETURNING
VALUE(ep_value) TYPE d
RAISING
zcx_excel .
CLASS-METHODS excel_string_to_time
IMPORTING
!ip_value TYPE zexcel_cell_value
RETURNING
VALUE(ep_value) TYPE t
RAISING
zcx_excel .
CLASS-METHODS excel_string_to_number
IMPORTING
!ip_value TYPE zexcel_cell_value
RETURNING
VALUE(ep_value) TYPE f
RAISING
zcx_excel .
CLASS-METHODS get_fieldcatalog
IMPORTING
!ip_table TYPE STANDARD TABLE
!iv_hide_mandt TYPE abap_bool DEFAULT abap_true
RETURNING
VALUE(ep_fieldcatalog) TYPE zexcel_t_fieldcatalog .
CLASS-METHODS number_to_excel_string
IMPORTING
VALUE(ip_value) TYPE numeric
RETURNING
VALUE(ep_value) TYPE zexcel_cell_value .
CLASS-METHODS recursive_class_to_struct
IMPORTING
!i_source TYPE any
CHANGING
!e_target TYPE data
!e_targetx TYPE data .
CLASS-METHODS recursive_struct_to_class
IMPORTING
!i_source TYPE data
!i_sourcex TYPE data
CHANGING
!e_target TYPE any .
CLASS-METHODS time_to_excel_string
IMPORTING
!ip_value TYPE t
RETURNING
VALUE(ep_value) TYPE zexcel_cell_value .
TYPE-POOLS abap .
TYPES: t_char10 TYPE c LENGTH 10.
CLASS-METHODS split_file
IMPORTING
!ip_file TYPE text255
EXPORTING
!ep_file TYPE text255
!ep_extension TYPE t_char10
!ep_dotextension TYPE t_char10 .
CLASS-METHODS calculate_cell_distance
IMPORTING
!iv_reference_cell TYPE clike
!iv_current_cell TYPE clike
EXPORTING
!ev_row_difference TYPE i
!ev_col_difference TYPE i
RAISING
zcx_excel .
CLASS-METHODS determine_resulting_formula
IMPORTING
!iv_reference_cell TYPE clike
!iv_reference_formula TYPE clike
!iv_current_cell TYPE clike
RETURNING
VALUE(ev_resulting_formula) TYPE string
RAISING
zcx_excel .
CLASS-METHODS shift_formula
IMPORTING
!iv_reference_formula TYPE clike
VALUE(iv_shift_cols) TYPE i
VALUE(iv_shift_rows) TYPE i
RETURNING
VALUE(ev_resulting_formula) TYPE string
RAISING
zcx_excel .
CLASS-METHODS is_cell_in_range
IMPORTING
!ip_column TYPE simple
!ip_row TYPE zexcel_cell_row
!ip_range TYPE clike
RETURNING
VALUE(rp_in_range) TYPE abap_bool
RAISING
zcx_excel .
*"* protected components of class ZCL_EXCEL_COMMON
*"* do not include other source files here!!!
*"* protected components of class ZCL_EXCEL_COMMON
*"* do not include other source files here!!!
PROTECTED SECTION.
PRIVATE SECTION.
CLASS-DATA c_excel_col_module TYPE int2 VALUE 64. "#EC NOTEXT . . . . . . . . . . . . . . . " .
CLASS-METHODS structure_case
IMPORTING
!is_component TYPE abap_componentdescr
CHANGING
!xt_components TYPE abap_component_tab .
CLASS-METHODS structure_recursive
IMPORTING
!is_component TYPE abap_componentdescr
RETURNING
VALUE(rt_components) TYPE abap_component_tab .
CLASS-METHODS char2hex
IMPORTING
!i_char TYPE char1
RETURNING
VALUE(r_hex) TYPE zexcel_pwd_hash .
CLASS-METHODS shl01
IMPORTING
!i_pwd_hash TYPE zexcel_pwd_hash
RETURNING
VALUE(r_pwd_hash) TYPE zexcel_pwd_hash .
CLASS-METHODS shr14
IMPORTING
!i_pwd_hash TYPE zexcel_pwd_hash
RETURNING
VALUE(r_pwd_hash) TYPE zexcel_pwd_hash .
ENDCLASS.
CLASS zcl_excel_common IMPLEMENTATION.
METHOD calculate_cell_distance.
DATA: lv_reference_row TYPE i,
lv_reference_col_alpha TYPE zexcel_cell_column_alpha,
lv_reference_col TYPE i,
lv_current_row TYPE i,
lv_current_col_alpha TYPE zexcel_cell_column_alpha,
lv_current_col TYPE i.
*--------------------------------------------------------------------*
* Split reference cell into numerical row/column representation
*--------------------------------------------------------------------*
convert_columnrow2column_a_row( EXPORTING
i_columnrow = iv_reference_cell
IMPORTING
e_column = lv_reference_col_alpha
e_row = lv_reference_row ).
lv_reference_col = convert_column2int( lv_reference_col_alpha ).
*--------------------------------------------------------------------*
* Split current cell into numerical row/column representation
*--------------------------------------------------------------------*
convert_columnrow2column_a_row( EXPORTING
i_columnrow = iv_current_cell
IMPORTING
e_column = lv_current_col_alpha
e_row = lv_current_row ).
lv_current_col = convert_column2int( lv_current_col_alpha ).
*--------------------------------------------------------------------*
* Calculate row and column difference
* Positive: Current cell below reference cell
* or Current cell right of reference cell
* Negative: Current cell above reference cell
* or Current cell left of reference cell
*--------------------------------------------------------------------*
ev_row_difference = lv_current_row - lv_reference_row.
ev_col_difference = lv_current_col - lv_reference_col.
ENDMETHOD.
METHOD char2hex.
IF o_conv IS NOT BOUND.
o_conv = cl_abap_conv_out_ce=>create( endian = 'L'
ignore_cerr = abap_true
replacement = '#' ).
ENDIF.
CALL METHOD o_conv->reset( ).
CALL METHOD o_conv->write( data = i_char ).
r_hex+1 = o_conv->get_buffer( ). " x'65' must be x'0065'
ENDMETHOD.
METHOD class_constructor.
c_xlsx_file_filter = 'Excel Workbook (*.xlsx)|*.xlsx|'(005).
ENDMETHOD.
METHOD convert_column2alpha.
DATA: lv_uccpi TYPE i,
lv_text TYPE sychar02,
lv_module TYPE int4,
lv_column TYPE zexcel_cell_column.
STATICS: sv_prev_in LIKE lv_column,
sv_prev_out LIKE ep_column.
* Propagate zcx_excel if error occurs " issue #155 - less restrictive typing for ip_column
lv_column = convert_column2int( ip_column ). " issue #155 - less restrictive typing for ip_column
*--------------------------------------------------------------------*
* Check whether column is in allowed range for EXCEL to handle ( 1-16384 )
*--------------------------------------------------------------------*
IF lv_column > 16384
OR lv_column < 1.
zcx_excel=>raise_text( 'Index out of bounds' ).
ENDIF.
*--------------------------------------------------------------------*
* Look up for previous succesfull cached result
*--------------------------------------------------------------------*
IF lv_column = sv_prev_in AND sv_prev_out IS NOT INITIAL.
ep_column = sv_prev_out.
RETURN.
ELSE.
CLEAR sv_prev_out.
sv_prev_in = lv_column.
ENDIF.
*--------------------------------------------------------------------*
* Build alpha representation of column
*--------------------------------------------------------------------*
WHILE lv_column GT 0.
lv_module = ( lv_column - 1 ) MOD 26.
lv_uccpi = 65 + lv_module.
lv_column = ( lv_column - lv_module ) / 26.
lv_text = cl_abap_conv_in_ce=>uccpi( lv_uccpi ).
CONCATENATE lv_text ep_column INTO ep_column.
ENDWHILE.
*--------------------------------------------------------------------*
* Save succesfull output into cache
*--------------------------------------------------------------------*
sv_prev_out = ep_column.
ENDMETHOD.
METHOD convert_column2int.
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmoecker, (done) 2012-12-29
* - ...
* changes: renaming variables to naming conventions
* removing unused variables
* removing commented out code that is inactive for more then half a year
* message made to support multilinguality
* adding comments to explain what we are trying to achieve
*--------------------------------------------------------------------*
* issue#246 - error converting lower case column names
* - Stefan Schmoecker, 2012-12-29
* changes: translating the correct variable to upper dase
* adding missing exception if input is a number
* that is out of bounds
* adding missing exception if input contains
* illegal characters like german umlauts
*--------------------------------------------------------------------*
DATA: lv_column TYPE zexcel_cell_column_alpha,
lv_column_c TYPE char10,
lv_column_s TYPE string,
lv_errormessage TYPE string, " Can't pass '...'(abc) to exception-class
lv_modulo TYPE i.
STATICS: sv_prev_in LIKE lv_column_c,
sv_prev_out LIKE ep_column.
*--------------------------------------------------------------------*
* This module tries to identify which column a user wants to access
* Numbers as input are just passed back, anything else will be converted
* using EXCEL nomenclatura A = 1, AA = 27, ..., XFD = 16384
*--------------------------------------------------------------------*
*--------------------------------------------------------------------*
* Normalize input ( upper case , no gaps )
*--------------------------------------------------------------------*
lv_column_c = ip_column.
* TRANSLATE lv_column TO UPPER CASE. " Fix #246
TRANSLATE lv_column_c TO UPPER CASE. " Fix #246
CONDENSE lv_column_c NO-GAPS.
IF lv_column_c EQ ''.
* lv_errormessage = 'Unable to interpret input as column'(003).
MESSAGE e800(zabap2xlsx) INTO lv_errormessage.
zcx_excel=>raise_symsg( ).
ENDIF.
*--------------------------------------------------------------------*
* Look up for previous succesfull cached result
*--------------------------------------------------------------------*
IF lv_column_c = sv_prev_in AND sv_prev_out IS NOT INITIAL.
ep_column = sv_prev_out.
RETURN.
ELSE.
CLEAR sv_prev_out.
sv_prev_in = lv_column_c.
ENDIF.
*--------------------------------------------------------------------*
* If a number gets passed, just convert it to an integer and return
* the converted value
*--------------------------------------------------------------------*
TRY.
IF lv_column_c CO '1234567890 '. " Fix #164
ep_column = lv_column_c. " Fix #164
*--------------------------------------------------------------------*
* Maximum column for EXCEL: XFD = 16384 " if anyone has a reference for this information - please add here instead of this comment
*--------------------------------------------------------------------*
IF ep_column > 16384 OR ep_column < 1.
lv_errormessage = 'Index out of bounds'(004).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
EXIT.
ENDIF.
CATCH cx_sy_conversion_no_number. "#EC NO_HANDLER
" Try the character-approach if approach via number has failed
ENDTRY.
*--------------------------------------------------------------------*
* Raise error if unexpected characters turns up
*--------------------------------------------------------------------*
lv_column_s = lv_column_c.
IF lv_column_s CN sy-abcde.
* lv_errormessage = 'Unable to interpret input as column'(003).
MESSAGE e800(zabap2xlsx) INTO lv_errormessage.
zcx_excel=>raise_symsg( ).
ENDIF.
DO 1 TIMES. "Because of using CHECK
*--------------------------------------------------------------------*
* Interpret input as number to base 26 with A=1, ... Z=26
* Raise error if unexpected character turns up
*--------------------------------------------------------------------*
* 1st character
*--------------------------------------------------------------------*
lv_column = lv_column_c.
lv_modulo = cl_abap_conv_out_ce=>uccpi( lv_column+0(1) ) MOD zcl_excel_common=>c_excel_col_module.
IF lv_modulo < 1 OR lv_modulo > 26.
* lv_errormessage = 'Unable to interpret input as column'(003).
MESSAGE e800(zabap2xlsx) INTO lv_errormessage.
zcx_excel=>raise_symsg( ).
ENDIF.
ep_column = lv_modulo. " Leftmost digit
*--------------------------------------------------------------------*
* 2nd character if present
*--------------------------------------------------------------------*
CHECK lv_column+1(1) IS NOT INITIAL. " No need to continue if string ended
lv_modulo = cl_abap_conv_out_ce=>uccpi( lv_column+1(1) ) MOD zcl_excel_common=>c_excel_col_module.
IF lv_modulo < 1 OR lv_modulo > 26.
* lv_errormessage = 'Unable to interpret input as column'(003).
MESSAGE e800(zabap2xlsx) INTO lv_errormessage.
zcx_excel=>raise_symsg( ).
ENDIF.
ep_column = 26 * ep_column + lv_modulo. " if second digit is present first digit is for 26^1
*--------------------------------------------------------------------*
* 3rd character if present
*--------------------------------------------------------------------*
CHECK lv_column+2(1) IS NOT INITIAL. " No need to continue if string ended
lv_modulo = cl_abap_conv_out_ce=>uccpi( lv_column+2(1) ) MOD zcl_excel_common=>c_excel_col_module.
IF lv_modulo < 1 OR lv_modulo > 26.
* lv_errormessage = 'Unable to interpret input as column'(003).
MESSAGE e800(zabap2xlsx) INTO lv_errormessage.
zcx_excel=>raise_symsg( ).
ENDIF.
ep_column = 26 * ep_column + lv_modulo. " if third digit is present first digit is for 26^2 and second digit for 26^1
ENDDO.
*--------------------------------------------------------------------*
* Maximum column for EXCEL: XFD = 16384 " if anyone has a reference for this information - please add here instead of this comment
*--------------------------------------------------------------------*
IF ep_column > 16384 OR ep_column < 1.
lv_errormessage = 'Index out of bounds'(004).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
*--------------------------------------------------------------------*
* Save succesfull output into cache
*--------------------------------------------------------------------*
sv_prev_out = ep_column.
ENDMETHOD.
METHOD convert_columnrow2column_a_row.
*--------------------------------------------------------------------*
"issue #256 - replacing char processing with regex
*--------------------------------------------------------------------*
* Stefan Schmoecker, 2013-08-11
* Allow input to be CLIKE instead of STRING
*--------------------------------------------------------------------*
DATA: pane_cell_row_a TYPE string,
lv_columnrow TYPE string.
lv_columnrow = i_columnrow. " Get rid of trailing blanks
FIND REGEX '^(\D+)(\d+)$' IN lv_columnrow SUBMATCHES e_column
pane_cell_row_a.
e_row = pane_cell_row_a.
ENDMETHOD.
METHOD convert_range2column_a_row.
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmoecker, (done) 2012-12-07
* - ...
* changes: renaming variables to naming conventions
* aligning code
* added exceptionclass
* added errorhandling for invalid range
* adding comments to explain what we are trying to achieve
*--------------------------------------------------------------------*
* issue#241 - error when sheetname contains "!"
* - sheetname should be returned unescaped
* - Stefan Schmoecker, 2012-12-07
* changes: changed coding to support sheetnames with "!"
* unescaping sheetname
*--------------------------------------------------------------------*
* issue#155 - lessening restrictions of input parameters
* - Stefan Schmoecker, 2012-12-07
* changes: i_range changed to clike
* e_sheet changed to clike
*--------------------------------------------------------------------*
DATA: lv_sheet TYPE string,
lv_range TYPE string,
lv_columnrow_start TYPE string,
lv_columnrow_end TYPE string,
lv_position TYPE i,
lv_errormessage TYPE string. " Can't pass '...'(abc) to exception-class
*--------------------------------------------------------------------*
* Split input range into sheetname and Area
* 4 cases - a) input empty --> nothing to do
* - b) sheetname existing - starts with ' example 'Sheet 1'!$B$6:$D$13
* - c) sheetname existing - does not start with ' example Sheet1!$B$6:$D$13
* - d) no sheetname - just area example $B$6:$D$13
*--------------------------------------------------------------------*
* Initialize output parameters
CLEAR: e_column_start,
e_column_end,
e_row_start,
e_row_end,
e_sheet.
IF i_range IS INITIAL. " a) input empty --> nothing to do
EXIT.
ELSEIF i_range(1) = `'`. " b) sheetname existing - starts with '
FIND REGEX '\![^\!]*$' IN i_range MATCH OFFSET lv_position. " Find last !
IF sy-subrc = 0.
lv_sheet = i_range(lv_position).
ADD 1 TO lv_position.
lv_range = i_range.
SHIFT lv_range LEFT BY lv_position PLACES.
ELSE.
lv_errormessage = 'Invalid range'(001).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
ELSEIF i_range CS '!'. " c) sheetname existing - does not start with '
SPLIT i_range AT '!' INTO lv_sheet lv_range.
" begin Dennis Schaaf
IF lv_range CP '*#REF*'.
lv_errormessage = 'Invalid range'(001).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
" end Dennis Schaaf
ELSE. " d) no sheetname - just area
lv_range = i_range.
ENDIF.
REPLACE ALL OCCURRENCES OF '$' IN lv_range WITH ''.
SPLIT lv_range AT ':' INTO lv_columnrow_start lv_columnrow_end.
convert_columnrow2column_a_row( EXPORTING
i_columnrow = lv_columnrow_start
IMPORTING
e_column = e_column_start
e_row = e_row_start ).
convert_columnrow2column_a_row( EXPORTING
i_columnrow = lv_columnrow_end
IMPORTING
e_column = e_column_end
e_row = e_row_end ).
e_sheet = unescape_string( lv_sheet ). " Return in unescaped form
ENDMETHOD.
METHOD date_to_excel_string.
DATA: lv_date_diff TYPE i.
CHECK ip_value IS NOT INITIAL
AND ip_value <> space.
" Needed hack caused by the problem that:
" Excel 2000 incorrectly assumes that the year 1900 is a leap year
" http://support.microsoft.com/kb/214326/en-us
IF ip_value > c_excel_1900_leap_year.
lv_date_diff = ip_value - c_excel_baseline_date + 2.
ELSE.
lv_date_diff = ip_value - c_excel_baseline_date + 1.
ENDIF.
ep_value = zcl_excel_common=>number_to_excel_string( ip_value = lv_date_diff ).
ENDMETHOD.
METHOD describe_structure.
DATA: lt_components TYPE abap_component_tab,
lt_comps TYPE abap_component_tab,
ls_component TYPE abap_componentdescr,
lo_elemdescr TYPE REF TO cl_abap_elemdescr,
ls_dfies TYPE dfies,
l_position TYPE tabfdpos.
"for DDIC structure get the info directly
IF io_struct->is_ddic_type( ) = abap_true.
rt_dfies = io_struct->get_ddic_field_list( ).
ELSE.
lt_components = io_struct->get_components( ).
LOOP AT lt_components INTO ls_component.
structure_case( EXPORTING is_component = ls_component
CHANGING xt_components = lt_comps ) .
ENDLOOP.
LOOP AT lt_comps INTO ls_component.
CLEAR ls_dfies.
IF ls_component-type->kind = cl_abap_typedescr=>kind_elem. "E Elementary Type
ADD 1 TO l_position.
lo_elemdescr ?= ls_component-type.
IF lo_elemdescr->is_ddic_type( ) = abap_true.
ls_dfies = lo_elemdescr->get_ddic_field( ).
ls_dfies-fieldname = ls_component-name.
ls_dfies-position = l_position.
ELSE.
ls_dfies-fieldname = ls_component-name.
ls_dfies-position = l_position.
ls_dfies-inttype = lo_elemdescr->type_kind.
ls_dfies-leng = lo_elemdescr->length.
ls_dfies-outputlen = lo_elemdescr->length.
ls_dfies-decimals = lo_elemdescr->decimals.
ls_dfies-fieldtext = ls_component-name.
ls_dfies-reptext = ls_component-name.
ls_dfies-scrtext_s = ls_component-name.
ls_dfies-scrtext_m = ls_component-name.
ls_dfies-scrtext_l = ls_component-name.
ls_dfies-dynpfld = abap_true.
ENDIF.
INSERT ls_dfies INTO TABLE rt_dfies.
ENDIF.
ENDLOOP.
ENDIF.
ENDMETHOD.
METHOD determine_resulting_formula.
DATA: lv_row_difference TYPE i,
lv_col_difference TYPE i.
*--------------------------------------------------------------------*
* Calculate distance of reference and current cell
*--------------------------------------------------------------------*
calculate_cell_distance( EXPORTING
iv_reference_cell = iv_reference_cell
iv_current_cell = iv_current_cell
IMPORTING
ev_row_difference = lv_row_difference
ev_col_difference = lv_col_difference ).
*--------------------------------------------------------------------*
* and shift formula by using the row- and columndistance
*--------------------------------------------------------------------*
ev_resulting_formula = shift_formula( iv_reference_formula = iv_reference_formula
iv_shift_rows = lv_row_difference
iv_shift_cols = lv_col_difference ).
ENDMETHOD. "determine_resulting_formula
METHOD encrypt_password.
DATA lv_curr_offset TYPE i.
DATA lv_curr_char TYPE c LENGTH 1.
DATA lv_curr_hex TYPE zexcel_pwd_hash.
DATA lv_pwd_len TYPE zexcel_pwd_hash.
DATA lv_pwd_hash TYPE zexcel_pwd_hash.
CONSTANTS:
lv_0x7fff TYPE zexcel_pwd_hash VALUE '7FFF',
lv_0x0001 TYPE zexcel_pwd_hash VALUE '0001',
lv_0xce4b TYPE zexcel_pwd_hash VALUE 'CE4B'.
DATA lv_pwd TYPE zexcel_aes_password.
lv_pwd = i_pwd.
lv_pwd_len = strlen( lv_pwd ).
lv_curr_offset = lv_pwd_len - 1.
WHILE lv_curr_offset GE 0.
lv_curr_char = lv_pwd+lv_curr_offset(1).
lv_curr_hex = char2hex( lv_curr_char ).
lv_pwd_hash = ( shr14( lv_pwd_hash ) BIT-AND lv_0x0001 ) BIT-OR ( shl01( lv_pwd_hash ) BIT-AND lv_0x7fff ).
lv_pwd_hash = lv_pwd_hash BIT-XOR lv_curr_hex.
SUBTRACT 1 FROM lv_curr_offset.
ENDWHILE.
lv_pwd_hash = ( shr14( lv_pwd_hash ) BIT-AND lv_0x0001 ) BIT-OR ( shl01( lv_pwd_hash ) BIT-AND lv_0x7fff ).
lv_pwd_hash = lv_pwd_hash BIT-XOR lv_0xce4b.
lv_pwd_hash = lv_pwd_hash BIT-XOR lv_pwd_len.
WRITE lv_pwd_hash TO r_encrypted_pwd.
ENDMETHOD.
METHOD escape_string.
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmoecker, (done) 2012-12-08
* - ...
* changes: aligning code
* adding comments to explain what we are trying to achieve
*--------------------------------------------------------------------*
* issue#242 - Support escaping for white-spaces
* - Escaping also necessary when ' encountered in input
* - Stefan Schmoecker, 2012-12-08
* changes: switched check if escaping is necessary to regular expression
* and moved the "REPLACE"
*--------------------------------------------------------------------*
* issue#155 - lessening restrictions of input parameters
* - Stefan Schmoecker, 2012-12-08
* changes: ip_value changed to clike
*--------------------------------------------------------------------*
DATA: lv_value TYPE string.
*--------------------------------------------------------------------*
* There exist various situations when a space will be used to separate
* different parts of a string. When we have a string consisting spaces
* that will cause errors unless we "escape" the string by putting ' at
* the beginning and at the end of the string.
*--------------------------------------------------------------------*
*--------------------------------------------------------------------*
* When allowing clike-input parameters we might encounter trailing
* "real" blanks . These are automatically eliminated when moving
* the input parameter to a string.
* Now any remaining spaces ( white-spaces or normal spaces ) should
* trigger the escaping as well as any '
*--------------------------------------------------------------------*
lv_value = ip_value.
FIND REGEX `\s|'` IN lv_value. " \s finds regular and white spaces
IF sy-subrc = 0.
REPLACE ALL OCCURRENCES OF `'` IN lv_value WITH `''`.
CONCATENATE `'` lv_value `'` INTO lv_value .
ENDIF.
ep_escaped_value = lv_value.
ENDMETHOD.
METHOD excel_string_to_date.
DATA: lv_date_int TYPE i.
CHECK ip_value IS NOT INITIAL AND ip_value CN ' 0'.
TRY.
lv_date_int = ip_value.
IF lv_date_int NOT BETWEEN 1 AND 2958465.
zcx_excel=>raise_text( 'Unable to interpret date' ).
ENDIF.
ep_value = lv_date_int + c_excel_baseline_date - 2.
" Needed hack caused by the problem that:
" Excel 2000 incorrectly assumes that the year 1900 is a leap year
" http://support.microsoft.com/kb/214326/en-us
IF ep_value < c_excel_1900_leap_year.
ep_value = ep_value + 1.
ENDIF.
CATCH cx_sy_conversion_error.
zcx_excel=>raise_text( 'Index out of bounds' ).
ENDTRY.
ENDMETHOD.
METHOD excel_string_to_number.
* If we encounter anything more complicated in EXCEL we might have to extend this
* But currently this works fine - even for numbers in scientific notation
ep_value = ip_value.
ENDMETHOD.
METHOD excel_string_to_time.
DATA: lv_seconds_in_day TYPE i,
lv_day_fraction TYPE f,
lc_seconds_in_day TYPE i VALUE 86400.
TRY.
lv_day_fraction = ip_value.
lv_seconds_in_day = lv_day_fraction * lc_seconds_in_day.
ep_value = lv_seconds_in_day.
CATCH cx_sy_conversion_error.
zcx_excel=>raise_text( 'Unable to interpret time' ).
ENDTRY.
ENDMETHOD.
METHOD get_fieldcatalog.
DATA: lr_dref_tab TYPE REF TO data,
lo_salv_table TYPE REF TO cl_salv_table,
lo_salv_columns_table TYPE REF TO cl_salv_columns_table,
lt_salv_t_column_ref TYPE salv_t_column_ref,
ls_salv_t_column_ref LIKE LINE OF lt_salv_t_column_ref,
lo_salv_column_table TYPE REF TO cl_salv_column_table.
FIELD-SYMBOLS: <tab> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <fcat> LIKE LINE OF ep_fieldcatalog.
* Get copy of IP_TABLE-structure <-- must be changeable to create salv
CREATE DATA lr_dref_tab LIKE ip_table.
ASSIGN lr_dref_tab->* TO <tab>.
* Create salv --> implicitly create fieldcat
TRY.
cl_salv_table=>factory( IMPORTING
r_salv_table = lo_salv_table
CHANGING
t_table = <tab> ).
lo_salv_columns_table = lo_salv_table->get_columns( ).
lt_salv_t_column_ref = lo_salv_columns_table->get( ).
CATCH cx_root.
* maybe some errorhandling here - just haven't made up my mind yet
ENDTRY.
* Loop through columns and set relevant fields ( fieldname, texts )
LOOP AT lt_salv_t_column_ref INTO ls_salv_t_column_ref.
lo_salv_column_table ?= ls_salv_t_column_ref-r_column.
APPEND INITIAL LINE TO ep_fieldcatalog ASSIGNING <fcat>.
<fcat>-position = sy-tabix.
<fcat>-fieldname = ls_salv_t_column_ref-columnname.
<fcat>-scrtext_s = ls_salv_t_column_ref-r_column->get_short_text( ).
<fcat>-scrtext_m = ls_salv_t_column_ref-r_column->get_medium_text( ).
<fcat>-scrtext_l = ls_salv_t_column_ref-r_column->get_long_text( ).
<fcat>-abap_type = lo_salv_column_table->get_ddic_inttype( ).
<fcat>-dynpfld = 'X'. " What in the world would we exclude here?
" except for the MANDT-field of most tables ( 1st column that is )
IF <fcat>-position = 1 AND lo_salv_column_table->get_ddic_datatype( ) = 'CLNT' AND iv_hide_mandt = abap_true.
CLEAR <fcat>-dynpfld.
ENDIF.
* For fields that don't a description ( i.e. defined by "field type i," )
* just use the fieldname as description - that is better than nothing
IF <fcat>-scrtext_s IS INITIAL
AND <fcat>-scrtext_m IS INITIAL
AND <fcat>-scrtext_l IS INITIAL.
CONCATENATE 'Col:' <fcat>-fieldname INTO <fcat>-scrtext_l SEPARATED BY space.
<fcat>-scrtext_m = <fcat>-scrtext_l.
<fcat>-scrtext_s = <fcat>-scrtext_l.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD is_cell_in_range.
DATA lv_column_start TYPE zexcel_cell_column_alpha.
DATA lv_column_end TYPE zexcel_cell_column_alpha.
DATA lv_row_start TYPE zexcel_cell_row.
DATA lv_row_end TYPE zexcel_cell_row.
DATA lv_column_start_i TYPE zexcel_cell_column.
DATA lv_column_end_i TYPE zexcel_cell_column.
DATA lv_column_i TYPE zexcel_cell_column.
* Split range and convert columns
convert_range2column_a_row(
EXPORTING
i_range = ip_range
IMPORTING
e_column_start = lv_column_start
e_column_end = lv_column_end
e_row_start = lv_row_start
e_row_end = lv_row_end ).
lv_column_start_i = convert_column2int( ip_column = lv_column_start ).
lv_column_end_i = convert_column2int( ip_column = lv_column_end ).
lv_column_i = convert_column2int( ip_column = ip_column ).
* Check if cell is in range
IF lv_column_i >= lv_column_start_i AND
lv_column_i <= lv_column_end_i AND
ip_row >= lv_row_start AND
ip_row <= lv_row_end.
rp_in_range = abap_true.
ENDIF.
ENDMETHOD.
METHOD number_to_excel_string.
DATA: lv_value_c TYPE c LENGTH 100.
WRITE ip_value TO lv_value_c EXPONENT 0 NO-GROUPING NO-SIGN.
REPLACE ALL OCCURRENCES OF ',' IN lv_value_c WITH '.'.
ep_value = lv_value_c.
CONDENSE ep_value.
IF ip_value < 0.
CONCATENATE '-' ep_value INTO ep_value.
ELSEIF ip_value EQ 0.
ep_value = '0'.
ENDIF.
ENDMETHOD.
METHOD recursive_class_to_struct.
" # issue 139
* is working for me - but after looking through this coding I guess
* I'll rewrite this to a version w/o recursion
* This is private an no one using it so far except me, so no need to hurry
DATA: descr TYPE REF TO cl_abap_structdescr,
wa_component LIKE LINE OF descr->components,
attribute_name TYPE fieldname,
flag_class TYPE flag.
FIELD-SYMBOLS: <field> TYPE any,
<fieldx> TYPE any,
<attribute> TYPE any.
descr ?= cl_abap_structdescr=>describe_by_data( e_target ).
LOOP AT descr->components INTO wa_component.
* Assign structure and X-structure
ASSIGN COMPONENT wa_component-name OF STRUCTURE e_target TO <field>.
ASSIGN COMPONENT wa_component-name OF STRUCTURE e_targetx TO <fieldx>.
* At least one field in the structure should be marked - otherwise continue with next field
CLEAR flag_class.
* maybe source is just a structure - try assign component...
ASSIGN COMPONENT wa_component-name OF STRUCTURE i_source TO <attribute>.
IF sy-subrc <> 0.
* not - then it is an attribute of the class - use different assign then
CONCATENATE 'i_source->' wa_component-name INTO attribute_name.
ASSIGN (attribute_name) TO <attribute>.
IF sy-subrc <> 0.
EXIT.
ENDIF. " Should not happen if structure is built properly - otherwise just exit to create no dumps
flag_class = abap_true.
ENDIF.
CASE wa_component-type_kind.
WHEN cl_abap_structdescr=>typekind_struct1 OR cl_abap_structdescr=>typekind_struct2. " Structure --> use recursio
* IF flag_class = abap_true.
** Only borders will be passed as unbound references. But since we want to set a value we have to create an instance
* ENDIF.
zcl_excel_common=>recursive_class_to_struct( EXPORTING i_source = <attribute>
CHANGING e_target = <field>
e_targetx = <fieldx> ).
WHEN OTHERS.
<field> = <attribute>.
<fieldx> = abap_true.
ENDCASE.
ENDLOOP.
ENDMETHOD.
METHOD recursive_struct_to_class.
" # issue 139
* is working for me - but after looking through this coding I guess
* I'll rewrite this to a version w/o recursion
* This is private an no one using it so far except me, so no need to hurry
DATA: descr TYPE REF TO cl_abap_structdescr,
wa_component LIKE LINE OF descr->components,
attribute_name TYPE fieldname,
flag_class TYPE flag,
o_border TYPE REF TO zcl_excel_style_border.
FIELD-SYMBOLS: <field> TYPE any,
<fieldx> TYPE any,
<attribute> TYPE any.
descr ?= cl_abap_structdescr=>describe_by_data( i_source ).
LOOP AT descr->components INTO wa_component.
* Assign structure and X-structure
ASSIGN COMPONENT wa_component-name OF STRUCTURE i_source TO <field>.
ASSIGN COMPONENT wa_component-name OF STRUCTURE i_sourcex TO <fieldx>.
* At least one field in the structure should be marked - otherwise continue with next field
CHECK <fieldx> CA abap_true.
CLEAR flag_class.
* maybe target is just a structure - try assign component...
ASSIGN COMPONENT wa_component-name OF STRUCTURE e_target TO <attribute>.
IF sy-subrc <> 0.
* not - then it is an attribute of the class - use different assign then
CONCATENATE 'E_TARGET->' wa_component-name INTO attribute_name.
ASSIGN (attribute_name) TO <attribute>.
IF sy-subrc <> 0.EXIT.ENDIF. " Should not happen if structure is built properly - otherwise just exit to create no dumps
flag_class = abap_true.
ENDIF.
CASE wa_component-type_kind.
WHEN cl_abap_structdescr=>typekind_struct1 OR cl_abap_structdescr=>typekind_struct2. " Structure --> use recursion
" To avoid dump with attribute GRADTYPE of class ZCL_EXCEL_STYLE_FILL
" quick and really dirty fix -> check the attribute name
" Border has to be initialized somewhere else
IF wa_component-name EQ 'GRADTYPE'.
flag_class = abap_false.
ENDIF.
IF flag_class = abap_true AND <attribute> IS INITIAL.
* Only borders will be passed as unbound references. But since we want to set a value we have to create an instance
CREATE OBJECT o_border.
<attribute> = o_border.
ENDIF.
zcl_excel_common=>recursive_struct_to_class( EXPORTING i_source = <field>
i_sourcex = <fieldx>
CHANGING e_target = <attribute> ).
* WHEN cl_abap_structdescr=>typekind_struct2. " String
* CHECK <fieldx> = abap_true. " Marked for change
* <attribute_s> = <field>.
WHEN OTHERS.
CHECK <fieldx> = abap_true. " Marked for change
<attribute> = <field>.
ENDCASE.
ENDLOOP.
ENDMETHOD.
METHOD shift_formula.
CONSTANTS: lcv_operators TYPE string VALUE '+-/*^%=<>&, !',
lcv_letters TYPE string VALUE 'ABCDEFGHIJKLMNOPQRSTUVWXYZ$',
lcv_digits TYPE string VALUE '0123456789',
lcv_cell_reference_error TYPE string VALUE '#REF!'.
DATA: lv_tcnt TYPE i, " Counter variable
lv_tlen TYPE i, " Temp variable length
lv_cnt TYPE i, " Counter variable
lv_cnt2 TYPE i, " Counter variable
lv_offset1 TYPE i, " Character offset
lv_numchars TYPE i, " Number of characters counter
lv_tchar(1) TYPE c, " Temp character
lv_tchar2(1) TYPE c, " Temp character
lv_cur_form(2000) TYPE c, " Formula for current cell
lv_ref_cell_addr TYPE string, " Reference cell address
lv_tcol1 TYPE string, " Temp column letter
lv_tcol2 TYPE string, " Temp column letter
lv_tcoln TYPE i, " Temp column number
lv_trow1 TYPE string, " Temp row number
lv_trow2 TYPE string, " Temp row number
lv_flen TYPE i, " Length of reference formula
lv_tlen2 TYPE i, " Temp variable length
lv_substr1 TYPE string, " Substring variable
lv_abscol TYPE string, " Absolute column symbol
lv_absrow TYPE string, " Absolute row symbol
lv_errormessage TYPE string.
*--------------------------------------------------------------------*
* When copying a cell in EXCEL to another cell any inherent formulas
* are copied as well. Cell-references in the formula are being adjusted
* by the distance of the new cell to the original one
*--------------------------------------------------------------------*
* §1 Parse reference formula character by character
* §2 Identify Cell-references
* §3 Shift cell-reference
* §4 Build resulting formula
*--------------------------------------------------------------------*
*--------------------------------------------------------------------*
* No distance --> Reference = resulting cell/formula
*--------------------------------------------------------------------*
IF iv_shift_cols = 0
AND iv_shift_rows = 0.
ev_resulting_formula = iv_reference_formula.
EXIT. " done
ENDIF.
lv_flen = strlen( iv_reference_formula ).
lv_numchars = 1.
*--------------------------------------------------------------------*
* §1 Parse reference formula character by character
*--------------------------------------------------------------------*
DO lv_flen TIMES.
CLEAR: lv_tchar,
lv_substr1,
lv_ref_cell_addr.
lv_cnt2 = lv_cnt + 1.
IF lv_cnt2 > lv_flen.
EXIT. " Done
ENDIF.
*--------------------------------------------------------------------*
* Here we have the current character in the formula
*--------------------------------------------------------------------*
lv_tchar = iv_reference_formula+lv_cnt(1).
*--------------------------------------------------------------------*
* Operators or opening parenthesis will separate possible cellreferences
*--------------------------------------------------------------------*
IF ( lv_tchar CA lcv_operators
OR lv_tchar CA '(' )
AND lv_cnt2 = 1.
lv_substr1 = iv_reference_formula+lv_offset1(1).
CONCATENATE lv_cur_form lv_substr1 INTO lv_cur_form.
lv_cnt = lv_cnt + 1.
lv_offset1 = lv_cnt.
lv_numchars = 1.
CONTINUE. " --> next character in formula can be analyzed
ENDIF.
*--------------------------------------------------------------------*
* Quoted literal text holds no cell reference --> advance to end of text
*--------------------------------------------------------------------*
IF lv_tchar EQ '"'.
lv_cnt = lv_cnt + 1.
lv_numchars = lv_numchars + 1.
lv_tchar = iv_reference_formula+lv_cnt(1).
WHILE lv_tchar NE '"'.
lv_cnt = lv_cnt + 1.
lv_numchars = lv_numchars + 1.
lv_tchar = iv_reference_formula+lv_cnt(1).
ENDWHILE.
lv_cnt2 = lv_cnt + 1.
lv_substr1 = iv_reference_formula+lv_offset1(lv_numchars).
CONCATENATE lv_cur_form lv_substr1 INTO lv_cur_form.
lv_cnt = lv_cnt + 1.
IF lv_cnt = lv_flen.
EXIT.
ENDIF.
lv_offset1 = lv_cnt.
lv_numchars = 1.
lv_tchar = iv_reference_formula+lv_cnt(1).
lv_cnt2 = lv_cnt + 1.
CONTINUE. " --> next character in formula can be analyzed
ENDIF.
*--------------------------------------------------------------------*
* Operators or parenthesis or last character in formula will separate possible cellreferences
*--------------------------------------------------------------------*
IF lv_tchar CA lcv_operators
OR lv_tchar CA '():'
OR lv_cnt2 = lv_flen.
IF lv_cnt > 0.
lv_substr1 = iv_reference_formula+lv_offset1(lv_numchars).
*--------------------------------------------------------------------*
* Check for text concatenation and functions
*--------------------------------------------------------------------*
IF ( lv_tchar CA lcv_operators AND lv_tchar EQ lv_substr1 ) OR lv_tchar EQ '('.
CONCATENATE lv_cur_form lv_substr1 INTO lv_cur_form.
lv_cnt = lv_cnt + 1.
lv_offset1 = lv_cnt.
lv_cnt2 = lv_cnt + 1.
lv_numchars = 1.
CONTINUE. " --> next character in formula can be analyzed
ENDIF.
lv_tlen = lv_cnt2 - lv_offset1.
*--------------------------------------------------------------------*
* Exclude mathematical operators and closing parentheses
*--------------------------------------------------------------------*
IF lv_tchar CA lcv_operators
OR lv_tchar CA ':)'.
IF lv_cnt2 = lv_flen
AND lv_numchars = 1.
CONCATENATE lv_cur_form lv_substr1 INTO lv_cur_form.
lv_cnt = lv_cnt + 1.
lv_offset1 = lv_cnt.
lv_cnt2 = lv_cnt + 1.
lv_numchars = 1.
CONTINUE. " --> next character in formula can be analyzed
ELSE.
lv_tlen = lv_tlen - 1.
ENDIF.
ENDIF.
*--------------------------------------------------------------------*
* Capture reference cell address
*--------------------------------------------------------------------*
TRY.
MOVE: iv_reference_formula+lv_offset1(lv_tlen) TO lv_ref_cell_addr. "Ref cell address
CATCH cx_root.
lv_errormessage = 'Internal error in Class ZCL_EXCEL_COMMON Method SHIFT_FORMULA Spot 1 '. " Change to messageclass if possible
zcx_excel=>raise_text( lv_errormessage ).
ENDTRY.
*--------------------------------------------------------------------*
* Split cell address into characters and numbers
*--------------------------------------------------------------------*
CLEAR: lv_tlen,
lv_tcnt,
lv_tcol1,
lv_trow1.
lv_tlen = strlen( lv_ref_cell_addr ).
IF lv_tlen <> 0.
CLEAR: lv_tcnt.
DO lv_tlen TIMES.
CLEAR: lv_tchar2.
lv_tchar2 = lv_ref_cell_addr+lv_tcnt(1).
IF lv_tchar2 CA lcv_letters.
CONCATENATE lv_tcol1 lv_tchar2 INTO lv_tcol1.
ELSEIF lv_tchar2 CA lcv_digits.
CONCATENATE lv_trow1 lv_tchar2 INTO lv_trow1.
ENDIF.
lv_tcnt = lv_tcnt + 1.
ENDDO.
ENDIF.
*--------------------------------------------------------------------*
* Check for invalid cell address
*--------------------------------------------------------------------*
IF lv_tcol1 IS INITIAL OR lv_trow1 IS INITIAL.
CONCATENATE lv_cur_form lv_substr1 INTO lv_cur_form.
lv_cnt = lv_cnt + 1.
lv_offset1 = lv_cnt.
lv_cnt2 = lv_cnt + 1.
lv_numchars = 1.
CONTINUE.
ENDIF.
*--------------------------------------------------------------------*
* Check for range names
*--------------------------------------------------------------------*
CLEAR: lv_tlen.
lv_tlen = strlen( lv_tcol1 ).
IF lv_tlen GT 3.
CONCATENATE lv_cur_form lv_substr1 INTO lv_cur_form.
lv_cnt = lv_cnt + 1.
lv_offset1 = lv_cnt.
lv_cnt2 = lv_cnt + 1.
lv_numchars = 1.
CONTINUE.
ENDIF.
*--------------------------------------------------------------------*
* Check for valid row
*--------------------------------------------------------------------*
IF lv_trow1 GT 1048576.
CONCATENATE lv_cur_form lv_substr1 INTO lv_cur_form.
lv_cnt = lv_cnt + 1.
lv_offset1 = lv_cnt.
lv_cnt2 = lv_cnt + 1.
lv_numchars = 1.
CONTINUE.
ENDIF.
*--------------------------------------------------------------------*
* Check for absolute column or row reference
*--------------------------------------------------------------------*
CLEAR: lv_tcol2,
lv_trow2,
lv_abscol,
lv_absrow.
lv_tlen2 = strlen( lv_tcol1 ) - 1.
IF lv_tcol1 IS NOT INITIAL.
lv_abscol = lv_tcol1(1).
ENDIF.
IF lv_tlen2 GE 0.
lv_absrow = lv_tcol1+lv_tlen2(1).
ENDIF.
IF lv_abscol EQ '$' AND lv_absrow EQ '$'.
lv_tlen2 = lv_tlen2 - 1.
IF lv_tlen2 > 0.
lv_tcol1 = lv_tcol1+1(lv_tlen2).
ENDIF.
lv_tlen2 = lv_tlen2 + 1.
ELSEIF lv_abscol EQ '$'.
lv_tcol1 = lv_tcol1+1(lv_tlen2).
ELSEIF lv_absrow EQ '$'.
lv_tcol1 = lv_tcol1(lv_tlen2).
ENDIF.
*--------------------------------------------------------------------*
* Check for valid column
*--------------------------------------------------------------------*
TRY.
lv_tcoln = zcl_excel_common=>convert_column2int( lv_tcol1 ) + iv_shift_cols.
CATCH zcx_excel.
CONCATENATE lv_cur_form lv_substr1 INTO lv_cur_form.
lv_cnt = lv_cnt + 1.
lv_offset1 = lv_cnt.
lv_cnt2 = lv_cnt + 1.
lv_numchars = 1.
CONTINUE.
ENDTRY.
*--------------------------------------------------------------------*
* Check whether there is a referencing problem
*--------------------------------------------------------------------*
lv_trow2 = lv_trow1 + iv_shift_rows.
IF ( lv_tcoln < 1 AND lv_abscol <> '$' ) " Maybe we should add here max-column and max row-tests as well.
OR ( lv_trow2 < 1 AND lv_absrow <> '$' ). " Check how EXCEL behaves in this case
*--------------------------------------------------------------------*
* Referencing problem encountered --> set error
*--------------------------------------------------------------------*
CONCATENATE lv_cur_form lcv_cell_reference_error INTO lv_cur_form.
ELSE.
*--------------------------------------------------------------------*
* No referencing problems --> adjust row and column
*--------------------------------------------------------------------*
*--------------------------------------------------------------------*
* Adjust column
*--------------------------------------------------------------------*
IF lv_abscol EQ '$'.
CONCATENATE lv_cur_form lv_abscol lv_tcol1 INTO lv_cur_form.
ELSEIF iv_shift_cols EQ 0.
CONCATENATE lv_cur_form lv_tcol1 INTO lv_cur_form.
ELSE.
TRY.
lv_tcol2 = zcl_excel_common=>convert_column2alpha( lv_tcoln ).
CONCATENATE lv_cur_form lv_tcol2 INTO lv_cur_form.
CATCH zcx_excel.
CONCATENATE lv_cur_form lv_substr1 INTO lv_cur_form.
lv_cnt = lv_cnt + 1.
lv_offset1 = lv_cnt.
lv_cnt2 = lv_cnt + 1.
lv_numchars = 1.
CONTINUE.
ENDTRY.
ENDIF.
*--------------------------------------------------------------------*
* Adjust row
*--------------------------------------------------------------------*
IF lv_absrow EQ '$'.
CONCATENATE lv_cur_form lv_absrow lv_trow1 INTO lv_cur_form.
ELSEIF iv_shift_rows = 0.
CONCATENATE lv_cur_form lv_trow1 INTO lv_cur_form.
* elseif lv_trow2 < 1.
* CONCATENATE lv_cur_form lc_cell_reference_error INTO lv_cur_form.
ELSE.
CONCATENATE lv_cur_form lv_trow2 INTO lv_cur_form.
ENDIF.
ENDIF.
lv_numchars = 0.
IF lv_tchar CA lcv_operators
OR lv_tchar CA ':)'.
CONCATENATE lv_cur_form lv_tchar INTO lv_cur_form.
ENDIF.
lv_offset1 = lv_cnt2.
ENDIF.
ENDIF.
lv_numchars = lv_numchars + 1.
lv_cnt = lv_cnt + 1.
lv_cnt2 = lv_cnt + 1.
ENDDO.
*--------------------------------------------------------------------*
* Return resulting formula
*--------------------------------------------------------------------*
IF lv_cur_form IS NOT INITIAL.
MOVE lv_cur_form TO ev_resulting_formula.
ENDIF.
ENDMETHOD.
METHOD shl01.
DATA:
lv_bit TYPE i,
lv_curr_pos TYPE i VALUE 2,
lv_prev_pos TYPE i VALUE 1.
DO 15 TIMES.
GET BIT lv_curr_pos OF i_pwd_hash INTO lv_bit.
SET BIT lv_prev_pos OF r_pwd_hash TO lv_bit.
ADD 1 TO lv_curr_pos.
ADD 1 TO lv_prev_pos.
ENDDO.
SET BIT 16 OF r_pwd_hash TO 0.
ENDMETHOD.
METHOD shr14.
DATA:
lv_bit TYPE i,
lv_curr_pos TYPE i,
lv_next_pos TYPE i.
r_pwd_hash = i_pwd_hash.
DO 14 TIMES.
lv_curr_pos = 15.
lv_next_pos = 16.
DO 15 TIMES.
GET BIT lv_curr_pos OF r_pwd_hash INTO lv_bit.
SET BIT lv_next_pos OF r_pwd_hash TO lv_bit.
SUBTRACT 1 FROM lv_curr_pos.
SUBTRACT 1 FROM lv_next_pos.
ENDDO.
SET BIT 1 OF r_pwd_hash TO 0.
ENDDO.
ENDMETHOD.
METHOD split_file.
DATA: lt_hlp TYPE TABLE OF text255,
ls_hlp TYPE text255.
DATA: lf_ext(10) TYPE c,
lf_dot_ext(10) TYPE c.
DATA: lf_anz TYPE i,
lf_len TYPE i.
** ---------------------------------------------------------------------
CLEAR: lt_hlp,
ep_file,
ep_extension,
ep_dotextension.
** Split the whole file at '.'
SPLIT ip_file AT '.' INTO TABLE lt_hlp.
** get the extenstion from the last line of table
DESCRIBE TABLE lt_hlp LINES lf_anz.
IF lf_anz <= 1.
ep_file = ip_file.
EXIT.
ENDIF.
READ TABLE lt_hlp INTO ls_hlp INDEX lf_anz.
ep_extension = ls_hlp.
lf_ext = ls_hlp.
IF NOT lf_ext IS INITIAL.
CONCATENATE '.' lf_ext INTO lf_dot_ext.
ENDIF.
ep_dotextension = lf_dot_ext.
** get only the filename
lf_len = strlen( ip_file ) - strlen( lf_dot_ext ).
IF lf_len > 0.
ep_file = ip_file(lf_len).
ENDIF.
ENDMETHOD.
METHOD structure_case.
DATA: lt_comp_str TYPE abap_component_tab.
CASE is_component-type->kind.
WHEN cl_abap_typedescr=>kind_elem. "E Elementary Type
INSERT is_component INTO TABLE xt_components.
WHEN cl_abap_typedescr=>kind_table. "T Table
INSERT is_component INTO TABLE xt_components.
WHEN cl_abap_typedescr=>kind_struct. "S Structure
lt_comp_str = structure_recursive( is_component = is_component ).
INSERT LINES OF lt_comp_str INTO TABLE xt_components.
WHEN OTHERS. "cl_abap_typedescr=>kind_ref or cl_abap_typedescr=>kind_class or cl_abap_typedescr=>kind_intf.
* We skip it. for now.
ENDCASE.
ENDMETHOD.
METHOD structure_recursive.
DATA: lo_struct TYPE REF TO cl_abap_structdescr,
lt_components TYPE abap_component_tab,
ls_components TYPE abap_componentdescr.
REFRESH rt_components.
lo_struct ?= is_component-type.
lt_components = lo_struct->get_components( ).
LOOP AT lt_components INTO ls_components.
structure_case( EXPORTING is_component = ls_components
CHANGING xt_components = rt_components ) .
ENDLOOP.
ENDMETHOD.
METHOD time_to_excel_string.
DATA: lv_seconds_in_day TYPE i,
lv_day_fraction TYPE f,
lc_time_baseline TYPE t VALUE '000000',
lc_seconds_in_day TYPE i VALUE 86400.
lv_seconds_in_day = ip_value - lc_time_baseline.
lv_day_fraction = lv_seconds_in_day / lc_seconds_in_day.
ep_value = zcl_excel_common=>number_to_excel_string( ip_value = lv_day_fraction ).
ENDMETHOD.
METHOD unescape_string.
CONSTANTS lcv_regex TYPE string VALUE `^'[^']` & `|` & " Beginning single ' OR
`[^']'$` & `|` & " Trailing single ' OR
`[^']'[^']`. " Single ' somewhere in between
DATA: lv_errormessage TYPE string. " Can't pass '...'(abc) to exception-class
*--------------------------------------------------------------------*
* This method is used to extract the "real" string from an escaped string.
* An escaped string can be identified by a beginning ' which must be
* accompanied by a trailing '
* All '' in between beginning and trailing ' are treated as single '
*--------------------------------------------------------------------*
*--------------------------------------------------------------------*
* When allowing clike-input parameters we might encounter trailing
* "real" blanks . These are automatically eliminated when moving
* the input parameter to a string.
*--------------------------------------------------------------------*
ev_unescaped_string = iv_escaped. " Pass through if not escaped
CHECK ev_unescaped_string IS NOT INITIAL. " Nothing to do if empty
CHECK ev_unescaped_string(1) = `'`. " Nothing to do if not escaped
*--------------------------------------------------------------------*
* Remove leading and trailing '
*--------------------------------------------------------------------*
REPLACE REGEX `^'(.*)'$` IN ev_unescaped_string WITH '$1'.
IF sy-subrc <> 0.
lv_errormessage = 'Input not properly escaped - &'(002).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
*--------------------------------------------------------------------*
* Any remaining single ' should not be here
*--------------------------------------------------------------------*
FIND REGEX lcv_regex IN ev_unescaped_string.
IF sy-subrc = 0.
lv_errormessage = 'Input not properly escaped - &'(002).
zcx_excel=>raise_text( lv_errormessage ).
ENDIF.
*--------------------------------------------------------------------*
* Replace '' with '
*--------------------------------------------------------------------*
REPLACE ALL OCCURRENCES OF `''` IN ev_unescaped_string WITH `'`.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
1069,
5276,
62,
11321,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
9858,
27857,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
44731,
44513,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
1069,
5276,
62,
12093,
4470,
62,
4475,
41876,
288,
26173,
8924,
705,
1129,
18005,
486,
4458,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
42715,
12,
26947,
269,
62,
1069,
5276,
62,
22510,
69,
16762,
62,
28968,
41876,
493,
16,
26173,
8924,
25307,
13,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
1069,
5276,
62,
21760,
62,
9806,
62,
4033,
41876,
493,
19,
26173,
8924,
1467,
22842,
13,
220,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
1069,
5276,
62,
21760,
62,
1084,
62,
4033,
41876,
493,
19,
26173,
8924,
352,
13,
220,
220,
220,
220,
220,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
1069,
5276,
62,
21760,
62,
9806,
62,
808,
41876,
493,
19,
26173,
8924,
838,
2780,
37452,
13,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
1069,
5276,
62,
21760,
62,
1084,
62,
808,
41876,
493,
19,
26173,
8924,
352,
13,
220,
220,
220,
220,
220,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
42715,
12,
26947,
269,
62,
34975,
292,
62,
268,
41876,
7500,
292,
26173,
8924,
705,
36,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
220,
220,
42715,
12,
26947,
267,
62,
42946,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
42946,
62,
448,
62,
344,
764,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
1069,
5276,
62,
48104,
62,
293,
499,
62,
1941,
41876,
288,
26173,
8924,
705,
1129,
830,
23815,
4458,
25113,
2943,
5626,
13918,
198,
220,
220,
220,
42715,
12,
26947,
269,
62,
87,
7278,
87,
62,
7753,
62,
24455,
41876,
4731,
26173,
8924,
705,
3109,
5276,
5521,
2070,
20789,
13,
87,
7278,
87,
14726,
24620,
87,
7278,
87,
91,
4458,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
628,
220,
220,
220,
42715,
12,
49273,
50,
1398,
62,
41571,
273,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
6901,
62,
301,
5620,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
7249,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
7249,
20147,
81,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
7568,
444,
8,
41876,
49427,
25747,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
10385,
62,
28665,
17,
26591,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
541,
62,
28665,
220,
220,
220,
220,
220,
220,
41876,
2829,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
538,
62,
28665,
8,
41876,
1976,
1069,
5276,
62,
3846,
62,
28665,
62,
26591,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
1069,
5276,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
10385,
62,
28665,
17,
600,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
541,
62,
28665,
220,
220,
220,
220,
220,
220,
41876,
2829,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
538,
62,
28665,
8,
41876,
1976,
1069,
5276,
62,
3846,
62,
28665,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
1069,
5276,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
10385,
62,
28665,
808,
17,
28665,
62,
64,
62,
808,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
28665,
808,
41876,
537,
522,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
68,
62,
28665,
220,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
28665,
62,
26591,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
68,
62,
808,
220,
220,
220,
220,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
808,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
10385,
62,
9521,
17,
28665,
62,
64,
62,
808,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
72,
62,
9521,
220,
220,
220,
220,
220,
220,
220,
41876,
537,
522,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
68,
62,
28665,
62,
9688,
41876,
1976,
1069,
5276,
62,
3846,
62,
28665,
62,
26591,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
68,
62,
28665,
62,
437,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
28665,
62,
26591,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
68,
62,
808,
62,
9688,
220,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
808,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
68,
62,
808,
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
] |
*"* use this source file for your ABAP unit test classes
CLASS lcl_unittest DEFINITION DEFERRED.
CLASS zcl_abak DEFINITION LOCAL FRIENDS lcl_unittest.
CLASS lcl_unittest DEFINITION FOR TESTING
INHERITING FROM zcl_abak_unit_tests
DURATION SHORT
RISK LEVEL HARMLESS
FINAL.
PRIVATE SECTION.
DATA:
f_cut TYPE REF TO zcl_abak,
f_iut TYPE REF TO zif_abak.
METHODS: setup RAISING zcx_abak.
METHODS: get_value_ok FOR TESTING RAISING zcx_abak.
METHODS: get_value_numeric_context FOR TESTING RAISING zcx_abak.
METHODS: get_value_nok FOR TESTING.
METHODS: get_value_if_exists FOR TESTING.
METHODS: get_value_default_scope FOR TESTING RAISING zcx_abak.
METHODS: check_value_ok FOR TESTING RAISING zcx_abak.
METHODS: check_value_range_ok FOR TESTING RAISING zcx_abak.
METHODS: check_value_range_nok FOR TESTING RAISING zcx_abak.
METHODS: check_value_nok FOR TESTING.
METHODS: check_value_if_exists FOR TESTING.
METHODS: get_range_ok FOR TESTING RAISING zcx_abak.
METHODS: get_range_nok FOR TESTING.
METHODS: get_range_if_exists FOR TESTING.
METHODS: null_data FOR TESTING.
ENDCLASS. "lcl_Unit_Test
CLASS lcl_unittest IMPLEMENTATION.
METHOD setup.
DATA: o_data_factory TYPE REF TO zcl_abak_data_factory.
generate_test_data( ).
CREATE OBJECT o_data_factory.
CREATE OBJECT f_cut
EXPORTING
io_data = o_data_factory->get_standard_instance( i_format_type = zif_abak_consts=>format_type-internal
i_source_type = zif_abak_consts=>source_type-database
i_content = gc_tablename-valid ).
f_iut = f_cut.
ENDMETHOD. "setup
METHOD get_value_ok.
cl_abap_unit_assert=>assert_equals(
exp = '0231'
act = f_iut->get_value( i_scope = gc_scope-utest
i_fieldname = 'BUKRS' )
msg = 'Value should be 0231' ).
ENDMETHOD. "get_Value
METHOD get_value_numeric_context.
cl_abap_unit_assert=>assert_equals(
exp = '1234567890'
act = f_iut->get_value( i_scope = gc_scope-utest
i_context = gc_context-c1
i_fieldname = 'KUNNR' )
msg = 'Value should be 1234567890' ).
ENDMETHOD. "get_Value
METHOD get_value_nok.
TRY.
f_iut->get_value( i_scope = gc_scope-utest
i_context = gc_context-does_not_exist
i_fieldname = 'BUKRS' ).
cl_abap_unit_assert=>fail( msg = 'Value does not exist and is not ignorable' ).
CATCH zcx_abak.
RETURN.
ENDTRY.
ENDMETHOD. "get_Value
METHOD get_value_if_exists.
cl_abap_unit_assert=>assert_equals(
exp = '0231'
act = f_iut->get_value_if_exists( i_scope = gc_scope-utest
i_fieldname = 'BUKRS' )
msg = 'Value exists and should be 0231' ).
cl_abap_unit_assert=>assert_equals(
exp = space
act = f_iut->get_value_if_exists( i_scope = gc_scope-utest
i_context = gc_context-does_not_exist
i_fieldname = 'BUKRS' )
msg = 'Not found value should return empty' ).
ENDMETHOD. "get_Value
METHOD get_value_default_scope.
cl_abap_unit_assert=>assert_equals(
exp = '0231'
act = f_iut->get_value( i_fieldname = 'BUKRS' ) ).
ENDMETHOD. "get_Value
METHOD check_value_ok.
cl_abap_unit_assert=>assert_equals(
exp = abap_true
act = f_iut->check_value( i_scope = gc_scope-utest
i_fieldname = 'BUKRS'
i_value = '0231' )
msg = 'Value is 0231 so result should be true' ).
ENDMETHOD. "get_Value
METHOD check_value_range_ok.
cl_abap_unit_assert=>assert_equals(
exp = abap_true
act = f_iut->check_value( i_scope = gc_scope-utest
i_fieldname = 'WAERS'
i_value = 'EUR' ) ).
ENDMETHOD. "get_Value
METHOD check_value_range_nok.
cl_abap_unit_assert=>assert_equals(
exp = abap_false
act = f_iut->check_value( i_scope = gc_scope-utest
i_fieldname = 'WAERS'
i_value = 'CAD' ) ).
ENDMETHOD. "get_Value
METHOD check_value_nok.
TRY.
f_iut->check_value( i_scope = gc_scope-utest
i_context = gc_context-does_not_exist
i_fieldname = 'BUKRS'
i_value = '0231' ).
cl_abap_unit_assert=>fail( msg = 'Value does not exist and is not ignorable' ).
CATCH zcx_abak.
RETURN.
ENDTRY.
ENDMETHOD. "get_Value
METHOD check_value_if_exists.
cl_abap_unit_assert=>assert_equals(
exp = abap_true
act = f_iut->check_value_if_exists( i_scope = gc_scope-utest
i_fieldname = 'BUKRS'
i_value = '0231' )
msg = 'Value exists and should be 0231' ).
cl_abap_unit_assert=>assert_equals(
exp = abap_false
act = f_iut->check_value_if_exists( i_scope = gc_scope-utest
i_context = gc_context-does_not_exist
i_fieldname = 'BUKRS'
i_value = '0231' )
msg = 'No value defined so it should be false' ).
ENDMETHOD. "get_Value
METHOD get_range_ok.
DATA: r_koart TYPE RANGE OF koart.
r_koart = f_iut->get_range( i_scope = gc_scope-utest
i_fieldname = 'KOART' ).
IF NOT ( 'D' IN r_koart AND 'K' IN r_koart ).
cl_abap_unit_assert=>fail( msg = 'Range should have D and K' ).
ENDIF.
ENDMETHOD. "get_Value
METHOD get_range_nok.
TRY.
f_iut->get_range( i_scope = gc_scope-utest
i_context = gc_context-does_not_exist
i_fieldname = 'KOART' ).
cl_abap_unit_assert=>fail( msg = 'Range does not exist and is not ignorable' ).
CATCH zcx_abak.
RETURN.
ENDTRY.
ENDMETHOD.
METHOD get_range_if_exists.
IF 'D' NOT IN f_iut->get_range_if_exists( i_scope = gc_scope-utest
i_context = gc_context-does_not_exist
i_fieldname = 'KOART' ).
cl_abap_unit_assert=>fail( msg = 'Defined range should include D' ).
ENDIF.
IF 'D' NOT IN f_iut->get_range_if_exists( i_scope = gc_scope-utest
i_fieldname = 'KOART' ).
cl_abap_unit_assert=>fail( msg = 'Undefined range should be empty and ok because it is ignorable' ).
ENDIF.
ENDMETHOD. "get_Value
METHOD null_data.
DATA: o_data TYPE REF TO zif_abak_data.
TRY.
CREATE OBJECT f_cut
EXPORTING
io_data = o_data.
cl_abap_unit_assert=>fail( msg = 'Null O_DATA should have been detected').
CATCH zcx_abak.
RETURN.
ENDTRY.
ENDMETHOD.
ENDCLASS. "lcl_Unit_Test
| [
9,
1,
9,
779,
428,
2723,
2393,
329,
534,
9564,
2969,
4326,
1332,
6097,
198,
31631,
300,
565,
62,
403,
715,
395,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
31631,
1976,
565,
62,
397,
461,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
565,
62,
403,
715,
395,
13,
198,
198,
31631,
300,
565,
62,
403,
715,
395,
5550,
20032,
17941,
7473,
43001,
2751,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
461,
62,
20850,
62,
41989,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
198,
220,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
277,
62,
8968,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
461,
11,
198,
220,
220,
220,
220,
220,
277,
62,
72,
315,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
461,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
9058,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
651,
62,
8367,
62,
482,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
651,
62,
8367,
62,
77,
39223,
62,
22866,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
651,
62,
8367,
62,
77,
482,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
651,
62,
8367,
62,
361,
62,
1069,
1023,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
651,
62,
8367,
62,
12286,
62,
29982,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
2198,
62,
8367,
62,
482,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
2198,
62,
8367,
62,
9521,
62,
482,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
2198,
62,
8367,
62,
9521,
62,
77,
482,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
2198,
62,
8367,
62,
77,
482,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
2198,
62,
8367,
62,
361,
62,
1069,
1023,
7473,
43001,
2751,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
651,
62,
9521,
62,
482,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
651,
62,
9521,
62,
77,
482,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
651,
62,
9521,
62,
361,
62,
1069,
1023,
7473,
43001,
2751,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
9242,
62,
7890,
7473,
43001,
2751,
13,
198,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
366,
75,
565,
62,
26453,
62,
14402,
628,
198,
31631,
300,
565,
62,
403,
715,
395,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
9058,
13,
198,
220,
220,
220,
42865,
25,
267,
62,
7890,
62,
69,
9548,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
461,
62,
7890,
62,
69,
9548,
13,
628,
220,
220,
220,
7716,
62,
9288,
62,
7890,
7,
6739,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
267,
62,
7890,
62,
69,
9548,
13,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
277,
62,
8968,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
7890,
796,
267,
62,
7890,
62,
69,
9548,
3784,
1136,
62,
20307,
62,
39098,
7,
1312,
62,
18982,
62,
4906,
796,
1976,
361,
62,
397,
461,
62,
1102,
6448,
14804,
18982,
62,
4906,
12,
32538,
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,
220,
220,
1312,
62,
10459,
62,
4906,
796,
1976,
361,
62,
397,
461,
62,
1102,
6448,
14804,
10459,
62,
4906,
12,
48806,
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,
220,
220,
1312,
62,
11299,
220,
220,
220,
220,
796,
308,
66,
62,
8658,
11925,
480,
12,
12102,
6739,
628,
220,
220,
220,
277,
62,
72,
315,
796,
277,
62,
8968,
13,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
366,
40406,
628,
220,
337,
36252,
651,
62,
8367,
62,
482,
13,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
1033,
796,
705,
15,
25667,
6,
198,
220,
220,
220,
220,
220,
719,
796,
277,
62,
72,
315,
3784,
1136,
62,
8367,
7,
1312,
62,
29982,
220,
220,
220,
220,
796,
308,
66,
62,
29982,
12,
315,
395,
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,
1312,
62,
3245,
3672,
796,
705,
33,
15039,
6998,
6,
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,
31456,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
11395,
815,
307,
657,
25667,
6,
6739,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
366,
1136,
62,
11395,
628,
220,
337,
36252,
651,
62,
8367,
62,
77,
39223,
62,
22866,
13,
628,
220,
220,
220,
537,
62,
397,
499,
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,
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
] |
CLASS zcl_hello_world DEFINITION PUBLIC.
PUBLIC SECTION.
INTERFACES if_oo_adt_classrun.
ENDCLASS.
CLASS zcl_hello_world IMPLEMENTATION.
METHOD if_oo_adt_classrun~main.
out->write( 'Hello, World' ).
ENDMETHOD.
ENDCLASS. | [
31631,
1976,
565,
62,
31373,
62,
6894,
5550,
20032,
17941,
44731,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
611,
62,
2238,
62,
324,
83,
62,
4871,
5143,
13,
198,
10619,
31631,
13,
198,
198,
31631,
1976,
565,
62,
31373,
62,
6894,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
611,
62,
2238,
62,
324,
83,
62,
4871,
5143,
93,
12417,
13,
198,
220,
220,
220,
503,
3784,
13564,
7,
705,
15496,
11,
2159,
6,
6739,
198,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
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
] |
CLASS zcl_aoc_check_48 DEFINITION
PUBLIC
INHERITING FROM zcl_aoc_super
CREATE PUBLIC.
PUBLIC SECTION.
METHODS constructor.
METHODS check
REDEFINITION.
METHODS get_message_text
REDEFINITION.
PROTECTED SECTION.
METHODS check_table_body_access
IMPORTING
!io_scan TYPE REF TO zcl_aoc_scan .
METHODS check_table_key
IMPORTING
!io_scan TYPE REF TO zcl_aoc_scan .
METHODS support_empty_key
RETURNING
VALUE(rv_supported) TYPE abap_bool .
PRIVATE SECTION.
CLASS-DATA gv_checked TYPE abap_bool .
CLASS-DATA gv_supported TYPE abap_bool .
ENDCLASS.
CLASS ZCL_AOC_CHECK_48 IMPLEMENTATION.
METHOD check.
* abapOpenChecks
* https://github.com/larshp/abapOpenChecks
* MIT License
check_table_key( io_scan ).
check_table_body_access( io_scan ).
ENDMETHOD.
METHOD check_table_body_access.
DATA: lv_level LIKE sy-tabix.
FIELD-SYMBOLS: <ls_token> LIKE LINE OF io_scan->tokens,
<ls_statement> LIKE LINE OF io_scan->statements,
<ls_level> LIKE LINE OF io_scan->levels.
IF object_type <> 'CLAS'.
RETURN.
ENDIF.
LOOP AT io_scan->levels ASSIGNING <ls_level>.
lv_level = sy-tabix.
LOOP AT io_scan->statements ASSIGNING <ls_statement> WHERE level = lv_level.
LOOP AT io_scan->tokens ASSIGNING <ls_token> FROM <ls_statement>-from TO <ls_statement>-to
WHERE type <> io_scan->gc_token-literal
AND type <> io_scan->gc_token-comment.
IF <ls_token>-str CP '*+[]*'.
inform( p_sub_obj_name = io_scan->get_include( lv_level )
p_line = <ls_token>-row
p_kind = mv_errty
p_test = myname
p_code = '002' ).
ENDIF.
ENDLOOP.
ENDLOOP.
ENDLOOP.
ENDMETHOD.
METHOD check_table_key.
DATA: lt_statements TYPE zcl_aoc_scan=>ty_statements,
lv_code TYPE sci_errc.
FIELD-SYMBOLS: <ls_statement> LIKE LINE OF lt_statements.
lt_statements = io_scan->build_statements( ).
LOOP AT lt_statements ASSIGNING <ls_statement>.
CLEAR lv_code.
IF ( <ls_statement>-str CP 'DATA* WITH DEFAULT KEY*'
OR <ls_statement>-str CP 'TYPE* WITH DEFAULT KEY*' )
AND support_empty_key( ) = abap_true
AND <ls_statement>-include(8) <> '/1BCWDY/'.
lv_code = '001'.
ENDIF.
IF NOT lv_code IS INITIAL.
inform( p_sub_obj_name = <ls_statement>-include
p_line = <ls_statement>-start-row
p_kind = mv_errty
p_position = <ls_statement>-index
p_test = myname
p_code = lv_code ).
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD constructor.
DATA: ls_message LIKE LINE OF scimessages.
super->constructor( ).
version = '002'.
position = '048'.
has_attributes = abap_true.
attributes_ok = abap_true.
ls_message-test = myname.
ls_message-code = '001'.
ls_message-kind = c_error.
ls_message-pcom = '"#EC CI_DEFAULT_KEY'.
INSERT ls_message INTO TABLE scimessages.
enable_rfc( ).
ENDMETHOD.
METHOD get_message_text.
CLEAR p_text.
CASE p_code.
WHEN '001'.
p_text = 'DEFAULT KEY, add table key or EMPTY KEY'. "#EC NOTEXT
WHEN '002'.
p_text = 'Access table body is obsolete, no headers'. "#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 support_empty_key.
DATA: lt_itab TYPE STANDARD TABLE OF string,
lv_mess TYPE string,
lv_lin TYPE i,
ls_trdir TYPE trdir,
lv_code TYPE string,
lv_wrd TYPE string.
IF gv_checked = abap_true.
rv_supported = gv_supported.
RETURN.
ENDIF.
lv_code = 'REPORT zfoobar.' ##NO_TEXT.
APPEND lv_code TO lt_itab.
lv_code = 'TYPES: ty_table TYPE STANDARD TABLE OF usr02 WITH EMPTY KEY.' ##NO_TEXT.
APPEND lv_code TO lt_itab.
ls_trdir-uccheck = abap_true.
SYNTAX-CHECK FOR lt_itab
MESSAGE lv_mess
LINE lv_lin
WORD lv_wrd
DIRECTORY ENTRY ls_trdir.
IF sy-subrc = 0.
rv_supported = abap_true.
ELSE.
rv_supported = abap_false.
ENDIF.
gv_supported = rv_supported.
gv_checked = abap_true.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
64,
420,
62,
9122,
62,
2780,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
64,
420,
62,
16668,
198,
220,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
13,
628,
220,
220,
220,
337,
36252,
50,
2198,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
20500,
62,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
2198,
62,
11487,
62,
2618,
62,
15526,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
35836,
41876,
4526,
37,
5390,
1976,
565,
62,
64,
420,
62,
35836,
764,
198,
220,
220,
220,
337,
36252,
50,
2198,
62,
11487,
62,
2539,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
35836,
41876,
4526,
37,
5390,
1976,
565,
62,
64,
420,
62,
35836,
764,
198,
220,
220,
220,
337,
36252,
50,
1104,
62,
28920,
62,
2539,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
15999,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
26752,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
15999,
41876,
450,
499,
62,
30388,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
4503,
62,
50084,
62,
2780,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
2198,
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,
628,
220,
220,
220,
2198,
62,
11487,
62,
2539,
7,
33245,
62,
35836,
6739,
628,
220,
220,
220,
2198,
62,
11487,
62,
2618,
62,
15526,
7,
33245,
62,
35836,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
2198,
62,
11487,
62,
2618,
62,
15526,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
5715,
34178,
827,
12,
8658,
844,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
30001,
29,
220,
220,
220,
220,
34178,
48920,
3963,
33245,
62,
35836,
3784,
83,
482,
641,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
26090,
29,
34178,
48920,
3963,
33245,
62,
35836,
3784,
14269,
3196,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
5715,
29,
220,
220,
220,
220,
34178,
48920,
3963,
33245,
62,
35836,
3784,
46170,
13,
628,
198,
220,
220,
220,
16876,
2134,
62,
4906,
1279,
29,
705,
5097,
1921,
4458,
198,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
17579,
3185,
5161,
33245,
62,
35836,
3784,
46170,
24994,
3528,
15871,
1279,
7278,
62,
5715,
28401,
198,
220,
220,
220,
220,
220,
300,
85,
62,
5715,
796,
827,
12,
8658,
844,
13,
198,
220,
220,
220,
220,
220,
17579,
3185,
5161,
33245,
62,
35836,
3784,
14269,
3196,
24994,
3528,
15871,
1279,
7278,
62,
26090,
29,
33411,
1241,
796,
300,
85,
62,
5715,
13,
198,
220,
220,
220,
220,
220,
220,
220,
17579,
3185,
5161,
33245,
62,
35836,
3784,
83,
482,
641,
24994,
3528,
15871,
1279,
7278,
62,
30001,
29,
16034,
1279,
7278,
62,
26090,
29,
12,
6738,
5390,
1279,
7278,
62,
26090,
29,
12,
1462,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33411,
2099,
1279,
29,
33245,
62,
35836,
3784,
36484,
62,
30001,
12,
18250,
1691,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
2099,
1279,
29,
33245,
62,
35836,
3784,
36484,
62,
30001,
12,
23893,
13,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16876,
1279,
7278,
62,
30001,
29,
12,
2536,
16932,
705,
9,
10,
21737,
9,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4175,
7,
279,
62,
7266,
62,
26801,
62,
3672,
796,
33245,
62,
35836,
3784,
1136,
62,
17256,
7,
300,
85,
62,
5715,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
1370,
220,
220,
220,
220,
220,
220,
220,
220,
796,
1279,
7278,
62,
30001,
29,
12,
808,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
11031,
220,
220,
220,
220,
220,
220,
220,
220,
796,
285,
85,
62,
8056,
774,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
9288,
220,
220,
220,
220,
220,
220,
220,
220,
796,
616,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
8189,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
21601,
6,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
220,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
2198,
62,
11487,
62,
2539,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
14269,
3196,
41876,
1976,
565,
62,
64,
420,
62,
35836,
14804,
774,
62,
14269,
3196,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
8189,
220,
220,
220,
220,
220,
220,
41876,
20681,
62,
263,
6015,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
CLASS zcl_abapgit_repo_srv DEFINITION
PUBLIC
FINAL
CREATE PRIVATE .
PUBLIC SECTION.
INTERFACES zif_abapgit_repo_srv .
INTERFACES zif_abapgit_repo_listener .
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 .
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_definitions=>ty_repo_ref_tt .
METHODS refresh
RAISING
zcx_abapgit_exception .
METHODS is_sap_object_allowed
RETURNING
VALUE(rv_allowed) TYPE abap_bool .
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=>tt_repo
!iv_ign_subpkg TYPE abap_bool DEFAULT abap_false
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 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 is_sap_object_allowed.
rv_allowed = cl_enh_badi_def_utility=>is_sap_system( ).
IF rv_allowed = abap_true.
RETURN.
ENDIF.
rv_allowed = zcl_abapgit_exit=>get_instance( )->allow_sap_objects( ).
ENDMETHOD.
METHOD refresh.
DATA: lt_list TYPE zif_abapgit_persistence=>tt_repo.
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,
lo_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 ).
lo_package = zcl_abapgit_factory=>get_sap_package( ls_repo-package ).
IF lo_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 lo_package->list_subpackages( ) TO lt_packages.
READ TABLE lt_packages TRANSPORTING NO FIELDS
WITH KEY table_line = iv_package.
IF sy-subrc = 0.
zcx_abapgit_exception=>raise( |Repository { lo_repo->get_name( ) } already contains { iv_package } | ).
ENDIF.
ENDIF.
IF iv_ign_subpkg = abap_false.
APPEND LINES OF lo_package->list_superpackages( ) TO lt_packages.
READ TABLE lt_packages TRANSPORTING NO FIELDS
WITH KEY table_line = iv_package.
IF sy-subrc = 0.
zcx_abapgit_exception=>raise( |Repository { lo_repo->get_name( ) } |
&& |already contains subpackage of { iv_package } | ).
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( ) ).
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.
LOOP AT mt_list ASSIGNING <lo_list>.
IF <lo_list>->get_key( ) = iv_key.
ro_repo = <lo_list>.
RETURN.
ENDIF.
ENDLOOP.
zcx_abapgit_exception=>raise( 'repo not found, get' ).
ENDMETHOD.
METHOD zif_abapgit_repo_srv~is_repo_installed.
DATA: lt_repo TYPE zif_abapgit_definitions=>ty_repo_ref_tt,
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 ).
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 ).
ENDMETHOD.
METHOD zif_abapgit_repo_srv~new_online.
DATA: ls_repo TYPE zif_abapgit_persistence=>ty_repo,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
ls_dot_abapgit TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit.
ASSERT NOT iv_url IS INITIAL
AND NOT iv_branch_name IS INITIAL
AND NOT iv_package IS INITIAL.
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 ).
zcl_abapgit_url=>validate( |{ iv_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 = iv_url
iv_branch_name = iv_branch_name
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.
ro_repo->set_local_settings( ls_repo-local_settings ).
ENDIF.
ro_repo->refresh( ).
ro_repo->find_remote_dot_abapgit( ).
ENDMETHOD.
METHOD zif_abapgit_repo_srv~purge.
* todo, this should be a method on the repo instead
DATA: lt_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt.
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( ) ).
zcl_abapgit_objects=>delete( it_tadir = lt_tadir
is_checks = is_checks ).
delete( io_repo ).
ENDMETHOD.
METHOD zif_abapgit_repo_srv~validate_package.
DATA: lv_as4user TYPE tdevc-as4user,
lt_repos TYPE zif_abapgit_persistence=>tt_repo,
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.
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.
SELECT SINGLE as4user FROM tdevc
INTO lv_as4user
WHERE devclass = iv_package. "#EC CI_GENBUFF
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Package { iv_package } not found| ).
ENDIF.
IF is_sap_object_allowed( ) = abap_false AND lv_as4user = 'SAP'.
zcx_abapgit_exception=>raise( |Package { iv_package } not allowed, responsible user = 'SAP'| ).
ENDIF.
" make sure its not 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.
lv_name = zcl_abapgit_repo_srv=>get_instance( )->get( <ls_repo>-key )->get_name( ).
lv_owner = <ls_repo>-created_by.
zcx_abapgit_exception=>raise( |Package { iv_package } already versioned as { lv_name } by { lv_owner }| ).
ENDIF.
validate_sub_super_packages(
iv_package = iv_package
it_repos = lt_repos
iv_ign_subpkg = iv_ign_subpkg ).
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,
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,
628,
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,
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,
4299,
50101,
14804,
774,
62,
260,
7501,
62,
5420,
62,
926,
764,
628,
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,
318,
62,
82,
499,
62,
15252,
62,
40845,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
40845,
8,
41876,
450,
499,
62,
30388,
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,
926,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
570,
62,
7266,
35339,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
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,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
751,
13,
628,
220,
220,
220,
42865,
25,
2376,
62,
260,
7501,
34178,
48920,
3963,
45079,
62,
4868,
13,
628,
198,
220,
220,
220,
17579,
3185,
5161,
45079,
62,
4868,
39319,
2376,
62,
260,
7501,
13,
198,
220,
220,
220,
220,
220,
16876,
2376,
62,
260,
7501,
3784,
1136,
62,
2539,
7,
1267,
796,
33245,
62,
260,
7501,
3784,
1136,
62,
2539,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
2376,
62,
260,
7501,
796,
33245,
62,
260,
7501,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
738,
605,
8251,
6,
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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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
] |
class ZCL_EXCEL_THEME_EXTLST definition
public
final
create public .
public section.
methods LOAD
importing
!IO_EXTLST type ref to IF_IXML_ELEMENT .
methods BUILD_XML
importing
!IO_DOCUMENT type ref to IF_IXML_DOCUMENT .
protected section.
private section.
data EXTLST type ref to IF_IXML_ELEMENT .
ENDCLASS.
CLASS ZCL_EXCEL_THEME_EXTLST IMPLEMENTATION.
method build_xml.
data: lo_theme type ref to if_ixml_element.
data: lo_theme_objdef type ref to if_ixml_element.
check io_document is bound.
lo_theme ?= io_document->get_root_element( ).
check lo_theme is bound.
if extlst is initial.
lo_theme_objdef ?= io_document->create_simple_element_ns( prefix = zcl_excel_theme=>c_theme_prefix
name = zcl_excel_theme=>c_theme_extlst
parent = lo_theme ).
else.
lo_theme->append_child( new_child = extlst ).
endif.
endmethod. "build_xml
method load.
"! so far copy only existing values
extlst ?= io_extlst.
endmethod. "load
ENDCLASS.
| [
4871,
1168,
5097,
62,
6369,
34,
3698,
62,
4221,
3620,
36,
62,
13918,
43,
2257,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
5050,
17579,
2885,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
13918,
43,
2257,
2099,
1006,
284,
16876,
62,
10426,
5805,
62,
36,
2538,
10979,
764,
198,
220,
5050,
20571,
26761,
62,
55,
5805,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
38715,
5883,
3525,
2099,
1006,
284,
16876,
62,
10426,
5805,
62,
38715,
5883,
3525,
764,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
628,
220,
1366,
7788,
14990,
2257,
2099,
1006,
284,
16876,
62,
10426,
5805,
62,
36,
2538,
10979,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6369,
34,
3698,
62,
4221,
3620,
36,
62,
13918,
43,
2257,
30023,
2538,
10979,
6234,
13,
628,
198,
24396,
1382,
62,
19875,
13,
198,
220,
220,
220,
1366,
25,
2376,
62,
43810,
2099,
1006,
284,
611,
62,
844,
4029,
62,
30854,
13,
198,
220,
220,
220,
1366,
25,
2376,
62,
43810,
62,
26801,
4299,
2099,
1006,
284,
611,
62,
844,
4029,
62,
30854,
13,
198,
220,
220,
220,
2198,
33245,
62,
22897,
318,
5421,
13,
628,
220,
220,
220,
2376,
62,
43810,
5633,
28,
33245,
62,
22897,
3784,
1136,
62,
15763,
62,
30854,
7,
6739,
198,
220,
220,
220,
2198,
2376,
62,
43810,
318,
5421,
13,
198,
220,
220,
220,
611,
1070,
75,
301,
318,
4238,
13,
198,
220,
220,
220,
220,
220,
2376,
62,
43810,
62,
26801,
4299,
5633,
28,
33245,
62,
22897,
3784,
17953,
62,
36439,
62,
30854,
62,
5907,
7,
21231,
796,
1976,
565,
62,
1069,
5276,
62,
43810,
14804,
66,
62,
43810,
62,
40290,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
796,
1976,
565,
62,
1069,
5276,
62,
43810,
14804,
66,
62,
43810,
62,
2302,
75,
301,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2560,
796,
2376,
62,
43810,
6739,
628,
220,
220,
220,
2073,
13,
198,
220,
220,
220,
220,
220,
2376,
62,
43810,
3784,
33295,
62,
9410,
7,
649,
62,
9410,
796,
1070,
75,
301,
6739,
198,
220,
220,
220,
45762,
13,
198,
220,
886,
24396,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
11249,
62,
19875,
628,
198,
24396,
3440,
13,
198,
220,
220,
220,
366,
0,
523,
1290,
4866,
691,
4683,
3815,
198,
220,
220,
220,
1070,
75,
301,
5633,
28,
33245,
62,
2302,
75,
301,
13,
198,
220,
886,
24396,
13,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_enqu 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: tyt_dd27p TYPE STANDARD TABLE OF dd27p WITH DEFAULT KEY.
METHODS _clear_dd27p_fields CHANGING ct_dd27p TYPE tyt_dd27p.
ENDCLASS.
CLASS YCL_ABAPGIT_OBJECT_ENQU IMPLEMENTATION.
METHOD yif_abapgit_object~changed_by.
SELECT SINGLE as4user FROM dd25l
INTO rv_user
WHERE viewname = 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 = 'L'
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, ENQU' ).
ENDIF.
ENDMETHOD.
METHOD yif_abapgit_object~deserialize.
DATA: lv_name TYPE ddobjname,
ls_dd25v TYPE dd25v,
lt_dd26e TYPE TABLE OF dd26e,
lt_dd27p TYPE tyt_dd27p.
io_xml->read( EXPORTING iv_name = 'DD25V'
CHANGING cg_data = ls_dd25v ).
io_xml->read( EXPORTING iv_name = 'DD26E_TABLE'
CHANGING cg_data = lt_dd26e ).
io_xml->read( EXPORTING iv_name = 'DD27P_TABLE'
CHANGING cg_data = lt_dd27p ).
corr_insert( iv_package ).
lv_name = ms_item-obj_name.
CALL FUNCTION 'DDIF_ENQU_PUT'
EXPORTING
name = lv_name
dd25v_wa = ls_dd25v
TABLES
dd26e_tab = lt_dd26e
dd27p_tab = lt_dd27p
EXCEPTIONS
enqu_not_found = 1
name_inconsistent = 2
enqu_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'error from DDIF_ENQU_PUT' ).
ENDIF.
ycl_abapgit_objects_activation=>add_item( ms_item ).
ENDMETHOD.
METHOD yif_abapgit_object~exists.
DATA: lv_viewname TYPE dd25l-viewname.
SELECT SINGLE viewname FROM dd25l INTO lv_viewname
WHERE viewname = 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 dd25l
INTO (lv_date, lv_time)
WHERE viewname = 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~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
METHOD yif_abapgit_object~jump.
jump_se11( iv_radio = 'RSRD1-ENQU'
iv_field = 'RSRD1-ENQU_VAL' ).
ENDMETHOD.
METHOD yif_abapgit_object~serialize.
DATA: lv_name TYPE ddobjname,
ls_dd25v TYPE dd25v,
lt_dd26e TYPE TABLE OF dd26e,
lt_dd27p TYPE tyt_dd27p.
lv_name = ms_item-obj_name.
CALL FUNCTION 'DDIF_ENQU_GET'
EXPORTING
name = lv_name
state = 'A'
langu = mv_language
IMPORTING
dd25v_wa = ls_dd25v
TABLES
dd26e_tab = lt_dd26e
dd27p_tab = lt_dd27p
EXCEPTIONS
illegal_input = 1
OTHERS = 2.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'error from DDIF_ENQU_GET' ).
ENDIF.
IF ls_dd25v IS INITIAL.
RETURN. " does not exist in system
ENDIF.
CLEAR: ls_dd25v-as4user,
ls_dd25v-as4date,
ls_dd25v-as4time.
_clear_dd27p_fields( CHANGING ct_dd27p = lt_dd27p ).
io_xml->add( iv_name = 'DD25V'
ig_data = ls_dd25v ).
io_xml->add( ig_data = lt_dd26e
iv_name = 'DD26E_TABLE' ).
io_xml->add( ig_data = lt_dd27p
iv_name = 'DD27P_TABLE' ).
ENDMETHOD.
METHOD _clear_dd27p_fields.
FIELD-SYMBOLS <ls_dd27p> TYPE dd27p.
LOOP AT ct_dd27p ASSIGNING <ls_dd27p>.
"taken from table
CLEAR <ls_dd27p>-headlen.
CLEAR <ls_dd27p>-scrlen1.
CLEAR <ls_dd27p>-scrlen2.
CLEAR <ls_dd27p>-scrlen3.
CLEAR <ls_dd27p>-intlen.
CLEAR <ls_dd27p>-outputlen.
CLEAR <ls_dd27p>-flength.
CLEAR <ls_dd27p>-ddtext.
CLEAR <ls_dd27p>-reptext.
CLEAR <ls_dd27p>-scrtext_s.
CLEAR <ls_dd27p>-scrtext_m.
CLEAR <ls_dd27p>-scrtext_l.
CLEAR <ls_dd27p>-rollname.
CLEAR <ls_dd27p>-rollnamevi.
CLEAR <ls_dd27p>-entitytab.
CLEAR <ls_dd27p>-datatype.
CLEAR <ls_dd27p>-inttype.
CLEAR <ls_dd27p>-ddlanguage.
CLEAR <ls_dd27p>-domname.
CLEAR <ls_dd27p>-signflag.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
565,
62,
397,
499,
18300,
62,
15252,
62,
268,
421,
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,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
1259,
83,
62,
1860,
1983,
79,
41876,
49053,
9795,
43679,
3963,
49427,
1983,
79,
13315,
5550,
38865,
35374,
13,
198,
220,
220,
220,
337,
36252,
50,
4808,
20063,
62,
1860,
1983,
79,
62,
25747,
5870,
15567,
2751,
269,
83,
62,
1860,
1983,
79,
41876,
1259,
83,
62,
1860,
1983,
79,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
575,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
23680,
62,
1677,
10917,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
331,
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,
1495,
75,
198,
220,
220,
220,
220,
220,
39319,
374,
85,
62,
7220,
198,
220,
220,
220,
220,
220,
33411,
1570,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
5357,
355,
19,
12001,
796,
705,
32,
6,
198,
220,
220,
220,
220,
220,
5357,
355,
19,
690,
220,
796,
705,
2388,
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,
331,
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,
331,
565,
62,
397,
499,
18300,
62,
785,
1845,
1653,
62,
8423,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
331,
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,
198,
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,
43,
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,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
18224,
422,
19340,
62,
16458,
62,
7206,
2538,
9328,
62,
9864,
41,
11,
12964,
10917,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
331,
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,
43979,
62,
1860,
1495,
85,
41876,
49427,
1495,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
1860,
2075,
68,
41876,
43679,
3963,
49427,
2075,
68,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
1860,
1983,
79,
41876,
1259,
83,
62,
1860,
1983,
79,
13,
628,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
1495,
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,
1495,
85,
6739,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
2075,
36,
62,
38148,
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,
2075,
68,
6739,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
1983,
47,
62,
38148,
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,
1983,
79,
6739,
628,
220,
220,
220,
1162,
81,
62,
28463,
7,
21628,
62,
26495,
6739,
628,
220,
220,
220,
300,
85,
62,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
16458,
5064,
62,
1677,
10917,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1
] |
CLASS zcl_translate_lxe_single_mess DEFINITION
PUBLIC
INHERITING FROM zcl_translate_lxe
FINAL
CREATE PUBLIC .
*"* public components of class ZCL_TRANSLATE_LXE_SINGLE_MESS
*"* do not include other source files here!!!
PUBLIC SECTION.
METHODS get_lxe_type
REDEFINITION .
METHODS has_proposed_text
REDEFINITION .
METHODS set_check_params
REDEFINITION .
PROTECTED SECTION.
*"* protected components of class ZCL_TRANSLATE_LXE_SINGLE_MESS
*"* do not include other source files here!!!
TYPES:
BEGIN OF ty_message_key,
message_id TYPE symsgid,
message_nr TYPE t100-msgnr,
END OF ty_message_key .
METHODS get_object_text
REDEFINITION .
PRIVATE SECTION.
*"* private components of class ZZC_CA02707
*"* do not include other source files here!!!
ENDCLASS.
CLASS zcl_translate_lxe_single_mess IMPLEMENTATION.
METHOD get_lxe_type.
APPEND 'MESS' TO rt_objects.
ENDMETHOD.
METHOD get_object_text.
rv_obj_text = 'MESS'.
ENDMETHOD.
METHOD has_proposed_text.
rv_has = abap_true.
ENDMETHOD.
METHOD set_check_params.
DATA ld_leng TYPE i.
DATA ld_obj_name TYPE sobj_name.
DATA ls_message_key TYPE ty_message_key.
* El nombre del mensaje requiere de un ajuste para poderlo traducir.
* En el nombre que se pasa los tres ultimos digitos es el numero de mensaje. Tengo que separarlos en dos
* para pasarlo a la estructura.
* Calculo la longitud total quitandole el espacio del numero de mensaje
ld_leng = strlen( iv_obj_name ) - 3.
* Hago un offset para recuperar los valores.
ls_message_key-message_id = iv_obj_name(ld_leng).
ls_message_key-message_nr = iv_obj_name+ld_leng(3).
* Finalmente muevo la estructura a una variable.
ld_obj_name = ls_message_key.
* Llamo al método de la clase padre para que se encargue del resto.
CALL METHOD super->set_check_params
EXPORTING
iv_object = iv_object
iv_obj_name = ld_obj_name
iv_olang = iv_olang
iv_tlang = iv_tlang
EXCEPTIONS
object_not_valid = 1
OTHERS = 2.
IF sy-subrc <> 0.
RAISE object_not_valid.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
7645,
17660,
62,
75,
27705,
62,
29762,
62,
37348,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
7645,
17660,
62,
75,
27705,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
5446,
1565,
8634,
6158,
62,
43,
55,
36,
62,
50,
2751,
2538,
62,
44,
7597,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
75,
27705,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
468,
62,
22930,
1335,
62,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
900,
62,
9122,
62,
37266,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
5097,
62,
5446,
1565,
8634,
6158,
62,
43,
55,
36,
62,
50,
2751,
2538,
62,
44,
7597,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
20500,
62,
2539,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3275,
62,
312,
41876,
827,
19662,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3275,
62,
48624,
41876,
256,
3064,
12,
907,
4593,
81,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
20500,
62,
2539,
764,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
15252,
62,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
57,
34,
62,
8141,
44698,
2998,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
7645,
17660,
62,
75,
27705,
62,
29762,
62,
37348,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
651,
62,
75,
27705,
62,
4906,
13,
198,
220,
220,
220,
43504,
10619,
705,
44,
7597,
6,
5390,
374,
83,
62,
48205,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
15252,
62,
5239,
13,
198,
220,
220,
220,
374,
85,
62,
26801,
62,
5239,
796,
705,
44,
7597,
4458,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
468,
62,
22930,
1335,
62,
5239,
13,
198,
220,
220,
220,
374,
85,
62,
10134,
796,
450,
499,
62,
7942,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
900,
62,
9122,
62,
37266,
13,
198,
220,
220,
220,
42865,
300,
67,
62,
75,
1516,
41876,
1312,
13,
198,
220,
220,
220,
42865,
300,
67,
62,
26801,
62,
3672,
41876,
27355,
73,
62,
3672,
13,
198,
220,
220,
220,
42865,
43979,
62,
20500,
62,
2539,
41876,
1259,
62,
20500,
62,
2539,
13,
198,
198,
9,
2574,
299,
2381,
260,
1619,
285,
641,
1228,
68,
1038,
13235,
390,
555,
257,
3137,
68,
31215,
279,
12342,
5439,
2083,
1229,
343,
13,
198,
9,
2039,
1288,
299,
2381,
260,
8358,
384,
279,
15462,
22346,
256,
411,
3789,
320,
418,
16839,
418,
1658,
1288,
997,
3529,
390,
285,
641,
1228,
68,
13,
309,
1516,
78,
8358,
2880,
7063,
418,
551,
23430,
198,
9,
31215,
38836,
283,
5439,
257,
8591,
1556,
1356,
5330,
13,
198,
9,
27131,
78,
8591,
890,
26331,
2472,
11238,
392,
2305,
1288,
15024,
48711,
1619,
997,
3529,
390,
285,
641,
1228,
68,
198,
220,
220,
220,
300,
67,
62,
75,
1516,
796,
965,
11925,
7,
21628,
62,
26801,
62,
3672,
1267,
532,
513,
13,
198,
198,
9,
367,
3839,
555,
11677,
31215,
664,
48568,
283,
22346,
1188,
2850,
13,
198,
220,
220,
220,
43979,
62,
20500,
62,
2539,
12,
20500,
62,
312,
796,
21628,
62,
26801,
62,
3672,
7,
335,
62,
75,
1516,
737,
198,
220,
220,
220,
43979,
62,
20500,
62,
2539,
12,
20500,
62,
48624,
796,
21628,
62,
26801,
62,
3672,
10,
335,
62,
75,
1516,
7,
18,
737,
198,
198,
9,
8125,
434,
68,
285,
518,
13038,
8591,
1556,
1356,
5330,
257,
555,
64,
7885,
13,
198,
220,
220,
220,
300,
67,
62,
26801,
62,
3672,
796,
43979,
62,
20500,
62,
2539,
13,
198,
198,
9,
406,
2543,
78,
435,
285,
25125,
24313,
390,
8591,
537,
589,
14841,
260,
31215,
8358,
384,
2207,
853,
518,
1619,
1334,
78,
13,
198,
220,
220,
220,
42815,
337,
36252,
2208,
3784,
2617,
62,
9122,
62,
37266,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
15252,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
15252,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26801,
62,
3672,
220,
220,
220,
220,
220,
796,
300,
67,
62,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
349,
648,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
349,
648,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
83,
17204,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
83,
17204,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
1662,
62,
12102,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
17926,
24352,
2134,
62,
1662,
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ECTION.
INTERFACES zif_abapgit_object.
PRIVATE SECTION.
TYPES: BEGIN OF ty_pragma,
pragma TYPE c LENGTH 40,
extension TYPE c LENGTH 1,
signature TYPE c LENGTH 10,
description TYPE c LENGTH 255,
END OF ty_pragma.
METHODS:
_raise_pragma_not_exists
RAISING
zcx_abapgit_exception,
_raise_pragma_exists
RAISING
zcx_abapgit_exception,
_raise_pragma_enqueue
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_PRAG IMPLEMENTATION.
METHOD zif_abapgit_object~changed_by.
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: lo_pragma TYPE REF TO cl_abap_pragma.
TRY.
lo_pragma = cl_abap_pragma=>get_ref( ms_item-obj_name ).
lo_pragma->delete( ).
CATCH cx_abap_pragma_not_exists.
_raise_pragma_not_exists( ).
CATCH cx_abap_pragma_enqueue.
_raise_pragma_enqueue( ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: ls_pragma TYPE ty_pragma,
lo_pragma TYPE REF TO cl_abap_pragma.
TRY.
io_xml->read(
EXPORTING
iv_name = 'PRAG'
CHANGING
cg_data = ls_pragma ).
lo_pragma = cl_abap_pragma=>create( p_pragma = ms_item-obj_name
p_package = iv_package ).
lo_pragma->set_info( p_description = ls_pragma-description
p_signature = ls_pragma-signature
p_extension = ls_pragma-extension ).
lo_pragma->save( ).
CATCH cx_abap_pragma_not_exists.
_raise_pragma_not_exists( ).
CATCH cx_abap_pragma_exists.
_raise_pragma_exists( ).
CATCH cx_abap_pragma_enqueue.
_raise_pragma_enqueue( ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~exists.
TRY.
cl_abap_pragma=>get_ref( ms_item-obj_name ).
CATCH cx_abap_pragma_not_exists.
rv_bool = abap_false.
RETURN.
ENDTRY.
rv_bool = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
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
EXCEPTIONS
not_executed = 1
invalid_object_type = 2
OTHERS = 3.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lo_pragma TYPE REF TO cl_abap_pragma,
ls_pragma TYPE zcl_abapgit_object_prag=>ty_pragma.
TRY.
lo_pragma = cl_abap_pragma=>get_ref( ms_item-obj_name ).
ls_pragma-pragma = lo_pragma->pragma.
ls_pragma-extension = lo_pragma->extension.
ls_pragma-signature = lo_pragma->signature.
ls_pragma-description = lo_pragma->description.
io_xml->add( iv_name = 'PRAG'
ig_data = ls_pragma ).
CATCH cx_abap_pragma_not_exists.
_raise_pragma_not_exists( ).
ENDTRY.
ENDMETHOD.
METHOD _raise_pragma_enqueue.
zcx_abapgit_exception=>raise( |Pragma { ms_item-obj_name } enqueue error| ).
ENDMETHOD.
METHOD _raise_pragma_exists.
zcx_abapgit_exception=>raise( |Pragma { ms_item-obj_name } exists| ).
ENDMETHOD.
METHOD _raise_pragma_not_exists.
zcx_abapgit_exception=>raise( |Pragma { ms_item-obj_name } doesn't exist| ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
1050,
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,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
1050,
363,
2611,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23864,
2611,
220,
220,
220,
220,
220,
41876,
269,
406,
49494,
2319,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7552,
220,
220,
41876,
269,
406,
49494,
352,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9877,
220,
220,
41876,
269,
406,
49494,
838,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6764,
41876,
269,
406,
49494,
14280,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
1050,
363,
2611,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
4808,
40225,
62,
1050,
363,
2611,
62,
1662,
62,
1069,
1023,
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,
4808,
40225,
62,
1050,
363,
2611,
62,
1069,
1023,
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,
4808,
40225,
62,
1050,
363,
2611,
62,
268,
36560,
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,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
23680,
62,
47,
33202,
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,
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,
5589,
533,
62,
1462,
62,
47960,
62,
9641,
13,
628,
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,
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,
2376,
62,
1050,
363,
2611,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
1050,
363,
2611,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
1050,
363,
2611,
796,
537,
62,
397,
499,
62,
1050,
363,
2611,
14804,
1136,
62,
5420,
7,
13845,
62,
9186,
12,
26801,
62,
3672,
6739,
628,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
1050,
363,
2611,
3784,
33678,
7,
6739,
628,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
397,
499,
62,
1050,
363,
2611,
62,
1662,
62,
1069,
1023,
13,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
40225,
62,
1050,
363,
2611,
62,
1662,
62,
1069,
1023,
7,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
397,
499,
62,
1050,
363,
2611,
62,
268,
36560,
13,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
40225,
62,
1050,
363,
2611,
62,
268,
36560,
7,
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,
43979,
62,
1050,
363,
2611,
41876,
1259,
62,
1050,
363,
2611,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
1050,
363,
2611,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
1050,
363,
2611,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
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,
21628,
62,
3672,
796,
705,
47,
33202,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
70,
62,
7890,
796,
43979,
62,
1050,
363,
2611,
6739,
628,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
1050,
363,
2611,
796,
537,
62,
397,
499,
62,
1050,
363,
2611,
14804,
17953,
7,
279,
62,
1050,
363,
2611,
220,
796,
13845,
62,
9186,
12,
26801,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
26495,
796,
21628,
62,
26495,
6739,
628,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
1050,
363,
2611,
3784,
2617,
62,
10951,
7,
279,
62,
11213,
796,
43979,
62,
1050,
363,
2611,
12,
11213,
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,
279,
62,
12683,
1300,
220,
220,
796,
43979,
62,
1050,
363,
2611,
12,
12683,
1300,
198,
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
] |
INTERFACE zif_abapgit_html_viewer
PUBLIC .
CONSTANTS m_id_sapevent TYPE i VALUE 1 ##NO_TEXT.
EVENTS sapevent
EXPORTING
VALUE(action) TYPE c OPTIONAL
VALUE(frame) TYPE c OPTIONAL
VALUE(getdata) TYPE c OPTIONAL
VALUE(postdata) TYPE cnht_post_data_tab OPTIONAL
VALUE(query_table) TYPE cnht_query_table OPTIONAL .
METHODS load_data
IMPORTING
!iv_url TYPE c OPTIONAL
!iv_type TYPE c DEFAULT 'text'
!iv_subtype TYPE c DEFAULT 'html'
!iv_size TYPE i DEFAULT 0
EXPORTING
!ev_assigned_url TYPE c
CHANGING
!ct_data_table TYPE STANDARD TABLE
EXCEPTIONS
dp_invalid_parameter
dp_error_general
cntl_error
html_syntax_notcorrect .
METHODS set_registered_events
IMPORTING
!it_events TYPE cntl_simple_events
EXCEPTIONS
cntl_error
cntl_system_error
illegal_event_combination .
METHODS show_url
IMPORTING
!iv_url TYPE c
EXCEPTIONS
cntl_error
cnht_error_not_allowed
cnht_error_parameter
dp_error_general .
METHODS free .
METHODS close_document .
METHODS get_url
RETURNING
VALUE(rv_url) TYPE w3url.
METHODS back .
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
397,
499,
18300,
62,
6494,
62,
1177,
263,
198,
220,
44731,
764,
628,
198,
220,
7102,
2257,
1565,
4694,
285,
62,
312,
62,
82,
1758,
1151,
41876,
1312,
26173,
8924,
352,
22492,
15285,
62,
32541,
13,
628,
220,
22399,
473,
431,
1151,
198,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
2673,
8,
41876,
269,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
14535,
8,
41876,
269,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
1136,
7890,
8,
41876,
269,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
7353,
7890,
8,
41876,
269,
77,
4352,
62,
7353,
62,
7890,
62,
8658,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
22766,
62,
11487,
8,
41876,
269,
77,
4352,
62,
22766,
62,
11487,
39852,
2849,
1847,
764,
628,
220,
337,
36252,
50,
3440,
62,
7890,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
269,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
269,
5550,
38865,
705,
5239,
6,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
7266,
4906,
220,
220,
220,
220,
220,
41876,
269,
5550,
38865,
705,
6494,
6,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
7857,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
5550,
38865,
657,
198,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
5145,
1990,
62,
562,
3916,
62,
6371,
41876,
269,
198,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
5145,
310,
62,
7890,
62,
11487,
220,
220,
41876,
49053,
9795,
43679,
198,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
288,
79,
62,
259,
12102,
62,
17143,
2357,
198,
220,
220,
220,
220,
220,
288,
79,
62,
18224,
62,
24622,
198,
220,
220,
220,
220,
220,
269,
429,
75,
62,
18224,
198,
220,
220,
220,
220,
220,
27711,
62,
1837,
41641,
62,
1662,
30283,
764,
198,
220,
337,
36252,
50,
900,
62,
33736,
62,
31534,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
270,
62,
31534,
41876,
269,
429,
75,
62,
36439,
62,
31534,
198,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
269,
429,
75,
62,
18224,
198,
220,
220,
220,
220,
220,
269,
429,
75,
62,
10057,
62,
18224,
198,
220,
220,
220,
220,
220,
5293,
62,
15596,
62,
24011,
1883,
764,
198,
220,
337,
36252,
50,
905,
62,
6371,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
41876,
269,
198,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
269,
429,
75,
62,
18224,
198,
220,
220,
220,
220,
220,
269,
77,
4352,
62,
18224,
62,
1662,
62,
40845,
198,
220,
220,
220,
220,
220,
269,
77,
4352,
62,
18224,
62,
17143,
2357,
198,
220,
220,
220,
220,
220,
288,
79,
62,
18224,
62,
24622,
764,
198,
220,
337,
36252,
50,
1479,
764,
198,
220,
337,
36252,
50,
1969,
62,
22897,
764,
198,
220,
337,
36252,
50,
651,
62,
6371,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
6371,
8,
41876,
266,
18,
6371,
13,
198,
220,
337,
36252,
50,
736,
764,
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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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
] |
CLASS zcl_app_html_list_item DEFINITION
PUBLIC
INHERITING FROM zca_app_html
FINAL
CREATE PRIVATE.
PUBLIC SECTION.
PROTECTED SECTION.
METHODS:
parse REDEFINITION.
PRIVATE SECTION.
METHODS:
constructor.
ENDCLASS.
CLASS zcl_app_html_list_item IMPLEMENTATION.
METHOD parse.
ENDMETHOD.
METHOD constructor.
super->constructor( zif_app_html=>tags-list_item ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
1324,
62,
6494,
62,
4868,
62,
9186,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
6888,
62,
1324,
62,
6494,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
13,
628,
220,
44731,
44513,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
21136,
23848,
36,
20032,
17941,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
1324,
62,
6494,
62,
4868,
62,
9186,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
21136,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
2208,
3784,
41571,
273,
7,
1976,
361,
62,
1324,
62,
6494,
14804,
31499,
12,
4868,
62,
9186,
6739,
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
] |
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
CLASS lcl_demo_120_attr DEFINITION FINAL
FRIENDS zcl_xtt_replace_block. " <--- for private fields
PUBLIC SECTION.
METHODS:
constructor
IMPORTING
is_rand_data TYPE ts_rand_data.
" All fields are private!
PRIVATE SECTION.
DATA:
group TYPE string, "#EC NEEDED
caption TYPE string, "#EC NEEDED
date TYPE d, "#EC NEEDED
sum1 TYPE bf_rbetr, "#EC NEEDED
sum2 TYPE bf_rbetr. "#EC NEEDED
ENDCLASS.
**********************************************************************
CLASS lcl_demo_120 DEFINITION FINAL INHERITING FROM lcl_demo.
PUBLIC SECTION.
" INTERFACES if_serializable_object
METHODS:
get_desc_text REDEFINITION,
get_url_base REDEFINITION,
get_screen_opt REDEFINITION,
set_merge_info REDEFINITION,
get_templates REDEFINITION.
TYPES:
tt_demo_120_attr TYPE STANDARD TABLE OF REF TO lcl_demo_120_attr WITH DEFAULT KEY.
" Public fields are always accessible
DATA title TYPE string. "#EC NEEDED
DATA t TYPE tt_rand_data. "#EC NEEDED internal flat table ( In template {R-T} )
DATA a TYPE REF TO data. "#EC NEEDED tt_demo_120_attr, Cannot show in ALV
DATA date TYPE d. "#EC NEEDED 8
DATA time TYPE t. "#EC NEEDED 6
DATA datetime TYPE cpet_reftimestamp. "#EC NEEDED 14 = date(8) + time(6)
PROTECTED SECTION.
METHODS:
_make_a_obj_table.
ENDCLASS.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
CLASS lcl_demo_120 IMPLEMENTATION.
METHOD get_desc_text.
rv_desc_text = 'Class attributes'(120).
ENDMETHOD.
METHOD get_url_base.
rv_url_base = '/xtt/class-attributes/'.
ENDMETHOD.
METHOD get_screen_opt.
rs_opt-row_count = abap_true.
ENDMETHOD.
METHOD set_merge_info.
" {R-T} in a temaplte. @see get_random_table description
io_report->get_random_table( IMPORTING et_table = me->t ).
" Fill {R-A} later. Cannot show TABLE OF OBJECTS
me->a = _make_string_message( 'Table of objects'(too) ).
" Document structure
me->title = 'Title'(tit).
" Date and time in header and footer
me->date = sy-datum.
me->time = sy-uzeit.
" obligatory only for datetime (;type=datetime)
CONCATENATE sy-datum sy-uzeit INTO me->datetime.
io_report->merge_add_one( me ).
" Make table of objects
_make_a_obj_table( ).
ENDMETHOD.
METHOD _make_a_obj_table.
" Fill {R-A}
DATA lt_demo_120_attr TYPE REF TO tt_demo_120_attr.
CREATE DATA lt_demo_120_attr.
me->a = lt_demo_120_attr.
" Convert 'T' table to 'A' table
FIELD-SYMBOLS <ls_rand_data> TYPE ts_rand_data.
LOOP AT me->t ASSIGNING <ls_rand_data>.
DATA lo_attr TYPE REF TO lcl_demo_120_attr.
CREATE OBJECT lo_attr
EXPORTING
is_rand_data = <ls_rand_data>.
APPEND lo_attr TO lt_demo_120_attr->*.
ENDLOOP.
ENDMETHOD.
METHOD get_templates.
APPEND 'ZXXT_DEMO_120-XLSX' TO rt_templates.
APPEND 'ZXXT_DEMO_120_EXCEL-XML' TO rt_templates.
ENDMETHOD.
ENDCLASS.
**********************************************************************
CLASS lcl_demo_120_attr IMPLEMENTATION.
METHOD constructor.
me->group = is_rand_data-group.
me->caption = is_rand_data-caption.
" Change a little bit from 'T' table
me->date = is_rand_data-date + 10.
" Swap
me->sum1 = is_rand_data-sum2.
me->sum2 = is_rand_data-sum1.
ENDMETHOD.
ENDCLASS.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
10097,
30934,
9,
198,
31631,
300,
565,
62,
9536,
78,
62,
10232,
62,
35226,
5550,
20032,
17941,
25261,
198,
220,
220,
220,
220,
48167,
1677,
5258,
1976,
565,
62,
742,
83,
62,
33491,
62,
9967,
13,
366,
1279,
6329,
329,
2839,
7032,
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,
318,
62,
25192,
62,
7890,
41876,
40379,
62,
25192,
62,
7890,
13,
628,
220,
220,
220,
366,
1439,
7032,
389,
2839,
0,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
1448,
220,
220,
41876,
4731,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
36465,
1961,
198,
220,
220,
220,
220,
220,
8305,
41876,
4731,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
36465,
1961,
198,
220,
220,
220,
220,
220,
3128,
220,
220,
220,
41876,
288,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
36465,
1961,
198,
220,
220,
220,
220,
220,
2160,
16,
220,
220,
220,
41876,
275,
69,
62,
81,
11181,
81,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
36465,
1961,
198,
220,
220,
220,
220,
220,
2160,
17,
220,
220,
220,
41876,
275,
69,
62,
81,
11181,
81,
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,
25113,
2943,
36465,
1961,
198,
10619,
31631,
13,
198,
17174,
17174,
2466,
1174,
198,
31631,
300,
565,
62,
9536,
78,
62,
10232,
5550,
20032,
17941,
25261,
3268,
16879,
2043,
2751,
16034,
300,
565,
62,
9536,
78,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
366,
23255,
37,
2246,
1546,
611,
62,
46911,
13821,
62,
15252,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
651,
62,
20147,
62,
5239,
220,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
651,
62,
6371,
62,
8692,
220,
220,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
651,
62,
9612,
62,
8738,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
900,
62,
647,
469,
62,
10951,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
651,
62,
11498,
17041,
220,
23848,
36,
20032,
17941,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
256,
83,
62,
9536,
78,
62,
10232,
62,
35226,
41876,
49053,
9795,
43679,
3963,
4526,
37,
5390,
300,
565,
62,
9536,
78,
62,
10232,
62,
35226,
13315,
5550,
38865,
35374,
13,
628,
220,
220,
220,
366,
5094,
7032,
389,
1464,
9857,
198,
220,
220,
220,
42865,
3670,
41876,
4731,
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,
25113,
2943,
36465,
1961,
198,
220,
220,
220,
42865,
256,
41876,
256,
83,
62,
25192,
62,
7890,
13,
25113,
2943,
36465,
1961,
5387,
6228,
3084,
357,
554,
11055,
1391,
49,
12,
51,
92,
1267,
198,
220,
220,
220,
42865,
257,
41876,
4526,
37,
5390,
1366,
13,
25113,
2943,
36465,
1961,
256,
83,
62,
9536,
78,
62,
10232,
62,
35226,
11,
26003,
905,
287,
8355,
53,
198,
220,
220,
220,
42865,
3128,
41876,
288,
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,
25113,
2943,
36465,
1961,
807,
198,
220,
220,
220,
42865,
640,
41876,
256,
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,
25113,
2943,
36465,
1961,
718,
198,
220,
220,
220,
42865,
4818,
8079,
41876,
269,
6449,
62,
260,
701,
320,
27823,
13,
25113,
2943,
36465,
1961,
1478,
796,
3128,
7,
23,
8,
1343,
640,
7,
21,
8,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
4808,
15883,
62,
64,
62,
26801,
62,
11487,
13,
198,
10619,
31631,
13,
198,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
10097,
30934,
9,
198,
31631,
300,
565,
62,
9536,
78,
62,
10232,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
651,
62,
20147,
62,
5239,
13,
198,
220,
220,
220,
374,
85,
62,
20147,
62,
5239,
796,
705,
9487,
12608,
6,
7,
10232,
737,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
651,
62,
6371,
62,
8692,
13,
198,
220,
220,
220,
374,
85,
62,
6371,
62,
8692,
796,
31051,
742,
83,
14,
4871,
12,
1078,
7657,
14,
4458,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
651,
62,
9612,
62,
8738,
13,
198,
220,
220,
220,
44608,
62,
8738,
12,
808,
62,
9127,
796,
450,
499,
62,
7942,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
900,
62,
647,
469,
62,
10951,
13,
198,
220,
220,
220,
366,
1391,
49,
12,
51,
92,
287,
257,
2169,
64,
489,
660,
13,
2488,
3826,
651,
62,
25120,
62,
11487,
6764,
198,
220,
220,
220,
33245
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
INTERFACE zif_gtt_mia_tp_factory
PUBLIC .
METHODS get_tp_reader
IMPORTING
!io_ef_parameters TYPE REF TO zif_gtt_mia_ef_parameters
RETURNING
VALUE(ro_bo_reader) TYPE REF TO zif_gtt_mia_tp_reader .
METHODS get_ef_parameters
IMPORTING
!iv_appsys TYPE /saptrx/applsystem
!is_app_obj_types TYPE /saptrx/aotypes
!it_all_appl_tables TYPE trxas_tabcontainer
!it_app_type_cntl_tabs TYPE trxas_apptype_tabs OPTIONAL
!it_app_objects TYPE trxas_appobj_ctabs
RETURNING
VALUE(ro_ef_parameters) TYPE REF TO zif_gtt_mia_ef_parameters .
METHODS get_ef_processor
IMPORTING
!is_definition TYPE zif_gtt_mia_ef_types=>ts_definition
!io_bo_factory TYPE REF TO zif_gtt_mia_tp_factory
!iv_appsys TYPE /saptrx/applsystem
!is_app_obj_types TYPE /saptrx/aotypes
!it_all_appl_tables TYPE trxas_tabcontainer
!it_app_type_cntl_tabs TYPE trxas_apptype_tabs
!it_app_objects TYPE trxas_appobj_ctabs
RETURNING
VALUE(ro_ef_processor) TYPE REF TO zif_gtt_mia_ef_processor
RAISING
cx_udm_message .
METHODS get_pe_filler
IMPORTING
!io_ef_parameters TYPE REF TO zif_gtt_mia_ef_parameters
!io_bo_reader TYPE REF TO zif_gtt_mia_tp_reader
RETURNING
VALUE(ro_pe_filler) TYPE REF TO zif_gtt_mia_pe_filler
RAISING
cx_udm_message .
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
70,
926,
62,
20730,
62,
34788,
62,
69,
9548,
198,
220,
44731,
764,
628,
198,
220,
337,
36252,
50,
651,
62,
34788,
62,
46862,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
952,
62,
891,
62,
17143,
7307,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
891,
62,
17143,
7307,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
2127,
62,
46862,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
34788,
62,
46862,
764,
198,
220,
337,
36252,
50,
651,
62,
891,
62,
17143,
7307,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
1324,
17597,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
82,
2373,
40914,
14,
1324,
75,
10057,
198,
220,
220,
220,
220,
220,
5145,
271,
62,
1324,
62,
26801,
62,
19199,
220,
220,
220,
220,
220,
220,
41876,
1220,
82,
2373,
40914,
14,
64,
13567,
198,
220,
220,
220,
220,
220,
5145,
270,
62,
439,
62,
1324,
75,
62,
83,
2977,
220,
220,
220,
220,
41876,
491,
87,
292,
62,
8658,
34924,
198,
220,
220,
220,
220,
220,
5145,
270,
62,
1324,
62,
4906,
62,
66,
429,
75,
62,
8658,
82,
220,
41876,
491,
87,
292,
62,
1324,
4906,
62,
8658,
82,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
5145,
270,
62,
1324,
62,
48205,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
491,
87,
292,
62,
1324,
26801,
62,
310,
8937,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
891,
62,
17143,
7307,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
891,
62,
17143,
7307,
764,
198,
220,
337,
36252,
50,
651,
62,
891,
62,
41341,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
271,
62,
46758,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
70,
926,
62,
20730,
62,
891,
62,
19199,
14804,
912,
62,
46758,
198,
220,
220,
220,
220,
220,
5145,
952,
62,
2127,
62,
69,
9548,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
34788,
62,
69,
9548,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
1324,
17597,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
82,
2373,
40914,
14,
1324,
75,
10057,
198,
220,
220,
220,
220,
220,
5145,
271,
62,
1324,
62,
26801,
62,
19199,
220,
220,
220,
220,
220,
41876,
1220,
82,
2373,
40914,
14,
64,
13567,
198,
220,
220,
220,
220,
220,
5145,
270,
62,
439,
62,
1324,
75,
62,
83,
2977,
220,
220,
220,
41876,
491,
87,
292,
62,
8658,
34924,
198,
220,
220,
220,
220,
220,
5145,
270,
62,
1324,
62,
4906,
62,
66,
429,
75,
62,
8658,
82,
41876,
491,
87,
292,
62,
1324,
4906,
62,
8658,
82,
198,
220,
220,
220,
220,
220,
5145,
270,
62,
1324,
62,
48205,
220,
220,
220,
220,
220,
220,
220,
41876,
491,
87,
292,
62,
1324,
26801,
62,
310,
8937,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
891,
62,
41341,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
891,
62,
41341,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
43213,
62,
463,
76,
62,
20500,
764,
198,
220,
337,
36252,
50,
651,
62,
431,
62,
69,
4665,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
952,
62,
891,
62,
17143,
7307,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
891,
62,
17143,
7307,
198,
220,
220,
220,
220,
220,
5145,
952,
62,
2127,
62,
46862,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
34788,
62,
46862,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
431,
62,
69,
4665,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
70,
926,
62,
20730,
62,
431,
62,
69,
4665,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
43213,
62,
463,
76,
62,
20500,
764,
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,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tt_mia_ote_dl_item_rel.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_APPSYS) TYPE /SAPTRX/APPLSYSTEM
*" REFERENCE(I_APP_OBJ_TYPES) TYPE /SAPTRX/AOTYPES
*" REFERENCE(I_ALL_APPL_TABLES) TYPE TRXAS_TABCONTAINER
*" REFERENCE(I_APPTYPE_TAB) TYPE TRXAS_APPTYPE_TABS_WA
*" REFERENCE(I_APP_OBJECT) TYPE TRXAS_APPOBJ_CTAB_WA
*" EXPORTING
*" VALUE(E_RESULT) LIKE SY-BINPT
*" TABLES
*" C_LOGTABLE STRUCTURE BAPIRET2 OPTIONAL
*" EXCEPTIONS
*" PARAMETER_ERROR
*" RELEVANCE_DETERM_ERROR
*" STOP_PROCESSING
*"----------------------------------------------------------------------
DATA: lt_app_objects TYPE trxas_appobj_ctabs,
lo_udm_message TYPE REF TO cx_udm_message,
ls_bapiret TYPE bapiret2.
lt_app_objects = VALUE #( ( i_app_object ) ).
TRY.
e_result = zcl_gtt_mia_ef_performer=>check_relevance(
is_definition = VALUE #(
maintab = zif_gtt_mia_app_constants=>cs_tabledef-dl_item_new
mastertab = zif_gtt_mia_app_constants=>cs_tabledef-dl_header_new )
io_tp_factory = NEW zcl_gtt_mia_tp_factory_dli( )
iv_appsys = i_appsys
is_app_obj_types = i_app_obj_types
it_all_appl_tables = i_all_appl_tables
it_app_objects = lt_app_objects ).
CATCH cx_udm_message INTO lo_udm_message.
zcl_gtt_mia_tools=>get_errors_log(
EXPORTING
io_umd_message = lo_udm_message
iv_appsys = i_appsys
IMPORTING
es_bapiret = ls_bapiret ).
" add error message
APPEND ls_bapiret TO c_logtable.
" throw corresponding exception
CASE lo_udm_message->textid.
WHEN zif_gtt_mia_ef_constants=>cs_errors-stop_processing.
RAISE stop_processing.
WHEN zif_gtt_mia_ef_constants=>cs_errors-table_determination.
RAISE parameter_error.
ENDCASE.
ENDTRY.
ENDFUNCTION.
| [
42296,
4177,
2849,
1976,
70,
926,
62,
20730,
62,
1258,
62,
25404,
62,
9186,
62,
2411,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
2969,
3705,
16309,
8,
41876,
220,
1220,
50,
2969,
5446,
55,
14,
2969,
6489,
23060,
25361,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
24805,
62,
9864,
41,
62,
9936,
47,
1546,
8,
41876,
220,
1220,
50,
2969,
5446,
55,
14,
32,
2394,
48232,
1546,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
7036,
62,
2969,
6489,
62,
5603,
9148,
1546,
8,
41876,
220,
7579,
55,
1921,
62,
5603,
2749,
1340,
30339,
1137,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
24805,
25216,
62,
5603,
33,
8,
41876,
220,
7579,
55,
1921,
62,
24805,
25216,
62,
5603,
4462,
62,
15543,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
24805,
62,
9864,
23680,
8,
41876,
220,
7579,
55,
1921,
62,
24805,
9864,
41,
62,
4177,
6242,
62,
15543,
198,
9,
1,
220,
7788,
15490,
2751,
198,
9,
1,
220,
220,
220,
220,
26173,
8924,
7,
36,
62,
19535,
16724,
8,
34178,
220,
19704,
12,
33,
1268,
11571,
198,
9,
1,
220,
309,
6242,
28378,
198,
9,
1,
220,
220,
220,
220,
220,
327,
62,
25294,
38148,
19269,
18415,
11335,
220,
347,
17614,
26087,
17,
39852,
2849,
1847,
198,
9,
1,
220,
7788,
42006,
11053,
198,
9,
1,
220,
220,
220,
220,
220,
29463,
2390,
2767,
1137,
62,
24908,
198,
9,
1,
220,
220,
220,
220,
220,
49968,
53,
19240,
62,
35,
2767,
1137,
44,
62,
24908,
198,
9,
1,
220,
220,
220,
220,
220,
44934,
62,
4805,
4503,
7597,
2751,
198,
9,
1,
10097,
23031,
198,
220,
42865,
25,
300,
83,
62,
1324,
62,
48205,
41876,
491,
87,
292,
62,
1324,
26801,
62,
310,
8937,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
463,
76,
62,
20500,
41876,
4526,
37,
5390,
43213,
62,
463,
76,
62,
20500,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
65,
499,
557,
83,
220,
220,
220,
220,
41876,
275,
499,
557,
83,
17,
13,
628,
220,
300,
83,
62,
1324,
62,
48205,
220,
796,
26173,
8924,
1303,
7,
357,
1312,
62,
1324,
62,
15252,
1267,
6739,
628,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
304,
62,
20274,
220,
796,
1976,
565,
62,
70,
926,
62,
20730,
62,
891,
62,
525,
16354,
14804,
9122,
62,
260,
2768,
590,
7,
198,
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,
220,
220,
220,
220,
220,
796,
26173,
8924,
1303,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1388,
8658,
220,
220,
796,
1976,
361,
62,
70,
926,
62,
20730,
62,
1324,
62,
9979,
1187,
14804,
6359,
62,
83,
4510,
891,
12,
25404,
62,
9186,
62,
3605,
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,
4958,
8658,
796,
1976,
361,
62,
70,
926,
62,
20730,
62,
1324,
62,
9979,
1187,
14804,
6359,
62,
83,
4510,
891,
12,
25404,
62,
25677,
62,
3605,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
34788,
62,
69,
9548,
220,
220,
220,
220,
220,
220,
220,
220,
796,
12682,
1976,
565,
62,
70,
926,
62,
20730,
62,
34788,
62,
69,
9548,
62,
67,
4528,
7,
1267,
198,
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,
1312,
62,
1324,
17597,
198,
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,
1312,
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,
340,
62,
439,
62,
1324,
75,
62,
83,
2977,
220,
220,
220,
796,
1312,
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,
340,
62,
1324,
62,
48205,
220,
220,
220,
220,
220,
220,
220,
796,
300,
83,
62,
1324,
62,
48205,
6739,
628,
220,
220,
220,
327,
11417,
43213,
62,
463,
76,
62,
20500,
39319,
2376,
62,
463,
76,
62,
20500,
13,
198,
220,
220,
220,
220,
220,
1976,
565,
62,
70,
926,
62,
20730,
62,
31391,
14804,
1136,
62,
48277,
62,
6404,
7,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
388,
67,
62,
20500,
796,
2376,
62,
463,
76,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1324,
17597,
220,
220,
220,
220,
220,
796,
1312,
62,
1324,
17597,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1658,
62,
65,
499,
557,
83,
220,
220,
220,
220,
796,
43979,
62,
65,
499,
557,
83,
6739,
628,
220,
220,
220,
220,
220,
366,
751,
4049,
3275,
198,
220,
220,
220,
220,
220,
43504,
10619,
43979,
62,
65,
499,
557,
83,
5390,
269,
62,
6404,
11487,
13,
628,
220,
220,
220,
220,
220,
366,
3714,
11188,
6631,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
"! <p class="shorttext synchronized" lang="en">Interface Parameters</p>
CLASS zcl_zintfmonitor012_read DEFINITION
PUBLIC
CREATE PRIVATE INHERITING FROM zcl_zintfmonitor_base_read.
PUBLIC SECTION.
CONSTANTS:
"! <p class="shorttext synchronized" lang="en">Parameter data types</p>
BEGIN OF mc_datatype,
processing TYPE zintfmonitor012-datatype VALUE 'P',
returning TYPE zintfmonitor012-datatype VALUE 'R',
undefined TYPE zintfmonitor012-datatype VALUE '?',
END OF mc_datatype.
"! <p class="shorttext synchronized" lang="en">Class constructor</p>
CLASS-METHODS class_constructor.
"! <p class="shorttext synchronized" lang="en">Delete Details</p>
"!
"! @parameter is_details | <p class="shorttext synchronized" lang="en">List Details</p>
CLASS-METHODS delete_details
IMPORTING
is_details TYPE zintfmonitor012
RAISING
zcx_intfmonitor .
"! <p class="shorttext synchronized" lang="en">Delete Multiple</p>
"!
"! @parameter it_list | <p class="shorttext synchronized" lang="en">List Details</p>
CLASS-METHODS delete_list
IMPORTING
it_list TYPE ztt_zintfmonitor012
RAISING
zcx_intfmonitor .
"! <p class="shorttext synchronized" lang="en">Find details by keys</p>
"!
"! @parameter id_intfid | <p class="shorttext synchronized" lang="en">Interface</p>
"! @parameter id_param | <p class="shorttext synchronized" lang="en">Parameter</p>
"! @parameter rs_result | <p class="shorttext synchronized" lang="en">Details</p>
CLASS-METHODS get_details
IMPORTING
id_intfid TYPE zintfmonitor012-intfid
id_param TYPE zintfmonitor012-param
RETURNING
VALUE(rs_result) TYPE zintfmonitor012
RAISING
zcx_intfmonitor .
"! <p class="shorttext synchronized" lang="en">Find Multiple details by keys</p>
"!
"! @parameter id_intfid | <p class="shorttext synchronized" lang="en">Interface</p>
"! @parameter id_param | <p class="shorttext synchronized" lang="en">Parameter</p>
"! @parameter et_list | <p class="shorttext synchronized" lang="en">List Details</p>
CLASS-METHODS get_list
IMPORTING
id_intfid TYPE zintfmonitor012-intfid OPTIONAL
id_param TYPE zintfmonitor012-param OPTIONAL
EXPORTING
et_list TYPE ztt_zintfmonitor012
RAISING
zcx_intfmonitor .
"! <p class="shorttext synchronized" lang="en">Initializes Buffer Data</p>
CLASS-METHODS init_buffer .
"! <p class="shorttext synchronized" lang="en">Save Details</p>
"!
"! @parameter is_details | <p class="shorttext synchronized" lang="en">Detail</p>
"! @parameter if_add_to_buffer | <p class="shorttext synchronized" lang="en">Add to buffer?</p>
"! @raising zcx_intfmonitor | Undefined error
CLASS-METHODS save_details
IMPORTING
is_details TYPE zintfmonitor012
if_add_to_buffer TYPE abap_bool DEFAULT abap_false
RAISING
zcx_intfmonitor .
"! <p class="shorttext synchronized" lang="en">Save Multiple</p>
"!
"! @parameter it_list | <p class="shorttext synchronized" lang="en">List Details</p>
"! @parameter if_add_to_buffer | <p class="shorttext synchronized" lang="en">Add to buffer?</p>
"! @raising zcx_intfmonitor | Undefined error
CLASS-METHODS save_list
IMPORTING
it_list TYPE ztt_zintfmonitor012
if_add_to_buffer TYPE abap_bool DEFAULT abap_false
RAISING
zcx_intfmonitor .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF mtyp_ranges,
intfid TYPE RANGE OF zintfmonitor012-intfid,
param TYPE RANGE OF zintfmonitor012-param,
END OF mtyp_ranges .
"! <p class="shorttext synchronized" lang="en">Selection Ranges</p>
CLASS-DATA gt_ranges TYPE mtyp_ranges .
"! <p class="shorttext synchronized" lang="en">Data Buffer</p>
CLASS-DATA gt_buffer TYPE ztt_zintfmonitor012 .
"! <p class="shorttext synchronized" lang="en">Reads DB Table</p>
CLASS-METHODS do_select.
ENDCLASS.
CLASS zcl_zintfmonitor012_read IMPLEMENTATION.
METHOD delete_details.
DATA lt_list TYPE ztt_zintfmonitor012 .
DATA ls_list LIKE LINE OF lt_list.
DATA lo_exception TYPE REF TO zcx_intfmonitor.
ASSERT is_details IS NOT INITIAL.
TRY .
MOVE-CORRESPONDING is_details TO ls_list.
INSERT ls_list INTO TABLE lt_list[].
delete_list( lt_list[] ).
CATCH zcx_intfmonitor INTO lo_exception.
RAISE EXCEPTION lo_exception.
ENDTRY.
ENDMETHOD.
METHOD delete_list.
ASSERT it_list[] IS NOT INITIAL.
DELETE zintfmonitor012 FROM TABLE it_list.
IF NOT sy-subrc IS INITIAL.
RAISE EXCEPTION TYPE zcx_intfmonitor.
ENDIF.
ENDMETHOD.
METHOD get_details.
DATA lt_list TYPE ztt_zintfmonitor012 .
DATA ls_list LIKE LINE OF lt_list.
DATA lo_exception TYPE REF TO zcx_intfmonitor.
READ TABLE gt_buffer INTO rs_result
WITH KEY intfid = id_intfid
param = id_param.
IF NOT sy-subrc IS INITIAL.
TRY.
get_list( EXPORTING id_intfid = id_intfid
id_param = id_param
IMPORTING et_list = lt_list ).
READ TABLE lt_list INDEX 1 INTO ls_list.
MOVE-CORRESPONDING ls_list TO rs_result.
CATCH zcx_intfmonitor INTO lo_exception.
RAISE EXCEPTION lo_exception.
ENDTRY.
ENDIF.
ENDMETHOD.
METHOD get_list.
CLEAR gt_ranges.
IF id_intfid IS SUPPLIED.
_add_range( EXPORTING id_low = id_intfid
CHANGING ct_range = gt_ranges-intfid ).
ENDIF.
IF id_param IS SUPPLIED.
_add_range( EXPORTING id_low = id_param
CHANGING ct_range = gt_ranges-param ).
ENDIF.
LOOP AT gt_buffer INTO DATA(ls_buffer) WHERE intfid IN gt_ranges-intfid
AND param IN gt_ranges-param.
INSERT INITIAL LINE INTO TABLE et_list ASSIGNING FIELD-SYMBOL(<ls_list>).
MOVE-CORRESPONDING ls_buffer TO <ls_list>.
ENDLOOP.
IF et_list IS INITIAL.
RAISE EXCEPTION TYPE zcx_intfmonitor.
ENDIF.
ENDMETHOD.
METHOD init_buffer.
CLEAR gt_buffer[].
do_select( ).
ENDMETHOD.
METHOD save_details.
DATA lt_list TYPE ztt_zintfmonitor012 .
DATA ls_list LIKE LINE OF lt_list.
DATA lo_exception TYPE REF TO zcx_intfmonitor.
ASSERT is_details IS NOT INITIAL.
TRY .
MOVE-CORRESPONDING is_details TO ls_list.
INSERT ls_list INTO TABLE lt_list[].
save_list( EXPORTING it_list = lt_list[]
if_add_to_buffer = if_add_to_buffer ).
CATCH zcx_intfmonitor INTO lo_exception.
RAISE EXCEPTION lo_exception.
ENDTRY.
ENDMETHOD.
METHOD save_list.
ASSERT it_list[] IS NOT INITIAL.
MODIFY zintfmonitor012 FROM TABLE it_list.
IF NOT sy-subrc IS INITIAL.
RAISE EXCEPTION TYPE zcx_intfmonitor.
ENDIF.
IF if_add_to_buffer = abap_true.
LOOP AT it_list INTO DATA(ls_list).
READ TABLE gt_buffer WITH KEY intfid = ls_list-intfid
param = ls_list-param
ASSIGNING FIELD-SYMBOL(<ls_buffer>).
IF sy-subrc IS INITIAL.
<ls_buffer>-datatype = ls_list-datatype.
<ls_buffer>-paramtype = ls_list-paramtype.
ELSE.
INSERT ls_list INTO TABLE gt_buffer.
ENDIF.
ENDLOOP.
ENDIF.
ENDMETHOD.
METHOD class_constructor.
init_buffer( ).
ENDMETHOD.
METHOD do_select.
SELECT * INTO TABLE gt_buffer FROM zintfmonitor012 ORDER BY PRIMARY KEY.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
39317,
40117,
3556,
79,
29,
198,
31631,
1976,
565,
62,
89,
600,
69,
41143,
30206,
62,
961,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
4810,
3824,
6158,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
89,
600,
69,
41143,
62,
8692,
62,
961,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
36301,
1366,
3858,
3556,
79,
29,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
36650,
62,
19608,
265,
2981,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7587,
41876,
1976,
600,
69,
41143,
30206,
12,
19608,
265,
2981,
26173,
8924,
705,
47,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
8024,
220,
41876,
1976,
600,
69,
41143,
30206,
12,
19608,
265,
2981,
26173,
8924,
705,
49,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
28721,
220,
41876,
1976,
600,
69,
41143,
30206,
12,
19608,
265,
2981,
26173,
8924,
705,
30,
3256,
198,
220,
220,
220,
220,
220,
23578,
220,
220,
3963,
36650,
62,
19608,
265,
2981,
13,
628,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9487,
23772,
3556,
79,
29,
198,
220,
220,
220,
42715,
12,
49273,
50,
1398,
62,
41571,
273,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
38727,
14890,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
318,
62,
36604,
930,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
8053,
14890,
3556,
79,
29,
198,
220,
220,
220,
42715,
12,
49273,
50,
12233,
62,
36604,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
36604,
41876,
1976,
600,
69,
41143,
30206,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
600,
69,
41143,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
38727,
20401,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
340,
62,
4868,
930,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
8053,
14890,
3556,
79,
29,
198,
220,
220,
220,
42715,
12,
49273,
50,
12233,
62,
4868,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
4868,
41876,
1976,
926,
62,
89,
600,
69,
41143,
30206,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
600,
69,
41143,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
16742,
3307,
416,
8251,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
4686,
62,
600,
69,
312,
930,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
39317,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
4686,
62,
17143,
220,
930,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
36301,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
44608,
62,
20274,
930,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
24259,
3556,
79,
29,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
36604,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
62,
600,
69,
312,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
600,
69,
41143,
30206,
12,
600,
69,
312,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
62,
17143,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
600,
69,
41143,
30206,
12,
17143,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
20274,
8,
41876,
1976,
600,
69,
41143,
30206,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
600,
69,
41143,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
16742,
20401,
3307,
416,
8251,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
4686,
62,
600,
69,
312,
930,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
39317,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
4686,
62,
17143,
220,
930,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
36301,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
2123,
62,
4868,
220,
220,
930,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
8053,
14890,
3556,
79,
29,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
4868,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
62,
600,
69,
312,
41876,
1976,
600,
69,
41143,
30206,
12,
600,
69,
312,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
62,
17143,
220,
41876,
1976,
600,
69,
41143,
30206,
12,
17143,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2123,
62,
4868,
220,
220,
41876,
1976,
926,
62,
89,
600,
69,
41143,
30206,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
600,
69,
41143,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
24243,
4340,
47017,
6060,
3556,
79,
29,
198,
220,
220,
220,
42715,
12,
49273,
50,
2315,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
*----------------------------------------------------------------------*
* CLASS ltcl_convert DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS ltcl_convert DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL.
PRIVATE SECTION.
METHODS convert_int FOR TESTING RAISING ycx_abapgit_exception.
METHODS split_string FOR TESTING.
METHODS convert_bitbyte FOR TESTING RAISING ycx_abapgit_exception.
ENDCLASS.
*----------------------------------------------------------------------*
* CLASS ltcl_convert IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS ltcl_convert IMPLEMENTATION.
METHOD convert_bitbyte.
DATA: lv_xstring TYPE xstring,
lv_byte TYPE x,
lv_input TYPE i,
lv_bitbyte TYPE yif_abapgit_definitions=>ty_bitbyte,
lv_byteint TYPE i,
lv_xbyteint TYPE xstring,
lv_xresult TYPE xstring,
lv_result TYPE i,
lv_offset TYPE i.
DO 1000 TIMES.
lv_result = 0.
CLEAR: lv_byteint, lv_xbyteint, lv_xresult.
lv_input = sy-index * 64.
lv_xstring = ycl_abapgit_convert=>int_to_xstring4( lv_input ).
DO 4 TIMES.
lv_offset = sy-index - 1.
lv_byte = lv_xstring+lv_offset(1).
lv_bitbyte = ycl_abapgit_convert=>x_to_bitbyte( lv_byte ).
lv_byteint = ycl_abapgit_convert=>bitbyte_to_int( lv_bitbyte ).
lv_xbyteint = lv_byteint.
CONCATENATE lv_xresult lv_xbyteint INTO lv_xresult
IN BYTE MODE.
ENDDO.
lv_result = ycl_abapgit_convert=>xstring_to_int( lv_xresult ).
cl_abap_unit_assert=>assert_equals(
exp = lv_input
act = lv_result ).
ENDDO.
ENDMETHOD.
METHOD convert_int.
DATA: lv_xstring TYPE xstring,
lv_input TYPE i,
lv_result TYPE i.
DO 1000 TIMES.
lv_input = sy-index.
lv_xstring = ycl_abapgit_convert=>int_to_xstring4( lv_input ).
lv_result = ycl_abapgit_convert=>xstring_to_int( lv_xstring ).
cl_abap_unit_assert=>assert_equals(
exp = lv_input
act = lv_result ).
ENDDO.
ENDMETHOD.
METHOD split_string.
DATA: lt_act TYPE string_table,
lt_exp TYPE string_table.
APPEND 'ABC' TO lt_exp.
APPEND '123' TO lt_exp.
" Case 1. String separated by CRLF
lt_act = ycl_abapgit_convert=>split_string( 'ABC' && cl_abap_char_utilities=>cr_lf && '123' ).
cl_abap_unit_assert=>assert_equals( exp = lt_exp
act = lt_act
msg = ' Error during string split: CRLF' ).
CLEAR: lt_act.
" Case 2. String separated by LF
lt_act = ycl_abapgit_convert=>split_string( 'ABC' && cl_abap_char_utilities=>newline && '123' ).
cl_abap_unit_assert=>assert_equals( exp = lt_exp
act = lt_act
msg = ' Error during string split: LF' ).
ENDMETHOD.
ENDCLASS.
| [
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
83,
565,
62,
1102,
1851,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
300,
83,
565,
62,
1102,
1851,
5550,
20032,
17941,
7473,
43001,
2751,
45698,
42,
49277,
43638,
5805,
7597,
360,
4261,
6234,
6006,
9863,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
10385,
62,
600,
7473,
43001,
2751,
17926,
1797,
2751,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
220,
220,
220,
337,
36252,
50,
6626,
62,
8841,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
10385,
62,
2545,
26327,
7473,
43001,
2751,
17926,
1797,
2751,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
83,
565,
62,
1102,
1851,
30023,
2538,
10979,
6234,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
300,
83,
565,
62,
1102,
1851,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
10385,
62,
2545,
26327,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
87,
8841,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26327,
220,
220,
220,
220,
41876,
2124,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
15414,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
2545,
26327,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
2545,
26327,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26327,
600,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
87,
26327,
600,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
87,
20274,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
20274,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
28968,
220,
220,
41876,
1312,
13,
628,
220,
220,
220,
8410,
8576,
31742,
1546,
13,
628,
220,
220,
220,
220,
220,
300,
85,
62,
20274,
796,
657,
13,
198,
220,
220,
220,
220,
220,
30301,
1503,
25,
300,
85,
62,
26327,
600,
11,
300,
85,
62,
87,
26327,
600,
11,
300,
85,
62,
87,
20274,
13,
628,
220,
220,
220,
220,
220,
300,
85,
62,
15414,
220,
796,
827,
12,
9630,
1635,
5598,
13,
198,
220,
220,
220,
220,
220,
300,
85,
62,
87,
8841,
796,
331,
565,
62,
397,
499,
18300,
62,
1102,
1851,
14804,
600,
62,
1462,
62,
87,
8841,
19,
7,
300,
85,
62,
15414,
6739,
198,
220,
220,
220,
220,
220,
8410,
604,
31742,
1546,
13,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
28968,
796,
827,
12,
9630,
532,
352,
13,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26327,
796,
300,
85,
62,
87,
8841,
10,
6780,
62,
28968,
7,
16,
737,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
2545,
26327,
796,
331,
565,
62,
397,
499,
18300,
62,
1102,
1851,
14804,
87,
62,
1462,
62,
2545,
26327,
7,
300,
85,
62,
26327,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26327,
600,
796,
331,
565,
62,
397,
499,
18300,
62,
1102,
1851,
14804,
2545,
26327,
62,
1462,
62,
600,
7,
300,
85,
62,
2545,
26327,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
87,
26327,
600,
796,
300,
85,
62,
26327,
600,
13,
198,
220,
220,
220,
220,
220,
220,
220,
39962,
1404,
1677,
6158,
300,
85,
62,
87,
20274,
300,
85,
62,
87,
26327,
600,
39319,
300,
85,
62,
87,
20274,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
11050,
9328,
337,
16820,
13,
198,
220,
220,
220,
220,
220,
23578,
18227,
13,
198,
220,
220,
220,
220,
220,
300,
85,
62,
20274,
796,
331,
565,
62,
397,
499,
18300,
62,
1102,
1851,
14804,
87,
8841,
62,
1462,
62,
600,
7,
300,
85,
62,
87,
20274,
6739,
628,
220,
220,
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,
220,
220,
1033,
796,
300,
85,
62,
15414,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
719,
796,
300,
85,
62,
20274,
6739,
628,
220,
220,
220,
23578,
18227,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
10385,
62,
600,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
87,
8841,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
15414,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
20274,
220,
41876,
1312,
13,
628,
198,
220,
220,
220,
8410,
8576,
31742,
1546,
13,
198,
220,
220,
220,
220,
220,
300,
85,
62,
15414,
796,
827,
12,
9630,
13,
198,
220,
220,
220,
220,
220,
300,
85,
62,
87,
8841,
796,
331,
565,
62,
397,
499,
18300,
62,
1102,
1851,
14804,
600,
62,
1462,
62,
87,
8841,
19,
7,
300,
85,
62,
15414,
6739,
198,
220,
220,
220,
220,
220,
300,
85,
62,
20274,
796,
331,
565,
62,
397,
499,
18300,
62,
1102,
1851,
14804,
87,
8841,
62,
1462,
62,
600,
7,
300,
85,
62,
87,
8841,
6739,
628,
220,
220,
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,
220,
220,
1033,
796,
300,
85,
62,
15414,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
719,
796,
300,
85,
62,
20274,
6739,
198,
220,
220,
220,
23578,
18227,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
6626,
62,
8841,
13,
628,
220,
220,
220,
42865
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1
] |
class ZCL_GUIDRASIL_BUILDER definition
public
final
create public .
*"* public components of class ZCL_GUIDRASIL_BUILDER
*"* do not include other source files here!!!
public section.
type-pools ABAP .
type-pools CNTB .
type-pools ICON .
interfaces ZIF_GUIDRASIL_FUNC_RECEIVER .
constants ICON_CONTAINER type ZGUIDRASIL_ICON_NAME value ICON_WD_VIEW_CONTAINER ##NO_TEXT.
constants K_MODE_DESIGN type CHAR01 value 'D' ##NO_TEXT.
constants K_MODE_PATTERN type CHAR01 value 'P' ##NO_TEXT.
class-methods CLASS_CONSTRUCTOR .
class-methods INIT_CONTROL_NAME
importing
!IV_TEXT type C
returning
value(EV_NAME) type TEXT30 .
methods ADD_CONTAINER
importing
!IV_SIDE type I
!IV_CONTROL_ID type I optional .
methods ADD_CONTAINER_BOX .
methods ADD_CONTAINER_CC
importing
!CC_NAME type CLIKE optional .
methods BUILD .
methods CONSTRUCTOR
importing
!IV_PNAME type ZGUIDRASIL_PROJECT
!IV_MODE type CHAR01 default SPACE .
methods GET_CREATION_CODE
returning
value(CODE) type STRING_TABLE .
methods GET_EVENT_PATTERN
returning
value(PATTERN) type STRING_TABLE .
methods GET_EVENT_PATTERN_PLUS
returning
value(PATTERN) type STRING_TABLE .
methods GET_OBJECT_BY_NAME
importing
!NAME type CLIKE
returning
value(OBJECT) type ref to CL_GUI_OBJECT .
methods SAVE .
PROTECTED SECTION.
*"* protected components of class ZCL_GUIDRASIL_CONTROL_BUILDER
*"* do not include other source files here!!!
METHODS add_control_object
IMPORTING
VALUE(fcode) TYPE ui_func
VALUE(r_sender) TYPE REF TO object
VALUE(r_receiver) TYPE REF TO object
VALUE(r_toolbar) TYPE REF TO cl_gui_toolbar .
METHODS get_menu_functions
IMPORTING
!fcode TYPE clike
RETURNING
VALUE(it_functions) TYPE ttb_button .
private section.
types:
*"* private components of class ZCL_GUIDRASIL_BUILDER
*"* do not include other source files here!!!
BEGIN OF gys_control_classes,
id TYPE i, "numc5,
classname TYPE seoclsname,
END OF gys_control_classes .
types:
gyt_control_classes TYPE SORTED TABLE OF gys_control_classes
WITH UNIQUE KEY id .
types:
BEGIN OF gys_control_admin,
id TYPE i,
name TYPE string,
parent TYPE REF TO zcl_guidrasil_control_base,
parent_name TYPE zguidrasil_container_name,
control TYPE REF TO zcl_guidrasil_control_base,
END OF gys_control_admin .
types:
gyt_control_admin TYPE TABLE OF gys_control_admin .
class-data MT_IDX type TY_IDX_T .
class-data MT_CTLS type ZGUIDRASIL_CTLS_T .
class-data GV_CONTROL_ID type NUMC3 .
data CURRENT_CONTROL_ID type I .
data R_TOOLBAR type ref to CL_GUI_TOOLBAR .
data MT_CONTROLS type ZGUIDRASIL_OBJ_T .
data MODE type CHAR01 .
data PNAME type CHAR40 .
data R_DOCKING type ref to CL_GUI_DOCKING_CONTAINER .
data R_TOOLBAR_CONTAINER type ref to CL_GUI_DIALOGBOX_CONTAINER .
class-data GT_CONTROL_CLASSES type GYT_CONTROL_CLASSES .
data T_CONTROL_ADMIN type GYT_CONTROL_ADMIN .
class-data GT_DELETE_FUNCTION type TTB_BUTTON .
class-data GT_CLOSE_FUNCTION type TTB_BUTTON .
class-data GT_INSERT_FUNCTION type TTB_BUTTON .
class-data GT_PATTERN_FUNCTION type TTB_BUTTON .
data GT_CONTROL_LIST type ZGUIDRASIL_CONTROL_LIST_T .
class-methods GET_NAME_BUTTON
importing
!IR_CONTROL type ref to ZCL_GUIDRASIL_CONTROL_BASE
changing
!CT_FUNCTIONS type TTB_BUTTON .
methods ADD_CONTROL
importing
!IR_CONTROL type ref to ZCL_GUIDRASIL_CONTROL_BASE
!IR_PARENT type ref to ZCL_GUIDRASIL_CONTROL_BASE optional
!IV_PARENT_NAME type CLIKE optional .
methods BUILD_CONTROL_TOOLBAR
importing
!IR_WRAPPER type ref to ZCL_GUIDRASIL_DESIGN_CONTAINER .
methods BUILD_DESIGN_TOOLBAR .
methods BUILD_EDIT_TOOLBAR
importing
!IR_WRAPPER type ref to ZCL_GUIDRASIL_DESIGN_CONTAINER
!IR_CONTROL_BUILDER type ref to ZCL_GUIDRASIL_CONTROL_BASE .
methods BUILD_PATTERN_TOOLBAR
importing
!IR_WRAPPER type ref to ZCL_GUIDRASIL_DESIGN_CONTAINER
!IR_CONTROL_BUILDER type ref to ZCL_GUIDRASIL_CONTROL_BASE .
methods CODE_REPLACE
importing
!SEARCH type CLIKE
!REPLACE type CLIKE
!PREFIX type CLIKE
changing
!CODE type STRING_TABLE .
methods CREATE_WRAPPER
importing
!IV_CONTROL_TOOLBAR type XFELD optional
!IV_EDIT_TOOLBAR type XFELD optional
!IR_CONTAINER type ref to CL_GUI_CONTAINER optional
!IR_PARENT_BUILDER type ref to ZCL_GUIDRASIL_CONTROL_BASE
exporting
!ER_WRAPPER type ref to ZCL_GUIDRASIL_DESIGN_CONTAINER .
methods IS_CLOSE_FUNCTION_ENABLED
importing
!IR_WRAPPER type ref to ZCL_GUIDRASIL_DESIGN_CONTAINER
returning
value(RV_ENABLED) type XFELD .
methods ON_DESIGN_FUNCTION_SELECTED
for event FUNCTION_SELECTED of CL_GUI_TOOLBAR
importing
!FCODE .
methods SET_CURRENT_CONTROL_ID
returning
value(CONTROL_ID) type I .
methods UPDATE_CONTROLS .
ENDCLASS.
CLASS ZCL_GUIDRASIL_BUILDER IMPLEMENTATION.
METHOD add_container.
DATA lv_extension TYPE i.
DATA lv_control_id TYPE i.
DATA lr_control_builder TYPE REF TO zcl_guidrasil_control_base.
DATA lr_wrapper TYPE REF TO zcl_guidrasil_design_container.
DATA lr_docking_container TYPE REF TO cl_gui_docking_container.
IF iv_control_id IS INITIAL.
lv_control_id = set_current_control_id( ).
ELSE.
lv_control_id = iv_control_id.
ENDIF.
CASE iv_side.
WHEN cl_gui_docking_container=>dock_at_bottom
OR cl_gui_docking_container=>dock_at_top.
lv_extension = 160.
WHEN cl_gui_docking_container=>dock_at_left
OR cl_gui_docking_container=>dock_at_right.
lv_extension = 400.
ENDCASE.
* entsprechenden Control-Builder anlegen
CALL METHOD zcl_guidrasil_control_base=>get_instance
EXPORTING
iv_classname = 'ZCL_GUIDRASIL_CONTROL_DOCKING'
iv_control_id = lv_control_id
IMPORTING
er_control = lr_control_builder
EXCEPTIONS
OTHERS = 1.
zcl_guidrasil_tools=>todo( 'Setzen Daten innerhalb drasil-Control' ).
lr_control_builder->apply_settings( ).
* Seite und Größe festlegen
lr_docking_container ?= lr_control_builder->gr_control.
lr_docking_container->dock_at( side = iv_side ).
lr_docking_container->set_extension( extension = lv_extension ).
* Control zur Verwaltungstabelle hinzufügen
add_control( ir_control = lr_control_builder ).
* im Designmode Wrapper hinzufügen
create_wrapper( iv_control_toolbar = abap_true
ir_parent_builder = lr_control_builder ).
ENDMETHOD.
METHOD add_container_box.
DATA lv_extension TYPE i.
DATA lr_control_builder TYPE REF TO zcl_guidrasil_control_base.
DATA lr_wrapper TYPE REF TO zcl_guidrasil_design_container.
DATA lv_control_id TYPE i.
lv_control_id = set_current_control_id( ).
* entsprechenden Control-Builder anlegen
CALL METHOD zcl_guidrasil_control_base=>get_instance
EXPORTING
iv_classname = 'ZCL_GUIDRASIL_CONTROL_DIABOX'
ir_parent_container = cl_gui_container=>screen0
iv_control_id = 0
IMPORTING
er_control = lr_control_builder
EXCEPTIONS
OTHERS = 1.
* Control zur Verwaltungstabelle hinzufügen
add_control( lr_control_builder ).
* im Designmode Wrapper hinzufügen
CALL METHOD create_wrapper
EXPORTING
iv_control_toolbar = abap_true
ir_parent_builder = lr_control_builder.
ENDMETHOD.
METHOD add_container_cc.
DATA lv_extension TYPE i.
DATA lr_control_builder TYPE REF TO zcl_guidrasil_control_base.
DATA lr_wrapper TYPE REF TO zcl_guidrasil_design_container.
DATA lr_cc_container TYPE REF TO cl_gui_custom_container.
DATA lv_control_id TYPE i.
lv_control_id = set_current_control_id( ).
* entsprechenden Control-Builder anlegen
CALL METHOD zcl_guidrasil_control_base=>get_instance
EXPORTING
iv_classname = 'ZCL_GUIDRASIL_CONTROL_CUSTOM'
iv_name = cc_name
iv_control_id = 0
IMPORTING
er_control = lr_control_builder
EXCEPTIONS
OTHERS = 1.
* Seite und Größe festlegen
lr_cc_container ?= lr_control_builder->gr_control.
* Control zur Verwaltungstabelle hinzufügen
add_control( lr_control_builder ).
* im Designmode Wrapper hinzufügen
CALL METHOD create_wrapper
EXPORTING
iv_control_toolbar = abap_true
ir_parent_builder = lr_control_builder.
ENDMETHOD.
METHOD add_control.
DATA ls_control_admin TYPE gys_control_admin.
*== New Control
ls_control_admin-id = current_control_id.
ls_control_admin-name = ir_control->gv_control_name.
ls_control_admin-control = ir_control.
ls_control_admin-parent = ir_parent.
ls_control_admin-parent_name = iv_parent_name.
APPEND ls_control_admin TO t_control_admin.
set_current_control_id( ).
DATA ls_control_list TYPE zguidrasil_control_list.
CLEAR ls_control_list.
READ TABLE gt_control_list TRANSPORTING NO FIELDS WITH TABLE KEY guid = ir_control->gv_guid.
IF sy-subrc > 0.
ls_control_list-guid = ir_control->gv_guid.
ls_control_list-r_control_builder = ir_control.
ls_control_list-t_container = ir_control->get_container_list( ).
INSERT ls_control_list INTO TABLE gt_control_list.
ENDIF.
ENDMETHOD.
METHOD add_control_object.
DATA lr_container TYPE REF TO cl_gui_container.
DATA lr_wrapper TYPE REF TO zcl_guidrasil_design_container.
DATA lr_control_builder TYPE REF TO zcl_guidrasil_control_base.
DATA ls_control_list LIKE LINE OF gt_control_list. "ew20160609
FIELD-SYMBOLS <ls_control_classes> TYPE gys_control_classes.
CHECK fcode(1) <> '$'.
* Lesen, welches Control hinzugefügt werden soll
READ TABLE gt_control_classes
ASSIGNING <ls_control_classes>
WITH KEY
id = fcode.
* Hinzufüge-Funktion eines Controls?
CHECK sy-subrc = 0.
* Container vom Wrapper holen
lr_wrapper ?= r_sender.
lr_container = lr_wrapper->get_container_first( ).
ls_control_list-parent_container = lr_wrapper->get_container_name( ).
* entsprechenden Control-Builder anlegen
zcl_guidrasil_control_base=>get_instance(
EXPORTING
iv_classname = <ls_control_classes>-classname
ir_parent_container = lr_container
iv_parent_container = ls_control_list-parent_container
iv_control_id = <ls_control_classes>-id
IMPORTING
er_control = lr_control_builder
EXCEPTIONS
OTHERS = 1 ).
CHECK sy-subrc = 0.
READ TABLE gt_control_list TRANSPORTING NO FIELDS
WITH KEY guid = lr_control_builder->gv_guid.
IF sy-subrc > 0.
ls_control_list-guid = lr_control_builder->gv_guid.
ls_control_list-r_control_builder = lr_control_builder.
INSERT ls_control_list
INTO TABLE gt_control_list. "ew20160609
ENDIF.
* Untergeordnetes Control bekannt machen
lr_wrapper->add_child( lr_control_builder ).
add_control(
ir_control = lr_control_builder
ir_parent = lr_wrapper->get_parent( )
iv_parent_name = ls_control_list-parent_container ).
* Einfüge-Toolbar in Editiertoolbar ändern
build_edit_toolbar(
ir_wrapper = lr_wrapper
ir_control_builder = lr_control_builder ).
* Wrapper aufbauen, falls Control weitere Kindcontainer hat
create_wrapper(
iv_control_toolbar = abap_true
ir_parent_builder = lr_control_builder ).
ENDMETHOD.
METHOD build.
DATA lv_classname TYPE seoclsname.
DATA ls_control_list TYPE zguidrasil_control_list.
DATA lr_control_builder TYPE REF TO zcl_guidrasil_control_base.
DATA lr_container TYPE REF TO cl_gui_container.
DATA lr_wrapper TYPE REF TO zcl_guidrasil_design_container.
DATA lv_parent_container_found TYPE boolean.
FIELD-SYMBOLS <ls_object> TYPE zguidrasil_obj.
FIELD-SYMBOLS <ls_control_list> LIKE ls_control_list.
*TODO: Prüfung Klassennamen
CASE mode.
WHEN k_mode_design.
* CALL METHOD build_design_toolbar.
ENDCASE.
SORT mt_controls BY control_index.
* Controls aufbauen
LOOP AT mt_controls ASSIGNING <ls_object>.
READ TABLE gt_control_list
ASSIGNING <ls_control_list>
WITH TABLE KEY
guid = <ls_object>-parent_guid.
* Root -> erzeugen
IF sy-subrc <> 0.
* derzeit nur Docking-Container/ Custom Control
lv_classname = <ls_object>-parent.
CALL METHOD zcl_guidrasil_control_base=>get_instance
EXPORTING
iv_classname = lv_classname
iv_guid = <ls_object>-parent_guid
iv_control_id = <ls_object>-control_index
IMPORTING
er_control = lr_control_builder
EXCEPTIONS
OTHERS = 1.
CLEAR ls_control_list.
ls_control_list-guid = lr_control_builder->gv_guid.
ls_control_list-r_control_builder = lr_control_builder.
lr_container ?= lr_control_builder->gr_control.
APPEND lr_container TO ls_control_list-t_container.
INSERT ls_control_list
INTO TABLE gt_control_list
ASSIGNING <ls_control_list>.
* Control zur Verwaltungstabelle hinzufügen
set_current_control_id( ).
add_control( ir_control = lr_control_builder ).
ENDIF.
* 1. Container ermitteln
LOOP AT <ls_control_list>-t_container INTO lr_container.
IF lr_container->get_name( ) = <ls_object>-parent_container.
lv_parent_container_found = abap_true.
EXIT.
ENDIF.
ENDLOOP.
IF lv_parent_container_found = abap_false.
READ TABLE <ls_control_list>-t_container
INTO lr_container INDEX 1.
* nur freie Container behalten und aktuellen rausnehmen
DELETE <ls_control_list>-t_container INDEX 1.
ENDIF.
* es gibt keine?
CHECK sy-subrc = 0.
* im Designmode Wrapper mit Toolbar hinzufügen
CASE mode.
WHEN k_mode_design
OR k_mode_pattern.
CALL METHOD create_wrapper
EXPORTING
ir_container = lr_container
ir_parent_builder = <ls_control_list>-r_control_builder
IMPORTING
er_wrapper = lr_wrapper.
lr_container = lr_wrapper->get_container_first( ).
ENDCASE.
* Kind erzeugen
lv_classname = <ls_object>-object.
CALL METHOD zcl_guidrasil_control_base=>get_instance
EXPORTING
iv_classname = lv_classname
iv_guid = <ls_object>-object_guid
ir_parent_container = lr_container
iv_parent_container = <ls_object>-parent_container
iv_name = <ls_object>-control_name
iv_control_id = <ls_object>-control_index
* iv_dont_create = lv_dont_create
IMPORTING
er_control = lr_control_builder
EXCEPTIONS
OTHERS = 1.
CLEAR ls_control_list.
ls_control_list-guid = lr_control_builder->gv_guid.
ls_control_list-r_control_builder = lr_control_builder.
ls_control_list-t_container = lr_control_builder->get_container_list( ).
INSERT ls_control_list INTO TABLE gt_control_list.
CASE mode.
WHEN k_mode_design.
lr_wrapper->add_child( lr_control_builder ).
build_edit_toolbar(
ir_wrapper = lr_wrapper
ir_control_builder = lr_control_builder ).
WHEN k_mode_pattern.
lr_wrapper->add_child( lr_control_builder ).
build_pattern_toolbar(
ir_wrapper = lr_wrapper
ir_control_builder = lr_control_builder ).
ENDCASE.
add_control( ir_control = lr_control_builder
ir_parent = <ls_control_list>-r_control_builder ).
ENDLOOP.
* Falls noch Container übrig sind -> Wrapper mit Control-Hinzufügefunktionen
IF mode = k_mode_design.
LOOP AT gt_control_list ASSIGNING <ls_control_list>.
LOOP AT <ls_control_list>-t_container INTO lr_container.
create_wrapper(
iv_control_toolbar = abap_true
ir_container = lr_container
ir_parent_builder = <ls_control_list>-r_control_builder ).
ENDLOOP.
ENDLOOP.
ENDIF.
ENDMETHOD.
METHOD build_control_toolbar.
DATA lt_funcmenus TYPE ttb_btnmnu. "ew
DATA lt_functions TYPE ttb_button.
DATA ls_function TYPE stb_button.
* Buttons löschen
CALL METHOD ir_wrapper->clear_toolbar.
* Schließen Funktion
IF is_close_function_enabled( ir_wrapper ) = abap_true.
APPEND LINES OF gt_close_function TO lt_functions.
ENDIF.
*== MENÜ Eintrag für Auswahl "CONTAINER"
CLEAR ls_function.
ls_function-function = '$CONTAINER'.
ls_function-text = ''.
ls_function-icon = zcl_guidrasil_constants=>icon_container. "icon_wd_view_container.
ls_function-butn_type = cntb_btype_dropdown.
APPEND ls_function TO lt_functions.
*== MENÜ Eintrag für Auswahl "Control"
CLEAR ls_function.
ls_function-function = '$CONTROLS'.
ls_function-text = ''.
ls_function-icon = icon_oo_object.
ls_function-butn_type = zcl_guidrasil_constants=>icon_control. "cntb_btype_dropdown.
APPEND ls_function TO lt_functions.
*== MENÜ Eintrag für Auswahl "Control"
CLEAR ls_function.
ls_function-function = '$CUSTOM'.
ls_function-text = ''.
ls_function-icon = icon_interface.
ls_function-butn_type = zcl_guidrasil_constants=>icon_control. "cntb_btype_dropdown.
APPEND ls_function TO lt_functions.
* Hinzufügbare Controls
APPEND LINES OF gt_insert_function TO lt_functions.
CALL METHOD ir_wrapper->add_functions
EXPORTING
it_function = lt_functions
it_funcmenu = lt_funcmenus
ir_sender = ir_wrapper
ir_receiver = me.
ENDMETHOD.
METHOD build_design_toolbar.
DATA lt_events TYPE cntl_simple_events.
DATA ls_event TYPE cntl_simple_event.
* Design-Toolbar einmalig aufbauen
CHECK mode = k_mode_design.
CHECK r_toolbar_container IS NOT BOUND.
* Dialogbox-Container
CREATE OBJECT r_toolbar_container
EXPORTING
width = 30
height = 30
top = 0
left = 0
caption = 'Design-Toolbar'.
* Toolbar
CREATE OBJECT r_toolbar
EXPORTING
parent = r_toolbar_container.
* ls_event-eventid = cl_gui_toolbar=>m_id_dropdown_clicked. "ew
* APPEND ls_event TO lt_event.
ls_event-eventid = cl_gui_toolbar=>m_id_function_selected.
APPEND ls_event TO lt_events.
r_toolbar->set_registered_events( events = lt_events ).
SET HANDLER on_design_function_selected FOR r_toolbar.
* Funktionen für neue Docking-Container
CALL METHOD r_toolbar->add_button
EXPORTING
fcode = '$BOTTOM'
icon = icon_previous_value
butn_type = cntb_btype_button
quickinfo = 'Dockingcontainer unten'
EXCEPTIONS
cntb_error_fcode = 1.
CALL METHOD r_toolbar->add_button
EXPORTING
fcode = '$LEFT'
icon = icon_column_left
butn_type = cntb_btype_button
quickinfo = 'Dockingcontainer links'
EXCEPTIONS
cntb_error_fcode = 1.
CALL METHOD r_toolbar->add_button
EXPORTING
fcode = '$RIGHT'
icon = icon_column_right
butn_type = cntb_btype_button
quickinfo = 'Dockingcontainer rechts'
EXCEPTIONS
cntb_error_fcode = 1.
CALL METHOD r_toolbar->add_button
EXPORTING
fcode = '$TOP'
icon = icon_next_value
butn_type = cntb_btype_button
quickinfo = 'Dockingcontainer oben'
EXCEPTIONS
cntb_error_fcode = 1.
ENDMETHOD.
METHOD build_edit_toolbar.
DATA:
lt_funcmenu TYPE ttb_btnmnu, "ew
lt_function TYPE ttb_button,
lrt_container TYPE cwb_container.
* Buttons löschen
CALL METHOD ir_wrapper->clear_toolbar.
* Funktionen zum Container/Control löschen
IF is_close_function_enabled( ir_wrapper ) = abap_true.
APPEND LINES OF gt_close_function TO lt_function.
ENDIF.
APPEND LINES OF gt_delete_function TO lt_function.
*** add "Name of Control" Button
CALL METHOD get_name_button
EXPORTING
ir_control = ir_control_builder
CHANGING
ct_functions = lt_function.
CALL METHOD ir_wrapper->add_functions
EXPORTING
it_function = lt_function
it_funcmenu = lt_funcmenu "ew
ir_sender = ir_wrapper
ir_receiver = me.
* Prüfen, ob das Control weitere Container bereitstellt
lrt_container = ir_control_builder->get_container_list( ).
CHECK lrt_container IS INITIAL.
ir_control_builder->init( ).
* wennn nicht, evtl. Einstellungsfunktionen hinzufügen
ir_control_builder->get_design_functions(
IMPORTING
et_functions = lt_function
et_funcmenus = lt_funcmenu ).
ir_wrapper->add_functions(
it_function = lt_function
it_funcmenu = lt_funcmenu
ir_sender = ir_wrapper
ir_receiver = ir_control_builder ).
ENDMETHOD.
METHOD build_pattern_toolbar.
DATA lt_funcmenu TYPE ttb_btnmnu.
DATA lt_function TYPE ttb_button.
DATA lrt_container TYPE cwb_container.
* Buttons löschen
ir_wrapper->clear_toolbar( ).
IF ir_control_builder->has_pattern( ) > 0.
APPEND LINES OF gt_pattern_function TO lt_function.
ENDIF.
*** add "Name of Control" Button
get_name_button(
EXPORTING ir_control = ir_control_builder
CHANGING ct_functions = lt_function ).
ir_wrapper->add_functions(
it_function = lt_function
it_funcmenu = lt_funcmenu
ir_sender = ir_wrapper
ir_receiver = me ).
* Prüfen, ob das Control weitere Container bereitstellt
lrt_container = ir_control_builder->get_container_list( ).
CHECK lrt_container IS INITIAL.
* wennn nicht, evtl. Einstellungsfunktionen hinzufügen
* lt_function = ir_control_builder->get_design_functions( ).
ir_wrapper->add_functions(
it_function = lt_function
it_funcmenu = lt_funcmenu
ir_sender = ir_wrapper
ir_receiver = ir_control_builder ).
ENDMETHOD.
METHOD class_constructor.
DATA:
ls_ctls TYPE zguidrasil_ctls,
ls_control_classes TYPE gys_control_classes,
ls_function TYPE stb_button.
* Funktion zum Schließen von Containern
CLEAR ls_function.
ls_function-function = '$CLOSE'.
ls_function-icon = icon_close.
ls_function-butn_type = cntb_btype_button.
ls_function-quickinfo = 'Destroy Container'.
APPEND ls_function TO gt_close_function.
CLEAR ls_function.
ls_function-function = '$SEP0'.
ls_function-butn_type = cntb_btype_sep.
APPEND ls_function TO gt_close_function.
* Funktion zum Entfernen von Controls
CLEAR ls_function.
ls_function-function = '$DELETE'.
ls_function-icon = icon_delete.
ls_function-butn_type = cntb_btype_button.
ls_function-quickinfo = 'Delete Current Control'.
APPEND ls_function TO gt_delete_function.
CLEAR ls_function.
ls_function-function = '$SEP1'.
ls_function-butn_type = cntb_btype_sep.
APPEND ls_function TO gt_delete_function.
* Funktion für die Auswahl eines Controls für Pattern
CLEAR ls_function.
ls_function-function = '$SELECT'.
ls_function-icon = icon_system_okay.
ls_function-butn_type = cntb_btype_button.
APPEND ls_function TO gt_pattern_function.
CLEAR ls_function.
SELECT *
FROM zguidrasil_ctls
INTO TABLE mt_ctls
WHERE usable = abap_true.
LOOP AT mt_ctls INTO ls_ctls.
ls_control_classes-classname = ls_ctls-classname.
* verwendbare Klassen merken
ADD 1 TO ls_control_classes-id.
INSERT ls_control_classes INTO TABLE gt_control_classes.
* Funktionsliste aufbauen
SELECT SINGLE id FROM icon INTO ls_function-icon WHERE name = ls_ctls-iconname.
ls_function-function = ls_control_classes-id.
SHIFT ls_function-function LEFT DELETING LEADING space.
ls_function-quickinfo = ls_ctls-quickinfo.
ls_function-butn_type = cntb_btype_menu.
APPEND ls_function TO gt_insert_function.
ENDLOOP.
ENDMETHOD.
METHOD code_replace.
LOOP AT code ASSIGNING FIELD-SYMBOL(<line>).
REPLACE ALL OCCURRENCES OF search IN <line> WITH |{ prefix }_{ replace }|.
ENDLOOP.
ENDMETHOD.
METHOD constructor.
mode = iv_mode.
pname = iv_pname.
* gespeicherten Zustand laden
SELECT * FROM zguidrasil_obj
INTO TABLE mt_controls
WHERE report = iv_pname.
DATA ls_control LIKE LINE OF mt_controls.
FIELD-SYMBOLS <idx> LIKE LINE OF mt_idx.
DATA ls_idx LIKE LINE OF mt_idx.
DATA name TYPE zguidrasil_container_name.
DATA id LIKE ls_idx-control_id.
LOOP AT mt_controls INTO ls_control.
SPLIT ls_control-control_name AT '_' INTO name id.
READ TABLE mt_idx WITH TABLE KEY name = name ASSIGNING <idx>.
IF sy-subrc = 0.
IF id > <idx>-control_id.
<idx>-control_id = id .
ENDIF.
ELSE.
ls_idx-name = name.
ls_idx-control_id = id.
INSERT ls_idx INTO TABLE mt_idx.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD create_wrapper.
DATA lrt_container TYPE cwb_container.
DATA lr_container TYPE REF TO cl_gui_container.
CHECK mode = k_mode_design
OR mode = k_mode_pattern.
* wenn angegeben, nur den übergebenen Container verwenden
IF ir_container IS BOUND.
CLEAR lrt_container.
APPEND ir_container TO lrt_container.
ELSE.
* Container ermitteln
lrt_container = ir_parent_builder->get_container_list( ).
ENDIF.
* Wrapper für jeden Container hinzufügen
LOOP AT lrt_container INTO lr_container.
DATA(lv_container_name) = lr_container->get_name( ).
lr_container->set_name( |{ lr_container->get_name( ) }| ).
* Wrappercontrol aufbauen
CREATE OBJECT er_wrapper
EXPORTING
ir_parent_container = lr_container
ir_parent_control = ir_parent_builder.
* Übergeordnetes Control und Wrapper verlinken
CALL METHOD ir_parent_builder->add_child( er_wrapper ).
* Toolbar mit hinzufügbaren Controls
IF iv_control_toolbar = abap_true.
CALL METHOD build_control_toolbar
EXPORTING
ir_wrapper = er_wrapper.
* Toolbar mit Einstellungen zum Control
ELSEIF iv_edit_toolbar = abap_true.
CALL METHOD build_edit_toolbar
EXPORTING
ir_wrapper = er_wrapper
ir_control_builder = ir_parent_builder.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD get_creation_code.
DATA lt_data TYPE string_table.
DATA lt_code TYPE string_table.
DATA xt_data TYPE string_table.
DATA xt_code TYPE string_table.
LOOP AT mt_controls ASSIGNING FIELD-SYMBOL(<control>).
READ TABLE gt_control_list INTO DATA(ls_object) WITH TABLE KEY guid = <control>-object_guid.
IF sy-subrc = 0.
READ TABLE gt_control_list INTO DATA(ls_parent) WITH TABLE KEY guid = <control>-parent_guid.
IF sy-subrc > 0.
CLEAR ls_parent.
ENDIF.
IF ls_object-r_control_builder->return_creation_code( IMPORTING data = lt_data code = lt_code ) = abap_false.
code_replace( EXPORTING search = '$control'
prefix = 'lr'
replace = ls_object-r_control_builder->gv_control_name
CHANGING code = lt_data ).
code_replace( EXPORTING search = '$control'
prefix = 'lr'
replace = ls_object-r_control_builder->gv_control_name
CHANGING code = lt_code ).
IF ls_parent IS NOT INITIAL.
code_replace( EXPORTING search = '$parent'
prefix = 'lr'
replace = ls_parent-r_control_builder->gv_control_name
CHANGING code = lt_code ).
ENDIF.
APPEND LINES OF lt_data TO xt_data.
APPEND LINES OF lt_code TO xt_code.
ENDIF.
ENDIF.
ENDLOOP.
APPEND LINES OF xt_data TO code.
APPEND LINES OF xt_code TO code.
ENDMETHOD.
METHOD get_event_pattern.
DATA ls_control LIKE LINE OF gt_control_list.
DATA ls_object LIKE LINE OF mt_controls.
DATA lr_object TYPE REF TO cl_gui_object.
DATA line TYPE string.
DATA event TYPE string.
DATA lr_obj TYPE REF TO cl_abap_classdescr.
DATA lv_name TYPE string.
TYPES: BEGIN OF ty_event_ctrl,
event TYPE string,
control TYPE string,
name TYPE string,
END OF ty_event_ctrl,
BEGIN OF ty_event,
event TYPE string,
control TYPE string,
END OF ty_event.
DATA lt_events TYPE STANDARD TABLE OF ty_event.
DATA ls_event TYPE ty_event.
DATA lt_events_c TYPE STANDARD TABLE OF ty_event_ctrl.
DATA ls_event_c TYPE ty_event_ctrl.
DATA ls_event2 TYPE ty_event.
*clear t_controls.
* update_controls( ).
_code 'CLASS lcl_main DEFINITION.'.
_code ' PUBLIC SECTION.'.
_code ' DATA mr_guidrasil TYPE REF TO zcl_guidrasil_builder.'.
LOOP AT mt_controls INTO ls_object.
READ TABLE gt_control_list INTO ls_control WITH KEY guid = ls_object-object_guid.
IF sy-subrc = 0 .
*== DATA DEFINITION
lr_object ?= ls_control-r_control_builder->get_control( ).
IF lr_object IS BOUND.
lr_obj ?= cl_abap_typedescr=>describe_by_object_ref( lr_object ).
lv_name = lr_obj->get_relative_name( ).
line = | DATA mr_{ ls_object-control_name } TYPE REF TO { lv_name }.|.
ENDIF.
APPEND line TO pattern.
*== EVENT HANDLER
IF ls_control-r_control_builder->gt_events IS NOT INITIAL.
LOOP AT ls_control-r_control_builder->gt_events INTO ls_event-event.
ls_event-control = lv_name.
READ TABLE lt_events TRANSPORTING NO FIELDS
WITH KEY event = ls_event-event
control = ls_event-control.
IF sy-subrc > 0.
APPEND ls_event TO lt_events.
ENDIF.
ls_event_c-event = ls_event-event.
ls_event_c-control = lv_name.
ls_event_c-name = ls_object-control_name.
APPEND ls_event_c TO lt_events_c.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
_code ' METHODS constructor.'.
LOOP AT lt_events_c INTO ls_event_c.
line = | METHODS h_{ ls_event_c-event } FOR EVENT { ls_event_c-event } OF { ls_event_c-control } IMPORTING sender.|.
APPEND line TO pattern.
ENDLOOP.
_code 'ENDCLASS.'.
_code 'CLASS lcl_main IMPLEMENTATION.'.
_code ' METHOD constructor.'.
_code ' CREATE OBJECT mr_guidrasil'.
_code ' EXPORTING'.
line = ` iv_pname = '$$PROJECT$$'.`.
REPLACE '$$PROJECT$$' WITH pname INTO line.
APPEND line TO pattern.
_code ' mr_guidrasil->build( ).'.
_code ' ENDMETHOD.'.
LOOP AT lt_events INTO ls_event.
line = | METHOD h_{ ls_event-event }.|. APPEND line TO pattern.
_code ' CASE sender.'.
LOOP AT lt_events_c INTO ls_event_c
WHERE event = ls_event-event
AND control = ls_event-control.
line = | WHEN mr_{ ls_event_c-name }.|.
APPEND line TO pattern.
line = | MESSAGE i000(oo) WITH '{ ls_event_c-event }' '{ ls_event_c-name }'.|.
APPEND line TO pattern.
ENDLOOP.
_code ' ENDCASE.'.
_code ' ENDMETHOD.'.
ENDLOOP.
_code 'ENDCLASS.'.
_code 'DATA gr_main TYPE REF TO lcl_main.'.
*CLASS lcl_main DEFINITION.
* PUBLIC SECTION.
* DATA mr_guidrasil TYPE REF TO zcl_guidrasil_builder.
* DATA mr_text1 TYPE REF TO cl_gui_textedit.
* DATA mr_pic TYPE REF TO cl_gui_picture.
* METHODS constructor.
* METHODS handle_pic_click
* FOR EVENT picture_click OF cl_gui_picture
* IMPORTING sender.
*
*ENDCLASS.
*
*CLASS lcl_main IMPLEMENTATION.
* METHOD constructor.
* CREATE OBJECT mr_guidrasil
* EXPORTING
* iv_pname = 'GF'
* EXCEPTIONS
* OTHERS = 3.
* IF sy-subrc = 0.
* mr_guidrasil->build( ).
*
* mr_text1 ?= mr_guidrasil->get_object_by_name( 'INFOTEXT' ).
* mr_pic ?= mr_guidrasil->get_object_by_name( 'MEINHAUS' ).
* IF mr_pic IS BOUND.
* SET HANDLER handle_pic_click FOR mr_pic.
* ENDIF.
*
* ENDIF.
* ENDMETHOD.
* METHOD handle_pic_click.
* MESSAGE i000(oo) WITH 'BildKlick!!'.
* ENDMETHOD.
*
*ENDCLASS.
*
*DATA gr_guidrasil TYPE REF TO lcl_main.
ENDMETHOD.
METHOD get_event_pattern_plus.
pattern = zcl_guidrasil_code_creation=>create_code_complete(
it_controls = mt_controls
it_control_list = gt_control_list ).
ENDMETHOD.
METHOD get_menu_functions.
DATA ls_function TYPE stb_button.
DATA ls_ctls TYPE zguidrasil_ctls.
DATA ls_control_class LIKE LINE OF gt_control_classes.
CASE fcode.
WHEN '$CONTAINER'.
LOOP AT mt_ctls INTO ls_ctls WHERE type = 'C'.
* Funktionsliste aufbauen für CONTAINER aufbauen
READ TABLE gt_control_classes INTO ls_control_class WITH KEY classname = ls_ctls-classname.
IF sy-subrc = 0.
ls_function-function = ls_control_class-id.
ENDIF.
ls_function-quickinfo = ls_ctls-quickinfo.
APPEND ls_function TO it_functions.
ENDLOOP.
WHEN '$CONTROLS'.
LOOP AT mt_ctls INTO ls_ctls WHERE type = 'O'.
* Funktionsliste aufbauen für CONTROLS aufbauen
READ TABLE gt_control_classes INTO ls_control_class WITH KEY classname = ls_ctls-classname.
IF sy-subrc = 0.
ls_function-function = ls_control_class-id.
ENDIF.
ls_function-quickinfo = ls_ctls-quickinfo.
APPEND ls_function TO it_functions.
ENDLOOP.
WHEN '$CUSTOM'.
LOOP AT mt_ctls INTO ls_ctls WHERE type = 'Q'.
* Funktionsliste aufbauen für CONTROLS aufbauen
READ TABLE gt_control_classes INTO ls_control_class WITH KEY classname = ls_ctls-classname.
IF sy-subrc = 0.
ls_function-function = ls_control_class-id.
ENDIF.
ls_function-quickinfo = ls_ctls-quickinfo.
APPEND ls_function TO it_functions.
ENDLOOP.
ENDCASE.
ENDMETHOD.
METHOD get_name_button.
DATA ls_function TYPE stb_button.
CHECK ir_control IS BOUND.
* Funktionen zur Controlsteuerung
CLEAR ls_function.
ls_function-function = '$NAME'.
ls_function-icon = icon_interface.
ls_function-butn_type = cntb_btype_button.
ls_function-text = ir_control->gv_control_name.
APPEND ls_function TO ct_functions.
"==> will now only use "CTRLFUNC
** Funktion für die Änderung des Namens
* CLEAR ls_function.
* ls_function-function = '$ATTRIBUTES'.
* ls_function-icon = icon_system_favorites.
* ls_function-butn_type = cntb_btype_button.
* ls_function-quickinfo = 'Change Control Attributes'.
* APPEND ls_function TO ct_functions.
* Funktion für die control eigenen Änderungen
CLEAR ls_function.
ls_function-function = '$CTRLFUNC'.
ls_function-icon = icon_system_favorites.
ls_function-butn_type = cntb_btype_dropdown.
ls_function-quickinfo = 'Control attributes'(cta).
APPEND ls_function TO ct_functions.
zcl_guidrasil_tools=>todo( 'Wenn control keine Funktionen zur Verfügung stellt, darf der Knopf nicht angezeigt werden...' ).
ENDMETHOD.
METHOD get_object_by_name.
DATA ls_control_list TYPE zguidrasil_control_list.
READ TABLE mt_controls ASSIGNING FIELD-SYMBOL(<control>) WITH KEY control_name = name.
IF sy-subrc = 0.
READ TABLE gt_control_list INTO ls_control_list WITH KEY guid = <control>-object_guid.
IF sy-subrc = 0.
TRY .
object ?= ls_control_list-r_control_builder->get_control( ).
CATCH cx_sy_move_cast_error.
ENDTRY.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD init_control_name.
DATA lv_name TYPE zguidrasil_container_name.
FIELD-SYMBOLS <idx> LIKE LINE OF mt_idx.
DATA ls_idx LIKE LINE OF mt_idx.
IF iv_text IS INITIAL.
lv_name = 'CONTROL'.
ELSE.
lv_name = iv_text.
ENDIF.
READ TABLE mt_idx WITH TABLE KEY name = lv_name ASSIGNING <idx>.
IF sy-subrc = 0.
ADD 1 TO <idx>-control_id.
CONCATENATE iv_text '_' <idx>-control_id INTO ev_name.
ELSE.
ls_idx-name = lv_name.
ls_idx-control_id = 1.
INSERT ls_idx INTO TABLE mt_idx.
CONCATENATE iv_text '_' ls_idx-control_id INTO ev_name.
ENDIF.
ENDMETHOD.
METHOD is_close_function_enabled.
DATA lr_parent_builder TYPE REF TO zcl_guidrasil_control_base.
DATA lrt_container TYPE cwb_container.
rv_enabled = abap_true.
* Vater fragen, ob er mehrere Container bereitstellt
lr_parent_builder = ir_wrapper->get_parent( ).
lrt_container = lr_parent_builder->get_container_list( ).
* wenn ja, dann können diese nicht einzeln geschlossen werden
IF lines( lrt_container ) > 1.
rv_enabled = abap_false.
ENDIF.
ENDMETHOD.
METHOD on_design_function_selected.
CASE fcode.
WHEN '$BOTTOM'.
* add_container( cl_gui_docking_container=>dock_at_bottom ).
WHEN '$LEFT'.
* add_container( cl_gui_docking_container=>dock_at_left ).
WHEN '$RIGHT'.
* add_container( cl_gui_docking_container=>dock_at_right ).
WHEN '$TOP'.
* add_container( cl_gui_docking_container=>dock_at_top ).
WHEN OTHERS.
EXIT.
ENDCASE.
ENDMETHOD.
METHOD save.
DATA lv_id TYPE i.
DATA lv_name TYPE string.
DATA ls_object TYPE zguidrasil_obj.
DATA lt_objects TYPE TABLE OF zguidrasil_obj.
DATA ls_control_admin TYPE gys_control_admin.
DATA ls_control_list TYPE zguidrasil_ctl_hierarchy_s.
DATA lt_control_list TYPE zguidrasil_ctl_hierarchy_t.
DATA lr_control_builder TYPE REF TO zcl_guidrasil_control_base.
DATA lr_obj TYPE REF TO cl_abap_classdescr.
DATA lr_docking TYPE REF TO cl_gui_docking_container.
DATA lr_splitter TYPE REF TO cl_gui_easy_splitter_container.
* anfangen bei den Basiscontrols
LOOP AT t_control_admin INTO ls_control_admin.
ls_control_list-control = ls_control_admin-control.
APPEND ls_control_list TO lt_control_list.
* Liste untergeordneter Controls ermitteln
CALL METHOD ls_control_admin-control->get_control_list
EXPORTING
ir_parent_control = ls_control_list-control
CHANGING
ct_control_list = lt_control_list.
* Einstellungen der Controls speichern
CALL METHOD ls_control_admin-control->save_all.
ENDLOOP.
ls_object-report = pname.
LOOP AT lt_control_list INTO ls_control_list.
CHECK ls_control_list-parent IS BOUND.
* Control
IF ls_control_list-control IS BOUND.
lr_obj ?= cl_abap_typedescr=>describe_by_object_ref( ls_control_list-control ).
lv_name = lr_obj->get_relative_name( ).
* alles außer Wrapper speichern
IF lv_name <> 'ZCL_GUIDRASIL_DESIGN_CONTAINER'.
ls_object-object = lv_name.
ls_object-object_guid = ls_control_list-control->gv_guid.
ls_object-control_name = ls_control_list-control->gv_control_name.
ls_object-parent_container = ls_control_list-control->mv_parent_container_name.
ENDIF.
ENDIF.
* ggf. Parent speichern
IF ls_control_list-parent IS BOUND.
lr_obj ?= cl_abap_typedescr=>describe_by_object_ref( ls_control_list-parent ).
lv_name = lr_obj->get_relative_name( ).
* alles außer Wrapper speichern
IF lv_name <> 'ZCL_GUIDRASIL_DESIGN_CONTAINER'.
ls_object-parent = lv_name.
ls_object-parent_guid = ls_control_list-parent->gv_guid.
ENDIF.
ENDIF.
* wenn sowohl Parent als auch Child gesetzt sind
IF ls_object-parent IS NOT INITIAL AND
ls_object-object IS NOT INITIAL.
ADD 1 TO lv_id.
ls_object-control_index = lv_id.
APPEND ls_object TO lt_objects.
CLEAR ls_object.
ls_object-report = pname.
ENDIF.
ENDLOOP.
** update_controls( ).
*
** anfangen bei den Basiscontrols
* LOOP AT t_control_admin INTO ls_control_admin.
** Einstellungen der Controls speichern
* CALL METHOD ls_control_admin-control->save_all.
* ENDLOOP.
*
*
*
* bisheriges Projekt löschen
DELETE FROM zguidrasil_obj WHERE report = pname.
* und neuen Stand speichern
IF lt_objects IS NOT INITIAL.
INSERT zguidrasil_obj FROM TABLE lt_objects.
ENDIF.
COMMIT WORK.
mt_controls = lt_objects.
MESSAGE s001.
ENDMETHOD.
METHOD set_current_control_id.
ADD 1 TO current_control_id.
IF control_id IS REQUESTED.
control_id = current_control_id.
ENDIF.
ENDMETHOD.
METHOD update_controls.
* DATA:
* lv_id TYPE i,
* lv_name TYPE string,
* ls_guidrasil TYPE /inw/guidrasil,
** lt_guidrasil TYPE TABLE OF /INW/guidrasil,
* ls_control_admin TYPE gys_control_admin,
* ls_control_list TYPE /inw/guidrasil_ctl_hierarchy,
* lt_control_list TYPE /inw/guidrasil_ctl_hierarchy_t,
* lr_control_builder TYPE REF TO /inw/guidrasil_control_base,
* lr_obj TYPE REF TO cl_abap_classdescr,
* lr_docking TYPE REF TO cl_gui_docking_container,
* lr_splitter TYPE REF TO cl_gui_easy_splitter_container.
*
**== Geht noch nicht, wenn neue Controls hinzukommen.
**== es muss erst gespeichert werden... :/
*
zcl_guidrasil_tools=>todo( ).
*
** anfangen bei den Basiscontrols
* LOOP AT t_control_admin INTO ls_control_admin.
*
* ls_control_list-control = ls_control_admin-control.
* APPEND ls_control_list TO lt_control_list.
*
** Liste untergeordneter Controls ermitteln
* CALL METHOD ls_control_admin-control->get_control_list
* EXPORTING
* ir_parent_control = ls_control_list-control
* CHANGING
* ct_control_list = lt_control_list.
*
** Einstellungen der Controls speichern
** CALL METHOD ls_control_admin-control->save_all.
*
* ENDLOOP.
*
** CLEAR ls_control_list.
** ls_control_list-guid = ls_control-r_control_builder->gv_guid.
** ls_control_list-r_control_builder = lr_control_builder.
** lr_container ?= lr_control_builder->gr_control.
** APPEND lr_container TO ls_control_list-t_container.
** INSERT ls_control_list INTO TABLE gt_control_list
** ASSIGNING <ls_control_list>.
*
* ls_guidrasil-report = pname.
*
* LOOP AT lt_control_list INTO ls_control_list.
*
*
* CHECK ls_control_list-parent IS BOUND.
*
** Control
* IF ls_control_list-control IS BOUND.
*
* lr_obj ?= cl_abap_typedescr=>describe_by_object_ref( ls_control_list-control ).
* lv_name = lr_obj->get_relative_name( ).
*
** alles außer Wrapper speichern
* IF lv_name <> 'ZCL_GUIDRASIL_DESIGN_CONTAINER'.
* ls_guidrasil-object = lv_name.
* ls_guidrasil-object_guid = ls_control_list-control->gv_guid.
* ls_guidrasil-control_name = ls_control_list-control->gv_control_name.
* ENDIF.
*
* ENDIF.
*
*
** ggf. Parent speichern
* IF ls_control_list-parent IS BOUND.
*
* lr_obj ?= cl_abap_typedescr=>describe_by_object_ref( ls_control_list-parent ).
* lv_name = lr_obj->get_relative_name( ).
*
** alles außer Wrapper speichern
* IF lv_name <> 'ZCL_GUIDRASIL_DESIGN_CONTAINER'.
* ls_guidrasil-parent = lv_name.
* ls_guidrasil-parent_guid = ls_control_list-parent->gv_guid.
* ENDIF.
*
* ENDIF.
*
*
** wenn sowohl Parent als auch Child gesetzt sind
* IF ls_guidrasil-parent IS NOT INITIAL AND
* ls_guidrasil-object IS NOT INITIAL.
*
* ADD 1 TO lv_id.
* ls_guidrasil-control_index = lv_id.
* APPEND ls_guidrasil TO t_controls.
*
* CLEAR ls_guidrasil.
* ls_guidrasil-report = pname.
*
* ENDIF.
*
* ENDLOOP.
ENDMETHOD.
METHOD zif_guidrasil_func_receiver~on_dropdown_clicked.
"functions
DATA lt_functions TYPE ttb_button.
DATA ls_function TYPE stb_button.
"Menu
DATA lr_text TYPE REF TO cl_gui_textedit.
DATA lv_icon TYPE icon_d.
DATA lv_disabled TYPE cua_active.
DATA lv_checked TYPE cua_active.
DATA lv_text TYPE gui_text.
DATA lx_menu TYPE REF TO cl_ctmenu.
DATA lx_menu_sub TYPE REF TO cl_ctmenu.
DATA lv_flag TYPE i.
lt_functions = get_menu_functions( fcode ).
IF lt_functions IS NOT INITIAL.
*== Create menu
CREATE OBJECT lx_menu.
*== Set functions for Container and Controls
LOOP AT lt_functions INTO ls_function.
lv_text = ls_function-quickinfo.
SHIFT ls_function-function LEFT DELETING LEADING space.
CALL METHOD lx_menu->add_function
EXPORTING
fcode = ls_function-function
disabled = lv_disabled
checked = lv_checked
text = lv_text.
ENDLOOP.
* create object lx_menu_sub.
* CALL METHOD lx_menu_sub->add_function
* EXPORTING
* fcode = 'SUB1'
* text = 'Sub-Menu-Test 1'.
*
* CALL METHOD lx_menu_sub->add_function
* EXPORTING
* fcode = 'SUB2'
* text = 'Sub-Menu-Test 2'.
*
* lx_menu->add_submenu( menu = lx_menu_sub
* text = 'Sub1' ).
*== set menu
r_toolbar->track_context_menu(
context_menu = lx_menu
posx = posx
posy = posy ).
ENDIF.
ENDMETHOD.
METHOD zif_guidrasil_func_receiver~on_function_selected.
DATA lr_container TYPE REF TO cl_gui_container.
DATA lr_wrapper TYPE REF TO zcl_guidrasil_design_container.
DATA lr_control_builder TYPE REF TO zcl_guidrasil_control_base.
DATA lr_parent TYPE REF TO zcl_guidrasil_control_base.
DATA lrt_container TYPE cwb_container.
DATA ls_function TYPE stb_button.
DATA lt_function TYPE ttb_button.
DATA lt_controls TYPE zguidrasil_control_t.
DATA ls_control_admin TYPE gys_control_admin.
DATA lv_string TYPE string.
DATA lt_pattern TYPE STANDARD TABLE OF string.
DATA lt_child_controls TYPE zguidrasil_control_t.
DATA lr_child_control TYPE REF TO zcl_guidrasil_control_base.
DATA ls_control_list LIKE LINE OF gt_control_list.
FIELD-SYMBOLS <string> TYPE string.
FIELD-SYMBOLS <control> TYPE REF TO zcl_guidrasil_control_base.
FIELD-SYMBOLS <ls_control_classes> TYPE gys_control_classes.
* bin ich gemeint oder ein anderes Objekt?
CHECK r_receiver = me.
CASE fcode.
* Control wurde ausgewählt für Pattern
WHEN '$SELECT'.
lr_wrapper ?= r_sender.
CALL METHOD lr_wrapper->get_children
IMPORTING
er_first_control = lr_control_builder.
IF lr_control_builder IS BOUND.
lt_pattern = lr_control_builder->get_pattern( ).
IF lt_pattern IS NOT INITIAL.
CLEAR lv_string.
LOOP AT lt_pattern ASSIGNING <string>.
CONCATENATE lv_string cl_abap_char_utilities=>cr_lf <string> INTO lv_string.
ENDLOOP.
CALL FUNCTION 'SRM_DISPLAY_TEXT'
EXPORTING
im_text = lv_string.
ENDIF.
ENDIF.
* Control löschen
WHEN '$DELETE'.
lr_wrapper ?= r_sender.
CALL METHOD lr_wrapper->get_children
IMPORTING
et_controls = lt_child_controls
er_first_control = lr_control_builder.
LOOP AT lt_child_controls INTO lr_child_control.
DELETE t_control_admin
WHERE parent = lr_child_control
OR control = lr_child_control.
ENDLOOP.
IF lr_control_builder IS BOUND.
lr_control_builder->destroy( ).
lr_wrapper->remove_child( ).
ENDIF.
CALL METHOD build_control_toolbar
EXPORTING
ir_wrapper = lr_wrapper.
* Basis-Container schließen
WHEN '$CLOSE'.
lr_wrapper ?= r_sender.
lr_parent = lr_wrapper->get_parent( ).
IF lr_parent IS BOUND.
lr_parent->destroy( ).
ENDIF.
WHEN '$NAME'.
DATA lv_answer TYPE c LENGTH 1.
DATA lv_name TYPE char30.
lr_wrapper ?= r_sender.
CALL METHOD lr_wrapper->get_children
IMPORTING
er_first_control = lr_control_builder
et_controls = lt_controls.
READ TABLE lt_controls ASSIGNING <control> INDEX 1.
IF sy-subrc = 0.
lv_name = <control>->gv_control_name.
TRANSLATE lv_name TO UPPER CASE.
CALL FUNCTION 'POPUP_TO_GET_VALUE'
EXPORTING
fieldname = 'CONTROL_NAME'
tabname = 'ZGUIDRASIL_OBJ'
titel = 'Name Of Control'
valuein = lv_name
IMPORTING
answer = lv_answer
valueout = lv_name
EXCEPTIONS
fieldname_not_found = 1
OTHERS = 2.
IF sy-subrc = 0 AND lv_answer IS INITIAL.
TRANSLATE lv_name TO UPPER CASE.
<control>->gv_control_name = lv_name.
ENDIF.
* Container vom Wrapper holen
lr_wrapper ?= r_sender.
* Einfüge-Toolbar in Editiertoolbar ändern
build_edit_toolbar(
ir_wrapper = lr_wrapper
ir_control_builder = <control> ).
ENDIF.
WHEN '$CTRLFUNC'.
lr_wrapper ?= r_sender.
CALL METHOD lr_wrapper->get_children
IMPORTING
er_first_control = lr_control_builder
et_controls = lt_controls.
READ TABLE lt_controls ASSIGNING <control> INDEX 1.
IF sy-subrc = 0.
<control>->view_attributes( iv_edit = 'X' ).
* Container vom Wrapper holen
lr_wrapper ?= r_sender.
* Einfüge-Toolbar in Editiertoolbar ändern
build_edit_toolbar(
ir_wrapper = lr_wrapper
ir_control_builder = <control> ).
ENDIF.
* Control hinzufügen
WHEN OTHERS.
CHECK fcode(1) <> '$'.
add_control_object( fcode = fcode
r_sender = r_sender
r_receiver = r_receiver
r_toolbar = r_toolbar ).
ENDCASE.
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
38,
27586,
49,
1921,
4146,
62,
19499,
4146,
14418,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
38,
27586,
49,
1921,
4146,
62,
19499,
4146,
14418,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
11377,
2665,
13,
198,
220,
2099,
12,
7742,
82,
9564,
2969,
764,
198,
220,
2099,
12,
7742,
82,
327,
11251,
33,
764,
198,
220,
2099,
12,
7742,
82,
314,
10943,
764,
628,
220,
20314,
1168,
5064,
62,
38,
27586,
49,
1921,
4146,
62,
42296,
34,
62,
2200,
5222,
38757,
764,
628,
220,
38491,
314,
10943,
62,
10943,
30339,
1137,
2099,
1168,
38,
27586,
49,
1921,
4146,
62,
2149,
1340,
62,
20608,
1988,
314,
10943,
62,
22332,
62,
28206,
62,
10943,
30339,
1137,
22492,
15285,
62,
32541,
13,
198,
220,
38491,
509,
62,
49058,
62,
30910,
16284,
2099,
28521,
486,
1988,
705,
35,
6,
22492,
15285,
62,
32541,
13,
198,
220,
38491,
509,
62,
49058,
62,
47,
1404,
31800,
2099,
28521,
486,
1988,
705,
47,
6,
22492,
15285,
62,
32541,
13,
628,
220,
1398,
12,
24396,
82,
42715,
62,
10943,
46126,
1581,
764,
198,
220,
1398,
12,
24396,
82,
3268,
2043,
62,
10943,
5446,
3535,
62,
20608,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
32541,
2099,
327,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
20114,
62,
20608,
8,
2099,
40383,
1270,
764,
198,
220,
5050,
27841,
62,
10943,
30339,
1137,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
50,
14114,
2099,
314,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
10943,
5446,
3535,
62,
2389,
2099,
314,
11902,
764,
198,
220,
5050,
27841,
62,
10943,
30339,
1137,
62,
39758,
764,
198,
220,
5050,
27841,
62,
10943,
30339,
1137,
62,
4093,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4093,
62,
20608,
2099,
43749,
7336,
11902,
764,
198,
220,
5050,
20571,
26761,
764,
198,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
13137,
10067,
2099,
1168,
38,
27586,
49,
1921,
4146,
62,
31190,
23680,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
49058,
2099,
28521,
486,
4277,
37253,
764,
198,
220,
5050,
17151,
62,
43387,
6234,
62,
34,
16820,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
34,
16820,
8,
2099,
19269,
2751,
62,
38148,
764,
198,
220,
5050,
17151,
62,
20114,
3525,
62,
47,
1404,
31800,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
47,
1404,
31800,
8,
2099,
19269,
2751,
62,
38148,
764,
198,
220,
5050,
17151,
62,
20114,
3525,
62,
47,
1404,
31800,
62,
6489,
2937,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
47,
1404,
31800,
8,
2099,
19269,
2751,
62,
38148,
764,
198,
220,
5050,
17151,
62,
9864,
23680,
62,
17513,
62,
20608,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
43749,
7336,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
9864,
23680,
8,
2099,
1006,
284,
7852,
62,
40156,
62,
9864,
23680,
764,
198,
220,
5050,
14719,
6089,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
5097,
62,
38,
27586,
49,
1921,
4146,
62,
10943,
5446,
3535,
62,
19499,
4146,
14418,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
628,
220,
220,
220,
337,
36252,
50,
751,
62,
13716,
62,
15252,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
69,
8189,
8,
220,
220,
220,
220,
220,
41876,
334,
72,
62,
20786,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
62,
82,
2194,
8,
220,
220,
41876,
4526,
37,
5390,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
62,
260,
39729,
8,
41876,
4526,
37,
5390,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
62,
25981,
5657,
8,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
25981,
5657,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
26272,
62,
12543,
2733,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
69,
8189,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
537,
522,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
270,
62,
12543,
2733,
8,
41876,
256,
83,
65,
62,
16539,
764,
198,
19734,
2665,
13,
628,
220,
3858,
25,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
5097,
62,
38,
27586,
49,
1921,
4146,
62,
19499,
4146,
14418,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
220,
220,
347,
43312,
3963,
308,
893,
62,
13716,
62,
37724,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
11,
366,
22510,
66,
20,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1398,
3672,
41876,
384,
420,
7278,
3672,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
308,
893,
62,
13716,
62,
37724,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
308,
20760,
62,
13716,
62,
37724,
41876,
311,
9863,
1961,
43679,
3963,
308,
893,
62,
13716,
62,
37724,
198,
220,
220,
220,
220,
220,
220,
220,
13315,
4725,
33866,
8924,
35374,
4686,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
347,
43312,
3963,
308,
893,
62,
13716,
62,
28482,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2560,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
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,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no TYPE symsgno VALUE '001',
attr1 TYPE scx_attrname VALUE 'MV_AGENCY_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF agency_unkown,
BEGIN OF customer_unkown,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '002',
attr1 TYPE scx_attrname VALUE 'MV_CUSTOMER_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF customer_unkown,
BEGIN OF connection_unknown,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '004',
attr1 TYPE scx_attrname VALUE 'MV_CARRIER_ID',
attr2 TYPE scx_attrname VALUE 'MV_CONNECTION_ID',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF connection_unknown ,
BEGIN OF carrier_unknown,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '005',
attr1 TYPE scx_attrname VALUE 'MV_CARRIER_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF carrier_unknown ,
BEGIN OF supplement_unknown,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '006',
attr1 TYPE scx_attrname VALUE 'MV_SUPPLEMENT_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF supplement_unknown,
BEGIN OF travel_status_invalid,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '007',
attr1 TYPE scx_attrname VALUE 'MV_STATUS',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF travel_status_invalid,
BEGIN OF currency_unknown,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '008',
attr1 TYPE scx_attrname VALUE 'MV_CURRENCY_CODE',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF currency_unknown,
BEGIN OF travel_no_key,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '009',
attr1 TYPE scx_attrname VALUE '',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF travel_no_key,
BEGIN OF no_begin_date,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '013',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF no_begin_date,
BEGIN OF no_end_date,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '014',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF no_end_date,
BEGIN OF end_date_before_begin_date,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '015',
attr1 TYPE scx_attrname VALUE 'MV_BEGIN_DATE',
attr2 TYPE scx_attrname VALUE 'MV_END_DATE',
attr3 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr4 TYPE scx_attrname VALUE '',
END OF end_date_before_begin_date,
BEGIN OF travel_unknown,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '016',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF travel_unknown,
BEGIN OF booking_unknown,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '017',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF booking_unknown,
BEGIN OF booking_no_key,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '018',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF booking_no_key,
BEGIN OF booking_booking_date_invalid,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '019',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE 'MV_BOOKING_DATE',
attr4 TYPE scx_attrname VALUE '',
END OF booking_booking_date_invalid,
BEGIN OF flight_unknown,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '020',
attr1 TYPE scx_attrname VALUE 'MV_CARRIER_ID',
attr2 TYPE scx_attrname VALUE 'MV_CONNECTION_ID',
attr3 TYPE scx_attrname VALUE 'MV_FLIGHT_DATE',
attr4 TYPE scx_attrname VALUE '',
END OF flight_unknown,
BEGIN OF booking_supplement_unknown,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '021',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE 'MV_BOOKING_SUPPLEMENT_ID',
attr4 TYPE scx_attrname VALUE '',
END OF booking_supplement_unknown,
BEGIN OF booking_supplement_no_key,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '022',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF booking_supplement_no_key,
BEGIN OF booking_exists,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '023',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF booking_exists,
BEGIN OF booking_supplement_exists,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '024',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE 'MV_BOOKING_SUPPLEMENT_ID',
attr4 TYPE scx_attrname VALUE '',
END OF booking_supplement_exists,
BEGIN OF travel_no_control,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '025',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF travel_no_control,
BEGIN OF booking_no_control,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '026',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF booking_no_control,
BEGIN OF booking_supplement_no_control,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '027',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE 'MV_BOOKING_SUPPLEMENT_ID',
attr4 TYPE scx_attrname VALUE '',
END OF booking_supplement_no_control,
BEGIN OF booking_supplement_suppl_id_u,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '028',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE 'MV_BOOKING_SUPPLEMENT_ID',
attr4 TYPE scx_attrname VALUE '',
END OF booking_supplement_suppl_id_u,
BEGIN OF booking_supplement_pri_curr_u,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '029',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE 'MV_BOOKING_SUPPLEMENT_ID',
attr4 TYPE scx_attrname VALUE '',
END OF booking_supplement_pri_curr_u,
BEGIN OF booking_flight_u,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '030',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF booking_flight_u,
BEGIN OF booking_price_currency_u,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '031',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_BOOKING_ID',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF booking_price_currency_u,
BEGIN OF travel_lock,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '032',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE 'MV_UNAME',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF travel_lock,
BEGIN OF travel_already_exists,
msgid TYPE symsgid VALUE '/DMO/CM_FLIGHT_LE_30',
msgno TYPE symsgno VALUE '033',
attr1 TYPE scx_attrname VALUE 'MV_TRAVEL_ID',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF travel_already_exists.
METHODS constructor
IMPORTING
textid LIKE if_t100_message=>t100key OPTIONAL
previous LIKE previous OPTIONAL
travel_id TYPE /dmo/travel_id30 OPTIONAL
booking_id TYPE /dmo/booking_id30 OPTIONAL
booking_supplement_id TYPE /dmo/booking_supplement_id30 OPTIONAL
agency_id TYPE /dmo/agency_id30 OPTIONAL
customer_id TYPE /dmo/customer_id30 OPTIONAL
carrier_id TYPE /dmo/carrier30-carrier_id OPTIONAL
connection_id TYPE /dmo/connecti_30-connection_id OPTIONAL
supplement_id TYPE /dmo/suppleme_30-supplement_id OPTIONAL
begin_date TYPE /dmo/begin_date30 OPTIONAL
end_date TYPE /dmo/end_date30 OPTIONAL
booking_date TYPE /dmo/booking_date30 OPTIONAL
flight_date TYPE /dmo/flight_date30 OPTIONAL
status TYPE /dmo/travel_status30 OPTIONAL
currency_code TYPE /dmo/currency_code30 OPTIONAL
uname TYPE syuname OPTIONAL.
DATA: mv_travel_id TYPE /dmo/travel_id30,
mv_booking_id TYPE /dmo/booking_id30,
mv_booking_supplement_id TYPE /dmo/booking_supplement_id30,
mv_agency_id TYPE /dmo/agency_id30,
mv_customer_id TYPE /dmo/customer_id30,
mv_carrier_id TYPE /dmo/carrier30-carrier_id,
mv_connection_id TYPE /dmo/connecti_30-connection_id,
mv_supplement_id TYPE /dmo/suppleme_30-supplement_id,
mv_begin_date TYPE /dmo/begin_date30,
mv_end_date TYPE /dmo/end_date30,
mv_booking_date TYPE /dmo/booking_date30,
mv_flight_date TYPE /dmo/flight_date30,
mv_status TYPE /dmo/travel_status30,
mv_currency_code TYPE /dmo/currency_code30,
mv_uname TYPE syuname.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS /dmo/cx_flight_legacy30 IMPLEMENTATION.
METHOD constructor ##ADT_SUPPRESS_GENERATION.
super->constructor( previous = previous ).
me->mv_travel_id = travel_id.
me->mv_booking_id = booking_id.
me->mv_booking_supplement_id = booking_supplement_id.
me->mv_agency_id = agency_id.
me->mv_customer_id = customer_id.
me->mv_carrier_id = carrier_id.
me->mv_connection_id = connection_id.
me->mv_supplement_id = supplement_id.
me->mv_begin_date = begin_date.
me->mv_end_date = end_date.
me->mv_booking_date = booking_date.
me->mv_flight_date = flight_date.
me->mv_status = status.
me->mv_currency_code = currency_code.
me->mv_uname = uname.
CLEAR me->textid.
IF textid IS INITIAL.
if_t100_message~t100key = if_t100_message=>default_textid.
ELSE.
if_t100_message~t100key = textid.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
1220,
67,
5908,
14,
66,
87,
62,
22560,
62,
1455,
1590,
1270,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
43213,
62,
12708,
62,
9122,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
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,
308,
66,
62,
19662,
312,
41876,
827,
19662,
312,
26173,
8924,
31051,
35,
11770,
14,
24187,
62,
3697,
9947,
62,
2538,
62,
1270,
3256,
628,
220,
220,
220,
220,
220,
347,
43312,
3963,
4086,
62,
2954,
593,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
31051,
35,
11770,
14,
24187,
62,
3697,
9947,
62,
2538,
62,
1270,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
8298,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
16,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
44,
53,
62,
4760,
45155,
62,
2389,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
17,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
18,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
19,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
4086,
62,
2954,
593,
11,
628,
220,
220,
220,
220,
220,
347,
43312,
3963,
6491,
62,
2954,
593,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
31051,
35,
11770,
14,
24187,
62,
3697,
9947,
62,
2538,
62,
1270,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
21601,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
16,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
44,
53,
62,
34,
7759,
2662,
1137,
62,
2389,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
17,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
18,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
19,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
6491,
62,
2954,
593,
11,
628,
220,
220,
220,
220,
220,
347,
43312,
3963,
4637,
62,
34680,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
31051,
35,
11770,
14,
24187,
62,
3697,
9947,
62,
2538,
62,
1270,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
22914,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
16,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
44,
53,
62,
20034,
7112,
1137,
62,
2389,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
17,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
44,
53,
62,
10943,
45,
24565,
62,
2389,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
18,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
19,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
4637,
62,
34680,
220,
220,
220,
220,
220,
837,
628,
220,
220,
220,
220,
220,
347,
43312,
3963,
11920,
62,
34680,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
31051,
35,
11770,
14,
24187,
62,
3697,
9947,
62,
2538,
62,
1270,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
22544,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
16,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
44,
53,
62,
20034,
7112,
1137,
62,
2389,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
17,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
18,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
19,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
11920,
62,
34680,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
628,
220,
220,
220,
220,
220,
347,
43312,
3963,
10327,
62,
34680,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
31051,
35,
11770,
14,
24187,
62,
3697,
9947,
62,
2538,
62,
1270,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
28041,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
16,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
44,
53,
62,
40331,
16437,
10979,
62,
2389,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
17,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
18,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
19,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
10327,
62,
34680,
11,
628,
220,
220,
220,
220,
220,
347,
43312,
3963,
3067,
62,
13376,
62,
259,
12102,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
31051,
35,
11770,
14,
24187,
62,
3697,
9947,
62,
2538,
62,
1270,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
25816,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"!
"! Unit test class for the string template class
"!
class string_tests definition for testing.
"#AU Risk_Level Harmless
"#AU Duration Short
private section.
data: o_string type ref to lcl_string.
methods:
copying for testing.
endclass. "string_tests DEFINITION
*!
class string_tests implementation.
method copying.
create object o_string.
o_string->data = 'SpongeBob'.
data: lo_new type ref to lcl_string.
create object lo_new.
lo_new->copy( o_string ).
cl_aunit_assert=>assert_equals(
exp = 'SpongeBob'
act = lo_new->data
).
endmethod. "copying
endclass. "string_tests IMPLEMENTATION
"!
"! Unit test class for the string array template class
"!
class string_array_tests definition for testing.
"#AU Risk_Level Harmless
"#AU Duration Short
private section.
data: o_sa type ref to lcl_string_array.
methods:
copying for testing,
append for testing,
append_array for testing,
delete for testing,
find for testing.
endclass. "string_array_tests DEFINITION
*!
class string_array_tests implementation.
method copying.
create object o_sa.
o_sa->append( 'One' ).
o_sa->append( 'Two' ).
o_sa->append( 'Three' ).
data: lo_new type ref to lcl_string_array,
lv_conc type string.
create object lo_new.
lo_new->copy( o_sa ).
concatenate lines of lo_new->data into lv_conc.
cl_aunit_assert=>assert_equals(
exp = 'OneTwoThree'
act = lv_conc
).
endmethod. "copying
method append.
create object o_sa.
o_sa->append( 'One' ).
o_sa->append( 'Two' ).
o_sa->append( 'Three' ).
data: lv_conc type string.
concatenate lines of o_sa->data into lv_conc.
cl_aunit_assert=>assert_equals(
exp = 'OneTwoThree'
act = lv_conc
).
endmethod. "append
method append_array.
create object o_sa.
o_sa->append( 'One' ).
o_sa->append( 'Two' ).
o_sa->append( 'Three' ).
data: lo_new type ref to lcl_string_array,
lv_conc type string.
create object lo_new.
lo_new->append_array( o_sa ).
concatenate lines of lo_new->data into lv_conc.
cl_aunit_assert=>assert_equals(
exp = 'OneTwoThree'
act = lv_conc
).
endmethod. "append_array
method delete.
create object o_sa.
o_sa->append( 'One' ).
o_sa->append( 'Two' ).
o_sa->append( 'Three' ).
o_sa->delete( 'Two' ).
data: lv_conc type string.
concatenate lines of o_sa->data into lv_conc.
cl_aunit_assert=>assert_equals(
exp = 'OneThree'
act = lv_conc
).
endmethod. "delete
method find.
create object o_sa.
o_sa->append( 'One' ).
o_sa->append( 'Two' ).
o_sa->append( 'Three' ).
data: lv_index type i.
lv_index = o_sa->find( 'Two' ).
cl_aunit_assert=>assert_equals(
exp = 2
act = lv_index
).
endmethod. "find
endclass. "string_array_tests IMPLEMENTATION
"!
"! Unit test class for the hashmap template class
"!
class hashmap_tests definition for testing.
"#AU Risk_Level Harmless
"#AU Duration Short
private section.
data: o_hm type ref to lcl_hashmap.
methods:
copying for testing,
create_string_hashmap for testing,
create_array_hashmap for testing,
create_hashmap_hashmap for testing,
create_4_dimension_hashmap for testing,
new for testing,
get for testing,
set for testing,
exists for testing,
delete for testing.
endclass. "hashmap_tests DEFINITION
*!
class hashmap_tests implementation.
method copying.
create object o_hm
exporting
value_type = 'lcl_string'.
data: lo_value type ref to lcl_string.
lo_value ?= o_hm->new( 'IdxOne' ).
lo_value->data = 'ValueOne'.
data: lo_new type ref to lcl_hashmap.
create object lo_new
exporting
value_type = 'lcl_string'.
lo_new->copy( o_hm ).
lo_value ?= lo_new->get( 'IdxOne' ).
cl_aunit_assert=>assert_equals(
exp = 'ValueOne'
act = lo_value->data
).
endmethod. "copying
method create_string_hashmap.
data: lo_string type ref to lcl_string.
create object o_hm. "// default
lo_string ?= o_hm->new( 'IdxOne' ).
create object o_hm
exporting
value_type = 'lcl_string'.
lo_string ?= o_hm->new( 'IdxOne' ).
endmethod. "create_string_hashmap
method create_array_hashmap.
data: lo_array type ref to lcl_string_array.
create object o_hm
exporting
value_type = 'lcl_string_array'.
lo_array ?= o_hm->new( 'IdxOne' ).
endmethod. "create_array_hashmap
method create_hashmap_hashmap.
data: lo_hashmap type ref to lcl_hashmap.
create object o_hm
exporting
value_type = 'lcl_hashmap'.
lo_hashmap ?= o_hm->new( 'IdxOne' ).
endmethod. "create_hashmap_hashmap
method create_4_dimension_hashmap.
data: lo_hashmap1 type ref to lcl_hashmap,
lo_hashmap2 type ref to lcl_hashmap,
lo_hashmap3 type ref to lcl_hashmap.
create object o_hm
exporting
value_type = 'lcl_hashmap:lcl_hashmap:lcl_hashmap'.
lo_hashmap1 ?= o_hm->new( 'IdxOne' ).
lo_hashmap2 ?= lo_hashmap1->new( 'IdxTwo' ).
lo_hashmap3 ?= lo_hashmap2->new( 'IdxThree' ).
endmethod. "create_4_dimension_hashmap
method new.
data: lo_string type ref to lcl_string.
create object o_hm.
lo_string ?= o_hm->new( 'IdxOne' ).
cl_aunit_assert=>assert_not_initial( lo_string ).
lo_string->data = 'ValueOne'.
lo_string ?= o_hm->new( 'IdxOne' ).
cl_aunit_assert=>assert_initial( lo_string ).
endmethod. "new
method get.
data: lo_string type ref to lcl_string.
create object o_hm.
lo_string ?= o_hm->get( 'IdxOne' ).
cl_aunit_assert=>assert_not_initial( lo_string ).
lo_string->data = 'ValueOne'.
lo_string ?= o_hm->get( 'IdxOne' ).
cl_aunit_assert=>assert_not_initial( lo_string ).
cl_aunit_assert=>assert_equals(
exp = 'ValueOne'
act = lo_string->data
).
endmethod. "get
method set.
data: lo_str1 type ref to lcl_string,
lo_str2 type ref to lcl_string.
create object lo_str1.
lo_str1->data = 'ValueOne'.
create object o_hm.
lo_str2 ?= o_hm->get( 'IdxOne' ).
cl_aunit_assert=>assert_not_initial( lo_str2 ).
cl_aunit_assert=>assert_initial( lo_str2->data ).
o_hm->set(
key = 'IdxOne'
value = lo_str1
).
lo_str2 ?= o_hm->get( 'IdxOne' ).
cl_aunit_assert=>assert_not_initial( lo_str2 ).
cl_aunit_assert=>assert_equals(
exp = 'ValueOne'
act = lo_str2->data
).
endmethod. "set
method exists.
create object o_hm.
data: lv_exists type flag.
o_hm->new( 'IdxOne' ).
lv_exists = o_hm->exists( 'IdxOne' ).
cl_aunit_assert=>assert_not_initial( lv_exists ).
lv_exists = o_hm->exists( 'IdxTwo' ).
cl_aunit_assert=>assert_initial( lv_exists ).
endmethod. "exists
method delete.
create object o_hm.
o_hm->new( 'IdxOne' ).
o_hm->new( 'IdxTwo' ).
o_hm->new( 'IdxThree' ).
data: lv_exists type flag.
lv_exists = o_hm->exists( 'IdxTwo' ).
cl_aunit_assert=>assert_not_initial( lv_exists ).
o_hm->delete( 'IdxTwo' ).
lv_exists = o_hm->exists( 'IdxOne' ).
cl_aunit_assert=>assert_not_initial( lv_exists ).
lv_exists = o_hm->exists( 'IdxTwo' ).
cl_aunit_assert=>assert_initial( lv_exists ).
lv_exists = o_hm->exists( 'IdxThree' ).
cl_aunit_assert=>assert_not_initial( lv_exists ).
endmethod. "delete
endclass. "hashmap_tests IMPLEMENTATION
| [
40484,
198,
40484,
11801,
1332,
1398,
329,
262,
4731,
11055,
1398,
198,
40484,
198,
4871,
4731,
62,
41989,
6770,
329,
4856,
13,
198,
220,
25113,
26830,
19602,
62,
4971,
17925,
1203,
198,
220,
25113,
26830,
22920,
220,
220,
10073,
198,
220,
2839,
2665,
13,
198,
220,
220,
220,
1366,
25,
267,
62,
8841,
2099,
1006,
284,
300,
565,
62,
8841,
13,
198,
220,
220,
220,
5050,
25,
198,
220,
220,
220,
220,
220,
23345,
329,
4856,
13,
198,
437,
4871,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8841,
62,
41989,
5550,
20032,
17941,
198,
9,
0,
198,
4871,
4731,
62,
41989,
7822,
13,
198,
220,
2446,
23345,
13,
198,
220,
220,
220,
2251,
2134,
267,
62,
8841,
13,
198,
220,
220,
220,
267,
62,
8841,
3784,
7890,
796,
705,
4561,
14220,
18861,
4458,
628,
220,
220,
220,
1366,
25,
2376,
62,
3605,
2099,
1006,
284,
300,
565,
62,
8841,
13,
198,
220,
220,
220,
2251,
2134,
2376,
62,
3605,
13,
198,
220,
220,
220,
2376,
62,
3605,
3784,
30073,
7,
267,
62,
8841,
6739,
198,
220,
220,
220,
537,
62,
1942,
270,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
1033,
796,
705,
4561,
14220,
18861,
6,
198,
220,
220,
220,
220,
220,
719,
796,
2376,
62,
3605,
3784,
7890,
198,
220,
220,
220,
6739,
198,
220,
886,
24396,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
22163,
1112,
198,
437,
4871,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8841,
62,
41989,
30023,
2538,
10979,
6234,
628,
198,
40484,
198,
40484,
11801,
1332,
1398,
329,
262,
4731,
7177,
11055,
1398,
198,
40484,
198,
4871,
4731,
62,
18747,
62,
41989,
6770,
329,
4856,
13,
198,
220,
25113,
26830,
19602,
62,
4971,
17925,
1203,
198,
220,
25113,
26830,
22920,
220,
220,
10073,
198,
220,
2839,
2665,
13,
198,
220,
220,
220,
1366,
25,
267,
62,
11400,
2099,
1006,
284,
300,
565,
62,
8841,
62,
18747,
13,
198,
220,
220,
220,
5050,
25,
198,
220,
220,
220,
220,
220,
23345,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
24443,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
24443,
62,
18747,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
12233,
329,
4856,
11,
198,
220,
220,
220,
220,
220,
1064,
329,
4856,
13,
198,
437,
4871,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8841,
62,
18747,
62,
41989,
5550,
20032,
17941,
198,
9,
0,
198,
4871,
4731,
62,
18747,
62,
41989,
7822,
13,
198,
220,
2446,
23345,
13,
198,
220,
220,
220,
2251,
2134,
267,
62,
11400,
13,
198,
220,
220,
220,
267,
62,
11400,
3784,
33295,
7,
705,
3198,
6,
6739,
198,
220,
220,
220,
267,
62,
11400,
3784,
33295,
7,
705,
7571,
6,
6739,
198,
220,
220,
220,
267,
62,
11400,
3784,
33295,
7,
705,
12510,
6,
6739,
628,
220,
220,
220,
1366,
25,
2376,
62,
3605,
2099,
1006,
284,
300,
565,
62,
8841,
62,
18747,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
1102,
66,
2099,
4731,
13,
198,
220,
220,
220,
2251,
2134,
2376,
62,
3605,
13,
198,
220,
220,
220,
2376,
62,
3605,
3784,
30073,
7,
267,
62,
11400,
6739,
628,
220,
220,
220,
1673,
36686,
378,
3951,
286,
2376,
62,
3605,
3784,
7890,
656,
300,
85,
62,
1102,
66,
13,
198,
220,
220,
220,
537,
62,
1942,
270,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
1033,
796,
705,
3198,
7571,
12510,
6,
198,
220,
220,
220,
220,
220,
719,
796,
300,
85,
62,
1102,
66,
198,
220,
220,
220,
6739,
198,
220,
886,
24396,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
22163,
1112,
628,
220,
2446,
24443,
13,
198,
220,
220,
220,
2251,
2134,
267,
62,
11400,
13,
198,
220,
220,
220,
267,
62,
11400,
3784,
33295,
7,
705,
3198,
6,
6739,
198,
220,
220,
220,
267,
62,
11400,
3784,
33295,
7,
705,
7571,
6,
6739,
198,
220,
220,
220,
267,
62,
11400,
3784,
33295,
7,
705,
12510,
6,
6739,
628,
220,
220,
220,
1366,
25,
300,
85,
62,
1102,
66,
2099,
4731,
13,
198,
220,
220,
220,
1673,
36686,
378,
3951,
286,
267,
62,
11400,
3784,
7890,
656,
300,
85,
62,
1102,
66,
13,
198,
220,
220,
220,
537,
62,
1942,
270,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
1033,
796,
705,
3198,
7571,
12510,
6,
198,
220,
220,
220,
220,
220,
719,
796,
300,
85,
62,
1102,
66,
198,
220,
220,
220,
6739,
198,
220,
886,
24396,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33295,
628,
220,
2446,
24443,
62,
18747,
13,
198,
220,
220,
220,
2251,
2134,
267,
62,
11400,
13,
198,
220,
220,
220,
267,
62,
11400,
3784,
33295,
7,
705,
3198,
6,
6739,
198,
220,
220,
220,
267,
62,
11400,
3784,
33295,
7,
705,
7571,
6,
6739,
198,
220,
220,
220,
267,
62,
11400,
3784,
33295,
7,
705,
12510,
6,
6739,
628,
220,
220,
220,
1366,
25,
2376,
62,
3605,
2099,
1006,
284,
300,
565,
62,
8841,
62,
18747,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
1102,
66,
2099,
4731,
13,
198,
220,
220,
220,
2251,
2134,
2376,
62,
3605,
13,
198,
220,
220,
220,
2376,
62,
3605,
3784,
33295,
62,
18747,
7,
267,
62,
11400,
6739,
628,
220,
220,
220,
1673,
36686,
378,
3951,
286,
2376,
62,
3605,
3784,
7890,
656,
300,
85,
62,
1102,
66,
13,
198,
220,
220,
220,
537,
62,
1942,
270,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
1033,
796,
705,
3198,
7571,
12510,
6,
198,
220,
220,
220,
220,
220,
719,
796,
300,
85,
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,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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
] |
CLASS zcl_abapgit_http DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
CONSTANTS:
BEGIN OF c_scheme,
digest TYPE string VALUE 'Digest',
END OF c_scheme .
CLASS-METHODS get_agent
RETURNING
VALUE(rv_agent) TYPE string .
CLASS-METHODS create_by_url
IMPORTING
!iv_url TYPE string
!iv_service TYPE string
RETURNING
VALUE(ro_client) TYPE REF TO zcl_abapgit_http_client
RAISING
zcx_abapgit_exception .
PROTECTED SECTION.
CLASS-METHODS check_auth_requested
IMPORTING
!ii_client TYPE REF TO if_http_client
RETURNING
VALUE(rv_auth_requested) TYPE abap_bool
RAISING
zcx_abapgit_exception .
CLASS-METHODS is_local_system
IMPORTING
!iv_url TYPE string
RETURNING
VALUE(rv_bool) TYPE abap_bool .
CLASS-METHODS acquire_login_details
IMPORTING
!ii_client TYPE REF TO if_http_client
!io_client TYPE REF TO zcl_abapgit_http_client
!iv_url TYPE string
RETURNING
VALUE(rv_scheme) TYPE string
RAISING
zcx_abapgit_exception .
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_abapgit_http IMPLEMENTATION.
METHOD acquire_login_details.
DATA: lv_default_user TYPE string,
lv_user TYPE string,
lv_pass TYPE string,
lo_digest TYPE REF TO zcl_abapgit_http_digest.
lv_default_user = zcl_abapgit_persistence_user=>get_instance( )->get_repo_login( iv_url ).
lv_user = lv_default_user.
zcl_abapgit_password_dialog=>popup(
EXPORTING
iv_repo_url = iv_url
CHANGING
cv_user = lv_user
cv_pass = lv_pass ).
IF lv_user IS INITIAL.
zcx_abapgit_exception=>raise( 'Unauthorized access. Check your credentials' ).
ENDIF.
IF lv_user <> lv_default_user.
zcl_abapgit_persistence_user=>get_instance( )->set_repo_login(
iv_url = iv_url
iv_login = lv_user ).
ENDIF.
rv_scheme = ii_client->response->get_header_field( 'www-authenticate' ).
FIND REGEX '^(\w+)' IN rv_scheme SUBMATCHES rv_scheme.
CASE rv_scheme.
WHEN c_scheme-digest.
* https://en.wikipedia.org/wiki/Digest_access_authentication
* e.g. used by https://www.gerritcodereview.com/
CREATE OBJECT lo_digest
EXPORTING
ii_client = ii_client
iv_username = lv_user
iv_password = lv_pass.
lo_digest->run( ii_client ).
io_client->set_digest( lo_digest ).
WHEN OTHERS.
* https://en.wikipedia.org/wiki/Basic_access_authentication
ii_client->authenticate(
username = lv_user
password = lv_pass ).
ENDCASE.
ENDMETHOD.
METHOD check_auth_requested.
DATA: lv_code TYPE i.
ii_client->response->get_status( IMPORTING code = lv_code ).
IF lv_code = 401.
rv_auth_requested = abap_true.
ENDIF.
ENDMETHOD.
METHOD create_by_url.
DATA: lv_uri TYPE string,
lv_scheme TYPE string,
li_client TYPE REF TO if_http_client,
lo_proxy_configuration TYPE REF TO zcl_abapgit_proxy_config,
lv_text TYPE string.
CREATE OBJECT lo_proxy_configuration.
li_client = zcl_abapgit_exit=>get_instance( )->create_http_client( iv_url ).
IF li_client IS NOT BOUND.
cl_http_client=>create_by_url(
EXPORTING
url = zcl_abapgit_url=>host( iv_url )
ssl_id = zcl_abapgit_exit=>get_instance( )->get_ssl_id( )
proxy_host = lo_proxy_configuration->get_proxy_url( iv_url )
proxy_service = lo_proxy_configuration->get_proxy_port( iv_url )
IMPORTING
client = li_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4 ).
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 1.
" make sure:
" a) SSL is setup properly in STRUST
lv_text = 'HTTPS ARGUMENT_NOT_FOUND | STRUST/SSL Setup correct?'.
WHEN OTHERS.
lv_text = 'While creating HTTP Client'.
ENDCASE.
zcx_abapgit_exception=>raise( lv_text ).
ENDIF.
ENDIF.
IF lo_proxy_configuration->get_proxy_authentication( iv_url ) = abap_true.
zcl_abapgit_proxy_auth=>run( li_client ).
ENDIF.
CREATE OBJECT ro_client
EXPORTING
ii_client = li_client.
IF is_local_system( iv_url ) = abap_true.
li_client->send_sap_logon_ticket( ).
ENDIF.
li_client->request->set_cdata( '' ).
li_client->request->set_header_field(
name = '~request_method'
value = 'GET' ).
li_client->request->set_header_field(
name = 'user-agent'
value = get_agent( ) ).
lv_uri = zcl_abapgit_url=>path_name( iv_url ) &&
'/info/refs?service=git-' &&
iv_service &&
'-pack'.
li_client->request->set_header_field(
name = '~request_uri'
value = lv_uri ).
" Disable internal auth dialog (due to its unclarity)
li_client->propertytype_logon_popup = if_http_client=>co_disabled.
zcl_abapgit_login_manager=>load(
iv_uri = iv_url
ii_client = li_client ).
zcl_abapgit_exit=>get_instance( )->http_client(
iv_url = iv_url
ii_client = li_client ).
ro_client->send_receive( ).
IF check_auth_requested( li_client ) = abap_true.
lv_scheme = acquire_login_details( ii_client = li_client
io_client = ro_client
iv_url = iv_url ).
ro_client->send_receive( ).
ENDIF.
ro_client->check_http_200( ).
IF lv_scheme <> c_scheme-digest.
zcl_abapgit_login_manager=>save( iv_uri = iv_url
ii_client = li_client ).
ENDIF.
ENDMETHOD.
METHOD get_agent.
* bitbucket require agent prefix = "git/"
* also see https://github.com/abapGit/abapGit/issues/1432
rv_agent = |git/2.0 (abapGit { zif_abapgit_version=>c_abap_version })|.
ENDMETHOD.
METHOD is_local_system.
DATA: lv_host TYPE string,
lt_list TYPE zif_abapgit_definitions=>ty_string_tt,
li_exit TYPE REF TO zif_abapgit_exit.
cl_http_server=>get_location( IMPORTING host = lv_host ).
APPEND lv_host TO lt_list.
APPEND 'localhost' TO lt_list.
li_exit = zcl_abapgit_exit=>get_instance( ).
li_exit->change_local_host( CHANGING ct_hosts = lt_list ).
FIND REGEX 'https?://([^/^:]*)' IN iv_url SUBMATCHES lv_host.
READ TABLE lt_list WITH KEY table_line = lv_host TRANSPORTING NO FIELDS.
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
4023,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
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,
15952,
1326,
11,
198,
220,
220,
220,
220,
220,
220,
220,
16274,
41876,
4731,
26173,
8924,
705,
19511,
395,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
15952,
1326,
764,
628,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
25781,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
25781,
8,
41876,
4731,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
2251,
62,
1525,
62,
6371,
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,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
15271,
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,
305,
62,
16366,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
4023,
62,
16366,
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,
628,
220,
220,
220,
42715,
12,
49273,
50,
2198,
62,
18439,
62,
25927,
276,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
16366,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
4023,
62,
16366,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
18439,
62,
25927,
276,
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,
318,
62,
12001,
62,
10057,
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,
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,
30388,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
12831,
62,
38235,
62,
36604,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
16366,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
4023,
62,
16366,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
16366,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
4023,
62,
16366,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
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,
15952,
1326,
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,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
4023,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
12831,
62,
38235,
62,
36604,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
12286,
62,
7220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
7220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
6603,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
12894,
395,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
4023,
62,
12894,
395,
13,
628,
198,
220,
220,
220,
300,
85,
62,
12286,
62,
7220,
796,
1976,
565,
62,
397,
499,
18300,
62,
19276,
13274,
62,
7220,
14804,
1136,
62,
39098,
7,
1267,
3784,
1136,
62,
260,
7501,
62,
38235,
7,
21628,
62,
6371,
6739,
198,
220,
220,
220,
300,
85,
62,
7220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
12286,
62,
7220,
13,
628,
220,
220,
220,
1976,
565,
62,
397,
499,
18300,
62,
28712,
62,
38969,
519,
14804,
12924,
929,
7,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
260,
7501,
62,
6371,
220,
220,
220,
220,
796,
21628,
62,
6371,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
269,
85,
62,
7220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
7220,
198,
220,
220,
220,
220,
220,
220,
220,
269,
85,
62,
6603,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
6603,
6739,
628,
220,
220,
220,
16876,
300,
85,
62,
7220,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
705,
52,
2616,
1457,
1143,
1895,
13,
6822,
534,
18031,
6,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
16876,
300,
85,
62,
7220,
1279,
29,
300,
85,
62,
12286,
62,
7220,
13,
198,
220,
220,
220,
220,
220,
1976,
565,
62,
397,
499,
18300,
62,
19276,
13274,
62,
7220,
14804,
1136,
62,
39098,
7,
1267,
3784,
2617,
62,
260,
7501,
62,
38235,
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,
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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
] |
INTERFACE zif_amp_converter
PUBLIC .
TYPES metric_store TYPE STANDARD TABLE OF zamp_store WITH KEY metric_scenario metric_group metric_key.
METHODS convert
IMPORTING
metric_store TYPE metric_store
EXPORTING
content_type TYPE string
RETURNING VALUE(converted_metrics) TYPE string.
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
696,
62,
1102,
332,
353,
198,
5105,
32936,
764,
628,
220,
24412,
47,
1546,
18663,
62,
8095,
41876,
49053,
9795,
43679,
3963,
1976,
696,
62,
8095,
13315,
35374,
18663,
62,
1416,
39055,
18663,
62,
8094,
18663,
62,
2539,
13,
628,
220,
337,
36252,
50,
10385,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18663,
62,
8095,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
18663,
62,
8095,
198,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2695,
62,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
1102,
13658,
62,
4164,
10466,
8,
41876,
4731,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <h1>Flight Price Engine</h1>
"!
"! If no parameters are applied, the price of every flight will be recalculated.
"!
"! @parameter it_flight | Set of Flights which should be recalculate prices
FUNCTION /DMO/FLIGHT_TRAVEL_CALC_PRI_28.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IT_FLIGHT) TYPE /DMO/IF_FLIGHT_LEGACY28=>TT_FLIGHT
*" OPTIONAL
*"----------------------------------------------------------------------
TYPES BEGIN OF ty_seats_occupied.
INCLUDE TYPE /dmo/flight28.
TYPES distance TYPE /dmo/connecti_28-distance.
TYPES distance_unit TYPE /dmo/connecti_28-distance_unit.
TYPES END OF ty_seats_occupied.
TYPES: tt_flight TYPE STANDARD TABLE OF /dmo/flight28 WITH KEY client carrier_id connection_id flight_date.
DATA: lt_seats_occupied TYPE TABLE OF ty_seats_occupied.
IF it_flight IS SUPPLIED.
SELECT FROM /dmo/booking28 AS booking
JOIN /dmo/connecti_28 AS connection
ON booking~carrier_id = connection~carrier_id
AND booking~connection_id = connection~connection_id
JOIN /dmo/flight28 AS flight
ON booking~carrier_id = flight~carrier_id
AND booking~connection_id = flight~connection_id
AND booking~flight_date = flight~flight_date
JOIN @it_flight AS t
ON booking~carrier_id = t~carrier_id
AND booking~connection_id = t~connection_id
FIELDS booking~carrier_id, booking~connection_id, booking~flight_date, COUNT(*) AS seats_occupied,
connection~distance, connection~distance_unit,
flight~currency_code, flight~plane_type_id, flight~seats_max, flight~seats_occupied
GROUP BY booking~carrier_id, booking~connection_id, booking~flight_date,
connection~distance, connection~distance_unit,
flight~currency_code, flight~plane_type_id, flight~seats_max, flight~seats_occupied
INTO CORRESPONDING FIELDS OF TABLE @lt_seats_occupied.
ELSE.
SELECT FROM /dmo/booking28 AS booking
JOIN /dmo/connecti_28 AS connection
ON booking~carrier_id = connection~carrier_id
AND booking~connection_id = connection~connection_id
JOIN /dmo/flight28 AS flight
ON booking~carrier_id = flight~carrier_id
AND booking~connection_id = flight~connection_id
AND booking~flight_date = flight~flight_date
FIELDS booking~carrier_id, booking~connection_id, booking~flight_date, COUNT(*) AS seats_occupied,
connection~distance, connection~distance_unit,
flight~currency_code, flight~plane_type_id, flight~seats_max, flight~seats_occupied
GROUP BY booking~carrier_id, booking~connection_id, booking~flight_date,
connection~distance, connection~distance_unit,
flight~currency_code, flight~plane_type_id, flight~seats_max, flight~seats_occupied
INTO CORRESPONDING FIELDS OF TABLE @lt_seats_occupied.
ENDIF.
LOOP AT lt_seats_occupied ASSIGNING FIELD-SYMBOL(<seats_occupied>).
<seats_occupied>-price = ( ( 3 * ( <seats_occupied>-seats_occupied * 100 DIV <seats_occupied>-seats_max ) ** 2 DIV 400 ) + 25 ) * <seats_occupied>-distance DIV 100.
ENDLOOP.
UPDATE /dmo/flight28
FROM TABLE @(
CORRESPONDING tt_flight(
lt_seats_occupied MAPPING
carrier_id = carrier_id
connection_id = connection_id
flight_date = flight_date
price = price
currency_code = currency_code
plane_type_id = plane_type_id
seats_max = seats_max
seats_occupied = seats_occupied
)
).
ENDFUNCTION.
| [
40484,
1279,
71,
16,
29,
43069,
7886,
7117,
3556,
71,
16,
29,
198,
40484,
198,
40484,
1002,
645,
10007,
389,
5625,
11,
262,
2756,
286,
790,
5474,
481,
307,
42653,
49262,
13,
198,
40484,
198,
40484,
2488,
17143,
2357,
340,
62,
22560,
930,
5345,
286,
1610,
2337,
543,
815,
307,
42653,
3129,
378,
4536,
198,
42296,
4177,
2849,
1220,
35,
11770,
14,
3697,
9947,
62,
51,
3861,
18697,
62,
34,
1847,
34,
62,
4805,
40,
62,
2078,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
2043,
62,
3697,
9947,
8,
41876,
220,
1220,
35,
11770,
14,
5064,
62,
3697,
9947,
62,
2538,
38,
43300,
2078,
14804,
15751,
62,
3697,
9947,
198,
9,
1,
220,
220,
220,
220,
220,
220,
39852,
2849,
1847,
198,
9,
1,
10097,
23031,
198,
220,
24412,
47,
1546,
347,
43312,
3963,
1259,
62,
325,
1381,
62,
28756,
13,
198,
220,
3268,
5097,
52,
7206,
41876,
1220,
67,
5908,
14,
22560,
2078,
13,
198,
220,
24412,
47,
1546,
220,
220,
5253,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
8443,
72,
62,
2078,
12,
30246,
13,
198,
220,
24412,
47,
1546,
220,
220,
5253,
62,
20850,
220,
41876,
1220,
67,
5908,
14,
8443,
72,
62,
2078,
12,
30246,
62,
20850,
13,
198,
220,
24412,
47,
1546,
23578,
3963,
1259,
62,
325,
1381,
62,
28756,
13,
628,
220,
24412,
47,
1546,
25,
256,
83,
62,
22560,
41876,
49053,
9795,
43679,
3963,
1220,
67,
5908,
14,
22560,
2078,
13315,
35374,
5456,
11920,
62,
312,
4637,
62,
312,
5474,
62,
4475,
13,
628,
220,
42865,
25,
300,
83,
62,
325,
1381,
62,
28756,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
43679,
3963,
1259,
62,
325,
1381,
62,
28756,
13,
628,
220,
16876,
340,
62,
22560,
3180,
19549,
49094,
13,
198,
220,
220,
220,
33493,
16034,
1220,
67,
5908,
14,
2070,
278,
2078,
7054,
25452,
198,
220,
220,
220,
220,
220,
32357,
1268,
220,
220,
220,
220,
1220,
67,
5908,
14,
8443,
72,
62,
2078,
7054,
4637,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6177,
220,
25452,
93,
7718,
5277,
62,
312,
220,
220,
220,
796,
4637,
93,
7718,
5277,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
25452,
93,
38659,
62,
312,
796,
4637,
93,
38659,
62,
312,
198,
220,
220,
220,
220,
220,
32357,
1268,
220,
220,
220,
220,
1220,
67,
5908,
14,
22560,
2078,
7054,
5474,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6177,
220,
25452,
93,
7718,
5277,
62,
312,
220,
220,
220,
796,
5474,
93,
7718,
5277,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
25452,
93,
38659,
62,
312,
796,
5474,
93,
38659,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
25452,
93,
22560,
62,
4475,
220,
220,
796,
5474,
93,
22560,
62,
4475,
198,
220,
220,
220,
220,
220,
32357,
1268,
220,
220,
220,
220,
2488,
270,
62,
22560,
7054,
256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6177,
220,
25452,
93,
7718,
5277,
62,
312,
220,
220,
220,
796,
256,
93,
7718,
5277,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
25452,
93,
38659,
62,
312,
796,
256,
93,
38659,
62,
312,
198,
220,
220,
220,
220,
220,
18930,
3698,
5258,
220,
220,
25452,
93,
7718,
5277,
62,
312,
11,
25452,
93,
38659,
62,
312,
11,
25452,
93,
22560,
62,
4475,
11,
327,
28270,
7,
28104,
7054,
8632,
62,
28756,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4637,
93,
30246,
11,
4637,
93,
30246,
62,
20850,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5474,
93,
34415,
62,
8189,
11,
5474,
93,
14382,
62,
4906,
62,
312,
11,
5474,
93,
325,
1381,
62,
9806,
11,
5474,
93,
325,
1381,
62,
28756,
198,
220,
220,
220,
220,
220,
44441,
11050,
25452,
93,
7718,
5277,
62,
312,
11,
25452,
93,
38659,
62,
312,
11,
25452,
93,
22560,
62,
4475,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4637,
93,
30246,
11,
4637,
93,
30246,
62,
20850,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5474,
93,
34415,
62,
8189,
11,
5474,
93,
14382,
62,
4906,
62,
312,
11,
5474,
93,
325,
1381,
62,
9806,
11,
5474,
93,
325,
1381,
62,
28756,
198,
220,
220,
220,
220,
220,
39319,
23929,
19535,
47,
18672,
2751,
18930,
3698,
5258,
3963,
43679,
2488,
2528,
62,
325,
1381,
62,
28756,
13,
198,
220,
17852,
5188,
13,
198,
220,
220,
220,
33493,
16034,
1220,
67,
5908,
14,
2070,
278,
2078,
7054,
25452,
198,
220,
220,
220,
220,
220,
32357,
1268,
220,
220,
220,
220,
1220,
67,
5908,
14,
8443,
72,
62,
2078,
7054,
4637,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6177,
220,
25452,
93,
7718,
5277,
62,
312,
220,
220,
220,
796,
4637,
93,
7718,
5277,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
25452,
93,
38659,
62,
312,
796,
4637,
93,
38659,
62,
312,
198,
220,
220,
220,
220,
220,
32357,
1268,
220,
220,
220,
220,
1220,
67,
5908,
14,
22560,
2078,
7054,
5474,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6177,
220,
25452,
93,
7718,
5277,
62,
312,
220,
220,
220,
796,
5474,
93,
7718,
5277,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
25452,
93,
38659
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
CLASS ycl_advent2020_day04 DEFINITION
PUBLIC
FINAL
CREATE PUBLIC.
PUBLIC SECTION.
METHODS solve_part_one
IMPORTING
input TYPE string_table
RETURNING
VALUE(result) TYPE int8.
METHODS solve_part_two
IMPORTING
input TYPE string_table
RETURNING
VALUE(result) TYPE int8.
PROTECTED SECTION.
PRIVATE SECTION.
DATA m_valid_eye_colors TYPE RANGE OF string.
METHODS is_passport_valid
IMPORTING
passport TYPE string
RETURNING
VALUE(result) TYPE string.
METHODS is_passport_valid_strict
IMPORTING
passport TYPE string
RETURNING
VALUE(result) TYPE abap_bool.
METHODS is_field_valid
IMPORTING
field TYPE string
RETURNING
VALUE(result) TYPE string.
ENDCLASS.
CLASS ycl_advent2020_day04 IMPLEMENTATION.
METHOD solve_part_one.
DATA(in) = input.
APPEND VALUE #( ) TO in.
DATA(passport) = ||.
LOOP AT in ASSIGNING FIELD-SYMBOL(<i>).
IF <i> = || AND passport <> ||.
IF is_passport_valid( passport ).
ADD 1 TO result.
ENDIF.
passport = ||.
CONTINUE.
ENDIF.
passport = |{ passport } { <i> }|.
ENDLOOP.
ENDMETHOD.
METHOD solve_part_two.
m_valid_eye_colors = VALUE #( sign = 'I' option = 'EQ'
( low = 'amb' ) ( low = 'blu' ) ( low = 'brn' ) ( low = 'gry' )
( low = 'grn' ) ( low = 'hzl' ) ( low = 'oth' )
).
DATA(in) = input.
APPEND VALUE #( ) TO in.
DATA(passport) = ||.
LOOP AT in ASSIGNING FIELD-SYMBOL(<i>).
IF <i> = || AND passport <> ||.
IF is_passport_valid_strict( passport ).
ADD 1 TO result.
ENDIF.
passport = ||.
CONTINUE.
ENDIF.
passport = |{ passport } { <i> }|.
ENDLOOP.
ENDMETHOD.
METHOD is_passport_valid.
SPLIT passport AT ' ' INTO TABLE DATA(fields).
DELETE fields WHERE table_line CP 'cid:*' OR table_line = ||.
result = xsdbool( lines( fields ) = 7 ).
ENDMETHOD.
METHOD is_passport_valid_strict.
SPLIT passport AT ' ' INTO TABLE DATA(fields).
DELETE fields WHERE table_line CP 'cid:*' OR table_line = ||.
IF lines( fields ) <> 7.
result = abap_false.
RETURN.
ENDIF.
LOOP AT fields ASSIGNING FIELD-SYMBOL(<f>).
IF NOT is_field_valid( field = <f> ).
result = abap_false.
RETURN.
ENDIF.
ENDLOOP.
result = abap_true.
ENDMETHOD.
METHOD is_field_valid.
SPLIT field AT ':' INTO DATA(key) DATA(value).
CASE key.
WHEN 'byr'.
result = xsdbool( value BETWEEN 1920 AND 2002 ).
WHEN 'iyr'.
result = xsdbool( value BETWEEN 2010 AND 2020 ).
WHEN 'eyr'.
result = xsdbool( value BETWEEN 2020 AND 2030 ).
WHEN 'hgt'.
IF value CP '*cm'.
result = xsdbool( substring( val = value len = strlen( value ) - 2 ) BETWEEN 150 AND 193 ).
ELSEIF value CP '*in'.
result = xsdbool( substring( val = value len = strlen( value ) - 2 ) BETWEEN 59 AND 76 ).
ELSE.
result = abap_false.
ENDIF.
WHEN 'hcl'.
result = cl_abap_matcher=>contains( pattern = '^#[0-9a-f]{6}' text = value ).
WHEN 'ecl'.
result = xsdbool( value IN m_valid_eye_colors ).
WHEN 'pid'.
result = xsdbool( strlen( value ) = 9 ).
ENDCASE.
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
565,
62,
324,
1151,
42334,
62,
820,
3023,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
8494,
62,
3911,
62,
505,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5128,
220,
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,
20274,
8,
41876,
493,
23,
13,
628,
220,
220,
220,
337,
36252,
50,
8494,
62,
3911,
62,
11545,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5128,
220,
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,
20274,
8,
41876,
493,
23,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
285,
62,
12102,
62,
25379,
62,
4033,
669,
41876,
371,
27746,
3963,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
318,
62,
6603,
634,
62,
12102,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
17981,
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,
20274,
8,
41876,
4731,
13,
628,
220,
220,
220,
337,
36252,
50,
318,
62,
6603,
634,
62,
12102,
62,
301,
2012,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
17981,
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,
20274,
8,
41876,
450,
499,
62,
30388,
13,
628,
220,
220,
220,
337,
36252,
50,
318,
62,
3245,
62,
12102,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2214,
220,
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,
20274,
8,
41876,
4731,
13,
198,
198,
10619,
31631,
13,
628,
198,
31631,
331,
565,
62,
324,
1151,
42334,
62,
820,
3023,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
8494,
62,
3911,
62,
505,
13,
198,
220,
220,
220,
42865,
7,
259,
8,
796,
5128,
13,
198,
220,
220,
220,
43504,
10619,
26173,
8924,
1303,
7,
1267,
5390,
287,
13,
628,
220,
220,
220,
42865,
7,
6603,
634,
8,
796,
8614,
13,
198,
220,
220,
220,
17579,
3185,
5161,
287,
24994,
3528,
15871,
18930,
24639,
12,
23060,
10744,
3535,
7,
27,
72,
29,
737,
198,
220,
220,
220,
220,
220,
16876,
1279,
72,
29,
796,
8614,
5357,
17981,
1279,
29,
8614,
13,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
318,
62,
6603,
634,
62,
12102,
7,
17981,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27841,
352,
5390,
1255,
13,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
220,
220,
17981,
796,
8614,
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,
220,
220,
17981,
796,
930,
90,
17981,
1782,
1391,
1279,
72,
29,
1782,
91,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
8494,
62,
3911,
62,
11545,
13,
198,
220,
220,
220,
285,
62,
12102,
62,
25379,
62,
4033,
669,
796,
26173,
8924,
1303,
7,
1051,
796,
705,
40,
6,
3038,
796,
705,
36,
48,
6,
198,
220,
220,
220,
220,
220,
357,
1877,
796,
705,
4131,
6,
1267,
357,
1877,
796,
705,
65,
2290,
6,
1267,
357,
1877,
796,
705,
1671,
77,
6,
1267,
357,
1877,
796,
705,
70,
563,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
1877,
796,
705,
2164,
77,
6,
1267,
357,
1877,
796,
705,
32179,
75,
6,
1267,
357,
1877,
796,
705,
849,
6,
1267,
198,
220,
220,
220,
6739,
628,
220,
220,
220,
42865,
7,
259,
8,
796,
5128,
13,
198,
220,
220,
220,
43504,
10619,
26173,
8924,
1303,
7,
1267,
5390,
287,
13,
628,
220,
220,
220,
42865,
7,
6603,
634,
8,
796,
8614,
13,
198,
220,
220,
220,
17579,
3185,
5161,
287,
24994,
3528,
15871,
18930,
24639,
12,
23060,
10744,
3535,
7,
27,
72,
29,
737,
198,
220,
220,
220,
220,
220,
16876,
1279,
72,
29,
796,
8614,
5357,
17981,
1279,
29,
8614,
13,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
318,
62,
6603,
634,
62,
12102,
62,
301,
2012,
7,
17981,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27841,
352,
5390,
1255,
13,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
220,
220,
17981,
796,
8614,
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,
220,
220,
17981,
796,
930,
90,
17981,
1782,
1391,
1279,
72,
29,
1782,
91,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
318,
62,
6603,
634,
62,
12102,
13,
198,
220,
220,
220,
46341,
2043,
17981,
5161,
705,
705,
39319,
43679,
42865,
7,
25747,
737,
198,
220,
220,
220,
5550,
2538,
9328,
7032,
33411,
3084,
62,
1370,
16932,
705,
66,
312,
25,
9,
6,
6375,
3084,
62,
1370,
796,
8614,
13,
198,
220,
220,
220,
1255,
796,
2124,
82,
9945,
970,
7,
3951,
7,
7032,
1267,
796,
767,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
318,
62,
6603,
634,
62,
12102,
62,
301,
2012,
13,
198,
220,
220,
220,
46341,
2043,
17981,
5161,
705,
705,
39319,
43679,
42865,
7,
25747,
737,
198,
220,
220,
220,
5550,
2538
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
*&---------------------------------------------------------------------*
*& Include ZREST_SCHED_BATCH_F01
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
* 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 *
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form GET_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM get_data CHANGING pv_job_count TYPE i
pv_rec_cnt TYPE i
pv_rc TYPE sy-subrc.
SELECT zmessageid INTO TABLE gt_zmessageid FROM zrest_monitor
WHERE zmessageid IN s_messag
AND zuser IN s_user
AND zexedate IN s_exedat
AND zexetime IN s_exetim
AND zretrydate IN s_retdat
AND zretrytime IN s_rettim
AND submit_date IN s_subdat
AND submit_time IN s_subtim
AND ( httpstatus LT 200 OR httpstatus GE 300 )
AND interface_id IN s_id
AND calling_program IN s_callpr
AND calling_method IN s_callme
AND businessid IN s_busine
AND status = ''.
IF sy-subrc NE 0.
pv_rc = 1.
ELSE.
DESCRIBE TABLE gt_zmessageid LINES pv_rec_cnt.
***Begin of MP2K905442
* pv_job_count = round( val = pv_rec_cnt / p_batch dec = 0 ).
*
* IF pv_job_count = 0.
* pv_job_count = 1.
* ENDIF.
pv_job_count = round( val = pv_rec_cnt / p_batch dec = 0 mode = '1' ).
***End of MP2K905442
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form CREATE_JOB
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM create_job .
DATA: lv_jobcnt TYPE tbtcjob-jobcount,
ls_print_params TYPE pri_params.
ADD 1 TO gv_jobno.
lv_jobcnt = gv_jobno.
***Target Server
CLEAR gv_targetserver.
IF NOT p_bsname IS INITIAL.
gv_targetserver = p_bsname.
ENDIF.
***Build Job Name
CONCATENATE 'REST_SCHED_SUB'
sy-datum
sy-uzeit
'_'
gv_jobno
INTO gv_jobname.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = gv_jobname
IMPORTING
jobcount = lv_jobcnt
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i026(bt) WITH gv_jobname .
ELSE.
* SUBMIT zrest_scheduler WITH s_messag IN gtr_zmessageid "MP2K905442
SUBMIT zrest_scheduler_telemetry WITH s_messag IN gtr_zmessageid "MP2K905442
TO SAP-SPOOL
SPOOL PARAMETERS ls_print_params
WITHOUT SPOOL DYNPRO
VIA JOB gv_jobname NUMBER lv_jobcnt
AND RETURN.
IF sy-subrc EQ 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_jobcnt
jobname = gv_jobname
strtimmed = 'X'
targetserver = gv_targetserver
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 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
MESSAGE s000(55) WITH gv_msg_cnt text-004 gv_jobno gv_jobname.
ENDIF.
ELSE.
ENDIF.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form F4_BATCH_SERVER
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* <--P_P_BSNAME text
*----------------------------------------------------------------------*
FORM f4_batch_server CHANGING pv_bsname TYPE bpsrvgrp.
DATA: lt_list TYPE TABLE OF msxxlist,
ls_list TYPE msxxlist,
lt_tsrvgrp TYPE STANDARD TABLE OF tsrvgrp,
ls_tsrvgrp TYPE tsrvgrp,
lv_sel_server LIKE tbtcjob-execserver..
DATA BEGIN OF lt_sys_list OCCURS 10.
INCLUDE STRUCTURE btctgtsrvr.
DATA END OF lt_sys_list.
DATA BEGIN OF field_tbl OCCURS 10.
INCLUDE STRUCTURE help_value.
DATA END OF field_tbl.
CALL FUNCTION 'TH_SERVER_LIST'
EXPORTING
services = '08'
TABLES
list = lt_list
EXCEPTIONS
no_server_list = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ENDIF.
***Get custom server groups if any
SELECT * FROM tsrvgrp INTO TABLE lt_tsrvgrp.
LOOP AT lt_list INTO ls_list.
lt_sys_list-srvname = ls_list-name.
APPEND lt_sys_list.
ENDLOOP.
LOOP AT lt_tsrvgrp INTO ls_tsrvgrp.
lt_sys_list-srvname = ls_tsrvgrp-grpname.
APPEND lt_sys_list.
ENDLOOP.
FREE field_tbl.
field_tbl-tabname = 'BTCTGTSRVR'.
field_tbl-fieldname = 'SRVNAME'.
field_tbl-selectflag = 'X'.
APPEND field_tbl.
* read batch server
CALL FUNCTION 'F4TOOL_F4FUNCTION_BRIDGE'
EXPORTING
tabname = field_tbl-tabname
fieldname = field_tbl-fieldname
display_only = space
IMPORTING
selected_value = lv_sel_server
TABLES
value_tab = lt_sys_list
fields_tab = field_tbl.
pv_bsname = lv_sel_server.
ENDFORM.
| [
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,
37,
486,
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,
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
220,
220,
220,
220,
5178,
220,
17151,
62,
26947,
198,
9,
5,
10097,
30934,
9,
198,
9,
220,
220,
220,
220,
220,
220,
2420,
198,
9,
10097,
23031,
9,
198,
9,
220,
14610,
220,
279,
16,
220,
220,
220,
220,
220,
220,
220,
2420,
198,
9,
220,
1279,
438,
220,
279,
17,
220,
220,
220,
220,
220,
220,
220,
2420,
198,
9,
10097,
23031,
9,
198,
21389,
651,
62,
7890,
5870,
15567,
2751,
279,
85,
62,
21858,
62,
9127,
41876,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
62,
8344,
62,
66,
429,
41876,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
85,
62,
6015,
41876,
827,
12,
7266,
6015,
13,
628,
220,
33493,
1976,
20500,
312,
39319,
43679,
308,
83,
62,
89,
20500,
312,
16034,
1976,
2118,
62,
41143,
198,
220,
220,
220,
220,
220,
220,
220,
220,
33411,
1976,
20500,
312,
3268,
264,
62,
37348,
363,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
1976,
7220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
220,
264,
62,
7220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
1976,
1069,
276,
378,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
220,
264,
62,
1069,
276,
265,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
1976,
1069,
8079,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
220,
264,
62,
1069,
316,
320,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
1976,
1186,
563,
4475,
220,
220,
220,
220,
220,
220,
3268,
220,
264,
62,
1186,
19608,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
1976,
1186,
563,
2435,
220,
220,
220,
220,
220,
220,
3268,
220,
264,
62,
11489,
320,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
9199,
62,
4475,
220,
220,
220,
220,
220,
3268,
220,
264,
62,
7266,
19608,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
9199,
62,
2435,
220,
220,
220,
220,
220,
3268,
220,
264,
62,
7266,
16514,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
357,
2638,
13376,
34146,
939,
6375,
2638,
13376,
22319,
5867,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
7071,
62,
312,
220,
220,
220,
220,
3268,
220,
264,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
4585,
62,
23065,
220,
3268,
220,
264,
62,
13345,
1050,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
4585,
62,
24396,
220,
220,
3268,
220,
264,
62,
13345,
1326,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
1597,
312,
220,
220,
220,
220,
220,
220,
3268,
220,
264,
62,
10885,
500,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
220,
220,
220,
3722,
796,
705,
4458,
628,
220,
16876,
827,
12,
7266,
6015,
10635,
657,
13,
198,
220,
220,
220,
279,
85,
62,
6015,
796,
352,
13,
198,
220,
17852,
5188,
13,
628,
220,
220,
220,
22196,
34,
7112,
12473,
43679,
308,
83,
62,
89,
20500,
312,
43277,
1546,
279,
85,
62,
8344,
62,
66,
429,
13,
198,
198,
8162,
44140,
286,
220,
4904,
17,
42,
44928,
39506,
198,
9,
220,
220,
220,
279,
85,
62,
21858,
62,
9127,
796,
2835,
7,
1188,
796,
279,
85,
62,
8344,
62,
66,
429,
1220,
279,
62,
43501,
875,
796,
657,
6739,
198,
9,
198,
9,
220,
220,
220,
16876,
279,
85,
62,
21858,
62,
9127,
796,
657,
13,
198,
9,
220,
220,
220,
220,
220,
279,
85,
62,
21858,
62,
9127,
796,
352,
13,
198,
9,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
279,
85,
62,
21858,
62,
9127,
796,
2835,
7,
1188,
796,
279,
85,
62,
8344,
62,
66,
429,
1220,
279,
62,
43501,
875,
796,
657,
220,
4235,
796,
705,
16,
6,
6739,
198,
198,
8162,
12915,
286,
220,
4904,
17,
42,
44928,
39506,
628,
220,
23578,
5064,
13,
198,
198,
1677,
8068,
1581,
44,
13,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
220,
220,
220,
220,
5178,
220,
29244,
6158,
62,
41,
9864,
198,
9,
5,
10097,
30934,
9,
198,
9,
220,
220,
220,
220,
220,
220,
2420,
198,
9,
10097,
23031,
9,
198,
9,
220,
14610,
220,
279,
16,
220,
220,
220,
220,
220,
220,
220,
2420,
198,
9,
220,
1279,
438,
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,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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
] |
*&---------------------------------------------------------------------*
*& Local interfaces definition - General + Transaction Processing
*&---------------------------------------------------------------------*
INTERFACE lif_factory DEFERRED.
INTERFACE lif_ef_types.
TYPES: ts_control_data TYPE /saptrx/control_data,
tt_control_data TYPE STANDARD TABLE OF ts_control_data.
TYPES: BEGIN OF ts_enh_track_id_data,
key TYPE char33.
INCLUDE TYPE /saptrx/track_id_data.
TYPES: END OF ts_enh_track_id_data.
TYPES: tt_enh_track_id_data TYPE STANDARD TABLE OF ts_enh_track_id_data.
TYPES: ts_track_id_data TYPE /saptrx/track_id_data,
tt_track_id_data TYPE STANDARD TABLE OF ts_track_id_data.
TYPES: ts_strucdatadef TYPE /saptrx/strucdatadef,
tt_strucdatadef TYPE STANDARD TABLE OF ts_strucdatadef.
TYPES: ts_expeventdata TYPE /saptrx/exp_events,
tt_expeventdata TYPE STANDARD TABLE OF ts_expeventdata.
TYPES: ts_measrmntdata TYPE /saptrx/measr_data,
tt_measrmntdata TYPE STANDARD TABLE OF ts_measrmntdata.
TYPES: ts_infodata TYPE /saptrx/info_data,
tt_infodata TYPE STANDARD TABLE OF ts_infodata.
TYPES: BEGIN OF ts_definition,
maintab TYPE /saptrx/strucdatadef,
mastertab TYPE /saptrx/strucdatadef,
END OF ts_definition.
TYPES: tt_tracklocation TYPE STANDARD TABLE OF /saptrx/bapi_evm_locationid.
TYPES: tt_trackingheader TYPE STANDARD TABLE OF /saptrx/bapi_evm_header.
TYPES: tv_condition TYPE sy-binpt.
TYPES: BEGIN OF ts_stop_points,
stop_id TYPE string,
log_locid TYPE /scmtms/location_id,
seq_num TYPE /scmtms/seq_num,
END OF ts_stop_points.
TYPES: tt_stop_points TYPE STANDARD TABLE OF ts_stop_points .
ENDINTERFACE.
"!Extractor Function Constants
INTERFACE lif_ef_constants.
CONSTANTS: BEGIN OF cs_system_fields,
actual_bisiness_timezone TYPE /saptrx/paramname VALUE 'ACTUAL_BUSINESS_TIMEZONE',
actual_bisiness_datetime TYPE /saptrx/paramname VALUE 'ACTUAL_BUSINESS_DATETIME',
actual_technical_timezone TYPE /saptrx/paramname VALUE 'ACTUAL_TECHNICAL_TIMEZONE',
actual_technical_datetime TYPE /saptrx/paramname VALUE 'ACTUAL_TECHNICAL_DATETIME',
END OF cs_system_fields.
CONSTANTS: BEGIN OF cs_errors,
wrong_parameter TYPE sotr_conc VALUE '1216f03004ce11ebbf450050c2490048',
cdata_determination TYPE sotr_conc VALUE '1216f03004ce11ebbf460050c2490048',
table_determination TYPE sotr_conc VALUE '1216f03004ce11ebbf470050c2490048',
stop_processing TYPE sotr_conc VALUE '1216f03004ce11ebbf480050c2490048',
END OF cs_errors.
CONSTANTS: BEGIN OF cs_condition,
true TYPE lif_ef_types=>tv_condition VALUE 'T',
false TYPE lif_ef_types=>tv_condition VALUE 'F',
END OF cs_condition.
CONSTANTS: BEGIN OF cs_change_mode,
insert TYPE updkz_d VALUE 'I',
update TYPE updkz_d VALUE 'U',
delete TYPE updkz_d VALUE 'D',
undefined TYPE updkz_d VALUE 'T',
END OF cs_change_mode.
CONSTANTS: cv_aot TYPE string VALUE 'AOT'.
CONSTANTS: cv_max_end_date TYPE /saptrx/tid_end_date_tsloc VALUE '099991231000000'.
ENDINTERFACE.
INTERFACE lif_ef_parameters.
METHODS get_appsys
RETURNING
VALUE(rv_appsys) TYPE /saptrx/applsystem.
METHODS get_app_obj_types
RETURNING
VALUE(rs_app_obj_types) TYPE /saptrx/aotypes.
METHODS get_app_objects
RETURNING
VALUE(rr_data) TYPE REF TO data.
METHODS get_appl_table
IMPORTING
iv_tabledef TYPE clike
RETURNING
VALUE(rr_data) TYPE REF TO data
RAISING
cx_udm_message.
ENDINTERFACE.
INTERFACE lif_bo_reader.
METHODS check_relevance
IMPORTING
is_app_object TYPE trxas_appobj_ctab_wa
RETURNING
VALUE(rv_result) TYPE lif_ef_types=>tv_condition
RAISING
cx_udm_message.
METHODS get_data
IMPORTING
is_app_object TYPE trxas_appobj_ctab_wa
iv_old_data TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(rr_data) TYPE REF TO data
RAISING
cx_udm_message.
METHODS get_mapping_structure
RETURNING
VALUE(rr_data) TYPE REF TO data.
METHODS get_track_id_data
IMPORTING
is_app_object TYPE trxas_appobj_ctab_wa
EXPORTING
et_track_id_data TYPE lif_ef_types=>tt_track_id_data
RAISING
cx_udm_message.
ENDINTERFACE.
INTERFACE lif_ef_processor.
METHODS check_app_objects
RAISING
cx_udm_message.
METHODS check_relevance
IMPORTING
io_bo_factory TYPE REF TO lif_factory
RETURNING
VALUE(rv_result) TYPE lif_ef_types=>tv_condition
RAISING
cx_udm_message.
METHODS get_control_data
IMPORTING
io_bo_factory TYPE REF TO lif_factory
CHANGING
ct_control_data TYPE lif_ef_types=>tt_control_data
RAISING
cx_udm_message.
METHODS get_planned_events
IMPORTING
io_factory TYPE REF TO lif_factory
CHANGING
ct_expeventdata TYPE lif_ef_types=>tt_expeventdata
ct_measrmntdata TYPE lif_ef_types=>tt_measrmntdata
ct_infodata TYPE lif_ef_types=>tt_infodata
RAISING
cx_udm_message.
METHODS get_track_id_data
IMPORTING
io_bo_factory TYPE REF TO lif_factory
EXPORTING
et_track_id_data TYPE lif_ef_types=>tt_track_id_data
RAISING
cx_udm_message.
ENDINTERFACE.
"!Planned Event Filler
INTERFACE lif_pe_filler.
METHODS get_planed_events
IMPORTING
is_app_objects TYPE trxas_appobj_ctab_wa
CHANGING
ct_expeventdata TYPE lif_ef_types=>tt_expeventdata
ct_measrmntdata TYPE lif_ef_types=>tt_measrmntdata
ct_infodata TYPE lif_ef_types=>tt_infodata
RAISING
cx_udm_message.
ENDINTERFACE.
INTERFACE lif_factory.
METHODS get_bo_reader
IMPORTING
is_appl_object TYPE trxas_appobj_ctab_wa
io_ef_parameters TYPE REF TO lif_ef_parameters
RETURNING
VALUE(ro_bo_reader) TYPE REF TO lif_bo_reader
RAISING
cx_udm_message.
METHODS get_ef_parameters
IMPORTING
iv_appsys TYPE /saptrx/applsystem
is_app_obj_types TYPE /saptrx/aotypes
it_all_appl_tables TYPE trxas_tabcontainer
it_app_type_cntl_tabs TYPE trxas_apptype_tabs OPTIONAL
it_app_objects TYPE trxas_appobj_ctabs
RETURNING
VALUE(ro_ef_parameters) TYPE REF TO lif_ef_parameters.
METHODS get_ef_processor
IMPORTING
is_definition TYPE lif_ef_types=>ts_definition
io_bo_factory TYPE REF TO lif_factory
iv_appsys TYPE /saptrx/applsystem
is_app_obj_types TYPE /saptrx/aotypes
it_all_appl_tables TYPE trxas_tabcontainer
it_app_type_cntl_tabs TYPE trxas_apptype_tabs
it_app_objects TYPE trxas_appobj_ctabs
RETURNING
VALUE(ro_ef_processor) TYPE REF TO lif_ef_processor.
METHODS get_pe_filler
IMPORTING
is_appl_object TYPE trxas_appobj_ctab_wa
io_ef_parameters TYPE REF TO lif_ef_parameters
RETURNING
VALUE(ro_pe_filler) TYPE REF TO lif_pe_filler
RAISING
cx_udm_message.
ENDINTERFACE.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
10714,
20314,
6770,
532,
3611,
1343,
45389,
28403,
198,
9,
5,
10097,
30934,
9,
198,
41358,
49836,
3868,
62,
69,
9548,
23449,
1137,
22083,
13,
198,
41358,
49836,
3868,
62,
891,
62,
19199,
13,
198,
220,
24412,
47,
1546,
25,
40379,
62,
13716,
62,
7890,
41876,
1220,
82,
2373,
40914,
14,
13716,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
13716,
62,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
13716,
62,
7890,
13,
628,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
40379,
62,
16550,
62,
11659,
62,
312,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1994,
41876,
1149,
2091,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
5097,
52,
7206,
41876,
1220,
82,
2373,
40914,
14,
11659,
62,
312,
62,
7890,
13,
198,
220,
24412,
47,
1546,
25,
23578,
3963,
40379,
62,
16550,
62,
11659,
62,
312,
62,
7890,
13,
628,
220,
24412,
47,
1546,
25,
256,
83,
62,
16550,
62,
11659,
62,
312,
62,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
16550,
62,
11659,
62,
312,
62,
7890,
13,
198,
220,
24412,
47,
1546,
25,
40379,
62,
11659,
62,
312,
62,
7890,
41876,
1220,
82,
2373,
40914,
14,
11659,
62,
312,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
11659,
62,
312,
62,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
11659,
62,
312,
62,
7890,
13,
628,
220,
24412,
47,
1546,
25,
40379,
62,
19554,
10210,
265,
671,
69,
41876,
1220,
82,
2373,
40914,
14,
19554,
10210,
265,
671,
69,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
19554,
10210,
265,
671,
69,
41876,
49053,
9795,
43679,
3963,
40379,
62,
19554,
10210,
265,
671,
69,
13,
628,
220,
24412,
47,
1546,
25,
40379,
62,
1069,
431,
1151,
7890,
41876,
1220,
82,
2373,
40914,
14,
11201,
62,
31534,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
1069,
431,
1151,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
1069,
431,
1151,
7890,
13,
628,
220,
24412,
47,
1546,
25,
40379,
62,
1326,
292,
26224,
429,
7890,
41876,
1220,
82,
2373,
40914,
14,
1326,
292,
81,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
1326,
292,
26224,
429,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
1326,
292,
26224,
429,
7890,
13,
628,
220,
24412,
47,
1546,
25,
40379,
62,
10745,
375,
1045,
41876,
1220,
82,
2373,
40914,
14,
10951,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
10745,
375,
1045,
41876,
49053,
9795,
43679,
3963,
40379,
62,
10745,
375,
1045,
13,
628,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
40379,
62,
46758,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1388,
8658,
220,
220,
41876,
1220,
82,
2373,
40914,
14,
19554,
10210,
265,
671,
69,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4958,
8658,
41876,
1220,
82,
2373,
40914,
14,
19554,
10210,
265,
671,
69,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
40379,
62,
46758,
13,
628,
220,
24412,
47,
1546,
25,
256,
83,
62,
11659,
24886,
220,
41876,
49053,
9795,
43679,
3963,
1220,
82,
2373,
40914,
14,
65,
15042,
62,
1990,
76,
62,
24886,
312,
13,
628,
220,
24412,
47,
1546,
25,
256,
83,
62,
36280,
25677,
41876,
49053,
9795,
43679,
3963,
1220,
82,
2373,
40914,
14,
65,
15042,
62,
1990,
76,
62,
25677,
13,
628,
220,
24412,
47,
1546,
25,
31557,
62,
31448,
220,
220,
220,
220,
220,
220,
41876,
827,
12,
8800,
457,
13,
628,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
40379,
62,
11338,
62,
13033,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2245,
62,
312,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
62,
17946,
312,
41876,
1220,
1416,
16762,
907,
14,
24886,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33756,
62,
22510,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
41068,
62,
22510,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
40379,
62,
11338,
62,
13033,
13,
198,
220,
24412,
47,
1546,
25,
256,
83,
62,
11338,
62,
13033,
41876,
49053,
9795,
43679,
3963,
40379,
62,
11338,
62,
13033,
764,
198,
10619,
41358,
49836,
13,
198,
198,
40484,
11627,
40450,
15553,
4757,
1187,
198,
41358,
49836,
3868,
62,
891,
62,
9979,
1187,
13,
198,
220,
7102,
2257,
1565,
4694,
25,
347,
43312,
3963,
50115,
62,
10057,
62,
25747,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4036,
62,
41907,
1272,
62,
2435,
11340,
220,
41876,
1220,
82,
2373,
40914,
14,
17143,
3672,
26173,
8924,
705,
10659,
25620,
62,
45346,
44180,
62,
34694,
57,
11651,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4036,
62,
41907,
1272,
62,
19608,
8079,
220,
41876,
1220,
82,
2373,
40914,
14,
17143,
3672,
26173,
8924,
705,
10659,
25620,
62,
45346,
44180,
62,
35,
1404,
2767,
12789,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4036,
62,
47944,
62,
2435,
11340,
41876,
1220,
82,
2373,
40914,
14,
17143,
3672,
26173,
8924,
705,
10659,
25620,
62,
51,
25994,
45,
20151,
62,
34694,
57,
11651,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4036,
62,
47944,
62,
19608,
8079,
41876,
1220,
82,
2373,
40914,
14,
17143,
3672,
26173,
8924,
705,
10659,
25620,
62,
51,
25994,
45,
20151,
62,
35,
1404,
2767,
12789,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
50115,
62,
10057,
62,
25747,
13,
628,
220,
7102,
2257,
1565,
4694,
25,
347,
43312,
3963,
50115,
62,
48277,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2642,
62,
17143,
2357,
220,
220,
220,
220,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
CLASS ltcl_test DEFINITION DEFERRED.
CLASS zcl_aoc_check_51 DEFINITION LOCAL FRIENDS ltcl_test.
*----------------------------------------------------------------------*
* CLASS lcl_Test DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS ltcl_test DEFINITION FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS
FINAL.
PRIVATE SECTION.
* ================
DATA: mt_code TYPE string_table,
ms_result TYPE scirest_ad,
mo_check TYPE REF TO zcl_aoc_check_51.
METHODS:
setup,
export_import FOR TESTING,
test001_01 FOR TESTING,
test001_02 FOR TESTING,
test001_03 FOR TESTING,
test001_04 FOR TESTING,
test001_05 FOR TESTING,
test001_06 FOR TESTING,
test001_07 FOR TESTING,
test001_08 FOR TESTING,
test001_09 FOR TESTING,
test001_10 FOR TESTING.
ENDCLASS. "lcl_Test
*----------------------------------------------------------------------*
* CLASS lcl_Test IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS ltcl_test IMPLEMENTATION.
* ==============================
DEFINE _code.
APPEND &1 TO mt_code.
END-OF-DEFINITION.
METHOD setup.
CREATE OBJECT mo_check.
zcl_aoc_unit_test=>set_check( mo_check ).
ENDMETHOD. "setup
METHOD export_import.
zcl_aoc_unit_test=>export_import( mo_check ).
ENDMETHOD.
METHOD test001_01.
* ===========
_code 'SELECT SINGLE bname FROM usr02 INTO lv_bname.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_equals( exp = '001'
act = ms_result-code ).
ENDMETHOD. "test1
METHOD test001_02.
* ===========
IF mo_check->supported( ) = abap_false.
RETURN.
ENDIF.
_code 'SELECT SINGLE bname FROM usr02 INTO @lv_bname.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_initial( ms_result-code ).
ENDMETHOD.
METHOD test001_03.
* ===========
IF mo_check->supported( ) = abap_false.
RETURN.
ENDIF.
_code 'SELECT SINGLE foo bar INTO (@<ls_data>-foo, @<ls_data>-bar) FROM zfoo.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_initial( ms_result-code ).
ENDMETHOD.
METHOD test001_04.
* ===========
IF mo_check->supported( ) = abap_false.
RETURN.
ENDIF.
_code 'SELECT * FROM usr02 INTO TABLE lt_data.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_equals( exp = '001'
act = ms_result-code ).
ENDMETHOD.
METHOD test001_05.
* ===========
IF mo_check->supported( ) = abap_false.
RETURN.
ENDIF.
_code 'SELECT * FROM usr02 INTO TABLE @lt_data.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_initial( ms_result-code ).
ENDMETHOD.
METHOD test001_06.
* ===========
IF mo_check->supported( ) = abap_false.
RETURN.
ENDIF.
_code 'SELECT SINGLE foo bar INTO (<ls_data>-foo, <ls_data>-bar) FROM zfoo.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_equals( exp = '001'
act = ms_result-code ).
ENDMETHOD.
METHOD test001_07.
* ===========
IF mo_check->supported( ) = abap_false.
RETURN.
ENDIF.
_code 'SELECTION-SCREEN END OF BLOCK b1.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_initial( ms_result-code ).
ENDMETHOD.
METHOD test001_08.
* ===========
IF mo_check->supported( ) = abap_false.
RETURN.
ENDIF.
_code 'SELECT * FROM usr02 APPENDING CORRESPONDING FIELDS OF TABLE @lt_data.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_initial( ms_result-code ).
ENDMETHOD.
METHOD test001_09.
* ===========
IF mo_check->supported( ) = abap_false.
RETURN.
ENDIF.
_code 'SELECT * FROM usr02 APPENDING TABLE @lt_data.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_initial( ms_result-code ).
ENDMETHOD.
METHOD test001_10.
* ===========
IF mo_check->supported( ) = abap_false.
RETURN.
ENDIF.
_code 'SELECT SINGLE bname FROM usr02 INTO (@lv_bname).'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_initial( ms_result-code ).
ENDMETHOD.
ENDCLASS. "lcl_Test
| [
31631,
300,
83,
565,
62,
9288,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
31631,
1976,
565,
62,
64,
420,
62,
9122,
62,
4349,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
83,
565,
62,
9288,
13,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
14402,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
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,
198,
220,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
9,
796,
25609,
18604,
628,
220,
220,
220,
42865,
25,
45079,
62,
8189,
220,
220,
41876,
4731,
62,
11487,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13845,
62,
20274,
41876,
629,
557,
301,
62,
324,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6941,
62,
9122,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
64,
420,
62,
9122,
62,
4349,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
9058,
11,
198,
220,
220,
220,
220,
220,
10784,
62,
11748,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
486,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
2999,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
3070,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
3023,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
2713,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
3312,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
2998,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
2919,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
2931,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
940,
7473,
43001,
2751,
13,
198,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
366,
75,
565,
62,
14402,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
14402,
30023,
2538,
10979,
6234,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
300,
83,
565,
62,
9288,
30023,
2538,
10979,
6234,
13,
198,
9,
36658,
25609,
28,
628,
220,
23449,
8881,
4808,
8189,
13,
198,
220,
220,
220,
43504,
10619,
1222,
16,
5390,
45079,
62,
8189,
13,
198,
220,
23578,
12,
19238,
12,
7206,
20032,
17941,
13,
628,
220,
337,
36252,
9058,
13,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
6941,
62,
9122,
13,
198,
220,
220,
220,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
2617,
62,
9122,
7,
6941,
62,
9122,
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,
40406,
628,
220,
337,
36252,
10784,
62,
11748,
13,
198,
220,
220,
220,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
39344,
62,
11748,
7,
6941,
62,
9122,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
8298,
62,
486,
13,
198,
9,
796,
2559,
855,
628,
220,
220,
220,
4808,
8189,
705,
46506,
311,
2751,
2538,
275,
3672,
16034,
514,
81,
2999,
39319,
300,
85,
62,
65,
3672,
2637,
13,
628,
220,
220,
220,
13845,
62,
20274,
796,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
9122,
7,
45079,
62,
8189,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
705,
8298,
6,
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,
719,
796,
13845,
62,
20274,
12,
8189,
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,
9288,
16,
628,
220,
337,
36252,
1332,
8298,
62,
2999,
13,
198,
9,
796,
2559,
855,
628,
220,
220,
220,
16876,
6941,
62,
9122,
3784,
15999,
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,
4808,
8189,
705,
46506,
311,
2751,
2538,
275,
3672,
16034,
514,
81,
2999,
39319,
2488,
6780,
62,
65,
3672,
2637,
13,
628,
220,
220,
220,
13845,
62,
20274,
796,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
9122,
7,
45079,
62,
8189,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
36733,
7,
13845,
62,
20274,
12,
8189,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
8298,
62,
3070,
13,
198,
9,
796,
2559,
855,
628,
220,
220,
220,
16876,
6941,
62,
9122,
3784,
15999,
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,
4808,
8189,
705,
46506,
311,
2751,
2538,
22944,
2318,
39319,
4275,
27,
7278,
62,
7890,
29,
12,
21943,
11,
2488,
27,
7278,
62,
7890,
29,
12,
5657,
8,
16034,
1976,
21943,
2637,
13,
628,
220,
220,
220,
13845,
62,
20274,
796,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
9122,
7,
45079,
62,
8189,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
36733,
7,
13845,
62,
20274,
12,
8189,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
8298,
62,
3023,
13,
198,
9,
796,
2559,
855,
628,
220,
220,
220,
16876,
6941,
62,
9122,
3784,
15999,
7,
1267,
796,
450,
499,
62,
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
] |
FUNCTION zadu_transport_update_imp_time.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IMPORT_TIME_UPDATES) TYPE ZADU_T_CHKTR_IMTIM_UPDATE
*"----------------------------------------------------------------------
DATA: database_data TYPE zadu_chktr_imtim.
LOOP AT import_time_updates REFERENCE INTO DATA(import_time_update).
database_data = import_time_update->*.
CASE import_time_update->crud_ind.
WHEN zif_adu_constants=>crud-create.
INSERT zadu_chktr_imtim FROM @database_data.
IF sy-subrc <> 0.
MESSAGE ID zcx_adu_check_transport=>error_insert_table-msgid
TYPE 'X'
NUMBER zcx_adu_check_transport=>error_insert_table-msgno
WITH |{ database_data-run_code }{ database_data-sequence }| 'ZADU_CHKTR_IMTIM'.
ENDIF.
WHEN zif_adu_constants=>crud-update.
UPDATE zadu_chktr_imtim FROM @database_data.
IF sy-subrc <> 0.
MESSAGE ID zcx_adu_check_transport=>error_update_table-msgid
TYPE 'X'
NUMBER zcx_adu_check_transport=>error_update_table-msgno
WITH |{ database_data-run_code }{ database_data-sequence }| 'ZADU_CHKTR_IMTIM'.
ENDIF.
WHEN zif_adu_constants=>crud-delete.
DELETE zadu_chktr_imtim FROM @database_data.
IF sy-subrc <> 0.
MESSAGE ID zcx_adu_check_transport=>error_delete_table-msgid
TYPE 'X'
NUMBER zcx_adu_check_transport=>error_delete_table-msgno
WITH |{ database_data-run_code }{ database_data-sequence }| 'ZADU_CHKTR_IMTIM'.
ENDIF.
ENDCASE.
ENDLOOP.
ENDFUNCTION.
| [
42296,
4177,
2849,
1976,
324,
84,
62,
7645,
634,
62,
19119,
62,
11011,
62,
2435,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
26173,
8924,
7,
3955,
15490,
62,
34694,
62,
52,
5760,
29462,
8,
41876,
220,
1168,
2885,
52,
62,
51,
62,
3398,
42,
5446,
62,
3955,
51,
3955,
62,
16977,
198,
9,
1,
10097,
23031,
628,
220,
42865,
25,
6831,
62,
7890,
41876,
1976,
324,
84,
62,
354,
74,
2213,
62,
320,
16514,
13,
628,
220,
17579,
3185,
5161,
1330,
62,
2435,
62,
929,
19581,
4526,
24302,
18310,
39319,
42865,
7,
11748,
62,
2435,
62,
19119,
737,
628,
220,
220,
220,
6831,
62,
7890,
796,
1330,
62,
2435,
62,
19119,
3784,
24620,
628,
220,
220,
220,
42001,
1330,
62,
2435,
62,
19119,
3784,
6098,
463,
62,
521,
13,
198,
220,
220,
220,
220,
220,
42099,
1976,
361,
62,
324,
84,
62,
9979,
1187,
14804,
6098,
463,
12,
17953,
13,
198,
220,
220,
220,
220,
220,
220,
220,
29194,
17395,
1976,
324,
84,
62,
354,
74,
2213,
62,
320,
16514,
16034,
2488,
48806,
62,
7890,
13,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
4522,
1976,
66,
87,
62,
324,
84,
62,
9122,
62,
7645,
634,
14804,
18224,
62,
28463,
62,
11487,
12,
19662,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
705,
55,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36871,
13246,
1976,
66,
87,
62,
324,
84,
62,
9122,
62,
7645,
634,
14804,
18224,
62,
28463,
62,
11487,
12,
19662,
3919,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
930,
90,
6831,
62,
7890,
12,
5143,
62,
8189,
1782,
90,
6831,
62,
7890,
12,
43167,
1782,
91,
705,
57,
2885,
52,
62,
3398,
42,
5446,
62,
3955,
51,
3955,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
42099,
1976,
361,
62,
324,
84,
62,
9979,
1187,
14804,
6098,
463,
12,
19119,
13,
198,
220,
220,
220,
220,
220,
220,
220,
35717,
1976,
324,
84,
62,
354,
74,
2213,
62,
320,
16514,
16034,
2488,
48806,
62,
7890,
13,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
4522,
1976,
66,
87,
62,
324,
84,
62,
9122,
62,
7645,
634,
14804,
18224,
62,
19119,
62,
11487,
12,
19662,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
705,
55,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36871,
13246,
1976,
66,
87,
62,
324,
84,
62,
9122,
62,
7645,
634,
14804,
18224,
62,
19119,
62,
11487,
12,
19662,
3919,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
930,
90,
6831,
62,
7890,
12,
5143,
62,
8189,
1782,
90,
6831,
62,
7890,
12,
43167,
1782,
91,
705,
57,
2885,
52,
62,
3398,
42,
5446,
62,
3955,
51,
3955,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
42099,
1976,
361,
62,
324,
84,
62,
9979,
1187,
14804,
6098,
463,
12,
33678,
13,
198,
220,
220,
220,
220,
220,
220,
220,
5550,
2538,
9328,
1976,
324,
84,
62,
354,
74,
2213,
62,
320,
16514,
16034,
2488,
48806,
62,
7890,
13,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
4522,
1976,
66,
87,
62,
324,
84,
62,
9122,
62,
7645,
634,
14804,
18224,
62,
33678,
62,
11487,
12,
19662,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
705,
55,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36871,
13246,
1976,
66,
87,
62,
324,
84,
62,
9122,
62,
7645,
634,
14804,
18224,
62,
33678,
62,
11487,
12,
19662,
3919,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
930,
90,
6831,
62,
7890,
12,
5143,
62,
8189,
1782,
90,
6831,
62,
7890,
12,
43167,
1782,
91,
705,
57,
2885,
52,
62,
3398,
42,
5446,
62,
3955,
51,
3955,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
23578,
34,
11159,
13,
628,
220,
23578,
21982,
3185,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
class /OOP/CL_REQUEST definition
public
inheriting from /OOP/CL_OBJECT
final
create public .
public section.
*"* public components of class /OOP/CL_REQUEST
*"* do not include other source files here!!!
interfaces /OOP/IF_REQUEST .
aliases GET_BODY_BINARY
for /OOP/IF_REQUEST~GET_BODY_BINARY .
aliases GET_BODY_TEXT
for /OOP/IF_REQUEST~GET_BODY_TEXT .
aliases GET_CONTENT_TYPE
for /OOP/IF_REQUEST~GET_CONTENT_TYPE .
aliases GET_HEADER
for /OOP/IF_REQUEST~GET_HEADER .
aliases GET_METHOD
for /OOP/IF_REQUEST~GET_METHOD .
aliases GET_PARAMETER
for /OOP/IF_REQUEST~GET_PARAMETER .
aliases GET_RAW_MESSAGE
for /OOP/IF_REQUEST~GET_RAW_MESSAGE .
aliases GET_REQUESTURI
for /OOP/IF_REQUEST~GET_REQUESTURI .
aliases LIST_HEADERS
for /OOP/IF_REQUEST~LIST_HEADERS .
aliases LIST_PARAMETERS
for /OOP/IF_REQUEST~LIST_PARAMETERS .
methods CONSTRUCTOR
importing
!REQUEST type ref to IF_HTTP_REQUEST .
protected section.
*"* protected components of class /OOP/CL_REQUEST
*"* do not include other source files here!!!
private section.
*"* private components of class /OOP/CL_REQUEST
*"* do not include other source files here!!!
data REQUEST type ref to IF_HTTP_REQUEST .
ENDCLASS.
CLASS /OOP/CL_REQUEST IMPLEMENTATION.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~GET_BODY_BINARY
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RETURNING TYPE XSTRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~get_body_binary.
*/**
* Retrieves the body of the request as binary data.
*/
returning = me->request->get_data( ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~GET_BODY_TEXT
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RETURNING TYPE STRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~get_body_text.
*/**
* Retrieves the body of the request as a string.
*/
returning = me->request->get_cdata( ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~GET_CONTENT_TYPE
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RETURNING TYPE STRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~get_content_type.
*/**
* Returns the MIME type of the body of the request, or null if the type is not known.
*/
returning = me->request->get_content_type( ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~GET_HEADER
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [<-()] RETURNING TYPE STRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~get_header.
*/**
* Returns the value of the specified request header
* as a string. If the request did not include a header
* of the specified name, this method returns null.
*/
returning = me->request->get_header_field( name ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~GET_METHOD
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RETURNING TYPE STRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~get_method.
*/**
* Returns the name of the HTTP method with which this request was made,
* for example, GET, POST, or PUT.
*/
returning = me->request->if_http_entity~get_header_field( '~request_method' ).
" returning = me->request->get_method( ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~GET_PARAMETER
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [<-()] RETURNING TYPE STRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~get_parameter.
*/**
* Returns the value of a request parameter as a String,
* or null if the parameter does not exist.
* Request parameters are extra information sent with the request.
*/
returning = me->request->get_form_field_cs( name ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~GET_RAW_MESSAGE
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RETURNING TYPE XSTRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~get_raw_message.
returning = me->request->get_raw_message( ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~GET_REQUESTURI
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RETURNING TYPE STRING
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~get_requesturi.
*/**
* Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.
* Examples:
* First line of HTTP request Returned Value
* POST /some/path.html HTTP/1.1 /some/path.html
* GET http://foo.bar/a.html HTTP/1.0 /a.html
* HEAD /xyz?a=b HTTP/1.1 /xyz
*/
returning = me->request->get_header_field( '~path_info' ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~LIST_HEADERS
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RETURNING TYPE TIHTTPNVP
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~list_headers.
*/**
* Returns all request headers
*/
me->request->get_header_fields( changing fields = returning ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->/OOP/IF_REQUEST~LIST_PARAMETERS
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RETURNING TYPE TIHTTPNVP
* +--------------------------------------------------------------------------------------</SIGNATURE>
method /oop/if_request~list_parameters.
*/**
* Returns all request parameters
*/
me->request->get_form_fields_cs( changing fields = returning ).
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method /OOP/CL_REQUEST->CONSTRUCTOR
* +-------------------------------------------------------------------------------------------------+
* | [--->] REQUEST TYPE REF TO IF_HTTP_REQUEST
* +--------------------------------------------------------------------------------------</SIGNATURE>
method constructor.
super->constructor( ).
me->request = request.
endmethod.
ENDCLASS.
| [
4871,
1220,
46,
3185,
14,
5097,
62,
2200,
35780,
6770,
201,
198,
220,
1171,
201,
198,
220,
10639,
1780,
422,
1220,
46,
3185,
14,
5097,
62,
9864,
23680,
201,
198,
220,
2457,
201,
198,
220,
2251,
1171,
764,
201,
198,
201,
198,
11377,
2665,
13,
201,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1220,
46,
3185,
14,
5097,
62,
2200,
35780,
201,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
201,
198,
201,
198,
220,
20314,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
764,
201,
198,
201,
198,
220,
47217,
17151,
62,
33,
33076,
62,
33,
1268,
13153,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
33,
33076,
62,
33,
1268,
13153,
764,
201,
198,
220,
47217,
17151,
62,
33,
33076,
62,
32541,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
33,
33076,
62,
32541,
764,
201,
198,
220,
47217,
17151,
62,
37815,
3525,
62,
25216,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
37815,
3525,
62,
25216,
764,
201,
198,
220,
47217,
17151,
62,
37682,
1137,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
37682,
1137,
764,
201,
198,
220,
47217,
17151,
62,
49273,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
49273,
764,
201,
198,
220,
47217,
17151,
62,
27082,
2390,
2767,
1137,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
27082,
2390,
2767,
1137,
764,
201,
198,
220,
47217,
17151,
62,
20530,
62,
44,
1546,
4090,
8264,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
20530,
62,
44,
1546,
4090,
8264,
764,
201,
198,
220,
47217,
17151,
62,
2200,
35780,
47269,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
2200,
35780,
47269,
764,
201,
198,
220,
47217,
39498,
62,
37682,
4877,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
45849,
62,
37682,
4877,
764,
201,
198,
220,
47217,
39498,
62,
27082,
2390,
2767,
4877,
201,
198,
220,
220,
220,
329,
1220,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
45849,
62,
27082,
2390,
2767,
4877,
764,
201,
198,
201,
198,
220,
5050,
7102,
46126,
1581,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
2200,
35780,
2099,
1006,
284,
16876,
62,
40717,
62,
2200,
35780,
764,
201,
198,
24326,
2665,
13,
201,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1220,
46,
3185,
14,
5097,
62,
2200,
35780,
201,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
201,
198,
19734,
2665,
13,
201,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1220,
46,
3185,
14,
5097,
62,
2200,
35780,
201,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
201,
198,
201,
198,
220,
1366,
4526,
35780,
2099,
1006,
284,
16876,
62,
40717,
62,
2200,
35780,
764,
201,
198,
10619,
31631,
13,
201,
198,
201,
198,
201,
198,
201,
198,
31631,
1220,
46,
3185,
14,
5097,
62,
2200,
35780,
30023,
2538,
10979,
6234,
13,
201,
198,
201,
198,
201,
198,
9,
1279,
46224,
40086,
29,
10097,
19351,
6329,
10,
201,
198,
9,
930,
2262,
590,
5094,
11789,
1220,
46,
3185,
14,
5097,
62,
2200,
35780,
3784,
14,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
33,
33076,
62,
33,
1268,
13153,
201,
198,
9,
1343,
10097,
3880,
19529,
201,
198,
9,
930,
685,
27,
12,
3419,
60,
30826,
4261,
15871,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
220,
220,
220,
220,
220,
220,
220,
1395,
18601,
2751,
201,
198,
9,
1343,
10097,
19351,
438,
3556,
46224,
40086,
29,
201,
198,
24396,
1220,
11224,
14,
361,
62,
25927,
93,
1136,
62,
2618,
62,
39491,
13,
201,
198,
16208,
1174,
201,
198,
9,
4990,
5034,
1158,
262,
1767,
286,
262,
2581,
355,
13934,
1366,
13,
201,
198,
16208,
201,
198,
220,
8024,
796,
502,
3784,
25927,
3784,
1136,
62,
7890,
7,
6739,
201,
198,
437,
24396,
13,
201,
198,
201,
198,
201,
198,
9,
1279,
46224,
40086,
29,
10097,
19351,
6329,
10,
201,
198,
9,
930,
2262,
590,
5094,
11789,
1220,
46,
3185,
14,
5097,
62,
2200,
35780,
3784,
14,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
33,
33076,
62,
32541,
201,
198,
9,
1343,
10097,
3880,
19529,
201,
198,
9,
930,
685,
27,
12,
3419,
60,
30826,
4261,
15871,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
220,
220,
220,
220,
220,
220,
220,
19269,
2751,
201,
198,
9,
1343,
10097,
19351,
438,
3556,
46224,
40086,
29,
201,
198,
24396,
1220,
11224,
14,
361,
62,
25927,
93,
1136,
62,
2618,
62,
5239,
13,
201,
198,
16208,
1174,
201,
198,
9,
4990,
5034,
1158,
262,
1767,
286,
262,
2581,
355,
257,
4731,
13,
201,
198,
16208,
201,
198,
220,
8024,
796,
502,
3784,
25927,
3784,
1136,
62,
66,
7890,
7,
6739,
201,
198,
437,
24396,
13,
201,
198,
201,
198,
201,
198,
9,
1279,
46224,
40086,
29,
10097,
19351,
6329,
10,
201,
198,
9,
930,
2262,
590,
5094,
11789,
1220,
46,
3185,
14,
5097,
62,
2200,
35780,
3784,
14,
46,
3185,
14,
5064,
62,
2200,
35780,
93,
18851,
62,
37815,
3525,
62,
25216,
201,
198,
9,
1343,
10097,
3880,
19529,
201,
198,
9,
930,
685,
27,
12,
3419,
60,
30826,
4261,
15871,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
220,
220,
220,
220,
220,
220,
220,
19269,
2751,
201,
198,
9,
1343,
10097,
19351,
438,
3556,
46224,
40086,
29,
201,
198,
24396,
1220,
11224,
14,
361,
62,
25927,
93,
1136,
62,
11299,
62,
4906,
13,
201,
198,
16208,
1174,
201,
198,
9,
16409,
262,
337,
12789,
2099
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
FUNCTION zpof_gtt_ee_po_item_conf_rel.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_APPSYS) TYPE /SAPTRX/APPLSYSTEM
*" REFERENCE(I_EVENT_TYPES) TYPE /SAPTRX/EVTYPES
*" REFERENCE(I_ALL_APPL_TABLES) TYPE TRXAS_TABCONTAINER
*" REFERENCE(I_EVENTTYPE_TAB) TYPE TRXAS_EVENTTYPE_TABS_WA
*" REFERENCE(I_EVENT) TYPE TRXAS_EVT_CTAB_WA
*" EXPORTING
*" VALUE(E_RESULT) LIKE SY-BINPT
*" TABLES
*" C_LOGTABLE STRUCTURE BAPIRET2 OPTIONAL
*" EXCEPTIONS
*" PARAMETER_ERROR
*" RELEVANCE_DETERM_ERROR
*" STOP_PROCESSING
*"----------------------------------------------------------------------
DATA: lo_udm_message TYPE REF TO cx_udm_message,
ls_bapiret TYPE bapiret2.
TRY.
e_result = lcl_ae_performer=>check_relevance(
EXPORTING
is_definition = VALUE #(
maintab = lif_app_constants=>cs_tabledef-po_item_new
mastertab = lif_app_constants=>cs_tabledef-po_header_new )
io_ae_factory = NEW lcl_ae_factory_po_item_conf( )
iv_appsys = i_appsys
is_event_type = i_event_types
it_all_appl_tables = i_all_appl_tables
is_events = i_event
).
CATCH cx_udm_message INTO lo_udm_message.
lcl_tools=>get_errors_log(
EXPORTING
io_umd_message = lo_udm_message
iv_appsys = i_appsys
IMPORTING
es_bapiret = ls_bapiret ).
" add error message
APPEND ls_bapiret TO c_logtable.
" throw corresponding exception
CASE lo_udm_message->textid.
WHEN lif_ef_constants=>cs_errors-stop_processing.
RAISE stop_processing.
WHEN lif_ef_constants=>cs_errors-table_determination.
RAISE relevance_determ_error.
ENDCASE.
ENDTRY.
ENDFUNCTION.
| [
42296,
4177,
2849,
1976,
79,
1659,
62,
70,
926,
62,
1453,
62,
7501,
62,
9186,
62,
10414,
62,
2411,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
2969,
3705,
16309,
8,
41876,
220,
1220,
50,
2969,
5446,
55,
14,
2969,
6489,
23060,
25361,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
20114,
3525,
62,
9936,
47,
1546,
8,
41876,
220,
1220,
50,
2969,
5446,
55,
14,
20114,
9936,
47,
1546,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
7036,
62,
2969,
6489,
62,
5603,
9148,
1546,
8,
41876,
220,
7579,
55,
1921,
62,
5603,
2749,
1340,
30339,
1137,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
20114,
3525,
25216,
62,
5603,
33,
8,
41876,
220,
7579,
55,
1921,
62,
20114,
3525,
25216,
62,
5603,
4462,
62,
15543,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
40,
62,
20114,
3525,
8,
41876,
220,
7579,
55,
1921,
62,
20114,
51,
62,
4177,
6242,
62,
15543,
198,
9,
1,
220,
7788,
15490,
2751,
198,
9,
1,
220,
220,
220,
220,
26173,
8924,
7,
36,
62,
19535,
16724,
8,
34178,
220,
19704,
12,
33,
1268,
11571,
198,
9,
1,
220,
309,
6242,
28378,
198,
9,
1,
220,
220,
220,
220,
220,
327,
62,
25294,
38148,
19269,
18415,
11335,
220,
347,
17614,
26087,
17,
39852,
2849,
1847,
198,
9,
1,
220,
7788,
42006,
11053,
198,
9,
1,
220,
220,
220,
220,
220,
29463,
2390,
2767,
1137,
62,
24908,
198,
9,
1,
220,
220,
220,
220,
220,
49968,
53,
19240,
62,
35,
2767,
1137,
44,
62,
24908,
198,
9,
1,
220,
220,
220,
220,
220,
44934,
62,
4805,
4503,
7597,
2751,
198,
9,
1,
10097,
23031,
198,
220,
42865,
25,
2376,
62,
463,
76,
62,
20500,
41876,
4526,
37,
5390,
43213,
62,
463,
76,
62,
20500,
11,
198,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
65,
499,
557,
83,
220,
220,
220,
220,
41876,
275,
499,
557,
83,
17,
13,
628,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
304,
62,
20274,
220,
796,
300,
565,
62,
3609,
62,
525,
16354,
14804,
9122,
62,
260,
2768,
590,
7,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
46758,
220,
220,
220,
220,
220,
220,
796,
26173,
8924,
1303,
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,
220,
220,
220,
220,
1388,
8658,
220,
220,
796,
3868,
62,
1324,
62,
9979,
1187,
14804,
6359,
62,
83,
4510,
891,
12,
7501,
62,
9186,
62,
3605,
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,
4958,
8658,
796,
3868,
62,
1324,
62,
9979,
1187,
14804,
6359,
62,
83,
4510,
891,
12,
7501,
62,
25677,
62,
3605,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
3609,
62,
69,
9548,
220,
220,
220,
220,
220,
220,
796,
12682,
300,
565,
62,
3609,
62,
69,
9548,
62,
7501,
62,
9186,
62,
10414,
7,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1324,
17597,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
1312,
62,
1324,
17597,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
15596,
62,
4906,
220,
220,
220,
220,
220,
220,
796,
1312,
62,
15596,
62,
19199,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
340,
62,
439,
62,
1324,
75,
62,
83,
2977,
220,
796,
1312,
62,
439,
62,
1324,
75,
62,
83,
2977,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
31534,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
1312,
62,
15596,
198,
220,
220,
220,
220,
220,
6739,
628,
220,
220,
220,
327,
11417,
43213,
62,
463,
76,
62,
20500,
39319,
2376,
62,
463,
76,
62,
20500,
13,
198,
220,
220,
220,
220,
220,
300,
565,
62,
31391,
14804,
1136,
62,
48277,
62,
6404,
7,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
388,
67,
62,
20500,
796,
2376,
62,
463,
76,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1324,
17597,
220,
220,
220,
220,
220,
796,
1312,
62,
1324,
17597,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1658,
62,
65,
499,
557,
83,
220,
220,
220,
220,
796,
43979,
62,
65,
499,
557,
83,
6739,
628,
220,
220,
220,
220,
220,
366,
751,
4049,
3275,
198,
220,
220,
220,
220,
220,
43504,
10619,
43979,
62,
65,
499,
557,
83,
5390,
269,
62,
6404,
11487,
13,
628,
220,
220,
220,
220,
220,
366,
3714,
11188,
6631,
198,
220,
220,
220,
220,
220,
42001,
2376,
62,
463,
76,
62,
20500,
3784,
5239,
312,
13,
198,
220,
220,
220,
220,
220,
220,
220,
42099,
3868,
62,
891,
62,
9979,
1187,
14804,
6359,
62,
48277,
12,
11338,
62,
36948,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
24352,
2245,
62,
36948,
13,
198,
220,
220,
220,
220,
220,
220,
220,
42099,
3868,
62,
891,
62,
9979,
1187,
14804,
6359,
62,
48277,
12,
11487,
62,
40869,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
24352,
23082,
62,
67,
2357,
76,
62,
18224,
13,
198,
220,
220,
220,
220,
220,
23578,
34,
11159,
13,
198,
220,
23578,
40405,
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,
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
] |
CLASS kernel_unit_runner DEFINITION PUBLIC.
PUBLIC SECTION.
* as of now, only global classes with local testclasses are supported
TYPES: BEGIN OF ty_input_item,
class_name TYPE c LENGTH 30,
testclass_name TYPE c LENGTH 30,
method_name TYPE c LENGTH 30,
END OF ty_input_item.
TYPES ty_input TYPE STANDARD TABLE OF ty_input_item WITH DEFAULT KEY.
TYPES ty_status TYPE string.
CONSTANTS: BEGIN OF gc_status,
success TYPE ty_status VALUE 'SUCCESS',
failed TYPE ty_status VALUE 'FAILED',
skipped TYPE ty_status VALUE 'SKIPPED',
END OF gc_status.
TYPES BEGIN OF ty_result_item.
INCLUDE TYPE ty_input_item.
TYPES: expected TYPE string,
actual TYPE string,
status TYPE ty_status,
runtime TYPE i,
message TYPE string,
js_location TYPE string,
END OF ty_result_item.
TYPES: BEGIN OF ty_result,
list TYPE STANDARD TABLE OF ty_result_item WITH DEFAULT KEY,
json TYPE string,
END OF ty_result.
CLASS-METHODS run
IMPORTING
it_input TYPE ty_input
RETURNING
VALUE(rs_result) TYPE ty_result.
PRIVATE SECTION.
TYPES: BEGIN OF ty_class_item,
class_name TYPE c LENGTH 30,
testclass_name TYPE c LENGTH 30,
END OF ty_class_item.
TYPES ty_classes TYPE STANDARD TABLE OF ty_class_item WITH DEFAULT KEY.
CLASS-METHODS unique_classes
IMPORTING
it_input TYPE ty_input
RETURNING
VALUE(rt_classes) TYPE ty_classes.
CLASS-METHODS to_json
IMPORTING it_list TYPE ty_result-list
RETURNING VALUE(rv_json) TYPE string.
CLASS-METHODS get_location
IMPORTING ix_error TYPE REF TO cx_root
RETURNING VALUE(rv_location) TYPE string.
ENDCLASS.
CLASS kernel_unit_runner IMPLEMENTATION.
METHOD get_location.
DATA lv_stack TYPE string.
DATA lt_lines TYPE STANDARD TABLE OF string WITH DEFAULT KEY.
DATA lv_found TYPE abap_bool.
WRITE '@KERNEL lv_stack.set(INPUT.ix_error.get().stack);'.
SPLIT lv_stack AT |\n| INTO TABLE lt_lines.
* find whatever comes after "cl_abap_unit_assert"
LOOP AT lt_lines INTO lv_stack.
IF lv_stack CP '*cl_abap_unit_assert*'.
lv_found = abap_true.
CONTINUE.
ELSEIF lv_found = abap_true.
REPLACE FIRST OCCURRENCE OF |at | IN lv_stack WITH ''.
rv_location = condense( lv_stack ).
EXIT.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD to_json.
* would like to keep the dependencies of this class minimal,
* so not using CALL TRANSFORMATION or any other ABAP classes
DATA ls_list LIKE LINE OF it_list.
DATA lt_strings TYPE STANDARD TABLE OF string WITH DEFAULT KEY.
DATA lv_string LIKE LINE OF lt_strings.
DATA lv_message TYPE string.
LOOP AT it_list INTO ls_list.
lv_message = ls_list-message.
REPLACE ALL OCCURENCES OF |"| IN lv_message WITH |\"|.
lv_string = |\{"class_name": "{ ls_list-class_name
}","testclass_name": "{ ls_list-testclass_name
}","method_name": "{ ls_list-method_name
}","expected": "{ ls_list-expected
}","actual": "{ ls_list-actual
}","status": "{ ls_list-status
}","runtime": { ls_list-runtime
},"message": "{ lv_message
}","js_location": "{ ls_list-js_location }"\}|.
APPEND lv_string TO lt_strings.
ENDLOOP.
CONCATENATE LINES OF lt_strings INTO rv_json SEPARATED BY ','.
rv_json = '[' && rv_json && ']'.
ENDMETHOD.
METHOD unique_classes.
DATA ls_input LIKE LINE OF it_input.
DATA ls_class LIKE LINE OF rt_classes.
LOOP AT it_input INTO ls_input.
MOVE-CORRESPONDING ls_input TO ls_class.
INSERT ls_class INTO TABLE rt_classes.
ENDLOOP.
SORT rt_classes.
DELETE ADJACENT DUPLICATES FROM rt_classes.
ENDMETHOD.
METHOD run.
DATA ls_input LIKE LINE OF it_input.
DATA lv_time TYPE i.
DATA lo_obj TYPE REF TO object.
DATA lv_name TYPE string.
DATA lt_classes TYPE ty_classes.
DATA ls_class LIKE LINE OF lt_classes.
DATA lx_root TYPE REF TO cx_root.
DATA lx_assert TYPE REF TO kernel_cx_assert.
FIELD-SYMBOLS <ls_result> LIKE LINE OF rs_result-list.
* todo, respect quit level, default = method?
lt_classes = unique_classes( it_input ).
LOOP AT lt_classes INTO ls_class.
* this is special, and must match the runtime:
lv_name = |CLAS-{ ls_class-class_name }-{ ls_class-testclass_name }|.
CREATE OBJECT lo_obj TYPE (lv_name).
TRY.
CALL METHOD lo_obj->('CLASS_SETUP').
CATCH cx_sy_dyn_call_illegal_method.
ENDTRY.
LOOP AT it_input INTO ls_input WHERE class_name = ls_class-class_name AND testclass_name = ls_class-testclass_name.
APPEND INITIAL LINE TO rs_result-list ASSIGNING <ls_result>.
MOVE-CORRESPONDING ls_input TO <ls_result>.
TRY.
CALL METHOD lo_obj->('SETUP').
CATCH cx_sy_dyn_call_illegal_method.
ENDTRY.
GET RUN TIME FIELD lv_time.
TRY.
CALL METHOD lo_obj->(ls_input-method_name).
<ls_result>-status = gc_status-success.
CATCH kernel_cx_assert INTO lx_assert.
<ls_result>-status = gc_status-failed.
<ls_result>-actual = lx_assert->actual.
<ls_result>-expected = lx_assert->expected.
<ls_result>-message = lx_assert->message.
<ls_result>-js_location = get_location( lx_assert ).
CATCH cx_root INTO lx_root.
<ls_result>-status = gc_status-failed.
<ls_result>-message = |Some exception raised|. " todo, use RTTI to find the class name?
<ls_result>-js_location = get_location( lx_root ).
ENDTRY.
GET RUN TIME FIELD lv_time.
<ls_result>-runtime = lv_time.
TRY.
CALL METHOD lo_obj->('TEARDOWN').
CATCH cx_sy_dyn_call_illegal_method.
ENDTRY.
ENDLOOP.
TRY.
CALL METHOD lo_obj->('CLASS_TEARDOWN').
CATCH cx_sy_dyn_call_illegal_method.
ENDTRY.
ENDLOOP.
rs_result-json = to_json( rs_result-list ).
ENDMETHOD.
ENDCLASS. | [
31631,
9720,
62,
20850,
62,
16737,
5550,
20032,
17941,
44731,
13,
198,
220,
44731,
44513,
13,
198,
9,
355,
286,
783,
11,
691,
3298,
6097,
351,
1957,
1332,
37724,
389,
4855,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
15414,
62,
9186,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1398,
62,
3672,
220,
220,
220,
220,
41876,
269,
406,
49494,
1542,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1332,
4871,
62,
3672,
41876,
269,
406,
49494,
1542,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2446,
62,
3672,
220,
220,
220,
41876,
269,
406,
49494,
1542,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
15414,
62,
9186,
13,
198,
220,
220,
220,
24412,
47,
1546,
1259,
62,
15414,
41876,
49053,
9795,
43679,
3963,
1259,
62,
15414,
62,
9186,
13315,
5550,
38865,
35374,
13,
628,
220,
220,
220,
24412,
47,
1546,
1259,
62,
13376,
41876,
4731,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
347,
43312,
3963,
308,
66,
62,
13376,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1943,
41876,
1259,
62,
13376,
26173,
8924,
705,
12564,
4093,
7597,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4054,
220,
41876,
1259,
62,
13376,
26173,
8924,
705,
7708,
4146,
1961,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26684,
41876,
1259,
62,
13376,
26173,
8924,
705,
18831,
31444,
1961,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
308,
66,
62,
13376,
13,
628,
220,
220,
220,
24412,
47,
1546,
347,
43312,
3963,
1259,
62,
20274,
62,
9186,
13,
198,
220,
220,
220,
3268,
5097,
52,
7206,
41876,
1259,
62,
15414,
62,
9186,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
2938,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4036,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3722,
220,
220,
220,
220,
220,
41876,
1259,
62,
13376,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19124,
220,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3275,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44804,
62,
24886,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
20274,
62,
9186,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
20274,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
41876,
49053,
9795,
43679,
3963,
1259,
62,
20274,
62,
9186,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33918,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
20274,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
1057,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
15414,
41876,
1259,
62,
15414,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
20274,
8,
41876,
1259,
62,
20274,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
4871,
62,
9186,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1398,
62,
3672,
220,
220,
220,
220,
41876,
269,
406,
49494,
1542,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1332,
4871,
62,
3672,
41876,
269,
406,
49494,
1542,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
4871,
62,
9186,
13,
198,
220,
220,
220,
24412,
47,
1546,
1259,
62,
37724,
41876,
49053,
9795,
43679,
3963,
1259,
62,
4871,
62,
9186,
13315,
5550,
38865,
35374,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
3748,
62,
37724,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
340,
62,
15414,
41876,
1259,
62,
15414,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
37724,
8,
41876,
1259,
62,
37724,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
284,
62,
17752,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
340,
62,
4868,
41876,
1259,
62,
20274,
12,
4868,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
17752,
8,
41876,
4731,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
24886,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
220,
844,
62,
18224,
41876,
4526,
37,
5390,
43213,
62,
15763,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
24886,
8,
41876,
4731,
13,
198,
10619,
31631,
13,
198,
198,
31631,
9720,
62,
20850,
62,
16737,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
651,
62,
24886,
13,
198,
220,
220,
220,
42865,
300,
85,
62,
25558,
41876,
4731,
13,
198,
220,
220,
220,
42865,
300,
83,
62,
6615,
41876,
49053,
9795,
43679,
3963,
4731,
13315,
5550,
38865,
35374,
13,
198,
220,
220,
220,
42865,
300,
85,
62,
9275,
41876,
450,
499,
62,
30388,
13,
198,
220,
220,
220,
44423,
705,
31,
42,
28778,
3698,
300,
85,
62,
25558,
13,
2617,
7,
1268,
30076,
13,
844,
62,
18224,
13,
1136,
22446,
25558,
1776,
4458,
198,
220,
220,
220,
46341,
2043,
300,
85,
62,
25558,
5161,
930,
59,
77,
91,
39319,
43679,
300,
83,
62,
6615,
13,
198,
9,
1064,
4232,
2058,
706
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
INTERFACE zif_abapgit_log
PUBLIC .
METHODS add
IMPORTING
!iv_msg TYPE csequence
!iv_type TYPE symsgty DEFAULT 'E'
!iv_rc TYPE balsort OPTIONAL .
METHODS add_error
IMPORTING
!iv_msg TYPE csequence .
METHODS add_info
IMPORTING
!iv_msg TYPE csequence .
METHODS add_warning
IMPORTING
!iv_msg TYPE csequence .
METHODS clear .
METHODS count
RETURNING
VALUE(rv_count) TYPE i .
METHODS has_rc
IMPORTING
!iv_rc TYPE balsort
RETURNING
VALUE(rv_yes) TYPE abap_bool .
METHODS show
IMPORTING
!iv_header_text TYPE csequence DEFAULT 'Log' .
METHODS to_html
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
METHODS write .
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
397,
499,
18300,
62,
6404,
198,
220,
44731,
764,
628,
198,
220,
337,
36252,
50,
751,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
19662,
220,
41876,
269,
43167,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
41876,
827,
19662,
774,
5550,
38865,
705,
36,
6,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6015,
220,
220,
41876,
275,
874,
419,
39852,
2849,
1847,
764,
198,
220,
337,
36252,
50,
751,
62,
18224,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
19662,
41876,
269,
43167,
764,
198,
220,
337,
36252,
50,
751,
62,
10951,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
19662,
41876,
269,
43167,
764,
198,
220,
337,
36252,
50,
751,
62,
43917,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
19662,
41876,
269,
43167,
764,
198,
220,
337,
36252,
50,
1598,
764,
198,
220,
337,
36252,
50,
954,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
9127,
8,
41876,
1312,
764,
198,
220,
337,
36252,
50,
468,
62,
6015,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6015,
220,
220,
220,
220,
220,
220,
220,
41876,
275,
874,
419,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
8505,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
337,
36252,
50,
905,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
25677,
62,
5239,
41876,
269,
43167,
5550,
38865,
705,
11187,
6,
764,
198,
220,
337,
36252,
50,
284,
62,
6494,
198,
220,
220,
220,
30826,
4261,
15871,
198,
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,
337,
36252,
50,
3551,
764,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_oapi_parser DEFINITION PUBLIC.
PUBLIC SECTION.
METHODS parse
IMPORTING iv_json TYPE string
RETURNING VALUE(rs_schema) TYPE zif_oapi_specification_v3=>ty_specification.
PRIVATE SECTION.
DATA mo_json TYPE REF TO zcl_oapi_json.
METHODS parse_operations
RETURNING VALUE(rt_operations) TYPE zif_oapi_specification_v3=>ty_operations.
METHODS parse_servers
RETURNING VALUE(rt_servers) TYPE zif_oapi_specification_v3=>ty_servers.
METHODS parse_parameters
IMPORTING iv_prefix TYPE string
RETURNING VALUE(rt_parameters) TYPE zif_oapi_specification_v3=>ty_parameters.
METHODS parse_parameters_ref
IMPORTING iv_prefix TYPE string
RETURNING VALUE(rt_parameters) TYPE string_table.
METHODS parse_responses
IMPORTING iv_prefix TYPE string
RETURNING VALUE(rt_responses) TYPE zif_oapi_specification_v3=>ty_responses.
METHODS parse_media_types
IMPORTING iv_prefix TYPE string
RETURNING VALUE(rt_media_types) TYPE zif_oapi_specification_v3=>ty_media_types.
METHODS parse_components
RETURNING VALUE(rs_components) TYPE zif_oapi_specification_v3=>ty_components.
METHODS parse_schema
IMPORTING iv_prefix TYPE string
RETURNING VALUE(ri_schema) TYPE REF TO zif_oapi_schema.
METHODS parse_schemas
IMPORTING iv_prefix TYPE string
RETURNING VALUE(rt_schemas) TYPE zif_oapi_specification_v3=>ty_schemas.
ENDCLASS.
CLASS zcl_oapi_parser IMPLEMENTATION.
METHOD parse.
CREATE OBJECT mo_json EXPORTING iv_json = iv_json.
rs_schema-openapi = mo_json->value_string( '/openapi' ).
ASSERT rs_schema-openapi CP '3*'.
rs_schema-info-title = mo_json->value_string( '/info/title' ).
rs_schema-info-version = mo_json->value_string( '/info/version' ).
rs_schema-info-description = mo_json->value_string( '/info/description' ).
rs_schema-operations = parse_operations( ).
rs_schema-servers = parse_servers( ).
rs_schema-components = parse_components( ).
ENDMETHOD.
METHOD parse_schema.
DATA lt_names TYPE string_table.
DATA lv_name TYPE string.
DATA ls_property TYPE zif_oapi_schema=>ty_property.
DATA lo_names TYPE REF TO zcl_oapi_abap_name.
CREATE OBJECT lo_names.
CREATE OBJECT ri_schema TYPE zcl_oapi_schema.
ri_schema->type = mo_json->value_string( iv_prefix && '/type' ).
IF ri_schema->type IS INITIAL.
ri_schema->type = 'string'. " todo, handle "oneOf" and "anyOf"
RETURN.
ENDIF.
ri_schema->default = mo_json->value_string( iv_prefix && '/default' ).
ri_schema->items_ref = mo_json->value_string( iv_prefix && '/items/$ref' ).
lt_names = mo_json->members( iv_prefix && '/properties/' ).
LOOP AT lt_names INTO lv_name.
CLEAR ls_property.
ls_property-name = lv_name.
ls_property-abap_name = lo_names->to_abap_name( lv_name ).
ls_property-ref = mo_json->value_string( iv_prefix && '/properties/' && lv_name && '/$ref' ).
IF ls_property-ref IS INITIAL.
ls_property-schema = parse_schema( iv_prefix && '/properties/' && lv_name ).
ENDIF.
APPEND ls_property TO ri_schema->properties.
ENDLOOP.
ENDMETHOD.
METHOD parse_components.
rs_components-parameters = parse_parameters( '/components/parameters/' ).
rs_components-schemas = parse_schemas( '/components/schemas/' ).
ENDMETHOD.
METHOD parse_schemas.
DATA lt_names TYPE string_table.
DATA lv_name TYPE string.
DATA ls_schema LIKE LINE OF rt_schemas.
DATA lo_names TYPE REF TO zcl_oapi_abap_name.
CREATE OBJECT lo_names.
lt_names = mo_json->members( iv_prefix ).
LOOP AT lt_names INTO lv_name.
CLEAR ls_schema.
ls_schema-name = lv_name.
ls_schema-abap_name = lo_names->to_abap_name( ls_schema-name ).
ls_schema-abap_parser_method = lo_names->to_abap_name( |parse_{ ls_schema-abap_name }| ).
ls_schema-schema = parse_schema( iv_prefix && lv_name ).
APPEND ls_schema TO rt_schemas.
ENDLOOP.
ENDMETHOD.
METHOD parse_servers.
DATA lt_array TYPE string_table.
DATA lv_index TYPE string.
DATA ls_server LIKE LINE OF rt_servers.
lt_array = mo_json->members( '/servers/' ).
LOOP AT lt_array INTO lv_index.
CLEAR ls_server.
ls_server-url = mo_json->value_string( '/servers/' && lv_index && '/url' ).
APPEND ls_server TO rt_servers.
ENDLOOP.
ENDMETHOD.
METHOD parse_operations.
DATA lt_paths TYPE string_table.
DATA lv_path LIKE LINE OF lt_paths.
DATA lt_methods TYPE string_table.
DATA lv_method LIKE LINE OF lt_methods.
DATA lv_prefix TYPE string.
DATA ls_operation LIKE LINE OF rt_operations.
DATA lo_names TYPE REF TO zcl_oapi_abap_name.
CREATE OBJECT lo_names.
lt_paths = mo_json->members( '/paths/' ).
LOOP AT lt_paths INTO lv_path.
CLEAR ls_operation.
ls_operation-path = lv_path.
lt_methods = mo_json->members( '/paths/' && lv_path && '/' ).
LOOP AT lt_methods INTO lv_method.
ls_operation-method = lv_method.
lv_prefix = '/paths/' && lv_path && '/' && lv_method.
ls_operation-summary = mo_json->value_string( lv_prefix && '/summary' ).
ls_operation-deprecated = mo_json->value_boolean( lv_prefix && '/deprecated' ).
ls_operation-description = mo_json->value_string( lv_prefix && '/description' ).
ls_operation-operation_id = mo_json->value_string( lv_prefix && '/operationId' ).
ls_operation-parameters = parse_parameters( lv_prefix && '/parameters/' ).
ls_operation-parameters_ref = parse_parameters_ref( lv_prefix && '/parameters/' ).
ls_operation-responses = parse_responses( lv_prefix && '/responses/' ).
ls_operation-abap_name = lo_names->to_abap_name( ls_operation-operation_id ).
IF ls_operation-abap_name IS INITIAL.
ls_operation-abap_name = lo_names->to_abap_name( ls_operation-summary ).
ENDIF.
IF ls_operation-abap_name IS INITIAL.
CONTINUE.
ENDIF.
ls_operation-body_schema_ref = mo_json->value_string( lv_prefix && '/requestBody/content/application/json/schema/$ref' ).
IF ls_operation-body_schema_ref IS INITIAL AND lines( mo_json->members( lv_prefix && '/requestBody/content/application/json/schema/' ) ) > 0.
ls_operation-body_schema = parse_schema( lv_prefix && '/requestBody/content/application/json/schema' ).
ENDIF.
APPEND ls_operation TO rt_operations.
ENDLOOP.
ENDLOOP.
ENDMETHOD.
METHOD parse_parameters.
DATA lt_members TYPE string_table.
DATA lv_member LIKE LINE OF lt_members.
DATA ls_parameter LIKE LINE OF rt_parameters.
DATA lo_names TYPE REF TO zcl_oapi_abap_name.
lt_members = mo_json->members( iv_prefix ).
LOOP AT lt_members INTO lv_member.
CLEAR ls_parameter.
ls_parameter-id = lv_member.
ls_parameter-name = mo_json->value_string( iv_prefix && lv_member && '/name' ).
IF ls_parameter-name IS NOT INITIAL.
ls_parameter-in = mo_json->value_string( iv_prefix && lv_member && '/in' ).
ls_parameter-description = mo_json->value_string( iv_prefix && lv_member && '/description' ).
ls_parameter-required = mo_json->value_boolean( iv_prefix && lv_member && '/required' ).
CREATE OBJECT lo_names. " in this place the names are not connected
ls_parameter-abap_name = lo_names->to_abap_name( ls_parameter-name ).
ls_parameter-schema_ref = mo_json->value_string( iv_prefix && lv_member && '/schema/$ref' ).
IF ls_parameter-schema_ref IS INITIAL.
ls_parameter-schema = parse_schema( iv_prefix && lv_member && '/schema' ).
ENDIF.
APPEND ls_parameter TO rt_parameters.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD parse_parameters_ref.
DATA lt_members TYPE string_table.
DATA lv_member LIKE LINE OF lt_members.
DATA lv_ref TYPE string.
lt_members = mo_json->members( iv_prefix ).
LOOP AT lt_members INTO lv_member.
lv_ref = mo_json->value_string( iv_prefix && lv_member && '/$ref' ).
IF lv_ref IS NOT INITIAL.
APPEND lv_ref TO rt_parameters.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD parse_responses.
DATA lt_members TYPE string_table.
DATA lv_member LIKE LINE OF lt_members.
DATA ls_response LIKE LINE OF rt_responses.
lt_members = mo_json->members( iv_prefix ).
LOOP AT lt_members INTO lv_member.
CLEAR ls_response.
ls_response-code = lv_member.
ls_response-description = mo_json->value_string( iv_prefix && lv_member && '/description' ).
ls_response-content = parse_media_types( iv_prefix && lv_member && '/content/' ).
APPEND ls_response TO rt_responses.
ENDLOOP.
ENDMETHOD.
METHOD parse_media_types.
DATA lt_members TYPE string_table.
DATA lv_member LIKE LINE OF lt_members.
DATA ls_media_type LIKE LINE OF rt_media_types.
lt_members = mo_json->members( iv_prefix ).
LOOP AT lt_members INTO lv_member.
CLEAR ls_media_type.
ls_media_type-type = lv_member.
ls_media_type-schema_ref = mo_json->value_string( iv_prefix && lv_member && '/schema/$ref' ).
IF ls_media_type-schema_ref IS INITIAL.
ls_media_type-schema = parse_schema( iv_prefix && lv_member && '/schema' ).
ENDIF.
APPEND ls_media_type TO rt_media_types.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
78,
15042,
62,
48610,
5550,
20032,
17941,
44731,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
21136,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
17752,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
3808,
62,
15952,
2611,
8,
41876,
1976,
361,
62,
78,
15042,
62,
16684,
2649,
62,
85,
18,
14804,
774,
62,
16684,
2649,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
6941,
62,
17752,
41876,
4526,
37,
5390,
1976,
565,
62,
78,
15042,
62,
17752,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
62,
3575,
602,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
3575,
602,
8,
41876,
1976,
361,
62,
78,
15042,
62,
16684,
2649,
62,
85,
18,
14804,
774,
62,
3575,
602,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
62,
2655,
690,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
2655,
690,
8,
41876,
1976,
361,
62,
78,
15042,
62,
16684,
2649,
62,
85,
18,
14804,
774,
62,
2655,
690,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
62,
17143,
7307,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
40290,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
17143,
7307,
8,
41876,
1976,
361,
62,
78,
15042,
62,
16684,
2649,
62,
85,
18,
14804,
774,
62,
17143,
7307,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
62,
17143,
7307,
62,
5420,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
40290,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
17143,
7307,
8,
41876,
4731,
62,
11487,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
62,
16733,
274,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
40290,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
16733,
274,
8,
41876,
1976,
361,
62,
78,
15042,
62,
16684,
2649,
62,
85,
18,
14804,
774,
62,
16733,
274,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
62,
11431,
62,
19199,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
40290,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
11431,
62,
19199,
8,
41876,
1976,
361,
62,
78,
15042,
62,
16684,
2649,
62,
85,
18,
14804,
774,
62,
11431,
62,
19199,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
62,
5589,
3906,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
3808,
62,
5589,
3906,
8,
41876,
1976,
361,
62,
78,
15042,
62,
16684,
2649,
62,
85,
18,
14804,
774,
62,
5589,
3906,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
62,
15952,
2611,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
40290,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
380,
62,
15952,
2611,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
78,
15042,
62,
15952,
2611,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
62,
1416,
4411,
292,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
40290,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
1416,
4411,
292,
8,
41876,
1976,
361,
62,
78,
15042,
62,
16684,
2649,
62,
85,
18,
14804,
774,
62,
1416,
4411,
292,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
1976,
565,
62,
78,
15042,
62,
48610,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
21136,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
6941,
62,
17752,
7788,
15490,
2751,
21628,
62,
17752,
796,
21628,
62,
17752,
13,
628,
220,
220,
220,
44608,
62,
15952,
2611,
12,
9654,
15042,
796,
6941,
62,
17752,
3784,
8367,
62,
8841,
7,
31051,
9654,
15042,
6,
6739,
198,
220,
220,
220,
24994,
17395,
44608,
62,
15952,
2611,
12,
9654,
15042,
16932,
705,
18,
9,
4458,
628,
220,
220,
220,
44608,
62,
15952,
2611,
12,
10951,
12,
7839,
796,
6941,
62,
17752,
3784,
8367,
62,
8841,
7,
31051,
10951,
14,
7839,
6,
6739,
198,
220,
220,
220,
44608,
62,
15952,
2611,
12,
10951,
12,
9641,
796,
6941,
62,
17752,
3784,
8367,
62,
8841,
7,
31051,
10951,
14,
9641,
6,
6739,
198,
220,
220,
220,
44608,
62,
15952,
2611,
12,
10951,
12,
11213,
796,
6941,
62,
17752,
3784,
8367,
62,
8841,
7,
31051,
10951,
14,
11213,
6,
6739,
628,
220,
220,
220,
44608,
62,
15952,
2611,
12,
3575,
602,
796,
21136,
62,
3575,
602,
7,
6739,
198,
220,
220,
220,
44608,
62,
15952,
2611,
12,
2655,
690,
796,
21136,
62,
2655,
690,
7,
6739,
198,
220,
220,
220,
44608,
62,
15952,
2611,
12,
5589,
3906,
796,
21136,
62,
5589,
3906,
7,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
21136,
62,
15952,
2611,
13,
198,
220,
220,
220,
42865,
300,
83,
62,
14933,
41876,
4731,
62,
11487,
13,
198,
220,
220,
220,
42865,
300,
85,
62,
3672,
41876,
4731,
13,
198,
220,
220,
220,
42865,
43979,
62,
26745,
41876,
1976,
361,
62,
78,
15042,
62,
15952,
2611,
14804,
774,
62,
26745,
13,
198,
220,
220,
220,
42865,
2376,
62,
14933,
41876,
4526,
37,
5390,
1976,
565,
62,
78,
15042,
62,
397,
499,
62,
3672,
13,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
2376,
62,
14933,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
374,
72,
62,
15952,
2611,
41876,
1976,
565,
62,
78,
15042,
62,
15952,
2611,
13,
198,
220,
220,
220,
374,
72,
62,
15952,
2611,
3784,
4906,
796,
6941,
62,
17752,
3784,
8367,
62,
8841,
7,
21628,
62,
40290,
11405,
31051,
4906,
6,
6739,
198,
220,
220,
220,
16876,
374,
72,
62,
15952,
2611,
3784,
4906,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
374,
72,
62,
15952,
2611,
3784,
4906,
796,
705,
8841,
4458,
366,
284,
4598,
11,
5412,
366,
505,
5189,
1,
290,
366,
1092,
5189,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
INTERFACE zif_abapgit_repo_srv
PUBLIC .
METHODS delete
IMPORTING
!io_repo TYPE REF TO zcl_abapgit_repo
RAISING
zcx_abapgit_exception .
METHODS get
IMPORTING
!iv_key TYPE zif_abapgit_persistence=>ty_value
RETURNING
VALUE(ro_repo) TYPE REF TO zcl_abapgit_repo
RAISING
zcx_abapgit_exception .
METHODS is_repo_installed
IMPORTING
!iv_url TYPE string
!iv_target_package TYPE devclass OPTIONAL
RETURNING
VALUE(rv_installed) TYPE abap_bool
RAISING
zcx_abapgit_exception .
METHODS list
RETURNING
VALUE(rt_list) TYPE zif_abapgit_definitions=>ty_repo_ref_tt
RAISING
zcx_abapgit_exception .
METHODS new_offline
IMPORTING
!iv_url TYPE string
!iv_package TYPE devclass
iv_folder_logic TYPE string DEFAULT zif_abapgit_dot_abapgit=>c_folder_logic-full
RETURNING
VALUE(ro_repo) TYPE REF TO zcl_abapgit_repo_offline
RAISING
zcx_abapgit_exception .
METHODS new_online
IMPORTING
!iv_url TYPE string
!iv_branch_name TYPE string
!iv_package TYPE devclass
RETURNING
VALUE(ro_repo) TYPE REF TO zcl_abapgit_repo_online
RAISING
zcx_abapgit_exception .
METHODS purge
IMPORTING
!io_repo TYPE REF TO zcl_abapgit_repo
is_checks TYPE zif_abapgit_definitions=>ty_delete_checks
RAISING
zcx_abapgit_exception .
METHODS validate_package
IMPORTING
!iv_package TYPE devclass
RAISING
zcx_abapgit_exception .
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
397,
499,
18300,
62,
260,
7501,
62,
27891,
85,
198,
220,
44731,
764,
628,
198,
220,
337,
36252,
50,
12233,
198,
220,
220,
220,
30023,
9863,
2751,
198,
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,
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,
651,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
2539,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
8367,
198,
220,
220,
220,
30826,
4261,
15871,
198,
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,
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,
318,
62,
260,
7501,
62,
37050,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
16793,
62,
26495,
220,
41876,
1614,
4871,
39852,
2849,
1847,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
37050,
8,
41876,
450,
499,
62,
30388,
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,
1351,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
4868,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
260,
7501,
62,
5420,
62,
926,
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,
649,
62,
2364,
1370,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
220,
220,
220,
220,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
21628,
62,
43551,
62,
6404,
291,
41876,
4731,
5550,
38865,
1976,
361,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
14804,
66,
62,
43551,
62,
6404,
291,
12,
12853,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
260,
7501,
8,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
62,
2364,
1370,
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,
649,
62,
25119,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
1671,
3702,
62,
3672,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
220,
220,
220,
220,
41876,
1614,
4871,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
260,
7501,
8,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
62,
25119,
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,
35714,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
952,
62,
260,
7501,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
318,
62,
42116,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
33678,
62,
42116,
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,
26571,
62,
26495,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
41876,
1614,
4871,
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,
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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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
] |
*&---------------------------------------------------------------------*
*& Include ZABAPGIT_PASSWORD_DIALOG
*&---------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF SCREEN 1002 TITLE s_title.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) s_url FOR FIELD p_url.
PARAMETERS: p_url TYPE string LOWER CASE VISIBLE LENGTH 40 ##SEL_WRONG.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) s_user FOR FIELD p_user.
PARAMETERS: p_user TYPE string LOWER CASE VISIBLE LENGTH 40 ##SEL_WRONG.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) s_pass FOR FIELD p_pass.
PARAMETERS: p_pass TYPE string LOWER CASE VISIBLE LENGTH 40 ##SEL_WRONG.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 1002.
*-----------------------------------------------------------------------
* LCL_PASSWORD_DIALOG
*-----------------------------------------------------------------------
CLASS lcl_password_dialog DEFINITION FINAL.
**************
* This class will remain local in the report
**************
PUBLIC SECTION.
CONSTANTS c_dynnr TYPE char4 VALUE '1002'.
CLASS-METHODS popup
IMPORTING
iv_repo_url TYPE string
CHANGING
cv_user TYPE string
cv_pass TYPE string.
CLASS-METHODS on_screen_init.
CLASS-METHODS on_screen_output.
CLASS-METHODS on_screen_event
IMPORTING
iv_ucomm TYPE sy-ucomm.
PRIVATE SECTION.
CLASS-DATA gv_confirm TYPE abap_bool.
CLASS-METHODS enrich_title_by_hostname
IMPORTING
iv_repo_url TYPE string.
ENDCLASS.
CLASS lcl_password_dialog IMPLEMENTATION.
METHOD popup.
CLEAR p_pass.
p_url = iv_repo_url.
p_user = cv_user.
gv_confirm = abap_false.
enrich_title_by_hostname( iv_repo_url ).
CALL SELECTION-SCREEN c_dynnr STARTING AT 5 5 ENDING AT 60 8.
IF gv_confirm = abap_true.
cv_user = p_user.
cv_pass = p_pass.
ELSE.
CLEAR: cv_user, cv_pass.
ENDIF.
CLEAR: p_url, p_user, p_pass.
ENDMETHOD.
METHOD on_screen_init.
s_title = 'Login' ##NO_TEXT.
s_url = 'Repo URL' ##NO_TEXT.
s_user = 'User' ##NO_TEXT.
s_pass = 'Password' ##NO_TEXT.
ENDMETHOD.
METHOD on_screen_output.
DATA lt_ucomm TYPE TABLE OF sy-ucomm.
ASSERT sy-dynnr = c_dynnr.
LOOP AT SCREEN.
IF screen-name = 'P_URL'.
screen-input = '0'.
screen-intensified = '1'.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'P_PASS'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
" Program RSSYSTDB, GUI Status %_CSP
PERFORM set_pf_status IN PROGRAM rsdbrunt IF FOUND.
APPEND 'NONE' TO lt_ucomm. "Button Check
APPEND 'SPOS' TO lt_ucomm. "Save as Variant
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = lt_ucomm.
IF p_user IS NOT INITIAL.
SET CURSOR FIELD 'P_PASS'.
ENDIF.
ENDMETHOD.
METHOD on_screen_event.
ASSERT sy-dynnr = c_dynnr.
" CRET - F8
" OTHERS - simulate Enter press
CASE iv_ucomm.
WHEN 'CRET'.
gv_confirm = abap_true.
WHEN OTHERS. "TODO REFACTOR !!! A CLUTCH !
" This will work unless any new specific logic appear
" for other commands. The problem is that the password dialog
" does not have Enter event (or I don't know how to activate it ;)
" so Enter issues previous command from previous screen
" But for now this works :) Fortunately Esc produces another flow
gv_confirm = abap_true.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMETHOD.
METHOD enrich_title_by_hostname.
DATA lv_host TYPE string.
FIND REGEX 'https?://([^/^:]*)' IN iv_repo_url SUBMATCHES lv_host.
IF lv_host IS NOT INITIAL AND lv_host <> space.
CLEAR s_title.
CONCATENATE 'Login:' lv_host INTO s_title IN CHARACTER MODE SEPARATED BY space.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
40348,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1168,
6242,
2969,
38,
2043,
62,
47924,
54,
12532,
62,
35,
12576,
7730,
198,
9,
5,
10097,
30934,
9,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
6374,
2200,
1677,
1802,
17,
37977,
2538,
264,
62,
7839,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
48920,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
9440,
10979,
352,
7,
940,
8,
264,
62,
6371,
7473,
18930,
24639,
279,
62,
6371,
13,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
6371,
41876,
4731,
406,
36048,
42001,
50035,
34563,
406,
49494,
2319,
22492,
50,
3698,
62,
18564,
18494,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
48920,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
48920,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
9440,
10979,
352,
7,
940,
8,
264,
62,
7220,
7473,
18930,
24639,
279,
62,
7220,
13,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
7220,
41876,
4731,
406,
36048,
42001,
50035,
34563,
406,
49494,
2319,
22492,
50,
3698,
62,
18564,
18494,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
48920,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
48920,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
9440,
10979,
352,
7,
940,
8,
264,
62,
6603,
7473,
18930,
24639,
279,
62,
6603,
13,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
6603,
41876,
4731,
406,
36048,
42001,
50035,
34563,
406,
49494,
2319,
22492,
50,
3698,
62,
18564,
18494,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
48920,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
6374,
2200,
1677,
1802,
17,
13,
198,
198,
9,
10097,
26866,
198,
9,
406,
5097,
62,
47924,
54,
12532,
62,
35,
12576,
7730,
198,
9,
10097,
26866,
198,
31631,
300,
565,
62,
28712,
62,
38969,
519,
5550,
20032,
17941,
25261,
13,
198,
198,
46068,
1174,
198,
9,
770,
1398,
481,
3520,
1957,
287,
262,
989,
198,
46068,
1174,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
67,
2047,
48624,
41876,
1149,
19,
26173,
8924,
705,
3064,
17,
4458,
628,
220,
220,
220,
42715,
12,
49273,
50,
46207,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
260,
7501,
62,
6371,
41876,
4731,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
269,
85,
62,
7220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
269,
85,
62,
6603,
220,
220,
220,
220,
41876,
4731,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
319,
62,
9612,
62,
15003,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
319,
62,
9612,
62,
22915,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
319,
62,
9612,
62,
15596,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
84,
9503,
41876,
827,
12,
84,
9503,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
10414,
2533,
41876,
450,
499,
62,
30388,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
22465,
62,
7839,
62,
1525,
62,
4774,
3672,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
260,
7501,
62,
6371,
41876,
4731,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
28712,
62,
38969,
519,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
46207,
13,
628,
220,
220,
220,
30301,
1503,
279,
62,
6603,
13,
198,
220,
220,
220,
279,
62,
6371,
220,
220,
220,
220,
220,
796,
21628,
62,
260,
7501,
62,
6371,
13,
198,
220,
220,
220,
279,
62,
7220,
220,
220,
220,
220,
796,
269,
85,
62,
7220,
13,
198,
220,
220,
220,
308,
85,
62,
10414,
2533,
796,
450,
499,
62,
9562,
13,
628,
198,
220,
220,
220,
22465,
62,
7839,
62,
1525,
62,
4774,
3672,
7,
21628,
62,
260,
7501,
62,
6371,
6739,
628,
220,
220,
220,
42815,
33493,
2849,
12,
6173,
2200,
1677,
269,
62,
67,
2047,
48624,
33303,
2751,
5161,
642,
642,
23578,
2751,
5161,
3126,
807,
13,
628,
220,
220,
220,
16876,
308,
85,
62,
10414,
2533,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
220,
220,
269,
85,
62,
7220,
796,
279,
62,
7220,
13,
198,
220,
220,
220,
220,
220,
269,
85,
62,
6603,
796,
279,
62,
6603,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
30301,
1503,
25,
269,
85,
62,
7220,
11,
269,
85,
62,
6603,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
30301,
1503,
25,
279,
62,
6371,
11,
279,
62,
7220,
11,
279,
62,
6603,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
319,
62,
9612,
62,
15003,
13,
198,
220,
220,
220,
264,
62,
7839,
796,
705,
47790,
6,
220,
220,
220,
220,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
264,
62,
6371,
220,
220,
796,
705,
6207,
78,
10289,
6,
220,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
264,
62,
7220,
220,
796,
705,
12982,
6,
220,
220,
220,
220,
220,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
264,
62,
6603,
220,
796,
705,
35215,
6,
220,
22492,
15285,
62,
32541,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
319,
62,
9612,
62,
22915,
13,
198,
220,
220,
220,
42865,
300,
83,
62,
84,
9503,
41876,
43679,
3963,
827,
12,
84,
9503,
13,
628,
220,
220,
220,
24994,
17395,
827,
12,
67,
2047,
48624,
796,
269,
62,
67,
2047,
48624,
13,
628,
220,
220,
220,
17579,
3185,
5161,
6374,
2200,
1677,
13,
198,
220,
220,
220,
220,
220,
16876,
3159,
12,
3672,
796,
705,
47,
62,
21886,
4458,
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
] |
*&---------------------------------------------------------------------*
*& Include ZTECHDOCU_CLD
*&---------------------------------------------------------------------*
INTERFACE lif_techdocu_repo.
METHODS:
read RETURNING VALUE(ro_result) TYPE REF TO lif_techdocu_repo,
display.
ENDINTERFACE.
CLASS lcl_techdocu_repo_obj_metadata DEFINITION FINAL.
PUBLIC SECTION.
TYPES:
BEGIN OF ty_attributes,
title TYPE string,
cnam TYPE string,
cdat TYPE d,
unam TYPE string,
udat TYPE d,
END OF ty_attributes.
METHODS:
constructor IMPORTING is_attributes TYPE ty_attributes,
get RETURNING VALUE(rs_result) TYPE ty_attributes.
PRIVATE SECTION.
DATA ms_attributes TYPE ty_attributes.
ENDCLASS.
CLASS lcl_techdocu_repo DEFINITION FINAL.
PUBLIC SECTION.
INTERFACES lif_techdocu_repo.
ALIASES read FOR lif_techdocu_repo~read.
ALIASES display FOR lif_techdocu_repo~display.
TYPES ty_t_treq TYPE RANGE OF trkorr.
TYPES ty_t_devc TYPE RANGE OF devclass.
TYPES:
BEGIN OF ty_context,
treq_range TYPE ty_t_treq,
devc_range TYPE ty_t_devc,
lang TYPE sy-langu,
END OF ty_context.
TYPES ty_repo_data TYPE ztechdocu_data.
TYPES ty_t_repo_data TYPE STANDARD TABLE OF ty_repo_data WITH KEY primary_key COMPONENTS obj_type.
METHODS constructor IMPORTING is_context TYPE ty_context.
PRIVATE SECTION.
DATA ms_context TYPE ty_context.
DATA mt_repo_data TYPE ty_t_repo_data.
METHODS:
select_treqs RETURNING VALUE(rt_result) TYPE ty_t_treq,
read_repo_data,
repo_data_by_treqs RETURNING VALUE(rt_result) TYPE ty_t_repo_data,
repo_data_by_package RETURNING VALUE(rt_result) TYPE ty_t_repo_data,
is_tr_obj_exist IMPORTING is_repo_data TYPE ty_repo_data
RETURNING VALUE(rv_result) TYPE boole_d.
ENDCLASS.
CLASS lcl_techdocu_alv DEFINITION FINAL.
PUBLIC SECTION.
TYPES ty_t_outtab TYPE lcl_techdocu_repo=>ty_t_repo_data.
METHODS display CHANGING ct_outtab TYPE ty_t_outtab.
PRIVATE SECTION.
DATA mo_grid TYPE REF TO cl_gui_alv_grid.
METHODS:
create_grid CHANGING ct_outtab TYPE ty_t_outtab,
get_field_catalog RETURNING VALUE(rt_fcat) TYPE lvc_t_fcat.
ENDCLASS.
CLASS lcl_techdocu_scr_events DEFINITION FINAL.
PUBLIC SECTION.
CLASS-DATA go_repo TYPE REF TO lif_techdocu_repo.
CLASS-METHODS:
initialization,
at_selection_screen,
at_ssonvrf_treqs,
start_of_selection,
end_of_selection.
ENDCLASS.
INTERFACE lif_techdocu_repo_obj.
METHODS:
read_metadata RETURNING VALUE(ro_result) TYPE REF TO lcl_techdocu_repo_obj_metadata
RAISING cx_sy_create_object_error.
ENDINTERFACE.
CLASS lcl_techdocu_repo_obj DEFINITION ABSTRACT.
PUBLIC SECTION.
INTERFACES lif_techdocu_repo_obj.
CLASS-METHODS:
get_instance IMPORTING iv_object TYPE trobj_name
iv_object_type TYPE trobjtype
iv_lang TYPE sy-langu
RETURNING VALUE(ro_result) TYPE REF TO lif_techdocu_repo_obj
RAISING cx_sy_create_object_error.
METHODS:
constructor IMPORTING iv_object TYPE trobj_name
iv_object_type TYPE trobjtype
iv_lang TYPE sy-langu.
PROTECTED SECTION.
DATA mv_object TYPE trobj_name.
DATA mv_object_type TYPE trobjtype.
DATA mv_lang TYPE sy-langu.
METHODS:
attributes ABSTRACT RETURNING VALUE(rs_result) TYPE lcl_techdocu_repo_obj_metadata=>ty_attributes.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_devc DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_prog DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_tran DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_intf DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_clas DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_tabl DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_msag DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_shlp DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_doma DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_dtel DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_ttyp DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_view DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_sfpi DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_sfpf DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_fugr DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
CLASS lcl_techdocu_repo_obj_sxci DEFINITION INHERITING FROM lcl_techdocu_repo_obj FINAL.
PROTECTED SECTION.
METHODS: attributes REDEFINITION.
ENDCLASS.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
40348,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1168,
51,
2943,
10227,
4503,
52,
62,
5097,
35,
198,
9,
5,
10097,
30934,
9,
198,
41358,
49836,
3868,
62,
13670,
15390,
84,
62,
260,
7501,
13,
198,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
1100,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
20274,
8,
41876,
4526,
37,
5390,
3868,
62,
13670,
15390,
84,
62,
260,
7501,
11,
628,
220,
220,
220,
3359,
13,
198,
198,
10619,
41358,
49836,
13,
198,
198,
31631,
300,
565,
62,
13670,
15390,
84,
62,
260,
7501,
62,
26801,
62,
38993,
5550,
20032,
17941,
25261,
13,
198,
220,
44731,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
1078,
7657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3670,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
269,
7402,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
269,
19608,
220,
41876,
288,
11,
198,
220,
220,
220,
220,
220,
220,
220,
555,
321,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
334,
19608,
220,
41876,
288,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
1078,
7657,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
30023,
9863,
2751,
318,
62,
1078,
7657,
41876,
1259,
62,
1078,
7657,
11,
628,
220,
220,
220,
220,
220,
651,
30826,
4261,
15871,
26173,
8924,
7,
3808,
62,
20274,
8,
41876,
1259,
62,
1078,
7657,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
13845,
62,
1078,
7657,
41876,
1259,
62,
1078,
7657,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
13670,
15390,
84,
62,
260,
7501,
5550,
20032,
17941,
25261,
13,
198,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
3868,
62,
13670,
15390,
84,
62,
260,
7501,
13,
628,
220,
220,
220,
8355,
43429,
1546,
1100,
7473,
3868,
62,
13670,
15390,
84,
62,
260,
7501,
93,
961,
13,
198,
220,
220,
220,
8355,
43429,
1546,
3359,
7473,
3868,
62,
13670,
15390,
84,
62,
260,
7501,
93,
13812,
13,
628,
220,
220,
220,
24412,
47,
1546,
1259,
62,
83,
62,
33945,
80,
41876,
371,
27746,
3963,
491,
74,
38890,
13,
198,
220,
220,
220,
24412,
47,
1546,
1259,
62,
83,
62,
7959,
66,
41876,
371,
27746,
3963,
1614,
4871,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
22866,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2054,
80,
62,
9521,
41876,
1259,
62,
83,
62,
33945,
80,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1614,
66,
62,
9521,
41876,
1259,
62,
83,
62,
7959,
66,
11,
198,
220,
220,
220,
220,
220,
220,
220,
42392,
220,
220,
220,
220,
220,
220,
41876,
827,
12,
75,
2303,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
22866,
13,
628,
220,
220,
220,
24412,
47,
1546,
1259,
62,
260,
7501,
62,
7890,
41876,
1976,
13670,
15390,
84,
62,
7890,
13,
198,
220,
220,
220,
24412,
47,
1546,
1259,
62,
83,
62,
260,
7501,
62,
7890,
41876,
49053,
9795,
43679,
3963,
1259,
62,
260,
7501,
62,
7890,
13315,
35374,
4165,
62,
2539,
24301,
1340,
15365,
26181,
62,
4906,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
30023,
9863,
2751,
318,
62,
22866,
41876,
1259,
62,
22866,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
13845,
62,
22866,
41876,
1259,
62,
22866,
13,
198,
220,
220,
220,
42865,
45079,
62,
260,
7501,
62,
7890,
41876,
1259,
62,
83,
62,
260,
7501,
62,
7890,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
2922,
62,
33945,
48382,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
20274,
8,
41876,
1259,
62,
83,
62,
33945,
80,
11,
628,
220,
220,
220,
220,
220,
1100,
62,
260,
7501,
62,
7890,
11,
628,
220,
220,
220,
220,
220,
29924,
62,
7890,
62,
1525,
62,
33945,
48382,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
20274,
8,
41876,
1259,
62,
83,
62,
260,
7501,
62,
7890,
11,
628,
220,
220,
220,
220,
220,
29924,
62,
7890,
62,
1525,
62,
26495,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
20274,
8,
41876,
1259,
62,
83,
62,
260,
7501,
62,
7890,
11,
628,
220,
220,
220,
220,
220,
318,
62,
2213,
62,
26801,
62,
38476,
30023,
9863,
2751,
318,
62,
260,
7501,
62,
7890,
220,
220,
220,
220,
41876,
1259,
62,
260,
7501,
62,
7890,
198,
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,
81,
85,
62,
20274,
8,
41876,
1489,
2305,
62,
67,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
13670,
15390,
84,
62,
282,
85,
5550,
20032,
17941,
25261,
13,
198,
220,
44731,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
1259,
62,
83,
62,
448,
8658,
41876,
300,
565,
62,
13670,
15390,
84,
62,
260,
7501,
14804,
774,
62,
83,
62,
260,
7501,
62,
7890,
13,
628,
220,
220,
220,
337,
36252,
50,
3359,
5870,
15567,
2751,
269,
83,
62,
448,
8658,
41876,
1259,
62,
83,
62,
448,
8658,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
6941,
62,
25928,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
282,
85,
62,
25928,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
2251,
62,
25928,
5870,
15567,
2751,
269,
83,
62,
448,
8658,
41876,
1259,
62,
83,
62,
448,
8658,
11,
628,
220,
220,
220,
220,
220,
651,
62,
3245,
62,
9246,
11794,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
69,
9246,
8,
41876,
300,
28435,
62,
83,
62,
69,
9246,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
13670,
15390,
84,
62,
1416,
81,
62,
31534,
5550,
20032,
17941,
25261,
13,
198,
220,
44731,
44513
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
CLASS zcl_abapgit_tadir DEFINITION
PUBLIC
FINAL
CREATE PRIVATE
GLOBAL FRIENDS zcl_abapgit_factory .
PUBLIC SECTION.
INTERFACES zif_abapgit_tadir .
PROTECTED SECTION.
PRIVATE SECTION.
METHODS exists
IMPORTING
!is_item TYPE zif_abapgit_definitions=>ty_item
RETURNING
VALUE(rv_exists) TYPE abap_bool .
METHODS check_exists
IMPORTING
!it_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt
RETURNING
VALUE(rt_tadir) TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
METHODS build
IMPORTING
!iv_package TYPE tadir-devclass
!io_dot TYPE REF TO zcl_abapgit_dot_abapgit
!iv_ignore_subpackages TYPE abap_bool DEFAULT abap_false
!iv_only_local_objects TYPE abap_bool DEFAULT abap_false
!ii_log TYPE REF TO zif_abapgit_log OPTIONAL
RETURNING
VALUE(rt_tadir) TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
METHODS select_objects
IMPORTING
!iv_package TYPE tadir-devclass
!iv_ignore_subpackages TYPE abap_bool DEFAULT abap_false
!iv_only_local_objects TYPE abap_bool
EXPORTING
!et_packages TYPE zif_abapgit_sap_package=>ty_devclass_tt
!et_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
METHODS skip_objects
IMPORTING
!iv_package TYPE tadir-devclass
!io_dot TYPE REF TO zcl_abapgit_dot_abapgit
!ii_log TYPE REF TO zif_abapgit_log OPTIONAL
CHANGING
!ct_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
METHODS add_local_packages
IMPORTING
!it_packages TYPE zif_abapgit_sap_package=>ty_devclass_tt
CHANGING
!ct_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
METHODS add_namespaces
IMPORTING
!iv_package TYPE devclass
CHANGING
!ct_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
METHODS determine_path
IMPORTING
!iv_package TYPE tadir-devclass
!io_dot TYPE REF TO zcl_abapgit_dot_abapgit
CHANGING
!ct_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
METHODS adjust_objects
IMPORTING
!iv_package TYPE tadir-devclass
!io_dot TYPE REF TO zcl_abapgit_dot_abapgit
CHANGING
!ct_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt
RAISING
zcx_abapgit_exception .
ENDCLASS.
CLASS zcl_abapgit_tadir IMPLEMENTATION.
METHOD add_local_packages.
FIELD-SYMBOLS:
<lv_package> LIKE LINE OF it_packages,
<ls_tadir> LIKE LINE OF ct_tadir.
LOOP AT it_packages ASSIGNING <lv_package>.
" Local packages are not in TADIR, only in TDEVC, act as if they were
IF <lv_package> CP '$*'. " OR <package> CP 'T*' ).
APPEND INITIAL LINE TO ct_tadir ASSIGNING <ls_tadir>.
<ls_tadir>-pgmid = 'R3TR'.
<ls_tadir>-object = 'DEVC'.
<ls_tadir>-obj_name = <lv_package>.
<ls_tadir>-devclass = <lv_package>.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD add_namespaces.
DATA:
lv_name TYPE progname,
lv_namespace TYPE namespace.
FIELD-SYMBOLS:
<ls_tadir> LIKE LINE OF ct_tadir,
<ls_nspc> LIKE LINE OF ct_tadir.
LOOP AT ct_tadir ASSIGNING <ls_tadir> WHERE obj_name(1) = '/'.
" Namespaces are not in TADIR, but are necessary for creating objects in transportable packages
lv_name = <ls_tadir>-obj_name.
CALL FUNCTION 'RS_NAME_SPLIT_NAMESPACE'
EXPORTING
name_with_namespace = lv_name
IMPORTING
namespace = lv_namespace
EXCEPTIONS
delimiter_error = 1
OTHERS = 2.
IF sy-subrc = 0 AND lv_namespace IS NOT INITIAL.
READ TABLE ct_tadir TRANSPORTING NO FIELDS
WITH KEY pgmid = 'R3TR' object = 'NSPC' obj_name = lv_namespace.
IF sy-subrc <> 0.
APPEND INITIAL LINE TO ct_tadir ASSIGNING <ls_nspc>.
<ls_nspc>-pgmid = 'R3TR'.
<ls_nspc>-object = 'NSPC'.
<ls_nspc>-obj_name = lv_namespace.
<ls_nspc>-devclass = iv_package.
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD adjust_objects.
" Todo, replace with solution that will work with any object type (might depend on iv_package and io_dot)
FIELD-SYMBOLS <ls_tadir> LIKE LINE OF ct_tadir.
LOOP AT ct_tadir ASSIGNING <ls_tadir>.
IF <ls_tadir>-object = 'SICF'.
" Replace the internal GUID with a hash of the path
TRY.
CALL METHOD ('ZCL_ABAPGIT_OBJECT_SICF')=>read_sicf_url
EXPORTING
iv_obj_name = <ls_tadir>-obj_name
RECEIVING
rv_hash = <ls_tadir>-obj_name+15.
CATCH cx_sy_dyn_call_illegal_method ##NO_HANDLER.
" SICF might not be supported in some systems, assume this code is not called
ENDTRY.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD build.
DATA lt_packages TYPE zif_abapgit_sap_package=>ty_devclass_tt.
select_objects(
EXPORTING
iv_package = iv_package
iv_ignore_subpackages = iv_ignore_subpackages
iv_only_local_objects = iv_only_local_objects
IMPORTING
et_tadir = rt_tadir
et_packages = lt_packages ).
skip_objects(
EXPORTING
iv_package = iv_package
io_dot = io_dot
ii_log = ii_log
CHANGING
ct_tadir = rt_tadir ).
add_local_packages(
EXPORTING
it_packages = lt_packages
CHANGING
ct_tadir = rt_tadir ).
add_namespaces(
EXPORTING
iv_package = iv_package
CHANGING
ct_tadir = rt_tadir ).
determine_path(
EXPORTING
iv_package = iv_package
io_dot = io_dot
CHANGING
ct_tadir = rt_tadir ).
adjust_objects(
EXPORTING
iv_package = iv_package
io_dot = io_dot
CHANGING
ct_tadir = rt_tadir ).
ENDMETHOD.
METHOD check_exists.
DATA: li_progress TYPE REF TO zif_abapgit_progress,
ls_item TYPE zif_abapgit_definitions=>ty_item.
FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF it_tadir.
li_progress = zcl_abapgit_progress=>get_instance( lines( it_tadir ) ).
* rows from database table TADIR are not removed for
* transportable objects until the transport is released
LOOP AT it_tadir ASSIGNING <ls_tadir>.
IF sy-tabix MOD 200 = 0.
li_progress->show(
iv_current = sy-tabix
iv_text = |Check object exists { <ls_tadir>-object } { <ls_tadir>-obj_name }| ).
ENDIF.
ls_item-obj_type = <ls_tadir>-object.
ls_item-obj_name = <ls_tadir>-obj_name.
ls_item-devclass = <ls_tadir>-devclass.
IF exists( ls_item ) = abap_true.
APPEND <ls_tadir> TO rt_tadir.
ENDIF.
ENDLOOP.
li_progress->off( ).
ENDMETHOD.
METHOD determine_path.
DATA:
lv_path TYPE string,
lo_folder_logic TYPE REF TO zcl_abapgit_folder_logic,
lv_last_package TYPE devclass VALUE cl_abap_char_utilities=>horizontal_tab.
FIELD-SYMBOLS <ls_tadir> LIKE LINE OF ct_tadir.
lo_folder_logic = zcl_abapgit_folder_logic=>get_instance( ).
LOOP AT ct_tadir ASSIGNING <ls_tadir>.
IF lv_last_package <> <ls_tadir>-devclass.
"Change in Package
lv_last_package = <ls_tadir>-devclass.
IF NOT io_dot IS INITIAL.
lv_path = lo_folder_logic->package_to_path(
iv_top = iv_package
io_dot = io_dot
iv_package = <ls_tadir>-devclass ).
ENDIF.
ENDIF.
<ls_tadir>-path = lv_path.
ENDLOOP.
ENDMETHOD.
METHOD exists.
IF is_item IS INITIAL.
RETURN.
ENDIF.
IF zcl_abapgit_objects=>is_supported( is_item ) = abap_false.
rv_exists = abap_true.
RETURN.
ENDIF.
rv_exists = zcl_abapgit_objects=>exists( is_item ).
ENDMETHOD.
METHOD select_objects.
DATA:
lt_excludes TYPE RANGE OF trobjtype,
ls_exclude LIKE LINE OF lt_excludes,
lt_srcsystem TYPE RANGE OF tadir-srcsystem,
ls_srcsystem LIKE LINE OF lt_srcsystem.
" Determine packages to read
IF iv_ignore_subpackages = abap_false.
et_packages = zcl_abapgit_factory=>get_sap_package( iv_package )->list_subpackages( ).
ENDIF.
INSERT iv_package INTO et_packages INDEX 1.
" Exclude object types with tadir entries that are included elsewhere
ls_exclude-sign = 'I'.
ls_exclude-option = 'EQ'.
ls_exclude-low = 'SOTR'. " automatically create for sap packages (DEVC)
APPEND ls_exclude TO lt_excludes.
ls_exclude-low = 'SFB1'. " covered by business function sets (SFBS)
APPEND ls_exclude TO lt_excludes.
ls_exclude-low = 'SFB2'. " covered by business functions (SFBF)
APPEND ls_exclude TO lt_excludes.
ls_exclude-low = 'STOB'. " auto generated by core data services (DDLS)
APPEND ls_exclude TO lt_excludes.
" Limit to objects belonging to this system
IF iv_only_local_objects = abap_true.
ls_srcsystem-sign = 'I'.
ls_srcsystem-option = 'EQ'.
ls_srcsystem-low = sy-sysid.
APPEND ls_srcsystem TO lt_srcsystem.
ENDIF.
IF et_packages IS NOT INITIAL.
SELECT * FROM tadir INTO CORRESPONDING FIELDS OF TABLE et_tadir
FOR ALL ENTRIES IN et_packages
WHERE devclass = et_packages-table_line
AND pgmid = 'R3TR'
AND object NOT IN lt_excludes
AND delflag = abap_false
AND srcsystem IN lt_srcsystem
ORDER BY PRIMARY KEY ##TOO_MANY_ITAB_FIELDS. "#EC CI_GENBUFF "#EC CI_SUBRC
ENDIF.
SORT et_tadir BY devclass pgmid object obj_name.
ENDMETHOD.
METHOD skip_objects.
" Todo, replace with solution that will work with any object type (might depend on iv_package and io_dot)
DATA lo_skip_objects TYPE REF TO zcl_abapgit_skip_objects.
CREATE OBJECT lo_skip_objects.
ct_tadir = lo_skip_objects->skip_sadl_generated_objects(
it_tadir = ct_tadir
ii_log = ii_log ).
ENDMETHOD.
METHOD zif_abapgit_tadir~get_object_package.
DATA: ls_tadir TYPE zif_abapgit_definitions=>ty_tadir,
ls_item TYPE zif_abapgit_definitions=>ty_item.
ls_tadir = zif_abapgit_tadir~read_single(
iv_pgmid = iv_pgmid
iv_object = iv_object
iv_obj_name = iv_obj_name ).
IF ls_tadir-delflag = 'X'.
RETURN. "Mark for deletion -> return nothing
ENDIF.
ls_item-obj_type = ls_tadir-object.
ls_item-obj_name = ls_tadir-obj_name.
ls_item-devclass = ls_tadir-devclass.
IF exists( ls_item ) = abap_false.
RETURN.
ENDIF.
rv_devclass = ls_tadir-devclass.
ENDMETHOD.
METHOD zif_abapgit_tadir~read.
DATA: li_exit TYPE REF TO zif_abapgit_exit.
" Start recursion
" hmm, some problems here, should TADIR also build path?
rt_tadir = build(
iv_package = iv_package
io_dot = io_dot
iv_ignore_subpackages = iv_ignore_subpackages
iv_only_local_objects = iv_only_local_objects
ii_log = ii_log ).
li_exit = zcl_abapgit_exit=>get_instance( ).
li_exit->change_tadir(
EXPORTING
iv_package = iv_package
ii_log = ii_log
CHANGING
ct_tadir = rt_tadir ).
rt_tadir = check_exists( rt_tadir ).
ENDMETHOD.
METHOD zif_abapgit_tadir~read_single.
SELECT SINGLE * FROM tadir INTO CORRESPONDING FIELDS OF rs_tadir
WHERE pgmid = iv_pgmid
AND object = iv_object
AND obj_name = iv_obj_name. "#EC CI_SUBRC
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
83,
324,
343,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
198,
220,
10188,
9864,
1847,
48167,
1677,
5258,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
83,
324,
343,
764,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
7160,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
9186,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
1069,
1023,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
337,
36252,
50,
2198,
62,
1069,
1023,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
83,
324,
343,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
83,
324,
343,
62,
926,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
83,
324,
343,
8,
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,
337,
36252,
50,
1382,
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,
41876,
36264,
343,
12,
7959,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
26518,
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,
26518,
62,
397,
499,
18300,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
46430,
62,
7266,
43789,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8807,
62,
12001,
62,
48205,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
6404,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
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,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
83,
324,
343,
8,
220,
220,
220,
220,
220,
220,
220,
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,
337,
36252,
50,
2922,
62,
48205,
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,
41876,
36264,
343,
12,
7959,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
46430,
62,
7266,
43789,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8807,
62,
12001,
62,
48205,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
316,
62,
43789,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
82,
499,
62,
26495,
14804,
774,
62,
7959,
4871,
62,
926,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
316,
62,
83,
324,
343,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
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,
337,
36252,
50,
14267,
62,
48205,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
41876,
36264,
343,
12,
7959,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
26518,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
6404,
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,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
310,
62,
83,
324,
343,
220,
220,
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,
337,
36252,
50,
751,
62,
12001,
62,
43789,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
43789,
41876,
1976,
361,
62,
397,
499,
18300,
62,
82,
499,
62,
26495,
14804,
774,
62,
7959,
4871,
62,
926,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
310,
62,
83,
324,
343,
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,
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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
] |
CLASS zcl_aoc_check_11 DEFINITION
PUBLIC
INHERITING FROM zcl_aoc_super
CREATE PUBLIC.
PUBLIC SECTION.
METHODS constructor.
METHODS check
REDEFINITION.
METHODS get_attributes
REDEFINITION.
METHODS get_message_text
REDEFINITION.
METHODS if_ci_test~query_attributes
REDEFINITION.
METHODS put_attributes
REDEFINITION.
PROTECTED SECTION.
DATA mv_skipc TYPE flag.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_AOC_CHECK_11 IMPLEMENTATION.
METHOD check.
* abapOpenChecks
* https://github.com/larshp/abapOpenChecks
* MIT License
DATA: lv_position TYPE i,
lv_include TYPE program,
lv_prev_row TYPE token_row,
lv_prev_level TYPE stmnt_levl,
lv_prev_inform_row TYPE token_row,
lv_prev_inform_level TYPE stmnt_levl.
FIELD-SYMBOLS: <ls_statement> LIKE LINE OF io_scan->statements,
<ls_token_to> LIKE LINE OF io_scan->tokens,
<ls_level> LIKE LINE OF io_scan->levels,
<ls_token_from> LIKE LINE OF io_scan->tokens.
LOOP AT io_scan->statements ASSIGNING <ls_statement>
WHERE terminator = '.'
AND type <> io_scan->gc_statement-pragma.
lv_position = sy-tabix.
IF <ls_statement>-from > <ls_statement>-to.
CONTINUE.
ENDIF.
READ TABLE io_scan->tokens ASSIGNING <ls_token_to> INDEX <ls_statement>-to.
CHECK sy-subrc = 0.
READ TABLE io_scan->tokens ASSIGNING <ls_token_from> INDEX <ls_statement>-from.
CHECK sy-subrc = 0.
IF <ls_statement>-level = lv_prev_level AND <ls_token_from>-row = lv_prev_row.
READ TABLE io_scan->levels ASSIGNING <ls_level> INDEX <ls_statement>-level.
IF sy-subrc = 0 AND ( <ls_level>-type = io_scan->gc_level-macro_define
OR <ls_level>-type = io_scan->gc_level-macro_trmac ).
CONTINUE.
ENDIF.
lv_include = io_scan->get_include( <ls_statement>-level ).
IF mv_skipc = abap_true
AND is_class_definition( lv_include ) = abap_true.
CONTINUE. " current loop
ENDIF.
IF lv_prev_inform_row <> <ls_token_from>-row
OR lv_prev_inform_level <> <ls_statement>-level.
inform( p_sub_obj_name = lv_include
p_position = lv_position
p_line = <ls_token_from>-row
p_kind = mv_errty
p_test = myname
p_code = '001' ).
ENDIF.
lv_prev_inform_row = <ls_token_from>-row.
lv_prev_inform_level = <ls_statement>-level.
ENDIF.
lv_prev_row = <ls_token_to>-row.
lv_prev_level = <ls_statement>-level.
ENDLOOP.
ENDMETHOD.
METHOD constructor.
super->constructor( ).
version = '002'.
position = '011'.
has_attributes = abap_true.
attributes_ok = abap_true.
enable_rfc( ).
set_uses_checksum( ).
mv_skipc = abap_true.
ENDMETHOD.
METHOD get_attributes.
EXPORT
mv_errty = mv_errty
mv_skipc = mv_skipc
TO DATA BUFFER p_attributes.
ENDMETHOD.
METHOD get_message_text.
CLEAR p_text.
CASE p_code.
WHEN '001'.
p_text = 'Max one statement per line'. "#EC NOTEXT
WHEN OTHERS.
super->get_message_text( EXPORTING p_test = p_test
p_code = p_code
IMPORTING p_text = p_text ).
ENDCASE.
ENDMETHOD. "GET_MESSAGE_TEXT
METHOD if_ci_test~query_attributes.
zzaoc_top.
zzaoc_fill_att mv_errty 'Error Type' ''. "#EC NOTEXT
zzaoc_fill_att mv_skipc 'Skip global class definitions' 'C'. "#EC NOTEXT
zzaoc_popup.
ENDMETHOD.
METHOD put_attributes.
IMPORT
mv_errty = mv_errty
mv_skipc = mv_skipc
FROM DATA BUFFER p_attributes. "#EC CI_USE_WANTED
ASSERT sy-subrc = 0.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
64,
420,
62,
9122,
62,
1157,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
64,
420,
62,
16668,
198,
220,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
13,
628,
220,
220,
220,
337,
36252,
50,
2198,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
1078,
7657,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
20500,
62,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
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,
13,
198,
220,
220,
220,
337,
36252,
50,
1234,
62,
1078,
7657,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
42865,
285,
85,
62,
48267,
66,
41876,
6056,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
4503,
62,
50084,
62,
1157,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
2198,
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,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
9150,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
17256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1430,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
47050,
62,
808,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
11241,
62,
808,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
47050,
62,
5715,
220,
220,
220,
220,
220,
220,
220,
41876,
336,
76,
429,
62,
2768,
75,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
47050,
62,
259,
687,
62,
808,
220,
220,
41876,
11241,
62,
808,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
47050,
62,
259,
687,
62,
5715,
41876,
336,
76,
429,
62,
2768,
75,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
26090,
29,
220,
34178,
48920,
3963,
33245,
62,
35836,
3784,
14269,
3196,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
30001,
62,
1462,
29,
220,
220,
34178,
48920,
3963,
33245,
62,
35836,
3784,
83,
482,
641,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
5715,
29,
220,
220,
220,
220,
220,
34178,
48920,
3963,
33245,
62,
35836,
3784,
46170,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
30001,
62,
6738,
29,
34178,
48920,
3963,
33245,
62,
35836,
3784,
83,
482,
641,
13,
628,
198,
220,
220,
220,
17579,
3185,
5161,
33245,
62,
35836,
3784,
14269,
3196,
24994,
3528,
15871,
1279,
7278,
62,
26090,
29,
198,
220,
220,
220,
220,
220,
220,
220,
33411,
5651,
1352,
796,
705,
2637,
198,
220,
220,
220,
220,
220,
220,
220,
5357,
2099,
1279,
29,
33245,
62,
35836,
3784,
36484,
62,
26090,
12,
1050,
363,
2611,
13,
628,
220,
220,
220,
220,
220,
300,
85,
62,
9150,
796,
827,
12,
8658,
844,
13,
628,
220,
220,
220,
220,
220,
16876,
1279,
7278,
62,
26090,
29,
12,
6738,
1875,
1279,
7278,
62,
26090,
29,
12,
1462,
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,
20832,
43679,
33245,
62,
35836,
3784,
83,
482,
641,
24994,
3528,
15871,
1279,
7278,
62,
30001,
62,
1462,
29,
24413,
6369,
1279,
7278,
62,
26090,
29,
12,
1462,
13,
198,
220,
220,
220,
220,
220,
5870,
25171,
827,
12,
7266,
6015,
796,
657,
13,
628,
220,
220,
220,
220,
220,
20832,
43679,
33245,
62,
35836,
3784,
83,
482,
641,
24994,
3528,
15871,
1279,
7278,
62,
30001,
62,
6738,
29,
24413,
6369,
1279,
7278,
62,
26090,
29,
12,
6738,
13,
198,
220,
220,
220,
220,
220,
5870,
25171,
827,
12,
7266,
6015,
796,
657,
13,
628,
220,
220,
220,
220,
220,
16876,
1279,
7278,
62,
26090,
29,
12,
5715,
796,
300,
85,
62,
47050,
62,
5715,
5357,
1279,
7278,
62,
30001,
62,
6738,
29,
12,
808,
796,
300,
85,
62,
47050,
62,
808,
13,
198,
220,
220,
220,
220,
220,
220,
220,
20832,
43679,
33245,
62,
35836,
3784,
46170,
24994,
3528,
15871,
1279,
7278,
62,
5715,
29,
24413,
6369,
1279,
7278,
62,
26090,
29,
12,
5715,
13,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
5357,
357,
1279,
7278,
62,
5715,
29,
12,
4906,
796,
33245,
62,
35836,
3784,
36484,
62,
5715,
12,
20285,
305,
62,
13086,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6375,
1279,
7278,
62,
5715,
29,
12,
4906,
796,
33245,
62,
35836,
3784,
36484,
62,
5715,
12,
20285,
305,
62,
2213,
20285,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
17256,
796,
33245,
62,
35836,
3784,
1136,
62,
17256,
7,
1279,
7278,
62,
26090,
29,
12,
5715,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
285,
85,
62,
48267,
66,
796,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
318,
62,
4871,
62,
46758,
7,
300,
85,
62,
17256,
1267,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
CLASS zcl_as_directory_mock DEFINITION PUBLIC CREATE PUBLIC INHERITING FROM zcl_as_directory.
PUBLIC SECTION.
METHODS:
set_mock_ref IMPORTING ir_ref TYPE REF TO zif_dir_service=>tt_mock_dir_data.
DATA: mr_mock_table TYPE REF TO zif_dir_service=>tt_mock_dir_data READ-ONLY.
PROTECTED SECTION.
METHODS:
read_sub_elements REDEFINITION,
read_dir_cont_via_ext REDEFINITION.
ENDCLASS.
CLASS ZCL_AS_DIRECTORY_MOCK IMPLEMENTATION.
METHOD read_dir_cont_via_ext.
DATA: lv_dir_name TYPE epsf-epsdirnam,
lv_file_counter TYPE epsf-epsfilsiz,
lv_error_counter TYPE epsf-epsfilsiz.
FIELD-SYMBOLS: <mock_table> TYPE zif_dir_service=>tt_mock_dir_data.
TRY.
mo_directory_service->read_directory_content(
EXPORTING
iv_dir_name = CONV eps2filnam( mv_base_path )
* file_mask = space
IMPORTING
dir_name = lv_dir_name
file_counter = lv_file_counter
error_counter = lv_error_counter
e_dir_list = mt_file_list
).
ASSIGN mr_mock_table->* TO <mock_table>.
INSERT VALUE #( i_dir_name = mv_base_path dir_name = lv_dir_name e_dir_list = mt_file_list ) INTO TABLE <mock_table>.
CATCH zcx_file_err. " zcx_file_err
mv_err_read = abap_true.
ENDTRY.
ENDMETHOD.
METHOD read_sub_elements.
DATA: lo_sub_dir TYPE REF TO zcl_as_directory_mock,
lo_file TYPE REF TO zcl_as_file.
LOOP AT mt_file_list ASSIGNING FIELD-SYMBOL(<sub_dir>) WHERE is_dir EQ abap_true.
lo_sub_dir = NEW #( io_dir_service = mo_directory_service iv_base_path = |{ mv_base_path }{ mo_fs_path->parse_separator_actual }{ <sub_dir>-name }| it_comp = mt_components iv_is_root = abap_false ).
*** Referenz auf Tabelle durchreichen (->Durch Rekursion fortschreiben)
lo_sub_dir->set_mock_ref( ir_ref = mr_mock_table ).
lo_sub_dir->read_dir_content( iv_continue_if_err ).
lo_sub_dir->set_size( CONV #( <sub_dir>-size / 1000 ) ).
lo_sub_dir->set_changed( CONV #( |{ <sub_dir>-mtim+6(4) }{ <sub_dir>-mtim+3(2) }{ <sub_dir>-mtim(2) }| ) ).
APPEND lo_sub_dir TO mt_content.
ENDLOOP.
*** -> beim generieren der Mock-Daten ist das nicht notwendig!
* LOOP AT mt_file_list ASSIGNING FIELD-SYMBOL(<file>) WHERE is_dir = abap_false.
* lo_file = NEW #( iv_base_path = |{ mv_base_path }{ mo_fs_path->parse_separator_actual }{ <file>-name }| it_comp = mt_components ).
* lo_file->set_size( CONV #( <file>-size / 1000 ) ).
* lo_file->set_changed( CONV #( |{ <file>-mtim+6(4) }{ <file>-mtim+3(2) }{ <file>-mtim(2) }| ) ).
* APPEND lo_file TO mt_content.
* ENDLOOP.
ENDMETHOD.
METHOD set_mock_ref.
mr_mock_table = ir_ref.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
292,
62,
34945,
62,
76,
735,
5550,
20032,
17941,
44731,
29244,
6158,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
292,
62,
34945,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
900,
62,
76,
735,
62,
5420,
30023,
9863,
2751,
4173,
62,
5420,
41876,
4526,
37,
5390,
1976,
361,
62,
15908,
62,
15271,
14804,
926,
62,
76,
735,
62,
15908,
62,
7890,
13,
198,
220,
220,
220,
42865,
25,
285,
81,
62,
76,
735,
62,
11487,
41876,
4526,
37,
5390,
1976,
361,
62,
15908,
62,
15271,
14804,
926,
62,
76,
735,
62,
15908,
62,
7890,
20832,
12,
1340,
11319,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1100,
62,
7266,
62,
68,
3639,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
1100,
62,
15908,
62,
3642,
62,
8869,
62,
2302,
23848,
36,
20032,
17941,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
1921,
62,
17931,
23988,
15513,
62,
44,
11290,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1100,
62,
15908,
62,
3642,
62,
8869,
62,
2302,
13,
198,
220,
220,
220,
42865,
25,
300,
85,
62,
15908,
62,
3672,
220,
220,
220,
220,
220,
41876,
304,
862,
69,
12,
25386,
15908,
7402,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
7753,
62,
24588,
220,
41876,
304,
862,
69,
12,
25386,
69,
4487,
528,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
18224,
62,
24588,
41876,
304,
862,
69,
12,
25386,
69,
4487,
528,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
76,
735,
62,
11487,
29,
41876,
1976,
361,
62,
15908,
62,
15271,
14804,
926,
62,
76,
735,
62,
15908,
62,
7890,
13,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
6941,
62,
34945,
62,
15271,
3784,
961,
62,
34945,
62,
11299,
7,
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,
21628,
62,
15908,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
7102,
53,
304,
862,
17,
10379,
7402,
7,
285,
85,
62,
8692,
62,
6978,
1267,
198,
9,
220,
220,
220,
220,
220,
220,
2393,
62,
27932,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
2272,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26672,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
15908,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
62,
24588,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
7753,
62,
24588,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
24588,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
18224,
62,
24588,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
62,
15908,
62,
4868,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
45079,
62,
7753,
62,
4868,
198,
220,
220,
220,
220,
220,
220,
220,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
24994,
16284,
285,
81,
62,
76,
735,
62,
11487,
3784,
9,
5390,
1279,
76,
735,
62,
11487,
28401,
198,
220,
220,
220,
220,
220,
220,
220,
29194,
17395,
26173,
8924,
1303,
7,
1312,
62,
15908,
62,
3672,
796,
285,
85,
62,
8692,
62,
6978,
26672,
62,
3672,
796,
300,
85,
62,
15908,
62,
3672,
304,
62,
15908,
62,
4868,
796,
45079,
62,
7753,
62,
4868,
1267,
39319,
43679,
1279,
76,
735,
62,
11487,
28401,
198,
220,
220,
220,
220,
220,
327,
11417,
1976,
66,
87,
62,
7753,
62,
8056,
13,
366,
1976,
66,
87,
62,
7753,
62,
8056,
198,
220,
220,
220,
220,
220,
220,
220,
285,
85,
62,
8056,
62,
961,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
23578,
40405,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1100,
62,
7266,
62,
68,
3639,
13,
198,
220,
220,
220,
42865,
25,
2376,
62,
7266,
62,
15908,
41876,
4526,
37,
5390,
1976,
565,
62,
292,
62,
34945,
62,
76,
735,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
7753,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
292,
62,
7753,
13,
198,
220,
220,
220,
17579,
3185,
5161,
45079,
62,
7753,
62,
4868,
24994,
3528,
15871,
18930,
24639,
12,
23060,
10744,
3535,
7,
27,
7266,
62,
15908,
43734,
33411,
318,
62,
15908,
36529,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
220,
220,
2376,
62,
7266,
62,
15908,
796,
12682,
1303,
7,
33245,
62,
15908,
62,
15271,
796,
6941,
62,
34945,
62,
15271,
21628,
62,
8692,
62,
6978,
796,
930,
90,
285,
85,
62,
8692,
62,
6978,
1782,
90,
6941,
62,
9501,
62,
6978,
3784,
29572,
62,
25512,
1352,
62,
50039,
1782,
90,
1279,
7266,
62,
15908,
29,
12,
3672,
1782,
91,
340,
62,
5589,
796,
45079,
62,
5589,
3906,
21628,
62,
271,
62,
15763,
796,
450,
499,
62,
9562,
6739,
198,
8162,
6524,
14226,
89,
257,
3046,
309,
9608,
293,
288,
2575,
260,
41437,
357,
3784,
35,
2575,
797,
74,
24197,
329,
912,
354,
260,
571,
268,
8,
198,
220,
220,
220,
220,
220,
2376,
62,
7266,
62,
15908,
3784,
2617,
62,
76,
735,
62,
5420,
7,
4173,
62,
5420,
796,
285,
81,
62,
76,
735,
62,
11487,
6739,
198,
220,
220,
220,
220,
220,
2376,
62,
7266,
62,
15908,
3784,
961,
62,
15908,
62,
11299,
7,
21628,
62,
43043,
62,
361,
62,
8056,
6739,
198,
220,
220,
220,
220,
220,
2376,
62,
7266,
62,
15908,
3784,
2617,
62,
7857,
7,
7102,
53,
1303,
7,
1279,
7266,
62,
15908,
29,
12,
7857,
1220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
INTERFACE if_ci_atc_finding_stack
PUBLIC.
TYPES:
BEGIN OF ty_stack_statement,
text TYPE string,
statement TYPE if_ci_atc_source_code_provider=>ty_statement,
END OF ty_stack_statement.
TYPES ty_stack_statements TYPE STANDARD TABLE OF ty_stack_statement WITH EMPTY KEY.
METHODS push_statement
IMPORTING statement TYPE ty_stack_statement.
METHODS pop_statement
RETURNING VALUE(statement) TYPE ty_stack_statement.
METHODS peek_statement
RETURNING VALUE(statement) TYPE ty_stack_statement.
METHODS peek_full_stack
RETURNING VALUE(statements) TYPE ty_stack_statements.
ENDINTERFACE.
| [
41358,
49836,
611,
62,
979,
62,
265,
66,
62,
41070,
62,
25558,
198,
220,
44731,
13,
628,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
347,
43312,
3963,
1259,
62,
25558,
62,
26090,
11,
198,
220,
220,
220,
220,
220,
2420,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
2643,
41876,
611,
62,
979,
62,
265,
66,
62,
10459,
62,
8189,
62,
15234,
1304,
14804,
774,
62,
26090,
11,
198,
220,
220,
220,
23578,
3963,
1259,
62,
25558,
62,
26090,
13,
198,
220,
24412,
47,
1546,
1259,
62,
25558,
62,
14269,
3196,
41876,
49053,
9795,
43679,
3963,
1259,
62,
25558,
62,
26090,
13315,
38144,
9936,
35374,
13,
198,
220,
337,
36252,
50,
4574,
62,
26090,
198,
220,
220,
220,
30023,
9863,
2751,
2643,
41876,
1259,
62,
25558,
62,
26090,
13,
198,
220,
337,
36252,
50,
1461,
62,
26090,
198,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
26090,
8,
41876,
1259,
62,
25558,
62,
26090,
13,
198,
220,
337,
36252,
50,
27185,
62,
26090,
198,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
26090,
8,
41876,
1259,
62,
25558,
62,
26090,
13,
198,
220,
337,
36252,
50,
27185,
62,
12853,
62,
25558,
198,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
14269,
3196,
8,
41876,
1259,
62,
25558,
62,
14269,
3196,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_popups DEFINITION
PUBLIC
FINAL
CREATE PRIVATE
GLOBAL FRIENDS zcl_abapgit_ui_factory.
PUBLIC SECTION.
INTERFACES: zif_abapgit_popups.
ALIASES:
popup_package_export FOR zif_abapgit_popups~popup_package_export,
popup_folder_logic FOR zif_abapgit_popups~popup_folder_logic,
popup_object FOR zif_abapgit_popups~popup_object,
create_branch_popup FOR zif_abapgit_popups~create_branch_popup,
repo_new_offline FOR zif_abapgit_popups~repo_new_offline,
branch_list_popup FOR zif_abapgit_popups~branch_list_popup,
repo_popup FOR zif_abapgit_popups~repo_popup,
popup_to_confirm FOR zif_abapgit_popups~popup_to_confirm,
popup_to_inform FOR zif_abapgit_popups~popup_to_inform,
popup_to_create_package FOR zif_abapgit_popups~popup_to_create_package,
popup_to_create_transp_branch FOR zif_abapgit_popups~popup_to_create_transp_branch,
popup_to_select_transports FOR zif_abapgit_popups~popup_to_select_transports,
popup_to_select_from_list FOR zif_abapgit_popups~popup_to_select_from_list,
branch_popup_callback FOR zif_abapgit_popups~branch_popup_callback,
package_popup_callback FOR zif_abapgit_popups~package_popup_callback,
popup_transport_request FOR zif_abapgit_popups~popup_transport_request,
popup_proxy_bypass FOR zif_abapgit_popups~popup_proxy_bypass.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
ty_sval_tt TYPE STANDARD TABLE OF sval WITH DEFAULT KEY.
CONSTANTS c_fieldname_selected TYPE lvc_fname VALUE `SELECTED` ##NO_TEXT.
CONSTANTS c_answer_cancel TYPE c LENGTH 1 VALUE 'A' ##NO_TEXT.
DATA mo_select_list_popup TYPE REF TO cl_salv_table .
DATA mr_table TYPE REF TO data .
DATA mv_cancel TYPE abap_bool VALUE abap_false.
DATA mo_table_descr TYPE REF TO cl_abap_tabledescr .
METHODS add_field
IMPORTING
!iv_tabname TYPE sval-tabname
!iv_fieldname TYPE sval-fieldname
!iv_fieldtext TYPE sval-fieldtext
!iv_value TYPE clike DEFAULT ''
!iv_field_attr TYPE sval-field_attr DEFAULT ''
!iv_obligatory TYPE spo_obl OPTIONAL
CHANGING
!ct_fields TYPE ty_sval_tt .
METHODS create_new_table
IMPORTING
!it_list TYPE STANDARD TABLE .
METHODS get_selected_rows
EXPORTING
!et_list TYPE INDEX TABLE .
METHODS on_select_list_link_click
FOR EVENT link_click OF cl_salv_events_table
IMPORTING
!row
!column .
METHODS on_select_list_function_click
FOR EVENT added_function OF cl_salv_events_table
IMPORTING
!e_salv_function .
METHODS on_double_click
FOR EVENT double_click OF cl_salv_events_table
IMPORTING
!row
!column .
METHODS extract_field_values
IMPORTING
it_fields TYPE ty_sval_tt
EXPORTING
ev_url TYPE abaptxt255-line
ev_package TYPE tdevc-devclass
ev_branch TYPE textl-line
ev_display_name TYPE trm255-text
ev_folder_logic TYPE string
ev_ign_subpkg TYPE abap_bool
ev_master_lang_only TYPE abap_bool.
TYPES:
ty_lt_fields TYPE STANDARD TABLE OF sval WITH DEFAULT KEY.
METHODS _popup_3_get_values
IMPORTING iv_popup_title TYPE string
iv_no_value_check TYPE abap_bool DEFAULT abap_false
EXPORTING ev_value_1 TYPE spo_value
ev_value_2 TYPE spo_value
ev_value_3 TYPE spo_value
CHANGING ct_fields TYPE ty_lt_fields
RAISING zcx_abapgit_exception.
METHODS validate_folder_logic
IMPORTING
iv_folder_logic TYPE string
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS ZCL_ABAPGIT_POPUPS IMPLEMENTATION.
METHOD add_field.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF ct_fields.
APPEND INITIAL LINE TO ct_fields ASSIGNING <ls_field>.
<ls_field>-tabname = iv_tabname.
<ls_field>-fieldname = iv_fieldname.
<ls_field>-fieldtext = iv_fieldtext.
<ls_field>-value = iv_value.
<ls_field>-field_attr = iv_field_attr.
<ls_field>-field_obl = iv_obligatory.
ENDMETHOD.
METHOD create_new_table.
" create and populate a table on the fly derived from
" it_data with a select column
DATA: lr_struct TYPE REF TO data,
lt_components TYPE cl_abap_structdescr=>component_table,
lo_struct_descr TYPE REF TO cl_abap_structdescr,
lo_struct_descr2 TYPE REF TO cl_abap_structdescr.
FIELD-SYMBOLS: <lt_table> TYPE STANDARD TABLE,
<ls_component> TYPE abap_componentdescr,
<lg_line> TYPE data,
<lg_data> TYPE any.
mo_table_descr ?= cl_abap_tabledescr=>describe_by_data( it_list ).
lo_struct_descr ?= mo_table_descr->get_table_line_type( ).
lt_components = lo_struct_descr->get_components( ).
INSERT INITIAL LINE INTO lt_components ASSIGNING <ls_component> INDEX 1.
ASSERT sy-subrc = 0.
<ls_component>-name = c_fieldname_selected.
<ls_component>-type ?= cl_abap_datadescr=>describe_by_name( 'FLAG' ).
lo_struct_descr2 = cl_abap_structdescr=>create( lt_components ).
mo_table_descr = cl_abap_tabledescr=>create( lo_struct_descr2 ).
CREATE DATA mr_table TYPE HANDLE mo_table_descr.
ASSIGN mr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
CREATE DATA lr_struct TYPE HANDLE lo_struct_descr2.
ASSIGN lr_struct->* TO <lg_line>.
ASSERT sy-subrc = 0.
LOOP AT it_list ASSIGNING <lg_data>.
CLEAR <lg_line>.
MOVE-CORRESPONDING <lg_data> TO <lg_line>.
INSERT <lg_line> INTO TABLE <lt_table>.
ENDLOOP.
ENDMETHOD.
METHOD extract_field_values.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF it_fields.
CLEAR: ev_url,
ev_package,
ev_branch,
ev_display_name,
ev_folder_logic,
ev_ign_subpkg.
READ TABLE it_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_url = <ls_field>-value.
READ TABLE it_fields INDEX 2 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_package = <ls_field>-value.
TRANSLATE ev_package TO UPPER CASE.
READ TABLE it_fields INDEX 3 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_branch = <ls_field>-value.
READ TABLE it_fields INDEX 4 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_display_name = <ls_field>-value.
READ TABLE it_fields INDEX 5 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_folder_logic = <ls_field>-value.
TRANSLATE ev_folder_logic TO UPPER CASE.
READ TABLE it_fields INDEX 6 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_ign_subpkg = <ls_field>-value.
TRANSLATE ev_ign_subpkg TO UPPER CASE.
READ TABLE it_fields INDEX 7 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_master_lang_only = <ls_field>-value.
ENDMETHOD.
METHOD get_selected_rows.
DATA: lv_condition TYPE string,
lr_exporting TYPE REF TO data.
FIELD-SYMBOLS: <lg_exporting> TYPE any,
<lt_table> TYPE STANDARD TABLE,
<lg_line> TYPE any,
<lv_selected> TYPE abap_bool,
<lv_selected_row> TYPE LINE OF salv_t_row.
DATA: lo_selections TYPE REF TO cl_salv_selections,
lt_selected_rows TYPE salv_t_row.
ASSIGN mr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
lo_selections = mo_select_list_popup->get_selections( ).
IF lo_selections->get_selection_mode( ) = if_salv_c_selection_mode=>single.
lt_selected_rows = lo_selections->get_selected_rows( ).
LOOP AT lt_selected_rows ASSIGNING <lv_selected_row>.
READ TABLE <lt_table>
ASSIGNING <lg_line>
INDEX <lv_selected_row>.
CHECK <lv_selected_row> IS ASSIGNED.
ASSIGN COMPONENT c_fieldname_selected
OF STRUCTURE <lg_line>
TO <lv_selected>.
CHECK <lv_selected> IS ASSIGNED.
<lv_selected> = abap_true.
ENDLOOP.
ENDIF.
lv_condition = |{ c_fieldname_selected } = ABAP_TRUE|.
CREATE DATA lr_exporting LIKE LINE OF et_list.
ASSIGN lr_exporting->* TO <lg_exporting>.
LOOP AT <lt_table> ASSIGNING <lg_line> WHERE (lv_condition).
CLEAR <lg_exporting>.
MOVE-CORRESPONDING <lg_line> TO <lg_exporting>.
APPEND <lg_exporting> TO et_list.
ENDLOOP.
ENDMETHOD.
METHOD on_double_click.
DATA: lo_selections TYPE REF TO cl_salv_selections.
lo_selections = mo_select_list_popup->get_selections( ).
IF lo_selections->get_selection_mode( ) = if_salv_c_selection_mode=>single.
mo_select_list_popup->close_screen( ).
ENDIF.
ENDMETHOD.
METHOD on_select_list_function_click.
FIELD-SYMBOLS: <lt_table> TYPE STANDARD TABLE,
<lg_line> TYPE any,
<lv_selected> TYPE abap_bool.
ASSIGN mr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
CASE e_salv_function.
WHEN 'O.K.'.
mv_cancel = abap_false.
mo_select_list_popup->close_screen( ).
WHEN 'ABR'.
"Canceled: clear list to overwrite nothing
CLEAR <lt_table>.
mv_cancel = abap_true.
mo_select_list_popup->close_screen( ).
WHEN 'SALL'.
LOOP AT <lt_table> ASSIGNING <lg_line>.
ASSIGN COMPONENT c_fieldname_selected
OF STRUCTURE <lg_line>
TO <lv_selected>.
ASSERT sy-subrc = 0.
<lv_selected> = abap_true.
ENDLOOP.
mo_select_list_popup->refresh( ).
WHEN 'DSEL'.
LOOP AT <lt_table> ASSIGNING <lg_line>.
ASSIGN COMPONENT c_fieldname_selected
OF STRUCTURE <lg_line>
TO <lv_selected>.
ASSERT sy-subrc = 0.
<lv_selected> = abap_false.
ENDLOOP.
mo_select_list_popup->refresh( ).
WHEN OTHERS.
CLEAR <lt_table>.
mo_select_list_popup->close_screen( ).
ENDCASE.
ENDMETHOD.
METHOD on_select_list_link_click.
FIELD-SYMBOLS: <lt_table> TYPE STANDARD TABLE,
<lg_line> TYPE any,
<lv_selected> TYPE abap_bool.
ASSIGN mr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
READ TABLE <lt_table> ASSIGNING <lg_line> INDEX row.
IF sy-subrc = 0.
ASSIGN COMPONENT c_fieldname_selected
OF STRUCTURE <lg_line>
TO <lv_selected>.
ASSERT sy-subrc = 0.
IF <lv_selected> = abap_true.
<lv_selected> = abap_false.
ELSE.
<lv_selected> = abap_true.
ENDIF.
ENDIF.
mo_select_list_popup->refresh( ).
ENDMETHOD.
METHOD validate_folder_logic.
IF iv_folder_logic <> zif_abapgit_dot_abapgit=>c_folder_logic-prefix
AND iv_folder_logic <> zif_abapgit_dot_abapgit=>c_folder_logic-full.
zcx_abapgit_exception=>raise( |Invalid folder logic { iv_folder_logic }. |
&& |Choose either { zif_abapgit_dot_abapgit=>c_folder_logic-prefix } |
&& |or { zif_abapgit_dot_abapgit=>c_folder_logic-full } | ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_popups~branch_list_popup.
DATA: lo_branches TYPE REF TO zcl_abapgit_git_branch_list,
lt_branches TYPE zif_abapgit_definitions=>ty_git_branch_list_tt,
lv_answer TYPE c LENGTH 1,
lv_default TYPE i,
lv_head_suffix TYPE string,
lv_head_symref TYPE string,
lv_text TYPE string,
lt_selection TYPE TABLE OF spopli.
FIELD-SYMBOLS: <ls_sel> LIKE LINE OF lt_selection,
<ls_branch> LIKE LINE OF lt_branches.
lo_branches = zcl_abapgit_git_transport=>branches( iv_url ).
lt_branches = lo_branches->get_branches_only( ).
lv_head_suffix = | ({ zif_abapgit_definitions=>c_head_name })|.
lv_head_symref = lo_branches->get_head_symref( ).
IF iv_hide_branch IS NOT INITIAL.
DELETE lt_branches WHERE name = iv_hide_branch.
ENDIF.
IF iv_hide_head IS NOT INITIAL.
DELETE lt_branches WHERE name = zif_abapgit_definitions=>c_head_name
OR is_head = abap_true.
ENDIF.
IF lt_branches IS INITIAL.
IF iv_hide_head IS NOT INITIAL.
lv_text = 'master'.
ENDIF.
IF iv_hide_branch IS NOT INITIAL AND iv_hide_branch <> 'refs/heads/master'.
IF lv_text IS INITIAL.
lv_text = iv_hide_branch && ' is'.
ELSE.
CONCATENATE lv_text 'and' iv_hide_branch 'are' INTO lv_text SEPARATED BY space.
ENDIF.
ELSE.
lv_text = lv_text && ' is'.
ENDIF.
IF lv_text IS NOT INITIAL.
zcx_abapgit_exception=>raise( 'No branches available to select (' && lv_text && ' hidden)' ).
ELSE.
zcx_abapgit_exception=>raise( 'No branches are available to select' ).
ENDIF.
ENDIF.
LOOP AT lt_branches ASSIGNING <ls_branch>.
CHECK <ls_branch>-name IS NOT INITIAL. " To ensure some below ifs
IF <ls_branch>-is_head = abap_true.
IF <ls_branch>-name = zif_abapgit_definitions=>c_head_name. " HEAD
IF <ls_branch>-name <> lv_head_symref AND lv_head_symref IS NOT INITIAL.
" HEAD but other HEAD symref exists - ignore
CONTINUE.
ELSE.
INSERT INITIAL LINE INTO lt_selection INDEX 1 ASSIGNING <ls_sel>.
<ls_sel>-varoption = <ls_branch>-name.
ENDIF.
ELSE.
INSERT INITIAL LINE INTO lt_selection INDEX 1 ASSIGNING <ls_sel>.
<ls_sel>-varoption = <ls_branch>-display_name && lv_head_suffix.
ENDIF.
IF lv_default > 0. " Shift down default if set
lv_default = lv_default + 1.
ENDIF.
ELSE.
APPEND INITIAL LINE TO lt_selection ASSIGNING <ls_sel>.
<ls_sel>-varoption = <ls_branch>-display_name.
ENDIF.
IF <ls_branch>-name = iv_default_branch.
IF <ls_branch>-is_head = abap_true.
lv_default = 1.
ELSE.
lv_default = sy-tabix.
ENDIF.
ENDIF.
ENDLOOP.
IF iv_show_new_option = abap_true.
APPEND INITIAL LINE TO lt_selection ASSIGNING <ls_sel>.
<ls_sel>-varoption = zif_abapgit_popups=>c_new_branch_label.
ENDIF.
CALL FUNCTION 'POPUP_TO_DECIDE_LIST'
EXPORTING
textline1 = 'Select branch'
titel = 'Select branch'
start_col = 30
start_row = 5
cursorline = lv_default
IMPORTING
answer = lv_answer
TABLES
t_spopli = lt_selection
EXCEPTIONS
OTHERS = 1. "#EC NOTEXT
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Error from POPUP_TO_DECIDE_LIST' ).
ENDIF.
IF lv_answer = c_answer_cancel.
RETURN.
ENDIF.
READ TABLE lt_selection ASSIGNING <ls_sel> WITH KEY selflag = abap_true.
ASSERT sy-subrc = 0.
IF iv_show_new_option = abap_true AND <ls_sel>-varoption = zif_abapgit_popups=>c_new_branch_label.
rs_branch-name = zif_abapgit_popups=>c_new_branch_label.
ELSE.
REPLACE FIRST OCCURRENCE OF lv_head_suffix IN <ls_sel>-varoption WITH ''.
READ TABLE lt_branches WITH KEY display_name = <ls_sel>-varoption ASSIGNING <ls_branch>.
IF sy-subrc <> 0.
* branch name longer than 65 characters
LOOP AT lt_branches ASSIGNING <ls_branch> WHERE display_name CS <ls_sel>-varoption.
EXIT. " current loop
ENDLOOP.
ENDIF.
ASSERT <ls_branch> IS ASSIGNED.
rs_branch = lo_branches->find_by_name( <ls_branch>-name ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_popups~branch_popup_callback.
DATA: lv_url TYPE string,
ls_package_data TYPE scompkdtln,
ls_branch TYPE zif_abapgit_definitions=>ty_git_branch,
lv_create TYPE abap_bool,
lv_text TYPE string.
FIELD-SYMBOLS: <ls_furl> LIKE LINE OF ct_fields,
<ls_fbranch> LIKE LINE OF ct_fields,
<ls_fpackage> LIKE LINE OF ct_fields.
CLEAR cs_error.
IF iv_code = 'COD1'.
cv_show_popup = abap_true.
READ TABLE ct_fields ASSIGNING <ls_furl> WITH KEY tabname = 'ABAPTXT255'.
IF sy-subrc <> 0 OR <ls_furl>-value IS INITIAL.
MESSAGE 'Fill URL' TYPE 'S' DISPLAY LIKE 'E'. "#EC NOTEXT
RETURN.
ENDIF.
lv_url = <ls_furl>-value.
ls_branch = branch_list_popup( lv_url ).
IF ls_branch IS INITIAL.
RETURN.
ENDIF.
READ TABLE ct_fields ASSIGNING <ls_fbranch> WITH KEY tabname = 'TEXTL'.
ASSERT sy-subrc = 0.
<ls_fbranch>-value = ls_branch-name.
ELSEIF iv_code = 'COD2'.
cv_show_popup = abap_true.
READ TABLE ct_fields ASSIGNING <ls_fpackage> WITH KEY fieldname = 'DEVCLASS'.
ASSERT sy-subrc = 0.
ls_package_data-devclass = <ls_fpackage>-value.
IF zcl_abapgit_factory=>get_sap_package( ls_package_data-devclass )->exists( ) = abap_true.
lv_text = |Package { ls_package_data-devclass } already exists|.
MESSAGE lv_text TYPE 'I' DISPLAY LIKE 'E'.
RETURN.
ENDIF.
popup_to_create_package(
IMPORTING
es_package_data = ls_package_data
ev_create = lv_create ).
IF lv_create = abap_false.
RETURN.
ENDIF.
zcl_abapgit_factory=>get_sap_package( ls_package_data-devclass )->create( ls_package_data ).
COMMIT WORK.
<ls_fpackage>-value = ls_package_data-devclass.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_popups~create_branch_popup.
DATA: lt_fields TYPE TABLE OF sval.
DATA: lv_name TYPE spo_value.
CLEAR: ev_name, ev_cancel.
add_field( EXPORTING iv_tabname = 'TEXTL'
iv_fieldname = 'LINE'
iv_fieldtext = 'Name'
iv_value = 'new-branch-name'
CHANGING ct_fields = lt_fields ).
TRY.
_popup_3_get_values( EXPORTING iv_popup_title = 'Create branch' "#EC NOTEXT
IMPORTING ev_value_1 = lv_name
CHANGING ct_fields = lt_fields ).
ev_name = zcl_abapgit_git_branch_list=>complete_heads_branch_name(
zcl_abapgit_git_branch_list=>normalize_branch_name( lv_name ) ).
CATCH zcx_abapgit_cancel.
ev_cancel = abap_true.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_popups~package_popup_callback.
DATA: ls_package_data TYPE scompkdtln,
lv_create TYPE abap_bool.
FIELD-SYMBOLS: <ls_fpackage> LIKE LINE OF ct_fields.
CLEAR cs_error.
IF iv_code = 'COD1'.
cv_show_popup = abap_true.
READ TABLE ct_fields ASSIGNING <ls_fpackage> WITH KEY fieldname = 'DEVCLASS'.
ASSERT sy-subrc = 0.
ls_package_data-devclass = <ls_fpackage>-value.
popup_to_create_package( IMPORTING es_package_data = ls_package_data
ev_create = lv_create ).
IF lv_create = abap_false.
RETURN.
ENDIF.
zcl_abapgit_factory=>get_sap_package( ls_package_data-devclass )->create( ls_package_data ).
COMMIT WORK.
<ls_fpackage>-value = ls_package_data-devclass.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_folder_logic.
DATA: lt_fields TYPE TABLE OF sval.
DATA: lv_folder_logic TYPE spo_value.
CLEAR: rv_folder_logic.
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'INTSYS'
iv_fieldtext = 'Folder logic'
iv_value = 'PREFIX'
CHANGING ct_fields = lt_fields ).
TRY.
_popup_3_get_values( EXPORTING iv_popup_title = 'Export package' "#EC NOTEXT
iv_no_value_check = abap_true
IMPORTING ev_value_1 = lv_folder_logic
CHANGING ct_fields = lt_fields ).
rv_folder_logic = to_upper( lv_folder_logic ).
CATCH zcx_abapgit_cancel.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_object.
DATA: lt_fields TYPE TABLE OF sval.
DATA: lv_object_type TYPE spo_value.
DATA: lv_object_name TYPE spo_value.
CLEAR: rs_tadir-object, rs_tadir-obj_name.
add_field( EXPORTING iv_tabname = 'TADIR'
iv_fieldname = 'OBJECT'
iv_fieldtext = 'Type'
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TADIR'
iv_fieldname = 'OBJ_NAME'
iv_fieldtext = 'Name'
CHANGING ct_fields = lt_fields ).
_popup_3_get_values( EXPORTING iv_popup_title = 'Object' "#EC NOTEXT
iv_no_value_check = abap_true
IMPORTING ev_value_1 = lv_object_type
ev_value_2 = lv_object_name
CHANGING ct_fields = lt_fields ).
rs_tadir = zcl_abapgit_factory=>get_tadir( )->read_single(
iv_object = to_upper( lv_object_type )
iv_obj_name = to_upper( lv_object_name ) ).
ENDMETHOD.
METHOD zif_abapgit_popups~popup_package_export.
DATA: lt_fields TYPE TABLE OF sval.
DATA: lv_package TYPE spo_value.
DATA: lv_folder_logic TYPE spo_value.
DATA: lv_serialize_master_lang_only TYPE spo_value.
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'DEVCLASS'
iv_fieldtext = 'Package'
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'INTSYS'
iv_fieldtext = 'Folder logic'
iv_value = 'PREFIX'
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TVDIR'
iv_fieldname = 'FLAG'
iv_fieldtext = 'Master lang only'
CHANGING ct_fields = lt_fields ).
TRY.
_popup_3_get_values( EXPORTING iv_popup_title = 'Export package' "#EC NOTEXT
iv_no_value_check = abap_true
IMPORTING ev_value_1 = lv_package
ev_value_2 = lv_folder_logic
ev_value_3 = lv_serialize_master_lang_only
CHANGING ct_fields = lt_fields ).
ev_package = to_upper( lv_package ).
ev_folder_logic = to_upper( lv_folder_logic ).
ev_serialize_master_lang_only = boolc( lv_serialize_master_lang_only IS NOT INITIAL ).
CATCH zcx_abapgit_cancel.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_proxy_bypass.
rt_proxy_bypass = it_proxy_bypass.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
title = 'Bypass proxy settings for these Hosts & Domains'
signed = abap_false
lower_case = abap_true
no_interval_check = abap_true
TABLES
range = rt_proxy_bypass
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
OTHERS = 5.
CASE sy-subrc.
WHEN 0.
WHEN 2.
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
WHEN OTHERS.
zcx_abapgit_exception=>raise( 'Error from COMPLEX_SELECTIONS_DIALOG' ).
ENDCASE.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_search_help.
DATA lt_ret TYPE TABLE OF ddshretval.
DATA ls_ret LIKE LINE OF lt_ret.
DATA lv_tabname TYPE dfies-tabname.
DATA lv_fieldname TYPE dfies-fieldname.
SPLIT iv_tab_field AT '-' INTO lv_tabname lv_fieldname.
lv_tabname = to_upper( lv_tabname ).
lv_fieldname = to_upper( lv_fieldname ).
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = lv_tabname
fieldname = lv_fieldname
TABLES
return_tab = lt_ret
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |F4IF_FIELD_VALUE_REQUEST error [{ iv_tab_field }]| ).
ENDIF.
IF lines( lt_ret ) > 0.
READ TABLE lt_ret INDEX 1 INTO ls_ret.
ASSERT sy-subrc = 0.
rv_value = ls_ret-fieldval.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_confirm.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = iv_titlebar
text_question = iv_text_question
text_button_1 = iv_text_button_1
icon_button_1 = iv_icon_button_1
text_button_2 = iv_text_button_2
icon_button_2 = iv_icon_button_2
default_button = iv_default_button
display_cancel_button = iv_display_cancel_button
IMPORTING
answer = rv_answer
EXCEPTIONS
text_not_found = 1
OTHERS = 2. "#EC NOTEXT
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from POPUP_TO_CONFIRM' ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_create_package.
CALL FUNCTION 'FUNCTION_EXISTS'
EXPORTING
funcname = 'PB_POPUP_PACKAGE_CREATE'
EXCEPTIONS
function_not_exist = 1
OTHERS = 2.
IF sy-subrc = 1.
* looks like the function module used does not exist on all
* versions since 702, so show an error
zcx_abapgit_exception=>raise( 'Your system does not support automatic creation of packages.' &&
'Please, create the package manually.' ).
ENDIF.
CALL FUNCTION 'PB_POPUP_PACKAGE_CREATE'
CHANGING
p_object_data = es_package_data
EXCEPTIONS
action_cancelled = 1.
IF sy-subrc = 0.
ev_create = abap_true.
ELSE.
ev_create = abap_false.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_create_transp_branch.
DATA: lt_fields TYPE TABLE OF sval,
lv_transports_as_text TYPE string,
lv_desc_as_text TYPE string,
ls_transport_header LIKE LINE OF it_transport_headers.
DATA: lv_branch_name TYPE spo_value.
DATA: lv_commit_text TYPE spo_value.
CLEAR: rs_transport_branch-branch_name, rs_transport_branch-commit_text.
" If we only have one transport selected set branch name to Transport
" name and commit description to transport description.
IF lines( it_transport_headers ) = 1.
READ TABLE it_transport_headers INDEX 1 INTO ls_transport_header.
lv_transports_as_text = ls_transport_header-trkorr.
SELECT SINGLE as4text FROM e07t INTO lv_desc_as_text WHERE
trkorr = ls_transport_header-trkorr AND
langu = sy-langu.
ELSE. " Else set branch name and commit message to 'Transport(s)_TRXXXXXX_TRXXXXX'
lv_transports_as_text = 'Transport(s)'.
LOOP AT it_transport_headers INTO ls_transport_header.
CONCATENATE lv_transports_as_text '_' ls_transport_header-trkorr INTO lv_transports_as_text.
ENDLOOP.
lv_desc_as_text = lv_transports_as_text.
ENDIF.
add_field( EXPORTING iv_tabname = 'TEXTL'
iv_fieldname = 'LINE'
iv_fieldtext = 'Branch name'
iv_value = lv_transports_as_text
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'ABAPTXT255'
iv_fieldname = 'LINE'
iv_fieldtext = 'Commit text'
iv_value = lv_desc_as_text
CHANGING ct_fields = lt_fields ).
_popup_3_get_values( EXPORTING iv_popup_title = 'Transport to new Branch' "#EC NOTEXT
IMPORTING ev_value_1 = lv_branch_name
ev_value_2 = lv_commit_text
CHANGING ct_fields = lt_fields ).
rs_transport_branch-branch_name = lv_branch_name.
rs_transport_branch-commit_text = lv_commit_text.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_inform.
DATA: lv_line1 TYPE c LENGTH 70,
lv_line2 TYPE c LENGTH 70.
lv_line1 = iv_text_message.
IF strlen( iv_text_message ) > 70.
lv_line2 = iv_text_message+70.
ENDIF.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = iv_titlebar
txt1 = lv_line1
txt2 = lv_line2.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_select_from_list.
DATA: lv_pfstatus TYPE sypfkey,
lo_events TYPE REF TO cl_salv_events_table,
lo_functions TYPE REF TO cl_salv_functions_list,
lo_columns TYPE REF TO cl_salv_columns_table,
lt_columns TYPE salv_t_column_ref,
ls_column TYPE salv_s_column_ref,
lo_column TYPE REF TO cl_salv_column_list,
lo_table_header TYPE REF TO cl_salv_form_text.
FIELD-SYMBOLS: <lt_table> TYPE STANDARD TABLE,
<ls_column_to_display> TYPE zif_abapgit_definitions=>ty_alv_column.
CLEAR: et_list.
create_new_table( it_list ).
ASSIGN mr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
TRY.
cl_salv_table=>factory( IMPORTING r_salv_table = mo_select_list_popup
CHANGING t_table = <lt_table> ).
CASE iv_selection_mode.
WHEN if_salv_c_selection_mode=>single.
lv_pfstatus = '110'.
WHEN OTHERS.
lv_pfstatus = '102'.
ENDCASE.
mo_select_list_popup->set_screen_status( pfstatus = lv_pfstatus
report = 'SAPMSVIM' ).
mo_select_list_popup->set_screen_popup( start_column = iv_start_column
end_column = iv_end_column
start_line = iv_start_line
end_line = iv_end_line ).
lo_events = mo_select_list_popup->get_event( ).
SET HANDLER on_select_list_link_click FOR lo_events.
SET HANDLER on_select_list_function_click FOR lo_events.
SET HANDLER on_double_click FOR lo_events.
IF iv_title CN ' _0'.
mo_select_list_popup->get_display_settings( )->set_list_header( iv_title ).
ENDIF.
IF iv_header_text CN ' _0'.
CREATE OBJECT lo_table_header
EXPORTING
text = iv_header_text.
mo_select_list_popup->set_top_of_list( lo_table_header ).
ENDIF.
mo_select_list_popup->get_display_settings( )->set_striped_pattern( iv_striped_pattern ).
mo_select_list_popup->get_selections( )->set_selection_mode( iv_selection_mode ).
lo_columns = mo_select_list_popup->get_columns( ).
lt_columns = lo_columns->get( ).
lo_columns->set_optimize( iv_optimize_col_width ).
LOOP AT lt_columns INTO ls_column.
lo_column ?= ls_column-r_column.
IF iv_selection_mode = if_salv_c_selection_mode=>multiple
AND ls_column-columnname = c_fieldname_selected.
lo_column->set_cell_type( if_salv_c_cell_type=>checkbox_hotspot ).
lo_column->set_output_length( 20 ).
lo_column->set_short_text( |{ iv_select_column_text }| ).
lo_column->set_medium_text( |{ iv_select_column_text }| ).
lo_column->set_long_text( |{ iv_select_column_text }| ).
CONTINUE.
ENDIF.
READ TABLE it_columns_to_display
ASSIGNING <ls_column_to_display>
WITH KEY name = ls_column-columnname.
CASE sy-subrc.
WHEN 0.
IF <ls_column_to_display>-text CN ' _0'.
lo_column->set_short_text( |{ <ls_column_to_display>-text }| ).
lo_column->set_medium_text( |{ <ls_column_to_display>-text }| ).
lo_column->set_long_text( |{ <ls_column_to_display>-text }| ).
ENDIF.
IF <ls_column_to_display>-length > 0.
lo_column->set_output_length( <ls_column_to_display>-length ).
ENDIF.
WHEN OTHERS.
" Hide column
lo_column->set_technical( abap_true ).
ENDCASE.
ENDLOOP.
mo_select_list_popup->display( ).
CATCH cx_salv_msg.
zcx_abapgit_exception=>raise( 'Error from POPUP_TO_SELECT_FROM_LIST' ).
ENDTRY.
IF mv_cancel = abap_true.
mv_cancel = abap_false.
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
ENDIF.
get_selected_rows( IMPORTING et_list = et_list ).
CLEAR: mo_select_list_popup,
mr_table,
mo_table_descr.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_select_transports.
* todo, method to be renamed, it only returns one transport
DATA: lv_trkorr TYPE e070-trkorr,
ls_trkorr LIKE LINE OF rt_trkorr.
CALL FUNCTION 'TR_F4_REQUESTS'
IMPORTING
ev_selected_request = lv_trkorr.
IF NOT lv_trkorr IS INITIAL.
ls_trkorr-trkorr = lv_trkorr.
APPEND ls_trkorr TO rt_trkorr.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_transport_request.
DATA: lt_e071 TYPE STANDARD TABLE OF e071,
lt_e071k TYPE STANDARD TABLE OF e071k.
CALL FUNCTION 'TRINT_ORDER_CHOICE'
EXPORTING
wi_order_type = is_transport_type-request
wi_task_type = is_transport_type-task
IMPORTING
we_order = rv_transport
TABLES
wt_e071 = lt_e071
wt_e071k = lt_e071k
EXCEPTIONS
no_correction_selected = 1
display_mode = 2
object_append_error = 3
recursive_call = 4
wrong_order_type = 5
OTHERS = 6.
IF sy-subrc = 1.
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
ELSEIF sy-subrc > 1.
zcx_abapgit_exception=>raise( |Error from TRINT_ORDER_CHOICE { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_popups~repo_new_offline.
DATA: lv_returncode TYPE c,
lt_fields TYPE TABLE OF sval,
lv_icon_ok TYPE icon-name,
lv_button1 TYPE svalbutton-buttontext,
lv_icon1 TYPE icon-name,
lv_finished TYPE abap_bool,
lx_error TYPE REF TO zcx_abapgit_exception.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
add_field( EXPORTING iv_tabname = 'ABAPTXT255'
iv_fieldname = 'LINE'
iv_fieldtext = 'Name'
iv_obligatory = abap_true
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'DEVCLASS'
iv_fieldtext = 'Package'
iv_obligatory = abap_true
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'ZABAPGIT'
iv_fieldname = 'VALUE'
iv_fieldtext = 'Folder logic'
iv_obligatory = abap_true
iv_value = zif_abapgit_dot_abapgit=>c_folder_logic-prefix
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'DOKIL'
iv_fieldname = 'MASTERLANG'
iv_fieldtext = 'Master language only'
iv_value = abap_true
CHANGING ct_fields = lt_fields ).
WHILE lv_finished = abap_false.
lv_icon_ok = icon_okay.
lv_button1 = 'Create package' ##NO_TEXT.
lv_icon1 = icon_folder.
CALL FUNCTION 'POPUP_GET_VALUES_USER_BUTTONS'
EXPORTING
popup_title = 'New Offline Project'
programname = sy-cprog
formname = 'PACKAGE_POPUP'
ok_pushbuttontext = 'OK'
icon_ok_push = lv_icon_ok
first_pushbutton = lv_button1
icon_button_1 = lv_icon1
second_pushbutton = ''
icon_button_2 = ''
IMPORTING
returncode = lv_returncode
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_returncode = c_answer_cancel.
rs_popup-cancel = abap_true.
RETURN.
ENDIF.
READ TABLE lt_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
rs_popup-url = <ls_field>-value.
READ TABLE lt_fields INDEX 2 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
TRANSLATE <ls_field>-value TO UPPER CASE.
rs_popup-package = <ls_field>-value.
READ TABLE lt_fields INDEX 3 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
TRANSLATE <ls_field>-value TO UPPER CASE.
rs_popup-folder_logic = <ls_field>-value.
READ TABLE lt_fields INDEX 4 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
rs_popup-master_lang_only = <ls_field>-value.
lv_finished = abap_true.
TRY.
zcl_abapgit_repo_srv=>get_instance( )->validate_package( iv_package = rs_popup-package
iv_chk_exists = abap_false ).
validate_folder_logic( rs_popup-folder_logic ).
CATCH zcx_abapgit_exception INTO lx_error.
" in case of validation errors we display the popup again
MESSAGE lx_error TYPE 'S' DISPLAY LIKE 'E'.
CLEAR lv_finished.
ENDTRY.
ENDWHILE.
ENDMETHOD.
METHOD zif_abapgit_popups~repo_popup.
DATA: lv_returncode TYPE c,
lv_icon_ok TYPE icon-name,
lv_icon_br TYPE icon-name,
lt_fields TYPE TABLE OF sval,
lv_uattr TYPE spo_fattr,
lv_pattr TYPE spo_fattr,
lv_button2 TYPE svalbutton-buttontext,
lv_icon2 TYPE icon-name,
lv_package TYPE tdevc-devclass,
lv_url TYPE abaptxt255-line,
lv_branch TYPE textl-line,
lv_display_name TYPE trm255-text,
lv_folder_logic TYPE string,
lv_ign_subpkg TYPE abap_bool,
lv_finished TYPE abap_bool,
lv_master_lang_only TYPE abap_bool,
lx_error TYPE REF TO zcx_abapgit_exception.
IF iv_freeze_url = abap_true.
lv_uattr = '05'.
ENDIF.
IF iv_freeze_package = abap_true.
lv_pattr = '05'.
ENDIF.
IF iv_package IS INITIAL. " Empty package -> can be created
lv_button2 = 'Create package' ##NO_TEXT.
lv_icon2 = icon_folder.
ENDIF.
lv_display_name = iv_display_name.
lv_package = iv_package.
lv_url = iv_url.
lv_branch = iv_branch.
WHILE lv_finished = abap_false.
CLEAR: lt_fields.
add_field( EXPORTING iv_tabname = 'ABAPTXT255'
iv_fieldname = 'LINE'
iv_fieldtext = 'Git clone URL'
iv_value = lv_url
iv_field_attr = lv_uattr
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'DEVCLASS'
iv_fieldtext = 'Package'
iv_value = lv_package
iv_field_attr = lv_pattr
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TEXTL'
iv_fieldname = 'LINE'
iv_fieldtext = 'Branch'
iv_value = lv_branch
iv_field_attr = '05'
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TRM255'
iv_fieldname = 'TEXT'
iv_fieldtext = 'Display name (opt.)'
iv_value = lv_display_name
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TADIR'
iv_fieldname = 'AUTHOR'
iv_fieldtext = 'Folder logic'
iv_obligatory = abap_true
iv_value = zif_abapgit_dot_abapgit=>c_folder_logic-prefix
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'IS_ENHANCEABLE'
iv_fieldtext = 'Ignore subpackages'
iv_value = abap_false
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'DOKIL'
iv_fieldname = 'MASTERLANG'
iv_fieldtext = 'Master language only'
iv_value = abap_true
CHANGING ct_fields = lt_fields ).
lv_icon_ok = icon_okay.
lv_icon_br = icon_workflow_fork.
CALL FUNCTION 'POPUP_GET_VALUES_USER_BUTTONS'
EXPORTING
popup_title = iv_title
programname = sy-cprog
formname = 'BRANCH_POPUP'
ok_pushbuttontext = 'OK'
icon_ok_push = lv_icon_ok
first_pushbutton = 'Select branch'
icon_button_1 = lv_icon_br
second_pushbutton = lv_button2
icon_button_2 = lv_icon2
IMPORTING
returncode = lv_returncode
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2. "#EC NOTEXT
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_returncode = c_answer_cancel.
rs_popup-cancel = abap_true.
RETURN.
ENDIF.
extract_field_values(
EXPORTING
it_fields = lt_fields
IMPORTING
ev_url = lv_url
ev_package = lv_package
ev_branch = lv_branch
ev_display_name = lv_display_name
ev_folder_logic = lv_folder_logic
ev_ign_subpkg = lv_ign_subpkg
ev_master_lang_only = lv_master_lang_only ).
lv_finished = abap_true.
TRY.
IF iv_freeze_url = abap_false.
zcl_abapgit_url=>validate( |{ lv_url }| ).
ENDIF.
IF iv_freeze_package = abap_false.
zcl_abapgit_repo_srv=>get_instance( )->validate_package( iv_package = lv_package
iv_ign_subpkg = lv_ign_subpkg
iv_chk_exists = abap_false ).
ENDIF.
validate_folder_logic( lv_folder_logic ).
CATCH zcx_abapgit_exception INTO lx_error.
MESSAGE lx_error TYPE 'S' DISPLAY LIKE 'E'.
" in case of validation errors we display the popup again
CLEAR lv_finished.
ENDTRY.
ENDWHILE.
rs_popup-url = lv_url.
rs_popup-package = lv_package.
rs_popup-branch_name = lv_branch.
rs_popup-display_name = lv_display_name.
rs_popup-folder_logic = lv_folder_logic.
rs_popup-ign_subpkg = lv_ign_subpkg.
rs_popup-master_lang_only = lv_master_lang_only.
ENDMETHOD.
METHOD _popup_3_get_values.
DATA lv_answer TYPE c LENGTH 1.
FIELD-SYMBOLS: <ls_field> TYPE sval.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
no_value_check = iv_no_value_check
popup_title = iv_popup_title
IMPORTING
returncode = lv_answer
TABLES
fields = ct_fields
EXCEPTIONS
OTHERS = 1 ##NO_TEXT.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_answer = c_answer_cancel.
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
ENDIF.
IF ev_value_1 IS SUPPLIED.
READ TABLE ct_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_value_1 = <ls_field>-value.
ENDIF.
IF ev_value_2 IS SUPPLIED.
READ TABLE ct_fields INDEX 2 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_value_2 = <ls_field>-value.
ENDIF.
IF ev_value_3 IS SUPPLIED.
READ TABLE ct_fields INDEX 3 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_value_3 = <ls_field>-value.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
12924,
4739,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
198,
220,
10188,
9864,
1847,
48167,
1677,
5258,
1976,
565,
62,
397,
499,
18300,
62,
9019,
62,
69,
9548,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
25,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
13,
198,
220,
220,
220,
8355,
43429,
1546,
25,
198,
220,
220,
220,
220,
220,
46207,
62,
26495,
62,
39344,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
26495,
62,
39344,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
43551,
62,
6404,
291,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
43551,
62,
6404,
291,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
15252,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
15252,
11,
198,
220,
220,
220,
220,
220,
2251,
62,
1671,
3702,
62,
12924,
929,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
17953,
62,
1671,
3702,
62,
12924,
929,
11,
198,
220,
220,
220,
220,
220,
29924,
62,
3605,
62,
2364,
1370,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
260,
7501,
62,
3605,
62,
2364,
1370,
11,
198,
220,
220,
220,
220,
220,
8478,
62,
4868,
62,
12924,
929,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
1671,
3702,
62,
4868,
62,
12924,
929,
11,
198,
220,
220,
220,
220,
220,
29924,
62,
12924,
929,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
260,
7501,
62,
12924,
929,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
10414,
2533,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
10414,
2533,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
259,
687,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
259,
687,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
17953,
62,
26495,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
17953,
62,
26495,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
17953,
62,
7645,
79,
62,
1671,
3702,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
17953,
62,
7645,
79,
62,
1671,
3702,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
19738,
62,
7645,
3742,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
19738,
62,
7645,
3742,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
19738,
62,
6738,
62,
4868,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
19738,
62,
6738,
62,
4868,
11,
198,
220,
220,
220,
220,
220,
8478,
62,
12924,
929,
62,
47423,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
1671,
3702,
62,
12924,
929,
62,
47423,
11,
198,
220,
220,
220,
220,
220,
5301,
62,
12924,
929,
62,
47423,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
26495,
62,
12924,
929,
62,
47423,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
7645,
634,
62,
25927,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
7645,
634,
62,
25927,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
36436,
62,
1525,
6603,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
36436,
62,
1525,
6603,
13,
628,
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,
1259,
62,
82,
2100,
62,
926,
41876,
49053,
9795,
43679,
3963,
264,
2100,
13315,
5550,
38865,
35374,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
3245,
3672,
62,
34213,
41876,
300,
28435,
62,
69,
3672,
26173,
8924,
4600,
46506,
1961,
63,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
41484,
62,
66,
21130,
220,
220,
220,
220,
220,
41876,
269,
406,
49494,
352,
26173,
8924,
705,
32,
6,
22492,
15285,
62,
32541,
13,
628,
220,
220,
220,
42865,
6941,
62,
19738,
62,
4868,
62,
12924,
929,
41876,
4526,
37,
5390,
537,
62,
21680,
85,
62,
11487,
764,
198,
220,
220,
220,
42865,
285,
81,
62,
11487,
41876,
4526,
37,
5390,
1366,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
66,
21130,
41876,
450,
499,
62,
30388,
26173,
8924,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
42865,
6941,
62,
11487,
62,
20147,
81,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
83,
4510,
3798,
81,
764,
628,
220,
220,
220,
337,
36252,
50,
751,
62,
3245,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8658,
3672,
220,
220,
220,
41876,
264,
2100,
12,
8658,
3672,
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,
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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
] |
"! ABAP Unit test utilities
CLASS ztcl_alog_test_utl DEFINITION
PUBLIC
FINAL
CREATE PRIVATE
FOR TESTING.
PUBLIC SECTION.
CLASS-METHODS:
"! @parameter rv_text | Random text between 1 and 200 characters long
get_random_log_text RETURNING VALUE(rv_text) TYPE string,
"! @parameter ro_type | Random log entry type
get_random_log_type RETURNING VALUE(ro_type) TYPE REF TO zcl_alog_entry_type.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ztcl_alog_test_utl IMPLEMENTATION.
METHOD get_random_log_text.
STATICS: so_rnd TYPE REF TO cl_abap_random_int.
IF so_rnd IS NOT BOUND.
so_rnd = cl_abap_random_int=>create( min = 1 max = 200 ).
ENDIF.
CALL FUNCTION 'GENERAL_GET_RANDOM_STRING'
EXPORTING
number_chars = so_rnd->get_next( )
IMPORTING
random_string = rv_text.
ENDMETHOD.
METHOD get_random_log_type.
STATICS: so_rnd TYPE REF TO cl_abap_random_int.
IF so_rnd IS NOT BOUND.
so_rnd = cl_abap_random_int=>create( min = 1 max = 4 ).
ENDIF.
ro_type = SWITCH #( LET rnd = so_rnd->get_next( ) IN rnd
WHEN 1 THEN zcl_alog_entry_type=>go_info
WHEN 2 THEN zcl_alog_entry_type=>go_warning
WHEN 3 THEN zcl_alog_entry_type=>go_error
WHEN 4 THEN zcl_alog_entry_type=>go_debug ).
ENDMETHOD.
ENDCLASS.
| [
40484,
9564,
2969,
11801,
1332,
20081,
198,
31631,
1976,
83,
565,
62,
11794,
62,
9288,
62,
315,
75,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
198,
220,
7473,
43001,
2751,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
374,
85,
62,
5239,
930,
14534,
2420,
1022,
352,
290,
939,
3435,
890,
198,
220,
220,
220,
220,
220,
651,
62,
25120,
62,
6404,
62,
5239,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
5239,
8,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
686,
62,
4906,
930,
14534,
2604,
5726,
2099,
198,
220,
220,
220,
220,
220,
651,
62,
25120,
62,
6404,
62,
4906,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
4906,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
11794,
62,
13000,
62,
4906,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
83,
565,
62,
11794,
62,
9288,
62,
315,
75,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
651,
62,
25120,
62,
6404,
62,
5239,
13,
198,
220,
220,
220,
15486,
19505,
25,
523,
62,
81,
358,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
25120,
62,
600,
13,
628,
220,
220,
220,
16876,
523,
62,
81,
358,
3180,
5626,
347,
15919,
13,
198,
220,
220,
220,
220,
220,
523,
62,
81,
358,
796,
537,
62,
397,
499,
62,
25120,
62,
600,
14804,
17953,
7,
949,
796,
352,
3509,
796,
939,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
35353,
27130,
62,
18851,
62,
49,
6981,
2662,
62,
18601,
2751,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1271,
62,
354,
945,
220,
796,
523,
62,
81,
358,
3784,
1136,
62,
19545,
7,
1267,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
4738,
62,
8841,
796,
374,
85,
62,
5239,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
651,
62,
25120,
62,
6404,
62,
4906,
13,
198,
220,
220,
220,
15486,
19505,
25,
523,
62,
81,
358,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
25120,
62,
600,
13,
628,
220,
220,
220,
16876,
523,
62,
81,
358,
3180,
5626,
347,
15919,
13,
198,
220,
220,
220,
220,
220,
523,
62,
81,
358,
796,
537,
62,
397,
499,
62,
25120,
62,
600,
14804,
17953,
7,
949,
796,
352,
3509,
796,
604,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
686,
62,
4906,
796,
12672,
31949,
1303,
7,
37994,
374,
358,
796,
523,
62,
81,
358,
3784,
1136,
62,
19545,
7,
1267,
3268,
374,
358,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
352,
42243,
1976,
565,
62,
11794,
62,
13000,
62,
4906,
14804,
2188,
62,
10951,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
362,
42243,
1976,
565,
62,
11794,
62,
13000,
62,
4906,
14804,
2188,
62,
43917,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
513,
42243,
1976,
565,
62,
11794,
62,
13000,
62,
4906,
14804,
2188,
62,
18224,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42099,
604,
42243,
1976,
565,
62,
11794,
62,
13000,
62,
4906,
14804,
2188,
62,
24442,
6739,
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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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
] |
"! abapGit general error
CLASS zcx_abapgit_exception DEFINITION
PUBLIC
INHERITING FROM cx_static_check
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_t100_message .
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 .
"! 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
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
RAISING
zcx_abapgit_exception .
METHODS constructor
IMPORTING
!textid LIKE if_t100_message=>t100key OPTIONAL
!previous LIKE previous OPTIONAL
!msgv1 TYPE symsgv OPTIONAL
!msgv2 TYPE symsgv OPTIONAL
!msgv3 TYPE symsgv OPTIONAL
!msgv4 TYPE symsgv OPTIONAL .
CLASS-METHODS raise_with_text
IMPORTING
!ix_previous TYPE REF TO cx_root
RAISING
zcx_abapgit_exception .
METHODS get_source_position
REDEFINITION .
METHODS if_message~get_longtext
REDEFINITION .
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS:
gc_generic_error_msg TYPE string VALUE `An error occured (ZCX_ABAPGIT_EXCEPTION)` ##NO_TEXT.
METHODS:
save_callstack.
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.
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 if_message~get_longtext.
" You should remember that we have to call ZCL_ABAPGIT_MESSAGE_HELPER
" dynamically, because the compiled abapGit report puts the definition
" of the exception classes on the top and therefore ZCL_ABAPGIT_MESSAGE_HELPER
" isn't statically known
DATA: lo_message_helper TYPE REF TO object.
result = super->get_longtext( ).
IF if_t100_message~t100key IS NOT INITIAL.
CREATE OBJECT lo_message_helper TYPE ('ZCL_ABAPGIT_MESSAGE_HELPER')
EXPORTING
io_exception = me.
CALL METHOD lo_message_helper->('GET_T100_LONGTEXT')
RECEIVING
rv_longtext = result.
ENDIF.
ENDMETHOD.
METHOD raise.
DATA: lv_msgv1 TYPE symsgv,
lv_msgv2 TYPE symsgv,
lv_msgv3 TYPE symsgv,
lv_msgv4 TYPE symsgv,
ls_t100_key TYPE scx_t100key,
lv_text TYPE string.
IF iv_text IS INITIAL.
lv_text = gc_generic_error_msg.
ELSE.
lv_text = iv_text.
ENDIF.
CALL METHOD ('ZCL_ABAPGIT_MESSAGE_HELPER')=>set_msg_vars_for_clike
EXPORTING
iv_text = lv_text.
ls_t100_key-msgid = sy-msgid.
ls_t100_key-msgno = sy-msgno.
ls_t100_key-attr1 = 'MSGV1'.
ls_t100_key-attr2 = 'MSGV2'.
ls_t100_key-attr3 = 'MSGV3'.
ls_t100_key-attr4 = 'MSGV4'.
lv_msgv1 = sy-msgv1.
lv_msgv2 = sy-msgv2.
lv_msgv3 = sy-msgv3.
lv_msgv4 = sy-msgv4.
RAISE EXCEPTION TYPE zcx_abapgit_exception
EXPORTING
textid = ls_t100_key
msgv1 = lv_msgv1
msgv2 = lv_msgv2
msgv3 = lv_msgv3
msgv4 = lv_msgv4
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
msgv1 = iv_msgv1
msgv2 = iv_msgv2
msgv3 = iv_msgv3
msgv4 = iv_msgv4.
ENDMETHOD.
METHOD raise_with_text.
raise(
iv_text = ix_previous->get_text( )
ix_previous = ix_previous ).
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.
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,
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,
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,
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,
41876,
827,
19662,
85,
5550,
38865,
827,
12,
19662,
85,
18,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
19662,
85,
19,
8,
41876,
827,
19662,
85,
5550,
38865,
827,
12,
19662,
85,
19,
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,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
5239,
312,
220,
220,
34178,
611,
62,
83,
3064,
62,
20500,
14804,
83,
3064,
2539,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
3866,
1442,
34178,
2180,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
19662,
85,
16,
220,
220,
220,
41876,
827,
19662,
85,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
19662,
85,
17,
220,
220,
220,
41876,
827,
19662,
85,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
19662,
85,
18,
220,
220,
220,
41876,
827,
19662,
85,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
19662,
85,
19,
220,
220,
220,
41876,
827,
19662,
85,
39852,
2849,
1847,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
5298,
62,
4480,
62,
5239,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
844,
62,
3866,
1442,
41876,
4526,
37,
5390,
43213,
62,
15763,
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,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
10459,
62,
9150,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
611,
62,
20500,
93,
1136,
62,
6511,
5239,
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,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
308,
66,
62,
41357,
62,
18224,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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
] |
class lcl_mapping_fields definition.
public section.
interfaces zif_ajson_mapping.
aliases to_abap for zif_ajson_mapping~to_abap.
aliases to_json for zif_ajson_mapping~to_json.
methods constructor
importing
it_mapping_fields type zif_ajson_mapping~ty_mapping_fields optional.
protected section.
private section.
data mt_mapping_fields type zif_ajson_mapping~ty_mapping_fields.
endclass.
class lcl_mapping_to_upper definition.
public section.
interfaces zif_ajson_mapping.
methods constructor
importing
it_mapping_fields type zif_ajson_mapping~ty_mapping_fields optional.
protected section.
private section.
data mi_mapping_fields type ref to zif_ajson_mapping.
endclass.
class lcl_mapping_to_lower definition.
public section.
interfaces zif_ajson_mapping.
methods constructor
importing
it_mapping_fields type zif_ajson_mapping~ty_mapping_fields optional.
protected section.
private section.
data mi_mapping_fields type ref to zif_ajson_mapping.
endclass.
class lcl_mapping_camel definition.
public section.
interfaces zif_ajson_mapping.
methods constructor
importing
it_mapping_fields type zif_ajson_mapping~ty_mapping_fields optional
iv_first_json_upper type abap_bool default abap_true.
protected section.
private section.
data mv_first_json_upper type abap_bool.
data mi_mapping_fields type ref to zif_ajson_mapping.
endclass.
| [
4871,
300,
565,
62,
76,
5912,
62,
25747,
6770,
13,
628,
220,
1171,
2665,
13,
198,
220,
220,
220,
20314,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
13,
628,
220,
220,
220,
47217,
284,
62,
397,
499,
329,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
93,
1462,
62,
397,
499,
13,
198,
220,
220,
220,
47217,
284,
62,
17752,
329,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
93,
1462,
62,
17752,
13,
628,
220,
220,
220,
5050,
23772,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
76,
5912,
62,
25747,
2099,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
93,
774,
62,
76,
5912,
62,
25747,
11902,
13,
628,
220,
6861,
2665,
13,
628,
220,
2839,
2665,
13,
198,
220,
220,
220,
1366,
45079,
62,
76,
5912,
62,
25747,
2099,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
93,
774,
62,
76,
5912,
62,
25747,
13,
198,
198,
437,
4871,
13,
628,
198,
4871,
300,
565,
62,
76,
5912,
62,
1462,
62,
45828,
6770,
13,
628,
220,
1171,
2665,
13,
198,
220,
220,
220,
20314,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
13,
628,
220,
220,
220,
5050,
23772,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
76,
5912,
62,
25747,
2099,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
93,
774,
62,
76,
5912,
62,
25747,
11902,
13,
628,
220,
6861,
2665,
13,
628,
220,
2839,
2665,
13,
198,
220,
220,
220,
1366,
21504,
62,
76,
5912,
62,
25747,
2099,
1006,
284,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
13,
198,
198,
437,
4871,
13,
628,
198,
4871,
300,
565,
62,
76,
5912,
62,
1462,
62,
21037,
6770,
13,
628,
220,
1171,
2665,
13,
198,
220,
220,
220,
20314,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
13,
628,
220,
220,
220,
5050,
23772,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
76,
5912,
62,
25747,
2099,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
93,
774,
62,
76,
5912,
62,
25747,
11902,
13,
628,
220,
6861,
2665,
13,
628,
220,
2839,
2665,
13,
198,
220,
220,
220,
1366,
21504,
62,
76,
5912,
62,
25747,
2099,
1006,
284,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
13,
198,
198,
437,
4871,
13,
628,
198,
4871,
300,
565,
62,
76,
5912,
62,
66,
17983,
6770,
13,
628,
220,
1171,
2665,
13,
198,
220,
220,
220,
20314,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
13,
628,
220,
220,
220,
5050,
23772,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
76,
5912,
62,
25747,
220,
220,
2099,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
93,
774,
62,
76,
5912,
62,
25747,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
11085,
62,
17752,
62,
45828,
2099,
450,
499,
62,
30388,
4277,
450,
499,
62,
7942,
13,
628,
220,
6861,
2665,
13,
628,
220,
2839,
2665,
13,
198,
220,
220,
220,
1366,
285,
85,
62,
11085,
62,
17752,
62,
45828,
2099,
450,
499,
62,
30388,
13,
198,
220,
220,
220,
1366,
21504,
62,
76,
5912,
62,
25747,
2099,
1006,
284,
1976,
361,
62,
1228,
1559,
62,
76,
5912,
13,
198,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
"! <p class="shorttext synchronized" lang="en">Controlller zum Speichern/Lesen/Löschen von Varianten</p>
CLASS zcl_dbbr_variant_controller DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_uitb_screen_controller .
CONSTANTS:
BEGIN OF c_modes,
save TYPE int1 VALUE 1,
delete TYPE int1 VALUE 3,
END OF c_modes .
METHODS constructor
IMPORTING
iv_screen_mode TYPE zdbbr_selscreen_mode
if_default_variant_mode TYPE abap_bool OPTIONAL
if_alv_mode TYPE abap_bool OPTIONAL
iv_entity_id TYPE zsat_entity_id
iv_entity_name TYPE zsat_entity_id_raw
iv_mode TYPE int1
ir_s_global_data TYPE REF TO zdbbr_global_data
ir_t_selfields TYPE REF TO zdbbr_selfield_itab OPTIONAL
ir_t_selfields_multi TYPE REF TO zdbbr_selfield_itab OPTIONAL
ir_t_multi_or TYPE REF TO zdbbr_or_seltab_itab OPTIONAL
io_tabfields TYPE REF TO zcl_dbbr_tabfield_list
io_tabfields_grpd TYPE REF TO zcl_dbbr_tabfield_list .
METHODS call_variant_f4 .
PROTECTED SECTION.
PRIVATE SECTION.
ALIASES get_report_id
FOR zif_uitb_screen_controller~get_report_id .
ALIASES get_screen_id
FOR zif_uitb_screen_controller~get_screen_id .
DATA:
BEGIN OF ms_ui_refs,
variant_name TYPE REF TO zdbbr_variant_name,
variant_text TYPE REF TO ddtext,
xfilter_fields TYPE REF TO abap_bool,
xoutput_fields TYPE REF TO abap_bool,
xsort_fields TYPE REF TO abap_bool,
xcolumn_widths TYPE REF TO abap_bool,
variant_table_name TYPE REF TO tabname16,
variant_query_name TYPE REF TO zsat_query_name,
variant_for_table_title TYPE REF TO syst_title,
variant_for_query_title TYPE REF TO syst_title,
variant_for_cds_title TYPE REF TO syst_title,
variant_cds_name TYPE REF TO zsat_cds_view_name,
END OF ms_ui_refs .
DATA mr_t_selfields TYPE REF TO zdbbr_selfield_itab.
DATA mr_t_selfields_multi TYPE REF TO zdbbr_selfield_itab.
DATA mr_s_global_data TYPE REF TO zdbbr_global_data.
DATA mo_tabfields TYPE REF TO zcl_dbbr_tabfield_list .
DATA mo_tabfields_grouped TYPE REF TO zcl_dbbr_tabfield_list .
DATA mv_mode TYPE int1 .
DATA mr_multi_or_itab TYPE REF TO zdbbr_or_seltab_itab .
"! <p class="shorttext synchronized" lang="en">Mode for Seleciton Screen of DB Browser</p>
DATA mv_selscreen_mode TYPE zdbbr_selscreen_mode .
DATA mv_entity_id TYPE zsat_entity_id.
DATA mv_entity_name TYPE zsat_entity_id_raw.
DATA mf_default_variant_mode TYPE abap_bool.
DATA mf_alv_output TYPE abap_bool.
"! <p class="shorttext synchronized" lang="en">Delete variant</p>
METHODS delete_variant .
"! <p class="shorttext synchronized" lang="en">Create new variant</p>
METHODS create_variant .
"! <p class="shorttext synchronized" lang="en">Creates/updates default variant for given entity</p>
METHODS create_default_variant.
"! <p class="shorttext synchronized" lang="en">Returns 'X' if there are selection criteria</p>
METHODS exists_criteria
RETURNING
VALUE(rf_exists) TYPE abap_bool.
"! <p class="shorttext synchronized" lang="en">Persists the variant from the current data</p>
METHODS persist_variant
IMPORTING
iv_variant_id TYPE zdbbr_variant_id OPTIONAL.
ENDCLASS.
CLASS zcl_dbbr_variant_controller IMPLEMENTATION.
METHOD call_variant_f4.
*&---------------------------------------------------------------------*
*& Description: Calls value help for getting existing variant
*&---------------------------------------------------------------------*
TYPES: BEGIN OF lty_variant_f4,
variant_name TYPE zdbbr_variant_name,
description TYPE ddtext,
has_output_fields TYPE zdbbr_defined_outputfields,
has_sort_fields TYPE zdbbr_defined_sortfields,
created_by TYPE zsat_created_by,
END OF lty_variant_f4.
DATA: lt_variants TYPE TABLE OF lty_variant_f4.
" get variants from db
zcl_dbbr_variant_factory=>find_variants(
EXPORTING
iv_variant_name = ms_ui_refs-variant_name->*
iv_entity_id = mv_entity_id
iv_entity_type = mv_selscreen_mode
IMPORTING
et_variant_info = DATA(lt_variant_info)
).
lt_variants = CORRESPONDING #( lt_variant_info ).
DATA(lv_return) = zcl_dbbr_f4_helper=>call_int_table_f4(
it_table_search = lt_variants
iv_return_field_name = 'VARIANT_NAME'
).
IF lv_return IS NOT INITIAL.
ms_ui_refs-variant_name->* = lv_return.
ENDIF.
ENDMETHOD.
METHOD constructor.
mv_mode = iv_mode.
mf_default_variant_mode = if_default_variant_mode.
mf_alv_output = if_alv_mode.
mv_selscreen_mode = iv_screen_mode.
mv_entity_id = iv_entity_id.
mv_entity_name = iv_entity_name.
mo_tabfields = io_tabfields.
mo_tabfields_grouped = io_tabfields_grpd.
mr_multi_or_itab = ir_t_multi_or.
mr_s_global_data = ir_s_global_data.
mr_t_selfields = ir_t_selfields.
mr_t_selfields_multi = ir_t_selfields_multi.
" init some global data references
DATA(lr_data_cache) = zcl_uitb_data_cache=>get_instance( zif_dbbr_c_report_id=>main ).
ms_ui_refs-variant_name = CAST zdbbr_variant_name( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_p_varnam ) ).
ms_ui_refs-variant_text = CAST ddtext( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_p_vartxt ) ).
ms_ui_refs-xsort_fields = CAST boolean( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_p_xsort ) ).
ms_ui_refs-xcolumn_widths = CAST abap_bool( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_p_has_defined_column_widths ) ).
ms_ui_refs-xfilter_fields = CAST #( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_p_has_selection_criteria ) ).
ms_ui_refs-xoutput_fields = CAST boolean( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_p_xfield ) ).
ms_ui_refs-variant_table_name = CAST #( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_p_tab ) ).
ms_ui_refs-variant_for_table_title = CAST syst_title( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_tvar_t ) ).
ms_ui_refs-variant_for_query_title = CAST syst_title( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_svar_t ) ).
ms_ui_refs-variant_for_cds_title = CAST syst_title( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_t_cds_view_variant ) ).
ms_ui_refs-variant_query_name = CAST #( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_p_scrnam ) ).
ms_ui_refs-variant_cds_name = CAST #( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_p_cds_view_name ) ).
ENDMETHOD.
METHOD create_variant.
IF zcl_dbbr_variant_factory=>variant_exists( iv_variant_name = ms_ui_refs-variant_name->*
iv_entity_id = mv_entity_id
iv_entity_type = mv_selscreen_mode ).
IF zcl_dbbr_appl_util=>popup_to_confirm(
iv_title = |{ TEXT-ms2 }|
iv_query = |{ TEXT-013 } '{ ms_ui_refs-variant_name->* }'. { TEXT-014 } { TEXT-016 }|
iv_icon_type = 'ICON_MESSAGE_WARNING' ) <> zif_dbbr_c_global=>c_popup_answers-yes.
RETURN.
ENDIF.
zcl_dbbr_variant_factory=>get_variant(
EXPORTING
iv_variant_name = ms_ui_refs-variant_name->*
iv_entity_id = mv_entity_id
iv_entity_type = mv_selscreen_mode
if_load_completely = abap_false
IMPORTING
es_variant = DATA(ls_existing_variant)
).
ENDIF.
persist_variant( ls_existing_variant-variant_id ).
ENDMETHOD.
METHOD create_default_variant.
persist_variant( ).
ENDMETHOD.
METHOD persist_variant.
DATA(ls_variant) = zcl_dbbr_variant_creator=>create_variant(
iv_variant_id = iv_variant_id
iv_variant_name = ms_ui_refs-variant_name->*
iv_entity_id = mv_entity_id
iv_entity_type = mv_selscreen_mode
iv_variant_description = ms_ui_refs-variant_text->*
if_has_output_fields = ms_ui_refs-xoutput_fields->*
if_has_sort_fields = ms_ui_refs-xsort_fields->*
it_selfields = COND #( WHEN ms_ui_refs-xfilter_fields->* = abap_true AND mr_t_selfields IS BOUND THEN mr_t_selfields->* )
it_multi_selfields = COND #( WHEN ms_ui_refs-xfilter_fields->* = abap_true AND mr_t_selfields_multi IS BOUND THEN mr_t_selfields_multi->* )
it_multi_or = COND #( WHEN ms_ui_refs-xfilter_fields->* = abap_true AND mr_multi_or_itab IS BOUND THEN mr_multi_or_itab->* )
is_global_data = mr_s_global_data->*
).
*.. create user/ddic sort order for output / sorting fields
IF ms_ui_refs-xoutput_fields->* = abap_true OR
ms_ui_refs-xsort_fields->* = abap_true.
DATA(lr_tabfields) = mo_tabfields->copy( ).
lr_tabfields->switch_mode( zif_dbbr_c_global=>c_field_chooser_modes-output ).
lr_tabfields->sort( ).
lr_tabfields->switch_mode( zif_dbbr_c_global=>c_field_chooser_modes-sort ).
lr_tabfields->sort( ).
*.... clear flag for selected fields
lr_tabfields->clear_active_flag( if_clear_selection = abap_true
if_clear_output = xsdbool( ms_ui_refs-xoutput_fields->* = abap_false )
if_clear_sort = xsdbool( ms_ui_refs-xsort_fields->* = abap_false ) ).
*.... save output / order by fields
DATA(lt_fields_ui) = lr_tabfields->get_active_fields(
if_consider_output = ms_ui_refs-xoutput_fields->*
if_consider_sorted = ms_ui_refs-xsort_fields->*
if_consider_selected = abap_false ).
ls_variant-fields = CORRESPONDING #( lt_fields_ui ).
ENDIF.
" save the variant
IF mf_default_variant_mode = abap_true.
zcl_dbbr_variant_factory=>save_default_variant( ls_variant ).
MESSAGE s095(zdbbr_info) WITH mv_entity_name.
ELSE.
zcl_dbbr_variant_factory=>save_variant( ls_variant ).
MESSAGE s028(zdbbr_info) WITH ms_ui_refs-variant_name->*.
ENDIF.
zcl_dbbr_screen_helper=>leave_screen( ).
ENDMETHOD.
METHOD exists_criteria.
CLEAR rf_exists.
CHECK mr_t_selfields IS BOUND.
LOOP AT mr_t_selfields->* ASSIGNING FIELD-SYMBOL(<ls_selfield>) WHERE low IS NOT INITIAL
OR high IS NOT INITIAL
OR option IS NOT INITIAL.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
rf_exists = abap_true.
ELSE.
*.. Are there any or tuple values
rf_exists = xsdbool( mr_multi_or_itab->* IS NOT INITIAL ).
ENDIF.
ENDMETHOD.
METHOD delete_variant.
zcl_dbbr_variant_factory=>get_variant(
EXPORTING
iv_variant_name = ms_ui_refs-variant_name->*
iv_entity_id = mv_entity_id
iv_entity_type = mv_selscreen_mode
if_load_completely = abap_false
IMPORTING
es_variant = DATA(ls_existing_variant)
).
IF ls_existing_variant IS INITIAL.
MESSAGE e030(zdbbr_info) WITH ms_ui_refs-variant_name->*.
RETURN.
ENDIF.
zcl_dbbr_variant_factory=>delete_variant( ls_existing_variant-variant_id ).
MESSAGE s029(zdbbr_info) WITH ms_ui_refs-variant_name->*.
zcl_dbbr_screen_helper=>leave_screen( ).
ENDMETHOD.
METHOD zif_uitb_screen_controller~call_screen.
IF mv_mode = c_modes-save AND
ms_ui_refs-variant_name->* IS INITIAL.
CLEAR: ms_ui_refs-xoutput_fields->*,
ms_ui_refs-xsort_fields->*.
ENDIF.
ms_ui_refs-xfilter_fields->* = exists_criteria( ).
CASE mv_selscreen_mode.
WHEN zif_dbbr_c_selscreen_mode=>table.
ms_ui_refs-variant_table_name->* = mv_entity_name.
WHEN zif_dbbr_c_selscreen_mode=>query.
ms_ui_refs-variant_query_name->* = mv_entity_name.
WHEN zif_dbbr_c_selscreen_mode=>cds_view.
ms_ui_refs-variant_cds_name->* = mv_entity_name.
ENDCASE.
zcl_uitb_screen_util=>call_screen(
iv_screen_id = get_screen_id( )
iv_report_id = get_report_id( )
if_selscreen = abap_true
it_object_map = VALUE #(
( variable_name = zif_dbbr_main_report_var_ids=>c_r_variant_controller
global_ref = me )
)
iv_start_line = 2
iv_start_column = 10
).
ENDMETHOD.
METHOD zif_uitb_screen_controller~cancel.
zcl_dbbr_screen_helper=>leave_screen( ).
ENDMETHOD.
METHOD zif_uitb_screen_controller~free_screen_resources.
ENDMETHOD.
METHOD zif_uitb_screen_controller~get_report_id.
result = zif_dbbr_c_report_id=>main.
ENDMETHOD.
METHOD zif_uitb_screen_controller~get_screen_id.
result = SWITCH #( mv_selscreen_mode
WHEN zif_dbbr_c_selscreen_mode=>table THEN zif_dbbr_screen_ids=>c_table_variant
WHEN zif_dbbr_c_selscreen_mode=>query THEN zif_dbbr_screen_ids=>c_query_variant
WHEN zif_dbbr_c_selscreen_mode=>cds_view THEN zif_dbbr_screen_ids=>c_cds_view_variant
).
ENDMETHOD.
METHOD zif_uitb_screen_controller~handle_user_command.
CASE cv_function_code.
WHEN 'ENTER'.
CASE mv_mode.
WHEN c_modes-delete.
delete_variant( ).
WHEN c_modes-save.
IF mf_default_variant_mode = abap_true.
create_default_variant( ).
ELSE.
create_variant( ).
ENDIF.
ENDCASE.
WHEN 'CANCEL'.
zcl_dbbr_screen_helper=>leave_screen( ).
ENDCASE.
CLEAR cv_function_code.
ENDMETHOD.
METHOD zif_uitb_screen_controller~pbo.
zif_uitb_screen_controller~set_status( ).
LOOP AT SCREEN.
IF mf_default_variant_mode = abap_true.
IF screen-group1 = 'TXT' OR screen-group1 = 'VRN'.
screen-active = 0.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDIF.
IF screen-group1 = 'ALV' AND mf_alv_output = abap_false.
screen-active = 0.
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF screen-name = zif_dbbr_main_report_var_ids=>c_p_tab OR
screen-name = zif_dbbr_main_report_var_ids=>c_p_scrnam OR
screen-name = zif_dbbr_main_report_var_ids=>c_p_cds_view_name.
screen-input = 0.
MODIFY SCREEN.
ELSEIF screen-group1 = 'GLO'.
screen-active = 0.
MODIFY SCREEN.
ELSEIF ( screen-name = zif_dbbr_main_report_var_ids=>c_p_vartxt OR
screen-group1 = 'TXT' ) AND
mv_mode <> c_modes-save.
screen-active = 0.
MODIFY SCREEN.
ELSEIF screen-group1 = 'PAR' AND mv_mode <> c_modes-save.
screen-active = 0.
MODIFY SCREEN FROM screen.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD zif_uitb_screen_controller~set_status.
zcl_uitb_screen_util=>set_selscreen_status(
iv_status = '0600'
iv_repid = get_report_id( )
).
DATA(lv_title) = SWITCH #(
mf_default_variant_mode
WHEN abap_false THEN SWITCH string(
mv_mode
WHEN c_modes-save THEN
'Save variant'(v02)
WHEN c_modes-delete THEN
'Delete variant'(v03)
)
WHEN abap_true THEN SWITCH string(
mv_mode
WHEN c_modes-save THEN
'Save Default Variant'(017)
)
).
CASE mv_selscreen_mode.
WHEN zif_dbbr_c_selscreen_mode=>table.
ms_ui_refs-variant_for_table_title->* = lv_title.
WHEN zif_dbbr_c_selscreen_mode=>query.
ms_ui_refs-variant_for_query_title->* = lv_title.
WHEN zif_dbbr_c_selscreen_mode=>cds_view.
ms_ui_refs-variant_for_cds_title->* = lv_title.
ENDCASE.
ENDMETHOD.
METHOD zif_uitb_screen_controller~was_not_cancelled.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
4264,
2487,
1754,
1976,
388,
2531,
291,
2881,
14,
35882,
268,
14,
43,
5746,
26604,
1416,
831,
18042,
38215,
268,
3556,
79,
29,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
25641,
415,
62,
36500,
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,
5013,
65,
62,
9612,
62,
36500,
764,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
76,
4147,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3613,
220,
220,
41876,
493,
16,
26173,
8924,
352,
11,
198,
220,
220,
220,
220,
220,
220,
220,
12233,
41876,
493,
16,
26173,
8924,
513,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
76,
4147,
764,
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,
21628,
62,
9612,
62,
14171,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
9945,
1671,
62,
741,
9612,
62,
14171,
198,
220,
220,
220,
220,
220,
220,
220,
611,
62,
12286,
62,
25641,
415,
62,
14171,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
611,
62,
282,
85,
62,
14171,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26858,
62,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
49720,
62,
26858,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26858,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
49720,
62,
26858,
62,
312,
62,
1831,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
14171,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
493,
16,
198,
220,
220,
220,
220,
220,
220,
220,
4173,
62,
82,
62,
20541,
62,
7890,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
9945,
1671,
62,
20541,
62,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
4173,
62,
83,
62,
944,
1164,
82,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
9945,
1671,
62,
944,
1164,
62,
270,
397,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
4173,
62,
83,
62,
944,
1164,
82,
62,
41684,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
9945,
1671,
62,
944,
1164,
62,
270,
397,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
4173,
62,
83,
62,
41684,
62,
273,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
9945,
1671,
62,
273,
62,
741,
8658,
62,
270,
397,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
8658,
25747,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
9945,
1671,
62,
8658,
3245,
62,
4868,
198,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
8658,
25747,
62,
2164,
30094,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
9945,
1671,
62,
8658,
3245,
62,
4868,
764,
198,
220,
220,
220,
337,
36252,
50,
869,
62,
25641,
415,
62,
69,
19,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
8355,
43429,
1546,
651,
62,
13116,
62,
312,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
5013,
65,
62,
9612,
62,
36500,
93,
1136,
62,
13116,
62,
312,
764,
198,
220,
220,
220,
8355,
43429,
1546,
651,
62,
9612,
62,
312,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
5013,
65,
62,
9612,
62,
36500,
93,
1136,
62,
9612,
62,
312,
764,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
13845,
62,
9019,
62,
5420,
82,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15304,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
9945,
1671,
62,
25641,
415,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15304,
62,
5239,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
49427,
5239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
24455,
62,
25747,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
22915,
62,
25747,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
30619,
62,
25747,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
28665,
62,
10394,
82,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15304,
62,
11487,
62,
3672,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
7400,
3672,
1433,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15304,
62,
22766,
62,
3672,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
49720,
62,
22766,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15304,
62,
1640,
62,
11487,
62,
7839,
41876,
4526,
37,
5390,
827,
301,
62,
7839,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15304,
62,
1640,
62,
22766,
62,
7839,
41876,
4526,
37,
5390,
827,
301,
62,
7839,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15304,
62,
1640,
62,
66,
9310,
62,
7839,
220,
220,
41876,
4526,
37,
5390,
827,
301,
62,
7839,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15304,
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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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
] |
CLASS zcl_abapgit_persist_migrate DEFINITION PUBLIC CREATE PUBLIC.
PUBLIC SECTION.
CLASS-METHODS: run RAISING zcx_abapgit_exception.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES: BEGIN OF ty_setting_to_migrate,
name TYPE string,
value TYPE string,
END OF ty_setting_to_migrate,
ty_settings_to_migrate TYPE STANDARD TABLE OF ty_setting_to_migrate
WITH NON-UNIQUE DEFAULT KEY.
CONSTANTS c_text TYPE string VALUE 'Generated by abapGit' ##NO_TEXT.
CLASS-METHODS table_create
RAISING
zcx_abapgit_exception .
CLASS-METHODS table_exists
RETURNING
VALUE(rv_exists) TYPE abap_bool .
CLASS-METHODS lock_create
RAISING
zcx_abapgit_exception .
CLASS-METHODS lock_exists
RETURNING
VALUE(rv_exists) TYPE abap_bool .
CLASS-METHODS migrate_settings
RAISING
zcx_abapgit_exception.
CLASS-METHODS migrate_setting
IMPORTING
iv_name TYPE string
CHANGING
ct_settings_to_migrate TYPE ty_settings_to_migrate
ci_document TYPE REF TO if_ixml_document.
CLASS-METHODS distribute_settings_to_users
IMPORTING
it_settings_to_migrate TYPE ty_settings_to_migrate
RAISING
zcx_abapgit_exception.
CLASS-METHODS update_global_settings
IMPORTING
ii_document TYPE REF TO if_ixml_document
RAISING
zcx_abapgit_exception.
CLASS-METHODS read_global_settings_xml
RETURNING
VALUE(rv_global_settings_xml) TYPE string
RAISING
zcx_abapgit_not_found.
CLASS-METHODS get_global_settings_document
RETURNING
VALUE(ri_global_settings_dom) TYPE REF TO if_ixml_document
RAISING
zcx_abapgit_not_found.
ENDCLASS.
CLASS zcl_abapgit_persist_migrate IMPLEMENTATION.
METHOD distribute_settings_to_users.
TYPES: ty_char12 TYPE c LENGTH 12.
DATA: lt_abapgit_users TYPE STANDARD TABLE OF ty_char12
WITH NON-UNIQUE DEFAULT KEY,
ls_user_settings TYPE zif_abapgit_definitions=>ty_s_user_settings,
li_user_persistence TYPE REF TO zif_abapgit_persist_user.
FIELD-SYMBOLS: <lv_user> LIKE LINE OF lt_abapgit_users,
<ls_setting_to_migrate> TYPE ty_setting_to_migrate,
<lg_user_specific_setting_val> TYPE data.
" distribute settings to all abapGit users
SELECT value FROM (zcl_abapgit_persistence_db=>c_tabname)
INTO TABLE lt_abapgit_users
WHERE type = zcl_abapgit_persistence_db=>c_type_user.
LOOP AT lt_abapgit_users ASSIGNING <lv_user>.
li_user_persistence = zcl_abapgit_persistence_user=>get_instance( <lv_user> ).
ls_user_settings = li_user_persistence->get_settings( ).
LOOP AT it_settings_to_migrate ASSIGNING <ls_setting_to_migrate>.
ASSIGN COMPONENT <ls_setting_to_migrate>-name
OF STRUCTURE ls_user_settings
TO <lg_user_specific_setting_val>.
ASSERT sy-subrc = 0.
<lg_user_specific_setting_val> = <ls_setting_to_migrate>-value.
ENDLOOP.
li_user_persistence->set_settings( ls_user_settings ).
ENDLOOP.
ENDMETHOD.
METHOD get_global_settings_document.
DATA: lv_global_settings_xml TYPE string.
lv_global_settings_xml = read_global_settings_xml( ).
ri_global_settings_dom = cl_ixml_80_20=>parse_to_document( stream_string = lv_global_settings_xml ).
ENDMETHOD.
METHOD lock_create.
DATA: lv_obj_name TYPE tadir-obj_name,
ls_dd25v TYPE dd25v,
lt_dd26e TYPE STANDARD TABLE OF dd26e WITH DEFAULT KEY,
lt_dd27p TYPE STANDARD TABLE OF dd27p WITH DEFAULT KEY.
FIELD-SYMBOLS: <ls_dd26e> LIKE LINE OF lt_dd26e,
<ls_dd27p> LIKE LINE OF lt_dd27p.
ls_dd25v-viewname = zcl_abapgit_persistence_db=>c_lock.
ls_dd25v-aggtype = 'E'.
ls_dd25v-roottab = zcl_abapgit_persistence_db=>c_tabname.
ls_dd25v-ddlanguage = zif_abapgit_definitions=>c_english.
ls_dd25v-ddtext = c_text.
APPEND INITIAL LINE TO lt_dd26e ASSIGNING <ls_dd26e>.
<ls_dd26e>-viewname = zcl_abapgit_persistence_db=>c_lock.
<ls_dd26e>-tabname = zcl_abapgit_persistence_db=>c_tabname.
<ls_dd26e>-tabpos = '0001'.
<ls_dd26e>-fortabname = zcl_abapgit_persistence_db=>c_tabname.
<ls_dd26e>-enqmode = 'E'.
APPEND INITIAL LINE TO lt_dd27p ASSIGNING <ls_dd27p>.
<ls_dd27p>-viewname = zcl_abapgit_persistence_db=>c_lock.
<ls_dd27p>-objpos = '0001'.
<ls_dd27p>-viewfield = 'TYPE'.
<ls_dd27p>-tabname = zcl_abapgit_persistence_db=>c_tabname.
<ls_dd27p>-fieldname = 'TYPE'.
<ls_dd27p>-keyflag = abap_true.
APPEND INITIAL LINE TO lt_dd27p ASSIGNING <ls_dd27p>.
<ls_dd27p>-viewname = zcl_abapgit_persistence_db=>c_lock.
<ls_dd27p>-objpos = '0002'.
<ls_dd27p>-viewfield = 'VALUE'.
<ls_dd27p>-tabname = zcl_abapgit_persistence_db=>c_tabname.
<ls_dd27p>-fieldname = 'VALUE'.
<ls_dd27p>-keyflag = abap_true.
CALL FUNCTION 'DDIF_ENQU_PUT'
EXPORTING
name = zcl_abapgit_persistence_db=>c_lock
dd25v_wa = ls_dd25v
TABLES
dd26e_tab = lt_dd26e
dd27p_tab = lt_dd27p
EXCEPTIONS
enqu_not_found = 1
name_inconsistent = 2
enqu_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
lv_obj_name = zcl_abapgit_persistence_db=>c_lock.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
wi_tadir_pgmid = 'R3TR'
wi_tadir_object = 'ENQU'
wi_tadir_obj_name = lv_obj_name
wi_set_genflag = abap_true
wi_test_modus = abap_false
wi_tadir_devclass = '$TMP'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
CALL FUNCTION 'DDIF_ENQU_ACTIVATE'
EXPORTING
name = zcl_abapgit_persistence_db=>c_lock
EXCEPTIONS
not_found = 1
put_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'migrate, error from DDIF_ENQU_ACTIVATE' ).
ENDIF.
ENDMETHOD.
METHOD lock_exists.
DATA: lv_viewname TYPE dd25l-viewname.
SELECT SINGLE viewname FROM dd25l INTO lv_viewname
WHERE viewname = zcl_abapgit_persistence_db=>c_lock.
rv_exists = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD migrate_setting.
DATA: li_element TYPE REF TO if_ixml_element,
ls_setting_to_migrate LIKE LINE OF ct_settings_to_migrate.
li_element = ci_document->find_from_name( iv_name ).
IF li_element IS BOUND.
" The element is present in the global config.
" Therefore we have to migrate it
ls_setting_to_migrate-name = iv_name.
ls_setting_to_migrate-value = li_element->get_value( ).
INSERT ls_setting_to_migrate INTO TABLE ct_settings_to_migrate.
li_element->remove_node( ).
ENDIF.
ENDMETHOD.
METHOD migrate_settings.
DATA: li_global_settings_document TYPE REF TO if_ixml_document,
lt_settings_to_migrate TYPE ty_settings_to_migrate,
lx_error TYPE REF TO zcx_abapgit_not_found.
" migrate global settings to user specific settings
TRY.
li_global_settings_document = get_global_settings_document( ).
CATCH zcx_abapgit_not_found INTO lx_error.
" No global settings available, nothing todo.
RETURN.
ENDTRY.
migrate_setting(
EXPORTING
iv_name = |MAX_LINES|
CHANGING
ct_settings_to_migrate = lt_settings_to_migrate
ci_document = li_global_settings_document ).
migrate_setting(
EXPORTING
iv_name = |ADT_JUMP_ENABLED|
CHANGING
ct_settings_to_migrate = lt_settings_to_migrate
ci_document = li_global_settings_document ).
IF lines( lt_settings_to_migrate ) > 0.
distribute_settings_to_users( lt_settings_to_migrate ).
update_global_settings( li_global_settings_document ).
ENDIF.
ENDMETHOD.
METHOD read_global_settings_xml.
rv_global_settings_xml = zcl_abapgit_persistence_db=>get_instance( )->read(
iv_type = zcl_abapgit_persistence_db=>c_type_settings
iv_value = '' ).
ENDMETHOD.
METHOD run.
IF table_exists( ) = abap_false.
table_create( ).
ENDIF.
IF lock_exists( ) = abap_false.
lock_create( ).
ENDIF.
migrate_settings( ).
ENDMETHOD.
METHOD table_create.
DATA: lv_rc LIKE sy-subrc,
lv_obj_name TYPE tadir-obj_name,
ls_dd02v TYPE dd02v,
ls_dd09l TYPE dd09l,
lt_dd03p TYPE STANDARD TABLE OF dd03p WITH DEFAULT KEY.
FIELD-SYMBOLS: <ls_dd03p> LIKE LINE OF lt_dd03p.
ls_dd02v-tabname = zcl_abapgit_persistence_db=>c_tabname.
ls_dd02v-ddlanguage = zif_abapgit_definitions=>c_english.
ls_dd02v-tabclass = 'TRANSP'.
ls_dd02v-ddtext = c_text.
ls_dd02v-contflag = 'L'.
ls_dd02v-exclass = '1'.
ls_dd09l-tabname = zcl_abapgit_persistence_db=>c_tabname.
ls_dd09l-as4local = 'A'.
ls_dd09l-tabkat = '1'.
ls_dd09l-tabart = 'APPL1'.
ls_dd09l-bufallow = 'N'.
APPEND INITIAL LINE TO lt_dd03p ASSIGNING <ls_dd03p>.
<ls_dd03p>-tabname = zcl_abapgit_persistence_db=>c_tabname.
<ls_dd03p>-fieldname = 'TYPE'.
<ls_dd03p>-position = '0001'.
<ls_dd03p>-keyflag = 'X'.
<ls_dd03p>-datatype = 'CHAR'.
<ls_dd03p>-leng = '000012'.
APPEND INITIAL LINE TO lt_dd03p ASSIGNING <ls_dd03p>.
<ls_dd03p>-tabname = zcl_abapgit_persistence_db=>c_tabname.
<ls_dd03p>-fieldname = 'VALUE'.
<ls_dd03p>-position = '0002'.
<ls_dd03p>-keyflag = 'X'.
<ls_dd03p>-datatype = 'CHAR'.
<ls_dd03p>-leng = '000012'.
APPEND INITIAL LINE TO lt_dd03p ASSIGNING <ls_dd03p>.
<ls_dd03p>-tabname = zcl_abapgit_persistence_db=>c_tabname.
<ls_dd03p>-fieldname = 'DATA_STR'.
<ls_dd03p>-position = '0003'.
<ls_dd03p>-datatype = 'STRG'.
CALL FUNCTION 'DDIF_TABL_PUT'
EXPORTING
name = zcl_abapgit_persistence_db=>c_tabname
dd02v_wa = ls_dd02v
dd09l_wa = ls_dd09l
TABLES
dd03p_tab = lt_dd03p
EXCEPTIONS
tabl_not_found = 1
name_inconsistent = 2
tabl_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
lv_obj_name = zcl_abapgit_persistence_db=>c_tabname.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
wi_tadir_pgmid = 'R3TR'
wi_tadir_object = 'TABL'
wi_tadir_obj_name = lv_obj_name
wi_set_genflag = abap_true
wi_test_modus = abap_false
wi_tadir_devclass = '$TMP'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
CALL FUNCTION 'DDIF_TABL_ACTIVATE'
EXPORTING
name = zcl_abapgit_persistence_db=>c_tabname
auth_chk = abap_false
IMPORTING
rc = lv_rc
EXCEPTIONS
not_found = 1
put_failure = 2
OTHERS = 3.
IF sy-subrc <> 0 OR lv_rc <> 0.
zcx_abapgit_exception=>raise( 'migrate, error from DDIF_TABL_ACTIVATE' ).
ENDIF.
ENDMETHOD.
METHOD table_exists.
DATA: lv_tabname TYPE dd02l-tabname.
SELECT SINGLE tabname FROM dd02l INTO lv_tabname
WHERE tabname = zcl_abapgit_persistence_db=>c_tabname.
rv_exists = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD update_global_settings.
DATA: li_ixml TYPE REF TO if_ixml,
lv_settings_xml TYPE string,
li_ostream TYPE REF TO if_ixml_ostream,
li_renderer TYPE REF TO if_ixml_renderer,
li_streamfactory TYPE REF TO if_ixml_stream_factory.
" finally update global settings
" migrated elements are already removed from document
li_ixml = cl_ixml=>create( ).
li_streamfactory = li_ixml->create_stream_factory( ).
li_ostream = li_streamfactory->create_ostream_cstring( lv_settings_xml ).
li_renderer = li_ixml->create_renderer( ostream = li_ostream
document = ii_document ).
li_renderer->render( ).
zcl_abapgit_persistence_db=>get_instance( )->update(
iv_type = zcl_abapgit_persistence_db=>c_type_settings
iv_value = ''
iv_data = lv_settings_xml ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
19276,
396,
62,
76,
42175,
5550,
20032,
17941,
44731,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
1057,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
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,
33990,
62,
1462,
62,
76,
42175,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
33990,
62,
1462,
62,
76,
42175,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
62,
33692,
62,
1462,
62,
76,
42175,
41876,
49053,
9795,
43679,
3963,
1259,
62,
33990,
62,
1462,
62,
76,
42175,
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,
13315,
44521,
12,
4944,
33866,
8924,
5550,
38865,
35374,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
5239,
41876,
4731,
26173,
8924,
705,
8645,
515,
416,
450,
499,
38,
270,
6,
22492,
15285,
62,
32541,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
3084,
62,
17953,
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,
3084,
62,
1069,
1023,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
1069,
1023,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
5793,
62,
17953,
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,
5793,
62,
1069,
1023,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
1069,
1023,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
32492,
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,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
32492,
62,
33990,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
269,
83,
62,
33692,
62,
1462,
62,
76,
42175,
41876,
1259,
62,
33692,
62,
1462,
62,
76,
42175,
198,
220,
220,
220,
220,
220,
220,
220,
269,
72,
62,
22897,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
22897,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
14983,
62,
33692,
62,
1462,
62,
18417,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
33692,
62,
1462,
62,
76,
42175,
41876,
1259,
62,
33692,
62,
1462,
62,
76,
42175,
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,
220,
220,
220,
42715,
12,
49273,
50,
4296,
62,
20541,
62,
33692,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
22897,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
22897,
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,
220,
220,
220,
42715,
12,
49273,
50,
1100,
62,
20541,
62,
33692,
62,
19875,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
20541,
62,
33692,
62,
19875,
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,
1662,
62,
9275,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
20541,
62,
33692,
62,
22897,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
20541,
62,
33692,
62,
3438,
8,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
22897,
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,
1662,
62,
9275,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
19276,
396,
62,
76,
42175,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
14983,
62,
33692,
62,
1462,
62,
18417,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
1259,
62,
10641,
1065,
41876,
269,
406,
49494,
1105,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
397,
499,
18300,
62,
18417,
220,
220,
220,
41876,
49053,
9795,
43679,
3963,
1259,
62,
10641,
1065,
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,
13315,
44521,
12,
4944,
33866,
8924,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
7220,
62,
33692,
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,
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
] |
*&---------------------------------------------------------------------*
*& Report zaps_demo_report_executable
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
report zaps_demo_report_executable.
parameters:
p_index type i.
try.
data(randomWaitSeconds) = cl_abap_random_int=>create(
seed = cl_abap_random=>seed( )
min = 5
max = 20
)->get_next( ).
catch cx_abap_random.
randomWaitSeconds = 5.
endtry.
wait up to randomWaitSeconds seconds.
message i319(01)
with |This is task number { p_index }|.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
1976,
1686,
62,
9536,
78,
62,
13116,
62,
18558,
18187,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
13116,
1976,
1686,
62,
9536,
78,
62,
13116,
62,
18558,
18187,
13,
198,
220,
10007,
25,
198,
220,
220,
220,
279,
62,
9630,
220,
220,
220,
220,
220,
220,
2099,
1312,
13,
628,
220,
1949,
13,
198,
220,
220,
220,
1366,
7,
25120,
21321,
12211,
82,
8,
796,
537,
62,
397,
499,
62,
25120,
62,
600,
14804,
17953,
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,
220,
220,
9403,
796,
537,
62,
397,
499,
62,
25120,
14804,
28826,
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,
949,
220,
796,
642,
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,
3509,
220,
796,
1160,
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,
1267,
3784,
1136,
62,
19545,
7,
6739,
198,
220,
4929,
43213,
62,
397,
499,
62,
25120,
13,
198,
220,
220,
220,
4738,
21321,
12211,
82,
796,
642,
13,
198,
220,
886,
28311,
13,
628,
220,
4043,
510,
284,
4738,
21321,
12211,
82,
4201,
13,
628,
220,
3275,
1312,
35175,
7,
486,
8,
198,
220,
351,
930,
1212,
318,
4876,
1271,
1391,
279,
62,
9630,
1782,
91,
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
] |
CLASS ltcl_find_by_item DEFINITION FOR TESTING DURATION LONG RISK LEVEL HARMLESS FINAL.
PRIVATE SECTION.
DATA:
mo_cut TYPE REF TO zcl_abaplint_deps_find.
DATA:
mo_log TYPE REF TO zif_abapgit_log.
METHODS:
setup,
usr02 FOR TESTING RAISING cx_static_check,
dd01v FOR TESTING RAISING cx_static_check,
swf_catt FOR TESTING RAISING cx_static_check,
upx_compare_cust FOR TESTING RAISING cx_static_check,
zcl_abapgit_object_dtel FOR TESTING RAISING cx_static_check,
zcl_abapgit_object_cus0 FOR TESTING RAISING cx_static_check,
txmilograw FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS ltcl_find_by_item IMPLEMENTATION.
METHOD setup.
DATA ls_options TYPE zcl_abaplint_deps_find=>ty_options.
ls_options-continue_into_sap = abap_true.
CREATE OBJECT mo_cut
EXPORTING
is_options = ls_options.
CREATE OBJECT mo_log TYPE zcl_abapgit_log.
ENDMETHOD.
METHOD txmilograw.
DATA: lt_results TYPE zif_abapgit_definitions=>ty_tadir_tt.
lt_results = mo_cut->find_by_item(
iv_object_type = 'TABL'
iv_object_name = 'TXMILOGRAW' ).
READ TABLE lt_results WITH KEY object = 'DTEL' obj_name = 'XMILOGID' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( ).
READ TABLE lt_results WITH KEY object = 'DOMA' obj_name = 'XMILOGID' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( ).
READ TABLE lt_results WITH KEY object = 'TABL' obj_name = 'SXMILOGADM' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( ).
READ TABLE lt_results WITH KEY object = 'TABL' obj_name = 'SXMIMSGRAW' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( ).
* not sure the result is the same across systems/versions
cl_abap_unit_assert=>assert_number_between(
lower = 20
upper = 50
number = lines( lt_results ) ).
ENDMETHOD.
METHOD usr02.
DATA: lt_results TYPE zif_abapgit_definitions=>ty_tadir_tt.
lt_results = mo_cut->find_by_item(
iv_object_type = 'TABL'
iv_object_name = 'USR02' ).
* the check tables should not be found by the dependency analysis, they are not relevant to abaplint
READ TABLE lt_results WITH KEY object = 'TABL' obj_name = 'SEC_POLICY_CUST' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( exp = 4 ).
ENDMETHOD.
METHOD zcl_abapgit_object_dtel.
DATA: lt_results TYPE zif_abapgit_definitions=>ty_tadir_tt.
lt_results = mo_cut->find_by_item(
iv_object_type = 'CLAS'
iv_object_name = 'ZCL_ABAPGIT_OBJECT_DTEL' ).
* the class calls function module DDIF_DTEL_PUT, so this function group is a dependency
READ TABLE lt_results WITH KEY object = 'FUGR' obj_name = 'SDIF' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( ).
* for the function group SDIF, only minimal dependencies are needed, ie only types of the function modules
* READ TABLE lt_results WITH KEY object = 'PROG' obj_name = 'RADBTMAC' TRANSPORTING NO FIELDS
* cl_abap_unit_assert=>assert_subrc( exp = 4 )
* data element DDOBJNAME is used in the parameters for function module DDIF_DD_CHECK from SDIF
READ TABLE lt_results WITH KEY object = 'DTEL' obj_name = 'DDOBJNAME' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( ).
* TABL DCOBJIF only used in the code for SDIF function group, so it should not be a dependency
READ TABLE lt_results WITH KEY object = 'TABL' obj_name = 'DCOBJIF' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( exp = 4 ).
ENDMETHOD.
METHOD dd01v.
DATA: lt_results TYPE zif_abapgit_definitions=>ty_tadir_tt.
lt_results = mo_cut->find_by_item(
iv_object_type = 'VIEW'
iv_object_name = 'DD01V' ).
READ TABLE lt_results WITH KEY object = 'TABL' obj_name = 'DD01L' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( ).
ENDMETHOD.
METHOD zcl_abapgit_object_cus0.
DATA: lt_results TYPE zif_abapgit_definitions=>ty_tadir_tt.
lt_results = mo_cut->find_by_item(
iv_object_type = 'CLAS'
iv_object_name = 'ZCL_ABAPGIT_OBJECT_CUS0' ).
* no direct transactions used
READ TABLE lt_results WITH KEY object = 'TRAN' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( exp = 4 ).
ENDMETHOD.
METHOD upx_compare_cust.
DATA: lt_results TYPE zif_abapgit_definitions=>ty_tadir_tt.
lt_results = mo_cut->find_by_item(
iv_object_type = 'PROG'
iv_object_name = 'UPX_COMPARE_CUST' ).
READ TABLE lt_results WITH KEY object = 'PROG' obj_name = '<ICON>' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( ).
ENDMETHOD.
METHOD swf_catt.
DATA: lt_results TYPE zif_abapgit_definitions=>ty_tadir_tt.
lt_results = mo_cut->find_by_item(
iv_object_type = 'FUGR'
iv_object_name = 'SWF_CATT' ).
READ TABLE lt_results WITH KEY object = 'PROG' obj_name = '<CNTN01>' TRANSPORTING NO FIELDS.
cl_abap_unit_assert=>assert_subrc( ).
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
83,
565,
62,
19796,
62,
1525,
62,
9186,
5550,
20032,
17941,
7473,
43001,
2751,
360,
4261,
6234,
44533,
45698,
42,
49277,
43638,
5805,
7597,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
6941,
62,
8968,
41876,
4526,
37,
5390,
1976,
565,
62,
15498,
489,
600,
62,
10378,
82,
62,
19796,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
6941,
62,
6404,
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,
9058,
11,
198,
220,
220,
220,
220,
220,
514,
81,
2999,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
49427,
486,
85,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
1509,
69,
62,
66,
1078,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
510,
87,
62,
5589,
533,
62,
66,
436,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
28664,
417,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
9042,
15,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
27765,
25433,
519,
1831,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
198,
10619,
31631,
13,
628,
198,
31631,
300,
83,
565,
62,
19796,
62,
1525,
62,
9186,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
9058,
13,
198,
220,
220,
220,
42865,
43979,
62,
25811,
41876,
1976,
565,
62,
15498,
489,
600,
62,
10378,
82,
62,
19796,
14804,
774,
62,
25811,
13,
628,
220,
220,
220,
43979,
62,
25811,
12,
43043,
62,
20424,
62,
82,
499,
796,
450,
499,
62,
7942,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
6941,
62,
8968,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
25811,
796,
43979,
62,
25811,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
6941,
62,
6404,
41876,
1976,
565,
62,
397,
499,
18300,
62,
6404,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
27765,
25433,
519,
1831,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
43420,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
83,
324,
343,
62,
926,
13,
628,
220,
220,
220,
300,
83,
62,
43420,
796,
6941,
62,
8968,
3784,
19796,
62,
1525,
62,
9186,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
15252,
62,
4906,
796,
705,
5603,
9148,
6,
198,
220,
220,
220,
220,
220,
21628,
62,
15252,
62,
3672,
796,
705,
29551,
44,
4146,
7730,
20530,
6,
6739,
628,
220,
220,
220,
20832,
43679,
300,
83,
62,
43420,
13315,
35374,
2134,
796,
705,
24544,
3698,
6,
26181,
62,
3672,
796,
705,
37643,
4146,
7730,
2389,
6,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
7266,
6015,
7,
6739,
198,
220,
220,
220,
20832,
43679,
300,
83,
62,
43420,
13315,
35374,
2134,
796,
705,
39170,
32,
6,
26181,
62,
3672,
796,
705,
37643,
4146,
7730,
2389,
6,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
7266,
6015,
7,
6739,
628,
220,
220,
220,
20832,
43679,
300,
83,
62,
43420,
13315,
35374,
2134,
796,
705,
5603,
9148,
6,
26181,
62,
3672,
796,
705,
50,
37643,
4146,
7730,
2885,
44,
6,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
7266,
6015,
7,
6739,
198,
220,
220,
220,
20832,
43679,
300,
83,
62,
43420,
13315,
35374,
2134,
796,
705,
5603,
9148,
6,
26181,
62,
3672,
796,
705,
50,
37643,
3955,
38475,
20530,
6,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
7266,
6015,
7,
6739,
198,
198,
9,
407,
1654,
262,
1255,
318,
262,
976,
1973,
3341,
14,
47178,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
17618,
62,
23395,
7,
198,
220,
220,
220,
220,
220,
2793,
220,
796,
1160,
198,
220,
220,
220,
220,
220,
6727,
220,
796,
2026,
198,
220,
220,
220,
220,
220,
1271,
796,
3951,
7,
300,
83,
62,
43420,
1267,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
514,
81,
2999,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
43420,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
83,
324,
343,
62,
926,
13,
628,
220,
220,
220,
300,
83,
62,
43420,
796,
6941,
62,
8968,
3784,
19796,
62,
1525,
62,
9186,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
15252,
62,
4906,
796,
705,
5603,
9148,
6,
198,
220,
220,
220,
220,
220,
21628,
62,
15252,
62,
3672,
796,
705,
2937,
49,
2999,
6,
6739,
198,
198,
9,
262,
2198,
8893,
815,
407,
307,
1043,
416,
262,
20203,
3781,
11,
484,
389,
407,
5981,
284,
450,
64,
489,
600,
198,
220,
220,
220,
20832,
43679,
300,
83,
62,
43420,
13315,
35374,
2134,
796,
705,
5603,
9148,
6,
26181,
62,
3672,
796,
705,
23683,
62,
45472,
2149,
56,
62,
34,
7759,
6,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
7266,
6015,
7,
1033,
796,
604,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
28664,
417,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
43420,
41876,
1976,
361,
62,
397,
499
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
CLASS kernel_ixml_json_to_data DEFINITION PUBLIC.
PUBLIC SECTION.
CLASS-METHODS build
IMPORTING
iv_name TYPE string
iv_ref TYPE REF TO data
ii_doc TYPE REF TO if_ixml_document.
PRIVATE SECTION.
CLASS-METHODS get_field_name
IMPORTING ii_node TYPE REF TO if_ixml_node
RETURNING VALUE(rv_name) TYPE string.
CLASS-METHODS traverse
IMPORTING
ii_node TYPE REF TO if_ixml_node
iv_ref TYPE REF TO data.
ENDCLASS.
CLASS kernel_ixml_json_to_data IMPLEMENTATION.
METHOD get_field_name.
DATA li_aiterator TYPE REF TO if_ixml_node_iterator.
DATA li_anode TYPE REF TO if_ixml_node.
DATA attr TYPE REF TO if_ixml_named_node_map.
attr = ii_node->get_attributes( ).
IF attr IS NOT INITIAL.
li_aiterator = attr->create_iterator( ).
DO.
li_anode = li_aiterator->get_next( ).
IF li_anode IS INITIAL.
EXIT. " current loop
ENDIF.
* assume its the name,
rv_name = li_anode->get_value( ).
RETURN.
ENDDO.
ENDIF.
ENDMETHOD.
METHOD build.
* assumptions: the top level element is an object containing iv_name
DATA li_first TYPE REF TO if_ixml_node.
DATA li_node TYPE REF TO if_ixml_node.
DATA lv_name TYPE string.
DATA li_iterator TYPE REF TO if_ixml_node_iterator.
li_first = ii_doc->get_root( )->get_first_child( ).
ASSERT li_first->get_name( ) = 'object'.
li_iterator = li_first->get_children( )->create_iterator( ).
DO.
li_node = li_iterator->get_next( ).
IF li_node IS INITIAL.
EXIT. " current loop
ENDIF.
lv_name = get_field_name( li_node ).
IF lv_name = iv_name.
* WRITE '@KERNEL console.dir("found");'.
traverse(
iv_ref = iv_ref
ii_node = li_node ).
RETURN.
ENDIF.
ENDDO.
ENDMETHOD.
METHOD traverse.
DATA lo_type TYPE REF TO cl_abap_typedescr.
DATA li_child TYPE REF TO if_ixml_node.
DATA lv_name TYPE string.
DATA li_iterator TYPE REF TO if_ixml_node_iterator.
DATA lv_ref TYPE REF TO data.
FIELD-SYMBOLS <any> TYPE any.
FIELD-SYMBOLS <field> TYPE any.
FIELD-SYMBOLS <tab> TYPE ANY TABLE.
lo_type = cl_abap_typedescr=>describe_by_data( iv_ref->* ).
CASE lo_type->kind.
WHEN cl_abap_typedescr=>kind_struct.
ASSERT ii_node->get_name( ) = 'object'.
ASSIGN iv_ref->* TO <any>.
li_iterator = ii_node->get_children( )->create_iterator( ).
DO.
li_child = li_iterator->get_next( ).
IF li_child IS INITIAL.
EXIT. " current loop
ENDIF.
lv_name = get_field_name( li_child ).
ASSIGN COMPONENT lv_name OF STRUCTURE <any> TO <field>.
IF sy-subrc = 0.
GET REFERENCE OF <field> INTO lv_ref.
traverse( ii_node = li_child
iv_ref = lv_ref ).
ENDIF.
ENDDO.
WHEN cl_abap_typedescr=>kind_elem.
li_child = ii_node->get_first_child( ).
ASSERT li_child->get_name( ) = '#text'.
ASSIGN iv_ref->* TO <any>.
<any> = li_child->get_value( ).
WHEN cl_abap_typedescr=>kind_table.
ASSERT ii_node->get_name( ) = 'array'.
ASSIGN iv_ref->* TO <tab>.
li_iterator = ii_node->get_children( )->create_iterator( ).
DO.
li_child = li_iterator->get_next( ).
IF li_child IS INITIAL.
EXIT. " current loop
ENDIF.
CREATE DATA lv_ref LIKE LINE OF <tab>.
ASSIGN lv_ref->* TO <any>.
traverse( ii_node = li_child
iv_ref = lv_ref ).
INSERT <any> INTO TABLE <tab>.
ENDDO.
WHEN OTHERS.
WRITE '@KERNEL console.dir(lo_type.get().kind.get());'.
ENDCASE.
ENDMETHOD.
ENDCLASS. | [
31631,
9720,
62,
844,
4029,
62,
17752,
62,
1462,
62,
7890,
5550,
20032,
17941,
44731,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
1382,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
220,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
3672,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
5420,
220,
41876,
4526,
37,
5390,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
15390,
220,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
22897,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
3245,
62,
3672,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21065,
62,
17440,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
17440,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
3672,
8,
41876,
4731,
13,
220,
220,
220,
220,
198,
220,
220,
220,
42715,
12,
49273,
50,
38138,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
220,
198,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
17440,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
17440,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
5420,
220,
41876,
4526,
37,
5390,
1366,
13,
198,
10619,
31631,
13,
198,
198,
31631,
9720,
62,
844,
4029,
62,
17752,
62,
1462,
62,
7890,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
651,
62,
3245,
62,
3672,
13,
198,
220,
220,
220,
42865,
7649,
62,
64,
48727,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
17440,
62,
48727,
13,
198,
220,
220,
220,
42865,
7649,
62,
272,
1098,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
17440,
13,
198,
220,
220,
220,
42865,
708,
81,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
13190,
62,
17440,
62,
8899,
13,
198,
220,
220,
220,
220,
198,
220,
220,
220,
708,
81,
796,
21065,
62,
17440,
3784,
1136,
62,
1078,
7657,
7,
6739,
198,
220,
220,
220,
16876,
708,
81,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
7649,
62,
64,
48727,
796,
708,
81,
3784,
17953,
62,
48727,
7,
6739,
198,
220,
220,
220,
220,
220,
8410,
13,
198,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
272,
1098,
796,
7649,
62,
64,
48727,
3784,
1136,
62,
19545,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
7649,
62,
272,
1098,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
2043,
13,
366,
1459,
9052,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
9,
7048,
663,
262,
1438,
11,
198,
220,
220,
220,
220,
220,
220,
220,
374,
85,
62,
3672,
796,
7649,
62,
272,
1098,
3784,
1136,
62,
8367,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
220,
220,
23578,
18227,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1382,
13,
198,
9,
14895,
25,
262,
1353,
1241,
5002,
318,
281,
2134,
7268,
21628,
62,
3672,
628,
220,
220,
220,
42865,
7649,
62,
11085,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
17440,
13,
198,
220,
220,
220,
42865,
7649,
62,
17440,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
17440,
13,
198,
220,
220,
220,
42865,
300,
85,
62,
3672,
41876,
4731,
13,
198,
220,
220,
220,
42865,
7649,
62,
48727,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
17440,
62,
48727,
13,
198,
220,
220,
220,
220,
198,
220,
220,
220,
7649,
62,
11085,
796,
21065,
62,
15390,
3784,
1136,
62,
15763,
7,
1267,
3784,
1136,
62,
11085,
62,
9410,
7,
6739,
198,
220,
220,
220,
24994,
17395,
7649,
62,
11085,
3784,
1136,
62,
3672,
7,
1267,
796,
705,
15252,
4458,
628,
220,
220,
220,
7649,
62,
48727,
796,
7649,
62,
11085,
3784,
1136,
62,
17197,
7,
1267,
3784,
17953,
62,
48727,
7,
6739,
198,
220,
220,
220,
8410,
13,
198,
220,
220,
220,
220,
220,
7649,
62,
17440,
796,
7649,
62,
48727,
3784,
1136,
62,
19545,
7,
6739,
198,
220,
220,
220,
220,
220,
16876,
7649,
62,
17440,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
2043,
13,
366,
1459,
9052,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
300,
85,
62,
3672,
796,
651,
62,
3245,
62,
3672,
7,
7649,
62,
17440,
6739,
198,
220,
220,
220,
220,
220,
16876,
300,
85,
62,
3672,
796,
21628,
62,
3672,
13,
198,
9,
220,
220,
220,
220,
220,
220,
220,
44423,
705,
31,
42,
28778,
3698,
8624,
13,
15908,
7203,
9275,
15341,
4458,
220,
198,
220,
220,
220,
220,
220,
220,
220,
38138,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
5420,
220,
796,
21628,
62,
5420,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
17440,
796,
7649,
62,
17440,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
23578,
18227,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
38138,
13,
628,
220,
220,
220,
42865,
2376,
62,
4906,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
774,
9124,
3798,
81,
13,
198,
220,
220,
220,
42865,
7649,
62,
9410,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
17440,
13,
198,
220,
220,
220,
42865,
300,
85,
62,
3672,
41876,
4731,
13,
198,
220,
220,
220,
42865,
7649,
62,
48727,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
17440,
62,
48727,
13,
198,
220,
220,
220,
42865,
300,
85,
62,
5420,
41876,
4526,
37,
5390,
1366,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
1279,
1092,
29,
41876,
597,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
1279,
3245,
29,
41876,
597,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
1279,
8658,
29,
41876,
15529,
43679,
13,
198,
220,
220,
220,
220,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
CLASS zcl_abapgit_object_docv 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_typ TYPE dokhl-typ VALUE 'E',
c_version TYPE dokhl-dokversion VALUE '0001',
c_name TYPE string VALUE 'DOC'.
TYPES: BEGIN OF ty_data,
doctitle TYPE dsyst-doktitle,
head TYPE thead,
lines TYPE tline_tab,
END OF ty_data.
METHODS: read
RETURNING VALUE(rs_data) TYPE ty_data.
ENDCLASS.
CLASS zcl_abapgit_object_docv IMPLEMENTATION.
METHOD read.
DATA: lv_object TYPE dokhl-object,
lv_id TYPE dokhl-id.
lv_id = ms_item-obj_name(2).
lv_object = ms_item-obj_name+2.
CALL FUNCTION 'DOCU_READ'
EXPORTING
id = lv_id
langu = mv_language
object = lv_object
typ = c_typ
version = c_version
IMPORTING
doktitle = rs_data-doctitle
head = rs_data-head
TABLES
line = rs_data-lines.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = read( )-head-tdluser.
IF rv_user IS INITIAL.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_id TYPE dokhl-id,
lv_object TYPE dokhl-object.
lv_id = ms_item-obj_name(2).
lv_object = ms_item-obj_name+2.
CALL FUNCTION 'DOCU_DEL'
EXPORTING
id = lv_id
langu = mv_language
object = lv_object
typ = c_typ
EXCEPTIONS
ret_code = 1
OTHERS = 2.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: ls_data TYPE ty_data.
io_xml->read( EXPORTING iv_name = c_name
CHANGING cg_data = ls_data ).
CALL FUNCTION 'DOCU_UPDATE'
EXPORTING
head = ls_data-head
state = 'A'
typ = c_typ
version = c_version
TABLES
line = ls_data-lines.
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_id TYPE dokhl-id,
lv_object TYPE dokhl-object.
lv_id = ms_item-obj_name(2).
lv_object = ms_item-obj_name+2.
SELECT SINGLE id FROM dokil INTO lv_id
WHERE id = lv_id
AND object = lv_object. "#EC CI_GENBUFF
rv_bool = xsdbool( 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-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.
zcx_abapgit_exception=>raise( 'todo, jump DOCV' ).
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: ls_data TYPE ty_data.
ls_data = read( ).
CLEAR: ls_data-head-tdfuser,
ls_data-head-tdfreles,
ls_data-head-tdfdate,
ls_data-head-tdftime,
ls_data-head-tdluser,
ls_data-head-tdlreles,
ls_data-head-tdldate,
ls_data-head-tdltime.
io_xml->add( iv_name = c_name
ig_data = ls_data ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
15390,
85,
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,
28004,
220,
220,
220,
220,
41876,
466,
14636,
75,
12,
28004,
26173,
8924,
705,
36,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
62,
9641,
41876,
466,
14636,
75,
12,
67,
482,
9641,
26173,
8924,
705,
18005,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
62,
3672,
220,
220,
220,
41876,
4731,
26173,
8924,
705,
38715,
4458,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10412,
2578,
41876,
288,
1837,
301,
12,
67,
482,
7839,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1182,
220,
220,
220,
220,
41876,
262,
324,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3951,
220,
220,
220,
41876,
256,
1370,
62,
8658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
7890,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
1100,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
3808,
62,
7890,
8,
41876,
1259,
62,
7890,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
15390,
85,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1100,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
15252,
41876,
466,
14636,
75,
12,
15252,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
312,
220,
220,
220,
220,
41876,
466,
14636,
75,
12,
312,
13,
628,
198,
220,
220,
220,
300,
85,
62,
312,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
7,
17,
737,
198,
220,
220,
220,
300,
85,
62,
15252,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
10,
17,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
38715,
52,
62,
15675,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
2786,
220,
220,
220,
796,
285,
85,
62,
16129,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
220,
220,
796,
300,
85,
62,
15252,
198,
220,
220,
220,
220,
220,
220,
220,
2170,
220,
220,
220,
220,
220,
796,
269,
62,
28004,
198,
220,
220,
220,
220,
220,
220,
220,
2196,
220,
796,
269,
62,
9641,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
466,
74,
7839,
796,
44608,
62,
7890,
12,
4598,
310,
2578,
198,
220,
220,
220,
220,
220,
220,
220,
1182,
220,
220,
220,
220,
796,
44608,
62,
7890,
12,
2256,
198,
220,
220,
220,
220,
220,
309,
6242,
28378,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
220,
220,
220,
220,
796,
44608,
62,
7890,
12,
6615,
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,
1100,
7,
1267,
12,
2256,
12,
8671,
75,
7220,
13,
198,
220,
220,
220,
16876,
374,
85,
62,
7220,
3180,
3268,
2043,
12576,
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,
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,
312,
220,
220,
220,
220,
41876,
466,
14636,
75,
12,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
15252,
41876,
466,
14636,
75,
12,
15252,
13,
628,
198,
220,
220,
220,
300,
85,
62,
312,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
7,
17,
737,
198,
220,
220,
220,
300,
85,
62,
15252,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
10,
17,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
38715,
52,
62,
35,
3698,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
2786,
220,
220,
220,
796,
285,
85,
62,
16129,
198,
220,
220,
220,
220,
220,
220,
220,
2134,
220,
220,
796,
300,
85,
62,
15252,
198,
220,
220,
220,
220,
220,
220,
220,
2170,
220,
220,
220,
220,
220,
796,
269,
62,
28004,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
1005,
62,
8189,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
796,
362,
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,
43979,
62,
7890,
41876,
1259,
62,
7890,
13,
628,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
269,
62,
3672,
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,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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
] |
"! <p class="shorttext synchronized" lang="en">Check transport Exceptions</p>
CLASS zcx_adu_transport_request DEFINITION
PUBLIC
INHERITING FROM cx_static_check
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_t100_message.
CONSTANTS:
"! Transport request &1 doesn't exist
BEGIN OF not_exists,
msgid TYPE symsgid VALUE 'ZADU_TRANSPORT_REQ' ##NO_TEXT,
msgno TYPE symsgno VALUE '001' ##NO_TEXT,
attr1 TYPE scx_attrname VALUE 'TEXT1' ##NO_TEXT,
attr2 TYPE scx_attrname VALUE 'TEXT2' ##NO_TEXT,
attr3 TYPE scx_attrname VALUE 'TEXT3' ##NO_TEXT,
attr4 TYPE scx_attrname VALUE 'TEXT4' ##NO_TEXT,
END OF not_exists.
CONSTANTS:
"! Source client does not exist: &
BEGIN OF source_client_not_exists,
msgid TYPE symsgid VALUE 'TA' ##NO_TEXT,
msgno TYPE symsgno VALUE '008' ##NO_TEXT,
attr1 TYPE scx_attrname VALUE 'TEXT1' ##NO_TEXT,
attr2 TYPE scx_attrname VALUE 'TEXT2' ##NO_TEXT,
attr3 TYPE scx_attrname VALUE 'TEXT3' ##NO_TEXT,
attr4 TYPE scx_attrname VALUE 'TEXT4' ##NO_TEXT,
END OF source_client_not_exists.
CONSTANTS:
"! Source client & is protected against data export by client copy
BEGIN OF client_copy_protected,
msgid TYPE symsgid VALUE 'TA' ##NO_TEXT,
msgno TYPE symsgno VALUE '260' ##NO_TEXT,
attr1 TYPE scx_attrname VALUE 'TEXT1' ##NO_TEXT,
attr2 TYPE scx_attrname VALUE 'TEXT2' ##NO_TEXT,
attr3 TYPE scx_attrname VALUE 'TEXT3' ##NO_TEXT,
attr4 TYPE scx_attrname VALUE 'TEXT4' ##NO_TEXT,
END OF client_copy_protected.
CONSTANTS:
"! Client 000 is protected and may not be overwritten
BEGIN OF client_000_protected,
msgid TYPE symsgid VALUE 'TA' ##NO_TEXT,
msgno TYPE symsgno VALUE '011' ##NO_TEXT,
attr1 TYPE scx_attrname VALUE 'TEXT1' ##NO_TEXT,
attr2 TYPE scx_attrname VALUE 'TEXT2' ##NO_TEXT,
attr3 TYPE scx_attrname VALUE 'TEXT3' ##NO_TEXT,
attr4 TYPE scx_attrname VALUE 'TEXT4' ##NO_TEXT,
END OF client_000_protected.
CONSTANTS:
"! Source client is same as logon client
BEGIN OF source_client_same_logon,
msgid TYPE symsgid VALUE 'TA' ##NO_TEXT,
msgno TYPE symsgno VALUE '009' ##NO_TEXT,
attr1 TYPE scx_attrname VALUE 'TEXT1' ##NO_TEXT,
attr2 TYPE scx_attrname VALUE 'TEXT2' ##NO_TEXT,
attr3 TYPE scx_attrname VALUE 'TEXT3' ##NO_TEXT,
attr4 TYPE scx_attrname VALUE 'TEXT4' ##NO_TEXT,
END OF source_client_same_logon.
CONSTANTS:
"! Program ended with error or warning, return code: &
BEGIN OF program_ended_with_error,
msgid TYPE symsgid VALUE 'TA' ##NO_TEXT,
msgno TYPE symsgno VALUE '146' ##NO_TEXT,
attr1 TYPE scx_attrname VALUE 'TEXT1' ##NO_TEXT,
attr2 TYPE scx_attrname VALUE 'TEXT2' ##NO_TEXT,
attr3 TYPE scx_attrname VALUE 'TEXT3' ##NO_TEXT,
attr4 TYPE scx_attrname VALUE 'TEXT4' ##NO_TEXT,
END OF program_ended_with_error.
DATA:
text1 TYPE string READ-ONLY,
text2 TYPE string READ-ONLY,
text3 TYPE string READ-ONLY,
text4 TYPE string READ-ONLY.
"! <p class="shorttext synchronized" lang="en">Raise exception with system attribute message</p>
"!
"! @raising zcx_adu_transport_request | <p class="shorttext synchronized" lang="en">Exception</p>
CLASS-METHODS raise_system
RAISING
zcx_adu_transport_request.
"! <p class="shorttext synchronized" lang="en">CONSTRUCTOR</p>
METHODS constructor
IMPORTING
!textid LIKE if_t100_message=>t100key OPTIONAL
!text1 TYPE string OPTIONAL
!text2 TYPE string OPTIONAL
!text3 TYPE string OPTIONAL
!text4 TYPE string OPTIONAL
!previous LIKE previous OPTIONAL.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcx_adu_transport_request IMPLEMENTATION.
METHOD constructor ##ADT_SUPPRESS_GENERATION.
CALL METHOD super->constructor
EXPORTING
previous = previous.
me->text1 = text1.
me->text2 = text2.
me->text3 = text3.
me->text4 = text4.
CLEAR me->textid.
IF textid IS INITIAL.
if_t100_message~t100key = if_t100_message=>default_textid.
ELSE.
if_t100_message~t100key = textid.
ENDIF.
ENDMETHOD.
METHOD raise_system.
RAISE EXCEPTION TYPE zcx_adu_transport_request
EXPORTING
textid = VALUE scx_t100key( msgid = sy-msgid
msgno = sy-msgno
attr1 = 'TEXT1'
attr2 = 'TEXT2'
attr3 = 'TEXT3'
attr4 = 'TEXT4' )
text1 = CONV #( sy-msgv1 )
text2 = CONV #( sy-msgv2 )
text3 = CONV #( sy-msgv3 )
text4 = CONV #( sy-msgv4 ).
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9787,
4839,
1475,
11755,
3556,
79,
29,
198,
31631,
1976,
66,
87,
62,
324,
84,
62,
7645,
634,
62,
25927,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
43213,
62,
12708,
62,
9122,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
611,
62,
83,
3064,
62,
20500,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
366,
0,
19940,
2581,
1222,
16,
1595,
470,
2152,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
407,
62,
1069,
1023,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
705,
57,
2885,
52,
62,
5446,
1565,
4303,
9863,
62,
2200,
48,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
8298,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
16,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
16,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
17,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
17,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
18,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
18,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
19,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
19,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
407,
62,
1069,
1023,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
366,
0,
8090,
5456,
857,
407,
2152,
25,
1222,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
2723,
62,
16366,
62,
1662,
62,
1069,
1023,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
705,
5603,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
25257,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
16,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
16,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
17,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
17,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
18,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
18,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
19,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
19,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
2723,
62,
16366,
62,
1662,
62,
1069,
1023,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
366,
0,
8090,
5456,
1222,
318,
6861,
1028,
1366,
10784,
416,
5456,
4866,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
5456,
62,
30073,
62,
24326,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
705,
5603,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
21719,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
16,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
16,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
17,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
17,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
18,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
18,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
19,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
19,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
5456,
62,
30073,
62,
24326,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
366,
0,
20985,
12877,
318,
6861,
290,
743,
407,
307,
6993,
9108,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
5456,
62,
830,
62,
24326,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
705,
5603,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
26173,
8924,
705,
28555,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
16,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
16,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
17,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
17,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
18,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
18,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
19,
41876,
629,
87,
62,
35226,
3672,
26173,
8924,
705,
32541,
19,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
5456,
62,
830,
62,
24326,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
366,
0,
8090,
5456,
318,
976,
355,
2604,
261,
5456,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
2723,
62,
16366,
62,
31642,
62,
6404,
261,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
26173,
8924,
705,
5603,
6,
22492,
15285,
62,
32541,
11,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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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