content
stringlengths
4
1.04M
input_ids
sequencelengths
2
1.02k
attention_mask
sequencelengths
2
1.02k
"! <p> "! Assistance class of the custom Web Dynpro ABAP Redirect Handler for an OAuth Redirect URI "! Workflow. "! </p> "! "! <p> "! See https://developers.google.com/drive/ "! </p> "! "! <p> "! Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. "! <br> "! This file is licensed under the SAP SAMPLE CODE LICENSE AGREEMENT except as noted otherwise in "! the LICENSE FILE "! (https://github.com/SAP-samples/abap-alv-google-upload-sheet/blob/master/LICENSES/Apache-2.0.txt). "! <br> "! <br> "! Note that the sample code includes calls to the Google Drive APIs which calls are licensed under "! the Creative Commons Attribution 3.0 License (https://creativecommons.org/licenses/by/3.0/) in "! accordance with Google's Developer Site Policies "! (https://developers.google.com/terms/site-policies). Furthermore, the use of the Google Drive "! service is subject to applicable agreements with Google Inc. "! </p> class zcl_salv_wd_google_redirect definition public create public inheriting from cl_wd_component_assistance final. public section. aliases get_text for if_wd_component_assistance~get_text. "! Sets the received URL parameters. "! "! @parameter url_parameters | The list of received URL parameters. methods set_url_parameters importing url_parameters type tihttpnvp. "! Evaluates the beforehand set URL parameters and produces a human readable message from it. "! "! @parameter message | The evaluation message. "! @parameter message_icon | A path to either a <em>success</em> or <em>error</em> image. methods get_message exporting message type string message_icon type string. private section. "! The list of received URL parameters. data url_parameters type tihttpnvp. endclass. class zcl_salv_wd_google_redirect implementation. method get_message. clear: message, message_icon. loop at me->url_parameters assigning field-symbol(<current_url_parameter>). case <current_url_parameter>-name. when `ERROR`. message = |Error { <current_url_parameter>-value } received. | && `lease contact your system administrator.` ##NO_TEXT. message_icon = `~IconLarge/ErrorMessage` ##NO_TEXT. exit. when others. message = `Access token successfully received from Google. Please repeat your Export To ` && `Spreadsheet (Google Sheets) action` ##NO_TEXT. message_icon = `~IconLarge/SuccessMessage` ##NO_TEXT. endcase. endloop. endmethod. method set_url_parameters. me->url_parameters = url_parameters. endmethod. endclass.
[ 40484, 1279, 79, 29, 198, 40484, 25126, 1398, 286, 262, 2183, 5313, 39530, 1676, 9564, 2969, 2297, 1060, 32412, 329, 281, 440, 30515, 2297, 1060, 43975, 198, 40484, 5521, 11125, 13, 198, 40484, 7359, 79, 29, 198, 40484, 198, 40484, 1279, 79, 29, 198, 40484, 4091, 3740, 1378, 16244, 364, 13, 13297, 13, 785, 14, 19472, 14, 198, 40484, 7359, 79, 29, 198, 40484, 198, 40484, 1279, 79, 29, 198, 40484, 15069, 357, 66, 8, 33448, 48323, 7946, 393, 281, 48323, 17375, 1664, 13, 1439, 2489, 10395, 13, 198, 40484, 1279, 1671, 29, 198, 40484, 770, 2393, 318, 11971, 739, 262, 48323, 28844, 16437, 42714, 38559, 24290, 13077, 2200, 12529, 2845, 355, 4367, 4306, 287, 198, 40484, 262, 38559, 24290, 45811, 198, 40484, 357, 5450, 1378, 12567, 13, 785, 14, 50, 2969, 12, 82, 12629, 14, 397, 499, 12, 282, 85, 12, 13297, 12, 25850, 12, 21760, 14, 2436, 672, 14, 9866, 14, 43, 2149, 16938, 1546, 14, 25189, 4891, 12, 17, 13, 15, 13, 14116, 737, 198, 40484, 1279, 1671, 29, 198, 40484, 1279, 1671, 29, 198, 40484, 5740, 326, 262, 6291, 2438, 3407, 3848, 284, 262, 3012, 9974, 23113, 543, 3848, 389, 11971, 739, 198, 40484, 262, 17404, 13815, 45336, 513, 13, 15, 13789, 357, 5450, 1378, 20123, 425, 9503, 684, 13, 2398, 14, 677, 4541, 14, 1525, 14, 18, 13, 15, 34729, 287, 198, 40484, 10213, 351, 3012, 338, 23836, 14413, 42283, 198, 40484, 357, 5450, 1378, 16244, 364, 13, 13297, 13, 785, 14, 38707, 14, 15654, 12, 79, 4160, 444, 737, 11399, 11, 262, 779, 286, 262, 3012, 9974, 198, 40484, 2139, 318, 2426, 284, 9723, 11704, 351, 3012, 3457, 13, 198, 40484, 7359, 79, 29, 198, 4871, 1976, 565, 62, 21680, 85, 62, 16993, 62, 13297, 62, 445, 1060, 6770, 198, 220, 1171, 198, 220, 2251, 1171, 198, 220, 10639, 1780, 422, 198, 220, 220, 220, 537, 62, 16993, 62, 42895, 62, 562, 9311, 198, 220, 2457, 13, 628, 198, 220, 1171, 2665, 13, 628, 220, 220, 220, 47217, 651, 62, 5239, 198, 220, 220, 220, 220, 220, 329, 611, 62, 16993, 62, 42895, 62, 562, 9311, 93, 1136, 62, 5239, 13, 628, 220, 220, 220, 366, 0, 21394, 262, 2722, 10289, 10007, 13, 198, 220, 220, 220, 366, 0, 198, 220, 220, 220, 366, 0, 2488, 17143, 2357, 19016, 62, 17143, 7307, 930, 383, 1351, 286, 2722, 10289, 10007, 13, 198, 220, 220, 220, 5050, 900, 62, 6371, 62, 17143, 7307, 198, 220, 220, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 220, 220, 19016, 62, 17143, 7307, 2099, 46668, 4023, 77, 36133, 13, 628, 220, 220, 220, 366, 0, 26439, 12632, 262, 27091, 900, 10289, 10007, 290, 11073, 257, 1692, 31744, 3275, 422, 340, 13, 198, 220, 220, 220, 366, 0, 198, 220, 220, 220, 366, 0, 2488, 17143, 2357, 3275, 930, 383, 12660, 3275, 13, 198, 220, 220, 220, 366, 0, 2488, 17143, 2357, 3275, 62, 4749, 930, 317, 3108, 284, 2035, 257, 1279, 368, 29, 13138, 3556, 368, 29, 393, 1279, 368, 29, 18224, 3556, 368, 29, 2939, 13, 198, 220, 220, 220, 5050, 651, 62, 20500, 198, 220, 220, 220, 220, 220, 39133, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 220, 220, 220, 220, 220, 2099, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 62, 4749, 2099, 4731, 13, 628, 198, 220, 2839, 2665, 13, 628, 220, 220, 220, 366, 0, 383, 1351, 286, 2722, 10289, 10007, 13, 198, 220, 220, 220, 1366, 19016, 62, 17143, 7307, 2099, 46668, 4023, 77, 36133, 13, 628, 198, 437, 4871, 13, 628, 198, 4871, 1976, 565, 62, 21680, 85, 62, 16993, 62, 13297, 62, 445, 1060, 7822, 13, 628, 198, 220, 2446, 651, 62, 20500, 13, 198, 220, 220, 220, 1598, 25, 3275, 11, 3275, 62, 4749, 13, 628, 220, 220, 220, 9052, 379, 502, 3784, 6371, 62, 17143, 7307, 38875, 2214, 12, 1837, 23650, 7, 27, 14421, 62, 6371, 62, 17143, 2357, 29, 737, 198, 220, 220, 220, 220, 220, 1339, 1279, 14421, 62, 6371, 62, 17143, 2357, 29, 12, 3672, 13, 198, 220, 220, 220, 220, 220, 220, 220, 618, 4600, 24908, 44646, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 930, 12331, 1391, 1279, 14421, 62, 6371, 62, 17143, 2357, 29, 12, 8367, 1782, 2722, 13, 930, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11405, 4600, 1274, 2800, 534, 1080, 18382, 13, 63, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 62, 4749, 796, 4600, 93, 19578, 21968, 14, 12331, 12837, 63, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8420, 13, 198, 220, 220, 220, 220, 220, 220, 220, 618, 1854, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 4600, 15457, 11241, 7675, 2722, 422, 3012, 13, 4222, 9585, 534, 36472, 1675, 4600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11405, 4600, 44458, 21760, 357, 11708, 1375, 1039, 8, 2223, 63, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 62, 4749, 796, 4600, 93, 19578, 21968, 14, 33244, 12837, 63, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 220, 220, 886, 7442, 13, 198, 220, 220, 220, 886, 26268, 13, 198, 220, 886, 24396, 13, 628, 198, 220, 2446, 900, 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x_static_check. PRIVATE SECTION. CLASS-DATA gv_agency_id_1 TYPE ZTP_agency_id. CLASS-DATA gv_agency_id_2 TYPE ZTP_agency_id. CLASS-DATA gv_agency_id_unknown TYPE ZTP_agency_id. CLASS-DATA gv_customer_id_1 TYPE ZTP_customer_id. CLASS-DATA gv_customer_id_2 TYPE ZTP_customer_id. CLASS-DATA gv_customer_id_unknown TYPE ZTP_customer_id. CLASS-METHODS class_setup. ENDCLASS. CLASS ZTP_tc_flight_travel_api IMPLEMENTATION. METHOD class_setup. DATA lt_agency_id TYPE SORTED TABLE OF ZTP_agency_id WITH UNIQUE KEY table_line. SELECT DISTINCT agency_id FROM ZTP_agency ORDER BY agency_id DESCENDING INTO TABLE @lt_agency_id . DATA lt_customer_id TYPE SORTED TABLE OF ZTP_customer_id WITH UNIQUE KEY table_line. SELECT DISTINCT customer_id FROM ZTP_customer ORDER BY customer_id DESCENDING INTO TABLE @lt_customer_id . " Select 2 known agency IDs IF lines( lt_agency_id ) < 2. cl_abap_unit_assert=>abort( msg = 'No agency data!' ). ENDIF. gv_agency_id_1 = lt_agency_id[ 1 ]. gv_agency_id_2 = lt_agency_id[ 2 ]. cl_abap_unit_assert=>assert_differs( act = gv_agency_id_1 exp = gv_agency_id_2 )." To be totally sure " Select 2 known customer IDs IF lines( lt_customer_id ) < 2. cl_abap_unit_assert=>abort( msg = 'No customer data!' ). ENDIF. gv_customer_id_1 = lt_customer_id[ 1 ]. gv_customer_id_2 = lt_customer_id[ 2 ]. cl_abap_unit_assert=>assert_differs( act = gv_customer_id_1 exp = gv_customer_id_2 )." To be totally sure " Determine an unknown agency ID gv_agency_id_unknown = lt_agency_id[ 1 ]. DO. gv_agency_id_unknown = gv_agency_id_unknown + 1. READ TABLE lt_agency_id TRANSPORTING NO FIELDS WITH TABLE KEY table_line = gv_agency_id_unknown. IF sy-subrc <> 0. EXIT. ENDIF. ENDDO. " Determine an unknown customer ID gv_customer_id_unknown = lt_customer_id[ 1 ]. DO. gv_customer_id_unknown = gv_customer_id_unknown + 1. READ TABLE lt_customer_id TRANSPORTING NO FIELDS WITH TABLE KEY table_line = gv_customer_id_unknown. IF sy-subrc <> 0. EXIT. ENDIF. ENDDO. ENDMETHOD. METHOD cuerd_travel. DATA ls_travel_in TYPE ZTP_if_flight_legacy=>ts_travel_in. DATA ls_travel_inx TYPE ZTP_if_flight_legacy=>ts_travel_inx. DATA ls_travel TYPE ZTP_travel. DATA lt_messages TYPE ZTP_if_flight_legacy=>tt_message. " Create Travel and Commit ls_travel_in-agency_id = gv_agency_id_1. ls_travel_in-customer_id = gv_customer_id_1. ls_travel_in-begin_date = '20180101'. ls_travel_in-end_date = '20180201'. ls_travel_in-description = 'My Test'. CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_CREATE' EXPORTING is_travel = ls_travel_in IMPORTING es_travel = ls_travel et_messages = lt_messages. cl_abap_unit_assert=>assert_initial( lt_messages ). DATA(lv_travel_id) = ls_travel-travel_id. cl_abap_unit_assert=>assert_not_initial( lv_travel_id ). CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_SAVE'. " DB Check SELECT SINGLE agency_id, customer_id, description FROM ZTP_travel WHERE travel_id = @lv_travel_id INTO ( @DATA(lv_agency_id), @DATA(lv_customer_id), @DATA(lv_description) ). cl_abap_unit_assert=>assert_subrc( ). cl_abap_unit_assert=>assert_equals( act = lv_agency_id exp = gv_agency_id_1 ). cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = gv_customer_id_1 ). cl_abap_unit_assert=>assert_equals( act = lv_description exp = 'My Test' ). " Update CLEAR ls_travel_in. ls_travel_in-travel_id = lv_travel_id. ls_travel_in-agency_id = gv_agency_id_2. ls_travel_in-customer_id = gv_customer_id_2. ls_travel_in-description = 'My New Test'. ls_travel_inx-travel_id = lv_travel_id. ls_travel_inx-agency_id = abap_true. ls_travel_inx-customer_id = abap_true. ls_travel_inx-description = abap_true. CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_UPDATE' EXPORTING is_travel = ls_travel_in is_travelx = ls_travel_inx IMPORTING et_messages = lt_messages. cl_abap_unit_assert=>assert_initial( lt_messages ). " Action CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_SET_BOOKING' EXPORTING iv_travel_id = lv_travel_id IMPORTING et_messages = lt_messages. cl_abap_unit_assert=>assert_initial( lt_messages ). " Faulty Update - All or Nothing -> Nothing CLEAR ls_travel_in. ls_travel_in-travel_id = lv_travel_id. ls_travel_in-agency_id = gv_agency_id_unknown. ls_travel_in-customer_id = gv_customer_id_1. ls_travel_inx-travel_id = lv_travel_id. ls_travel_inx-agency_id = abap_true. ls_travel_inx-customer_id = abap_true. CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_UPDATE' EXPORTING is_travel = ls_travel_in is_travelx = ls_travel_inx IMPORTING et_messages = lt_messages. cl_abap_unit_assert=>assert_not_initial( lt_messages ). " Faulty Update - All or Nothing -> Nothing CLEAR lt_messages. CLEAR ls_travel_in. ls_travel_in-travel_id = lv_travel_id. ls_travel_in-agency_id = gv_agency_id_1. ls_travel_in-customer_id = gv_customer_id_unknown. ls_travel_inx-travel_id = lv_travel_id. ls_travel_inx-agency_id = abap_true. ls_travel_inx-customer_id = abap_true. CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_UPDATE' EXPORTING is_travel = ls_travel_in is_travelx = ls_travel_inx IMPORTING et_messages = lt_messages. cl_abap_unit_assert=>assert_not_initial( lt_messages ). " Read DB only CLEAR ls_travel. CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_READ' EXPORTING iv_travel_id = lv_travel_id iv_include_buffer = abap_false IMPORTING es_travel = ls_travel et_messages = lt_messages. cl_abap_unit_assert=>assert_initial( lt_messages ). cl_abap_unit_assert=>assert_equals( act = ls_travel-travel_id exp = lv_travel_id ). cl_abap_unit_assert=>assert_equals( act = ls_travel-agency_id exp = gv_agency_id_1 ). cl_abap_unit_assert=>assert_equals( act = ls_travel-customer_id exp = gv_customer_id_1 ). cl_abap_unit_assert=>assert_equals( act = ls_travel-status exp = CONV ZTP_travel_status( ZTP_if_flight_legacy=>travel_status-new ) ). cl_abap_unit_assert=>assert_equals( act = ls_travel-description exp = 'My Test' ). " Read with buffer CLEAR ls_travel. CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_READ' EXPORTING iv_travel_id = lv_travel_id iv_include_buffer = abap_true IMPORTING es_travel = ls_travel et_messages = lt_messages. cl_abap_unit_assert=>assert_initial( lt_messages ). cl_abap_unit_assert=>assert_equals( act = ls_travel-travel_id exp = lv_travel_id ). cl_abap_unit_assert=>assert_equals( act = ls_travel-agency_id exp = gv_agency_id_2 ). cl_abap_unit_assert=>assert_equals( act = ls_travel-customer_id exp = gv_customer_id_2 ). cl_abap_unit_assert=>assert_equals( act = ls_travel-status exp = CONV ZTP_travel_status( ZTP_if_flight_legacy=>travel_status-booked ) ). cl_abap_unit_assert=>assert_equals( act = ls_travel-description exp = 'My New Test' ). " Delete CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_DELETE' EXPORTING iv_travel_id = lv_travel_id IMPORTING et_messages = lt_messages. cl_abap_unit_assert=>assert_initial( lt_messages ). " Delete again -> Error CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_DELETE' EXPORTING iv_travel_id = lv_travel_id IMPORTING et_messages = lt_messages. cl_abap_unit_assert=>assert_not_initial( lt_messages ). CALL FUNCTION 'ZTP_FLIGHT_TRAVEL_SAVE'. ENDMETHOD. ENDCLASS.
[ 31631, 1168, 7250, 62, 23047, 62, 22560, 62, 35927, 62, 15042, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 9564, 18601, 10659, 198, 220, 29244, 6158, 44731, 198, 220, 7473, 43001, 2751, 198, 220, 360, 4261, 6234, 26112, 41796, 198, 220, 45698, 42, 49277, 43638, 5805, 7597, 764, 628, 220, 44731, 44513, 13, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 269, 15573, 67, 62, 35927, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42715, 12, 26947, 308, 85, 62, 40955, 62, 312, 62, 16, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1168, 7250, 62, 40955, 62, 312, 13, 198, 220, 220, 220, 42715, 12, 26947, 308, 85, 62, 40955, 62, 312, 62, 17, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1168, 7250, 62, 40955, 62, 312, 13, 198, 220, 220, 220, 42715, 12, 26947, 308, 85, 62, 40955, 62, 312, 62, 34680, 220, 220, 41876, 1168, 7250, 62, 40955, 62, 312, 13, 628, 220, 220, 220, 42715, 12, 26947, 308, 85, 62, 23144, 263, 62, 312, 62, 16, 220, 220, 220, 220, 220, 220, 41876, 1168, 7250, 62, 23144, 263, 62, 312, 13, 198, 220, 220, 220, 42715, 12, 26947, 308, 85, 62, 23144, 263, 62, 312, 62, 17, 220, 220, 220, 220, 220, 220, 41876, 1168, 7250, 62, 23144, 263, 62, 312, 13, 198, 220, 220, 220, 42715, 12, 26947, 308, 85, 62, 23144, 263, 62, 312, 62, 34680, 41876, 1168, 7250, 62, 23144, 263, 62, 312, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 1398, 62, 40406, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 7250, 62, 23047, 62, 22560, 62, 35927, 62, 15042, 30023, 2538, 10979, 6234, 13, 198, 220, 337, 36252, 1398, 62, 40406, 13, 198, 220, 220, 220, 42865, 300, 83, 62, 40955, 62, 312, 41876, 311, 9863, 1961, 43679, 3963, 1168, 7250, 62, 40955, 62, 312, 220, 220, 220, 220, 13315, 4725, 33866, 8924, 35374, 3084, 62, 1370, 13, 198, 220, 220, 220, 33493, 360, 8808, 1268, 4177, 4086, 62, 312, 16034, 1168, 7250, 62, 40955, 220, 220, 220, 220, 38678, 11050, 4086, 62, 312, 220, 220, 22196, 34, 10619, 2751, 39319, 43679, 2488, 2528, 62, 40955, 62, 312, 764, 628, 220, 220, 220, 42865, 300, 83, 62, 23144, 263, 62, 312, 41876, 311, 9863, 1961, 43679, 3963, 1168, 7250, 62, 23144, 263, 62, 312, 13315, 4725, 33866, 8924, 35374, 3084, 62, 1370, 13, 198, 220, 220, 220, 33493, 360, 8808, 1268, 4177, 6491, 62, 312, 16034, 1168, 7250, 62, 23144, 263, 38678, 11050, 6491, 62, 312, 22196, 34, 10619, 2751, 39319, 43679, 2488, 2528, 62, 23144, 263, 62, 312, 764, 628, 220, 220, 220, 366, 9683, 362, 1900, 4086, 32373, 198, 220, 220, 220, 16876, 3951, 7, 300, 83, 62, 40955, 62, 312, 1267, 1279, 362, 13, 198, 220, 220, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 397, 419, 7, 31456, 796, 705, 2949, 4086, 1366, 13679, 220, 220, 6739, 198, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 308, 85, 62, 40955, 62, 312, 62, 16, 796, 300, 83, 62, 40955, 62, 312, 58, 352, 20740, 198, 220, 220, 220, 308, 85, 62, 40955, 62, 312, 62, 17, 796, 300, 83, 62, 40955, 62, 312, 58, 362, 20740, 198, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 30493, 62, 26069, 364, 7, 719, 796, 308, 85, 62, 40955, 62, 312, 62, 16, 220, 1033, 796, 308, 85, 62, 40955, 62, 312, 62, 17, 1267, 526, 1675, 307, 6635, 1654, 628, 220, 220, 220, 366, 9683, 362, 1900, 6491, 32373, 198, 220, 220, 220, 16876, 3951, 7, 300, 83, 62, 23144, 263, 62, 312, 1267, 1279, 362, 13, 198, 220, 220, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 397, 419, 7, 31456, 796, 705, 2949, 6491, 1366, 13679, 6739, 198, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 308, 85, 62, 23144, 263, 62, 312, 62, 16, 796, 300, 83, 62, 23144, 263, 62, 312, 58, 352, 20740, 198, 220, 220, 220, 308, 85, 62, 23144, 263, 62, 312, 62, 17, 796, 300, 83, 62, 23144, 263, 62, 312, 58, 362, 20740, 198, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 30493, 62, 26069, 364, 7, 719, 796, 308, 85, 62, 23144, 263, 62, 312, 62, 16, 220, 1033, 796, 308, 85, 62, 23144, 263, 62, 312, 62, 17, 1267, 526, 1675, 307, 6635, 1654, 628, 220, 220, 220, 366, 45559, 3810, 281, 6439, 4086, 4522, 198, 220, 220, 220, 308, 85, 62, 40955, 62, 312, 62, 34680, 796, 300, 83, 62, 40955, 62, 312, 58, 352, 20740, 198, 220, 220, 220, 8410, 13, 198, 220, 220, 220, 220, 220, 308, 85, 62, 40955, 62, 312, 62, 34680, 796, 308, 85, 62, 40955, 62, 312, 62, 34680, 1343, 352, 13, 198, 220, 220, 220, 220, 220, 20832, 43679, 300, 83, 62, 40955, 62, 312, 220, 220, 48213, 4303, 9863, 2751, 8005, 18930, 3698, 5258, 13315, 43679, 35374, 3084, 62, 1370, 796, 308, 85, 62, 40955, 62, 312, 62, 34680, 13, 198, 220, 220, 220, 220, 220, 16876, 827, 12, 7266, 6015, 1279, 29, 657, 13, 198, 220, 220, 220, 220, 220, 220, 220, 7788, 2043, 13, 198, 220, 220, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 23578, 18227, 13, 628, 220, 220, 220, 366, 45559, 3810, 281, 6439, 6491, 4522, 198, 220, 220, 220, 308, 85, 62, 23144, 263, 62, 312, 62, 34680, 796, 300, 83, 62, 23144, 263, 62, 312, 58, 352, 20740, 198, 220, 220, 220, 8410, 13, 198, 220, 220, 220, 220, 220, 308, 85, 62, 23144, 263, 62, 312, 62, 34680, 796, 308, 85, 62, 23144, 263, 62, 312, 62, 34680, 1343, 352, 13, 198, 220, 220, 220, 220, 220, 20832, 43679, 300, 83, 62, 23144, 263, 62, 312, 48213, 4303, 9863, 2751, 8005, 18930, 3698, 5258, 13315, 43679, 35374, 3084, 62, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
CLASS zcl_abapgit_html_action_utils DEFINITION PUBLIC CREATE PUBLIC . PUBLIC SECTION. CLASS-METHODS parse_fields IMPORTING !iv_string TYPE clike RETURNING VALUE(rt_fields) TYPE tihttpnvp . CLASS-METHODS parse_fields_upper_case_name IMPORTING !iv_string TYPE clike RETURNING VALUE(rt_fields) TYPE tihttpnvp . CLASS-METHODS get_field IMPORTING !iv_name TYPE string !it_field TYPE tihttpnvp !iv_decode TYPE abap_bool DEFAULT abap_false CHANGING !cg_field TYPE any . CLASS-METHODS jump_encode IMPORTING !iv_obj_type TYPE tadir-object !iv_obj_name TYPE tadir-obj_name RETURNING VALUE(rv_string) TYPE string . CLASS-METHODS jump_decode IMPORTING !iv_string TYPE clike EXPORTING !ev_obj_type TYPE tadir-object !ev_obj_name TYPE tadir-obj_name RAISING zcx_abapgit_exception . CLASS-METHODS dir_encode IMPORTING !iv_path TYPE string RETURNING VALUE(rv_string) TYPE string . CLASS-METHODS dir_decode IMPORTING !iv_string TYPE clike RETURNING VALUE(rv_path) TYPE string RAISING zcx_abapgit_exception . CLASS-METHODS file_encode IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key !ig_file TYPE any RETURNING VALUE(rv_string) TYPE string . CLASS-METHODS obj_encode IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key !ig_object TYPE any RETURNING VALUE(rv_string) TYPE string . CLASS-METHODS file_obj_decode IMPORTING !iv_string TYPE clike EXPORTING !ev_key TYPE zif_abapgit_persistence=>ty_repo-key !eg_file TYPE any "assuming ty_file !eg_object TYPE any "assuming ty_item RAISING zcx_abapgit_exception . CLASS-METHODS dbkey_encode IMPORTING !is_key TYPE zif_abapgit_persistence=>ty_content RETURNING VALUE(rv_string) TYPE string . CLASS-METHODS dbkey_decode IMPORTING !iv_string TYPE clike RETURNING VALUE(rs_key) TYPE zif_abapgit_persistence=>ty_content . CLASS-METHODS stage_decode IMPORTING !iv_getdata TYPE clike EXPORTING !ev_key TYPE zif_abapgit_persistence=>ty_repo-key !ev_seed TYPE string RAISING zcx_abapgit_exception . PROTECTED SECTION. PRIVATE SECTION. CLASS-METHODS field_keys_to_upper CHANGING !ct_fields TYPE tihttpnvp . CLASS-METHODS add_field IMPORTING !iv_name TYPE string !ig_field TYPE any CHANGING !ct_field TYPE tihttpnvp . CLASS-METHODS unescape IMPORTING !iv_string TYPE string RETURNING VALUE(rv_string) TYPE string . ENDCLASS. CLASS ZCL_ABAPGIT_HTML_ACTION_UTILS IMPLEMENTATION. METHOD add_field. DATA ls_field LIKE LINE OF ct_field. FIELD-SYMBOLS <lg_src> TYPE any. ls_field-name = iv_name. CASE cl_abap_typedescr=>describe_by_data( ig_field )->kind. WHEN cl_abap_typedescr=>kind_elem. ls_field-value = ig_field. WHEN cl_abap_typedescr=>kind_struct. ASSIGN COMPONENT iv_name OF STRUCTURE ig_field TO <lg_src>. ASSERT <lg_src> IS ASSIGNED. ls_field-value = <lg_src>. WHEN OTHERS. ASSERT 0 = 1. ENDCASE. APPEND ls_field TO ct_field. ENDMETHOD. METHOD dbkey_decode. DATA: lt_fields TYPE tihttpnvp. lt_fields = parse_fields_upper_case_name( cl_http_utility=>unescape_url( |{ iv_string }| ) ). get_field( EXPORTING iv_name = 'TYPE' it_field = lt_fields CHANGING cg_field = rs_key-type ). get_field( EXPORTING iv_name = 'VALUE' it_field = lt_fields CHANGING cg_field = rs_key-value ). ENDMETHOD. METHOD dbkey_encode. DATA: lt_fields TYPE tihttpnvp. add_field( EXPORTING iv_name = 'TYPE' ig_field = is_key-type CHANGING ct_field = lt_fields ). add_field( EXPORTING iv_name = 'VALUE' ig_field = is_key-value CHANGING ct_field = lt_fields ). rv_string = cl_http_utility=>if_http_utility~fields_to_string( lt_fields ). ENDMETHOD. METHOD dir_decode. DATA: lt_fields TYPE tihttpnvp. lt_fields = parse_fields( iv_string ). get_field( EXPORTING iv_name = 'PATH' it_field = lt_fields CHANGING cg_field = rv_path ). ENDMETHOD. METHOD dir_encode. DATA: lt_fields TYPE tihttpnvp. add_field( EXPORTING iv_name = 'PATH' ig_field = iv_path CHANGING ct_field = lt_fields ). rv_string = cl_http_utility=>if_http_utility~fields_to_string( lt_fields ). ENDMETHOD. METHOD field_keys_to_upper. FIELD-SYMBOLS <ls_field> LIKE LINE OF ct_fields. LOOP AT ct_fields ASSIGNING <ls_field>. <ls_field>-name = to_upper( <ls_field>-name ). ENDLOOP. ENDMETHOD. METHOD file_encode. DATA: lt_fields TYPE tihttpnvp. add_field( EXPORTING iv_name = 'KEY' ig_field = iv_key CHANGING ct_field = lt_fields ). add_field( EXPORTING iv_name = 'PATH' ig_field = ig_file CHANGING ct_field = lt_fields ). add_field( EXPORTING iv_name = 'FILENAME' ig_field = ig_file CHANGING ct_field = lt_fields ). rv_string = cl_http_utility=>if_http_utility~fields_to_string( lt_fields ). ENDMETHOD. METHOD file_obj_decode. DATA: lt_fields TYPE tihttpnvp. ASSERT eg_file IS SUPPLIED OR eg_object IS SUPPLIED OR ev_key IS SUPPLIED. CLEAR: ev_key, eg_file, eg_object. lt_fields = parse_fields_upper_case_name( iv_string ). get_field( EXPORTING iv_name = 'KEY' it_field = lt_fields CHANGING cg_field = ev_key ). IF eg_file IS SUPPLIED. get_field( EXPORTING iv_name = 'PATH' it_field = lt_fields CHANGING cg_field = eg_file ). get_field( EXPORTING iv_name = 'FILENAME' it_field = lt_fields iv_decode = abap_true CHANGING cg_field = eg_file ). ENDIF. IF eg_object IS SUPPLIED. get_field( EXPORTING iv_name = 'OBJ_TYPE' it_field = lt_fields CHANGING cg_field = eg_object ). get_field( EXPORTING iv_name = 'OBJ_NAME' it_field = lt_fields iv_decode = abap_true CHANGING cg_field = eg_object ). ENDIF. ENDMETHOD. METHOD get_field. DATA: lv_value TYPE string. FIELD-SYMBOLS: <ls_field> LIKE LINE OF it_field, <lg_dest> TYPE any. READ TABLE it_field ASSIGNING <ls_field> WITH KEY name = iv_name. IF sy-subrc IS NOT INITIAL. RETURN. ENDIF. lv_value = <ls_field>-value. IF iv_decode = abap_true. lv_value = cl_http_utility=>unescape_url( escaped = lv_value ). ENDIF. CASE cl_abap_typedescr=>describe_by_data( cg_field )->kind. WHEN cl_abap_typedescr=>kind_elem. cg_field = lv_value. WHEN cl_abap_typedescr=>kind_struct. ASSIGN COMPONENT iv_name OF STRUCTURE cg_field TO <lg_dest>. ASSERT <lg_dest> IS ASSIGNED. <lg_dest> = lv_value. WHEN OTHERS. ASSERT 0 = 1. ENDCASE. ENDMETHOD. METHOD jump_decode. DATA: lt_fields TYPE tihttpnvp. lt_fields = parse_fields( iv_string ). get_field( EXPORTING iv_name = 'TYPE' it_field = lt_fields CHANGING cg_field = ev_obj_type ). get_field( EXPORTING iv_name = 'NAME' it_field = lt_fields CHANGING cg_field = ev_obj_name ). ENDMETHOD. METHOD jump_encode. DATA: lt_fields TYPE tihttpnvp. add_field( EXPORTING iv_name = 'TYPE' ig_field = iv_obj_type CHANGING ct_field = lt_fields ). add_field( EXPORTING iv_name = 'NAME' ig_field = iv_obj_name CHANGING ct_field = lt_fields ). rv_string = cl_http_utility=>if_http_utility~fields_to_string( lt_fields ). ENDMETHOD. METHOD obj_encode. DATA: lt_fields TYPE tihttpnvp. add_field( EXPORTING iv_name = 'KEY' ig_field = iv_key CHANGING ct_field = lt_fields ). add_field( EXPORTING iv_name = 'OBJ_TYPE' ig_field = ig_object CHANGING ct_field = lt_fields ). add_field( EXPORTING iv_name = 'OBJ_NAME' ig_field = ig_object CHANGING ct_field = lt_fields ). rv_string = cl_http_utility=>if_http_utility~fields_to_string( lt_fields ). ENDMETHOD. METHOD parse_fields. DATA: lt_substrings TYPE stringtab, ls_field LIKE LINE OF rt_fields. FIELD-SYMBOLS: <lv_substring> LIKE LINE OF lt_substrings. SPLIT iv_string AT '&' INTO TABLE lt_substrings. LOOP AT lt_substrings ASSIGNING <lv_substring>. CLEAR: ls_field. ls_field-name = substring_before( val = <lv_substring> sub = '=' ). ls_field-name = unescape( ls_field-name ). ls_field-value = substring_after( val = <lv_substring> sub = '=' ). ls_field-value = unescape( ls_field-value ). INSERT ls_field INTO TABLE rt_fields. ENDLOOP. ENDMETHOD. METHOD parse_fields_upper_case_name. rt_fields = parse_fields( iv_string ). field_keys_to_upper( CHANGING ct_fields = rt_fields ). ENDMETHOD. METHOD stage_decode. DATA: lt_fields TYPE tihttpnvp. lt_fields = parse_fields_upper_case_name( iv_getdata ). get_field( EXPORTING iv_name = 'KEY' it_field = lt_fields CHANGING cg_field = ev_key ). get_field( EXPORTING iv_name = 'SEED' it_field = lt_fields CHANGING cg_field = ev_seed ). ASSERT NOT ev_key IS INITIAL. ENDMETHOD. METHOD unescape. * do not use cl_http_utility as it does strange things with the encoding rv_string = iv_string. * todo, more to be added here REPLACE ALL OCCURRENCES OF '%3F' IN rv_string WITH '?'. REPLACE ALL OCCURRENCES OF '%3D' IN rv_string WITH '='. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 6494, 62, 2673, 62, 26791, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 21136, 62, 25747, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 8841, 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, 17034, 62, 25747, 8, 41876, 46668, 4023, 77, 36133, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 21136, 62, 25747, 62, 45828, 62, 7442, 62, 3672, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 8841, 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, 17034, 62, 25747, 8, 41876, 46668, 4023, 77, 36133, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 651, 62, 3245, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3672, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 3245, 220, 41876, 46668, 4023, 77, 36133, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 12501, 1098, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 66, 70, 62, 3245, 220, 41876, 597, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 4391, 62, 268, 8189, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 26801, 62, 4906, 220, 220, 220, 220, 41876, 36264, 343, 12, 15252, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 26801, 62, 3672, 220, 220, 220, 220, 41876, 36264, 343, 12, 26801, 62, 3672, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 8841, 8, 41876, 4731, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 4391, 62, 12501, 1098, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 8841, 220, 220, 41876, 537, 522, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 1990, 62, 26801, 62, 4906, 41876, 36264, 343, 12, 15252, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 1990, 62, 26801, 62, 3672, 41876, 36264, 343, 12, 26801, 62, 3672, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 26672, 62, 268, 8189, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 6978, 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, 8841, 8, 41876, 4731, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 26672, 62, 12501, 1098, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 8841, 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, 81, 85, 62, 6978, 8, 41876, 4731, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 2393, 62, 268, 8189, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 328, 62, 7753, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 597, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 8841, 8, 41876, 4731, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 26181, 62, 268, 8189, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 328, 62, 15252, 220, 220, 220, 220, 220, 220, 41876, 597, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 8841, 8, 41876, 4731, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 2393, 62, 26801, 62, 12501, 1098, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 8841, 41876, 537, 522, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 1990, 62, 2539, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 1533, 62, 7753, 220, 220, 41876, 597, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 32935, 1259, 62, 7753, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 1533, 62, 15252, 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, 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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 ]
CLASS ltcl_sap_package DEFINITION FOR TESTING. PUBLIC SECTION. TYPES: ty_package TYPE STANDARD TABLE OF devclass WITH NON-UNIQUE DEFAULT KEY. METHODS: constructor IMPORTING iv_package TYPE devclass, set_sub_packages IMPORTING it_sub_packages TYPE ty_package. INTERFACES: zif_abapgit_sap_package. PRIVATE SECTION. DATA: mv_package TYPE devclass, mt_sub_packages TYPE ty_package. ENDCLASS. CLASS ltcl_sap_package IMPLEMENTATION. METHOD constructor. mv_package = iv_package. ENDMETHOD. METHOD zif_abapgit_sap_package~list_subpackages. IF mv_package = 'Z_MAIN'. rt_list = mt_sub_packages. ENDIF. ENDMETHOD. METHOD set_sub_packages. mt_sub_packages = it_sub_packages. ENDMETHOD. METHOD zif_abapgit_sap_package~are_changes_recorded_in_tr_req. "##needed ENDMETHOD. METHOD zif_abapgit_sap_package~create. "##needed ENDMETHOD. METHOD zif_abapgit_sap_package~create_child. "##needed ENDMETHOD. METHOD zif_abapgit_sap_package~create_local. "##needed ENDMETHOD. METHOD zif_abapgit_sap_package~exists. "##needed ENDMETHOD. METHOD zif_abapgit_sap_package~get_transport_type. "##needed ENDMETHOD. METHOD zif_abapgit_sap_package~get_transport_layer. "##needed ENDMETHOD. METHOD zif_abapgit_sap_package~list_superpackages. "##needed ENDMETHOD. METHOD zif_abapgit_sap_package~read_parent. "##needed ENDMETHOD. ENDCLASS. CLASS ltcl_resolve_packages DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. DATA: mt_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt, mt_sub_packages TYPE ltcl_sap_package=>ty_package. METHODS: resolve_single FOR TESTING RAISING cx_static_check, given_tadir IMPORTING iv_object TYPE tadir-object iv_obj_name TYPE tadir-obj_name iv_korrnum TYPE tadir-korrnum iv_super_package TYPE devclass, when_packages_are_resolved, then_korrnum_should_be IMPORTING iv_line TYPE i iv_korrnum TYPE tadir-korrnum. ENDCLASS. CLASS zcl_abapgit_dependencies DEFINITION LOCAL FRIENDS ltcl_resolve_packages. CLASS ltcl_resolve_packages IMPLEMENTATION. METHOD resolve_single. given_tadir( iv_object = 'DEVC' iv_obj_name = 'Z_MAIN' iv_korrnum = '9990' iv_super_package = '' ). given_tadir( iv_object = 'DEVC' iv_obj_name = 'Z_SUB1' iv_korrnum = '9990' iv_super_package = 'Z_MAIN' ). given_tadir( iv_object = 'DEVC' iv_obj_name = 'Z_SUB2' iv_korrnum = '9990' iv_super_package = 'Z_MAIN' ). when_packages_are_resolved( ). then_korrnum_should_be( iv_line = 1 iv_korrnum = '9990' ). then_korrnum_should_be( iv_line = 2 iv_korrnum = '9989' ). then_korrnum_should_be( iv_line = 3 iv_korrnum = '9989' ). ENDMETHOD. METHOD given_tadir. DATA: ls_tadir LIKE LINE OF mt_tadir, lv_package TYPE devclass. ls_tadir-object = iv_object. ls_tadir-obj_name = iv_obj_name. ls_tadir-korrnum = iv_korrnum. INSERT ls_tadir INTO TABLE mt_tadir. IF iv_super_package IS NOT INITIAL. lv_package = iv_obj_name. INSERT lv_package INTO TABLE mt_sub_packages. ENDIF. ENDMETHOD. METHOD when_packages_are_resolved. DATA: lo_mock_sap_package TYPE REF TO ltcl_sap_package. lo_mock_sap_package = NEW #( iv_package = 'Z_MAIN' ). lo_mock_sap_package->set_sub_packages( mt_sub_packages ). zcl_abapgit_injector=>set_sap_package( iv_package = 'Z_MAIN' ii_sap_package = lo_mock_sap_package ). zcl_abapgit_dependencies=>resolve_packages( CHANGING ct_tadir = mt_tadir ). ENDMETHOD. METHOD then_korrnum_should_be. FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF mt_tadir. READ TABLE mt_tadir INDEX iv_line ASSIGNING <ls_tadir>. cl_abap_unit_assert=>assert_equals( exp = iv_korrnum act = <ls_tadir>-korrnum ). ENDMETHOD. ENDCLASS.
[ 31631, 300, 83, 565, 62, 82, 499, 62, 26495, 5550, 20032, 17941, 7473, 43001, 2751, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 1259, 62, 26495, 41876, 49053, 9795, 43679, 3963, 1614, 4871, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13315, 44521, 12, 4944, 33866, 8924, 5550, 38865, 35374, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 23772, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 26495, 41876, 1614, 4871, 11, 628, 220, 220, 220, 220, 220, 900, 62, 7266, 62, 43789, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 340, 62, 7266, 62, 43789, 41876, 1259, 62, 26495, 13, 628, 220, 220, 220, 23255, 37, 2246, 1546, 25, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42865, 25, 285, 85, 62, 26495, 220, 220, 220, 220, 220, 41876, 1614, 4871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 7266, 62, 43789, 41876, 1259, 62, 26495, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 300, 83, 565, 62, 82, 499, 62, 26495, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 23772, 13, 628, 220, 220, 220, 285, 85, 62, 26495, 796, 21628, 62, 26495, 13, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 4868, 62, 7266, 43789, 13, 628, 220, 220, 220, 16876, 285, 85, 62, 26495, 796, 705, 57, 62, 5673, 1268, 4458, 628, 220, 220, 220, 220, 220, 374, 83, 62, 4868, 796, 45079, 62, 7266, 62, 43789, 13, 628, 220, 220, 220, 23578, 5064, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 900, 62, 7266, 62, 43789, 13, 628, 220, 220, 220, 45079, 62, 7266, 62, 43789, 796, 340, 62, 7266, 62, 43789, 13, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 533, 62, 36653, 62, 47398, 62, 259, 62, 2213, 62, 42180, 13, 366, 2235, 27938, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 17953, 13, 366, 2235, 27938, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 17953, 62, 9410, 13, 366, 2235, 27938, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 17953, 62, 12001, 13, 366, 2235, 27938, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 1069, 1023, 13, 366, 2235, 27938, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 1136, 62, 7645, 634, 62, 4906, 13, 366, 2235, 27938, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 1136, 62, 7645, 634, 62, 29289, 13, 366, 2235, 27938, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 4868, 62, 16668, 43789, 13, 366, 2235, 27938, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 82, 499, 62, 26495, 93, 961, 62, 8000, 13, 366, 2235, 27938, 628, 220, 23578, 49273, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 300, 83, 565, 62, 411, 6442, 62, 43789, 5550, 20032, 17941, 7473, 43001, 2751, 198, 220, 360, 4261, 6234, 6006, 9863, 198, 220, 45698, 42, 49277, 43638, 5805, 7597, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42865, 25, 198, 220, 220, 220, 220, 220, 45079, 62, 83, 324, 343, 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, 11, 198, 220, 220, 220, 220, 220, 45079, 62, 7266, 62, 43789, 41876, 300, 83, 565, 62, 82, 499, 62, 26495, 14804, 774, 62, 26495, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 10568, 62, 29762, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 628, 220, 220, 220, 220, 220, 1813, 62, 83, 324, 343, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 15252, 220, 220, 220, 220, 220, 220, 220, 41876, 36264, 343, 12, 15252, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 26801, 62, 3672, 220, 220, 220, 220, 220, 41876, 36264, 343, 12, 26801, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 74, 38890, 22510, 220, 220, 220, 220, 220, 220, 41876, 36264, 343, 12, 74, 38890, 22510, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 16668, 62, 26495, 41876, 1614, 4871, 11, 628, 220, 220, 220, 220, 220, 618, 62, 43789, 62, 533, 62, 411, 5634, 11, 628, 220, 220, 220, 220, 220, 788, 62, 74, 38890, 22510, 62, 21754, 62, 1350, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 1370, 220, 220, 220, 41876, 1312, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 74, 38890, 22510, 41876, 36264, 343, 12, 74, 38890, 22510, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 45841, 3976, 5550, 20032, 17941, 37347, 1847, 48167, 1677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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
CLASS y_check_chain_decl_usage DEFINITION PUBLIC INHERITING FROM y_check_base CREATE PUBLIC. PUBLIC SECTION. METHODS constructor. PROTECTED SECTION. METHODS inspect_tokens REDEFINITION. PRIVATE SECTION. DATA rows_with_colon TYPE STANDARD TABLE OF stmnt_crow. METHODS has_error_not_raised_yet IMPORTING statement TYPE sstmnt RETURNING VALUE(result) TYPE abap_bool. ENDCLASS. CLASS Y_CHECK_CHAIN_DECL_USAGE IMPLEMENTATION. METHOD constructor. super->constructor( ). settings-pseudo_comment = '"#EC CHAIN_DECL_USAG' ##NO_TEXT. settings-disable_threshold_selection = abap_true. settings-threshold = 0. settings-prio = c_warning. settings-documentation = |{ c_docs_path-checks }chain-declaration-usage.md|. set_check_message( 'Do not chain up-front declarations!' ). ENDMETHOD. METHOD inspect_tokens. CHECK statement-colonrow IS NOT INITIAL. CHECK statement-terminator = ','. CHECK get_token_abs( statement-from ) = 'DATA'. CHECK has_error_not_raised_yet( statement ). APPEND statement-colonrow TO rows_with_colon. DATA(configuration) = detect_check_configuration( statement ). IF configuration IS INITIAL. RETURN. ENDIF. raise_error( statement_level = statement-level statement_index = index statement_from = statement-from error_priority = configuration-prio ). ENDMETHOD. METHOD has_error_not_raised_yet. result = xsdbool( NOT line_exists( rows_with_colon[ table_line = statement-colonrow ] ) ). ENDMETHOD. ENDCLASS.
[ 31631, 331, 62, 9122, 62, 7983, 62, 32446, 62, 26060, 5550, 20032, 17941, 44731, 3268, 16879, 2043, 2751, 16034, 331, 62, 9122, 62, 8692, 29244, 6158, 44731, 13, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 23772, 13, 628, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 10104, 62, 83, 482, 641, 23848, 36, 20032, 17941, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42865, 15274, 62, 4480, 62, 4033, 261, 41876, 49053, 9795, 43679, 3963, 336, 76, 429, 62, 47114, 13, 628, 220, 220, 220, 337, 36252, 50, 468, 62, 18224, 62, 1662, 62, 49309, 62, 25907, 30023, 9863, 2751, 2643, 41876, 264, 301, 76, 429, 30826, 4261, 15871, 26173, 8924, 7, 20274, 8, 41876, 450, 499, 62, 30388, 13, 198, 198, 10619, 31631, 13, 628, 198, 198, 31631, 575, 62, 50084, 62, 3398, 29833, 62, 41374, 43, 62, 2937, 11879, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 23772, 13, 198, 220, 220, 220, 2208, 3784, 41571, 273, 7, 6739, 628, 220, 220, 220, 6460, 12, 7752, 12003, 62, 23893, 796, 705, 1, 2, 2943, 5870, 29833, 62, 41374, 43, 62, 2937, 4760, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 6460, 12, 40223, 62, 400, 10126, 62, 49283, 796, 450, 499, 62, 7942, 13, 198, 220, 220, 220, 6460, 12, 400, 10126, 796, 657, 13, 198, 220, 220, 220, 6460, 12, 3448, 78, 796, 269, 62, 43917, 13, 198, 220, 220, 220, 6460, 12, 22897, 341, 796, 930, 90, 269, 62, 31628, 62, 6978, 12, 42116, 1782, 7983, 12, 32446, 10186, 12, 26060, 13, 9132, 91, 13, 628, 220, 220, 220, 900, 62, 9122, 62, 20500, 7, 705, 5211, 407, 6333, 510, 12, 8534, 31713, 13679, 6739, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 10104, 62, 83, 482, 641, 13, 628, 220, 220, 220, 5870, 25171, 2643, 12, 4033, 261, 808, 3180, 5626, 3268, 2043, 12576, 13, 198, 220, 220, 220, 5870, 25171, 2643, 12, 23705, 1352, 796, 705, 4032, 13, 198, 220, 220, 220, 5870, 25171, 651, 62, 30001, 62, 8937, 7, 2643, 12, 6738, 1267, 796, 705, 26947, 4458, 198, 220, 220, 220, 5870, 25171, 468, 62, 18224, 62, 1662, 62, 49309, 62, 25907, 7, 2643, 6739, 628, 220, 220, 220, 43504, 10619, 2643, 12, 4033, 261, 808, 5390, 15274, 62, 4480, 62, 4033, 261, 13, 628, 220, 220, 220, 42865, 7, 11250, 3924, 8, 796, 4886, 62, 9122, 62, 11250, 3924, 7, 2643, 6739, 628, 220, 220, 220, 16876, 8398, 3180, 3268, 2043, 12576, 13, 198, 220, 220, 220, 220, 220, 30826, 27064, 13, 198, 220, 220, 220, 23578, 5064, 13, 628, 220, 220, 220, 5298, 62, 18224, 7, 2643, 62, 5715, 220, 220, 220, 220, 796, 2643, 12, 5715, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2643, 62, 9630, 220, 220, 220, 220, 796, 6376, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2643, 62, 6738, 220, 220, 220, 220, 220, 796, 2643, 12, 6738, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 62, 49336, 220, 220, 220, 220, 220, 796, 8398, 12, 3448, 78, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 468, 62, 18224, 62, 1662, 62, 49309, 62, 25907, 13, 198, 220, 220, 220, 1255, 796, 2124, 82, 9945, 970, 7, 5626, 1627, 62, 1069, 1023, 7, 15274, 62, 4480, 62, 4033, 261, 58, 3084, 62, 1370, 796, 2643, 12, 4033, 261, 808, 2361, 1267, 6739, 198, 220, 23578, 49273, 13, 628, 198, 10619, 31631, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
CLASS zcl_abapgit_object_iwpr DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super CREATE PUBLIC . PUBLIC SECTION. INTERFACES zif_abapgit_object . PROTECTED SECTION. METHODS get_generic RETURNING VALUE(ro_generic) TYPE REF TO zcl_abapgit_objects_generic RAISING zcx_abapgit_exception . PRIVATE SECTION. ENDCLASS. CLASS ZCL_ABAPGIT_OBJECT_IWPR IMPLEMENTATION. METHOD get_generic. CREATE OBJECT ro_generic EXPORTING is_item = ms_item. ENDMETHOD. METHOD zif_abapgit_object~changed_by. rv_user = zcl_abapgit_objects_super=>c_user_unknown. ENDMETHOD. METHOD zif_abapgit_object~delete. get_generic( )->delete( ). ENDMETHOD. METHOD zif_abapgit_object~deserialize. get_generic( )->deserialize( iv_package = iv_package io_xml = io_xml ). ENDMETHOD. METHOD zif_abapgit_object~exists. rv_bool = get_generic( )->exists( ). ENDMETHOD. METHOD zif_abapgit_object~get_comparator. RETURN. ENDMETHOD. METHOD zif_abapgit_object~get_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| ). ENDMETHOD. METHOD zif_abapgit_object~serialize. get_generic( )->serialize( io_xml ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 14246, 1050, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 16668, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 23255, 37, 2246, 1546, 1976, 361, 62, 397, 499, 18300, 62, 15252, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 651, 62, 41357, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 305, 62, 41357, 8, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 41357, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 6242, 2969, 38, 2043, 62, 9864, 23680, 62, 40, 54, 4805, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 651, 62, 41357, 13, 628, 220, 220, 220, 29244, 6158, 25334, 23680, 686, 62, 41357, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 9186, 796, 13845, 62, 9186, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 40985, 62, 1525, 13, 198, 220, 220, 220, 374, 85, 62, 7220, 796, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 16668, 14804, 66, 62, 7220, 62, 34680, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 33678, 13, 628, 220, 220, 220, 651, 62, 41357, 7, 1267, 3784, 33678, 7, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 8906, 48499, 1096, 13, 628, 220, 220, 220, 651, 62, 41357, 7, 1267, 3784, 8906, 48499, 1096, 7, 198, 220, 220, 220, 220, 220, 21628, 62, 26495, 796, 21628, 62, 26495, 198, 220, 220, 220, 220, 220, 33245, 62, 19875, 220, 220, 220, 220, 796, 33245, 62, 19875, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1069, 1023, 13, 628, 220, 220, 220, 374, 85, 62, 30388, 796, 651, 62, 41357, 7, 1267, 3784, 1069, 1023, 7, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1136, 62, 785, 1845, 1352, 13, 198, 220, 220, 220, 30826, 27064, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1136, 62, 38993, 13, 628, 220, 220, 220, 44608, 62, 38993, 796, 651, 62, 38993, 7, 6739, 198, 220, 220, 220, 44608, 62, 38993, 12, 33678, 62, 83, 324, 343, 796, 450, 499, 62, 7942, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 271, 62, 5275, 13, 198, 220, 220, 220, 374, 85, 62, 5275, 796, 318, 62, 5275, 7, 6739, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 271, 62, 24162, 13, 628, 220, 220, 220, 374, 85, 62, 271, 62, 24162, 796, 450, 499, 62, 9562, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 43327, 13, 628, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 14804, 40225, 7, 930, 51, 3727, 46, 25, 15903, 91, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 46911, 1096, 13, 628, 220, 220, 220, 651, 62, 41357, 7, 1267, 3784, 46911, 1096, 7, 33245, 62, 19875, 6739, 628, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
FUNCTION-POOL zabaplint_ui. TABLES: zabaplint_glob_data. CONSTANTS: BEGIN OF c_compare_type, git TYPE c VALUE 'G', default TYPE c VALUE 'D', END OF c_compare_type. TYPES: BEGIN OF ty_node. INCLUDE STRUCTURE treev_node. TYPES: text TYPE text50, END OF ty_node. TYPES: ty_nodes TYPE STANDARD TABLE OF ty_node WITH DEFAULT KEY. DATA: gv_read_only TYPE abap_bool, gv_ok_code LIKE sy-ucomm, go_container TYPE REF TO cl_gui_custom_container, go_editor TYPE REF TO cl_gui_textedit, go_splitter TYPE REF TO cl_gui_easy_splitter_container, go_tree TYPE REF TO cl_gui_simple_tree.
[ 42296, 4177, 2849, 12, 16402, 3535, 1976, 15498, 489, 600, 62, 9019, 13, 198, 198, 5603, 9148, 1546, 25, 1976, 15498, 489, 600, 62, 4743, 672, 62, 7890, 13, 198, 198, 10943, 2257, 1565, 4694, 25, 198, 220, 347, 43312, 3963, 269, 62, 5589, 533, 62, 4906, 11, 198, 220, 220, 220, 17606, 220, 220, 220, 220, 41876, 269, 26173, 8924, 705, 38, 3256, 198, 220, 220, 220, 4277, 41876, 269, 26173, 8924, 705, 35, 3256, 198, 220, 23578, 3963, 269, 62, 5589, 533, 62, 4906, 13, 198, 198, 9936, 47, 1546, 25, 347, 43312, 3963, 1259, 62, 17440, 13, 198, 220, 220, 220, 3268, 5097, 52, 7206, 19269, 18415, 11335, 5509, 85, 62, 17440, 13, 198, 9936, 47, 1546, 25, 2420, 41876, 2420, 1120, 11, 198, 220, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 17440, 13, 198, 198, 9936, 47, 1546, 25, 1259, 62, 77, 4147, 41876, 49053, 9795, 43679, 3963, 1259, 62, 17440, 13315, 5550, 38865, 35374, 13, 198, 198, 26947, 25, 308, 85, 62, 961, 62, 8807, 41876, 450, 499, 62, 30388, 11, 198, 220, 220, 220, 220, 220, 308, 85, 62, 482, 62, 8189, 220, 220, 34178, 827, 12, 84, 9503, 11, 198, 220, 220, 220, 220, 220, 467, 62, 34924, 41876, 4526, 37, 5390, 537, 62, 48317, 62, 23144, 62, 34924, 11, 198, 220, 220, 220, 220, 220, 467, 62, 35352, 220, 220, 220, 41876, 4526, 37, 5390, 537, 62, 48317, 62, 5239, 19312, 11, 198, 220, 220, 220, 220, 220, 467, 62, 22018, 1967, 220, 41876, 4526, 37, 5390, 537, 62, 48317, 62, 38171, 62, 22018, 1967, 62, 34924, 11, 198, 220, 220, 220, 220, 220, 467, 62, 21048, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 537, 62, 48317, 62, 36439, 62, 21048, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
*&---------------------------------------------------------------------* *& Include ZDEMO_EXCEL_OUTPUTOPT_INCL *&---------------------------------------------------------------------* CLASS lcl_output DEFINITION CREATE PRIVATE. PUBLIC SECTION. CLASS-METHODS: output IMPORTING cl_excel TYPE REF TO zcl_excel iv_writerclass_name TYPE clike OPTIONAL RAISING zcx_excel, f4_path RETURNING VALUE(selected_folder) TYPE string, parametertexts. PRIVATE SECTION. METHODS: download_frontend, download_backend, display_online, send_email. DATA: xdata TYPE xstring, " Will be used for sending as email t_rawdata TYPE solix_tab, " Will be used for downloading or open directly bytecount TYPE i. " Will be used for downloading or open directly ENDCLASS. "lcl_output DEFINITION SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE txt_bl1. PARAMETERS: rb_down RADIOBUTTON GROUP rb1 USER-COMMAND space. PARAMETERS: rb_back RADIOBUTTON GROUP rb1. PARAMETERS: rb_show RADIOBUTTON GROUP rb1 DEFAULT 'X' . PARAMETERS: rb_send RADIOBUTTON GROUP rb1. PARAMETERS: p_path TYPE string LOWER CASE MODIF ID pat. PARAMETERS: p_email TYPE string LOWER CASE MODIF ID ema OBLIGATORY DEFAULT 'insert_your_emailadress@here'. PARAMETERS: p_backfn TYPE text40 NO-DISPLAY. SELECTION-SCREEN END OF BLOCK bl1. AT SELECTION-SCREEN OUTPUT. LOOP AT SCREEN. IF rb_down IS INITIAL AND screen-group1 = 'PAT'. screen-input = 0. screen-invisible = 1. ENDIF. IF rb_send IS INITIAL AND screen-group1 = 'EMA'. screen-input = 0. screen-invisible = 1. ENDIF. MODIFY SCREEN. ENDLOOP. INITIALIZATION. IF sy-batch IS INITIAL. cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = p_path ). cl_gui_cfw=>flush( ). ENDIF. lcl_output=>parametertexts( ). " If started in language w/o textelements translated set defaults txt_bl1 = 'Output options'(bl1). p_backfn = gc_save_file_name. " Use as default if nothing else is supplied by submit AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path. p_path = lcl_output=>f4_path( ). *----------------------------------------------------------------------* * CLASS lcl_output IMPLEMENTATION *----------------------------------------------------------------------* CLASS lcl_output IMPLEMENTATION. METHOD output. DATA: cl_output TYPE REF TO lcl_output, cl_writer TYPE REF TO zif_excel_writer. IF iv_writerclass_name IS INITIAL. CREATE OBJECT cl_output. CREATE OBJECT cl_writer TYPE zcl_excel_writer_2007. ELSE. CREATE OBJECT cl_output. CREATE OBJECT cl_writer TYPE (iv_writerclass_name). ENDIF. cl_output->xdata = cl_writer->write_file( cl_excel ). cl_output->t_rawdata = cl_bcs_convert=>xstring_to_solix( iv_xstring = cl_output->xdata ). cl_output->bytecount = xstrlen( cl_output->xdata ). CASE 'X'. WHEN rb_down. IF sy-batch IS INITIAL. cl_output->download_frontend( ). ELSE. MESSAGE e802(zabap2xlsx). ENDIF. WHEN rb_back. cl_output->download_backend( ). WHEN rb_show. IF sy-batch IS INITIAL. cl_output->display_online( ). ELSE. MESSAGE e803(zabap2xlsx). ENDIF. WHEN rb_send. cl_output->send_email( ). ENDCASE. ENDMETHOD. "output METHOD f4_path. DATA: new_path TYPE string, repid TYPE syrepid, dynnr TYPE sydynnr, lt_dynpfields TYPE TABLE OF dynpread, ls_dynpfields LIKE LINE OF lt_dynpfields. * Get current value dynnr = sy-dynnr. repid = sy-repid. ls_dynpfields-fieldname = 'P_PATH'. APPEND ls_dynpfields TO lt_dynpfields. CALL FUNCTION 'DYNP_VALUES_READ' EXPORTING dyname = repid dynumb = dynnr TABLES dynpfields = lt_dynpfields EXCEPTIONS invalid_abapworkarea = 1 invalid_dynprofield = 2 invalid_dynproname = 3 invalid_dynpronummer = 4 invalid_request = 5 no_fielddescription = 6 invalid_parameter = 7 undefind_error = 8 double_conversion = 9 stepl_not_found = 10 OTHERS = 11. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. RETURN. ENDIF. READ TABLE lt_dynpfields INTO ls_dynpfields INDEX 1. new_path = ls_dynpfields-fieldvalue. selected_folder = new_path. cl_gui_frontend_services=>directory_browse( EXPORTING window_title = 'Select path to download EXCEL-file' initial_folder = new_path CHANGING selected_folder = new_path EXCEPTIONS cntl_error = 1 error_no_gui = 2 not_supported_by_gui = 3 OTHERS = 4 ). cl_gui_cfw=>flush( ). CHECK new_path IS NOT INITIAL. selected_folder = new_path. ENDMETHOD. "f4_path METHOD parametertexts. * If started in language w/o textelements translated set defaults * Furthermore I don't have to change the selectiontexts of all demoreports. TYPES: BEGIN OF ty_parameter, name TYPE string, text TYPE string, END OF ty_parameter. DATA: parameters TYPE TABLE OF ty_parameter, parameter TYPE ty_parameter, parameter_text_name TYPE string. FIELD-SYMBOLS: <parameter> TYPE ty_parameter, <parameter_text> TYPE c. parameter-name = 'RB_DOWN'. parameter-text = 'Save to frontend'. APPEND parameter TO parameters. parameter-name = 'RB_BACK'. parameter-text = 'Save to backend'. APPEND parameter TO parameters. parameter-name = 'RB_SHOW'. parameter-text = 'Direct display'. APPEND parameter TO parameters. parameter-name = 'RB_SEND'. parameter-text = 'Send via email'. APPEND parameter TO parameters. parameter-name = 'P_PATH'. parameter-text = 'Frontend-path to download to'. APPEND parameter TO parameters. parameter-name = 'P_EMAIL'. parameter-text = 'Email to send xlsx to'. APPEND parameter TO parameters. LOOP AT parameters ASSIGNING <parameter>. parameter_text_name = |%_{ <parameter>-name }_%_APP_%-TEXT|. ASSIGN (parameter_text_name) TO <parameter_text>. IF sy-subrc = 0. IF <parameter_text> = <parameter>-name OR <parameter_text> IS INITIAL. <parameter_text> = <parameter>-text. ENDIF. ENDIF. ENDLOOP. ENDMETHOD. "parametertexts METHOD: download_frontend. DATA: filename TYPE string. * I don't like p_path here - but for this include it's ok filename = p_path. * Add trailing "\" or "/" IF filename CA '/'. REPLACE REGEX '([^/])\s*$' IN filename WITH '$1/' . ELSE. REPLACE REGEX '([^\\])\s*$' IN filename WITH '$1\\'. ENDIF. CONCATENATE filename gc_save_file_name INTO filename. * Get trailing blank cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = bytecount filename = filename filetype = 'BIN' CHANGING data_tab = t_rawdata ). ENDMETHOD. "download_frontend METHOD download_backend. DATA: bytes_remain TYPE i. FIELD-SYMBOLS: <rawdata> LIKE LINE OF t_rawdata. OPEN DATASET p_backfn FOR OUTPUT IN BINARY MODE. CHECK sy-subrc = 0. bytes_remain = bytecount. LOOP AT t_rawdata ASSIGNING <rawdata>. AT LAST. CHECK bytes_remain >= 0. TRANSFER <rawdata> TO p_backfn LENGTH bytes_remain. EXIT. ENDAT. TRANSFER <rawdata> TO p_backfn. SUBTRACT 255 FROM bytes_remain. " Solix has length 255 ENDLOOP. CLOSE DATASET p_backfn. IF sy-repid <> sy-cprog AND sy-cprog IS NOT INITIAL. " no need to display anything if download was selected and report was called for demo purposes LEAVE PROGRAM. ELSE. MESSAGE 'Data transferred to default backend directory' TYPE 'S'. ENDIF. ENDMETHOD. "download_backend METHOD display_online. DATA:error TYPE REF TO i_oi_error, t_errors TYPE STANDARD TABLE OF REF TO i_oi_error WITH NON-UNIQUE DEFAULT KEY, cl_control TYPE REF TO i_oi_container_control, "OIContainerCtrl cl_document TYPE REF TO i_oi_document_proxy. "Office Dokument c_oi_container_control_creator=>get_container_control( IMPORTING control = cl_control error = error ). APPEND error TO t_errors. cl_control->init_control( EXPORTING inplace_enabled = 'X' no_flush = 'X' r3_application_name = 'Demo Document Container' parent = cl_gui_container=>screen0 IMPORTING error = error EXCEPTIONS OTHERS = 2 ). APPEND error TO t_errors. cl_control->get_document_proxy( EXPORTING document_type = 'Excel.Sheet' " EXCEL no_flush = ' ' IMPORTING document_proxy = cl_document error = error ). APPEND error TO t_errors. * Errorhandling should be inserted here cl_document->open_document_from_table( EXPORTING document_size = bytecount document_table = t_rawdata open_inplace = 'X' ). WRITE: '.'. " To create an output. That way screen0 will exist ENDMETHOD. "display_online METHOD send_email. * Needed to send emails DATA: bcs_exception TYPE REF TO cx_bcs, errortext TYPE string, cl_send_request TYPE REF TO cl_bcs, cl_document TYPE REF TO cl_document_bcs, cl_recipient TYPE REF TO if_recipient_bcs, cl_sender TYPE REF TO cl_cam_address_bcs, t_attachment_header TYPE soli_tab, wa_attachment_header LIKE LINE OF t_attachment_header, attachment_subject TYPE sood-objdes, sood_bytecount TYPE sood-objlen, mail_title TYPE so_obj_des, t_mailtext TYPE soli_tab, wa_mailtext LIKE LINE OF t_mailtext, send_to TYPE adr6-smtp_addr, sent TYPE abap_bool. mail_title = 'Mail title'. wa_mailtext = 'Mailtext'. APPEND wa_mailtext TO t_mailtext. TRY. * Create send request cl_send_request = cl_bcs=>create_persistent( ). * Create new document with mailtitle and mailtextg cl_document = cl_document_bcs=>create_document( i_type = 'RAW' "#EC NOTEXT i_text = t_mailtext i_subject = mail_title ). * Add attachment to document * since the new excelfiles have an 4-character extension .xlsx but the attachment-type only holds 3 charactes .xls, * we have to specify the real filename via attachment header * Use attachment_type xls to have SAP display attachment with the excel-icon attachment_subject = gc_save_file_name. CONCATENATE '&SO_FILENAME=' attachment_subject INTO wa_attachment_header. APPEND wa_attachment_header TO t_attachment_header. * Attachment sood_bytecount = bytecount. " next method expects sood_bytecount instead of any positive integer *sigh* cl_document->add_attachment( i_attachment_type = 'XLS' "#EC NOTEXT i_attachment_subject = attachment_subject i_attachment_size = sood_bytecount i_att_content_hex = t_rawdata i_attachment_header = t_attachment_header ). * add document to send request cl_send_request->set_document( cl_document ). * add recipient(s) - here only 1 will be needed send_to = p_email. IF send_to IS INITIAL. send_to = 'no_email@no_email.no_email'. " Place into SOST in any case for demonstration purposes ENDIF. cl_recipient = cl_cam_address_bcs=>create_internet_address( send_to ). cl_send_request->add_recipient( cl_recipient ). * Und abschicken sent = cl_send_request->send( i_with_error_screen = 'X' ). COMMIT WORK. IF sent = abap_true. MESSAGE s805(zabap2xlsx). MESSAGE 'Document ready to be sent - Check SOST or SCOT' TYPE 'I'. ELSE. MESSAGE i804(zabap2xlsx) WITH p_email. ENDIF. CATCH cx_bcs INTO bcs_exception. errortext = bcs_exception->if_message~get_text( ). MESSAGE errortext TYPE 'I'. ENDTRY. ENDMETHOD. "send_email ENDCLASS. "lcl_output IMPLEMENTATION
[ 9, 5, 10097, 30934, 9, 198, 9, 5, 220, 40348, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1168, 39429, 46, 62, 6369, 34, 3698, 62, 2606, 7250, 3843, 3185, 51, 62, 1268, 5097, 198, 9, 5, 10097, 30934, 9, 198, 31631, 300, 565, 62, 22915, 5550, 20032, 17941, 29244, 6158, 4810, 3824, 6158, 13, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 42715, 12, 49273, 50, 25, 198, 220, 220, 220, 220, 220, 5072, 220, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 537, 62, 1069, 5276, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 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, 21628, 62, 16002, 4871, 62, 3672, 41876, 537, 522, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 1069, 5276, 11, 198, 220, 220, 220, 220, 220, 277, 19, 62, 6978, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 34213, 62, 43551, 8, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 11507, 5239, 82, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 4321, 62, 8534, 437, 11, 198, 220, 220, 220, 220, 220, 4321, 62, 1891, 437, 11, 198, 220, 220, 220, 220, 220, 3359, 62, 25119, 11, 198, 220, 220, 220, 220, 220, 3758, 62, 12888, 13, 628, 220, 220, 220, 42865, 25, 2124, 7890, 220, 220, 220, 220, 41876, 2124, 8841, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 2561, 307, 973, 329, 7216, 355, 3053, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 62, 1831, 7890, 41876, 1540, 844, 62, 8658, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 2561, 307, 973, 329, 22023, 393, 1280, 3264, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18022, 9127, 41876, 1312, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 2561, 307, 973, 329, 22023, 393, 1280, 3264, 198, 10619, 31631, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 75, 565, 62, 22915, 5550, 20032, 17941, 628, 198, 46506, 2849, 12, 6173, 2200, 1677, 347, 43312, 3963, 9878, 11290, 698, 16, 13315, 8782, 10067, 37977, 2538, 256, 742, 62, 2436, 16, 13, 198, 27082, 2390, 2767, 4877, 25, 374, 65, 62, 2902, 33540, 9399, 47526, 11357, 44441, 374, 65, 16, 1294, 1137, 12, 9858, 44, 6981, 2272, 13, 198, 198, 27082, 2390, 2767, 4877, 25, 374, 65, 62, 1891, 33540, 9399, 47526, 11357, 44441, 374, 65, 16, 13, 198, 198, 27082, 2390, 2767, 4877, 25, 374, 65, 62, 12860, 33540, 9399, 47526, 11357, 44441, 374, 65, 16, 5550, 38865, 705, 55, 6, 764, 198, 198, 27082, 2390, 2767, 4877, 25, 374, 65, 62, 21280, 33540, 9399, 47526, 11357, 44441, 374, 65, 16, 13, 198, 198, 27082, 2390, 2767, 4877, 25, 279, 62, 6978, 220, 41876, 4731, 406, 36048, 42001, 19164, 5064, 4522, 1458, 13, 198, 27082, 2390, 2767, 4877, 25, 279, 62, 12888, 41876, 4731, 406, 36048, 42001, 19164, 5064, 4522, 795, 64, 440, 9148, 3528, 1404, 15513, 5550, 38865, 705, 28463, 62, 14108, 62, 12888, 324, 601, 31, 1456, 4458, 198, 27082, 2390, 2767, 4877, 25, 279, 62, 1891, 22184, 41876, 2420, 1821, 8005, 12, 26288, 31519, 13, 198, 46506, 2849, 12, 6173, 2200, 1677, 23578, 3963, 9878, 11290, 698, 16, 13, 628, 198, 1404, 33493, 2849, 12, 6173, 2200, 1677, 16289, 30076, 13, 198, 220, 17579, 3185, 5161, 6374, 2200, 1677, 13, 628, 220, 220, 220, 16876, 374, 65, 62, 2902, 3180, 3268, 2043, 12576, 5357, 3159, 12, 8094, 16, 796, 705, 47, 1404, 4458, 198, 220, 220, 220, 220, 220, 3159, 12, 15414, 796, 657, 13, 198, 220, 220, 220, 220, 220, 3159, 12, 259, 23504, 796, 352, 13, 198, 220, 220, 220, 23578, 5064, 13, 628, 220, 220, 220, 16876, 374, 65, 62, 21280, 3180, 3268, 2043, 12576, 5357, 3159, 12, 8094, 16, 796, 705, 27630, 4458, 198, 220, 220, 220, 220, 220, 3159, 12, 15414, 796, 657, 13, 198, 220, 220, 220, 220, 220, 3159, 12, 259, 23504, 796, 352, 13, 198, 220, 220, 220, 23578, 5064, 13, 628, 220, 220, 220, 19164, 5064, 56, 6374, 2200, 1677, 13, 628, 220, 23578, 21982, 3185, 13, 198, 198, 1268, 2043, 12576, 14887, 6234, 13, 198, 220, 16876, 827, 12, 43501, 3180, 3268, 2043, 12576, 13, 198, 220, 220, 220, 537, 62, 48317, 62, 8534, 437, 62, 30416, 14804, 1136, 62, 82, 499, 48317, 62, 1818, 15908, 7, 5870, 15567, 2751, 31841, 1818, 15908, 796, 279, 62, 6978, 6739, 198, 220, 220, 220, 537, 62, 48317, 62, 12993, 86, 14804, 25925, 7, 6739, 198, 220, 23578, 5064, 13, 198, 220, 300, 565, 62, 22915, 14804, 17143, 2357, 5239, 82, 7, 6739, 220, 366, 1002, 2067, 287, 3303, 266, 14, 78, 48659, 660, 3639, 14251, 900, 26235, 198, 220, 256, 742, 62, 2436, 16, 796, 705, 26410, 3689, 6, 7, 2436, 16, 737, 198, 220, 279, 62, 1891, 22184, 796, 308, 66, 62, 21928, 62, 7753, 62, 3672, 13, 220, 366, 5765, 355, 4277, 611, 2147, 2073, 318, 14275, 416, 9199, 198, 198, 1404, 33493, 2849, 12, 6173, 2200, 1677, 6177, 26173, 8924, 12, 2200, 35780, 7473, 279, 62, 6978, 13, 198, 220, 279, 62, 6978, 796, 300, 565, 62, 22915, 14804, 69, 19, 62, 6978, 7, 6739, 628, 198, 9, 10097, 23031, 9, 198, 9, 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 ]
CLASS zcl_aoc_check_18 DEFINITION PUBLIC INHERITING FROM zcl_aoc_super CREATE PUBLIC. PUBLIC SECTION. METHODS constructor. METHODS check REDEFINITION. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_aoc_check_18 IMPLEMENTATION. METHOD check. * abapOpenChecks * https://github.com/larshp/abapOpenChecks * MIT License DATA: lv_include TYPE program, lv_found TYPE abap_bool. FIELD-SYMBOLS: <ls_structure> LIKE LINE OF io_scan->structures, <ls_token> LIKE LINE OF io_scan->tokens, <ls_statement> LIKE LINE OF io_scan->statements. LOOP AT io_scan->structures ASSIGNING <ls_structure> WHERE type = io_scan->gc_structure-condition. lv_found = abap_false. LOOP AT io_scan->statements ASSIGNING <ls_statement> FROM <ls_structure>-stmnt_from TO <ls_structure>-stmnt_to. READ TABLE io_scan->tokens ASSIGNING <ls_token> INDEX <ls_statement>-from. IF sy-subrc <> 0 OR <ls_token>-type = io_scan->gc_token-comment. CONTINUE. ENDIF. CASE <ls_token>-str. WHEN 'WHEN' OR 'ELSEIF' OR 'ELSE'. CONTINUE. WHEN OTHERS. lv_found = abap_true. EXIT. ENDCASE. ENDLOOP. IF lv_found = abap_false. READ TABLE io_scan->statements ASSIGNING <ls_statement> INDEX <ls_structure>-stmnt_from. CHECK sy-subrc = 0. READ TABLE io_scan->tokens ASSIGNING <ls_token> INDEX <ls_statement>-from. CHECK sy-subrc = 0. lv_include = io_scan->get_include( <ls_statement>-level ). inform( p_sub_obj_name = lv_include p_position = <ls_structure>-stmnt_from p_line = <ls_token>-row p_kind = mv_errty p_test = myname p_code = '001' ). ENDIF. ENDLOOP. ENDMETHOD. METHOD constructor. super->constructor( ). version = '001'. position = '018'. has_attributes = abap_true. attributes_ok = abap_true. enable_rfc( ). enable_checksum( ). insert_scimessage( iv_code = '001' iv_text = 'Empty branch'(m01) ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 64, 420, 62, 9122, 62, 1507, 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, 198, 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, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 64, 420, 62, 9122, 62, 1507, 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, 17256, 41876, 1430, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 9275, 220, 220, 41876, 450, 499, 62, 30388, 13, 628, 220, 220, 220, 18930, 24639, 12, 23060, 10744, 3535, 50, 25, 1279, 7278, 62, 301, 5620, 29, 34178, 48920, 3963, 33245, 62, 35836, 3784, 7249, 942, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 13, 628, 198, 220, 220, 220, 17579, 3185, 5161, 33245, 62, 35836, 3784, 7249, 942, 24994, 3528, 15871, 1279, 7278, 62, 301, 5620, 29, 198, 220, 220, 220, 220, 220, 220, 220, 33411, 2099, 796, 33245, 62, 35836, 3784, 36484, 62, 301, 5620, 12, 31448, 13, 628, 220, 220, 220, 220, 220, 300, 85, 62, 9275, 796, 450, 499, 62, 9562, 13, 628, 220, 220, 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, 220, 220, 16034, 1279, 7278, 62, 301, 5620, 29, 12, 301, 76, 429, 62, 6738, 5390, 1279, 7278, 62, 301, 5620, 29, 12, 301, 76, 429, 62, 1462, 13, 628, 220, 220, 220, 220, 220, 220, 220, 20832, 43679, 33245, 62, 35836, 3784, 83, 482, 641, 24994, 3528, 15871, 1279, 7278, 62, 30001, 29, 24413, 6369, 1279, 7278, 62, 26090, 29, 12, 6738, 13, 198, 220, 220, 220, 220, 220, 220, 220, 16876, 827, 12, 7266, 6015, 1279, 29, 657, 6375, 1279, 7278, 62, 30001, 29, 12, 4906, 796, 33245, 62, 35836, 3784, 36484, 62, 30001, 12, 23893, 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, 628, 220, 220, 220, 220, 220, 220, 220, 42001, 1279, 7278, 62, 30001, 29, 12, 2536, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42099, 705, 12418, 1677, 6, 6375, 705, 3698, 5188, 5064, 6, 6375, 705, 3698, 5188, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43659, 8924, 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, 300, 85, 62, 9275, 796, 450, 499, 62, 7942, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7788, 2043, 13, 198, 220, 220, 220, 220, 220, 220, 220, 23578, 34, 11159, 13, 198, 220, 220, 220, 220, 220, 23578, 21982, 3185, 13, 628, 220, 220, 220, 220, 220, 16876, 300, 85, 62, 9275, 796, 450, 499, 62, 9562, 13, 198, 220, 220, 220, 220, 220, 220, 220, 20832, 43679, 33245, 62, 35836, 3784, 14269, 3196, 24994, 3528, 15871, 1279, 7278, 62, 26090, 29, 24413, 6369, 1279, 7278, 62, 301, 5620, 29, 12, 301, 76, 429, 62, 6738, 13, 198, 220, 220, 220, 220, 220, 220, 220, 5870, 25171, 827, 12, 7266, 6015, 796, 657, 13, 198, 220, 220, 220, 220, 220, 220, 220, 20832, 43679, 33245, 62, 35836, 3784, 83, 482, 641, 24994, 3528, 15871, 1279, 7278, 62, 30001, 29, 24413, 6369, 1279, 7278, 62, 26090, 29, 12, 6738, 13, 198, 220, 220, 220, 220, 220, 220, 220, 5870, 25171, 827, 12, 7266, 6015, 796, 657, 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, 628, 220, 220, 220, 220, 220, 220, 220, 4175, 7, 279, 62, 7266, 62, 26801, 62, 3672, 796, 300, 85, 62, 17256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 62, 9150, 220, 220, 220, 220, 796, 1279, 7278, 62, 301, 5620, 29, 12, 301, 76, 429, 62, 6738, 198, 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, 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, 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, 279, 62, 8189, 220, 220, 220, 220, 220, 220, 220, 220, 796, 705, 8298, 6, 6739, 198, 220, 220, 220, 220, 220, 23578, 5064, 13, 628, 220, 220, 220, 23578, 21982, 3185, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 23772, 13, 628, 220, 220, 220, 2208, 3784, 41571, 273, 7, 6739, 628, 220, 220, 220, 2196, 220, 220, 220, 220, 220, 220, 220, 796, 705, 8298, 4458, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
*&---------------------------------------------------------------------* *& Report ZWWW_TEST *&---------------------------------------------------------------------* REPORT ZWWW_MANY_LIST. Selection-screen begin of block bl1 with frame. Parameters: EXCEL radiobutton group gr0 default 'X', EXCEL_2 radiobutton group gr0, WORD radiobutton group gr0. Parameters: "#EC V#700 RTF radiobutton group gr0. "#EC V#700 Selection-screen end of block bl1. Parameters: *"""""""""""""""""""""""""""""""""""""""""""""" ####### ## #####: p_ADDRNM radiobutton group gr1 default 'X', " ## ####### p_DEPART radiobutton group gr1, " ## ####### p_FUNCTN radiobutton group gr1. " ## ########## Parameters: p_ROWS type i default 1000. " ####. ###-## ####### Parameters: p_VVN as checkbox, p_Protct as checkbox modif id VVN, p_Close as checkbox modif id VVN, p_Optim(7) type N default 100 modif id VVN, p_Debug as checkbox modif id VVN, p_Wh_OLE as checkbox modif id VVN, p_UseJAR as checkbox modif id VVN, p_Copies(7) type N default 1 modif id VVN. Types: Begin of t_GraphData, Name(40), Count type i, End of t_GraphData. Data: NameTemplate type WWWDATATAB-OBJID, Begin of it_Usr occurs 10, NAME1 type ADRC-NAME1, CITY1 type ADRC-CITY1, ADDRNUMBER type ADRC-ADDRNUMBER, DEPARTMENT type ADCP-DEPARTMENT, FUNCTION type ADCP-FUNCTION, BNAME type USR21-BNAME, NAME_LAST type ADRP-NAME_LAST, Name_FIRST type ADRP-Name_FIRST, End of it_Usr, Num type i, NumList(3), NameList type ZWWW_VALUES-VAR_NAME, it_Val type standard table of ZWWW_VALUES with header line, new_ADDRNUMBER, new_DEPARTMENT, new_FUNCTION, it_GraphData type sorted table of t_GraphData with unique key Name with header line, it_PhotoNames type standard table of WWWPARAMS-OBJID, it_PhotoFiles type ZWWW_FILES_T with header line, "standard table of RLGRAP-FILENAME, PhotoName type WWWPARAMS-OBJID, FilePhoto type RLGRAP-FILENAME, NumPhoto type i, NumUniq(5) type N. Field-symbols: <fld>, <name>. Data: fldName(50). At Selection-Screen output. * If sy-uname <> 'VIKTOROV'. Loop at Screen. If Screen-Group1 = 'VVN'. If p_VVN is initial. Screen-Active = 0. Else. Screen-Active = 1. EndIf. Modify Screen. EndIf. If Screen-Name = 'P_VVN'. Screen-Active = 0. Modify Screen. EndIf. EndLoop. * EndIf. At Selection-Screen. Case sy-ucomm. when 'VVN'. p_VVN = 'X'. EndCase. Start-of-Selection. Case 'X'. when Excel or Excel_2. NameTemplate = 'ZWWW_MANY_LIST'. when Word. NameTemplate = 'ZWWW_MANY_WORD'. when RTF. "#EC V#700 NameTemplate = 'ZWWW_MANY_RTF'. "#EC V#700 EndCase. Select * into corresponding fields of table it_Usr from USR21 join ADRP on ADRP~PERSNUMBER = USR21~PERSNUMBER join ADCP on ADCP~PERSNUMBER = ADRP~PERSNUMBER join ADRC on ADRC~ADDRNUMBER = ADCP~ADDRNUMBER up to p_ROWS rows. Sort it_Usr by ADDRNUMBER DEPARTMENT FUNCTION BNAME. ****************************** Data: StrVal(255), TypeValue. Define SetLine. Concatenate &1 &2 into it_Val-Var_Name. it_Val-Var_Num = &3. it_Val-Find_Text = &4. it_Val-Val_Type = &5. Describe field &6 type TypeValue. Case TypeValue. when 'D'. Write &6 to StrVal. Condense StrVal. it_Val-Value = StrVal. when others. it_Val-Value = &6. EndCase. If &5 = 'V'. Concatenate &1 it_Val-Value into it_Val-Value. EndIf. Append it_Val. End-of-Definition. Case 'X'. when p_ADDRNM. fldName = 'ADDRNUMBER'. Assign: it_Usr-ADDRNUMBER to <fld>, it_Usr-NAME1 to <name>. when p_DEPART. fldName = 'DEPARTMENT'. Assign: it_Usr-DEPARTMENT to <fld>, it_Usr-DEPARTMENT to <name>. when p_FUNCTN. fldName = 'FUNCTION'. Assign: it_Usr-FUNCTION to <fld>, it_Usr-FUNCTION to <name>. EndCase. Case 'X'. when Excel or Excel_2 or Word. Perform GetPhotoNames tables it_PhotoNames. Perform DownloadPhoto using 'SESS_IMAGE' changing FilePhoto. SetLine '' 'GraphFoto' '' '[Photo]' '' FilePhoto. SetLine '' 'GraphFoto' '' '' 'M' 'LoadPhoto'. EndCase. Num = 0. NumList = '0'. Loop at it_Usr. Clear it_Val. * At new <fld>. At new (fldName). NumList = NumList + 1. Condense NumList. If EXCEL = 'X'. Concatenate 'List_' NumList '!' into NameList. EndIf. new_ADDRNUMBER = 'X'. new_DEPARTMENT = 'X'. new_FUNCTION = 'X'. Clear it_GraphData. it_GraphData-Name = <name>. EndAt. it_GraphData-Count = 1. Collect it_GraphData. At new ADDRNUMBER. new_ADDRNUMBER = 'X'. Perform GetNextPhotoName tables it_PhotoNames changing PhotoName. EndAt. At new DEPARTMENT. new_DEPARTMENT = 'X'. EndAt. At new FUNCTION. new_FUNCTION = 'X'. EndAt. If new_ADDRNUMBER = 'X'. Clear new_ADDRNUMBER. Num = Num + 1. If NumList > 1. Case 'X'. when EXCEL_2. SetLine NameList 'User' Num '' 'M' 'SetNewPage'."### Excel when WORD. SetLine NameList 'User' Num '' 'V' 'NewPage'. "### Word Num = Num + 1. when RTF. "#EC V#700 SetLine NameList 'User' Num '' 'V' 'NewPage'. "#EC V#700 Num = Num + 1. "#EC V#700 EndCase. EndIf. SetLine NameList 'User' Num '' 'V' 'Header'. SetLine NameList 'User' Num '[CITY1]' '' it_Usr-CITY1. SetLine NameList 'User' Num '[NAME1]' '' it_Usr-NAME1. Case 'X'. when Excel or Excel_2 or Word. Perform DownloadPhoto using PhotoName changing FilePhoto. SetLine NameList 'User' Num '[Photo]' '' FilePhoto. SetLine NameList 'User' Num '' 'M' 'LoadPhoto'. EndCase. EndIf. If new_DEPARTMENT = 'X'. Clear new_DEPARTMENT. Num = Num + 1. SetLine NameList 'User' Num '' 'V' 'Department'. SetLine NameList 'User' Num '[DEPARTMENT]' '' it_Usr-DEPARTMENT. EndIf. If new_FUNCTION = 'X'. Clear new_FUNCTION. Num = Num + 1. SetLine NameList 'User' Num '' 'V' 'Function'. SetLine NameList 'User' Num '[FUNCTION]' '' it_Usr-FUNCTION. EndIf. Num = Num + 1. SetLine NameList 'User' Num '[BNAME]' '' it_Usr-BNAME. SetLine NameList 'User' Num '[NAME_LAST]' '' it_Usr-NAME_LAST. SetLine NameList 'User' Num '[NAME_FIRST]' '' it_Usr-NAME_FIRST. EndLoop. Num = 0. Loop at it_GraphData. Num = Num + 1. SetLine '' 'GraphData' Num '[Name]' '' it_GraphData-Name. SetLine '' 'GraphData' Num '[Count]' '' it_GraphData-Count. EndLoop. SetLine '' 'CurDate' '' '' '' sy-datum. SetLine '' 'CurTime' '' '' '' sy-timlo. If EXCEL = 'X'. SetLine '' 'A_CopyList' '' '' '' NumList. SetLine '' 'A_CopyList' '' '' 'M' 'CopySheets'. EndIf. SetLine '' 'Z_Protect' '' '' '' sy-timlo. SetLine '' 'Z_Protect' '' '' 'M' 'SetProtect'. SetLine '' 'NewPage' '' '' 'D' ''. Do p_Copies times. Call function 'ZWWW_OPENFORM' EXPORTING FORM_NAME = NameTemplate PRINTDIALOG = '' PROTECT = p_Protct DEBUG_MODE = p_Debug CLOSE_FORM = p_Close OPTIMIZE = p_Optim WITHOUT_OLE = p_Wh_OLE USE_JAR = p_UseJAR TABLES IT_VALUES = it_Val IT_FILES = it_PhotoFiles. EndDo. *&---------------------------------------------------------------------* *& Form WritePhoto *&---------------------------------------------------------------------* Form DownloadPhoto using NamePhoto changing NameFile type RLGRAP-FILENAME. Data: TempDir type RLGRAP-FILENAME, w_Key type WWWDATATAB, wwwValue type W3_QVALUE, FileSize type i, it_W3MIME type standard table of W3MIME, sy_subrc type sy-subrc. * Call function 'GUI_GET_DESKTOP_INFO' * EXPORTING * TYPE = 4 "TmpDir * CHANGING * RETURN = TempDir. NumUniq = NumUniq + 1. w_Key-RELID = 'MI'. w_Key-OBJID = NamePhoto . Concatenate "TempDir '\' 'X' w_Key-OBJID NumUniq '.jpg' into NameFile. * Call function 'DOWNLOAD_WEB_OBJECT' * EXPORTING * KEY = w_Key * DESTINATION = NameFile * IMPORTING * RC = sy_subrc. * Check sy_subrc = 0. Call function 'WWWPARAMS_READ' EXPORTING RELID = 'MI' OBJID = w_Key-OBJID NAME = 'filesize' IMPORTING VALUE = wwwValue EXCEPTIONS others = 1. Check sy-subrc = 0. FileSize = wwwValue. Call function 'WWWDATA_IMPORT' EXPORTING KEY = w_Key TABLES MIME = it_W3MIME EXCEPTIONS others = 99. Check sy-subrc = 0. Call function 'ZVVN_DATA_TO_XSTRING' EXPORTING DATA_LENGTH = FileSize IMPORTING DATA_XSTRING = it_PhotoFiles-FILE_DATA TABLES IT_DATA = it_W3MIME. it_PhotoFiles-FILE_NAME = NameFile. * Append NameFile to it_PhotoFiles. Append it_PhotoFiles. EndForm. "WritePhoto *&---------------------------------------------------------------------* *& Form GetPhotoNames *&---------------------------------------------------------------------* Form GetPhotoNames tables it_PhotoNames. Select OBJID into table it_PhotoNames from WWWPARAMS up to 100 rows where RELID = 'MI' and NAME = 'fileextension' and VALUE = '.JPG' and OBJID like '%PICTURE%'. EndForm. "GetPhotoNames *&---------------------------------------------------------------------* *& Form GetNextPhotoName *&---------------------------------------------------------------------* Form GetNextPhotoName tables it_PhotoNames changing NamePhoto type WWWPARAMS-OBJID. Data: Cnt type i. NamePhoto = 'SESS_IMAGE'. NumPhoto = NumPhoto + 1. Describe table it_PhotoNames lines Cnt. check Cnt > 0. If NumPhoto > Cnt. NumPhoto = 1. EndIf. Read table it_PhotoNames into NamePhoto index NumPhoto. EndForm. "GetNextPhotoName
[ 9, 5, 10097, 30934, 9, 198, 9, 5, 6358, 220, 1168, 17947, 54, 62, 51, 6465, 198, 9, 5, 10097, 30934, 9, 198, 2200, 15490, 220, 1168, 17947, 54, 62, 10725, 56, 62, 45849, 13, 198, 198, 4653, 1564, 12, 9612, 2221, 286, 2512, 698, 16, 351, 5739, 13, 198, 48944, 25, 198, 220, 7788, 34, 3698, 220, 220, 19772, 672, 21115, 1448, 1036, 15, 4277, 705, 55, 3256, 198, 220, 7788, 34, 3698, 62, 17, 19772, 672, 21115, 1448, 1036, 15, 11, 198, 220, 370, 12532, 220, 220, 220, 19772, 672, 21115, 1448, 1036, 15, 13, 198, 48944, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 569, 2, 9879, 198, 220, 371, 10234, 220, 220, 220, 220, 19772, 672, 21115, 1448, 1036, 15, 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, 25113, 2943, 569, 2, 9879, 198, 4653, 1564, 12, 9612, 886, 286, 2512, 698, 16, 13, 198, 198, 48944, 25, 198, 9, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 15931, 46424, 2235, 22492, 46424, 25, 198, 220, 279, 62, 2885, 7707, 32755, 19772, 672, 21115, 1448, 1036, 16, 4277, 705, 55, 3256, 366, 220, 22492, 46424, 2235, 198, 220, 279, 62, 7206, 30709, 19772, 672, 21115, 1448, 1036, 16, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 220, 22492, 46424, 2235, 198, 220, 279, 62, 42296, 4177, 45, 19772, 672, 21115, 1448, 1036, 16, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 220, 22492, 1303, 7804, 2, 198, 198, 48944, 25, 198, 220, 279, 62, 49, 22845, 2099, 1312, 4277, 8576, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 1303, 21017, 13, 44386, 12, 2235, 46424, 2235, 198, 198, 48944, 25, 198, 220, 279, 62, 53, 53, 45, 220, 220, 220, 355, 2198, 3524, 11, 198, 220, 279, 62, 19703, 310, 355, 2198, 3524, 953, 361, 4686, 569, 53, 45, 11, 198, 220, 279, 62, 26125, 220, 355, 2198, 3524, 953, 361, 4686, 569, 53, 45, 11, 198, 220, 279, 62, 27871, 320, 7, 22, 8, 220, 2099, 399, 4277, 1802, 953, 361, 4686, 569, 53, 45, 11, 198, 220, 279, 62, 27509, 220, 355, 2198, 3524, 953, 361, 4686, 569, 53, 45, 11, 198, 220, 279, 62, 1199, 62, 46, 2538, 355, 2198, 3524, 953, 361, 4686, 569, 53, 45, 11, 198, 220, 279, 62, 11041, 41, 1503, 355, 2198, 3524, 953, 361, 4686, 569, 53, 45, 11, 198, 220, 279, 62, 13379, 444, 7, 22, 8, 2099, 399, 4277, 352, 953, 361, 4686, 569, 53, 45, 13, 198, 198, 31431, 25, 198, 220, 16623, 286, 256, 62, 37065, 6601, 11, 198, 220, 220, 220, 6530, 7, 1821, 828, 198, 220, 220, 220, 2764, 2099, 1312, 11, 198, 220, 5268, 286, 256, 62, 37065, 6601, 13, 198, 198, 6601, 25, 198, 220, 6530, 30800, 2099, 13505, 22332, 1404, 1404, 6242, 12, 9864, 41, 2389, 11, 198, 220, 16623, 286, 340, 62, 5842, 81, 8833, 838, 11, 198, 220, 220, 220, 36751, 16, 220, 220, 220, 220, 220, 2099, 5984, 7397, 12, 20608, 16, 11, 198, 220, 220, 220, 27993, 16, 220, 220, 220, 220, 220, 2099, 5984, 7397, 12, 34, 9050, 16, 11, 198, 220, 220, 220, 5984, 7707, 41359, 13246, 2099, 5984, 7397, 12, 2885, 7707, 41359, 13246, 11, 198, 220, 220, 220, 5550, 30709, 10979, 2099, 5984, 8697, 12, 7206, 30709, 10979, 11, 198, 220, 220, 220, 29397, 4177, 2849, 220, 220, 2099, 5984, 8697, 12, 42296, 4177, 2849, 11, 198, 220, 220, 220, 347, 20608, 2099, 1294, 49, 2481, 12, 15766, 10067, 11, 198, 220, 220, 220, 36751, 62, 43, 11262, 220, 2099, 5984, 20031, 12, 20608, 62, 43, 11262, 11, 198, 220, 220, 220, 6530, 62, 39776, 2257, 2099, 5984, 20031, 12, 5376, 62, 39776, 2257, 11, 198, 220, 5268, 286, 340, 62, 5842, 81, 11, 628, 220, 31835, 2099, 1312, 11, 198, 220, 31835, 8053, 7, 18, 828, 198, 220, 6530, 8053, 2099, 1168, 17947, 54, 62, 23428, 35409, 12, 53, 1503, 62, 20608, 11, 198, 220, 340, 62, 7762, 220, 2099, 3210, 3084, 286, 1168, 17947, 54, 62, 23428, 35409, 351, 13639, 1627, 11, 198, 220, 649, 62, 2885, 7707, 41359, 13246, 11, 198, 220, 649, 62, 7206, 30709, 10979, 11, 198, 220, 649, 62, 42296, 4177, 2849, 11, 198, 220, 340, 62, 37065, 6601, 2099, 23243, 3084, 286, 256, 62, 37065, 6601, 198, 220, 220, 220, 351, 3748, 1994, 6530, 198, 220, 220, 220, 351, 13639, 1627, 11, 198, 220, 340, 62, 6191, 36690, 2099, 3210, 3084, 286, 13505, 25527, 1503, 40834, 12, 9864, 41, 2389, 11, 198, 220, 340, 62, 6191, 25876, 2099, 1168, 17947, 54, 62, 46700, 1546, 62, 51, 198, 220, 220, 220, 351, 13639, 1627, 11, 366, 20307, 3084, 286, 45715, 10761, 2969, 12, 46700, 1677, 10067, 11, 198, 220, 5555, 5376, 2099, 13505, 25527, 1503, 40834, 12, 9864, 41, 2389, 11, 198, 220, 9220, 6191, 2099, 45715, 10761, 2969, 12, 46700, 1677, 10067, 11, 198, 220, 31835, 6191, 2099, 1312, 11, 198, 220, 31835, 3118, 25011, 7, 20, 8, 2099, 399, 13, 198, 198, 15878, 12, 1837, 2022, 10220, 25, 198, 220, 1279, 69, 335, 22330, 198, 220, 1279, 3672, 28401, 198, 6601, 25, 198, 220, 277, 335, 5376, 7, 1120, 737, 198, 198, 2953, 29538, 12, 23901, 5072, 13, 198, 9, 220, 1002, 827, 12, 403, 480, 1279, 29, 705, 12861, 42, 32961, 8874, 4458, 198, 220, 26304, 379, 15216, 13, 198, 220, 220, 220, 1002, 15216, 12, 13247, 16, 796, 705, 53, 53, 45, 4458, 198, 220, 220, 220, 220, 220, 1002, 279, 62, 53, 53, 45, 318, 4238, 13, 198, 220, 220, 220, 220, 220, 220, 220, 15216 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
*"* use this source file for your ABAP unit test classes CLASS ltcl_patch DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. METHODS: get_patch_data_add FOR TESTING RAISING cx_static_check, get_patch_data_remove FOR TESTING RAISING cx_static_check, invalid_action FOR TESTING RAISING cx_static_check, invalid_patch_missing_file FOR TESTING RAISING cx_static_check, invalid_patch_missing_index FOR TESTING RAISING cx_static_check. ENDCLASS. CLASS zcl_abapgit_gui_page_diff DEFINITION LOCAL FRIENDS ltcl_patch. CLASS ltcl_patch IMPLEMENTATION. METHOD get_patch_data_add. DATA: lv_file_name TYPE string, lv_line_index TYPE string. zcl_abapgit_gui_page_diff=>get_patch_data( EXPORTING iv_patch = |add_patch_zcl_test_git_add_p.clas.abap_19| iv_action = |add| IMPORTING ev_filename = lv_file_name ev_line_index = lv_line_index ). cl_abap_unit_assert=>assert_equals( exp = |zcl_test_git_add_p.clas.abap| act = lv_file_name ). cl_abap_unit_assert=>assert_equals( exp = |19| act = lv_line_index ). ENDMETHOD. METHOD get_patch_data_remove. DATA: lv_file_name TYPE string, lv_line_index TYPE string. zcl_abapgit_gui_page_diff=>get_patch_data( EXPORTING iv_patch = |remove_patch_ztest_patch.prog.abap_39| iv_action = |remove| IMPORTING ev_filename = lv_file_name ev_line_index = lv_line_index ). cl_abap_unit_assert=>assert_equals( exp = |ztest_patch.prog.abap| act = lv_file_name ). cl_abap_unit_assert=>assert_equals( exp = |39| act = lv_line_index ). ENDMETHOD. METHOD invalid_action. DATA: lx_error TYPE REF TO zcx_abapgit_exception. TRY. zcl_abapgit_gui_page_diff=>get_patch_data( iv_patch = |remove_patch_ztest_patch.prog.abap_39| iv_action = |mix| ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_exception INTO lx_error. cl_abap_unit_assert=>assert_equals( exp = |Invalid action mix| act = lx_error->get_text( ) ). ENDTRY. ENDMETHOD. METHOD invalid_patch_missing_file. DATA: lv_file_name TYPE string, lv_line_index TYPE string, lx_error TYPE REF TO zcx_abapgit_exception. TRY. zcl_abapgit_gui_page_diff=>get_patch_data( EXPORTING iv_patch = |add_patch_39| iv_action = |add| IMPORTING ev_filename = lv_file_name ev_line_index = lv_line_index ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_exception INTO lx_error. cl_abap_unit_assert=>assert_equals( exp = |Invalid patch| act = lx_error->get_text( ) ). ENDTRY. ENDMETHOD. METHOD invalid_patch_missing_index. DATA: lv_file_name TYPE string, lv_line_index TYPE string, lx_error TYPE REF TO zcx_abapgit_exception. TRY. zcl_abapgit_gui_page_diff=>get_patch_data( EXPORTING iv_patch = |remove_patch_ztest_patch.prog.abap| iv_action = |remove| IMPORTING ev_filename = lv_file_name ev_line_index = lv_line_index ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_exception INTO lx_error. cl_abap_unit_assert=>assert_equals( exp = |Invalid patch| act = lx_error->get_text( ) ). ENDTRY. ENDMETHOD. ENDCLASS.
[ 9, 1, 9, 779, 428, 2723, 2393, 329, 534, 9564, 2969, 4326, 1332, 6097, 198, 198, 31631, 300, 83, 565, 62, 17147, 5550, 20032, 17941, 25261, 7473, 43001, 2751, 198, 220, 360, 4261, 6234, 6006, 9863, 198, 220, 45698, 42, 49277, 43638, 5805, 7597, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 651, 62, 17147, 62, 7890, 62, 2860, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 651, 62, 17147, 62, 7890, 62, 28956, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 12515, 62, 2673, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 12515, 62, 17147, 62, 45688, 62, 7753, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 12515, 62, 17147, 62, 45688, 62, 9630, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 48317, 62, 7700, 62, 26069, 5550, 20032, 17941, 37347, 1847, 48167, 1677, 5258, 300, 83, 565, 62, 17147, 13, 198, 198, 31631, 300, 83, 565, 62, 17147, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 651, 62, 17147, 62, 7890, 62, 2860, 13, 628, 220, 220, 220, 42865, 25, 300, 85, 62, 7753, 62, 3672, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 1370, 62, 9630, 41876, 4731, 13, 628, 220, 220, 220, 1976, 565, 62, 397, 499, 18300, 62, 48317, 62, 7700, 62, 26069, 14804, 1136, 62, 17147, 62, 7890, 7, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 17147, 220, 220, 220, 220, 220, 796, 930, 2860, 62, 17147, 62, 89, 565, 62, 9288, 62, 18300, 62, 2860, 62, 79, 13, 565, 292, 13, 397, 499, 62, 1129, 91, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 2673, 220, 220, 220, 220, 796, 930, 2860, 91, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 34345, 220, 220, 796, 300, 85, 62, 7753, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 1370, 62, 9630, 796, 300, 85, 62, 1370, 62, 9630, 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, 1033, 796, 930, 89, 565, 62, 9288, 62, 18300, 62, 2860, 62, 79, 13, 565, 292, 13, 397, 499, 91, 198, 220, 220, 220, 220, 220, 719, 796, 300, 85, 62, 7753, 62, 3672, 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, 1033, 796, 930, 1129, 91, 198, 220, 220, 220, 220, 220, 719, 796, 300, 85, 62, 1370, 62, 9630, 6739, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 651, 62, 17147, 62, 7890, 62, 28956, 13, 628, 220, 220, 220, 42865, 25, 300, 85, 62, 7753, 62, 3672, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 1370, 62, 9630, 41876, 4731, 13, 628, 220, 220, 220, 1976, 565, 62, 397, 499, 18300, 62, 48317, 62, 7700, 62, 26069, 14804, 1136, 62, 17147, 62, 7890, 7, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 17147, 220, 220, 220, 220, 220, 796, 930, 28956, 62, 17147, 62, 89, 9288, 62, 17147, 13, 1676, 70, 13, 397, 499, 62, 2670, 91, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 2673, 220, 220, 220, 220, 796, 930, 28956, 91, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 34345, 220, 220, 796, 300, 85, 62, 7753, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 1370, 62, 9630, 796, 300, 85, 62, 1370, 62, 9630, 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, 1033, 796, 930, 89, 9288, 62, 17147, 13, 1676, 70, 13, 397, 499, 91, 198, 220, 220, 220, 220, 220, 719, 796, 300, 85, 62, 7753, 62, 3672, 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, 1033, 796, 930, 2670, 91, 198, 220, 220, 220, 220, 220, 719, 796, 300, 85, 62, 1370, 62, 9630, 6739, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 12515, 62, 2673, 13, 628, 220, 220, 220, 42865, 25, 300, 87, 62, 18224, 41876, 4526, 37, 5390, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 13, 628, 220, 220, 220, 7579, 56, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 565, 62, 397, 499, 18300, 62, 48317, 62, 7700, 62, 26069, 14804, 1136, 62, 17147, 62, 7890, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 17147, 220, 796, 930, 28956, 62, 17147, 62, 89, 9288, 62, 17147, 13, 1676, 70, 13, 397, 499, 62, 2670, 91, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 2673, 796, 930, 19816, 91, 6739, 628, 220, 220, 220, 220, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 32165, 7, 6739, 628, 220, 220, 220, 220, 220, 327, 11417, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 39319, 300, 87, 62, 18224, 13, 198, 220, 220, 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, 930, 44651, 2223, 5022, 91, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 719, 796, 300 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
class ZCL_EXCEL_WORKSHEET definition public create public . public section. *"* public components of class ZCL_EXCEL_WORKSHEET *"* do not include other source files here!!! type-pools ABAP . interfaces ZIF_EXCEL_SHEET_PRINTSETTINGS . interfaces ZIF_EXCEL_SHEET_PROPERTIES . interfaces ZIF_EXCEL_SHEET_PROTECTION . interfaces ZIF_EXCEL_SHEET_VBA_PROJECT . types: begin of MTY_S_OUTLINE_ROW, row_from type i, row_to type i, collapsed type abap_bool, end of mty_s_outline_row . types: MTY_TS_OUTLINES_ROW type sorted table of MTY_S_OUTLINE_ROW with unique key row_from row_to . constants C_BREAK_COLUMN type ZEXCEL_BREAK value 2. "#EC NOTEXT constants C_BREAK_NONE type ZEXCEL_BREAK value 0. "#EC NOTEXT constants C_BREAK_ROW type ZEXCEL_BREAK value 1. "#EC NOTEXT data EXCEL type ref to ZCL_EXCEL read-only . data PRINT_GRIDLINES type ZEXCEL_PRINT_GRIDLINES read-only value ABAP_FALSE. "#EC NOTEXT . . . . . . . . . . . . . . . . " . data SHEET_CONTENT type ZEXCEL_T_CELL_DATA . data SHEET_SETUP type ref to ZCL_EXCEL_SHEET_SETUP . data SHOW_GRIDLINES type ZEXCEL_SHOW_GRIDLINES read-only value ABAP_TRUE. "#EC NOTEXT . . . . . . . . . . . . . . . . " . data SHOW_ROWCOLHEADERS type ZEXCEL_SHOW_GRIDLINES read-only value ABAP_TRUE. "#EC NOTEXT . . . . . . . . . . . . . . . . " . data STYLES type ZEXCEL_T_SHEET_STYLE . data TABCOLOR type ZEXCEL_S_TABCOLOR read-only . methods ADD_DRAWING importing !IP_DRAWING type ref to ZCL_EXCEL_DRAWING . methods ADD_NEW_CONDITIONAL_STYLE returning value(EO_CONDITIONAL_STYLE) type ref to ZCL_EXCEL_STYLE_CONDITIONAL . methods ADD_NEW_DATA_VALIDATION returning value(EO_DATA_VALIDATION) type ref to ZCL_EXCEL_DATA_VALIDATION . methods ADD_NEW_RANGE returning value(EO_RANGE) type ref to ZCL_EXCEL_RANGE . methods BIND_ALV importing !IO_ALV type ref to OBJECT !IT_TABLE type STANDARD TABLE !I_TOP type I default 1 !I_LEFT type I default 1 !TABLE_STYLE type ZEXCEL_TABLE_STYLE optional !I_TABLE type ABAP_BOOL default ABAP_TRUE raising ZCX_EXCEL . type-pools SLIS . type-pools SOI . methods BIND_ALV_OLE2 importing !I_DOCUMENT_URL type CHAR255 default SPACE !I_XLS type C default SPACE !I_SAVE_PATH type STRING !IO_ALV type ref to CL_GUI_ALV_GRID !IT_LISTHEADER type SLIS_T_LISTHEADER optional !I_TOP type I default 1 !I_LEFT type I default 1 !I_COLUMNS_HEADER type C default 'X' !I_COLUMNS_AUTOFIT type C default 'X' !I_FORMAT_COL_HEADER type SOI_FORMAT_ITEM optional !I_FORMAT_SUBTOTAL type SOI_FORMAT_ITEM optional !I_FORMAT_TOTAL type SOI_FORMAT_ITEM optional exceptions MISS_GUIDE EX_TRANSFER_KKBLO_ERROR FATAL_ERROR INV_DATA_RANGE DIM_MISMATCH_VKEY DIM_MISMATCH_SEMA ERROR_IN_SEMA . methods BIND_TABLE importing !IP_TABLE type STANDARD TABLE !IT_FIELD_CATALOG type ZEXCEL_T_FIELDCATALOG optional !IS_TABLE_SETTINGS type ZEXCEL_S_TABLE_SETTINGS optional value(IV_DEFAULT_DESCR) type C optional exporting !ES_TABLE_SETTINGS type ZEXCEL_S_TABLE_SETTINGS raising ZCX_EXCEL . methods CALCULATE_COLUMN_WIDTHS raising ZCX_EXCEL . methods CHANGE_CELL_STYLE importing !IP_COLUMN type SIMPLE !IP_ROW type ZEXCEL_CELL_ROW !IP_COMPLETE type ZEXCEL_S_CSTYLE_COMPLETE optional !IP_XCOMPLETE type ZEXCEL_S_CSTYLEX_COMPLETE optional !IP_FONT type ZEXCEL_S_CSTYLE_FONT optional !IP_XFONT type ZEXCEL_S_CSTYLEX_FONT optional !IP_FILL type ZEXCEL_S_CSTYLE_FILL optional !IP_XFILL type ZEXCEL_S_CSTYLEX_FILL optional !IP_BORDERS type ZEXCEL_S_CSTYLE_BORDERS optional !IP_XBORDERS type ZEXCEL_S_CSTYLEX_BORDERS optional !IP_ALIGNMENT type ZEXCEL_S_CSTYLE_ALIGNMENT optional !IP_XALIGNMENT type ZEXCEL_S_CSTYLEX_ALIGNMENT optional !IP_NUMBER_FORMAT_FORMAT_CODE type ZEXCEL_NUMBER_FORMAT optional !IP_PROTECTION type ZEXCEL_S_CSTYLE_PROTECTION optional !IP_XPROTECTION type ZEXCEL_S_CSTYLEX_PROTECTION optional !IP_FONT_BOLD type FLAG optional !IP_FONT_COLOR type ZEXCEL_S_STYLE_COLOR optional !IP_FONT_COLOR_RGB type ZEXCEL_STYLE_COLOR_ARGB optional !IP_FONT_COLOR_INDEXED type ZEXCEL_STYLE_COLOR_INDEXED optional !IP_FONT_COLOR_THEME type ZEXCEL_STYLE_COLOR_THEME optional !IP_FONT_COLOR_TINT type ZEXCEL_STYLE_COLOR_TINT optional !IP_FONT_FAMILY type ZEXCEL_STYLE_FONT_FAMILY optional !IP_FONT_ITALIC type FLAG optional !IP_FONT_NAME type ZEXCEL_STYLE_FONT_NAME optional !IP_FONT_SCHEME type ZEXCEL_STYLE_FONT_SCHEME optional !IP_FONT_SIZE type ZEXCEL_STYLE_FONT_SIZE optional !IP_FONT_STRIKETHROUGH type FLAG optional !IP_FONT_UNDERLINE type FLAG optional !IP_FONT_UNDERLINE_MODE type ZEXCEL_STYLE_FONT_UNDERLINE optional !IP_FILL_FILLTYPE type ZEXCEL_FILL_TYPE optional !IP_FILL_ROTATION type ZEXCEL_ROTATION optional !IP_FILL_FGCOLOR type ZEXCEL_S_STYLE_COLOR optional !IP_FILL_FGCOLOR_RGB type ZEXCEL_STYLE_COLOR_ARGB optional !IP_FILL_FGCOLOR_INDEXED type ZEXCEL_STYLE_COLOR_INDEXED optional !IP_FILL_FGCOLOR_THEME type ZEXCEL_STYLE_COLOR_THEME optional !IP_FILL_FGCOLOR_TINT type ZEXCEL_STYLE_COLOR_TINT optional !IP_FILL_BGCOLOR type ZEXCEL_S_STYLE_COLOR optional !IP_FILL_BGCOLOR_RGB type ZEXCEL_STYLE_COLOR_ARGB optional !IP_FILL_BGCOLOR_INDEXED type ZEXCEL_STYLE_COLOR_INDEXED optional !IP_FILL_BGCOLOR_THEME type ZEXCEL_STYLE_COLOR_THEME optional !IP_FILL_BGCOLOR_TINT type ZEXCEL_STYLE_COLOR_TINT optional !IP_BORDERS_ALLBORDERS type ZEXCEL_S_CSTYLE_BORDER optional !IP_FILL_GRADTYPE_TYPE type ZEXCEL_S_GRADIENT_TYPE-TYPE optional !IP_FILL_GRADTYPE_DEGREE type ZEXCEL_S_GRADIENT_TYPE-DEGREE optional !IP_XBORDERS_ALLBORDERS type ZEXCEL_S_CSTYLEX_BORDER optional !IP_BORDERS_DIAGONAL type ZEXCEL_S_CSTYLE_BORDER optional !IP_FILL_GRADTYPE_BOTTOM type ZEXCEL_S_GRADIENT_TYPE-BOTTOM optional !IP_FILL_GRADTYPE_TOP type ZEXCEL_S_GRADIENT_TYPE-TOP optional !IP_XBORDERS_DIAGONAL type ZEXCEL_S_CSTYLEX_BORDER optional !IP_BORDERS_DIAGONAL_MODE type ZEXCEL_DIAGONAL optional !IP_FILL_GRADTYPE_RIGHT type ZEXCEL_S_GRADIENT_TYPE-RIGHT optional !IP_BORDERS_DOWN type ZEXCEL_S_CSTYLE_BORDER optional !IP_FILL_GRADTYPE_LEFT type ZEXCEL_S_GRADIENT_TYPE-LEFT optional !IP_FILL_GRADTYPE_POSITION1 type ZEXCEL_S_GRADIENT_TYPE-POSITION1 optional !IP_XBORDERS_DOWN type ZEXCEL_S_CSTYLEX_BORDER optional !IP_BORDERS_LEFT type ZEXCEL_S_CSTYLE_BORDER optional !IP_FILL_GRADTYPE_POSITION2 type ZEXCEL_S_GRADIENT_TYPE-POSITION2 optional !IP_FILL_GRADTYPE_POSITION3 type ZEXCEL_S_GRADIENT_TYPE-POSITION3 optional !IP_XBORDERS_LEFT type ZEXCEL_S_CSTYLEX_BORDER optional !IP_BORDERS_RIGHT type ZEXCEL_S_CSTYLE_BORDER optional !IP_XBORDERS_RIGHT type ZEXCEL_S_CSTYLEX_BORDER optional !IP_BORDERS_TOP type ZEXCEL_S_CSTYLE_BORDER optional !IP_XBORDERS_TOP type ZEXCEL_S_CSTYLEX_BORDER optional !IP_ALIGNMENT_HORIZONTAL type ZEXCEL_ALIGNMENT optional !IP_ALIGNMENT_VERTICAL type ZEXCEL_ALIGNMENT optional !IP_ALIGNMENT_TEXTROTATION type ZEXCEL_TEXT_ROTATION optional !IP_ALIGNMENT_WRAPTEXT type FLAG optional !IP_ALIGNMENT_SHRINKTOFIT type FLAG optional !IP_ALIGNMENT_INDENT type ZEXCEL_INDENT optional !IP_PROTECTION_HIDDEN type ZEXCEL_CELL_PROTECTION optional !IP_PROTECTION_LOCKED type ZEXCEL_CELL_PROTECTION optional !IP_BORDERS_ALLBORDERS_STYLE type ZEXCEL_BORDER optional !IP_BORDERS_ALLBORDERS_COLOR type ZEXCEL_S_STYLE_COLOR optional !IP_BORDERS_ALLBO_COLOR_RGB type ZEXCEL_STYLE_COLOR_ARGB optional !IP_BORDERS_ALLBO_COLOR_INDEXED type ZEXCEL_STYLE_COLOR_INDEXED optional !IP_BORDERS_ALLBO_COLOR_THEME type ZEXCEL_STYLE_COLOR_THEME optional !IP_BORDERS_ALLBO_COLOR_TINT type ZEXCEL_STYLE_COLOR_TINT optional !IP_BORDERS_DIAGONAL_STYLE type ZEXCEL_BORDER optional !IP_BORDERS_DIAGONAL_COLOR type ZEXCEL_S_STYLE_COLOR optional !IP_BORDERS_DIAGONAL_COLOR_RGB type ZEXCEL_STYLE_COLOR_ARGB optional !IP_BORDERS_DIAGONAL_COLOR_INDE type ZEXCEL_STYLE_COLOR_INDEXED optional !IP_BORDERS_DIAGONAL_COLOR_THEM type ZEXCEL_STYLE_COLOR_THEME optional !IP_BORDERS_DIAGONAL_COLOR_TINT type ZEXCEL_STYLE_COLOR_TINT optional !IP_BORDERS_DOWN_STYLE type ZEXCEL_BORDER optional !IP_BORDERS_DOWN_COLOR type ZEXCEL_S_STYLE_COLOR optional !IP_BORDERS_DOWN_COLOR_RGB type ZEXCEL_STYLE_COLOR_ARGB optional !IP_BORDERS_DOWN_COLOR_INDEXED type ZEXCEL_STYLE_COLOR_INDEXED optional !IP_BORDERS_DOWN_COLOR_THEME type ZEXCEL_STYLE_COLOR_THEME optional !IP_BORDERS_DOWN_COLOR_TINT type ZEXCEL_STYLE_COLOR_TINT optional !IP_BORDERS_LEFT_STYLE type ZEXCEL_BORDER optional !IP_BORDERS_LEFT_COLOR type ZEXCEL_S_STYLE_COLOR optional !IP_BORDERS_LEFT_COLOR_RGB type ZEXCEL_STYLE_COLOR_ARGB optional !IP_BORDERS_LEFT_COLOR_INDEXED type ZEXCEL_STYLE_COLOR_INDEXED optional !IP_BORDERS_LEFT_COLOR_THEME type ZEXCEL_STYLE_COLOR_THEME optional !IP_BORDERS_LEFT_COLOR_TINT type ZEXCEL_STYLE_COLOR_TINT optional !IP_BORDERS_RIGHT_STYLE type ZEXCEL_BORDER optional !IP_BORDERS_RIGHT_COLOR type ZEXCEL_S_STYLE_COLOR optional !IP_BORDERS_RIGHT_COLOR_RGB type ZEXCEL_STYLE_COLOR_ARGB optional !IP_BORDERS_RIGHT_COLOR_INDEXED type ZEXCEL_STYLE_COLOR_INDEXED optional !IP_BORDERS_RIGHT_COLOR_THEME type ZEXCEL_STYLE_COLOR_THEME optional !IP_BORDERS_RIGHT_COLOR_TINT type ZEXCEL_STYLE_COLOR_TINT optional !IP_BORDERS_TOP_STYLE type ZEXCEL_BORDER optional !IP_BORDERS_TOP_COLOR type ZEXCEL_S_STYLE_COLOR optional !IP_BORDERS_TOP_COLOR_RGB type ZEXCEL_STYLE_COLOR_ARGB optional !IP_BORDERS_TOP_COLOR_INDEXED type ZEXCEL_STYLE_COLOR_INDEXED optional !IP_BORDERS_TOP_COLOR_THEME type ZEXCEL_STYLE_COLOR_THEME optional !IP_BORDERS_TOP_COLOR_TINT type ZEXCEL_STYLE_COLOR_TINT optional returning value(EP_GUID) type ZEXCEL_CELL_STYLE raising ZCX_EXCEL . methods CONSTRUCTOR importing !IP_EXCEL type ref to ZCL_EXCEL !IP_TITLE type ZEXCEL_SHEET_TITLE optional raising ZCX_EXCEL . methods DELETE_MERGE importing !IP_CELL_COLUMN type SIMPLE optional !IP_CELL_ROW type ZEXCEL_CELL_ROW optional . methods DELETE_ROW_OUTLINE importing !IV_ROW_FROM type I !IV_ROW_TO type I raising ZCX_EXCEL . methods FREEZE_PANES importing !IP_NUM_COLUMNS type I optional !IP_NUM_ROWS type I optional raising ZCX_EXCEL . methods GET_ACTIVE_CELL returning value(EP_ACTIVE_CELL) type STRING raising ZCX_EXCEL . methods GET_CELL importing !IP_COLUMN type SIMPLE !IP_ROW type ZEXCEL_CELL_ROW exporting !EP_VALUE type ZEXCEL_CELL_VALUE !EP_RC type SYSUBRC !EP_STYLE type ref to ZCL_EXCEL_STYLE !EP_GUID type ZEXCEL_CELL_STYLE !EP_FORMULA type ZEXCEL_CELL_FORMULA raising ZCX_EXCEL . methods GET_COLUMN_DIMENSION importing !IP_COLUMN type SIMPLE returning value(R_COLUMN_DIMENSION) type ref to ZCL_EXCEL_WORKSHEET_COLUMNDIME raising ZCX_EXCEL . methods GET_COLUMN_DIMENSIONS returning value(R_COLUMN_DIMENSION) type ZEXCEL_T_WORKSHEET_COLUMNDIME . methods GET_COND_STYLES_ITERATOR returning value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR . methods GET_DATA_VALIDATIONS_ITERATOR returning value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR . methods GET_DATA_VALIDATIONS_SIZE returning value(EP_SIZE) type I . methods GET_DEFAULT_COLUMN_DIMENSION returning value(R_COLUMN_DIMENSION) type ref to ZCL_EXCEL_WORKSHEET_COLUMNDIME . methods GET_DEFAULT_EXCEL_DATE_FORMAT returning value(EP_DEFAULT_EXCEL_DATE_FORMAT) type ZEXCEL_NUMBER_FORMAT . methods GET_DEFAULT_EXCEL_TIME_FORMAT returning value(EP_DEFAULT_EXCEL_TIME_FORMAT) type ZEXCEL_NUMBER_FORMAT . methods GET_DEFAULT_ROW_DIMENSION returning value(R_ROW_DIMENSION) type ref to ZCL_EXCEL_WORKSHEET_ROWDIMENSI . methods GET_DIMENSION_RANGE returning value(EP_DIMENSION_RANGE) type STRING raising ZCX_EXCEL . methods GET_DRAWINGS importing !IP_TYPE type ZEXCEL_DRAWING_TYPE optional returning value(R_DRAWINGS) type ref to ZCL_EXCEL_DRAWINGS . methods GET_DRAWINGS_ITERATOR importing !IP_TYPE type ZEXCEL_DRAWING_TYPE returning value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR . methods GET_FREEZE_CELL exporting !EP_ROW type ZEXCEL_CELL_ROW !EP_COLUMN type ZEXCEL_CELL_COLUMN . methods GET_GUID returning value(EP_GUID) type UUID . methods GET_HIGHEST_COLUMN returning value(R_HIGHEST_COLUMN) type ZEXCEL_CELL_COLUMN raising ZCX_EXCEL . methods GET_HIGHEST_ROW returning value(R_HIGHEST_ROW) type INT4 raising ZCX_EXCEL . methods GET_HYPERLINKS_ITERATOR returning value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR . methods GET_HYPERLINKS_SIZE returning value(EP_SIZE) type I . methods GET_MERGE returning value(MERGE_RANGE) type STRING_TABLE raising ZCX_EXCEL . methods GET_PAGEBREAKS returning value(RO_PAGEBREAKS) type ref to ZCL_EXCEL_WORKSHEET_PAGEBREAKS raising ZCX_EXCEL . methods GET_RANGES_ITERATOR returning value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR . methods GET_ROW_DIMENSION importing !IP_ROW type INT4 returning value(R_ROW_DIMENSION) type ref to ZCL_EXCEL_WORKSHEET_ROWDIMENSI . methods GET_ROW_DIMENSIONS returning value(R_ROW_DIMENSION) type ZEXCEL_T_WORKSHEET_ROWDIMENSIO . methods GET_ROW_OUTLINES returning value(RT_ROW_OUTLINES) type MTY_TS_OUTLINES_ROW . methods GET_TABCOLOR returning value(EV_TABCOLOR) type ZEXCEL_S_TABCOLOR . methods GET_TABLES_ITERATOR returning value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR . methods GET_TABLES_SIZE returning value(EP_SIZE) type I . methods GET_TITLE importing !IP_ESCAPED type FLAG default '' returning value(EP_TITLE) type ZEXCEL_SHEET_TITLE . methods IS_CELL_MERGED importing !IP_COLUMN type SIMPLE !IP_ROW type ZEXCEL_CELL_ROW returning value(RP_IS_MERGED) type ABAP_BOOL raising ZCX_EXCEL . methods SET_CELL importing !IP_COLUMN type SIMPLE !IP_ROW type ZEXCEL_CELL_ROW !IP_VALUE type SIMPLE optional !IP_FORMULA type ZEXCEL_CELL_FORMULA optional !IP_STYLE type ZEXCEL_CELL_STYLE optional !IP_HYPERLINK type ref to ZCL_EXCEL_HYPERLINK optional !IP_DATA_TYPE type ZEXCEL_CELL_DATA_TYPE optional !IP_ABAP_TYPE type ABAP_TYPEKIND optional raising ZCX_EXCEL . methods SET_CELL_FORMULA importing !IP_COLUMN type SIMPLE !IP_ROW type ZEXCEL_CELL_ROW !IP_FORMULA type ZEXCEL_CELL_FORMULA raising ZCX_EXCEL . methods SET_CELL_STYLE importing !IP_COLUMN type SIMPLE !IP_ROW type ZEXCEL_CELL_ROW !IP_STYLE type ZEXCEL_CELL_STYLE raising ZCX_EXCEL . methods SET_COLUMN_WIDTH importing !IP_COLUMN type SIMPLE !IP_WIDTH_FIX type SIMPLE default 0 !IP_WIDTH_AUTOSIZE type FLAG default 'X' raising ZCX_EXCEL . methods SET_DEFAULT_EXCEL_DATE_FORMAT importing !IP_DEFAULT_EXCEL_DATE_FORMAT type ZEXCEL_NUMBER_FORMAT raising ZCX_EXCEL . methods SET_MERGE importing !IP_COLUMN_START type SIMPLE default ZCL_EXCEL_COMMON=>C_EXCEL_SHEET_MIN_COL !IP_COLUMN_END type SIMPLE default ZCL_EXCEL_COMMON=>C_EXCEL_SHEET_MAX_COL !IP_ROW type ZEXCEL_CELL_ROW default ZCL_EXCEL_COMMON=>C_EXCEL_SHEET_MIN_ROW !IP_ROW_TO type ZEXCEL_CELL_ROW default ZCL_EXCEL_COMMON=>C_EXCEL_SHEET_MAX_ROW raising ZCX_EXCEL . methods SET_PRINT_GRIDLINES importing !I_PRINT_GRIDLINES type ZEXCEL_PRINT_GRIDLINES . methods SET_ROW_HEIGHT importing !IP_ROW type SIMPLE !IP_HEIGHT_FIX type SIMPLE raising ZCX_EXCEL . methods SET_ROW_OUTLINE importing !IV_ROW_FROM type I !IV_ROW_TO type I !IV_COLLAPSED type ABAP_BOOL raising ZCX_EXCEL . methods SET_SHOW_GRIDLINES importing !I_SHOW_GRIDLINES type ZEXCEL_SHOW_GRIDLINES . methods SET_SHOW_ROWCOLHEADERS importing !I_SHOW_ROWCOLHEADERS type ZEXCEL_SHOW_ROWCOLHEADER . methods SET_TABCOLOR importing !IV_TABCOLOR type ZEXCEL_S_TABCOLOR . methods SET_TABLE importing !IP_TABLE type STANDARD TABLE !IP_HDR_STYLE type ZEXCEL_CELL_STYLE optional !IP_BODY_STYLE type ZEXCEL_CELL_STYLE optional !IP_TABLE_TITLE type STRING !IP_TOP_LEFT_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA default 'B' !IP_TOP_LEFT_ROW type ZEXCEL_CELL_ROW default 3 !IP_TRANSPOSE type XFELD optional !IP_NO_HEADER type XFELD optional raising ZCX_EXCEL . methods SET_TITLE importing !IP_TITLE type ZEXCEL_SHEET_TITLE raising ZCX_EXCEL . *"* protected components of class ZCL_EXCEL_WORKSHEET *"* do not include other source files here!!! protected section. private section. types: BEGIN OF mty_s_font_metric, char TYPE c LENGTH 1, char_width TYPE tdcwidths, END OF mty_s_font_metric . types: mty_th_font_metrics TYPE HASHED TABLE OF mty_s_font_metric WITH UNIQUE KEY char . types: BEGIN OF mty_s_font_cache, font_name TYPE zexcel_style_font_name, font_height TYPE tdfontsize, flag_bold TYPE abap_bool, flag_italic TYPE abap_bool, th_font_metrics TYPE mty_th_font_metrics, END OF mty_s_font_cache . types: mty_th_font_cache TYPE HASHED TABLE OF mty_s_font_cache WITH UNIQUE KEY font_name font_height flag_bold flag_italic . types: mty_ts_row_dimension TYPE SORTED TABLE OF zexcel_s_worksheet_rowdimensio WITH UNIQUE KEY row . types: BEGIN OF mty_merge, row_from TYPE i, row_to TYPE i, col_from TYPE i, col_to TYPE i, END OF mty_merge . types: mty_ts_merge TYPE SORTED TABLE OF mty_merge WITH UNIQUE KEY table_line . class-data MTH_FONT_CACHE type MTY_TH_FONT_CACHE . *"* private components of class ZCL_EXCEL_WORKSHEET *"* do not include other source files here!!! data ACTIVE_CELL type ZEXCEL_S_CELL_DATA . data CHARTS type ref to ZCL_EXCEL_DRAWINGS . data COLUMN_DIMENSIONS type ZEXCEL_T_WORKSHEET_COLUMNDIME . data CONDITIONAL_STYLES type ref to ZCL_EXCEL_STYLES_CONDITIONAL . data DATA_VALIDATIONS type ref to ZCL_EXCEL_DATA_VALIDATIONS . data DEFAULT_COLUMN_DIMENSION type ref to ZCL_EXCEL_WORKSHEET_COLUMNDIME . data DEFAULT_EXCEL_DATE_FORMAT type ZEXCEL_NUMBER_FORMAT . data DEFAULT_EXCEL_TIME_FORMAT type ZEXCEL_NUMBER_FORMAT . data DEFAULT_ROW_DIMENSION type ref to ZCL_EXCEL_WORKSHEET_ROWDIMENSI . data DRAWINGS type ref to ZCL_EXCEL_DRAWINGS . data FREEZE_PANE_CELL_COLUMN type ZEXCEL_CELL_COLUMN . data FREEZE_PANE_CELL_ROW type ZEXCEL_CELL_ROW . data GUID type UUID . data HYPERLINKS type ref to CL_OBJECT_COLLECTION . data LOWER_CELL type ZEXCEL_S_CELL_DATA . data MT_MERGED_CELLS type MTY_TS_MERGE . data MT_ROW_OUTLINES type MTY_TS_OUTLINES_ROW . data MO_PAGEBREAKS type ref to ZCL_EXCEL_WORKSHEET_PAGEBREAKS . data PRINT_TITLE_COL_FROM type ZEXCEL_CELL_COLUMN_ALPHA . data PRINT_TITLE_COL_TO type ZEXCEL_CELL_COLUMN_ALPHA . data PRINT_TITLE_ROW_FROM type ZEXCEL_CELL_ROW . data PRINT_TITLE_ROW_TO type ZEXCEL_CELL_ROW . data RANGES type ref to ZCL_EXCEL_RANGES . data ROW_DIMENSIONS type MTY_TS_ROW_DIMENSION . data TABLES type ref to CL_OBJECT_COLLECTION . data TITLE type ZEXCEL_SHEET_TITLE value 'Worksheet'. "#EC NOTEXT . . . . . . . . . . . . " . data UPPER_CELL type ZEXCEL_S_CELL_DATA . methods CALCULATE_CELL_WIDTH importing !IP_COLUMN type SIMPLE !IP_ROW type ZEXCEL_CELL_ROW returning value(EP_WIDTH) type FLOAT raising ZCX_EXCEL . methods GENERATE_TITLE returning value(EP_TITLE) type ZEXCEL_SHEET_TITLE . methods GET_VALUE_TYPE importing !IP_VALUE type SIMPLE exporting !EP_VALUE type SIMPLE !EP_VALUE_TYPE type ABAP_TYPEKIND . methods PRINT_TITLE_SET_RANGE . methods UPDATE_DIMENSION_RANGE raising ZCX_EXCEL . ENDCLASS. CLASS ZCL_EXCEL_WORKSHEET IMPLEMENTATION. method ADD_DRAWING. CASE ip_drawing->get_type( ). WHEN zcl_excel_drawing=>type_image. drawings->include( ip_drawing ). WHEN zcl_excel_drawing=>type_chart. charts->include( ip_drawing ). ENDCASE. endmethod. method ADD_NEW_CONDITIONAL_STYLE. CREATE OBJECT eo_conditional_style. conditional_styles->add( eo_conditional_style ). endmethod. method ADD_NEW_DATA_VALIDATION. CREATE OBJECT eo_data_validation. data_validations->add( eo_data_validation ). endmethod. method ADD_NEW_RANGE. * Create default blank range CREATE OBJECT eo_range. ranges->add( eo_range ). endmethod. method BIND_ALV. data: lo_converter type ref to zcl_excel_converter. create object lo_converter. try. lo_converter->convert( exporting io_alv = io_alv it_table = it_table i_row_int = i_top i_column_int = i_left i_table = i_table i_style_table = table_style io_worksheet = me changing co_excel = excel ). catch zcx_excel . endtry. endmethod. method BIND_ALV_OLE2. *--------------------------------------------------------------------* * Method description: * Method use to export a CL_GUI_ALV_GRID object to xlsx/xls file * with list header and characteristics of ALV field catalog such as: * + Total, group's subtotal * + Quantity fields, amount fields (dependent fields) * + No_out, no_zero, ... * Technique use in method: * SAP Desktop Office Integration (DOI) *--------------------------------------------------------------------* * Data for session 0: DOI constructor * ------------------------------------------ data: lo_control type ref to I_OI_CONTAINER_CONTROL. data: lo_proxy type ref to I_OI_DOCUMENT_PROXY. data: lo_spreadsheet type ref to I_OI_SPREADSHEET. data: lo_error type ref to I_OI_ERROR. data: lc_retcode type SOI_RET_STRING. data: li_has type i. "Proxy has spreadsheet interface? data: l_is_closed type i. * Data for session 1: Get LVC data from ALV object * ------------------------------------------ data: l_has_activex, l_doctype_excel_sheet(11) type c. * LVC data: lt_fieldcat_lvc type LVC_T_FCAT. data: wa_fieldcat_lvc type lvc_s_fcat. data: lt_sort_lvc type LVC_T_SORT. data: lt_filter_idx_lvc type LVC_T_FIDX. data: lt_GROUPLEVELS_LVC type LVC_T_GRPL. * KKBLO DATA: LT_FIELDCAT_KKBLO Type KKBLO_T_FIELDCAT. DATA: LT_SORT_KKBLO Type KKBLO_T_SORTINFO. DATA: LT_GROUPLEVELS_KKBLO Type KKBLO_T_GROUPLEVELS. DATA: LT_FILTER_IDX_KKBLO Type KKBLO_T_SFINFO. data: wa_listheader like line of it_listheader. * Subtotal data: lt_collect00 type ref to data. data: lt_collect01 type ref to data. data: lt_collect02 type ref to data. data: lt_collect03 type ref to data. data: lt_collect04 type ref to data. data: lt_collect05 type ref to data. data: lt_collect06 type ref to data. data: lt_collect07 type ref to data. data: lt_collect08 type ref to data. data: lt_collect09 type ref to data. * data table name data: l_tabname type kkblo_tabname. * local object data: lo_grid type ref to lcl_gui_alv_grid. * data table get from ALV data: lt_alv type ref to data. * total / subtotal data field-symbols: <f_collect00> type standard table. field-symbols: <f_collect01> type standard table. field-symbols: <f_collect02> type standard table. field-symbols: <f_collect03> type standard table. field-symbols: <f_collect04> type standard table. field-symbols: <f_collect05> type standard table. field-symbols: <f_collect06> type standard table. field-symbols: <f_collect07> type standard table. field-symbols: <f_collect08> type standard table. field-symbols: <f_collect09> type standard table. * table before append subtotal lines field-symbols: <f_alv_tab> type standard table. * data for session 2: sort, filter and calculate total/subtotal * ------------------------------------------ * table to save index of subotal / total line in excel tanle * this ideal to control index of subtotal / total line later * for ex, when get subtotal / total line to format types: begin of st_subtot_indexs, index type i, end of st_subtot_indexs. data: lt_subtot_indexs type table of st_subtot_indexs. data: wa_subtot_indexs like line of lt_subtot_indexs. * data table after append subtotal data: lt_excel type ref to data. data: l_tabix type i. data: l_save_index type i. * dyn subtotal table name data: l_collect type string. * subtotal range, to format subtotal (and total) data: subranges type soi_range_list. data: subrangeitem type soi_range_item. data: l_sub_index type i. * table after append subtotal lines field-symbols: <f_excel_tab> type standard table. field-symbols: <f_excel_line> type any. * dyn subtotal tables field-symbols: <f_collect_tab> type standard table. field-symbols: <f_collect_line> type any. field-symbols: <f_filter_idx_line> like line of LT_FILTER_IDX_KKBLO. field-symbols: <f_fieldcat_line> like line of LT_FIELDCAT_KKBLO. field-symbols: <f_grouplevels_line> like line of LT_GROUPLEVELS_KKBLO. field-symbols: <f_line> type any. * Data for session 3: map data to semantic table * ------------------------------------------ types: begin of st_column_index, fieldname type kkblo_fieldname, tabname type kkblo_tabname, col like sy-index, end of st_column_index. * columns index data: lt_column_index type table of st_column_index. data: wa_column_index like line of lt_column_index. * table of dependent field ( currency and quantity unit field) data: lt_fieldcat_depf type kkblo_t_fieldcat. data: wa_fieldcat_depf type kkblo_fieldcat. * XXL interface: * -XXL: contain exporting columns characteristic data: lt_sema type table of gxxlt_s initial size 0. data: wa_sema like line of lt_sema. * -XXL interface: header data: lt_hkey type table of gxxlt_h initial size 0. data: wa_hkey like line of lt_hkey. * -XXL interface: header keys data: lt_vkey type table of gxxlt_v initial size 0. data: wa_vkey like line of lt_vkey. * Number of H Keys: number of key columns data: l_n_hrz_keys type i. * Number of data columns in the list object: non-key columns no data: l_n_att_cols type i. * Number of V Keys: number of header row data: l_n_vrt_keys type i. * curency to format amount data: lt_tcurx type table of tcurx. data: wa_tcurx like line of lt_tcurx. data: l_def type flag. " currency / quantity flag data: wa_t006 type t006. " decimal place of unit data: l_num type i. " table columns number data: l_typ type c. " table type data: wa type ref to data. data: l_int type i. data: l_counter type i. field-symbols: <f_excel_column> type any. field-symbols: <f_fcat_column> type any. * Data for session 4: write to excel * ------------------------------------------ data: sema_type type c. data l_error type ref to c_oi_proxy_error. data count type i. data datac type i. data datareal type i. " exporting column number data vkeycount type i. data all type i. data mit type i value 1. " index of recent row? data li_col_pos type i value 1. " column position data li_col_num type i. " table columns number field-symbols: <line> type any. field-symbols: <item> type any. data td type sydes_desc. data: typ. data: ranges type soi_range_list. data: rangeitem type soi_range_item. data: contents type soi_generic_table. data: contentsitem type soi_generic_item. data: semaitem type gxxlt_s. data: hkeyitem type gxxlt_h. data: vkeyitem type gxxlt_v. data: li_commentary_rows type i. "row number of title lines + 1 data: lo_error_w type ref to i_oi_error. data: l_retcode type soi_ret_string. data: no_flush type c value 'X'. data: li_head_top type i. "header rows position * Data for session 5: Save and clode document * ------------------------------------------ data: li_document_size type i. data: ls_path type RLGRAP-FILENAME. * MACRO: Close_document *------------------------------------------- DEFINE close_document. clear: l_is_closed. IF lo_proxy is not initial. * check proxy detroyed adi call method lo_proxy->is_destroyed IMPORTING ret_value = l_is_closed. * if dun detroyed yet: close -> release proxy IF l_is_closed is initial. call method lo_proxy->close_document * EXPORTING * do_save = do_save IMPORTING error = lo_error retcode = lc_retcode. ENDIF. call method lo_proxy->release_document IMPORTING error = lo_error retcode = lC_retcode. else. lc_retcode = c_oi_errors=>ret_document_not_open. ENDIF. * Detroy control container IF lo_control is not initial. CALL METHOD lo_control->destroy_control. ENDIF. clear: lo_spreadsheet, lo_proxy, lo_control. * free local clear: l_is_closed. END-OF-DEFINITION. * Macro to catch DOI error *------------------------------------------- DEFINE error_doi. if lc_retcode ne c_oi_errors=>ret_ok. close_document. call method lo_error->raise_message EXPORTING type = 'E'. clear: lo_error. endif. END-OF-DEFINITION. *--------------------------------------------------------------------* * SESSION 0: DOI CONSTRUCTOR *--------------------------------------------------------------------* * check active windown call function 'GUI_HAS_ACTIVEX' IMPORTING return = l_has_activex. if l_has_activex is initial. raise MISS_GUIDE. endif. * Get Container Object of Screen call method c_oi_container_control_creator=>get_container_control IMPORTING control = lo_control retcode = lC_retcode. error_doi. * Initialize Container control CALL METHOD lo_control->init_control EXPORTING parent = CL_GUI_CONTAINER=>DEFAULT_SCREEN r3_application_name = '' inplace_enabled = 'X' no_flush = 'X' register_on_close_event = 'X' register_on_custom_event = 'X' IMPORTING error = lO_ERROR retcode = lc_retcode. error_doi. * Get Proxy Document: * check exist of document proxy, if exist -> close first if not lo_proxy is initial. close_document. endif. IF i_xls is not initial. * xls format, doctype = soi_doctype_excel97_sheet l_doctype_excel_sheet = 'Excel.Sheet.8'. else. * xlsx format, doctype = soi_doctype_excel_sheet l_doctype_excel_sheet = 'Excel.Sheet'. ENDIF. CALL METHOD lo_control->get_document_proxy EXPORTING document_type = l_doctype_excel_sheet register_container = 'X' IMPORTING document_proxy = lo_proxy error = lO_ERROR retcode = lc_retcode. error_doi. IF I_DOCUMENT_URL is initial. * create new excel document call method lo_proxy->create_document EXPORTING create_view_data = 'X' open_inplace = 'X' no_flush = 'X' IMPORTING ERROR = lO_ERROR retcode = lc_retcode. error_doi. else. * Read excel template for i_DOCUMENT_URL * this excel template can be store in local or server CALL METHOD lo_proxy->open_document EXPORTING document_url = i_document_url open_inplace = 'X' no_flush = 'X' IMPORTING error = lo_error retcode = lc_retcode. error_doi. endif. * Check Spreadsheet Interface of Document Proxy CALL METHOD lo_proxy->has_spreadsheet_interface IMPORTING is_available = li_has error = lO_ERROR retcode = lc_retcode. error_doi. * create Spreadsheet object CHECK li_has IS NOT INITIAL. CALL METHOD lo_proxy->get_spreadsheet_interface IMPORTING sheet_interface = lo_spreadsheet error = lO_ERROR retcode = lc_retcode. error_doi. *--------------------------------------------------------------------* * SESSION 1: GET LVC DATA FROM ALV OBJECT *--------------------------------------------------------------------* * data table create object lo_grid EXPORTING i_parent = CL_GUI_CONTAINER=>SCREEN0. call method lo_grid->get_alv_attributes EXPORTING io_grid = io_alv IMPORTING Et_table = lt_alv. assign lt_alv->* to <f_alv_tab>. * fieldcat CALL METHOD iO_alv->GET_FRONTEND_FIELDCATALOG IMPORTING ET_FIELDCATALOG = lt_fieldcat_LVC. * table name loop at lt_fieldcat_LVC into wa_fieldcat_lvc where not tabname is initial. l_tabname = wa_fieldcat_lvc-tabname. exit. endloop. if sy-subrc ne 0. l_tabname = '1'. endif. clear: wa_fieldcat_lvc. * sort table CALL METHOD IO_ALV->GET_SORT_CRITERIA IMPORTING ET_SORT = lt_sort_lvc. * filter index CALL METHOD IO_ALV->GET_FILTERED_ENTRIES IMPORTING ET_FILTERED_ENTRIES = lt_filter_idx_lvc. * group level + subtotal CALL METHOD IO_ALV->GET_SUBTOTALS IMPORTING EP_COLLECT00 = lt_collect00 EP_COLLECT01 = lt_collect01 EP_COLLECT02 = lt_collect02 EP_COLLECT03 = lt_collect03 EP_COLLECT04 = lt_collect04 EP_COLLECT05 = lt_collect05 EP_COLLECT06 = lt_collect06 EP_COLLECT07 = lt_collect07 EP_COLLECT08 = lt_collect08 EP_COLLECT09 = lt_collect09 ET_GROUPLEVELS = lt_GROUPLEVELS_LVC. assign lt_collect00->* to <f_collect00>. assign lt_collect01->* to <f_collect01>. assign lt_collect02->* to <f_collect02>. assign lt_collect03->* to <f_collect03>. assign lt_collect04->* to <f_collect04>. assign lt_collect05->* to <f_collect05>. assign lt_collect06->* to <f_collect06>. assign lt_collect07->* to <f_collect07>. assign lt_collect08->* to <f_collect08>. assign lt_collect09->* to <f_collect09>. * transfer to KKBLO struct CALL FUNCTION 'LVC_TRANSFER_TO_KKBLO' EXPORTING IT_FIELDCAT_LVC = lt_fieldcat_lvc IT_SORT_LVC = lt_sort_lvc IT_FILTER_INDEX_LVC = lt_filter_idx_lvc IT_GROUPLEVELS_LVC = lt_grouplevels_lvc IMPORTING ET_FIELDCAT_KKBLO = lt_fieldcat_kkblo ET_SORT_KKBLO = lt_sort_kkblo ET_FILTERED_ENTRIES_KKBLO = lt_filter_idx_kkblo ET_GROUPLEVELS_KKBLO = lt_grouplevels_kkblo TABLES IT_DATA = <f_alv_tab> EXCEPTIONS IT_DATA_MISSING = 1 IT_FIELDCAT_LVC_MISSING = 2 OTHERS = 3. IF SY-SUBRC <> 0. raise ex_transfer_KKBLO_ERROR. ENDIF. clear: wa_fieldcat_lvc, lt_fieldcat_lvc, lt_sort_lvc, lt_filter_idx_lvc, lt_GROUPLEVELS_LVC. clear: lo_grid. *--------------------------------------------------------------------* * SESSION 2: SORT, FILTER AND CALCULATE TOTAL / SUBTOTAL *--------------------------------------------------------------------* * append subtotal & total line create data lt_excel like <f_ALV_TAB>. assign lt_excel->* to <f_excel_tab>. loop at <f_alv_tab> assigning <f_line>. l_save_index = sy-tabix. * filter base on filter index table read table LT_FILTER_IDX_KKBLO assigning <f_filter_idx_line> with key index = l_save_index binary search. if sy-subrc ne 0. append <f_line> to <f_excel_tab>. endif. * append subtotal lines read table LT_GROUPLEVELS_KKBLO assigning <f_grouplevels_line> with key index_to = l_save_index binary search. if sy-subrc = 0. l_tabix = sy-tabix. do. if <f_grouplevels_line>-subtot eq 'X' and <f_grouplevels_line>-hide_level is initial and <f_grouplevels_line>-cindex_from ne 0. * dynamic append subtotal line to excel table base on grouplevel table * ex <f_GROUPLEVELS_line>-level = 1 * then <f_collect_tab> = '<F_COLLECT01>' l_collect = <f_grouplevels_line>-level. condense l_collect. concatenate '<F_COLLECT0' l_collect '>' * '->*' into l_collect. assign (l_collect) to <f_collect_tab>. * incase there're more than 1 total line of group, at the same level * for example: subtotal of multi currency LOOP AT <f_collect_tab> assigning <f_collect_line>. IF sy-tabix between <f_grouplevels_line>-cindex_from and <f_grouplevels_line>-cindex_to. append <f_collect_line> to <f_excel_tab>. * save subtotal lines index wa_subtot_indexs-index = sy-tabix. append wa_subtot_indexs to lt_subtot_indexs. * append sub total ranges table for format later add 1 to l_sub_index. subrangeitem-name = l_sub_index. condense subrangeitem-name. concatenate 'SUBTOT' subrangeitem-name into subrangeitem-name. subrangeitem-rows = wa_subtot_indexs-index. subrangeitem-columns = 1. " start col append subrangeitem to subranges. clear: subrangeitem. ENDIF. ENDLOOP. unassign: <f_collect_tab>. unassign: <f_collect_line>. clear: l_collect. endif. * check next subtotal level of group unassign: <f_grouplevels_line>. add 1 to l_tabix. read table LT_GROUPLEVELS_KKBLO assigning <f_grouplevels_line> index l_tabix. if sy-subrc ne 0 or <f_grouplevels_line>-index_to ne l_save_index. exit. endif. unassign: <f_collect_tab>, <f_collect_line>. enddo. endif. clear: l_tabix, l_save_index. unassign: <f_filter_idx_line>, <f_grouplevels_line>. endloop. * free local data unassign: <f_line>, <f_collect_tab>, <f_collect_line>, <f_fieldcat_line>. * append grand total line IF <f_collect00> is assigned. assign <f_collect00> to <f_collect_tab>. if <f_collect_tab> is not initial. LOOP AT <f_collect_tab> assigning <f_collect_line>. append <f_collect_line> to <f_excel_tab>. * save total line index wa_subtot_indexs-index = sy-tabix. append wa_subtot_indexs to lt_subtot_indexs. * append grand total range (to format) add 1 to l_sub_index. subrangeitem-name = l_sub_index. condense subrangeitem-name. concatenate 'TOTAL' subrangeitem-name into subrangeitem-name. subrangeitem-rows = wa_subtot_indexs-index. subrangeitem-columns = 1. " start col append subrangeitem to subranges. ENDLOOP. endif. ENDIF. clear: subrangeitem, LT_SORT_KKBLO, <f_collect00>, <f_collect01>, <f_collect02>, <f_collect03>, <f_collect04>, <f_collect05>, <f_collect06>, <f_collect07>, <f_collect08>, <f_collect09>. unassign: <f_collect00>, <f_collect01>, <f_collect02>, <f_collect03>, <f_collect04>, <f_collect05>, <f_collect06>, <f_collect07>, <f_collect08>, <f_collect09>, <f_collect_tab>, <f_collect_line>. *--------------------------------------------------------------------* * SESSION 3: MAP DATA TO SEMANTIC TABLE *--------------------------------------------------------------------* * get dependent field field: currency and quantity create data wa like line of <f_excel_tab>. assign wa->* to <f_excel_line>. describe field <f_excel_line> type l_typ components l_num. do l_num times. l_save_index = sy-index. assign component l_save_index of structure <f_excel_line> to <f_excel_column>. if sy-subrc ne 0. message e059(0k) with 'FATAL ERROR' raising fatal_error. endif. loop at LT_FIELDCAT_KKBLO assigning <f_fieldcat_line> where tabname = l_tabname. assign component <f_fieldcat_line>-fieldname of structure <f_excel_line> to <f_fcat_column>. describe distance between <f_excel_column> and <f_fcat_column> into l_int in byte mode. * append column index * this columns index is of table, not fieldcat if l_int = 0. wa_column_index-fieldname = <f_fieldcat_line>-fieldname. wa_column_index-tabname = <f_fieldcat_line>-tabname. wa_column_index-col = l_save_index. append wa_column_index to lt_column_index. endif. * append dependent fields (currency and quantity unit) if <f_fieldcat_line>-cfieldname is not initial. clear wa_fieldcat_depf. wa_fieldcat_depf-fieldname = <f_fieldcat_line>-cfieldname. wa_fieldcat_depf-tabname = <f_fieldcat_line>-ctabname. collect wa_fieldcat_depf into lt_fieldcat_depf. endif. if <f_fieldcat_line>-qfieldname is not initial. clear wa_fieldcat_depf. wa_fieldcat_depf-fieldname = <f_fieldcat_line>-qfieldname. wa_fieldcat_depf-tabname = <f_fieldcat_line>-qtabname. collect wa_fieldcat_depf into lt_fieldcat_depf. endif. * rewrite field data type if <f_fieldcat_line>-inttype = 'X' and <f_fieldcat_line>-datatype(3) = 'INT'. <f_fieldcat_line>-inttype = 'I'. endif. endloop. clear: l_save_index. unassign: <f_fieldcat_line>. enddo. * build semantic tables l_n_hrz_keys = 1. * Get keyfigures loop at LT_FIELDCAT_KKBLO assigning <f_fieldcat_line> where tabname = l_tabname and tech ne 'X' and no_out ne 'X'. clear wa_sema. clear wa_hkey. * Units belong to keyfigures -> display as str read table lt_fieldcat_depf into wa_fieldcat_depf with key fieldname = <f_fieldcat_line>-fieldname tabname = <f_fieldcat_line>-tabname. if sy-subrc = 0. wa_sema-col_typ = 'STR'. wa_sema-col_ops = 'DFT'. * Keyfigures else. case <f_fieldcat_line>-datatype. when 'QUAN'. wa_sema-col_typ = 'N03'. if <f_fieldcat_line>-no_sum ne 'X'. wa_sema-col_ops = 'ADD'. else. wa_sema-col_ops = 'NOP'. " no dependent field endif. when 'DATS'. wa_sema-col_typ = 'DAT'. wa_sema-col_ops = 'NOP'. when 'CHAR' OR 'UNIT' OR 'CUKY'. " Added fieldformats UNIT and CUKY - dd. 26-10-2012 Wouter Heuvelmans wa_sema-col_typ = 'STR'. wa_sema-col_ops = 'DFT'. " dependent field * incase numeric, ex '00120' -> display as '12' when 'NUMC'. wa_sema-col_typ = 'STR'. wa_sema-col_ops = 'DFT'. when others. wa_sema-col_typ = 'NUM'. if <f_fieldcat_line>-no_sum ne 'X'. wa_sema-col_ops = 'ADD'. else. wa_sema-col_ops = 'NOP'. endif. endcase. endif. l_counter = l_counter + 1. l_n_att_cols = l_n_att_cols + 1. wa_sema-col_no = l_counter. read table lt_column_index into wa_column_index with key fieldname = <f_fieldcat_line>-fieldname tabname = <f_fieldcat_line>-tabname. if sy-subrc = 0. wa_sema-col_src = wa_column_index-col. else. raise fatal_error. endif. * columns index of ref currency field in table if not <f_fieldcat_line>-cfieldname is initial. read table lt_column_index into wa_column_index with key fieldname = <f_fieldcat_line>-cfieldname tabname = <f_fieldcat_line>-ctabname. if sy-subrc = 0. wa_sema-col_cur = wa_column_index-col. endif. * quantities fields * treat as currency when display on excel elseif not <f_fieldcat_line>-qfieldname is initial. read table lt_column_index into wa_column_index with key fieldname = <f_fieldcat_line>-qfieldname tabname = <f_fieldcat_line>-qtabname. if sy-subrc = 0. wa_sema-col_cur = wa_column_index-col. endif. endif. * Treat of fixed currency in the fieldcatalog for column data: l_num_help(2) type n. if not <f_fieldcat_line>-currency is initial. select * from tcurx into table lt_tcurx. sort lt_tcurx. read table lt_tcurx into wa_tcurx with key currkey = <f_fieldcat_line>-currency. if sy-subrc = 0. l_num_help = wa_tcurx-currdec. concatenate 'N' l_num_help into wa_sema-col_typ. wa_sema-col_cur = sy-tabix * ( -1 ). endif. endif. wa_hkey-col_no = l_n_att_cols. wa_hkey-row_no = l_n_hrz_keys. wa_hkey-col_name = <f_fieldcat_line>-reptext. append wa_hkey to lt_hkey. append wa_sema to lt_sema. endloop. * free local data clear: lt_column_index, wa_column_index, lt_fieldcat_depf, wa_fieldcat_depf, lt_tcurx, wa_tcurx, l_num, l_typ, wa, l_int, l_counter. unassign: <f_fieldcat_line>, <f_excel_line>, <f_excel_column>, <f_fcat_column>. *--------------------------------------------------------------------* * SESSION 4: WRITE TO EXCEL *--------------------------------------------------------------------* clear: wa_tcurx. refresh: lt_tcurx. * if spreadsheet dun have proxy yet if li_has is initial. l_retcode = c_oi_errors=>ret_interface_not_supported. call method c_oi_errors=>create_error_for_retcode EXPORTING retcode = l_retcode no_flush = no_flush IMPORTING error = lo_error_w. exit. endif. create object l_error EXPORTING object_name = 'OLE_DOCUMENT_PROXY' method_name = 'get_ranges_names'. call method c_oi_errors=>add_error EXPORTING error = l_error. describe table lt_sema lines datareal. describe table <f_excel_tab> lines datac. describe table lt_vkey lines vkeycount. if datac = 0. raise inv_data_range. endif. if vkeycount ne l_n_vrt_keys. raise dim_mismatch_vkey. endif. all = l_n_vrt_keys + l_n_att_cols. if datareal ne all. raise dim_mismatch_sema. endif. data: decimal type c. * get decimal separator format ('.', ',', ...) in Office config call method lo_proxy->get_application_property EXPORTING property_name = 'INTERNATIONAL' subproperty_name = 'DECIMAL_SEPARATOR' CHANGING retvalue = decimal. data: wa_usr type usr01. select * from usr01 into wa_usr where bname = sy-uname. endselect. data: comma_elim(4) type c. field-symbols <g> type any. data search_item(4) value ' #'. concatenate ',' decimal '.' decimal into comma_elim. data help type i. " table (with subtotal) line number help = datac. data: rowmax type i value 1. " header row number data: columnmax type i value 0. " header columns number loop at lt_hkey into hkeyitem. if hkeyitem-col_no > columnmax. columnmax = hkeyitem-col_no. endif. if hkeyitem-row_no > rowmax. rowmax = hkeyitem-row_no. endif. endloop. data: hkeycolumns type i. " header columns no hkeycolumns = columnmax. if hkeycolumns < l_n_att_cols. hkeycolumns = l_n_att_cols. endif. columnmax = 0. loop at lt_vkey into vkeyitem. if vkeyitem-col_no > columnmax. columnmax = vkeyitem-col_no. endif. endloop. data overflow type i value 1. data testname(10) type c. data temp2 type i. " 1st item row position in excel data realmit type i value 1. data realoverflow type i value 1. " row index in content call method lo_spreadsheet->screen_update EXPORTING updating = ''. call method lo_spreadsheet->load_lib. data: str(40) type c. " range names of columns range (w/o col header) data: rows type i. " row postion of 1st item line in ecxel * calculate row position of data table describe table iT_LISTHEADER lines li_commentary_rows. * if grid had title, add 1 empy line between title and table if li_commentary_rows ne 0. add 1 to li_commentary_rows. endif. * add top position of block data li_commentary_rows = li_commentary_rows + i_top - 1. * write header (commentary rows) data: li_commentary_row_index type i value 1. data: li_content_index type i value 1. data: ls_index(10) type c. data ls_commentary_range(40) type c value 'TITLE'. data: li_font_bold type i. data: li_font_italic type i. data: li_font_size type i. loop at iT_LISTHEADER into wa_listheader. li_commentary_row_index = i_top + li_content_index - 1. ls_index = li_content_index. condense ls_index. concatenate ls_commentary_range(5) ls_index into ls_commentary_range. condense ls_commentary_range. * insert title range call method lo_spreadsheet->insert_range_dim EXPORTING name = ls_commentary_range top = li_commentary_row_index left = i_left rows = 1 columns = 1 no_flush = no_flush. * format range case wa_listheader-typ. when 'H'. "title li_font_size = 16. li_font_bold = 1. li_font_italic = -1. when 'S'. "subtile li_font_size = -1. li_font_bold = 1. li_font_italic = -1. when others. "'A' comment li_font_size = -1. li_font_bold = -1. li_font_italic = 1. endcase. call method lo_spreadsheet->set_font EXPORTING rangename = ls_commentary_range family = '' size = li_font_size bold = li_font_bold italic = li_font_italic align = 0 no_flush = no_flush. * title: range content rangeitem-name = ls_commentary_range. rangeitem-columns = 1. rangeitem-rows = 1. append rangeitem to ranges. contentsitem-row = li_content_index. contentsitem-column = 1. concatenate wa_listheader-key wa_listheader-info into contentsitem-value separated by space. condense contentsitem-value. append contentsitem to contents. add 1 to li_content_index. clear: rangeitem, contentsitem, ls_index. endloop. * set range data title call method lo_spreadsheet->set_ranges_data EXPORTING ranges = ranges contents = contents no_flush = no_flush. refresh: ranges, contents. rows = rowmax + li_commentary_rows + 1. all = wa_usr-datfm. all = all + 3. loop at lt_sema into semaitem. if semaitem-col_typ = 'DAT' or semaitem-col_typ = 'MON' or semaitem-col_typ = 'N00' or semaitem-col_typ = 'N01' or semaitem-col_typ = 'N01' or semaitem-col_typ = 'N02' or semaitem-col_typ = 'N03' or semaitem-col_typ = 'PCT' or semaitem-col_typ = 'STR' or semaitem-col_typ = 'NUM'. clear str. str = semaitem-col_no. condense str. concatenate 'DATA' str into str. mit = semaitem-col_no. li_col_pos = semaitem-col_no + i_left - 1. * range from data1 to data(n), for each columns of table call method lo_spreadsheet->insert_range_dim EXPORTING name = str top = rows left = li_col_pos rows = help columns = 1 no_flush = no_flush. data dec type i value -1. data typeinfo type sydes_typeinfo. loop at <f_excel_tab> assigning <line>. assign component semaitem-col_no of structure <line> to <item>. describe field <item> into td. read table td-types index 1 into typeinfo. if typeinfo-type = 'P'. dec = typeinfo-decimals. elseif typeinfo-type = 'I'. dec = 0. endif. describe field <line> type typ components count. mit = 1. do count times. if mit = semaitem-col_src. assign component sy-index of structure <line> to <item>. describe field <item> into td. read table td-types index 1 into typeinfo. if typeinfo-type = 'P'. dec = typeinfo-decimals. endif. exit. endif. mit = mit + 1. enddo. exit. endloop. * format for each columns of table (w/o columns headers) if semaitem-col_typ = 'DAT'. if semaitem-col_no > vkeycount. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = all no_flush = no_flush. else. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 0 no_flush = no_flush. endif. elseif semaitem-col_typ = 'STR'. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 0 no_flush = no_flush. elseif semaitem-col_typ = 'MON'. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 10 no_flush = no_flush. elseif semaitem-col_typ = 'N00'. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 0 no_flush = no_flush. elseif semaitem-col_typ = 'N01'. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 1 no_flush = no_flush. elseif semaitem-col_typ = 'N02'. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 2 no_flush = no_flush. elseif semaitem-col_typ = 'N03'. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 3 no_flush = no_flush. elseif semaitem-col_typ = 'N04'. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 4 no_flush = no_flush. elseif semaitem-col_typ = 'NUM'. if dec eq -1. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 2 no_flush = no_flush. else. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = dec no_flush = no_flush. endif. elseif semaitem-col_typ = 'PCT'. call method lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 3 decimals = 0 no_flush = no_flush. endif. endif. endloop. * get item contents for set_range_data method * get currency cell also mit = 1. data: currcells type soi_cell_table. data: curritem type soi_cell_item. curritem-rows = 1. curritem-columns = 1. curritem-front = -1. curritem-back = -1. curritem-font = ''. curritem-size = -1. curritem-bold = -1. curritem-italic = -1. curritem-align = -1. curritem-frametyp = -1. curritem-framecolor = -1. curritem-currency = ''. curritem-number = 1. curritem-input = -1. data: const type i. * Change for Correction request * Initial 10000 lines are missing in Excel Export * if there are only 2 columns in exported List object. if datareal gt 2. const = 20000 / datareal. else. const = 20000 / ( datareal + 2 ). endif. data: lines type i. data: innerlines type i. data: counter type i. data: curritem2 like curritem. data: curritem3 like curritem. data: length type i. data: found. * append content table (for method set_range_content) loop at <f_excel_tab> assigning <line>. * save line index to compare with lt_subtot_indexs, * to discover line is a subtotal / totale line or not * ex use to set 'dun display zero in subtotal / total line' l_save_index = sy-tabix. do datareal times. read table lt_sema into semaitem with key col_no = sy-index. if semaitem-col_src ne 0. assign component semaitem-col_src of structure <line> to <item>. else. assign component sy-index of structure <line> to <item>. endif. contentsitem-row = realoverflow. if sy-subrc = 0. move semaitem-col_ops to search_item(3). search 'ADD#CNT#MIN#MAX#AVG#NOP#DFT#' for search_item. if sy-subrc ne 0. raise error_in_sema. endif. move semaitem-col_typ to search_item(3). search 'NUM#N00#N01#N02#N03#N04#PCT#DAT#MON#STR#' for search_item. if sy-subrc ne 0. raise error_in_sema. endif. contentsitem-column = sy-index. if semaitem-col_typ eq 'DAT' or semaitem-col_typ eq 'MON'. if semaitem-col_no > vkeycount. " Hinweis 512418 " EXCEL bezieht Datumsangaben " auf den 31.12.1899, behandelt " aber 1900 als ein Schaltjahr " d.h. ab 1.3.1900 korrekt " 1.3.1900 als Zahl = 61 data: genesis type d value '18991230'. data: number_of_days type p. * change for date in char format & sema_type = X data: temp_date type d. if not <item> is initial and not <item> co ' ' and not <item> co '0'. * change for date in char format & sema_type = X starts if sema_type = 'X'. describe field <item> type typ. if typ = 'C'. temp_date = <item>. number_of_days = temp_date - genesis. else. number_of_days = <item> - genesis. endif. else. number_of_days = <item> - genesis. endif. * change for date in char format & sema_type = X ends if number_of_days < 61. number_of_days = number_of_days - 1. endif. set country 'DE'. write number_of_days to contentsitem-value no-grouping left-justified. set country space. translate contentsitem-value using comma_elim. else. clear contentsitem-value. endif. else. move <item> to contentsitem-value. endif. elseif semaitem-col_typ eq 'NUM' or semaitem-col_typ eq 'N00' or semaitem-col_typ eq 'N01' or semaitem-col_typ eq 'N02' or semaitem-col_typ eq 'N03' or semaitem-col_typ eq 'N04' or semaitem-col_typ eq 'PCT'. set country 'DE'. describe field <item> type typ. if semaitem-col_cur is initial. if typ ne 'F'. write <item> to contentsitem-value no-grouping no-sign decimals 14. else. write <item> to contentsitem-value no-grouping no-sign. endif. else. * Treat of fixed curreny for column >>Y9CK007319 if semaitem-col_cur < 0. semaitem-col_cur = semaitem-col_cur * ( -1 ). select * from tcurx into table lt_tcurx. sort lt_tcurx. read table lt_tcurx into wa_tcurx index semaitem-col_cur. if sy-subrc = 0. if typ ne 'F'. write <item> to contentsitem-value no-grouping currency wa_tcurx-currkey no-sign decimals 14. else. write <item> to contentsitem-value no-grouping currency wa_tcurx-currkey no-sign. endif. endif. else. assign component semaitem-col_cur of structure <line> to <g>. * mit = index of recent row curritem-top = rowmax + mit + li_commentary_rows. li_col_pos = sy-index + i_left - 1. curritem-left = li_col_pos. * if filed is quantity field (qfieldname ne space) * or amount field (cfieldname ne space), then format decimal place * corresponding with config clear: l_def. read table LT_FIELDCAT_KKBLO assigning <f_fieldcat_line> with key tabname = l_tabname tech = space no_out = space col_pos = semaitem-col_no. IF sy-subrc = 0. IF <f_fieldcat_line>-cfieldname is not initial. l_def = 'C'. else."if <f_fieldcat_line>-qfieldname is not initial. l_def = 'Q'. ENDIF. ENDIF. * if field is amount field * exporting of amount field base on currency decimal table: TCURX IF l_def = 'C'. "field is amount field select single * from tcurx into wa_tcurx where currkey = <g>. * if amount ref to un-know currency -> default decimal = 2 if sy-subrc eq 0. curritem-decimals = wa_tcurx-currdec. else. curritem-decimals = 2. endif. append curritem to currcells. if typ ne 'F'. write <item> to contentsitem-value currency <g> no-sign no-grouping. else. write <item> to contentsitem-value decimals 14 currency <g> no-sign no-grouping. endif. * if field is quantity field * exporting of quantity field base on quantity decimal table: T006 else."if l_def = 'Q'. " field is quantity field clear: wa_t006. select single * from t006 into wa_t006 where MSEHI = <g>. * if quantity ref to un-know unit-> default decimal = 2 if sy-subrc eq 0. curritem-decimals = wa_t006-decan. else. curritem-decimals = 2. endif. append curritem to currcells. write <item> to contentsitem-value unit <g> no-sign no-grouping. condense contentsitem-value. ENDIF. endif. "Y9CK007319 endif. condense contentsitem-value. * add function fieldcat-no zero display loop at LT_FIELDCAT_KKBLO assigning <f_fieldcat_line> where tabname = l_tabname and tech ne 'X' and no_out ne 'X'. if <f_fieldcat_line>-col_pos = semaitem-col_no. if <f_fieldcat_line>-no_zero = 'X'. if <item> = '0'. clear: contentsitem-value. endif. * dun display zero in total/subtotal line too else. clear: wa_subtot_indexs. read table lt_subtot_indexs into wa_subtot_indexs with key index = l_save_index. IF sy-subrc = 0. if <item> = '0'. clear: contentsitem-value. endif. ENDIF. endif. endif. endloop. unassign: <f_fieldcat_line>. if <item> lt 0. search contentsitem-value for 'E'. if sy-fdpos eq 0. * use prefix notation for signed numbers translate contentsitem-value using '- '. condense contentsitem-value no-gaps. concatenate '-' contentsitem-value into contentsitem-value. else. concatenate '-' contentsitem-value into contentsitem-value. endif. endif. set country space. * Hier wird nur die korrekte Kommaseparatierung gemacht, wenn die * Zeichen einer * Zahl enthalten sind. Das ist für Timestamps, die auch ":" enthalten. * Für die * darf keine Kommaseparierung stattfinden. * Changing for correction request - Y6BK041073 if contentsitem-value co '0123456789.,-+E '. translate contentsitem-value using comma_elim. endif. else. clear contentsitem-value. * if type is not numeric -> dun display with zero write <item> to contentsitem-value no-zero. shift contentsitem-value left deleting leading space. endif. append contentsitem to contents. endif. enddo. realmit = realmit + 1. realoverflow = realoverflow + 1. mit = mit + 1. * overflow = current row index in content table overflow = overflow + 1. endloop. unassign: <f_fieldcat_line>. * set item range for set_range_data method testname = mit / const. condense testname. concatenate 'TEST' testname into testname. realoverflow = realoverflow - 1. realmit = realmit - 1. help = realoverflow. rangeitem-name = testname. rangeitem-columns = datareal. rangeitem-rows = help. append rangeitem to ranges. * insert item range dim temp2 = rowmax + 1 + li_commentary_rows + realmit - realoverflow. * items data call method lo_spreadsheet->insert_range_dim EXPORTING name = testname top = temp2 left = i_left rows = help columns = datareal no_flush = no_flush. * get columns header contents for set_range_data method * export columns header only if no columns header option = space data: rowcount type i. data: columncount type i. if i_columns_header = 'X'. * append columns header to contents: hkey rowcount = 1. do rowmax times. columncount = 1. do hkeycolumns times. loop at lt_hkey into hkeyitem where col_no = columncount and row_no = rowcount. endloop. if sy-subrc = 0. str = hkeyitem-col_name. contentsitem-value = hkeyitem-col_name. else. contentsitem-value = str. endif. contentsitem-column = columncount. contentsitem-row = rowcount. append contentsitem to contents. columncount = columncount + 1. enddo. rowcount = rowcount + 1. enddo. * incase columns header in multiline data: rowmaxtemp type i. if rowmax > 1. rowmaxtemp = rowmax - 1. rowcount = 1. do rowmaxtemp times. columncount = 1. do columnmax times. contentsitem-column = columncount. contentsitem-row = rowcount. contentsitem-value = ''. append contentsitem to contents. columncount = columncount + 1. enddo. rowcount = rowcount + 1. enddo. endif. * append columns header to contents: vkey columncount = 1. do columnmax times. loop at lt_vkey into vkeyitem where col_no = columncount. endloop. contentsitem-value = vkeyitem-col_name. contentsitem-row = rowmax. contentsitem-column = columncount. append contentsitem to contents. columncount = columncount + 1. enddo. *--------------------------------------------------------------------* * set header range for method set_range_data * insert header keys range dim li_head_top = li_commentary_rows + 1. li_col_pos = i_left. * insert range headers if hkeycolumns ne 0. rangeitem-name = 'TESTHKEY'. rangeitem-rows = rowmax. rangeitem-columns = hkeycolumns. append rangeitem to ranges. clear: rangeitem. call method lo_spreadsheet->insert_range_dim EXPORTING name = 'TESTHKEY' top = li_head_top left = li_col_pos rows = rowmax columns = hkeycolumns no_flush = no_flush. endif. endif. * format for columns header + total + subtotal * ------------------------------------------ help = rowmax + realmit. " table + header lines data: lt_format type soi_format_table. data: wa_format like line of lt_format. data: wa_format_temp like line of lt_format. field-symbols: <f_source> type any. field-symbols: <f_des> type any. * columns header format wa_format-front = -1. wa_format-back = 15. "grey wa_format-font = space. wa_format-size = -1. wa_format-bold = 1. wa_format-align = 0. wa_format-frametyp = -1. wa_format-framecolor = -1. * get column header format from input record * -> map input format if i_columns_header = 'X'. wa_format-name = 'TESTHKEY'. if i_format_col_header is not initial. describe field i_format_col_header type l_typ components li_col_num. do li_col_num times. if sy-index ne 1. " dun map range name assign component sy-index of structure i_format_col_header to <f_source>. if <f_source> is not initial. assign component sy-index of structure wa_format to <f_des>. <f_des> = <f_source>. unassign: <f_des>. endif. unassign: <f_source>. endif. enddo. clear: li_col_num. endif. append wa_format to lt_format. endif. * Zusammenfassen der Spalten mit gleicher Nachkommastellenzahl * collect vertical cells (col) with the same number of decimal places * to increase perfomance in currency cell format describe table currcells lines lines. lines = lines - 1. do lines times. describe table currcells lines innerlines. innerlines = innerlines - 1. sort currcells by left top. clear found. do innerlines times. read table currcells index sy-index into curritem. counter = sy-index + 1. read table currcells index counter into curritem2. if curritem-left eq curritem2-left. length = curritem-top + curritem-rows. if length eq curritem2-top. if curritem-decimals eq curritem2-decimals. move curritem to curritem3. curritem3-rows = curritem3-rows + curritem2-rows. curritem-left = -1. modify currcells index sy-index from curritem. curritem2-left = -1. modify currcells index counter from curritem2. append curritem3 to currcells. found = 'X'. endif. endif. endif. enddo. if found is initial. exit. endif. delete currcells where left = -1. enddo. * Zusammenfassen der Zeilen mit gleicher Nachkommastellenzahl * collect horizontal cells (row) with the same number of decimal places * to increase perfomance in currency cell format describe table currcells lines lines. lines = lines - 1. do lines times. describe table currcells lines innerlines. innerlines = innerlines - 1. sort currcells by top left. clear found. do innerlines times. read table currcells index sy-index into curritem. counter = sy-index + 1. read table currcells index counter into curritem2. if curritem-top eq curritem2-top and curritem-rows eq curritem2-rows. length = curritem-left + curritem-columns. if length eq curritem2-left. if curritem-decimals eq curritem2-decimals. move curritem to curritem3. curritem3-columns = curritem3-columns + curritem2-columns. curritem-left = -1. modify currcells index sy-index from curritem. curritem2-left = -1. modify currcells index counter from curritem2. append curritem3 to currcells. found = 'X'. endif. endif. endif. enddo. if found is initial. exit. endif. delete currcells where left = -1. enddo. * Ende der Zusammenfassung * item data: format for currency cell, corresponding with currency call method lo_spreadsheet->cell_format EXPORTING cells = currcells no_flush = no_flush. * item data: write item table content call method lo_spreadsheet->set_ranges_data EXPORTING ranges = ranges contents = contents no_flush = no_flush. * whole table range to format all table if i_columns_header = 'X'. li_head_top = li_commentary_rows + 1. else. li_head_top = li_commentary_rows + 2. help = help - 1. endif. call method lo_spreadsheet->insert_range_dim EXPORTING name = 'WHOLE_TABLE' top = li_head_top left = i_left rows = help columns = datareal no_flush = no_flush. * columns width auto fix * this parameter = space in case use with exist template IF i_columns_autofit = 'X'. call method lo_spreadsheet->fit_widest EXPORTING name = 'WHOLE_TABLE' no_flush = no_flush. ENDIF. * frame * The parameter has 8 bits *0 Left margin *1 Top marginT *2 Bottom margin *3 Right margin *4 Horizontal line *5 Vertical line *6 Thinness *7 Thickness * here 127 = 1111111 6-5-4-3-2-1 mean Thin-ver-hor-right-bot-top-left * ( final DOI method call, set no_flush = space * equal to call method CL_GUI_CFW=>FLUSH ) call method lo_spreadsheet->set_frame EXPORTING rangename = 'WHOLE_TABLE' typ = 127 color = 1 no_flush = space IMPORTING error = lo_error retcode = lc_retcode. error_doi. * reformat subtotal / total line after format wholw table loop at subranges into subrangeitem. l_sub_index = subrangeitem-rows + li_commentary_rows + rowmax. call method lo_spreadsheet->insert_range_dim EXPORTING name = subrangeitem-name left = i_left top = l_sub_index rows = 1 columns = datareal no_flush = no_flush. wa_format-name = subrangeitem-name. * default format: * - clolor: subtotal = light yellow, subtotal = yellow * - frame: box IF subrangeitem-name(3) = 'SUB'. wa_format-back = 36. "subtotal line wa_format_temp = i_format_subtotal. else. wa_format-back = 27. "total line wa_format_temp = i_format_total. endif. wa_format-FRAMETYP = 79. wa_format-FRAMEcolor = 1. wa_format-number = -1. wa_format-align = -1. * get subtoal + total format from intput parameter * overwrite default format if wa_format_temp is not initial. describe field wa_format_temp type l_typ components li_col_num. do li_col_num times. if sy-index ne 1. " dun map range name assign component sy-index of structure wa_format_temp to <f_source>. if <f_source> is not initial. assign component sy-index of structure wa_format to <f_des>. <f_des> = <f_source>. unassign: <f_des>. endif. unassign: <f_source>. endif. enddo. clear: li_col_num. endif. append wa_format to lt_format. clear: wa_format-name. clear: l_sub_index. clear: wa_format_temp. endloop. if lt_format[] is not initial. call method lo_spreadsheet->set_ranges_format EXPORTING formattable = lt_format no_flush = no_flush. refresh: lt_format. endif. *--------------------------------------------------------------------* call method lo_spreadsheet->screen_update EXPORTING updating = 'X'. call method c_oi_errors=>flush_errors. lo_error_w = l_error. lc_retcode = lo_error_w->error_code. ** catch no_flush -> led to dump ( optional ) * go_error = l_error. * gc_retcode = go_error->error_code. * error_doi. clear: lt_sema, wa_sema, lt_hkey, wa_hkey, lt_vkey, wa_vkey, l_n_hrz_keys, l_n_att_cols, l_n_vrt_keys, count, datac, datareal, vkeycount, all, mit, li_col_pos, li_col_num, ranges, rangeitem, contents, contentsitem, semaitem, hkeyitem, vkeyitem, li_commentary_rows, l_retcode, li_head_top, <f_excel_tab>. clear: lo_error_w. unassign: <line>, <item>, <f_excel_tab>. *--------------------------------------------------------------------* * SESSION 5: SAVE AND CLOSE FILE *--------------------------------------------------------------------* * ex of save path: 'FILE://C:\temp\test.xlsx' concatenate 'FILE://' I_save_path into ls_path. call method lo_proxy->save_document_to_url EXPORTING no_flush = 'X' url = ls_path IMPORTING error = lo_error retcode = lc_retcode CHANGING document_size = li_document_size. error_doi. * if save successfully -> raise successful message * message i499(sy) with 'Document is Exported to ' p_path. message i499(sy) with 'Data has been exported successfully'. clear: ls_path, li_document_size. close_document. endmethod. method BIND_TABLE. *--------------------------------------------------------------------* * issue #230 - Pimp my Code * - Stefan Schmöcker, (wi p) 2012-12-01 * - ... * aligning code * message made to support multilinguality *--------------------------------------------------------------------* * issue #237 - Check if overlapping areas exist * - Alessandro Iannacci 2012-12-01 * changes: - Added raise if overlaps are detected *--------------------------------------------------------------------* CONSTANTS: lc_top_left_column TYPE zexcel_cell_column_alpha VALUE 'A', lc_top_left_row TYPE zexcel_cell_row VALUE 1. DATA: lv_row_int TYPE zexcel_cell_row, lv_first_row TYPE zexcel_cell_row, lv_last_row TYPE zexcel_cell_row, lv_column_int TYPE zexcel_cell_column, lv_column_alpha TYPE zexcel_cell_column_alpha, lt_field_catalog TYPE zexcel_t_fieldcatalog, lv_id TYPE i, lv_rows TYPE i, lv_formula TYPE string, ls_settings TYPE zexcel_s_table_settings, lo_table TYPE REF TO zcl_excel_table, lt_column_name_buffer TYPE SORTED TABLE OF string WITH UNIQUE KEY table_line, lv_value TYPE string, lv_value_lowercase TYPE string, lv_syindex TYPE char3, lv_errormessage TYPE string, "ins issue #237 lv_columns TYPE i, lt_columns TYPE zexcel_t_fieldcatalog, lv_maxcol TYPE i, lv_maxrow TYPE i, lo_iterator TYPE REF TO cl_object_collection_iterator, lo_curtable TYPE REF TO zcl_excel_table. FIELD-SYMBOLS: <ls_field_catalog> TYPE zexcel_s_fieldcatalog, <fs_table_line> TYPE ANY, <fs_fldval> TYPE ANY. ls_settings = is_table_settings. IF ls_settings-top_left_column IS INITIAL. ls_settings-top_left_column = lc_top_left_column. ENDIF. IF ls_settings-table_style IS INITIAL. ls_settings-table_style = zcl_excel_table=>builtinstyle_medium2. ENDIF. IF ls_settings-top_left_row IS INITIAL. ls_settings-top_left_row = lc_top_left_row. ENDIF. IF it_field_catalog IS NOT SUPPLIED. lt_field_catalog = zcl_excel_common=>get_fieldcatalog( ip_table = ip_table ). ELSE. lt_field_catalog = it_field_catalog. ENDIF. SORT lt_field_catalog BY position. *--------------------------------------------------------------------* * issue #237 Check if overlapping areas exist Start *--------------------------------------------------------------------* "Get the number of columns for the current table lt_columns = lt_field_catalog. DELETE lt_columns WHERE dynpfld NE abap_true. DESCRIBE TABLE lt_columns LINES lv_columns. "Calculate the top left row of the current table lv_column_int = zcl_excel_common=>convert_column2int( ls_settings-top_left_column ). lv_row_int = ls_settings-top_left_row. "Get number of row for the current table DESCRIBE TABLE ip_table LINES lv_rows. "Calculate the bottom right row for the current table lv_maxcol = lv_column_int + lv_columns - 1. lv_maxrow = lv_row_int + lv_rows - 1. ls_settings-bottom_right_column = zcl_excel_common=>convert_column2alpha( lv_maxcol ). ls_settings-bottom_right_row = lv_maxrow. lv_column_int = zcl_excel_common=>convert_column2int( ls_settings-top_left_column ). lo_iterator = me->tables->if_object_collection~get_iterator( ). WHILE lo_iterator->if_object_collection_iterator~has_next( ) EQ abap_true. lo_curtable ?= lo_iterator->if_object_collection_iterator~get_next( ). IF ( ( ls_settings-top_left_row GE lo_curtable->settings-top_left_row AND ls_settings-top_left_row LE lo_curtable->settings-bottom_right_row ) OR ( ls_settings-bottom_right_row GE lo_curtable->settings-top_left_row AND ls_settings-bottom_right_row LE lo_curtable->settings-bottom_right_row ) ) AND ( ( lv_column_int GE zcl_excel_common=>convert_column2int( lo_curtable->settings-top_left_column ) AND lv_column_int LE zcl_excel_common=>convert_column2int( lo_curtable->settings-bottom_right_column ) ) OR ( lv_maxcol GE zcl_excel_common=>convert_column2int( lo_curtable->settings-top_left_column ) AND lv_maxcol LE zcl_excel_common=>convert_column2int( lo_curtable->settings-bottom_right_column ) ) ). lv_errormessage = 'Table overlaps with previously bound table and will not be added to worksheet.'(400). RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDIF. ENDWHILE. *--------------------------------------------------------------------* * issue #237 Check if overlapping areas exist End *--------------------------------------------------------------------* CREATE OBJECT lo_table. lo_table->settings = ls_settings. lo_table->set_data( ir_data = ip_table ). lv_id = me->excel->get_next_table_id( ). lo_table->set_id( iv_id = lv_id ). * lo_table->fieldcat = lt_field_catalog[]. me->tables->add( lo_table ). * It is better to loop column by column (only visible column) LOOP AT lt_field_catalog ASSIGNING <ls_field_catalog> WHERE dynpfld EQ abap_true. lv_column_alpha = zcl_excel_common=>convert_column2alpha( lv_column_int ). " Due restrinction of new table object we cannot have two column with the same name " Check if a column with the same name exists, if exists add a counter " If no medium description is provided we try to use small or long * lv_value = <ls_field_catalog>-scrtext_m. field-symbols: <scrtxt1> type any, <scrtxt2> type any, <scrtxt3> type any. case iv_default_descr. when 'M'. assign <ls_field_catalog>-scrtext_m to <scrtxt1>. assign <ls_field_catalog>-scrtext_s to <scrtxt2>. assign <ls_field_catalog>-scrtext_l to <scrtxt3>. when 'S'. assign <ls_field_catalog>-scrtext_s to <scrtxt1>. assign <ls_field_catalog>-scrtext_m to <scrtxt2>. assign <ls_field_catalog>-scrtext_l to <scrtxt3>. when 'L'. assign <ls_field_catalog>-scrtext_l to <scrtxt1>. assign <ls_field_catalog>-scrtext_m to <scrtxt2>. assign <ls_field_catalog>-scrtext_s to <scrtxt3>. when others. assign <ls_field_catalog>-scrtext_m to <scrtxt1>. assign <ls_field_catalog>-scrtext_s to <scrtxt2>. assign <ls_field_catalog>-scrtext_l to <scrtxt3>. endcase. if <scrtxt1> is not initial. lv_value = <scrtxt1>. <ls_field_catalog>-scrtext_l = lv_value. elseif <scrtxt2> is not initial. lv_value = <scrtxt2>. <ls_field_catalog>-scrtext_l = lv_value. elseif <scrtxt3> is not initial. lv_value = <scrtxt3>. <ls_field_catalog>-scrtext_l = lv_value. else. lv_value = 'Column'. " default value as Excel does <ls_field_catalog>-scrtext_l = lv_value. endif. WHILE 1 = 1. lv_value_lowercase = lv_value. TRANSLATE lv_value_lowercase TO LOWER CASE. READ TABLE lt_column_name_buffer TRANSPORTING NO FIELDS WITH KEY table_line = lv_value_lowercase BINARY SEARCH. IF sy-subrc <> 0. <ls_field_catalog>-scrtext_l = lv_value. INSERT lv_value_lowercase INTO TABLE lt_column_name_buffer. EXIT. ELSE. lv_syindex = sy-index. CONCATENATE <ls_field_catalog>-scrtext_l lv_syindex INTO lv_value. ENDIF. ENDWHILE. " First of all write column header IF <ls_field_catalog>-style_header IS NOT INITIAL. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_value = lv_value ip_style = <ls_field_catalog>-style_header ). ELSE. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_value = lv_value ). ENDIF. ADD 1 TO lv_row_int. LOOP AT ip_table ASSIGNING <fs_table_line>. ASSIGN COMPONENT <ls_field_catalog>-fieldname OF STRUCTURE <fs_table_line> TO <fs_fldval>. " issue #290 Add formula support in table IF <ls_field_catalog>-formula EQ abap_true. IF <ls_field_catalog>-style IS NOT INITIAL. IF <ls_field_catalog>-abap_type IS NOT INITIAL. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_formula = <fs_fldval> ip_abap_type = <ls_field_catalog>-abap_type ip_style = <ls_field_catalog>-style ). ELSE. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_formula = <fs_fldval> ip_style = <ls_field_catalog>-style ). ENDIF. ELSE. IF <ls_field_catalog>-abap_type IS NOT INITIAL. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_formula = <fs_fldval> ip_abap_type = <ls_field_catalog>-abap_type ). ELSE. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_formula = <fs_fldval> ). ENDIF. ENDIF. ELSE. IF <ls_field_catalog>-style IS NOT INITIAL. IF <ls_field_catalog>-abap_type IS NOT INITIAL. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_value = <fs_fldval> ip_abap_type = <ls_field_catalog>-abap_type ip_style = <ls_field_catalog>-style ). ELSE. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_value = <fs_fldval> ip_style = <ls_field_catalog>-style ). ENDIF. ELSE. IF <ls_field_catalog>-abap_type IS NOT INITIAL. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_abap_type = <ls_field_catalog>-abap_type ip_value = <fs_fldval> ). ELSE. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_value = <fs_fldval> ). ENDIF. ENDIF. ENDIF. ADD 1 TO lv_row_int. ENDLOOP. IF sy-subrc <> 0. "create empty row if table has no data me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_value = space ). ADD 1 TO lv_row_int. ENDIF. *--------------------------------------------------------------------* " totals *--------------------------------------------------------------------* IF <ls_field_catalog>-totals_function IS NOT INITIAL. lv_formula = lo_table->get_totals_formula( ip_column = <ls_field_catalog>-scrtext_l ip_function = <ls_field_catalog>-totals_function ). IF <ls_field_catalog>-style_total IS NOT INITIAL. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_formula = lv_formula ip_style = <ls_field_catalog>-style_total ). ELSE. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_formula = lv_formula ). ENDIF. ENDIF. lv_row_int = ls_settings-top_left_row. ADD 1 TO lv_column_int. *--------------------------------------------------------------------* " conditional formatting *--------------------------------------------------------------------* IF <ls_field_catalog>-cond_style IS NOT INITIAL. lv_first_row = ls_settings-top_left_row + 1. " +1 to exclude header lv_last_row = ls_settings-top_left_row + lv_rows. <ls_field_catalog>-cond_style->set_range( ip_start_column = lv_column_alpha ip_start_row = lv_first_row ip_stop_column = lv_column_alpha ip_stop_row = lv_last_row ). ENDIF. ENDLOOP. *--------------------------------------------------------------------* " Set field catalog *--------------------------------------------------------------------* lo_table->fieldcat = lt_field_catalog[]. es_table_settings = ls_settings. es_table_settings-bottom_right_column = lv_column_alpha. " >> Issue #291 IF ip_table IS INITIAL. es_table_settings-bottom_right_row = ls_settings-top_left_row + 2. "Last rows ELSE. es_table_settings-bottom_right_row = ls_settings-top_left_row + lv_rows + 1. "Last rows ENDIF. " << Issue #291 endmethod. METHOD calculate_cell_width. *--------------------------------------------------------------------* * issue #293 - Roberto Bianco * - Christian Assig 2014-03-14 * * changes: - Calculate widths using SAPscript font metrics * (transaction SE73) * - Calculate the width of dates * - Add additional width for auto filter buttons * - Add cell padding to simulate Excel behavior *--------------------------------------------------------------------* CONSTANTS: lc_default_font_name TYPE zexcel_style_font_name VALUE 'Calibri', "#EC NOTEXT lc_default_font_height TYPE tdfontsize VALUE '110', lc_excel_cell_padding TYPE float VALUE '0.75'. DATA: ld_cell_value TYPE zexcel_cell_value, ld_current_character TYPE c LENGTH 1, ld_style_guid TYPE zexcel_cell_style, ls_stylemapping TYPE zexcel_s_stylemapping, lo_table_object TYPE REF TO object, lo_table TYPE REF TO zcl_excel_table, ld_table_top_left_column TYPE zexcel_cell_column, ld_table_bottom_right_column TYPE zexcel_cell_column, ld_flag_contains_auto_filter TYPE abap_bool VALUE abap_false, ld_flag_bold TYPE abap_bool VALUE abap_false, ld_flag_italic TYPE abap_bool VALUE abap_false, ld_date TYPE d, ld_date_char TYPE c LENGTH 50, ld_font_height TYPE tdfontsize VALUE lc_default_font_height, lt_itcfc TYPE STANDARD TABLE OF itcfc, ld_offset TYPE i, ld_length TYPE i, ld_uccp TYPE i, ls_font_metric TYPE mty_s_font_metric, ld_width_from_font_metrics TYPE i, ld_font_family TYPE itcfh-tdfamily, ld_font_name TYPE zexcel_style_font_name VALUE lc_default_font_name, lt_font_families LIKE STANDARD TABLE OF ld_font_family, ls_font_cache TYPE mty_s_font_cache. FIELD-SYMBOLS: <ls_font_cache> TYPE mty_s_font_cache, <ls_font_metric> TYPE mty_s_font_metric, <ls_itcfc> TYPE itcfc. " Determine cell content and cell style me->get_cell( EXPORTING ip_column = ip_column ip_row = ip_row IMPORTING ep_value = ld_cell_value ep_guid = ld_style_guid ). " ABAP2XLSX uses tables to define areas containing headers and " auto-filters. Find out if the current cell is in the header " of one of these tables. LOOP AT me->tables->collection INTO lo_table_object. " Downcast: OBJECT -> ZCL_EXCEL_TABLE lo_table ?= lo_table_object. " Convert column letters to corresponding integer values ld_table_top_left_column = zcl_excel_common=>convert_column2int( lo_table->settings-top_left_column ). ld_table_bottom_right_column = zcl_excel_common=>convert_column2int( lo_table->settings-bottom_right_column ). " Is the current cell part of the table header? IF ip_column BETWEEN ld_table_top_left_column AND ld_table_bottom_right_column AND ip_row EQ lo_table->settings-top_left_row. " Current cell is part of the table header " -> Assume that an auto filter is present and that the font is " bold ld_flag_contains_auto_filter = abap_true. ld_flag_bold = abap_true. ENDIF. ENDLOOP. " If a style GUID is present, read style attributes IF ld_style_guid IS NOT INITIAL. TRY. " Read style attributes ls_stylemapping = me->excel->get_style_to_guid( ld_style_guid ). " If the current cell contains the default date format, " convert the cell value to a date and calculate its length IF ls_stylemapping-complete_style-number_format-format_code = zcl_excel_style_number_format=>c_format_date_std. " Convert excel date to ABAP date ld_date = zcl_excel_common=>excel_string_to_date( ld_cell_value ). " Format ABAP date using user's formatting settings WRITE ld_date TO ld_date_char. " Remember the formatted date to calculate the cell size ld_cell_value = ld_date_char. ENDIF. " Read the font size and convert it to the font height " used by SAPscript (multiplication by 10) IF ls_stylemapping-complete_stylex-font-size = abap_true. ld_font_height = ls_stylemapping-complete_style-font-size * 10. ENDIF. " If set, remember the font name IF ls_stylemapping-complete_stylex-font-name = abap_true. ld_font_name = ls_stylemapping-complete_style-font-name. ENDIF. " If set, remember whether font is bold and italic. IF ls_stylemapping-complete_stylex-font-bold = abap_true. ld_flag_bold = ls_stylemapping-complete_style-font-bold. ENDIF. IF ls_stylemapping-complete_stylex-font-italic = abap_true. ld_flag_italic = ls_stylemapping-complete_style-font-italic. ENDIF. CATCH zcx_excel. "#EC NO_HANDLER " Style GUID is present, but style was not found " Continue with default values ENDTRY. ENDIF. " Check if the same font (font name and font attributes) was already " used before READ TABLE mth_font_cache WITH TABLE KEY font_name = ld_font_name font_height = ld_font_height flag_bold = ld_flag_bold flag_italic = ld_flag_italic ASSIGNING <ls_font_cache>. IF sy-subrc <> 0. " Font is used for the first time " Add the font to our local font cache ls_font_cache-font_name = ld_font_name. ls_font_cache-font_height = ld_font_height. ls_font_cache-flag_bold = ld_flag_bold. ls_font_cache-flag_italic = ld_flag_italic. INSERT ls_font_cache INTO TABLE mth_font_cache ASSIGNING <ls_font_cache>. " Determine the SAPscript font family name from the Excel " font name SELECT tdfamily FROM tfo01 INTO TABLE lt_font_families UP TO 1 ROWS WHERE tdtext = ld_font_name ORDER BY PRIMARY KEY. " Check if a matching font family was found " Fonts can be uploaded from TTF files using transaction SE73 IF lines( lt_font_families ) > 0. READ TABLE lt_font_families INDEX 1 INTO ld_font_family. " Load font metrics (returns a table with the size of each letter " in the font) CALL FUNCTION 'LOAD_FONT' EXPORTING family = ld_font_family height = ld_font_height printer = 'SWIN' bold = ld_flag_bold italic = ld_flag_italic TABLES metric = lt_itcfc EXCEPTIONS font_family = 1 codepage = 2 device_type = 3 OTHERS = 4. IF sy-subrc <> 0. CLEAR lt_itcfc. ENDIF. " For faster access, convert each character number to the actual " character, and store the characters and their sizes in a hash " table LOOP AT lt_itcfc ASSIGNING <ls_itcfc>. ld_uccp = <ls_itcfc>-cpcharno. ls_font_metric-char = cl_abap_conv_in_ce=>uccpi( ld_uccp ). ls_font_metric-char_width = <ls_itcfc>-tdcwidths. INSERT ls_font_metric INTO TABLE <ls_font_cache>-th_font_metrics. ENDLOOP. ENDIF. ENDIF. " Calculate the cell width " If available, use font metrics IF lines( <ls_font_cache>-th_font_metrics ) = 0. " Font metrics are not available " -> Calculate the cell width using only the font size ld_length = strlen( ld_cell_value ). ep_width = ld_length * ld_font_height / lc_default_font_height + lc_excel_cell_padding. ELSE. " Font metrics are available " Calculate the size of the text by adding the sizes of each " letter ld_length = strlen( ld_cell_value ). DO ld_length TIMES. " Subtract 1, because the first character is at offset 0 ld_offset = sy-index - 1. " Read the current character from the cell value ld_current_character = ld_cell_value+ld_offset(1). " Look up the size of the current letter READ TABLE <ls_font_cache>-th_font_metrics WITH TABLE KEY char = ld_current_character ASSIGNING <ls_font_metric>. IF sy-subrc = 0. " The size of the letter is known " -> Add the actual size of the letter ADD <ls_font_metric>-char_width TO ld_width_from_font_metrics. ELSE. " The size of the letter is unknown " -> Add the font height as the default letter size ADD ld_font_height TO ld_width_from_font_metrics. ENDIF. ENDDO. " Add cell padding (Excel makes columns a bit wider than the space " that is needed for the text itself) and convert unit " (division by 100) ep_width = ld_width_from_font_metrics / 100 + lc_excel_cell_padding. ENDIF. " If the current cell contains an auto filter, make it a bit wider. " The size used by the auto filter button does not depend on the font " size. IF ld_flag_contains_auto_filter = abap_true. ADD 2 TO ep_width. ENDIF. ENDMETHOD. method CALCULATE_COLUMN_WIDTHS. TYPES: BEGIN OF t_auto_size, col_index TYPE int4, width TYPE float, END OF t_auto_size. TYPES: tt_auto_size TYPE TABLE OF t_auto_size. DATA: column_dimensions TYPE zexcel_t_worksheet_columndime. DATA: column_dimension TYPE REF TO zcl_excel_worksheet_columndime. DATA: auto_size TYPE flag. DATA: auto_sizes TYPE tt_auto_size. * DATA: col_alpha TYPE zexcel_cell_column_alpha." issue #155 - less restrictive typing for ip_column DATA: count TYPE int4. DATA: highest_row TYPE int4. DATA: width TYPE float. FIELD-SYMBOLS: <column_dimension> LIKE LINE OF column_dimensions. FIELD-SYMBOLS: <auto_size> LIKE LINE OF auto_sizes. column_dimensions[] = me->get_column_dimensions( ). LOOP AT column_dimensions ASSIGNING <column_dimension>. auto_size = <column_dimension>-column_dimension->get_auto_size( ). IF auto_size = abap_true. APPEND INITIAL LINE TO auto_sizes ASSIGNING <auto_size>. <auto_size>-col_index = <column_dimension>-column_dimension->get_column_index( ). <auto_size>-width = -1. ENDIF. ENDLOOP. " There is only something to do if there are some auto-size columns IF NOT auto_sizes IS INITIAL. highest_row = me->get_highest_row( ). LOOP AT auto_sizes ASSIGNING <auto_size>. * col_alpha = zcl_excel_common=>convert_column2alpha( <auto_size>-col_index )." issue #155 - less restrictive typing for ip_column count = 1. WHILE count <= highest_row. * Do not check merged cells IF is_cell_merged( ip_column = <auto_size>-col_index ip_row = count ) = abap_false. * Start of change # issue 139 - Dateretention of cellstyles * IF cell_style IS BOUND. * CREATE OBJECT cell_style. * ENDIF. * me->get_cell( * EXPORTING * ip_column = col_alpha " Cell Column * ip_row = count " Cell Row * IMPORTING * ep_value = cell_value " Cell Value * ep_style = cell_style " Request Cell Style as well * ). * " For an easy start we just take the number of characters as the width * width = strlen( cell_value ). * " Addition to solve issue #120, contribution by Stefan Schmöcker * " Calculate width using Font Size and Font Type * IF cell_style IS BOUND * AND cell_style->font IS BOUND. * width = cell_style->font->calculate_text_width( cell_value ). * ENDIF. * width = calculate_cell_width( ip_column = col_alpha " issue #155 - less restrictive typing for ip_column width = calculate_cell_width( ip_column = <auto_size>-col_index " issue #155 - less restrictive typing for ip_column ip_row = count ). * End of change # issue 139 - Dateretention of cellstyles IF width > <auto_size>-width. <auto_size>-width = width. ENDIF. ENDIF. count = count + 1. ENDWHILE. * column_dimension = me->get_column_dimension( col_alpha ). " issue #155 - less restrictive typing for ip_column column_dimension = me->get_column_dimension( <auto_size>-col_index ). " issue #155 - less restrictive typing for ip_column column_dimension->set_width( <auto_size>-width ). ENDLOOP. ENDIF. endmethod. METHOD change_cell_style. " issue # 139 DATA: stylemapping TYPE zexcel_s_stylemapping, complete_style TYPE zexcel_s_cstyle_complete, complete_stylex TYPE zexcel_s_cstylex_complete, borderx TYPE zexcel_s_cstylex_border, l_guid TYPE zexcel_cell_style. "issue # 177 * We have a lot of parameters. Use some macros to make the coding more structured DEFINE clear_initial_colorxfields. if &1-rgb is initial. clear &2-rgb. endif. if &1-indexed is initial. clear &2-indexed. endif. if &1-theme is initial. clear &2-theme. endif. if &1-tint is initial. clear &2-tint. endif. END-OF-DEFINITION. DEFINE move_supplied_borders. if ip_&1 is supplied. " only act if parameter was supplied if ip_x&1 is supplied. " borderx = ip_x&1. " use supplied x-parameter else. clear borderx with 'X'. * clear in a way that would be expected to work easily if ip_&1-border_style is initial. clear borderx-border_style. endif. clear_initial_colorxfields ip_&1-border_color borderx-border_color. endif. move-corresponding ip_&1 to complete_style-&2. move-corresponding borderx to complete_stylex-&2. endif. END-OF-DEFINITION. * First get current stylsettings TRY. me->get_cell( EXPORTING ip_column = ip_column " Cell Column ip_row = ip_row " Cell Row IMPORTING ep_guid = l_guid )." Cell Value ). "issue # 177 stylemapping = me->excel->get_style_to_guid( l_guid ). "issue # 177 complete_style = stylemapping-complete_style. complete_stylex = stylemapping-complete_stylex. CATCH zcx_excel. * Error --> use submitted style ENDTRY. * move_supplied_multistyles: complete. IF ip_complete IS SUPPLIED. IF ip_xcomplete IS NOT SUPPLIED. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Complete styleinfo has to be supplied with corresponding X-field'. ENDIF. MOVE-CORRESPONDING ip_complete TO complete_style. MOVE-CORRESPONDING ip_xcomplete TO complete_stylex. ENDIF. IF ip_font IS SUPPLIED. DATA: fontx LIKE ip_xfont. IF ip_xfont IS SUPPLIED. fontx = ip_xfont. ELSE. * Only supplied values should be used - exception: Flags bold and italic strikethrough underline MOVE 'X' TO: fontx-bold, fontx-italic, fontx-strikethrough, fontx-underline_mode. CLEAR fontx-color WITH 'X'. clear_initial_colorxfields ip_font-color fontx-color. IF ip_font-family IS NOT INITIAL. fontx-family = 'X'. ENDIF. IF ip_font-name IS NOT INITIAL. fontx-name = 'X'. ENDIF. IF ip_font-scheme IS NOT INITIAL. fontx-scheme = 'X'. ENDIF. IF ip_font-size IS NOT INITIAL. fontx-size = 'X'. ENDIF. IF ip_font-underline_mode IS NOT INITIAL. fontx-underline_mode = 'X'. ENDIF. ENDIF. MOVE-CORRESPONDING ip_font TO complete_style-font. MOVE-CORRESPONDING fontx TO complete_stylex-font. * Correction for undeline mode ENDIF. IF ip_fill IS SUPPLIED. DATA: fillx LIKE ip_xfill. IF ip_xfill IS SUPPLIED. fillx = ip_xfill. ELSE. CLEAR fillx WITH 'X'. IF ip_fill-filltype IS INITIAL. CLEAR fillx-filltype. ENDIF. clear_initial_colorxfields ip_fill-fgcolor fillx-fgcolor. clear_initial_colorxfields ip_fill-bgcolor fillx-bgcolor. ENDIF. MOVE-CORRESPONDING ip_fill TO complete_style-fill. MOVE-CORRESPONDING fillx TO complete_stylex-fill. ENDIF. IF ip_borders IS SUPPLIED. DATA: bordersx LIKE ip_xborders. IF ip_xborders IS SUPPLIED. bordersx = ip_xborders. ELSE. CLEAR bordersx WITH 'X'. IF ip_borders-allborders-border_style IS INITIAL. CLEAR bordersx-allborders-border_style. ENDIF. IF ip_borders-diagonal-border_style IS INITIAL. CLEAR bordersx-diagonal-border_style. ENDIF. IF ip_borders-down-border_style IS INITIAL. CLEAR bordersx-down-border_style. ENDIF. IF ip_borders-left-border_style IS INITIAL. CLEAR bordersx-left-border_style. ENDIF. IF ip_borders-right-border_style IS INITIAL. CLEAR bordersx-right-border_style. ENDIF. IF ip_borders-top-border_style IS INITIAL. CLEAR bordersx-top-border_style. ENDIF. clear_initial_colorxfields ip_borders-allborders-border_color bordersx-allborders-border_color. clear_initial_colorxfields ip_borders-diagonal-border_color bordersx-diagonal-border_color. clear_initial_colorxfields ip_borders-down-border_color bordersx-down-border_color. clear_initial_colorxfields ip_borders-left-border_color bordersx-left-border_color. clear_initial_colorxfields ip_borders-right-border_color bordersx-right-border_color. clear_initial_colorxfields ip_borders-top-border_color bordersx-top-border_color. ENDIF. MOVE-CORRESPONDING ip_borders TO complete_style-borders. MOVE-CORRESPONDING bordersx TO complete_stylex-borders. ENDIF. IF ip_alignment IS SUPPLIED. DATA: alignmentx LIKE ip_xalignment. IF ip_xalignment IS SUPPLIED. alignmentx = ip_xalignment. ELSE. CLEAR alignmentx WITH 'X'. IF ip_alignment-horizontal IS INITIAL. CLEAR alignmentx-horizontal. ENDIF. IF ip_alignment-vertical IS INITIAL. CLEAR alignmentx-vertical. ENDIF. ENDIF. MOVE-CORRESPONDING ip_alignment TO complete_style-alignment. MOVE-CORRESPONDING alignmentx TO complete_stylex-alignment. ENDIF. IF ip_protection IS SUPPLIED. MOVE-CORRESPONDING ip_protection TO complete_style-protection. IF ip_xprotection IS SUPPLIED. MOVE-CORRESPONDING ip_xprotection TO complete_stylex-protection. ELSE. IF ip_protection-hidden IS NOT INITIAL. complete_stylex-protection-hidden = 'X'. ENDIF. IF ip_protection-locked IS NOT INITIAL. complete_stylex-protection-locked = 'X'. ENDIF. ENDIF. ENDIF. move_supplied_borders : borders_allborders borders-allborders, borders_diagonal borders-diagonal , borders_down borders-down , borders_left borders-left , borders_right borders-right , borders_top borders-top . DEFINE move_supplied_singlestyles. if ip_&1 is supplied. complete_style-&2 = ip_&1. complete_stylex-&2 = 'X'. endif. END-OF-DEFINITION. move_supplied_singlestyles: number_format_format_code number_format-format_code, font_bold font-bold, font_color font-color, font_color_rgb font-color-rgb, font_color_indexed font-color-indexed, font_color_theme font-color-theme, font_color_tint font-color-tint, font_family font-family, font_italic font-italic, font_name font-name, font_scheme font-scheme, font_size font-size, font_strikethrough font-strikethrough, font_underline font-underline, font_underline_mode font-underline_mode, fill_filltype fill-filltype, fill_rotation fill-rotation, fill_fgcolor fill-fgcolor, fill_fgcolor_rgb fill-fgcolor-rgb, fill_fgcolor_indexed fill-fgcolor-indexed, fill_fgcolor_theme fill-fgcolor-theme, fill_fgcolor_tint fill-fgcolor-tint, fill_bgcolor fill-bgcolor, fill_bgcolor_rgb fill-bgcolor-rgb, fill_bgcolor_indexed fill-bgcolor-indexed, fill_bgcolor_theme fill-bgcolor-theme, fill_bgcolor_tint fill-bgcolor-tint, fill_gradtype_type fill-gradtype-TYPE, fill_gradtype_degree fill-gradtype-DEGREE, fill_gradtype_bottom fill-gradtype-BOTTOM, fill_gradtype_left fill-gradtype-LEFT, fill_gradtype_top fill-gradtype-TOP, fill_gradtype_right fill-gradtype-RIGHT, fill_gradtype_position1 fill-gradtype-POSITION1, fill_gradtype_position2 fill-gradtype-POSITION2, fill_gradtype_position3 fill-gradtype-POSITION3, borders_diagonal_mode borders-diagonal_mode, alignment_horizontal alignment-horizontal, alignment_vertical alignment-vertical, alignment_textrotation alignment-textrotation, alignment_wraptext alignment-wraptext, alignment_shrinktofit alignment-shrinktofit, alignment_indent alignment-indent, protection_hidden protection-hidden, protection_locked protection-locked, borders_allborders_style borders-allborders-border_style, borders_allborders_color borders-allborders-border_color, borders_allbo_color_rgb borders-allborders-border_color-rgb, borders_allbo_color_indexed borders-allborders-border_color-indexed, borders_allbo_color_theme borders-allborders-border_color-theme, borders_allbo_color_tint borders-allborders-border_color-tint, borders_diagonal_style borders-diagonal-border_style, borders_diagonal_color borders-diagonal-border_color, borders_diagonal_color_rgb borders-diagonal-border_color-rgb, borders_diagonal_color_inde borders-diagonal-border_color-indexed, borders_diagonal_color_them borders-diagonal-border_color-theme, borders_diagonal_color_tint borders-diagonal-border_color-tint, borders_down_style borders-down-border_style, borders_down_color borders-down-border_color, borders_down_color_rgb borders-down-border_color-rgb, borders_down_color_indexed borders-down-border_color-indexed, borders_down_color_theme borders-down-border_color-theme, borders_down_color_tint borders-down-border_color-tint, borders_left_style borders-left-border_style, borders_left_color borders-left-border_color, borders_left_color_rgb borders-left-border_color-rgb, borders_left_color_indexed borders-left-border_color-indexed, borders_left_color_theme borders-left-border_color-theme, borders_left_color_tint borders-left-border_color-tint, borders_right_style borders-right-border_style, borders_right_color borders-right-border_color, borders_right_color_rgb borders-right-border_color-rgb, borders_right_color_indexed borders-right-border_color-indexed, borders_right_color_theme borders-right-border_color-theme, borders_right_color_tint borders-right-border_color-tint, borders_top_style borders-top-border_style, borders_top_color borders-top-border_color, borders_top_color_rgb borders-top-border_color-rgb, borders_top_color_indexed borders-top-border_color-indexed, borders_top_color_theme borders-top-border_color-theme, borders_top_color_tint borders-top-border_color-tint. * Now we have a completly filled styles. * This can be used to get the guid * Return guid if requested. Might be used if copy&paste of styles is requested ep_guid = me->excel->get_static_cellstyle_guid( ip_cstyle_complete = complete_style ip_cstylex_complete = complete_stylex ). me->set_cell_style( ip_column = ip_column ip_row = ip_row ip_style = ep_guid ). ENDMETHOD. METHOD constructor. DATA: lv_title TYPE zexcel_sheet_title. me->excel = ip_excel. * CALL FUNCTION 'GUID_CREATE' " del issue #379 - function is outdated in newer releases * IMPORTING * ev_guid_16 = me->guid. me->guid = zcl_excel_obsolete_func_wrap=>guid_create( ). " ins issue #379 - replacement for outdated function call IF ip_title IS NOT INITIAL. lv_title = ip_title. ELSE. * lv_title = me->guid. " del issue #154 - Names of worksheets lv_title = me->generate_title( ). " ins issue #154 - Names of worksheets ENDIF. me->set_title( ip_title = lv_title ). CREATE OBJECT sheet_setup. CREATE OBJECT conditional_styles. CREATE OBJECT data_validations. CREATE OBJECT tables. CREATE OBJECT ranges. " issue #163 CREATE OBJECT mo_pagebreaks. CREATE OBJECT drawings EXPORTING ip_type = zcl_excel_drawing=>type_image. CREATE OBJECT charts EXPORTING ip_type = zcl_excel_drawing=>type_chart. me->zif_excel_sheet_protection~initialize( ). me->zif_excel_sheet_properties~initialize( ). CREATE OBJECT hyperlinks. * initialize active cell coordinates active_cell-cell_row = 1. active_cell-cell_column = 1. * inizialize dimension range lower_cell-cell_row = 1. lower_cell-cell_column = 1. upper_cell-cell_row = 1. upper_cell-cell_column = 1. ENDMETHOD. METHOD delete_merge. FIELD-SYMBOLS: <ls_merged_cell> LIKE LINE OF me->mt_merged_cells. DATA: is_merged TYPE abap_bool. *--------------------------------------------------------------------* * If cell information is passed delete merge including this cell, * otherwise delete all merges *--------------------------------------------------------------------* IF ip_cell_column IS INITIAL OR ip_cell_row IS INITIAL. CLEAR me->mt_merged_cells. ELSE. LOOP AT me->mt_merged_cells ASSIGNING <ls_merged_cell>. is_merged = me->is_cell_merged( ip_column = ip_cell_column ip_row = ip_cell_row ). IF is_merged = abap_true. DELETE me->mt_merged_cells. " Delete this merge, that includes this cell EXIT. ENDIF. ENDLOOP. ENDIF. ENDMETHOD. METHOD delete_row_outline. DELETE me->mt_row_outlines WHERE row_from = iv_row_from AND row_to = iv_row_to. IF sy-subrc <> 0. " didn't find outline that was to be deleted RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Row outline to be deleted does not exist'. ENDIF. ENDMETHOD. method FREEZE_PANES. IF ip_num_columns IS NOT SUPPLIED AND ip_num_rows IS NOT SUPPLIED. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Pleas provide number of rows and/or columns to freeze'. ENDIF. IF ip_num_columns IS SUPPLIED AND ip_num_columns <= 0. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Number of columns to freeze should be positive'. ENDIF. IF ip_num_rows IS SUPPLIED AND ip_num_rows <= 0. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Number of rows to freeze should be positive'. ENDIF. freeze_pane_cell_column = ip_num_columns + 1. freeze_pane_cell_row = ip_num_rows + 1. endmethod. method GENERATE_TITLE. DATA: lo_worksheets_iterator TYPE REF TO cl_object_collection_iterator, lo_worksheet TYPE REF TO zcl_excel_worksheet. DATA: t_titles TYPE HASHED TABLE OF zexcel_sheet_title WITH UNIQUE KEY table_line, title TYPE zexcel_sheet_title, sheetnumber TYPE i. * Get list of currently used titles lo_worksheets_iterator = me->excel->get_worksheets_iterator( ). WHILE lo_worksheets_iterator->has_next( ) = abap_true. lo_worksheet ?= lo_worksheets_iterator->get_next( ). title = lo_worksheet->get_title( ). INSERT title INTO TABLE t_titles. ADD 1 TO sheetnumber. ENDWHILE. * Now build sheetnumber. Increase counter until we hit a number that is not used so far ADD 1 TO sheetnumber. " Start counting with next number DO. title = sheetnumber. SHIFT title LEFT DELETING LEADING space. CONCATENATE 'Sheet'(001) title INTO ep_title. INSERT ep_title INTO TABLE t_titles. IF sy-subrc = 0. " Title not used so far --> take it EXIT. ENDIF. ADD 1 TO sheetnumber. ENDDO. endmethod. method GET_ACTIVE_CELL. DATA: lv_active_column TYPE zexcel_cell_column_alpha, lv_active_row TYPE string. lv_active_column = zcl_excel_common=>convert_column2alpha( active_cell-cell_column ). lv_active_row = active_cell-cell_row. SHIFT lv_active_row RIGHT DELETING TRAILING space. SHIFT lv_active_row LEFT DELETING LEADING space. CONCATENATE lv_active_column lv_active_row INTO ep_active_cell. endmethod. method GET_CELL. DATA: lv_column TYPE zexcel_cell_column, ls_sheet_content TYPE zexcel_s_cell_data. lv_column = zcl_excel_common=>convert_column2int( ip_column ). READ TABLE sheet_content INTO ls_sheet_content WITH TABLE KEY cell_row = ip_row cell_column = lv_column. ep_rc = sy-subrc. ep_value = ls_sheet_content-cell_value. ep_guid = ls_sheet_content-cell_style. " issue 139 - added this to be used for columnwidth calculation ep_formula = ls_sheet_content-cell_formula. " Addition to solve issue #120, contribution by Stefan Schmöcker DATA: style_iterator TYPE REF TO cl_object_collection_iterator, style TYPE REF TO zcl_excel_style. IF ep_style IS REQUESTED. style_iterator = me->excel->get_styles_iterator( ). WHILE style_iterator->has_next( ) = 'X'. style ?= style_iterator->get_next( ). IF style->get_guid( ) = ls_sheet_content-cell_style. ep_style = style. EXIT. ENDIF. ENDWHILE. ENDIF. endmethod. method GET_COLUMN_DIMENSION. FIELD-SYMBOLS: <fs_column_dimension> LIKE LINE OF column_dimensions. DATA: lv_column_alpha TYPE zexcel_cell_column_alpha. " issue #155 - less restrictive typing for ip_column lv_column_alpha = zcl_excel_common=>convert_column2alpha( ip_column )." issue #155 - less restrictive typing for ip_column READ TABLE me->column_dimensions ASSIGNING <fs_column_dimension> WITH KEY column = lv_column_alpha. " issue #155 - less restrictive typing for ip_column IF NOT <fs_column_dimension> IS ASSIGNED. CREATE OBJECT r_column_dimension EXPORTING ip_index = lv_column_alpha " issue #155 - less restrictive typing for ip_column ip_excel = me->excel " issue #157 - Allow style for columns ip_worksheet = me. " issue #157 - Allow style for columns APPEND INITIAL LINE TO me->column_dimensions ASSIGNING <fs_column_dimension>. <fs_column_dimension>-column = lv_column_alpha. " issue #155 - less restrictive typing for ip_column <fs_column_dimension>-column_dimension = r_column_dimension. ELSE. r_column_dimension = <fs_column_dimension>-column_dimension. ENDIF. endmethod. method GET_COLUMN_DIMENSIONS. r_column_dimension[] = me->column_dimensions[]. endmethod. method GET_COND_STYLES_ITERATOR. eo_iterator = me->conditional_styles->get_iterator( ). endmethod. method GET_DATA_VALIDATIONS_ITERATOR. eo_iterator = me->data_validations->get_iterator( ). endmethod. method GET_DATA_VALIDATIONS_SIZE. ep_size = me->data_validations->size( ). endmethod. method GET_DEFAULT_COLUMN_DIMENSION. IF me->default_column_dimension IS NOT BOUND. CREATE OBJECT me->default_column_dimension EXPORTING ip_index = 'A' " ???? ip_worksheet = me ip_excel = me->excel. ENDIF. r_column_dimension = me->default_column_dimension. endmethod. method GET_DEFAULT_EXCEL_DATE_FORMAT. CONSTANTS: c_lang_e TYPE lang VALUE 'E'. IF default_excel_date_format IS NOT INITIAL. ep_default_excel_date_format = default_excel_date_format. RETURN. ENDIF. "try to get defaults TRY. cl_abap_datfm=>get_date_format_des( EXPORTING im_langu = c_lang_e IMPORTING ex_dateformat = default_excel_date_format ). CATCH cx_abap_datfm_format_unknown. ENDTRY. " and fallback to fixed format IF default_excel_date_format IS INITIAL. default_excel_date_format = zcl_excel_style_number_format=>c_format_date_ddmmyyyydot. ENDIF. ep_default_excel_date_format = default_excel_date_format. endmethod. method GET_DEFAULT_EXCEL_TIME_FORMAT. DATA: l_timefm TYPE xutimefm. IF default_excel_time_format IS NOT INITIAL. ep_default_excel_time_format = default_excel_time_format. RETURN. ENDIF. * Let's get default l_timefm = cl_abap_timefm=>get_environment_timefm( ). CASE l_timefm. WHEN 0. *0 24 Hour Format (Example: 12:05:10) default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time6. WHEN 1. *1 12 Hour Format (Example: 12:05:10 PM) default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time2. WHEN 2. *2 12 Hour Format (Example: 12:05:10 pm) for now all the same. no chnage upper lower default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time2. WHEN 3. *3 Hours from 0 to 11 (Example: 00:05:10 PM) for now all the same. no chnage upper lower default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time2. WHEN 4. *4 Hours from 0 to 11 (Example: 00:05:10 pm) for now all the same. no chnage upper lower default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time2. WHEN OTHERS. " and fallback to fixed format default_excel_time_format = zcl_excel_style_number_format=>c_format_date_time6. ENDCASE. ep_default_excel_time_format = default_excel_time_format. endmethod. method GET_DEFAULT_ROW_DIMENSION. IF me->default_row_dimension IS NOT BOUND. CREATE OBJECT me->default_row_dimension. ENDIF. r_row_dimension = me->default_row_dimension. endmethod. method GET_DIMENSION_RANGE. me->update_dimension_range( ). IF upper_cell EQ lower_cell. "only one cell " Worksheet not filled * IF upper_cell-cell_coords = '0'. IF upper_cell-cell_coords IS INITIAL. ep_dimension_range = 'A1'. ELSE. ep_dimension_range = upper_cell-cell_coords. ENDIF. ELSE. CONCATENATE upper_cell-cell_coords ':' lower_cell-cell_coords INTO ep_dimension_range. ENDIF. endmethod. method GET_DRAWINGS. DATA: lo_drawing TYPE REF TO zcl_excel_drawing, lo_iterator TYPE REF TO cl_object_collection_iterator. CASE ip_type. WHEN zcl_excel_drawing=>type_image. r_drawings = drawings. WHEN zcl_excel_drawing=>type_chart. r_drawings = charts. WHEN space. CREATE OBJECT r_drawings EXPORTING ip_type = ''. lo_iterator = drawings->get_iterator( ). WHILE lo_iterator->has_next( ) = abap_true. lo_drawing ?= lo_iterator->get_next( ). r_drawings->include( lo_drawing ). ENDWHILE. lo_iterator = charts->get_iterator( ). WHILE lo_iterator->has_next( ) = abap_true. lo_drawing ?= lo_iterator->get_next( ). r_drawings->include( lo_drawing ). ENDWHILE. WHEN OTHERS. ENDCASE. endmethod. method GET_DRAWINGS_ITERATOR. CASE ip_type. WHEN zcl_excel_drawing=>type_image. eo_iterator = drawings->get_iterator( ). WHEN zcl_excel_drawing=>type_chart. eo_iterator = charts->get_iterator( ). ENDCASE. endmethod. method GET_FREEZE_CELL. ep_row = me->freeze_pane_cell_row. ep_column = me->freeze_pane_cell_column. endmethod. METHOD get_guid. ep_guid = me->guid. ENDMETHOD. method GET_HIGHEST_COLUMN. me->update_dimension_range( ). r_highest_column = me->lower_cell-cell_column. endmethod. METHOD get_highest_row. me->update_dimension_range( ). r_highest_row = me->lower_cell-cell_row. ENDMETHOD. method GET_HYPERLINKS_ITERATOR. eo_iterator = hyperlinks->get_iterator( ). endmethod. method GET_HYPERLINKS_SIZE. ep_size = hyperlinks->size( ). endmethod. METHOD get_merge. FIELD-SYMBOLS: <ls_merged_cell> LIKE LINE OF me->mt_merged_cells. DATA: lv_col_from TYPE string, lv_col_to TYPE string, lv_row_from TYPE string, lv_row_to TYPE string, lv_merge_range TYPE string. LOOP AT me->mt_merged_cells ASSIGNING <ls_merged_cell>. lv_col_from = zcl_excel_common=>convert_column2alpha( <ls_merged_cell>-col_from ). lv_col_to = zcl_excel_common=>convert_column2alpha( <ls_merged_cell>-col_to ). lv_row_from = <ls_merged_cell>-row_from. lv_row_to = <ls_merged_cell>-row_to . CONCATENATE lv_col_from lv_row_from ':' lv_col_to lv_row_to INTO lv_merge_range. CONDENSE lv_merge_range NO-GAPS. APPEND lv_merge_range TO merge_range. ENDLOOP. ENDMETHOD. method GET_PAGEBREAKS. ro_pagebreaks = mo_pagebreaks. endmethod. method GET_RANGES_ITERATOR. eo_iterator = me->ranges->get_iterator( ). endmethod. METHOD GET_ROW_DIMENSION. FIELD-SYMBOLS: <ls_row_dimension> LIKE LINE OF me->row_dimensions. DATA: ls_row_dimension LIKE LINE OF me->row_dimensions. READ TABLE me->row_dimensions ASSIGNING <ls_row_dimension> WITH TABLE KEY row = ip_row. IF NOT <ls_row_dimension> IS ASSIGNED. CREATE OBJECT r_row_dimension EXPORTING ip_index = ip_row. ls_row_dimension-row = ip_row. ls_row_dimension-row_dimension = r_row_dimension. INSERT ls_row_dimension INTO TABLE me->row_dimensions. ELSE. r_row_dimension = <ls_row_dimension>-row_dimension. ENDIF. ENDMETHOD. METHOD get_row_dimensions. r_row_dimension[] = me->row_dimensions[]. ENDMETHOD. METHOD get_row_outlines. rt_row_outlines = me->mt_row_outlines. ENDMETHOD. method GET_TABCOLOR. ev_tabcolor = me->tabcolor. endmethod. method GET_TABLES_ITERATOR. eo_iterator = tables->if_object_collection~get_iterator( ). endmethod. method GET_TABLES_SIZE. ep_size = tables->if_object_collection~size( ). endmethod. method GET_TITLE. DATA lv_value TYPE string. IF ip_escaped EQ abap_true. lv_value = me->title. ep_title = zcl_excel_common=>escape_string( lv_value ). ELSE. ep_title = me->title. ENDIF. endmethod. METHOD get_value_type. DATA: lo_addit TYPE REF TO cl_abap_elemdescr, ls_dfies TYPE dfies, l_function TYPE funcname, l_value(50) TYPE c. ep_value = ip_value. ep_value_type = cl_abap_typedescr=>typekind_string. " Thats our default if something goes wrong. TRY. lo_addit ?= cl_abap_typedescr=>describe_by_data( ip_value ). CATCH cx_sy_move_cast_error. CLEAR lo_addit. ENDTRY. IF lo_addit IS BOUND. lo_addit->get_ddic_field( RECEIVING p_flddescr = ls_dfies EXCEPTIONS not_found = 1 no_ddic_type = 2 OTHERS = 3 ) . IF sy-subrc = 0. ep_value_type = ls_dfies-inttype. IF ls_dfies-convexit IS NOT INITIAL. * We need to convert with output conversion function CONCATENATE 'CONVERSION_EXIT_' ls_dfies-convexit '_OUTPUT' INTO l_function. SELECT SINGLE funcname INTO l_function FROM tfdir WHERE funcname = l_function. IF sy-subrc = 0. CALL FUNCTION l_function EXPORTING input = ip_value IMPORTING * LONG_TEXT = output = l_value * SHORT_TEXT = EXCEPTIONS OTHERS = 1. IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ELSE. TRY. ep_value = l_value. CATCH cx_root. ep_value = ip_value. ENDTRY. ENDIF. ENDIF. ENDIF. ELSE. ep_value_type = lo_addit->get_data_type_kind( ip_value ). ENDIF. ENDIF. ENDMETHOD. METHOD is_cell_merged. DATA: lv_column TYPE i. FIELD-SYMBOLS: <ls_merged_cell> LIKE LINE OF me->mt_merged_cells. lv_column = zcl_excel_common=>convert_column2int( ip_column ). rp_is_merged = abap_false. " Assume not in merged area LOOP AT me->mt_merged_cells ASSIGNING <ls_merged_cell>. IF <ls_merged_cell>-col_from <= lv_column AND <ls_merged_cell>-col_to >= lv_column AND <ls_merged_cell>-row_from <= ip_row AND <ls_merged_cell>-row_to >= ip_row. rp_is_merged = abap_true. " until we are proven different RETURN. ENDIF. ENDLOOP. ENDMETHOD. method PRINT_TITLE_SET_RANGE. *--------------------------------------------------------------------* * issue#235 - repeat rows/columns * - Stefan Schmoecker, 2012-12-02 *--------------------------------------------------------------------* DATA: lo_range_iterator TYPE REF TO cl_object_collection_iterator, lo_range TYPE REF TO zcl_excel_range, lv_repeat_range_sheetname TYPE string, lv_repeat_range_col TYPE string, lv_row_char_from TYPE char10, lv_row_char_to TYPE char10, lv_repeat_range_row TYPE string, lv_repeat_range TYPE string. *--------------------------------------------------------------------* * Get range that represents printarea * if non-existant, create it *--------------------------------------------------------------------* lo_range_iterator = me->get_ranges_iterator( ). WHILE lo_range_iterator->has_next( ) = abap_true. lo_range ?= lo_range_iterator->get_next( ). IF lo_range->name = zif_excel_sheet_printsettings=>gcv_print_title_name. EXIT. " Found it ENDIF. CLEAR lo_range. ENDWHILE. IF me->print_title_col_from IS INITIAL AND me->print_title_row_from IS INITIAL. *--------------------------------------------------------------------* * No print titles are present, *--------------------------------------------------------------------* IF lo_range IS BOUND. me->ranges->remove( lo_range ). ENDIF. ELSE. *--------------------------------------------------------------------* * Print titles are present, *--------------------------------------------------------------------* IF lo_range IS NOT BOUND. lo_range = me->add_new_range( ). lo_range->name = zif_excel_sheet_printsettings=>gcv_print_title_name. ENDIF. lv_repeat_range_sheetname = me->get_title( ). lv_repeat_range_sheetname = zcl_excel_common=>escape_string( lv_repeat_range_sheetname ). *--------------------------------------------------------------------* * Repeat-columns *--------------------------------------------------------------------* IF me->print_title_col_from IS NOT INITIAL. CONCATENATE lv_repeat_range_sheetname '!$' me->print_title_col_from ':$' me->print_title_col_to INTO lv_repeat_range_col. ENDIF. *--------------------------------------------------------------------* * Repeat-rows *--------------------------------------------------------------------* IF me->print_title_row_from IS NOT INITIAL. lv_row_char_from = me->print_title_row_from. lv_row_char_to = me->print_title_row_to. CONCATENATE '!$' lv_row_char_from ':$' lv_row_char_to INTO lv_repeat_range_row. CONDENSE lv_repeat_range_row NO-GAPS. CONCATENATE lv_repeat_range_sheetname lv_repeat_range_row INTO lv_repeat_range_row. ENDIF. *--------------------------------------------------------------------* * Concatenate repeat-rows and columns *--------------------------------------------------------------------* IF lv_repeat_range_col IS INITIAL. lv_repeat_range = lv_repeat_range_row. ELSEIF lv_repeat_range_row IS INITIAL. lv_repeat_range = lv_repeat_range_col. ELSE. CONCATENATE lv_repeat_range_col lv_repeat_range_row INTO lv_repeat_range SEPARATED BY ','. ENDIF. lo_range->set_range_value( lv_repeat_range ). ENDIF. endmethod. method SET_CELL. DATA: lv_column TYPE zexcel_cell_column, ls_sheet_content TYPE zexcel_s_cell_data, lv_row_alpha TYPE string, lv_col_alpha TYPE zexcel_cell_column_alpha, lv_value TYPE zexcel_cell_value, lv_data_type TYPE zexcel_cell_data_type, lv_value_type TYPE abap_typekind, lv_style_guid TYPE zexcel_cell_style, lo_addit TYPE REF TO cl_abap_elemdescr, lo_value TYPE REF TO data, lo_value_new TYPE REF TO data. FIELD-SYMBOLS: <fs_sheet_content> TYPE zexcel_s_cell_data, <fs_numeric> TYPE numeric, <fs_date> TYPE d, <fs_time> TYPE t, <fs_value> TYPE simple. IF ip_value IS NOT SUPPLIED AND ip_formula IS NOT SUPPLIED. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Please provide the value or formula'. ENDIF. * Begin of change issue #152 - don't touch exisiting style if only value is passed * lv_style_guid = ip_style. lv_column = zcl_excel_common=>convert_column2int( ip_column ). READ TABLE sheet_content ASSIGNING <fs_sheet_content> WITH TABLE KEY cell_row = ip_row " Changed to access via table key , Stefan Schmöcker, 2013-08-03 cell_column = lv_column. IF sy-subrc = 0. IF ip_style IS INITIAL. " If no style is provided as method-parameter and cell is found use cell's current style lv_style_guid = <fs_sheet_content>-cell_style. ELSE. " Style provided as method-parameter --> use this lv_style_guid = ip_style. ENDIF. ELSE. " No cell found --> use supplied style even if empty lv_style_guid = ip_style. ENDIF. * End of change issue #152 - don't touch exisiting style if only value is passed IF ip_value IS SUPPLIED. "if data type is passed just write the value. Otherwise map abap type to excel and perform conversion "IP_DATA_TYPE is passed by excel reader so source types are preserved *First we get reference into local var. CREATE DATA lo_value LIKE ip_value. ASSIGN lo_value->* TO <fs_value>. <fs_value> = ip_value. IF ip_data_type IS SUPPLIED. IF ip_abap_type IS NOT SUPPLIED. get_value_type( EXPORTING ip_value = ip_value IMPORTING ep_value = <fs_value> ) . ENDIF. lv_value = <fs_value>. lv_data_type = ip_data_type. ELSE. IF ip_abap_type IS SUPPLIED. lv_value_type = ip_abap_type. ELSE. get_value_type( EXPORTING ip_value = ip_value IMPORTING ep_value = <fs_value> ep_value_type = lv_value_type ). ENDIF. CASE lv_value_type. WHEN cl_abap_typedescr=>typekind_int OR cl_abap_typedescr=>typekind_int1 OR cl_abap_typedescr=>typekind_int2. lo_addit = cl_abap_elemdescr=>get_i( ). CREATE DATA lo_value_new TYPE HANDLE lo_addit. ASSIGN lo_value_new->* TO <fs_numeric>. IF sy-subrc = 0. <fs_numeric> = <fs_value>. lv_value = zcl_excel_common=>number_to_excel_string( ip_value = <fs_numeric> ). ENDIF. WHEN cl_abap_typedescr=>typekind_float OR cl_abap_typedescr=>typekind_packed. lo_addit = cl_abap_elemdescr=>get_f( ). CREATE DATA lo_value_new TYPE HANDLE lo_addit. ASSIGN lo_value_new->* TO <fs_numeric>. IF sy-subrc = 0. <fs_numeric> = <fs_value>. lv_value = zcl_excel_common=>number_to_excel_string( ip_value = <fs_numeric> ). ENDIF. WHEN cl_abap_typedescr=>typekind_char OR cl_abap_typedescr=>typekind_string OR cl_abap_typedescr=>typekind_num OR cl_abap_typedescr=>typekind_hex. lv_value = <fs_value>. lv_data_type = 's'. WHEN cl_abap_typedescr=>typekind_date. lo_addit = cl_abap_elemdescr=>get_d( ). CREATE DATA lo_value_new TYPE HANDLE lo_addit. ASSIGN lo_value_new->* TO <fs_date>. IF sy-subrc = 0. <fs_date> = <fs_value>. lv_value = zcl_excel_common=>date_to_excel_string( ip_value = <fs_date> ) . ENDIF. * Begin of change issue #152 - don't touch exisiting style if only value is passed * Moved to end of routine - apply date-format even if other styleinformation is passed * IF ip_style IS NOT SUPPLIED. "get default date format in case parameter is initial * lo_style = excel->add_new_style( ). * lo_style->number_format->format_code = get_default_excel_date_format( ). * lv_style_guid = lo_style->get_guid( ). * ENDIF. * End of change issue #152 - don't touch exisiting style if only value is passed WHEN cl_abap_typedescr=>typekind_time. lo_addit = cl_abap_elemdescr=>get_t( ). CREATE DATA lo_value_new TYPE HANDLE lo_addit. ASSIGN lo_value_new->* TO <fs_time>. IF sy-subrc = 0. <fs_time> = <fs_value>. lv_value = zcl_excel_common=>time_to_excel_string( ip_value = <fs_time> ). ENDIF. * Begin of change issue #152 - don't touch exisiting style if only value is passed * Moved to end of routine - apply time-format even if other styleinformation is passed * IF ip_style IS NOT SUPPLIED. "get default time format for user in case parameter is initial * lo_style = excel->add_new_style( ). * lo_style->number_format->format_code = zcl_excel_style_number_format=>c_format_date_time6. * lv_style_guid = lo_style->get_guid( ). * ENDIF. * End of change issue #152 - don't touch exisiting style if only value is passed WHEN OTHERS. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Invalid data type of input value'. ENDCASE. ENDIF. ENDIF. IF ip_hyperlink IS BOUND. ip_hyperlink->set_cell_reference( ip_column = ip_column ip_row = ip_row ). me->hyperlinks->add( ip_hyperlink ). ENDIF. * Begin of change issue #152 - don't touch exisiting style if only value is passed * Read table moved up, so that current style may be evaluated * lv_column = zcl_excel_common=>convert_column2int( ip_column ). * READ TABLE sheet_content ASSIGNING <fs_sheet_content> WITH KEY cell_row = ip_row * cell_column = lv_column. * * IF sy-subrc EQ 0. IF <fs_sheet_content> IS ASSIGNED. * End of change issue #152 - don't touch exisiting style if only value is passed <fs_sheet_content>-cell_value = lv_value. <fs_sheet_content>-cell_formula = ip_formula. <fs_sheet_content>-cell_style = lv_style_guid. <fs_sheet_content>-data_type = lv_data_type. ELSE. ls_sheet_content-cell_row = ip_row. ls_sheet_content-cell_column = lv_column. ls_sheet_content-cell_value = lv_value. ls_sheet_content-cell_formula = ip_formula. ls_sheet_content-cell_style = lv_style_guid. ls_sheet_content-data_type = lv_data_type. lv_row_alpha = ip_row. * SHIFT lv_row_alpha RIGHT DELETING TRAILING space."del #152 - replaced with condense - should be faster * SHIFT lv_row_alpha LEFT DELETING LEADING space. "del #152 - replaced with condense - should be faster CONDENSE lv_row_alpha NO-GAPS. "ins #152 - replaced 2 shifts - should be faster lv_col_alpha = zcl_excel_common=>convert_column2alpha( ip_column ). " issue #155 - less restrictive typing for ip_column CONCATENATE lv_col_alpha lv_row_alpha INTO ls_sheet_content-cell_coords. " issue #155 - less restrictive typing for ip_column INSERT ls_sheet_content INTO TABLE sheet_content ASSIGNING <fs_sheet_content>. "ins #152 - Now <fs_sheet_content> always holds the data * APPEND ls_sheet_content TO sheet_content. * SORT sheet_content BY cell_row cell_column. " me->update_dimension_range( ). ENDIF. * Begin of change issue #152 - don't touch exisiting style if only value is passed * For Date- or Timefields change the formatcode if nothing is set yet * Enhancement option: Check if existing formatcode is a date/ or timeformat * If not, use default DATA: lo_format_code_datetime TYPE zexcel_number_format. DATA: stylemapping TYPE zexcel_s_stylemapping. CASE lv_value_type. WHEN cl_abap_typedescr=>typekind_date. TRY. stylemapping = me->excel->get_style_to_guid( <fs_sheet_content>-cell_style ). CATCH zcx_excel . ENDTRY. IF stylemapping-complete_stylex-number_format-format_code IS INITIAL OR stylemapping-complete_style-number_format-format_code IS INITIAL. lo_format_code_datetime = zcl_excel_style_number_format=>c_format_date_std. ELSE. lo_format_code_datetime = stylemapping-complete_style-number_format-format_code. ENDIF. me->change_cell_style( ip_column = ip_column ip_row = ip_row ip_number_format_format_code = lo_format_code_datetime ). WHEN cl_abap_typedescr=>typekind_time. TRY. stylemapping = me->excel->get_style_to_guid( <fs_sheet_content>-cell_style ). CATCH zcx_excel . ENDTRY. IF stylemapping-complete_stylex-number_format-format_code IS INITIAL OR stylemapping-complete_style-number_format-format_code IS INITIAL. lo_format_code_datetime = zcl_excel_style_number_format=>c_format_date_time6. ELSE. lo_format_code_datetime = stylemapping-complete_style-number_format-format_code. ENDIF. me->change_cell_style( ip_column = ip_column ip_row = ip_row ip_number_format_format_code = lo_format_code_datetime ). ENDCASE. * End of change issue #152 - don't touch exisiting style if only value is passed * Fix issue #162 lv_value = ip_value. IF lv_value CS cl_abap_char_utilities=>cr_lf. me->change_cell_style( ip_column = ip_column ip_row = ip_row ip_alignment_wraptext = abap_true ). ENDIF. * End of Fix issue #162 endmethod. method SET_CELL_FORMULA. DATA: lv_column TYPE zexcel_cell_column, ls_sheet_content LIKE LINE OF me->sheet_content. FIELD-SYMBOLS: <sheet_content> LIKE LINE OF me->sheet_content. *--------------------------------------------------------------------* * Get cell to set formula into *--------------------------------------------------------------------* lv_column = zcl_excel_common=>convert_column2int( ip_column ). READ TABLE me->sheet_content ASSIGNING <sheet_content> WITH TABLE KEY cell_row = ip_row cell_column = lv_column. IF sy-subrc <> 0. " Create new entry in sheet_content if necessary CHECK ip_formula IS INITIAL. " no need to create new entry in sheet_content when no formula is passed ls_sheet_content-cell_row = ip_row. ls_sheet_content-cell_column = lv_column. INSERT ls_sheet_content INTO TABLE me->sheet_content ASSIGNING <sheet_content>. ENDIF. *--------------------------------------------------------------------* * Fieldsymbol now holds the relevant cell *--------------------------------------------------------------------* <sheet_content>-cell_formula = ip_formula. endmethod. method SET_CELL_STYLE. DATA: lv_column TYPE zexcel_cell_column, lv_style_guid TYPE zexcel_cell_style. FIELD-SYMBOLS: <fs_sheet_content> TYPE zexcel_s_cell_data. lv_style_guid = ip_style. lv_column = zcl_excel_common=>convert_column2int( ip_column ). READ TABLE sheet_content ASSIGNING <fs_sheet_content> WITH KEY cell_row = ip_row cell_column = lv_column. IF sy-subrc EQ 0. <fs_sheet_content>-cell_style = lv_style_guid. ELSE. set_cell( ip_column = ip_column ip_row = ip_row ip_value = '' ip_style = ip_style ). ENDIF. endmethod. method SET_COLUMN_WIDTH. DATA: column_dimension TYPE REF TO zcl_excel_worksheet_columndime. DATA: width TYPE float. column_dimension = me->get_column_dimension( ip_column ). * if a fix size is supplied use this IF ip_width_fix IS SUPPLIED. TRY. width = ip_width_fix. IF width <= 0. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Please supply a positive number as column-width'. ENDIF. column_dimension->set_width( width ). EXIT. CATCH cx_sy_conversion_no_number. * Strange stuff passed --> raise error RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Unable to interpret supplied input as number'. ENDTRY. ENDIF. * If we get down to here, we have to use whatever is found in autosize. column_dimension->set_auto_size( ip_width_autosize ). endmethod. method SET_DEFAULT_EXCEL_DATE_FORMAT. IF ip_default_excel_date_format IS INITIAL. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Default date format cannot be blank'. ENDIF. default_excel_date_format = ip_default_excel_date_format. endmethod. METHOD set_merge. DATA: ls_merge TYPE mty_merge, lv_errormessage TYPE string. *--------------------------------------------------------------------* * Build new range area to insert into range table *--------------------------------------------------------------------* ls_merge-row_from = ip_row. IF ip_row IS SUPPLIED AND ip_row IS NOT INITIAL AND ip_row_to IS NOT SUPPLIED. ls_merge-row_to = ls_merge-row_from. ELSE. ls_merge-row_to = ip_row_to. ENDIF. IF ls_merge-row_from > ls_merge-row_to. lv_errormessage = 'Merge: First row larger then last row'(405). RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDIF. ls_merge-col_from = zcl_excel_common=>convert_column2int( ip_column_start ). IF ip_column_start IS SUPPLIED AND ip_column_start IS NOT INITIAL AND ip_column_end IS NOT SUPPLIED. ls_merge-col_to = ls_merge-col_from. ELSE. ls_merge-col_to = zcl_excel_common=>convert_column2int( ip_column_end ). ENDIF. IF ls_merge-col_from > ls_merge-col_to. lv_errormessage = 'Merge: First column larger then last column'(406). RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDIF. *--------------------------------------------------------------------* * Check merge not overlapping with existing merges *--------------------------------------------------------------------* LOOP AT me->mt_merged_cells TRANSPORTING NO FIELDS WHERE NOT ( row_from > ls_merge-row_to OR row_to < ls_merge-row_from OR col_from > ls_merge-col_to OR col_to < ls_merge-col_from ). lv_errormessage = 'Overlapping merges'(404). RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDLOOP. *--------------------------------------------------------------------* * Everything seems ok --> add to merge table *--------------------------------------------------------------------* INSERT ls_merge INTO TABLE me->mt_merged_cells. ENDMETHOD. method SET_PRINT_GRIDLINES. me->print_gridlines = i_print_gridlines. endmethod. method SET_ROW_HEIGHT. DATA: row_dimension TYPE REF TO zcl_excel_worksheet_rowdimensi. DATA: height TYPE float. row_dimension = me->get_row_dimension( ip_row ). * if a fix size is supplied use this TRY. height = ip_height_fix. IF height <= 0. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Please supply a positive number as row-height'. ENDIF. row_dimension->set_row_height( height ). EXIT. CATCH cx_sy_conversion_no_number. * Strange stuff passed --> raise error RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Unable to interpret supplied input as number'. ENDTRY. endmethod. METHOD set_row_outline. DATA: ls_row_outline LIKE LINE OF me->mt_row_outlines. FIELD-SYMBOLS: <ls_row_outline> LIKE LINE OF me->mt_row_outlines. READ TABLE me->mt_row_outlines ASSIGNING <ls_row_outline> WITH TABLE KEY row_from = iv_row_from row_to = iv_row_to. IF sy-subrc <> 0. IF iv_row_from <= 0. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'First row of outline must be a positive number'. ENDIF. IF iv_row_to < iv_row_from. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Last row of outline may not be less than first line of outline'. ENDIF. ls_row_outline-row_from = iv_row_from. ls_row_outline-row_to = iv_row_to. INSERT ls_row_outline INTO TABLE me->mt_row_outlines ASSIGNING <ls_row_outline>. ENDIF. CASE iv_collapsed. WHEN abap_true OR abap_false. <ls_row_outline>-collapsed = iv_collapsed. WHEN OTHERS. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'Unknown collapse state'. ENDCASE. ENDMETHOD. method SET_SHOW_GRIDLINES. me->show_gridlines = i_show_gridlines. endmethod. method SET_SHOW_ROWCOLHEADERS. me->show_rowcolheaders = i_show_rowcolheaders. endmethod. method SET_TABCOLOR. me->tabcolor = iv_tabcolor. endmethod. method SET_TABLE. DATA: lo_tabdescr TYPE REF TO cl_abap_structdescr, lr_data TYPE REF TO data, ls_header TYPE x030l, lt_dfies TYPE ddfields, lv_row_int TYPE zexcel_cell_row, lv_column_int TYPE zexcel_cell_column, lv_column_alpha TYPE zexcel_cell_column_alpha, lv_cell_value TYPE zexcel_cell_value. FIELD-SYMBOLS: <fs_table_line> TYPE ANY, <fs_fldval> TYPE ANY, <fs_dfies> TYPE dfies. lv_column_int = zcl_excel_common=>convert_column2int( ip_top_left_column ). lv_row_int = ip_top_left_row. CREATE DATA lr_data LIKE LINE OF ip_table. lo_tabdescr ?= cl_abap_structdescr=>describe_by_data_ref( lr_data ). ls_header = lo_tabdescr->get_ddic_header( ). lt_dfies = lo_tabdescr->get_ddic_field_list( ). * It is better to loop column by column LOOP AT lt_dfies ASSIGNING <fs_dfies>. lv_column_alpha = zcl_excel_common=>convert_column2alpha( lv_column_int ). IF ip_no_header = abap_false. " First of all write column header lv_cell_value = <fs_dfies>-scrtext_m. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_value = lv_cell_value ip_style = ip_hdr_style ). IF ip_transpose = abap_true. ADD 1 TO lv_column_int. ELSE. ADD 1 TO lv_row_int. ENDIF. ENDIF. LOOP AT ip_table ASSIGNING <fs_table_line>. lv_column_alpha = zcl_excel_common=>convert_column2alpha( lv_column_int ). ASSIGN COMPONENT <fs_dfies>-fieldname OF STRUCTURE <fs_table_line> TO <fs_fldval>. MOVE <fs_fldval> TO lv_cell_value. me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_value = <fs_fldval> "lv_cell_value ip_style = ip_body_style ). IF ip_transpose = abap_true. ADD 1 TO lv_column_int. ELSE. ADD 1 TO lv_row_int. ENDIF. ENDLOOP. IF ip_transpose = abap_true. lv_column_int = zcl_excel_common=>convert_column2int( ip_top_left_column ). ADD 1 TO lv_row_int. ELSE. lv_row_int = ip_top_left_row. ADD 1 TO lv_column_int. ENDIF. ENDLOOP. endmethod. method SET_TITLE. *--------------------------------------------------------------------* * ToDos: * 2do §1 The current coding for replacing a named ranges name * after renaming a sheet should be checked if it is * really working if sheetname should be escaped *--------------------------------------------------------------------* *--------------------------------------------------------------------* * issue #230 - Pimp my Code * - Stefan Schmoecker, (wip ) 2012-12-08 * - ... * changes: aligning code * message made to support multilinguality *--------------------------------------------------------------------* * issue#243 - ' is not allowed as first character in sheet title * - Stefan Schmoecker, 2012-12-02 * changes: added additional check for ' as first character *--------------------------------------------------------------------* DATA: lo_worksheets_iterator TYPE REF TO cl_object_collection_iterator, lo_worksheet TYPE REF TO zcl_excel_worksheet, errormessage TYPE string, lv_rangesheetname_old TYPE string, lv_rangesheetname_new TYPE string, lo_ranges_iterator TYPE REF TO cl_object_collection_iterator, lo_range TYPE REF TO zcl_excel_range, lv_range_value TYPE zexcel_range_value, lv_errormessage TYPE string. " Can't pass '...'(abc) to exception-class *--------------------------------------------------------------------* * Check whether title consists only of allowed characters * Illegal characters are: / \ [ ] * ? : --> http://msdn.microsoft.com/en-us/library/ff837411.aspx * Illegal characters not in documentation: ' as first character *--------------------------------------------------------------------* IF ip_title CA '/\[]*?:'. lv_errormessage = 'Found illegal character in sheetname. List of forbidden characters: /\[]*?:'(402). RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDIF. IF ip_title IS NOT INITIAL AND ip_title(1) = `'`. lv_errormessage = 'Sheetname may not start with &'(403). " & used instead of ' to allow fallbacklanguage REPLACE '&' IN lv_errormessage WITH `'`. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDIF. *--------------------------------------------------------------------* * Check whether title is unique in workbook *--------------------------------------------------------------------* lo_worksheets_iterator = me->excel->get_worksheets_iterator( ). WHILE lo_worksheets_iterator->has_next( ) = 'X'. lo_worksheet ?= lo_worksheets_iterator->get_next( ). CHECK me->guid <> lo_worksheet->get_guid( ). " Don't check against itself IF ip_title = lo_worksheet->get_title( ). " Not unique --> raise exception errormessage = 'Duplicate sheetname &'. REPLACE '&' IN errormessage WITH ip_title. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = errormessage. ENDIF. ENDWHILE. *--------------------------------------------------------------------* * Remember old sheetname and rename sheet to desired name *--------------------------------------------------------------------* CONCATENATE me->title '!' INTO lv_rangesheetname_old. me->title = ip_title. *--------------------------------------------------------------------* * After changing this worksheet's title we have to adjust * all ranges that are referring to this worksheet. *--------------------------------------------------------------------* * 2do §1 - Check if the following quickfix is solid * I fear it isn't - but this implementation is better then * nothing at all since it handles a supposed majority of cases *--------------------------------------------------------------------* CONCATENATE me->title '!' INTO lv_rangesheetname_new. lo_ranges_iterator = me->excel->get_ranges_iterator( ). WHILE lo_ranges_iterator->has_next( ) = 'X'. lo_range ?= lo_ranges_iterator->get_next( ). lv_range_value = lo_range->get_value( ). REPLACE ALL OCCURRENCES OF lv_rangesheetname_old IN lv_range_value WITH lv_rangesheetname_new. IF sy-subrc = 0. lo_range->set_range_value( lv_range_value ). ENDIF. ENDWHILE. endmethod. METHOD update_dimension_range. DATA: ls_sheet_content TYPE zexcel_s_cell_data, lt_sheet_content TYPE zexcel_t_cell_data_unsorted, lv_row_alpha TYPE string, lv_column_alpha TYPE zexcel_cell_column_alpha. CHECK sheet_content IS NOT INITIAL. * update dimension range lt_sheet_content = sheet_content. "upper left corner SORT lt_sheet_content BY cell_row. READ TABLE lt_sheet_content INDEX 1 INTO ls_sheet_content. upper_cell-cell_row = ls_sheet_content-cell_row. SORT lt_sheet_content BY cell_column. READ TABLE lt_sheet_content INDEX 1 INTO ls_sheet_content. upper_cell-cell_column = ls_sheet_content-cell_column. lv_row_alpha = upper_cell-cell_row. lv_column_alpha = zcl_excel_common=>convert_column2alpha( upper_cell-cell_column ). SHIFT lv_row_alpha RIGHT DELETING TRAILING space. SHIFT lv_row_alpha LEFT DELETING LEADING space. CONCATENATE lv_column_alpha lv_row_alpha INTO upper_cell-cell_coords. "bottom right corner SORT lt_sheet_content BY cell_row DESCENDING. READ TABLE lt_sheet_content INDEX 1 INTO ls_sheet_content. lower_cell-cell_row = ls_sheet_content-cell_row. SORT lt_sheet_content BY cell_column DESCENDING. READ TABLE lt_sheet_content INDEX 1 INTO ls_sheet_content. lower_cell-cell_column = ls_sheet_content-cell_column. lv_row_alpha = lower_cell-cell_row. lv_column_alpha = zcl_excel_common=>convert_column2alpha( lower_cell-cell_column ). SHIFT lv_row_alpha RIGHT DELETING TRAILING space. SHIFT lv_row_alpha LEFT DELETING LEADING space. CONCATENATE lv_column_alpha lv_row_alpha INTO lower_cell-cell_coords. ENDMETHOD. method ZIF_EXCEL_SHEET_PRINTSETTINGS~CLEAR_PRINT_REPEAT_COLUMNS. *--------------------------------------------------------------------* * adjust internal representation *--------------------------------------------------------------------* CLEAR: me->print_title_col_from, me->print_title_col_to . *--------------------------------------------------------------------* * adjust corresponding range *--------------------------------------------------------------------* me->print_title_set_range( ). endmethod. method ZIF_EXCEL_SHEET_PRINTSETTINGS~CLEAR_PRINT_REPEAT_ROWS. *--------------------------------------------------------------------* * adjust internal representation *--------------------------------------------------------------------* CLEAR: me->print_title_row_from, me->print_title_row_to . *--------------------------------------------------------------------* * adjust corresponding range *--------------------------------------------------------------------* me->print_title_set_range( ). endmethod. method ZIF_EXCEL_SHEET_PRINTSETTINGS~GET_PRINT_REPEAT_COLUMNS. ev_columns_from = me->print_title_col_from. ev_columns_to = me->print_title_col_to. endmethod. method ZIF_EXCEL_SHEET_PRINTSETTINGS~GET_PRINT_REPEAT_ROWS. ev_rows_from = me->print_title_row_from. ev_rows_to = me->print_title_row_to. endmethod. method ZIF_EXCEL_SHEET_PRINTSETTINGS~SET_PRINT_REPEAT_COLUMNS. *--------------------------------------------------------------------* * issue#235 - repeat rows/columns * - Stefan Schmöcker, 2012-12-02 *--------------------------------------------------------------------* DATA: lv_col_from_int TYPE i, lv_col_to_int TYPE i, lv_errormessage TYPE string. lv_col_from_int = zcl_excel_common=>convert_column2int( iv_columns_from ). lv_col_to_int = zcl_excel_common=>convert_column2int( iv_columns_to ). *--------------------------------------------------------------------* * Check if valid range is supplied *--------------------------------------------------------------------* IF lv_col_from_int < 1. lv_errormessage = 'Invalid range supplied for print-title repeatable columns'(401). RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDIF. IF lv_col_from_int > lv_col_to_int. lv_errormessage = 'Invalid range supplied for print-title repeatable columns'(401). RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDIF. *--------------------------------------------------------------------* * adjust internal representation *--------------------------------------------------------------------* me->print_title_col_from = iv_columns_from. me->print_title_col_to = iv_columns_to. *--------------------------------------------------------------------* * adjust corresponding range *--------------------------------------------------------------------* me->print_title_set_range( ). endmethod. method ZIF_EXCEL_SHEET_PRINTSETTINGS~SET_PRINT_REPEAT_ROWS. *--------------------------------------------------------------------* * issue#235 - repeat rows/columns * - Stefan Schmöcker, 2012-12-02 *--------------------------------------------------------------------* DATA: lv_errormessage TYPE string. *--------------------------------------------------------------------* * Check if valid range is supplied *--------------------------------------------------------------------* IF iv_rows_from < 1. lv_errormessage = 'Invalid range supplied for print-title repeatable rowumns'(401). RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDIF. IF iv_rows_from > iv_rows_to. lv_errormessage = 'Invalid range supplied for print-title repeatable rowumns'(401). RAISE EXCEPTION TYPE zcx_excel EXPORTING error = lv_errormessage. ENDIF. *--------------------------------------------------------------------* * adjust internal representation *--------------------------------------------------------------------* me->print_title_row_from = iv_rows_from. me->print_title_row_to = iv_rows_to. *--------------------------------------------------------------------* * adjust corresponding range *--------------------------------------------------------------------* me->print_title_set_range( ). endmethod. method ZIF_EXCEL_SHEET_PROPERTIES~GET_STYLE. IF zif_excel_sheet_properties~style IS NOT INITIAL. ep_style = zif_excel_sheet_properties~style. ELSE. ep_style = me->excel->get_default_style( ). ENDIF. endmethod. method ZIF_EXCEL_SHEET_PROPERTIES~INITIALIZE. zif_excel_sheet_properties~show_zeros = zif_excel_sheet_properties=>c_showzero. zif_excel_sheet_properties~summarybelow = zif_excel_sheet_properties=>c_below_on. zif_excel_sheet_properties~summaryright = zif_excel_sheet_properties=>c_right_on. * inizialize zoomscale values ZIF_EXCEL_SHEET_PROPERTIES~zoomscale = 100. ZIF_EXCEL_SHEET_PROPERTIES~zoomscale_normal = 100. ZIF_EXCEL_SHEET_PROPERTIES~zoomscale_pagelayoutview = 100 . ZIF_EXCEL_SHEET_PROPERTIES~zoomscale_sheetlayoutview = 100 . endmethod. method ZIF_EXCEL_SHEET_PROPERTIES~SET_STYLE. zif_excel_sheet_properties~style = ip_style. endmethod. method ZIF_EXCEL_SHEET_PROTECTION~INITIALIZE. me->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_unprotected. CLEAR me->zif_excel_sheet_protection~password. me->zif_excel_sheet_protection~auto_filter = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~delete_columns = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~delete_rows = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~format_cells = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~format_columns = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~format_rows = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~insert_columns = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~insert_hyperlinks = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~insert_rows = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~objects = zif_excel_sheet_protection=>c_noactive. * me->zif_excel_sheet_protection~password = zif_excel_sheet_protection=>c_noactive. "issue #68 me->zif_excel_sheet_protection~pivot_tables = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~scenarios = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~select_locked_cells = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~select_unlocked_cells = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~sheet = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~sort = zif_excel_sheet_protection=>c_noactive. endmethod. method ZIF_EXCEL_SHEET_VBA_PROJECT~SET_CODENAME. me->zif_excel_sheet_vba_project~codename = ip_codename. endmethod. method ZIF_EXCEL_SHEET_VBA_PROJECT~SET_CODENAME_PR. me->zif_excel_sheet_vba_project~codename_pr = ip_codename_pr. endmethod. ENDCLASS.
[ 4871, 1168, 5097, 62, 6369, 34, 3698, 62, 33249, 9693, 36, 2767, 6770, 198, 220, 1171, 198, 220, 2251, 1171, 764, 198, 198, 11377, 2665, 13, 198, 9, 1, 9, 1171, 6805, 286, 1398, 1168, 5097, 62, 6369, 34, 3698, 62, 33249, 9693, 36, 2767, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 220, 2099, 12, 7742, 82, 9564, 2969, 764, 628, 220, 20314, 1168, 5064, 62, 6369, 34, 3698, 62, 9693, 36, 2767, 62, 4805, 1268, 4694, 2767, 51, 20754, 764, 198, 220, 20314, 1168, 5064, 62, 6369, 34, 3698, 62, 9693, 36, 2767, 62, 4805, 3185, 17395, 11015, 764, 198, 220, 20314, 1168, 5064, 62, 6369, 34, 3698, 62, 9693, 36, 2767, 62, 4805, 2394, 24565, 764, 198, 220, 20314, 1168, 5064, 62, 6369, 34, 3698, 62, 9693, 36, 2767, 62, 53, 4339, 62, 31190, 23680, 764, 628, 220, 3858, 25, 198, 220, 220, 220, 2221, 286, 220, 337, 9936, 62, 50, 62, 12425, 24027, 62, 49, 3913, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 6738, 220, 2099, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 1462, 220, 220, 220, 2099, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14707, 2099, 450, 499, 62, 30388, 11, 198, 220, 220, 220, 220, 220, 220, 220, 886, 286, 285, 774, 62, 82, 62, 448, 1370, 62, 808, 764, 198, 220, 3858, 25, 198, 220, 220, 220, 337, 9936, 62, 4694, 62, 12425, 34509, 1546, 62, 49, 3913, 2099, 23243, 3084, 286, 337, 9936, 62, 50, 62, 12425, 24027, 62, 49, 3913, 351, 3748, 1994, 5752, 62, 6738, 5752, 62, 1462, 764, 628, 220, 38491, 327, 62, 40438, 10206, 62, 25154, 5883, 45, 2099, 1168, 6369, 34, 3698, 62, 40438, 10206, 1988, 362, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 327, 62, 40438, 10206, 62, 45, 11651, 2099, 1168, 6369, 34, 3698, 62, 40438, 10206, 1988, 657, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 327, 62, 40438, 10206, 62, 49, 3913, 2099, 1168, 6369, 34, 3698, 62, 40438, 10206, 1988, 352, 13, 25113, 2943, 5626, 13918, 198, 220, 1366, 7788, 34, 3698, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 1100, 12, 8807, 764, 198, 220, 1366, 4810, 12394, 62, 10761, 2389, 34509, 1546, 2099, 1168, 6369, 34, 3698, 62, 4805, 12394, 62, 10761, 2389, 34509, 1546, 1100, 12, 8807, 1988, 9564, 2969, 62, 37, 23719, 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, 1366, 48052, 2767, 62, 37815, 3525, 2099, 1168, 6369, 34, 3698, 62, 51, 62, 5222, 3069, 62, 26947, 764, 198, 220, 1366, 48052, 2767, 62, 28480, 8577, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 62, 9693, 36, 2767, 62, 28480, 8577, 764, 198, 220, 1366, 37041, 62, 10761, 2389, 34509, 1546, 2099, 1168, 6369, 34, 3698, 62, 9693, 3913, 62, 10761, 2389, 34509, 1546, 1100, 12, 8807, 1988, 9564, 2969, 62, 5446, 8924, 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, 1366, 37041, 62, 49, 3913, 25154, 37682, 4877, 2099, 1168, 6369, 34, 3698, 62, 9693, 3913, 62, 10761, 2389, 34509, 1546, 1100, 12, 8807, 1988, 9564, 2969, 62, 5446, 8924, 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, 1366, 3563, 56, 28378, 2099, 1168, 6369, 34, 3698, 62, 51, 62, 9693, 36, 2767, 62, 2257, 56, 2538, 764, 198, 220, 1366, 21664, 2749, 3535, 1581, 2099, 1168, 6369, 34, 3698, 62, 50, 62, 5603, 2749, 3535, 1581, 1100, 12, 8807, 764, 628, 220, 5050, 27841, 62, 35, 20530, 2751, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 4061, 62, 35, 20530, 2751, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 62, 35, 20530, 2751, 764, 198, 220, 5050, 27841, 62, 13965, 62, 10943, 35, 17941, 1847, 62, 2257, 56, 2538, 198, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 1988, 7, 4720, 62, 10943, 35, 17941, 1847, 62, 2257, 56, 2538, 8, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 62, 2257, 56, 2538, 62, 10943, 35, 17941, 1847, 764, 198, 220, 5050, 27841, 62, 13965, 62, 26947, 62, 23428, 2389, 6234, 198, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 1988, 7, 4720, 62, 26947, 62, 23428, 2389, 6234, 8, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 62, 26947, 62, 23428, 2389, 6234, 764, 198, 220, 5050, 27841, 62, 13965, 62, 49, 27746, 198, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 1988, 7, 4720, 62, 49, 27746, 8, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 62, 49, 27746, 764, 198, 220, 5050, 347, 12115, 62, 1847, 53, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 9399, 62, 1847, 53, 2099, 1006, 284, 25334, 23680, 198, 220, 220, 220, 220, 220, 5145, 2043, 62, 38148, 2099, 49053, 9795, 43679, 198, 220, 220, 220, 220, 220, 5145, 40, 62, 35222, 2099, 314, 4277, 352, 198, 220, 220, 220, 220, 220, 5145, 40, 62, 2538, 9792, 2099, 314, 4277, 352, 198, 220, 220, 220, 220, 220, 5145, 38148, 62, 2257, 56, 2538, 2099, 1168, 6369, 34, 3698, 62, 38148, 62, 2257, 56, 2538, 11902, 198, 220, 220, 220, 220, 220, 5145, 40, 62, 38148, 2099, 9564, 2969, 62, 8202, 3535, 4277, 9564, 2969, 62, 5446, 8924, 198, 220, 220, 220, 8620, 198, 220, 220, 220, 220, 220, 1168, 34, 55, 62, 6369, 34, 3698, 764, 198, 220, 2099, 12, 7742, 82, 12419, 1797, 764, 198, 220, 2099, 12, 7742, 82, 12809, 40, 764, 198, 220, 5050, 347, 12115, 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, 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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 ]
CLASS zcl_abapgit_object_char DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES zif_abapgit_object . PROTECTED SECTION. PRIVATE SECTION. TYPES: BEGIN OF ty_char, cls_attribute TYPE cls_attribute, cls_attributet TYPE STANDARD TABLE OF cls_attributet WITH DEFAULT KEY, cls_attr_value TYPE STANDARD TABLE OF cls_attr_value WITH DEFAULT KEY, cls_attr_valuet TYPE STANDARD TABLE OF cls_attr_valuet WITH DEFAULT KEY, END OF ty_char . METHODS instantiate_char IMPORTING !iv_type_group TYPE cls_object_type_group RETURNING VALUE(ro_char) TYPE REF TO cl_cls_attribute RAISING zcx_abapgit_exception . ENDCLASS. CLASS ZCL_ABAPGIT_OBJECT_CHAR IMPLEMENTATION. METHOD instantiate_char. DATA: lv_new TYPE abap_bool, lv_name TYPE cls_attribute_name. SELECT SINGLE name FROM cls_attribute INTO lv_name WHERE name = ms_item-obj_name. lv_new = boolc( sy-subrc <> 0 ). lv_name = ms_item-obj_name. TRY. CREATE OBJECT ro_char EXPORTING im_name = lv_name im_type_group = iv_type_group im_new = lv_new. CATCH cx_pak_invalid_data cx_pak_not_authorized cx_pak_invalid_state cx_pak_wb_object_locked. zcx_abapgit_exception=>raise( 'Error while instantiating CL_CLS_ATTRIBUTE' ). ENDTRY. IF lv_new = abap_false. TRY. ro_char->if_pak_wb_object~lock_and_refresh( ). CATCH cx_pak_invalid_data cx_pak_not_authorized cx_pak_invalid_state cx_pak_wb_object_locked. zcx_abapgit_exception=>raise( |Could not aquire lock, CHAR { lv_name }| ). ENDTRY. ENDIF. ENDMETHOD. METHOD zif_abapgit_object~changed_by. SELECT SINGLE changed_by FROM cls_attribute INTO rv_user WHERE name = ms_item-obj_name AND activation_state = 'A'. IF rv_user IS INITIAL. SELECT SINGLE created_by FROM cls_attribute INTO rv_user WHERE name = ms_item-obj_name AND activation_state = 'A'. ENDIF. IF rv_user IS INITIAL. rv_user = c_user_unknown. ENDIF. ENDMETHOD. METHOD zif_abapgit_object~delete. DATA: lo_char TYPE REF TO cl_cls_attribute, lv_type_group TYPE cls_attribute-type_group, lx_pak_error TYPE REF TO cx_root, lv_text TYPE string. SELECT SINGLE type_group FROM cls_attribute INTO lv_type_group WHERE name = ms_item-obj_name AND activation_state = 'A'. lo_char = instantiate_char( lv_type_group ). TRY. lo_char->if_pak_wb_object~delete( ). lo_char->if_pak_wb_object~save( ). lo_char->if_pak_wb_object_internal~unlock( ). CATCH cx_pak_invalid_state cx_pak_invalid_data cx_pak_not_authorized INTO lx_pak_error. lv_text = lx_pak_error->get_text( ). zcx_abapgit_exception=>raise( lv_text ). ENDTRY. ENDMETHOD. METHOD zif_abapgit_object~deserialize. DATA: ls_char TYPE ty_char, ls_description LIKE LINE OF ls_char-cls_attributet, lo_char TYPE REF TO cl_cls_attribute, lx_pak_error TYPE REF TO cx_root, lv_text TYPE string. FIELD-SYMBOLS: <ls_value> LIKE LINE OF ls_char-cls_attr_value, <ls_valuet> LIKE LINE OF ls_char-cls_attr_valuet. io_xml->read( EXPORTING iv_name = 'CHAR' CHANGING cg_data = ls_char ). tadir_insert( iv_package ). lo_char = instantiate_char( ls_char-cls_attribute-type_group ). TRY. lo_char->if_cls_attribute~set_kind( ls_char-cls_attribute-kind ). lo_char->if_cls_attribute~set_single_valued( ls_char-cls_attribute-is_single_valued ). lo_char->if_cls_attribute~set_aspect( im_aspect_for = ls_char-cls_attribute-is_aspect_for im_aspect_value = ls_char-cls_attribute-aspect_value ). lo_char->if_cls_attribute~set_default_flag( ls_char-cls_attribute-default_flag ). lo_char->if_cls_attribute~set_default_value( ls_char-cls_attribute-default_value ). lo_char->if_cls_attribute~set_sub_object_treatment( ls_char-cls_attribute-sub_obj_treatm ). lo_char->if_cls_attribute~set_automatic_changes_allowed( ls_char-cls_attribute-automatic_change ). lo_char->if_cls_attribute~set_manual_changes_allowed( ls_char-cls_attribute-manu_chag_allow ). lo_char->if_cls_attribute~set_implicit_changes_allowed( ls_char-cls_attribute-implicit_change ). lo_char->if_cls_attribute~set_expl_values_dominate_links( ls_char-cls_attribute-weak_links ). lo_char->if_cls_attribute~set_assignment_package_rule( ls_char-cls_attribute-assignment_devc ). lo_char->if_cls_attribute~set_hide_remark( ls_char-cls_attribute-hide_remark ). lo_char->if_cls_attribute~set_visible_in_customer_system( ls_char-cls_attribute-visible_for_cust ). lo_char->if_cls_attribute~set_value_table( ls_char-cls_attribute-value_table ). lo_char->if_cls_attribute~set_vtable_field( ls_char-cls_attribute-vtable_field ). lo_char->if_cls_attribute~set_vtable_icon_f( ls_char-cls_attribute-vtable_icon_f ). lo_char->if_cls_attribute~set_vtext_langu_f( ls_char-cls_attribute-vtext_langu_f ). lo_char->if_cls_attribute~set_vtext_table( ls_char-cls_attribute-vtext_table ). lo_char->if_cls_attribute~set_vtext_text_f( ls_char-cls_attribute-vtext_text_f ). lo_char->if_cls_attribute~set_vtext_value_f( ls_char-cls_attribute-vtext_value_f ). lo_char->if_cls_attribute~set_existing_objects_only( ls_char-cls_attribute-existing_objects ). lo_char->if_cls_attribute~set_objs_of_typegr( ls_char-cls_attribute-objs_of_typegr ). lo_char->if_cls_attribute~set_obj_values_have_subtypes( ls_char-cls_attribute-objs_w_subtype ). lo_char->if_cls_attribute~set_arbtry_val_type( ls_char-cls_attribute-arbtry_val_type ). READ TABLE ls_char-cls_attributet INTO ls_description WITH KEY langu = mv_language. IF sy-subrc <> 0. READ TABLE ls_char-cls_attributet INTO ls_description INDEX 1. ENDIF. lo_char->if_cls_attribute~set_description( ls_description-text ). LOOP AT ls_char-cls_attr_value ASSIGNING <ls_value>. <ls_value>-activation_state = 'I'. ENDLOOP. LOOP AT ls_char-cls_attr_valuet ASSIGNING <ls_valuet>. <ls_valuet>-activation_state = 'I'. ENDLOOP. lo_char->if_cls_attribute~set_values( im_values = ls_char-cls_attr_value im_values_t = ls_char-cls_attr_valuet ). set_default_package( iv_package ). lo_char->if_pak_wb_object~save( ). lo_char->if_pak_wb_object~activate( ). lo_char->if_pak_wb_object_internal~unlock( ). CATCH cx_pak_invalid_state cx_pak_invalid_data cx_pak_not_authorized INTO lx_pak_error. lv_text = lx_pak_error->get_text( ). zcx_abapgit_exception=>raise( lv_text ). ENDTRY. ENDMETHOD. METHOD zif_abapgit_object~exists. rv_bool = cl_cls_attribute=>exists_object_attribute( ms_item-obj_name ). 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 = exists_a_lock_entry_for( iv_lock_object = 'ECLS_ATTRIBUTE' iv_argument = |{ ms_item-obj_name }*| ). 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. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from RS_TOOL_ACCESS, CHAR| ). ENDIF. ENDMETHOD. METHOD zif_abapgit_object~serialize. DATA: ls_char TYPE ty_char. CONSTANTS: lc_active TYPE c LENGTH 1 VALUE 'A'. SELECT SINGLE * FROM cls_attribute INTO ls_char-cls_attribute WHERE name = ms_item-obj_name AND activation_state = lc_active. * todo, ASSIGNMENT_DEVC? CLEAR: ls_char-cls_attribute-created_by, ls_char-cls_attribute-created_on, ls_char-cls_attribute-changed_by, ls_char-cls_attribute-changed_on. SELECT * FROM cls_attributet INTO TABLE ls_char-cls_attributet WHERE name = ms_item-obj_name AND activation_state = lc_active. SELECT * FROM cls_attr_value INTO TABLE ls_char-cls_attr_value WHERE name = ms_item-obj_name AND activation_state = lc_active. SELECT * FROM cls_attr_valuet INTO TABLE ls_char-cls_attr_valuet WHERE name = ms_item-obj_name AND activation_state = lc_active. io_xml->add( iv_name = 'CHAR' ig_data = ls_char ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 10641, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 16668, 198, 220, 25261, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 23255, 37, 2246, 1546, 1976, 361, 62, 397, 499, 18300, 62, 15252, 764, 628, 220, 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, 10641, 11, 198, 220, 220, 220, 220, 220, 220, 220, 537, 82, 62, 42348, 220, 220, 41876, 537, 82, 62, 42348, 11, 198, 220, 220, 220, 220, 220, 220, 220, 537, 82, 62, 1078, 2455, 316, 220, 41876, 49053, 9795, 43679, 3963, 537, 82, 62, 1078, 2455, 316, 13315, 5550, 38865, 35374, 11, 198, 220, 220, 220, 220, 220, 220, 220, 537, 82, 62, 35226, 62, 8367, 220, 41876, 49053, 9795, 43679, 3963, 537, 82, 62, 35226, 62, 8367, 13315, 5550, 38865, 35374, 11, 198, 220, 220, 220, 220, 220, 220, 220, 537, 82, 62, 35226, 62, 2100, 84, 316, 41876, 49053, 9795, 43679, 3963, 537, 82, 62, 35226, 62, 2100, 84, 316, 13315, 5550, 38865, 35374, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 10641, 764, 628, 220, 220, 220, 337, 36252, 50, 9113, 9386, 62, 10641, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 4906, 62, 8094, 41876, 537, 82, 62, 15252, 62, 4906, 62, 8094, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 305, 62, 10641, 8, 41876, 4526, 37, 5390, 537, 62, 565, 82, 62, 42348, 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, 9864, 23680, 62, 38019, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 9113, 9386, 62, 10641, 13, 628, 220, 220, 220, 42865, 25, 300, 85, 62, 3605, 220, 41876, 450, 499, 62, 30388, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 3672, 41876, 537, 82, 62, 42348, 62, 3672, 13, 628, 198, 220, 220, 220, 33493, 311, 2751, 2538, 1438, 16034, 537, 82, 62, 42348, 39319, 300, 85, 62, 3672, 33411, 1438, 796, 13845, 62, 9186, 12, 26801, 62, 3672, 13, 198, 220, 220, 220, 300, 85, 62, 3605, 796, 20512, 66, 7, 827, 12, 7266, 6015, 1279, 29, 657, 6739, 198, 220, 220, 220, 300, 85, 62, 3672, 796, 13845, 62, 9186, 12, 26801, 62, 3672, 13, 628, 220, 220, 220, 7579, 56, 13, 198, 220, 220, 220, 220, 220, 220, 220, 29244, 6158, 25334, 23680, 686, 62, 10641, 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, 545, 62, 3672, 220, 220, 220, 220, 220, 220, 796, 300, 85, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 62, 4906, 62, 8094, 796, 21628, 62, 4906, 62, 8094, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 62, 3605, 220, 220, 220, 220, 220, 220, 220, 796, 300, 85, 62, 3605, 13, 198, 220, 220, 220, 220, 220, 327, 11417, 43213, 62, 41091, 62, 259, 12102, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43213, 62, 41091, 62, 1662, 62, 19721, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43213, 62, 41091, 62, 259, 12102, 62, 5219, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43213, 62, 41091, 62, 39346, 62, 15252, 62, 24162, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 14804, 40225, 7, 705, 12331, 981, 9113, 26336, 7852, 62, 5097, 50, 62, 1404, 5446, 9865, 37780, 6, 6739, 198, 220, 220, 220, 23578, 40405, 13, 628, 220, 220, 220, 16876, 300, 85, 62, 3605, 796, 450, 499, 62, 9562, 13, 198, 220, 220, 220, 220, 220, 7579, 56, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 686, 62, 10641, 3784, 361, 62, 41091, 62, 39346, 62, 15252, 93, 5354, 62, 392, 62, 5420, 3447, 7, 6739, 198, 220, 220, 220, 220, 220, 220, 220, 327, 11417, 43213, 62, 41091, 62, 259, 12102, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43213, 62, 41091, 62, 1662, 62, 19721, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43213, 62, 41091, 62, 259, 12102, 62, 5219, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43213, 62, 41091, 62, 39346, 62, 15252, 62, 24162, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 14804, 40225, 7, 930, 23722, 407, 14839, 557, 5793, 11, 28521, 1391, 300, 85, 62, 3672, 1782, 91, 6739, 198, 220, 220, 220, 220, 220, 23578, 40405, 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, 40985, 62, 1525, 13, 628, 220, 220, 220, 33493, 311, 2751, 2538, 3421, 62, 1525, 16034, 537, 82, 62, 42348, 39319, 374, 85, 62, 7220, 198, 220, 220, 220, 220, 220, 33411, 1438, 796, 13845, 62, 9186, 12, 26801, 62, 3672, 198, 220, 220, 220, 220, 220, 5357, 14916, 62, 5219, 796, 705, 32, 4458, 628, 220, 220, 220, 16876, 374, 85, 62, 7220, 3180, 3268, 2043, 12576, 13, 198, 220, 220, 220, 220, 220, 33493, 311, 2751, 2538, 2727, 62, 1525, 16034, 537, 82, 62, 42348, 39319, 374, 85, 62, 7220, 198, 220, 220, 220, 220, 220, 220, 220, 33411, 1438, 796, 13845, 62, 9186, 12, 26801, 62, 3672, 198, 220, 220, 220, 220 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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 ]
CLASS zcl_abapgit_object_by_sobj DEFINITION PUBLIC INHERITING FROM zcl_abapgit_object CREATE PUBLIC . PUBLIC SECTION. INTERFACES zif_abapgit_plugin. CLASS-METHODS class_constructor. METHODS get_supported_obj_types REDEFINITION. PROTECTED SECTION. PRIVATE SECTION. METHODS get_tlogo_bridge RETURNING VALUE(ro_tlogo_bridge) TYPE REF TO lcl_tlogo_bridge RAISING zcx_abapgit_object. DATA mo_tlogo_bridge TYPE REF TO lcl_tlogo_bridge. CLASS-DATA gt_supported_obj_types TYPE objtyptable. ENDCLASS. CLASS ZCL_ABAPGIT_OBJECT_BY_SOBJ IMPLEMENTATION. METHOD class_constructor. DATA: lt_all_objectname TYPE STANDARD TABLE OF objh-objectname WITH DEFAULT KEY, lv_objectname LIKE LINE OF lt_all_objectname, lv_obj_type LIKE LINE OF gt_supported_obj_types. gv_serializer_classname = 'ZCL_ABAPGIT_OBJECT_BY_SOBJ'. gv_serializer_version = '1.0'. SELECT objectname FROM objh INTO TABLE lt_all_objectname WHERE objecttype = 'L'. "#EC CI_GENBUFF LOOP AT lt_all_objectname INTO lv_objectname. IF strlen( lv_objectname ) <= 4. lv_obj_type = lv_objectname. INSERT lv_obj_type INTO TABLE gt_supported_obj_types. ENDIF. ENDLOOP. ENDMETHOD. METHOD get_supported_obj_types. rt_obj_type = gt_supported_obj_types. ENDMETHOD. METHOD get_tlogo_bridge. IF mo_tlogo_bridge IS INITIAL. TRY. DATA lx_bridge_creation TYPE REF TO lcx_obj_exception. CREATE OBJECT mo_tlogo_bridge EXPORTING iv_object = mv_obj_type iv_object_name = mv_obj_name. CATCH lcx_obj_exception INTO lx_bridge_creation. RAISE EXCEPTION TYPE zcx_abapgit_object EXPORTING text = lx_bridge_creation->get_text( ) previous = lx_bridge_creation. ENDTRY. ENDIF. ro_tlogo_bridge = mo_tlogo_bridge. ENDMETHOD. METHOD zif_abapgit_plugin~delete. get_tlogo_bridge( )->delete_object_on_db( ). ENDMETHOD. METHOD zif_abapgit_plugin~deserialize. DATA lo_object_container TYPE REF TO lcl_abapgit_xml_container. DATA lx_obj_exception TYPE REF TO lcx_obj_exception. CREATE OBJECT lo_object_container. lo_object_container->set_xml_input( io_xml ). TRY. get_tlogo_bridge( )->import_object( lo_object_container ). CATCH lcx_obj_exception INTO lx_obj_exception. RAISE EXCEPTION TYPE zcx_abapgit_object EXPORTING text = |{ mv_obj_type } { mv_obj_name }: { lx_obj_exception->get_error_text( ) }| previous = lx_obj_exception. ENDTRY. me->create_tadir_entry( iv_package ). ENDMETHOD. METHOD zif_abapgit_plugin~exists. TRY. rv_bool = get_tlogo_bridge( )->instance_exists( ). CATCH lcx_obj_exception. rv_bool = abap_false. ENDTRY. ENDMETHOD. METHOD zif_abapgit_plugin~get_metadata. rs_metadata = get_metadata( ). rs_metadata-delete_tadir = abap_true. ENDMETHOD. METHOD zif_abapgit_plugin~jump. RETURN. ENDMETHOD. METHOD zif_abapgit_plugin~serialize. DATA lo_object_container TYPE REF TO lcl_abapgit_xml_container. DATA lx_obj_exception TYPE REF TO lcx_obj_exception. TRY. IF get_tlogo_bridge( )->instance_exists( ) = abap_true. CREATE OBJECT lo_object_container. lo_object_container->set_xml_output( io_xml ). get_tlogo_bridge( )->export_object( lo_object_container ). ENDIF. "No else needed - if the object does not exist, we'll not serialize anything CATCH lcx_obj_exception INTO lx_obj_exception. RAISE EXCEPTION TYPE zcx_abapgit_object EXPORTING text = lx_obj_exception->get_text( ) previous = lx_obj_exception. ENDTRY. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 1525, 62, 568, 50007, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 397, 499, 18300, 62, 15252, 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, 33803, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 1398, 62, 41571, 273, 13, 628, 220, 220, 220, 337, 36252, 50, 651, 62, 15999, 62, 26801, 62, 19199, 23848, 36, 20032, 17941, 13, 628, 220, 48006, 9782, 1961, 44513, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 651, 62, 83, 6404, 78, 62, 9458, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 305, 62, 83, 6404, 78, 62, 9458, 8, 41876, 4526, 37, 5390, 300, 565, 62, 83, 6404, 78, 62, 9458, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 15252, 13, 628, 220, 220, 220, 42865, 6941, 62, 83, 6404, 78, 62, 9458, 41876, 4526, 37, 5390, 300, 565, 62, 83, 6404, 78, 62, 9458, 13, 628, 220, 220, 220, 42715, 12, 26947, 308, 83, 62, 15999, 62, 26801, 62, 19199, 41876, 26181, 774, 457, 540, 13, 198, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 6242, 2969, 38, 2043, 62, 9864, 23680, 62, 17513, 62, 50, 9864, 41, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 1398, 62, 41571, 273, 13, 628, 220, 220, 220, 42865, 25, 300, 83, 62, 439, 62, 15252, 3672, 41876, 49053, 9795, 43679, 3963, 26181, 71, 12, 15252, 3672, 13315, 5550, 38865, 35374, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 15252, 3672, 220, 220, 220, 220, 34178, 48920, 3963, 300, 83, 62, 439, 62, 15252, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 26801, 62, 4906, 220, 220, 220, 220, 220, 220, 34178, 48920, 3963, 308, 83, 62, 15999, 62, 26801, 62, 19199, 13, 628, 198, 220, 220, 220, 308, 85, 62, 46911, 7509, 62, 4871, 3672, 796, 705, 57, 5097, 62, 6242, 2969, 38, 2043, 62, 9864, 23680, 62, 17513, 62, 50, 9864, 41, 4458, 198, 220, 220, 220, 308, 85, 62, 46911, 7509, 62, 9641, 220, 220, 796, 705, 16, 13, 15, 4458, 628, 220, 220, 220, 33493, 2134, 3672, 16034, 26181, 71, 198, 220, 220, 220, 220, 220, 39319, 43679, 300, 83, 62, 439, 62, 15252, 3672, 198, 220, 220, 220, 220, 220, 33411, 2134, 4906, 796, 705, 43, 4458, 220, 220, 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, 14514, 62, 35353, 19499, 5777, 628, 220, 220, 220, 17579, 3185, 5161, 300, 83, 62, 439, 62, 15252, 3672, 39319, 300, 85, 62, 15252, 3672, 13, 198, 220, 220, 220, 220, 220, 16876, 965, 11925, 7, 300, 85, 62, 15252, 3672, 1267, 19841, 604, 13, 198, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 26801, 62, 4906, 796, 300, 85, 62, 15252, 3672, 13, 198, 220, 220, 220, 220, 220, 220, 220, 29194, 17395, 300, 85, 62, 26801, 62, 4906, 39319, 43679, 308, 83, 62, 15999, 62, 26801, 62, 19199, 13, 198, 220, 220, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 23578, 21982, 3185, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 651, 62, 15999, 62, 26801, 62, 19199, 13, 198, 220, 220, 220, 374, 83, 62, 26801, 62, 4906, 796, 308, 83, 62, 15999, 62, 26801, 62, 19199, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 651, 62, 83, 6404, 78, 62, 9458, 13, 198, 220, 220, 220, 16876, 6941, 62, 83, 6404, 78, 62, 9458, 3180, 3268, 2043, 12576, 13, 628, 220, 220, 220, 220, 220, 7579, 56, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42865, 300, 87, 62, 9458, 62, 38793, 41876, 4526, 37, 5390, 300, 66, 87, 62, 26801, 62, 1069, 4516, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29244, 6158, 25334, 23680, 6941, 62, 83, 6404, 78, 62, 9458, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 15252, 220, 220, 220, 220, 220, 796, 285, 85, 62, 26801, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 15252, 62, 3672, 796, 285, 85, 62, 26801, 62, 3672, 13, 198, 220, 220, 220, 220, 220, 220, 220, 327, 11417, 300, 66, 87, 62, 26801, 62, 1069, 4516, 39319, 300, 87, 62, 9458, 62, 38793, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17926, 24352, 7788, 42006, 2849, 41876, 1976, 66, 87, 62, 397, 499, 18300, 62, 15252, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 220, 220, 220, 220, 796, 300, 87, 62, 9458, 62, 38793, 3784, 1136, 62, 5239, 7, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2180, 796, 300, 87, 62, 9458, 62, 38793, 13, 198, 220, 220, 220, 220, 220, 23578, 40405, 13, 198, 220, 220, 220, 23578, 5064, 13, 628, 220, 220, 220, 686, 62, 83, 6404, 78, 62, 9458, 796, 6941, 62, 83, 6404, 78, 62, 9458, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 33803, 93, 33678, 13, 628, 220, 220, 220, 651, 62, 83, 6404, 78, 62, 9458, 7, 1267, 3784, 33678, 62, 15252, 62, 261, 62, 9945, 7, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 33803, 93, 8906, 48499, 1096, 13, 198, 220, 220, 220, 42865, 2376, 62, 15252, 62, 34924, 41876, 4526, 37, 5390, 300 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
CLASS zcl_abapgit_oo_class_new DEFINITION PUBLIC INHERITING FROM zcl_abapgit_oo_class. PUBLIC SECTION. METHODS: zif_abapgit_oo_object_fnc~create REDEFINITION, zif_abapgit_oo_object_fnc~generate_locals REDEFINITION, zif_abapgit_oo_object_fnc~deserialize_source REDEFINITION. PRIVATE SECTION. CLASS-METHODS update_source_index IMPORTING !iv_clsname TYPE csequence !io_scanner TYPE REF TO cl_oo_source_scanner_class . CLASS-METHODS update_report IMPORTING !iv_program TYPE programm !it_source TYPE string_table RETURNING VALUE(rv_updated) TYPE abap_bool RAISING zcx_abapgit_exception . CLASS-METHODS generate_classpool IMPORTING !iv_name TYPE seoclsname RAISING zcx_abapgit_exception . CLASS-METHODS update_meta IMPORTING !iv_name TYPE seoclsname !iv_exposure TYPE seoexpose !it_source TYPE rswsourcet RAISING zcx_abapgit_exception . CLASS-METHODS determine_method_include IMPORTING !iv_name TYPE seoclsname !iv_method TYPE seocpdname RETURNING VALUE(rv_program) TYPE programm RAISING zcx_abapgit_exception . CLASS-METHODS init_scanner IMPORTING !it_source TYPE zif_abapgit_definitions=>ty_string_tt !iv_name TYPE seoclsname RETURNING VALUE(ro_scanner) TYPE REF TO cl_oo_source_scanner_class RAISING zcx_abapgit_exception . CLASS-METHODS update_full_class_include IMPORTING !iv_classname TYPE seoclsname !it_source TYPE string_table !it_methods TYPE cl_oo_source_scanner_class=>type_method_implementations . CLASS-METHODS create_report IMPORTING !iv_program TYPE programm !it_source TYPE string_table !iv_extension TYPE sychar02 !iv_program_type TYPE sychar01 !iv_version TYPE r3state . CLASS-METHODS update_cs_number_of_methods IMPORTING !iv_classname TYPE seoclsname !iv_number_of_impl_methods TYPE i . ENDCLASS. CLASS ZCL_ABAPGIT_OO_CLASS_NEW IMPLEMENTATION. METHOD create_report. INSERT REPORT iv_program FROM it_source EXTENSION TYPE iv_extension STATE iv_version PROGRAM TYPE iv_program_type. ASSERT sy-subrc = 0. ENDMETHOD. METHOD determine_method_include. DATA: ls_mtdkey TYPE seocpdkey. ls_mtdkey-clsname = iv_name. ls_mtdkey-cpdname = iv_method. cl_oo_classname_service=>get_method_include( EXPORTING mtdkey = ls_mtdkey RECEIVING result = rv_program EXCEPTIONS method_not_existing = 1 ). IF sy-subrc = 0. RETURN. ENDIF. CALL FUNCTION 'SEO_METHOD_GENERATE_INCLUDE' EXPORTING suppress_mtdkey_check = seox_true mtdkey = ls_mtdkey EXCEPTIONS not_existing = 1 model_only = 2 include_existing = 3 method_imp_not_generated = 4 method_imp_not_initialised = 5 _internal_class_not_existing = 6 _internal_method_overflow = 7 cancelled = 8 method_is_abstract_implemented = 9 method_is_final_implemented = 10 internal_error_insert_report = 11 OTHERS = 12. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from SEO_METHOD_GENERATE_INCLUDE' ). ENDIF. rv_program = cl_oo_classname_service=>get_method_include( ls_mtdkey ). ENDMETHOD. METHOD generate_classpool. DATA: ls_clskey TYPE seoclskey. ls_clskey-clsname = iv_name. CALL FUNCTION 'SEO_CLASS_GENERATE_CLASSPOOL' EXPORTING clskey = ls_clskey suppress_corr = seox_true EXCEPTIONS not_existing = 1 model_only = 2 class_pool_not_generated = 3 class_stment_not_generated = 4 locals_not_generated = 5 macros_not_generated = 6 public_sec_not_generated = 7 protected_sec_not_generated = 8 private_sec_not_generated = 9 typeref_not_generated = 10 class_pool_not_initialised = 11 class_stment_not_initialised = 12 locals_not_initialised = 13 macros_not_initialised = 14 public_sec_not_initialised = 15 protected_sec_not_initialised = 16 private_sec_not_initialised = 17 typeref_not_initialised = 18 _internal_class_overflow = 19 OTHERS = 20. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from SEO_CLASS_GENERATE_CLASSPOOL' ). ENDIF. ENDMETHOD. METHOD init_scanner. TRY. ro_scanner = cl_oo_source_scanner_class=>create_class_scanner( clif_name = iv_name source = it_source ). ro_scanner->scan( ). CATCH cx_clif_scan_error. zcx_abapgit_exception=>raise( 'error initializing CLAS scanner' ). ENDTRY. ENDMETHOD. METHOD update_cs_number_of_methods. " Indirect access to keep downward compatibility DATA lr_cache_entry TYPE REF TO data. FIELD-SYMBOLS: <lg_cache_entry> TYPE any, <lg_field> TYPE any. TRY. CREATE DATA lr_cache_entry TYPE ('SEO_CS_CACHE'). CATCH cx_sy_create_data_error. * does not exist in some older systems RETURN. ENDTRY. ASSIGN lr_cache_entry->* TO <lg_cache_entry>. ASSERT sy-subrc = 0. ASSIGN COMPONENT 'CLSNAME' OF STRUCTURE <lg_cache_entry> TO <lg_field>. ASSERT sy-subrc = 0. <lg_field> = iv_classname. ASSIGN COMPONENT 'NO_OF_METHOD_IMPLS' OF STRUCTURE <lg_cache_entry> TO <lg_field>. ASSERT sy-subrc = 0. <lg_field> = iv_number_of_impl_methods. MODIFY ('SEO_CS_CACHE') FROM <lg_cache_entry>. ENDMETHOD. METHOD update_full_class_include. CONSTANTS: lc_class_source_extension TYPE sychar02 VALUE 'CS', lc_include_program_type TYPE sychar01 VALUE 'I', lc_active_version TYPE r3state VALUE 'A'. create_report( iv_program = cl_oo_classname_service=>get_cs_name( iv_classname ) it_source = it_source iv_extension = lc_class_source_extension iv_program_type = lc_include_program_type iv_version = lc_active_version ). " Assuming that all methods that were scanned are implemented update_cs_number_of_methods( iv_classname = iv_classname iv_number_of_impl_methods = lines( it_methods ) ). ENDMETHOD. METHOD update_meta. DATA: lo_update TYPE REF TO cl_oo_class_section_source, ls_clskey TYPE seoclskey, lv_scan_error TYPE seox_boolean. ls_clskey-clsname = iv_name. TRY. CREATE OBJECT lo_update TYPE ('CL_OO_CLASS_SECTION_SOURCE') EXPORTING clskey = ls_clskey exposure = iv_exposure state = 'A' source = it_source suppress_constrctr_generation = seox_true EXCEPTIONS class_not_existing = 1 read_source_error = 2 OTHERS = 3. CATCH cx_sy_dyn_call_param_not_found. * downport to 702, see https://github.com/larshp/abapGit/issues/933 * this will READ REPORT instead of using it_source, which should be okay CREATE OBJECT lo_update TYPE cl_oo_class_section_source EXPORTING clskey = ls_clskey exposure = iv_exposure state = 'A' EXCEPTIONS class_not_existing = 1 read_source_error = 2 OTHERS = 3. ENDTRY. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error instantiating CL_OO_CLASS_SECTION_SOURCE' ). ENDIF. lo_update->set_dark_mode( seox_true ). TRY. CALL METHOD lo_update->('SET_AMDP_SUPPORT') EXPORTING enabled = abap_true. CATCH cx_sy_dyn_call_illegal_method. * AMDP not supported in this system, ignore error ENDTRY. lo_update->scan_section_source( RECEIVING scan_error = lv_scan_error EXCEPTIONS scan_abap_source_error = 1 OTHERS = 2 ). IF sy-subrc <> 0 OR lv_scan_error = abap_true. zcx_abapgit_exception=>raise( 'CLAS, error while scanning source' ). ENDIF. * this will update the SEO* database tables lo_update->revert_scan_result( ). IF iv_exposure = seoc_exposure_public. generate_classpool( iv_name ). ENDIF. ENDMETHOD. METHOD update_report. DATA: lt_old TYPE string_table. READ REPORT iv_program INTO lt_old. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Fatal error. Include { iv_program } should have been created previously!| ). ENDIF. IF lt_old <> it_source. INSERT REPORT iv_program FROM it_source. ASSERT sy-subrc = 0. rv_updated = abap_true. ELSE. rv_updated = abap_false. ENDIF. ENDMETHOD. METHOD update_source_index. CONSTANTS: lc_version_active TYPE r3state VALUE 'A', "#EC NOTEXT lc_version_inactive TYPE r3state VALUE 'I'. "#EC NOTEXT " dynamic invocation, IF_OO_SOURCE_POS_INDEX_HELPER doesn't exist in 702. DATA lo_index_helper TYPE REF TO object. TRY. CREATE OBJECT lo_index_helper TYPE ('CL_OO_SOURCE_POS_INDEX_HELPER'). CALL METHOD lo_index_helper->('IF_OO_SOURCE_POS_INDEX_HELPER~CREATE_INDEX_WITH_SCANNER') EXPORTING class_name = iv_clsname version = lc_version_active scanner = io_scanner. CALL METHOD lo_index_helper->('IF_OO_SOURCE_POS_INDEX_HELPER~DELETE_INDEX') EXPORTING class_name = iv_clsname version = lc_version_inactive. CATCH cx_root. " it's probably okay to no update the index RETURN. ENDTRY. ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~create. * same as in super class, but with "version = seoc_version_active" CALL FUNCTION 'SEO_CLASS_CREATE_COMPLETE' EXPORTING devclass = iv_package overwrite = iv_overwrite version = seoc_version_active CHANGING class = cg_properties EXCEPTIONS existing = 1 is_interface = 2 db_error = 3 component_error = 4 no_access = 5 other = 6 OTHERS = 7. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from SEO_CLASS_CREATE_COMPLETE' ). ENDIF. ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~deserialize_source. DATA: lv_updated TYPE abap_bool, lv_program TYPE program, lo_scanner TYPE REF TO cl_oo_source_scanner_class, lt_methods TYPE cl_oo_source_scanner_class=>type_method_implementations, lv_method LIKE LINE OF lt_methods, lt_source TYPE seop_source_string. "Buffer needs to be refreshed, "otherwise standard SAP CLIF_SOURCE reorder methods alphabetically CALL FUNCTION 'SEO_BUFFER_INIT'. CALL FUNCTION 'SEO_BUFFER_REFRESH' EXPORTING cifkey = is_key version = seoc_version_inactive. lo_scanner = init_scanner( it_source = it_source iv_name = is_key-clsname ). * public lt_source = lo_scanner->get_public_section_source( ). lv_program = cl_oo_classname_service=>get_pubsec_name( is_key-clsname ). lv_updated = update_report( iv_program = lv_program it_source = lt_source ). IF lv_updated = abap_true. update_meta( iv_name = is_key-clsname iv_exposure = seoc_exposure_public it_source = lt_source ). ENDIF. * protected lt_source = lo_scanner->get_protected_section_source( ). lv_program = cl_oo_classname_service=>get_prosec_name( is_key-clsname ). lv_updated = update_report( iv_program = lv_program it_source = lt_source ). IF lv_updated = abap_true. update_meta( iv_name = is_key-clsname iv_exposure = seoc_exposure_protected it_source = lt_source ). ENDIF. * private lt_source = lo_scanner->get_private_section_source( ). lv_program = cl_oo_classname_service=>get_prisec_name( is_key-clsname ). lv_updated = update_report( iv_program = lv_program it_source = lt_source ). IF lv_updated = abap_true. update_meta( iv_name = is_key-clsname iv_exposure = seoc_exposure_private it_source = lt_source ). ENDIF. * methods lt_methods = lo_scanner->get_method_implementations( ). LOOP AT lt_methods INTO lv_method. TRY. lt_source = lo_scanner->get_method_impl_source( lv_method ). CATCH cx_oo_clif_component. zcx_abapgit_exception=>raise( 'error from GET_METHOD_IMPL_SOURCE' ). ENDTRY. lv_program = determine_method_include( iv_name = is_key-clsname iv_method = lv_method ). update_report( iv_program = lv_program it_source = lt_source ). ENDLOOP. * full class include update_full_class_include( iv_classname = is_key-clsname it_source = it_source it_methods = lt_methods ). update_source_index( iv_clsname = is_key-clsname io_scanner = lo_scanner ). * TODO, perhaps move this call to somewhere else, to be done while cleaning up the CLAS deserialization zcl_abapgit_objects_activation=>add( iv_type = 'CLAS' iv_name = is_key-clsname ). ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~generate_locals. DATA: lv_program TYPE programm. lv_program = cl_oo_classname_service=>get_ccdef_name( is_key-clsname ). update_report( iv_program = lv_program it_source = it_local_definitions ). lv_program = cl_oo_classname_service=>get_ccimp_name( is_key-clsname ). update_report( iv_program = lv_program it_source = it_local_implementations ). lv_program = cl_oo_classname_service=>get_ccmac_name( is_key-clsname ). update_report( iv_program = lv_program it_source = it_local_macros ). IF lines( it_local_test_classes ) > 0. lv_program = cl_oo_classname_service=>get_ccau_name( is_key-clsname ). update_report( iv_program = lv_program it_source = it_local_test_classes ). ENDIF. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 2238, 62, 4871, 62, 3605, 5550, 20032, 17941, 44731, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 397, 499, 18300, 62, 2238, 62, 4871, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 17953, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 8612, 378, 62, 17946, 874, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 8906, 48499, 1096, 62, 10459, 23848, 36, 20032, 17941, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 4296, 62, 10459, 62, 9630, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 565, 82, 3672, 41876, 269, 43167, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 952, 62, 35836, 1008, 41876, 4526, 37, 5390, 537, 62, 2238, 62, 10459, 62, 35836, 1008, 62, 4871, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 4296, 62, 13116, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 23065, 220, 220, 220, 220, 220, 220, 41876, 1430, 76, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 10459, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 62, 11487, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 43162, 8, 41876, 450, 499, 62, 30388, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 7716, 62, 4871, 7742, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3672, 41876, 384, 420, 7278, 3672, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 4296, 62, 28961, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3672, 220, 220, 220, 220, 41876, 384, 420, 7278, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 1069, 26205, 41876, 384, 78, 1069, 3455, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 10459, 220, 220, 41876, 374, 2032, 82, 454, 66, 316, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 5004, 62, 24396, 62, 17256, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 384, 420, 7278, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 24396, 220, 220, 220, 220, 220, 220, 220, 41876, 384, 420, 30094, 3672, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 23065, 8, 41876, 1430, 76, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 2315, 62, 35836, 1008, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 10459, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 8841, 62, 926, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 384, 420, 7278, 3672, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 305, 62, 35836, 1008, 8, 41876, 4526, 37, 5390, 537, 62, 2238, 62, 10459, 62, 35836, 1008, 62, 4871, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 4296, 62, 12853, 62, 4871, 62, 17256, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 4871, 3672, 41876, 384, 420, 7278, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 10459, 220, 220, 220, 41876, 4731, 62, 11487, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 24396, 82, 220, 220, 41876, 537, 62, 2238, 62, 10459, 62, 35836, 1008, 62, 4871, 14804, 4906, 62, 24396, 62, 320, 26908, 602, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 2251, 62, 13116, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 23065, 220, 220, 220, 220, 220, 41876, 1430, 76, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 10459, 220, 220, 220, 220, 220, 220, 41876, 4731, 62, 11487, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2302, 3004, 220, 220, 220, 41876, 827, 10641, 2999, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 23065, 62, 4906, 41876, 827, 10641, 486, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 9641, 220, 220, 220, 220, 220, 41876, 374, 18, 5219, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 4296, 62, 6359, 62, 17618, 62, 1659, 62, 24396, 82, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
CLASS zcl_aoc_check_31 DEFINITION PUBLIC INHERITING FROM zcl_aoc_super CREATE PUBLIC . PUBLIC SECTION. METHODS constructor . METHODS check REDEFINITION . METHODS get_attributes REDEFINITION . METHODS if_ci_test~query_attributes REDEFINITION . METHODS put_attributes REDEFINITION . METHODS get_message_text REDEFINITION . PROTECTED SECTION. PRIVATE SECTION. CONSTANTS gc_english TYPE slin_desc_t-language VALUE 'E'. DATA mt_error TYPE zaoc_slin_desc_key_range_tt . DATA mt_warn TYPE zaoc_slin_desc_key_range_tt . DATA mt_info TYPE zaoc_slin_desc_key_range_tt . DATA mt_ignore TYPE zaoc_slin_desc_key_range_tt . DATA mv_default_error TYPE flag . DATA mv_default_standard TYPE flag . DATA mv_default_atc TYPE flag . METHODS set_flags RETURNING VALUE(rs_flags) TYPE rslin_test_flags . ENDCLASS. CLASS zcl_aoc_check_31 IMPLEMENTATION. METHOD check. * abapOpenChecks * https://github.com/larshp/abapOpenChecks * MIT License DATA: lv_obj_name TYPE sobj_name, lv_text TYPE string, lv_tmp TYPE string, ls_flags TYPE rslin_test_flags, lv_code TYPE sci_errc, lv_errty TYPE sci_errty, lv_todo TYPE slin_desc-todo_overlay, lt_result TYPE slin_result. FIELD-SYMBOLS: <ls_result> LIKE LINE OF lt_result, <ls_line> LIKE LINE OF <ls_result>-lines. ls_flags = set_flags( ). CALL FUNCTION 'EXTENDED_PROGRAM_CHECK' EXPORTING program = program_name test_flags = ls_flags IMPORTING result = lt_result. LOOP AT lt_result ASSIGNING <ls_result>. "#EC CI_SORTSEQ CLEAR lv_text. LOOP AT <ls_result>-lines ASSIGNING <ls_line>. CONCATENATE LINES OF cl_slin_io=>old_line_to_src( <ls_line> ) INTO lv_tmp. IF lv_text IS INITIAL. lv_text = lv_tmp. ELSE. CONCATENATE lv_text cl_abap_char_utilities=>newline lv_tmp INTO lv_text. ENDIF. ENDLOOP. lv_tmp = |(SLIN code key: { <ls_result>-code })|. CONCATENATE lv_text cl_abap_char_utilities=>newline lv_tmp INTO lv_text. IF lines( mt_error ) > 0 AND <ls_result>-code IN mt_error. lv_errty = c_error. ELSEIF lines( mt_warn ) > 0 AND <ls_result>-code IN mt_warn. lv_errty = c_warning. ELSEIF lines( mt_info ) > 0 AND <ls_result>-code IN mt_info. lv_errty = c_note. ELSEIF lines( mt_ignore ) > 0 AND <ls_result>-code IN mt_ignore. CONTINUE. ELSE. CASE abap_true. WHEN mv_default_error. lv_errty = c_error. WHEN mv_default_standard. CASE <ls_result>-kind. WHEN slin_errlv-warn. lv_errty = c_warning. WHEN slin_errlv-info. lv_errty = c_note. WHEN OTHERS. lv_errty = c_error. ENDCASE. WHEN mv_default_atc. SELECT SINGLE todo_overlay FROM slin_desc INTO lv_todo WHERE code_nr = <ls_result>-code. "#EC CI_SUBRC CASE lv_todo. WHEN slin_todo-prio1. lv_errty = c_error. WHEN slin_todo-prio2. lv_errty = c_warning. WHEN slin_todo-prio3. lv_errty = c_note. WHEN slin_todo-noprio. CONTINUE. " current loop ENDCASE. WHEN OTHERS. ASSERT 0 = 1. ENDCASE. ENDIF. lv_obj_name = <ls_result>-src_incl. lv_code = <ls_result>-code. inform( p_sub_obj_name = lv_obj_name p_line = <ls_result>-src_line p_kind = lv_errty p_test = myname p_code = lv_code p_param_1 = lv_text ). ENDLOOP. ENDMETHOD. METHOD constructor. DATA lt_slin_desc_t TYPE STANDARD TABLE OF slin_desc_t WITH EMPTY KEY. DATA ls_slin_desc_t TYPE slin_desc_t. DATA lv_code TYPE sci_errc. DATA lv_scimessage_text TYPE ty_scimessage_text. super->constructor( ). version = '003'. position = '031'. has_attributes = abap_true. attributes_ok = abap_true. mv_default_error = abap_true. SELECT * FROM slin_desc_t INTO TABLE lt_slin_desc_t WHERE language = sy-langu. IF sy-subrc <> 0. SELECT * FROM slin_desc_t INTO TABLE lt_slin_desc_t WHERE language = gc_english. ENDIF. LOOP AT lt_slin_desc_t INTO ls_slin_desc_t. lv_code = ls_slin_desc_t-code_nr. lv_scimessage_text = ls_slin_desc_t-description. insert_scimessage( iv_code = lv_code iv_text = lv_scimessage_text ). ENDLOOP. ENDMETHOD. METHOD get_attributes. EXPORT mt_error = mt_error mt_warn = mt_warn mt_info = mt_info mt_ignore = mt_ignore mv_default_error = mv_default_error mv_default_standard = mv_default_standard mv_default_atc = mv_default_atc TO DATA BUFFER p_attributes. ENDMETHOD. METHOD get_message_text. p_text = '&1'. "#EC NOTEXT ENDMETHOD. METHOD if_ci_test~query_attributes. zzaoc_top. zzaoc_fill_att mt_error 'Error' 'S'. "#EC NOTEXT zzaoc_fill_att mt_warn 'Warning' 'S'. "#EC NOTEXT zzaoc_fill_att mt_info 'Info' 'S'. "#EC NOTEXT zzaoc_fill_att mt_ignore 'Ignore' 'S'. "#EC NOTEXT zzaoc_fill_att_rb mv_default_error 'Default error' 'R' 'RADIO'. "#EC NOTEXT zzaoc_fill_att_rb mv_default_standard 'Default standard' 'R' 'RADIO'. "#EC NOTEXT zzaoc_fill_att_rb mv_default_atc 'Default ATC' 'R' 'RADIO'. "#EC NOTEXT zzaoc_popup. attributes_ok = abap_true. ENDMETHOD. METHOD put_attributes. IMPORT mt_error = mt_error mt_warn = mt_warn mt_info = mt_info mt_ignore = mt_ignore mv_default_error = mv_default_error mv_default_standard = mv_default_standard mv_default_atc = mv_default_atc FROM DATA BUFFER p_attributes. "#EC CI_USE_WANTED ASSERT sy-subrc = 0. ENDMETHOD. METHOD set_flags. rs_flags-x_per = abap_true. rs_flags-x_cal = abap_true. rs_flags-x_dat = abap_true. rs_flags-x_opf = abap_true. rs_flags-x_unr = abap_true. rs_flags-x_ges = abap_true. rs_flags-x_mes = abap_true. rs_flags-x_pfs = abap_true. rs_flags-x_bre = abap_true. rs_flags-x_woo = abap_true. rs_flags-x_wrn = abap_true. rs_flags-x_ste = abap_true. rs_flags-x_txt = abap_true. rs_flags-x_aut = abap_true. rs_flags-x_sub = abap_true. rs_flags-x_loa = abap_true. rs_flags-x_mls = abap_true. rs_flags-x_put = abap_true. rs_flags-x_hel = abap_true. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 64, 420, 62, 9122, 62, 3132, 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, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 23772, 764, 628, 220, 220, 220, 337, 36252, 50, 2198, 198, 220, 220, 220, 220, 220, 220, 220, 23848, 36, 20032, 17941, 764, 198, 220, 220, 220, 337, 36252, 50, 651, 62, 1078, 7657, 198, 220, 220, 220, 220, 220, 220, 220, 23848, 36, 20032, 17941, 764, 198, 220, 220, 220, 337, 36252, 50, 611, 62, 979, 62, 9288, 93, 22766, 62, 1078, 7657, 198, 220, 220, 220, 220, 220, 220, 220, 23848, 36, 20032, 17941, 764, 198, 220, 220, 220, 337, 36252, 50, 1234, 62, 1078, 7657, 198, 220, 220, 220, 220, 220, 220, 220, 23848, 36, 20032, 17941, 764, 198, 220, 220, 220, 337, 36252, 50, 651, 62, 20500, 62, 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, 628, 220, 220, 220, 7102, 2257, 1565, 4694, 308, 66, 62, 39126, 41876, 1017, 259, 62, 20147, 62, 83, 12, 16129, 26173, 8924, 705, 36, 4458, 628, 220, 220, 220, 42865, 45079, 62, 18224, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 64, 420, 62, 82, 2815, 62, 20147, 62, 2539, 62, 9521, 62, 926, 764, 198, 220, 220, 220, 42865, 45079, 62, 40539, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 64, 420, 62, 82, 2815, 62, 20147, 62, 2539, 62, 9521, 62, 926, 764, 198, 220, 220, 220, 42865, 45079, 62, 10951, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 64, 420, 62, 82, 2815, 62, 20147, 62, 2539, 62, 9521, 62, 926, 764, 198, 220, 220, 220, 42865, 45079, 62, 46430, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 64, 420, 62, 82, 2815, 62, 20147, 62, 2539, 62, 9521, 62, 926, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 12286, 62, 18224, 220, 220, 220, 41876, 6056, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 12286, 62, 20307, 41876, 6056, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 12286, 62, 265, 66, 220, 220, 220, 220, 220, 41876, 6056, 764, 628, 220, 220, 220, 337, 36252, 50, 900, 62, 33152, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 3808, 62, 33152, 8, 41876, 44608, 2815, 62, 9288, 62, 33152, 764, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 64, 420, 62, 9122, 62, 3132, 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, 26801, 62, 3672, 41876, 27355, 73, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 5239, 220, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 22065, 220, 220, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43979, 62, 33152, 220, 220, 220, 41876, 44608, 2815, 62, 9288, 62, 33152, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 8189, 220, 220, 220, 220, 41876, 20681, 62, 263, 6015, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 8056, 774, 220, 220, 220, 41876, 20681, 62, 8056, 774, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 83, 24313, 220, 220, 220, 220, 41876, 1017, 259, 62, 20147, 12, 83, 24313, 62, 2502, 10724, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 83, 62, 20274, 220, 220, 41876, 1017, 259, 62, 20274, 13, 628, 220, 220, 220, 18930, 24639, 12, 23060, 10744, 3535, 50, 25, 1279, 7278, 62, 20274, 29, 34178, 48920, 3963, 300, 83, 62, 20274, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1279, 7278, 62, 1370, 29, 220, 220, 34178, 48920, 3963, 1279, 7278, 62, 20274, 29, 12, 6615, 13, 628, 220, 220, 220, 43979, 62, 33152, 796, 900, 62, 33152, 7, 6739, 198, 220, 220, 220, 42815, 29397, 4177, 2849, 705, 13918, 49361, 62, 4805, 7730, 24115, 62, 50084, 6, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1430, 220, 220, 220, 796, 1430, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 1332, 62, 33152, 796, 43979, 62, 33152, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 220, 220, 220, 220, 796, 300, 83, 62, 20274, 13, 628, 220, 220, 220, 17579, 3185, 5161, 300, 83, 62, 20274, 24994, 3528, 15871, 1279, 7278, 62, 20274, 28401, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25113, 2943, 14514, 62, 50, 33002, 36, 48, 628, 220, 220, 220, 220, 220, 30301, 1503, 300, 85, 62, 5239, 13, 198, 220, 220, 220, 220, 220, 17579, 3185, 5161, 1279, 7278, 62, 20274, 29, 12, 6615, 24994, 3528, 15871, 1279, 7278, 62, 1370, 28401, 198, 220, 220, 220, 220, 220, 220, 220, 39962, 1404, 1677, 6158, 43277, 1546, 3963, 537, 62, 82, 2815, 62, 952, 14804, 727, 62, 1370, 62, 1462, 62, 10677, 7, 1279, 7278, 62, 1370, 29, 1267, 39319, 300, 85, 62, 22065, 13, 198, 220, 220, 220, 220, 220, 220, 220, 16876, 300, 85, 62, 5239, 3180, 3268, 2043, 12576, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 5239, 796, 300, 85, 62, 22065, 13, 198, 220, 220, 220, 220, 220, 220, 220, 17852, 5188, 13, 198, 220, 220, 220, 220 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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 ]
"!This class is offering an API for represent a structure "!in its ABAP VALUE way: structure_name = VALUE #(...) CLASS zcl_op_structure DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. METHODS: "! is getting called from enhancement <br/> "! will ask for max line length, format content and show it "! @parameter i_structure | given structure "! @parameter i_field_catalog | field catalog of structure "! @parameter i_struc_name | structure name for "name" = VALUE #() statement show_popup_w_content IMPORTING i_structure TYPE any i_field_catalog TYPE lvc_t_fcat i_struc_name TYPE string, "! add a structure to given formated context "! @parameter i_current_context | current context as string "! @parameter i_structure | given structure "! @parameter i_field_catalog | field catalog of structure "! @parameter r_current_context | changed context with added structure data as string add_structure IMPORTING i_current_context TYPE string i_structure TYPE any i_field_catalog TYPE lvc_t_fcat RETURNING VALUE(r_current_context) TYPE string. PROTECTED SECTION. PRIVATE SECTION. METHODS: "! prepare component name "! delete surrounding spaces component_name IMPORTING i_component_name TYPE lvc_fname RETURNING VALUE(r_component_name) TYPE lvc_fname, prepare_output IMPORTING i_structure TYPE any i_field_catalog TYPE lvc_t_fcat i_struc_name TYPE string RETURNING VALUE(r_content_4_display) TYPE string, left_hand_side IMPORTING i_struc_name TYPE string i_is_type_given TYPE boole_d DEFAULT abap_false RETURNING VALUE(rv_left_hand_side_value) TYPE string, right_hand_side IMPORTING i_is_type_given TYPE boole_d DEFAULT abap_false i_structure TYPE any i_field_catalog TYPE lvc_t_fcat RETURNING VALUE(r_right_hand_side_value) TYPE string, handle_nested_structure IMPORTING i_current_context TYPE string i_structure TYPE any i_component_info TYPE lvc_s_fcat RETURNING VALUE(r_current_context) TYPE string, add_rhs_value_prefix IMPORTING i_is_type_given TYPE boole_d RETURNING VALUE(r_right_hand_side_value) TYPE string, add_rhs_postfix IMPORTING i_right_hand_side_value TYPE string RETURNING VALUE(r_right_hand_side_value) TYPE string, add_rhs_value IMPORTING i_right_hand_side_value TYPE string i_structure TYPE any i_field_catalog TYPE lvc_t_fcat RETURNING VALUE(r_right_hand_side_value) TYPE string, add_rhs_value_and_postfix IMPORTING i_right_hand_side_value TYPE string i_structure TYPE any i_field_catalog TYPE lvc_t_fcat RETURNING VALUE(r_right_hand_side_value) TYPE string, add_itab IMPORTING i_current_context TYPE string i_table TYPE ANY TABLE i_component_name TYPE lvc_fname RETURNING VALUE(r_current_context) TYPE string. ENDCLASS. CLASS zcl_op_structure IMPLEMENTATION. METHOD component_name. r_component_name = i_component_name. CONDENSE r_component_name NO-GAPS. ENDMETHOD. METHOD add_itab. r_current_context = NEW zcl_op_table( )->add_itab( i_current_context = || i_table = i_table i_component_name = i_component_name i_dont_add_a_point = abap_true ). r_current_context = |{ i_current_context } { r_current_context }|. ENDMETHOD. METHOD add_rhs_postfix. r_right_hand_side_value = |{ i_right_hand_side_value } )|. ENDMETHOD. METHOD add_rhs_value. DATA current_context TYPE string. LOOP AT i_field_catalog INTO DATA(field_info). ASSIGN COMPONENT field_info-fieldname OF STRUCTURE i_structure TO FIELD-SYMBOL(<field>). CHECK <field> IS ASSIGNED AND <field> IS NOT INITIAL. * AND field_info-seltext NE |INDEX|. current_context = COND #( WHEN field_info-datatype EQ 'TTYP' THEN me->add_itab( i_current_context = current_context i_table = <field> i_component_name = field_info-fieldname ) WHEN field_info-datatype EQ 'STRU' THEN me->handle_nested_structure( EXPORTING i_current_context = current_context i_structure = <field> i_component_info = field_info ) ELSE NEW zcl_op_component( )->add( i_current_context = current_context i_component = <field> i_component_info = field_info ) ). ENDLOOP. r_right_hand_side_value = |{ i_right_hand_side_value }{ current_context }|. ENDMETHOD. METHOD add_rhs_value_and_postfix. r_right_hand_side_value = me->add_rhs_value( EXPORTING i_right_hand_side_value = i_right_hand_side_value i_field_catalog = i_field_catalog i_structure = i_structure ). r_right_hand_side_value = me->add_rhs_postfix( r_right_hand_side_value ). ENDMETHOD. METHOD add_rhs_value_prefix. r_right_hand_side_value = COND string( WHEN i_is_type_given EQ abap_true THEN | = VALUE \{i_type\}(| "#TODO 25.10.2018 AGEPPART - implement type here ELSE | = VALUE #(| ). ENDMETHOD. METHOD add_structure. r_current_context = me->right_hand_side( i_field_catalog = i_field_catalog i_structure = i_structure ). ENDMETHOD. METHOD handle_nested_structure. r_current_context = right_hand_side( EXPORTING i_structure = i_structure i_field_catalog = NEW zcl_op_simple_field_catalog( )->get_by_data( i_structure = i_structure ) ). r_current_context = |{ i_current_context } { component_name( i_component_info-fieldname ) }{ r_current_context }|. ENDMETHOD. METHOD left_hand_side. rv_left_hand_side_value = COND string( WHEN i_is_type_given EQ abap_true THEN |DATA({ i_struc_name })| "#TODO 02.11.2018 AGEPPART - use type later here ELSE i_struc_name ). ENDMETHOD. METHOD prepare_output. CHECK i_structure IS NOT INITIAL. r_content_4_display = |{ me->left_hand_side( i_struc_name = i_struc_name ) }{ me->right_hand_side( i_structure = i_structure i_field_catalog = i_field_catalog ) }.|. ENDMETHOD. METHOD right_hand_side. r_right_hand_side_value = me->add_rhs_value_prefix( i_is_type_given ). r_right_hand_side_value = me->add_rhs_value_and_postfix( EXPORTING i_right_hand_side_value = r_right_hand_side_value i_structure = i_structure i_field_catalog = i_field_catalog ). ENDMETHOD. METHOD show_popup_w_content. DATA(content_4_display) = me->prepare_output( i_struc_name = i_struc_name i_structure = i_structure i_field_catalog = i_field_catalog ). TRY. DATA(formated_content) = zcl_op_pretty_printer_factory=>create( )->format( content_4_display ). CATCH cx_class_not_existent INTO DATA(cx_class_not_existent). "formating went wring, fallback using non formated text formated_content = content_4_display. ENDTRY. cl_demo_output=>set_mode( cl_demo_output=>text_mode ). "set to text mode to be more compatible with minus signs and so on cl_demo_output=>write_data( formated_content ). cl_demo_output=>display( ). ENDMETHOD. ENDCLASS.
[ 40484, 1212, 1398, 318, 6011, 281, 7824, 329, 2380, 257, 4645, 198, 40484, 259, 663, 9564, 2969, 26173, 8924, 835, 25, 4645, 62, 3672, 796, 26173, 8924, 1303, 7, 23029, 198, 31631, 1976, 565, 62, 404, 62, 301, 5620, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 25261, 198, 220, 29244, 6158, 44731, 13, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 366, 0, 318, 1972, 1444, 422, 28554, 1279, 1671, 15913, 198, 220, 220, 220, 220, 220, 366, 0, 481, 1265, 329, 3509, 1627, 4129, 11, 5794, 2695, 290, 905, 340, 198, 220, 220, 220, 220, 220, 366, 0, 2488, 17143, 2357, 1312, 62, 301, 5620, 930, 1813, 4645, 198, 220, 220, 220, 220, 220, 366, 0, 2488, 17143, 2357, 1312, 62, 3245, 62, 9246, 11794, 930, 2214, 18388, 286, 4645, 198, 220, 220, 220, 220, 220, 366, 0, 2488, 17143, 2357, 1312, 62, 19554, 66, 62, 3672, 930, 4645, 1438, 329, 366, 3672, 1, 796, 26173, 8924, 1303, 3419, 2643, 198, 220, 220, 220, 220, 220, 905, 62, 12924, 929, 62, 86, 62, 11299, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 301, 5620, 220, 220, 220, 220, 41876, 597, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 3245, 62, 9246, 11794, 41876, 300, 28435, 62, 83, 62, 69, 9246, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 19554, 66, 62, 3672, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 366, 0, 751, 257, 4645, 284, 1813, 1296, 515, 4732, 198, 220, 220, 220, 220, 220, 366, 0, 2488, 17143, 2357, 1312, 62, 14421, 62, 22866, 930, 1459, 4732, 355, 4731, 198, 220, 220, 220, 220, 220, 366, 0, 2488, 17143, 2357, 1312, 62, 301, 5620, 930, 220, 1813, 4645, 198, 220, 220, 220, 220, 220, 366, 0, 2488, 17143, 2357, 1312, 62, 3245, 62, 9246, 11794, 930, 2214, 18388, 286, 4645, 198, 220, 220, 220, 220, 220, 366, 0, 2488, 17143, 2357, 374, 62, 14421, 62, 22866, 930, 3421, 4732, 351, 2087, 4645, 1366, 355, 4731, 198, 220, 220, 220, 220, 220, 751, 62, 301, 5620, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 14421, 62, 22866, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 301, 5620, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 597, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 3245, 62, 9246, 11794, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 300, 28435, 62, 83, 62, 69, 9246, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 62, 14421, 62, 22866, 8, 41876, 4731, 13, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 366, 0, 8335, 7515, 1438, 198, 220, 220, 220, 220, 220, 366, 0, 12233, 7346, 9029, 198, 220, 220, 220, 220, 220, 7515, 62, 3672, 220, 30023, 9863, 2751, 1312, 62, 42895, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 41876, 300, 28435, 62, 69, 3672, 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, 62, 42895, 62, 3672, 8, 41876, 300, 28435, 62, 69, 3672, 11, 198, 220, 220, 220, 220, 220, 8335, 62, 22915, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 301, 5620, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 597, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 3245, 62, 9246, 11794, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 300, 28435, 62, 83, 62, 69, 9246, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 19554, 66, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 81, 62, 11299, 62, 19, 62, 13812, 8, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 1364, 62, 4993, 62, 1589, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 19554, 66, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 271, 62, 4906, 62, 35569, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1489, 2305, 62, 67, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 81, 85, 62, 9464, 62, 4993, 62, 1589, 62, 8367, 8, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 826, 62, 4993, 62, 1589, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 271, 62, 4906, 62, 35569, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1489, 2305 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
*&---------------------------------------------------------------------* *& Report ZDOP_DB_INDEX_TEST *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT zdop_db_index_test. * BU PROGRAMDA VERİ TABANI TABLOSUNDA İNDEX YARATMADAN VE YARATILDIKTAN SONRAKİ PERFORMANSLAR KARŞILAŞTIRILMIŞTIR. * INDEX YARATILDIKTAN SONRA PERFORMANSTA GÖZLE GÖZÜRÜLÜR BİR ARTIŞ YAŞANMIŞTIR. DATA : gt_mseg LIKE TABLE OF mseg WITH HEADER LINE, t1 TYPE i, t2 TYPE i, t3 TYPE p DECIMALS 3, line_count TYPE i. GET RUN TIME FIELD t1. SELECT mblnr mjahr zeile FROM mseg INTO CORRESPONDING FIELDS OF TABLE gt_mseg WHERE matbf BETWEEN '0' AND '17'. GET RUN TIME FIELD t2. t3 = ( t2 - t1 ) / 1000000 . DESCRIBE TABLE Gt_MSEG LINES line_count. WRITE :/ 'OKUNAN KAYIT SAYISI' , 30 ':' , line_count LEFT-JUSTIFIED. WRITE :/ 'HIZ (SANİYE)' , 30 ':' , t3 LEFT-JUSTIFIED.
[ 9, 5, 10097, 30934, 9, 198, 9, 5, 6358, 1168, 35, 3185, 62, 11012, 62, 12115, 6369, 62, 51, 6465, 198, 9, 5, 10097, 30934, 9, 198, 9, 5, 198, 9, 5, 10097, 30934, 9, 198, 2200, 15490, 1976, 67, 404, 62, 9945, 62, 9630, 62, 9288, 13, 198, 198, 9, 20571, 46805, 5631, 33310, 128, 108, 309, 6242, 43664, 309, 6242, 45376, 4944, 5631, 34754, 108, 8575, 6369, 575, 1503, 1404, 44, 2885, 1565, 569, 36, 575, 1503, 1404, 4146, 17931, 42176, 1565, 311, 1340, 3861, 42, 128, 108, 19878, 13775, 10725, 8634, 1503, 509, 1503, 129, 252, 47164, 129, 252, 51, 4663, 4146, 8895, 129, 252, 51, 4663, 13, 198, 9, 24413, 6369, 575, 1503, 1404, 4146, 17931, 42176, 1565, 311, 1340, 3861, 19878, 13775, 10725, 2257, 32, 402, 127, 244, 57, 2538, 402, 127, 244, 57, 127, 250, 49, 127, 250, 43, 127, 250, 49, 347, 128, 108, 49, 24278, 40, 129, 252, 575, 32, 129, 252, 1565, 8895, 129, 252, 51, 4663, 13, 198, 198, 26947, 1058, 308, 83, 62, 76, 325, 70, 34178, 43679, 3963, 285, 325, 70, 13315, 39837, 1137, 48920, 11, 198, 220, 220, 220, 220, 220, 220, 256, 16, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 256, 17, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 256, 18, 41876, 279, 27196, 3955, 23333, 513, 11, 198, 220, 220, 220, 220, 220, 220, 1627, 62, 9127, 41876, 1312, 13, 198, 198, 18851, 32494, 20460, 18930, 24639, 256, 16, 13, 198, 198, 46506, 285, 2436, 48624, 285, 31558, 81, 41271, 576, 16034, 285, 325, 70, 39319, 23929, 19535, 47, 18672, 2751, 18930, 3698, 5258, 3963, 43679, 308, 83, 62, 76, 325, 70, 198, 220, 33411, 2603, 19881, 38651, 8845, 1677, 705, 15, 6, 5357, 705, 1558, 4458, 628, 198, 18851, 32494, 20460, 18930, 24639, 256, 17, 13, 198, 198, 83, 18, 796, 357, 256, 17, 532, 256, 16, 1267, 1220, 1802, 2388, 764, 198, 198, 30910, 34, 7112, 12473, 43679, 402, 83, 62, 44, 5188, 38, 43277, 1546, 1627, 62, 9127, 13, 198, 198, 18564, 12709, 1058, 14, 705, 11380, 4944, 1565, 509, 4792, 2043, 45687, 1797, 40, 6, 837, 1542, 705, 32105, 837, 1627, 62, 9127, 12509, 9792, 12, 25008, 28343, 13, 198, 18564, 12709, 1058, 14, 705, 39, 14887, 357, 36753, 128, 108, 48743, 33047, 837, 1542, 220, 705, 32105, 837, 256, 18, 12509, 9792, 12, 25008, 28343, 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, 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path TYPE string !io_alv TYPE REF TO cl_gui_alv_grid !it_listheader TYPE slis_t_listheader OPTIONAL !i_top TYPE i DEFAULT 1 !i_left TYPE i DEFAULT 1 !i_columns_header TYPE c DEFAULT 'X' !i_columns_autofit TYPE c DEFAULT 'X' !i_format_col_header TYPE soi_format_item OPTIONAL !i_format_subtotal TYPE soi_format_item OPTIONAL !i_format_total TYPE soi_format_item OPTIONAL EXCEPTIONS miss_guide ex_transfer_kkblo_error fatal_error inv_data_range dim_mismatch_vkey dim_mismatch_sema error_in_sema . PROTECTED SECTION. PRIVATE SECTION. CLASS-METHODS close_document. CLASS-METHODS error_doi. CLASS-DATA: lo_spreadsheet TYPE REF TO i_oi_spreadsheet, lo_control TYPE REF TO i_oi_container_control, lo_proxy TYPE REF TO i_oi_document_proxy, lo_error TYPE REF TO i_oi_error, lc_retcode TYPE soi_ret_string. ENDCLASS. CLASS zcl_excel_ole IMPLEMENTATION. METHOD bind_alv_ole2. *--------------------------------------------------------------------* * Method description: * Method use to export a CL_GUI_ALV_GRID object to xlsx/xls file * with list header and characteristics of ALV field catalog such as: * + Total, group's subtotal * + Quantity fields, amount fields (dependent fields) * + No_out, no_zero, ... * Technique use in method: * SAP Desktop Office Integration (DOI) *--------------------------------------------------------------------* * Data for session 0: DOI constructor * ------------------------------------------ DATA: li_has TYPE i. "Proxy has spreadsheet interface? * Data for session 1: Get LVC data from ALV object * ------------------------------------------ DATA: l_has_activex, l_doctype_excel_sheet(11) TYPE c. * LVC DATA: lt_fieldcat_lvc TYPE lvc_t_fcat. DATA: wa_fieldcat_lvc TYPE lvc_s_fcat. DATA: lt_sort_lvc TYPE lvc_t_sort. DATA: lt_filter_idx_lvc TYPE lvc_t_fidx. DATA: lt_grouplevels_lvc TYPE lvc_t_grpl. * KKBLO DATA: lt_fieldcat_kkblo TYPE kkblo_t_fieldcat. DATA: lt_sort_kkblo TYPE kkblo_t_sortinfo. DATA: lt_grouplevels_kkblo TYPE kkblo_t_grouplevels. DATA: lt_filter_idx_kkblo TYPE kkblo_t_sfinfo. DATA: wa_listheader LIKE LINE OF it_listheader. * Subtotal DATA: lt_collect00 TYPE REF TO data. DATA: lt_collect01 TYPE REF TO data. DATA: lt_collect02 TYPE REF TO data. DATA: lt_collect03 TYPE REF TO data. DATA: lt_collect04 TYPE REF TO data. DATA: lt_collect05 TYPE REF TO data. DATA: lt_collect06 TYPE REF TO data. DATA: lt_collect07 TYPE REF TO data. DATA: lt_collect08 TYPE REF TO data. DATA: lt_collect09 TYPE REF TO data. * data table name DATA: l_tabname TYPE kkblo_tabname. * local object DATA: lo_grid TYPE REF TO lcl_gui_alv_grid. * data table get from ALV DATA: lt_alv TYPE REF TO data. * total / subtotal data FIELD-SYMBOLS: <f_collect00> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect01> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect02> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect03> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect04> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect05> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect06> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect07> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect08> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect09> TYPE STANDARD TABLE. * table before append subtotal lines FIELD-SYMBOLS: <f_alv_tab> TYPE STANDARD TABLE. * data for session 2: sort, filter and calculate total/subtotal * ------------------------------------------ * table to save index of subotal / total line in excel tanle * this ideal to control index of subtotal / total line later * for ex, when get subtotal / total line to format TYPES: BEGIN OF st_subtot_indexs, index TYPE i, END OF st_subtot_indexs. DATA: lt_subtot_indexs TYPE TABLE OF st_subtot_indexs. DATA: wa_subtot_indexs LIKE LINE OF lt_subtot_indexs. * data table after append subtotal DATA: lt_excel TYPE REF TO data. DATA: l_tabix TYPE i. DATA: l_save_index TYPE i. * dyn subtotal table name DATA: l_collect TYPE string. * subtotal range, to format subtotal (and total) DATA: subranges TYPE soi_range_list. DATA: subrangeitem TYPE soi_range_item. DATA: l_sub_index TYPE i. * table after append subtotal lines FIELD-SYMBOLS: <f_excel_tab> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_excel_line> TYPE any. * dyn subtotal tables FIELD-SYMBOLS: <f_collect_tab> TYPE STANDARD TABLE. FIELD-SYMBOLS: <f_collect_line> TYPE any. FIELD-SYMBOLS: <f_filter_idx_line> LIKE LINE OF lt_filter_idx_kkblo. FIELD-SYMBOLS: <f_fieldcat_line> LIKE LINE OF lt_fieldcat_kkblo. FIELD-SYMBOLS: <f_grouplevels_line> LIKE LINE OF lt_grouplevels_kkblo. FIELD-SYMBOLS: <f_line> TYPE any. * Data for session 3: map data to semantic table * ------------------------------------------ TYPES: BEGIN OF st_column_index, fieldname TYPE kkblo_fieldname, tabname TYPE kkblo_tabname, col LIKE sy-index, END OF st_column_index. * columns index DATA: lt_column_index TYPE TABLE OF st_column_index. DATA: wa_column_index LIKE LINE OF lt_column_index. * table of dependent field ( currency and quantity unit field) DATA: lt_fieldcat_depf TYPE kkblo_t_fieldcat. DATA: wa_fieldcat_depf TYPE kkblo_fieldcat. * XXL interface: * -XXL: contain exporting columns characteristic DATA: lt_sema TYPE TABLE OF gxxlt_s INITIAL SIZE 0. DATA: wa_sema LIKE LINE OF lt_sema. * -XXL interface: header DATA: lt_hkey TYPE TABLE OF gxxlt_h INITIAL SIZE 0. DATA: wa_hkey LIKE LINE OF lt_hkey. * -XXL interface: header keys DATA: lt_vkey TYPE TABLE OF gxxlt_v INITIAL SIZE 0. DATA: wa_vkey LIKE LINE OF lt_vkey. * Number of H Keys: number of key columns DATA: l_n_hrz_keys TYPE i. * Number of data columns in the list object: non-key columns no DATA: l_n_att_cols TYPE i. * Number of V Keys: number of header row DATA: l_n_vrt_keys TYPE i. * curency to format amount DATA: lt_tcurx TYPE TABLE OF tcurx. DATA: wa_tcurx LIKE LINE OF lt_tcurx. DATA: l_def TYPE flag. " currency / quantity flag DATA: wa_t006 TYPE t006. " decimal place of unit DATA: l_num TYPE i. " table columns number DATA: l_typ TYPE c. " table type DATA: wa TYPE REF TO data. DATA: l_int TYPE i. DATA: l_counter TYPE i. FIELD-SYMBOLS: <f_excel_column> TYPE any. FIELD-SYMBOLS: <f_fcat_column> TYPE any. * Data for session 4: write to excel * ------------------------------------------ DATA: sema_type TYPE c. DATA l_error TYPE REF TO c_oi_proxy_error. DATA count TYPE i. DATA datac TYPE i. DATA datareal TYPE i. " exporting column number DATA vkeycount TYPE i. DATA all TYPE i. DATA mit TYPE i VALUE 1. " index of recent row? DATA li_col_pos TYPE i VALUE 1. " column position DATA li_col_num TYPE i. " table columns number FIELD-SYMBOLS: <line> TYPE any. FIELD-SYMBOLS: <item> TYPE any. DATA td TYPE sydes_desc. DATA: typ. DATA: ranges TYPE soi_range_list. DATA: rangeitem TYPE soi_range_item. DATA: contents TYPE soi_generic_table. DATA: contentsitem TYPE soi_generic_item. DATA: semaitem TYPE gxxlt_s. DATA: hkeyitem TYPE gxxlt_h. DATA: vkeyitem TYPE gxxlt_v. DATA: li_commentary_rows TYPE i. "row number of title lines + 1 DATA: lo_error_w TYPE REF TO i_oi_error. DATA: l_retcode TYPE soi_ret_string. DATA: no_flush TYPE c VALUE 'X'. DATA: li_head_top TYPE i. "header rows position * Data for session 5: Save and clode document * ------------------------------------------ DATA: li_document_size TYPE i. DATA: ls_path TYPE rlgrap-filename. *--------------------------------------------------------------------* * SESSION 0: DOI CONSTRUCTOR *--------------------------------------------------------------------* * check active windown CALL FUNCTION 'GUI_HAS_ACTIVEX' IMPORTING return = l_has_activex. IF l_has_activex IS INITIAL. RAISE miss_guide. ENDIF. * Get Container Object of Screen CALL METHOD c_oi_container_control_creator=>get_container_control IMPORTING control = lo_control retcode = lc_retcode. error_doi( ). * Initialize Container control CALL METHOD lo_control->init_control EXPORTING parent = cl_gui_container=>default_screen r3_application_name = '' inplace_enabled = 'X' no_flush = 'X' register_on_close_event = 'X' register_on_custom_event = 'X' IMPORTING error = lo_error retcode = lc_retcode. error_doi( ). * Get Proxy Document: * check exist of document proxy, if exist -> close first IF NOT lo_proxy IS INITIAL. close_document( ). ENDIF. IF i_xls IS NOT INITIAL. * xls format, doctype = soi_doctype_excel97_sheet l_doctype_excel_sheet = 'Excel.Sheet.8'. ELSE. * xlsx format, doctype = soi_doctype_excel_sheet l_doctype_excel_sheet = 'Excel.Sheet'. ENDIF. CALL METHOD lo_control->get_document_proxy EXPORTING document_type = l_doctype_excel_sheet register_container = 'X' IMPORTING document_proxy = lo_proxy error = lo_error retcode = lc_retcode. error_doi( ). IF i_document_url IS INITIAL. * create new excel document CALL METHOD lo_proxy->create_document EXPORTING create_view_data = 'X' open_inplace = 'X' no_flush = 'X' IMPORTING error = lo_error retcode = lc_retcode. error_doi( ). ELSE. * Read excel template for i_DOCUMENT_URL * this excel template can be store in local or server CALL METHOD lo_proxy->open_document EXPORTING document_url = i_document_url open_inplace = 'X' no_flush = 'X' IMPORTING error = lo_error retcode = lc_retcode. error_doi( ). ENDIF. * Check Spreadsheet Interface of Document Proxy CALL METHOD lo_proxy->has_spreadsheet_interface IMPORTING is_available = li_has error = lo_error retcode = lc_retcode. error_doi( ). * create Spreadsheet object CHECK li_has IS NOT INITIAL. CALL METHOD lo_proxy->get_spreadsheet_interface IMPORTING sheet_interface = lo_spreadsheet error = lo_error retcode = lc_retcode. error_doi( ). *--------------------------------------------------------------------* * SESSION 1: GET LVC DATA FROM ALV OBJECT *--------------------------------------------------------------------* * data table CREATE OBJECT lo_grid EXPORTING i_parent = cl_gui_container=>screen0. CALL METHOD lo_grid->get_alv_attributes EXPORTING io_grid = io_alv IMPORTING et_table = lt_alv. ASSIGN lt_alv->* TO <f_alv_tab>. * fieldcat CALL METHOD io_alv->get_frontend_fieldcatalog IMPORTING et_fieldcatalog = lt_fieldcat_lvc. * table name LOOP AT lt_fieldcat_lvc INTO wa_fieldcat_lvc WHERE NOT tabname IS INITIAL. l_tabname = wa_fieldcat_lvc-tabname. EXIT. ENDLOOP. IF sy-subrc NE 0. l_tabname = '1'. ENDIF. CLEAR: wa_fieldcat_lvc. * sort table CALL METHOD io_alv->get_sort_criteria IMPORTING et_sort = lt_sort_lvc. * filter index CALL METHOD io_alv->get_filtered_entries IMPORTING et_filtered_entries = lt_filter_idx_lvc. * group level + subtotal CALL METHOD io_alv->get_subtotals IMPORTING ep_collect00 = lt_collect00 ep_collect01 = lt_collect01 ep_collect02 = lt_collect02 ep_collect03 = lt_collect03 ep_collect04 = lt_collect04 ep_collect05 = lt_collect05 ep_collect06 = lt_collect06 ep_collect07 = lt_collect07 ep_collect08 = lt_collect08 ep_collect09 = lt_collect09 et_grouplevels = lt_grouplevels_lvc. ASSIGN lt_collect00->* TO <f_collect00>. ASSIGN lt_collect01->* TO <f_collect01>. ASSIGN lt_collect02->* TO <f_collect02>. ASSIGN lt_collect03->* TO <f_collect03>. ASSIGN lt_collect04->* TO <f_collect04>. ASSIGN lt_collect05->* TO <f_collect05>. ASSIGN lt_collect06->* TO <f_collect06>. ASSIGN lt_collect07->* TO <f_collect07>. ASSIGN lt_collect08->* TO <f_collect08>. ASSIGN lt_collect09->* TO <f_collect09>. * transfer to KKBLO struct CALL FUNCTION 'LVC_TRANSFER_TO_KKBLO' EXPORTING it_fieldcat_lvc = lt_fieldcat_lvc it_sort_lvc = lt_sort_lvc it_filter_index_lvc = lt_filter_idx_lvc it_grouplevels_lvc = lt_grouplevels_lvc IMPORTING et_fieldcat_kkblo = lt_fieldcat_kkblo et_sort_kkblo = lt_sort_kkblo et_filtered_entries_kkblo = lt_filter_idx_kkblo et_grouplevels_kkblo = lt_grouplevels_kkblo TABLES it_data = <f_alv_tab> EXCEPTIONS it_data_missing = 1 it_fieldcat_lvc_missing = 2 OTHERS = 3. IF sy-subrc <> 0. RAISE ex_transfer_kkblo_error. ENDIF. CLEAR: wa_fieldcat_lvc, lt_fieldcat_lvc, lt_sort_lvc, lt_filter_idx_lvc, lt_grouplevels_lvc. CLEAR: lo_grid. *--------------------------------------------------------------------* * SESSION 2: SORT, FILTER AND CALCULATE TOTAL / SUBTOTAL *--------------------------------------------------------------------* * append subtotal & total line CREATE DATA lt_excel LIKE <f_alv_tab>. ASSIGN lt_excel->* TO <f_excel_tab>. LOOP AT <f_alv_tab> ASSIGNING <f_line>. l_save_index = sy-tabix. * filter base on filter index table READ TABLE lt_filter_idx_kkblo ASSIGNING <f_filter_idx_line> WITH KEY index = l_save_index BINARY SEARCH. IF sy-subrc NE 0. APPEND <f_line> TO <f_excel_tab>. ENDIF. * append subtotal lines READ TABLE lt_grouplevels_kkblo ASSIGNING <f_grouplevels_line> WITH KEY index_to = l_save_index BINARY SEARCH. IF sy-subrc = 0. l_tabix = sy-tabix. DO. IF <f_grouplevels_line>-subtot EQ 'X' AND <f_grouplevels_line>-hide_level IS INITIAL AND <f_grouplevels_line>-cindex_from NE 0. * dynamic append subtotal line to excel table base on grouplevel table * ex <f_GROUPLEVELS_line>-level = 1 * then <f_collect_tab> = '<F_COLLECT01>' l_collect = <f_grouplevels_line>-level. CONDENSE l_collect. CONCATENATE '<F_COLLECT0' l_collect '>' * '->*' INTO l_collect. ASSIGN (l_collect) TO <f_collect_tab>. * incase there're more than 1 total line of group, at the same level * for example: subtotal of multi currency LOOP AT <f_collect_tab> ASSIGNING <f_collect_line>. IF sy-tabix BETWEEN <f_grouplevels_line>-cindex_from AND <f_grouplevels_line>-cindex_to. APPEND <f_collect_line> TO <f_excel_tab>. * save subtotal lines index wa_subtot_indexs-index = sy-tabix. APPEND wa_subtot_indexs TO lt_subtot_indexs. * append sub total ranges table for format later ADD 1 TO l_sub_index. subrangeitem-name = l_sub_index. CONDENSE subrangeitem-name. CONCATENATE 'SUBTOT' subrangeitem-name INTO subrangeitem-name. subrangeitem-rows = wa_subtot_indexs-index. subrangeitem-columns = 1. " start col APPEND subrangeitem TO subranges. CLEAR: subrangeitem. ENDIF. ENDLOOP. UNASSIGN: <f_collect_tab>. UNASSIGN: <f_collect_line>. CLEAR: l_collect. ENDIF. * check next subtotal level of group UNASSIGN: <f_grouplevels_line>. ADD 1 TO l_tabix. READ TABLE lt_grouplevels_kkblo ASSIGNING <f_grouplevels_line> INDEX l_tabix. IF sy-subrc NE 0 OR <f_grouplevels_line>-index_to NE l_save_index. EXIT. ENDIF. UNASSIGN: <f_collect_tab>, <f_collect_line>. ENDDO. ENDIF. CLEAR: l_tabix, l_save_index. UNASSIGN: <f_filter_idx_line>, <f_grouplevels_line>. ENDLOOP. * free local data UNASSIGN: <f_line>, <f_collect_tab>, <f_collect_line>, <f_fieldcat_line>. * append grand total line IF <f_collect00> IS ASSIGNED. ASSIGN <f_collect00> TO <f_collect_tab>. IF <f_collect_tab> IS NOT INITIAL. LOOP AT <f_collect_tab> ASSIGNING <f_collect_line>. APPEND <f_collect_line> TO <f_excel_tab>. * save total line index wa_subtot_indexs-index = sy-tabix. APPEND wa_subtot_indexs TO lt_subtot_indexs. * append grand total range (to format) ADD 1 TO l_sub_index. subrangeitem-name = l_sub_index. CONDENSE subrangeitem-name. CONCATENATE 'TOTAL' subrangeitem-name INTO subrangeitem-name. subrangeitem-rows = wa_subtot_indexs-index. subrangeitem-columns = 1. " start col APPEND subrangeitem TO subranges. ENDLOOP. ENDIF. ENDIF. CLEAR: subrangeitem, lt_sort_kkblo, <f_collect00>, <f_collect01>, <f_collect02>, <f_collect03>, <f_collect04>, <f_collect05>, <f_collect06>, <f_collect07>, <f_collect08>, <f_collect09>. UNASSIGN: <f_collect00>, <f_collect01>, <f_collect02>, <f_collect03>, <f_collect04>, <f_collect05>, <f_collect06>, <f_collect07>, <f_collect08>, <f_collect09>, <f_collect_tab>, <f_collect_line>. *--------------------------------------------------------------------* * SESSION 3: MAP DATA TO SEMANTIC TABLE *--------------------------------------------------------------------* * get dependent field field: currency and quantity CREATE DATA wa LIKE LINE OF <f_excel_tab>. ASSIGN wa->* TO <f_excel_line>. DESCRIBE FIELD <f_excel_line> TYPE l_typ COMPONENTS l_num. DO l_num TIMES. l_save_index = sy-index. ASSIGN COMPONENT l_save_index OF STRUCTURE <f_excel_line> TO <f_excel_column>. IF sy-subrc NE 0. MESSAGE e801(zabap2xlsx) WITH 'FATAL ERROR' RAISING fatal_error. ENDIF. LOOP AT lt_fieldcat_kkblo ASSIGNING <f_fieldcat_line> WHERE tabname = l_tabname. ASSIGN COMPONENT <f_fieldcat_line>-fieldname OF STRUCTURE <f_excel_line> TO <f_fcat_column>. DESCRIBE DISTANCE BETWEEN <f_excel_column> AND <f_fcat_column> INTO l_int IN BYTE MODE. * append column index * this columns index is of table, not fieldcat IF l_int = 0. wa_column_index-fieldname = <f_fieldcat_line>-fieldname. wa_column_index-tabname = <f_fieldcat_line>-tabname. wa_column_index-col = l_save_index. APPEND wa_column_index TO lt_column_index. ENDIF. * append dependent fields (currency and quantity unit) IF <f_fieldcat_line>-cfieldname IS NOT INITIAL. CLEAR wa_fieldcat_depf. wa_fieldcat_depf-fieldname = <f_fieldcat_line>-cfieldname. wa_fieldcat_depf-tabname = <f_fieldcat_line>-ctabname. COLLECT wa_fieldcat_depf INTO lt_fieldcat_depf. ENDIF. IF <f_fieldcat_line>-qfieldname IS NOT INITIAL. CLEAR wa_fieldcat_depf. wa_fieldcat_depf-fieldname = <f_fieldcat_line>-qfieldname. wa_fieldcat_depf-tabname = <f_fieldcat_line>-qtabname. COLLECT wa_fieldcat_depf INTO lt_fieldcat_depf. ENDIF. * rewrite field data type IF <f_fieldcat_line>-inttype = 'X' AND <f_fieldcat_line>-datatype(3) = 'INT'. <f_fieldcat_line>-inttype = 'I'. ENDIF. ENDLOOP. CLEAR: l_save_index. UNASSIGN: <f_fieldcat_line>. ENDDO. * build semantic tables l_n_hrz_keys = 1. * Get keyfigures LOOP AT lt_fieldcat_kkblo ASSIGNING <f_fieldcat_line> WHERE tabname = l_tabname AND tech NE 'X' AND no_out NE 'X'. CLEAR wa_sema. CLEAR wa_hkey. * Units belong to keyfigures -> display as str READ TABLE lt_fieldcat_depf INTO wa_fieldcat_depf WITH KEY fieldname = <f_fieldcat_line>-fieldname tabname = <f_fieldcat_line>-tabname. IF sy-subrc = 0. wa_sema-col_typ = 'STR'. wa_sema-col_ops = 'DFT'. * Keyfigures ELSE. CASE <f_fieldcat_line>-datatype. WHEN 'QUAN'. wa_sema-col_typ = 'N03'. IF <f_fieldcat_line>-no_sum NE 'X'. wa_sema-col_ops = 'ADD'. ELSE. wa_sema-col_ops = 'NOP'. " no dependent field ENDIF. WHEN 'DATS'. wa_sema-col_typ = 'DAT'. wa_sema-col_ops = 'NOP'. WHEN 'CHAR' OR 'UNIT' OR 'CUKY'. " Added fieldformats UNIT and CUKY - dd. 26-10-2012 Wouter Heuvelmans wa_sema-col_typ = 'STR'. wa_sema-col_ops = 'DFT'. " dependent field * incase numeric, ex '00120' -> display as '12' WHEN 'NUMC'. wa_sema-col_typ = 'STR'. wa_sema-col_ops = 'DFT'. WHEN OTHERS. wa_sema-col_typ = 'NUM'. IF <f_fieldcat_line>-no_sum NE 'X'. wa_sema-col_ops = 'ADD'. ELSE. wa_sema-col_ops = 'NOP'. ENDIF. ENDCASE. ENDIF. l_counter = l_counter + 1. l_n_att_cols = l_n_att_cols + 1. wa_sema-col_no = l_counter. READ TABLE lt_column_index INTO wa_column_index WITH KEY fieldname = <f_fieldcat_line>-fieldname tabname = <f_fieldcat_line>-tabname. IF sy-subrc = 0. wa_sema-col_src = wa_column_index-col. ELSE. RAISE fatal_error. ENDIF. * columns index of ref currency field in table IF NOT <f_fieldcat_line>-cfieldname IS INITIAL. READ TABLE lt_column_index INTO wa_column_index WITH KEY fieldname = <f_fieldcat_line>-cfieldname tabname = <f_fieldcat_line>-ctabname. IF sy-subrc = 0. wa_sema-col_cur = wa_column_index-col. ENDIF. * quantities fields * treat as currency when display on excel ELSEIF NOT <f_fieldcat_line>-qfieldname IS INITIAL. READ TABLE lt_column_index INTO wa_column_index WITH KEY fieldname = <f_fieldcat_line>-qfieldname tabname = <f_fieldcat_line>-qtabname. IF sy-subrc = 0. wa_sema-col_cur = wa_column_index-col. ENDIF. ENDIF. * Treat of fixed currency in the fieldcatalog for column DATA: l_num_help(2) TYPE n. IF NOT <f_fieldcat_line>-currency IS INITIAL. SELECT * FROM tcurx INTO TABLE lt_tcurx. SORT lt_tcurx. READ TABLE lt_tcurx INTO wa_tcurx WITH KEY currkey = <f_fieldcat_line>-currency. IF sy-subrc = 0. l_num_help = wa_tcurx-currdec. CONCATENATE 'N' l_num_help INTO wa_sema-col_typ. wa_sema-col_cur = sy-tabix * ( -1 ). ENDIF. ENDIF. wa_hkey-col_no = l_n_att_cols. wa_hkey-row_no = l_n_hrz_keys. wa_hkey-col_name = <f_fieldcat_line>-reptext. APPEND wa_hkey TO lt_hkey. APPEND wa_sema TO lt_sema. ENDLOOP. * free local data CLEAR: lt_column_index, wa_column_index, lt_fieldcat_depf, wa_fieldcat_depf, lt_tcurx, wa_tcurx, l_num, l_typ, wa, l_int, l_counter. UNASSIGN: <f_fieldcat_line>, <f_excel_line>, <f_excel_column>, <f_fcat_column>. *--------------------------------------------------------------------* * SESSION 4: WRITE TO EXCEL *--------------------------------------------------------------------* CLEAR: wa_tcurx. REFRESH: lt_tcurx. * if spreadsheet dun have proxy yet IF li_has IS INITIAL. l_retcode = c_oi_errors=>ret_interface_not_supported. CALL METHOD c_oi_errors=>create_error_for_retcode EXPORTING retcode = l_retcode no_flush = no_flush IMPORTING error = lo_error_w. RETURN. ENDIF. CREATE OBJECT l_error EXPORTING object_name = 'OLE_DOCUMENT_PROXY' method_name = 'get_ranges_names'. CALL METHOD c_oi_errors=>add_error EXPORTING error = l_error. DESCRIBE TABLE lt_sema LINES datareal. DESCRIBE TABLE <f_excel_tab> LINES datac. DESCRIBE TABLE lt_vkey LINES vkeycount. IF datac = 0. RAISE inv_data_range. ENDIF. IF vkeycount NE l_n_vrt_keys. RAISE dim_mismatch_vkey. ENDIF. all = l_n_vrt_keys + l_n_att_cols. IF datareal NE all. RAISE dim_mismatch_sema. ENDIF. DATA: decimal TYPE c. * get decimal separator format ('.', ',', ...) in Office config CALL METHOD lo_proxy->get_application_property EXPORTING property_name = 'INTERNATIONAL' subproperty_name = 'DECIMAL_SEPARATOR' CHANGING retvalue = decimal. DATA date_format TYPE usr01-datfm. SELECT SINGLE datfm FROM usr01 INTO date_format WHERE bname = sy-uname. DATA: comma_elim(4) TYPE c. FIELD-SYMBOLS <g> TYPE any. DATA search_item(4) VALUE ' #'. CONCATENATE ',' decimal '.' decimal INTO comma_elim. DATA help TYPE i. " table (with subtotal) line number help = datac. DATA: rowmax TYPE i VALUE 1. " header row number DATA: columnmax TYPE i VALUE 0. " header columns number LOOP AT lt_hkey INTO hkeyitem. IF hkeyitem-col_no > columnmax. columnmax = hkeyitem-col_no. ENDIF. IF hkeyitem-row_no > rowmax. rowmax = hkeyitem-row_no. ENDIF. ENDLOOP. DATA: hkeycolumns TYPE i. " header columns no hkeycolumns = columnmax. IF hkeycolumns < l_n_att_cols. hkeycolumns = l_n_att_cols. ENDIF. columnmax = 0. LOOP AT lt_vkey INTO vkeyitem. IF vkeyitem-col_no > columnmax. columnmax = vkeyitem-col_no. ENDIF. ENDLOOP. DATA overflow TYPE i VALUE 1. DATA testname(10) TYPE c. DATA temp2 TYPE i. " 1st item row position in excel DATA realmit TYPE i VALUE 1. DATA realoverflow TYPE i VALUE 1. " row index in content CALL METHOD lo_spreadsheet->screen_update EXPORTING updating = ''. CALL METHOD lo_spreadsheet->load_lib. DATA: str(40) TYPE c. " range names of columns range (w/o col header) DATA: rows TYPE i. " row postion of 1st item line in ecxel * calculate row position of data table DESCRIBE TABLE it_listheader LINES li_commentary_rows. * if grid had title, add 1 empy line between title and table IF li_commentary_rows NE 0. ADD 1 TO li_commentary_rows. ENDIF. * add top position of block data li_commentary_rows = li_commentary_rows + i_top - 1. * write header (commentary rows) DATA: li_commentary_row_index TYPE i VALUE 1. DATA: li_content_index TYPE i VALUE 1. DATA: ls_index(10) TYPE c. DATA ls_commentary_range(40) TYPE c VALUE 'TITLE'. DATA: li_font_bold TYPE i. DATA: li_font_italic TYPE i. DATA: li_font_size TYPE i. LOOP AT it_listheader INTO wa_listheader. li_commentary_row_index = i_top + li_content_index - 1. ls_index = li_content_index. CONDENSE ls_index. CONCATENATE ls_commentary_range(5) ls_index INTO ls_commentary_range. CONDENSE ls_commentary_range. * insert title range CALL METHOD lo_spreadsheet->insert_range_dim EXPORTING name = ls_commentary_range top = li_commentary_row_index left = i_left rows = 1 columns = 1 no_flush = no_flush. * format range CASE wa_listheader-typ. WHEN 'H'. "title li_font_size = 16. li_font_bold = 1. li_font_italic = -1. WHEN 'S'. "subtile li_font_size = -1. li_font_bold = 1. li_font_italic = -1. WHEN OTHERS. "'A' comment li_font_size = -1. li_font_bold = -1. li_font_italic = 1. ENDCASE. CALL METHOD lo_spreadsheet->set_font EXPORTING rangename = ls_commentary_range family = '' size = li_font_size bold = li_font_bold italic = li_font_italic align = 0 no_flush = no_flush. * title: range content rangeitem-name = ls_commentary_range. rangeitem-columns = 1. rangeitem-rows = 1. APPEND rangeitem TO ranges. contentsitem-row = li_content_index. contentsitem-column = 1. CONCATENATE wa_listheader-key wa_listheader-info INTO contentsitem-value SEPARATED BY space. CONDENSE contentsitem-value. APPEND contentsitem TO contents. ADD 1 TO li_content_index. CLEAR: rangeitem, contentsitem, ls_index. ENDLOOP. * set range data title CALL METHOD lo_spreadsheet->set_ranges_data EXPORTING ranges = ranges contents = contents no_flush = no_flush. REFRESH: ranges, contents. rows = rowmax + li_commentary_rows + 1. all = date_format. all = all + 3. LOOP AT lt_sema INTO semaitem. IF semaitem-col_typ = 'DAT' OR semaitem-col_typ = 'MON' OR semaitem-col_typ = 'N00' OR semaitem-col_typ = 'N01' OR semaitem-col_typ = 'N02' OR semaitem-col_typ = 'N03' OR semaitem-col_typ = 'PCT' OR semaitem-col_typ = 'STR' OR semaitem-col_typ = 'NUM'. CLEAR str. str = semaitem-col_no. CONDENSE str. CONCATENATE 'DATA' str INTO str. mit = semaitem-col_no. li_col_pos = semaitem-col_no + i_left - 1. * range from data1 to data(n), for each columns of table CALL METHOD lo_spreadsheet->insert_range_dim EXPORTING name = str top = rows left = li_col_pos rows = help columns = 1 no_flush = no_flush. DATA dec TYPE i VALUE -1. DATA typeinfo TYPE sydes_typeinfo. LOOP AT <f_excel_tab> ASSIGNING <line>. ASSIGN COMPONENT semaitem-col_no OF STRUCTURE <line> TO <item>. DESCRIBE FIELD <item> INTO td. READ TABLE td-types INDEX 1 INTO typeinfo. IF typeinfo-type = 'P'. dec = typeinfo-decimals. ELSEIF typeinfo-type = 'I'. dec = 0. ENDIF. DESCRIBE FIELD <line> TYPE typ COMPONENTS count. mit = 1. DO count TIMES. IF mit = semaitem-col_src. ASSIGN COMPONENT sy-index OF STRUCTURE <line> TO <item>. DESCRIBE FIELD <item> INTO td. READ TABLE td-types INDEX 1 INTO typeinfo. IF typeinfo-type = 'P'. dec = typeinfo-decimals. ENDIF. EXIT. ENDIF. mit = mit + 1. ENDDO. EXIT. ENDLOOP. * format for each columns of table (w/o columns headers) IF semaitem-col_typ = 'DAT'. IF semaitem-col_no > vkeycount. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = all no_flush = no_flush. ELSE. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 0 no_flush = no_flush. ENDIF. ELSEIF semaitem-col_typ = 'STR'. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 0 no_flush = no_flush. ELSEIF semaitem-col_typ = 'MON'. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 10 no_flush = no_flush. ELSEIF semaitem-col_typ = 'N00'. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 0 no_flush = no_flush. ELSEIF semaitem-col_typ = 'N01'. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 1 no_flush = no_flush. ELSEIF semaitem-col_typ = 'N02'. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 2 no_flush = no_flush. ELSEIF semaitem-col_typ = 'N03'. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 3 no_flush = no_flush. ELSEIF semaitem-col_typ = 'N04'. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 4 no_flush = no_flush. ELSEIF semaitem-col_typ = 'NUM'. IF dec EQ -1. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = 2 no_flush = no_flush. ELSE. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 1 decimals = dec no_flush = no_flush. ENDIF. ELSEIF semaitem-col_typ = 'PCT'. CALL METHOD lo_spreadsheet->set_format EXPORTING rangename = str currency = '' typ = 3 decimals = 0 no_flush = no_flush. ENDIF. ENDIF. ENDLOOP. * get item contents for set_range_data method * get currency cell also mit = 1. DATA: currcells TYPE soi_cell_table. DATA: curritem TYPE soi_cell_item. curritem-rows = 1. curritem-columns = 1. curritem-front = -1. curritem-back = -1. curritem-font = ''. curritem-size = -1. curritem-bold = -1. curritem-italic = -1. curritem-align = -1. curritem-frametyp = -1. curritem-framecolor = -1. curritem-currency = ''. curritem-number = 1. curritem-input = -1. DATA: const TYPE i. * Change for Correction request * Initial 10000 lines are missing in Excel Export * if there are only 2 columns in exported List object. IF datareal GT 2. const = 20000 / datareal. ELSE. const = 20000 / ( datareal + 2 ). ENDIF. DATA: lines TYPE i. DATA: innerlines TYPE i. DATA: counter TYPE i. DATA: curritem2 LIKE curritem. DATA: curritem3 LIKE curritem. DATA: length TYPE i. DATA: found. * append content table (for method set_range_content) LOOP AT <f_excel_tab> ASSIGNING <line>. * save line index to compare with lt_subtot_indexs, * to discover line is a subtotal / totale line or not * ex use to set 'dun display zero in subtotal / total line' l_save_index = sy-tabix. DO datareal TIMES. READ TABLE lt_sema INTO semaitem WITH KEY col_no = sy-index. IF semaitem-col_src NE 0. ASSIGN COMPONENT semaitem-col_src OF STRUCTURE <line> TO <item>. ELSE. ASSIGN COMPONENT sy-index OF STRUCTURE <line> TO <item>. ENDIF. contentsitem-row = realoverflow. IF sy-subrc = 0. MOVE semaitem-col_ops TO search_item(3). SEARCH 'ADD#CNT#MIN#MAX#AVG#NOP#DFT#' FOR search_item. IF sy-subrc NE 0. RAISE error_in_sema. ENDIF. MOVE semaitem-col_typ TO search_item(3). SEARCH 'NUM#N00#N01#N02#N03#N04#PCT#DAT#MON#STR#' FOR search_item. IF sy-subrc NE 0. RAISE error_in_sema. ENDIF. contentsitem-column = sy-index. IF semaitem-col_typ EQ 'DAT' OR semaitem-col_typ EQ 'MON'. IF semaitem-col_no > vkeycount. " Hinweis 512418 " EXCEL bezieht Datumsangaben " auf den 31.12.1899, behandelt " aber 1900 als ein Schaltjahr " d.h. ab 1.3.1900 korrekt " 1.3.1900 als Zahl = 61 DATA: genesis TYPE d VALUE '18991230'. DATA: number_of_days TYPE p. * change for date in char format & sema_type = X DATA: temp_date TYPE d. IF NOT <item> IS INITIAL AND NOT <item> CO ' ' AND NOT <item> CO '0'. * change for date in char format & sema_type = X starts IF sema_type = 'X'. DESCRIBE FIELD <item> TYPE typ. IF typ = 'C'. temp_date = <item>. number_of_days = temp_date - genesis. ELSE. number_of_days = <item> - genesis. ENDIF. ELSE. number_of_days = <item> - genesis. ENDIF. * change for date in char format & sema_type = X ends IF number_of_days < 61. number_of_days = number_of_days - 1. ENDIF. SET COUNTRY 'DE'. WRITE number_of_days TO contentsitem-value NO-GROUPING LEFT-JUSTIFIED. SET COUNTRY space. TRANSLATE contentsitem-value USING comma_elim. ELSE. CLEAR contentsitem-value. ENDIF. ELSE. MOVE <item> TO contentsitem-value. ENDIF. ELSEIF semaitem-col_typ EQ 'NUM' OR semaitem-col_typ EQ 'N00' OR semaitem-col_typ EQ 'N01' OR semaitem-col_typ EQ 'N02' OR semaitem-col_typ EQ 'N03' OR semaitem-col_typ EQ 'N04' OR semaitem-col_typ EQ 'PCT'. SET COUNTRY 'DE'. DESCRIBE FIELD <item> TYPE typ. IF semaitem-col_cur IS INITIAL. IF typ NE 'F'. WRITE <item> TO contentsitem-value NO-GROUPING NO-SIGN DECIMALS 14. ELSE. WRITE <item> TO contentsitem-value NO-GROUPING NO-SIGN. ENDIF. ELSE. * Treat of fixed curreny for column >>Y9CK007319 IF semaitem-col_cur < 0. semaitem-col_cur = semaitem-col_cur * ( -1 ). SELECT * FROM tcurx INTO TABLE lt_tcurx. SORT lt_tcurx. READ TABLE lt_tcurx INTO wa_tcurx INDEX semaitem-col_cur. IF sy-subrc = 0. IF typ NE 'F'. WRITE <item> TO contentsitem-value NO-GROUPING CURRENCY wa_tcurx-currkey NO-SIGN DECIMALS 14. ELSE. WRITE <item> TO contentsitem-value NO-GROUPING CURRENCY wa_tcurx-currkey NO-SIGN. ENDIF. ENDIF. ELSE. ASSIGN COMPONENT semaitem-col_cur OF STRUCTURE <line> TO <g>. * mit = index of recent row curritem-top = rowmax + mit + li_commentary_rows. li_col_pos = sy-index + i_left - 1. curritem-left = li_col_pos. * if filed is quantity field (qfieldname ne space) * or amount field (cfieldname ne space), then format decimal place * corresponding with config CLEAR: l_def. READ TABLE lt_fieldcat_kkblo ASSIGNING <f_fieldcat_line> WITH KEY tabname = l_tabname tech = space no_out = space col_pos = semaitem-col_no. IF sy-subrc = 0. IF <f_fieldcat_line>-cfieldname IS NOT INITIAL. l_def = 'C'. ELSE."if <f_fieldcat_line>-qfieldname is not initial. l_def = 'Q'. ENDIF. ENDIF. * if field is amount field * exporting of amount field base on currency decimal table: TCURX IF l_def = 'C'. "field is amount field SELECT SINGLE * FROM tcurx INTO wa_tcurx WHERE currkey = <g>. * if amount ref to un-know currency -> default decimal = 2 IF sy-subrc EQ 0. curritem-decimals = wa_tcurx-currdec. ELSE. curritem-decimals = 2. ENDIF. APPEND curritem TO currcells. IF typ NE 'F'. WRITE <item> TO contentsitem-value CURRENCY <g> NO-SIGN NO-GROUPING. ELSE. WRITE <item> TO contentsitem-value DECIMALS 14 CURRENCY <g> NO-SIGN NO-GROUPING. ENDIF. * if field is quantity field * exporting of quantity field base on quantity decimal table: T006 ELSE."if l_def = 'Q'. " field is quantity field CLEAR: wa_t006. SELECT SINGLE * FROM t006 INTO wa_t006 WHERE msehi = <g>. * if quantity ref to un-know unit-> default decimal = 2 IF sy-subrc EQ 0. curritem-decimals = wa_t006-decan. ELSE. curritem-decimals = 2. ENDIF. APPEND curritem TO currcells. WRITE <item> TO contentsitem-value UNIT <g> NO-SIGN NO-GROUPING. CONDENSE contentsitem-value. ENDIF. ENDIF. "Y9CK007319 ENDIF. CONDENSE contentsitem-value. * add function fieldcat-no zero display LOOP AT lt_fieldcat_kkblo ASSIGNING <f_fieldcat_line> WHERE tabname = l_tabname AND tech NE 'X' AND no_out NE 'X'. IF <f_fieldcat_line>-col_pos = semaitem-col_no. IF <f_fieldcat_line>-no_zero = 'X'. IF <item> = '0'. CLEAR: contentsitem-value. ENDIF. * dun display zero in total/subtotal line too ELSE. CLEAR: wa_subtot_indexs. READ TABLE lt_subtot_indexs INTO wa_subtot_indexs WITH KEY index = l_save_index. IF sy-subrc = 0 AND <item> = '0'. CLEAR: contentsitem-value. ENDIF. ENDIF. ENDIF. ENDLOOP. UNASSIGN: <f_fieldcat_line>. IF <item> LT 0. SEARCH contentsitem-value FOR 'E'. IF sy-fdpos EQ 0. * use prefix notation for signed numbers TRANSLATE contentsitem-value USING '- '. CONDENSE contentsitem-value NO-GAPS. CONCATENATE '-' contentsitem-value INTO contentsitem-value. ELSE. CONCATENATE '-' contentsitem-value INTO contentsitem-value. ENDIF. ENDIF. SET COUNTRY space. * Hier wird nur die korrekte Kommaseparatierung gemacht, wenn die * Zeichen einer * Zahl enthalten sind. Das ist für Timestamps, die auch ":" enthalten. * Für die * darf keine Kommaseparierung stattfinden. * Changing for correction request - Y6BK041073 IF contentsitem-value CO '0123456789.,-+E '. TRANSLATE contentsitem-value USING comma_elim. ENDIF. ELSE. CLEAR contentsitem-value. * if type is not numeric -> dun display with zero WRITE <item> TO contentsitem-value NO-ZERO. SHIFT contentsitem-value LEFT DELETING LEADING space. ENDIF. APPEND contentsitem TO contents. ENDIF. ENDDO. realmit = realmit + 1. realoverflow = realoverflow + 1. mit = mit + 1. * overflow = current row index in content table overflow = overflow + 1. ENDLOOP. UNASSIGN: <f_fieldcat_line>. * set item range for set_range_data method testname = mit / const. CONDENSE testname. CONCATENATE 'TEST' testname INTO testname. realoverflow = realoverflow - 1. realmit = realmit - 1. help = realoverflow. rangeitem-name = testname. rangeitem-columns = datareal. rangeitem-rows = help. APPEND rangeitem TO ranges. * insert item range dim temp2 = rowmax + 1 + li_commentary_rows + realmit - realoverflow. * items data CALL METHOD lo_spreadsheet->insert_range_dim EXPORTING name = testname top = temp2 left = i_left rows = help columns = datareal no_flush = no_flush. * get columns header contents for set_range_data method * export columns header only if no columns header option = space DATA: rowcount TYPE i. DATA: columncount TYPE i. IF i_columns_header = 'X'. * append columns header to contents: hkey rowcount = 1. DO rowmax TIMES. columncount = 1. DO hkeycolumns TIMES. LOOP AT lt_hkey INTO hkeyitem WHERE col_no = columncount AND row_no = rowcount. ENDLOOP. IF sy-subrc = 0. str = hkeyitem-col_name. contentsitem-value = hkeyitem-col_name. ELSE. contentsitem-value = str. ENDIF. contentsitem-column = columncount. contentsitem-row = rowcount. APPEND contentsitem TO contents. columncount = columncount + 1. ENDDO. rowcount = rowcount + 1. ENDDO. * incase columns header in multiline DATA: rowmaxtemp TYPE i. IF rowmax > 1. rowmaxtemp = rowmax - 1. rowcount = 1. DO rowmaxtemp TIMES. columncount = 1. DO columnmax TIMES. contentsitem-column = columncount. contentsitem-row = rowcount. contentsitem-value = ''. APPEND contentsitem TO contents. columncount = columncount + 1. ENDDO. rowcount = rowcount + 1. ENDDO. ENDIF. * append columns header to contents: vkey columncount = 1. DO columnmax TIMES. LOOP AT lt_vkey INTO vkeyitem WHERE col_no = columncount. ENDLOOP. contentsitem-value = vkeyitem-col_name. contentsitem-row = rowmax. contentsitem-column = columncount. APPEND contentsitem TO contents. columncount = columncount + 1. ENDDO. *--------------------------------------------------------------------* * set header range for method set_range_data * insert header keys range dim li_head_top = li_commentary_rows + 1. li_col_pos = i_left. * insert range headers IF hkeycolumns NE 0. rangeitem-name = 'TESTHKEY'. rangeitem-rows = rowmax. rangeitem-columns = hkeycolumns. APPEND rangeitem TO ranges. CLEAR: rangeitem. CALL METHOD lo_spreadsheet->insert_range_dim EXPORTING name = 'TESTHKEY' top = li_head_top left = li_col_pos rows = rowmax columns = hkeycolumns no_flush = no_flush. ENDIF. ENDIF. * format for columns header + total + subtotal * ------------------------------------------ help = rowmax + realmit. " table + header lines DATA: lt_format TYPE soi_format_table. DATA: wa_format LIKE LINE OF lt_format. DATA: wa_format_temp LIKE LINE OF lt_format. FIELD-SYMBOLS: <f_source> TYPE any. FIELD-SYMBOLS: <f_des> TYPE any. * columns header format wa_format-front = -1. wa_format-back = 15. "grey wa_format-font = space. wa_format-size = -1. wa_format-bold = 1. wa_format-align = 0. wa_format-frametyp = -1. wa_format-framecolor = -1. * get column header format from input record * -> map input format IF i_columns_header = 'X'. wa_format-name = 'TESTHKEY'. IF i_format_col_header IS NOT INITIAL. DESCRIBE FIELD i_format_col_header TYPE l_typ COMPONENTS li_col_num. DO li_col_num TIMES. IF sy-index NE 1. " dun map range name ASSIGN COMPONENT sy-index OF STRUCTURE i_format_col_header TO <f_source>. IF <f_source> IS NOT INITIAL. ASSIGN COMPONENT sy-index OF STRUCTURE wa_format TO <f_des>. <f_des> = <f_source>. UNASSIGN: <f_des>. ENDIF. UNASSIGN: <f_source>. ENDIF. ENDDO. CLEAR: li_col_num. ENDIF. APPEND wa_format TO lt_format. ENDIF. * Zusammenfassen der Spalten mit gleicher Nachkommastellenzahl * collect vertical cells (col) with the same number of decimal places * to increase perfomance in currency cell format DESCRIBE TABLE currcells LINES lines. lines = lines - 1. DO lines TIMES. DESCRIBE TABLE currcells LINES innerlines. innerlines = innerlines - 1. SORT currcells BY left top. CLEAR found. DO innerlines TIMES. READ TABLE currcells INDEX sy-index INTO curritem. counter = sy-index + 1. READ TABLE currcells INDEX counter INTO curritem2. IF curritem-left EQ curritem2-left. length = curritem-top + curritem-rows. IF length EQ curritem2-top AND curritem-decimals EQ curritem2-decimals. MOVE curritem TO curritem3. curritem3-rows = curritem3-rows + curritem2-rows. curritem-left = -1. MODIFY currcells INDEX sy-index FROM curritem. curritem2-left = -1. MODIFY currcells INDEX counter FROM curritem2. APPEND curritem3 TO currcells. found = 'X'. ENDIF. ENDIF. ENDDO. IF found IS INITIAL. EXIT. ENDIF. DELETE currcells WHERE left = -1. ENDDO. * Zusammenfassen der Zeilen mit gleicher Nachkommastellenzahl * collect horizontal cells (row) with the same number of decimal places * to increase perfomance in currency cell format DESCRIBE TABLE currcells LINES lines. lines = lines - 1. DO lines TIMES. DESCRIBE TABLE currcells LINES innerlines. innerlines = innerlines - 1. SORT currcells BY top left. CLEAR found. DO innerlines TIMES. READ TABLE currcells INDEX sy-index INTO curritem. counter = sy-index + 1. READ TABLE currcells INDEX counter INTO curritem2. IF curritem-top EQ curritem2-top AND curritem-rows EQ curritem2-rows. length = curritem-left + curritem-columns. IF length EQ curritem2-left AND curritem-decimals EQ curritem2-decimals. MOVE curritem TO curritem3. curritem3-columns = curritem3-columns + curritem2-columns. curritem-left = -1. MODIFY currcells INDEX sy-index FROM curritem. curritem2-left = -1. MODIFY currcells INDEX counter FROM curritem2. APPEND curritem3 TO currcells. found = 'X'. ENDIF. ENDIF. ENDDO. IF found IS INITIAL. EXIT. ENDIF. DELETE currcells WHERE left = -1. ENDDO. * Ende der Zusammenfassung * item data: format for currency cell, corresponding with currency CALL METHOD lo_spreadsheet->cell_format EXPORTING cells = currcells no_flush = no_flush. * item data: write item table content CALL METHOD lo_spreadsheet->set_ranges_data EXPORTING ranges = ranges contents = contents no_flush = no_flush. * whole table range to format all table IF i_columns_header = 'X'. li_head_top = li_commentary_rows + 1. ELSE. li_head_top = li_commentary_rows + 2. help = help - 1. ENDIF. CALL METHOD lo_spreadsheet->insert_range_dim EXPORTING name = 'WHOLE_TABLE' top = li_head_top left = i_left rows = help columns = datareal no_flush = no_flush. * columns width auto fix * this parameter = space in case use with exist template IF i_columns_autofit = 'X'. CALL METHOD lo_spreadsheet->fit_widest EXPORTING name = 'WHOLE_TABLE' no_flush = no_flush. ENDIF. * frame * The parameter has 8 bits *0 Left margin *1 Top marginT *2 Bottom margin *3 Right margin *4 Horizontal line *5 Vertical line *6 Thinness *7 Thickness * here 127 = 1111111 6-5-4-3-2-1 mean Thin-ver-hor-right-bot-top-left * ( final DOI method call, set no_flush = space * equal to call method CL_GUI_CFW=>FLUSH ) CALL METHOD lo_spreadsheet->set_frame EXPORTING rangename = 'WHOLE_TABLE' typ = 127 color = 1 no_flush = space IMPORTING error = lo_error retcode = lc_retcode. error_doi( ). * reformat subtotal / total line after format wholw table LOOP AT subranges INTO subrangeitem. l_sub_index = subrangeitem-rows + li_commentary_rows + rowmax. CALL METHOD lo_spreadsheet->insert_range_dim EXPORTING name = subrangeitem-name left = i_left top = l_sub_index rows = 1 columns = datareal no_flush = no_flush. wa_format-name = subrangeitem-name. * default format: * - clolor: subtotal = light yellow, subtotal = yellow * - frame: box IF subrangeitem-name(3) = 'SUB'. wa_format-back = 36. "subtotal line wa_format_temp = i_format_subtotal. ELSE. wa_format-back = 27. "total line wa_format_temp = i_format_total. ENDIF. wa_format-frametyp = 79. wa_format-framecolor = 1. wa_format-number = -1. wa_format-align = -1. * get subtoal + total format from intput parameter * overwrite default format IF wa_format_temp IS NOT INITIAL. DESCRIBE FIELD wa_format_temp TYPE l_typ COMPONENTS li_col_num. DO li_col_num TIMES. IF sy-index NE 1. " dun map range name ASSIGN COMPONENT sy-index OF STRUCTURE wa_format_temp TO <f_source>. IF <f_source> IS NOT INITIAL. ASSIGN COMPONENT sy-index OF STRUCTURE wa_format TO <f_des>. <f_des> = <f_source>. UNASSIGN: <f_des>. ENDIF. UNASSIGN: <f_source>. ENDIF. ENDDO. CLEAR: li_col_num. ENDIF. APPEND wa_format TO lt_format. CLEAR: wa_format-name. CLEAR: l_sub_index. CLEAR: wa_format_temp. ENDLOOP. IF lt_format[] IS NOT INITIAL. CALL METHOD lo_spreadsheet->set_ranges_format EXPORTING formattable = lt_format no_flush = no_flush. REFRESH: lt_format. ENDIF. *--------------------------------------------------------------------* CALL METHOD lo_spreadsheet->screen_update EXPORTING updating = 'X'. CALL METHOD c_oi_errors=>flush_errors. lo_error_w = l_error. lc_retcode = lo_error_w->error_code. ** catch no_flush -> led to dump ( optional ) * go_error = l_error. * gc_retcode = go_error->error_code. * error_doi. CLEAR: lt_sema, wa_sema, lt_hkey, wa_hkey, lt_vkey, wa_vkey, l_n_hrz_keys, l_n_att_cols, l_n_vrt_keys, count, datac, datareal, vkeycount, all, mit, li_col_pos, li_col_num, ranges, rangeitem, contents, contentsitem, semaitem, hkeyitem, vkeyitem, li_commentary_rows, l_retcode, li_head_top, <f_excel_tab>. CLEAR: lo_error_w. UNASSIGN: <line>, <item>, <f_excel_tab>. *--------------------------------------------------------------------* * SESSION 5: SAVE AND CLOSE FILE *--------------------------------------------------------------------* * ex of save path: 'FILE://C:\temp\test.xlsx' CONCATENATE 'FILE://' i_save_path INTO ls_path. CALL METHOD lo_proxy->save_document_to_url EXPORTING no_flush = 'X' url = ls_path IMPORTING error = lo_error retcode = lc_retcode CHANGING document_size = li_document_size. error_doi( ). * if save successfully -> raise successful message MESSAGE i400(zabap2xlsx). CLEAR: ls_path, li_document_size. close_document( ). ENDMETHOD. "BIND_ALV_OLE2 METHOD close_document. DATA: l_is_closed TYPE i. CLEAR: l_is_closed. IF lo_proxy IS NOT INITIAL. * check proxy detroyed adi CALL METHOD lo_proxy->is_destroyed IMPORTING ret_value = l_is_closed. * if dun detroyed yet: close -> release proxy IF l_is_closed IS INITIAL. CALL METHOD lo_proxy->close_document * EXPORTING * do_save = do_save IMPORTING error = lo_error retcode = lc_retcode. ENDIF. CALL METHOD lo_proxy->release_document IMPORTING error = lo_error retcode = lc_retcode. ELSE. lc_retcode = c_oi_errors=>ret_document_not_open. ENDIF. * Detroy control container IF lo_control IS NOT INITIAL. CALL METHOD lo_control->destroy_control. ENDIF. CLEAR: lo_spreadsheet, lo_proxy, lo_control. ENDMETHOD. METHOD error_doi. IF lc_retcode NE c_oi_errors=>ret_ok. close_document( ). CALL METHOD lo_error->raise_message EXPORTING type = 'E'. CLEAR: lo_error. ENDIF. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 1069, 5276, 62, 2305, 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, 1259, 62, 15390, 62, 6371, 41876, 269, 406, 49494, 14280, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 11007, 62, 282, 85, 62, 2305, 17, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 22897, 62, 6371, 220, 220, 220, 220, 220, 41876, 1259, 62, 15390, 62, 6371, 5550, 38865, 2272, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 87, 7278, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 269, 5550, 38865, 2272, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 21928, 62, 6978, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 952, 62, 282, 85, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 537, 62, 48317, 62, 282, 85, 62, 25928, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 4868, 25677, 220, 220, 220, 220, 220, 220, 41876, 1017, 271, 62, 83, 62, 4868, 25677, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 4852, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1312, 5550, 38865, 352, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 9464, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1312, 5550, 38865, 352, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 28665, 82, 62, 25677, 220, 220, 220, 41876, 269, 5550, 38865, 705, 55, 6, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 28665, 82, 62, 2306, 1659, 270, 220, 220, 41876, 269, 5550, 38865, 705, 55, 6, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 18982, 62, 4033, 62, 25677, 41876, 523, 72, 62, 18982, 62, 9186, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 18982, 62, 7266, 23350, 220, 220, 41876, 523, 72, 62, 18982, 62, 9186, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 72, 62, 18982, 62, 23350, 220, 220, 220, 220, 220, 41876, 523, 72, 62, 18982, 62, 9186, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 7788, 42006, 11053, 198, 220, 220, 220, 220, 220, 220, 220, 2051, 62, 41311, 198, 220, 220, 220, 220, 220, 220, 220, 409, 62, 39437, 62, 28747, 2436, 78, 62, 18224, 198, 220, 220, 220, 220, 220, 220, 220, 10800, 62, 18224, 198, 220, 220, 220, 220, 220, 220, 220, 800, 62, 7890, 62, 9521, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 62, 76, 1042, 963, 62, 85, 2539, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 62, 76, 1042, 963, 62, 325, 2611, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 62, 259, 62, 325, 2611, 764, 628, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 1969, 62, 22897, 13, 198, 220, 220, 220, 42715, 12, 49273, 50, 4049, 62, 34023, 13, 628, 220, 220, 220, 42715, 12, 26947, 25, 2376, 62, 43639, 21760, 41876, 4526, 37, 5390, 1312, 62, 23013, 62, 43639, 21760, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2376, 62, 13716, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1312, 62, 23013, 62, 34924, 62, 13716, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2376, 62, 36436, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1312, 62, 23013, 62, 22897, 62, 36436, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2376, 62, 18224, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1312, 62, 23013, 62, 18224, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 66, 62, 1186, 8189, 220, 220, 220, 220, 41876, 220, 220, 220, 220, 220, 220, 220, 523, 72, 62, 1186, 62, 8841, 13, 198, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 1069, 5276, 62, 2305, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 11007, 62, 282, 85, 62, 2305, 17, 13, 198, 9, 10097, 650, 9, 198, 9, 11789, 6764, 25, 198, 9, 220, 220, 11789, 779, 284, 10784, 257, 7852, 62, 40156, 62, 1847, 53, 62, 10761, 2389, 2134, 284, 2124, 7278, 87, 14, 87, 7278, 2393, 198, 9, 220, 220, 351, 1351, 13639, 290, 220, 9695, 286, 8355, 53, 2214, 18388, 884, 355, 25, 198, 9, 220, 220, 220, 220, 1343, 7472, 11, 1448, 338, 13284, 4997, 198, 9, 220, 220, 220, 220, 1343, 39789, 7032, 11, 2033, 7032, 357, 21186, 7032, 8, 198, 9, 220, 220, 220, 220, 1343, 1400, 62, 448, 11, 645, 62, 22570, 11, 2644, 198, 9, 41317, 779, 287, 2446, 25, 198, 9, 220, 220, 48323, 27850, 4452, 38410, 357, 18227, 40, 8, 198, 9, 10097, 650, 9, 198, 198, 9, 6060, 329, 6246, 657, 25, 40722, 23772, 198, 9, 20368, 35937, 628, 220, 220, 220, 42865, 25, 7649, 62, 10134, 220, 220, 220, 220, 220, 41876, 1312, 13, 366, 44148, 468, 30117, 7071, 30, 198, 198, 9, 6060, 329, 6246, 352, 25, 3497, 406, 15922, 1366, 422, 8355, 53, 2134, 198, 9, 20368, 35937, 628, 220, 220, 220, 42865, 25, 300, 62, 10134, 62, 5275, 87, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 62, 4598, 310, 2981, 62, 1069, 5276, 62, 21760, 7, 1157, 8, 41876, 269, 13, 198, 198, 9, 406, 15922, 198, 220, 220, 220, 42865, 25, 300, 83, 62, 3245, 9246, 62, 6780, 66, 220, 220, 220, 220, 220, 220, 41876, 300, 28435, 62, 83, 62, 69, 9246, 13, 198, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
"! @testing /DMO/CL_I_TRAVEL_TUM "! @testing /DMO/CL_C_TRAVEL_TUM "! @testing /DMO/CL_FLIGHT_LEGACY00 "! @testing FUGR:/DMO/FLIGHT_TRAVEL_API00 CLASS ltc DEFINITION FINAL INHERITING FROM /dmo/tc_flight_travel_api00 FOR TESTING RISK LEVEL HARMLESS DURATION MEDIUM. ENDCLASS.
[ 40484, 2488, 33407, 1220, 35, 11770, 14, 5097, 62, 40, 62, 51, 3861, 18697, 62, 51, 5883, 198, 40484, 2488, 33407, 1220, 35, 11770, 14, 5097, 62, 34, 62, 51, 3861, 18697, 62, 51, 5883, 198, 40484, 2488, 33407, 1220, 35, 11770, 14, 5097, 62, 3697, 9947, 62, 2538, 38, 43300, 405, 198, 40484, 2488, 33407, 376, 7340, 49, 14079, 35, 11770, 14, 3697, 9947, 62, 51, 3861, 18697, 62, 17614, 405, 198, 31631, 300, 23047, 5550, 20032, 17941, 25261, 3268, 16879, 2043, 2751, 16034, 1220, 67, 5908, 14, 23047, 62, 22560, 62, 35927, 62, 15042, 405, 7473, 43001, 2751, 45698, 42, 49277, 43638, 5805, 7597, 360, 4261, 6234, 26112, 41796, 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 ]
CLASS zcl_adf_service DEFINITION PUBLIC ABSTRACT CREATE PUBLIC. PUBLIC SECTION. METHODS send IMPORTING VALUE(request) TYPE xstring !it_headers TYPE tihttpnvp OPTIONAL EXPORTING VALUE(response) TYPE string VALUE(ev_http_status) TYPE i RAISING zcx_adf_service . METHODS constructor IMPORTING VALUE(iv_interface_id) TYPE zinterface_id VALUE(iv_service_id) TYPE zazure_dest VALUE(iv_business_identifier) TYPE zbusinessid OPTIONAL RAISING zcx_adf_service zcx_http_client_failed zcx_interace_config_missing . METHODS format_data IMPORTING VALUE(iv_format_type) TYPE zadf_format_type VALUE(it_data) TYPE data RETURNING VALUE(rv_string) TYPE string RAISING zcx_adf_service . METHODS format_data_to_xml IMPORTING VALUE(it_data) TYPE data RETURNING VALUE(rv_string) TYPE string . METHODS format_data_to_json IMPORTING VALUE(it_data) TYPE data RETURNING VALUE(rv_string) TYPE string . METHODS add_expiry_time IMPORTING VALUE(iv_expiry_hour) TYPE i VALUE(iv_expiry_min) TYPE i DEFAULT 30 VALUE(iv_expiry_sec) TYPE i RAISING zcx_adf_service . METHODS urlencoded_to_http_fields IMPORTING !iv_response_data TYPE string RETURNING VALUE(et_fields) TYPE tihttpnvp RAISING zcx_adf_service . METHODS json_to_http_fields IMPORTING !iv_response_data TYPE string RETURNING VALUE(et_fields) TYPE tihttpnvp RAISING zcx_adf_service . METHODS get_message_id RETURNING VALUE(rv_message_id) TYPE guid_16 . PROTECTED SECTION. CONSTANTS gc_error TYPE char1 VALUE 'E' ##NO_TEXT. DATA gv_interface_id TYPE zinterface_id . DATA gv_sas_key TYPE string . DATA gv_uri TYPE string . DATA go_rest_api TYPE REF TO zcl_rest_framework . TYPE-POOLS abap . DATA gv_asynchronous TYPE abap_bool . DATA gv_is_try TYPE abap_bool . DATA gv_expiry_hour TYPE i . DATA gv_expiry_min TYPE i . DATA gv_expiry_sec TYPE i . DATA gv_string_to_sign TYPE string . DATA gv_service_version TYPE string . DATA gv_rfc_destination TYPE rfcdest . DATA gv_path_prefix TYPE string . DATA gv_host TYPE string . DATA gt_headers TYPE tihttpnvp . METHODS add_request_header IMPORTING VALUE(iv_name) TYPE string VALUE(iv_value) TYPE string . METHODS get_sas_token IMPORTING VALUE(iv_baseaddress) TYPE string RETURNING VALUE(rv_sas_token) TYPE string RAISING zcx_adf_service . METHODS get_epoch_time RETURNING VALUE(rv_expiry_time) TYPE string RAISING zcx_adf_service . METHODS decode_sign RETURNING VALUE(rv_secret) TYPE string RAISING zcx_adf_service . METHODS get_target_host IMPORTING !iv_destination TYPE rfcdes-rfcdest !iv_authority_check TYPE rfcdisplay-rfctrace OPTIONAL !iv_bypass_buff TYPE char1 OPTIONAL EXPORTING !ev_server TYPE rfcdisplay-rfchost !ev_path_prefix TYPE string RAISING zcx_adf_service . PRIVATE SECTION. CONSTANTS gc_format_xml TYPE zadf_format_type VALUE 'XML' ##NO_TEXT. CONSTANTS gc_format_json TYPE zadf_format_type VALUE 'JSON' ##NO_TEXT. CONSTANTS gc_asynchronous TYPE char1 VALUE 'A' ##NO_TEXT. CONSTANTS gc_synchronous TYPE char1 VALUE 'S' ##NO_TEXT. DATA gv_destination TYPE zazure_dest . DATA gv_service_id TYPE zazure_dest . METHODS get_interface_details RAISING zcx_adf_service . METHODS get_rest_api_ref IMPORTING !iv_business_identifier TYPE zbusinessid OPTIONAL RAISING zcx_adf_service zcx_http_client_failed zcx_interace_config_missing . ENDCLASS. CLASS zcl_adf_service IMPLEMENTATION. METHOD add_expiry_time. CLEAR: gv_expiry_hour,gv_expiry_min,gv_expiry_sec. gv_expiry_hour = iv_expiry_hour. gv_expiry_min = iv_expiry_min. gv_expiry_sec = iv_expiry_sec. IF ( gv_expiry_hour IS INITIAL ) AND ( gv_expiry_min IS INITIAL ) AND ( gv_expiry_sec IS INITIAL ). RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>expiry_time_not_set interface_id = gv_interface_id. ENDIF. ENDMETHOD. METHOD add_request_header. go_rest_api->zif_rest_framework~set_request_header( iv_name = iv_name iv_value = iv_value ). ENDMETHOD. METHOD constructor. gv_interface_id = iv_interface_id. gv_service_id = iv_service_id. get_interface_details( ). get_rest_api_ref( iv_business_identifier = iv_business_identifier ). ENDMETHOD. METHOD decode_sign. *This Include is to encrypt secrets with SSL client ID from STRUST * *Framework Author : Krishna Chandra Dash * * Sasidhar Puranam * *----------------------------------------------------------------------* DATA : lv_rfc_destination TYPE zrest_config-destination, lv_srtfd TYPE zadf_con_indx-srtfd, lw_indx TYPE zadf_con_indx, lt_enveloped_data TYPE TABLE OF ssfbin, lv_cert_string TYPE xstring, lt_recipients TYPE TABLE OF ssfinfo, lw_recipient TYPE ssfinfo, lt_input_data TYPE TABLE OF ssfbin, lw_input_data TYPE ssfbin, lv_env_data_len TYPE i, lv_env_len_total TYPE i, lv_subject TYPE string, lw_enveloped_data TYPE ssfbin, lv_xstr_input TYPE xstring, lv_len_output TYPE i, lv_len_input TYPE i, lt_decoded_bin TYPE TABLE OF x, lv_decoded_str TYPE string, lv_applic TYPE rfcdisplay-sslapplic, lv_psename TYPE ssfpsename, lv_profilename TYPE localfile, lv_profile TYPE ssfparms-pab, ssl_active TYPE rfcsnc. lv_srtfd = gv_interface_id. DEFINE decode_key. *Import internal table as a cluster from INDX IMPORT tab = lt_enveloped_data[] FROM DATABASE zadf_con_indx(zd) TO lw_indx ID lv_srtfd. IF NOT lt_enveloped_data[] IS INITIAL. CLEAR lv_rfc_destination. SELECT SINGLE destination FROM zrest_config INTO lv_rfc_destination WHERE interface_id EQ gv_interface_id. IF NOT lv_rfc_destination IS INITIAL . CALL FUNCTION 'RFC_READ_HTTP_DESTINATION' EXPORTING destination = lv_rfc_destination authority_check = ' ' IMPORTING sslapplic = lv_applic ssl = ssl_active EXCEPTIONS authority_not_available = 1 destination_not_exist = 2 information_failure = 3 internal_failure = 4 no_http_destination = 5 OTHERS = 6. IF sy-subrc NE 0. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>read_error_rfc_destination interface_id = gv_interface_id. ENDIF. if ssl_active <> abap_true. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>RFC_DESTINATION_NO_SSL rfc_destination = lv_rfc_destination interface_id = gv_interface_id. endif. CALL FUNCTION 'SSFPSE_FILENAME' EXPORTING mandt = sy-mandt context = 'SSLC' applic = lv_applic IMPORTING psename = lv_psename profile = lv_profilename EXCEPTIONS pse_not_found = 1 OTHERS = 2. IF sy-subrc NE 0. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>read_error_pse_filename interface_id = gv_interface_id. ENDIF. IF NOT lv_psename IS INITIAL. lv_profile = lv_psename. CALL FUNCTION 'SSFC_GET_CERTIFICATE' EXPORTING profile = lv_profile IMPORTING certificate = lv_cert_string EXCEPTIONS ssf_krn_error = 1 ssf_krn_nomemory = 2 ssf_krn_nossflib = 3 ssf_krn_invalid_par = 4 ssf_krn_nocertificate = 5 OTHERS = 6. IF sy-subrc NE 0. **Addinng complete profile path for reading certificate instance lv_profile = lv_profilename. CALL FUNCTION 'SSFC_GET_CERTIFICATE' EXPORTING profile = lv_profile IMPORTING certificate = lv_cert_string EXCEPTIONS ssf_krn_error = 1 ssf_krn_nomemory = 2 ssf_krn_nossflib = 3 ssf_krn_invalid_par = 4 ssf_krn_nocertificate = 5 OTHERS = 6. IF sy-subrc NE 0. **Raise Exception RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>error_get_certificate_instance interface_id = gv_interface_id. ENDIF. ENDIF. CALL FUNCTION 'SSFC_PARSE_CERTIFICATE' EXPORTING certificate = lv_cert_string IMPORTING subject = lv_subject EXCEPTIONS ssf_krn_error = 1 ssf_krn_nomemory = 2 ssf_krn_nossflib = 3 ssf_krn_invalid_par = 4 OTHERS = 5. IF sy-subrc NE 0. **Raise Exception RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>error_attributes_certificate interface_id = gv_interface_id. ENDIF. lw_recipient-id = lv_subject. lw_recipient-profile = lv_profile. APPEND lw_recipient TO lt_recipients. LOOP AT lt_enveloped_data INTO lw_enveloped_data. lv_env_data_len = xstrlen( lw_enveloped_data-bindata ). lv_env_len_total = lv_env_len_total + lv_env_data_len. CLEAR lw_enveloped_data. ENDLOOP. CALL FUNCTION 'SSF_KRN_DEVELOPE' EXPORTING ssftoolkit = 'SAPSECULIB' str_format = 'PKCS7' * B_OUTDEC = 'X' * IO_SPEC = 'T' ostr_enveloped_data_l = lv_env_len_total IMPORTING ostr_output_data_l = lv_len_input * CRC = TABLES ostr_enveloped_data = lt_enveloped_data recipient = lt_recipients ostr_output_data = lt_input_data EXCEPTIONS ssf_krn_error = 1 ssf_krn_noop = 2 ssf_krn_nomemory = 3 ssf_krn_opinv = 4 ssf_krn_nossflib = 5 ssf_krn_recipient_error = 6 ssf_krn_input_data_error = 7 ssf_krn_invalid_par = 8 ssf_krn_invalid_parlen = 9 ssf_fb_input_parameter_error = 10 OTHERS = 11. IF sy-subrc NE 0. **Raise Exception RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>error_decode_sas_key interface_id = gv_interface_id. ENDIF. IF NOT lt_input_data[] IS INITIAL. CALL FUNCTION 'SCMS_BINARY_TO_STRING' EXPORTING input_length = lv_len_input IMPORTING text_buffer = lv_decoded_str output_length = lv_len_output TABLES binary_tab = lt_input_data EXCEPTIONS failed = 1 OTHERS = 2. IF lv_decoded_str IS INITIAL. **Raise exception RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>error_con_saskey_string interface_id = gv_interface_id. ELSE. rv_secret = lv_decoded_str. ENDIF. ELSE. **Raise exception RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>error_read_encoded_saskey interface_id = gv_interface_id. ENDIF. ENDIF. ELSE. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>rfc_destination_not_maintained interface_id = gv_interface_id. ENDIF. ELSE. **Raise Exception RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>error_import_sas_key interface_id = gv_interface_id. ENDIF. IF rv_secret IS INITIAL. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>sas_key_not_maintained interface_id = gv_interface_id. ENDIF. END-OF-DEFINITION. decode_key. ENDMETHOD. METHOD format_data. CASE iv_format_type. WHEN gc_format_xml. rv_string = format_data_to_xml( it_data ). WHEN gc_format_json. rv_string = format_data_to_json( it_data ). WHEN OTHERS. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>format_not_supported format_type = iv_format_type. ENDCASE. ENDMETHOD. METHOD format_data_to_json. DATA : lo_json TYPE REF TO cl_trex_json_serializer. CREATE OBJECT lo_json EXPORTING data = it_data. lo_json->serialize( ). rv_string = lo_json->get_data( ). ENDMETHOD. METHOD format_data_to_xml. CALL TRANSFORMATION ('ID') SOURCE itab = it_data RESULT XML rv_string. ENDMETHOD. METHOD get_epoch_time. DATA : lv_start_timestamp TYPE timestampl, lv_current_timestamp TYPE timestampl, lv_seconds TYPE p, lv_input_seconds TYPE p, zcx_adf_service TYPE REF TO zcx_adf_service. DATA: date TYPE datum, time TYPE uzeit. *Get the current timestamp GET TIME STAMP FIELD lv_current_timestamp . *Get the time difference DATA zone TYPE sy-zonlo. CONVERT TIME STAMP lv_current_timestamp TIME ZONE zone INTO DATE date TIME time. TRY. CALL METHOD cl_abap_tstmp=>td_subtract EXPORTING date1 = date time1 = time date2 = '19700101' time2 = '000000' IMPORTING res_secs = lv_seconds. * Add expiry time in seconds lv_input_seconds = ( ( gv_expiry_hour * 60 ) * 60 ) + ( gv_expiry_min * 60 ) + ( gv_expiry_sec ). lv_seconds = lv_seconds + lv_input_seconds. rv_expiry_time = lv_seconds. CONDENSE rv_expiry_time. CATCH cx_parameter_invalid_type. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>parameter_invalid_type interface_id = gv_interface_id. CATCH cx_parameter_invalid_range . RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>parameter_invalid_range interface_id = gv_interface_id. ENDTRY. ENDMETHOD. METHOD get_interface_details. DATA : ls_config TYPE zadf_config, lv_host TYPE rfcdisplay-rfchost, lv_host_s TYPE string, lv_path_prefix TYPE string. SELECT SINGLE * FROM zadf_config INTO ls_config WHERE interface_id = gv_interface_id. IF sy-subrc <> 0. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>interface_not_available interface_id = gv_interface_id. ENDIF. SELECT SINGLE destination FROM zrest_config INTO gv_rfc_destination WHERE interface_id = gv_interface_id. IF sy-subrc <> 0. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>interface_not_available interface_id = gv_interface_id. ENDIF. **Getting Target host of RFC destination get_target_host( EXPORTING iv_destination = gv_rfc_destination IMPORTING ev_server = lv_host ev_path_prefix = lv_path_prefix ). gv_host = lv_host. gv_path_prefix = lv_path_prefix. lv_host_s = lv_host. CONCATENATE lv_host_s lv_path_prefix INTO gv_uri. IF gv_uri IS INITIAL. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>uri_not_maintained interface_id = gv_interface_id. ENDIF. IF ls_config-service_type IS INITIAL. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>call_type_not_maintained interface_id = gv_interface_id. ELSEIF ls_config-service_type EQ gc_synchronous. gv_asynchronous = abap_false. ELSEIF ls_config-service_type EQ gc_asynchronous. gv_asynchronous = abap_true. ENDIF. gv_is_try = ls_config-is_try. gv_sas_key = ls_config-sas_key. "Added by KRDASH ENDMETHOD. METHOD get_message_id. rv_message_id = go_rest_api->get_guid( ). ENDMETHOD. METHOD get_rest_api_ref. DATA : lcx_interface TYPE REF TO zcx_interace_config_missing, lcx_http TYPE REF TO zcx_http_client_failed, lv_method TYPE char20. IF go_rest_api IS INITIAL. CLEAR lv_method. SELECT SINGLE method FROM zrest_conf_misc INTO lv_method WHERE interface_id EQ gv_interface_id. IF lv_method IS INITIAL. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>method_not_maintained interface_id = gv_interface_id. ENDIF. TRY. CREATE OBJECT go_rest_api EXPORTING interface_name = gv_interface_id "Mandatory business_identifier = iv_business_identifier method = lv_method. "For troubleshooting CATCH zcx_interace_config_missing INTO lcx_interface. RAISE EXCEPTION lcx_interface. CATCH zcx_http_client_failed INTO lcx_http . RAISE EXCEPTION lcx_http. ENDTRY. IF go_rest_api IS BOUND. *Optional - To help developer understand the origin of call go_rest_api->set_callingmethod( zimethodname = 'SEND' ). *Optional - To help developer understand the origin of call go_rest_api->set_callingprogram( ziclassname = 'ZCL_ADF_SERVICE' ). ELSE. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>error_rest_api_instance interface_id = gv_interface_id. ENDIF. ENDIF. ENDMETHOD. METHOD get_sas_token. DATA : lv_string_to_sign TYPE string, encoded_base_address TYPE string, body_xstring TYPE xstring, sign TYPE string, final_token TYPE string, decoded TYPE xstring, conv TYPE REF TO cl_abap_conv_out_ce, conv_in TYPE REF TO cl_abap_conv_in_ce, format TYPE i, new_expiry TYPE string, lv_sas_key TYPE string, lv_expiry_time TYPE string. get_epoch_time( RECEIVING rv_expiry_time = lv_expiry_time ). format = 18. encoded_base_address = escape( val = iv_baseaddress format = format ). CONCATENATE encoded_base_address cl_abap_char_utilities=>newline lv_expiry_time INTO lv_string_to_sign. conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ). conv->convert( EXPORTING data = lv_string_to_sign IMPORTING buffer = body_xstring ). DEFINE encrypt_key. decode_sign( RECEIVING rv_secret = lv_sas_key ). conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ). conv->convert( EXPORTING data = lv_sas_key IMPORTING buffer = decoded ). CALL METHOD cl_abap_hmac=>calculate_hmac_for_raw EXPORTING if_algorithm = 'sha-256' if_key = decoded if_data = body_xstring if_length = 0 IMPORTING ef_hmacb64string = sign. CLEAR : lv_sas_key, decoded. END-OF-DEFINITION. encrypt_key. new_expiry = lv_expiry_time. CONDENSE new_expiry. IF NOT sign IS INITIAL. sign = escape( val = sign format = format ). CONCATENATE 'SharedAccessSignature sr=' encoded_base_address '&sig=' sign '&se=' new_expiry '&skn=' 'edit' INTO final_token. rv_sas_token = final_token. ELSE. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>sas_key_not_generated interface_id = gv_interface_id. ENDIF. ENDMETHOD. METHOD get_target_host. DATA: ssl_active TYPE rfcsnc. CALL FUNCTION 'RFC_READ_HTTP_DESTINATION' EXPORTING destination = iv_destination authority_check = iv_authority_check bypass_buf = iv_bypass_buff IMPORTING server = ev_server path_prefix = ev_path_prefix ssl = ssl_active EXCEPTIONS authority_not_available = 1 destination_not_exist = 2 information_failure = 3 internal_failure = 4 no_http_destination = 5 OTHERS = 6. IF sy-subrc <> 0. * Implement suitable error handling here RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>read_error_rfc_destination interface_id = gv_interface_id. ENDIF. IF ssl_active <> abap_true. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>rfc_destination_no_ssl rfc_destination = iv_destination interface_id = gv_interface_id. ENDIF. ENDMETHOD. METHOD json_to_http_fields. DATA: ls_fields TYPE ihttpnvp, l_node TYPE REF TO if_sxml_node, l_error TYPE string, lr_open_element TYPE REF TO if_sxml_open_element, lt_attributes TYPE if_sxml_attribute=>attributes, ls_attribute LIKE LINE OF lt_attributes, lr_value_node TYPE REF TO if_sxml_value_node, json TYPE xstring, reader TYPE REF TO if_sxml_reader, parse_error TYPE REF TO cx_sxml_parse_error. TRY . json = cl_abap_codepage=>convert_to( iv_response_data ). reader = cl_sxml_string_reader=>create( json ). " after parse, the json response should look like following DO. CLEAR ls_fields. l_node = reader->read_next_node( ). IF l_node IS INITIAL. EXIT. ENDIF. CASE l_node->type. WHEN if_sxml_node=>co_nt_element_open. lr_open_element ?= l_node. lt_attributes = lr_open_element->get_attributes( ). IF lt_attributes IS NOT INITIAL. " get name READ TABLE lt_attributes INDEX 1 INTO ls_attribute. ls_fields-name = ls_attribute->get_value( ). " get value l_node = reader->read_next_node( ). IF l_node->type = if_sxml_node=>co_nt_value. lr_value_node ?= l_node . ls_fields-value = lr_value_node->get_value( ). " add field into the result table APPEND ls_fields TO et_fields. ENDIF. ENDIF. WHEN OTHERS. " do nothing ENDCASE. ENDDO. CATCH cx_sxml_parse_error INTO parse_error. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>parse_error interface_id = gv_interface_id. ENDTRY. ENDMETHOD. METHOD send. DATA : lo_response TYPE REF TO if_rest_entity, lo_request TYPE REF TO if_rest_entity, lv_expiry TYPE string, lv_sas_token TYPE string, lv_msg TYPE string, lcx_adf_service TYPE REF TO zcx_adf_service. IF go_rest_api IS BOUND. TRY. get_sas_token( EXPORTING iv_baseaddress = gv_uri RECEIVING rv_sas_token = lv_sas_token ). CATCH zcx_adf_service INTO lcx_adf_service. lv_msg = lcx_adf_service->get_text( ). MESSAGE lv_msg TYPE 'I'. ENDTRY. add_request_header( iv_name = 'Content-Type' iv_value = 'application/json; charset=utf-8' ). add_request_header( iv_name = 'Authorization' iv_value = lv_sas_token ). go_rest_api->zif_rest_framework~set_binary_body( request ). IF NOT it_headers[] IS INITIAL. go_rest_api->zif_rest_framework~set_request_headers( it_header_fields = it_headers[] ). ENDIF. **Rest API call to get response from Azure Destination lo_response = go_rest_api->zif_rest_framework~execute( io_entity = lo_request async = gv_asynchronous is_retry = gv_is_try ). ev_http_status = go_rest_api->get_status( ). go_rest_api->close( ). IF lo_response IS BOUND. response = lo_response->get_string_data( ). ELSE. RAISE EXCEPTION TYPE zcx_adf_service EXPORTING textid = zcx_adf_service=>restapi_response_not_found interface_id = gv_interface_id. ENDIF. ENDIF. ENDMETHOD. METHOD urlencoded_to_http_fields. DATA: lt_params TYPE STANDARD TABLE OF string, ls_response_field LIKE LINE OF et_fields. FIELD-SYMBOLS: <l_param> LIKE LINE OF lt_params. SPLIT iv_response_data AT `&` INTO TABLE lt_params. LOOP AT lt_params ASSIGNING <l_param>. SPLIT <l_param> AT `=` INTO ls_response_field-name ls_response_field-value. APPEND ls_response_field TO et_fields. ENDLOOP. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 324, 69, 62, 15271, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 9564, 18601, 10659, 198, 220, 29244, 6158, 44731, 13, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 3758, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 25927, 8, 220, 220, 220, 220, 220, 220, 220, 41876, 2124, 8841, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 50145, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 46668, 4023, 77, 36133, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 26209, 8, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 1990, 62, 4023, 62, 13376, 8, 41876, 1312, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 324, 69, 62, 15271, 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, 26173, 8924, 7, 452, 62, 39994, 62, 312, 8, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 39994, 62, 312, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 452, 62, 15271, 62, 312, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 1031, 495, 62, 16520, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 452, 62, 22680, 62, 738, 7483, 8, 41876, 1976, 22680, 312, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 324, 69, 62, 15271, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 4023, 62, 16366, 62, 47904, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 3849, 558, 62, 11250, 62, 45688, 764, 198, 220, 220, 220, 337, 36252, 50, 5794, 62, 7890, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 452, 62, 18982, 62, 4906, 8, 41876, 1976, 324, 69, 62, 18982, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 270, 62, 7890, 8, 220, 220, 220, 220, 220, 220, 220, 41876, 1366, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 8841, 8, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 324, 69, 62, 15271, 764, 198, 220, 220, 220, 337, 36252, 50, 5794, 62, 7890, 62, 1462, 62, 19875, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 270, 62, 7890, 8, 220, 220, 41876, 1366, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 8841, 8, 41876, 4731, 764, 198, 220, 220, 220, 337, 36252, 50, 5794, 62, 7890, 62, 1462, 62, 17752, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 270, 62, 7890, 8, 220, 220, 41876, 1366, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 8841, 8, 41876, 4731, 764, 198, 220, 220, 220, 337, 36252, 50, 751, 62, 1069, 4063, 88, 62, 2435, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 452, 62, 1069, 4063, 88, 62, 9769, 8, 41876, 1312, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 452, 62, 1069, 4063, 88, 62, 1084, 8, 220, 41876, 1312, 5550, 38865, 1542, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 452, 62, 1069, 4063, 88, 62, 2363, 8, 220, 41876, 1312, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 324, 69, 62, 15271, 764, 198, 220, 220, 220, 337, 36252, 50, 2956, 11925, 40976, 62, 1462, 62, 4023, 62, 25747, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 26209, 62, 7890, 41876, 4731, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 316, 62, 25747, 8, 220, 41876, 46668, 4023, 77, 36133, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 324, 69, 62, 15271, 764, 198, 220, 220, 220, 337, 36252, 50, 33918, 62, 1462, 62, 4023, 62, 25747, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 26209, 62, 7890, 41876, 4731, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 316, 62, 25747, 8, 220, 41876, 46668, 4023, 77, 36133, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 324, 69, 62, 15271, 764, 198, 220, 220, 220, 337, 36252, 50, 651, 62, 20500, 62, 312, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 20500, 62, 312, 8, 41876, 10103, 62, 1433, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 628, 220, 220, 220, 7102, 2257, 1565, 4694, 308, 66, 62, 18224, 41876, 1149, 16, 26173, 8924, 705, 36, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 42865, 308, 85, 62, 39994, 62, 312, 41876, 1976, 39994, 62, 312, 764, 198, 220, 220, 220, 42865, 308, 85, 62, 82, 292, 62, 2539, 41876, 4731,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1, 1, 1, 1, 1 ]
INTERFACE zif_abapgit_data_config PUBLIC . TYPES: ty_data_type TYPE c LENGTH 4 . TYPES: BEGIN OF ty_config, type TYPE ty_data_type, name TYPE tadir-obj_name, where TYPE string_table, END OF ty_config . TYPES: ty_config_tt TYPE SORTED TABLE OF ty_config WITH UNIQUE KEY type name . CONSTANTS c_default_path TYPE string VALUE '/data/' ##NO_TEXT. CONSTANTS c_default_format TYPE string VALUE 'json' ##NO_TEXT. CONSTANTS c_config TYPE string VALUE 'conf' ##NO_TEXT. CONSTANTS: BEGIN OF c_data_type, tabu TYPE ty_data_type VALUE 'TABU', vdat TYPE ty_data_type VALUE 'VDAT', cdat TYPE ty_data_type VALUE 'CDAT', tdat TYPE ty_data_type VALUE 'TDAT', END OF c_data_type . METHODS add_config IMPORTING !is_config TYPE ty_config RAISING zcx_abapgit_exception . METHODS from_json IMPORTING !it_files TYPE zif_abapgit_definitions=>ty_files_tt RAISING zcx_abapgit_exception . METHODS get_configs RETURNING VALUE(rt_configs) TYPE ty_config_tt . METHODS remove_config IMPORTING !is_config TYPE ty_config RAISING zcx_abapgit_exception . METHODS to_json RETURNING VALUE(rt_files) TYPE zif_abapgit_definitions=>ty_files_tt RAISING zcx_abapgit_exception . METHODS update_config IMPORTING !is_config TYPE ty_config RAISING zcx_abapgit_exception . ENDINTERFACE.
[ 41358, 49836, 1976, 361, 62, 397, 499, 18300, 62, 7890, 62, 11250, 198, 220, 44731, 764, 628, 198, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 1259, 62, 7890, 62, 4906, 41876, 269, 406, 49494, 604, 764, 198, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 347, 43312, 3963, 1259, 62, 11250, 11, 198, 220, 220, 220, 220, 220, 2099, 220, 41876, 1259, 62, 7890, 62, 4906, 11, 198, 220, 220, 220, 220, 220, 1438, 220, 41876, 36264, 343, 12, 26801, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 810, 41876, 4731, 62, 11487, 11, 198, 220, 220, 220, 23578, 3963, 1259, 62, 11250, 764, 198, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 1259, 62, 11250, 62, 926, 41876, 311, 9863, 1961, 43679, 3963, 1259, 62, 11250, 13315, 4725, 33866, 8924, 35374, 2099, 1438, 764, 628, 220, 7102, 2257, 1565, 4694, 269, 62, 12286, 62, 6978, 41876, 4731, 26173, 8924, 31051, 7890, 14, 6, 22492, 15285, 62, 32541, 13, 198, 220, 7102, 2257, 1565, 4694, 269, 62, 12286, 62, 18982, 41876, 4731, 26173, 8924, 705, 17752, 6, 22492, 15285, 62, 32541, 13, 198, 220, 7102, 2257, 1565, 4694, 269, 62, 11250, 41876, 4731, 26173, 8924, 705, 10414, 6, 22492, 15285, 62, 32541, 13, 198, 220, 7102, 2257, 1565, 4694, 25, 198, 220, 220, 220, 347, 43312, 3963, 269, 62, 7890, 62, 4906, 11, 198, 220, 220, 220, 220, 220, 7400, 84, 41876, 1259, 62, 7890, 62, 4906, 26173, 8924, 705, 5603, 19499, 3256, 198, 220, 220, 220, 220, 220, 410, 19608, 41876, 1259, 62, 7890, 62, 4906, 26173, 8924, 705, 8898, 1404, 3256, 198, 220, 220, 220, 220, 220, 269, 19608, 41876, 1259, 62, 7890, 62, 4906, 26173, 8924, 705, 8610, 1404, 3256, 198, 220, 220, 220, 220, 220, 256, 19608, 41876, 1259, 62, 7890, 62, 4906, 26173, 8924, 705, 21016, 1404, 3256, 198, 220, 220, 220, 23578, 3963, 269, 62, 7890, 62, 4906, 764, 628, 220, 337, 36252, 50, 751, 62, 11250, 198, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 5145, 271, 62, 11250, 41876, 1259, 62, 11250, 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, 422, 62, 17752, 198, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 5145, 270, 62, 16624, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 16624, 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, 651, 62, 11250, 82, 198, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 11250, 82, 8, 41876, 1259, 62, 11250, 62, 926, 764, 198, 220, 337, 36252, 50, 4781, 62, 11250, 198, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 5145, 271, 62, 11250, 41876, 1259, 62, 11250, 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, 284, 62, 17752, 198, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 16624, 8, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 16624, 62, 926, 198, 220, 220, 220, 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, 4296, 62, 11250, 198, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 5145, 271, 62, 11250, 41876, 1259, 62, 11250, 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, 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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 ]
" SPDX-FileCopyrightText: 2014 SAP SE Srdjan Boskovic <srdjan.boskovic@sap.com> " " SPDX-License-Identifier: Apache-2.0 FUNCTION /coe/rbp_fe_shlp_get . *"---------------------------------------------------------------------- *"*"Lokale Schnittstelle: *" IMPORTING *" VALUE(IV_SHLPNAME) TYPE SHLPNAME *" VALUE(IV_SHLPTYPE) TYPE DDSHLPTYP DEFAULT 'SH' *" VALUE(IV_MAXROWS) TYPE I DEFAULT 0 *" EXPORTING *" VALUE(EV_MAXROWS_EXCEEDED) TYPE DDBOOL_D *" TABLES *" IT_SELOPT STRUCTURE DDSHSELOPT *" ET_VALUE_DESC STRUCTURE DFIES *" ET_VALUE_LIST STRUCTURE DDSHRETVAL *"---------------------------------------------------------------------- * Returns the Searh Help result set, ET_RESULT, for a given selection IT_SELOPT *''' * The OPTION syntax (see SAP HELP) * Valid operators are "EQ", "NE", "GE", "GT", "LE", "LT", "CP", and "NP", if column high is initial, * and "BT", "NB", if column high is not initial. * For the options "CP" and "NP", the data type of the columns low and high must be c, * and special rules apply for entries on the selection screen. * * The SIGN syntax (see SAP HELP) * I/E (include/exclude values) * * Example: * shlpname = iv_shlpname. * shlpfield = 'BSTKD'. * sign = 'I'. * option = 'EQ'. * low = '*'. *''' DATA: ls_shlp TYPE shlp_descr, * lt_records(1024) TYPE c OCCURS 0 WITH HEADER LINE, * lt_records TYPE char1024 OCCURS 0, ls_value_desc LIKE LINE OF et_value_desc, offset TYPE i, leng TYPE i. FIELD-SYMBOLS: * <l_record> LIKE LINE OF lt_records, <fs_fieldprop> LIKE LINE OF ls_shlp-fieldprop. CLEAR: et_value_desc, et_value_list. * get HELP descriptor CALL FUNCTION 'F4IF_GET_SHLP_DESCR' EXPORTING shlpname = iv_shlpname shlptype = iv_shlptype IMPORTING shlp = ls_shlp. * get HELP result * copy selection parameters ls_shlp-selopt[] = it_selopt[]. * select output fields LOOP AT ls_shlp-fieldprop ASSIGNING <fs_fieldprop>. <fs_fieldprop>-shlpoutput = 'X'. ENDLOOP. CALL FUNCTION 'F4IF_SELECT_VALUES' EXPORTING shlp = ls_shlp maxrows = iv_maxrows * sort = ' ' call_shlp_exit = 'X' IMPORTING maxrows_exceeded = ev_maxrows_exceeded TABLES * record_tab = lt_records "don't use recdescr_tab = et_value_desc return_tab = et_value_list. * keep just in case dealing with offsets required again ** parse the result into output format * LOOP AT lt_records ASSIGNING <l_record>. * LOOP AT et_value_desc INTO ls_value_desc. * offset = ls_value_desc-offset. * offset = offset DIV 2. * leng = ls_value_desc-leng. * ls_result-name = ls_value_desc-fieldname. * ls_result-value = <l_record>+offset(leng). * APPEND ls_result TO et_value_list. * ENDLOOP. * ENDLOOP. ENDFUNCTION.
[ 1, 30628, 55, 12, 8979, 15269, 8206, 25, 1946, 48323, 7946, 311, 4372, 13881, 14548, 74, 17215, 1279, 82, 4372, 13881, 13, 39565, 74, 17215, 31, 82, 499, 13, 785, 29, 198, 1, 198, 1, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 42296, 4177, 2849, 1220, 49270, 14, 26145, 79, 62, 5036, 62, 1477, 34431, 62, 1136, 764, 198, 9, 1, 10097, 23031, 198, 9, 1, 9, 1, 43, 482, 1000, 45606, 715, 301, 13485, 25, 198, 9, 1, 220, 30023, 9863, 2751, 198, 9, 1, 220, 220, 220, 220, 26173, 8924, 7, 3824, 62, 50, 6581, 13137, 10067, 8, 41876, 220, 6006, 43, 13137, 10067, 198, 9, 1, 220, 220, 220, 220, 26173, 8924, 7, 3824, 62, 50, 6581, 47, 25216, 8, 41876, 220, 360, 5258, 6581, 47, 9936, 47, 5550, 38865, 705, 9693, 6, 198, 9, 1, 220, 220, 220, 220, 26173, 8924, 7, 3824, 62, 22921, 49, 22845, 8, 41876, 220, 314, 5550, 38865, 657, 198, 9, 1, 220, 7788, 15490, 2751, 198, 9, 1, 220, 220, 220, 220, 26173, 8924, 7, 20114, 62, 22921, 49, 22845, 62, 6369, 5222, 1961, 1961, 8, 41876, 220, 20084, 8202, 3535, 62, 35, 198, 9, 1, 220, 309, 6242, 28378, 198, 9, 1, 220, 220, 220, 220, 220, 7283, 62, 50, 3698, 3185, 51, 19269, 18415, 11335, 220, 360, 5258, 7998, 3698, 3185, 51, 198, 9, 1, 220, 220, 220, 220, 220, 12152, 62, 39488, 62, 30910, 34, 19269, 18415, 11335, 220, 36323, 11015, 198, 9, 1, 220, 220, 220, 220, 220, 12152, 62, 39488, 62, 45849, 19269, 18415, 11335, 220, 360, 5258, 39, 2200, 6849, 1847, 198, 9, 1, 10097, 23031, 198, 198, 9, 16409, 262, 42016, 71, 10478, 1255, 900, 11, 12152, 62, 19535, 16724, 11, 329, 257, 1813, 6356, 7283, 62, 50, 3698, 3185, 51, 198, 198, 9, 7061, 6, 198, 9, 220, 383, 39852, 2849, 15582, 357, 3826, 48323, 49944, 8, 198, 9, 220, 220, 220, 48951, 12879, 389, 366, 36, 48, 1600, 366, 12161, 1600, 366, 8264, 1600, 366, 19555, 1600, 366, 2538, 1600, 366, 27734, 1600, 366, 8697, 1600, 290, 366, 22182, 1600, 611, 5721, 1029, 318, 4238, 11, 198, 9, 220, 220, 220, 290, 366, 19313, 1600, 366, 32819, 1600, 611, 5721, 1029, 318, 407, 4238, 13, 198, 9, 220, 220, 220, 1114, 262, 3689, 366, 8697, 1, 290, 366, 22182, 1600, 262, 1366, 2099, 286, 262, 15180, 1877, 290, 1029, 1276, 307, 269, 11, 198, 9, 220, 220, 220, 290, 2041, 3173, 4174, 329, 12784, 319, 262, 6356, 3159, 13, 198, 9, 198, 9, 220, 383, 36771, 15582, 357, 3826, 48323, 49944, 8, 198, 9, 220, 220, 220, 314, 14, 36, 357, 17256, 14, 1069, 9152, 3815, 8, 198, 9, 198, 9, 220, 17934, 25, 198, 9, 220, 220, 220, 427, 34431, 3672, 220, 796, 21628, 62, 1477, 34431, 3672, 13, 198, 9, 220, 220, 220, 427, 34431, 3245, 796, 705, 33, 2257, 42, 35, 4458, 198, 9, 220, 220, 220, 1051, 220, 220, 220, 220, 220, 796, 705, 40, 4458, 198, 9, 220, 220, 220, 3038, 220, 220, 220, 796, 705, 36, 48, 4458, 198, 9, 220, 220, 220, 1877, 220, 220, 220, 220, 220, 220, 796, 705, 9, 4458, 198, 9, 7061, 6, 198, 198, 26947, 25, 198, 7278, 62, 1477, 34431, 220, 220, 220, 220, 220, 220, 41876, 220, 427, 34431, 62, 20147, 81, 11, 198, 9, 220, 220, 220, 300, 83, 62, 8344, 3669, 7, 35500, 8, 41876, 269, 440, 4093, 4261, 50, 657, 13315, 39837, 1137, 48920, 11, 198, 9, 220, 220, 220, 300, 83, 62, 8344, 3669, 220, 220, 220, 41876, 1149, 35500, 440, 4093, 4261, 50, 657, 11, 198, 7278, 62, 8367, 62, 20147, 34178, 48920, 3963, 2123, 62, 8367, 62, 20147, 11, 198, 198, 28968, 220, 220, 220, 220, 220, 220, 220, 41876, 1312, 11, 40038, 41876, 1312, 13, 198, 198, 44603, 12, 23060, 10744, 3535, 50, 25, 198, 9, 220, 220, 1279, 75, 62, 22105, 29, 34178, 48920, 3963, 300, 83, 62, 8344, 3669, 11, 198, 27, 9501, 62, 3245, 22930, 29, 34178, 48920, 3963, 43979, 62, 1477, 34431, 12, 3245, 22930, 13, 198, 198, 29931, 1503, 25, 2123, 62, 8367, 62, 20147, 11, 2123, 62, 8367, 62, 4868, 13, 198, 198, 9, 651, 49944, 43087, 198, 34, 7036, 29397, 4177, 2849, 705, 37, 19, 5064, 62, 18851, 62, 50, 6581, 47, 62, 30910, 9419, 6, 198, 6369, 15490, 2751, 198, 220, 427, 34431, 3672, 796, 21628, 62, 1477, 34431, 3672, 198, 220, 427, 75, 457, 2981, 796, 21628, 62, 1477, 75, 457, 2981, 198, 3955, 15490, 2751, 198, 220, 427, 34431, 220, 220, 220, 220, 796, 43979, 62, 1477, 34431, 13, 198, 198, 9, 651, 49944, 1255, 198, 198, 9, 4866, 6356, 10007, 198, 7278, 62, 1477, 34431, 12, 741, 8738, 21737, 796, 340, 62, 741, 8738, 58, 4083, 198, 198, 9, 2922, 5072, 7032, 198, 21982, 3185, 5161, 43979, 62, 1477, 34431, 12, 3245, 22930, 24994, 3528, 15871, 1279, 9501, 62, 3245, 22930, 28401, 198, 27, 9501, 62, 3245, 22930, 29, 12, 1477, 34431, 22915, 796, 705, 55, 4458, 198, 10619, 21982, 3185, 13, 198, 198, 34, 7036, 29397, 4177, 2849, 705, 37, 19, 5064, 62, 46506, 62, 23428, 35409, 6, 198, 6369, 15490, 2751, 198, 220, 427, 34431, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 43979, 62, 1477, 34431, 198, 220, 3509, 8516, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 21628, 62, 9806, 8516, 198, 9, 3297, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 705, 705, 198, 220, 869, 62, 1477, 34431, 62, 37023, 220, 220, 796, 705, 55, 6, 198, 3955, 15490, 2751, 198, 220, 3509, 8516, 62, 1069, 2707, 276, 796, 819, 62, 9806, 8516, 62, 1069, 2707, 276, 198, 5603, 9148, 1546, 198, 9, 1700, 62, 8658, 220, 220, 220, 220, 220, 220, 796, 300, 83, 62, 8344, 3669, 366, 9099, 470, 779, 198, 220, 664, 20147, 81, 62, 8658, 220, 220, 220, 220, 796, 2123, 62, 8367, 62, 20147, 198, 220, 1441, 62, 8658, 220, 220, 220, 220, 220, 220, 796, 2123, 62, 8367, 62, 4868, 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,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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 ]
CLEAR lv_pernr. SELECT SINGLE pernr INTO lv_pernr FROM pa0105 WHERE usrid EQ sy-uname AND usrty EQ '0001'. IF sy-subrc EQ 0. CLEAR lv_ordunit. SELECT SINGLE orgeh INTO lv_ordunit FROM pa0001 WHERE pernr EQ lv_pernr AND endda GE sy-datum. CALL FUNCTION 'RH_DIR_ORG_STRUC_GET' EXPORTING act_orgunit = lv_ordunit TABLES person_tab = person_tab. ENDIF.
[ 29931, 1503, 300, 85, 62, 525, 48624, 13, 198, 46506, 311, 2751, 2538, 583, 48624, 39319, 300, 85, 62, 525, 48624, 16034, 14187, 486, 2713, 33411, 514, 6058, 36529, 827, 12, 403, 480, 5357, 514, 81, 774, 36529, 705, 18005, 4458, 198, 5064, 827, 12, 7266, 6015, 36529, 657, 13, 198, 220, 30301, 1503, 300, 85, 62, 585, 20850, 13, 198, 220, 33493, 311, 2751, 2538, 220, 393, 469, 71, 39319, 300, 85, 62, 585, 20850, 16034, 14187, 18005, 33411, 583, 48624, 36529, 300, 85, 62, 525, 48624, 5357, 886, 6814, 22319, 827, 12, 19608, 388, 13, 628, 220, 42815, 29397, 4177, 2849, 705, 48587, 62, 34720, 62, 1581, 38, 62, 18601, 9598, 62, 18851, 6, 198, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 719, 62, 2398, 20850, 796, 300, 85, 62, 585, 20850, 198, 220, 220, 220, 309, 6242, 28378, 198, 220, 220, 220, 220, 220, 1048, 62, 8658, 220, 796, 1048, 62, 8658, 13, 198, 10619, 5064, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_diff DEFINITION PUBLIC CREATE PUBLIC. PUBLIC SECTION. CONSTANTS co_starting_beacon TYPE i VALUE 1. * assumes data is UTF8 based with newlines METHODS constructor IMPORTING !iv_new TYPE xstring !iv_old TYPE xstring !iv_ignore_indentation TYPE abap_bool DEFAULT abap_false !iv_ignore_comments TYPE abap_bool DEFAULT abap_false !iv_ignore_case TYPE abap_bool DEFAULT abap_false. METHODS get RETURNING VALUE(rt_diff) TYPE zif_abapgit_definitions=>ty_diffs_tt. METHODS stats RETURNING VALUE(rs_count) TYPE zif_abapgit_definitions=>ty_count. METHODS set_patch_new IMPORTING !iv_line_new TYPE i !iv_patch_flag TYPE abap_bool RAISING zcx_abapgit_exception. METHODS set_patch_old IMPORTING !iv_line_old TYPE i !iv_patch_flag TYPE abap_bool RAISING zcx_abapgit_exception. METHODS get_beacons RETURNING VALUE(rt_beacons) TYPE zif_abapgit_definitions=>ty_string_tt. METHODS is_line_patched IMPORTING iv_index TYPE i RETURNING VALUE(rv_patched) TYPE abap_bool RAISING zcx_abapgit_exception. METHODS set_patch_by_old_diff IMPORTING is_diff_old TYPE zif_abapgit_definitions=>ty_diff iv_patch_flag TYPE abap_bool. PROTECTED SECTION. PRIVATE SECTION. TYPES: ty_regexset_tt TYPE STANDARD TABLE OF REF TO cl_abap_regex WITH KEY table_line. DATA mt_beacons TYPE zif_abapgit_definitions=>ty_string_tt. DATA mt_diff TYPE zif_abapgit_definitions=>ty_diffs_tt. DATA ms_stats TYPE zif_abapgit_definitions=>ty_count. DATA mv_compare_mode TYPE c LENGTH 1. DATA mv_ignore_case TYPE abap_bool. METHODS unpack IMPORTING !iv_new TYPE xstring !iv_old TYPE xstring EXPORTING !et_new TYPE rswsourcet !et_old TYPE rswsourcet. METHODS map_beacons. METHODS shortlist. METHODS create_regex_set RETURNING VALUE(rt_regex_set) TYPE ty_regexset_tt. METHODS compute_and_render IMPORTING !it_new TYPE rswsourcet !it_old TYPE rswsourcet RETURNING VALUE(rt_diff) TYPE zif_abapgit_definitions=>ty_diffs_tt. METHODS calculate_stats. ENDCLASS. CLASS zcl_abapgit_diff IMPLEMENTATION. METHOD calculate_stats. FIELD-SYMBOLS: <ls_diff> LIKE LINE OF mt_diff. LOOP AT mt_diff ASSIGNING <ls_diff>. CASE <ls_diff>-result. WHEN zif_abapgit_definitions=>c_diff-insert. ms_stats-insert = ms_stats-insert + 1. WHEN zif_abapgit_definitions=>c_diff-delete. ms_stats-delete = ms_stats-delete + 1. WHEN zif_abapgit_definitions=>c_diff-update. ms_stats-update = ms_stats-update + 1. ENDCASE. ENDLOOP. ENDMETHOD. METHOD compute_and_render. DATA: lv_i TYPE i, ls_diff LIKE LINE OF rt_diff, lt_delta TYPE STANDARD TABLE OF rsedcresul WITH DEFAULT KEY. FIELD-SYMBOLS: <ls_old> LIKE LINE OF it_old, <ls_new> LIKE LINE OF it_new, <ls_delta> LIKE LINE OF lt_delta. " Note: Ignore case is for keywords, variables, types etc, but not for literals CALL FUNCTION 'RS_CMP_COMPUTE_DELTA' EXPORTING compare_mode = mv_compare_mode ignore_case_differences = mv_ignore_case TABLES text_tab1 = it_new text_tab2 = it_old text_tab_res = lt_delta EXCEPTIONS parameter_invalid = 1 difference_not_found = 2 OTHERS = 3. IF sy-subrc = 0. " Process delta LOOP AT lt_delta ASSIGNING <ls_delta>. CLEAR ls_diff. IF <ls_delta>-line1 > 0. lv_i = <ls_delta>-line1. ls_diff-old_num = lv_i. ls_diff-old = <ls_delta>-text1. ENDIF. IF <ls_delta>-line2 > 0. lv_i = <ls_delta>-line2. ls_diff-new_num = lv_i. ls_diff-new = <ls_delta>-text2. ENDIF. IF <ls_delta>-flag1 = 'D'. ls_diff-result = zif_abapgit_definitions=>c_diff-delete. ELSEIF <ls_delta>-flag2 = 'I'. ls_diff-result = zif_abapgit_definitions=>c_diff-insert. ELSEIF <ls_delta>-flag1 = 'M' AND <ls_delta>-flag2 = 'M'. ls_diff-result = zif_abapgit_definitions=>c_diff-update. ELSEIF <ls_delta>-flag1 = '' AND <ls_delta>-flag2 = ''. ls_diff-result = zif_abapgit_definitions=>c_diff-unchanged. ELSE. ASSERT 0 = 1. " unknown comparison result ENDIF. APPEND ls_diff TO rt_diff. ENDLOOP. ELSEIF sy-subrc = 2. " Identical input LOOP AT it_old ASSIGNING <ls_old>. CLEAR ls_diff. ls_diff-old_num = sy-tabix. ls_diff-old = <ls_old>. READ TABLE it_new ASSIGNING <ls_new> INDEX sy-tabix. ASSERT sy-subrc = 0. ls_diff-new_num = sy-tabix. ls_diff-new = <ls_new>. APPEND ls_diff TO rt_diff. ENDLOOP. ELSE. ASSERT 0 = 1. " incorrect function call ENDIF. ENDMETHOD. METHOD constructor. DATA: lt_new TYPE rswsourcet, lt_old TYPE rswsourcet. mv_compare_mode = 1. IF iv_ignore_indentation = abap_true. mv_compare_mode = mv_compare_mode + 1. ENDIF. IF iv_ignore_comments = abap_true. mv_compare_mode = mv_compare_mode + 2. ENDIF. mv_ignore_case = iv_ignore_case. unpack( EXPORTING iv_new = iv_new iv_old = iv_old IMPORTING et_new = lt_new et_old = lt_old ). mt_diff = compute_and_render( it_new = lt_new it_old = lt_old ). calculate_stats( ). map_beacons( ). shortlist( ). ENDMETHOD. METHOD create_regex_set. DATA: lo_regex TYPE REF TO cl_abap_regex, lt_regex TYPE zif_abapgit_definitions=>ty_string_tt, lv_regex LIKE LINE OF lt_regex. APPEND '^\s*(CLASS|FORM|MODULE|REPORT|METHOD|INTERFACE|FUNCTION)\s' TO lt_regex. APPEND '^\s*(CLASS|INTERFACE|FUNCTION|TYPE)-POOL\s' TO lt_regex. APPEND '^\s*(START|END)-OF-SELECTION(\s|\.)' TO lt_regex. APPEND '^\s*INITIALIZATION(\s|\.)' TO lt_regex. APPEND '^\s*(TOP-OF-PAGE|END-OF-PAGE)(\s|\.)' TO lt_regex. APPEND '^\s*AT\s*(SELECTION-SCREEN|LINE-SELECTION|USER-COMMAND|PF\d+)(\s|\.)' TO lt_regex. APPEND '^\s*(DEFINE|ENHANCEMENT)\s' TO lt_regex. LOOP AT lt_regex INTO lv_regex. lo_regex = NEW #( pattern = lv_regex ignore_case = abap_true ). APPEND lo_regex TO rt_regex_set. ENDLOOP. ENDMETHOD. METHOD get. rt_diff = mt_diff. ENDMETHOD. METHOD get_beacons. rt_beacons = mt_beacons. ENDMETHOD. METHOD is_line_patched. FIELD-SYMBOLS: <ls_diff> TYPE zif_abapgit_definitions=>ty_diff. READ TABLE mt_diff INDEX iv_index ASSIGNING <ls_diff>. IF sy-subrc = 0. rv_patched = <ls_diff>-patch_flag. ELSE. zcx_abapgit_exception=>raise( |Diff line not found { iv_index }| ). ENDIF. ENDMETHOD. METHOD map_beacons. DATA: lv_beacon_idx TYPE i VALUE co_starting_beacon, lv_offs TYPE i, lv_beacon_str TYPE string, lv_beacon_2lev TYPE string, lv_submatch TYPE string, lo_regex TYPE REF TO cl_abap_regex, lt_regex TYPE ty_regexset_tt. FIELD-SYMBOLS: <ls_diff> LIKE LINE OF mt_diff. lt_regex = create_regex_set( ). LOOP AT mt_diff ASSIGNING <ls_diff>. CLEAR lv_offs. <ls_diff>-beacon = lv_beacon_idx. LOOP AT lt_regex INTO lo_regex. FIND FIRST OCCURRENCE OF REGEX lo_regex IN <ls_diff>-new SUBMATCHES lv_submatch. IF sy-subrc = 0. " Match lv_beacon_str = <ls_diff>-new. lv_submatch = to_upper( lv_submatch ). " Get rid of comments and end of line FIND FIRST OCCURRENCE OF '.' IN lv_beacon_str MATCH OFFSET lv_offs. IF sy-subrc <> 0. FIND FIRST OCCURRENCE OF '"' IN lv_beacon_str MATCH OFFSET lv_offs. ENDIF. IF lv_offs > 0. lv_beacon_str = lv_beacon_str(lv_offs). ENDIF. lv_beacon_str = condense( val = lv_beacon_str del = ` ` ). IF lv_submatch = 'CLASS'. lv_beacon_2lev = lv_beacon_str. ELSEIF lv_submatch = 'METHOD'. lv_beacon_str = lv_beacon_2lev && ` => ` && lv_beacon_str. ENDIF. APPEND lv_beacon_str TO mt_beacons. lv_beacon_idx = sy-tabix. <ls_diff>-beacon = lv_beacon_idx. EXIT. "Loop ENDIF. ENDLOOP. ENDLOOP. ENDMETHOD. METHOD set_patch_by_old_diff. FIELD-SYMBOLS: <ls_diff> TYPE zif_abapgit_definitions=>ty_diff. LOOP AT mt_diff ASSIGNING <ls_diff> USING KEY new_num WHERE old = is_diff_old-old AND new = is_diff_old-new AND new_num = is_diff_old-new_num AND old_num = is_diff_old-old_num. <ls_diff>-patch_flag = iv_patch_flag. EXIT. ENDLOOP. ENDMETHOD. METHOD set_patch_new. FIELD-SYMBOLS: <ls_diff> TYPE zif_abapgit_definitions=>ty_diff. READ TABLE mt_diff WITH TABLE KEY new_num COMPONENTS new_num = iv_line_new ASSIGNING <ls_diff>. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Invalid new line number { iv_line_new }| ). ENDIF. <ls_diff>-patch_flag = iv_patch_flag. ENDMETHOD. METHOD set_patch_old. FIELD-SYMBOLS: <ls_diff> TYPE zif_abapgit_definitions=>ty_diff. READ TABLE mt_diff WITH TABLE KEY old_num COMPONENTS old_num = iv_line_old ASSIGNING <ls_diff>. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Invalid old line number { iv_line_old }| ). ENDIF. <ls_diff>-patch_flag = iv_patch_flag. ENDMETHOD. METHOD shortlist. DATA: lv_index TYPE i. FIELD-SYMBOLS: <ls_diff> LIKE LINE OF mt_diff. IF lines( mt_diff ) < 20. LOOP AT mt_diff ASSIGNING <ls_diff>. <ls_diff>-short = abap_true. ENDLOOP. ELSE. LOOP AT mt_diff TRANSPORTING NO FIELDS WHERE NOT result IS INITIAL AND short = abap_false. lv_index = sy-tabix. DO 8 TIMES. " Backward READ TABLE mt_diff INDEX ( lv_index - sy-index ) ASSIGNING <ls_diff>. IF sy-subrc <> 0 OR <ls_diff>-short = abap_true. " tab bound or prev marker EXIT. ENDIF. <ls_diff>-short = abap_true. ENDDO. DO 8 TIMES. " Forward READ TABLE mt_diff INDEX ( lv_index + sy-index - 1 ) ASSIGNING <ls_diff>. IF sy-subrc <> 0. " tab bound reached EXIT. ENDIF. CHECK <ls_diff>-short = abap_false. " skip marked <ls_diff>-short = abap_true. ENDDO. ENDLOOP. ENDIF. ENDMETHOD. METHOD stats. rs_count = ms_stats. ENDMETHOD. METHOD unpack. DATA: lv_new TYPE string, lv_old TYPE string. lv_new = zcl_abapgit_convert=>xstring_to_string_utf8( iv_new ). lv_old = zcl_abapgit_convert=>xstring_to_string_utf8( iv_old ). SPLIT lv_new AT zif_abapgit_definitions=>c_newline INTO TABLE et_new. SPLIT lv_old AT zif_abapgit_definitions=>c_newline INTO TABLE et_old. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 26069, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 29244, 6158, 44731, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 38690, 62, 1350, 7807, 41876, 1312, 26173, 8924, 352, 13, 198, 198, 9, 18533, 1366, 318, 41002, 23, 1912, 351, 649, 6615, 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, 452, 62, 3605, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 2124, 8841, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 727, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 2124, 8841, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 46430, 62, 521, 298, 341, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 46430, 62, 15944, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 46430, 62, 7442, 220, 220, 220, 220, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 13, 198, 220, 220, 220, 337, 36252, 50, 651, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 26069, 8, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 67, 10203, 62, 926, 13, 198, 220, 220, 220, 337, 36252, 50, 9756, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 3808, 62, 9127, 8, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 9127, 13, 198, 220, 220, 220, 337, 36252, 50, 900, 62, 17147, 62, 3605, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 1370, 62, 3605, 220, 220, 41876, 1312, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 17147, 62, 32109, 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, 13, 198, 220, 220, 220, 337, 36252, 50, 900, 62, 17147, 62, 727, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 1370, 62, 727, 220, 220, 41876, 1312, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 17147, 62, 32109, 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, 13, 198, 220, 220, 220, 337, 36252, 50, 651, 62, 1350, 37256, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 1350, 37256, 8, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 8841, 62, 926, 13, 198, 220, 220, 220, 337, 36252, 50, 318, 62, 1370, 62, 8071, 1740, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 9630, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1312, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 8071, 1740, 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, 13, 198, 220, 220, 220, 337, 36252, 50, 900, 62, 17147, 62, 1525, 62, 727, 62, 26069, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 26069, 62, 727, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 17147, 62, 32109, 41876, 450, 499, 62, 30388, 13, 628, 220, 48006, 9782, 1961, 44513, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 1259, 62, 260, 25636, 2617, 62, 926, 41876, 49053, 9795, 43679, 3963, 4526, 37, 5390, 537, 62, 397, 499, 62, 260, 25636, 13315, 35374, 3084, 62, 1370, 13, 628, 220, 220, 220, 42865, 45079, 62, 1350, 37256, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 8841, 62, 926, 13, 198, 220, 220, 220, 42865, 45079, 62, 26069, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 67, 10203, 62, 926, 13, 198, 220, 220, 220, 42865, 13845, 62, 34242, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 9127, 13, 198, 220, 220, 220, 42865, 285, 85, 62, 5589, 533, 62, 14171, 41876, 269, 406, 49494, 352, 13, 198, 220, 220, 220, 42865, 285, 85, 62, 46430, 62, 7442, 41876, 450, 499, 62, 30388, 13, 628, 220, 220, 220, 337, 36252, 50, 555, 8002, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3605, 41876, 2124, 8841, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 727, 41876, 2124, 8841, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 316, 62, 3605, 41876, 374, 2032, 82, 454, 66, 316, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 316, 62, 727, 41876, 374, 2032, 82, 454, 66, 316, 13, 198, 220, 220, 220, 337, 36252, 50, 3975, 62, 1350, 37256, 13, 198, 220, 220, 220, 337, 36252, 50, 1790, 4868, 13, 198, 220, 220, 220, 337, 36252, 50, 2251, 62, 260, 25636, 62, 2617, 198, 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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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 ]
*&---------------------------------------------------------------------* *& Report ZDEMO_EXCEL1 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT zdemo_excel1. DATA: lo_excel TYPE REF TO zcl_excel, lo_worksheet TYPE REF TO zcl_excel_worksheet, lo_hyperlink TYPE REF TO zcl_excel_hyperlink, lo_column TYPE REF TO zcl_excel_column. CONSTANTS: gc_save_file_name TYPE string VALUE '01_HelloWorld.xlsx'. INCLUDE zdemo_excel_outputopt_incl. START-OF-SELECTION. " Creates active sheet CREATE OBJECT lo_excel. " Get active sheet lo_worksheet = lo_excel->get_active_worksheet( ). * lo_worksheet->set_title( ip_title = 'Sheet1' ). lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ). lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = sy-datum ). lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = sy-uzeit ). lo_hyperlink = zcl_excel_hyperlink=>create_external_link( iv_url = 'https://sapmentors.github.io/abap2xlsx' ). lo_worksheet->set_cell( ip_column = 'B' ip_row = 4 ip_value = 'Click here to visit abap2xlsx homepage' ip_hyperlink = lo_hyperlink ). lo_column = lo_worksheet->get_column( ip_column = 'B' ). lo_column->set_width( ip_width = 11 ). *** Create output lcl_output=>output( lo_excel ).
[ 9, 5, 10097, 30934, 9, 198, 9, 5, 6358, 220, 1168, 39429, 46, 62, 6369, 34, 3698, 16, 198, 9, 5, 198, 9, 5, 10097, 30934, 9, 198, 9, 5, 198, 9, 5, 198, 9, 5, 10097, 30934, 9, 198, 198, 2200, 15490, 1976, 9536, 78, 62, 1069, 5276, 16, 13, 628, 198, 26947, 25, 2376, 62, 1069, 5276, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 11, 198, 220, 220, 220, 220, 220, 2376, 62, 5225, 25473, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 5225, 25473, 11, 198, 220, 220, 220, 220, 220, 2376, 62, 49229, 8726, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 49229, 8726, 11, 198, 220, 220, 220, 220, 220, 2376, 62, 28665, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 28665, 13, 198, 198, 10943, 2257, 1565, 4694, 25, 308, 66, 62, 21928, 62, 7753, 62, 3672, 41876, 4731, 26173, 8924, 705, 486, 62, 15496, 10603, 13, 87, 7278, 87, 4458, 198, 1268, 5097, 52, 7206, 1976, 9536, 78, 62, 1069, 5276, 62, 22915, 8738, 62, 259, 565, 13, 628, 198, 2257, 7227, 12, 19238, 12, 46506, 2849, 13, 198, 220, 366, 7921, 274, 4075, 9629, 198, 220, 29244, 6158, 25334, 23680, 2376, 62, 1069, 5276, 13, 628, 220, 366, 3497, 4075, 9629, 198, 220, 2376, 62, 5225, 25473, 796, 2376, 62, 1069, 5276, 3784, 1136, 62, 5275, 62, 5225, 25473, 7, 6739, 198, 9, 220, 2376, 62, 5225, 25473, 3784, 2617, 62, 7839, 7, 20966, 62, 7839, 796, 705, 3347, 316, 16, 6, 6739, 198, 220, 2376, 62, 5225, 25473, 3784, 2617, 62, 3846, 7, 20966, 62, 28665, 796, 705, 33, 6, 20966, 62, 808, 796, 362, 20966, 62, 8367, 796, 705, 15496, 995, 6, 6739, 198, 220, 2376, 62, 5225, 25473, 3784, 2617, 62, 3846, 7, 20966, 62, 28665, 796, 705, 33, 6, 20966, 62, 808, 796, 513, 20966, 62, 8367, 796, 827, 12, 19608, 388, 6739, 198, 220, 2376, 62, 5225, 25473, 3784, 2617, 62, 3846, 7, 20966, 62, 28665, 796, 705, 34, 6, 20966, 62, 808, 796, 513, 20966, 62, 8367, 796, 827, 12, 84, 2736, 270, 6739, 198, 220, 2376, 62, 49229, 8726, 796, 1976, 565, 62, 1069, 5276, 62, 49229, 8726, 14804, 17953, 62, 22615, 62, 8726, 7, 21628, 62, 6371, 796, 705, 5450, 1378, 82, 499, 434, 669, 13, 12567, 13, 952, 14, 397, 499, 17, 87, 7278, 87, 6, 6739, 198, 220, 2376, 62, 5225, 25473, 3784, 2617, 62, 3846, 7, 20966, 62, 28665, 796, 705, 33, 6, 20966, 62, 808, 796, 604, 20966, 62, 8367, 796, 705, 8164, 994, 284, 3187, 450, 499, 17, 87, 7278, 87, 34940, 6, 20966, 62, 49229, 8726, 796, 2376, 62, 49229, 8726, 6739, 628, 220, 2376, 62, 28665, 796, 2376, 62, 5225, 25473, 3784, 1136, 62, 28665, 7, 20966, 62, 28665, 796, 705, 33, 6, 6739, 198, 220, 2376, 62, 28665, 3784, 2617, 62, 10394, 7, 20966, 62, 10394, 796, 1367, 6739, 628, 198, 198, 8162, 13610, 5072, 198, 220, 300, 565, 62, 22915, 14804, 22915, 7, 2376, 62, 1069, 5276, 6739, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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 ]
"! @testing /DMO/CL_I_TRAVEL_TUM "! @testing /DMO/CL_C_TRAVEL_TUM "! @testing /DMO/CL_FLIGHT_LEGACY05 "! @testing FUGR:/DMO/FLIGHT_TRAVEL_API05 CLASS ltc DEFINITION FINAL INHERITING FROM /dmo/tc_flight_travel_api05 FOR TESTING RISK LEVEL HARMLESS DURATION MEDIUM. ENDCLASS.
[ 40484, 2488, 33407, 1220, 35, 11770, 14, 5097, 62, 40, 62, 51, 3861, 18697, 62, 51, 5883, 198, 40484, 2488, 33407, 1220, 35, 11770, 14, 5097, 62, 34, 62, 51, 3861, 18697, 62, 51, 5883, 198, 40484, 2488, 33407, 1220, 35, 11770, 14, 5097, 62, 3697, 9947, 62, 2538, 38, 43300, 2713, 198, 40484, 2488, 33407, 376, 7340, 49, 14079, 35, 11770, 14, 3697, 9947, 62, 51, 3861, 18697, 62, 17614, 2713, 198, 31631, 300, 23047, 5550, 20032, 17941, 25261, 3268, 16879, 2043, 2751, 16034, 1220, 67, 5908, 14, 23047, 62, 22560, 62, 35927, 62, 15042, 2713, 7473, 43001, 2751, 45698, 42, 49277, 43638, 5805, 7597, 360, 4261, 6234, 26112, 41796, 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 ]
CLASS zcl_excel_reader_huge_file DEFINITION PUBLIC INHERITING FROM zcl_excel_reader_2007 CREATE PUBLIC . PUBLIC SECTION. PROTECTED SECTION. METHODS load_shared_strings REDEFINITION . METHODS load_worksheet REDEFINITION . PRIVATE SECTION. TYPES: BEGIN OF t_cell_content, datatype TYPE zexcel_cell_data_type, value TYPE zexcel_cell_value, formula TYPE zexcel_cell_formula, style TYPE zexcel_cell_style, END OF t_cell_content . TYPES: BEGIN OF t_cell_coord, row TYPE zexcel_cell_row, column TYPE zexcel_cell_column_alpha, END OF t_cell_coord . TYPES: BEGIN OF t_cell. INCLUDE TYPE t_cell_coord AS coord. INCLUDE TYPE t_cell_content AS content. TYPES: END OF t_cell . INTERFACE if_sxml_node LOAD . CONSTANTS c_end_of_stream TYPE if_sxml_node=>node_type VALUE if_sxml_node=>co_nt_final. "#EC NOTEXT CONSTANTS c_element_open TYPE if_sxml_node=>node_type VALUE if_sxml_node=>co_nt_element_open. "#EC NOTEXT CONSTANTS c_element_close TYPE if_sxml_node=>node_type VALUE if_sxml_node=>co_nt_element_close. "#EC NOTEXT DATA: BEGIN OF gs_buffer_style, index TYPE i VALUE -1, guid TYPE zexcel_cell_style, END OF gs_buffer_style . CONSTANTS c_attribute TYPE if_sxml_node=>node_type VALUE if_sxml_node=>co_nt_attribute. "#EC NOTEXT CONSTANTS c_node_value TYPE if_sxml_node=>node_type VALUE if_sxml_node=>co_nt_value. "#EC NOTEXT METHODS skip_to IMPORTING !iv_element_name TYPE string !io_reader TYPE REF TO if_sxml_reader RAISING lcx_not_found . METHODS fill_cell_from_attributes IMPORTING !io_reader TYPE REF TO if_sxml_reader RETURNING VALUE(es_cell) TYPE t_cell RAISING lcx_not_found . METHODS read_shared_strings IMPORTING !io_reader TYPE REF TO if_sxml_reader RETURNING VALUE(et_shared_strings) TYPE stringtab . METHODS get_cell_coord IMPORTING !iv_coord TYPE string RETURNING VALUE(es_coord) TYPE t_cell_coord . METHODS put_cell_to_worksheet IMPORTING !io_worksheet TYPE REF TO zcl_excel_worksheet !is_cell TYPE t_cell . METHODS get_shared_string IMPORTING !iv_index TYPE any RETURNING VALUE(ev_value) TYPE string RAISING lcx_not_found . METHODS get_style IMPORTING !iv_index TYPE any RETURNING VALUE(ev_style_guid) TYPE zexcel_cell_style RAISING lcx_not_found . METHODS read_worksheet_data IMPORTING !io_reader TYPE REF TO if_sxml_reader !io_worksheet TYPE REF TO zcl_excel_worksheet RAISING lcx_not_found . METHODS get_sxml_reader IMPORTING !iv_path TYPE string RETURNING VALUE(eo_reader) TYPE REF TO if_sxml_reader RAISING zcx_excel . ENDCLASS. CLASS zcl_excel_reader_huge_file IMPLEMENTATION. METHOD fill_cell_from_attributes. WHILE io_reader->node_type NE c_end_of_stream. io_reader->next_attribute( ). IF io_reader->node_type NE c_attribute. EXIT. ENDIF. CASE io_reader->name. WHEN `t`. es_cell-datatype = io_reader->value. WHEN `s`. IF io_reader->value IS NOT INITIAL. es_cell-style = get_style( io_reader->value ). ENDIF. WHEN `r`. es_cell-coord = get_cell_coord( io_reader->value ). ENDCASE. ENDWHILE. ENDMETHOD. METHOD get_cell_coord. zcl_excel_common=>convert_columnrow2column_a_row( EXPORTING i_columnrow = iv_coord IMPORTING e_column = es_coord-column e_row = es_coord-row ). ENDMETHOD. METHOD get_shared_string. DATA: lv_tabix TYPE i, lv_error TYPE string. FIELD-SYMBOLS: <ls_shared_string> TYPE t_shared_string. lv_tabix = iv_index + 1. READ TABLE shared_strings ASSIGNING <ls_shared_string> INDEX lv_tabix. IF sy-subrc NE 0. CONCATENATE 'Entry ' iv_index ' not found in Shared String Table' INTO lv_error. RAISE EXCEPTION TYPE lcx_not_found EXPORTING error = lv_error. ENDIF. ev_value = <ls_shared_string>-value. ENDMETHOD. METHOD get_style. DATA: lv_tabix TYPE i, lo_style TYPE REF TO zcl_excel_style, lv_error TYPE string. IF gs_buffer_style-index NE iv_index. lv_tabix = iv_index + 1. READ TABLE styles INTO lo_style INDEX lv_tabix. IF sy-subrc NE 0. CONCATENATE 'Entry ' iv_index ' not found in Style Table' INTO lv_error. RAISE EXCEPTION TYPE lcx_not_found EXPORTING error = lv_error. ELSE. gs_buffer_style-index = iv_index. gs_buffer_style-guid = lo_style->get_guid( ). ENDIF. ENDIF. ev_style_guid = gs_buffer_style-guid. ENDMETHOD. METHOD get_sxml_reader. DATA: lv_xml TYPE xstring. lv_xml = get_from_zip_archive( iv_path ). eo_reader = cl_sxml_string_reader=>create( lv_xml ). ENDMETHOD. METHOD load_shared_strings. DATA: lo_reader TYPE REF TO if_sxml_reader. DATA: lt_shared_strings TYPE TABLE OF string, ls_shared_string TYPE t_shared_string. FIELD-SYMBOLS: <lv_shared_string> TYPE string. lo_reader = get_sxml_reader( ip_path ). lt_shared_strings = read_shared_strings( lo_reader ). LOOP AT lt_shared_strings ASSIGNING <lv_shared_string>. ls_shared_string-value = <lv_shared_string>. APPEND ls_shared_string TO shared_strings. ENDLOOP. ENDMETHOD. METHOD load_worksheet. DATA: lo_reader TYPE REF TO if_sxml_reader. DATA: lx_not_found TYPE REF TO lcx_not_found. lo_reader = get_sxml_reader( ip_path ). TRY. read_worksheet_data( io_reader = lo_reader io_worksheet = io_worksheet ). CATCH lcx_not_found INTO lx_not_found. zcx_excel=>raise_text( lx_not_found->error ). ENDTRY. ENDMETHOD. METHOD put_cell_to_worksheet. CHECK is_cell-value IS NOT INITIAL OR is_cell-formula IS NOT INITIAL OR is_cell-style IS NOT INITIAL. CALL METHOD io_worksheet->set_cell EXPORTING ip_column = is_cell-column ip_row = is_cell-row ip_value = is_cell-value ip_formula = is_cell-formula ip_data_type = is_cell-datatype ip_style = is_cell-style. ENDMETHOD. METHOD read_shared_strings. DATA lv_value TYPE string. WHILE io_reader->node_type NE c_end_of_stream. io_reader->next_node( ). IF io_reader->name EQ `t`. CASE io_reader->node_type . WHEN c_element_open . CLEAR lv_value . WHEN c_node_value . lv_value = lv_value && io_reader->value . WHEN c_element_close . APPEND lv_value TO et_shared_strings. ENDCASE . ENDIF. ENDWHILE. ENDMETHOD. METHOD read_worksheet_data. DATA: ls_cell TYPE t_cell. * Skip to <sheetData> element skip_to( iv_element_name = `sheetData` io_reader = io_reader ). * Main loop: Evaluate the <c> elements and its children WHILE io_reader->node_type NE c_end_of_stream. io_reader->next_node( ). CASE io_reader->node_type. WHEN c_element_open. IF io_reader->name EQ `c`. ls_cell = fill_cell_from_attributes( io_reader ). ENDIF. WHEN c_node_value. CASE io_reader->name. WHEN `f`. ls_cell-formula = io_reader->value. WHEN `v`. IF ls_cell-datatype EQ `s`. ls_cell-value = get_shared_string( io_reader->value ). ELSE. ls_cell-value = io_reader->value. ENDIF. WHEN `t` OR `is`. ls_cell-value = io_reader->value. ENDCASE. WHEN c_element_close. CASE io_reader->name. WHEN `c`. put_cell_to_worksheet( is_cell = ls_cell io_worksheet = io_worksheet ). WHEN `sheetData`. EXIT. ENDCASE. ENDCASE. ENDWHILE. ENDMETHOD. METHOD skip_to. DATA: lv_error TYPE string. * Skip forward to given element WHILE io_reader->name NE iv_element_name OR io_reader->node_type NE c_element_open. io_reader->next_node( ). IF io_reader->node_type = c_end_of_stream. CONCATENATE 'XML error: Didn''t find element <' iv_element_name '>' INTO lv_error. RAISE EXCEPTION TYPE lcx_not_found EXPORTING error = lv_error. ENDIF. ENDWHILE. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 1069, 5276, 62, 46862, 62, 40878, 62, 7753, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 1069, 5276, 62, 46862, 62, 12726, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 198, 220, 48006, 9782, 1961, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 3440, 62, 28710, 62, 37336, 198, 220, 220, 220, 220, 220, 220, 220, 23848, 36, 20032, 17941, 764, 198, 220, 220, 220, 337, 36252, 50, 3440, 62, 5225, 25473, 198, 220, 220, 220, 220, 220, 220, 220, 23848, 36, 20032, 17941, 764, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 256, 62, 3846, 62, 11299, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4818, 265, 2981, 41876, 1976, 1069, 5276, 62, 3846, 62, 7890, 62, 4906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 220, 220, 220, 41876, 1976, 1069, 5276, 62, 3846, 62, 8367, 11, 198, 220, 220, 220, 220, 220, 220, 220, 10451, 220, 41876, 1976, 1069, 5276, 62, 3846, 62, 687, 4712, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3918, 220, 220, 220, 41876, 1976, 1069, 5276, 62, 3846, 62, 7635, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 256, 62, 3846, 62, 11299, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 256, 62, 3846, 62, 37652, 11, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 220, 220, 220, 41876, 1976, 1069, 5276, 62, 3846, 62, 808, 11, 198, 220, 220, 220, 220, 220, 220, 220, 5721, 41876, 1976, 1069, 5276, 62, 3846, 62, 28665, 62, 26591, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 256, 62, 3846, 62, 37652, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 256, 62, 3846, 13, 198, 220, 220, 220, 220, 220, 220, 220, 3268, 5097, 52, 7206, 41876, 256, 62, 3846, 62, 37652, 7054, 6349, 13, 198, 220, 220, 220, 220, 220, 220, 220, 3268, 5097, 52, 7206, 41876, 256, 62, 3846, 62, 11299, 7054, 2695, 13, 198, 220, 220, 220, 220, 220, 24412, 47, 1546, 25, 23578, 3963, 256, 62, 3846, 764, 628, 220, 220, 220, 23255, 49836, 611, 62, 82, 19875, 62, 17440, 17579, 2885, 764, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 437, 62, 1659, 62, 5532, 41876, 611, 62, 82, 19875, 62, 17440, 14804, 17440, 62, 4906, 26173, 8924, 611, 62, 82, 19875, 62, 17440, 14804, 1073, 62, 429, 62, 20311, 13, 25113, 2943, 5626, 13918, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 30854, 62, 9654, 41876, 611, 62, 82, 19875, 62, 17440, 14804, 17440, 62, 4906, 26173, 8924, 611, 62, 82, 19875, 62, 17440, 14804, 1073, 62, 429, 62, 30854, 62, 9654, 13, 25113, 2943, 5626, 13918, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 30854, 62, 19836, 41876, 611, 62, 82, 19875, 62, 17440, 14804, 17440, 62, 4906, 26173, 8924, 611, 62, 82, 19875, 62, 17440, 14804, 1073, 62, 429, 62, 30854, 62, 19836, 13, 25113, 2943, 5626, 13918, 198, 220, 220, 220, 42865, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 308, 82, 62, 22252, 62, 7635, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6376, 41876, 1312, 26173, 8924, 532, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 10103, 220, 41876, 1976, 1069, 5276, 62, 3846, 62, 7635, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 308, 82, 62, 22252, 62, 7635, 764, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 42348, 41876, 611, 62, 82, 19875, 62, 17440, 14804, 17440, 62, 4906, 26173, 8924, 611, 62, 82, 19875, 62, 17440, 14804, 1073, 62, 429, 62, 42348, 13, 25113, 2943, 5626, 13918, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 17440, 62, 8367, 41876, 611, 62, 82, 19875, 62, 17440, 14804, 17440, 62, 4906, 26173, 8924, 611, 62, 82, 19875, 62, 17440, 14804, 1073, 62, 429, 62, 8367, 13, 25113, 2943, 5626, 13918, 628, 220, 220, 220, 337, 36252, 50, 14267, 62, 1462, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 30854, 62, 3672, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 952, 62, 46862, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 611, 62, 82, 19875, 62, 46862, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 300, 66, 87, 62, 1662, 62, 9275, 764, 198, 220, 220, 220, 337, 36252, 50, 6070, 62, 3846, 62, 6738, 62, 1078, 7657, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 952, 62, 46862, 220, 220, 220, 220, 41876, 4526, 37, 5390, 611, 62, 82, 19875, 62, 46862, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 274, 62, 3846, 8, 41876, 256, 62, 3846, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 300, 66, 87, 62, 1662, 62, 9275, 764, 198, 220, 220, 220, 337, 36252, 50, 1100, 62, 28710, 62, 37336, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 952, 62, 46862, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 611, 62, 82, 19875, 62, 46862, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 316, 62, 28710, 62, 37336, 8, 41876, 4731, 8658, 764, 198, 220, 220, 220, 337, 36252, 50, 651, 62, 3846, 62, 37652, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 37652, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 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,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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 ]
class ZCL_EXCEL_COLUMNS definition public final create public . *"* public components of class ZCL_EXCEL_COLUMNS *"* do not include other source files here!!! public section. types: begin of MTY_S_HASHED_COLUMN, COLUMN_INDEX type INT4, COLUMN type ref to ZCL_EXCEL_COLUMN, end of MTY_S_HASHED_COLUMN , MTY_TS_HASEHD_COLUMN type hashed table of MTY_S_HASHED_COLUMN with unique key COLUMN_INDEX. methods ADD importing !IO_COLUMN type ref to ZCL_EXCEL_COLUMN . methods CLEAR . methods CONSTRUCTOR . methods GET importing !IP_INDEX type I returning value(EO_COLUMN) type ref to ZCL_EXCEL_COLUMN . methods GET_ITERATOR returning value(EO_ITERATOR) type ref to CL_OBJECT_COLLECTION_ITERATOR . methods IS_EMPTY returning value(IS_EMPTY) type FLAG . methods REMOVE importing !IO_COLUMN type ref to ZCL_EXCEL_COLUMN . methods SIZE returning value(EP_SIZE) type I . *"* protected components of class ZABAP_EXCEL_WORKSHEETS *"* do not include other source files here!!! protected section. *"* private components of class ZABAP_EXCEL_RANGES *"* do not include other source files here!!! private section. data COLUMNS type ref to CL_OBJECT_COLLECTION . data COLUMNS_HASEHD type MTY_TS_HASEHD_COLUMN . ENDCLASS. CLASS ZCL_EXCEL_COLUMNS IMPLEMENTATION. method ADD. data: LS_HASHED_COLUMN type MTY_S_HASHED_COLUMN. LS_HASHED_COLUMN-COLUMN_INDEX = IO_COLUMN->GET_COLUMN_INDEX( ). LS_HASHED_COLUMN-COLUMN = IO_COLUMN. insert LS_HASHED_COLUMN into table COLUMNS_HASEHD . COLUMNS->ADD( IO_COLUMN ). endmethod. method CLEAR. clear COLUMNS_HASEHD. COLUMNS->CLEAR( ). endmethod. method CONSTRUCTOR. create object COLUMNS. endmethod. method GET. field-symbols: <LS_HASHED_COLUMN> type MTY_S_HASHED_COLUMN. read table COLUMNS_HASEHD with key COLUMN_INDEX = IP_INDEX assigning <LS_HASHED_COLUMN>. if SY-SUBRC = 0. EO_COLUMN = <LS_HASHED_COLUMN>-COLUMN. endif. endmethod. method GET_ITERATOR. EO_ITERATOR ?= COLUMNS->IF_OBJECT_COLLECTION~GET_ITERATOR( ). endmethod. method IS_EMPTY. IS_EMPTY = COLUMNS->IF_OBJECT_COLLECTION~IS_EMPTY( ). endmethod. method REMOVE. delete table COLUMNS_HASEHD with table key COLUMN_INDEX = IO_COLUMN->GET_COLUMN_INDEX( ) . COLUMNS->REMOVE( IO_COLUMN ). endmethod. method SIZE. EP_SIZE = COLUMNS->IF_OBJECT_COLLECTION~SIZE( ). endmethod. ENDCLASS.
[ 4871, 1168, 5097, 62, 6369, 34, 3698, 62, 25154, 5883, 8035, 6770, 198, 220, 1171, 198, 220, 2457, 198, 220, 2251, 1171, 764, 198, 198, 9, 1, 9, 1171, 6805, 286, 1398, 1168, 5097, 62, 6369, 34, 3698, 62, 25154, 5883, 8035, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 220, 1171, 2665, 13, 198, 220, 220, 220, 3858, 25, 198, 220, 220, 220, 220, 220, 2221, 286, 337, 9936, 62, 50, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20444, 5883, 45, 62, 12115, 6369, 2099, 17828, 19, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20444, 5883, 45, 220, 220, 220, 220, 220, 220, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 62, 25154, 5883, 45, 11, 198, 220, 220, 220, 220, 220, 886, 286, 337, 9936, 62, 50, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 837, 198, 220, 220, 220, 220, 220, 337, 9936, 62, 4694, 62, 39, 11159, 10227, 62, 25154, 5883, 45, 2099, 468, 704, 3084, 286, 337, 9936, 62, 50, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 351, 3748, 1994, 20444, 5883, 45, 62, 12115, 6369, 13, 628, 220, 220, 220, 5050, 27841, 198, 220, 220, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 9399, 62, 25154, 5883, 45, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 62, 25154, 5883, 45, 764, 198, 220, 220, 220, 5050, 30301, 1503, 764, 198, 220, 220, 220, 5050, 7102, 46126, 1581, 764, 198, 220, 220, 220, 5050, 17151, 198, 220, 220, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 4061, 62, 12115, 6369, 220, 220, 220, 220, 220, 220, 220, 2099, 314, 198, 220, 220, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 7, 4720, 62, 25154, 5883, 45, 8, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 62, 25154, 5883, 45, 764, 198, 220, 220, 220, 5050, 17151, 62, 2043, 1137, 25633, 198, 220, 220, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 7, 4720, 62, 2043, 1137, 25633, 8, 2099, 1006, 284, 7852, 62, 9864, 23680, 62, 25154, 16779, 2849, 62, 2043, 1137, 25633, 764, 198, 220, 220, 220, 5050, 3180, 62, 39494, 9936, 198, 220, 220, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 7, 1797, 62, 39494, 9936, 8, 2099, 9977, 4760, 764, 198, 220, 220, 220, 5050, 22657, 46, 6089, 198, 220, 220, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 9399, 62, 25154, 5883, 45, 2099, 1006, 284, 1168, 5097, 62, 6369, 34, 3698, 62, 25154, 5883, 45, 764, 198, 220, 220, 220, 5050, 311, 35400, 198, 220, 220, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 7, 8905, 62, 33489, 8, 2099, 314, 764, 198, 9, 1, 9, 6861, 6805, 286, 1398, 1168, 6242, 2969, 62, 6369, 34, 3698, 62, 33249, 9693, 36, 32716, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 220, 6861, 2665, 13, 198, 9, 1, 9, 2839, 6805, 286, 1398, 1168, 6242, 2969, 62, 6369, 34, 3698, 62, 49, 15567, 1546, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 220, 2839, 2665, 13, 628, 220, 220, 220, 1366, 20444, 5883, 8035, 2099, 1006, 284, 7852, 62, 9864, 23680, 62, 25154, 16779, 2849, 764, 198, 220, 220, 220, 1366, 20444, 5883, 8035, 62, 39, 11159, 10227, 2099, 337, 9936, 62, 4694, 62, 39, 11159, 10227, 62, 25154, 5883, 45, 764, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 6369, 34, 3698, 62, 25154, 5883, 8035, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 2446, 27841, 13, 198, 220, 220, 220, 1366, 25, 30948, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 2099, 337, 9936, 62, 50, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 13, 628, 220, 220, 220, 30948, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 12, 25154, 5883, 45, 62, 12115, 6369, 796, 24418, 62, 25154, 5883, 45, 3784, 18851, 62, 25154, 5883, 45, 62, 12115, 6369, 7, 6739, 198, 220, 220, 220, 30948, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 12, 25154, 5883, 45, 796, 24418, 62, 25154, 5883, 45, 13, 628, 220, 220, 220, 7550, 30948, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 656, 3084, 20444, 5883, 8035, 62, 39, 11159, 10227, 764, 628, 220, 220, 220, 20444, 5883, 8035, 3784, 29266, 7, 24418, 62, 25154, 5883, 45, 6739, 198, 220, 886, 24396, 13, 628, 198, 220, 2446, 30301, 1503, 13, 198, 220, 220, 220, 1598, 20444, 5883, 8035, 62, 39, 11159, 10227, 13, 198, 220, 220, 220, 20444, 5883, 8035, 3784, 29931, 1503, 7, 6739, 198, 220, 886, 24396, 13, 628, 198, 220, 2446, 7102, 46126, 1581, 13, 628, 220, 220, 220, 2251, 2134, 20444, 5883, 8035, 13, 628, 220, 886, 24396, 13, 628, 198, 220, 2446, 17151, 13, 198, 220, 220, 220, 2214, 12, 1837, 2022, 10220, 25, 1279, 6561, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 29, 2099, 337, 9936, 62, 50, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 13, 628, 220, 220, 220, 1100, 3084, 20444, 5883, 8035, 62, 39, 11159, 10227, 351, 1994, 20444, 5883, 45, 62, 12115, 6369, 796, 6101, 62, 12115, 6369, 38875, 1279, 6561, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 28401, 198, 220, 220, 220, 611, 19704, 12, 50, 10526, 7397, 796, 657, 13, 198, 220, 220, 220, 220, 220, 412, 46, 62, 25154, 5883, 45, 796, 1279, 6561, 62, 39, 11211, 1961, 62, 25154, 5883, 45, 29, 12, 25154, 5883, 45, 13, 198, 220, 220, 220, 45762, 13, 198, 220, 886, 24396, 13, 628, 198, 220, 2446, 17151, 62, 2043, 1137, 25633, 13, 198, 220, 220, 220, 412, 46, 62, 2043, 1137, 25633, 5633, 28, 20444, 5883, 8035, 3784, 5064, 62, 9864, 23680, 62, 25154, 16779, 2849, 93, 18851, 62, 2043, 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 ]
CLASS zcl_abapgit_http DEFINITION PUBLIC FINAL 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, 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. PRIVATE 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, is_local_system IMPORTING iv_url TYPE string RETURNING VALUE(rv_bool) TYPE abap_bool, 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. 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( 'HTTP 401, unauthorized' ). 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. " Offer two factor authentication if it is available and required zcl_abapgit_2fa_auth_registry=>use_2fa_if_required( EXPORTING iv_url = iv_url CHANGING cv_username = lv_user cv_password = lv_pass ). 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. "acquire_login_details 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. "check_auth_requested 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. cl_http_client=>create_by_url( EXPORTING url = zcl_abapgit_url=>host( iv_url ) ssl_id = 'ANONYM' 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'. "#EC NOTEXT ENDCASE. zcx_abapgit_exception=>raise( lv_text ). 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( ) ). "#EC NOTEXT 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( 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/larshp/abapGit/issues/1432 rv_agent = |git/2.0 (abapGit { zif_abapgit_definitions=>gc_abap_version })|. ENDMETHOD. METHOD is_local_system. DATA: lv_host TYPE string, lt_list TYPE zif_abapgit_exit=>ty_icm_sinfo2_tt, li_exit TYPE REF TO zif_abapgit_exit. FIELD-SYMBOLS: <ls_list> LIKE LINE OF lt_list. CALL FUNCTION 'ICM_GET_INFO2' TABLES servlist = lt_list EXCEPTIONS icm_error = 1 icm_timeout = 2 OTHERS = 3. IF sy-subrc <> 0. RETURN. ENDIF. APPEND INITIAL LINE TO lt_list ASSIGNING <ls_list>. <ls_list>-hostname = 'localhost'. 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 hostname = 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, 25261, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 25, 347, 43312, 3963, 269, 62, 15952, 1326, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16274, 41876, 4731, 26173, 8924, 705, 19511, 395, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 269, 62, 15952, 1326, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 25, 198, 220, 220, 220, 220, 220, 651, 62, 25781, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 81, 85, 62, 25781, 8, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 2251, 62, 1525, 62, 6371, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 6371, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 15271, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 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, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42715, 12, 49273, 50, 25, 198, 220, 220, 220, 220, 220, 2198, 62, 18439, 62, 25927, 276, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21065, 62, 16366, 220, 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, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 81, 85, 62, 18439, 62, 25927, 276, 8, 41876, 450, 499, 62, 30388, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 318, 62, 12001, 62, 10057, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 6371, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 81, 85, 62, 30388, 8, 41876, 450, 499, 62, 30388, 11, 198, 220, 220, 220, 220, 220, 12831, 62, 38235, 62, 36604, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21065, 62, 16366, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 611, 62, 4023, 62, 16366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33245, 62, 16366, 220, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 6371, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 81, 85, 62, 15952, 1326, 8, 41876, 4731, 198, 220, 220, 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, 40717, 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, 40717, 22219, 11, 22959, 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, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 6371, 220, 220, 796, 21628, 62, 6371, 198, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
CLASS zcl_abapgit_oo_class DEFINITION PUBLIC INHERITING FROM zcl_abapgit_oo_base. PUBLIC SECTION. METHODS: zif_abapgit_oo_object_fnc~create REDEFINITION, zif_abapgit_oo_object_fnc~generate_locals REDEFINITION, zif_abapgit_oo_object_fnc~insert_text_pool REDEFINITION, zif_abapgit_oo_object_fnc~create_sotr REDEFINITION, zif_abapgit_oo_object_fnc~get_includes REDEFINITION, zif_abapgit_oo_object_fnc~get_class_properties REDEFINITION, zif_abapgit_oo_object_fnc~read_text_pool REDEFINITION, zif_abapgit_oo_object_fnc~read_sotr REDEFINITION, zif_abapgit_oo_object_fnc~delete REDEFINITION. ENDCLASS. CLASS zcl_abapgit_oo_class IMPLEMENTATION. METHOD zif_abapgit_oo_object_fnc~create. CALL FUNCTION 'SEO_CLASS_CREATE_COMPLETE' EXPORTING devclass = iv_package overwrite = iv_overwrite CHANGING class = is_properties EXCEPTIONS existing = 1 is_interface = 2 db_error = 3 component_error = 4 no_access = 5 other = 6 OTHERS = 7. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from SEO_CLASS_CREATE_COMPLETE' ). ENDIF. ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~generate_locals. CALL FUNCTION 'SEO_CLASS_GENERATE_LOCALS' EXPORTING clskey = is_key force = iv_force locals_def = it_local_definitions locals_imp = it_local_implementations locals_mac = it_local_macros locals_testclasses = it_local_test_classes EXCEPTIONS not_existing = 1 model_only = 2 locals_not_generated = 3 locals_not_initialised = 4 OTHERS = 5. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from generate_locals' ). ENDIF. ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~insert_text_pool. DATA: lv_cp TYPE program. lv_cp = cl_oo_classname_service=>get_classpool_name( iv_class_name ). INSERT TEXTPOOL lv_cp FROM it_text_pool LANGUAGE iv_language STATE 'I'. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from INSERT TEXTPOOL' ). ENDIF. zcl_abapgit_objects_activation=>add( iv_type = 'REPT' iv_name = lv_cp ). ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~create_sotr. DATA: lt_sotr TYPE zif_abapgit_definitions=>ty_sotr_tt, lt_objects TYPE sotr_objects, ls_paket TYPE sotr_pack, lv_object LIKE LINE OF lt_objects. FIELD-SYMBOLS: <ls_sotr> LIKE LINE OF lt_sotr. LOOP AT it_sotr ASSIGNING <ls_sotr>. CALL FUNCTION 'SOTR_OBJECT_GET_OBJECTS' EXPORTING object_vector = <ls_sotr>-header-objid_vec IMPORTING objects = lt_objects EXCEPTIONS object_not_found = 1 OTHERS = 2. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from SOTR_OBJECT_GET_OBJECTS' ). ENDIF. READ TABLE lt_objects INDEX 1 INTO lv_object. ASSERT sy-subrc = 0. ls_paket-paket = iv_package. CALL FUNCTION 'SOTR_CREATE_CONCEPT' EXPORTING paket = ls_paket crea_lan = <ls_sotr>-header-crea_lan alias_name = <ls_sotr>-header-alias_name object = lv_object entries = <ls_sotr>-entries concept_default = <ls_sotr>-header-concept EXCEPTIONS package_missing = 1 crea_lan_missing = 2 object_missing = 3 paket_does_not_exist = 4 alias_already_exist = 5 object_type_not_found = 6 langu_missing = 7 identical_context_not_allowed = 8 text_too_long = 9 error_in_update = 10 no_master_langu = 11 error_in_concept_id = 12 alias_not_allowed = 13 tadir_entry_creation_failed = 14 internal_error = 15 error_in_correction = 16 user_cancelled = 17 no_entry_found = 18 OTHERS = 19. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from SOTR_CREATE_CONCEPT' ). ENDIF. ENDLOOP. ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~get_includes. * note: includes returned might not exist * method cl_oo_classname_service=>GET_ALL_CLASS_INCLUDES does not exist in 702 DATA: lv_class_name TYPE seoclsname, lt_methods TYPE seop_methods_w_include. FIELD-SYMBOLS: <ls_method> LIKE LINE OF lt_methods. lv_class_name = iv_object_name. APPEND cl_oo_classname_service=>get_ccdef_name( lv_class_name ) TO rt_includes. APPEND cl_oo_classname_service=>get_ccmac_name( lv_class_name ) TO rt_includes. APPEND cl_oo_classname_service=>get_ccimp_name( lv_class_name ) TO rt_includes. APPEND cl_oo_classname_service=>get_cl_name( lv_class_name ) TO rt_includes. APPEND cl_oo_classname_service=>get_ccau_name( lv_class_name ) TO rt_includes. APPEND cl_oo_classname_service=>get_pubsec_name( lv_class_name ) TO rt_includes. APPEND cl_oo_classname_service=>get_prosec_name( lv_class_name ) TO rt_includes. APPEND cl_oo_classname_service=>get_prisec_name( lv_class_name ) TO rt_includes. APPEND cl_oo_classname_service=>get_classpool_name( lv_class_name ) TO rt_includes. APPEND cl_oo_classname_service=>get_ct_name( lv_class_name ) TO rt_includes. * skip the CS include, as it is sometimes generated on the fly instead of * when the methods are changed * APPEND cl_oo_classname_service=>get_cs_name( lv_class_name ) TO rt_includes. cl_oo_classname_service=>get_all_method_includes( EXPORTING clsname = lv_class_name RECEIVING result = lt_methods EXCEPTIONS class_not_existing = 1 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Class { lv_class_name } not existing| ). ENDIF. LOOP AT lt_methods ASSIGNING <ls_method>. APPEND <ls_method>-incname TO rt_includes. ENDLOOP. ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~get_class_properties. CALL FUNCTION 'SEO_CLIF_GET' EXPORTING cifkey = is_class_key version = seoc_version_active IMPORTING class = rs_class_properties EXCEPTIONS not_existing = 1 deleted = 2 model_only = 3 OTHERS = 4. IF sy-subrc = 1. RETURN. " in case only inactive version exists ELSEIF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from seo_clif_get' ). ENDIF. ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~read_text_pool. DATA: lv_cp TYPE program. lv_cp = cl_oo_classname_service=>get_classpool_name( iv_class_name ). READ TEXTPOOL lv_cp INTO rt_text_pool LANGUAGE iv_language. "#EC CI_READ_REP ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~read_sotr. DATA: lv_concept TYPE sotr_head-concept, lt_seocompodf TYPE STANDARD TABLE OF seocompodf WITH DEFAULT KEY, ls_header TYPE sotr_head, lt_entries TYPE sotr_text_tt. FIELD-SYMBOLS: <ls_sotr> LIKE LINE OF rt_sotr, <ls_seocompodf> LIKE LINE OF lt_seocompodf, <ls_entry> LIKE LINE OF lt_entries. SELECT * FROM seocompodf INTO TABLE lt_seocompodf WHERE clsname = iv_object_name AND version = '1' AND exposure = '2' AND attdecltyp = '2' AND type = 'SOTR_CONC' ORDER BY PRIMARY KEY. "#EC CI_SUBRC LOOP AT lt_seocompodf ASSIGNING <ls_seocompodf>. lv_concept = translate( val = <ls_seocompodf>-attvalue from = '''' to = '' ). CALL FUNCTION 'SOTR_GET_CONCEPT' EXPORTING concept = lv_concept IMPORTING header = ls_header TABLES entries = lt_entries EXCEPTIONS no_entry_found = 1 OTHERS = 2. IF sy-subrc <> 0. CONTINUE. ENDIF. CLEAR: ls_header-paket, ls_header-crea_name, ls_header-crea_tstut, ls_header-chan_name, ls_header-chan_tstut. LOOP AT lt_entries ASSIGNING <ls_entry>. CLEAR: <ls_entry>-version, <ls_entry>-crea_name, <ls_entry>-crea_tstut, <ls_entry>-chan_name, <ls_entry>-chan_tstut. ENDLOOP. APPEND INITIAL LINE TO rt_sotr ASSIGNING <ls_sotr>. <ls_sotr>-header = ls_header. <ls_sotr>-entries = lt_entries. ENDLOOP. ENDMETHOD. METHOD zif_abapgit_oo_object_fnc~delete. CALL FUNCTION 'SEO_CLASS_DELETE_COMPLETE' EXPORTING clskey = is_deletion_key EXCEPTIONS not_existing = 1 is_interface = 2 db_error = 3 no_access = 4 other = 5 OTHERS = 6. IF sy-subrc = 1. * ignore deletion of objects that does not exist * this can happen when the SXCI object is deleted before the implementing CLAS RETURN. ELSEIF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from SEO_CLASS_DELETE_COMPLETE: { sy-subrc }| ). ENDIF. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 2238, 62, 4871, 5550, 20032, 17941, 44731, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 397, 499, 18300, 62, 2238, 62, 8692, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 17953, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 8612, 378, 62, 17946, 874, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 28463, 62, 5239, 62, 7742, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 17953, 62, 82, 313, 81, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 1136, 62, 42813, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 1136, 62, 4871, 62, 48310, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 961, 62, 5239, 62, 7742, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 961, 62, 82, 313, 81, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 33678, 23848, 36, 20032, 17941, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 2238, 62, 4871, 30023, 2538, 10979, 6234, 13, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 17953, 13, 198, 220, 220, 220, 42815, 29397, 4177, 2849, 705, 50, 4720, 62, 31631, 62, 43387, 6158, 62, 41335, 9328, 6, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1614, 4871, 220, 220, 220, 220, 220, 220, 220, 796, 21628, 62, 26495, 198, 220, 220, 220, 220, 220, 220, 220, 49312, 220, 220, 220, 220, 220, 220, 796, 21628, 62, 2502, 13564, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1398, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 318, 62, 48310, 198, 220, 220, 220, 220, 220, 7788, 42006, 11053, 198, 220, 220, 220, 220, 220, 220, 220, 4683, 220, 220, 220, 220, 220, 220, 220, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 39994, 220, 220, 220, 796, 362, 198, 220, 220, 220, 220, 220, 220, 220, 20613, 62, 18224, 220, 220, 220, 220, 220, 220, 220, 796, 513, 198, 220, 220, 220, 220, 220, 220, 220, 7515, 62, 18224, 796, 604, 198, 220, 220, 220, 220, 220, 220, 220, 645, 62, 15526, 220, 220, 220, 220, 220, 220, 796, 642, 198, 220, 220, 220, 220, 220, 220, 220, 584, 220, 220, 220, 220, 220, 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, 796, 767, 13, 198, 220, 220, 220, 16876, 827, 12, 7266, 6015, 1279, 29, 657, 13, 198, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 14804, 40225, 7, 705, 18224, 422, 30850, 62, 31631, 62, 43387, 6158, 62, 41335, 9328, 6, 6739, 198, 220, 220, 220, 23578, 5064, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 2238, 62, 15252, 62, 69, 10782, 93, 8612, 378, 62, 17946, 874, 13, 198, 220, 220, 220, 42815, 29397, 4177, 2849, 705, 50, 4720, 62, 31631, 62, 35353, 1137, 6158, 62, 29701, 23333, 6, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 537, 82, 2539, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 318, 62, 2539, 198, 220, 220, 220, 220, 220, 220, 220, 2700, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 21628, 62, 3174, 198, 220, 220, 220, 220, 220, 220, 220, 17205, 62, 4299, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 340, 62, 12001, 62, 4299, 50101, 198, 220, 220, 220, 220, 220, 220, 220, 17205, 62, 11011, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 340, 62, 12001, 62, 320, 26908, 602, 198, 220, 220, 220, 220, 220, 220, 220, 17205, 62, 20285, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 340, 62, 12001, 62, 20285, 4951, 198, 220, 220, 220, 220, 220, 220, 220, 17205, 62, 9288, 37724, 220, 220, 220, 220, 796, 340, 62, 12001, 62, 9288, 62, 37724, 198, 220, 220, 220, 220, 220, 7788, 42006, 11053, 198, 220, 220, 220, 220, 220, 220, 220, 407, 62, 25687, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 8807, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 362, 198, 220, 220, 220, 220, 220, 220, 220, 17205, 62, 1662, 62, 27568, 220, 220, 796, 513, 198, 220, 220, 220, 220, 220, 220, 220, 17205, 62, 1662, 62, 36733, 1417, 796, 604, 198, 220, 220, 220, 220, 220, 220, 220, 440, 4221, 4877, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 642, 13, 198, 220, 220, 220, 16876, 827, 12, 7266, 6015, 1279, 29, 657, 13, 198, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
*"* use this source file for your ABAP unit test classes * foo bar
[ 9, 1, 9, 779, 428, 2723, 2393, 329, 534, 9564, 2969, 4326, 1332, 6097, 198, 198, 9, 22944, 2318, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
CLASS zcl_excel_style DEFINITION PUBLIC FINAL CREATE PUBLIC . *"* public components of class ZCL_EXCEL_STYLE *"* do not include other source files here!!! PUBLIC SECTION. DATA font TYPE REF TO zcl_excel_style_font . DATA fill TYPE REF TO zcl_excel_style_fill . DATA borders TYPE REF TO zcl_excel_style_borders . DATA alignment TYPE REF TO zcl_excel_style_alignment . DATA number_format TYPE REF TO zcl_excel_style_number_format . DATA protection TYPE REF TO zcl_excel_style_protection . METHODS constructor IMPORTING !ip_guid TYPE zexcel_cell_style OPTIONAL . METHODS get_guid RETURNING VALUE(ep_guid) TYPE zexcel_cell_style . *"* protected components of class ZABAP_EXCEL_STYLE *"* do not include other source files here!!! PROTECTED SECTION. *"* private components of class ZCL_EXCEL_STYLE *"* do not include other source files here!!! PRIVATE SECTION. DATA guid TYPE zexcel_cell_style . ENDCLASS. CLASS zcl_excel_style IMPLEMENTATION. METHOD constructor. CREATE OBJECT font. CREATE OBJECT fill. CREATE OBJECT borders. CREATE OBJECT alignment. CREATE OBJECT number_format. CREATE OBJECT protection. IF ip_guid IS NOT INITIAL. me->guid = ip_guid. ELSE. me->guid = zcl_excel_obsolete_func_wrap=>guid_create( ). ENDIF. ENDMETHOD. METHOD get_guid. ep_guid = me->guid. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 1069, 5276, 62, 7635, 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, 2257, 56, 2538, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 220, 44731, 44513, 13, 628, 220, 220, 220, 42865, 10369, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 7635, 62, 10331, 764, 198, 220, 220, 220, 42865, 6070, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 7635, 62, 20797, 764, 198, 220, 220, 220, 42865, 11637, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 7635, 62, 65, 6361, 764, 198, 220, 220, 220, 42865, 19114, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 7635, 62, 282, 16747, 764, 198, 220, 220, 220, 42865, 1271, 62, 18982, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 7635, 62, 17618, 62, 18982, 764, 198, 220, 220, 220, 42865, 4800, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 7635, 62, 42846, 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, 541, 62, 5162, 312, 41876, 1976, 1069, 5276, 62, 3846, 62, 7635, 39852, 2849, 1847, 764, 198, 220, 220, 220, 337, 36252, 50, 651, 62, 5162, 312, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 538, 62, 5162, 312, 8, 41876, 1976, 1069, 5276, 62, 3846, 62, 7635, 764, 198, 9, 1, 9, 6861, 6805, 286, 1398, 1168, 6242, 2969, 62, 6369, 34, 3698, 62, 2257, 56, 2538, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 9, 1, 9, 2839, 6805, 286, 1398, 1168, 5097, 62, 6369, 34, 3698, 62, 2257, 56, 2538, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 42865, 10103, 41876, 1976, 1069, 5276, 62, 3846, 62, 7635, 764, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 1069, 5276, 62, 7635, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 23772, 13, 628, 198, 220, 220, 220, 29244, 6158, 25334, 23680, 10369, 13, 198, 220, 220, 220, 29244, 6158, 25334, 23680, 6070, 13, 198, 220, 220, 220, 29244, 6158, 25334, 23680, 11637, 13, 198, 220, 220, 220, 29244, 6158, 25334, 23680, 19114, 13, 198, 220, 220, 220, 29244, 6158, 25334, 23680, 1271, 62, 18982, 13, 198, 220, 220, 220, 29244, 6158, 25334, 23680, 4800, 13, 628, 220, 220, 220, 16876, 20966, 62, 5162, 312, 3180, 5626, 3268, 2043, 12576, 13, 198, 220, 220, 220, 220, 220, 502, 3784, 5162, 312, 796, 20966, 62, 5162, 312, 13, 198, 220, 220, 220, 17852, 5188, 13, 198, 220, 220, 220, 220, 220, 502, 3784, 5162, 312, 796, 1976, 565, 62, 1069, 5276, 62, 672, 23869, 62, 20786, 62, 37150, 14804, 5162, 312, 62, 17953, 7, 6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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 ]
FUNCTION bapi_transaction_rollback. RETURN. ENDFUNCTION.
[ 42296, 4177, 2849, 275, 15042, 62, 7645, 2673, 62, 2487, 1891, 13, 198, 220, 30826, 27064, 13, 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 ]
class YJRS_RUNTIME_MEASUREMENT definition public final create public . public section. types: T_CLOCK_RESOLUTION TYPE C LENGTH 1 . types: T_DISPLAY_MODE TYPE C LENGTH 1 . types: T_TIME_MODE TYPE C LENGTH 1 . types: T_MEASUREMENT_ID TYPE c LENGTH 50 . constants: BEGIN OF E_CLOCK_RESOLUTION, LOW TYPE T_CLOCK_RESOLUTION VALUE '1', HIGH TYPE T_CLOCK_RESOLUTION VALUE '2', END OF E_CLOCK_RESOLUTION . constants: BEGIN OF E_DISPLAY_MODE, TEXT TYPE T_DISPLAY_MODE VALUE '1', GRAPHICAL TYPE T_DISPLAY_MODE VALUE '2', END OF E_DISPLAY_MODE . constants: BEGIN OF E_TIME_MODE, SUM TYPE T_TIME_MODE VALUE '1', AVERAGE TYPE T_TIME_MODE VALUE '2', END OF E_TIME_MODE . class-methods SET_CLOCK_RESOLUTION importing !PI_CLOCK_RESOLUTION type T_CLOCK_RESOLUTION . methods CLEAR_MEASUREMENT . methods START_MEASUREMENT importing !PI_ID type T_MEASUREMENT_ID . methods END_MEASUREMENT importing !PI_ID type T_MEASUREMENT_ID . methods DISPLAY_MEASUREMENT importing !PI_DISPLAY_MODE type T_DISPLAY_MODE default E_DISPLAY_MODE-TEXT !PI_TIME_MODE type T_TIME_MODE default E_TIME_MODE-SUM . protected section. private section. types: BEGIN OF T_MEASUREMENT, id TYPE t_measurement_id, start_time TYPE i, end_time TYPE i, total_time TYPE i, total_executions TYPE i, position TYPE i, END OF T_MEASUREMENT . types: t_measurement_tab TYPE SORTED TABLE OF t_measurement WITH UNIQUE KEY id . data MEASUREMENT_TAB type T_MEASUREMENT_TAB . methods HELPER_DISPLAY_TEXT importing !PI_TIME_MODE type T_TIME_MODE default E_TIME_MODE-SUM . methods HELPER_DISPLAY_GRAPHICAL importing !PI_TIME_MODE type T_TIME_MODE default E_TIME_MODE-SUM . ENDCLASS. CLASS YJRS_RUNTIME_MEASUREMENT IMPLEMENTATION. method CLEAR_MEASUREMENT. REFRESH: measurement_tab. endmethod. method DISPLAY_MEASUREMENT. CASE pi_display_mode. WHEN e_display_mode-text. CALL METHOD helper_display_text EXPORTING pi_time_mode = pi_time_mode. WHEN e_display_mode-graphical. CALL METHOD helper_display_graphical EXPORTING pi_time_mode = pi_time_mode. ENDCASE. endmethod. method END_MEASUREMENT. FIELD-SYMBOLS: <lwa_measurement> TYPE t_measurement. DATA: l_time TYPE i. READ TABLE measurement_tab ASSIGNING <lwa_measurement> WITH KEY id = pi_id. IF sy-subrc = 0. GET RUN TIME FIELD <lwa_measurement>-end_time. l_time = <lwa_measurement>-end_time - <lwa_measurement>-start_time. ADD l_time TO <lwa_measurement>-total_time. ADD 1 TO <lwa_measurement>-total_executions. ENDIF. endmethod. method HELPER_DISPLAY_GRAPHICAL. CONSTANTS: lc_bar_starting_x TYPE i VALUE 53. DATA: l_worst TYPE abap_bool, l_best TYPE abap_bool, l_worst_time TYPE i, l_best_time TYPE i, l_worst_time_pos TYPE i, l_best_time_pos TYPE i, l_percentage TYPE p DECIMALS 2, l_percentage_text TYPE c LENGTH 7, l_bar_position TYPE i, l_average_time TYPE i, lwa_measurement TYPE t_measurement, li_measurement TYPE STANDARD TABLE OF t_measurement. LOOP AT measurement_tab INTO lwa_measurement. IF lwa_measurement-total_time > l_worst_time. l_worst_time = lwa_measurement-total_time. l_worst_time_pos = lwa_measurement-position. ENDIF. IF lwa_measurement-total_time < l_best_time OR l_best_time IS INITIAL. l_best_time = lwa_measurement-total_time. l_best_time_pos = lwa_measurement-position. ENDIF. ENDLOOP. li_measurement[] = measurement_tab[]. SORT li_measurement BY position. LOOP AT li_measurement INTO lwa_measurement. IF lwa_measurement-position = l_worst_time_pos. l_worst = abap_true. l_best = abap_false. ELSEIF lwa_measurement-position = l_best_time_pos.. l_worst = abap_false. l_best = abap_true. ELSE. l_worst = abap_false. l_best = abap_false. ENDIF. FORMAT COLOR COL_BACKGROUND INTENSIFIED. WRITE: / lwa_measurement-id, '|'. l_percentage = lwa_measurement-total_time / l_worst_time * 100. l_bar_position = lc_bar_starting_x. DO 100 TIMES. IF sy-index <= l_percentage OR sy-index = 1. IF l_worst = abap_true. FORMAT COLOR COL_NEGATIVE. ELSEIF l_best = abap_true. FORMAT COLOR COL_POSITIVE. ELSE. FORMAT COLOR COL_GROUP. ENDIF. ELSE. FORMAT COLOR COL_BACKGROUND. ENDIF. WRITE AT l_bar_position(1) ' '. ADD 1 TO l_bar_position. ENDDO. FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF. WRITE: l_percentage TO l_percentage_text. CONCATENATE l_percentage_text '%' INTO l_percentage_text. IF pi_time_mode = e_time_mode-average. l_average_time = lwa_measurement-total_time / lwa_measurement-total_executions. WRITE: 'Average time:', l_average_time, 'ms', '(', l_percentage_text, ')'. ELSE. WRITE: lwa_measurement-total_time, 'ms', '(', l_percentage_text, ')'. ENDIF. WRITE: /4 'Total executions:', lwa_measurement-total_executions. WRITE AT 52 '|'. ENDLOOP. FORMAT COLOR COL_BACKGROUND INTENSIFIED. WRITE: /52 '|'. l_bar_position = lc_bar_starting_x - 1. DO 100 TIMES. WRITE AT l_bar_position(1) '-'. ADD 1 TO l_bar_position. ENDDO. endmethod. method HELPER_DISPLAY_TEXT. DATA: l_average_time TYPE i, lwa_measurement TYPE t_measurement, li_measurement TYPE STANDARD TABLE OF t_measurement. li_measurement[] = measurement_tab[]. SORT li_measurement BY position. LOOP AT li_measurement INTO lwa_measurement. WRITE: / lwa_measurement-id, '(', lwa_measurement-total_executions, ' times executed):'. IF pi_time_mode = e_time_mode-average. l_average_time = lwa_measurement-total_time / lwa_measurement-total_executions. WRITE: 'Average time:', l_average_time, 'ms'. ELSE. WRITE: lwa_measurement-total_time, 'ms'. ENDIF. ENDLOOP. endmethod. method SET_CLOCK_RESOLUTION. CASE pi_clock_resolution. WHEN e_clock_resolution-low. SET RUN TIME CLOCK RESOLUTION LOW. WHEN e_clock_resolution-high. SET RUN TIME CLOCK RESOLUTION HIGH. ENDCASE. endmethod. method START_MEASUREMENT. FIELD-SYMBOLS: <lwa_measurement> TYPE t_measurement. DATA: l_lines TYPE i, lwa_measurement TYPE t_measurement. READ TABLE measurement_tab ASSIGNING <lwa_measurement> WITH KEY id = pi_id. IF sy-subrc <> 0. DESCRIBE TABLE measurement_tab LINES l_lines. lwa_measurement-position = l_lines + 1. lwa_measurement-id = pi_id. INSERT lwa_measurement INTO TABLE measurement_tab ASSIGNING <lwa_measurement>. ENDIF. GET RUN TIME FIELD <lwa_measurement>-start_time. endmethod. ENDCLASS.
[ 4871, 575, 41, 6998, 62, 49, 4944, 34694, 62, 11682, 1921, 11335, 10979, 6770, 198, 220, 1171, 198, 220, 2457, 198, 220, 2251, 1171, 764, 198, 198, 11377, 2665, 13, 628, 220, 3858, 25, 198, 220, 220, 220, 309, 62, 5097, 11290, 62, 19535, 3535, 35354, 41876, 327, 406, 49494, 352, 764, 198, 220, 3858, 25, 198, 220, 220, 220, 309, 62, 26288, 31519, 62, 49058, 41876, 327, 406, 49494, 352, 764, 198, 220, 3858, 25, 198, 220, 220, 220, 309, 62, 34694, 62, 49058, 41876, 327, 406, 49494, 352, 764, 198, 220, 3858, 25, 198, 220, 220, 220, 309, 62, 11682, 1921, 11335, 10979, 62, 2389, 41876, 269, 406, 49494, 2026, 764, 628, 220, 38491, 25, 198, 220, 220, 220, 347, 43312, 3963, 412, 62, 5097, 11290, 62, 19535, 3535, 35354, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 46663, 41876, 309, 62, 5097, 11290, 62, 19535, 3535, 35354, 26173, 8924, 705, 16, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 34677, 41876, 309, 62, 5097, 11290, 62, 19535, 3535, 35354, 26173, 8924, 705, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 412, 62, 5097, 11290, 62, 19535, 3535, 35354, 764, 198, 220, 38491, 25, 198, 220, 220, 220, 347, 43312, 3963, 412, 62, 26288, 31519, 62, 49058, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40383, 41876, 309, 62, 26288, 31519, 62, 49058, 26173, 8924, 705, 16, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10863, 31300, 20151, 41876, 309, 62, 26288, 31519, 62, 49058, 26173, 8924, 705, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 412, 62, 26288, 31519, 62, 49058, 764, 198, 220, 38491, 25, 198, 220, 220, 220, 347, 43312, 3963, 412, 62, 34694, 62, 49058, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35683, 41876, 309, 62, 34694, 62, 49058, 26173, 8924, 705, 16, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 5959, 11879, 41876, 309, 62, 34694, 62, 49058, 26173, 8924, 705, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 412, 62, 34694, 62, 49058, 764, 628, 220, 1398, 12, 24396, 82, 25823, 62, 5097, 11290, 62, 19535, 3535, 35354, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 11901, 62, 5097, 11290, 62, 19535, 3535, 35354, 2099, 309, 62, 5097, 11290, 62, 19535, 3535, 35354, 764, 198, 220, 5050, 30301, 1503, 62, 11682, 1921, 11335, 10979, 764, 198, 220, 5050, 33303, 62, 11682, 1921, 11335, 10979, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 11901, 62, 2389, 2099, 309, 62, 11682, 1921, 11335, 10979, 62, 2389, 764, 198, 220, 5050, 23578, 62, 11682, 1921, 11335, 10979, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 11901, 62, 2389, 2099, 309, 62, 11682, 1921, 11335, 10979, 62, 2389, 764, 198, 220, 5050, 13954, 31519, 62, 11682, 1921, 11335, 10979, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 11901, 62, 26288, 31519, 62, 49058, 2099, 309, 62, 26288, 31519, 62, 49058, 4277, 412, 62, 26288, 31519, 62, 49058, 12, 32541, 198, 220, 220, 220, 220, 220, 5145, 11901, 62, 34694, 62, 49058, 2099, 309, 62, 34694, 62, 49058, 4277, 412, 62, 34694, 62, 49058, 12, 50, 5883, 764, 198, 24326, 2665, 13, 198, 19734, 2665, 13, 628, 220, 3858, 25, 198, 220, 220, 220, 347, 43312, 3963, 309, 62, 11682, 1921, 11335, 10979, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 41876, 256, 62, 1326, 5015, 434, 62, 312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 923, 62, 2435, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 62, 2435, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2472, 62, 2435, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2472, 62, 18558, 3508, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2292, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 309, 62, 11682, 1921, 11335, 10979, 764, 198, 220, 3858, 25, 198, 220, 220, 220, 256, 62, 1326, 5015, 434, 62, 8658, 41876, 311, 9863, 1961, 43679, 3963, 256, 62, 1326, 5015, 434, 13315, 4725, 33866, 8924, 35374, 4686, 764, 628, 220, 1366, 11948, 1921, 11335, 10979, 62, 5603, 33, 2099, 309, 62, 11682, 1921, 11335, 10979, 62, 5603, 33, 764, 628, 220, 5050, 36255, 18973, 62, 26288, 31519, 62, 32541, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 11901, 62, 34694, 62, 49058, 2099, 309, 62, 34694, 62, 49058, 4277, 412, 62, 34694, 62, 49058, 12, 50, 5883, 764, 198, 220, 5050, 36255, 18973, 62, 26288, 31519, 62, 10761, 31300, 20151, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 11901, 62, 34694, 62, 49058, 2099, 309, 62, 34694, 62, 49058, 4277, 412, 62, 34694, 62, 49058, 12, 50, 5883, 764, 198, 10619, 31631, 13, 628, 198, 198, 31631, 575, 41, 6998, 62, 49, 4944, 34694, 62, 11682, 1921, 11335, 10979, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 2446, 30301, 1503, 62, 11682, 1921, 11335, 10979, 13, 198, 220, 220, 220, 4526, 10913, 44011, 25, 15558, 62, 8658, 13, 198, 220, 886, 24396, 13, 628, 198, 220, 2446, 13954, 31519, 62, 11682, 1921, 11335, 10979, 13, 198, 220, 220, 220, 42001, 31028, 62, 13812, 62, 14171, 13, 198, 220, 220, 220, 220, 220, 42099, 304, 62, 13812, 62, 14171, 12, 5239, 13, 198, 220, 220, 220, 220, 220, 220, 220, 42815, 337, 36252, 31904, 62, 13812, 62, 5239, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7788, 15490, 2751, 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,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_EXT_SYSTEM redefinition . private section. ENDCLASS. CLASS ZCL_AIM_TMT_ADAPTER IMPLEMENTATION. METHOD get_task_from_ext_system. * Data declarations match the external API's types. * Unfortunately, those developers seem not to care about proper domains DATA lv_title_tmt TYPE char100. DATA lv_severity_tmt TYPE char1. DATA lv_description_tmt TYPE string. DATA lv_state_tmt TYPE char1. DATA lv_processor_tmt TYPE string. CONSTANTS co_state_tmt_not_exists TYPE char1 VALUE 'Ö'. DATA lv_ticket_no_tmt TYPE char10. lv_ticket_no_tmt = is_ext_reference-external_id. "An unnecessary move bites the dust CALL FUNCTION 'ZAIM_GET_TASK_TMT' EXPORTING iv_ticket_no = lv_ticket_no_tmt IMPORTING ev_title = lv_title_tmt ev_severity = lv_severity_tmt ev_description = lv_description_tmt ev_state = lv_state_tmt ev_processor = lv_processor_tmt. IF lv_state_tmt NE co_state_tmt_not_exists. ev_exists = abap_true. ev_title = lv_title_tmt. ev_description = lv_description_tmt. * translate TMT-severity to AIM priority CASE lv_severity_tmt. WHEN 'V'. ev_priority = yif_aim_task_constants=>priority-critical. WHEN 'H'. ev_priority = yif_aim_task_constants=>priority-high. WHEN 'M'. ev_priority = yif_aim_task_constants=>priority-medium. WHEN 'L'. ev_priority = yif_aim_task_constants=>priority-low. WHEN OTHERS. "must not occur => mapping error ASSERT 1 = 0. ENDCASE. * translate status values to AIM CASE lv_state_tmt. WHEN 1. ev_status = yif_aim_task_constants=>status-new. WHEN 2. ev_status = yif_aim_task_constants=>status-in_progress. WHEN 3. ev_status = yif_aim_task_constants=>status-finished. WHEN 4. ev_status = yif_aim_task_constants=>status-reverted. WHEN OTHERS. "must not occur => mapping error ASSERT 1 = 0. ENDCASE. * map the assignee DATA lv_assignee TYPE yaim_task_assignee. IF lv_processor_tmt IS NOT INITIAL. ev_assignee = map_full_name_to_user( lv_processor_tmt ). ENDIF. else. ev_exists = abap_false. endif. ENDMETHOD. ENDCLASS.
[ 4871, 1168, 5097, 62, 32, 3955, 62, 51, 13752, 62, 2885, 29485, 6770, 198, 220, 1171, 198, 220, 10639, 1780, 422, 1168, 5097, 62, 32, 3955, 62, 6242, 18601, 62, 13918, 62, 10468, 3535, 62, 2885, 29485, 198, 220, 2457, 198, 220, 2251, 1171, 764, 198, 198, 11377, 2665, 13, 198, 24326, 2665, 13, 628, 220, 5050, 17151, 62, 51, 1921, 42, 62, 10913, 2662, 62, 13918, 62, 23060, 25361, 198, 220, 220, 220, 34087, 17750, 764, 198, 19734, 2665, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 32, 3955, 62, 51, 13752, 62, 2885, 29485, 30023, 2538, 10979, 6234, 13, 628, 198, 49273, 651, 62, 35943, 62, 6738, 62, 2302, 62, 10057, 13, 198, 9, 220, 220, 220, 6060, 31713, 2872, 262, 7097, 7824, 338, 3858, 13, 198, 9, 220, 220, 220, 8989, 11, 883, 6505, 1283, 407, 284, 1337, 546, 1774, 18209, 198, 220, 42865, 300, 85, 62, 7839, 62, 83, 16762, 41876, 1149, 3064, 13, 198, 220, 42865, 300, 85, 62, 28116, 414, 62, 83, 16762, 41876, 1149, 16, 13, 198, 220, 42865, 300, 85, 62, 11213, 62, 83, 16762, 41876, 4731, 13, 198, 220, 42865, 300, 85, 62, 5219, 62, 83, 16762, 41876, 1149, 16, 13, 198, 220, 42865, 300, 85, 62, 41341, 62, 83, 16762, 41876, 4731, 13, 628, 220, 7102, 2257, 1565, 4694, 763, 62, 5219, 62, 83, 16762, 62, 1662, 62, 1069, 1023, 41876, 1149, 16, 26173, 8924, 705, 127, 244, 4458, 628, 220, 42865, 300, 85, 62, 43350, 62, 3919, 62, 83, 16762, 41876, 1149, 940, 13, 198, 220, 300, 85, 62, 43350, 62, 3919, 62, 83, 16762, 796, 318, 62, 2302, 62, 35790, 12, 22615, 62, 312, 13, 366, 2025, 13114, 1445, 26081, 262, 8977, 628, 220, 42815, 29397, 4177, 2849, 705, 34892, 3955, 62, 18851, 62, 51, 1921, 42, 62, 51, 13752, 6, 198, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 21628, 62, 43350, 62, 3919, 220, 220, 796, 300, 85, 62, 43350, 62, 3919, 62, 83, 16762, 198, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 819, 62, 7839, 220, 220, 220, 220, 220, 220, 796, 300, 85, 62, 7839, 62, 83, 16762, 198, 220, 220, 220, 220, 220, 819, 62, 28116, 414, 220, 220, 220, 796, 300, 85, 62, 28116, 414, 62, 83, 16762, 198, 220, 220, 220, 220, 220, 819, 62, 11213, 796, 300, 85, 62, 11213, 62, 83, 16762, 198, 220, 220, 220, 220, 220, 819, 62, 5219, 220, 220, 220, 220, 220, 220, 796, 300, 85, 62, 5219, 62, 83, 16762, 198, 220, 220, 220, 220, 220, 819, 62, 41341, 220, 220, 796, 300, 85, 62, 41341, 62, 83, 16762, 13, 628, 220, 16876, 300, 85, 62, 5219, 62, 83, 16762, 10635, 763, 62, 5219, 62, 83, 16762, 62, 1662, 62, 1069, 1023, 13, 628, 220, 220, 220, 819, 62, 1069, 1023, 796, 450, 499, 62, 7942, 13, 198, 220, 220, 220, 819, 62, 7839, 796, 300, 85, 62, 7839, 62, 83, 16762, 13, 198, 220, 220, 220, 819, 62, 11213, 796, 300, 85, 62, 11213, 62, 83, 16762, 13, 198, 198, 9, 220, 15772, 309, 13752, 12, 28116, 414, 284, 317, 3955, 8475, 198, 220, 220, 220, 42001, 300, 85, 62, 28116, 414, 62, 83, 16762, 13, 198, 220, 220, 220, 220, 220, 42099, 705, 53, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 49336, 796, 331, 361, 62, 1385, 62, 35943, 62, 9979, 1187, 14804, 49336, 12, 34666, 13, 198, 220, 220, 220, 220, 220, 42099, 705, 39, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 49336, 796, 331, 361, 62, 1385, 62, 35943, 62, 9979, 1187, 14804, 49336, 12, 8929, 13, 198, 220, 220, 220, 220, 220, 42099, 705, 44, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 49336, 796, 331, 361, 62, 1385, 62, 35943, 62, 9979, 1187, 14804, 49336, 12, 24132, 13, 198, 220, 220, 220, 220, 220, 42099, 705, 43, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 49336, 796, 331, 361, 62, 1385, 62, 35943, 62, 9979, 1187, 14804, 49336, 12, 9319, 13, 198, 220, 220, 220, 220, 220, 42099, 440, 4221, 4877, 13, 198, 220, 220, 220, 220, 220, 220, 220, 366, 27238, 407, 3051, 5218, 16855, 4049, 198, 220, 220, 220, 220, 220, 220, 220, 24994, 17395, 352, 796, 657, 13, 198, 220, 220, 220, 23578, 34, 11159, 13, 198, 198, 9, 220, 15772, 3722, 3815, 284, 317, 3955, 198, 220, 220, 220, 42001, 300, 85, 62, 5219, 62, 83, 16762, 13, 198, 220, 220, 220, 220, 220, 42099, 352, 13, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 13376, 796, 331, 361, 62, 1385, 62, 35943, 62, 9979, 1187, 14804, 13376, 12, 3605, 13, 198, 220, 220, 220, 220, 220, 42099, 362, 13, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 13376, 796, 331, 361, 62, 1385, 62, 35943, 62, 9979, 1187, 14804, 13376, 12, 259, 62, 33723, 13, 198, 220, 220, 220, 220, 220, 42099, 513, 13, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 13376, 796, 331, 361, 62, 1385, 62, 35943, 62, 9979, 1187, 14804, 13376, 12, 43952, 13, 198, 220, 220, 220, 220, 220, 42099, 604, 13, 198, 220, 220, 220, 220, 220, 220, 220, 819, 62, 13376, 796, 331, 361, 62, 1385, 62, 35943, 62, 9979, 1187, 14804, 13376, 12, 260, 13658, 13, 198, 220, 220, 220, 220, 220, 42099, 440, 4221, 4877, 13, 198, 220, 220, 220, 220, 220, 220, 220, 366, 27238, 407, 3051, 5218, 16855, 4049, 198, 220, 220, 220, 220, 220, 220, 220, 24994, 17395, 352, 796, 657, 13, 198, 220, 220, 220, 23578, 34, 11159, 13, 198, 198, 9, 220, 3975, 262, 8333, 1453, 198, 220, 220, 220, 42865, 300, 85, 62, 562, 570, 1453, 41876, 331, 1385, 62, 35943, 62, 562, 570, 1453, 13, 198, 220, 220, 220, 16876, 300, 85, 62, 41341, 62, 83, 16762, 3180, 5626, 3268, 2043, 12576, 13, 198, 220, 220, 220, 819, 62, 562, 570, 1453, 796, 3975, 62, 12853, 62, 3672, 62, 1462, 62, 7220, 7, 300, 85, 62, 41341, 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,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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 ]
CLASS zcl_abapgit_dependencies DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. TYPES: BEGIN OF ty_tadir, pgmid TYPE tadir-pgmid, object TYPE tadir-object, obj_name TYPE tadir-obj_name, devclass TYPE tadir-devclass, korrnum TYPE tadir-korrnum, path TYPE string, END OF ty_tadir . TYPES: ty_tadir_tt TYPE STANDARD TABLE OF ty_tadir WITH DEFAULT KEY . CLASS-METHODS resolve CHANGING !ct_tadir TYPE ty_tadir_tt RAISING zcx_abapgit_exception . PRIVATE SECTION. TYPES: BEGIN OF ty_dependency, depname TYPE dd02l-tabname, deptyp TYPE c LENGTH 4, deplocal TYPE dd02l-as4local, refname TYPE dd02l-tabname, reftyp TYPE c LENGTH 4, kind TYPE c LENGTH 1, END OF ty_dependency . TYPES: tty_dedenpency TYPE STANDARD TABLE OF ty_dependency WITH NON-UNIQUE DEFAULT KEY . TYPES: BEGIN OF ty_item, obj_type TYPE tadir-object, obj_name TYPE tadir-obj_name, devclass TYPE devclass, END OF ty_item . CLASS-METHODS resolve_ddic CHANGING !ct_tadir TYPE ty_tadir_tt RAISING zcx_abapgit_exception . CLASS-METHODS get_ddls_dependencies IMPORTING iv_ddls_name TYPE tadir-obj_name RETURNING VALUE(rt_dependency) TYPE tty_dedenpency . CLASS-METHODS resolve_packages CHANGING ct_tadir TYPE zcl_abapgit_dependencies=>ty_tadir_tt. ENDCLASS. CLASS zcl_abapgit_dependencies IMPLEMENTATION. METHOD get_ddls_dependencies. TYPES: BEGIN OF ty_ddls_name. INCLUDE TYPE ddsymtab. TYPES: END OF ty_ddls_name. TYPES: tty_ddls_names TYPE STANDARD TABLE OF ty_ddls_name WITH NON-UNIQUE DEFAULT KEY. DATA: lt_ddls_name TYPE tty_ddls_names, ls_ddls_name LIKE LINE OF lt_ddls_name. ls_ddls_name-name = iv_ddls_name. INSERT ls_ddls_name INTO TABLE lt_ddls_name. PERFORM ('DDLS_GET_DEP') IN PROGRAM ('RADMASDL') TABLES lt_ddls_name rt_dependency. ENDMETHOD. METHOD resolve. DATA: lv_tabclass TYPE dd02l-tabclass. FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF ct_tadir. * misuse field KORRNUM to fix deletion sequence LOOP AT ct_tadir ASSIGNING <ls_tadir>. CASE <ls_tadir>-object. WHEN 'DEVC'. <ls_tadir>-korrnum = '9990'. WHEN 'IATU'. <ls_tadir>-korrnum = '5500'. WHEN 'IARP'. <ls_tadir>-korrnum = '5510'. WHEN 'IASP'. <ls_tadir>-korrnum = '5520'. WHEN 'SUSC'. <ls_tadir>-korrnum = '5000'. WHEN 'TTYP' OR 'TABL' OR 'VIEW'. SELECT SINGLE tabclass FROM dd02l INTO lv_tabclass WHERE tabname = <ls_tadir>-obj_name AND as4local = 'A' AND as4vers = '0000'. IF sy-subrc = 0 AND lv_tabclass = 'APPEND'. * delete append structures before database tables <ls_tadir>-korrnum = '6500'. ELSE. <ls_tadir>-korrnum = '7000'. ENDIF. WHEN 'DTEL'. <ls_tadir>-korrnum = '8000'. WHEN 'PARA'. * PARA after DTEL <ls_tadir>-korrnum = '8100'. WHEN 'DOMA'. <ls_tadir>-korrnum = '9000'. WHEN 'PROG'. * delete includes after main programs SELECT COUNT(*) FROM reposrc WHERE progname = <ls_tadir>-obj_name AND r3state = 'A' AND subc = 'I'. IF sy-subrc = 0. <ls_tadir>-korrnum = '2000'. ELSE. <ls_tadir>-korrnum = '1000'. ENDIF. WHEN 'IDOC'. <ls_tadir>-korrnum = '2000'. WHEN 'IEXT'. <ls_tadir>-korrnum = '1500'. WHEN OTHERS. <ls_tadir>-korrnum = '1000'. ENDCASE. ENDLOOP. resolve_ddic( CHANGING ct_tadir = ct_tadir ). resolve_packages( CHANGING ct_tadir = ct_tadir ). SORT ct_tadir BY korrnum ASCENDING. ENDMETHOD. METHOD resolve_ddic. * this will make sure the deletion sequence of structures/tables work * in case they have dependencies with .INCLUDE TYPES: BEGIN OF ty_edge, from TYPE ty_item, to TYPE ty_item, END OF ty_edge. DATA: lt_nodes TYPE TABLE OF ty_item, lt_edges TYPE TABLE OF ty_edge, lt_findstrings TYPE TABLE OF rsfind, lv_plus TYPE i VALUE 1, lv_find_obj_cls TYPE euobj-id, lv_index TYPE i, lv_before TYPE i, lt_founds TYPE TABLE OF rsfindlst, lt_scope TYPE STANDARD TABLE OF seu_obj, lt_dependency TYPE tty_dedenpency. FIELD-SYMBOLS: <ls_tadir_ddls> TYPE ty_tadir, <ls_dependency> TYPE ty_dependency, <ls_tadir_dependent> TYPE ty_tadir, <ls_tadir> LIKE LINE OF ct_tadir, <ls_edge> LIKE LINE OF lt_edges, <ls_found> LIKE LINE OF lt_founds, <ls_node> LIKE LINE OF lt_nodes. * build nodes LOOP AT ct_tadir ASSIGNING <ls_tadir> WHERE object = 'TABL' OR object = 'TTYP'. APPEND INITIAL LINE TO lt_nodes ASSIGNING <ls_node>. <ls_node>-obj_name = <ls_tadir>-obj_name. <ls_node>-obj_type = <ls_tadir>-object. ENDLOOP. APPEND 'TABL' TO lt_scope. APPEND 'STRU' TO lt_scope. APPEND 'TTYP' TO lt_scope. * build edges LOOP AT lt_nodes ASSIGNING <ls_node>. CLEAR lt_findstrings. APPEND <ls_node>-obj_name TO lt_findstrings. lv_find_obj_cls = <ls_node>-obj_type. CALL FUNCTION 'RS_EU_CROSSREF' EXPORTING i_find_obj_cls = lv_find_obj_cls TABLES i_findstrings = lt_findstrings o_founds = lt_founds i_scope_object_cls = lt_scope EXCEPTIONS not_executed = 1 not_found = 2 illegal_object = 3 no_cross_for_this_object = 4 batch = 5 batchjob_error = 6 wrong_type = 7 object_not_exist = 8 OTHERS = 9. IF sy-subrc <> 0. CONTINUE. ENDIF. LOOP AT lt_founds ASSIGNING <ls_found>. APPEND INITIAL LINE TO lt_edges ASSIGNING <ls_edge>. <ls_edge>-from = <ls_node>. <ls_edge>-to-obj_name = <ls_found>-object. CASE <ls_found>-object_cls. WHEN 'DS' OR 'DT'. <ls_edge>-to-obj_type = 'TABL'. WHEN 'DA'. <ls_edge>-to-obj_type = 'TTYP'. WHEN OTHERS. zcx_abapgit_exception=>raise( 'resolve_ddic, unknown object_cls' ). ENDCASE. ENDLOOP. ENDLOOP. * build DDLS edges LOOP AT ct_tadir ASSIGNING <ls_tadir_ddls> WHERE object = 'DDLS'. CLEAR: lt_dependency. APPEND INITIAL LINE TO lt_nodes ASSIGNING <ls_node>. <ls_node>-obj_name = <ls_tadir_ddls>-obj_name. <ls_node>-obj_type = <ls_tadir_ddls>-object. lt_dependency = get_ddls_dependencies( <ls_tadir_ddls>-obj_name ). LOOP AT lt_dependency ASSIGNING <ls_dependency> WHERE deptyp = 'DDLS' AND refname = <ls_tadir_ddls>-obj_name. READ TABLE ct_tadir ASSIGNING <ls_tadir_dependent> WITH KEY pgmid = 'R3TR' object = 'DDLS' obj_name = <ls_dependency>-depname BINARY SEARCH. CHECK sy-subrc = 0. APPEND INITIAL LINE TO lt_edges ASSIGNING <ls_edge>. <ls_edge>-from = <ls_node>. <ls_edge>-to-obj_name = <ls_dependency>-depname. <ls_edge>-to-obj_type = 'DDLS'. ENDLOOP. ENDLOOP. DO. lv_before = lines( lt_nodes ). LOOP AT lt_nodes ASSIGNING <ls_node>. lv_index = sy-tabix. READ TABLE lt_edges WITH KEY from-obj_name = <ls_node>-obj_name from-obj_type = <ls_node>-obj_type TRANSPORTING NO FIELDS. IF sy-subrc <> 0. LOOP AT ct_tadir ASSIGNING <ls_tadir> WHERE obj_name = <ls_node>-obj_name AND object = <ls_node>-obj_type. <ls_tadir>-korrnum = <ls_tadir>-korrnum + lv_plus. CONDENSE <ls_tadir>-korrnum. ENDLOOP. DELETE lt_edges WHERE to-obj_name = <ls_node>-obj_name AND to-obj_type = <ls_node>-obj_type. DELETE lt_nodes INDEX lv_index. EXIT. " make sure the sequence is fixed ENDIF. ENDLOOP. IF lv_before = lines( lt_nodes ). EXIT. ENDIF. lv_plus = lv_plus + 1. ENDDO. ENDMETHOD. "resolve_ddic METHOD resolve_packages. DATA: lt_subpackages TYPE zif_abapgit_sap_package=>ty_devclass_tt. FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF ct_tadir, <lv_subpackage> LIKE LINE OF lt_subpackages, <ls_tadir_subpackage> LIKE LINE OF ct_tadir. " List subpackage before corresponding superpackage LOOP AT ct_tadir ASSIGNING <ls_tadir> WHERE object = 'DEVC'. lt_subpackages = zcl_abapgit_factory=>get_sap_package( |{ <ls_tadir>-obj_name }| )->list_subpackages( ). LOOP AT lt_subpackages ASSIGNING <lv_subpackage>. READ TABLE ct_tadir ASSIGNING <ls_tadir_subpackage> WITH KEY object = 'DEVC' obj_name = <lv_subpackage>. IF sy-subrc = 0. <ls_tadir_subpackage>-korrnum = condense( |{ <ls_tadir_subpackage>-korrnum - 1 }| ). ENDIF. ENDLOOP. ENDLOOP. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 45841, 3976, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 25261, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 1259, 62, 83, 324, 343, 11, 198, 220, 220, 220, 220, 220, 220, 220, 23241, 13602, 220, 220, 220, 41876, 36264, 343, 12, 6024, 13602, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2134, 220, 220, 41876, 36264, 343, 12, 15252, 11, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 62, 3672, 41876, 36264, 343, 12, 26801, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1614, 4871, 41876, 36264, 343, 12, 7959, 4871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 479, 38890, 22510, 220, 41876, 36264, 343, 12, 74, 38890, 22510, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3108, 220, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 83, 324, 343, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 1259, 62, 83, 324, 343, 62, 926, 41876, 49053, 9795, 43679, 3963, 1259, 62, 83, 324, 343, 13315, 5550, 38865, 35374, 764, 628, 220, 220, 220, 42715, 12, 49273, 50, 10568, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 310, 62, 83, 324, 343, 41876, 1259, 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, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 1259, 62, 45841, 1387, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1207, 3672, 220, 41876, 49427, 2999, 75, 12, 8658, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 390, 457, 4464, 220, 220, 41876, 269, 406, 49494, 604, 11, 198, 220, 220, 220, 220, 220, 220, 220, 38316, 4374, 41876, 49427, 2999, 75, 12, 292, 19, 12001, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1006, 3672, 220, 41876, 49427, 2999, 75, 12, 8658, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 302, 701, 4464, 220, 220, 41876, 269, 406, 49494, 604, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1611, 220, 220, 220, 220, 41876, 269, 406, 49494, 352, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 45841, 1387, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 256, 774, 62, 9395, 268, 79, 1387, 41876, 49053, 9795, 43679, 3963, 1259, 62, 45841, 1387, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13315, 44521, 12, 4944, 33866, 8924, 5550, 38865, 35374, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 1259, 62, 9186, 11, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 62, 4906, 41876, 36264, 343, 12, 15252, 11, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 62, 3672, 41876, 36264, 343, 12, 26801, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1614, 4871, 41876, 1614, 4871, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 9186, 764, 628, 220, 220, 220, 42715, 12, 49273, 50, 10568, 62, 1860, 291, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 310, 62, 83, 324, 343, 41876, 1259, 62, 83, 324, 343, 62, 926, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 651, 62, 1860, 7278, 62, 45841, 3976, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 1860, 7278, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 36264, 343, 12, 26801, 62, 3672, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 45841, 1387, 8, 41876, 256, 774, 62, 9395, 268, 79, 1387, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 10568, 62, 43789, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 269, 83, 62, 83, 324, 343, 41876, 1976, 565, 62, 397, 499, 18300, 62, 45841, 3976, 14804, 774, 62, 83, 324, 343, 62, 926, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 45841, 3976, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 651, 62, 1860, 7278, 62, 45841, 3976, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 347, 43312, 3963, 1259, 62, 1860, 7278, 62, 3672, 13, 198, 220, 220, 220, 220, 220, 220, 220, 3268, 5097, 52, 7206, 41876, 49427, 37047, 8658, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 23578, 3963, 1259, 62, 1860, 7278, 62, 3672, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 256, 774, 62, 1860, 7278, 62, 14933, 41876, 49053, 9795, 43679, 3963, 1259, 62, 1860, 7278, 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, 13315, 44521, 12, 4944, 33866, 8924, 5550, 38865, 35374, 13, 628, 220, 220, 220, 42865, 25, 300, 83, 62, 1860, 7278, 62, 3672, 41876, 256, 774, 62, 1860, 7278, 62, 14933, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43979, 62, 1860, 7278, 62, 3672, 34178, 48920, 3963, 300, 83, 62, 1860, 7278, 62, 3672, 13, 628, 220, 220, 220, 43979, 62, 1860, 7278, 62, 3672, 12, 3672, 796, 21628,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, 1, 1, 1, 1, 1, 1 ]
class ltcl_text2tab_utils_test definition for testing final risk level harmless duration short. private section. constants c_tab like cl_abap_char_utilities=>horizontal_tab value cl_abap_char_utilities=>horizontal_tab. constants c_crlf like cl_abap_char_utilities=>cr_lf value cl_abap_char_utilities=>cr_lf. constants c_lf like cl_abap_char_utilities=>newline value cl_abap_char_utilities=>newline. * ==== TESTING === methods validate_date_format_spec for testing. methods function_exists for testing. methods get_safe_struc_descr for testing raising zcx_text2tab_error. methods describe_struct for testing raising zcx_text2tab_error. methods describe_struct_with_descr for testing raising zcx_text2tab_error. methods describe_struct_ignoring for testing raising zcx_text2tab_error. methods describe_struct_deep for testing raising zcx_text2tab_error. methods break_to_lines for testing. methods build_rename_map for testing. methods create_standard_table_of for testing raising zcx_text2tab_error. methods parse_deep_address for testing raising zcx_text2tab_error. methods get_struc_field_value_by_name for testing raising zcx_text2tab_error. methods check_version_fits for testing. methods check_version_fits_w_pre for testing. endclass. ********************************************************************** * Implementation ********************************************************************** class ltcl_text2tab_utils_test implementation. method build_rename_map. data lx type ref to zcx_text2tab_error. try. clear lx. zcl_text2tab_utils=>build_rename_map( 1234 ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>assert_equals( act = lx->code exp = 'WY' ). endtry. cl_abap_unit_assert=>assert_not_initial( act = lx ). try. clear lx. zcl_text2tab_utils=>build_rename_map( 'abc' ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>assert_equals( act = lx->code exp = 'WR' ). endtry. cl_abap_unit_assert=>assert_not_initial( act = lx ). data lt_fields type zcl_text2tab_utils=>tt_field_name_map. data lt_map_act type zcl_text2tab_utils=>tt_field_name_map. data lt_map_exp type zcl_text2tab_utils=>tt_field_name_map. field-symbols <map> like line of lt_map_exp. append initial line to lt_fields assigning <map>. <map>-from = 'some_field'. <map>-to = 'tstring'. append initial line to lt_fields assigning <map>. <map>-from = 'some_field2'. <map>-to = 'tstring2'. append initial line to lt_map_exp assigning <map>. <map>-from = 'SOME_FIELD'. <map>-to = 'TSTRING'. append initial line to lt_map_exp assigning <map>. <map>-from = 'SOME_FIELD2'. <map>-to = 'TSTRING2'. " Table based try. lt_map_act = zcl_text2tab_utils=>build_rename_map( lt_fields ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>fail( lx->get_text( ) ). endtry. cl_abap_unit_assert=>assert_equals( act = lt_map_act exp = lt_map_exp ). " string based data lv_fields type string. lv_fields = 'some_field:tstring;some_field2:tstring2;;'. try. lt_map_act = zcl_text2tab_utils=>build_rename_map( lv_fields ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>fail( lx->get_text( ) ). endtry. cl_abap_unit_assert=>assert_equals( act = lt_map_act exp = lt_map_exp ). endmethod. method break_to_lines. data: lt_act type string_table, lt_exp type string_table. append 'line1' to lt_exp. append 'line2' to lt_exp. lt_act = zcl_text2tab_utils=>break_to_lines( i_text = 'line1' && c_crlf && 'line2' i_begin_comment = space ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = lt_exp ). lt_act = zcl_text2tab_utils=>break_to_lines( i_text = 'line1' && c_lf && 'line2' i_begin_comment = space ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = lt_exp ). " with comment line clear lt_exp. append 'not a comment 1' to lt_exp. append 'not a comment 2' to lt_exp. lt_act = zcl_text2tab_utils=>break_to_lines( i_text = '*a comment' && c_lf && 'not a comment 1' && c_lf && 'not a comment 2' && c_lf && cl_abap_char_utilities=>newline i_begin_comment = '*' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = lt_exp ). endmethod. " break_to_lines. method get_safe_struc_descr. data: ls_dummy type abap_compdescr, lt_dummy type standard table of abap_compdescr, lo_td_exp type ref to cl_abap_structdescr, lo_td_act type ref to cl_abap_structdescr, lx type ref to zcx_text2tab_error. lo_td_exp ?= cl_abap_typedescr=>describe_by_data( ls_dummy ). " Positive lo_td_act = zcl_text2tab_utils=>get_safe_struc_descr( ls_dummy ). cl_abap_unit_assert=>assert_equals( act = lo_td_act->absolute_name exp = lo_td_exp->absolute_name ). lo_td_act = zcl_text2tab_utils=>get_safe_struc_descr( lt_dummy ). cl_abap_unit_assert=>assert_equals( act = lo_td_act->absolute_name exp = lo_td_exp->absolute_name ). " Positive with class lo_td_act = zcl_text2tab_utils=>get_safe_struc_descr( lo_td_exp ). cl_abap_unit_assert=>assert_equals( act = lo_td_act->absolute_name exp = lo_td_exp->absolute_name ). lo_td_act = zcl_text2tab_utils=>get_safe_struc_descr( cl_abap_tabledescr=>create( lo_td_exp ) ). cl_abap_unit_assert=>assert_equals( act = lo_td_act->absolute_name exp = lo_td_exp->absolute_name ). " Negative try. lo_td_act = zcl_text2tab_utils=>get_safe_struc_descr( 'ABC' ). cl_abap_unit_assert=>fail( ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>assert_equals( exp = 'PE' act = lx->code ). endtry. " Negative with class try. lo_td_act = zcl_text2tab_utils=>get_safe_struc_descr( me ). cl_abap_unit_assert=>fail( ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>assert_equals( exp = 'PE' act = lx->code ). endtry. endmethod. "get_safe_struc_descr method validate_date_format_spec. data: lx type ref to zcx_text2tab_error, lv_date_format type zcl_text2tab_parser=>ty_date_format. do 3 times. case sy-index. when 1. lv_date_format = 'XXX'. when 2. lv_date_format = 'DM'. when 3. lv_date_format = 'DMY='. when 4. lv_date_format = 'DMM-'. endcase. try. zcl_text2tab_utils=>validate_date_format_spec( lv_date_format ). cl_abap_unit_assert=>fail( ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>assert_equals( act = lx->code exp = 'UD' ). " Unsupported date format endtry. enddo. endmethod. "validate_date_format_spec method function_exists. data lv_act type abap_bool. lv_act = zcl_text2tab_utils=>function_exists( 'CONVERSION_EXIT_?????_OUTPUT' ). cl_abap_unit_assert=>assert_equals( act = lv_act exp = abap_false ). lv_act = zcl_text2tab_utils=>function_exists( 'CONVERSION_EXIT_ALPHA_OUTPUT' ). cl_abap_unit_assert=>assert_equals( act = lv_act exp = abap_true ). " cached lv_act = zcl_text2tab_utils=>function_exists( 'CONVERSION_EXIT_ALPHA_OUTPUT' ). cl_abap_unit_assert=>assert_equals( act = lv_act exp = abap_true ). endmethod. method describe_struct. types: begin of lty_dummy, talpha type veri_alpha, end of lty_dummy. data ld_struc type ref to cl_abap_structdescr. data ls_dummy type lty_dummy. data lt_descr type zcl_text2tab_utils=>tt_comp_descr. data lx type ref to zcx_text2tab_error. field-symbols <c> like line of lt_descr. ld_struc ?= cl_abap_structdescr=>describe_by_data( ls_dummy ). lt_descr = zcl_text2tab_utils=>describe_struct( i_struc = ld_struc i_ignore_nonflat = abap_false ). cl_abap_unit_assert=>assert_equals( act = lines( lt_descr ) exp = 1 ). read table lt_descr assigning <c> index 1. cl_abap_unit_assert=>assert_equals( act = <c>-name exp = 'TALPHA' ). cl_abap_unit_assert=>assert_equals( act = <c>-edit_mask exp = 'ALPHA' ). cl_abap_unit_assert=>assert_equals( act = <c>-output_length exp = 10 ). " Test 2: fail on non-flat components types: begin of lty_dummy2, tstruc type lty_dummy, end of lty_dummy2. data ls_dummy2 type lty_dummy2. try. ld_struc ?= cl_abap_structdescr=>describe_by_data( ls_dummy2 ). lt_descr = zcl_text2tab_utils=>describe_struct( i_struc = ld_struc i_ignore_nonflat = abap_false ). cl_abap_unit_assert=>fail( ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>assert_equals( act = lx->code exp = 'SF' ). endtry. endmethod. method describe_struct_with_descr. types: begin of lty_dummy, mandt type mandt, char type c length 8, date type datum, end of lty_dummy. data ld_struc type ref to cl_abap_structdescr. data ls_dummy type lty_dummy. data lt_descr type zcl_text2tab_utils=>tt_comp_descr. field-symbols <c> like line of lt_descr. ld_struc ?= cl_abap_structdescr=>describe_by_data( ls_dummy ). lt_descr = zcl_text2tab_utils=>describe_struct( i_struc = ld_struc i_with_descr_in_lang = 'E' ). cl_abap_unit_assert=>assert_equals( act = lines( lt_descr ) exp = 3 ). read table lt_descr assigning <c> index 1. cl_abap_unit_assert=>assert_equals( act = <c>-description exp = 'Client' ). read table lt_descr assigning <c> index 2. cl_abap_unit_assert=>assert_equals( act = <c>-description exp = '' ). read table lt_descr assigning <c> index 3. cl_abap_unit_assert=>assert_equals( act = <c>-description exp = 'Date' ). endmethod. method describe_struct_ignoring. types: begin of lty_dummy, talpha type veri_alpha, tstruc type abap_compdescr, " Deep end of lty_dummy. data ld_struc type ref to cl_abap_structdescr. data ls_dummy type lty_dummy. data lt_descr type zcl_text2tab_utils=>tt_comp_descr. field-symbols <c> like line of lt_descr. ld_struc ?= cl_abap_structdescr=>describe_by_data( ls_dummy ). lt_descr = zcl_text2tab_utils=>describe_struct( i_struc = ld_struc i_ignore_nonflat = abap_true ). cl_abap_unit_assert=>assert_equals( act = lines( lt_descr ) exp = 2 ). read table lt_descr assigning <c> index 1. cl_abap_unit_assert=>assert_equals( act = <c>-name exp = 'TALPHA' ). cl_abap_unit_assert=>assert_equals( act = <c>-edit_mask exp = 'ALPHA' ). cl_abap_unit_assert=>assert_equals( act = <c>-output_length exp = 10 ). cl_abap_unit_assert=>assert_equals( act = <c>-ignore exp = abap_false ). read table lt_descr assigning <c> index 2. cl_abap_unit_assert=>assert_equals( act = <c>-name exp = 'TSTRUC' ). cl_abap_unit_assert=>assert_equals( act = <c>-edit_mask exp = '' ). cl_abap_unit_assert=>assert_equals( act = <c>-output_length exp = 0 ). cl_abap_unit_assert=>assert_equals( act = <c>-ignore exp = abap_true ). endmethod. method describe_struct_deep. types: begin of lty_dummy, talpha type veri_alpha, tstruc type abap_compdescr, " Deep end of lty_dummy. data ld_struc type ref to cl_abap_structdescr. data ls_dummy type lty_dummy. data lt_descr type zcl_text2tab_utils=>tt_comp_descr. field-symbols <c> like line of lt_descr. ld_struc ?= cl_abap_structdescr=>describe_by_data( ls_dummy ). lt_descr = zcl_text2tab_utils=>describe_struct( i_struc = ld_struc i_is_deep = abap_true ). cl_abap_unit_assert=>assert_equals( act = lines( lt_descr ) exp = 2 ). read table lt_descr assigning <c> index 1. cl_abap_unit_assert=>assert_equals( act = <c>-name exp = 'TALPHA' ). cl_abap_unit_assert=>assert_equals( act = <c>-edit_mask exp = 'ALPHA' ). cl_abap_unit_assert=>assert_equals( act = <c>-output_length exp = 10 ). cl_abap_unit_assert=>assert_equals( act = <c>-ignore exp = abap_false ). read table lt_descr assigning <c> index 2. cl_abap_unit_assert=>assert_equals( act = <c>-name exp = 'TSTRUC' ). cl_abap_unit_assert=>assert_equals( act = <c>-edit_mask exp = '' ). cl_abap_unit_assert=>assert_equals( act = <c>-output_length exp = 0 ). cl_abap_unit_assert=>assert_equals( act = <c>-ignore exp = abap_false ). endmethod. method check_version_fits. cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.2' i_required_version = 'v2.2.2' ) ). cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.2' i_required_version = 'v2.1.2' ) ). cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.2' i_required_version = 'v1.0.0' ) ). cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.3.0' i_required_version = 'v2.2.5' ) ). cl_abap_unit_assert=>assert_false( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.1.2' i_required_version = 'v2.2.2' ) ). cl_abap_unit_assert=>assert_false( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v1.0.0' i_required_version = 'v2.2.2' ) ). cl_abap_unit_assert=>assert_false( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.5' i_required_version = 'v2.3.0' ) ). cl_abap_unit_assert=>assert_false( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.2' i_required_version = 'v2.2.3' ) ). cl_abap_unit_assert=>assert_false( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.2' i_required_version = 'v2.2.30' ) ). cl_abap_unit_assert=>assert_false( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.2' i_required_version = 'v2.3.1' ) ). cl_abap_unit_assert=>assert_false( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.2' i_required_version = 'v3.0.0' ) ). cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.3' i_required_version = 'v2.2.2' ) ). cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.2.30' i_required_version = 'v2.2.2' ) ). cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.3.1' i_required_version = 'v2.2.2' ) ). cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v3.0.0' i_required_version = 'v2.2.2' ) ). cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.1.10' i_required_version = 'v2.1.7' ) ). endmethod. method check_version_fits_w_pre. cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.1.10-beta' i_required_version = 'v2.1.7' ) ). cl_abap_unit_assert=>assert_false( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.1.10-beta' i_required_version = 'v2.1.10' ) ). cl_abap_unit_assert=>assert_true( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.1.10-beta' i_required_version = 'v2.1.10-alpha' ) ). cl_abap_unit_assert=>assert_false( zcl_text2tab_utils=>check_version_fits( i_current_version = 'v2.1.10-beta' i_required_version = 'v2.1.10-gamma' ) ). endmethod. method get_struc_field_value_by_name. data lx type ref to zcx_text2tab_error. data: lv_a type string, lv_b type d, begin of ls_dummy, a type string, b type d, end of ls_dummy. ls_dummy-a = 'ABC'. ls_dummy-b = '20190820'. zcl_text2tab_utils=>get_struc_field_value_by_name( exporting i_struc = ls_dummy i_field_name = 'A' importing e_value = lv_a ). cl_abap_unit_assert=>assert_equals( act = lv_a exp = 'ABC' ). zcl_text2tab_utils=>get_struc_field_value_by_name( exporting i_struc = ls_dummy i_field_name = 'B' importing e_value = lv_b ). cl_abap_unit_assert=>assert_equals( act = lv_b exp = '20190820' ). try. zcl_text2tab_utils=>get_struc_field_value_by_name( i_struc = ls_dummy i_field_name = 'C' ). cl_abap_unit_assert=>fail( ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>assert_equals( act = lx->code exp = 'FN' ). endtry. endmethod. method parse_deep_address. data ls_parsed type zcl_text2tab_utils=>ty_deep_address. data lx type ref to zcx_text2tab_error. ls_parsed = zcl_text2tab_utils=>parse_deep_address( 'filename[id=@headid]' ). cl_abap_unit_assert=>assert_equals( act = ls_parsed-location exp = 'filename' ). cl_abap_unit_assert=>assert_equals( act = ls_parsed-key_field exp = 'ID' ). cl_abap_unit_assert=>assert_equals( act = ls_parsed-ref_field exp = 'HEADID' ). cl_abap_unit_assert=>assert_equals( act = ls_parsed-key_value exp = '' ). ls_parsed = zcl_text2tab_utils=>parse_deep_address( 'filename[id=12345]' ). cl_abap_unit_assert=>assert_equals( act = ls_parsed-location exp = 'filename' ). cl_abap_unit_assert=>assert_equals( act = ls_parsed-key_field exp = 'ID' ). cl_abap_unit_assert=>assert_equals( act = ls_parsed-ref_field exp = '' ). cl_abap_unit_assert=>assert_equals( act = ls_parsed-key_value exp = '12345' ). try. zcl_text2tab_utils=>parse_deep_address( 'XYZ' ). cl_abap_unit_assert=>fail( ). catch zcx_text2tab_error into lx. cl_abap_unit_assert=>assert_equals( act = lx->code exp = 'IA' ). endtry. endmethod. method create_standard_table_of. types: begin of lty_dummy, a type c length 1, b type i, end of lty_dummy. data ls_dummy type lty_dummy. data lt_dummy type hashed table of lty_dummy with unique key a. data lr_dref type ref to data. data lo_type type ref to cl_abap_typedescr. data lo_ttype type ref to cl_abap_tabledescr. lr_dref = zcl_text2tab_utils=>create_standard_table_of( ls_dummy ). lo_type = cl_abap_typedescr=>describe_by_data_ref( lr_dref ). cl_abap_unit_assert=>assert_equals( act = lo_type->kind exp = cl_abap_typedescr=>kind_table ). lo_ttype ?= lo_type. cl_abap_unit_assert=>assert_equals( act = lo_ttype->table_kind exp = cl_abap_tabledescr=>tablekind_std ). lr_dref = zcl_text2tab_utils=>create_standard_table_of( lt_dummy ). lo_type = cl_abap_typedescr=>describe_by_data_ref( lr_dref ). cl_abap_unit_assert=>assert_equals( act = lo_type->kind exp = cl_abap_typedescr=>kind_table ). lo_ttype ?= lo_type. cl_abap_unit_assert=>assert_equals( act = lo_ttype->table_kind exp = cl_abap_tabledescr=>tablekind_std ). lr_dref = zcl_text2tab_utils=>create_standard_table_of( cl_abap_typedescr=>describe_by_data( ls_dummy ) ). lo_type = cl_abap_typedescr=>describe_by_data_ref( lr_dref ). cl_abap_unit_assert=>assert_equals( act = lo_type->kind exp = cl_abap_typedescr=>kind_table ). lo_ttype ?= lo_type. cl_abap_unit_assert=>assert_equals( act = lo_ttype->table_kind exp = cl_abap_tabledescr=>tablekind_std ). endmethod. endclass.
[ 4871, 300, 83, 565, 62, 5239, 17, 8658, 62, 26791, 62, 9288, 6770, 198, 220, 329, 4856, 198, 220, 2457, 198, 220, 2526, 1241, 23585, 198, 220, 9478, 1790, 13, 628, 220, 2839, 2665, 13, 628, 220, 220, 220, 38491, 269, 62, 8658, 220, 220, 588, 537, 62, 397, 499, 62, 10641, 62, 315, 2410, 14804, 17899, 38342, 62, 8658, 1988, 537, 62, 397, 499, 62, 10641, 62, 315, 2410, 14804, 17899, 38342, 62, 8658, 13, 198, 220, 220, 220, 38491, 269, 62, 6098, 1652, 220, 588, 537, 62, 397, 499, 62, 10641, 62, 315, 2410, 14804, 6098, 62, 1652, 1988, 537, 62, 397, 499, 62, 10641, 62, 315, 2410, 14804, 6098, 62, 1652, 13, 198, 220, 220, 220, 38491, 269, 62, 1652, 220, 220, 220, 588, 537, 62, 397, 499, 62, 10641, 62, 315, 2410, 14804, 3605, 1370, 1988, 537, 62, 397, 499, 62, 10641, 62, 315, 2410, 14804, 3605, 1370, 13, 198, 198, 9, 796, 18604, 43001, 2751, 24844, 198, 220, 220, 220, 5050, 26571, 62, 4475, 62, 18982, 62, 16684, 329, 4856, 13, 198, 220, 220, 220, 5050, 2163, 62, 1069, 1023, 329, 4856, 13, 198, 220, 220, 220, 5050, 651, 62, 21230, 62, 19554, 66, 62, 20147, 81, 329, 4856, 8620, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 13, 198, 220, 220, 220, 5050, 6901, 62, 7249, 329, 4856, 8620, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 13, 198, 220, 220, 220, 5050, 6901, 62, 7249, 62, 4480, 62, 20147, 81, 329, 4856, 8620, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 13, 198, 220, 220, 220, 5050, 6901, 62, 7249, 62, 570, 3255, 329, 4856, 8620, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 13, 198, 220, 220, 220, 5050, 6901, 62, 7249, 62, 22089, 329, 4856, 8620, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 13, 198, 220, 220, 220, 5050, 2270, 62, 1462, 62, 6615, 329, 4856, 13, 198, 220, 220, 220, 5050, 1382, 62, 918, 480, 62, 8899, 329, 4856, 13, 198, 220, 220, 220, 5050, 2251, 62, 20307, 62, 11487, 62, 1659, 329, 4856, 8620, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 13, 628, 220, 220, 220, 5050, 21136, 62, 22089, 62, 21975, 329, 4856, 8620, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 13, 198, 220, 220, 220, 5050, 651, 62, 19554, 66, 62, 3245, 62, 8367, 62, 1525, 62, 3672, 329, 4856, 8620, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 13, 628, 220, 220, 220, 5050, 2198, 62, 9641, 62, 21013, 329, 4856, 13, 198, 220, 220, 220, 5050, 2198, 62, 9641, 62, 21013, 62, 86, 62, 3866, 329, 4856, 13, 198, 198, 437, 4871, 13, 198, 198, 17174, 17174, 2466, 1174, 198, 9, 46333, 198, 17174, 17174, 2466, 1174, 198, 198, 4871, 300, 83, 565, 62, 5239, 17, 8658, 62, 26791, 62, 9288, 7822, 13, 628, 220, 2446, 1382, 62, 918, 480, 62, 8899, 13, 198, 220, 220, 220, 1366, 300, 87, 2099, 1006, 284, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 13, 628, 220, 220, 220, 1949, 13, 198, 220, 220, 220, 220, 220, 1598, 300, 87, 13, 198, 220, 220, 220, 220, 220, 1976, 565, 62, 5239, 17, 8658, 62, 26791, 14804, 11249, 62, 918, 480, 62, 8899, 7, 1105, 2682, 6739, 198, 220, 220, 220, 4929, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 656, 300, 87, 13, 198, 220, 220, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 30493, 62, 4853, 874, 7, 719, 796, 300, 87, 3784, 8189, 1033, 796, 705, 54, 56, 6, 6739, 198, 220, 220, 220, 886, 28311, 13, 198, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 30493, 62, 1662, 62, 36733, 7, 719, 796, 300, 87, 6739, 628, 220, 220, 220, 1949, 13, 198, 220, 220, 220, 220, 220, 1598, 300, 87, 13, 198, 220, 220, 220, 220, 220, 1976, 565, 62, 5239, 17, 8658, 62, 26791, 14804, 11249, 62, 918, 480, 62, 8899, 7, 705, 39305, 6, 6739, 198, 220, 220, 220, 4929, 1976, 66, 87, 62, 5239, 17, 8658, 62, 18224, 656, 300, 87, 13, 198, 220, 220, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 30493, 62, 4853, 874, 7, 719, 796, 300, 87, 3784, 8189, 1033, 796, 705, 18564, 6, 6739, 198, 220, 220, 220, 886, 28311, 13, 198, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 30493, 62, 1662, 62, 36733, 7, 719, 796, 300, 87, 6739, 628, 220, 220, 220, 1366, 300, 83, 62, 25747, 220, 2099, 1976, 565, 62, 5239, 17, 8658, 62, 26791, 14804, 926, 62, 3245, 62, 3672, 62, 8899, 13, 198, 220, 220, 220, 1366, 300, 83, 62, 8899, 62, 529, 2099, 1976, 565, 62, 5239, 17, 8658, 62, 26791, 14804, 926, 62, 3245, 62, 3672, 62, 8899, 13, 198, 220, 220, 220, 1366, 300, 83, 62, 8899, 62, 11201, 2099, 1976, 565, 62, 5239, 17, 8658, 62, 26791, 14804, 926, 62, 3245, 62, 3672, 62, 8899, 13, 198, 220, 220, 220, 2214, 12, 1837, 2022, 10220, 1279, 8899, 29, 588, 1627, 286, 300, 83, 62, 8899, 62, 11201, 13, 628, 220, 220, 220, 24443, 4238, 1627, 284, 300, 83, 62, 25747, 38875, 1279, 8899, 28401, 198, 220, 220, 220, 1279, 8899, 29, 12, 6738, 796, 705, 11246, 62, 3245, 4458, 198, 220, 220, 220, 1279, 8899, 29, 12, 1462, 220, 220, 796, 705, 83, 8841, 4458, 198, 220, 220, 220, 24443, 4238, 1627, 284, 300, 83, 62, 25747, 38875, 1279, 8899, 28401, 198, 220, 220, 220, 1279, 8899, 29, 12, 6738, 796, 705, 11246, 62, 3245, 17, 4458, 198, 220, 220, 220, 1279, 8899, 29, 12, 1462, 220, 220, 796, 705, 83, 8841, 17, 4458, 628, 220, 220, 220, 24443, 4238, 1627, 284, 300, 83, 62, 8899, 62, 11201, 38875, 1279, 8899, 28401, 198, 220, 220, 220, 1279, 8899, 29, 12, 6738, 796, 705, 50, 13649, 62, 44603, 4458, 198, 220, 220, 220, 1279, 8899, 29, 12, 1462, 220, 220, 796, 705, 51, 18601, 2751, 4458, 198, 220, 220, 220, 24443, 4238, 1627, 284, 300, 83, 62, 8899, 62, 11201 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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 'todo'. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 324, 1151, 23344, 62, 820, 3023, 62, 71, 85, 321, 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, 23344, 62, 71, 85, 321, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 2885, 53, 3525, 23344, 62, 26442, 3023, 62, 71, 85, 321, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 324, 1151, 23344, 62, 71, 85, 321, 93, 82, 6442, 13, 628, 220, 220, 220, 5072, 796, 705, 83, 24313, 4458, 628, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
*----------------------------------------------------------------------* * 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_28. 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 'lv_foo = lv_bar .'. 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. * =========== _code 'lv_foo = lv_bar.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result ). ENDMETHOD. "test2 METHOD test001_03. * =========== _code '.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result ). ENDMETHOD. METHOD test001_04. * =========== _code 'DATA: lv_foo TYPE i ,'. _code ' lv_bar TYPE i.'. 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. * =========== _code '* comment'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result ). ENDMETHOD. METHOD test001_06. * =========== _code 'DEFINE _code.'. _code ' append &1 to mt_code.'. _code 'END-OF-DEFINITION.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result ). ENDMETHOD. METHOD test001_07. * =========== _code 'super->constructor( ).'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result ). ENDMETHOD. METHOD test001_08. * =========== _code 'TRY.'. _code ' CATCH cx_root ##CATCH_ALL.'. _code 'ENDTRY.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result ). ENDMETHOD. METHOD test001_09. * =========== _code 'lv_foo = lv_bar .'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_equals( exp = '001' act = ms_result-code ). ENDMETHOD. METHOD test001_10. * =========== _code 'CONSTANTS:'. _code ' lc_begin TYPE string VALUE ''* <SIGNATURE>-------------------'''. _code ' & ''----------------------------------+''.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result ). ENDMETHOD. ENDCLASS. "lcl_Test
[ 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, 2078, 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, 6780, 62, 21943, 796, 300, 85, 62, 5657, 764, 4458, 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, 4808, 8189, 705, 6780, 62, 21943, 796, 300, 85, 62, 5657, 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, 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, 17, 628, 220, 337, 36252, 1332, 8298, 62, 3070, 13, 198, 9, 796, 2559, 855, 628, 220, 220, 220, 4808, 8189, 705, 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, 6739, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1332, 8298, 62, 3023, 13, 198, 9, 796, 2559, 855, 628, 220, 220, 220, 4808, 8189, 705, 26947, 25, 300, 85, 62, 21943, 41876, 1312, 837, 4458, 198, 220, 220, 220, 4808, 8189, 705, 220, 220, 220, 220, 220, 300, 85, 62, 5657, 41876, 1312, 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, 628, 220, 337, 36252, 1332, 8298, 62, 2713, 13, 198, 9, 796, 2559, 855, 628, 220, 220, 220, 4808, 8189, 705, 9, 2912, 4458, 628, 220, 220, 220, 13845, 62, 20274, 796, 1976, 565, 62, 64 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_services_repo DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. CLASS-METHODS new_online IMPORTING !is_repo_params TYPE zif_abapgit_services_repo=>ty_repo_params RETURNING VALUE(ro_repo) TYPE REF TO zcl_abapgit_repo_online RAISING zcx_abapgit_exception . CLASS-METHODS refresh IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception . CLASS-METHODS remove IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception . CLASS-METHODS purge IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RETURNING VALUE(ri_log) TYPE REF TO zif_abapgit_log RAISING zcx_abapgit_exception . CLASS-METHODS new_offline IMPORTING !is_repo_params TYPE zif_abapgit_services_repo=>ty_repo_params RETURNING VALUE(ro_repo) TYPE REF TO zcl_abapgit_repo_offline RAISING zcx_abapgit_exception . CLASS-METHODS remote_attach IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception . CLASS-METHODS remote_detach IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception . CLASS-METHODS remote_change IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception . CLASS-METHODS refresh_local_checksums IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception . CLASS-METHODS toggle_favorite IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception . CLASS-METHODS transport_to_branch IMPORTING !iv_repository_key TYPE zif_abapgit_persistence=>ty_value RAISING zcx_abapgit_exception . CLASS-METHODS gui_deserialize IMPORTING !io_repo TYPE REF TO zcl_abapgit_repo RAISING zcx_abapgit_exception . PROTECTED SECTION. PRIVATE SECTION. CLASS-METHODS popup_overwrite CHANGING !ct_overwrite TYPE zif_abapgit_definitions=>ty_overwrite_tt RAISING zcx_abapgit_exception. CLASS-METHODS popup_package_overwrite CHANGING !ct_overwrite TYPE zif_abapgit_definitions=>ty_overwrite_tt RAISING zcx_abapgit_exception. CLASS-METHODS check_package IMPORTING !is_repo_params TYPE zif_abapgit_services_repo=>ty_repo_params RAISING zcx_abapgit_exception . ENDCLASS. CLASS zcl_abapgit_services_repo IMPLEMENTATION. METHOD check_package. DATA: lo_repo TYPE REF TO zcl_abapgit_repo, li_repo_srv TYPE REF TO zif_abapgit_repo_srv, lv_reason TYPE string. " make sure package is not already in use for a different repository " 702: chaining calls with exp&imp parameters causes syntax error li_repo_srv = zcl_abapgit_repo_srv=>get_instance( ). li_repo_srv->get_repo_from_package( EXPORTING iv_package = is_repo_params-package iv_ign_subpkg = is_repo_params-ignore_subpackages IMPORTING eo_repo = lo_repo ev_reason = lv_reason ). IF lo_repo IS BOUND. zcx_abapgit_exception=>raise( lv_reason ). ENDIF. ENDMETHOD. METHOD gui_deserialize. DATA: ls_checks TYPE zif_abapgit_definitions=>ty_deserialize_checks, lt_requirements TYPE zif_abapgit_dot_abapgit=>ty_requirement_tt, lt_dependencies TYPE zif_abapgit_apack_definitions=>ty_dependencies. * find troublesome objects ls_checks = io_repo->deserialize_checks( ). * and let the user decide what to do TRY. popup_overwrite( CHANGING ct_overwrite = ls_checks-overwrite ). popup_package_overwrite( CHANGING ct_overwrite = ls_checks-warning_package ). IF ls_checks-requirements-met = zif_abapgit_definitions=>gc_no. lt_requirements = io_repo->get_dot_abapgit( )->get_data( )-requirements. zcl_abapgit_requirement_helper=>requirements_popup( lt_requirements ). ls_checks-requirements-decision = zif_abapgit_definitions=>gc_yes. ENDIF. IF ls_checks-dependencies-met = zif_abapgit_definitions=>gc_no. lt_dependencies = io_repo->get_dot_apack( )->get_manifest_descriptor( )-dependencies. zcl_abapgit_apack_helper=>dependencies_popup( lt_dependencies ). ENDIF. IF ls_checks-transport-required = abap_true. ls_checks-transport-transport = zcl_abapgit_ui_factory=>get_popups( )->popup_transport_request( is_transport_type = ls_checks-transport-type ). ENDIF. CATCH zcx_abapgit_cancel. RETURN. ENDTRY. * and pass decisions to deserialize io_repo->deserialize( is_checks = ls_checks ii_log = io_repo->create_new_log( 'Pull Log' ) ). ENDMETHOD. METHOD new_offline. check_package( is_repo_params ). " create new repo and add to favorites ro_repo = zcl_abapgit_repo_srv=>get_instance( )->new_offline( iv_url = is_repo_params-url iv_package = is_repo_params-package iv_folder_logic = is_repo_params-folder_logic iv_master_lang_only = is_repo_params-main_lang_only ). " Make sure there're no leftovers from previous repos ro_repo->rebuild_local_checksums( ). toggle_favorite( ro_repo->get_key( ) ). " Set default repo for user zcl_abapgit_persistence_user=>get_instance( )->set_repo_show( ro_repo->get_key( ) ). COMMIT WORK AND WAIT. ENDMETHOD. METHOD new_online. check_package( is_repo_params ). ro_repo = zcl_abapgit_repo_srv=>get_instance( )->new_online( iv_url = is_repo_params-url iv_branch_name = is_repo_params-branch_name iv_package = is_repo_params-package iv_display_name = is_repo_params-display_name iv_folder_logic = is_repo_params-folder_logic iv_ign_subpkg = is_repo_params-ignore_subpackages iv_master_lang_only = is_repo_params-main_lang_only ). " Make sure there're no leftovers from previous repos ro_repo->rebuild_local_checksums( ). toggle_favorite( ro_repo->get_key( ) ). " Set default repo for user zcl_abapgit_persistence_user=>get_instance( )->set_repo_show( ro_repo->get_key( ) ). COMMIT WORK AND WAIT. ENDMETHOD. METHOD popup_overwrite. DATA: lt_columns TYPE zif_abapgit_definitions=>ty_alv_column_tt, lt_selected LIKE ct_overwrite, li_popups TYPE REF TO zif_abapgit_popups. FIELD-SYMBOLS: <ls_overwrite> LIKE LINE OF ct_overwrite, <ls_column> TYPE zif_abapgit_definitions=>ty_alv_column. IF lines( ct_overwrite ) = 0. RETURN. ENDIF. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'OBJ_TYPE'. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'OBJ_NAME'. li_popups = zcl_abapgit_ui_factory=>get_popups( ). li_popups->popup_to_select_from_list( EXPORTING it_list = ct_overwrite iv_header_text = |The following objects have been modified (or deleted) locally.| && | Select the objects which should be overwritten (or recreated).| iv_select_column_text = 'Overwrite?' it_columns_to_display = lt_columns IMPORTING et_list = lt_selected ). LOOP AT ct_overwrite ASSIGNING <ls_overwrite>. READ TABLE lt_selected WITH TABLE KEY object_type_and_name COMPONENTS obj_type = <ls_overwrite>-obj_type obj_name = <ls_overwrite>-obj_name TRANSPORTING NO FIELDS. IF sy-subrc = 0. <ls_overwrite>-decision = 'Y'. ELSE. <ls_overwrite>-decision = 'N'. ENDIF. ENDLOOP. ENDMETHOD. METHOD popup_package_overwrite. DATA: lt_columns TYPE zif_abapgit_definitions=>ty_alv_column_tt, lt_selected LIKE ct_overwrite, li_popups TYPE REF TO zif_abapgit_popups. FIELD-SYMBOLS: <ls_overwrite> LIKE LINE OF ct_overwrite, <ls_column> TYPE zif_abapgit_definitions=>ty_alv_column. IF lines( ct_overwrite ) = 0. RETURN. ENDIF. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'OBJ_TYPE'. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'OBJ_NAME'. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'DEVCLASS'. li_popups = zcl_abapgit_ui_factory=>get_popups( ). li_popups->popup_to_select_from_list( EXPORTING it_list = ct_overwrite iv_header_text = |The following objects have been created in other packages.| && | Select the objects which should be overwritten.| iv_select_column_text = |Overwrite?| it_columns_to_display = lt_columns IMPORTING et_list = lt_selected ). LOOP AT ct_overwrite ASSIGNING <ls_overwrite>. READ TABLE lt_selected WITH TABLE KEY object_type_and_name COMPONENTS obj_type = <ls_overwrite>-obj_type obj_name = <ls_overwrite>-obj_name TRANSPORTING NO FIELDS. IF sy-subrc = 0. <ls_overwrite>-decision = 'Y'. ELSE. <ls_overwrite>-decision = 'N'. ENDIF. ENDLOOP. ENDMETHOD. METHOD purge. DATA: lt_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt, lv_answer TYPE c LENGTH 1, lo_repo TYPE REF TO zcl_abapgit_repo, lv_package TYPE devclass, lv_question TYPE c LENGTH 100, ls_checks TYPE zif_abapgit_definitions=>ty_delete_checks, lv_repo_name TYPE string, lv_message TYPE string. lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lv_repo_name = lo_repo->get_name( ). lv_package = lo_repo->get_package( ). lt_tadir = zcl_abapgit_factory=>get_tadir( )->read( lv_package ). IF lines( lt_tadir ) > 0. lv_question = |This will DELETE all objects in package { lv_package } including subpackages ({ lines( lt_tadir ) } objects) from the system|. lv_answer = zcl_abapgit_ui_factory=>get_popups( )->popup_to_confirm( iv_titlebar = 'Uninstall' iv_text_question = lv_question iv_text_button_1 = 'Delete' iv_icon_button_1 = 'ICON_DELETE' iv_text_button_2 = 'Cancel' iv_icon_button_2 = 'ICON_CANCEL' iv_default_button = '2' iv_display_cancel_button = abap_false ). IF lv_answer = '2'. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. ENDIF. ls_checks = lo_repo->delete_checks( ). IF ls_checks-transport-required = abap_true. ls_checks-transport-transport = zcl_abapgit_ui_factory=>get_popups( )->popup_transport_request( ls_checks-transport-type ). ENDIF. ri_log = zcl_abapgit_repo_srv=>get_instance( )->purge( io_repo = lo_repo is_checks = ls_checks ). COMMIT WORK. IF ri_log IS BOUND AND ri_log->count( ) > 0. zcl_abapgit_log_viewer=>show_log( ri_log ). RETURN. ENDIF. lv_message = |Repository { lv_repo_name } successfully uninstalled from Package { lv_package }. |. MESSAGE lv_message TYPE 'S'. ENDMETHOD. METHOD refresh. zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->refresh( ). ENDMETHOD. METHOD refresh_local_checksums. DATA: lv_answer TYPE c, lv_question TYPE string, lo_repo TYPE REF TO zcl_abapgit_repo. IF zcl_abapgit_auth=>is_allowed( zif_abapgit_auth=>gc_authorization-update_local_checksum ) = abap_false. zcx_abapgit_exception=>raise( 'Not authorized' ). ENDIF. lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lv_question = 'This will rebuild and overwrite local repo checksums.'. IF lo_repo->is_offline( ) = abap_false. lv_question = lv_question && ' The logic: if local and remote file differs then:' && ' if remote branch is ahead then assume changes are remote,' && ' else (branches are equal) assume changes are local.' && ' This will lead to incorrect state for files changed on both sides.' && ' Please make sure you don''t have ones like that.'. ENDIF. lv_answer = zcl_abapgit_ui_factory=>get_popups( )->popup_to_confirm( iv_titlebar = 'Warning' iv_text_question = lv_question iv_text_button_1 = 'OK' iv_icon_button_1 = 'ICON_DELETE' iv_text_button_2 = 'Cancel' iv_icon_button_2 = 'ICON_CANCEL' iv_default_button = '2' iv_display_cancel_button = abap_false ). IF lv_answer = '2'. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. lo_repo->rebuild_local_checksums( ). COMMIT WORK AND WAIT. ENDMETHOD. METHOD remote_attach. DATA: ls_popup TYPE zif_abapgit_popups=>ty_popup, ls_loc TYPE zif_abapgit_persistence=>ty_repo-local_settings, lo_repo TYPE REF TO zcl_abapgit_repo_online. ls_loc = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->get_local_settings( ). ls_popup = zcl_abapgit_ui_factory=>get_popups( )->repo_popup( iv_title = 'Attach repo to remote ...' iv_url = '' iv_display_name = ls_loc-display_name iv_package = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->get_package( ) iv_freeze_package = abap_true ). IF ls_popup-cancel = abap_true. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->switch_repo_type( iv_offline = abap_false ). lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lo_repo->set_url( ls_popup-url ). lo_repo->select_branch( ls_popup-branch_name ). ls_loc = lo_repo->get_local_settings( ). " Just in case ... if switch affects LS state ls_loc-display_name = ls_popup-display_name. lo_repo->set_local_settings( ls_loc ). COMMIT WORK. ENDMETHOD. METHOD remote_change. DATA: ls_popup TYPE zif_abapgit_popups=>ty_popup, ls_loc TYPE zif_abapgit_persistence=>ty_repo-local_settings, lo_repo TYPE REF TO zcl_abapgit_repo_online. lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). ls_loc = lo_repo->get_local_settings( ). ls_popup = zcl_abapgit_ui_factory=>get_popups( )->repo_popup( iv_title = 'Change repo remote ...' iv_url = lo_repo->get_url( ) iv_package = lo_repo->get_package( ) iv_display_name = ls_loc-display_name iv_freeze_package = abap_true ). IF ls_popup-cancel = abap_true. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lo_repo->set_url( ls_popup-url ). lo_repo->select_branch( ls_popup-branch_name ). ls_loc-display_name = ls_popup-display_name. lo_repo->set_local_settings( ls_loc ). COMMIT WORK. ENDMETHOD. METHOD remote_detach. DATA: lv_answer TYPE c LENGTH 1. lv_answer = zcl_abapgit_ui_factory=>get_popups( )->popup_to_confirm( iv_titlebar = 'Make repository OFF-line' iv_text_question = 'This will detach the repo from remote and make it OFF-line' iv_text_button_1 = 'Make OFF-line' iv_icon_button_1 = 'ICON_WF_UNLINK' iv_text_button_2 = 'Cancel' iv_icon_button_2 = 'ICON_CANCEL' iv_default_button = '2' iv_display_cancel_button = abap_false ). IF lv_answer = '2'. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->switch_repo_type( iv_offline = abap_true ). COMMIT WORK. ENDMETHOD. METHOD remove. DATA: lv_answer TYPE c LENGTH 1, lo_repo TYPE REF TO zcl_abapgit_repo, lv_package TYPE devclass, lv_question TYPE c LENGTH 200, lv_repo_name TYPE string, lv_message TYPE string. lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lv_repo_name = lo_repo->get_name( ). lv_package = lo_repo->get_package( ). lv_question = |This will remove the repository reference to the package { lv_package }. All objects will safely remain in the system.|. lv_answer = zcl_abapgit_ui_factory=>get_popups( )->popup_to_confirm( iv_titlebar = 'Remove' iv_text_question = lv_question iv_text_button_1 = 'Remove' iv_icon_button_1 = 'ICON_WF_UNLINK' iv_text_button_2 = 'Cancel' iv_icon_button_2 = 'ICON_CANCEL' iv_default_button = '2' iv_display_cancel_button = abap_false ). IF lv_answer = '2'. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. zcl_abapgit_repo_srv=>get_instance( )->delete( lo_repo ). COMMIT WORK. lv_message = |Reference to repository { lv_repo_name } successfully removed from Package { lv_package }. |. MESSAGE lv_message TYPE 'S'. ENDMETHOD. METHOD toggle_favorite. zcl_abapgit_persistence_user=>get_instance( )->toggle_favorite( iv_key ). ENDMETHOD. METHOD transport_to_branch. DATA: lo_repository TYPE REF TO zcl_abapgit_repo_online, lo_transport_to_branch TYPE REF TO zcl_abapgit_transport_2_branch, lt_transport_headers TYPE trwbo_request_headers, lt_transport_objects TYPE zif_abapgit_definitions=>ty_tadir_tt, ls_transport_to_branch TYPE zif_abapgit_definitions=>ty_transport_to_branch. IF zcl_abapgit_auth=>is_allowed( zif_abapgit_auth=>gc_authorization-transport_to_branch ) = abap_false. zcx_abapgit_exception=>raise( 'Not authorized' ). ENDIF. lo_repository ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_repository_key ). lt_transport_headers = zcl_abapgit_ui_factory=>get_popups( )->popup_to_select_transports( ). lt_transport_objects = zcl_abapgit_transport=>to_tadir( lt_transport_headers ). IF lt_transport_objects IS INITIAL. zcx_abapgit_exception=>raise( 'Canceled or List of objects is empty ' ). ENDIF. ls_transport_to_branch = zcl_abapgit_ui_factory=>get_popups( )->popup_to_create_transp_branch( lt_transport_headers ). CREATE OBJECT lo_transport_to_branch. lo_transport_to_branch->create( io_repository = lo_repository is_transport_to_branch = ls_transport_to_branch it_transport_objects = lt_transport_objects ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 30416, 62, 260, 7501, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 25261, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 649, 62, 25119, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 260, 7501, 62, 37266, 41876, 1976, 361, 62, 397, 499, 18300, 62, 30416, 62, 260, 7501, 14804, 774, 62, 260, 7501, 62, 37266, 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, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 260, 7501, 62, 25119, 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, 14976, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 4781, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 35714, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 220, 220, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 380, 62, 6404, 8, 41876, 4526, 37, 5390, 1976, 361, 62, 397, 499, 18300, 62, 6404, 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, 649, 62, 2364, 1370, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 260, 7501, 62, 37266, 41876, 1976, 361, 62, 397, 499, 18300, 62, 30416, 62, 260, 7501, 14804, 774, 62, 260, 7501, 62, 37266, 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, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 260, 7501, 62, 2364, 1370, 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, 6569, 62, 47348, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 6569, 62, 15255, 620, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 6569, 62, 3803, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 14976, 62, 12001, 62, 42116, 5700, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 19846, 62, 35200, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 4839, 62, 1462, 62, 1671, 3702, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 260, 1930, 37765, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 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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 ]
CLASS ltcl_xml_output DEFINITION DEFERRED. CLASS zcl_abapgit_xml_output DEFINITION LOCAL FRIENDS ltcl_xml_output. CLASS ltcl_xml_output DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PUBLIC SECTION. METHODS: render_xml_string FOR TESTING RAISING zcx_abapgit_exception, add_simple_object FOR TESTING RAISING zcx_abapgit_exception. TYPES: BEGIN OF st_old, foo TYPE i, bar TYPE c LENGTH 1, END OF st_old. ENDCLASS. CLASS ltcl_xml_output IMPLEMENTATION. METHOD add_simple_object. DATA: ls_input TYPE st_old, ls_result TYPE st_old, lv_value TYPE string, li_xml_element TYPE REF TO if_ixml_element, lo_output TYPE REF TO zcl_abapgit_xml_output. ls_input-foo = '2'. ls_input-bar = 'A'. CREATE OBJECT lo_output. lo_output->add( iv_name = 'DATA' ig_data = ls_input ). li_xml_element = lo_output->mi_xml_doc->find_from_name( 'FOO' ). lv_value = li_xml_element->get_value( ). ls_result-foo = lv_value. li_xml_element = lo_output->mi_xml_doc->find_from_name( 'BAR' ). lv_value = li_xml_element->get_value( ). ls_result-bar = lv_value. cl_abap_unit_assert=>assert_equals( act = ls_input exp = ls_result ). ENDMETHOD. METHOD render_xml_string. DATA: ls_input TYPE st_old, lv_value TYPE string, lv_xml TYPE string, lo_output TYPE REF TO zcl_abapgit_xml_output, lo_conv_in_string TYPE REF TO cl_abap_conv_in_ce, lv_encoding TYPE abap_encoding, lv_xstring TYPE xstring. ls_input-foo = '2'. ls_input-bar = 'A'. lv_value = '<?xml version="1.0" encoding="utf-16"?>#<abapGit version="v1.0.0">#' & ' <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">#' & ' <asx:values># <DATA># <FOO>2</FOO># <BAR>A' & '</BAR># </DATA># </asx:values># </asx:abap>#</abapGit>#'. REPLACE ALL OCCURRENCES OF '#' IN lv_value WITH cl_abap_char_utilities=>newline. CREATE OBJECT lo_output. lo_output->add( iv_name = 'DATA' ig_data = ls_input ). lv_xml = lo_output->render( ). lv_encoding = cl_abap_codepage=>sap_codepage( `UTF-16LE` ). TRY. lv_xstring = cl_bcs_convert=>string_to_xstring( iv_string = lv_value iv_codepage = lv_encoding iv_add_bom = 'X' ). CATCH cx_bcs. ENDTRY. lo_conv_in_string = cl_abap_conv_in_ce=>create( encoding = lv_encoding input = lv_xstring ). lo_conv_in_string->read( IMPORTING data = lv_value ). cl_abap_unit_assert=>assert_equals( act = lv_xml exp = lv_value ). ENDMETHOD. ENDCLASS.
[ 31631, 300, 83, 565, 62, 19875, 62, 22915, 5550, 20032, 17941, 23449, 1137, 22083, 13, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 19875, 62, 22915, 5550, 20032, 17941, 37347, 1847, 48167, 1677, 5258, 300, 83, 565, 62, 19875, 62, 22915, 13, 198, 198, 31631, 300, 83, 565, 62, 19875, 62, 22915, 5550, 20032, 17941, 7473, 43001, 2751, 360, 4261, 6234, 6006, 9863, 45698, 42, 49277, 43638, 5805, 7597, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 8543, 62, 19875, 62, 8841, 7473, 43001, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 751, 62, 36439, 62, 15252, 7473, 43001, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 347, 43312, 3963, 336, 62, 727, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22944, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2318, 41876, 269, 406, 49494, 352, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 336, 62, 727, 13, 198, 198, 10619, 31631, 13, 198, 31631, 300, 83, 565, 62, 19875, 62, 22915, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 751, 62, 36439, 62, 15252, 13, 628, 220, 220, 220, 42865, 25, 43979, 62, 15414, 220, 220, 220, 220, 220, 220, 41876, 336, 62, 727, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43979, 62, 20274, 220, 220, 220, 220, 220, 41876, 336, 62, 727, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 8367, 220, 220, 220, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7649, 62, 19875, 62, 30854, 41876, 4526, 37, 5390, 611, 62, 844, 4029, 62, 30854, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2376, 62, 22915, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 19875, 62, 22915, 13, 628, 220, 220, 220, 43979, 62, 15414, 12, 21943, 796, 705, 17, 4458, 198, 220, 220, 220, 43979, 62, 15414, 12, 5657, 796, 705, 32, 4458, 628, 220, 220, 220, 29244, 6158, 25334, 23680, 2376, 62, 22915, 13, 198, 220, 220, 220, 2376, 62, 22915, 3784, 2860, 7, 21628, 62, 3672, 796, 705, 26947, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45329, 62, 7890, 796, 43979, 62, 15414, 6739, 628, 220, 220, 220, 7649, 62, 19875, 62, 30854, 796, 2376, 62, 22915, 3784, 11632, 62, 19875, 62, 15390, 3784, 19796, 62, 6738, 62, 3672, 7, 705, 6080, 46, 6, 6739, 198, 220, 220, 220, 300, 85, 62, 8367, 796, 7649, 62, 19875, 62, 30854, 3784, 1136, 62, 8367, 7, 6739, 198, 220, 220, 220, 43979, 62, 20274, 12, 21943, 796, 300, 85, 62, 8367, 13, 198, 220, 220, 220, 7649, 62, 19875, 62, 30854, 796, 2376, 62, 22915, 3784, 11632, 62, 19875, 62, 15390, 3784, 19796, 62, 6738, 62, 3672, 7, 705, 33, 1503, 6, 6739, 198, 220, 220, 220, 300, 85, 62, 8367, 796, 7649, 62, 19875, 62, 30854, 3784, 1136, 62, 8367, 7, 6739, 198, 220, 220, 220, 43979, 62, 20274, 12, 5657, 796, 300, 85, 62, 8367, 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, 719, 796, 43979, 62, 15414, 198, 220, 220, 220, 220, 220, 1033, 796, 43979, 62, 20274, 6739, 628, 220, 23578, 49273, 13, 198, 220, 337, 36252, 8543, 62, 19875, 62, 8841, 13, 628, 220, 220, 220, 42865, 25, 43979, 62, 15414, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 336, 62, 727, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 8367, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 19875, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2376, 62, 22915, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 19875, 62, 22915, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2376, 62, 42946, 62, 259, 62, 8841, 41876, 4526, 37, 5390, 537, 62, 397, 499, 62, 42946, 62, 259, 62, 344, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 12685, 7656, 220, 220, 220, 220, 220, 220, 41876, 450, 499, 62, 12685, 7656, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 87, 8841, 220, 220, 220, 220, 220, 220, 220, 41876, 2124, 8841, 13, 628, 220, 220, 220, 43979, 62, 15414, 12, 21943, 796, 705, 17, 4458, 198, 220, 220, 220, 43979, 62, 15414, 12, 5657, 796, 705, 32, 4458, 628, 220, 220, 220, 300, 85, 62, 8367, 796, 198, 220, 220, 220, 220, 220, 705, 47934, 19875, 2196, 2625, 16, 13, 15, 1, 21004, 2625, 40477, 12, 1433, 13984, 29, 2, 27, 397, 499, 38, 270, 2196, 2625, 85, 16, 13, 15, 13, 15, 5320, 2, 6, 1222, 198, 220, 220, 220, 220, 220, 705, 1279, 292, 87, 25, 397, 499, 35555, 5907, 25, 292, 87, 2625, 4023, 1378, 2503, 13, 82, 499, 13, 785, 14, 397, 499, 19875, 1, 2196, 2625, 16, 13, 15, 5320, 2, 6, 1222, 198, 220, 220, 220, 220, 220, 705, 220, 1279, 292, 87, 25, 27160, 29, 2, 220, 220, 1279, 26947, 29, 2, 220, 220, 220, 1279, 6080, 46, 29, 17, 3556, 6080, 46, 29, 2, 220, 220, 220, 1279, 33, 1503, 29, 32, 6, 1222, 198, 220, 220, 220, 220, 220, 705, 3556, 33, 1503, 29, 2, 220, 220, 7359 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
*----------------------------------------------------------------------* * CLASS ZTRANSLATE_CMP DEFINITION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS zcl_translate_cmp DEFINITION PUBLIC CREATE PUBLIC . *"* public components of class ZCL_TRANSLATE_CMP *"* do not include other source files here!!! PUBLIC SECTION. TYPE-POOLS abap . TYPES: BEGIN OF ts_object_list, pgmid TYPE pgmid, object TYPE trobjtype, text TYPE ko100-text, class TYPE seoclsname, ref_class TYPE REF TO zcl_translate_cmp, END OF ts_object_list . TYPES: tt_object_list TYPE STANDARD TABLE OF ts_object_list . TYPES: BEGIN OF ts_components, object TYPE trobjtype, obj_name TYPE sobj_name, obj_name_int TYPE sobj_name, END OF ts_components . TYPES: tt_components TYPE STANDARD TABLE OF ts_components . CLASS-METHODS get_objectlist EXPORTING !et_object_list TYPE tt_object_list . METHODS get_components EXPORTING !et_components TYPE tt_components . METHODS get_objects_type RETURNING VALUE(rt_objects) TYPE objtyptable . METHODS check_object_exists IMPORTING !iv_pgmid TYPE pgmid !iv_object TYPE trobjtype !iv_obj_name TYPE sobj_name RETURNING VALUE(rv_exist) TYPE sap_bool . METHODS set_params IMPORTING !iv_depth_refs TYPE i DEFAULT 2 . PROTECTED SECTION. *"* protected components of class ZZC_CA02703 *"* do not include other source files here!!! TYPES: BEGIN OF ts_params_comp, depth_refs TYPE i, "Nivel de búsqueda de objetos a traducir END OF ts_params_comp. DATA mv_object TYPE trobjtype . DATA mv_obj_name TYPE sobj_name . DATA ms_params_comp TYPE ts_params_comp. PRIVATE SECTION. *"* private components of class ZZC_CA02703 *"* do not include other source files here!!! ENDCLASS. CLASS zcl_translate_cmp IMPLEMENTATION. METHOD check_object_exists. rv_exist = abap_false. * Como la mayoria de objetos (por no decir todos) que se traducen existen en la TADIR, la validacion * se pone en la clase padre. Para casos concretos se hará sobrecarga. CLEAR: mv_object, mv_obj_name. SELECT SINGLE object obj_name INTO (mv_object, mv_obj_name) FROM tadir WHERE pgmid = iv_pgmid AND object = iv_object AND obj_name = iv_obj_name. IF sy-subrc = 0. rv_exist = abap_true. ENDIF. ENDMETHOD. METHOD get_components. ENDMETHOD. METHOD get_objectlist. FIELD-SYMBOLS <ls_classlist> TYPE LINE OF seo_inheritances. FIELD-SYMBOLS <ls_objects> TYPE LINE OF objtyptable. FIELD-SYMBOLS <ls_types_out> TYPE ko100. DATA lt_classlist TYPE seo_inheritances. DATA ls_object_list TYPE LINE OF tt_object_list. DATA lt_objects TYPE objtyptable. DATA lt_types_in TYPE STANDARD TABLE OF ko105. DATA ls_types_in TYPE ko105. DATA lt_types_out TYPE STANDARD TABLE OF ko100. CLEAR et_object_list. * Leo todas las clases que heredan de la clase principal de componentes. SELECT * FROM vseoextend INTO TABLE lt_classlist WHERE refclsname = 'ZCL_TRANSLATE_CMP' AND version = '1'. IF sy-subrc = 0. LOOP AT lt_classlist ASSIGNING <ls_classlist>. CLEAR ls_object_list. ls_object_list-class = <ls_classlist>-clsname. * Cualquier excepcion al instanciar la clase o al llamar de sus métodos hará que no se * tenga en cuenta la clase. TRY. * Instancio la clase que obtendrá los componentes CREATE OBJECT ls_object_list-ref_class TYPE (<ls_classlist>-clsname). * Llamo al método para que me devuelva los objetos asociados al componente. Por ejemplo: * para la clase para los componentes del diccionario devolverá: DTEL, DOMA, TABL, etc.. lt_objects = ls_object_list-ref_class->get_objects_type( ). LOOP AT lt_objects ASSIGNING <ls_objects>. CLEAR: lt_types_in, lt_types_out, lt_types_in. * Recupero la descripción del objeto para pasarla a la tabla principal. También servirá * para validar que el objeto exista. ls_types_in-object = <ls_objects>. APPEND ls_types_in TO lt_types_in. CALL FUNCTION 'TRINT_OBJECT_TABLE' TABLES tt_types_in = lt_types_in tt_types_out = lt_types_out. READ TABLE lt_types_out ASSIGNING <ls_types_out> INDEX 1. IF sy-subrc = 0. MOVE-CORRESPONDING <ls_types_out> TO ls_object_list. APPEND ls_object_list TO et_object_list. ENDIF.. ENDLOOP. CLEAR lt_objects. CATCH cx_root. ENDTRY. ENDLOOP. ENDIF. ENDMETHOD. METHOD get_objects_type. ENDMETHOD. METHOD set_params. * Nivel de búsqueda de objetos a traducir a partir del objeto principal. ms_params_comp-depth_refs = iv_depth_refs. ENDMETHOD. ENDCLASS.
[ 9, 10097, 23031, 9, 198, 9, 220, 220, 220, 220, 220, 220, 42715, 1168, 5446, 1565, 8634, 6158, 62, 34, 7378, 5550, 20032, 17941, 198, 9, 10097, 23031, 9, 198, 9, 198, 9, 10097, 23031, 9, 198, 31631, 1976, 565, 62, 7645, 17660, 62, 48991, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 29244, 6158, 44731, 764, 198, 198, 9, 1, 9, 1171, 6805, 286, 1398, 1168, 5097, 62, 5446, 1565, 8634, 6158, 62, 34, 7378, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 41876, 12, 16402, 3535, 50, 450, 499, 764, 628, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 40379, 62, 15252, 62, 4868, 11, 198, 220, 220, 220, 220, 220, 220, 220, 23241, 13602, 197, 220, 220, 220, 41876, 23241, 13602, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2134, 220, 220, 220, 41876, 4161, 50007, 4906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2420, 220, 220, 220, 220, 220, 41876, 41727, 3064, 12, 5239, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1398, 220, 220, 220, 220, 41876, 384, 420, 7278, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1006, 62, 4871, 41876, 4526, 37, 5390, 1976, 565, 62, 7645, 17660, 62, 48991, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 40379, 62, 15252, 62, 4868, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 256, 83, 62, 15252, 62, 4868, 41876, 49053, 9795, 43679, 3963, 40379, 62, 15252, 62, 4868, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 40379, 62, 5589, 3906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2134, 220, 220, 220, 220, 220, 220, 41876, 4161, 50007, 4906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 62, 3672, 220, 220, 220, 220, 41876, 27355, 73, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 62, 3672, 62, 600, 41876, 27355, 73, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 40379, 62, 5589, 3906, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 256, 83, 62, 5589, 3906, 41876, 49053, 9795, 43679, 3963, 40379, 62, 5589, 3906, 764, 628, 220, 220, 220, 42715, 12, 49273, 50, 651, 62, 15252, 4868, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 316, 62, 15252, 62, 4868, 41876, 256, 83, 62, 15252, 62, 4868, 764, 198, 220, 220, 220, 337, 36252, 50, 651, 62, 5589, 3906, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 316, 62, 5589, 3906, 41876, 256, 83, 62, 5589, 3906, 764, 198, 220, 220, 220, 337, 36252, 50, 651, 62, 48205, 62, 4906, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 48205, 8, 41876, 26181, 774, 457, 540, 764, 198, 220, 220, 220, 337, 36252, 50, 2198, 62, 15252, 62, 1069, 1023, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 6024, 13602, 220, 220, 220, 220, 220, 220, 41876, 23241, 13602, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 15252, 220, 220, 220, 220, 220, 41876, 4161, 50007, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 26801, 62, 3672, 220, 220, 220, 41876, 27355, 73, 62, 3672, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 38476, 8, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 337, 36252, 50, 900, 62, 37266, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 18053, 62, 5420, 82, 41876, 1312, 5550, 38865, 362, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 9, 1, 9, 6861, 6805, 286, 1398, 1168, 57, 34, 62, 8141, 44698, 3070, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 220, 220, 220, 24412, 47, 1546, 25, 347, 43312, 3963, 40379, 62, 37266, 62, 5589, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6795, 62, 5420, 82, 41876, 1312, 11, 366, 45, 425, 75, 390, 275, 21356, 16485, 18082, 390, 26181, 316, 418, 257, 2083, 1229, 343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 40379, 62, 37266, 62, 5589, 13, 198, 220, 220, 220, 42865, 285, 85, 62, 15252, 41876, 4161, 50007, 4906, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 26801, 62, 3672, 41876, 27355, 73, 62, 3672, 764, 198, 220, 220, 220, 42865, 13845, 62, 37266, 62, 5589, 41876, 40379, 62, 37266, 62, 5589, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 9, 1, 9, 2839, 6805, 286, 1398, 1168, 57, 34, 62, 8141, 44698, 3070, 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, 48991, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 2198, 62, 15252, 62, 1069, 1023, 13, 198, 220, 220, 220, 374, 85, 62, 38476, 796, 450, 499, 62, 9562, 13, 198, 198, 9, 955, 78, 8591, 743, 7661, 390, 26181, 316, 418, 357, 1819, 645, 875, 343, 284, 37427, 8, 8358, 384, 2083, 1229, 268, 2152, 268, 551, 8591, 309, 2885, 4663, 11, 8591, 4938, 49443, 198, 9, 384, 279, 505, 551, 8591, 537, 589, 14841, 260, 13, 2547, 64, 6124, 418, 1673, 1186, 418, 384, 3971, 6557, 523, 4679, 66, 853, 64, 13, 198, 220, 220, 220, 30301, 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 ]
*&---------------------------------------------------------------------* *& Include ZABAPGIT_PERSISTENCE *&---------------------------------------------------------------------* CLASS lcl_persistence_migrate DEFINITION FINAL. PUBLIC SECTION. CLASS-METHODS: run RAISING lcx_exception. PRIVATE SECTION. CONSTANTS: c_text TYPE string VALUE 'Generated by abapGit' ##NO_TEXT. CLASS-METHODS: migrate_repo RAISING lcx_exception, migrate_user RAISING lcx_exception, table_create RAISING lcx_exception, table_exists RETURNING VALUE(rv_exists) TYPE abap_bool, lock_create RAISING lcx_exception, lock_exists RETURNING VALUE(rv_exists) TYPE abap_bool. ENDCLASS. CLASS lcl_persistence_db DEFINITION FINAL CREATE PRIVATE FRIENDS lcl_app. PUBLIC SECTION. CONSTANTS: c_tabname TYPE tabname VALUE 'ZABAPGIT', c_lock TYPE viewname VALUE 'EZABAPGIT'. TYPES: ty_type TYPE c LENGTH 12. TYPES: ty_value TYPE c LENGTH 12. TYPES: BEGIN OF ty_content, type TYPE ty_type, value TYPE ty_value, data_str TYPE string, END OF ty_content, tt_content TYPE SORTED TABLE OF ty_content WITH UNIQUE KEY type value. METHODS: list_by_type IMPORTING iv_type TYPE ty_type RETURNING VALUE(rt_content) TYPE tt_content, list RETURNING VALUE(rt_content) TYPE tt_content, add IMPORTING iv_type TYPE ty_type iv_value TYPE ty_content-value iv_data TYPE ty_content-data_str RAISING lcx_exception, delete IMPORTING iv_type TYPE ty_type iv_value TYPE ty_content-value RAISING lcx_exception, update IMPORTING iv_type TYPE ty_type iv_value TYPE ty_content-value iv_data TYPE ty_content-data_str RAISING lcx_exception, modify IMPORTING iv_type TYPE ty_type iv_value TYPE ty_content-value iv_data TYPE ty_content-data_str RAISING lcx_exception, read IMPORTING iv_type TYPE ty_type iv_value TYPE ty_content-value RETURNING VALUE(rv_data) TYPE ty_content-data_str RAISING lcx_not_found, lock IMPORTING iv_mode TYPE enqmode DEFAULT 'E' iv_type TYPE ty_type iv_value TYPE ty_content-value RAISING lcx_exception. PRIVATE SECTION. METHODS: validate_and_unprettify_xml IMPORTING iv_xml TYPE string RETURNING VALUE(rv_xml) TYPE string RAISING lcx_exception. ENDCLASS. CLASS lcl_persistence_repo DEFINITION FINAL. PUBLIC SECTION. TYPES: BEGIN OF ty_local_checksum, item TYPE ty_item, files TYPE ty_file_signatures_tt, END OF ty_local_checksum. TYPES: ty_local_checksum_tt TYPE STANDARD TABLE OF ty_local_checksum WITH DEFAULT KEY. TYPES: BEGIN OF ty_repo_xml, url TYPE string, branch_name TYPE string, sha1 TYPE ty_sha1, package TYPE devclass, offline TYPE sap_bool, local_checksums TYPE ty_local_checksum_tt, master_language TYPE spras, head_branch TYPE string, " HEAD symref of the repo, master branch write_protect TYPE sap_bool, " Deny destructive ops: pull, switch branch ... ignore_subpackages TYPE sap_bool, END OF ty_repo_xml. TYPES: BEGIN OF ty_repo, key TYPE lcl_persistence_db=>ty_value. INCLUDE TYPE ty_repo_xml. TYPES: END OF ty_repo. TYPES: tt_repo TYPE STANDARD TABLE OF ty_repo WITH DEFAULT KEY. TYPES: tt_repo_keys TYPE STANDARD TABLE OF ty_repo-key WITH DEFAULT KEY. METHODS constructor. METHODS list RETURNING VALUE(rt_repos) TYPE tt_repo RAISING lcx_exception. METHODS update_sha1 IMPORTING iv_key TYPE ty_repo-key iv_branch_sha1 TYPE ty_repo_xml-sha1 RAISING lcx_exception. METHODS update_local_checksums IMPORTING iv_key TYPE ty_repo-key it_checksums TYPE ty_repo_xml-local_checksums RAISING lcx_exception. METHODS update_url IMPORTING iv_key TYPE ty_repo-key iv_url TYPE ty_repo_xml-url RAISING lcx_exception. METHODS update_branch_name IMPORTING iv_key TYPE ty_repo-key iv_branch_name TYPE ty_repo_xml-branch_name RAISING lcx_exception. METHODS update_head_branch IMPORTING iv_key TYPE ty_repo-key iv_head_branch TYPE ty_repo_xml-head_branch RAISING lcx_exception. METHODS update_offline IMPORTING iv_key TYPE ty_repo-key iv_offline TYPE ty_repo_xml-offline RAISING lcx_exception. METHODS add IMPORTING iv_url TYPE string iv_branch_name TYPE string iv_branch TYPE ty_sha1 OPTIONAL iv_package TYPE devclass iv_offline TYPE sap_bool DEFAULT abap_false RETURNING VALUE(rv_key) TYPE ty_repo-key RAISING lcx_exception. METHODS delete IMPORTING iv_key TYPE ty_repo-key RAISING lcx_exception. METHODS read IMPORTING iv_key TYPE ty_repo-key RETURNING VALUE(rs_repo) TYPE ty_repo RAISING lcx_exception lcx_not_found. METHODS lock IMPORTING iv_mode TYPE enqmode iv_key TYPE ty_repo-key RAISING lcx_exception. PRIVATE SECTION. CONSTANTS c_type_repo TYPE lcl_persistence_db=>ty_type VALUE 'REPO'. DATA: mo_db TYPE REF TO lcl_persistence_db. METHODS from_xml IMPORTING iv_repo_xml_string TYPE string RETURNING VALUE(rs_repo) TYPE ty_repo_xml RAISING lcx_exception. METHODS to_xml IMPORTING is_repo TYPE ty_repo RETURNING VALUE(rv_repo_xml_string) TYPE string. METHODS get_next_id RETURNING VALUE(rv_next_repo_id) TYPE lcl_persistence_db=>ty_content-value RAISING lcx_exception. ENDCLASS. CLASS lcl_persistence_background DEFINITION FINAL. PUBLIC SECTION. CONSTANTS: BEGIN OF c_method, nothing TYPE string VALUE 'nothing' ##NO_TEXT, pull TYPE string VALUE 'pull' ##NO_TEXT, push TYPE string VALUE 'push' ##NO_TEXT, END OF c_method. CONSTANTS: BEGIN OF c_amethod, fixed TYPE string VALUE 'fixed' ##NO_TEXT, auto TYPE string VALUE 'auto' ##NO_TEXT, END OF c_amethod. TYPES: BEGIN OF ty_xml, method TYPE string, username TYPE string, password TYPE string, amethod TYPE string, aname TYPE string, amail TYPE string, END OF ty_xml. TYPES: BEGIN OF ty_background, key TYPE lcl_persistence_db=>ty_value. INCLUDE TYPE ty_xml. TYPES: END OF ty_background. TYPES: tt_background TYPE STANDARD TABLE OF ty_background WITH DEFAULT KEY. METHODS constructor. METHODS list RETURNING VALUE(rt_list) TYPE tt_background RAISING lcx_exception. METHODS modify IMPORTING is_data TYPE ty_background RAISING lcx_exception. METHODS delete IMPORTING iv_key TYPE ty_background-key RAISING lcx_exception. METHODS exists IMPORTING iv_key TYPE ty_background-key RETURNING VALUE(rv_yes) TYPE abap_bool RAISING lcx_exception. PRIVATE SECTION. CONSTANTS c_type TYPE lcl_persistence_db=>ty_type VALUE 'BACKGROUND'. DATA: mo_db TYPE REF TO lcl_persistence_db, mt_jobs TYPE tt_background. METHODS from_xml IMPORTING iv_string TYPE string RETURNING VALUE(rs_xml) TYPE ty_xml RAISING lcx_exception. METHODS to_xml IMPORTING is_background TYPE ty_background RETURNING VALUE(rv_string) TYPE string. ENDCLASS. "lcl_persistence_background DEFINITION CLASS lcl_persistence_background IMPLEMENTATION. METHOD constructor. mo_db = lcl_app=>db( ). ENDMETHOD. METHOD list. DATA: lt_list TYPE lcl_persistence_db=>tt_content, ls_xml TYPE ty_xml. FIELD-SYMBOLS: <ls_list> LIKE LINE OF lt_list, <ls_output> LIKE LINE OF rt_list. IF lines( mt_jobs ) > 0. rt_list = mt_jobs. RETURN. ENDIF. lt_list = mo_db->list_by_type( c_type ). LOOP AT lt_list ASSIGNING <ls_list>. ls_xml = from_xml( <ls_list>-data_str ). APPEND INITIAL LINE TO rt_list ASSIGNING <ls_output>. MOVE-CORRESPONDING ls_xml TO <ls_output>. <ls_output>-key = <ls_list>-value. ENDLOOP. mt_jobs = rt_list. ENDMETHOD. METHOD exists. list( ). " Ensure mt_jobs is populated READ TABLE mt_jobs WITH KEY key = iv_key TRANSPORTING NO FIELDS. rv_yes = boolc( sy-subrc = 0 ). ENDMETHOD. "exists METHOD modify. ASSERT NOT is_data-key IS INITIAL. mo_db->modify( iv_type = c_type iv_value = is_data-key iv_data = to_xml( is_data ) ). DELETE mt_jobs WHERE key = is_data-key. APPEND is_data TO mt_jobs. ENDMETHOD. METHOD delete. TRY. mo_db->read( iv_type = c_type iv_value = iv_key ). CATCH lcx_not_found. RETURN. ENDTRY. mo_db->delete( iv_type = c_type iv_value = iv_key ). DELETE mt_jobs WHERE key = iv_key. ENDMETHOD. METHOD from_xml. CALL TRANSFORMATION id OPTIONS value_handling = 'accept_data_loss' SOURCE XML iv_string RESULT data = rs_xml ##NO_TEXT. ENDMETHOD. METHOD to_xml. DATA: ls_xml TYPE ty_xml. MOVE-CORRESPONDING is_background TO ls_xml. CALL TRANSFORMATION id SOURCE data = ls_xml RESULT XML rv_string. ENDMETHOD. ENDCLASS. " lcl_persistence_background IMPLEMENTATION *----------------------------------------------------------------------* * CLASS lcl_persistence_user DEFINITION *----------------------------------------------------------------------* CLASS lcl_persistence_user DEFINITION FINAL CREATE PRIVATE FRIENDS lcl_app. PUBLIC SECTION. TYPES: tt_favorites TYPE lcl_persistence_repo=>tt_repo_keys. METHODS set_default_git_user_name IMPORTING iv_username TYPE string RAISING lcx_exception. METHODS get_default_git_user_name RETURNING VALUE(rv_username) TYPE string RAISING lcx_exception. METHODS set_default_git_user_email IMPORTING iv_email TYPE string RAISING lcx_exception. METHODS get_default_git_user_email RETURNING VALUE(rv_email) TYPE string RAISING lcx_exception. METHODS set_repo_show IMPORTING iv_key TYPE lcl_persistence_repo=>ty_repo-key RAISING lcx_exception. METHODS get_repo_show RETURNING VALUE(rv_key) TYPE lcl_persistence_repo=>ty_repo-key RAISING lcx_exception. METHODS set_repo_git_user_name IMPORTING iv_url TYPE lcl_persistence_repo=>ty_repo-url iv_username TYPE string RAISING lcx_exception. METHODS get_repo_git_user_name IMPORTING iv_url TYPE lcl_persistence_repo=>ty_repo-url RETURNING VALUE(rv_username) TYPE string RAISING lcx_exception. METHODS set_repo_login IMPORTING iv_url TYPE lcl_persistence_repo=>ty_repo-url iv_login TYPE string RAISING lcx_exception. METHODS get_repo_login IMPORTING iv_url TYPE lcl_persistence_repo=>ty_repo-url RETURNING VALUE(rv_login) TYPE string RAISING lcx_exception. METHODS set_repo_git_user_email IMPORTING iv_url TYPE lcl_persistence_repo=>ty_repo-url iv_email TYPE string RAISING lcx_exception. METHODS get_repo_git_user_email IMPORTING iv_url TYPE lcl_persistence_repo=>ty_repo-url RETURNING VALUE(rv_email) TYPE string RAISING lcx_exception. METHODS toggle_hide_files RETURNING VALUE(rv_hide) TYPE abap_bool RAISING lcx_exception. METHODS get_hide_files RETURNING VALUE(rv_hide) TYPE abap_bool RAISING lcx_exception. METHODS toggle_changes_only RETURNING VALUE(rv_changes_only) TYPE abap_bool RAISING lcx_exception. METHODS get_changes_only RETURNING VALUE(rv_changes_only) TYPE abap_bool RAISING lcx_exception. METHODS toggle_diff_unified RETURNING VALUE(rv_diff_unified) TYPE abap_bool RAISING lcx_exception. METHODS get_diff_unified RETURNING VALUE(rv_diff_unified) TYPE abap_bool RAISING lcx_exception. METHODS get_favorites RETURNING VALUE(rt_favorites) TYPE tt_favorites RAISING lcx_exception. METHODS toggle_favorite IMPORTING iv_repo_key TYPE lcl_persistence_repo=>ty_repo-key RAISING lcx_exception. METHODS is_favorite_repo IMPORTING iv_repo_key TYPE lcl_persistence_repo=>ty_repo-key RETURNING VALUE(rv_yes) TYPE abap_bool RAISING lcx_exception. PRIVATE SECTION. CONSTANTS c_type_user TYPE lcl_persistence_db=>ty_type VALUE 'USER'. DATA: mv_user TYPE xubname. TYPES: BEGIN OF ty_repo_config, url TYPE lcl_persistence_repo=>ty_repo-url, login TYPE string, git_user TYPE ty_git_user, END OF ty_repo_config. TYPES: ty_repo_config_tt TYPE STANDARD TABLE OF ty_repo_config WITH DEFAULT KEY. TYPES: BEGIN OF ty_user, default_git_user TYPE ty_git_user, repo_show TYPE lcl_persistence_repo=>ty_repo-key, repo_config TYPE ty_repo_config_tt, hide_files TYPE abap_bool, changes_only TYPE abap_bool, diff_unified TYPE abap_bool, favorites TYPE tt_favorites, END OF ty_user. METHODS constructor IMPORTING iv_user TYPE xubname DEFAULT sy-uname. METHODS from_xml IMPORTING iv_xml TYPE string RETURNING VALUE(rs_user) TYPE ty_user RAISING lcx_exception. METHODS to_xml IMPORTING is_user TYPE ty_user RETURNING VALUE(rv_xml) TYPE string. METHODS read RETURNING VALUE(rs_user) TYPE ty_user RAISING lcx_exception. METHODS update IMPORTING is_user TYPE ty_user RAISING lcx_exception. METHODS read_repo_config IMPORTING iv_url TYPE lcl_persistence_repo=>ty_repo-url RETURNING VALUE(rs_repo_config) TYPE ty_repo_config RAISING lcx_exception. METHODS update_repo_config IMPORTING iv_url TYPE lcl_persistence_repo=>ty_repo-url is_repo_config TYPE ty_repo_config RAISING lcx_exception. ENDCLASS. "lcl_persistence_user DEFINITION CLASS lcl_persistence_user IMPLEMENTATION. METHOD constructor. mv_user = iv_user. ENDMETHOD. METHOD from_xml. DATA: lv_xml TYPE string. lv_xml = iv_xml. * fix downward compatibility REPLACE ALL OCCURRENCES OF '<_--28C_TYPE_USER_--29>' IN lv_xml WITH '<USER>'. REPLACE ALL OCCURRENCES OF '</_--28C_TYPE_USER_--29>' IN lv_xml WITH '</USER>'. CALL TRANSFORMATION id OPTIONS value_handling = 'accept_data_loss' SOURCE XML lv_xml RESULT user = rs_user ##NO_TEXT. ENDMETHOD. METHOD to_xml. CALL TRANSFORMATION id SOURCE user = is_user RESULT XML rv_xml. ENDMETHOD. METHOD read. DATA: lv_xml TYPE string. TRY. lv_xml = lcl_app=>db( )->read( iv_type = c_type_user iv_value = mv_user ). CATCH lcx_not_found. RETURN. ENDTRY. rs_user = from_xml( lv_xml ). ENDMETHOD. METHOD set_repo_show. DATA: ls_user TYPE ty_user. ls_user = read( ). ls_user-repo_show = iv_key. update( ls_user ). COMMIT WORK AND WAIT. ENDMETHOD. METHOD get_repo_show. rv_key = read( )-repo_show. ENDMETHOD. METHOD update. DATA: lv_xml TYPE string. lv_xml = to_xml( is_user ). lcl_app=>db( )->modify( iv_type = c_type_user iv_value = mv_user iv_data = lv_xml ). ENDMETHOD. METHOD set_default_git_user_name. DATA: ls_user TYPE ty_user. ls_user = read( ). ls_user-default_git_user-name = iv_username. update( ls_user ). ENDMETHOD. METHOD get_default_git_user_name. rv_username = read( )-default_git_user-name. ENDMETHOD. METHOD set_default_git_user_email. DATA: ls_user TYPE ty_user. ls_user = read( ). ls_user-default_git_user-email = iv_email. update( ls_user ). ENDMETHOD. METHOD get_default_git_user_email. rv_email = read( )-default_git_user-email. ENDMETHOD. METHOD read_repo_config. DATA: lt_repo_config TYPE ty_repo_config_tt, lv_key TYPE string. lv_key = to_lower( iv_url ). lt_repo_config = read( )-repo_config. READ TABLE lt_repo_config INTO rs_repo_config WITH KEY url = lv_key. ENDMETHOD. "read_repo_config METHOD update_repo_config. DATA: ls_user TYPE ty_user, lv_key TYPE string. FIELD-SYMBOLS <repo_config> TYPE ty_repo_config. ls_user = read( ). lv_key = to_lower( iv_url ). READ TABLE ls_user-repo_config ASSIGNING <repo_config> WITH KEY url = lv_key. IF sy-subrc IS NOT INITIAL. APPEND INITIAL LINE TO ls_user-repo_config ASSIGNING <repo_config>. ENDIF. <repo_config> = is_repo_config. <repo_config>-url = lv_key. update( ls_user ). ENDMETHOD. "update_repo_config METHOD set_repo_git_user_name. DATA: ls_repo_config TYPE ty_repo_config. ls_repo_config = read_repo_config( iv_url ). ls_repo_config-git_user-name = iv_username. update_repo_config( iv_url = iv_url is_repo_config = ls_repo_config ). ENDMETHOD. "set_repo_username METHOD get_repo_git_user_name. rv_username = read_repo_config( iv_url )-git_user-name. ENDMETHOD. "get_repo_username METHOD set_repo_login. DATA: ls_repo_config TYPE ty_repo_config. ls_repo_config = read_repo_config( iv_url ). ls_repo_config-login = iv_login. update_repo_config( iv_url = iv_url is_repo_config = ls_repo_config ). ENDMETHOD. "set_repo_login METHOD get_repo_login. rv_login = read_repo_config( iv_url )-login. ENDMETHOD. "get_repo_login METHOD set_repo_git_user_email. DATA: ls_repo_config TYPE ty_repo_config. ls_repo_config = read_repo_config( iv_url ). ls_repo_config-git_user-email = iv_email. update_repo_config( iv_url = iv_url is_repo_config = ls_repo_config ). ENDMETHOD. "set_repo_email METHOD get_repo_git_user_email. rv_email = read_repo_config( iv_url )-git_user-email. ENDMETHOD. "get_repo_email METHOD toggle_hide_files. DATA ls_user TYPE ty_user. ls_user = read( ). ls_user-hide_files = boolc( ls_user-hide_files = abap_false ). update( ls_user ). rv_hide = ls_user-hide_files. ENDMETHOD. "toggle_hide_files METHOD get_hide_files. rv_hide = read( )-hide_files. ENDMETHOD. "get_hide_files METHOD toggle_changes_only. DATA ls_user TYPE ty_user. ls_user = read( ). ls_user-changes_only = boolc( ls_user-changes_only = abap_false ). update( ls_user ). rv_changes_only = ls_user-changes_only. ENDMETHOD. "toggle_changes_only METHOD get_changes_only. rv_changes_only = read( )-changes_only. ENDMETHOD. "get_changes_only METHOD toggle_diff_unified. DATA ls_user TYPE ty_user. ls_user = read( ). ls_user-diff_unified = boolc( ls_user-diff_unified = abap_false ). update( ls_user ). rv_diff_unified = ls_user-diff_unified. ENDMETHOD. "toggle_diff_unified METHOD get_diff_unified. rv_diff_unified = read( )-diff_unified. ENDMETHOD. "get_diff_unified METHOD get_favorites. rt_favorites = read( )-favorites. ENDMETHOD. "get_favorites METHOD toggle_favorite. DATA: ls_user TYPE ty_user. ls_user = read( ). READ TABLE ls_user-favorites TRANSPORTING NO FIELDS WITH KEY table_line = iv_repo_key. IF sy-subrc = 0. DELETE ls_user-favorites INDEX sy-tabix. ELSE. APPEND iv_repo_key TO ls_user-favorites. ENDIF. update( ls_user ). ENDMETHOD. " toggle_favorite. METHOD is_favorite_repo. DATA: lt_favorites TYPE tt_favorites. lt_favorites = get_favorites( ). READ TABLE lt_favorites TRANSPORTING NO FIELDS WITH KEY table_line = iv_repo_key. rv_yes = boolc( sy-subrc = 0 ). ENDMETHOD. " is_favorite_repo. ENDCLASS. *----------------------------------------------------------------------* * CLASS lcl_persistence_db *----------------------------------------------------------------------* CLASS lcl_persistence_db IMPLEMENTATION. METHOD list_by_type. SELECT * FROM (c_tabname) INTO TABLE rt_content WHERE type = iv_type. "#EC CI_SUBRC ENDMETHOD. METHOD list. SELECT * FROM (c_tabname) INTO TABLE rt_content. "#EC CI_SUBRC ENDMETHOD. METHOD lock. CALL FUNCTION 'ENQUEUE_EZABAPGIT' EXPORTING mode_zabapgit = iv_mode type = iv_type value = iv_value EXCEPTIONS foreign_lock = 1 system_failure = 2 OTHERS = 3. IF sy-subrc <> 0. lcx_exception=>raise( |Could not aquire lock { iv_type } { iv_value }| ). ENDIF. * trigger dummy update task to automatically release locks at commit CALL FUNCTION 'BANK_OBJ_WORKL_RELEASE_LOCKS' IN UPDATE TASK. ENDMETHOD. METHOD add. DATA ls_table TYPE ty_content. ls_table-type = iv_type. ls_table-value = iv_value. ls_table-data_str = iv_data. INSERT (c_tabname) FROM ls_table. "#EC CI_SUBRC ASSERT sy-subrc = 0. ENDMETHOD. METHOD delete. lock( iv_type = iv_type iv_value = iv_value ). DELETE FROM (c_tabname) WHERE type = iv_type AND value = iv_value. IF sy-subrc <> 0. lcx_exception=>raise( 'DB Delete failed' ). ENDIF. ENDMETHOD. METHOD validate_and_unprettify_xml. rv_xml = lcl_xml_pretty=>print( iv_xml = iv_xml iv_unpretty = abap_true iv_ignore_errors = abap_false ). ENDMETHOD. " validate_and_unprettify_xml METHOD update. DATA lv_data LIKE iv_data. lv_data = validate_and_unprettify_xml( iv_data ). lock( iv_type = iv_type iv_value = iv_value ). UPDATE (c_tabname) SET data_str = lv_data WHERE type = iv_type AND value = iv_value. IF sy-subrc <> 0. lcx_exception=>raise( 'DB update failed' ). ENDIF. ENDMETHOD. "update METHOD modify. DATA: ls_content TYPE ty_content. lock( iv_type = iv_type iv_value = iv_value ). ls_content-type = iv_type. ls_content-value = iv_value. ls_content-data_str = iv_data. MODIFY (c_tabname) FROM ls_content. IF sy-subrc <> 0. lcx_exception=>raise( 'DB modify failed' ). ENDIF. ENDMETHOD. METHOD read. SELECT SINGLE data_str FROM (c_tabname) INTO rv_data WHERE type = iv_type AND value = iv_value. "#EC CI_SUBRC IF sy-subrc <> 0. RAISE EXCEPTION TYPE lcx_not_found. ENDIF. ENDMETHOD. ENDCLASS. *----------------------------------------------------------------------* * CLASS lcl_persistence_repo *----------------------------------------------------------------------* CLASS lcl_persistence_repo IMPLEMENTATION. METHOD add. DATA: ls_repo TYPE ty_repo, lv_repo_as_xml TYPE string. ls_repo-url = iv_url. ls_repo-branch_name = iv_branch_name. ls_repo-sha1 = iv_branch. ls_repo-package = iv_package. ls_repo-offline = iv_offline. ls_repo-master_language = sy-langu. lv_repo_as_xml = to_xml( ls_repo ). rv_key = get_next_id( ). mo_db->add( iv_type = c_type_repo iv_value = rv_key iv_data = lv_repo_as_xml ). ENDMETHOD. METHOD delete. DATA: lo_background TYPE REF TO lcl_persistence_background. CREATE OBJECT lo_background. lo_background->delete( iv_key ). mo_db->delete( iv_type = c_type_repo iv_value = iv_key ). ENDMETHOD. METHOD update_local_checksums. DATA: lt_content TYPE lcl_persistence_db=>tt_content, ls_content LIKE LINE OF lt_content, ls_repo TYPE ty_repo. ASSERT NOT iv_key IS INITIAL. TRY. ls_repo = read( iv_key ). CATCH lcx_not_found. lcx_exception=>raise( 'key not found' ). ENDTRY. ls_repo-local_checksums = it_checksums. ls_content-data_str = to_xml( ls_repo ). mo_db->update( iv_type = c_type_repo iv_value = iv_key iv_data = ls_content-data_str ). ENDMETHOD. METHOD update_url. DATA: lt_content TYPE lcl_persistence_db=>tt_content, ls_content LIKE LINE OF lt_content, ls_repo TYPE ty_repo. IF iv_url IS INITIAL. lcx_exception=>raise( 'update, url empty' ). ENDIF. ASSERT NOT iv_key IS INITIAL. TRY. ls_repo = read( iv_key ). CATCH lcx_not_found. lcx_exception=>raise( 'key not found' ). ENDTRY. ls_repo-url = iv_url. ls_content-data_str = to_xml( ls_repo ). mo_db->update( iv_type = c_type_repo iv_value = iv_key iv_data = ls_content-data_str ). ENDMETHOD. METHOD update_branch_name. DATA: lt_content TYPE lcl_persistence_db=>tt_content, ls_content LIKE LINE OF lt_content, ls_repo TYPE ty_repo. ASSERT NOT iv_key IS INITIAL. TRY. ls_repo = read( iv_key ). CATCH lcx_not_found. lcx_exception=>raise( 'key not found' ). ENDTRY. ls_repo-branch_name = iv_branch_name. ls_content-data_str = to_xml( ls_repo ). mo_db->update( iv_type = c_type_repo iv_value = iv_key iv_data = ls_content-data_str ). ENDMETHOD. METHOD update_head_branch. DATA: lt_content TYPE lcl_persistence_db=>tt_content, ls_content LIKE LINE OF lt_content, ls_repo TYPE ty_repo. ASSERT NOT iv_key IS INITIAL. TRY. ls_repo = read( iv_key ). CATCH lcx_not_found. lcx_exception=>raise( 'key not found' ). ENDTRY. ls_repo-head_branch = iv_head_branch. ls_content-data_str = to_xml( ls_repo ). mo_db->update( iv_type = c_type_repo iv_value = iv_key iv_data = ls_content-data_str ). ENDMETHOD. "update_head_branch METHOD update_offline. DATA: lt_content TYPE lcl_persistence_db=>tt_content, ls_content LIKE LINE OF lt_content, ls_repo TYPE ty_repo. ASSERT NOT iv_key IS INITIAL. TRY. ls_repo = read( iv_key ). CATCH lcx_not_found. lcx_exception=>raise( 'key not found' ). ENDTRY. ls_repo-offline = iv_offline. ls_content-data_str = to_xml( ls_repo ). mo_db->update( iv_type = c_type_repo iv_value = iv_key iv_data = ls_content-data_str ). ENDMETHOD. "update_offline METHOD update_sha1. DATA: lt_content TYPE lcl_persistence_db=>tt_content, ls_content LIKE LINE OF lt_content, ls_repo TYPE ty_repo. ASSERT NOT iv_key IS INITIAL. TRY. ls_repo = read( iv_key ). CATCH lcx_not_found. lcx_exception=>raise( 'key not found' ). ENDTRY. ls_repo-sha1 = iv_branch_sha1. ls_content-data_str = to_xml( ls_repo ). mo_db->update( iv_type = c_type_repo iv_value = iv_key iv_data = ls_content-data_str ). ENDMETHOD. METHOD read. DATA lt_repo TYPE tt_repo. lt_repo = list( ). READ TABLE lt_repo INTO rs_repo WITH KEY key = iv_key. IF sy-subrc <> 0. RAISE EXCEPTION TYPE lcx_not_found. ENDIF. ENDMETHOD. METHOD get_next_id. * todo: Lock the complete persistence in order to prevent concurrent repo-creation * however the current approach will most likely work in almost all cases DATA: lt_content TYPE lcl_persistence_db=>tt_content. FIELD-SYMBOLS: <ls_content> LIKE LINE OF lt_content. rv_next_repo_id = 1. lt_content = mo_db->list_by_type( c_type_repo ). LOOP AT lt_content ASSIGNING <ls_content>. IF <ls_content>-value >= rv_next_repo_id. rv_next_repo_id = <ls_content>-value + 1. ENDIF. ENDLOOP. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = rv_next_repo_id IMPORTING output = rv_next_repo_id. ENDMETHOD. METHOD list. DATA: lt_content TYPE lcl_persistence_db=>tt_content, ls_content LIKE LINE OF lt_content, ls_repo LIKE LINE OF rt_repos. lt_content = mo_db->list_by_type( c_type_repo ). LOOP AT lt_content INTO ls_content. MOVE-CORRESPONDING from_xml( ls_content-data_str ) TO ls_repo. ls_repo-key = ls_content-value. INSERT ls_repo INTO TABLE rt_repos. ENDLOOP. ENDMETHOD. METHOD from_xml. DATA: lv_xml TYPE string. lv_xml = iv_repo_xml_string. * fix downward compatibility REPLACE ALL OCCURRENCES OF '<_--28C_TYPE_REPO_--29>' IN lv_xml WITH '<REPO>'. REPLACE ALL OCCURRENCES OF '</_--28C_TYPE_REPO_--29>' IN lv_xml WITH '</REPO>'. CALL TRANSFORMATION id OPTIONS value_handling = 'accept_data_loss' SOURCE XML lv_xml RESULT repo = rs_repo ##NO_TEXT. IF rs_repo IS INITIAL. lcx_exception=>raise( 'Inconsistent repo metadata' ). ENDIF. * field master_language is new, so default it for old repositories IF rs_repo-master_language IS INITIAL. rs_repo-master_language = sy-langu. ENDIF. ENDMETHOD. METHOD to_xml. DATA: ls_xml TYPE ty_repo_xml. MOVE-CORRESPONDING is_repo TO ls_xml. CALL TRANSFORMATION id SOURCE repo = ls_xml RESULT XML rv_repo_xml_string. ENDMETHOD. METHOD constructor. mo_db = lcl_app=>db( ). ENDMETHOD. METHOD lock. mo_db->lock( iv_mode = iv_mode iv_type = c_type_repo iv_value = iv_key ). ENDMETHOD. ENDCLASS. CLASS lcl_persistence_migrate IMPLEMENTATION. METHOD run. IF table_exists( ) = abap_false. table_create( ). ENDIF. IF lock_exists( ) = abap_false. lock_create( ). migrate_repo( ). migrate_user( ). ENDIF. ENDMETHOD. METHOD migrate_repo. DATA: lt_repo TYPE lcl_persistence=>ty_repos_persi_tt, lo_repo TYPE REF TO lcl_persistence, lo_new TYPE REF TO lcl_persistence_repo, ls_repo LIKE LINE OF lt_repo. CREATE OBJECT lo_repo. CREATE OBJECT lo_new. lt_repo = lo_repo->list( ). LOOP AT lt_repo INTO ls_repo. lo_new->add( iv_url = ls_repo-url iv_branch_name = ls_repo-branch_name iv_branch = ls_repo-sha1 iv_package = ls_repo-package iv_offline = ls_repo-offline ). ENDLOOP. ENDMETHOD. METHOD migrate_user. DATA: lo_user TYPE REF TO lcl_persistence_user, lt_users TYPE lcl_user=>ty_user_tt. FIELD-SYMBOLS: <ls_user> LIKE LINE OF lt_users. lt_users = lcl_user=>list( ). LOOP AT lt_users ASSIGNING <ls_user>. lo_user = lcl_app=>user( <ls_user>-user ). lo_user->set_default_git_user_name( <ls_user>-username ). lo_user->set_default_git_user_email( <ls_user>-email ). ENDLOOP. ENDMETHOD. METHOD lock_exists. DATA: lv_viewname TYPE dd25l-viewname. SELECT SINGLE viewname FROM dd25l INTO lv_viewname WHERE viewname = lcl_persistence_db=>c_lock. rv_exists = boolc( sy-subrc = 0 ). 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 = lcl_persistence_db=>c_lock. ls_dd25v-aggtype = 'E'. ls_dd25v-roottab = lcl_persistence_db=>c_tabname. ls_dd25v-ddlanguage = gc_english. ls_dd25v-ddtext = c_text. APPEND INITIAL LINE TO lt_dd26e ASSIGNING <ls_dd26e>. <ls_dd26e>-viewname = lcl_persistence_db=>c_lock. <ls_dd26e>-tabname = lcl_persistence_db=>c_tabname. <ls_dd26e>-tabpos = '0001'. <ls_dd26e>-fortabname = lcl_persistence_db=>c_tabname. <ls_dd26e>-enqmode = 'E'. APPEND INITIAL LINE TO lt_dd27p ASSIGNING <ls_dd27p>. <ls_dd27p>-viewname = lcl_persistence_db=>c_lock. <ls_dd27p>-objpos = '0001'. <ls_dd27p>-viewfield = 'TYPE'. <ls_dd27p>-tabname = lcl_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 = lcl_persistence_db=>c_lock. <ls_dd27p>-objpos = '0002'. <ls_dd27p>-viewfield = 'VALUE'. <ls_dd27p>-tabname = lcl_persistence_db=>c_tabname. <ls_dd27p>-fieldname = 'VALUE'. <ls_dd27p>-keyflag = abap_true. CALL FUNCTION 'DDIF_ENQU_PUT' EXPORTING name = lcl_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. lcx_exception=>raise( 'migrate, error from DDIF_ENQU_PUT' ). ENDIF. lv_obj_name = lcl_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. lcx_exception=>raise( 'migrate, error from TR_TADIR_INTERFACE' ). ENDIF. CALL FUNCTION 'DDIF_ENQU_ACTIVATE' EXPORTING name = lcl_persistence_db=>c_lock EXCEPTIONS not_found = 1 put_failure = 2 OTHERS = 3. IF sy-subrc <> 0. lcx_exception=>raise( 'migrate, error from DDIF_ENQU_ACTIVATE' ). ENDIF. ENDMETHOD. METHOD table_exists. DATA: lv_tabname TYPE dd02l-tabname. SELECT SINGLE tabname FROM dd02l INTO lv_tabname WHERE tabname = lcl_persistence_db=>c_tabname. rv_exists = boolc( sy-subrc = 0 ). 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 = lcl_persistence_db=>c_tabname. ls_dd02v-ddlanguage = gc_english. ls_dd02v-tabclass = 'TRANSP'. ls_dd02v-ddtext = c_text. ls_dd02v-contflag = 'A'. ls_dd02v-exclass = '1'. ls_dd09l-tabname = lcl_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 = lcl_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 = lcl_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 = lcl_persistence_db=>c_tabname. <ls_dd03p>-fieldname = 'DATA_STR'. <ls_dd03p>-position = '0003'. <ls_dd03p>-datatype = 'STRG'. CALL FUNCTION 'DDIF_TABL_PUT' EXPORTING name = lcl_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. lcx_exception=>raise( 'migrate, error from DDIF_TABL_PUT' ). ENDIF. lv_obj_name = lcl_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. lcx_exception=>raise( 'migrate, error from TR_TADIR_INTERFACE' ). ENDIF. CALL FUNCTION 'DDIF_TABL_ACTIVATE' EXPORTING name = lcl_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. lcx_exception=>raise( 'migrate, error from DDIF_TABL_ACTIVATE' ). ENDIF. ENDMETHOD. ENDCLASS. CLASS lcl_settings DEFINITION FINAL. PUBLIC SECTION. METHODS set_proxy_url IMPORTING iv_url TYPE string. METHODS set_proxy_port IMPORTING iv_port TYPE string. METHODS get_proxy_url RETURNING VALUE(rv_proxy_url) TYPE string. METHODS get_proxy_port RETURNING VALUE(rv_port) TYPE string. METHODS set_run_critical_tests IMPORTING iv_run TYPE abap_bool. METHODS get_run_critical_tests RETURNING VALUE(rv_run) TYPE abap_bool. METHODS set_max_lines IMPORTING iv_lines TYPE i. METHODS get_max_lines RETURNING VALUE(rv_lines) TYPE i. PRIVATE SECTION. DATA mv_proxy_url TYPE string. DATA mv_proxy_port TYPE string. DATA mv_run_critical_tests TYPE abap_bool. DATA mv_lines TYPE i. ENDCLASS. CLASS lcl_settings IMPLEMENTATION. METHOD set_proxy_url. mv_proxy_url = iv_url. ENDMETHOD. METHOD get_proxy_url. rv_proxy_url = mv_proxy_url. ENDMETHOD. METHOD set_proxy_port. mv_proxy_port = iv_port. ENDMETHOD. METHOD get_proxy_port. rv_port = mv_proxy_port. ENDMETHOD. METHOD set_run_critical_tests. mv_run_critical_tests = iv_run. ENDMETHOD. METHOD get_run_critical_tests. rv_run = mv_run_critical_tests. ENDMETHOD. METHOD get_max_lines. rv_lines = mv_lines. ENDMETHOD. METHOD set_max_lines. mv_lines = iv_lines. ENDMETHOD. ENDCLASS. CLASS lcl_persistence_settings DEFINITION FINAL. PUBLIC SECTION. METHODS modify IMPORTING io_settings TYPE REF TO lcl_settings RAISING lcx_exception. METHODS read RETURNING VALUE(ro_settings) TYPE REF TO lcl_settings. ENDCLASS. CLASS lcl_persistence_settings IMPLEMENTATION. METHOD modify. lcl_app=>db( )->modify( iv_type = 'SETTINGS' iv_value = 'PROXY_URL' iv_data = io_settings->get_proxy_url( ) ). lcl_app=>db( )->modify( iv_type = 'SETTINGS' iv_value = 'PROXY_PORT' iv_data = io_settings->get_proxy_port( ) ). lcl_app=>db( )->modify( iv_type = 'SETTINGS' iv_value = 'CRIT_TESTS' iv_data = io_settings->get_run_critical_tests( ) ). lcl_app=>db( )->modify( iv_type = 'SETTINGS' iv_value = 'MAX_LINES' iv_data = |{ io_settings->get_max_lines( ) }| ). ENDMETHOD. METHOD read. DATA: lv_critical_tests_as_string TYPE string, lv_critical_tests_as_boolean TYPE abap_bool, lv_max_lines_as_string TYPE string, lv_max_lines_as_integer TYPE i. CREATE OBJECT ro_settings. TRY. ro_settings->set_proxy_url( lcl_app=>db( )->read( iv_type = 'SETTINGS' iv_value = 'PROXY_URL' ) ). CATCH lcx_not_found. ro_settings->set_proxy_url( '' ). ENDTRY. TRY. ro_settings->set_proxy_port( lcl_app=>db( )->read( iv_type = 'SETTINGS' iv_value = 'PROXY_PORT' ) ). CATCH lcx_not_found. ro_settings->set_proxy_port( '' ). ENDTRY. TRY. lv_critical_tests_as_string = lcl_app=>db( )->read( iv_type = 'SETTINGS' iv_value = 'CRIT_TESTS' ). lv_critical_tests_as_boolean = lv_critical_tests_as_string. ro_settings->set_run_critical_tests( lv_critical_tests_as_boolean ). CATCH lcx_not_found. ro_settings->set_run_critical_tests( abap_false ). ENDTRY. TRY. lv_max_lines_as_string = lcl_app=>db( )->read( iv_type = 'SETTINGS' iv_value = 'MAX_LINES' ). lv_max_lines_as_integer = lv_max_lines_as_string. ro_settings->set_max_lines( lv_max_lines_as_integer ). CATCH lcx_not_found. ro_settings->set_max_lines( 500 ). " default ENDTRY. 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, 47, 4877, 8808, 18310, 198, 9, 5, 10097, 30934, 9, 198, 198, 31631, 300, 565, 62, 19276, 13274, 62, 76, 42175, 5550, 20032, 17941, 25261, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 42715, 12, 49273, 50, 25, 1057, 17926, 1797, 2751, 300, 66, 87, 62, 1069, 4516, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 25, 198, 220, 220, 220, 220, 220, 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, 25, 198, 220, 220, 220, 220, 220, 32492, 62, 260, 7501, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 300, 66, 87, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 32492, 62, 7220, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 300, 66, 87, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 3084, 62, 17953, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 300, 66, 87, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 3084, 62, 1069, 1023, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 81, 85, 62, 1069, 1023, 8, 41876, 450, 499, 62, 30388, 11, 198, 220, 220, 220, 220, 220, 5793, 62, 17953, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 300, 66, 87, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 5793, 62, 1069, 1023, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 81, 85, 62, 1069, 1023, 8, 41876, 450, 499, 62, 30388, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 300, 565, 62, 19276, 13274, 62, 9945, 5550, 20032, 17941, 25261, 29244, 6158, 4810, 3824, 6158, 48167, 1677, 5258, 300, 565, 62, 1324, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 25, 198, 220, 220, 220, 220, 220, 269, 62, 8658, 3672, 41876, 7400, 3672, 26173, 8924, 705, 57, 6242, 2969, 38, 2043, 3256, 198, 220, 220, 220, 220, 220, 269, 62, 5354, 220, 220, 220, 41876, 1570, 3672, 26173, 8924, 705, 36, 57, 6242, 2969, 38, 2043, 4458, 628, 220, 220, 220, 24412, 47, 1546, 25, 1259, 62, 4906, 220, 41876, 269, 406, 49494, 1105, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 1259, 62, 8367, 41876, 269, 406, 49494, 1105, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 347, 43312, 3963, 1259, 62, 11299, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 220, 220, 220, 220, 41876, 1259, 62, 4906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 220, 220, 220, 41876, 1259, 62, 8367, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 62, 2536, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 11299, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 83, 62, 11299, 41876, 311, 9863, 1961, 43679, 3963, 1259, 62, 11299, 13315, 4725, 33866, 8924, 35374, 2099, 1988, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 1351, 62, 1525, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 4906, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1259, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 17034, 62, 11299, 8, 41876, 256, 83, 62, 11299, 11, 198, 220, 220, 220, 220, 220, 1351, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 17034, 62, 11299, 8, 41876, 256, 83, 62, 11299, 11, 198, 220, 220, 220, 220, 220, 751, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 4906, 220, 41876, 1259, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 8367, 41876, 1259, 62, 11299, 12, 8367, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 7890, 220, 41876, 1259, 62, 11299, 12, 7890, 62, 2536, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 300, 66, 87, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 12233, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 4906, 220, 41876, 1259, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 8367, 41876, 1259, 62, 11299, 12, 8367, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 300, 66, 87, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 4296, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 4906, 220, 41876, 1259, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 8367, 41876, 1259, 62, 11299, 12, 8367, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 7890, 220, 41876, 1259, 62, 11299, 12, 7890, 62, 2536, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 300, 66, 87, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 13096, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 4906, 220, 41876, 1259, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 8367, 41876, 1259, 62, 11299, 12, 8367, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 7890, 220, 41876, 1259 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
CLASS ltcl_diff DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. DATA: mt_new TYPE TABLE OF string, mt_old TYPE TABLE OF string, mt_expected TYPE zif_abapgit_definitions=>ty_diffs_tt. METHODS: add_new IMPORTING iv_new TYPE string, add_old IMPORTING iv_old TYPE string, add_expected IMPORTING iv_new_num TYPE zif_abapgit_definitions=>ty_diff-new_num iv_new TYPE zif_abapgit_definitions=>ty_diff-new iv_result TYPE zif_abapgit_definitions=>ty_diff-result iv_old_num TYPE zif_abapgit_definitions=>ty_diff-old_num iv_old TYPE zif_abapgit_definitions=>ty_diff-old iv_beacon TYPE zif_abapgit_definitions=>ty_diff-beacon DEFAULT zcl_abapgit_diff=>co_starting_beacon. METHODS: setup. METHODS: test IMPORTING !iv_ignore_indentation TYPE abap_bool DEFAULT abap_false !iv_ignore_comments TYPE abap_bool DEFAULT abap_false !iv_ignore_case TYPE abap_bool DEFAULT abap_false. METHODS: diff01 FOR TESTING, diff02 FOR TESTING, diff03 FOR TESTING, diff04 FOR TESTING, diff05 FOR TESTING, diff06 FOR TESTING, diff07 FOR TESTING, diff08 FOR TESTING, diff09 FOR TESTING, diff10 FOR TESTING, diff11 FOR TESTING, diff12 FOR TESTING, diff13 FOR TESTING. ENDCLASS. CLASS ltcl_diff IMPLEMENTATION. METHOD add_new. DATA lv_new LIKE LINE OF mt_new. lv_new = iv_new. APPEND lv_new TO mt_new. ENDMETHOD. METHOD add_old. DATA lv_old LIKE LINE OF mt_old. lv_old = iv_old. APPEND lv_old TO mt_old. ENDMETHOD. METHOD add_expected. DATA ls_expected LIKE LINE OF mt_expected. ls_expected-new_num = iv_new_num. ls_expected-new = iv_new. ls_expected-result = iv_result. ls_expected-old_num = iv_old_num. ls_expected-old = iv_old. ls_expected-beacon = iv_beacon. APPEND ls_expected TO mt_expected. ENDMETHOD. METHOD setup. CLEAR mt_new. CLEAR mt_old. CLEAR mt_expected. ENDMETHOD. METHOD test. DATA: lv_new TYPE string, lv_xnew TYPE xstring, lv_old TYPE string, lv_xold TYPE xstring, lo_diff TYPE REF TO zcl_abapgit_diff, lt_diff TYPE zif_abapgit_definitions=>ty_diffs_tt. FIELD-SYMBOLS: <ls_diff> LIKE LINE OF lt_diff. CONCATENATE LINES OF mt_new INTO lv_new SEPARATED BY zif_abapgit_definitions=>c_newline. CONCATENATE LINES OF mt_old INTO lv_old SEPARATED BY zif_abapgit_definitions=>c_newline. lv_xnew = zcl_abapgit_convert=>string_to_xstring_utf8( lv_new ). lv_xold = zcl_abapgit_convert=>string_to_xstring_utf8( lv_old ). CREATE OBJECT lo_diff EXPORTING iv_new = lv_xnew iv_old = lv_xold iv_ignore_indentation = iv_ignore_indentation iv_ignore_comments = iv_ignore_comments iv_ignore_case = iv_ignore_case. lt_diff = lo_diff->get( ). LOOP AT lt_diff ASSIGNING <ls_diff>. CLEAR <ls_diff>-short. ENDLOOP. cl_abap_unit_assert=>assert_equals( act = lt_diff exp = mt_expected ). ENDMETHOD. METHOD diff01. "insert add_new( iv_new = 'A' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = zif_abapgit_definitions=>c_diff-insert iv_old_num = '' iv_old = '' ). test( ). ENDMETHOD. METHOD diff02. " identical add_new( iv_new = 'A' ). add_old( iv_old = 'A' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). test( ). ENDMETHOD. METHOD diff03. " delete add_old( iv_old = 'A' ). add_expected( iv_new_num = '' iv_new = '' iv_result = zif_abapgit_definitions=>c_diff-delete iv_old_num = ' 1' iv_old = 'A' ). test( ). ENDMETHOD. METHOD diff04. " update add_new( iv_new = 'A+' ). add_old( iv_old = 'A' ). add_expected( iv_new_num = ' 1' iv_new = 'A+' iv_result = zif_abapgit_definitions=>c_diff-update iv_old_num = ' 1' iv_old = 'A' ). test( ). ENDMETHOD. METHOD diff05. " identical add_new( iv_new = 'A' ). add_new( iv_new = 'B' ). add_old( iv_old = 'A' ). add_old( iv_old = 'B' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = 'B' iv_result = '' iv_old_num = ' 2' iv_old = 'B' ). test( ). ENDMETHOD. METHOD diff06. " mixed add_new( iv_new = 'A' ). add_new( iv_new = 'B' ). add_new( iv_new = 'inserted' ). add_new( iv_new = 'C' ). add_new( iv_new = 'D update' ). add_old( iv_old = 'A' ). add_old( iv_old = 'B' ). add_old( iv_old = 'C' ). add_old( iv_old = 'D' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = 'B' iv_result = '' iv_old_num = ' 2' iv_old = 'B' ). add_expected( iv_new_num = ' 3' iv_new = 'inserted' iv_result = zif_abapgit_definitions=>c_diff-insert iv_old_num = '' iv_old = '' ). add_expected( iv_new_num = ' 4' iv_new = 'C' iv_result = '' iv_old_num = ' 3' iv_old = 'C' ). add_expected( iv_new_num = ' 5' iv_new = 'D update' iv_result = zif_abapgit_definitions=>c_diff-update iv_old_num = ' 4' iv_old = 'D' ). test( ). ENDMETHOD. METHOD diff07. " ignore indentation add_new( iv_new = 'A' ). add_new( iv_new = ' B' ). " changed indent add_new( iv_new = 'C' ). add_new( iv_new = ' D' ). " changed indent add_old( iv_old = 'A' ). add_old( iv_old = 'B' ). add_old( iv_old = 'C' ). add_old( iv_old = 'D' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = ' B' iv_result = '' " no diff! iv_old_num = ' 2' iv_old = 'B' ). add_expected( iv_new_num = ' 3' iv_new = 'C' iv_result = '' iv_old_num = ' 3' iv_old = 'C' ). add_expected( iv_new_num = ' 4' iv_new = ' D' iv_result = '' " no diff! iv_old_num = ' 4' iv_old = 'D' ). test( iv_ignore_indentation = abap_true ). ENDMETHOD. METHOD diff08. " ignore comments add_new( iv_new = 'A' ). add_new( iv_new = '* X' ). " changed comment add_new( iv_new = 'C' ). add_new( iv_new = 'D " new' ). " changed comment add_old( iv_old = 'A' ). add_old( iv_old = '* B' ). add_old( iv_old = 'C' ). add_old( iv_old = 'D " old' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = '* X' iv_result = '' " no diff! iv_old_num = ' 2' iv_old = '* B' ). add_expected( iv_new_num = ' 3' iv_new = 'C' iv_result = '' iv_old_num = ' 3' iv_old = 'C' ). add_expected( iv_new_num = ' 4' iv_new = 'D " new' iv_result = '' " no diff! iv_old_num = ' 4' iv_old = 'D " old' ). test( iv_ignore_comments = abap_true ). ENDMETHOD. METHOD diff09. " ignore case add_new( iv_new = 'A' ). add_new( iv_new = 'b' ). " changed case add_new( iv_new = 'c' ). add_new( iv_new = 'D' ). " changed case add_old( iv_old = 'A' ). add_old( iv_old = 'B' ). add_old( iv_old = 'c' ). add_old( iv_old = 'd' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = 'b' iv_result = '' " no diff! iv_old_num = ' 2' iv_old = 'B' ). add_expected( iv_new_num = ' 3' iv_new = 'c' iv_result = '' iv_old_num = ' 3' iv_old = 'c' ). add_expected( iv_new_num = ' 4' iv_new = 'D' iv_result = '' " no diff! iv_old_num = ' 4' iv_old = 'd' ). test( iv_ignore_case = abap_true ). ENDMETHOD. METHOD diff10. " ignore case should NOT ignore changed literals add_new( iv_new = `WRITE 'TEST'` ). add_old( iv_old = `WRITE 'test'` ). add_expected( iv_new_num = ' 1' iv_new = `WRITE 'TEST'` iv_result = 'U' iv_old_num = ' 1' iv_old = `WRITE 'test'` ). test( iv_ignore_case = abap_true ). ENDMETHOD. METHOD diff11. " ignore case should ignore changed keywords, variables, types add_new( iv_new = `write 'test'` ). add_new( iv_new = `DATA FOO TYPE I.` ). add_old( iv_old = `WRITE 'test'` ). add_old( iv_old = `DATA foo TYPE i.` ). add_expected( iv_new_num = ' 1' iv_new = `write 'test'` iv_result = '' " no diff! iv_old_num = ' 1' iv_old = `WRITE 'test'` ). add_expected( iv_new_num = ' 2' iv_new = `DATA FOO TYPE I.` iv_result = '' " no diff! iv_old_num = ' 2' iv_old = `DATA foo TYPE i.` ). test( iv_ignore_case = abap_true ). ENDMETHOD. METHOD diff12. " adjusted diffs for insert (workaround for kernel issue) add_new( iv_new = `REPORT zprog_diff.` ). add_new( iv_new = `*` ). add_new( iv_new = `FORM t_1.` ). add_new( iv_new = `ENDFORM.` ). add_new( iv_new = `FORM t_2.` ). add_new( iv_new = `ENDFORM.` ). add_old( iv_old = `REPORT zprog_diff.` ). add_old( iv_old = `FORM t_1.` ). add_old( iv_old = `ENDFORM.` ). add_expected( iv_new_num = ' 1' iv_new = `REPORT zprog_diff.` iv_result = '' " no diff! iv_old_num = ' 1' iv_old = `REPORT zprog_diff.` iv_beacon = 1 ). add_expected( iv_new_num = ' 2' iv_new = `*` iv_result = 'I' iv_old_num = ' ' iv_old = `` iv_beacon = 1 ). add_expected( iv_new_num = ' 3' iv_new = `FORM t_1.` iv_result = '' " no diff! iv_old_num = ' 2' iv_old = `FORM t_1.` iv_beacon = 2 ). add_expected( iv_new_num = ' 4' iv_new = `ENDFORM.` iv_result = '' " no diff! iv_old_num = ' 3' iv_old = `ENDFORM.` iv_beacon = 2 ). add_expected( iv_new_num = ' 5' iv_new = `FORM t_2.` iv_result = 'I' iv_old_num = ' ' iv_old = `` iv_beacon = 3 ). add_expected( iv_new_num = ' 6' iv_new = `ENDFORM.` iv_result = 'I' iv_old_num = ' ' iv_old = `` iv_beacon = 3 ). test( ). ENDMETHOD. METHOD diff13. " adjusted diffs for delete (workaround for kernel issue) add_old( iv_old = `REPORT zprog_diff.` ). add_old( iv_old = `*` ). add_old( iv_old = `FORM t_1.` ). add_old( iv_old = `ENDFORM.` ). add_old( iv_old = `FORM t_2.` ). add_old( iv_old = `ENDFORM.` ). add_new( iv_new = `REPORT zprog_diff.` ). add_new( iv_new = `FORM t_1.` ). add_new( iv_new = `ENDFORM.` ). add_expected( iv_old_num = ' 1' iv_old = `REPORT zprog_diff.` iv_result = '' " no diff! iv_new_num = ' 1' iv_new = `REPORT zprog_diff.` iv_beacon = 1 ). add_expected( iv_old_num = ' 2' iv_old = `*` iv_result = 'D' iv_new_num = ' ' iv_new = `` iv_beacon = 1 ). add_expected( iv_old_num = ' 3' iv_old = `FORM t_1.` iv_result = '' " no diff! iv_new_num = ' 2' iv_new = `FORM t_1.` iv_beacon = 2 ). add_expected( iv_old_num = ' 4' iv_old = `ENDFORM.` iv_result = '' " no diff! iv_new_num = ' 3' iv_new = `ENDFORM.` iv_beacon = 2 ). add_expected( iv_old_num = ' 5' iv_old = `FORM t_2.` iv_result = 'D' iv_new_num = ' ' iv_new = `` iv_beacon = 2 ). add_expected( iv_old_num = ' 6' iv_old = `ENDFORM.` iv_result = 'D' iv_new_num = ' ' iv_new = `` iv_beacon = 2 ). test( ). ENDMETHOD. ENDCLASS.
[ 198, 31631, 300, 83, 565, 62, 26069, 5550, 20032, 17941, 7473, 43001, 2751, 198, 220, 360, 4261, 6234, 6006, 9863, 198, 220, 45698, 42, 49277, 43638, 5805, 7597, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42865, 25, 45079, 62, 3605, 220, 220, 220, 220, 220, 41876, 43679, 3963, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 727, 220, 220, 220, 220, 220, 41876, 43679, 3963, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 40319, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 67, 10203, 62, 926, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 751, 62, 3605, 30023, 9863, 2751, 21628, 62, 3605, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 751, 62, 727, 30023, 9863, 2751, 21628, 62, 727, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 751, 62, 40319, 30023, 9863, 2751, 21628, 62, 3605, 62, 22510, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 3605, 62, 22510, 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, 21628, 62, 3605, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 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, 21628, 62, 20274, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 20274, 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, 21628, 62, 727, 62, 22510, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 727, 62, 22510, 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, 21628, 62, 727, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 727, 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, 21628, 62, 1350, 7807, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 1350, 7807, 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, 5550, 38865, 1976, 565, 62, 397, 499, 18300, 62, 26069, 14804, 1073, 62, 38690, 62, 1350, 7807, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 9058, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 1332, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 46430, 62, 521, 298, 341, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 46430, 62, 15944, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 46430, 62, 7442, 220, 220, 220, 220, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 814, 486, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2999, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 3070, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 3023, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2713, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 3312, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2998, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2919, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2931, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 940, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 1157, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 1065, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 1485, 7473, 43001, 2751, 13, 198, 198, 10619, 31631, 13, 628, 198, 31631, 300, 83, 565, 62, 26069, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 751, 62, 3605, 13, 198, 220, 220, 220, 42865, 300, 85, 62, 3605, 34178, 48920, 3963, 45079, 62, 3605, 13, 628, 220, 220, 220, 300, 85, 62, 3605, 796, 21628, 62, 3605, 13, 198, 220, 220, 220, 43504, 10619, 300, 85, 62, 3605, 5390, 45079, 62, 3605, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 751, 62, 727, 13, 198, 220, 220, 220, 42865, 300, 85, 62, 727, 34178, 48920, 3963, 45079, 62, 727, 13, 628, 220, 220, 220, 300, 85, 62, 727, 796, 21628, 62, 727, 13, 198, 220, 220, 220, 43504, 10619, 300, 85, 62, 727, 5390, 45079, 62, 727, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 751, 62, 40319, 13, 198, 220, 220, 220, 42865, 43979, 62, 40319, 34178, 48920, 3963, 45079, 62, 40319, 13, 628, 220, 220, 220, 43979, 62, 40319, 12, 3605, 62, 22510, 796, 21628, 62, 3605, 62, 22510, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 3605, 220, 220, 220, 220, 796, 21628, 62, 3605, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 20274, 220, 796, 21628, 62, 20274, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 727, 62, 22510, 796, 21628, 62, 727, 62, 22510, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 727, 220, 220, 220, 220, 796, 21628, 62, 727, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 1350 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
CLASS ltcl_diff DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. DATA: mt_new TYPE TABLE OF string, mt_old TYPE TABLE OF string, mt_expected TYPE zif_abapgit_definitions=>ty_diffs_tt. METHODS: add_new IMPORTING iv_new TYPE string, add_old IMPORTING iv_old TYPE string, add_expected IMPORTING iv_new_num TYPE zif_abapgit_definitions=>ty_diff-new_num iv_new TYPE zif_abapgit_definitions=>ty_diff-new iv_result TYPE zif_abapgit_definitions=>ty_diff-result iv_old_num TYPE zif_abapgit_definitions=>ty_diff-old_num iv_old TYPE zif_abapgit_definitions=>ty_diff-old iv_beacon TYPE zif_abapgit_definitions=>ty_diff-beacon DEFAULT zcl_abapgit_diff=>co_starting_beacon. METHODS: setup. METHODS: test IMPORTING !iv_ignore_indentation TYPE abap_bool DEFAULT abap_false !iv_ignore_comments TYPE abap_bool DEFAULT abap_false !iv_ignore_case TYPE abap_bool DEFAULT abap_false. METHODS: diff01 FOR TESTING, diff02 FOR TESTING, diff03 FOR TESTING, diff04 FOR TESTING, diff05 FOR TESTING, diff06 FOR TESTING, diff07 FOR TESTING, diff08 FOR TESTING, diff09 FOR TESTING, diff10 FOR TESTING, diff11 FOR TESTING, diff12 FOR TESTING, diff13 FOR TESTING. ENDCLASS. CLASS ltcl_diff IMPLEMENTATION. METHOD add_new. DATA lv_new LIKE LINE OF mt_new. lv_new = iv_new. APPEND lv_new TO mt_new. ENDMETHOD. METHOD add_old. DATA lv_old LIKE LINE OF mt_old. lv_old = iv_old. APPEND lv_old TO mt_old. ENDMETHOD. METHOD add_expected. DATA ls_expected LIKE LINE OF mt_expected. ls_expected-new_num = iv_new_num. ls_expected-new = iv_new. ls_expected-result = iv_result. ls_expected-old_num = iv_old_num. ls_expected-old = iv_old. ls_expected-beacon = iv_beacon. APPEND ls_expected TO mt_expected. ENDMETHOD. METHOD setup. CLEAR mt_new. CLEAR mt_old. CLEAR mt_expected. ENDMETHOD. METHOD test. DATA: lv_new TYPE string, lv_xnew TYPE xstring, lv_old TYPE string, lv_xold TYPE xstring, lo_diff TYPE REF TO zcl_abapgit_diff, lt_diff TYPE zif_abapgit_definitions=>ty_diffs_tt. FIELD-SYMBOLS: <ls_diff> LIKE LINE OF lt_diff. CONCATENATE LINES OF mt_new INTO lv_new SEPARATED BY zif_abapgit_definitions=>c_newline. CONCATENATE LINES OF mt_old INTO lv_old SEPARATED BY zif_abapgit_definitions=>c_newline. lv_xnew = zcl_abapgit_convert=>string_to_xstring_utf8( lv_new ). lv_xold = zcl_abapgit_convert=>string_to_xstring_utf8( lv_old ). CREATE OBJECT lo_diff EXPORTING iv_new = lv_xnew iv_old = lv_xold iv_ignore_indentation = iv_ignore_indentation iv_ignore_comments = iv_ignore_comments iv_ignore_case = iv_ignore_case. lt_diff = lo_diff->get( ). LOOP AT lt_diff ASSIGNING <ls_diff>. CLEAR <ls_diff>-short. ENDLOOP. cl_abap_unit_assert=>assert_equals( act = lt_diff exp = mt_expected ). ENDMETHOD. METHOD diff01. "insert add_new( iv_new = 'A' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = zif_abapgit_definitions=>c_diff-insert iv_old_num = '' iv_old = '' ). test( ). ENDMETHOD. METHOD diff02. " identical add_new( iv_new = 'A' ). add_old( iv_old = 'A' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). test( ). ENDMETHOD. METHOD diff03. " delete add_old( iv_old = 'A' ). add_expected( iv_new_num = '' iv_new = '' iv_result = zif_abapgit_definitions=>c_diff-delete iv_old_num = ' 1' iv_old = 'A' ). test( ). ENDMETHOD. METHOD diff04. " update add_new( iv_new = 'A+' ). add_old( iv_old = 'A' ). add_expected( iv_new_num = ' 1' iv_new = 'A+' iv_result = zif_abapgit_definitions=>c_diff-update iv_old_num = ' 1' iv_old = 'A' ). test( ). ENDMETHOD. METHOD diff05. " identical add_new( iv_new = 'A' ). add_new( iv_new = 'B' ). add_old( iv_old = 'A' ). add_old( iv_old = 'B' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = 'B' iv_result = '' iv_old_num = ' 2' iv_old = 'B' ). test( ). ENDMETHOD. METHOD diff06. " mixed add_new( iv_new = 'A' ). add_new( iv_new = 'B' ). add_new( iv_new = 'inserted' ). add_new( iv_new = 'C' ). add_new( iv_new = 'D update' ). add_old( iv_old = 'A' ). add_old( iv_old = 'B' ). add_old( iv_old = 'C' ). add_old( iv_old = 'D' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = 'B' iv_result = '' iv_old_num = ' 2' iv_old = 'B' ). add_expected( iv_new_num = ' 3' iv_new = 'inserted' iv_result = zif_abapgit_definitions=>c_diff-insert iv_old_num = '' iv_old = '' ). add_expected( iv_new_num = ' 4' iv_new = 'C' iv_result = '' iv_old_num = ' 3' iv_old = 'C' ). add_expected( iv_new_num = ' 5' iv_new = 'D update' iv_result = zif_abapgit_definitions=>c_diff-update iv_old_num = ' 4' iv_old = 'D' ). test( ). ENDMETHOD. METHOD diff07. " ignore indentation add_new( iv_new = 'A' ). add_new( iv_new = ' B' ). " changed indent add_new( iv_new = 'C' ). add_new( iv_new = ' D' ). " changed indent add_old( iv_old = 'A' ). add_old( iv_old = 'B' ). add_old( iv_old = 'C' ). add_old( iv_old = 'D' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = ' B' iv_result = '' " no diff! iv_old_num = ' 2' iv_old = 'B' ). add_expected( iv_new_num = ' 3' iv_new = 'C' iv_result = '' iv_old_num = ' 3' iv_old = 'C' ). add_expected( iv_new_num = ' 4' iv_new = ' D' iv_result = '' " no diff! iv_old_num = ' 4' iv_old = 'D' ). test( iv_ignore_indentation = abap_true ). ENDMETHOD. METHOD diff08. " ignore comments add_new( iv_new = 'A' ). add_new( iv_new = '* X' ). " changed comment add_new( iv_new = 'C' ). add_new( iv_new = 'D " new' ). " changed comment add_old( iv_old = 'A' ). add_old( iv_old = '* B' ). add_old( iv_old = 'C' ). add_old( iv_old = 'D " old' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = '* X' iv_result = '' " no diff! iv_old_num = ' 2' iv_old = '* B' ). add_expected( iv_new_num = ' 3' iv_new = 'C' iv_result = '' iv_old_num = ' 3' iv_old = 'C' ). add_expected( iv_new_num = ' 4' iv_new = 'D " new' iv_result = '' " no diff! iv_old_num = ' 4' iv_old = 'D " old' ). test( iv_ignore_comments = abap_true ). ENDMETHOD. METHOD diff09. " ignore case add_new( iv_new = 'A' ). add_new( iv_new = 'b' ). " changed case add_new( iv_new = 'c' ). add_new( iv_new = 'D' ). " changed case add_old( iv_old = 'A' ). add_old( iv_old = 'B' ). add_old( iv_old = 'c' ). add_old( iv_old = 'd' ). add_expected( iv_new_num = ' 1' iv_new = 'A' iv_result = '' iv_old_num = ' 1' iv_old = 'A' ). add_expected( iv_new_num = ' 2' iv_new = 'b' iv_result = '' " no diff! iv_old_num = ' 2' iv_old = 'B' ). add_expected( iv_new_num = ' 3' iv_new = 'c' iv_result = '' iv_old_num = ' 3' iv_old = 'c' ). add_expected( iv_new_num = ' 4' iv_new = 'D' iv_result = '' " no diff! iv_old_num = ' 4' iv_old = 'd' ). test( iv_ignore_case = abap_true ). ENDMETHOD. METHOD diff10. " ignore case should NOT ignore changed literals add_new( iv_new = `WRITE 'TEST'` ). add_old( iv_old = `WRITE 'test'` ). add_expected( iv_new_num = ' 1' iv_new = `WRITE 'TEST'` iv_result = 'U' iv_old_num = ' 1' iv_old = `WRITE 'test'` ). test( iv_ignore_case = abap_true ). ENDMETHOD. METHOD diff11. " ignore case should ignore changed keywords, variables, types add_new( iv_new = `write 'test'` ). add_new( iv_new = `DATA FOO TYPE I.` ). add_old( iv_old = `WRITE 'test'` ). add_old( iv_old = `DATA foo TYPE i.` ). add_expected( iv_new_num = ' 1' iv_new = `write 'test'` iv_result = '' " no diff! iv_old_num = ' 1' iv_old = `WRITE 'test'` ). add_expected( iv_new_num = ' 2' iv_new = `DATA FOO TYPE I.` iv_result = '' " no diff! iv_old_num = ' 2' iv_old = `DATA foo TYPE i.` ). test( iv_ignore_case = abap_true ). ENDMETHOD. METHOD diff12. " adjusted diffs for insert (workaround for kernel issue) add_new( iv_new = `REPORT zprog_diff.` ). add_new( iv_new = `*` ). add_new( iv_new = `FORM t_1.` ). add_new( iv_new = `ENDFORM.` ). add_new( iv_new = `FORM t_2.` ). add_new( iv_new = `ENDFORM.` ). add_old( iv_old = `REPORT zprog_diff.` ). add_old( iv_old = `FORM t_1.` ). add_old( iv_old = `ENDFORM.` ). add_expected( iv_new_num = ' 1' iv_new = `REPORT zprog_diff.` iv_result = '' " no diff! iv_old_num = ' 1' iv_old = `REPORT zprog_diff.` iv_beacon = 1 ). add_expected( iv_new_num = ' 2' iv_new = `*` iv_result = 'I' iv_old_num = ' ' iv_old = `` iv_beacon = 1 ). add_expected( iv_new_num = ' 3' iv_new = `FORM t_1.` iv_result = '' " no diff! iv_old_num = ' 2' iv_old = `FORM t_1.` iv_beacon = 2 ). add_expected( iv_new_num = ' 4' iv_new = `ENDFORM.` iv_result = '' " no diff! iv_old_num = ' 3' iv_old = `ENDFORM.` iv_beacon = 2 ). add_expected( iv_new_num = ' 5' iv_new = `FORM t_2.` iv_result = 'I' iv_old_num = ' ' iv_old = `` iv_beacon = 3 ). add_expected( iv_new_num = ' 6' iv_new = `ENDFORM.` iv_result = 'I' iv_old_num = ' ' iv_old = `` iv_beacon = 3 ). test( ). ENDMETHOD. METHOD diff13. " adjusted diffs for delete (workaround for kernel issue) add_old( iv_old = `REPORT zprog_diff.` ). add_old( iv_old = `*` ). add_old( iv_old = `FORM t_1.` ). add_old( iv_old = `ENDFORM.` ). add_old( iv_old = `FORM t_2.` ). add_old( iv_old = `ENDFORM.` ). add_new( iv_new = `REPORT zprog_diff.` ). add_new( iv_new = `FORM t_1.` ). add_new( iv_new = `ENDFORM.` ). add_expected( iv_old_num = ' 1' iv_old = `REPORT zprog_diff.` iv_result = '' " no diff! iv_new_num = ' 1' iv_new = `REPORT zprog_diff.` iv_beacon = 1 ). add_expected( iv_old_num = ' 2' iv_old = `*` iv_result = 'D' iv_new_num = ' ' iv_new = `` iv_beacon = 1 ). add_expected( iv_old_num = ' 3' iv_old = `FORM t_1.` iv_result = '' " no diff! iv_new_num = ' 2' iv_new = `FORM t_1.` iv_beacon = 2 ). add_expected( iv_old_num = ' 4' iv_old = `ENDFORM.` iv_result = '' " no diff! iv_new_num = ' 3' iv_new = `ENDFORM.` iv_beacon = 2 ). add_expected( iv_old_num = ' 5' iv_old = `FORM t_2.` iv_result = 'D' iv_new_num = ' ' iv_new = `` iv_beacon = 2 ). add_expected( iv_old_num = ' 6' iv_old = `ENDFORM.` iv_result = 'D' iv_new_num = ' ' iv_new = `` iv_beacon = 2 ). test( ). ENDMETHOD. ENDCLASS.
[ 198, 31631, 300, 83, 565, 62, 26069, 5550, 20032, 17941, 7473, 43001, 2751, 198, 220, 360, 4261, 6234, 6006, 9863, 198, 220, 45698, 42, 49277, 43638, 5805, 7597, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42865, 25, 45079, 62, 3605, 220, 220, 220, 220, 220, 41876, 43679, 3963, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 727, 220, 220, 220, 220, 220, 41876, 43679, 3963, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 40319, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 67, 10203, 62, 926, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 751, 62, 3605, 30023, 9863, 2751, 21628, 62, 3605, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 751, 62, 727, 30023, 9863, 2751, 21628, 62, 727, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 751, 62, 40319, 30023, 9863, 2751, 21628, 62, 3605, 62, 22510, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 3605, 62, 22510, 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, 21628, 62, 3605, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 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, 21628, 62, 20274, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 20274, 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, 21628, 62, 727, 62, 22510, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 727, 62, 22510, 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, 21628, 62, 727, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 727, 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, 21628, 62, 1350, 7807, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26069, 12, 1350, 7807, 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, 5550, 38865, 1976, 565, 62, 397, 499, 18300, 62, 26069, 14804, 1073, 62, 38690, 62, 1350, 7807, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 9058, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 1332, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 46430, 62, 521, 298, 341, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 46430, 62, 15944, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 46430, 62, 7442, 220, 220, 220, 220, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 814, 486, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2999, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 3070, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 3023, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2713, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 3312, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2998, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2919, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2931, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 940, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 1157, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 1065, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 1485, 7473, 43001, 2751, 13, 198, 198, 10619, 31631, 13, 628, 198, 31631, 300, 83, 565, 62, 26069, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 751, 62, 3605, 13, 198, 220, 220, 220, 42865, 300, 85, 62, 3605, 34178, 48920, 3963, 45079, 62, 3605, 13, 628, 220, 220, 220, 300, 85, 62, 3605, 796, 21628, 62, 3605, 13, 198, 220, 220, 220, 43504, 10619, 300, 85, 62, 3605, 5390, 45079, 62, 3605, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 751, 62, 727, 13, 198, 220, 220, 220, 42865, 300, 85, 62, 727, 34178, 48920, 3963, 45079, 62, 727, 13, 628, 220, 220, 220, 300, 85, 62, 727, 796, 21628, 62, 727, 13, 198, 220, 220, 220, 43504, 10619, 300, 85, 62, 727, 5390, 45079, 62, 727, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 751, 62, 40319, 13, 198, 220, 220, 220, 42865, 43979, 62, 40319, 34178, 48920, 3963, 45079, 62, 40319, 13, 628, 220, 220, 220, 43979, 62, 40319, 12, 3605, 62, 22510, 796, 21628, 62, 3605, 62, 22510, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 3605, 220, 220, 220, 220, 796, 21628, 62, 3605, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 20274, 220, 796, 21628, 62, 20274, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 727, 62, 22510, 796, 21628, 62, 727, 62, 22510, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 727, 220, 220, 220, 220, 796, 21628, 62, 727, 13, 198, 220, 220, 220, 43979, 62, 40319, 12, 1350 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
CLASS zcl_abapgit_object_asfc DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super CREATE PUBLIC . PUBLIC SECTION. INTERFACES zif_abapgit_object . PROTECTED SECTION. PRIVATE SECTION. METHODS get_generic RETURNING VALUE(ro_generic) TYPE REF TO zcl_abapgit_objects_generic RAISING zcx_abapgit_exception . ENDCLASS. CLASS zcl_abapgit_object_asfc IMPLEMENTATION. METHOD get_generic. CREATE OBJECT ro_generic EXPORTING is_item = ms_item iv_language = mv_language. ENDMETHOD. METHOD zif_abapgit_object~changed_by. rv_user = zcl_abapgit_objects_super=>c_user_unknown. ENDMETHOD. METHOD zif_abapgit_object~delete. get_generic( )->delete( ). ENDMETHOD. METHOD zif_abapgit_object~deserialize. get_generic( )->deserialize( iv_package = iv_package io_xml = io_xml ). ENDMETHOD. METHOD zif_abapgit_object~exists. rv_bool = get_generic( )->exists( ). ENDMETHOD. METHOD zif_abapgit_object~get_comparator. RETURN. ENDMETHOD. METHOD zif_abapgit_object~get_deserialize_steps. APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps. ENDMETHOD. METHOD zif_abapgit_object~get_metadata. rs_metadata = get_metadata( ). rs_metadata-delete_tadir = abap_true. ENDMETHOD. METHOD zif_abapgit_object~is_active. rv_active = is_active( ). ENDMETHOD. METHOD zif_abapgit_object~is_locked. rv_is_locked = abap_false. ENDMETHOD. METHOD zif_abapgit_object~jump. ENDMETHOD. METHOD zif_abapgit_object~serialize. get_generic( )->serialize( io_xml ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 292, 16072, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 16668, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 23255, 37, 2246, 1546, 1976, 361, 62, 397, 499, 18300, 62, 15252, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 651, 62, 41357, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 305, 62, 41357, 8, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 41357, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 292, 16072, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 651, 62, 41357, 13, 628, 220, 220, 220, 29244, 6158, 25334, 23680, 686, 62, 41357, 7788, 15490, 2751, 318, 62, 9186, 796, 13845, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 16129, 796, 285, 85, 62, 16129, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 40985, 62, 1525, 13, 198, 220, 220, 220, 374, 85, 62, 7220, 796, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 16668, 14804, 66, 62, 7220, 62, 34680, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 33678, 13, 628, 220, 220, 220, 651, 62, 41357, 7, 1267, 3784, 33678, 7, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 8906, 48499, 1096, 13, 628, 220, 220, 220, 651, 62, 41357, 7, 1267, 3784, 8906, 48499, 1096, 7, 198, 220, 220, 220, 220, 220, 21628, 62, 26495, 796, 21628, 62, 26495, 198, 220, 220, 220, 220, 220, 33245, 62, 19875, 220, 220, 220, 220, 796, 33245, 62, 19875, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1069, 1023, 13, 628, 220, 220, 220, 374, 85, 62, 30388, 796, 651, 62, 41357, 7, 1267, 3784, 1069, 1023, 7, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1136, 62, 785, 1845, 1352, 13, 198, 220, 220, 220, 30826, 27064, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1136, 62, 8906, 48499, 1096, 62, 20214, 13, 198, 220, 220, 220, 43504, 10619, 1976, 361, 62, 397, 499, 18300, 62, 15252, 14804, 36484, 62, 9662, 62, 312, 12, 397, 499, 5390, 374, 83, 62, 20214, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1136, 62, 38993, 13, 628, 220, 220, 220, 44608, 62, 38993, 796, 651, 62, 38993, 7, 6739, 198, 220, 220, 220, 44608, 62, 38993, 12, 33678, 62, 83, 324, 343, 796, 450, 499, 62, 7942, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 271, 62, 5275, 13, 198, 220, 220, 220, 374, 85, 62, 5275, 796, 318, 62, 5275, 7, 6739, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 271, 62, 24162, 13, 628, 220, 220, 220, 374, 85, 62, 271, 62, 24162, 796, 450, 499, 62, 9562, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 43327, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 46911, 1096, 13, 628, 220, 220, 220, 651, 62, 41357, 7, 1267, 3784, 46911, 1096, 7, 33245, 62, 19875, 6739, 628, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
*&---------------------------------------------------------------------* *& Report ZDEMO_EXCEL25 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT zdemo_excel25. CONSTANTS: lv_file_name TYPE string VALUE '25_HelloWorld.xlsx'. DATA: lo_excel TYPE REF TO zcl_excel. DATA: lo_excel_writer TYPE REF TO zif_excel_writer. DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet. DATA: lo_exception TYPE REF TO cx_root. DATA: lv_file TYPE xstring. DATA: lv_default_file_name TYPE string. DATA: lv_error TYPE string. CALL FUNCTION 'FILE_GET_NAME_USING_PATH' EXPORTING logical_path = 'LOCAL_TEMPORARY_FILES' " Logical path' file_name = lv_file_name " File name IMPORTING file_name_with_path = lv_default_file_name " File name with path EXCEPTIONS other = 1. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. " Creates active sheet CREATE OBJECT lo_excel. " Get active sheet lo_worksheet = lo_excel->get_active_worksheet( ). lo_worksheet->set_title( ip_title = 'Sheet1' ). lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ). CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007. lv_file = lo_excel_writer->write_file( lo_excel ). TRY. OPEN DATASET lv_default_file_name FOR OUTPUT IN BINARY MODE. IF sy-subrc <> 0. RAISE EXCEPTION TYPE cx_sy_file_open EXPORTING filename = lv_default_file_name errorcode = sy-subrc errortext = |Cannot create or open file - Check Tx FILE Logical Path 'LOCAL_TEMPORARY_FILES'|. ENDIF. TRANSFER lv_file TO lv_default_file_name. CLOSE DATASET lv_default_file_name. CATCH cx_root INTO lo_exception. lv_error = lo_exception->get_text( ). MESSAGE lv_error TYPE 'I'. ENDTRY.
[ 9, 5, 10097, 30934, 9, 198, 9, 5, 6358, 220, 1168, 39429, 46, 62, 6369, 34, 3698, 1495, 198, 9, 5, 198, 9, 5, 10097, 30934, 9, 198, 9, 5, 198, 9, 5, 198, 9, 5, 10097, 30934, 9, 198, 198, 2200, 15490, 1976, 9536, 78, 62, 1069, 5276, 1495, 13, 198, 198, 10943, 2257, 1565, 4694, 25, 300, 85, 62, 7753, 62, 3672, 41876, 4731, 26173, 8924, 705, 1495, 62, 15496, 10603, 13, 87, 7278, 87, 4458, 198, 198, 26947, 25, 2376, 62, 1069, 5276, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 13, 198, 26947, 25, 2376, 62, 1069, 5276, 62, 16002, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 361, 62, 1069, 5276, 62, 16002, 13, 198, 26947, 25, 2376, 62, 5225, 25473, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 1069, 5276, 62, 5225, 25473, 13, 198, 26947, 25, 2376, 62, 1069, 4516, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 43213, 62, 15763, 13, 198, 26947, 25, 300, 85, 62, 7753, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 2124, 8841, 13, 198, 26947, 25, 300, 85, 62, 12286, 62, 7753, 62, 3672, 41876, 4731, 13, 198, 26947, 25, 300, 85, 62, 18224, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 13, 198, 198, 34, 7036, 29397, 4177, 2849, 705, 25664, 62, 18851, 62, 20608, 62, 2937, 2751, 62, 34219, 6, 198, 220, 7788, 15490, 2751, 198, 220, 220, 220, 12219, 62, 6978, 220, 220, 220, 220, 220, 220, 220, 796, 705, 29701, 1847, 62, 51, 39494, 1581, 13153, 62, 46700, 1546, 6, 220, 366, 5972, 605, 3108, 6, 198, 220, 220, 220, 2393, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 300, 85, 62, 7753, 62, 3672, 220, 220, 220, 366, 9220, 1438, 198, 220, 30023, 9863, 2751, 198, 220, 220, 220, 2393, 62, 3672, 62, 4480, 62, 6978, 796, 300, 85, 62, 12286, 62, 7753, 62, 3672, 220, 220, 220, 366, 9220, 1438, 351, 3108, 198, 220, 7788, 42006, 11053, 198, 220, 220, 220, 584, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 352, 13, 198, 5064, 827, 12, 7266, 6015, 1279, 29, 657, 13, 198, 220, 337, 1546, 4090, 8264, 4522, 827, 12, 19662, 312, 41876, 705, 40, 6, 36871, 13246, 827, 12, 19662, 3919, 198, 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, 10619, 5064, 13, 198, 198, 1, 7921, 274, 4075, 9629, 198, 43387, 6158, 25334, 23680, 2376, 62, 1069, 5276, 13, 198, 198, 1, 3497, 4075, 9629, 198, 5439, 62, 5225, 25473, 796, 2376, 62, 1069, 5276, 3784, 1136, 62, 5275, 62, 5225, 25473, 7, 6739, 198, 5439, 62, 5225, 25473, 3784, 2617, 62, 7839, 7, 20966, 62, 7839, 796, 705, 3347, 316, 16, 6, 6739, 198, 5439, 62, 5225, 25473, 3784, 2617, 62, 3846, 7, 20966, 62, 28665, 796, 705, 33, 6, 20966, 62, 808, 796, 362, 20966, 62, 8367, 796, 705, 15496, 995, 6, 6739, 198, 198, 43387, 6158, 25334, 23680, 2376, 62, 1069, 5276, 62, 16002, 41876, 1976, 565, 62, 1069, 5276, 62, 16002, 62, 12726, 13, 198, 6780, 62, 7753, 796, 2376, 62, 1069, 5276, 62, 16002, 3784, 13564, 62, 7753, 7, 2376, 62, 1069, 5276, 6739, 198, 198, 40405, 13, 198, 220, 220, 220, 38303, 360, 1404, 1921, 2767, 300, 85, 62, 12286, 62, 7753, 62, 3672, 7473, 16289, 30076, 3268, 347, 1268, 13153, 337, 16820, 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, 43213, 62, 1837, 62, 7753, 62, 9654, 198, 220, 220, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29472, 220, 796, 300, 85, 62, 12286, 62, 7753, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 8189, 796, 827, 12, 7266, 6015, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11454, 419, 2302, 796, 930, 34, 34574, 2251, 393, 1280, 2393, 532, 6822, 309, 87, 45811, 5972, 605, 10644, 705, 29701, 1847, 62, 51, 39494, 1581, 13153, 62, 46700, 1546, 6, 91, 13, 198, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 44069, 24302, 300, 85, 62, 7753, 220, 5390, 300, 85, 62, 12286, 62, 7753, 62, 3672, 13, 628, 220, 220, 220, 7852, 14058, 360, 1404, 1921, 2767, 300, 85, 62, 12286, 62, 7753, 62, 3672, 13, 198, 220, 327, 11417, 43213, 62, 15763, 39319, 2376, 62, 1069, 4516, 13, 198, 220, 220, 220, 300, 85, 62, 18224, 796, 2376, 62, 1069, 4516, 3784, 1136, 62, 5239, 7, 6739, 198, 220, 220, 220, 337, 1546, 4090, 8264, 300, 85, 62, 18224, 41876, 705, 40, 4458, 198, 10619, 40405, 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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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 ]
report a. data a type i value 0. " dead store a = c. write a.
[ 13116, 257, 13, 198, 7890, 257, 2099, 1312, 1988, 657, 13, 366, 2636, 3650, 198, 64, 796, 269, 13, 198, 13564, 257, 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 ]
*----------------------------------------------------------------------* * 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_62. 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, test002_01 FOR TESTING, test002_02 FOR TESTING, test002_03 FOR TESTING, test003_01 FOR TESTING, test003_02 FOR TESTING, test003_03 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 'LOOP AT lt_tab ASSIGNING <fs> WHERE foo = ''ABC''.'. _code ' DELETE lt_tab FROM <fs>.'. _code 'ENDLOOP.'. 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. * =========== _code 'DELETE lt_tab WHERE foo = ''ABC''.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result-code ). ENDMETHOD. METHOD test001_03. * =========== _code 'LOOP AT lt_tab INTO bar WHERE foo = ''ABC''.'. _code ' DELETE lt_tab FROM bar.'. _code 'ENDLOOP.'. 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_04. * =========== _code 'LOOP AT lt_tab INTO DATA(bar) WHERE foo = ''ABC''.'. _code ' DELETE lt_tab FROM bar.'. _code 'ENDLOOP.'. 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. * =========== _code 'LOOP AT lt_tab ASSIGNING FIELD-SYMBOL(<bar>) WHERE foo = ''ABC''.'. _code ' DELETE lt_tab FROM <bar>.'. _code 'ENDLOOP.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_equals( exp = '001' act = ms_result-code ). ENDMETHOD. METHOD test002_01. _code 'LOOP AT lt_tab.'. _code ' CONTINUE.'. _code 'ENDLOOP.'. _code 'WRITE hello.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_equals( exp = '002' act = ms_result-code ). ENDMETHOD. METHOD test002_02. _code 'LOOP AT lt_tab.'. _code 'ENDLOOP.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result-code ). ENDMETHOD. METHOD test002_03. _code 'WRITE hello.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result-code ). ENDMETHOD. METHOD test003_01. _code 'IF lt_table IS NOT INITIAL.'. _code 'LOOP AT lt_table INTO ls_data.'. _code 'ENDLOOP.'. _code 'ENDIF.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_equals( exp = '003' act = ms_result-code ). ENDMETHOD. METHOD test003_02. _code 'IF lines( lt_messages ) > 0.'. _code 'LOOP AT lt_messages INTO ls_message WHERE foo = ''A''.'. _code 'ENDLOOP.'. _code 'ENDIF.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_equals( exp = '003' act = ms_result-code ). ENDMETHOD. METHOD test003_03. _code 'LOOP AT lt_table INTO ls_data.'. _code 'ENDLOOP.'. ms_result = zcl_aoc_unit_test=>check( mt_code ). cl_abap_unit_assert=>assert_initial( ms_result-code ). ENDMETHOD. ENDCLASS.
[ 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, 360, 4261, 6234, 6006, 9863, 45698, 42, 49277, 43638, 5805, 7597, 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, 5237, 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, 21601, 62, 486, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 21601, 62, 2999, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 21601, 62, 3070, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 11245, 62, 486, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 11245, 62, 2999, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 11245, 62, 3070, 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, 21982, 3185, 5161, 300, 83, 62, 8658, 24994, 3528, 15871, 1279, 9501, 29, 33411, 22944, 796, 10148, 24694, 7061, 2637, 13, 198, 220, 220, 220, 4808, 8189, 705, 220, 5550, 2538, 9328, 300, 83, 62, 8658, 16034, 1279, 9501, 29, 2637, 13, 198, 220, 220, 220, 4808, 8189, 705, 10619, 21982, 3185, 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, 4808, 8189, 705, 7206, 2538, 9328, 300, 83, 62, 8658, 33411, 22944, 796, 10148, 24694, 7061, 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, 4808, 8189, 705, 21982, 3185, 5161, 300, 83, 62, 8658, 39319, 2318, 33411, 22944, 796, 10148, 24694, 7061, 2637, 13, 198, 220, 220, 220, 4808, 8189, 705, 220, 5550, 2538, 9328, 300, 83, 62, 8658, 16034, 2318, 2637, 13, 198, 220, 220, 220, 4808, 8189, 705, 10619, 21982, 3185, 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, 3023, 13, 198, 9, 796, 2559, 855, 628, 220, 220, 220, 4808, 8189, 705, 21982, 3185, 5161, 300, 83, 62, 8658, 39319, 42865, 7, 5657 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
interface ZIF_ALOG_BAPIRET_LOGGER public . interfaces ZIF_ALOG_LOGGER . interfaces ZIF_ALOG_MSG_LOGGER . methods ENTRY_BAPIRET_TABLE importing !IT_RETURN type BAPIRET2_T raising ZCX_ALOG_LOGGING_FAILED . methods ENTRY_BAPIRET importing !IS_RETURN type BAPIRET2 raising ZCX_ALOG_LOGGING_FAILED . endinterface.
[ 39994, 1168, 5064, 62, 1847, 7730, 62, 33, 17614, 26087, 62, 25294, 30373, 198, 220, 1171, 764, 628, 198, 220, 20314, 1168, 5064, 62, 1847, 7730, 62, 25294, 30373, 764, 198, 220, 20314, 1168, 5064, 62, 1847, 7730, 62, 5653, 38, 62, 25294, 30373, 764, 628, 220, 5050, 12964, 40405, 62, 33, 17614, 26087, 62, 38148, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 2043, 62, 26087, 27064, 2099, 347, 17614, 26087, 17, 62, 51, 198, 220, 220, 220, 8620, 198, 220, 220, 220, 220, 220, 1168, 34, 55, 62, 1847, 7730, 62, 25294, 38, 2751, 62, 7708, 4146, 1961, 764, 198, 220, 5050, 12964, 40405, 62, 33, 17614, 26087, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 1797, 62, 26087, 27064, 2099, 347, 17614, 26087, 17, 198, 220, 220, 220, 8620, 198, 220, 220, 220, 220, 220, 1168, 34, 55, 62, 1847, 7730, 62, 25294, 38, 2751, 62, 7708, 4146, 1961, 764, 198, 437, 39994, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ZSNS_CO_01_01_C01 *&---------------------------------------------------------------------* *&---------------------------------------------------------------------* *CLASS lcl_event_receiver DEFINITION DEFERRED. *----------------------------------------------------------------------* *CLASS lcl_event_receiver DEFINITION DEFERRED. *----------------------------------------------------------------------* * CLASS lcl_event_receiver DEFINITION *----------------------------------------------------------------------* CLASS lcl_event_receiver DEFINITION. PUBLIC SECTION. METHODS: handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid IMPORTING e_object e_interactive, handle_user_command FOR EVENT user_command OF cl_gui_alv_grid IMPORTING e_ucomm. ENDCLASS. *----------------------------------------------------------------------* * CLASS lcl_event_receiver IMPLEMENTATION *----------------------------------------------------------------------* CLASS lcl_event_receiver IMPLEMENTATION. METHOD handle_toolbar. DATA: ls_toolbar TYPE stb_button. CLEAR ls_toolbar. ls_toolbar-function = 'SAVE'. ls_toolbar-butn_type = 0. ls_toolbar-text = 'KAYDET'. ls_toolbar-quickinfo = 'KAYDET'. APPEND ls_toolbar TO e_object->mt_toolbar. ENDMETHOD. METHOD handle_user_command. CASE e_ucomm. WHEN 'SAVE'. LOOP AT gt_out INTO gs_out. PERFORM control. ENDLOOP. ENDCASE. ENDMETHOD. ENDCLASS.
[ 9, 5, 10097, 30934, 9, 198, 9, 5, 40348, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1168, 50, 8035, 62, 8220, 62, 486, 62, 486, 62, 34, 486, 198, 9, 5, 10097, 30934, 9, 198, 9, 5, 10097, 30934, 9, 198, 9, 31631, 300, 565, 62, 15596, 62, 260, 39729, 5550, 20032, 17941, 23449, 1137, 22083, 13, 198, 9, 10097, 23031, 9, 198, 9, 31631, 300, 565, 62, 15596, 62, 260, 39729, 5550, 20032, 17941, 23449, 1137, 22083, 13, 198, 9, 10097, 23031, 9, 198, 9, 220, 220, 220, 220, 220, 220, 42715, 300, 565, 62, 15596, 62, 260, 39729, 5550, 20032, 17941, 198, 9, 10097, 23031, 9, 198, 31631, 300, 565, 62, 15596, 62, 260, 39729, 5550, 20032, 17941, 13, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 5412, 62, 25981, 5657, 7473, 49261, 50149, 3963, 537, 62, 48317, 62, 282, 85, 62, 25928, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 304, 62, 15252, 304, 62, 3849, 5275, 11, 198, 220, 220, 220, 220, 220, 5412, 62, 7220, 62, 21812, 7473, 49261, 2836, 62, 21812, 3963, 537, 62, 48317, 62, 282, 85, 62, 25928, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 304, 62, 84, 9503, 13, 198, 10619, 31631, 13, 198, 9, 10097, 23031, 9, 198, 9, 220, 220, 220, 220, 220, 220, 42715, 300, 565, 62, 15596, 62, 260, 39729, 30023, 2538, 10979, 6234, 198, 9, 10097, 23031, 9, 198, 31631, 300, 565, 62, 15596, 62, 260, 39729, 30023, 2538, 10979, 6234, 13, 198, 220, 337, 36252, 5412, 62, 25981, 5657, 13, 198, 220, 220, 220, 42865, 25, 43979, 62, 25981, 5657, 41876, 336, 65, 62, 16539, 13, 198, 220, 220, 220, 30301, 1503, 43979, 62, 25981, 5657, 13, 198, 220, 220, 220, 43979, 62, 25981, 5657, 12, 8818, 220, 796, 705, 4090, 6089, 4458, 198, 220, 220, 220, 43979, 62, 25981, 5657, 12, 4360, 77, 62, 4906, 796, 657, 13, 198, 220, 220, 220, 43979, 62, 25981, 5657, 12, 5239, 220, 220, 220, 220, 220, 796, 705, 42, 4792, 35, 2767, 4458, 198, 220, 220, 220, 43979, 62, 25981, 5657, 12, 24209, 10951, 796, 705, 42, 4792, 35, 2767, 4458, 198, 220, 220, 220, 43504, 10619, 43979, 62, 25981, 5657, 5390, 304, 62, 15252, 3784, 16762, 62, 25981, 5657, 13, 198, 220, 23578, 49273, 13, 198, 220, 337, 36252, 5412, 62, 7220, 62, 21812, 13, 198, 220, 220, 220, 42001, 304, 62, 84, 9503, 13, 198, 220, 220, 220, 220, 220, 42099, 705, 4090, 6089, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 17579, 3185, 5161, 308, 83, 62, 448, 39319, 308, 82, 62, 448, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19878, 21389, 1630, 13, 198, 220, 220, 220, 220, 220, 220, 220, 23578, 21982, 3185, 13, 198, 220, 220, 220, 23578, 34, 11159, 13, 198, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_serialize DEFINITION PUBLIC CREATE PUBLIC . PUBLIC SECTION. METHODS constructor IMPORTING iv_serialize_master_lang_only TYPE abap_bool DEFAULT abap_false. METHODS on_end_of_task IMPORTING !p_task TYPE clike . METHODS serialize IMPORTING it_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt iv_language TYPE langu DEFAULT sy-langu ii_log TYPE REF TO zif_abapgit_log OPTIONAL iv_force_sequential TYPE abap_bool DEFAULT abap_false RETURNING VALUE(rt_files) TYPE zif_abapgit_definitions=>ty_files_item_tt RAISING zcx_abapgit_exception . PROTECTED SECTION. CLASS-DATA gv_max_threads TYPE i . DATA mt_files TYPE zif_abapgit_definitions=>ty_files_item_tt . DATA mv_free TYPE i . DATA mi_log TYPE REF TO zif_abapgit_log . DATA mv_group TYPE rzlli_apcl . DATA mv_serialize_master_lang_only TYPE abap_bool. METHODS add_to_return IMPORTING !iv_path TYPE string !is_fils_item TYPE zcl_abapgit_objects=>ty_serialization . METHODS run_parallel IMPORTING !is_tadir TYPE zif_abapgit_definitions=>ty_tadir !iv_language TYPE langu !iv_task TYPE sychar32 RAISING zcx_abapgit_exception . METHODS run_sequential IMPORTING !is_tadir TYPE zif_abapgit_definitions=>ty_tadir !iv_language TYPE langu RAISING zcx_abapgit_exception . METHODS determine_max_threads IMPORTING !iv_force_sequential TYPE abap_bool DEFAULT abap_false RETURNING VALUE(rv_threads) TYPE i RAISING zcx_abapgit_exception . PRIVATE SECTION. ENDCLASS. CLASS ZCL_ABAPGIT_SERIALIZE IMPLEMENTATION. METHOD add_to_return. FIELD-SYMBOLS: <ls_file> LIKE LINE OF is_fils_item-files, <ls_return> LIKE LINE OF mt_files. LOOP AT is_fils_item-files ASSIGNING <ls_file>. APPEND INITIAL LINE TO mt_files ASSIGNING <ls_return>. <ls_return>-file = <ls_file>. <ls_return>-file-path = iv_path. <ls_return>-item = is_fils_item-item. ENDLOOP. ENDMETHOD. METHOD constructor. DATA lo_settings TYPE REF TO zcl_abapgit_settings. lo_settings = zcl_abapgit_persist_settings=>get_instance( )->read( ). IF zcl_abapgit_factory=>get_environment( )->is_merged( ) = abap_true OR lo_settings->get_parallel_proc_disabled( ) = abap_true OR zcl_abapgit_exit=>get_instance( )->force_sequential( ) = abap_true. gv_max_threads = 1. ENDIF. mv_group = 'parallel_generators' ##NO_TEXT. mv_serialize_master_lang_only = iv_serialize_master_lang_only. ENDMETHOD. METHOD determine_max_threads. IF iv_force_sequential = abap_true. rv_threads = 1. RETURN. ENDIF. IF gv_max_threads >= 1. * SPBT_INITIALIZE gives error PBT_ENV_ALREADY_INITIALIZED if called * multiple times in same session rv_threads = gv_max_threads. RETURN. ENDIF. CALL FUNCTION 'FUNCTION_EXISTS' EXPORTING funcname = 'Z_ABAPGIT_SERIALIZE_PARALLEL' EXCEPTIONS function_not_exist = 1 OTHERS = 2. IF sy-subrc <> 0. gv_max_threads = 1. ELSE. * todo, add possibility to set group name in user exit CALL FUNCTION 'SPBT_INITIALIZE' EXPORTING group_name = mv_group IMPORTING free_pbt_wps = gv_max_threads EXCEPTIONS invalid_group_name = 1 internal_error = 2 pbt_env_already_initialized = 3 currently_no_resources_avail = 4 no_pbt_resources_found = 5 cant_init_different_pbt_groups = 6 OTHERS = 7. IF sy-subrc <> 0. * fallback to running sequentially. If SPBT_INITIALIZE fails, check transactions * RZ12, SM50, SM21, SARFC gv_max_threads = 1. ENDIF. ENDIF. IF gv_max_threads > 1. gv_max_threads = gv_max_threads - 1. ENDIF. ASSERT gv_max_threads >= 1. IF gv_max_threads > 32. * https://en.wikipedia.org/wiki/Amdahl%27s_law gv_max_threads = 32. ENDIF. rv_threads = gv_max_threads. ENDMETHOD. METHOD on_end_of_task. DATA: lv_result TYPE xstring, lv_path TYPE string, lv_mess TYPE c LENGTH 200, ls_fils_item TYPE zcl_abapgit_objects=>ty_serialization. RECEIVE RESULTS FROM FUNCTION 'Z_ABAPGIT_SERIALIZE_PARALLEL' IMPORTING ev_result = lv_result ev_path = lv_path EXCEPTIONS error = 1 system_failure = 2 MESSAGE lv_mess communication_failure = 3 MESSAGE lv_mess OTHERS = 4. IF sy-subrc <> 0. IF NOT mi_log IS INITIAL. IF NOT lv_mess IS INITIAL. mi_log->add_error( lv_mess ). ELSE. mi_log->add_error( |{ sy-msgv1 }{ sy-msgv2 }{ sy-msgv3 }{ sy-msgv3 }, { sy-subrc }| ). ENDIF. ENDIF. ELSE. IMPORT data = ls_fils_item FROM DATA BUFFER lv_result. "#EC CI_SUBRC ASSERT sy-subrc = 0. add_to_return( is_fils_item = ls_fils_item iv_path = lv_path ). ENDIF. mv_free = mv_free + 1. ENDMETHOD. METHOD run_parallel. DATA: lv_msg TYPE c LENGTH 100, lv_free LIKE mv_free. ASSERT mv_free > 0. DO. CALL FUNCTION 'Z_ABAPGIT_SERIALIZE_PARALLEL' STARTING NEW TASK iv_task DESTINATION IN GROUP mv_group CALLING on_end_of_task ON END OF TASK EXPORTING iv_obj_type = is_tadir-object iv_obj_name = is_tadir-obj_name iv_devclass = is_tadir-devclass iv_language = iv_language iv_path = is_tadir-path iv_serialize_master_lang_only = mv_serialize_master_lang_only EXCEPTIONS system_failure = 1 MESSAGE lv_msg communication_failure = 2 MESSAGE lv_msg resource_failure = 3 OTHERS = 4. IF sy-subrc = 3. lv_free = mv_free. WAIT UNTIL mv_free <> lv_free UP TO 1 SECONDS. CONTINUE. ELSEIF sy-subrc <> 0. ASSERT lv_msg = '' AND 0 = 1. ENDIF. EXIT. ENDDO. mv_free = mv_free - 1. ENDMETHOD. METHOD run_sequential. DATA: lx_error TYPE REF TO zcx_abapgit_exception, ls_fils_item TYPE zcl_abapgit_objects=>ty_serialization. ls_fils_item-item-obj_type = is_tadir-object. ls_fils_item-item-obj_name = is_tadir-obj_name. ls_fils_item-item-devclass = is_tadir-devclass. TRY. ls_fils_item = zcl_abapgit_objects=>serialize( is_item = ls_fils_item-item iv_serialize_master_lang_only = mv_serialize_master_lang_only iv_language = iv_language ). add_to_return( is_fils_item = ls_fils_item iv_path = is_tadir-path ). CATCH zcx_abapgit_exception INTO lx_error. IF NOT mi_log IS INITIAL. mi_log->add_exception( ix_exc = lx_error is_item = ls_fils_item-item ). ENDIF. ENDTRY. ENDMETHOD. METHOD serialize. DATA: lv_max TYPE i, li_progress TYPE REF TO zif_abapgit_progress. FIELD-SYMBOLS: <ls_tadir> LIKE LINE OF it_tadir. CLEAR mt_files. lv_max = determine_max_threads( iv_force_sequential ). mv_free = lv_max. mi_log = ii_log. li_progress = zcl_abapgit_progress=>get_instance( lines( it_tadir ) ). LOOP AT it_tadir ASSIGNING <ls_tadir>. li_progress->show( iv_current = sy-tabix iv_text = |Serialize { <ls_tadir>-obj_name }, { lv_max } threads| ) ##NO_TEXT. IF lv_max = 1. run_sequential( is_tadir = <ls_tadir> iv_language = iv_language ). ELSE. run_parallel( is_tadir = <ls_tadir> iv_task = |{ sy-tabix }| iv_language = iv_language ). WAIT UNTIL mv_free > 0 UP TO 120 SECONDS. ENDIF. ENDLOOP. WAIT UNTIL mv_free = lv_max UP TO 120 SECONDS. rt_files = mt_files. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 46911, 1096, 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, 21628, 62, 46911, 1096, 62, 9866, 62, 17204, 62, 8807, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 13, 198, 220, 220, 220, 337, 36252, 50, 319, 62, 437, 62, 1659, 62, 35943, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 79, 62, 35943, 41876, 537, 522, 764, 198, 220, 220, 220, 337, 36252, 50, 11389, 1096, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 340, 62, 83, 324, 343, 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, 220, 220, 21628, 62, 16129, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 2786, 5550, 38865, 827, 12, 75, 2303, 198, 220, 220, 220, 220, 220, 220, 220, 21065, 62, 6404, 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, 220, 220, 21628, 62, 3174, 62, 3107, 1843, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 16624, 8, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 16624, 62, 9186, 62, 926, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 764, 628, 220, 48006, 9782, 1961, 44513, 13, 628, 220, 220, 220, 42715, 12, 26947, 308, 85, 62, 9806, 62, 16663, 82, 41876, 1312, 764, 198, 220, 220, 220, 42865, 45079, 62, 16624, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 16624, 62, 9186, 62, 926, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 5787, 41876, 1312, 764, 198, 220, 220, 220, 42865, 21504, 62, 6404, 41876, 4526, 37, 5390, 1976, 361, 62, 397, 499, 18300, 62, 6404, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 8094, 41876, 374, 89, 15516, 62, 499, 565, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 46911, 1096, 62, 9866, 62, 17204, 62, 8807, 41876, 450, 499, 62, 30388, 13, 628, 220, 220, 220, 337, 36252, 50, 751, 62, 1462, 62, 7783, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 6978, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 69, 4487, 62, 9186, 41876, 1976, 565, 62, 397, 499, 18300, 62, 48205, 14804, 774, 62, 46911, 1634, 764, 198, 220, 220, 220, 337, 36252, 50, 1057, 62, 1845, 29363, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 83, 324, 343, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 83, 324, 343, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 16129, 41876, 2786, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 35943, 220, 220, 220, 220, 41876, 827, 10641, 2624, 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, 1057, 62, 3107, 1843, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 83, 324, 343, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 83, 324, 343, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 16129, 41876, 2786, 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, 5004, 62, 9806, 62, 16663, 82, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3174, 62, 3107, 1843, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 16663, 82, 8, 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, 764, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 6242, 2969, 38, 2043, 62, 35009, 12576, 35400, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 751, 62, 1462, 62, 7783, 13, 628, 220, 220, 220, 18930, 24639, 12, 23060, 10744, 3535, 50, 25, 1279, 7278, 62, 7753, 29, 220, 220, 34178, 48920, 3963, 318, 62, 69, 4487, 62, 9186, 12, 16624, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1279, 7278, 62, 7783, 29, 34178, 48920, 3963, 45079, 62, 16624, 13, 628, 198, 220, 220, 220, 17579, 3185, 5161, 318, 62, 69, 4487, 62, 9186, 12, 16624, 24994, 3528, 15871, 1279, 7278, 62, 7753, 28401, 198, 220, 220, 220, 220, 220, 43504, 10619, 3268, 2043, 12576, 48920, 5390, 45079, 62, 16624, 24994, 3528, 15871, 1279, 7278, 62, 7783, 28401, 198, 220, 220, 220, 220, 220, 1279, 7278, 62, 7783, 29, 12, 7753, 796, 1279, 7278, 62, 7753, 28401, 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, 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
CLASS zcl_advent2019_day14_hvam DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES zif_advent2019_hvam . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS ZCL_ADVENT2019_DAY14_hvam IMPLEMENTATION. METHOD zif_advent2019_hvam~solve. output = 'todo'. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 324, 1151, 23344, 62, 820, 1415, 62, 71, 85, 321, 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, 23344, 62, 71, 85, 321, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 2885, 53, 3525, 23344, 62, 26442, 1415, 62, 71, 85, 321, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 324, 1151, 23344, 62, 71, 85, 321, 93, 82, 6442, 13, 628, 220, 220, 220, 5072, 796, 705, 83, 24313, 4458, 628, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
CLASS zcl_abapgit_object_pinf DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL. PUBLIC SECTION. INTERFACES zif_abapgit_object. PROTECTED SECTION. PRIVATE SECTION. TYPES: BEGIN OF ty_pinf, attributes TYPE scompidtln, elements TYPE STANDARD TABLE OF scomeldtln WITH DEFAULT KEY, END OF ty_pinf . TYPES: ty_elements TYPE STANDARD TABLE OF tpak_package_interf_elem_ref WITH DEFAULT KEY . METHODS create_or_load IMPORTING !is_pinf TYPE ty_pinf !iv_package TYPE devclass RETURNING VALUE(ri_interface) TYPE REF TO lif_package_interface_facade RAISING zcx_abapgit_exception . METHODS delete_elements IMPORTING !ii_interface TYPE REF TO lif_package_interface_facade RAISING zcx_abapgit_exception . METHODS update_attributes IMPORTING !iv_package TYPE devclass !is_pinf TYPE ty_pinf !ii_interface TYPE REF TO lif_package_interface_facade RAISING zcx_abapgit_exception . METHODS update_elements IMPORTING is_pinf TYPE ty_pinf ii_interface TYPE REF TO lif_package_interface_facade RAISING zcx_abapgit_exception . METHODS load IMPORTING iv_name TYPE scomifnam RETURNING VALUE(ri_interface) TYPE REF TO lif_package_interface_facade. METHODS create_facade IMPORTING ii_interface TYPE REF TO if_package_interface RETURNING VALUE(ri_facade) TYPE REF TO lif_package_interface_facade. ENDCLASS. CLASS zcl_abapgit_object_pinf IMPLEMENTATION. METHOD create_facade. CREATE OBJECT ri_facade TYPE lcl_package_interface_facade EXPORTING ii_interface = ii_interface. ENDMETHOD. METHOD create_or_load. DATA: li_interface TYPE REF TO if_package_interface. IF zif_abapgit_object~exists( ) = abap_false. cl_package_interface=>create_new_package_interface( EXPORTING i_pkg_interface_name = is_pinf-attributes-intf_name i_publisher_pkg_name = iv_package IMPORTING e_package_interface = li_interface EXCEPTIONS object_already_existing = 1 object_just_created = 2 interface_name_invalid = 3 unexpected_error = 4 OTHERS = 7 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error creating new package interface' ). ENDIF. ri_interface = create_facade( li_interface ). ELSE. ri_interface = load( is_pinf-attributes-intf_name ). ENDIF. ENDMETHOD. METHOD delete_elements. DATA: lt_elements TYPE ty_elements. FIELD-SYMBOLS: <li_element> LIKE LINE OF lt_elements. ii_interface->set_elements_changeable( abap_true ). lt_elements = ii_interface->get_elements( ). LOOP AT lt_elements ASSIGNING <li_element>. <li_element>->delete( ). ENDLOOP. ii_interface->save_elements( ). ENDMETHOD. METHOD load. DATA: li_interface TYPE REF TO if_package_interface. cl_package_interface=>load_package_interface( EXPORTING i_package_interface_name = iv_name i_force_reload = abap_true IMPORTING e_package_interface = li_interface ). ri_interface = create_facade( li_interface ). ENDMETHOD. METHOD update_attributes. DATA: ls_sign TYPE scompisign, lv_changeable TYPE abap_bool. lv_changeable = ii_interface->get_changeable( ). IF lv_changeable = abap_false. * at creation the object is already in change mode ii_interface->set_changeable( abap_true ). ENDIF. ls_sign-descript = abap_true. ls_sign-pinftype = abap_true. ls_sign-restricted = abap_true. ls_sign-default_if = abap_true. ls_sign-def_sever = abap_true. ls_sign-acl_flag = abap_true. ls_sign-pifstablty = abap_true. ls_sign-release_status = abap_true. ii_interface->set_all_attributes( is_package_interface_data = is_pinf-attributes is_data_sign = ls_sign ). set_default_package( iv_package ). * looks like setting "i_suppress_dialog = abap_true" will make * it fail for local($) packages ii_interface->save( ). ii_interface->set_changeable( abap_false ). ENDMETHOD. METHOD update_elements. DATA: lt_existing TYPE ty_elements, lt_add TYPE scomeldata, lv_index TYPE i, lv_found TYPE abap_bool, ls_attr TYPE scomeldtln. FIELD-SYMBOLS: <li_element> LIKE LINE OF lt_existing, <ls_element> LIKE LINE OF is_pinf-elements. ii_interface->set_elements_changeable( abap_true ). lt_existing = ii_interface->get_elements( ). LOOP AT is_pinf-elements ASSIGNING <ls_element>. lv_found = abap_false. LOOP AT lt_existing ASSIGNING <li_element>. lv_index = sy-tabix. <li_element>->get_all_attributes( IMPORTING e_element_data = ls_attr ). IF <ls_element>-elem_type = ls_attr-elem_type AND <ls_element>-elem_key = ls_attr-elem_key. DELETE lt_existing INDEX lv_index. CONTINUE. " current loop ENDIF. ENDLOOP. IF lv_found = abap_false. APPEND <ls_element> TO lt_add. ENDIF. ENDLOOP. ii_interface->remove_elements( lt_existing ). ii_interface->add_elements( lt_add ). ii_interface->save_elements( ). ii_interface->set_elements_changeable( abap_false ). ENDMETHOD. METHOD zif_abapgit_object~changed_by. SELECT SINGLE changed_by FROM intf INTO rv_user WHERE intf_name = ms_item-obj_name. IF sy-subrc <> 0. rv_user = c_user_unknown. ENDIF. ENDMETHOD. METHOD zif_abapgit_object~delete. DATA: li_interface TYPE REF TO lif_package_interface_facade. li_interface = load( |{ ms_item-obj_name }| ). * elements must be deleted before the package interface * can be deleted delete_elements( li_interface ). li_interface->set_changeable( abap_true ). li_interface->delete( ). li_interface->save( ). ENDMETHOD. METHOD zif_abapgit_object~deserialize. DATA: li_interface TYPE REF TO lif_package_interface_facade, ls_pinf TYPE ty_pinf. io_xml->read( EXPORTING iv_name = 'PINF' CHANGING cg_data = ls_pinf ). li_interface = create_or_load( is_pinf = ls_pinf iv_package = iv_package ). update_attributes( iv_package = iv_package is_pinf = ls_pinf ii_interface = li_interface ). update_elements( is_pinf = ls_pinf ii_interface = li_interface ). ENDMETHOD. METHOD zif_abapgit_object~exists. DATA: lv_pack_name TYPE intf-pack_name, lv_main_pack TYPE tdevc-mainpack. SELECT SINGLE pack_name FROM intf INTO lv_pack_name WHERE intf_name = ms_item-obj_name. rv_bool = boolc( sy-subrc = 0 ). IF rv_bool = abap_true. SELECT SINGLE mainpack FROM tdevc INTO lv_main_pack WHERE devclass = lv_pack_name. "#EC CI_GENBUFF rv_bool = boolc( sy-subrc = 0 ). ENDIF. ENDMETHOD. METHOD zif_abapgit_object~get_comparator. RETURN. ENDMETHOD. METHOD zif_abapgit_object~get_deserialize_steps. APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps. ENDMETHOD. METHOD zif_abapgit_object~get_metadata. rs_metadata = get_metadata( ). ENDMETHOD. METHOD zif_abapgit_object~is_active. rv_active = is_active( ). ENDMETHOD. METHOD zif_abapgit_object~is_locked. DATA: lv_argument TYPE eqegraarg. lv_argument = |PF{ ms_item-obj_name }|. OVERLAY lv_argument WITH ' *'. rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'EEUDB' 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 = 'PINF' in_new_window = abap_true. ENDMETHOD. METHOD zif_abapgit_object~serialize. DATA: ls_pinf TYPE ty_pinf, lt_elements TYPE ty_elements, li_interface TYPE REF TO lif_package_interface_facade. FIELD-SYMBOLS: <lg_any> TYPE any, <li_element> LIKE LINE OF lt_elements, <ls_element> LIKE LINE OF ls_pinf-elements. li_interface = load( |{ ms_item-obj_name }| ). ls_pinf-attributes = li_interface->get_all_attributes( ). CLEAR: ls_pinf-attributes-pack_name, ls_pinf-attributes-author, ls_pinf-attributes-created_by, ls_pinf-attributes-created_on, ls_pinf-attributes-changed_by, ls_pinf-attributes-changed_on, ls_pinf-attributes-tadir_devc. * fields does not exist in older SAP versions ASSIGN COMPONENT 'SW_COMP_LOGICAL_PACKAGE' OF STRUCTURE ls_pinf-attributes TO <lg_any>. IF sy-subrc = 0. CLEAR <lg_any>. ENDIF. ASSIGN COMPONENT 'SW_COMP_TADIR_PACKAGE' OF STRUCTURE ls_pinf-attributes TO <lg_any>. IF sy-subrc = 0. CLEAR <lg_any>. ENDIF. lt_elements = li_interface->get_elements( ). LOOP AT lt_elements ASSIGNING <li_element>. APPEND INITIAL LINE TO ls_pinf-elements ASSIGNING <ls_element>. <li_element>->get_all_attributes( IMPORTING e_element_data = <ls_element> ). CLEAR <ls_element>-elem_pack. ENDLOOP. io_xml->add( ig_data = ls_pinf iv_name = 'PINF' ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 79, 10745, 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, 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, 79, 10745, 11, 198, 220, 220, 220, 220, 220, 220, 220, 12608, 41876, 629, 3361, 312, 83, 18755, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4847, 220, 220, 41876, 49053, 9795, 43679, 3963, 629, 462, 335, 83, 18755, 13315, 5550, 38865, 35374, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 79, 10745, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 1259, 62, 68, 3639, 41876, 49053, 9795, 43679, 3963, 256, 41091, 62, 26495, 62, 3849, 69, 62, 68, 10671, 62, 5420, 13315, 5550, 38865, 35374, 764, 628, 220, 220, 220, 337, 36252, 50, 2251, 62, 273, 62, 2220, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 79, 10745, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1259, 62, 79, 10745, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 26495, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1614, 4871, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 380, 62, 39994, 8, 41876, 4526, 37, 5390, 3868, 62, 26495, 62, 39994, 62, 38942, 671, 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, 68, 3639, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 4178, 62, 39994, 41876, 4526, 37, 5390, 3868, 62, 26495, 62, 39994, 62, 38942, 671, 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, 4296, 62, 1078, 7657, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 26495, 220, 220, 41876, 1614, 4871, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 79, 10745, 220, 220, 220, 220, 220, 41876, 1259, 62, 79, 10745, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 4178, 62, 39994, 41876, 4526, 37, 5390, 3868, 62, 26495, 62, 39994, 62, 38942, 671, 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, 4296, 62, 68, 3639, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 79, 10745, 220, 220, 220, 220, 220, 41876, 1259, 62, 79, 10745, 198, 220, 220, 220, 220, 220, 220, 220, 21065, 62, 39994, 41876, 4526, 37, 5390, 3868, 62, 26495, 62, 39994, 62, 38942, 671, 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, 3440, 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, 41876, 629, 296, 361, 7402, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 380, 62, 39994, 8, 41876, 4526, 37, 5390, 3868, 62, 26495, 62, 39994, 62, 38942, 671, 13, 198, 220, 220, 220, 337, 36252, 50, 2251, 62, 38942, 671, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21065, 62, 39994, 220, 220, 220, 220, 41876, 4526, 37, 5390, 611, 62, 26495, 62, 39994, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 380, 62, 38942, 671, 8, 41876, 4526, 37, 5390, 3868, 62, 26495, 62, 39994, 62, 38942, 671, 13, 198, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 79, 10745, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 2251, 62, 38942, 671, 13, 628, 220, 220, 220, 29244, 6158, 25334, 23680, 374, 72, 62, 38942, 671, 41876, 300, 565, 62, 26495, 62, 39994, 62, 38942, 671, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21065, 62, 39994, 796, 21065, 62, 39994, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 2251, 62, 273, 62, 2220, 13, 628, 220, 220, 220, 42865, 25, 7649, 62, 39994, 41876, 4526, 37, 5390, 611, 62, 26495, 62, 39994, 13, 628, 220, 220, 220, 16876, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1069, 1023, 7, 1267, 796, 450, 499, 62, 9562, 13, 198, 220, 220, 220, 220, 220, 537, 62, 26495, 62, 39994, 14804, 17953, 62, 3605, 62, 26495, 62, 39994, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 35339, 62, 39994, 62, 3672, 220, 220, 220, 796, 318, 62, 79, 10745, 12, 1078, 7657, 12, 600, 69, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 12984, 8191, 62, 35339, 62, 3672, 220, 220, 220, 796, 21628, 62, 26495, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 304, 62, 26495, 62, 39994, 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, 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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 ]
CLASS ltcl_transport_objects DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. METHODS: add_new_to_local_files FOR TESTING RAISING cx_static_check, modified_to_new_local_files FOR TESTING RAISING cx_static_check, transport_not_in_repository FOR TESTING RAISING cx_static_check, object_not_in_local_files FOR TESTING RAISING cx_static_check, cant_be_added_with_del_flag FOR TESTING RAISING cx_static_check, cant_be_modified_with_del_flag FOR TESTING RAISING cx_static_check, deleted_to_removed_files FOR TESTING RAISING cx_static_check, should_remove_no_delflag_iwmo FOR TESTING RAISING cx_static_check, should_remove_no_delflag_iwom FOR TESTING RAISING cx_static_check, should_remove_no_delflag_iwsg FOR TESTING RAISING cx_static_check, should_remove_no_delflag_iwsv FOR TESTING RAISING cx_static_check, should_remove_no_delflag_susc FOR TESTING RAISING cx_static_check, shouldnt_remove_no_delflag FOR TESTING RAISING cx_static_check, should_add_all_local_files FOR TESTING RAISING cx_static_check, should_delete_all_related FOR TESTING RAISING cx_static_check, setup, given_the_transport_object IMPORTING iv_obj_name TYPE string iv_obj_type TYPE string iv_delflag TYPE abap_bool OPTIONAL, given_the_object_status IMPORTING iv_obj_name TYPE string OPTIONAL iv_obj_type TYPE string OPTIONAL iv_filename TYPE string OPTIONAL iv_path TYPE string OPTIONAL iv_lstate TYPE char1, given_the_local_file IMPORTING iv_obj_name TYPE string iv_obj_type TYPE string iv_filename TYPE string iv_path TYPE string iv_data TYPE string RETURNING VALUE(rs_local_file) TYPE zif_abapgit_definitions=>ty_file_item, when_staging RAISING zcx_abapgit_exception, then_file_should_be_added IMPORTING is_local_file TYPE zif_abapgit_definitions=>ty_file_item, then_it_should_raise_exception IMPORTING iv_with_text TYPE string, then_it_should_remove_at_stage IMPORTING iv_filename TYPE string iv_path TYPE string, then_it_should_not_raise_excpt. DATA: mo_transport_objects TYPE REF TO zcl_abapgit_transport_objects, mt_transport_objects TYPE zif_abapgit_definitions=>ty_tadir_tt, mt_object_statuses TYPE zif_abapgit_definitions=>ty_results_tt, ms_stage_objects TYPE zif_abapgit_definitions=>ty_stage_files, mo_stage TYPE REF TO zcl_abapgit_stage. ENDCLASS. CLASS ltcl_transport_objects IMPLEMENTATION. METHOD setup. CREATE OBJECT mo_stage. ENDMETHOD. METHOD add_new_to_local_files. DATA ls_local_file TYPE zif_abapgit_definitions=>ty_file_item. given_the_transport_object( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_lstate = zif_abapgit_definitions=>c_state-added ). ls_local_file = given_the_local_file( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_path = '/path' iv_data = 'data' ). when_staging( ). then_file_should_be_added( ls_local_file ). ENDMETHOD. METHOD modified_to_new_local_files. DATA ls_local_file TYPE zif_abapgit_definitions=>ty_file_item. given_the_transport_object( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_lstate = zif_abapgit_definitions=>c_state-modified ). ls_local_file = given_the_local_file( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_path = '/path' iv_data = 'data' ). when_staging( ). then_file_should_be_added( ls_local_file ). ENDMETHOD. METHOD should_add_all_local_files. "Not only .abap, but also .xml and other includes DATA ls_abap_local_file TYPE zif_abapgit_definitions=>ty_file_item. DATA ls_xml_local_file TYPE zif_abapgit_definitions=>ty_file_item. given_the_transport_object( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_lstate = zif_abapgit_definitions=>c_state-modified ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.xml' iv_lstate = zif_abapgit_definitions=>c_state-modified ). ls_abap_local_file = given_the_local_file( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_path = '/path' iv_data = 'data' ). ls_xml_local_file = given_the_local_file( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.xml' iv_path = '/path' iv_data = 'data' ). when_staging( ). then_file_should_be_added( ls_abap_local_file ). then_file_should_be_added( ls_xml_local_file ). ENDMETHOD. METHOD transport_not_in_repository. given_the_transport_object( iv_obj_name = 'CL_A_CLASS_NOT_IN_REPO' iv_obj_type = 'CLAS' ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_lstate = zif_abapgit_definitions=>c_state-added ). then_it_should_not_raise_excpt( ). ENDMETHOD. METHOD object_not_in_local_files. given_the_transport_object( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_lstate = zif_abapgit_definitions=>c_state-added ). given_the_local_file( iv_obj_name = 'CL_ANOTHER_LOCAL_FILE' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_path = '/path' iv_data = 'data' ). then_it_should_raise_exception( 'Object CL_FOO not found in the local repository files' ). ENDMETHOD. METHOD cant_be_added_with_del_flag. given_the_transport_object( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_delflag = abap_true ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_lstate = zif_abapgit_definitions=>c_state-added ). then_it_should_raise_exception( 'Object CL_FOO should be added/modified, but has deletion flag in transport' ). ENDMETHOD. METHOD cant_be_modified_with_del_flag. given_the_transport_object( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_delflag = abap_true ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_lstate = zif_abapgit_definitions=>c_state-modified ). then_it_should_raise_exception( 'Object CL_FOO should be added/modified, but has deletion flag in transport' ). ENDMETHOD. METHOD deleted_to_removed_files. given_the_transport_object( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_delflag = abap_true ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_path = '/a_path' iv_lstate = zif_abapgit_definitions=>c_state-deleted ). when_staging( ). then_it_should_remove_at_stage( iv_filename = 'CL_FOO.abap' iv_path = '/a_path' ). ENDMETHOD. METHOD should_delete_all_related. "i.e. Should also delete the XMLs related to the transport objects given_the_transport_object( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_delflag = abap_true ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_path = '/a_path' iv_lstate = zif_abapgit_definitions=>c_state-deleted ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.xml' iv_path = '/a_path' iv_lstate = zif_abapgit_definitions=>c_state-deleted ). when_staging( ). then_it_should_remove_at_stage( iv_filename = 'CL_FOO.abap' iv_path = '/a_path' ). then_it_should_remove_at_stage( iv_filename = 'CL_FOO.xml' iv_path = '/a_path' ). ENDMETHOD. METHOD should_remove_no_delflag_iwmo. given_the_transport_object( iv_obj_name = 'ZFOO' iv_obj_type = 'IWMO' iv_delflag = abap_false ). given_the_object_status( iv_obj_name = 'ZFOO' iv_obj_type = 'IWMO' iv_filename = 'zfoo.iwmo.xml' iv_path = '/a_path' iv_lstate = zif_abapgit_definitions=>c_state-deleted ). then_it_should_not_raise_excpt( ). ENDMETHOD. METHOD should_remove_no_delflag_iwom. given_the_transport_object( iv_obj_name = 'ZFOO' iv_obj_type = 'IWOM' iv_delflag = abap_false ). given_the_object_status( iv_obj_name = 'ZFOO' iv_obj_type = 'IWOM' iv_filename = 'zfoo.iwom.xml' iv_path = '/a_path' iv_lstate = zif_abapgit_definitions=>c_state-deleted ). then_it_should_not_raise_excpt( ). ENDMETHOD. METHOD should_remove_no_delflag_iwsg. given_the_transport_object( iv_obj_name = 'ZFOO' iv_obj_type = 'IWSG' iv_delflag = abap_false ). given_the_object_status( iv_obj_name = 'ZFOO' iv_obj_type = 'IWSG' iv_filename = 'zfoo.iwsg.xml' iv_path = '/a_path' iv_lstate = zif_abapgit_definitions=>c_state-deleted ). then_it_should_not_raise_excpt( ). ENDMETHOD. METHOD should_remove_no_delflag_iwsv. given_the_transport_object( iv_obj_name = 'ZFOO' iv_obj_type = 'IWSV' iv_delflag = abap_false ). given_the_object_status( iv_obj_name = 'ZFOO' iv_obj_type = 'IWSV' iv_filename = 'zfoo.iwsv.xml' iv_path = '/a_path' iv_lstate = zif_abapgit_definitions=>c_state-deleted ). then_it_should_not_raise_excpt( ). ENDMETHOD. METHOD should_remove_no_delflag_susc. given_the_transport_object( iv_obj_name = 'ZFOO' iv_obj_type = 'SUSC' iv_delflag = abap_false ). given_the_object_status( iv_obj_name = 'ZFOO' iv_obj_type = 'SUSC' iv_filename = 'zfoo.susc.xml' iv_path = '/a_path' iv_lstate = zif_abapgit_definitions=>c_state-deleted ). then_it_should_not_raise_excpt( ). ENDMETHOD. METHOD shouldnt_remove_no_delflag. given_the_transport_object( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_delflag = abap_false ). given_the_object_status( iv_obj_name = 'CL_FOO' iv_obj_type = 'CLAS' iv_filename = 'CL_FOO.abap' iv_path = '/a_path' iv_lstate = zif_abapgit_definitions=>c_state-deleted ). then_it_should_raise_exception( 'Object CL_FOO should be removed, but has NO deletion flag in transport' ). ENDMETHOD. METHOD given_the_transport_object. DATA ls_transport_object TYPE zif_abapgit_definitions=>ty_tadir. ls_transport_object-obj_name = iv_obj_name. ls_transport_object-object = iv_obj_type. ls_transport_object-delflag = iv_delflag. APPEND ls_transport_object TO mt_transport_objects. ENDMETHOD. METHOD given_the_object_status. DATA ls_object_status TYPE zif_abapgit_definitions=>ty_result. ls_object_status-obj_name = iv_obj_name. ls_object_status-obj_type = iv_obj_type. ls_object_status-filename = iv_filename. ls_object_status-path = iv_path. ls_object_status-lstate = iv_lstate. APPEND ls_object_status TO mt_object_statuses. ENDMETHOD. METHOD given_the_local_file. rs_local_file-item-obj_name = iv_obj_name. rs_local_file-item-obj_type = iv_obj_type. rs_local_file-file-filename = iv_filename. rs_local_file-file-path = iv_path. rs_local_file-file-data = iv_data. APPEND rs_local_file TO ms_stage_objects-local. ENDMETHOD. METHOD when_staging. CREATE OBJECT mo_transport_objects EXPORTING it_transport_objects = mt_transport_objects. mo_transport_objects->to_stage( io_stage = mo_stage is_stage_objects = ms_stage_objects it_object_statuses = mt_object_statuses ). ENDMETHOD. METHOD then_file_should_be_added. DATA: lt_staged_objects TYPE zif_abapgit_definitions=>ty_stage_tt. lt_staged_objects = mo_stage->get_all( ). READ TABLE lt_staged_objects TRANSPORTING NO FIELDS WITH KEY file-filename = is_local_file-file-filename file-path = is_local_file-file-path file-data = is_local_file-file-data method = zif_abapgit_definitions=>c_method-add. IF sy-subrc <> 0. cl_abap_unit_assert=>fail( |Object { is_local_file-file-filename } not added to stage| ). ENDIF. ENDMETHOD. METHOD then_it_should_raise_exception. DATA: lx_exception TYPE REF TO zcx_abapgit_exception. TRY. when_staging( ). cl_abap_unit_assert=>fail( 'Should have raised exception' ). CATCH zcx_abapgit_exception INTO lx_exception. cl_abap_unit_assert=>assert_equals( act = lx_exception->get_text( ) exp = iv_with_text ). ENDTRY. ENDMETHOD. METHOD then_it_should_remove_at_stage. DATA: lt_staged_objects TYPE zif_abapgit_definitions=>ty_stage_tt. lt_staged_objects = mo_stage->get_all( ). READ TABLE lt_staged_objects TRANSPORTING NO FIELDS WITH KEY file-filename = iv_filename file-path = iv_path. IF sy-subrc <> 0. cl_abap_unit_assert=>fail( |Object { iv_filename } not removed in stage| ). ENDIF. ENDMETHOD. METHOD then_it_should_not_raise_excpt. DATA: lx_exception TYPE REF TO zcx_abapgit_exception. TRY. when_staging( ). CATCH zcx_abapgit_exception INTO lx_exception. cl_abap_unit_assert=>fail( 'Should not have raised exception' ). ENDTRY. ENDMETHOD. ENDCLASS.
[ 198, 31631, 300, 83, 565, 62, 7645, 634, 62, 48205, 5550, 20032, 17941, 7473, 43001, 2751, 360, 4261, 6234, 6006, 9863, 45698, 42, 49277, 43638, 5805, 7597, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 751, 62, 3605, 62, 1462, 62, 12001, 62, 16624, 220, 220, 220, 220, 220, 220, 220, 220, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 9518, 62, 1462, 62, 3605, 62, 12001, 62, 16624, 220, 220, 220, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 4839, 62, 1662, 62, 259, 62, 260, 1930, 37765, 220, 220, 220, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 2134, 62, 1662, 62, 259, 62, 12001, 62, 16624, 220, 220, 220, 220, 220, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 18548, 62, 1350, 62, 29373, 62, 4480, 62, 12381, 62, 32109, 220, 220, 220, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 18548, 62, 1350, 62, 41771, 62, 4480, 62, 12381, 62, 32109, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 13140, 62, 1462, 62, 2787, 2668, 62, 16624, 220, 220, 220, 220, 220, 220, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 815, 62, 28956, 62, 3919, 62, 12381, 32109, 62, 14246, 5908, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 815, 62, 28956, 62, 3919, 62, 12381, 32109, 62, 14246, 296, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 815, 62, 28956, 62, 3919, 62, 12381, 32109, 62, 14246, 45213, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 815, 62, 28956, 62, 3919, 62, 12381, 32109, 62, 14246, 21370, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 815, 62, 28956, 62, 3919, 62, 12381, 32109, 62, 82, 16241, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 815, 429, 62, 28956, 62, 3919, 62, 12381, 32109, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 815, 62, 2860, 62, 439, 62, 12001, 62, 16624, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 815, 62, 33678, 62, 439, 62, 5363, 220, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 9058, 11, 198, 220, 220, 220, 220, 220, 1813, 62, 1169, 62, 7645, 634, 62, 15252, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 26801, 62, 3672, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 26801, 62, 4906, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 12381, 32109, 220, 41876, 450, 499, 62, 30388, 39852, 2849, 1847, 11, 198, 220, 220, 220, 220, 220, 1813, 62, 1169, 62, 15252, 62, 13376, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 26801, 62, 3672, 41876, 4731, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 26801, 62, 4906, 41876, 4731, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 34345, 41876, 4731, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 6978, 220, 220, 220, 220, 41876, 4731, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 75, 5219, 220, 220, 41876, 1149, 16, 11, 198, 220, 220, 220, 220, 220, 1813, 62, 1169, 62, 12001, 62, 7753, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 26801, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 26801, 62, 4906, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 34345, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 6978, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 7890, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 3808, 62, 12001, 62, 7753, 8, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 7753, 62, 9186, 11, 198, 220, 220, 220, 220, 220, 618, 62, 301, 3039, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 788, 62, 7753, 62, 21754, 62, 1350, 62, 29373, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 62, 12001, 62, 7753, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 7753, 62, 9186, 11, 198, 220, 220, 220, 220, 220, 788, 62, 270, 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,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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 ]
CLASS ycl_a2g_json_batchclear_res DEFINITION PUBLIC INHERITING FROM ycl_a2g_jsonbase CREATE PUBLIC . PUBLIC SECTION. "! Build the class "! @parameter if_msg_manager | message managere where soter alla message triggered by the applicaition METHODS constructor IMPORTING if_msg_manager TYPE REF TO yif_a2g_msg_manager. METHODS: yif_a2g_json~set_attribute REDEFINITION. METHODS: yif_a2g_json~get_attribute REDEFINITION. TYPES: BEGIN OF ty_s_json_batchclear, spreadsheetid TYPE string, clearedranges TYPE ya2google_t_jstring, END OF ty_s_json_batchclear. CONSTANTS: gc_fnam_spreadsheetid TYPE string VALUE 'SPREADSHEETID'. CONSTANTS: gc_fnam_clearedranges TYPE string VALUE 'CLEAREDRANGE'. PROTECTED SECTION. METHODS generate_rules REDEFINITION. METHODS rebuild_data REDEFINITION. METHODS push_data REDEFINITION. DATA: gs_batchclear_res TYPE ty_s_json_batchclear. METHODS: set_clearedranges IMPORTING !i_value TYPE REF TO data. METHODS: set_spreadsheetid IMPORTING !i_value TYPE REF TO data. PRIVATE SECTION. ENDCLASS. CLASS ycl_a2g_json_batchclear_res IMPLEMENTATION. METHOD set_spreadsheetid. FIELD-SYMBOLS <fs_value> TYPE string. ASSIGN i_value->* TO <fs_value>. IF <fs_value> IS ASSIGNED. CHECK me->gs_batchclear_res-spreadsheetid <> <fs_value>. me->gs_batchclear_res-spreadsheetid = <fs_value>. ENDIF. ENDMETHOD. METHOD set_clearedranges. FIELD-SYMBOLS <fs_value> TYPE stringtab. ASSIGN i_value->* TO <fs_value>. IF <fs_value> IS ASSIGNED. append <fs_value> to me->gs_batchclear_res-clearedranges. ENDIF. ENDMETHOD. METHOD yif_a2g_json~set_attribute. CASE i_name. WHEN gc_fnam_spreadsheetid. me->set_clearedranges( i_value ). WHEN gc_fnam_clearedranges. me->set_clearedranges( i_value ). ENDCASE. ENDMETHOD. METHOD yif_a2g_json~get_attribute. CASE i_name. WHEN gc_fnam_spreadsheetid. return = REF #( me->gs_batchclear_res-spreadsheetid ). WHEN gc_fnam_clearedranges. return = REF #( me->gs_batchclear_res-clearedranges ). ENDCASE. ENDMETHOD. METHOD push_data. ENDMETHOD. METHOD rebuild_data. ENDMETHOD. METHOD constructor. super->constructor( if_msg_manager ). me->gv_data = REF #( me->gs_batchclear_res ). ENDMETHOD. METHOD generate_rules. ENDMETHOD. ENDCLASS.
[ 31631, 331, 565, 62, 64, 17, 70, 62, 17752, 62, 43501, 20063, 62, 411, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 220, 220, 3268, 16879, 2043, 2751, 16034, 331, 565, 62, 64, 17, 70, 62, 17752, 8692, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 366, 0, 10934, 262, 1398, 198, 220, 220, 220, 366, 0, 2488, 17143, 2357, 611, 62, 19662, 62, 37153, 930, 3275, 6687, 260, 810, 264, 19543, 477, 64, 3275, 13973, 416, 262, 2161, 64, 653, 198, 220, 220, 220, 337, 36252, 50, 23772, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 611, 62, 19662, 62, 37153, 41876, 4526, 37, 5390, 331, 361, 62, 64, 17, 70, 62, 19662, 62, 37153, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 331, 361, 62, 64, 17, 70, 62, 17752, 93, 2617, 62, 42348, 220, 220, 220, 220, 220, 23848, 36, 20032, 17941, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 331, 361, 62, 64, 17, 70, 62, 17752, 93, 1136, 62, 42348, 220, 220, 220, 220, 220, 23848, 36, 20032, 17941, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 347, 43312, 3963, 1259, 62, 82, 62, 17752, 62, 43501, 20063, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30117, 312, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12539, 81, 6231, 41876, 21349, 17, 13297, 62, 83, 62, 73, 8841, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 82, 62, 17752, 62, 43501, 20063, 13, 628, 220, 220, 220, 7102, 2257, 1565, 4694, 25, 308, 66, 62, 69, 7402, 62, 43639, 21760, 312, 220, 220, 41876, 4731, 26173, 8924, 705, 4303, 15675, 9693, 36, 2767, 2389, 4458, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 25, 308, 66, 62, 69, 7402, 62, 2375, 1144, 81, 6231, 220, 220, 41876, 4731, 26173, 8924, 705, 29931, 1503, 1961, 49, 27746, 4458, 628, 220, 48006, 9782, 1961, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 7716, 62, 38785, 23848, 36, 20032, 17941, 13, 198, 220, 220, 220, 337, 36252, 50, 17884, 62, 7890, 220, 220, 23848, 36, 20032, 17941, 13, 198, 220, 220, 220, 337, 36252, 50, 4574, 62, 7890, 220, 220, 220, 220, 220, 23848, 36, 20032, 17941, 13, 628, 220, 220, 220, 42865, 25, 308, 82, 62, 43501, 20063, 62, 411, 41876, 1259, 62, 82, 62, 17752, 62, 43501, 20063, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 900, 62, 2375, 1144, 81, 6231, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 5145, 72, 62, 8367, 41876, 4526, 37, 5390, 1366, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 900, 62, 43639, 21760, 312, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 5145, 72, 62, 8367, 41876, 4526, 37, 5390, 1366, 13, 628, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 331, 565, 62, 64, 17, 70, 62, 17752, 62, 43501, 20063, 62, 411, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 900, 62, 43639, 21760, 312, 13, 628, 220, 220, 220, 18930, 24639, 12, 23060, 10744, 3535, 50, 1279, 9501, 62, 8367, 29, 41876, 4731, 13, 628, 220, 220, 220, 24994, 16284, 1312, 62, 8367, 3784, 9, 5390, 1279, 9501, 62, 8367, 28401, 198, 220, 220, 220, 16876, 1279, 9501, 62, 8367, 29, 3180, 24994, 16284, 1961, 13, 198, 220, 220, 220, 220, 220, 5870, 25171, 502, 3784, 14542, 62, 43501, 20063, 62, 411, 12, 43639, 21760, 312, 1279, 29, 1279, 9501, 62, 8367, 28401, 198, 220, 220, 220, 220, 220, 502, 3784, 14542, 62, 43501, 20063, 62, 411, 12, 43639, 21760, 312, 796, 1279, 9501, 62, 8367, 28401, 198, 220, 220, 220, 23578, 5064, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 900, 62, 2375, 1144, 81, 6231, 13, 628, 220, 220, 220, 18930, 24639, 12, 23060, 10744, 3535, 50, 1279, 9501, 62, 8367, 29, 41876, 4731, 8658, 13, 198, 220, 220, 220, 24994, 16284, 1312, 62, 8367, 3784, 9, 5390, 1279, 9501, 62, 8367, 28401, 198, 220, 220, 220, 16876, 1279, 9501, 62, 8367, 29, 3180, 24994, 16284, 1961, 13, 198, 220, 220, 220, 220, 220, 24443, 1279, 9501, 62, 8367, 29, 284, 502, 3784, 14542, 62, 43501, 20063, 62, 411, 12, 2375, 1144, 81, 6231, 13, 198, 220, 220, 220, 23578, 5064, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 331, 361, 62, 64, 17, 70, 62, 17752, 93, 2617, 62, 42348, 13, 198, 220, 220, 220, 42001, 220, 1312, 62, 3672, 13, 198, 220, 220, 220, 220, 220, 42099, 308, 66, 62, 69, 7402, 62, 43639, 21760, 312, 13, 220, 220, 220, 502, 3784, 2617, 62, 2375, 1144, 81, 6231, 7, 1312, 62, 8367, 6739, 198, 220, 220, 220, 220, 220, 42099, 308, 66, 62, 69, 7402, 62, 2375, 1144, 81, 6231, 13, 220, 220, 220, 502, 3784, 2617, 62, 2375, 1144, 81, 6231, 7, 1312, 62, 8367, 6739, 198, 220, 220, 220, 23578, 34, 11159, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 331, 361, 62, 64, 17, 70, 62, 17752, 93, 1136, 62, 42348, 13, 198, 220, 220, 220, 42001, 220, 1312, 62, 3672, 13, 198, 220, 220, 220, 220, 220, 42099, 308, 66, 62, 69, 7402, 62, 43639, 21760, 312, 13, 220, 220, 1441, 796, 4526, 37, 1303, 7, 502, 3784, 14542, 62, 43501, 20063, 62, 411, 12, 43639, 21760, 312, 6739, 198, 220, 220, 220, 220, 220, 42099, 308, 66, 62, 69, 7402, 62, 2375, 1144, 81, 6231, 13, 220, 220, 1441, 796, 4526, 37, 1303, 7, 502, 3784, 14542, 62, 43501, 20063, 62, 411, 12, 2375, 1144, 81, 6231, 6739, 198, 220, 220, 220, 23578, 34, 11159, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 4574, 62, 7890, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 17884, 62, 7890, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 23772, 13, 198, 220, 220, 220, 2208, 3784, 41571, 273, 7, 611, 62, 19662, 62, 37153, 6739, 198, 220, 220, 220, 502, 3784, 70, 85, 62 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
*"* use this source file for your ABAP unit test classes CLASS ltc_email_check DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. TYPES: BEGIN OF ty_case, data TYPE string, valid TYPE abap_bool, END OF ty_case. TYPES: ty_case_t TYPE STANDARD TABLE OF ty_case. METHODS: invalid_input FOR TESTING. METHODS: valid_input FOR TESTING. ENDCLASS. CLASS ltc_email_check IMPLEMENTATION. METHOD invalid_input. DATA: cases TYPE ty_case_t. cases = VALUE #( ( data = '120190228' valid = abap_false ) ( data = '' valid = abap_false ) ( data = 'Abc.example.com' valid = abap_false ) ( data = '0050561EFE691ED9A9E5182BE684EZEA' valid = abap_false ) ( data = '!' valid = abap_false ) ( data = 'your mom' valid = abap_false ) ( data = 'NULL' valid = abap_false ) ( data = '0050561efe691ed9a9e5182be684e5ea' valid = abap_false ) ( data = 'C56A4180-65AA-42EC-A945-5FD21DEC0538' valid = abap_false ) ). LOOP AT cases ASSIGNING FIELD-SYMBOL(<case>). DATA(valid) = zcl_adv_guid_check=>zif_adv_check~is_valid( <case>-data ). cl_abap_unit_assert=>assert_equals( act = valid exp = <case>-valid msg = |Result of { <case>-data } should be '{ <case>-valid }'| ). ENDLOOP. ENDMETHOD. METHOD valid_input. DATA: cases TYPE ty_case_t. cases = VALUE #( ( data = '0050561EFE691ED9A9E5182BE684E5EA' valid = abap_true ) ( data = 'C56A418065AA42ECA9455FD21DEC0538' valid = abap_true ) ( data = '42F10816850C1EE7A7813CEF57F5C70D' valid = abap_true ) ( data = '667F98FDC91D46CF90629A879F18EA0D' valid = abap_true ) ( data = '053F21DC7A8749CD93C36B8EB84D3671' valid = abap_true ) ( data = '8C588E09BE65423CBCCE73C401E7B770' valid = abap_true ) ( data = '67C9540D1EA8427087BC8EF993D0A811' valid = abap_true ) ). LOOP AT cases ASSIGNING FIELD-SYMBOL(<case>). DATA(valid) = zcl_adv_guid_check=>zif_adv_check~is_valid( <case>-data ). cl_abap_unit_assert=>assert_equals( act = valid exp = <case>-valid msg = |Result of { <case>-data } should be '{ <case>-valid }'| ). ENDLOOP. ENDMETHOD. ENDCLASS.
[ 9, 1, 9, 779, 428, 2723, 2393, 329, 534, 9564, 2969, 4326, 1332, 6097, 198, 31631, 300, 23047, 62, 12888, 62, 9122, 5550, 20032, 17941, 25261, 7473, 43001, 2751, 360, 4261, 6234, 6006, 9863, 45698, 42, 49277, 43638, 5805, 7597, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 198, 220, 220, 220, 24412, 47, 1546, 25, 347, 43312, 3963, 1259, 62, 7442, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4938, 41876, 450, 499, 62, 30388, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 7442, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 1259, 62, 7442, 62, 83, 41876, 49053, 9795, 43679, 3963, 1259, 62, 7442, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 12515, 62, 15414, 7473, 43001, 2751, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 4938, 62, 15414, 7473, 43001, 2751, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 300, 23047, 62, 12888, 62, 9122, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 12515, 62, 15414, 13, 628, 220, 220, 220, 42865, 25, 2663, 41876, 1259, 62, 7442, 62, 83, 13, 628, 220, 220, 220, 2663, 796, 26173, 8924, 1303, 7, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 1065, 486, 3829, 23815, 6, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4938, 796, 450, 499, 62, 9562, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 10148, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4938, 796, 450, 499, 62, 9562, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 4826, 66, 13, 20688, 13, 785, 6, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4938, 796, 450, 499, 62, 9562, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 405, 1120, 47915, 36, 15112, 49541, 1961, 24, 32, 24, 36, 20, 24294, 12473, 41580, 36, 57, 16412, 6, 220, 220, 220, 220, 4938, 796, 450, 499, 62, 9562, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 13679, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4938, 796, 450, 499, 62, 9562, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 14108, 1995, 6, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4938, 796, 450, 499, 62, 9562, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 33991, 6, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4938, 796, 450, 499, 62, 9562, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 405, 1120, 47915, 22521, 49541, 276, 24, 64, 24, 68, 20, 24294, 1350, 41580, 68, 20, 18213, 6, 220, 220, 220, 220, 4938, 796, 450, 499, 62, 9562, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 34, 3980, 32, 19, 15259, 12, 2996, 3838, 12, 3682, 2943, 12, 32, 24, 2231, 12, 20, 26009, 2481, 41374, 2713, 2548, 6, 4938, 796, 450, 499, 62, 9562, 1267, 198, 220, 220, 220, 6739, 628, 220, 220, 220, 17579, 3185, 5161, 2663, 24994, 3528, 15871, 18930, 24639, 12, 23060, 10744, 3535, 7, 27, 7442, 29, 737, 628, 220, 220, 220, 220, 220, 42865, 7, 12102, 8, 796, 1976, 565, 62, 32225, 62, 5162, 312, 62, 9122, 14804, 89, 361, 62, 32225, 62, 9122, 93, 271, 62, 12102, 7, 1279, 7442, 29, 12, 7890, 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, 719, 796, 4938, 198, 220, 220, 220, 220, 220, 220, 220, 1033, 796, 1279, 7442, 29, 12, 12102, 198, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 930, 23004, 286, 1391, 1279, 7442, 29, 12, 7890, 1782, 815, 307, 705, 90, 1279, 7442, 29, 12, 12102, 1782, 6, 91, 198, 220, 220, 220, 220, 220, 6739, 628, 220, 220, 220, 23578, 21982, 3185, 13, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 4938, 62, 15414, 13, 628, 220, 220, 220, 42865, 25, 2663, 41876, 1259, 62, 7442, 62, 83, 13, 628, 220, 220, 220, 2663, 796, 26173, 8924, 1303, 7, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 405, 1120, 47915, 36, 15112, 49541, 1961, 24, 32, 24, 36, 20, 24294, 12473, 41580, 36, 20, 16412, 6, 4938, 796, 450, 499, 62, 7942, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 34, 3980, 32, 19, 15259, 2996, 3838, 3682, 36600, 24, 30505, 26009, 2481, 41374, 2713, 2548, 6, 4938, 796, 450, 499, 62, 7942, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 357, 1366, 796, 705, 3682, 37, 15711, 14656, 1120, 34, 16, 6500, 22, 32, 3695, 1485, 5222, 37, 3553, 37, 20, 34, 2154, 35, 6, 4938, 796, 450, 499, 62, 7942, 1267, 198, 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 ]
CLASS zcl_abapgit_services_repo DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. CLASS-METHODS new_online IMPORTING !is_repo_params TYPE zif_abapgit_services_repo=>ty_repo_params RETURNING VALUE(ro_repo) TYPE REF TO zcl_abapgit_repo_online RAISING zcx_abapgit_exception. CLASS-METHODS refresh IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception . CLASS-METHODS remove IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception. CLASS-METHODS purge IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception. CLASS-METHODS new_offline RAISING zcx_abapgit_exception. CLASS-METHODS remote_attach IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception. CLASS-METHODS remote_detach IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception. CLASS-METHODS remote_change IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception. CLASS-METHODS refresh_local_checksums IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception. CLASS-METHODS toggle_favorite IMPORTING !iv_key TYPE zif_abapgit_persistence=>ty_repo-key RAISING zcx_abapgit_exception . CLASS-METHODS transport_to_branch IMPORTING !iv_repository_key TYPE zif_abapgit_persistence=>ty_value RAISING zcx_abapgit_exception. CLASS-METHODS gui_deserialize IMPORTING !io_repo TYPE REF TO zcl_abapgit_repo RAISING zcx_abapgit_exception . PROTECTED SECTION. PRIVATE SECTION. CLASS-METHODS popup_overwrite CHANGING !ct_overwrite TYPE zif_abapgit_definitions=>ty_overwrite_tt RAISING zcx_abapgit_exception. CLASS-METHODS popup_package_overwrite CHANGING !ct_overwrite TYPE zif_abapgit_definitions=>ty_overwrite_tt RAISING zcx_abapgit_exception. ENDCLASS. CLASS zcl_abapgit_services_repo IMPLEMENTATION. METHOD gui_deserialize. DATA: ls_checks TYPE zif_abapgit_definitions=>ty_deserialize_checks, lt_requirements TYPE zif_abapgit_dot_abapgit=>ty_requirement_tt, lt_dependencies TYPE zif_abapgit_apack_definitions=>tt_dependencies. * find troublesome objects ls_checks = io_repo->deserialize_checks( ). * and let the user decide what to do TRY. popup_overwrite( CHANGING ct_overwrite = ls_checks-overwrite ). popup_package_overwrite( CHANGING ct_overwrite = ls_checks-warning_package ). IF ls_checks-requirements-met = zif_abapgit_definitions=>gc_no. lt_requirements = io_repo->get_dot_abapgit( )->get_data( )-requirements. zcl_abapgit_requirement_helper=>requirements_popup( lt_requirements ). ls_checks-requirements-decision = zif_abapgit_definitions=>gc_yes. ENDIF. IF ls_checks-dependencies-met = zif_abapgit_definitions=>gc_no. lt_dependencies = io_repo->get_dot_apack( )->get_manifest_descriptor( )-dependencies. zcl_abapgit_apack_helper=>dependencies_popup( lt_dependencies ). ENDIF. IF ls_checks-transport-required = abap_true. ls_checks-transport-transport = zcl_abapgit_ui_factory=>get_popups( )->popup_transport_request( is_transport_type = ls_checks-transport-type ). ENDIF. CATCH zcx_abapgit_cancel. RETURN. ENDTRY. * and pass decisions to deserialize io_repo->deserialize( is_checks = ls_checks ii_log = io_repo->create_new_log( 'Pull Log' ) ). ENDMETHOD. METHOD new_offline. DATA: ls_popup TYPE zif_abapgit_popups=>ty_popup, lo_repo TYPE REF TO zcl_abapgit_repo, lo_repo_offline TYPE REF TO zcl_abapgit_repo_offline, li_repo_srv TYPE REF TO zif_abapgit_repo_srv, lv_reason TYPE string. ls_popup = zcl_abapgit_ui_factory=>get_popups( )->repo_new_offline( ). IF ls_popup-cancel = abap_true. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. " make sure package is not already in use for a different repository " 702: chaining calls with exp&imp parameters causes syntax error li_repo_srv = zcl_abapgit_repo_srv=>get_instance( ). li_repo_srv->get_repo_from_package( EXPORTING iv_package = ls_popup-package IMPORTING eo_repo = lo_repo ev_reason = lv_reason ). IF lo_repo IS BOUND. MESSAGE lv_reason TYPE 'S'. ELSE. " create new repo and add to favorites lo_repo_offline = zcl_abapgit_repo_srv=>get_instance( )->new_offline( iv_url = ls_popup-url iv_package = ls_popup-package iv_folder_logic = ls_popup-folder_logic iv_master_lang_only = ls_popup-master_lang_only ). lo_repo_offline->rebuild_local_checksums( ). lo_repo ?= lo_repo_offline. toggle_favorite( lo_repo->get_key( ) ). ENDIF. " Set default repo for user zcl_abapgit_persistence_user=>get_instance( )->set_repo_show( lo_repo->get_key( ) ). COMMIT WORK AND WAIT. ENDMETHOD. METHOD new_online. DATA: lo_repo TYPE REF TO zcl_abapgit_repo, li_repo_srv TYPE REF TO zif_abapgit_repo_srv, lv_reason TYPE string. " make sure package is not already in use for a different repository " 702: chaining calls with exp&imp parameters causes syntax error li_repo_srv = zcl_abapgit_repo_srv=>get_instance( ). li_repo_srv->get_repo_from_package( EXPORTING iv_package = is_repo_params-package IMPORTING eo_repo = lo_repo ev_reason = lv_reason ). IF lo_repo IS BOUND. zcx_abapgit_exception=>raise( lv_reason ). ENDIF. ro_repo = zcl_abapgit_repo_srv=>get_instance( )->new_online( iv_url = is_repo_params-url iv_branch_name = is_repo_params-branch_name iv_package = is_repo_params-package iv_display_name = is_repo_params-display_name iv_folder_logic = is_repo_params-folder_logic iv_ign_subpkg = is_repo_params-ignore_subpackages iv_master_lang_only = is_repo_params-master_lang_only ). toggle_favorite( ro_repo->get_key( ) ). " Set default repo for user zcl_abapgit_persistence_user=>get_instance( )->set_repo_show( ro_repo->get_key( ) ). COMMIT WORK. ENDMETHOD. METHOD popup_overwrite. DATA: lt_columns TYPE zif_abapgit_definitions=>ty_alv_column_tt, lt_selected LIKE ct_overwrite, li_popups TYPE REF TO zif_abapgit_popups. FIELD-SYMBOLS: <ls_overwrite> LIKE LINE OF ct_overwrite, <ls_column> TYPE zif_abapgit_definitions=>ty_alv_column. IF lines( ct_overwrite ) = 0. RETURN. ENDIF. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'OBJ_TYPE'. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'OBJ_NAME'. li_popups = zcl_abapgit_ui_factory=>get_popups( ). li_popups->popup_to_select_from_list( EXPORTING it_list = ct_overwrite iv_header_text = |The following objects have been modified locally.| && | Select the objects which should be overwritten.| iv_select_column_text = 'Overwrite?' it_columns_to_display = lt_columns IMPORTING et_list = lt_selected ). LOOP AT ct_overwrite ASSIGNING <ls_overwrite>. READ TABLE lt_selected WITH TABLE KEY object_type_and_name COMPONENTS obj_type = <ls_overwrite>-obj_type obj_name = <ls_overwrite>-obj_name TRANSPORTING NO FIELDS. IF sy-subrc = 0. <ls_overwrite>-decision = 'Y'. ELSE. <ls_overwrite>-decision = 'N'. ENDIF. ENDLOOP. ENDMETHOD. METHOD popup_package_overwrite. DATA: lt_columns TYPE zif_abapgit_definitions=>ty_alv_column_tt, lt_selected LIKE ct_overwrite, li_popups TYPE REF TO zif_abapgit_popups. FIELD-SYMBOLS: <ls_overwrite> LIKE LINE OF ct_overwrite, <ls_column> TYPE zif_abapgit_definitions=>ty_alv_column. IF lines( ct_overwrite ) = 0. RETURN. ENDIF. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'OBJ_TYPE'. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'OBJ_NAME'. APPEND INITIAL LINE TO lt_columns ASSIGNING <ls_column>. <ls_column>-name = 'DEVCLASS'. li_popups = zcl_abapgit_ui_factory=>get_popups( ). li_popups->popup_to_select_from_list( EXPORTING it_list = ct_overwrite iv_header_text = |The following objects have been created in other packages.| && | Select the objects which should be overwritten.| iv_select_column_text = |Overwrite?| it_columns_to_display = lt_columns IMPORTING et_list = lt_selected ). LOOP AT ct_overwrite ASSIGNING <ls_overwrite>. READ TABLE lt_selected WITH TABLE KEY object_type_and_name COMPONENTS obj_type = <ls_overwrite>-obj_type obj_name = <ls_overwrite>-obj_name TRANSPORTING NO FIELDS. IF sy-subrc = 0. <ls_overwrite>-decision = 'Y'. ELSE. <ls_overwrite>-decision = 'N'. ENDIF. ENDLOOP. ENDMETHOD. METHOD purge. DATA: lt_tadir TYPE zif_abapgit_definitions=>ty_tadir_tt, lv_answer TYPE c LENGTH 1, lo_repo TYPE REF TO zcl_abapgit_repo, lv_package TYPE devclass, lv_question TYPE c LENGTH 100, ls_checks TYPE zif_abapgit_definitions=>ty_delete_checks. lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lv_package = lo_repo->get_package( ). lt_tadir = zcl_abapgit_factory=>get_tadir( )->read( lv_package ). IF lines( lt_tadir ) > 0. lv_question = |This will DELETE all objects in package { lv_package } ({ lines( lt_tadir ) } objects) from the system|. "#EC NOTEXT lv_answer = zcl_abapgit_ui_factory=>get_popups( )->popup_to_confirm( iv_titlebar = 'Uninstall' iv_text_question = lv_question iv_text_button_1 = 'Delete' iv_icon_button_1 = 'ICON_DELETE' iv_text_button_2 = 'Cancel' iv_icon_button_2 = 'ICON_CANCEL' iv_default_button = '2' iv_display_cancel_button = abap_false ). "#EC NOTEXT IF lv_answer = '2'. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. ENDIF. ls_checks = lo_repo->delete_checks( ). IF ls_checks-transport-required = abap_true. ls_checks-transport-transport = zcl_abapgit_ui_factory=>get_popups( )->popup_transport_request( ls_checks-transport-type ). ENDIF. zcl_abapgit_repo_srv=>get_instance( )->purge( io_repo = lo_repo is_checks = ls_checks ). COMMIT WORK. ENDMETHOD. METHOD refresh. zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->refresh( ). ENDMETHOD. METHOD refresh_local_checksums. DATA: lv_answer TYPE c, lv_question TYPE string, lo_repo TYPE REF TO zcl_abapgit_repo. IF zcl_abapgit_auth=>is_allowed( zif_abapgit_auth=>gc_authorization-update_local_checksum ) = abap_false. zcx_abapgit_exception=>raise( 'Not authorized' ). ENDIF. lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lv_question = 'This will rebuild and overwrite local repo checksums.'. IF lo_repo->is_offline( ) = abap_false. lv_question = lv_question && ' The logic: if local and remote file differs then:' && ' if remote branch is ahead then assume changes are remote,' && ' else (branches are equal) assume changes are local.' && ' This will lead to incorrect state for files changed on both sides.' && ' Please make sure you don''t have ones like that.'. ENDIF. lv_answer = zcl_abapgit_ui_factory=>get_popups( )->popup_to_confirm( iv_titlebar = 'Warning' iv_text_question = lv_question iv_text_button_1 = 'OK' iv_icon_button_1 = 'ICON_DELETE' iv_text_button_2 = 'Cancel' iv_icon_button_2 = 'ICON_CANCEL' iv_default_button = '2' iv_display_cancel_button = abap_false ). "#EC NOTEXT IF lv_answer = '2'. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. lo_repo->rebuild_local_checksums( ). COMMIT WORK AND WAIT. ENDMETHOD. METHOD remote_attach. DATA: ls_popup TYPE zif_abapgit_popups=>ty_popup, ls_loc TYPE zif_abapgit_persistence=>ty_repo-local_settings, lo_repo TYPE REF TO zcl_abapgit_repo_online. ls_loc = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->get_local_settings( ). ls_popup = zcl_abapgit_ui_factory=>get_popups( )->repo_popup( iv_title = 'Attach repo to remote ...' iv_url = '' iv_display_name = ls_loc-display_name iv_package = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->get_package( ) iv_freeze_package = abap_true ). IF ls_popup-cancel = abap_true. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->switch_repo_type( iv_offline = abap_false ). lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lo_repo->set_url( ls_popup-url ). lo_repo->set_branch_name( ls_popup-branch_name ). ls_loc = lo_repo->get_local_settings( ). " Just in case ... if switch affects LS state ls_loc-display_name = ls_popup-display_name. lo_repo->set_local_settings( ls_loc ). COMMIT WORK. ENDMETHOD. METHOD remote_change. DATA: ls_popup TYPE zif_abapgit_popups=>ty_popup, ls_loc TYPE zif_abapgit_persistence=>ty_repo-local_settings, lo_repo TYPE REF TO zcl_abapgit_repo_online. lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). ls_loc = lo_repo->get_local_settings( ). ls_popup = zcl_abapgit_ui_factory=>get_popups( )->repo_popup( iv_title = 'Change repo remote ...' iv_url = lo_repo->get_url( ) iv_package = lo_repo->get_package( ) iv_display_name = ls_loc-display_name iv_freeze_package = abap_true ). IF ls_popup-cancel = abap_true. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lo_repo->set_url( ls_popup-url ). lo_repo->set_branch_name( ls_popup-branch_name ). ls_loc-display_name = ls_popup-display_name. lo_repo->set_local_settings( ls_loc ). COMMIT WORK. ENDMETHOD. METHOD remote_detach. DATA: lv_answer TYPE c LENGTH 1. lv_answer = zcl_abapgit_ui_factory=>get_popups( )->popup_to_confirm( iv_titlebar = 'Make repository OFF-line' iv_text_question = 'This will detach the repo from remote and make it OFF-line' iv_text_button_1 = 'Make OFF-line' iv_icon_button_1 = 'ICON_WF_UNLINK' iv_text_button_2 = 'Cancel' iv_icon_button_2 = 'ICON_CANCEL' iv_default_button = '2' iv_display_cancel_button = abap_false ). "#EC NOTEXT IF lv_answer = '2'. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->switch_repo_type( iv_offline = abap_true ). COMMIT WORK. ENDMETHOD. METHOD remove. DATA: lv_answer TYPE c LENGTH 1, lo_repo TYPE REF TO zcl_abapgit_repo, lv_package TYPE devclass, lv_question TYPE c LENGTH 200. lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ). lv_package = lo_repo->get_package( ). lv_question = |This will remove the repository reference to the package { lv_package }. All objects will safely remain in the system.|. lv_answer = zcl_abapgit_ui_factory=>get_popups( )->popup_to_confirm( iv_titlebar = 'Remove' iv_text_question = lv_question iv_text_button_1 = 'Remove' iv_icon_button_1 = 'ICON_WF_UNLINK' iv_text_button_2 = 'Cancel' iv_icon_button_2 = 'ICON_CANCEL' iv_default_button = '2' iv_display_cancel_button = abap_false ). "#EC NOTEXT IF lv_answer = '2'. RAISE EXCEPTION TYPE zcx_abapgit_cancel. ENDIF. zcl_abapgit_repo_srv=>get_instance( )->delete( lo_repo ). COMMIT WORK. ENDMETHOD. METHOD toggle_favorite. zcl_abapgit_persistence_user=>get_instance( )->toggle_favorite( iv_key ). ENDMETHOD. METHOD transport_to_branch. DATA: lo_repository TYPE REF TO zcl_abapgit_repo_online, lo_transport_to_branch TYPE REF TO zcl_abapgit_transport_2_branch, lt_transport_headers TYPE trwbo_request_headers, lt_transport_objects TYPE zif_abapgit_definitions=>ty_tadir_tt, ls_transport_to_branch TYPE zif_abapgit_definitions=>ty_transport_to_branch. IF zcl_abapgit_auth=>is_allowed( zif_abapgit_auth=>gc_authorization-transport_to_branch ) = abap_false. zcx_abapgit_exception=>raise( 'Not authorized' ). ENDIF. lo_repository ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_repository_key ). lt_transport_headers = zcl_abapgit_ui_factory=>get_popups( )->popup_to_select_transports( ). lt_transport_objects = zcl_abapgit_transport=>to_tadir( lt_transport_headers ). IF lt_transport_objects IS INITIAL. zcx_abapgit_exception=>raise( 'Canceled or List of objects is empty ' ). ENDIF. ls_transport_to_branch = zcl_abapgit_ui_factory=>get_popups( )->popup_to_create_transp_branch( lt_transport_headers ). CREATE OBJECT lo_transport_to_branch. lo_transport_to_branch->create( io_repository = lo_repository is_transport_to_branch = ls_transport_to_branch it_transport_objects = lt_transport_objects ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 30416, 62, 260, 7501, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 25261, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 649, 62, 25119, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 260, 7501, 62, 37266, 41876, 1976, 361, 62, 397, 499, 18300, 62, 30416, 62, 260, 7501, 14804, 774, 62, 260, 7501, 62, 37266, 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, 62, 25119, 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, 14976, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 4781, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 35714, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 649, 62, 2364, 1370, 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, 6569, 62, 47348, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 6569, 62, 15255, 620, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 6569, 62, 3803, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 14976, 62, 12001, 62, 42116, 5700, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 19846, 62, 35200, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 12, 2539, 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, 4839, 62, 1462, 62, 1671, 3702, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 260, 1930, 37765, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 8367, 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, 11774, 62, 8906, 48499, 1096, 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, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 46207, 62, 2502, 13564, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 310, 62, 2502, 13564, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
class lcl_view_base definition abstract. public section. methods display abstract raising lcx_error. methods on_user_command abstract importing iv_cmd type char70 returning value(rv_processed) type abap_bool. methods on_output. methods close. protected section. data mo_alv type ref to cl_salv_table. class-methods set_columns importing io_alv type ref to cl_salv_table. endclass. class lcl_view_base implementation. method on_output. endmethod. method set_columns. data lo_cols type ref to cl_salv_columns. data lt_columns type salv_t_column_ref. lo_cols = io_alv->get_columns( ). lo_cols->set_optimize( abap_true ). lt_columns = lo_cols->get( ). field-symbols <c> like line of lt_columns. loop at lt_columns assigning <c>. <c>-r_column->set_short_text( |{ <c>-columnname }| ). <c>-r_column->set_medium_text( |{ <c>-columnname }| ). <c>-r_column->set_long_text( |{ <c>-columnname }| ). endloop. endmethod. method close. mo_alv->close_screen( ). endmethod. endclass.
[ 4871, 300, 565, 62, 1177, 62, 8692, 6770, 12531, 13, 198, 220, 1171, 2665, 13, 198, 220, 220, 220, 5050, 3359, 12531, 198, 220, 220, 220, 220, 220, 8620, 300, 66, 87, 62, 18224, 13, 628, 220, 220, 220, 5050, 319, 62, 7220, 62, 21812, 12531, 198, 220, 220, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 28758, 2099, 1149, 2154, 198, 220, 220, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 7, 81, 85, 62, 14681, 276, 8, 2099, 450, 499, 62, 30388, 13, 198, 220, 220, 220, 5050, 319, 62, 22915, 13, 198, 220, 220, 220, 5050, 1969, 13, 628, 220, 6861, 2665, 13, 198, 220, 220, 220, 1366, 6941, 62, 282, 85, 2099, 1006, 284, 537, 62, 21680, 85, 62, 11487, 13, 628, 220, 220, 220, 1398, 12, 24396, 82, 900, 62, 28665, 82, 198, 220, 220, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 220, 220, 33245, 62, 282, 85, 2099, 1006, 284, 537, 62, 21680, 85, 62, 11487, 13, 198, 198, 437, 4871, 13, 198, 198, 4871, 300, 565, 62, 1177, 62, 8692, 7822, 13, 198, 220, 2446, 319, 62, 22915, 13, 198, 220, 886, 24396, 13, 628, 220, 2446, 900, 62, 28665, 82, 13, 628, 220, 220, 220, 1366, 2376, 62, 4033, 82, 2099, 1006, 284, 537, 62, 21680, 85, 62, 28665, 82, 13, 198, 220, 220, 220, 1366, 300, 83, 62, 28665, 82, 2099, 24143, 62, 83, 62, 28665, 62, 5420, 13, 628, 220, 220, 220, 2376, 62, 4033, 82, 796, 33245, 62, 282, 85, 3784, 1136, 62, 28665, 82, 7, 6739, 198, 220, 220, 220, 2376, 62, 4033, 82, 3784, 2617, 62, 40085, 1096, 7, 450, 499, 62, 7942, 6739, 198, 220, 220, 220, 300, 83, 62, 28665, 82, 796, 2376, 62, 4033, 82, 3784, 1136, 7, 6739, 628, 220, 220, 220, 2214, 12, 1837, 2022, 10220, 1279, 66, 29, 588, 1627, 286, 300, 83, 62, 28665, 82, 13, 198, 220, 220, 220, 9052, 379, 300, 83, 62, 28665, 82, 38875, 1279, 66, 28401, 198, 220, 220, 220, 220, 220, 1279, 66, 29, 12, 81, 62, 28665, 3784, 2617, 62, 19509, 62, 5239, 7, 930, 90, 1279, 66, 29, 12, 28665, 3672, 1782, 91, 6739, 198, 220, 220, 220, 220, 220, 1279, 66, 29, 12, 81, 62, 28665, 3784, 2617, 62, 24132, 62, 5239, 7, 930, 90, 1279, 66, 29, 12, 28665, 3672, 1782, 91, 6739, 198, 220, 220, 220, 220, 220, 1279, 66, 29, 12, 81, 62, 28665, 3784, 2617, 62, 6511, 62, 5239, 7, 930, 90, 1279, 66, 29, 12, 28665, 3672, 1782, 91, 6739, 198, 220, 220, 220, 886, 26268, 13, 628, 220, 886, 24396, 13, 628, 220, 2446, 1969, 13, 198, 220, 220, 220, 6941, 62, 282, 85, 3784, 19836, 62, 9612, 7, 6739, 198, 220, 886, 24396, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_zlib_stream DEFINITION PUBLIC CREATE PUBLIC . PUBLIC SECTION. METHODS constructor IMPORTING !iv_data TYPE xstring . METHODS take_bits IMPORTING !iv_length TYPE i RETURNING VALUE(rv_bits) TYPE string . METHODS take_int IMPORTING !iv_length TYPE i RETURNING VALUE(rv_int) TYPE i . METHODS remaining RETURNING VALUE(rv_length) TYPE i . PRIVATE SECTION. DATA: mv_compressed TYPE xstring, mv_bits TYPE string. ENDCLASS. CLASS ZCL_ABAPGIT_ZLIB_STREAM IMPLEMENTATION. METHOD constructor. mv_compressed = iv_data. ENDMETHOD. METHOD remaining. rv_length = xstrlen( mv_compressed ) + 1. ENDMETHOD. METHOD take_bits. DATA: lv_left TYPE i, lv_index TYPE i, lv_x TYPE x LENGTH 1. WHILE strlen( rv_bits ) < iv_length. IF mv_bits IS INITIAL. lv_x = mv_compressed(1). mv_bits = zcl_abapgit_zlib_convert=>hex_to_bits( lv_x ). mv_compressed = mv_compressed+1. ENDIF. lv_left = iv_length - strlen( rv_bits ). IF lv_left >= strlen( mv_bits ). CONCATENATE mv_bits rv_bits INTO rv_bits. CLEAR mv_bits. ELSE. lv_index = strlen( mv_bits ) - lv_left. CONCATENATE mv_bits+lv_index(lv_left) rv_bits INTO rv_bits. mv_bits = mv_bits(lv_index). ENDIF. ENDWHILE. ENDMETHOD. METHOD take_int. rv_int = zcl_abapgit_zlib_convert=>bits_to_int( take_bits( iv_length ) ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 89, 8019, 62, 5532, 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, 452, 62, 7890, 41876, 2124, 8841, 764, 198, 220, 220, 220, 337, 36252, 50, 1011, 62, 9895, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 13664, 220, 220, 220, 220, 41876, 1312, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 9895, 8, 41876, 4731, 764, 198, 220, 220, 220, 337, 36252, 50, 1011, 62, 600, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 13664, 220, 220, 220, 41876, 1312, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 600, 8, 41876, 1312, 764, 198, 220, 220, 220, 337, 36252, 50, 5637, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 13664, 8, 41876, 1312, 764, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42865, 25, 285, 85, 62, 5589, 2790, 41876, 2124, 8841, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 85, 62, 9895, 220, 220, 220, 220, 220, 220, 41876, 4731, 13, 198, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 6242, 2969, 38, 2043, 62, 57, 40347, 62, 2257, 32235, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 23772, 13, 628, 220, 220, 220, 285, 85, 62, 5589, 2790, 796, 21628, 62, 7890, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 5637, 13, 628, 220, 220, 220, 374, 85, 62, 13664, 796, 2124, 2536, 11925, 7, 285, 85, 62, 5589, 2790, 1267, 1343, 352, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1011, 62, 9895, 13, 628, 220, 220, 220, 42865, 25, 300, 85, 62, 9464, 220, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 9630, 41876, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 87, 220, 220, 220, 220, 41876, 2124, 406, 49494, 352, 13, 628, 198, 220, 220, 220, 7655, 41119, 965, 11925, 7, 374, 85, 62, 9895, 1267, 1279, 21628, 62, 13664, 13, 198, 220, 220, 220, 220, 220, 16876, 285, 85, 62, 9895, 3180, 3268, 2043, 12576, 13, 198, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 87, 796, 285, 85, 62, 5589, 2790, 7, 16, 737, 198, 220, 220, 220, 220, 220, 220, 220, 285, 85, 62, 9895, 796, 1976, 565, 62, 397, 499, 18300, 62, 89, 8019, 62, 1102, 1851, 14804, 33095, 62, 1462, 62, 9895, 7, 300, 85, 62, 87, 6739, 198, 220, 220, 220, 220, 220, 220, 220, 285, 85, 62, 5589, 2790, 796, 285, 85, 62, 5589, 2790, 10, 16, 13, 198, 220, 220, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 220, 220, 300, 85, 62, 9464, 796, 21628, 62, 13664, 532, 965, 11925, 7, 374, 85, 62, 9895, 6739, 198, 220, 220, 220, 220, 220, 16876, 300, 85, 62, 9464, 18189, 965, 11925, 7, 285, 85, 62, 9895, 6739, 198, 220, 220, 220, 220, 220, 220, 220, 39962, 1404, 1677, 6158, 285, 85, 62, 9895, 374, 85, 62, 9895, 39319, 374, 85, 62, 9895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 30301, 1503, 285, 85, 62, 9895, 13, 198, 220, 220, 220, 220, 220, 17852, 5188, 13, 198, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 9630, 796, 965, 11925, 7, 285, 85, 62, 9895, 1267, 532, 300, 85, 62, 9464, 13, 198, 220, 220, 220, 220, 220, 220, 220, 39962, 1404, 1677, 6158, 285, 85, 62, 9895, 10, 6780, 62, 9630, 7, 6780, 62, 9464, 8, 374, 85, 62, 9895, 39319, 374, 85, 62, 9895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 285, 85, 62, 9895, 796, 285, 85, 62, 9895, 7, 6780, 62, 9630, 737, 198, 220, 220, 220, 220, 220, 23578, 5064, 13, 628, 220, 220, 220, 23578, 12418, 41119, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1011, 62, 600, 13, 628, 220, 220, 220, 374, 85, 62, 600, 796, 1976, 565, 62, 397, 499, 18300, 62, 89, 8019, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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">Controller for Object Browser Search input</p> CLASS zcl_dbbr_obj_brws_search_sc DEFINITION PUBLIC CREATE PUBLIC . PUBLIC SECTION. INTERFACES zif_uitb_screen_controller. ALIASES pbo FOR zif_uitb_screen_controller~pbo. ALIASES pai FOR zif_uitb_screen_controller~handle_user_command. ALIASES cancel FOR zif_uitb_screen_controller~cancel. ALIASES show FOR zif_uitb_screen_controller~call_screen. "! <p class="shorttext synchronized" lang="en">CONSTRUCTOR</p> "! METHODS constructor. 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. ALIASES set_status FOR zif_uitb_screen_controller~set_status. ALIASES mf_first_call FOR zif_uitb_screen_controller~mf_first_call. CONSTANTS c_r_controller_name TYPE dynfnam VALUE 'GR_OBJ_BRWS_SEARCH_ENTER_CTRL'. CONSTANTS c_s_object_search TYPE dynfnam VALUE 'GS_OBJECT_SEARCH'. CONSTANTS c_v_search_type TYPE dynfnam VALUE 'SEARCH_TYPE'. CONSTANTS c_v_search_input TYPE dynfnam VALUE 'SEARCH_INPUT'. DATA: mr_v_search_input TYPE REF TO string, mr_s_object_search TYPE REF TO data, mr_v_search_type TYPE REF TO zdbbr_obj_browser_mode. "! <p class="shorttext synchronized" lang="en">Handler for closing this dialog</p> "! METHODS on_close_object_search FOR EVENT close_object_search_modal OF zcl_dbbr_selscr_nav_events. ENDCLASS. CLASS zcl_dbbr_obj_brws_search_sc IMPLEMENTATION. METHOD constructor. DATA(lr_data_cache) = zcl_uitb_data_cache=>get_instance( zif_dbbr_c_report_id=>main ). mr_v_search_input = CAST #( lr_data_cache->get_data_ref( |{ c_s_object_search }-{ c_v_search_input }| ) ). mr_v_search_type = CAST #( lr_data_cache->get_data_ref( |{ c_s_object_search }-{ c_v_search_type }| ) ). DATA(lr_s_global_data) = CAST zdbbr_global_data( lr_data_cache->get_data_ref( zif_dbbr_main_report_var_ids=>c_s_data ) ). * CLEAR: mr_v_search_input->*. IF mr_v_search_type->* IS INITIAL. mr_v_search_type->* = lr_s_global_data->settings-initial_obj_brws_mode. ENDIF. SET HANDLER: on_close_object_search. ENDMETHOD. METHOD zif_uitb_screen_controller~call_screen. mf_first_call = abap_true. zcl_uitb_screen_util=>call_screen( iv_screen_id = get_screen_id( ) iv_report_id = get_report_id( ) it_object_map = VALUE #( ( global_ref = me variable_name = c_r_controller_name ) ) iv_start_column = 50 iv_start_line = 10 ). ENDMETHOD. METHOD zif_uitb_screen_controller~handle_user_command. CASE cv_function_code. WHEN 'SEARCH' OR 'SEARCHMORE'. IF mr_v_search_input->* IS INITIAL. MESSAGE i016(zdbbr_exception) DISPLAY LIKE 'E'. RETURN. ENDIF. zcl_dbbr_selscr_nav_events=>raise_request_object_search( iv_object_type = mr_v_search_type->* iv_search_query = mr_v_search_input->* if_close_on_success = xsdbool( cv_function_code = 'SEARCH' ) ). WHEN 'APPHELP'. zcl_dbbr_help_repository=>show_help( zcl_dbbr_help_repository=>c_help_id-object_search ). WHEN OTHERS. ENDCASE. ENDMETHOD. METHOD zif_uitb_screen_controller~pbo. set_status( ). IF mf_first_call = abap_false. zcl_uitb_cursor=>set_cursor( iv_field = |{ c_s_object_search }-{ c_v_search_input }| ). ENDIF. CLEAR mf_first_call. ENDMETHOD. METHOD zif_uitb_screen_controller~cancel. zcl_uitb_screen_util=>leave_screen( ). 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 = '0300'. ENDMETHOD. METHOD zif_uitb_screen_controller~set_status. DATA(lv_report_id) = get_report_id( ). SET PF-STATUS '0301' OF PROGRAM lv_report_id. SET TITLEBAR 'PROGTITLE' OF PROGRAM lv_report_id WITH 'Search Objects'(001). ENDMETHOD. METHOD on_close_object_search. SET HANDLER on_close_object_search ACTIVATION abap_false. cancel( ). ENDMETHOD. ENDCLASS.
[ 40484, 1279, 79, 1398, 2625, 19509, 5239, 47192, 1, 42392, 2625, 268, 5320, 22130, 329, 9515, 34270, 11140, 5128, 3556, 79, 29, 198, 31631, 1976, 565, 62, 9945, 1671, 62, 26801, 62, 1671, 18504, 62, 12947, 62, 1416, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 23255, 37, 2246, 1546, 1976, 361, 62, 5013, 65, 62, 9612, 62, 36500, 13, 628, 220, 220, 220, 8355, 43429, 1546, 279, 2127, 198, 220, 220, 220, 220, 220, 7473, 1976, 361, 62, 5013, 65, 62, 9612, 62, 36500, 93, 79, 2127, 13, 198, 220, 220, 220, 8355, 43429, 1546, 279, 1872, 198, 220, 220, 220, 220, 220, 7473, 1976, 361, 62, 5013, 65, 62, 9612, 62, 36500, 93, 28144, 62, 7220, 62, 21812, 13, 198, 220, 220, 220, 8355, 43429, 1546, 14241, 198, 220, 220, 220, 220, 220, 7473, 1976, 361, 62, 5013, 65, 62, 9612, 62, 36500, 93, 66, 21130, 13, 198, 220, 220, 220, 8355, 43429, 1546, 905, 198, 220, 220, 220, 220, 220, 7473, 1976, 361, 62, 5013, 65, 62, 9612, 62, 36500, 93, 13345, 62, 9612, 13, 198, 220, 220, 220, 366, 0, 1279, 79, 1398, 2625, 19509, 5239, 47192, 1, 42392, 2625, 268, 5320, 10943, 46126, 1581, 3556, 79, 29, 198, 220, 220, 220, 366, 0, 198, 220, 220, 220, 337, 36252, 50, 23772, 13, 628, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 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, 13, 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, 13, 198, 220, 220, 220, 8355, 43429, 1546, 900, 62, 13376, 198, 220, 220, 220, 220, 220, 7473, 1976, 361, 62, 5013, 65, 62, 9612, 62, 36500, 93, 2617, 62, 13376, 13, 198, 220, 220, 220, 8355, 43429, 1546, 285, 69, 62, 11085, 62, 13345, 198, 220, 220, 220, 220, 220, 7473, 1976, 361, 62, 5013, 65, 62, 9612, 62, 36500, 93, 76, 69, 62, 11085, 62, 13345, 13, 628, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 81, 62, 36500, 62, 3672, 41876, 37860, 69, 7402, 26173, 8924, 705, 10761, 62, 9864, 41, 62, 11473, 19416, 62, 5188, 31315, 62, 3525, 1137, 62, 4177, 7836, 4458, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 82, 62, 15252, 62, 12947, 41876, 37860, 69, 7402, 26173, 8924, 705, 14313, 62, 9864, 23680, 62, 5188, 31315, 4458, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 85, 62, 12947, 62, 4906, 220, 41876, 37860, 69, 7402, 26173, 8924, 705, 5188, 31315, 62, 25216, 4458, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 85, 62, 12947, 62, 15414, 41876, 37860, 69, 7402, 26173, 8924, 705, 5188, 31315, 62, 1268, 30076, 4458, 628, 220, 220, 220, 42865, 25, 285, 81, 62, 85, 62, 12947, 62, 15414, 220, 41876, 4526, 37, 5390, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 81, 62, 82, 62, 15252, 62, 12947, 41876, 4526, 37, 5390, 1366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 81, 62, 85, 62, 12947, 62, 4906, 220, 220, 41876, 4526, 37, 5390, 1976, 9945, 1671, 62, 26801, 62, 40259, 62, 14171, 13, 628, 220, 220, 220, 366, 0, 1279, 79, 1398, 2625, 19509, 5239, 47192, 1, 42392, 2625, 268, 5320, 25060, 329, 9605, 428, 17310, 3556, 79, 29, 198, 220, 220, 220, 366, 0, 198, 220, 220, 220, 337, 36252, 50, 319, 62, 19836, 62, 15252, 62, 12947, 198, 220, 220, 220, 220, 220, 220, 220, 7473, 49261, 1969, 62, 15252, 62, 12947, 62, 4666, 282, 3963, 1976, 565, 62, 9945, 1671, 62, 741, 1416, 81, 62, 28341, 62, 31534, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 9945, 1671, 62, 26801, 62, 1671, 18504, 62, 12947, 62, 1416, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 23772, 13, 198, 220, 220, 220, 42865, 7, 14050, 62, 7890, 62, 23870, 8, 796, 1976, 565, 62, 5013, 65, 62, 7890, 62, 23870, 14804, 1136, 62, 39098, 7, 1976, 361, 62, 9945, 1671, 62, 66, 62, 13116, 62, 312, 14804, 12417, 6739, 198, 220, 220, 220, 285, 81, 62, 85, 62, 12947, 62, 15414, 796, 327, 11262, 1303, 7, 300, 81, 62, 7890, 62, 23870, 3784, 1136, 62, 7890, 62, 5420, 7, 930, 90, 269, 62, 82, 62, 15252, 62, 12947, 1782, 12, 90, 269, 62, 85, 62, 12947, 62, 15414, 1782, 91, 1267, 6739, 198, 220, 220, 220, 285, 81, 62, 85, 62, 12947, 62, 4906, 796, 327, 11262, 1303, 7, 300, 81, 62, 7890, 62, 23870, 3784, 1136, 62, 7890, 62, 5420, 7, 930, 90, 269, 62, 82, 62, 15252, 62, 12947, 1782, 12, 90, 269, 62, 85, 62, 12947, 62, 4906, 1782, 91, 1267, 6739, 628, 220, 220, 220, 42865, 7, 14050, 62, 82, 62, 20541, 62, 7890, 8, 796, 327, 11262, 1976, 9945, 1671, 62, 20541, 62, 7890, 7, 300, 81, 62, 7890, 62, 23870, 3784, 1136, 62, 7890, 62, 5420, 7, 1976, 361, 62, 9945, 1671, 62, 12417, 62, 13116, 62, 7785, 62, 2340, 14804, 66, 62, 82, 62, 7890, 1267, 6739, 198, 198, 9, 220, 220, 220, 30301, 1503, 25, 285, 81, 62, 85, 62, 12947, 62, 15414, 3784, 24620, 198, 220, 220, 220, 16876, 285, 81, 62, 85, 62, 12947, 62, 4906, 3784, 9, 3180, 3268, 2043, 12576, 13, 198, 220, 220, 220, 220, 220, 285, 81, 62, 85, 62, 12947, 62, 4906, 3784, 9, 796, 300, 81, 62, 82, 62, 20541, 62, 7890, 3784, 33692, 12, 36733, 62, 26801, 62, 1671, 18504, 62, 14171, 13, 198, 220, 220, 220, 23578, 5064, 13, 628, 220, 220, 220, 25823, 367, 6981, 39878, 25, 198, 220, 220, 220, 220, 220, 319, 62, 19836, 62, 15252, 62, 12947, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 5013, 65 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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TYPE csequence OPTIONAL RETURNING VALUE(ro_form) TYPE REF TO zcl_abapgit_html_form . METHODS render IMPORTING !iv_form_class TYPE csequence DEFAULT 'dialog-form' !io_values TYPE REF TO zcl_abapgit_string_map !io_validation_log TYPE REF TO zcl_abapgit_string_map OPTIONAL RETURNING VALUE(ri_html) TYPE REF TO zif_abapgit_html RAISING zcx_abapgit_exception . METHODS command IMPORTING !iv_label TYPE csequence !iv_action TYPE csequence !iv_cmd_type TYPE i DEFAULT zif_abapgit_html_form=>c_cmd_type-input RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS text IMPORTING !iv_label TYPE csequence !iv_name TYPE csequence !iv_hint TYPE csequence OPTIONAL !iv_required TYPE abap_bool DEFAULT abap_false !iv_upper_case TYPE abap_bool DEFAULT abap_false !iv_readonly TYPE abap_bool DEFAULT abap_false !iv_password TYPE abap_bool DEFAULT abap_false !iv_condense TYPE abap_bool OPTIONAL !iv_placeholder TYPE csequence OPTIONAL !iv_side_action TYPE csequence OPTIONAL !iv_min TYPE i DEFAULT cl_abap_math=>min_int4 !iv_max TYPE i DEFAULT cl_abap_math=>max_int4 RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS textarea IMPORTING !iv_label TYPE csequence !iv_name TYPE csequence !iv_hint TYPE csequence OPTIONAL !iv_required TYPE abap_bool DEFAULT abap_false !iv_readonly TYPE abap_bool DEFAULT abap_false !iv_placeholder TYPE csequence OPTIONAL !iv_rows TYPE i OPTIONAL !iv_cols TYPE i OPTIONAL RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS number IMPORTING !iv_label TYPE csequence !iv_name TYPE csequence !iv_hint TYPE csequence OPTIONAL !iv_required TYPE abap_bool DEFAULT abap_false !iv_readonly TYPE abap_bool DEFAULT abap_false !iv_min TYPE i DEFAULT cl_abap_math=>min_int4 !iv_max TYPE i DEFAULT cl_abap_math=>max_int4 RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS checkbox IMPORTING !iv_label TYPE csequence !iv_name TYPE csequence !iv_hint TYPE csequence OPTIONAL RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS radio IMPORTING !iv_label TYPE csequence !iv_name TYPE csequence !iv_default_value TYPE csequence OPTIONAL !iv_hint TYPE csequence OPTIONAL RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS option IMPORTING !iv_label TYPE csequence !iv_value TYPE csequence RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS table IMPORTING !iv_label TYPE csequence !iv_name TYPE csequence !iv_hint TYPE csequence OPTIONAL RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS column IMPORTING !iv_label TYPE csequence !iv_width TYPE csequence OPTIONAL !iv_readonly TYPE abap_bool DEFAULT abap_false RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS start_group IMPORTING !iv_label TYPE csequence !iv_name TYPE csequence !iv_hint TYPE csequence OPTIONAL RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS hidden IMPORTING !iv_name TYPE csequence RETURNING VALUE(ro_self) TYPE REF TO zcl_abapgit_html_form . METHODS get_fields RETURNING VALUE(rt_fields) TYPE zif_abapgit_html_form=>ty_fields . PROTECTED SECTION. PRIVATE SECTION. TYPES: BEGIN OF ty_attr, value TYPE string, error TYPE string, hint TYPE string, readonly TYPE string, placeholder TYPE string, required TYPE string, autofocus TYPE string, END OF ty_attr . DATA mt_fields TYPE zif_abapgit_html_form=>ty_fields . DATA: mt_commands TYPE STANDARD TABLE OF zif_abapgit_html_form=>ty_command . DATA mv_form_id TYPE string . DATA mv_help_page TYPE string . METHODS render_field IMPORTING !ii_html TYPE REF TO zif_abapgit_html !io_values TYPE REF TO zcl_abapgit_string_map !io_validation_log TYPE REF TO zcl_abapgit_string_map !is_field TYPE zif_abapgit_html_form=>ty_field !iv_autofocus TYPE abap_bool . METHODS render_field_text IMPORTING !ii_html TYPE REF TO zif_abapgit_html !is_field TYPE zif_abapgit_html_form=>ty_field !is_attr TYPE ty_attr . METHODS render_field_textarea IMPORTING !ii_html TYPE REF TO zif_abapgit_html !is_field TYPE zif_abapgit_html_form=>ty_field !is_attr TYPE ty_attr . METHODS render_field_checkbox IMPORTING !ii_html TYPE REF TO zif_abapgit_html !is_field TYPE zif_abapgit_html_form=>ty_field !is_attr TYPE ty_attr . METHODS render_field_radio IMPORTING !ii_html TYPE REF TO zif_abapgit_html !is_field TYPE zif_abapgit_html_form=>ty_field !is_attr TYPE ty_attr . METHODS render_field_table IMPORTING !ii_html TYPE REF TO zif_abapgit_html !is_field TYPE zif_abapgit_html_form=>ty_field !is_attr TYPE ty_attr !io_values TYPE REF TO zcl_abapgit_string_map . METHODS render_command IMPORTING !ii_html TYPE REF TO zif_abapgit_html !is_cmd TYPE zif_abapgit_html_form=>ty_command . METHODS render_field_hidden IMPORTING !ii_html TYPE REF TO zif_abapgit_html !is_field TYPE zif_abapgit_html_form=>ty_field !is_attr TYPE ty_attr . ENDCLASS. CLASS zcl_abapgit_html_form IMPLEMENTATION. METHOD checkbox. DATA ls_field LIKE LINE OF mt_fields. ls_field-type = zif_abapgit_html_form=>c_field_type-checkbox. ls_field-name = iv_name. ls_field-label = iv_label. ls_field-hint = iv_hint. APPEND ls_field TO mt_fields. ro_self = me. ENDMETHOD. METHOD column. FIELD-SYMBOLS <ls_last> LIKE LINE OF mt_fields. DATA ls_column LIKE LINE OF <ls_last>-subitems. DATA lv_size TYPE i. lv_size = lines( mt_fields ). ASSERT lv_size > 0. " Exception ? Maybe add zcx_no_check ? READ TABLE mt_fields INDEX lv_size ASSIGNING <ls_last>. ASSERT sy-subrc = 0. ASSERT <ls_last>-type = zif_abapgit_html_form=>c_field_type-table. ls_column-label = iv_label. ls_column-value = iv_width. ls_column-readonly = iv_readonly. APPEND ls_column TO <ls_last>-subitems. ro_self = me. ENDMETHOD. METHOD command. DATA ls_cmd LIKE LINE OF mt_commands. ASSERT iv_cmd_type BETWEEN 1 AND 4. ls_cmd-label = iv_label. ls_cmd-action = iv_action. ls_cmd-cmd_type = iv_cmd_type. APPEND ls_cmd TO mt_commands. ro_self = me. ENDMETHOD. METHOD create. DATA lv_ts TYPE timestampl. CREATE OBJECT ro_form. ro_form->mv_form_id = iv_form_id. ro_form->mv_help_page = iv_help_page. IF ro_form->mv_form_id IS INITIAL. GET TIME STAMP FIELD lv_ts. ro_form->mv_form_id = |form_{ lv_ts }|. ENDIF. ENDMETHOD. METHOD get_fields. rt_fields = mt_fields. ENDMETHOD. METHOD hidden. DATA ls_field LIKE LINE OF mt_fields. ls_field-type = zif_abapgit_html_form=>c_field_type-hidden. ls_field-name = iv_name. APPEND ls_field TO mt_fields. ro_self = me. ENDMETHOD. METHOD number. DATA ls_field LIKE LINE OF mt_fields. ls_field-type = zif_abapgit_html_form=>c_field_type-number. ls_field-name = iv_name. ls_field-label = iv_label. ls_field-readonly = iv_readonly. ls_field-min = iv_min. ls_field-max = iv_max. ls_field-hint = iv_hint. ls_field-required = iv_required. APPEND ls_field TO mt_fields. ro_self = me. ENDMETHOD. METHOD option. FIELD-SYMBOLS <ls_last> LIKE LINE OF mt_fields. DATA ls_option LIKE LINE OF <ls_last>-subitems. DATA lv_size TYPE i. lv_size = lines( mt_fields ). ASSERT lv_size > 0. " Exception ? Maybe add zcx_no_check ? READ TABLE mt_fields INDEX lv_size ASSIGNING <ls_last>. ASSERT sy-subrc = 0. ASSERT <ls_last>-type = zif_abapgit_html_form=>c_field_type-radio. " Or dropdown - TODO in future ls_option-label = iv_label. ls_option-value = iv_value. APPEND ls_option TO <ls_last>-subitems. ro_self = me. ENDMETHOD. METHOD radio. DATA ls_field LIKE LINE OF mt_fields. ls_field-type = zif_abapgit_html_form=>c_field_type-radio. ls_field-name = iv_name. ls_field-label = iv_label. ls_field-default_value = iv_default_value. ls_field-hint = iv_hint. APPEND ls_field TO mt_fields. ro_self = me. ENDMETHOD. METHOD render. FIELD-SYMBOLS <ls_field> LIKE LINE OF mt_fields. FIELD-SYMBOLS <ls_cmd> LIKE LINE OF mt_commands. DATA lv_hint TYPE string. DATA ls_form_id TYPE string. DATA ls_form_action TYPE string. DATA lv_cur_group TYPE string. DATA lv_url TYPE string. DATA lv_autofocus TYPE abap_bool. IF mv_form_id IS NOT INITIAL. ls_form_id = | id="{ mv_form_id }"|. ENDIF. LOOP AT mt_commands ASSIGNING <ls_cmd> WHERE cmd_type = zif_abapgit_html_form=>c_cmd_type-input_main. ls_form_action = | action="sapevent:{ <ls_cmd>-action }"|. EXIT. ENDLOOP. CREATE OBJECT ri_html TYPE zcl_abapgit_html. ri_html->add( |<div class="dialog { iv_form_class }">| ). " to center use 'dialog-form-center' ri_html->add( |<form method="post"{ ls_form_id }{ ls_form_action }>| ). " Add hidden button that triggers main command when pressing enter LOOP AT mt_commands ASSIGNING <ls_cmd> WHERE cmd_type = zif_abapgit_html_form=>c_cmd_type-input_main. ri_html->add( |<button type="submit" formaction="sapevent:{ <ls_cmd>-action }" class="hidden-submit"| && | aria-hidden="true" tabindex="-1"></button>| ). EXIT. ENDLOOP. lv_autofocus = abap_true. LOOP AT mt_fields ASSIGNING <ls_field>. AT FIRST. IF <ls_field>-type <> zif_abapgit_html_form=>c_field_type-field_group. ri_html->add( |<ul>| ). ENDIF. ENDAT. IF <ls_field>-type = zif_abapgit_html_form=>c_field_type-field_group. IF lv_cur_group IS NOT INITIAL AND lv_cur_group <> <ls_field>-name. ri_html->add( |</ul>| ). ri_html->add( |</fieldset>| ). ENDIF. IF <ls_field>-hint IS NOT INITIAL. lv_hint = | title="{ <ls_field>-hint }"|. ELSE. lv_hint = ''. ENDIF. lv_cur_group = <ls_field>-name. ri_html->add( |<fieldset name="{ <ls_field>-name }">| ). ri_html->add( |<legend{ lv_hint }>{ <ls_field>-label }</legend>| ). ri_html->add( |<ul>| ). CONTINUE. ENDIF. render_field( ii_html = ri_html io_values = io_values io_validation_log = io_validation_log is_field = <ls_field> iv_autofocus = lv_autofocus ). lv_autofocus = abap_false. AT LAST. ri_html->add( |</ul>| ). IF lv_cur_group IS NOT INITIAL. ri_html->add( |</fieldset>| ). ENDIF. ENDAT. ENDLOOP. ri_html->add( |<ul>| ). ri_html->add( |<li class="dialog-commands">| ). IF mv_help_page IS NOT INITIAL. lv_url = escape( val = mv_help_page format = cl_abap_format=>e_url ). ri_html->add_a( iv_txt = zcl_abapgit_gui_buttons=>help( ) iv_act = |{ zif_abapgit_definitions=>c_action-url }?url={ lv_url }| iv_class = 'dialog-help' iv_title = 'Help' ). ENDIF. LOOP AT mt_commands ASSIGNING <ls_cmd>. render_command( ii_html = ri_html is_cmd = <ls_cmd> ). ENDLOOP. ri_html->add( |</li>| ). ri_html->add( |</ul>| ). ri_html->add( |</form>| ). ri_html->add( |</div>| ). zcl_abapgit_ui_factory=>get_gui_services( )->get_hotkeys_ctl( )->register_hotkeys( zif_abapgit_gui_hotkeys~get_hotkey_actions( ) ). ENDMETHOD. METHOD render_command. CASE is_cmd-cmd_type. WHEN zif_abapgit_html_form=>c_cmd_type-link. ii_html->add_a( iv_txt = is_cmd-label iv_act = is_cmd-action iv_class = 'dialog-commands' ). WHEN zif_abapgit_html_form=>c_cmd_type-button. ii_html->add( |<button type="submit" name="action" value="{ is_cmd-action }"| && | class="action-commands">{ is_cmd-label }</button>| ). WHEN zif_abapgit_html_form=>c_cmd_type-input. ii_html->add( |<input type="submit" value="{ is_cmd-label }" formaction="sapevent:{ is_cmd-action }">| ). WHEN zif_abapgit_html_form=>c_cmd_type-input_main. ii_html->add( |<input type="submit" value="{ is_cmd-label }" class="main">| ). WHEN OTHERS. ASSERT 0 = 1. ENDCASE. ENDMETHOD. METHOD render_field. DATA: ls_attr TYPE ty_attr, lv_item_class TYPE string. " Get value and validation error ls_attr-value = escape( val = io_values->get( is_field-name ) format = cl_abap_format=>e_html_attr ). IF io_validation_log IS BOUND. ls_attr-error = io_validation_log->get( is_field-name ). IF ls_attr-error IS NOT INITIAL. ls_attr-error = escape( val = ls_attr-error format = cl_abap_format=>e_html_text ). ls_attr-error = |<small>{ ls_attr-error }</small>|. ENDIF. ENDIF. " Prepare field attributes IF is_field-required = abap_true. ls_attr-required = ' <em>*</em>'. ENDIF. IF is_field-hint IS NOT INITIAL. ls_attr-hint = escape( val = is_field-hint format = cl_abap_format=>e_html_attr ). ls_attr-hint = | title="{ ls_attr-hint }"|. ENDIF. IF is_field-placeholder IS NOT INITIAL. ls_attr-placeholder = escape( val = is_field-placeholder format = cl_abap_format=>e_html_attr ). ls_attr-placeholder = | placeholder="{ ls_attr-placeholder }"|. ENDIF. IF is_field-readonly = abap_true. ls_attr-readonly = ' readonly'. ENDIF. IF iv_autofocus = abap_true. ls_attr-autofocus = ' autofocus'. ENDIF. " Prepare item class lv_item_class = is_field-item_class. IF ls_attr-error IS NOT INITIAL. lv_item_class = condense( lv_item_class && ' error' ). ENDIF. IF is_field-type = zif_abapgit_html_form=>c_field_type-text AND is_field-max BETWEEN 1 AND 20. " Reduced width for short fields lv_item_class = lv_item_class && ' w40'. ENDIF. IF lv_item_class IS NOT INITIAL. lv_item_class = | class="{ lv_item_class }"|. ENDIF. " Render field ii_html->add( |<li{ lv_item_class }>| ). CASE is_field-type. WHEN zif_abapgit_html_form=>c_field_type-text OR zif_abapgit_html_form=>c_field_type-number. render_field_text( ii_html = ii_html is_field = is_field is_attr = ls_attr ). WHEN zif_abapgit_html_form=>c_field_type-textarea. render_field_textarea( ii_html = ii_html is_field = is_field is_attr = ls_attr ). WHEN zif_abapgit_html_form=>c_field_type-checkbox. render_field_checkbox( ii_html = ii_html is_field = is_field is_attr = ls_attr ). WHEN zif_abapgit_html_form=>c_field_type-radio. render_field_radio( ii_html = ii_html is_field = is_field is_attr = ls_attr ). WHEN zif_abapgit_html_form=>c_field_type-table. render_field_table( ii_html = ii_html is_field = is_field is_attr = ls_attr io_values = io_values ). WHEN zif_abapgit_html_form=>c_field_type-hidden. render_field_hidden( ii_html = ii_html is_field = is_field is_attr = ls_attr ). WHEN OTHERS. ASSERT 1 = 0. ENDCASE. ii_html->add( '</li>' ). ENDMETHOD. METHOD render_field_checkbox. DATA lv_checked TYPE string. IF is_attr-error IS NOT INITIAL. ii_html->add( is_attr-error ). ENDIF. IF is_attr-value = abap_true OR is_attr-value = 'on'. " boolc return ` ` which is not initial -> bug after 1st validation lv_checked = ' checked'. ENDIF. ii_html->add( |<input type="checkbox" name="{ is_field-name }" id="{ is_field-name }"| && |{ lv_checked }{ is_attr-readonly }{ is_attr-autofocus }>| ). ii_html->add( |<label for="{ is_field-name }"{ is_attr-hint }>{ is_field-label }</label>| ). ENDMETHOD. METHOD render_field_hidden. ii_html->add( |<input type="hidden" name="{ is_field-name }" id="{ is_field-name }" value="{ is_attr-value }">| ). ENDMETHOD. METHOD render_field_radio. DATA: lv_checked TYPE string, lv_opt_id TYPE string, lv_opt_value TYPE string. FIELD-SYMBOLS <ls_opt> LIKE LINE OF is_field-subitems. ii_html->add( |<label{ is_attr-hint }>{ is_field-label }</label>| ). IF is_attr-error IS NOT INITIAL. ii_html->add( is_attr-error ). ENDIF. ii_html->add( |<div class="radio-container">| ). LOOP AT is_field-subitems ASSIGNING <ls_opt>. lv_opt_value = escape( val = <ls_opt>-value format = cl_abap_format=>e_html_attr ). CLEAR lv_checked. IF is_attr-value = lv_opt_value OR ( is_attr-value IS INITIAL AND lv_opt_value = is_field-default_value ). lv_checked = ' checked'. ENDIF. lv_opt_id = |{ is_field-name }{ sy-tabix }|. ii_html->add( |<input type="radio" name="{ is_field-name }" id="{ lv_opt_id }"| && | value="{ lv_opt_value }"{ lv_checked }{ is_attr-autofocus }>| ). ii_html->add( |<label for="{ lv_opt_id }">{ <ls_opt>-label }</label>| ). ENDLOOP. ii_html->add( '</div>' ). ENDMETHOD. METHOD render_field_table. DATA: lv_value TYPE string, lv_readonly TYPE string, lv_rows TYPE i, lv_cell_id TYPE string. FIELD-SYMBOLS <ls_subitem> LIKE LINE OF is_field-subitems. ii_html->add( |<label for="{ is_field-name }"{ is_attr-hint }>{ is_field-label }</label>| ). IF is_attr-error IS NOT INITIAL. ii_html->add( is_attr-error ). ENDIF. lv_rows = io_values->get( |{ is_field-name }-{ zif_abapgit_html_form=>c_rows }| ). " Render table only if there are some data rows IF lv_rows > 0. ii_html->add( |<table name="{ is_field-name }" id="{ is_field-name }" class="table-container">| ). ii_html->add( |<thead>| ). ii_html->add( |<tr>| ). LOOP AT is_field-subitems ASSIGNING <ls_subitem>. CLEAR lv_value. IF <ls_subitem>-value IS NOT INITIAL. lv_value = escape( val = <ls_subitem>-value format = cl_abap_format=>e_html_attr ). lv_value = | width="{ lv_value }"|. ENDIF. ii_html->add( |<td{ lv_value }>{ <ls_subitem>-label }</td>| ). ENDLOOP. ii_html->add( |</tr>| ). ii_html->add( |</thead>| ). ii_html->add( |<tbody>| ). DO lv_rows TIMES. lv_rows = sy-index. ii_html->add( |<tr>| ). LOOP AT is_field-subitems ASSIGNING <ls_subitem>. lv_cell_id = |{ is_field-name }-{ lv_rows }-{ sy-tabix }|. lv_value = escape( val = io_values->get( lv_cell_id ) format = cl_abap_format=>e_html_attr ). CLEAR lv_readonly. IF <ls_subitem>-readonly = abap_true. lv_readonly = | readonly|. ENDIF. ii_html->add( |<td><input type="text" name="{ lv_cell_id }" id="{ lv_cell_id }" value="{ lv_value }"{ lv_readonly }></td>| ). ENDLOOP. ii_html->add( |</tr>| ). ENDDO. ii_html->add( |</tbody>| ). ii_html->add( |</table>| ). ELSE. ii_html->add( |<input type="text" name="{ is_field-name }" id="{ is_field-name }" value="Not available" readonly>| ). ENDIF. " Hidden field with number of rows to simplify getting values from form lv_value = |{ is_field-name }-{ zif_abapgit_html_form=>c_rows }|. ii_html->add( |<input type="number" name="{ lv_value }" id="{ lv_value }"| && | value="{ lv_rows }" style="display:none">| ). ENDMETHOD. METHOD render_field_text. DATA: lv_type TYPE string, lv_maxlength TYPE string. ii_html->add( |<label for="{ is_field-name }"{ is_attr-hint }>{ is_field-label }{ is_attr-required }</label>| ). IF is_attr-error IS NOT INITIAL. ii_html->add( is_attr-error ). ENDIF. IF is_field-side_action IS NOT INITIAL. ii_html->add( '<div class="input-container">' ). " Ugly :( ENDIF. IF is_field-type = zif_abapgit_html_form=>c_field_type-number. lv_type = 'number'. ELSEIF is_field-password = abap_true. lv_type = 'password'. ELSE. lv_type = 'text'. ENDIF. IF is_field-max > 0. lv_maxlength = |maxlength={ is_field-max }|. ENDIF. ii_html->add( |<input type="{ lv_type }" name="{ is_field-name }" id="{ is_field-name }"| && | value="{ is_attr-value }" { is_field-dblclick }{ is_attr-placeholder }| && |{ is_attr-readonly }{ is_attr-autofocus } { lv_maxlength }>| ). IF is_field-side_action IS NOT INITIAL. ii_html->add( '</div>' ). ii_html->add( '<div class="command-container">' ). ii_html->add( |<input type="submit" value="&#x2026;" formaction="sapevent:{ is_field-side_action }"| && | title="{ is_field-label }">| ). ii_html->add( '</div>' ). ENDIF. ENDMETHOD. METHOD render_field_textarea. DATA lv_rows TYPE string. DATA lv_cols TYPE string. DATA lv_html TYPE string. ii_html->add( |<label for="{ is_field-name }"{ is_attr-hint }>{ is_field-label }{ is_attr-required }</label>| ). IF is_attr-error IS NOT INITIAL. ii_html->add( is_attr-error ). ENDIF. IF is_field-rows > 0. lv_rows = | rows="{ is_field-rows }"|. ELSE. lv_rows = lines( zcl_abapgit_convert=>split_string( is_attr-value ) ). ENDIF. IF is_field-cols > 0. lv_cols = | cols="{ is_field-cols }"|. ENDIF. " Avoid adding line-breaks inside textarea tag (except for the actual value) lv_html = |<textarea name="{ is_field-name }" id="{ is_field-name }"{ lv_rows }{ lv_cols }| && |{ is_attr-readonly }{ is_attr-autofocus }{ is_attr-placeholder }>|. lv_html = lv_html && escape( val = is_attr-value format = cl_abap_format=>e_html_attr ). lv_html = lv_html && |</textarea>|. ii_html->add( lv_html ). ENDMETHOD. METHOD start_group. DATA ls_field LIKE LINE OF mt_fields. ls_field-type = zif_abapgit_html_form=>c_field_type-field_group. ls_field-label = iv_label. ls_field-name = iv_name. ls_field-hint = iv_hint. APPEND ls_field TO mt_fields. ro_self = me. ENDMETHOD. METHOD table. DATA ls_field LIKE LINE OF mt_fields. ls_field-type = zif_abapgit_html_form=>c_field_type-table. ls_field-name = iv_name. ls_field-label = iv_label. ls_field-hint = iv_hint. APPEND ls_field TO mt_fields. ro_self = me. ENDMETHOD. METHOD text. DATA ls_field LIKE LINE OF mt_fields. ls_field-type = zif_abapgit_html_form=>c_field_type-text. ls_field-name = iv_name. ls_field-label = iv_label. ls_field-upper_case = iv_upper_case. ls_field-readonly = iv_readonly. ls_field-min = iv_min. ls_field-max = iv_max. ls_field-password = iv_password. ls_field-condense = iv_condense. ls_field-hint = iv_hint. ls_field-required = iv_required. ls_field-placeholder = iv_placeholder. IF iv_side_action IS NOT INITIAL AND mv_form_id IS NOT INITIAL. ls_field-item_class = 'with-command'. ls_field-side_action = iv_side_action. ls_field-dblclick = | ondblclick="document.getElementById('{ mv_form_id }').action = 'sapevent:| && |{ iv_side_action }'; document.getElementById('{ mv_form_id }').submit()"|. ENDIF. APPEND ls_field TO mt_fields. ro_self = me. ENDMETHOD. METHOD textarea. DATA ls_field LIKE LINE OF mt_fields. ls_field-type = zif_abapgit_html_form=>c_field_type-textarea. ls_field-name = iv_name. ls_field-label = iv_label. ls_field-readonly = iv_readonly. ls_field-hint = iv_hint. ls_field-required = iv_required. ls_field-placeholder = iv_placeholder. ls_field-rows = iv_rows. ls_field-cols = iv_cols. APPEND ls_field TO mt_fields. ro_self = me. ENDMETHOD. METHOD zif_abapgit_gui_hotkeys~get_hotkey_actions. DATA: ls_hotkey_action LIKE LINE OF rt_hotkey_actions. FIELD-SYMBOLS: <ls_command> TYPE zif_abapgit_html_form=>ty_command. ls_hotkey_action-ui_component = 'Form'. READ TABLE mt_commands WITH KEY cmd_type = zif_abapgit_html_form=>c_cmd_type-input_main ASSIGNING <ls_command>. IF sy-subrc = 0. ls_hotkey_action-description = <ls_command>-label. ls_hotkey_action-action = <ls_command>-action. ls_hotkey_action-hotkey = |Enter|. INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions. ENDIF. READ TABLE mt_commands WITH KEY action = zif_abapgit_definitions=>c_action-go_back ASSIGNING <ls_command>. IF sy-subrc = 0. ls_hotkey_action-description = <ls_command>-label. ls_hotkey_action-action = <ls_command>-action. ls_hotkey_action-hotkey = |F3|. INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions. ENDIF. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 6494, 62, 687, 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, 6494, 62, 687, 764, 198, 220, 220, 220, 23255, 37, 2246, 1546, 1976, 361, 62, 397, 499, 18300, 62, 48317, 62, 8940, 13083, 764, 628, 220, 220, 220, 42715, 12, 49273, 50, 2251, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 687, 62, 312, 220, 220, 220, 41876, 269, 43167, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 16794, 62, 7700, 220, 41876, 269, 43167, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 305, 62, 687, 8, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 6494, 62, 687, 764, 198, 220, 220, 220, 337, 36252, 50, 8543, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 687, 62, 4871, 220, 220, 220, 220, 41876, 269, 43167, 5550, 38865, 705, 38969, 519, 12, 687, 6, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 952, 62, 27160, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 8841, 62, 8899, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 952, 62, 12102, 341, 62, 6404, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 8841, 62, 8899, 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, 220, 220, 220, 220, 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, 3141, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 18242, 220, 220, 220, 220, 220, 41876, 269, 43167, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 2673, 220, 220, 220, 220, 41876, 269, 43167, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 28758, 62, 4906, 220, 220, 41876, 1312, 5550, 38865, 1976, 361, 62, 397, 499, 18300, 62, 6494, 62, 687, 14804, 66, 62, 28758, 62, 4906, 12, 15414, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 305, 62, 944, 8, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 6494, 62, 687, 764, 198, 220, 220, 220, 337, 36252, 50, 2420, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 18242, 220, 220, 220, 220, 220, 220, 41876, 269, 43167, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 41876, 269, 43167, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 71, 600, 220, 220, 220, 220, 220, 220, 220, 41876, 269, 43167, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 35827, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 45828, 62, 7442, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 961, 8807, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 28712, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 17561, 1072, 220, 220, 220, 41876, 450, 499, 62, 30388, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 5372, 13829, 41876, 269, 43167, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 1589, 62, 2673, 41876, 269, 43167, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 1084, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1312, 5550, 38865, 537, 62, 397, 499, 62, 11018, 14804, 1084, 62, 600, 19, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 9806, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1312, 5550, 38865, 537, 62, 397, 499, 62, 11018, 14804, 9806, 62, 600, 19, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 305, 62, 944, 8, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 6494, 62, 687, 764, 198, 220, 220, 220, 337, 36252, 50, 2420, 20337, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 18242, 220, 220, 220, 220, 220, 220, 41876, 269, 43167, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 41876, 269, 43167, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 71, 600, 220, 220, 220, 220, 220, 220, 220, 41876, 269, 43167, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 35827, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 961, 8807, 220, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 5372, 13829, 41876, 269, 43167, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 8516, 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,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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 ]
CLASS zcl_abapgit_object_ecat DEFINITION PUBLIC INHERITING FROM zcl_abapgit_object_ecatt_super FINAL CREATE PUBLIC . PUBLIC SECTION. PROTECTED SECTION. METHODS: get_object_type REDEFINITION, get_upload REDEFINITION, get_download REDEFINITION, get_lock_object REDEFINITION. PRIVATE SECTION. ENDCLASS. CLASS zcl_abapgit_object_ecat IMPLEMENTATION. METHOD get_download. CREATE OBJECT ro_download TYPE zcl_abapgit_ecatt_script_downl. ENDMETHOD. METHOD get_lock_object. rv_lock_object = 'E_ECATT'. ENDMETHOD. METHOD get_object_type. rv_object_type = cl_apl_ecatt_const=>obj_type_test_script. ENDMETHOD. METHOD get_upload. CREATE OBJECT ro_upload TYPE zcl_abapgit_ecatt_script_upl. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 721, 265, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 721, 1078, 62, 16668, 198, 220, 25261, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 651, 62, 15252, 62, 4906, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 651, 62, 25850, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 651, 62, 15002, 23848, 36, 20032, 17941, 11, 198, 220, 220, 220, 220, 220, 651, 62, 5354, 62, 15252, 23848, 36, 20032, 17941, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 721, 265, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 651, 62, 15002, 13, 628, 220, 220, 220, 29244, 6158, 25334, 23680, 686, 62, 15002, 41876, 1976, 565, 62, 397, 499, 18300, 62, 721, 1078, 62, 12048, 62, 2902, 75, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 651, 62, 5354, 62, 15252, 13, 628, 220, 220, 220, 374, 85, 62, 5354, 62, 15252, 796, 705, 36, 62, 2943, 17139, 4458, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 651, 62, 15252, 62, 4906, 13, 628, 220, 220, 220, 374, 85, 62, 15252, 62, 4906, 796, 537, 62, 64, 489, 62, 721, 1078, 62, 9979, 14804, 26801, 62, 4906, 62, 9288, 62, 12048, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 651, 62, 25850, 13, 628, 220, 220, 220, 29244, 6158, 25334, 23680, 686, 62, 25850, 41876, 1976, 565, 62, 397, 499, 18300, 62, 721, 1078, 62, 12048, 62, 84, 489, 13, 628, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198 ]
[ 1, 1, 1, 1, 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ISK LEVEL HARMLESS. PRIVATE SECTION. CONSTANTS: c_dummy_repo_key TYPE zif_abapgit_persistence=>ty_value VALUE '000000001'. METHODS: positive FOR TESTING RAISING cx_static_check, bigger_repo_needs_dot_abapgit FOR TESTING RAISING cx_static_check, new_repo_needs_no_dot_abapgit FOR TESTING RAISING cx_static_check, given_any_repo, when_find_remote_dot_abapgit, then_dot_abapgit_is_bound, then_no_exception_is_raised, given_dot_abapgit_file, given_no_dot_abapgit_file, then_dot_abapgit_is_not_bound, then_exception_is_raised, given_repo_has_files IMPORTING iv_number_of_files TYPE i. DATA: mo_repo TYPE REF TO zcl_abapgit_repo, mx_error TYPE REF TO zcx_abapgit_exception, mo_dot_abapgit TYPE REF TO zcl_abapgit_dot_abapgit. ENDCLASS. CLASS ltcl_find_remote_dot_abapgit IMPLEMENTATION. METHOD positive. given_any_repo( ). given_dot_abapgit_file( ). when_find_remote_dot_abapgit( ). then_dot_abapgit_is_bound( ). then_no_exception_is_raised( ). ENDMETHOD. METHOD new_repo_needs_no_dot_abapgit. given_any_repo( ). given_repo_has_files( zcl_abapgit_repo=>c_new_repo_size ). given_no_dot_abapgit_file( ). when_find_remote_dot_abapgit( ). then_dot_abapgit_is_not_bound( ). then_no_exception_is_raised( ). ENDMETHOD. METHOD bigger_repo_needs_dot_abapgit. given_any_repo( ). given_repo_has_files( zcl_abapgit_repo=>c_new_repo_size + 1 ). given_no_dot_abapgit_file( ). when_find_remote_dot_abapgit( ). then_dot_abapgit_is_not_bound( ). then_exception_is_raised( ). ENDMETHOD. METHOD given_any_repo. DATA: ls_data TYPE zif_abapgit_persistence=>ty_repo. ls_data-key = c_dummy_repo_key. " online/offline doesn't matter... CREATE OBJECT mo_repo TYPE zcl_abapgit_repo_offline EXPORTING is_data = ls_data. ENDMETHOD. METHOD given_dot_abapgit_file. DATA: lt_files TYPE zif_abapgit_definitions=>ty_files_tt, ls_file LIKE LINE OF lt_files. ls_file-path = zif_abapgit_definitions=>c_root_dir. ls_file-filename = zif_abapgit_definitions=>c_dot_abapgit. ls_file-data = zcl_abapgit_convert=>string_to_xstring( |<?xml version="1.0" encoding="utf-8"?>| && |<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">| && | <asx:values>| && | <DATA>| && | <MASTER_LANGUAGE>E</MASTER_LANGUAGE>| && | <STARTING_FOLDER>/src/</STARTING_FOLDER>| && | <FOLDER_LOGIC>PREFIX</FOLDER_LOGIC>| && | <IGNORE>| && | <item>/.gitignore</item>| && | <item>/LICENSE</item>| && | <item>/README.md</item>| && | <item>/package.json</item>| && | <item>/.travis.yml</item>| && | </IGNORE>| && | </DATA>| && | </asx:values>| && |</asx:abap>| ). INSERT ls_file INTO TABLE lt_files. mo_repo->set_files_remote( lt_files ). ENDMETHOD. METHOD given_no_dot_abapgit_file. ENDMETHOD. METHOD when_find_remote_dot_abapgit. TRY. mo_dot_abapgit = mo_repo->find_remote_dot_abapgit( ). CATCH zcx_abapgit_exception INTO mx_error. ENDTRY. ENDMETHOD. METHOD then_dot_abapgit_is_bound. cl_abap_unit_assert=>assert_bound( mo_dot_abapgit ). ENDMETHOD. METHOD then_no_exception_is_raised. cl_abap_unit_assert=>assert_not_bound( mx_error ). ENDMETHOD. METHOD then_dot_abapgit_is_not_bound. cl_abap_unit_assert=>assert_not_bound( mo_dot_abapgit ). ENDMETHOD. METHOD then_exception_is_raised. cl_abap_unit_assert=>assert_bound( mx_error ). ENDMETHOD. METHOD given_repo_has_files. DATA: lt_files TYPE zif_abapgit_definitions=>ty_files_tt, ls_file LIKE LINE OF lt_files. ls_file-path = zif_abapgit_definitions=>c_root_dir. DO iv_number_of_files TIMES. ls_file-filename = |File_{ sy-index }|. INSERT ls_file INTO TABLE lt_files. ENDDO. mo_repo->set_files_remote( lt_files ). ENDMETHOD. ENDCLASS.
[ 9, 1, 9, 779, 428, 2723, 2393, 329, 534, 9564, 2969, 4326, 1332, 6097, 198, 31631, 300, 83, 565, 62, 19796, 62, 47960, 62, 26518, 62, 397, 499, 18300, 5550, 20032, 17941, 25261, 7473, 43001, 2751, 198, 220, 360, 4261, 6234, 6006, 9863, 198, 220, 45698, 42, 49277, 43638, 5805, 7597, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 25, 269, 62, 67, 13513, 62, 260, 7501, 62, 2539, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 8367, 26173, 8924, 705, 8269, 16, 4458, 198, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 3967, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 5749, 62, 260, 7501, 62, 50032, 62, 26518, 62, 397, 499, 18300, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 198, 220, 220, 220, 220, 220, 649, 62, 260, 7501, 62, 50032, 62, 3919, 62, 26518, 62, 397, 499, 18300, 7473, 43001, 2751, 17926, 1797, 2751, 43213, 62, 12708, 62, 9122, 11, 628, 220, 220, 220, 220, 220, 1813, 62, 1092, 62, 260, 7501, 11, 198, 220, 220, 220, 220, 220, 618, 62, 19796, 62, 47960, 62, 26518, 62, 397, 499, 18300, 11, 198, 220, 220, 220, 220, 220, 788, 62, 26518, 62, 397, 499, 18300, 62, 271, 62, 7784, 11, 198, 220, 220, 220, 220, 220, 788, 62, 3919, 62, 1069, 4516, 62, 271, 62, 49309, 11, 198, 220, 220, 220, 220, 220, 1813, 62, 26518, 62, 397, 499, 18300, 62, 7753, 11, 198, 220, 220, 220, 220, 220, 1813, 62, 3919, 62, 26518, 62, 397, 499, 18300, 62, 7753, 11, 198, 220, 220, 220, 220, 220, 788, 62, 26518, 62, 397, 499, 18300, 62, 271, 62, 1662, 62, 7784, 11, 198, 220, 220, 220, 220, 220, 788, 62, 1069, 4516, 62, 271, 62, 49309, 11, 198, 220, 220, 220, 220, 220, 1813, 62, 260, 7501, 62, 10134, 62, 16624, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 17618, 62, 1659, 62, 16624, 41876, 1312, 13, 628, 220, 220, 220, 42865, 25, 198, 220, 220, 220, 220, 220, 6941, 62, 260, 7501, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 260, 7501, 11, 198, 220, 220, 220, 220, 220, 285, 87, 62, 18224, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 6941, 62, 26518, 62, 397, 499, 18300, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 26518, 62, 397, 499, 18300, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 300, 83, 565, 62, 19796, 62, 47960, 62, 26518, 62, 397, 499, 18300, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 3967, 13, 628, 220, 220, 220, 1813, 62, 1092, 62, 260, 7501, 7, 6739, 198, 220, 220, 220, 1813, 62, 26518, 62, 397, 499, 18300, 62, 7753, 7, 6739, 628, 220, 220, 220, 618, 62, 19796, 62, 47960, 62, 26518, 62, 397, 499, 18300, 7, 6739, 628, 220, 220, 220, 788, 62, 26518, 62, 397, 499, 18300, 62, 271, 62, 7784, 7, 6739, 198, 220, 220, 220, 788, 62, 3919, 62, 1069, 4516, 62, 271, 62, 49309, 7, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 649, 62, 260, 7501, 62, 50032, 62, 3919, 62, 26518, 62, 397, 499, 18300, 13, 628, 220, 220, 220, 1813, 62, 1092, 62, 260, 7501, 7, 6739, 198, 220, 220, 220, 1813, 62, 260, 7501, 62, 10134, 62, 16624, 7, 1976, 565, 62, 397, 499, 18300, 62, 260, 7501, 14804, 66, 62, 3605, 62, 260, 7501, 62, 7857, 6739, 198, 220, 220, 220, 1813, 62, 3919, 62, 26518, 62, 397, 499, 18300, 62, 7753, 7, 6739, 628, 220, 220, 220, 618, 62, 19796, 62, 47960, 62, 26518, 62, 397, 499, 18300, 7, 6739, 628, 220, 220, 220, 788, 62, 26518, 62, 397, 499, 18300, 62, 271, 62, 1662, 62, 7784, 7, 6739, 198, 220, 220, 220, 788, 62, 3919, 62, 1069, 4516, 62, 271, 62, 49309, 7, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 5749, 62, 260, 7501, 62, 50032, 62, 26518, 62, 397, 499, 18300, 13, 628, 220, 220, 220, 1813, 62, 1092, 62, 260, 7501, 7, 6739, 198, 220, 220, 220, 1813, 62, 260, 7501, 62, 10134, 62, 16624, 7, 1976, 565, 62, 397, 499, 18300, 62, 260, 7501, 14804, 66, 62, 3605, 62, 260, 7501, 62, 7857, 1343, 352, 6739, 198, 220, 220, 220, 1813, 62, 3919, 62, 26518, 62, 397, 499, 18300, 62, 7753, 7, 6739, 628, 220, 220, 220, 618, 62, 19796, 62, 47960, 62, 26518, 62, 397, 499, 18300, 7, 6739, 628, 220, 220, 220, 788, 62, 26518, 62, 397, 499, 18300, 62, 271, 62, 1662, 62, 7784, 7, 6739, 198, 220, 220, 220, 788, 62, 1069, 4516, 62, 271, 62, 49309, 7, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1813, 62, 1092, 62, 260, 7501, 13, 628, 220, 220, 220, 42865, 25, 43979, 62, 7890, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 13, 628, 220, 220, 220, 43979, 62, 7890, 12, 2539, 796, 269, 62, 67, 13513, 62, 260, 7501, 62, 2539, 13, 628, 220, 220, 220, 366, 2691, 14, 2364, 1370, 1595, 470, 2300, 986, 198, 220, 220, 220, 29244, 6158, 25334, 23680, 6941, 62, 260, 7501, 41876, 1976, 565, 62, 397, 499, 18300, 62, 260, 7501, 62, 2364, 1370, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 7890, 796, 43979, 62, 7890, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1813, 62, 26518, 62, 397, 499, 18300, 62, 7753, 13, 628, 220, 220, 220, 42865, 25, 198, 220, 220, 220, 220, 220, 300, 83, 62, 16624, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 16624, 62, 926 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
CLASS zcl_abapgit_object_wdya DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL. PUBLIC SECTION. INTERFACES zif_abapgit_object. ALIASES mo_files FOR zif_abapgit_object~mo_files. PRIVATE SECTION. METHODS read EXPORTING es_app TYPE wdy_application et_properties TYPE wdy_app_property_table RAISING zcx_abapgit_exception. METHODS save IMPORTING is_app TYPE wdy_application it_properties TYPE wdy_app_property_table iv_package TYPE devclass RAISING zcx_abapgit_exception. ENDCLASS. CLASS zcl_abapgit_object_wdya IMPLEMENTATION. METHOD zif_abapgit_object~has_changed_since. rv_changed = abap_true. ENDMETHOD. "zif_abapgit_object~has_changed_since METHOD zif_abapgit_object~changed_by. DATA: li_app TYPE REF TO if_wdy_md_application, ls_app TYPE wdy_application, lv_name TYPE wdy_application_name. lv_name = ms_item-obj_name. TRY. li_app = cl_wdy_md_application=>get_object_by_key( name = lv_name version = 'A' ). li_app->if_wdy_md_object~get_definition( IMPORTING definition = ls_app ). IF ls_app-changedby IS INITIAL. rv_user = ls_app-author. ELSE. rv_user = ls_app-changedby. ENDIF. CATCH cx_root. rv_user = c_user_unknown. ENDTRY. ENDMETHOD. METHOD zif_abapgit_object~get_metadata. rs_metadata = get_metadata( ). ENDMETHOD. "zif_abapgit_object~get_metadata METHOD zif_abapgit_object~exists. DATA: lv_name TYPE wdy_application_name. lv_name = ms_item-obj_name. TRY. cl_wdy_md_application=>get_object_by_key( name = lv_name version = 'A' ). rv_bool = abap_true. CATCH cx_wdy_md_not_existing. rv_bool = abap_false. CATCH cx_wdy_md_permission_failure. zcx_abapgit_exception=>raise( 'WDYA, permission failure' ). ENDTRY. ENDMETHOD. "zif_abapgit_object~exists METHOD read. DATA: li_app TYPE REF TO if_wdy_md_application, li_map TYPE REF TO if_object_map, lo_prop TYPE REF TO cl_wdy_md_application_property, ls_prop LIKE LINE OF et_properties, lv_name TYPE wdy_application_name. CLEAR es_app. CLEAR et_properties. lv_name = ms_item-obj_name. TRY. li_app = cl_wdy_md_application=>get_object_by_key( name = lv_name version = 'A' ). CATCH cx_wdy_md_not_existing. RETURN. CATCH cx_wdy_md_permission_failure. zcx_abapgit_exception=>raise( 'WDYA, permission failure' ). ENDTRY. li_app->if_wdy_md_object~get_definition( IMPORTING definition = es_app ). CLEAR: es_app-author, es_app-createdon, es_app-changedby, es_app-changedon. li_map = li_app->get_properties( ). DO li_map->size( ) TIMES. lo_prop ?= li_map->get_by_position( sy-index ). lo_prop->get_definition( IMPORTING definition = ls_prop ). APPEND ls_prop TO et_properties. ENDDO. ENDMETHOD. "read METHOD zif_abapgit_object~serialize. DATA: ls_app TYPE wdy_application, lt_properties TYPE wdy_app_property_table. read( IMPORTING es_app = ls_app et_properties = lt_properties ). io_xml->add( iv_name = 'APP' ig_data = ls_app ). io_xml->add( iv_name = 'PROPERTIES' ig_data = lt_properties ). ENDMETHOD. "serialize METHOD save. DATA: li_prop TYPE REF TO if_wdy_md_application_property, lo_app TYPE REF TO cl_wdy_md_application. FIELD-SYMBOLS: <ls_property> LIKE LINE OF it_properties. TRY. CREATE OBJECT lo_app EXPORTING name = is_app-application_name definition = is_app devclass = iv_package. LOOP AT it_properties ASSIGNING <ls_property>. li_prop = lo_app->if_wdy_md_application~create_property( <ls_property>-name ). li_prop->set_value( <ls_property>-value ). ENDLOOP. tadir_insert( iv_package ). lo_app->if_wdy_md_lockable_object~save_to_database( ). CATCH cx_wdy_md_exception. zcx_abapgit_exception=>raise( 'error saving WDYA' ). ENDTRY. ENDMETHOD. "save METHOD zif_abapgit_object~deserialize. DATA: ls_app TYPE wdy_application, lt_properties TYPE wdy_app_property_table. io_xml->read( EXPORTING iv_name = 'APP' CHANGING cg_data = ls_app ). io_xml->read( EXPORTING iv_name = 'PROPERTIES' CHANGING cg_data = lt_properties ). save( is_app = ls_app it_properties = lt_properties iv_package = iv_package ). ENDMETHOD. "deserialize METHOD zif_abapgit_object~delete. DATA: li_app TYPE REF TO if_wdy_md_application, lv_objkey TYPE wdy_wb_appl_name, lv_type TYPE seu_type, lv_name TYPE wdy_application_name. lv_name = ms_item-obj_name. TRY. li_app = cl_wdy_md_application=>get_object_by_key( name = lv_name version = 'A' ). li_app->if_wdy_md_object~delete( ). li_app->if_wdy_md_lockable_object~save_to_database( ). * method save_to_database calls function module TR_TADIR_INTERFACE * with test mode = X, so it does not delete the TADIR entry. * Instead the standard code uses RS_TREE_OBJECT_PLACEMENT to delete * the TADIR entry lv_objkey = ms_item-obj_name. CONCATENATE 'O' swbm_c_type_wdy_application INTO lv_type. CALL FUNCTION 'RS_TREE_OBJECT_PLACEMENT' EXPORTING object = lv_objkey type = lv_type operation = 'DELETE'. CATCH cx_wdy_md_not_existing. RETURN. CATCH cx_wdy_md_exception. zcx_abapgit_exception=>raise( 'WDYA, error deleting' ). ENDTRY. ENDMETHOD. "delete METHOD zif_abapgit_object~jump. CALL FUNCTION 'RS_TOOL_ACCESS' EXPORTING operation = 'SHOW' object_name = ms_item-obj_name object_type = ms_item-obj_type in_new_window = abap_true. ENDMETHOD. "jump METHOD zif_abapgit_object~compare_to_remote_version. CREATE OBJECT ro_comparison_result TYPE zcl_abapgit_comparison_null. ENDMETHOD. ENDCLASS. "zcl_abapgit_object_wdya IMPLEMENTATION
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 16993, 3972, 5550, 20032, 17941, 44731, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 16668, 25261, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 23255, 37, 2246, 1546, 1976, 361, 62, 397, 499, 18300, 62, 15252, 13, 198, 220, 220, 220, 8355, 43429, 1546, 6941, 62, 16624, 7473, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 5908, 62, 16624, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 1100, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 1658, 62, 1324, 220, 220, 220, 220, 220, 220, 220, 41876, 266, 9892, 62, 31438, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2123, 62, 48310, 41876, 266, 9892, 62, 1324, 62, 26745, 62, 11487, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 13, 628, 220, 220, 220, 337, 36252, 50, 3613, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 1324, 220, 220, 220, 220, 220, 220, 220, 41876, 266, 9892, 62, 31438, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 340, 62, 48310, 41876, 266, 9892, 62, 1324, 62, 26745, 62, 11487, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 26495, 220, 220, 220, 41876, 1614, 4871, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 16993, 3972, 30023, 2538, 10979, 6234, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 10134, 62, 40985, 62, 20777, 13, 198, 220, 220, 220, 374, 85, 62, 40985, 796, 450, 499, 62, 7942, 13, 198, 220, 23578, 49273, 13, 220, 366, 89, 361, 62, 397, 499, 18300, 62, 15252, 93, 10134, 62, 40985, 62, 20777, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 40985, 62, 1525, 13, 628, 220, 220, 220, 42865, 25, 7649, 62, 1324, 220, 41876, 4526, 37, 5390, 611, 62, 86, 9892, 62, 9132, 62, 31438, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43979, 62, 1324, 220, 41876, 266, 9892, 62, 31438, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 3672, 41876, 266, 9892, 62, 31438, 62, 3672, 13, 628, 198, 220, 220, 220, 300, 85, 62, 3672, 796, 13845, 62, 9186, 12, 26801, 62, 3672, 13, 198, 220, 220, 220, 7579, 56, 13, 198, 220, 220, 220, 220, 220, 220, 220, 7649, 62, 1324, 796, 537, 62, 86, 9892, 62, 9132, 62, 31438, 14804, 1136, 62, 15252, 62, 1525, 62, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 220, 220, 220, 796, 300, 85, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2196, 796, 705, 32, 6, 6739, 628, 220, 220, 220, 220, 220, 220, 220, 7649, 62, 1324, 3784, 361, 62, 86, 9892, 62, 9132, 62, 15252, 93, 1136, 62, 46758, 7, 30023, 9863, 2751, 6770, 796, 43979, 62, 1324, 6739, 628, 220, 220, 220, 220, 220, 220, 220, 16876, 43979, 62, 1324, 12, 40985, 1525, 3180, 3268, 2043, 12576, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 85, 62, 7220, 796, 43979, 62, 1324, 12, 9800, 13, 198, 220, 220, 220, 220, 220, 220, 220, 17852, 5188, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 85, 62, 7220, 796, 43979, 62, 1324, 12, 40985, 1525, 13, 198, 220, 220, 220, 220, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 220, 220, 327, 11417, 43213, 62, 15763, 13, 198, 220, 220, 220, 220, 220, 220, 220, 374, 85, 62, 7220, 796, 269, 62, 7220, 62, 34680, 13, 198, 220, 220, 220, 23578, 40405, 13, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1136, 62, 38993, 13, 198, 220, 220, 220, 44608, 62, 38993, 796, 651, 62, 38993, 7, 6739, 198, 220, 23578, 49273, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 89, 361, 62, 397, 499, 18300, 62, 15252, 93, 1136, 62, 38993, 628, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 1069, 1023, 13, 628, 220, 220, 220, 42865, 25, 300, 85, 62, 3672, 41876, 266, 9892, 62, 31438, 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, 7579, 56, 13, 198, 220, 220, 220, 220, 220, 220, 220, 537, 62, 86, 9892, 62, 9132, 62, 31438, 14804, 1136, 62, 15252, 62, 1525, 62, 2539, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 220, 220, 220, 796, 300, 85, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2196, 796, 705, 32, 6, 6739, 198, 220, 220, 220, 220, 220, 220, 220, 374, 85, 62, 30388, 796, 450, 499, 62, 7942, 13, 198, 220, 220, 220, 220, 220, 327, 11417, 43213, 62, 86, 9892, 62, 9132, 62, 1662, 62, 25687, 13, 198, 220, 220, 220, 220, 220, 220, 220, 374, 85, 62, 30388, 796, 450, 499, 62, 9562, 13, 198, 220, 220, 220, 220, 220, 327, 11417, 43213, 62, 86, 9892, 62, 9132, 62, 525, 3411, 62, 32165, 495, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 66, 87, 62, 397, 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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 ]
CLASS zcl_abapgit_object_wdyn 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. DATA: mt_components TYPE TABLE OF wdy_ctlr_compo_vrs, mt_sources TYPE TABLE OF wdy_ctlr_compo_source_vrs. METHODS: get_limu_objects RETURNING VALUE(rt_objects) TYPE wdy_md_transport_keys, read RETURNING VALUE(rs_component) TYPE wdy_component_metadata RAISING zcx_abapgit_exception, read_controller IMPORTING is_key TYPE wdy_md_controller_key RETURNING VALUE(rs_controller) TYPE wdy_md_controller_meta_data RAISING zcx_abapgit_exception, read_definition IMPORTING is_key TYPE wdy_md_component_key RETURNING VALUE(rs_definition) TYPE wdy_md_component_meta_data RAISING zcx_abapgit_exception, read_view IMPORTING is_key TYPE wdy_md_view_key RETURNING VALUE(rs_view) TYPE wdy_md_view_meta_data RAISING zcx_abapgit_exception, recover_controller IMPORTING is_controller TYPE wdy_md_controller_meta_data RAISING zcx_abapgit_exception, recover_definition IMPORTING is_definition TYPE wdy_md_component_meta_data iv_package TYPE devclass RAISING zcx_abapgit_exception, recover_view IMPORTING is_view TYPE wdy_md_view_meta_data RAISING zcx_abapgit_exception, delta_controller IMPORTING is_controller TYPE wdy_md_controller_meta_data RETURNING VALUE(rs_delta) TYPE svrs2_xversionable_object RAISING zcx_abapgit_exception, delta_definition IMPORTING is_definition TYPE wdy_md_component_meta_data VALUE(iv_package) TYPE devclass RETURNING VALUE(rs_delta) TYPE svrs2_xversionable_object RAISING zcx_abapgit_exception, delta_view IMPORTING is_view TYPE wdy_md_view_meta_data RETURNING VALUE(rs_delta) TYPE svrs2_xversionable_object RAISING zcx_abapgit_exception, add_fm_param_exporting IMPORTING iv_name TYPE string ig_value TYPE any CHANGING ct_param TYPE abap_func_parmbind_tab, add_fm_param_tables IMPORTING iv_name TYPE string CHANGING ct_value TYPE ANY TABLE ct_param TYPE abap_func_parmbind_tab, add_fm_exception IMPORTING iv_name TYPE string iv_value TYPE i CHANGING ct_exception TYPE abap_func_excpbind_tab, add_with_inactive_parts RAISING zcx_abapgit_exception . ENDCLASS. CLASS zcl_abapgit_object_wdyn IMPLEMENTATION. METHOD add_fm_exception. DATA: ls_exception LIKE LINE OF ct_exception. ls_exception-name = iv_name. ls_exception-value = iv_value. INSERT ls_exception INTO TABLE ct_exception. ENDMETHOD. METHOD add_fm_param_exporting. DATA: ls_param LIKE LINE OF ct_param. ls_param-kind = abap_func_exporting. ls_param-name = iv_name. GET REFERENCE OF ig_value INTO ls_param-value. INSERT ls_param INTO TABLE ct_param. ENDMETHOD. METHOD add_fm_param_tables. DATA: ls_param LIKE LINE OF ct_param. ls_param-kind = abap_func_tables. ls_param-name = iv_name. GET REFERENCE OF ct_value INTO ls_param-value. INSERT ls_param INTO TABLE ct_param. ENDMETHOD. METHOD add_with_inactive_parts. DATA: lv_obj_name TYPE trobj_name, lv_object TYPE trobjtype, lt_objects TYPE dwinactiv_tab. FIELD-SYMBOLS: <ls_object> LIKE LINE OF lt_objects. lv_obj_name = ms_item-obj_name. lv_object = ms_item-obj_type. CALL FUNCTION 'RS_INACTIVE_OBJECTS_IN_OBJECT' EXPORTING obj_name = lv_obj_name object = lv_object TABLES inactive_objects = lt_objects EXCEPTIONS object_not_found = 1 OTHERS = 2. IF sy-subrc <> 0. zcx_abapgit_exception=>raise_t100( ). ENDIF. LOOP AT lt_objects ASSIGNING <ls_object>. zcl_abapgit_objects_activation=>add( iv_type = <ls_object>-object iv_name = <ls_object>-obj_name ). ENDLOOP. ENDMETHOD. METHOD delta_controller. DATA: li_controller TYPE REF TO if_wdy_md_controller, lx_error TYPE REF TO cx_wdy_md_exception, lv_found TYPE abap_bool, ls_key TYPE wdy_md_controller_key, ls_obj_new TYPE svrs2_versionable_object, ls_obj_old TYPE svrs2_versionable_object. FIELD-SYMBOLS: <ls_component> LIKE LINE OF mt_components, <ls_source> LIKE LINE OF mt_sources, <lt_ctrl_exceptions> TYPE ANY TABLE, <lt_ctrl_exception_texts> TYPE ANY TABLE, <lt_excp> TYPE ANY TABLE, <lt_excpt> TYPE ANY TABLE. ls_key-component_name = is_controller-definition-component_name. ls_key-controller_name = is_controller-definition-controller_name. lv_found = cl_wdy_md_controller=>check_existency( component_name = ls_key-component_name controller_name = ls_key-controller_name ). IF lv_found = abap_false. TRY. li_controller ?= cl_wdy_md_controller=>create_complete( component_name = ls_key-component_name controller_name = ls_key-controller_name controller_type = is_controller-definition-controller_type ). li_controller->save_to_database( ). li_controller->unlock( ). CATCH cx_wdy_md_exception INTO lx_error. zcx_abapgit_exception=>raise( |Error creating dummy controller: { lx_error->get_text( ) }| ). ENDTRY. ENDIF. ls_obj_new-objtype = wdyn_limu_component_controller. ls_obj_new-objname = ls_key. ls_obj_old-objtype = wdyn_limu_component_controller. ls_obj_old-objname = ls_key. APPEND is_controller-definition TO ls_obj_old-wdyc-defin. LOOP AT mt_components ASSIGNING <ls_component> WHERE component_name = ls_key-component_name AND controller_name = ls_key-controller_name. APPEND <ls_component> TO ls_obj_old-wdyc-ccomp. ENDLOOP. LOOP AT mt_sources ASSIGNING <ls_source> WHERE component_name = ls_key-component_name AND controller_name = ls_key-controller_name. APPEND <ls_source> TO ls_obj_old-wdyc-ccoms. ENDLOOP. ls_obj_old-wdyc-descr = is_controller-descriptions. ls_obj_old-wdyc-cusag = is_controller-controller_usages. ls_obj_old-wdyc-ccomt = is_controller-controller_component_texts. ls_obj_old-wdyc-cpara = is_controller-controller_parameters. ls_obj_old-wdyc-cpart = is_controller-controller_parameter_texts. ls_obj_old-wdyc-cnode = is_controller-context_nodes. ls_obj_old-wdyc-cattr = is_controller-context_attributes. ls_obj_old-wdyc-cmapp = is_controller-context_mappings. * Version 702 doesn't have these two attributes so we * use them dynamically for downward compatibility ASSIGN COMPONENT 'CONTROLLER_EXCEPTIONS' OF STRUCTURE is_controller TO <lt_ctrl_exceptions>. IF sy-subrc = 0. ASSIGN COMPONENT 'EXCP' OF STRUCTURE ls_obj_old-wdyc TO <lt_excp>. IF sy-subrc = 0. <lt_excp> = <lt_ctrl_exceptions>. ENDIF. ENDIF. ASSIGN COMPONENT 'CONTROLLER_EXCEPTIONS_TEXTS' OF STRUCTURE is_controller TO <lt_ctrl_exception_texts>. IF sy-subrc = 0. ASSIGN COMPONENT 'EXCPT' OF STRUCTURE ls_obj_old-wdyc TO <lt_excpt>. IF sy-subrc = 0. <lt_excpt> = <lt_ctrl_exception_texts>. ENDIF. ENDIF. ls_obj_old-wdyc-fgrps = is_controller-fieldgroups. CALL FUNCTION 'SVRS_MAKE_OBJECT_DELTA' EXPORTING obj_old = ls_obj_new obj_new = ls_obj_old CHANGING delta = rs_delta EXCEPTIONS inconsistent_objects = 1. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from SVRS_MAKE_OBJECT_DELTA' ). ENDIF. ENDMETHOD. METHOD delta_definition. DATA: ls_key TYPE wdy_md_component_key, lv_found TYPE abap_bool, ls_obj_new TYPE svrs2_versionable_object, li_component TYPE REF TO if_wdy_md_component, lx_error TYPE REF TO cx_wdy_md_exception, ls_obj_old TYPE svrs2_versionable_object. ls_key-component_name = is_definition-definition-component_name. lv_found = cl_wdy_md_component=>check_existency( ls_key-component_name ). IF lv_found = abap_false. TRY. cl_wdy_md_component=>create_complete( EXPORTING name = ls_key-component_name IMPORTING component = li_component CHANGING devclass = iv_package ). li_component->save_to_database( ). li_component->unlock( ). CATCH cx_wdy_md_exception INTO lx_error. zcx_abapgit_exception=>raise( |Error creating dummy component: { lx_error->get_text( ) }| ). ENDTRY. ENDIF. ls_obj_new-objtype = wdyn_limu_component_definition. ls_obj_new-objname = ls_key-component_name. ls_obj_old-objtype = wdyn_limu_component_definition. ls_obj_old-objname = ls_key-component_name. APPEND is_definition-definition TO ls_obj_old-wdyd-defin. ls_obj_old-wdyd-descr = is_definition-descriptions. ls_obj_old-wdyd-cusag = is_definition-component_usages. ls_obj_old-wdyd-intrf = is_definition-interface_implementings. ls_obj_old-wdyd-libra = is_definition-library_usages. ls_obj_old-wdyd-ctuse = is_definition-ext_ctlr_usages. ls_obj_old-wdyd-ctmap = is_definition-ext_ctx_mappings. CALL FUNCTION 'SVRS_MAKE_OBJECT_DELTA' EXPORTING obj_old = ls_obj_new obj_new = ls_obj_old CHANGING delta = rs_delta EXCEPTIONS inconsistent_objects = 1. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from SVRS_MAKE_OBJECT_DELTA' ). ENDIF. ENDMETHOD. METHOD delta_view. DATA: ls_key TYPE wdy_md_view_key, ls_obj_new TYPE svrs2_versionable_object, ls_obj_old TYPE svrs2_versionable_object, lv_found TYPE abap_bool, lx_error TYPE REF TO cx_wdy_md_exception, li_view TYPE REF TO if_wdy_md_abstract_view. FIELD-SYMBOLS: <ls_def> LIKE LINE OF ls_obj_old-wdyv-defin. ls_key-component_name = is_view-definition-component_name. ls_key-view_name = is_view-definition-view_name. lv_found = cl_wdy_md_abstract_view=>check_existency( component_name = ls_key-component_name name = ls_key-view_name ). IF lv_found = abap_false. TRY. li_view = cl_wdy_md_abstract_view=>create( component_name = is_view-definition-component_name view_name = is_view-definition-view_name type = is_view-definition-type ). li_view->save_to_database( ). li_view->unlock( ). CATCH cx_wdy_md_exception INTO lx_error. zcx_abapgit_exception=>raise( |Error creating dummy view: { lx_error->get_text( ) }| ). ENDTRY. ENDIF. ls_obj_new-objtype = wdyn_limu_component_view. ls_obj_new-objname = ls_key. ls_obj_old-objtype = wdyn_limu_component_view. ls_obj_old-objname = ls_key. APPEND INITIAL LINE TO ls_obj_old-wdyv-defin ASSIGNING <ls_def>. MOVE-CORRESPONDING is_view-definition TO <ls_def>. ls_obj_old-wdyv-descr = is_view-descriptions. ls_obj_old-wdyv-vcont = is_view-view_containers. ls_obj_old-wdyv-vcntt = is_view-view_container_texts. ls_obj_old-wdyv-ibplg = is_view-iobound_plugs. ls_obj_old-wdyv-ibplt = is_view-iobound_plug_texts. ls_obj_old-wdyv-plpar = is_view-plug_parameters. ls_obj_old-wdyv-plprt = is_view-plug_parameter_texts. ls_obj_old-wdyv-uiele = is_view-ui_elements. ls_obj_old-wdyv-uicon = is_view-ui_context_bindings. ls_obj_old-wdyv-uievt = is_view-ui_event_bindings. ls_obj_old-wdyv-uiddc = is_view-ui_ddic_bindings. ls_obj_old-wdyv-uiprp = is_view-ui_properties. ls_obj_old-wdyv-navil = is_view-navigation_links. ls_obj_old-wdyv-navit = is_view-navigation_target_refs. ls_obj_old-wdyv-vshno = is_view-vsh_nodes. ls_obj_old-wdyv-vshpl = is_view-vsh_placeholders. ls_obj_old-wdyv-views = is_view-viewset_properties. CALL FUNCTION 'SVRS_MAKE_OBJECT_DELTA' EXPORTING obj_old = ls_obj_new obj_new = ls_obj_old CHANGING delta = rs_delta EXCEPTIONS inconsistent_objects = 1. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from SVRS_MAKE_OBJECT_DELTA' ). ENDIF. ENDMETHOD. METHOD get_limu_objects. DATA: lv_name TYPE wdy_component_name. lv_name = ms_item-obj_name. CALL FUNCTION 'WDYN_GET_LIMU_OBJECTS' EXPORTING component_name = lv_name IMPORTING limu_objects = rt_objects. ENDMETHOD. METHOD read. DATA: lt_objects TYPE wdy_md_transport_keys, ls_controller_key TYPE wdy_md_controller_key, ls_component_key TYPE wdy_md_component_key, ls_view_key TYPE wdy_md_view_key. FIELD-SYMBOLS: <ls_object> LIKE LINE OF lt_objects, <ls_meta> LIKE LINE OF rs_component-ctlr_metadata, <ls_view> LIKE LINE OF rs_component-view_metadata, <lt_ctrl_exceptions> TYPE ANY TABLE, <lt_ctrl_exception_texts> TYPE ANY TABLE. CLEAR mt_components. CLEAR mt_sources. lt_objects = get_limu_objects( ). LOOP AT lt_objects ASSIGNING <ls_object>. CASE <ls_object>-sub_type. WHEN wdyn_limu_component_controller. ls_controller_key = <ls_object>-sub_name. APPEND read_controller( ls_controller_key ) TO rs_component-ctlr_metadata. WHEN wdyn_limu_component_definition. ls_component_key = <ls_object>-sub_name. rs_component-comp_metadata = read_definition( ls_component_key ). WHEN wdyn_limu_component_view. ls_view_key = <ls_object>-sub_name. APPEND read_view( ls_view_key ) TO rs_component-view_metadata. WHEN OTHERS. ASSERT 0 = 1. ENDCASE. ENDLOOP. SORT rs_component-ctlr_metadata BY definition-component_name ASCENDING definition-controller_name ASCENDING. LOOP AT rs_component-ctlr_metadata ASSIGNING <ls_meta>. SORT <ls_meta>-descriptions. SORT <ls_meta>-controller_usages. SORT <ls_meta>-controller_components. SORT <ls_meta>-controller_component_texts. SORT <ls_meta>-controller_parameters. SORT <ls_meta>-controller_parameter_texts. SORT <ls_meta>-context_nodes. SORT <ls_meta>-context_attributes. SORT <ls_meta>-context_mappings. SORT <ls_meta>-fieldgroups. * Version 702 doesn't have these two attributes so we * use them dynamically for downward compatibility ASSIGN COMPONENT 'CONTROLLER_EXCEPTIONS' OF STRUCTURE <ls_meta> TO <lt_ctrl_exceptions>. IF sy-subrc = 0. SORT <lt_ctrl_exceptions>. ENDIF. ASSIGN COMPONENT 'CONTROLLER_EXCEPTION_TEXTS' OF STRUCTURE <ls_meta> TO <lt_ctrl_exception_texts>. IF sy-subrc = 0. SORT <lt_ctrl_exception_texts>. ENDIF. ENDLOOP. LOOP AT rs_component-view_metadata ASSIGNING <ls_view>. SORT <ls_view>-ui_elements. ENDLOOP. SORT mt_components BY component_name ASCENDING controller_name ASCENDING cmpname ASCENDING. SORT mt_sources BY component_name ASCENDING controller_name ASCENDING cmpname ASCENDING line_number ASCENDING. ENDMETHOD. METHOD read_controller. DATA: lt_components TYPE TABLE OF wdy_ctlr_compo_vrs, lt_sources TYPE TABLE OF wdy_ctlr_compo_source_vrs, lt_definition TYPE TABLE OF wdy_controller, lt_psmodilog TYPE TABLE OF smodilog, lt_psmodisrc TYPE TABLE OF smodisrc, lt_fm_param TYPE abap_func_parmbind_tab, lt_fm_exception TYPE abap_func_excpbind_tab. FIELD-SYMBOLS: <lt_ctrl_exceptions> TYPE ANY TABLE, <lt_ctrl_exception_texts> TYPE ANY TABLE. * Calling FM dynamically because version 702 has less parameters * FM parameters add_fm_param_exporting( EXPORTING iv_name = 'CONTROLLER_KEY' ig_value = is_key CHANGING ct_param = lt_fm_param ). add_fm_param_exporting( EXPORTING iv_name = 'GET_ALL_TRANSLATIONS' ig_value = abap_false CHANGING ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'DEFINITION' CHANGING ct_value = lt_definition ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'DESCRIPTIONS' CHANGING ct_value = rs_controller-descriptions ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'CONTROLLER_USAGES' CHANGING ct_value = rs_controller-controller_usages ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'CONTROLLER_COMPONENTS' CHANGING ct_value = lt_components ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'CONTROLLER_COMPONENT_SOURCES' CHANGING ct_value = lt_sources ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'CONTROLLER_COMPONENT_TEXTS' CHANGING ct_value = rs_controller-controller_component_texts ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'CONTROLLER_PARAMETERS' CHANGING ct_value = rs_controller-controller_parameters ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'CONTROLLER_PARAMETER_TEXTS' CHANGING ct_value = rs_controller-controller_parameter_texts ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'CONTEXT_NODES' CHANGING ct_value = rs_controller-context_nodes ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'CONTEXT_ATTRIBUTES' CHANGING ct_value = rs_controller-context_attributes ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'CONTEXT_MAPPINGS' CHANGING ct_value = rs_controller-context_mappings ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'FIELDGROUPS' CHANGING ct_value = rs_controller-fieldgroups ct_param = lt_fm_param ). * Version 702 doesn't have these two attributes so we * use them dynamically for downward compatibility ASSIGN COMPONENT 'CONTROLLER_EXCEPTIONS' OF STRUCTURE rs_controller TO <lt_ctrl_exceptions>. IF sy-subrc = 0. add_fm_param_tables( EXPORTING iv_name = 'CONTROLLER_EXCEPTIONS' CHANGING ct_value = <lt_ctrl_exceptions> ct_param = lt_fm_param ). ENDIF. ASSIGN COMPONENT 'CONTROLLER_EXCEPTION_TEXTS' OF STRUCTURE rs_controller TO <lt_ctrl_exception_texts>. IF sy-subrc = 0. add_fm_param_tables( EXPORTING iv_name = 'CONTROLLER_EXCEPTION_TEXTS' CHANGING ct_value = <lt_ctrl_exception_texts> ct_param = lt_fm_param ). ENDIF. add_fm_param_tables( EXPORTING iv_name = 'PSMODILOG' CHANGING ct_value = lt_psmodilog ct_param = lt_fm_param ). add_fm_param_tables( EXPORTING iv_name = 'PSMODISRC' CHANGING ct_value = lt_psmodisrc ct_param = lt_fm_param ). * FM exceptions add_fm_exception( EXPORTING iv_name = 'NOT_EXISTING' iv_value = 1 CHANGING ct_exception = lt_fm_exception ). add_fm_exception( EXPORTING iv_name = 'OTHERS' iv_value = 2 CHANGING ct_exception = lt_fm_exception ). CALL FUNCTION 'WDYC_GET_OBJECT' PARAMETER-TABLE lt_fm_param EXCEPTION-TABLE lt_fm_exception. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from WDYC_GET_OBJECT' ). ENDIF. APPEND LINES OF lt_components TO mt_components. APPEND LINES OF lt_sources TO mt_sources. READ TABLE lt_definition INDEX 1 INTO rs_controller-definition. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'WDYC, definition not found' ). ENDIF. CLEAR: rs_controller-definition-author, rs_controller-definition-createdon, rs_controller-definition-changedby, rs_controller-definition-changedon. ENDMETHOD. METHOD read_definition. DATA: lt_definition TYPE TABLE OF wdy_component, lt_psmodilog TYPE TABLE OF smodilog, lt_psmodisrc TYPE TABLE OF smodisrc. CALL FUNCTION 'WDYD_GET_OBJECT' EXPORTING component_key = is_key get_all_translations = abap_false TABLES definition = lt_definition descriptions = rs_definition-descriptions component_usages = rs_definition-component_usages interface_implementings = rs_definition-interface_implementings library_usages = rs_definition-library_usages ext_ctlr_usages = rs_definition-ext_ctlr_usages ext_ctx_mappings = rs_definition-ext_ctx_mappings psmodilog = lt_psmodilog " not optional in all versions psmodisrc = lt_psmodisrc " not optional in all versions EXCEPTIONS not_existing = 1 OTHERS = 2. IF sy-subrc = 1. RETURN. ELSEIF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from WDYD_GET_OBJECT' ). ENDIF. READ TABLE lt_definition INDEX 1 INTO rs_definition-definition. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'WDYD, definition not found' ). ENDIF. CLEAR: rs_definition-definition-author, rs_definition-definition-createdon, rs_definition-definition-changedby, rs_definition-definition-changedon, rs_definition-definition-gendate, rs_definition-definition-gentime. ENDMETHOD. METHOD read_view. DATA: lt_definition TYPE TABLE OF wdy_view_vrs, lt_psmodilog TYPE TABLE OF smodilog, lt_psmodisrc TYPE TABLE OF smodisrc. FIELD-SYMBOLS: <ls_definition> LIKE LINE OF lt_definition. CALL FUNCTION 'WDYV_GET_OBJECT' EXPORTING view_key = is_key get_all_translations = abap_false TABLES definition = lt_definition descriptions = rs_view-descriptions view_containers = rs_view-view_containers view_container_texts = rs_view-view_container_texts iobound_plugs = rs_view-iobound_plugs iobound_plug_texts = rs_view-iobound_plug_texts plug_parameters = rs_view-plug_parameters plug_parameter_texts = rs_view-plug_parameter_texts ui_elements = rs_view-ui_elements ui_context_bindings = rs_view-ui_context_bindings ui_event_bindings = rs_view-ui_event_bindings ui_ddic_bindings = rs_view-ui_ddic_bindings ui_properties = rs_view-ui_properties navigation_links = rs_view-navigation_links navigation_target_refs = rs_view-navigation_target_refs vsh_nodes = rs_view-vsh_nodes vsh_placeholders = rs_view-vsh_placeholders viewset_properties = rs_view-viewset_properties psmodilog = lt_psmodilog psmodisrc = lt_psmodisrc EXCEPTIONS not_existing = 1 OTHERS = 2. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from WDYV_GET_OBJECT' ). ENDIF. READ TABLE lt_definition INDEX 1 ASSIGNING <ls_definition>. ASSERT sy-subrc = 0. MOVE-CORRESPONDING <ls_definition> TO rs_view-definition. CLEAR: rs_view-definition-author, rs_view-definition-createdon, rs_view-definition-changedby, rs_view-definition-changedon. ENDMETHOD. METHOD recover_controller. DATA: ls_key TYPE wdy_controller_key, lv_corrnr TYPE trkorr, lx_error TYPE REF TO cx_wdy_md_exception, ls_delta TYPE svrs2_xversionable_object. ls_delta = delta_controller( is_controller ). ls_key-component_name = is_controller-definition-component_name. ls_key-controller_name = is_controller-definition-controller_name. TRY. cl_wdy_md_controller=>recover_version( EXPORTING controller_key = ls_key delta = ls_delta-wdyc CHANGING corrnr = lv_corrnr ). CATCH cx_wdy_md_exception INTO lx_error. zcx_abapgit_exception=>raise( |Error recovering version of controller: { lx_error->get_text( ) }| ). ENDTRY. ENDMETHOD. METHOD recover_definition. DATA: ls_key TYPE wdy_md_component_key, lv_corrnr TYPE trkorr, lx_error TYPE REF TO cx_wdy_md_exception, ls_delta TYPE svrs2_xversionable_object. ls_delta = delta_definition( is_definition = is_definition iv_package = iv_package ). ls_key-component_name = is_definition-definition-component_name. TRY. cl_wdy_md_component=>recover_version( EXPORTING component_key = ls_key delta = ls_delta-wdyd CHANGING corrnr = lv_corrnr ). CATCH cx_wdy_md_exception INTO lx_error. zcx_abapgit_exception=>raise( |Error recovering version of component: { lx_error->get_text( ) }| ). ENDTRY. ENDMETHOD. METHOD recover_view. DATA: ls_key TYPE wdy_md_view_key, lv_corrnr TYPE trkorr, lx_error TYPE REF TO cx_wdy_md_exception, ls_delta TYPE svrs2_xversionable_object. ls_delta = delta_view( is_view ). ls_key-component_name = is_view-definition-component_name. ls_key-view_name = is_view-definition-view_name. TRY. cl_wdy_md_abstract_view=>recover_version( EXPORTING view_key = ls_key delta = ls_delta-wdyv CHANGING corrnr = lv_corrnr ). CATCH cx_wdy_md_exception INTO lx_error. zcx_abapgit_exception=>raise( |Error recovering version of abstract view: { lx_error->get_text( ) }| ). ENDTRY. ENDMETHOD. METHOD zif_abapgit_object~changed_by. rv_user = c_user_unknown. " todo ENDMETHOD. METHOD zif_abapgit_object~delete. DATA: lo_component TYPE REF TO cl_wdy_wb_component, lo_request TYPE REF TO cl_wb_request, li_state TYPE REF TO if_wb_program_state, lv_object_name TYPE seu_objkey. CREATE OBJECT lo_component. lv_object_name = ms_item-obj_name. CREATE OBJECT lo_request EXPORTING p_object_type = 'YC' p_object_name = lv_object_name p_operation = swbm_c_op_delete_no_dialog. lo_component->if_wb_program~process_wb_request( p_wb_request = lo_request p_wb_program_state = li_state ). ENDMETHOD. METHOD zif_abapgit_object~deserialize. DATA: ls_component TYPE wdy_component_metadata, ls_description TYPE wdy_ext_ctx_map. FIELD-SYMBOLS: <ls_view> LIKE LINE OF ls_component-view_metadata, <ls_controller> LIKE LINE OF ls_component-ctlr_metadata. io_xml->read( EXPORTING iv_name = 'COMPONENT' CHANGING cg_data = ls_component ). io_xml->read( EXPORTING iv_name = 'COMPONENTS' CHANGING cg_data = mt_components ). io_xml->read( EXPORTING iv_name = 'SOURCES' CHANGING cg_data = mt_sources ). ls_component-comp_metadata-definition-author = sy-uname. ls_component-comp_metadata-definition-createdon = sy-datum. recover_definition( is_definition = ls_component-comp_metadata iv_package = iv_package ). LOOP AT ls_component-ctlr_metadata ASSIGNING <ls_controller>. <ls_controller>-definition-author = sy-uname. <ls_controller>-definition-createdon = sy-datum. recover_controller( <ls_controller> ). ENDLOOP. LOOP AT ls_component-view_metadata ASSIGNING <ls_view>. <ls_view>-definition-author = sy-uname. <ls_view>-definition-createdon = sy-datum. recover_view( <ls_view> ). ENDLOOP. READ TABLE ls_component-comp_metadata-descriptions INTO ls_description INDEX 1. IF sy-subrc = 0. zcl_abapgit_sotr_handler=>create_sotr( iv_package = iv_package io_xml = io_xml ). ENDIF. add_with_inactive_parts( ). ENDMETHOD. METHOD zif_abapgit_object~exists. DATA: lv_component_name TYPE wdy_component-component_name. SELECT SINGLE component_name FROM wdy_component INTO lv_component_name WHERE component_name = 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. 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 = ms_item-obj_type in_new_window = abap_true. ENDMETHOD. METHOD zif_abapgit_object~serialize. DATA: ls_component TYPE wdy_component_metadata, ls_description TYPE wdy_ext_ctx_map. ls_component = read( ). io_xml->add( iv_name = 'COMPONENT' ig_data = ls_component ). io_xml->add( ig_data = mt_components iv_name = 'COMPONENTS' ). io_xml->add( ig_data = mt_sources iv_name = 'SOURCES' ). READ TABLE ls_component-comp_metadata-descriptions INTO ls_description INDEX 1. IF sy-subrc = 0. zcl_abapgit_sotr_handler=>read_sotr( iv_pgmid = 'LIMU' iv_object = 'WDYV' iv_obj_name = ms_item-obj_name io_xml = io_xml ). ENDIF. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 16993, 2047, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 16668, 198, 220, 25261, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 23255, 37, 2246, 1546, 1976, 361, 62, 397, 499, 18300, 62, 15252, 764, 628, 220, 220, 220, 8355, 43429, 1546, 6941, 62, 16624, 198, 220, 220, 220, 220, 220, 7473, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 5908, 62, 16624, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 42865, 25, 198, 220, 220, 220, 220, 220, 45079, 62, 5589, 3906, 41876, 43679, 3963, 266, 9892, 62, 310, 14050, 62, 5589, 78, 62, 85, 3808, 11, 198, 220, 220, 220, 220, 220, 45079, 62, 82, 2203, 220, 220, 220, 41876, 43679, 3963, 266, 9892, 62, 310, 14050, 62, 5589, 78, 62, 10459, 62, 85, 3808, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 651, 62, 2475, 84, 62, 48205, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 17034, 62, 48205, 8, 41876, 266, 9892, 62, 9132, 62, 7645, 634, 62, 13083, 11, 198, 220, 220, 220, 220, 220, 1100, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 3808, 62, 42895, 8, 41876, 266, 9892, 62, 42895, 62, 38993, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 1100, 62, 36500, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 2539, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 266, 9892, 62, 9132, 62, 36500, 62, 2539, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 3808, 62, 36500, 8, 41876, 266, 9892, 62, 9132, 62, 36500, 62, 28961, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 1100, 62, 46758, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 2539, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 266, 9892, 62, 9132, 62, 42895, 62, 2539, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 3808, 62, 46758, 8, 41876, 266, 9892, 62, 9132, 62, 42895, 62, 28961, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 1100, 62, 1177, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 2539, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 266, 9892, 62, 9132, 62, 1177, 62, 2539, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 3808, 62, 1177, 8, 41876, 266, 9892, 62, 9132, 62, 1177, 62, 28961, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 8551, 62, 36500, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 36500, 41876, 266, 9892, 62, 9132, 62, 36500, 62, 28961, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 8551, 62, 46758, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 46758, 41876, 266, 9892, 62, 9132, 62, 42895, 62, 28961, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 26495, 220, 220, 220, 41876, 1614, 4871, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 8551, 62, 1177, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 1177, 41876, 266, 9892, 62, 9132, 62, 1177, 62, 28961, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 25979, 62, 36500, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 36500, 220, 220, 41876, 266, 9892, 62, 9132, 62, 36500, 62, 28961, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 3808, 62, 67, 12514, 8, 41876, 38487, 3808, 17, 62, 87, 9641, 540, 62, 15252, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 25979, 62, 46758, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 46758, 220, 220, 220, 220, 41876, 266, 9892, 62, 9132, 62, 42895, 62, 28961, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 452, 62, 26495, 8, 41876, 1614, 4871, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 3808, 62, 67, 12514, 8, 220, 220, 41876, 38487, 3808, 17, 62, 87, 9641, 540, 62, 15252, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 25979, 62, 1177, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 1177, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 266, 9892, 62, 9132, 62, 1177, 62, 28961, 62, 7890, 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,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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 ]
REPORT yp_salv_mini. TABLES: bkpf. DATA o_salv TYPE REF TO cl_salv_table. DATA t_bkpf TYPE TABLE OF bkpf. SELECT-OPTIONS: s_budat FOR bkpf-budat. START-OF-SELECTION. SELECT * FROM bkpf INTO TABLE t_bkpf WHERE budat IN s_budat. END-OF-SELECTION. CALL METHOD cl_salv_table=>factory IMPORTING r_salv_table = o_salv CHANGING t_table = t_bkpf. o_salv->get_functions( )->set_all( abap_true ). o_salv->get_columns( )->set_optimize( abap_true ). o_salv->get_columns( )->set_key_fixation( value = abap_true ). o_salv->get_columns( )->set_column_position( columnname = 'BUDAT' position = 1 ). o_salv->display( ).
[ 2200, 15490, 331, 79, 62, 21680, 85, 62, 45313, 13, 198, 198, 5603, 9148, 1546, 25, 275, 74, 79, 69, 13, 198, 198, 26947, 267, 62, 21680, 85, 41876, 4526, 37, 5390, 537, 62, 21680, 85, 62, 11487, 13, 198, 26947, 256, 62, 65, 74, 79, 69, 41876, 43679, 3963, 275, 74, 79, 69, 13, 198, 198, 46506, 12, 3185, 51, 11053, 25, 264, 62, 65, 463, 265, 7473, 275, 74, 79, 69, 12, 65, 463, 265, 13, 198, 198, 2257, 7227, 12, 19238, 12, 46506, 2849, 13, 628, 220, 33493, 1635, 16034, 220, 275, 74, 79, 69, 39319, 43679, 256, 62, 65, 74, 79, 69, 198, 220, 220, 220, 220, 220, 220, 220, 220, 33411, 220, 3600, 265, 3268, 264, 62, 65, 463, 265, 13, 198, 198, 10619, 12, 19238, 12, 46506, 2849, 13, 628, 220, 42815, 337, 36252, 537, 62, 21680, 85, 62, 11487, 14804, 69, 9548, 198, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 374, 62, 21680, 85, 62, 11487, 796, 267, 62, 21680, 85, 198, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 256, 62, 11487, 220, 220, 220, 220, 220, 796, 256, 62, 65, 74, 79, 69, 13, 628, 220, 267, 62, 21680, 85, 3784, 1136, 62, 12543, 2733, 7, 1267, 3784, 2617, 62, 439, 7, 450, 499, 62, 7942, 6739, 198, 220, 267, 62, 21680, 85, 3784, 1136, 62, 28665, 82, 7, 1267, 3784, 2617, 62, 40085, 1096, 7, 450, 499, 62, 7942, 6739, 198, 220, 267, 62, 21680, 85, 3784, 1136, 62, 28665, 82, 7, 1267, 3784, 2617, 62, 2539, 62, 13049, 341, 7, 1988, 796, 450, 499, 62, 7942, 6739, 198, 220, 267, 62, 21680, 85, 3784, 1136, 62, 28665, 82, 7, 1267, 3784, 2617, 62, 28665, 62, 9150, 7, 5721, 3672, 796, 705, 33, 8322, 1404, 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, 220, 220, 220, 220, 220, 220, 220, 2292, 220, 220, 796, 352, 6739, 628, 220, 267, 62, 21680, 85, 3784, 13812, 7, 6739, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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files. PROTECTED SECTION. PRIVATE SECTION. METHODS: read EXPORTING es_attr TYPE w3tempattr ev_source TYPE string RAISING zcx_abapgit_exception, save IMPORTING is_attr TYPE w3tempattr iv_source TYPE string RAISING zcx_abapgit_exception, w3_api_load IMPORTING is_name TYPE iacikeyt RETURNING VALUE(ro_template) TYPE REF TO if_w3_api_template RAISING zcx_abapgit_exception, w3_api_set_changeable IMPORTING iv_changeable TYPE abap_bool io_template TYPE REF TO if_w3_api_template RAISING zcx_abapgit_exception, w3_api_delete IMPORTING io_template TYPE REF TO if_w3_api_template RAISING zcx_abapgit_exception, w3_api_save IMPORTING io_template TYPE REF TO if_w3_api_template RAISING zcx_abapgit_exception, w3_api_get_attributes IMPORTING io_template TYPE REF TO if_w3_api_template RETURNING VALUE(rs_attributes) TYPE w3tempattr RAISING zcx_abapgit_exception, w3_api_get_source IMPORTING io_template TYPE REF TO if_w3_api_template RETURNING VALUE(rt_source) TYPE w3htmltabtype RAISING zcx_abapgit_exception, w3_api_create_new IMPORTING is_template_data TYPE w3tempattr RETURNING VALUE(ro_template) TYPE REF TO if_w3_api_template RAISING zcx_abapgit_exception, w3_api_set_attributes IMPORTING io_template TYPE REF TO if_w3_api_template is_attr TYPE w3tempattr RAISING zcx_abapgit_exception, w3_api_set_source IMPORTING io_template TYPE REF TO if_w3_api_template it_source TYPE w3htmltabtype RAISING zcx_abapgit_exception. ENDCLASS. CLASS zcl_abapgit_object_iatu IMPLEMENTATION. METHOD read. DATA: lo_template TYPE REF TO if_w3_api_template, lt_source TYPE w3htmltabtype, ls_name TYPE iacikeyt. ls_name = ms_item-obj_name. lo_template = w3_api_load( is_name = ls_name ). es_attr = w3_api_get_attributes( io_template = lo_template ). CLEAR: es_attr-chname, es_attr-tdate, es_attr-ttime, es_attr-devclass. lt_source = w3_api_get_source( io_template = lo_template ). CONCATENATE LINES OF lt_source INTO ev_source RESPECTING BLANKS. ENDMETHOD. METHOD save. DATA: lt_source TYPE w3htmltabtype, lv_source TYPE string, lo_template TYPE REF TO if_w3_api_template. lo_template = w3_api_create_new( is_template_data = is_attr ). w3_api_set_attributes( io_template = lo_template is_attr = is_attr ). lv_source = iv_source. WHILE strlen( lv_source ) >= 255. APPEND lv_source(255) TO lt_source. lv_source = lv_source+255. ENDWHILE. IF NOT lv_source IS INITIAL. APPEND lv_source TO lt_source. ENDIF. w3_api_set_source( io_template = lo_template it_source = lt_source ). w3_api_save( lo_template ). ENDMETHOD. METHOD zif_abapgit_object~changed_by. rv_user = c_user_unknown. " todo ENDMETHOD. METHOD zif_abapgit_object~delete. DATA: lo_template TYPE REF TO if_w3_api_template, ls_name TYPE iacikeyt. ls_name = ms_item-obj_name. lo_template = w3_api_load( is_name = ls_name ). w3_api_set_changeable( io_template = lo_template iv_changeable = abap_true ). w3_api_delete( io_template = lo_template ). w3_api_save( io_template = lo_template ). ENDMETHOD. METHOD zif_abapgit_object~deserialize. DATA: ls_attr TYPE w3tempattr, lv_source TYPE string. io_xml->read( EXPORTING iv_name = 'ATTR' CHANGING cg_data = ls_attr ). lv_source = mo_files->read_string( 'html' ) ##NO_TEXT. ls_attr-devclass = iv_package. save( is_attr = ls_attr iv_source = lv_source ). ENDMETHOD. METHOD zif_abapgit_object~exists. DATA: ls_name TYPE iacikeyt. ls_name = ms_item-obj_name. cl_w3_api_template=>s_check_exist( EXPORTING p_template_name = ls_name IMPORTING p_exists = rv_bool ). 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. CALL FUNCTION 'RS_TOOL_ACCESS' EXPORTING operation = 'SHOW' object_name = ms_item-obj_name object_type = ms_item-obj_type. ENDMETHOD. METHOD zif_abapgit_object~serialize. DATA: ls_attr TYPE w3tempattr, lv_source TYPE string. IF zif_abapgit_object~exists( ) = abap_false. RETURN. ENDIF. read( IMPORTING es_attr = ls_attr ev_source = lv_source ). io_xml->add( iv_name = 'ATTR' ig_data = ls_attr ). mo_files->add_string( iv_ext = 'html' iv_string = lv_source ) ##NO_TEXT. ENDMETHOD. METHOD w3_api_load. cl_w3_api_template=>if_w3_api_template~load( EXPORTING p_template_name = is_name IMPORTING p_template = ro_template EXCEPTIONS object_not_existing = 1 permission_failure = 2 error_occured = 3 OTHERS = 4 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from if_w3_api_template~load subrc={ sy-subrc }| ). ENDIF. ENDMETHOD. METHOD w3_api_set_changeable. io_template->if_w3_api_object~set_changeable( EXPORTING p_changeable = iv_changeable EXCEPTIONS action_cancelled = 1 object_locked_by_other_user = 2 permission_failure = 3 object_already_changeable = 4 object_already_unlocked = 5 object_just_created = 6 object_deleted = 7 object_modified = 8 object_not_existing = 9 object_invalid = 10 error_occured = 11 OTHERS = 12 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from w3_api_template~set_changeable subrc={ sy-subrc }| ). ENDIF. ENDMETHOD. METHOD w3_api_delete. io_template->if_w3_api_object~delete( EXCEPTIONS object_not_empty = 1 object_not_changeable = 2 object_invalid = 3 error_occured = 4 OTHERS = 5 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from w3_api_template~delete subrc={ sy-subrc }| ). ENDIF. ENDMETHOD. METHOD w3_api_save. io_template->if_w3_api_object~save( EXCEPTIONS object_invalid = 1 object_not_changeable = 2 action_cancelled = 3 permission_failure = 4 not_changed = 5 data_invalid = 6 error_occured = 7 OTHERS = 8 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from w3_api_template~save subrc={ sy-subrc }| ). ENDIF. ENDMETHOD. METHOD w3_api_get_attributes. io_template->get_attributes( IMPORTING p_attributes = rs_attributes EXCEPTIONS object_invalid = 1 template_deleted = 2 error_occured = 3 OTHERS = 4 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from w3_api_template~get_attributes subrc={ sy-subrc }| ). ENDIF. ENDMETHOD. METHOD w3_api_get_source. io_template->get_source( IMPORTING p_source = rt_source EXCEPTIONS object_invalid = 1 template_deleted = 2 error_occured = 3 OTHERS = 4 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from w3_api_template~get_source subrc={ sy-subrc }| ). ENDIF. ENDMETHOD. METHOD w3_api_create_new. cl_w3_api_template=>if_w3_api_template~create_new( EXPORTING p_template_data = is_template_data p_program_name = is_template_data-programm IMPORTING p_template = ro_template EXCEPTIONS object_already_existing = 1 object_just_created = 2 not_authorized = 3 undefined_name = 4 author_not_existing = 5 action_cancelled = 6 error_occured = 7 user_error = 8 OTHERS = 9 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from w3_api_template~create_new subrc={ sy-subrc }| ). ENDIF. ENDMETHOD. METHOD w3_api_set_attributes. io_template->set_attributes( EXPORTING p_attributes = is_attr EXCEPTIONS object_not_changeable = 1 object_deleted = 2 object_invalid = 3 author_not_existing = 4 authorize_failure = 5 error_occured = 6 OTHERS = 7 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from w3_api_template~set_attributes subrc={ sy-subrc }| ). ENDIF. ENDMETHOD. METHOD w3_api_set_source. io_template->set_source( EXPORTING p_source = it_source EXCEPTIONS object_not_changeable = 1 object_deleted = 2 object_invalid = 3 authorize_failure = 4 invalid_parameter = 5 error_occured = 6 OTHERS = 7 ). IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from w3_api_template~set_source subrc={ sy-subrc }| ). ENDIF. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 5375, 84, 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, 198, 220, 220, 220, 220, 220, 1100, 198, 220, 220, 220, 220, 220, 220, 220, 7788, 15490, 2751, 1658, 62, 35226, 220, 220, 41876, 266, 18, 29510, 35226, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 819, 62, 10459, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 3613, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 35226, 220, 220, 41876, 266, 18, 29510, 35226, 21628, 62, 10459, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 266, 18, 62, 15042, 62, 2220, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 3672, 220, 220, 220, 220, 41876, 1312, 330, 522, 20760, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 305, 62, 28243, 8, 41876, 4526, 37, 5390, 611, 62, 86, 18, 62, 15042, 62, 28243, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 266, 18, 62, 15042, 62, 2617, 62, 3803, 540, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 3803, 540, 41876, 450, 499, 62, 30388, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33245, 62, 28243, 220, 220, 41876, 4526, 37, 5390, 611, 62, 86, 18, 62, 15042, 62, 28243, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 266, 18, 62, 15042, 62, 33678, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 33245, 62, 28243, 41876, 4526, 37, 5390, 611, 62, 86, 18, 62, 15042, 62, 28243, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 266, 18, 62, 15042, 62, 21928, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 33245, 62, 28243, 41876, 4526, 37, 5390, 611, 62, 86, 18, 62, 15042, 62, 28243, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 266, 18, 62, 15042, 62, 1136, 62, 1078, 7657, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 33245, 62, 28243, 220, 220, 41876, 4526, 37, 5390, 611, 62, 86, 18, 62, 15042, 62, 28243, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 3808, 62, 1078, 7657, 8, 41876, 266, 18, 29510, 35226, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 266, 18, 62, 15042, 62, 1136, 62, 10459, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 33245, 62, 28243, 41876, 4526, 37, 5390, 611, 62, 86, 18, 62, 15042, 62, 28243, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 17034, 62, 10459, 8, 220, 220, 41876, 266, 18, 19211, 2528, 397, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 266, 18, 62, 15042, 62, 17953, 62, 3605, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 318, 62, 28243, 62, 7890, 41876, 266, 18, 29510, 35226, 198, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 305, 62, 28243, 8, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 611, 62, 86, 18, 62, 15042, 62, 28243, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 266, 18, 62, 15042, 62, 2617, 62, 1078, 7657, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 33245, 62, 28243, 41876, 4526, 37, 5390, 611, 62, 86, 18, 62, 15042, 62, 28243, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 62, 35226, 220, 220, 220, 220, 41876, 266, 18, 29510, 35226, 198, 220, 220, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 1976, 66, 87, 62, 397, 499, 18300, 62, 1069, 4516, 11, 198, 220, 220, 220, 220, 220, 266, 18, 62, 15042, 62, 2617, 62, 10459, 198, 220, 220, 220, 220, 220, 220, 220, 30023, 9863, 2751, 33245, 62, 28243, 41876, 4526, 37, 5390, 611, 62, 86, 18, 62, 15042, 62, 28243, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 340, 62, 10459, 220, 220, 41876, 266, 18, 19211, 2528, 397, 4906, 198, 220, 220, 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, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 5375 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
REPORT zaof_test01. START-OF-SELECTION. PERFORM run. FORM run RAISING cx_uuid_error. WRITE: / 'sdf' . cl_system_uuid=>if_system_uuid_static~create_uuid_c22( ). DATA: foo TYPE c. DATA: bar TYPE i. ENDFORM.
[ 2200, 15490, 1976, 64, 1659, 62, 9288, 486, 13, 198, 198, 2257, 7227, 12, 19238, 12, 46506, 2849, 13, 198, 220, 19878, 21389, 1057, 13, 198, 198, 21389, 1057, 17926, 1797, 2751, 43213, 62, 12303, 312, 62, 18224, 13, 628, 220, 44423, 25, 1220, 705, 82, 7568, 6, 198, 220, 764, 628, 220, 537, 62, 10057, 62, 12303, 312, 14804, 361, 62, 10057, 62, 12303, 312, 62, 12708, 93, 17953, 62, 12303, 312, 62, 66, 1828, 7, 198, 220, 6739, 628, 220, 42865, 25, 22944, 41876, 269, 13, 198, 220, 42865, 25, 2318, 41876, 1312, 13, 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 ]
class ZCL_BUG_SUBTYPE_PERSIST definition public final create protected global friends ZCB_BUG_SUBTYPE_PERSIST . public section. *"* public components of class ZCL_BUG_SUBTYPE_PERSIST *"* do not include other source files here!!! interfaces IF_OS_STATE . methods GET_ICON returning value(RESULT) type ZBT_BUGSTYPE_ICON raising CX_OS_OBJECT_NOT_FOUND . methods GET_SUBTYPE returning value(RESULT) type ZBT_BUGSTYPE raising CX_OS_OBJECT_NOT_FOUND . methods GET_TYPE returning value(RESULT) type ZBT_ID_BUGTYPE raising CX_OS_OBJECT_NOT_FOUND . methods SET_ICON importing !I_ICON type ZBT_BUGSTYPE_ICON raising CX_OS_OBJECT_NOT_FOUND . class CL_OS_SYSTEM definition load . protected section. *"* protected components of class ZCL_BUG_SUBTYPE_PERSIST *"* do not include other source files here!!! data ICON type ZBT_BUGSTYPE_ICON . data SUBTYPE type ZBT_BUGSTYPE . data TYPE type ZBT_ID_BUGTYPE . private section. *"* private components of class ZCL_BUG_SUBTYPE_PERSIST *"* do not include other source files here!!! ENDCLASS. CLASS ZCL_BUG_SUBTYPE_PERSIST IMPLEMENTATION. method GET_ICON. ***BUILD 090501 " returning RESULT " raising CX_OS_OBJECT_NOT_FOUND ************************************************************************ * Purpose : Get Attribute ICON * * Version : 2.0 * * Precondition : - * * Postcondition : The object state is loaded, result is set * * OO Exceptions : CX_OS_OBJECT_NOT_FOUND * * Implementation : - * ************************************************************************ * Changelog: * - 2000-03-14 : (BGR) Version 2.0 * - 2000-07-28 : (SB) OO Exceptions ************************************************************************ * * Inform class agent and handle exceptions state_read_access. result = ICON. " GET_ICON endmethod. method GET_SUBTYPE. ***BUILD 090501 " returning RESULT " raising CX_OS_OBJECT_NOT_FOUND ************************************************************************ * Purpose : Get Attribute SUBTYPE * * Version : 2.0 * * Precondition : - * * Postcondition : The object state is loaded, result is set * * OO Exceptions : CX_OS_OBJECT_NOT_FOUND * * Implementation : - * ************************************************************************ * Changelog: * - 2000-03-14 : (BGR) Version 2.0 * - 2000-07-28 : (SB) OO Exceptions ************************************************************************ * * Inform class agent and handle exceptions state_read_access. result = SUBTYPE. " GET_SUBTYPE endmethod. method GET_TYPE. ***BUILD 090501 " returning RESULT " raising CX_OS_OBJECT_NOT_FOUND ************************************************************************ * Purpose : Get Attribute TYPE * * Version : 2.0 * * Precondition : - * * Postcondition : The object state is loaded, result is set * * OO Exceptions : CX_OS_OBJECT_NOT_FOUND * * Implementation : - * ************************************************************************ * Changelog: * - 2000-03-14 : (BGR) Version 2.0 * - 2000-07-28 : (SB) OO Exceptions ************************************************************************ * * Inform class agent and handle exceptions state_read_access. result = TYPE. " GET_TYPE endmethod. method IF_OS_STATE~GET. ***BUILD 051401 " returning result type ref to object ************************************************************************ * Purpose : Get state. * * Version : 2.0 * * Precondition : - * * Postcondition : - * * OO Exceptions : - * * Implementation : - * ************************************************************************ * Changelog: * - 2000-03-07 : (BGR) Initial Version 2.0 ************************************************************************ * GENERATED: Do not modify ************************************************************************ data: STATE_OBJECT type ref to CL_OS_STATE. create object STATE_OBJECT. call method STATE_OBJECT->SET_STATE_FROM_OBJECT( ME ). result = STATE_OBJECT. endmethod. method IF_OS_STATE~HANDLE_EXCEPTION. ***BUILD 051401 " importing I_EXCEPTION type ref to IF_OS_EXCEPTION_INFO optional " importing I_EX_OS type ref to CX_OS_OBJECT_NOT_FOUND optional ************************************************************************ * Purpose : Handles exceptions during attribute access. * * Version : 2.0 * * Precondition : - * * Postcondition : - * * OO Exceptions : CX_OS_OBJECT_NOT_FOUND * * Implementation : If an exception is raised during attribut access, * this method is called and the exception is passed * as a paramater. The default is to raise the exception * again, so that the caller can handle the exception. * But it is also possible to handle the exception * here in the callee. * ************************************************************************ * Changelog: * - 2000-03-07 : (BGR) Initial Version 2.0 * - 2000-08-02 : (SB) OO Exceptions ************************************************************************ * Modify if you like ************************************************************************ if i_ex_os is not initial. raise exception i_ex_os. endif. endmethod. method IF_OS_STATE~INIT. ***BUILD 051401 ************************************************************************ * Purpose : Initialisation of the transient state partition. * * Version : 2.0 * * Precondition : - * * Postcondition : Transient state is initial. * * OO Exceptions : - * * Implementation : Caution!: Avoid Throwing ACCESS Events. * ************************************************************************ * Changelog: * - 2000-03-07 : (BGR) Initial Version 2.0 ************************************************************************ * Modify if you like ************************************************************************ endmethod. method IF_OS_STATE~INVALIDATE. ***BUILD 051401 ************************************************************************ * Purpose : Do something before all persistent attributes are * cleared. * * Version : 2.0 * * Precondition : - * * Postcondition : - * * OO Exceptions : - * * Implementation : Whatever you like to do. * ************************************************************************ * Changelog: * - 2000-03-07 : (BGR) Initial Version 2.0 ************************************************************************ * Modify if you like ************************************************************************ endmethod. method IF_OS_STATE~SET. ***BUILD 051401 " importing I_STATE type ref to object ************************************************************************ * Purpose : Set state. * * Version : 2.0 * * Precondition : - * * Postcondition : - * * OO Exceptions : - * * Implementation : - * ************************************************************************ * Changelog: * - 2000-03-07 : (BGR) Initial Version 2.0 ************************************************************************ * GENERATED: Do not modify ************************************************************************ data: STATE_OBJECT type ref to CL_OS_STATE. STATE_OBJECT ?= I_STATE. call method STATE_OBJECT->SET_OBJECT_FROM_STATE( ME ). endmethod. method SET_ICON. ***BUILD 090501 " importing I_ICON " raising CX_OS_OBJECT_NOT_FOUND ************************************************************************ * Purpose : Set attribute ICON * * Version : 2.0 * * Precondition : - * * Postcondition : The object state is loaded, attribute is set * * OO Exceptions : CX_OS_OBJECT_NOT_FOUND * * Implementation : - * ************************************************************************ * Changelog: * - 2000-03-14 : (BGR) Version 2.0 * - 2000-07-28 : (SB) OO Exceptions * - 2000-10-04 : (SB) Namespaces ************************************************************************ * * Inform class agent and handle exceptions state_write_access. if ( I_ICON <> ICON ). ICON = I_ICON. * * Inform class agent and handle exceptions state_changed. endif. "( I_ICON <> ICON ) " GET_ICON endmethod. ENDCLASS.
[ 4871, 1168, 5097, 62, 12953, 62, 50, 10526, 25216, 62, 47, 4877, 8808, 6770, 198, 220, 1171, 198, 220, 2457, 198, 220, 2251, 6861, 628, 220, 3298, 2460, 1168, 23199, 62, 12953, 62, 50, 10526, 25216, 62, 47, 4877, 8808, 764, 198, 198, 11377, 2665, 13, 198, 9, 1, 9, 1171, 6805, 286, 1398, 1168, 5097, 62, 12953, 62, 50, 10526, 25216, 62, 47, 4877, 8808, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 628, 220, 20314, 16876, 62, 2640, 62, 44724, 764, 628, 220, 5050, 17151, 62, 2149, 1340, 198, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 1988, 7, 19535, 16724, 8, 2099, 1168, 19313, 62, 12953, 2257, 56, 11401, 62, 2149, 1340, 198, 220, 220, 220, 8620, 198, 220, 220, 220, 220, 220, 327, 55, 62, 2640, 62, 9864, 23680, 62, 11929, 62, 37, 15919, 764, 198, 220, 5050, 17151, 62, 50, 10526, 25216, 198, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 1988, 7, 19535, 16724, 8, 2099, 1168, 19313, 62, 12953, 2257, 56, 11401, 198, 220, 220, 220, 8620, 198, 220, 220, 220, 220, 220, 327, 55, 62, 2640, 62, 9864, 23680, 62, 11929, 62, 37, 15919, 764, 198, 220, 5050, 17151, 62, 25216, 198, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 1988, 7, 19535, 16724, 8, 2099, 1168, 19313, 62, 2389, 62, 12953, 25216, 198, 220, 220, 220, 8620, 198, 220, 220, 220, 220, 220, 327, 55, 62, 2640, 62, 9864, 23680, 62, 11929, 62, 37, 15919, 764, 198, 220, 5050, 25823, 62, 2149, 1340, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 40, 62, 2149, 1340, 2099, 1168, 19313, 62, 12953, 2257, 56, 11401, 62, 2149, 1340, 198, 220, 220, 220, 8620, 198, 220, 220, 220, 220, 220, 327, 55, 62, 2640, 62, 9864, 23680, 62, 11929, 62, 37, 15919, 764, 198, 220, 1398, 7852, 62, 2640, 62, 23060, 25361, 6770, 3440, 764, 198, 24326, 2665, 13, 198, 9, 1, 9, 6861, 6805, 286, 1398, 1168, 5097, 62, 12953, 62, 50, 10526, 25216, 62, 47, 4877, 8808, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 628, 220, 1366, 314, 10943, 2099, 1168, 19313, 62, 12953, 2257, 56, 11401, 62, 2149, 1340, 764, 198, 220, 1366, 28932, 25216, 2099, 1168, 19313, 62, 12953, 2257, 56, 11401, 764, 198, 220, 1366, 41876, 2099, 1168, 19313, 62, 2389, 62, 12953, 25216, 764, 198, 19734, 2665, 13, 198, 9, 1, 9, 2839, 6805, 286, 1398, 1168, 5097, 62, 12953, 62, 50, 10526, 25216, 62, 47, 4877, 8808, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 12953, 62, 50, 10526, 25216, 62, 47, 4877, 8808, 30023, 2538, 10979, 6234, 13, 628, 198, 24396, 17151, 62, 2149, 1340, 13, 198, 8162, 19499, 26761, 7769, 2713, 486, 198, 220, 220, 220, 220, 366, 8024, 15731, 16724, 198, 220, 220, 220, 220, 366, 8620, 327, 55, 62, 2640, 62, 9864, 23680, 62, 11929, 62, 37, 15919, 198, 17174, 17174, 4557, 198, 9, 32039, 220, 220, 220, 220, 220, 220, 220, 1058, 3497, 3460, 4163, 314, 10943, 198, 9, 198, 9, 10628, 220, 220, 220, 220, 220, 220, 220, 1058, 362, 13, 15, 198, 9, 198, 9, 3771, 31448, 220, 220, 1058, 532, 198, 9, 198, 9, 2947, 31448, 220, 1058, 383, 2134, 1181, 318, 9639, 11, 1255, 318, 900, 198, 9, 198, 9, 440, 46, 1475, 11755, 220, 1058, 327, 55, 62, 2640, 62, 9864, 23680, 62, 11929, 62, 37, 15919, 198, 9, 198, 9, 46333, 1058, 532, 198, 9, 198, 17174, 17174, 4557, 198, 9, 609, 8368, 519, 25, 198, 9, 532, 4751, 12, 3070, 12, 1415, 220, 220, 1058, 357, 33, 10761, 8, 10628, 362, 13, 15, 198, 9, 532, 4751, 12, 2998, 12, 2078, 220, 220, 1058, 357, 16811, 8, 220, 440, 46, 1475, 11755, 198, 17174, 17174, 4557, 198, 198, 9, 1635, 45255, 1398, 5797, 290, 5412, 13269, 198, 220, 1181, 62, 961, 62, 15526, 13, 628, 220, 1255, 796, 314, 10943, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 17151, 62, 2149, 1340, 198, 437, 24396, 13, 628, 198, 24396, 17151, 62, 50, 10526, 25216, 13, 198, 8162, 19499, 26761, 7769, 2713, 486, 198, 220, 220, 220, 220, 366, 8024, 15731, 16724, 198, 220, 220, 220, 220, 366, 8620, 327, 55, 62, 2640, 62, 9864, 23680, 62, 11929, 62, 37, 15919, 198, 17174, 17174, 4557, 198, 9, 32039, 220, 220, 220, 220, 220, 220, 220, 1058, 3497, 3460, 4163, 28932, 25216, 198, 9, 198, 9, 10628, 220, 220, 220, 220, 220, 220, 220, 1058, 362, 13, 15, 198, 9, 198, 9, 3771, 31448, 220, 220, 1058, 532, 198, 9, 198, 9, 2947, 31448, 220, 1058, 383, 2134, 1181, 318, 9639, 11, 1255, 318, 900, 198, 9, 198, 9, 440, 46, 1475, 11755, 220, 1058, 327, 55, 62, 2640, 62, 9864, 23680, 62, 11929, 62, 37, 15919, 198, 9, 198, 9, 46333, 1058, 532, 198, 9, 198, 17174, 17174, 4557, 198, 9, 609, 8368, 519, 25, 198, 9, 532, 4751, 12, 3070, 12, 1415, 220, 220, 1058, 357, 33, 10761, 8, 10628, 362, 13, 15, 198, 9, 532, 4751, 12, 2998, 12, 2078, 220, 220, 1058, 357, 16811, 8, 220, 440, 46, 1475, 11755, 198, 17174, 17174, 4557, 198, 198, 9, 1635, 45255, 1398, 5797, 290, 5412, 13269, 198, 220, 1181, 62, 961, 62, 15526, 13, 628, 220, 1255, 796, 28932, 25216, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 17151, 62, 50, 10526, 25216, 198, 437, 24396, 13, 628, 198, 24396, 17151, 62, 25216, 13, 198, 8162, 19499, 26761, 7769, 2713, 486, 198, 220, 220, 220, 220, 366, 8024, 15731, 16724, 198, 220, 220, 220, 220, 366, 8620, 327, 55, 62, 2640, 62, 9864, 23680, 62, 11929, 62, 37, 15919, 198, 17174, 17174, 4557, 198, 9, 32039, 220, 220, 220, 220, 220, 220, 220, 1058, 3497, 3460, 4163, 41876, 198, 9, 198, 9, 10628, 220, 220, 220, 220, 220, 220, 220, 1058, 362, 13, 15, 198, 9, 198, 9, 3771, 31448, 220, 220, 1058, 532, 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,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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 ]
CLASS ltcl_syntax_cases DEFINITION DEFERRED. CLASS zcl_timem_syntax_highlighter DEFINITION LOCAL FRIENDS ltcl_syntax_cases. *----------------------------------------------------------------------* * CLASS ltcl_syntax_cases definition *----------------------------------------------------------------------* CLASS ltcl_syntax_cases DEFINITION FINAL FOR TESTING RISK LEVEL HARMLESS DURATION SHORT. PRIVATE SECTION. DATA: mt_after_parse TYPE zcl_timem_syntax_highlighter=>ty_match_tt, mt_after_order TYPE zcl_timem_syntax_highlighter=>ty_match_tt, mt_after_extend TYPE zcl_timem_syntax_highlighter=>ty_match_tt, ms_match TYPE zcl_timem_syntax_highlighter=>ty_match. METHODS: do_test IMPORTING iv_line TYPE string iv_filename TYPE string, test_abap_01 FOR TESTING, test_abap_02 FOR TESTING, test_abap_03 FOR TESTING, test_abap_04 FOR TESTING, test_abap_05 FOR TESTING, test_abap_06 FOR TESTING, test_abap_07 FOR TESTING, test_abap_08 FOR TESTING, test_xml_01 FOR TESTING, test_xml_02 FOR TESTING, test_xml_03 FOR TESTING, test_xml_04 FOR TESTING, test_xml_05 FOR TESTING, test_xml_06 FOR TESTING, test_xml_07 FOR TESTING, test_xml_08 FOR TESTING. ENDCLASS. *----------------------------------------------------------------------* * CLASS ltcl_syntax_cases IMPLEMENTATION *----------------------------------------------------------------------* CLASS ltcl_syntax_cases IMPLEMENTATION. DEFINE _generate_parse. ms_match-token = &1. ms_match-offset = &2. ms_match-length = &3. APPEND ms_match TO mt_after_parse. END-OF-DEFINITION. DEFINE _generate_order. ms_match-token = &1. ms_match-offset = &2. ms_match-length = &3. ms_match-text_tag = &4. APPEND ms_match TO mt_after_order. END-OF-DEFINITION. DEFINE _generate_extend. ms_match-token = &1. ms_match-offset = &2. ms_match-length = &3. ms_match-text_tag = &4. APPEND ms_match TO mt_after_extend. END-OF-DEFINITION. METHOD do_test. DATA: lt_matches_act TYPE zcl_timem_syntax_highlighter=>ty_match_tt, lo_syntax TYPE REF TO zcl_timem_syntax_highlighter. lo_syntax = zcl_timem_syntax_highlighter=>create( iv_filename ). lt_matches_act = lo_syntax->parse_line( iv_line ). SORT lt_matches_act BY offset. cl_abap_unit_assert=>assert_equals( exp = mt_after_parse act = lt_matches_act msg = | Error during parsing: { iv_line }| ). lo_syntax->order_matches( EXPORTING iv_line = iv_line CHANGING ct_matches = lt_matches_act ). cl_abap_unit_assert=>assert_equals( exp = mt_after_order act = lt_matches_act msg = | Error during ordering: { iv_line }| ). lo_syntax->extend_matches( EXPORTING iv_line = iv_line CHANGING ct_matches = lt_matches_act ). cl_abap_unit_assert=>assert_equals( exp = mt_after_extend act = lt_matches_act msg = | Error during extending: { iv_line }| ). ENDMETHOD. ****************************************************** * Test parsing and ordering of comments * ****************************************************** METHOD test_abap_01. DATA lv_line TYPE string. lv_line = '* commented out line with key word data'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'C' 0 1. _generate_parse 'K' 12 3. _generate_parse 'K' 16 4. _generate_parse 'K' 21 4. _generate_parse 'K' 26 3. _generate_parse 'K' 30 4. _generate_parse 'K' 35 4. " Generate table with expected values after ordering _generate_order 'C' 0 39 ''. " Generate table with expected values after ordering _generate_extend 'C' 0 39 ''. do_test( iv_line = lv_line iv_filename = '*.abap' ). ENDMETHOD. ****************************************************** * Test parsing and ordering of remainder of string * ****************************************************** METHOD test_abap_02. DATA lv_line TYPE string. lv_line = 'data: lv_var_name type string.'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'K' 0 4. _generate_parse 'K' 18 4. " Generate table with expected values after ordering _generate_order 'K' 0 4 ''. _generate_order 'K' 18 4 ''. " Generate table with expected values after extending _generate_extend 'K' 0 4 ''. _generate_extend '.' 4 14 ''. _generate_extend 'K' 18 4 ''. _generate_extend '.' 22 8 ''. do_test( iv_line = lv_line iv_filename = '*.abap' ). ENDMETHOD. ****************************************************** * Test parsing and ordering of key words & texts * ****************************************************** METHOD test_abap_03. DATA lv_line TYPE string. lv_line = 'call function ''FM_NAME''. " Commented'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'K' 0 4. _generate_parse 'K' 5 8. _generate_parse 'T' 14 1. _generate_parse 'T' 22 1. _generate_parse 'C' 25 1. " Generate table with expected values after ordering _generate_order 'K' 0 4 ''. _generate_order 'K' 5 8 ''. _generate_order 'T' 14 9 ''''. _generate_order 'C' 25 11 ''. " Generate table with expected values after extending _generate_extend 'K' 0 4 ''. _generate_extend '.' 4 1 ''. _generate_extend 'K' 5 8 ''. _generate_extend '.' 13 1 ''. _generate_extend 'T' 14 9 ''''. _generate_extend '.' 23 2 ''. _generate_extend 'C' 25 11 ''. do_test( iv_line = lv_line iv_filename = '*.abap' ). ENDMETHOD. ****************************************************** * Test parsing and ordering of key words in texts * ****************************************************** METHOD test_abap_04. DATA lv_line TYPE string. lv_line = 'constants: lc_var type string value ''simpletext data simpletext''.'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'K' 0 9. _generate_parse 'K' 18 4. _generate_parse 'K' 30 5. _generate_parse 'T' 36 1. _generate_parse 'K' 48 4. _generate_parse 'T' 63 1. " Generate table with expected values after ordering _generate_order 'K' 0 9 ''. _generate_order 'K' 18 4 ''. _generate_order 'K' 30 5 ''. _generate_order 'T' 36 28 ''''. " Generate table with expected values after ordering _generate_extend 'K' 0 9 ''. _generate_extend '.' 9 9 ''. _generate_extend 'K' 18 4 ''. _generate_extend '.' 22 8 ''. _generate_extend 'K' 30 5 ''. _generate_extend '.' 35 1 ''. _generate_extend 'T' 36 28 ''''. _generate_extend '.' 64 1 ''. do_test( iv_line = lv_line iv_filename = '*.abap' ). ENDMETHOD. ****************************************************** * Test parsing and ordering texts in curly brackets * ****************************************************** METHOD test_abap_05. DATA lv_line TYPE string. lv_line = 'a = |{ b }={ c }|.'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'T' 4 1. _generate_parse 'T' 5 1. _generate_parse 'T' 9 1. _generate_parse 'T' 11 1. _generate_parse 'K' 13 1. _generate_parse 'T' 15 1. _generate_parse 'T' 16 1. " Generate table with expected values after ordering _generate_order 'T' 4 1 '|'. _generate_order 'T' 10 1 '}'. _generate_order 'K' 13 1 ''. _generate_order 'T' 16 1 '}'. " Generate table with expected values after extending _generate_extend '.' 0 4 ''. _generate_extend 'T' 4 1 '|'. _generate_extend '.' 5 5 ''. _generate_extend 'T' 10 1 '}'. _generate_extend '.' 11 2 ''. _generate_extend 'K' 13 1 ''. _generate_extend '.' 14 2 ''. _generate_extend 'T' 16 1 '}'. _generate_extend '.' 17 1 ''. do_test( iv_line = lv_line iv_filename = '*.abap' ). ENDMETHOD. ****************************************************** * Test parsing and ordering of texts * ****************************************************** METHOD test_abap_06. DATA lv_line TYPE string. lv_line = 'lv_line = lc_constant && |XYZ { ''ab'' && |ac{ ''UU'' }| }|'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'K' 22 2. _generate_parse 'T' 25 1. _generate_parse 'T' 30 1. _generate_parse 'T' 32 1. _generate_parse 'T' 35 1. _generate_parse 'K' 37 2. _generate_parse 'T' 40 1. _generate_parse 'T' 43 1. _generate_parse 'T' 45 1. _generate_parse 'T' 48 1. _generate_parse 'T' 50 1. _generate_parse 'T' 51 1. _generate_parse 'T' 53 1. _generate_parse 'T' 54 1. " Generate table with expected values after ordering _generate_order 'K' 22 2 ''. _generate_order 'T' 25 5 '|'. _generate_order 'T' 32 4 ''''. _generate_order 'K' 37 2 ''. _generate_order 'T' 40 3 '|'. _generate_order 'T' 45 4 ''''. _generate_order 'T' 51 1 '}'. _generate_order 'T' 54 1 '}'. " Generate table with expected values after extending _generate_extend '.' 00 22 ''. _generate_extend 'K' 22 2 ''. _generate_extend '.' 24 1 ''. _generate_extend 'T' 25 5 '|'. _generate_extend '.' 30 2 ''. _generate_extend 'T' 32 4 ''''. _generate_extend '.' 36 1 ''. _generate_extend 'K' 37 2 ''. _generate_extend '.' 39 1 ''. _generate_extend 'T' 40 3 '|'. _generate_extend '.' 43 2 ''. _generate_extend 'T' 45 4 ''''. _generate_extend '.' 49 2 ''. _generate_extend 'T' 51 1 '}'. _generate_extend '.' 52 2 ''. _generate_extend 'T' 54 1 '}'. do_test( iv_line = lv_line iv_filename = '*.abap' ). ENDMETHOD. ******************************************************** * Check that '*' in select statement is not a match * ******************************************************** METHOD test_abap_07. DATA lv_line TYPE string. lv_line = 'SELECT * FROM foo'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'K' 0 6. _generate_parse 'K' 9 4. " Generate table with expected values after ordering _generate_order 'K' 0 6 ''. _generate_order 'K' 9 4 ''. " Generate table with expected values after extending _generate_extend 'K' 0 6 ''. _generate_extend '.' 6 3 ''. _generate_extend 'K' 9 4 ''. _generate_extend '.' 13 4 ''. do_test( iv_line = lv_line iv_filename = '*.abap' ). ENDMETHOD. ******************************************************** * Test parsing and ordering of key words in structures * ******************************************************** METHOD test_abap_08. DATA lv_line TYPE string. lv_line = 'lv_length = <match>-length.'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'K' 13 5. _generate_parse 'K' 20 6. " Generate table with expected values after extending _generate_extend '.' 0 27 ''. do_test( iv_line = lv_line iv_filename = '*.abap' ). ENDMETHOD. ******************************************************** * Test parsing and ordering of tags in xml * ******************************************************** METHOD test_xml_01. DATA lv_line TYPE string. lv_line = '<tag>Text</tag>'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'X' 0 1. _generate_parse 'X' 4 1. _generate_parse 'X' 9 1. _generate_parse 'X' 14 1. " Generate table with expected values after ordering _generate_order 'X' 0 5 '<'. _generate_order 'X' 9 6 '<'. " Generate table with expected values after extending _generate_extend 'X' 0 5 '<'. _generate_extend '.' 5 4 ''. _generate_extend 'X' 9 6 '<'. do_test( iv_line = lv_line iv_filename = '*.xml' ). ENDMETHOD. METHOD test_xml_02. DATA lv_line TYPE string. lv_line = '<tag/>'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'X' 0 1. _generate_parse 'X' 5 1. " Generate table with expected values after ordering _generate_order 'X' 0 6 '<'. " Generate table with expected values after extending _generate_extend 'X' 0 6 '<'. do_test( iv_line = lv_line iv_filename = '*.xml' ). ENDMETHOD. METHOD test_xml_03. DATA lv_line TYPE string. lv_line = '<tag attribute="value"/>'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'X' 0 1. _generate_parse 'A' 4 10. _generate_parse 'V' 15 7. _generate_parse 'X' 23 1. " Generate table with expected values after ordering _generate_order 'X' 0 4 '<'. _generate_order 'A' 4 10 ''. _generate_order 'V' 15 7 ''. _generate_order 'X' 22 2 '>'. " Generate table with expected values after extending _generate_extend 'X' 0 4 '<'. _generate_extend 'A' 4 10 ''. _generate_extend '.' 14 1 ''. _generate_extend 'V' 15 7 ''. _generate_extend 'X' 22 2 '>'. do_test( iv_line = lv_line iv_filename = '*.xml' ). ENDMETHOD. METHOD test_xml_04. DATA lv_line TYPE string. lv_line = '<?xml version="1.0"?>'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'X' 0 1. _generate_parse 'A' 5 8. _generate_parse 'V' 14 5. _generate_parse 'X' 20 1. " Generate table with expected values after ordering _generate_order 'X' 0 5 '<'. _generate_order 'A' 5 8 ''. _generate_order 'V' 14 5 ''. _generate_order 'X' 19 2 '>'. " Generate table with expected values after extending _generate_extend 'X' 0 5 '<'. _generate_extend 'A' 5 8 ''. _generate_extend '.' 13 1 ''. _generate_extend 'V' 14 5 ''. _generate_extend 'X' 19 2 '>'. do_test( iv_line = lv_line iv_filename = '*.xml' ). ENDMETHOD. METHOD test_xml_05. DATA lv_line TYPE string. lv_line = '<ns:tag ns:a1="v1" ns:a2=''v2''>"text"</ns:tag>'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'X' 0 1. _generate_parse 'A' 7 6. _generate_parse 'V' 14 4. _generate_parse 'A' 18 6. _generate_parse 'V' 25 4. _generate_parse 'X' 29 1. _generate_parse 'V' 30 6. _generate_parse 'X' 36 1. _generate_parse 'X' 44 1. " Generate table with expected values after ordering _generate_order 'X' 0 7 '<'. _generate_order 'A' 7 6 ''. _generate_order 'V' 14 4 ''. _generate_order 'A' 18 6 ''. _generate_order 'V' 25 4 ''. _generate_order 'X' 29 1 '>'. _generate_order 'X' 36 9 '<'. " Generate table with expected values after extending _generate_extend 'X' 0 7 '<'. _generate_extend 'A' 7 6 ''. _generate_extend '.' 13 1 ''. _generate_extend 'V' 14 4 ''. _generate_extend 'A' 18 6 ''. _generate_extend '.' 24 1 ''. _generate_extend 'V' 25 4 ''. _generate_extend 'X' 29 1 '>'. _generate_extend '.' 30 6 ''. _generate_extend 'X' 36 9 '<'. do_test( iv_line = lv_line iv_filename = '*.xml' ). ENDMETHOD. METHOD test_xml_06. DATA lv_line TYPE string. "unclosed tag lv_line = '<ns:tag ns:a1="v1"'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'X' 0 1. _generate_parse 'A' 7 6. _generate_parse 'V' 14 4. " Generate table with expected values after ordering _generate_order 'X' 0 7 '<'. _generate_order 'A' 7 6 ''. _generate_order 'V' 14 4 ''. " Generate table with expected values after extending _generate_extend 'X' 0 7 '<'. _generate_extend 'A' 7 6 ''. _generate_extend '.' 13 1 ''. _generate_extend 'V' 14 4 ''. do_test( iv_line = lv_line iv_filename = '*.xml' ). ENDMETHOD. METHOD test_xml_07. "invalid XML characters in a string DATA lv_line TYPE string. "xml special characters in attribute lv_line = '<tag attribute=" '' > "/>'. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'X' 0 1. _generate_parse 'A' 4 10. _generate_parse 'V' 15 7. _generate_parse 'X' 23 1. " Generate table with expected values after ordering _generate_order 'X' 0 4 '<'. _generate_order 'A' 4 10 ''. _generate_order 'V' 15 7 ''. _generate_order 'X' 22 2 '>'. " Generate table with expected values after extending _generate_extend 'X' 0 4 '<'. _generate_extend 'A' 4 10 ''. _generate_extend '.' 14 1 ''. _generate_extend 'V' 15 7 ''. _generate_extend 'X' 22 2 '>'. do_test( iv_line = lv_line iv_filename = '*.xml' ). ENDMETHOD. METHOD test_xml_08. "invalid XML characters in a string DATA lv_line TYPE string. "attribute at beginning of line lv_line = 'attribute=''>" '''. "#EC NOTEXT " Generate table with expected values after parsing _generate_parse 'A' 0 9. _generate_parse 'V' 10 5. " Generate table with expected values after ordering _generate_order 'A' 0 9 ''. _generate_order 'V' 10 5 ''. " Generate table with expected values after extending _generate_extend 'A' 0 9 ''. _generate_extend '.' 9 1 ''. _generate_extend 'V' 10 5 ''. do_test( iv_line = lv_line iv_filename = '*.xml' ). ENDMETHOD. ENDCLASS. CLASS ltcl_syntax_basic_logic DEFINITION DEFERRED. CLASS zcl_timem_syntax_highlighter DEFINITION LOCAL FRIENDS ltcl_syntax_basic_logic. *----------------------------------------------------------------------* * CLASS ltcl_syntax_basic_logic DEFINITION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS ltcl_syntax_basic_logic DEFINITION FINAL FOR TESTING RISK LEVEL HARMLESS DURATION SHORT. PRIVATE SECTION. DATA mo_syntax_highlighter TYPE REF TO zcl_timem_syntax_highlighter. METHODS: setup, process_line FOR TESTING, format_line FOR TESTING, apply_style FOR TESTING. ENDCLASS. *----------------------------------------------------------------------* * CLASS ltcl_syntax_highlighter IMPLEMENTATION *----------------------------------------------------------------------* CLASS ltcl_syntax_basic_logic IMPLEMENTATION. METHOD setup. mo_syntax_highlighter = zcl_timem_syntax_highlighter=>create( '*.abap' ). ENDMETHOD. METHOD format_line. DATA: lv_line TYPE string, lv_line_act TYPE string, lv_line_exp TYPE string. lv_line = 'call function ''FM_NAME''. " Commented'. "#EC NOTEXT lv_line_exp = '<span class="keyword">call</span>' && "#EC NOTEXT ' <span class="keyword">function</span>' && "#EC NOTEXT ' <span class="text">&#39;FM_NAME&#39;</span>.' && "#EC NOTEXT ' <span class="comment">&quot; Commented</span>'. "#EC NOTEXT lv_line_act = mo_syntax_highlighter->process_line( lv_line ). cl_abap_unit_assert=>assert_equals( exp = lv_line_exp act = lv_line_act msg = | Error during formating: { lv_line }| ). ENDMETHOD. METHOD apply_style. DATA lv_line_act TYPE string. " Call the method and compare results lv_line_act = mo_syntax_highlighter->apply_style( iv_line = 'CALL FUNCTION' "#EC NOTEXT iv_class = zcl_timem_syntax_abap=>c_css-keyword ). cl_abap_unit_assert=>assert_equals( act = lv_line_act exp = '<span class="keyword">CALL FUNCTION</span>' "#EC NOTEXT msg = 'Failure during applying of style.' ). "#EC NOTEXT ENDMETHOD. METHOD process_line. DATA lv_line_act TYPE string. " Call the method with empty parameter and compare results lv_line_act = mo_syntax_highlighter->process_line( '' ). cl_abap_unit_assert=>assert_equals( act = lv_line_act exp = '' msg = 'Failure in method process_line.' ). "#EC NOTEXT " Call the method with non-empty line and compare results lv_line_act = mo_syntax_highlighter->process_line( '* CALL FUNCTION' ). "#EC NOTEXT cl_abap_unit_assert=>assert_equals( act = lv_line_act exp = '<span class="comment">* CALL FUNCTION</span>' "#EC NOTEXT msg = 'Failure in method process_line.' ). "#EC NOTEXT ENDMETHOD. ENDCLASS.
[ 31631, 300, 83, 565, 62, 1837, 41641, 62, 33964, 5550, 20032, 17941, 23449, 1137, 22083, 13, 198, 31631, 1976, 565, 62, 16514, 368, 62, 1837, 41641, 62, 8929, 75, 4799, 5550, 20032, 17941, 37347, 1847, 48167, 1677, 5258, 300, 83, 565, 62, 1837, 41641, 62, 33964, 13, 198, 198, 9, 10097, 23031, 9, 198, 9, 220, 220, 220, 220, 220, 220, 42715, 300, 83, 565, 62, 1837, 41641, 62, 33964, 6770, 198, 9, 10097, 23031, 9, 198, 31631, 300, 83, 565, 62, 1837, 41641, 62, 33964, 5550, 20032, 17941, 25261, 7473, 43001, 2751, 45698, 42, 49277, 43638, 5805, 7597, 198, 220, 220, 220, 360, 4261, 6234, 6006, 9863, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 42865, 25, 198, 220, 220, 220, 220, 220, 45079, 62, 8499, 62, 29572, 220, 41876, 1976, 565, 62, 16514, 368, 62, 1837, 41641, 62, 8929, 75, 4799, 14804, 774, 62, 15699, 62, 926, 11, 198, 220, 220, 220, 220, 220, 45079, 62, 8499, 62, 2875, 220, 41876, 1976, 565, 62, 16514, 368, 62, 1837, 41641, 62, 8929, 75, 4799, 14804, 774, 62, 15699, 62, 926, 11, 198, 220, 220, 220, 220, 220, 45079, 62, 8499, 62, 2302, 437, 41876, 1976, 565, 62, 16514, 368, 62, 1837, 41641, 62, 8929, 75, 4799, 14804, 774, 62, 15699, 62, 926, 11, 198, 220, 220, 220, 220, 220, 13845, 62, 15699, 220, 220, 220, 220, 220, 220, 220, 41876, 1976, 565, 62, 16514, 368, 62, 1837, 41641, 62, 8929, 75, 4799, 14804, 774, 62, 15699, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 466, 62, 9288, 30023, 9863, 2751, 21628, 62, 1370, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 34345, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 397, 499, 62, 486, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 397, 499, 62, 2999, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 397, 499, 62, 3070, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 397, 499, 62, 3023, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 397, 499, 62, 2713, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 397, 499, 62, 3312, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 397, 499, 62, 2998, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 397, 499, 62, 2919, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 19875, 62, 486, 220, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 19875, 62, 2999, 220, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 19875, 62, 3070, 220, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 19875, 62, 3023, 220, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 19875, 62, 2713, 220, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 19875, 62, 3312, 220, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 19875, 62, 2998, 220, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 1332, 62, 19875, 62, 2919, 220, 7473, 43001, 2751, 13, 198, 198, 10619, 31631, 13, 198, 9, 10097, 23031, 9, 198, 9, 220, 220, 220, 220, 220, 220, 42715, 300, 83, 565, 62, 1837, 41641, 62, 33964, 30023, 2538, 10979, 6234, 198, 9, 10097, 23031, 9, 198, 31631, 300, 83, 565, 62, 1837, 41641, 62, 33964, 30023, 2538, 10979, 6234, 13, 628, 220, 23449, 8881, 4808, 8612, 378, 62, 29572, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 30001, 220, 220, 220, 796, 1222, 16, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 28968, 220, 220, 796, 1222, 17, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 13664, 220, 220, 796, 1222, 18, 13, 198, 220, 220, 220, 43504, 10619, 13845, 62, 15699, 5390, 45079, 62, 8499, 62, 29572, 13, 198, 220, 23578, 12, 19238, 12, 7206, 20032, 17941, 13, 628, 220, 23449, 8881, 4808, 8612, 378, 62, 2875, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 30001, 220, 220, 220, 796, 1222, 16, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 28968, 220, 220, 796, 1222, 17, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 13664, 220, 220, 796, 1222, 18, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 5239, 62, 12985, 796, 1222, 19, 13, 198, 220, 220, 220, 43504, 10619, 13845, 62, 15699, 5390, 45079, 62, 8499, 62, 2875, 13, 198, 220, 23578, 12, 19238, 12, 7206, 20032, 17941, 13, 628, 220, 23449, 8881, 4808, 8612, 378, 62, 2302, 437, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 30001, 220, 220, 220, 796, 1222, 16, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 28968, 220, 220, 796, 1222, 17, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 13664, 220, 220, 796, 1222, 18, 13, 198, 220, 220, 220, 13845, 62, 15699, 12, 5239, 62, 12985, 796, 1222, 19, 13, 198, 220, 220, 220, 43504, 10619, 13845, 62, 15699, 5390, 45079, 62, 8499, 62, 2302, 437, 13, 198, 220, 23578, 12, 19238, 12, 7206, 20032, 17941, 13, 628, 220, 337, 36252, 466, 62, 9288, 13, 628, 220, 220, 220, 42865, 25, 300, 83, 62, 6759, 2052, 62, 529, 41876, 1976, 565, 62, 16514, 368, 62, 1837, 41641, 62, 8929, 75, 4799, 14804, 774, 62, 15699, 62, 926, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2376, 62, 1837, 41641, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 16514, 368, 62, 1837, 41641, 62, 8929, 75, 4799, 13, 628, 198, 220, 220, 220, 2376, 62, 1837, 41641, 796, 1976, 565, 62, 16514, 368, 62, 1837, 41641, 62, 8929, 75,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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 ]
REPORT ztttt_demo_05. " Display repository tree of selected objects DATA application TYPE REF TO zcl_tttt_demo_application_05. TYPES: BEGIN OF _selopt_helper, objtyp TYPE trobjtype, objnam TYPE trobj_name, subcmp TYPE seosconame, exposure TYPE seoexpose, END OF _selopt_helper. DATA selopt_helper TYPE _selopt_helper. *SELECT-OPTIONS s_objtyp FOR selopt_helper-objtyp DEFAULT 'CLAS' OBLIGATORY. *SELECT-OPTIONS s_objnam FOR selopt_helper-objnam DEFAULT 'CL_GUI_ALV_GRID'. *SELECT-OPTIONS s_subcmp FOR selopt_helper-subcmp. *SELECT-OPTIONS s_clexpo FOR selopt_helper-exposure. * START-OF-SELECTION. CALL SCREEN 100. *&---------------------------------------------------------------------* *& Module STATUS_0100 OUTPUT *&---------------------------------------------------------------------* MODULE status_0100 OUTPUT. SET PF-STATUS '100'. SET TITLEBAR '100'. CLEAR sy-ucomm. PERFORM init. ENDMODULE. *&---------------------------------------------------------------------* *& Module USER_COMMAND_0100 INPUT *&---------------------------------------------------------------------* MODULE user_command_0100 INPUT. CASE sy-ucomm. WHEN 'BACK' OR 'HOME' OR 'CANCEL'. SET SCREEN 0. LEAVE SCREEN. ENDCASE. ENDMODULE. FORM init. CHECK application IS INITIAL. DATA(main_container) = NEW cl_gui_custom_container( container_name = 'CC' dynnr = '0100' repid = sy-repid ). DATA(main_splitter) = NEW cl_gui_splitter_container( parent = main_container rows = 1 columns = 2 ). main_splitter->set_column_width( id = 1 width = 30 ). application = NEW #( ). application->start( tree_container = main_splitter->get_container( row = 1 column = 1 ) data_container = main_splitter->get_container( row = 1 column = 2 ) ). ENDFORM.
[ 2200, 15490, 1976, 926, 926, 62, 9536, 78, 62, 2713, 13, 198, 198, 1, 16531, 16099, 5509, 286, 6163, 5563, 198, 198, 26947, 3586, 41876, 4526, 37, 5390, 1976, 565, 62, 926, 926, 62, 9536, 78, 62, 31438, 62, 2713, 13, 198, 9936, 47, 1546, 25, 198, 220, 347, 43312, 3963, 4808, 741, 8738, 62, 2978, 525, 11, 198, 220, 220, 220, 26181, 28004, 220, 220, 41876, 4161, 50007, 4906, 11, 198, 220, 220, 220, 26181, 7402, 220, 220, 41876, 4161, 50007, 62, 3672, 11, 198, 220, 220, 220, 850, 48991, 220, 220, 41876, 384, 418, 1102, 480, 11, 198, 220, 220, 220, 7111, 41876, 384, 78, 1069, 3455, 11, 198, 220, 23578, 3963, 4808, 741, 8738, 62, 2978, 525, 13, 198, 26947, 384, 75, 8738, 62, 2978, 525, 41876, 4808, 741, 8738, 62, 2978, 525, 13, 198, 198, 9, 46506, 12, 3185, 51, 11053, 264, 62, 26801, 28004, 7473, 384, 75, 8738, 62, 2978, 525, 12, 26801, 28004, 5550, 38865, 705, 5097, 1921, 6, 440, 9148, 3528, 1404, 15513, 13, 198, 9, 46506, 12, 3185, 51, 11053, 264, 62, 26801, 7402, 7473, 384, 75, 8738, 62, 2978, 525, 12, 26801, 7402, 5550, 38865, 705, 5097, 62, 40156, 62, 1847, 53, 62, 10761, 2389, 4458, 198, 9, 46506, 12, 3185, 51, 11053, 264, 62, 7266, 48991, 7473, 384, 75, 8738, 62, 2978, 525, 12, 7266, 48991, 13, 198, 9, 46506, 12, 3185, 51, 11053, 264, 62, 2375, 87, 7501, 7473, 384, 75, 8738, 62, 2978, 525, 12, 1069, 26205, 13, 198, 9, 198, 198, 2257, 7227, 12, 19238, 12, 46506, 2849, 13, 198, 220, 42815, 6374, 2200, 1677, 1802, 13, 198, 198, 9, 5, 10097, 30934, 9, 198, 9, 5, 220, 220, 220, 220, 220, 19937, 220, 15486, 2937, 62, 39103, 220, 16289, 30076, 198, 9, 5, 10097, 30934, 9, 198, 33365, 24212, 3722, 62, 39103, 16289, 30076, 13, 628, 220, 25823, 28223, 12, 35744, 2937, 705, 3064, 4458, 198, 220, 25823, 37977, 2538, 33, 1503, 705, 3064, 4458, 198, 220, 30301, 1503, 827, 12, 84, 9503, 13, 628, 220, 19878, 21389, 2315, 13, 198, 198, 10619, 33365, 24212, 13, 198, 198, 9, 5, 10097, 30934, 9, 198, 9, 5, 220, 220, 220, 220, 220, 19937, 220, 1294, 1137, 62, 9858, 44, 6981, 62, 39103, 220, 3268, 30076, 198, 9, 5, 10097, 30934, 9, 198, 33365, 24212, 2836, 62, 21812, 62, 39103, 3268, 30076, 13, 628, 220, 42001, 827, 12, 84, 9503, 13, 198, 220, 220, 220, 42099, 705, 31098, 6, 198, 220, 220, 220, 220, 220, 6375, 705, 39069, 6, 198, 220, 220, 220, 220, 220, 6375, 705, 34, 20940, 3698, 4458, 198, 220, 220, 220, 220, 220, 25823, 6374, 2200, 1677, 657, 13, 198, 220, 220, 220, 220, 220, 12509, 32, 6089, 6374, 2200, 1677, 13, 198, 220, 23578, 34, 11159, 13, 198, 198, 10619, 33365, 24212, 13, 198, 198, 21389, 2315, 13, 628, 220, 5870, 25171, 3586, 3180, 3268, 2043, 12576, 13, 628, 220, 42865, 7, 12417, 62, 34924, 8, 796, 12682, 537, 62, 48317, 62, 23144, 62, 34924, 7, 9290, 62, 3672, 796, 705, 4093, 6, 37860, 48624, 796, 705, 39103, 6, 1128, 312, 796, 827, 12, 7856, 312, 6739, 198, 220, 42865, 7, 12417, 62, 22018, 1967, 8, 220, 796, 12682, 537, 62, 48317, 62, 22018, 1967, 62, 34924, 7, 198, 220, 220, 220, 2560, 220, 796, 1388, 62, 34924, 198, 220, 220, 220, 15274, 220, 220, 220, 796, 352, 198, 220, 220, 220, 15180, 796, 362, 6739, 628, 220, 1388, 62, 22018, 1967, 3784, 2617, 62, 28665, 62, 10394, 7, 198, 220, 220, 220, 220, 220, 4686, 220, 220, 220, 796, 352, 198, 220, 220, 220, 220, 220, 9647, 796, 1542, 6739, 628, 220, 3586, 796, 12682, 1303, 7, 6739, 198, 220, 3586, 3784, 9688, 7, 198, 220, 220, 220, 5509, 62, 34924, 796, 1388, 62, 22018, 1967, 3784, 1136, 62, 34924, 7, 5752, 796, 352, 5721, 796, 352, 1267, 198, 220, 220, 220, 1366, 62, 34924, 796, 1388, 62, 22018, 1967, 3784, 1136, 62, 34924, 7, 5752, 796, 352, 5721, 796, 362, 1267, 6739, 628, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
class ltc_thread_pool_executor definition final for testing duration short risk level harmless inheriting from zcl_assert. public section. interfaces zif_thread_callback. private section. data: o_cut type ref to zif_executor_service, v_calledback type i. methods: setup, it_submits_runnables for testing, it_invokes_all_and_waits for testing, it_shutsdown for testing, it_returns_futures for testing. endclass. class ltc_thread_pool_executor implementation. method setup. v_calledback = 0. o_cut = new zcl_thread_pool_executor( iv_pool_size = 3 io_callback = me ). endmethod. method zif_thread_callback~on_result. v_calledback = v_calledback + 1. endmethod. method zif_thread_callback~on_error. v_calledback = v_calledback + 1. endmethod. method it_submits_runnables. data(lo_dummy) = new zcl_runnable_dummy( ). o_cut->submit( lo_dummy ). wait up to '0.2' seconds. assert_equals( exp = 1 act = v_calledback msg = 'Should have executed the runnable in a new Thread' ). endmethod. method it_invokes_all_and_waits. data(lt_runnables) = value zif_executor_service=>tty_runnables( ). do 30 times. append new zcl_runnable_dummy( ) to lt_runnables. enddo. o_cut->invoke_all( lt_runnables ). o_cut->invoke_all( lt_runnables ). o_cut->await_termination( ). assert_equals( exp = 60 act = v_calledback ). endmethod. method it_shutsdown. data(lo_dummy) = new zcl_runnable_dummy( ). o_cut->submit( lo_dummy ). wait up to '0.2' seconds. assert_equals( exp = 1 act = v_calledback msg = 'Should have executed the runnable in a new Thread' ). o_cut->shutdown( ). try. o_cut->submit( lo_dummy ). catch zcx_rejected_execution into data(lo_submit_failure). assert_bound( lo_submit_failure ). endtry. assert_bound( lo_submit_failure ). try. o_cut->invoke_all( value #( ( lo_dummy ) ) ). catch zcx_rejected_execution into data(lo_invoke_failure). assert_bound( lo_invoke_failure ). endtry. assert_bound( lo_invoke_failure ). endmethod. method it_returns_futures. data(lo_dummy) = new zcl_runnable_dummy( ). "submit data(lo_future) = o_cut->submit( lo_dummy ). assert_bound( lo_future ). assert_true( cast zcl_runnable_dummy( lo_future->get( ) )->was_run_called( ) ). "invoke_all data(lt_futures) = o_cut->invoke_all( value #( ( lo_dummy ) ( lo_dummy ) ) ). loop at lt_futures into lo_future. assert_true( cast zcl_runnable_dummy( lo_future->get( ) )->was_run_called( ) ). endloop. endmethod. endclass.
[ 4871, 300, 23047, 62, 16663, 62, 7742, 62, 18558, 38409, 6770, 2457, 329, 4856, 198, 220, 9478, 1790, 198, 220, 2526, 1241, 23585, 198, 220, 10639, 1780, 422, 1976, 565, 62, 30493, 13, 628, 220, 1171, 2665, 13, 198, 220, 220, 220, 20314, 1976, 361, 62, 16663, 62, 47423, 13, 198, 220, 2839, 2665, 13, 198, 220, 220, 220, 1366, 25, 198, 220, 220, 220, 220, 220, 267, 62, 8968, 220, 220, 220, 220, 220, 220, 220, 2099, 1006, 284, 1976, 361, 62, 18558, 38409, 62, 15271, 11, 198, 220, 220, 220, 220, 220, 410, 62, 7174, 1891, 2099, 1312, 13, 198, 220, 220, 220, 5050, 25, 198, 220, 220, 220, 220, 220, 9058, 11, 198, 220, 220, 220, 220, 220, 340, 62, 7266, 24883, 62, 5143, 77, 2977, 329, 4856, 11, 198, 220, 220, 220, 220, 220, 340, 62, 16340, 3369, 62, 439, 62, 392, 62, 10247, 896, 329, 4856, 11, 198, 220, 220, 220, 220, 220, 340, 62, 1477, 5500, 2902, 329, 4856, 11, 198, 220, 220, 220, 220, 220, 340, 62, 7783, 82, 62, 69, 315, 942, 329, 4856, 13, 198, 437, 4871, 13, 628, 198, 4871, 300, 23047, 62, 16663, 62, 7742, 62, 18558, 38409, 7822, 13, 628, 198, 220, 2446, 9058, 13, 198, 220, 220, 220, 410, 62, 7174, 1891, 796, 657, 13, 198, 220, 220, 220, 267, 62, 8968, 796, 649, 1976, 565, 62, 16663, 62, 7742, 62, 18558, 38409, 7, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 7742, 62, 7857, 796, 513, 198, 220, 220, 220, 220, 220, 220, 220, 33245, 62, 47423, 796, 502, 6739, 198, 220, 886, 24396, 13, 628, 220, 2446, 1976, 361, 62, 16663, 62, 47423, 93, 261, 62, 20274, 13, 198, 220, 220, 220, 220, 410, 62, 7174, 1891, 796, 410, 62, 7174, 1891, 1343, 352, 13, 198, 220, 886, 24396, 13, 628, 220, 2446, 1976, 361, 62, 16663, 62, 47423, 93, 261, 62, 18224, 13, 198, 220, 220, 220, 410, 62, 7174, 1891, 796, 410, 62, 7174, 1891, 1343, 352, 13, 198, 220, 886, 24396, 13, 628, 198, 220, 2446, 340, 62, 7266, 24883, 62, 5143, 77, 2977, 13, 628, 220, 220, 220, 1366, 7, 5439, 62, 67, 13513, 8, 796, 649, 1976, 565, 62, 5143, 77, 540, 62, 67, 13513, 7, 6739, 198, 220, 220, 220, 267, 62, 8968, 3784, 46002, 7, 2376, 62, 67, 13513, 6739, 198, 220, 220, 220, 4043, 510, 284, 705, 15, 13, 17, 6, 4201, 13, 628, 220, 220, 220, 6818, 62, 4853, 874, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1033, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 719, 796, 410, 62, 7174, 1891, 198, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 705, 19926, 423, 10945, 262, 1057, 77, 540, 287, 257, 649, 14122, 6, 198, 220, 220, 220, 6739, 628, 198, 220, 886, 24396, 13, 628, 220, 2446, 340, 62, 16340, 3369, 62, 439, 62, 392, 62, 10247, 896, 13, 628, 220, 220, 220, 1366, 7, 2528, 62, 5143, 77, 2977, 8, 796, 1988, 1976, 361, 62, 18558, 38409, 62, 15271, 14804, 42852, 62, 5143, 77, 2977, 7, 220, 6739, 198, 220, 220, 220, 466, 1542, 1661, 13, 198, 220, 220, 220, 220, 220, 220, 220, 24443, 649, 1976, 565, 62, 5143, 77, 540, 62, 67, 13513, 7, 1267, 284, 300, 83, 62, 5143, 77, 2977, 13, 198, 220, 220, 220, 886, 4598, 13, 628, 220, 220, 220, 267, 62, 8968, 3784, 37669, 62, 439, 7, 300, 83, 62, 5143, 77, 2977, 6739, 198, 220, 220, 220, 267, 62, 8968, 3784, 37669, 62, 439, 7, 300, 83, 62, 5143, 77, 2977, 6739, 628, 220, 220, 220, 267, 62, 8968, 3784, 707, 4548, 62, 41382, 7, 220, 6739, 628, 220, 220, 220, 6818, 62, 4853, 874, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1033, 796, 3126, 198, 220, 220, 220, 220, 220, 220, 220, 719, 796, 410, 62, 7174, 1891, 198, 220, 220, 220, 6739, 628, 220, 886, 24396, 13, 628, 220, 2446, 340, 62, 1477, 5500, 2902, 13, 628, 220, 220, 220, 1366, 7, 5439, 62, 67, 13513, 8, 796, 649, 1976, 565, 62, 5143, 77, 540, 62, 67, 13513, 7, 6739, 198, 220, 220, 220, 267, 62, 8968, 3784, 46002, 7, 2376, 62, 67, 13513, 6739, 198, 220, 220, 220, 4043, 510, 284, 705, 15, 13, 17, 6, 4201, 13, 628, 220, 220, 220, 6818, 62, 4853, 874, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1033, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 719, 796, 410, 62, 7174, 1891, 198, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 705, 19926, 423, 10945, 262, 1057, 77, 540, 287, 257, 649, 14122, 6, 198, 220, 220, 220, 6739, 628, 198, 220, 220, 220, 267, 62, 8968, 3784, 49625, 2902, 7, 220, 6739, 628, 220, 220, 220, 1949, 13, 198, 220, 220, 220, 220, 220, 220, 220, 267, 62, 8968, 3784, 46002, 7, 2376, 62, 67, 13513, 6739, 198, 220, 220, 220, 4929, 1976, 66, 87, 62, 260, 35408, 62, 18558, 1009, 656, 1366, 7, 5439, 62, 46002, 62, 32165, 495, 737, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 62, 7784, 7, 2376, 62, 46002, 62, 32165, 495, 6739, 198, 220, 220, 220, 886, 28311, 13, 198, 220, 220, 220, 6818, 62, 7784, 7, 2376, 62, 46002, 62, 32165, 495, 6739, 628, 198, 220, 220, 220, 1949, 13, 198, 220, 220, 220, 220, 220, 220, 220, 267, 62, 8968, 3784, 37669, 62, 439, 7, 1988, 1303, 7, 357, 2376, 62, 67, 13513, 1267, 1267, 6739, 198, 220, 220, 220, 4929, 1976, 66, 87, 62, 260, 35408, 62, 18558, 1009, 656, 1366, 7, 5439, 62, 37669, 62, 32165, 495, 737, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 62, 7784, 7, 2376, 62, 37669, 62, 32165, 495, 6739, 198, 220, 220, 220, 886, 28311, 13, 198, 220, 220, 220, 6818, 62, 7784, 7, 2376, 62, 37669, 62, 32165, 495, 6739, 628, 198, 220, 886, 24396, 13, 628, 220, 2446, 340, 62, 7783, 82, 62, 69, 315, 942, 13, 628, 220, 220, 220, 220, 220, 1366, 7, 5439, 62, 67, 13513, 8, 796, 649, 1976, 565 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
CLASS zcl_abapgit_persist_packages DEFINITION PUBLIC CREATE PRIVATE . PUBLIC SECTION. TYPES: BEGIN OF ty_package, devclass TYPE scompkdtln-devclass, component TYPE scompkdtln-component, comp_posid TYPE scompkdtln-comp_posid, END OF ty_package . TYPES: ty_packages TYPE HASHED TABLE OF ty_package WITH UNIQUE KEY devclass . METHODS init . METHODS modify IMPORTING !iv_package TYPE scompkdtln-devclass !iv_component TYPE scompkdtln-component OPTIONAL !iv_comp_posid TYPE scompkdtln-comp_posid OPTIONAL RAISING zcx_abapgit_exception . METHODS read IMPORTING !iv_package TYPE scompkdtln-devclass RETURNING VALUE(rs_package) TYPE ty_package . CLASS-METHODS get_instance RETURNING VALUE(ro_persist) TYPE REF TO zcl_abapgit_persist_packages . PROTECTED SECTION. PRIVATE SECTION. CLASS-DATA go_persist TYPE REF TO zcl_abapgit_persist_packages. DATA mt_packages TYPE ty_packages. METHODS from_xml IMPORTING iv_xml TYPE string RETURNING VALUE(rt_packages) TYPE ty_packages RAISING zcx_abapgit_exception. METHODS to_xml IMPORTING it_packages TYPE ty_packages RETURNING VALUE(rv_xml) TYPE string RAISING zcx_abapgit_exception. ENDCLASS. CLASS zcl_abapgit_persist_packages IMPLEMENTATION. METHOD from_xml. DATA lo_input TYPE REF TO zif_abapgit_xml_input. lo_input = NEW zcl_abapgit_xml_input( iv_xml = iv_xml ). lo_input->read( EXPORTING iv_name = zcl_abapgit_persistence_db=>c_type_packages CHANGING cg_data = rt_packages ). ENDMETHOD. METHOD get_instance. IF go_persist IS NOT BOUND. go_persist = NEW #( ). ENDIF. ro_persist = go_persist. ENDMETHOD. METHOD init. TRY. " Might have changed in another session so always get latest mt_packages = from_xml( zcl_abapgit_persistence_db=>get_instance( )->read( iv_type = zcl_abapgit_persistence_db=>c_type_packages iv_value = '' ) ). CATCH zcx_abapgit_exception zcx_abapgit_not_found ##NO_HANDLER. ENDTRY. ENDMETHOD. METHOD modify. DATA ls_package LIKE LINE OF mt_packages. FIELD-SYMBOLS <ls_package> LIKE LINE OF mt_packages. init( ). IF iv_component IS INITIAL AND iv_comp_posid IS INITIAL. DELETE mt_packages WHERE devclass = iv_package. ELSE. READ TABLE mt_packages ASSIGNING <ls_package> WITH TABLE KEY devclass = iv_package. IF sy-subrc = 0. <ls_package>-component = iv_component. <ls_package>-comp_posid = iv_comp_posid. ELSE. ls_package-devclass = iv_package. ls_package-component = iv_component. ls_package-comp_posid = iv_comp_posid. INSERT ls_package INTO TABLE mt_packages. ENDIF. ENDIF. zcl_abapgit_persistence_db=>get_instance( )->modify( iv_type = zcl_abapgit_persistence_db=>c_type_packages iv_value = '' iv_data = to_xml( mt_packages ) ). COMMIT WORK AND WAIT. ENDMETHOD. METHOD read. init( ). READ TABLE mt_packages INTO rs_package WITH TABLE KEY devclass = iv_package. IF sy-subrc <> 0. rs_package-devclass = iv_package. " no component ENDIF. ENDMETHOD. METHOD to_xml. DATA li_output TYPE REF TO zif_abapgit_xml_output. li_output = NEW zcl_abapgit_xml_output( ). li_output->add( iv_name = zcl_abapgit_persistence_db=>c_type_packages ig_data = it_packages ). rv_xml = li_output->render( ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 19276, 396, 62, 43789, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 29244, 6158, 4810, 3824, 6158, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 1259, 62, 26495, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1614, 4871, 220, 220, 41876, 629, 3361, 74, 28664, 18755, 12, 7959, 4871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 7515, 220, 41876, 629, 3361, 74, 28664, 18755, 12, 42895, 11, 198, 220, 220, 220, 220, 220, 220, 220, 552, 62, 1930, 312, 41876, 629, 3361, 74, 28664, 18755, 12, 5589, 62, 1930, 312, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 26495, 764, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 1259, 62, 43789, 41876, 367, 11211, 1961, 43679, 3963, 1259, 62, 26495, 13315, 4725, 33866, 8924, 35374, 1614, 4871, 764, 628, 220, 220, 220, 337, 36252, 50, 2315, 764, 198, 220, 220, 220, 337, 36252, 50, 13096, 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, 629, 3361, 74, 28664, 18755, 12, 7959, 4871, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 42895, 220, 41876, 629, 3361, 74, 28664, 18755, 12, 42895, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 5589, 62, 1930, 312, 41876, 629, 3361, 74, 28664, 18755, 12, 5589, 62, 1930, 312, 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, 337, 36252, 50, 1100, 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, 41876, 629, 3361, 74, 28664, 18755, 12, 7959, 4871, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 3808, 62, 26495, 8, 41876, 1259, 62, 26495, 764, 198, 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, 305, 62, 19276, 396, 8, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 19276, 396, 62, 43789, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 42715, 12, 26947, 467, 62, 19276, 396, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 19276, 396, 62, 43789, 13, 198, 220, 220, 220, 42865, 45079, 62, 43789, 41876, 1259, 62, 43789, 13, 628, 220, 220, 220, 337, 36252, 50, 422, 62, 19875, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 19875, 220, 220, 220, 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, 17034, 62, 43789, 8, 41876, 1259, 62, 43789, 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, 284, 62, 19875, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 340, 62, 43789, 220, 220, 41876, 1259, 62, 43789, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 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, 1069, 4516, 13, 198, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 19276, 396, 62, 43789, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 422, 62, 19875, 13, 628, 220, 220, 220, 42865, 2376, 62, 15414, 41876, 4526, 37, 5390, 1976, 361, 62, 397, 499, 18300, 62, 19875, 62, 15414, 13, 628, 220, 220, 220, 2376, 62, 15414, 796, 12682, 1976, 565, 62, 397, 499, 18300, 62, 19875, 62, 15414, 7, 21628, 62, 19875, 796, 21628, 62, 19875, 6739, 628, 220, 220, 220, 2376, 62, 15414, 3784, 961, 7, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 3672, 796, 1976, 565, 62, 397, 499, 18300, 62, 19276, 13274, 62, 9945, 14804, 66, 62, 4906, 62, 43789, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 269, 70, 62, 7890, 796, 374, 83, 62, 43789, 6739, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 651, 62, 39098, 13, 628, 220, 220, 220, 16876, 467, 62, 19276, 396, 3180, 5626, 347, 15919, 13, 198, 220, 220, 220, 220, 220, 467, 62, 19276, 396, 796, 12682, 1303, 7, 6739, 198, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 686, 62, 19276, 396, 796, 467, 62, 19276, 396, 13, 628, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 2315, 13, 628, 220, 220, 220, 7579, 56, 13, 198, 220, 220, 220, 220, 220, 220, 220, 366, 24213, 423, 3421, 287, 1194, 6246, 523, 1464, 651, 3452, 198, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 43789, 796, 422, 62, 19875, 7, 1976, 565, 62, 397, 499, 18300, 62, 19276, 13274, 62, 9945, 14804, 1136, 62, 39098, 7, 1267, 3784, 961, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 4906, 220, 796, 1976, 565, 62, 397, 499, 18300, 62, 19276, 13274, 62, 9945, 14804, 66, 62, 4906, 62, 43789, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 8367, 796, 10148, 1267, 6739, 198, 220, 220, 220, 220, 220, 327, 11417, 1976, 66, 87, 62, 397 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
CLASS zcl_advent2020_day19_smb DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES zif_advent2020_smb . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_advent2020_day19_smb IMPLEMENTATION. METHOD zif_advent2020_smb~solve. output = 'todo'. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 324, 1151, 42334, 62, 820, 1129, 62, 82, 2022, 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, 82, 2022, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 324, 1151, 42334, 62, 820, 1129, 62, 82, 2022, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 324, 1151, 42334, 62, 82, 2022, 93, 82, 6442, 13, 628, 220, 220, 220, 5072, 796, 705, 83, 24313, 4458, 628, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
INTERFACE zif_abapgit_dot_abapgit PUBLIC. TYPES: BEGIN OF ty_requirement, component TYPE dlvunit, min_release TYPE saprelease, min_patch TYPE sappatchlv, END OF ty_requirement . TYPES: ty_requirement_tt TYPE STANDARD TABLE OF ty_requirement WITH DEFAULT KEY . TYPES: BEGIN OF ty_dot_abapgit, master_language TYPE spras, starting_folder TYPE string, folder_logic TYPE string, ignore TYPE STANDARD TABLE OF string WITH DEFAULT KEY, requirements TYPE ty_requirement_tt, END OF ty_dot_abapgit . CONSTANTS: BEGIN OF c_folder_logic, prefix TYPE string VALUE 'PREFIX', full TYPE string VALUE 'FULL', END OF c_folder_logic . ENDINTERFACE.
[ 41358, 49836, 1976, 361, 62, 397, 499, 18300, 62, 26518, 62, 397, 499, 18300, 44731, 13, 628, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 347, 43312, 3963, 1259, 62, 8897, 24615, 11, 198, 220, 220, 220, 220, 220, 7515, 220, 220, 41876, 288, 6780, 20850, 11, 198, 220, 220, 220, 220, 220, 949, 62, 20979, 41876, 473, 3866, 1274, 11, 198, 220, 220, 220, 220, 220, 949, 62, 17147, 220, 220, 41876, 473, 381, 963, 6780, 11, 198, 220, 220, 220, 23578, 3963, 1259, 62, 8897, 24615, 764, 198, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 1259, 62, 8897, 24615, 62, 926, 41876, 49053, 9795, 43679, 3963, 1259, 62, 8897, 24615, 13315, 5550, 38865, 35374, 764, 198, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 347, 43312, 3963, 1259, 62, 26518, 62, 397, 499, 18300, 11, 198, 220, 220, 220, 220, 220, 4958, 62, 16129, 41876, 7500, 292, 11, 198, 220, 220, 220, 220, 220, 3599, 62, 43551, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 9483, 62, 6404, 291, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 8856, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 49053, 9795, 43679, 3963, 4731, 13315, 5550, 38865, 35374, 11, 198, 220, 220, 220, 220, 220, 5359, 220, 220, 220, 41876, 1259, 62, 8897, 24615, 62, 926, 11, 198, 220, 220, 220, 23578, 3963, 1259, 62, 26518, 62, 397, 499, 18300, 764, 628, 220, 7102, 2257, 1565, 4694, 25, 198, 220, 220, 220, 347, 43312, 3963, 269, 62, 43551, 62, 6404, 291, 11, 198, 220, 220, 220, 220, 220, 21231, 41876, 4731, 26173, 8924, 705, 47, 31688, 10426, 3256, 198, 220, 220, 220, 220, 220, 1336, 220, 220, 41876, 4731, 26173, 8924, 705, 37, 9994, 3256, 198, 220, 220, 220, 23578, 3963, 269, 62, 43551, 62, 6404, 291, 764, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 zevolving_dp_iterator. " https://zevolving.com/2012/01/abap-objects-design-patterns-iterator/ * CLASS lcl_item DEFINITION. PUBLIC SECTION. METHODS: constructor IMPORTING iv_name TYPE string. DATA: v_name TYPE string READ-ONLY. ENDCLASS. "lcl_item DEFINITION * CLASS lcl_item IMPLEMENTATION. METHOD constructor. v_name = iv_name. ENDMETHOD. "constructor ENDCLASS. "lcl_item IMPLEMENTATION * INTERFACE if_collection DEFERRED. * INTERFACE if_iterator. METHODS: get_index RETURNING VALUE(index) TYPE i, has_next RETURNING VALUE(has_next) TYPE flag, get_next RETURNING VALUE(object) TYPE REF TO object, first RETURNING VALUE(object) TYPE REF TO object, set_step IMPORTING VALUE(iv_step) TYPE i. DATA: v_step TYPE i. DATA: v_current TYPE i. DATA: o_collection TYPE REF TO if_collection. ENDINTERFACE. "if_iterator IMPLEMENTATION * INTERFACE if_collection. METHODS: get_iterator RETURNING VALUE(iterator) TYPE REF TO if_iterator. METHODS: add IMPORTING element TYPE REF TO object, remove IMPORTING element TYPE REF TO object, clear, size RETURNING VALUE(size) TYPE i, is_empty RETURNING VALUE(empty) TYPE flag, get IMPORTING index TYPE i RETURNING VALUE(object) TYPE REF TO object. ENDINTERFACE. "if_collection IMPLEMENTATION * CLASS lcl_iterator DEFINITION. PUBLIC SECTION. INTERFACES: if_iterator. METHODS: constructor IMPORTING io_collection TYPE REF TO if_collection. ALIASES: get_index FOR if_iterator~get_index, has_next FOR if_iterator~has_next, get_next FOR if_iterator~get_next, first FOR if_iterator~first, set_step FOR if_iterator~set_step. PRIVATE SECTION. ALIASES: v_step FOR if_iterator~v_step, v_current FOR if_iterator~v_current, o_collection FOR if_iterator~o_collection. ENDCLASS. "lcl_iterator DEFINITION * CLASS lcl_collection DEFINITION. PUBLIC SECTION. INTERFACES: if_collection. DATA: i_items TYPE STANDARD TABLE OF REF TO object. ALIASES: get_iterator FOR if_collection~get_iterator, add FOR if_collection~add, remove FOR if_collection~remove, clear FOR if_collection~clear, size FOR if_collection~size, is_empty FOR if_collection~is_empty, get FOR if_collection~get. ENDCLASS. "lcl_collection DEFINITION * CLASS lcl_collection IMPLEMENTATION. METHOD if_collection~get_iterator. CREATE OBJECT iterator TYPE lcl_iterator EXPORTING io_collection = me. ENDMETHOD. "if_collection~get_iterator METHOD if_collection~add. APPEND element TO i_items. ENDMETHOD. "if_collection~add METHOD if_collection~remove. DELETE i_items WHERE table_line EQ element. ENDMETHOD. "if_collection~remove METHOD if_collection~clear. CLEAR: i_items. ENDMETHOD. "if_collection~clear METHOD if_collection~size. size = lines( i_items ). ENDMETHOD. "if_collection~size METHOD if_collection~is_empty. IF me->size( ) IS INITIAL. empty = 'X'. ENDIF. ENDMETHOD. "if_collection~is_empty METHOD if_collection~get. READ TABLE i_items INTO object INDEX index. ENDMETHOD. "if_collection~get ENDCLASS. "lcl_collection IMPLEMENTATION * CLASS lcl_iterator IMPLEMENTATION. METHOD constructor. o_collection = io_collection. v_step = 1. ENDMETHOD. "constructor METHOD if_iterator~first. v_current = 1. object = o_collection->get( v_current ). ENDMETHOD. "if_iterator~first METHOD if_iterator~get_next. v_current = v_current + v_step. object = o_collection->get( v_current ). ENDMETHOD. "if_iterator~next METHOD if_iterator~has_next. DATA obj TYPE REF TO object. DATA idx TYPE i. idx = v_current + v_step. obj = o_collection->get( idx ). IF obj IS BOUND. has_next = 'X'. ENDIF. ENDMETHOD. "if_iterator~isdone METHOD if_iterator~set_step. me->v_step = iv_step. ENDMETHOD. "if_iterator~SET_STEP METHOD if_iterator~get_index. index = index. ENDMETHOD. "if_iterator~get_index ENDCLASS. "iterator IMPLEMENTATION * CLASS lcl_main DEFINITION. PUBLIC SECTION. CLASS-METHODS: run. ENDCLASS. "lcl_main DEFINITION * CLASS lcl_main IMPLEMENTATION. METHOD run. * DATA: o_collection TYPE REF TO if_collection. DATA: o_iterator TYPE REF TO if_iterator. DATA: lo_item TYPE REF TO lcl_item. CREATE OBJECT o_collection TYPE lcl_collection. o_iterator = o_collection->get_iterator( ). CREATE OBJECT lo_item EXPORTING iv_name = 'Item1'. o_collection->add( lo_item ). CREATE OBJECT lo_item EXPORTING iv_name = 'Item2'. o_collection->add( lo_item ). CREATE OBJECT lo_item EXPORTING iv_name = 'Item3'. o_collection->add( lo_item ). CREATE OBJECT lo_item EXPORTING iv_name = 'Item4'. o_collection->add( lo_item ). CREATE OBJECT lo_item EXPORTING iv_name = 'Item5'. o_collection->add( lo_item ). "o_iterator->set_step( 2 ). WHILE o_iterator->has_next( ) IS NOT INITIAL. lo_item ?= o_iterator->get_next( ). WRITE: / lo_item->v_name. ENDWHILE. ENDMETHOD. "run ENDCLASS. "lcl_main IMPLEMENTATION START-OF-SELECTION. lcl_main=>run( ).
[ 2200, 15490, 1976, 1990, 10890, 62, 26059, 62, 48727, 13, 198, 198, 1, 3740, 1378, 89, 1990, 10890, 13, 785, 14, 6999, 14, 486, 14, 397, 499, 12, 48205, 12, 26124, 12, 33279, 82, 12, 48727, 14, 198, 198, 9, 198, 31631, 300, 565, 62, 9186, 5550, 20032, 17941, 13, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 23772, 30023, 9863, 2751, 21628, 62, 3672, 41876, 4731, 13, 198, 220, 220, 220, 42865, 25, 410, 62, 3672, 41876, 4731, 20832, 12, 1340, 11319, 13, 198, 10619, 31631, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 75, 565, 62, 9186, 5550, 20032, 17941, 198, 9, 198, 31631, 300, 565, 62, 9186, 30023, 2538, 10979, 6234, 13, 198, 220, 337, 36252, 23772, 13, 198, 220, 220, 220, 410, 62, 3672, 796, 21628, 62, 3672, 13, 198, 220, 23578, 49273, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 41571, 273, 198, 10619, 31631, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 75, 565, 62, 9186, 30023, 2538, 10979, 6234, 198, 9, 198, 41358, 49836, 611, 62, 43681, 23449, 1137, 22083, 13, 198, 9, 198, 41358, 49836, 611, 62, 48727, 13, 198, 220, 337, 36252, 50, 25, 651, 62, 9630, 30826, 4261, 15871, 26173, 8924, 7, 9630, 8, 41876, 1312, 11, 198, 220, 220, 220, 468, 62, 19545, 220, 30826, 4261, 15871, 26173, 8924, 7, 10134, 62, 19545, 8, 41876, 6056, 11, 198, 220, 220, 220, 651, 62, 19545, 220, 30826, 4261, 15871, 26173, 8924, 7, 15252, 8, 41876, 4526, 37, 5390, 2134, 11, 198, 220, 220, 220, 717, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 15252, 8, 41876, 4526, 37, 5390, 2134, 11, 198, 220, 220, 220, 900, 62, 9662, 220, 30023, 9863, 2751, 26173, 8924, 7, 452, 62, 9662, 8, 41876, 1312, 13, 198, 220, 42865, 25, 410, 62, 9662, 41876, 1312, 13, 198, 220, 42865, 25, 410, 62, 14421, 41876, 1312, 13, 198, 220, 42865, 25, 267, 62, 43681, 41876, 4526, 37, 5390, 611, 62, 43681, 13, 198, 10619, 41358, 49836, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 361, 62, 48727, 30023, 2538, 10979, 6234, 198, 9, 198, 41358, 49836, 611, 62, 43681, 13, 198, 220, 337, 36252, 50, 25, 651, 62, 48727, 30826, 4261, 15871, 26173, 8924, 7, 48727, 8, 41876, 4526, 37, 5390, 611, 62, 48727, 13, 198, 220, 337, 36252, 50, 25, 751, 220, 220, 220, 30023, 9863, 2751, 5002, 41876, 4526, 37, 5390, 2134, 11, 198, 220, 220, 220, 4781, 30023, 9863, 2751, 5002, 41876, 4526, 37, 5390, 2134, 11, 198, 220, 220, 220, 1598, 11, 198, 220, 220, 220, 2546, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 7857, 8, 41876, 1312, 11, 198, 220, 220, 220, 318, 62, 28920, 30826, 4261, 15871, 26173, 8924, 7, 28920, 8, 41876, 6056, 11, 198, 220, 220, 220, 651, 220, 220, 220, 30023, 9863, 2751, 6376, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1312, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 15252, 8, 41876, 4526, 37, 5390, 2134, 13, 198, 10619, 41358, 49836, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 361, 62, 43681, 30023, 2538, 10979, 6234, 198, 9, 198, 31631, 300, 565, 62, 48727, 5550, 20032, 17941, 13, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 23255, 37, 2246, 1546, 25, 611, 62, 48727, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 23772, 30023, 9863, 2751, 33245, 62, 43681, 41876, 4526, 37, 5390, 611, 62, 43681, 13, 198, 220, 220, 220, 8355, 43429, 1546, 25, 651, 62, 9630, 220, 220, 7473, 611, 62, 48727, 93, 1136, 62, 9630, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 468, 62, 19545, 220, 220, 220, 7473, 611, 62, 48727, 93, 10134, 62, 19545, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 651, 62, 19545, 220, 220, 220, 7473, 611, 62, 48727, 93, 1136, 62, 19545, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 717, 220, 220, 220, 220, 220, 220, 7473, 611, 62, 48727, 93, 11085, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 62, 9662, 220, 220, 220, 7473, 611, 62, 48727, 93, 2617, 62, 9662, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 8355, 43429, 1546, 25, 410, 62, 9662, 220, 220, 220, 220, 220, 7473, 611, 62, 48727, 93, 85, 62, 9662, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 62, 14421, 220, 220, 7473, 611, 62, 48727, 93, 85, 62, 14421, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 267, 62, 43681, 7473, 611, 62, 48727, 93, 78, 62, 43681, 13, 198, 10619, 31631, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 75, 565, 62, 48727, 5550, 20032, 17941, 198, 9, 198, 31631, 300, 565, 62, 43681, 5550, 20032, 17941, 13, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 23255, 37, 2246, 1546, 25, 611, 62, 43681, 13, 198, 220, 220, 220, 42865, 25, 1312, 62, 23814, 41876, 49053, 9795, 43679, 3963, 4526, 37, 5390, 2134, 13, 198, 220, 220, 220, 8355, 43429, 1546, 25, 651, 62, 48727, 220, 220, 7473, 611, 62, 43681, 93, 1136, 62, 48727, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 751, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7473, 611, 62, 43681, 93, 2860, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4781, 220, 220, 220, 220, 220, 220, 220, 220, 7473, 611, 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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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 ]
"! API for Initializing the Transactional Buffer of the Travel API "! FUNCTION /DMO/FLIGHT_TRAVEL_INITIALI_10. *"---------------------------------------------------------------------- *"*"Local Interface: *"---------------------------------------------------------------------- /dmo/cl_flight_legacy10=>get_instance( )->initialize( ). ENDFUNCTION.
[ 40484, 7824, 329, 20768, 2890, 262, 3602, 529, 1538, 47017, 286, 262, 13524, 7824, 198, 40484, 198, 42296, 4177, 2849, 1220, 35, 11770, 14, 3697, 9947, 62, 51, 3861, 18697, 62, 1268, 2043, 12576, 40, 62, 940, 13, 198, 9, 1, 10097, 23031, 198, 9, 1, 9, 1, 14565, 26491, 25, 198, 9, 1, 10097, 23031, 198, 220, 1220, 67, 5908, 14, 565, 62, 22560, 62, 1455, 1590, 940, 14804, 1136, 62, 39098, 7, 1267, 3784, 36733, 1096, 7, 6739, 198, 1677, 8068, 4944, 4177, 2849, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
CLASS zcl_abapgit_object_vcls DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL. PUBLIC SECTION. INTERFACES zif_abapgit_object. PRIVATE SECTION. * See include MTOBJCON: CONSTANTS: c_cluster_type TYPE c VALUE 'C'. CONSTANTS: c_mode_insert TYPE obj_para-maint_mode VALUE 'I'. ENDCLASS. CLASS zcl_abapgit_object_vcls IMPLEMENTATION. METHOD zif_abapgit_object~changed_by. rv_user = c_user_unknown. " todo 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. * Do the same as in VIEWCLUSTER_SAVE_DEFINITION DATA: lv_vclname TYPE vcl_name. lv_vclname = ms_item-obj_name. DELETE FROM vcldir WHERE vclname = lv_vclname. "#EC CI_SUBRC DELETE FROM vcldirt WHERE vclname = lv_vclname. "#EC CI_NOFIRST "#EC CI_SUBRC DELETE FROM vclstruc WHERE vclname = lv_vclname. "#EC CI_SUBRC DELETE FROM vclstruct WHERE vclname = lv_vclname. "#EC CI_NOFIRST "#EC CI_SUBRC DELETE FROM vclstrudep WHERE vclname = lv_vclname. "#EC CI_SUBRC DELETE FROM vclmf WHERE vclname = lv_vclname. "#EC CI_SUBRC ENDMETHOD. METHOD zif_abapgit_object~deserialize. DATA: ls_vcldir_entry TYPE v_vcldir, lt_vclstruc TYPE TABLE OF v_vclstruc, lt_vclstrudep TYPE TABLE OF v_vclstdep, lt_vclmf TYPE TABLE OF v_vclmf, lv_objectname TYPE ob_object. io_xml->read( EXPORTING iv_name = 'VCLDIR' CHANGING cg_data = ls_vcldir_entry ). io_xml->read( EXPORTING iv_name = 'VLCSTRUC_TAB' CHANGING cg_data = lt_vclstruc ). io_xml->read( EXPORTING iv_name = 'VCLSTRUDEP_TAB' CHANGING cg_data = lt_vclstrudep ). io_xml->read( EXPORTING iv_name = 'lt_vclstrudep' CHANGING cg_data = lt_vclmf ). ls_vcldir_entry-author = sy-uname. CALL FUNCTION 'VIEWCLUSTER_SAVE_DEFINITION' EXPORTING vcldir_entry = ls_vcldir_entry TABLES vclstruc_tab = lt_vclstruc vclstrudep_tab = lt_vclstrudep vclmf_tab = lt_vclmf. CALL FUNCTION 'RS_CORR_INSERT' EXPORTING object = ms_item-obj_name object_class = ms_item-obj_type devclass = iv_package master_language = mv_language mode = 'INSERT' global_lock = abap_true EXCEPTIONS cancelled = 1 permission_failure = 2 unknown_objectclass = 3 OTHERS = 4. IF sy-subrc = 1. zcx_abapgit_exception=>raise( 'Cancelled' ). ELSEIF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from RS_CORR_INSERT' ). ENDIF. lv_objectname = ls_vcldir_entry-vclname. CALL FUNCTION 'OBJ_GENERATE' EXPORTING iv_objectname = lv_objectname iv_objecttype = c_cluster_type iv_maint_mode = c_mode_insert iv_devclass = iv_package EXCEPTIONS illegal_call = 1 object_not_found = 2 generate_error = 3 transport_error = 4 object_enqueue_failed = 5 OTHERS = 6. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error in OBJ_GENERATE for VCLS' ). ENDIF. ENDMETHOD. METHOD zif_abapgit_object~exists. DATA lv_changedate TYPE vcldir-changedate. SELECT SINGLE changedate INTO lv_changedate FROM vcldir WHERE vclname = ms_item-obj_name. rv_bool = boolc( sy-subrc = 0 ). IF lv_changedate IS INITIAL. * same logic as in function module VIEWCLUSTER_GET_DEFINITION rv_bool = abap_false. ENDIF. 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~is_locked. rv_is_locked = abap_false. ENDMETHOD. METHOD zif_abapgit_object~jump. DATA: ls_bcdata TYPE bdcdata, lt_bcdata TYPE STANDARD TABLE OF bdcdata. ls_bcdata-program = 'SAPMSVIM'. ls_bcdata-dynpro = '0050'. ls_bcdata-dynbegin = 'X'. APPEND ls_bcdata TO lt_bcdata. CLEAR ls_bcdata. ls_bcdata-fnam = 'VIMDYNFLDS-VIEWNAME'. ls_bcdata-fval = ms_item-obj_name. APPEND ls_bcdata TO lt_bcdata. CLEAR ls_bcdata. ls_bcdata-fnam = 'VIMDYNFLDS-STRUCT_MNT'. ls_bcdata-fval = 'X'. APPEND ls_bcdata TO lt_bcdata. CLEAR ls_bcdata. ls_bcdata-fnam = 'BDC_OKCODE'. ls_bcdata-fval = '=CLUS'. APPEND ls_bcdata TO lt_bcdata. CLEAR ls_bcdata. ls_bcdata-program = 'SAPMSVIM'. ls_bcdata-dynpro = '0052 '. ls_bcdata-dynbegin = 'X'. APPEND ls_bcdata TO lt_bcdata. CLEAR ls_bcdata. ls_bcdata-fnam = 'VIMDYNFLDS-VCLNAME'. ls_bcdata-fval = ms_item-obj_name. APPEND ls_bcdata TO lt_bcdata. CLEAR ls_bcdata. ls_bcdata-fnam = 'BDC_OKCODE'. ls_bcdata-fval = '=CLSH'. APPEND ls_bcdata TO lt_bcdata. CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'GIT' EXPORTING tcode = 'SE54' mode_val = 'E' TABLES using_tab = lt_bcdata EXCEPTIONS OTHERS = 1. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error from ABAP4_CALL_TRANSACTION, SE35' ). ENDIF. ENDMETHOD. METHOD zif_abapgit_object~serialize. DATA: lv_vclname TYPE vcl_name, ls_vcldir_entry TYPE v_vcldir, lt_vclstruc TYPE TABLE OF v_vclstruc, lt_vclstrudep TYPE TABLE OF v_vclstdep, lt_vclmf TYPE TABLE OF v_vclmf. IF zif_abapgit_object~exists( ) = abap_false. RETURN. ENDIF. lv_vclname = ms_item-obj_name. CALL FUNCTION 'VIEWCLUSTER_GET_DEFINITION' EXPORTING vclname = lv_vclname IMPORTING vcldir_entry = ls_vcldir_entry TABLES vclstruc_tab = lt_vclstruc vclstrudep_tab = lt_vclstrudep vclmf_tab = lt_vclmf EXCEPTIONS viewcluster_not_found = 1 incomplete_viewcluster = 2 OTHERS = 3. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( 'error in VIEWCLUSTER_GET_DEFINITION' ). ENDIF. CLEAR ls_vcldir_entry-author. io_xml->add( iv_name = 'VCLDIR' ig_data = ls_vcldir_entry ). io_xml->add( iv_name = 'VLCSTRUC_TAB' ig_data = lt_vclstruc ). io_xml->add( iv_name = 'VCLSTRUDEP_TAB' ig_data = lt_vclstrudep ). io_xml->add( iv_name = 'VCLMF_TAB' ig_data = lt_vclmf ). ENDMETHOD. METHOD zif_abapgit_object~is_active. rv_active = is_active( ). ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 85, 565, 82, 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, 9, 4091, 2291, 19308, 9864, 41, 10943, 25, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 25, 269, 62, 565, 5819, 62, 4906, 41876, 269, 26173, 8924, 705, 34, 4458, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 25, 269, 62, 14171, 62, 28463, 220, 41876, 26181, 62, 1845, 64, 12, 76, 2913, 62, 14171, 26173, 8924, 705, 40, 4458, 198, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1976, 565, 62, 397, 499, 18300, 62, 15252, 62, 85, 565, 82, 30023, 2538, 10979, 6234, 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, 269, 62, 7220, 62, 34680, 13, 366, 284, 4598, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 5589, 533, 62, 1462, 62, 47960, 62, 9641, 13, 198, 220, 220, 220, 29244, 6158, 25334, 23680, 686, 62, 785, 1845, 1653, 62, 20274, 41876, 1976, 565, 62, 397, 499, 18300, 62, 785, 1845, 1653, 62, 8423, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 1976, 361, 62, 397, 499, 18300, 62, 15252, 93, 33678, 13, 198, 9, 2141, 262, 976, 355, 287, 49880, 5097, 7759, 1137, 62, 4090, 6089, 62, 7206, 20032, 17941, 198, 220, 220, 220, 42865, 25, 300, 85, 62, 85, 565, 3672, 41876, 410, 565, 62, 3672, 13, 628, 198, 220, 220, 220, 300, 85, 62, 85, 565, 3672, 796, 13845, 62, 9186, 12, 26801, 62, 3672, 13, 628, 220, 220, 220, 5550, 2538, 9328, 16034, 410, 66, 335, 343, 33411, 410, 565, 3672, 796, 300, 85, 62, 85, 565, 3672, 13, 220, 220, 220, 220, 220, 220, 220, 25113, 2943, 14514, 62, 50, 10526, 7397, 198, 220, 220, 220, 5550, 2538, 9328, 16034, 410, 66, 335, 2265, 33411, 410, 565, 3672, 796, 300, 85, 62, 85, 565, 3672, 13, 25113, 2943, 14514, 62, 15285, 39776, 2257, 25113, 2943, 14514, 62, 50, 10526, 7397, 198, 220, 220, 220, 5550, 2538, 9328, 16034, 410, 565, 19554, 66, 33411, 410, 565, 3672, 796, 300, 85, 62, 85, 565, 3672, 13, 220, 220, 220, 220, 220, 25113, 2943, 14514, 62, 50, 10526, 7397, 198, 220, 220, 220, 5550, 2538, 9328, 16034, 410, 565, 7249, 33411, 410, 565, 3672, 796, 300, 85, 62, 85, 565, 3672, 13, 25113, 2943, 14514, 62, 15285, 39776, 2257, 25113, 2943, 14514, 62, 50, 10526, 7397, 198, 220, 220, 220, 5550, 2538, 9328, 16034, 410, 565, 2536, 463, 538, 33411, 410, 565, 3672, 796, 300, 85, 62, 85, 565, 3672, 13, 220, 220, 220, 25113, 2943, 14514, 62, 50, 10526, 7397, 198, 220, 220, 220, 5550, 2538, 9328, 16034, 410, 565, 76, 69, 33411, 410, 565, 3672, 796, 300, 85, 62, 85, 565, 3672, 13, 220, 220, 220, 220, 220, 220, 220, 220, 25113, 2943, 14514, 62, 50, 10526, 7397, 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, 28435, 335, 343, 62, 13000, 41876, 410, 62, 28435, 335, 343, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 83, 62, 85, 565, 19554, 66, 220, 220, 220, 220, 41876, 43679, 3963, 410, 62, 85, 565, 19554, 66, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 83, 62, 85, 565, 2536, 463, 538, 220, 220, 41876, 43679, 3963, 410, 62, 85, 565, 301, 10378, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 83, 62, 85, 565, 76, 69, 220, 220, 220, 220, 220, 220, 220, 41876, 43679, 3963, 410, 62, 85, 565, 76, 69, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 15252, 3672, 220, 220, 41876, 909, 62, 15252, 13, 628, 198, 220, 220, 220, 33245, 62, 19875, 3784, 961, 7, 7788, 15490, 2751, 21628, 62, 3672, 796, 705, 53, 5097, 34720, 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, 28435, 335, 343, 62, 13000, 6739, 198, 220, 220, 220, 33245, 62, 19875, 3784, 961, 7, 7788, 15490, 2751, 21628, 62, 3672, 796, 705, 53, 5639, 18601, 9598, 62, 5603, 33, 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, 85, 565, 19554, 66, 6739, 198, 220, 220, 220, 33245, 62, 19875, 3784, 961, 7, 7788, 15490, 2751, 21628, 62, 3672, 796, 705, 53, 5097, 18601, 52, 46162, 62, 5603, 33, 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, 85, 565, 2536, 463, 538, 6739, 198, 220, 220, 220, 33245, 62, 19875, 3784, 961, 7, 7788, 15490, 2751, 21628, 62, 3672, 796, 705, 2528, 62, 85, 565, 2536, 463, 538, 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, 85, 565, 76, 69, 6739, 628, 220, 220, 220, 43979, 62, 28435, 335, 343, 62, 13000, 12, 9800, 796, 827, 12, 403, 480, 13, 628, 220, 220, 220, 42815, 29397, 4177, 2849, 705, 28206, 5097, 7759, 1137, 62, 4090, 6089, 62, 7206, 20032, 17941, 6, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 410, 66, 335, 343, 62, 13000, 220, 220, 796, 43979, 62, 28435, 335, 343, 62, 13000, 198, 220, 220, 220, 220, 220, 309, 6242, 28378 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
*&---------------------------------------------------------------------* *& Include ZABAPGIT_OBJECT_SERIALIZATION *&---------------------------------------------------------------------* * All object serializing classes INCLUDE zabapgit_object_acid. INCLUDE zabapgit_object_auth. INCLUDE zabapgit_object_clas. INCLUDE zabapgit_object_doct. INCLUDE zabapgit_object_docv. INCLUDE zabapgit_object_doma. INCLUDE zabapgit_object_dtel. INCLUDE zabapgit_object_enho. INCLUDE zabapgit_object_enhs. INCLUDE zabapgit_object_enqu. INCLUDE zabapgit_object_ensc. INCLUDE zabapgit_object_fugr. INCLUDE zabapgit_object_iarp. INCLUDE zabapgit_object_iasp. INCLUDE zabapgit_object_iatu. INCLUDE zabapgit_object_msag. INCLUDE zabapgit_object_nrob. INCLUDE zabapgit_object_para. INCLUDE zabapgit_object_pinf. INCLUDE zabapgit_object_prog. INCLUDE zabapgit_object_sfbf. INCLUDE zabapgit_object_sfbs. INCLUDE zabapgit_object_sfsw. INCLUDE zabapgit_object_shi3. INCLUDE zabapgit_object_shlp. INCLUDE zabapgit_object_sicf. INCLUDE zabapgit_object_smim. INCLUDE zabapgit_object_splo. INCLUDE zabapgit_object_ssfo. INCLUDE zabapgit_object_ssst. INCLUDE zabapgit_object_susc. INCLUDE zabapgit_object_suso. INCLUDE zabapgit_object_tabl_valid. INCLUDE zabapgit_object_tabl. INCLUDE zabapgit_object_tobj. INCLUDE zabapgit_object_tran. INCLUDE zabapgit_object_ttyp. INCLUDE zabapgit_object_type. INCLUDE zabapgit_object_vcls. INCLUDE zabapgit_object_view. INCLUDE zabapgit_object_w3xx. INCLUDE zabapgit_object_wdya. INCLUDE zabapgit_object_wdyn. INCLUDE zabapgit_object_webi. INCLUDE zabapgit_object_xslt.
[ 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, 9864, 23680, 62, 35009, 12576, 14887, 6234, 198, 9, 5, 10097, 30934, 9, 198, 198, 9, 1439, 2134, 11389, 2890, 6097, 198, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 46309, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 18439, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 565, 292, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 4598, 310, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 15390, 85, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 3438, 64, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 28664, 417, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 268, 8873, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 268, 11994, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 268, 421, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 641, 66, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 69, 1018, 81, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 72, 5117, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 4448, 79, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 5375, 84, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 907, 363, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 77, 22609, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 1845, 64, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 79, 10745, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 1676, 70, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 28202, 19881, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 28202, 1443, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 28202, 2032, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 44019, 18, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 1477, 34431, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 21383, 69, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 5796, 320, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 22018, 78, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 824, 6513, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 824, 301, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 82, 16241, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 82, 385, 78, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 8658, 75, 62, 12102, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 8658, 75, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 83, 26801, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 2213, 272, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 83, 28004, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 4906, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 85, 565, 82, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 1177, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 86, 18, 5324, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300, 62, 15252, 62, 16993, 3972, 13, 198, 1268, 5097, 52, 7206, 1976, 397, 499, 18300,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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
CLASS zcl_aoc_check_53 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 put_attributes REDEFINITION. METHODS if_ci_test~query_attributes REDEFINITION. PROTECTED SECTION. DATA mv_reuse_alv_grid_display TYPE sap_bool . DATA mv_so_new_document_att_send TYPE sap_bool . DATA mv_sapgui_progress_indicator TYPE sap_bool . DATA mv_subst_get_file_list TYPE sap_bool . DATA mv_gui TYPE sap_bool . DATA mv_job TYPE sap_bool . DATA mv_popup_to_decide TYPE sap_bool . DATA mv_round TYPE sap_bool . DATA mv_ws_filename TYPE sap_bool . DATA mv_guid TYPE sap_bool . DATA mv_f4_filename TYPE sap_bool . DATA mv_binary TYPE sap_bool . DATA mv_base64 TYPE sap_bool . PRIVATE SECTION. ENDCLASS. CLASS ZCL_AOC_CHECK_53 IMPLEMENTATION. METHOD check. * abapOpenChecks * https://github.com/larshp/abapOpenChecks * MIT License DATA: lt_statements TYPE ty_statements, lt_split TYPE STANDARD TABLE OF string WITH DEFAULT KEY, lv_name TYPE string, lv_code TYPE sci_errc. FIELD-SYMBOLS: <ls_statement> LIKE LINE OF lt_statements. lt_statements = build_statements( it_tokens = it_tokens it_statements = it_statements ). LOOP AT lt_statements ASSIGNING <ls_statement>. CLEAR lv_code. IF <ls_statement>-str NP 'CALL FUNCTION *'. CONTINUE. ENDIF. SPLIT <ls_statement>-str AT '''' INTO TABLE lt_split. IF lines( lt_split ) < 2. CONTINUE. ENDIF. READ TABLE lt_split INDEX 2 INTO lv_name. ASSERT sy-subrc = 0. CASE lv_name. WHEN 'REUSE_ALV_GRID_DISPLAY'. IF mv_reuse_alv_grid_display = abap_true. lv_code = '001'. ENDIF. WHEN 'SO_NEW_DOCUMENT_ATT_SEND_API1'. IF mv_so_new_document_att_send = abap_true. lv_code = '002'. ENDIF. WHEN 'SAPGUI_PROGRESS_INDICATOR'. IF mv_sapgui_progress_indicator = abap_true. lv_code = '003'. ENDIF. WHEN 'SUBST_GET_FILE_LIST'. IF mv_subst_get_file_list = abap_true. lv_code = '004'. ENDIF. WHEN 'JOB_CREATE' OR 'JOB_SUBMIT'. IF mv_job = abap_true. lv_code = '005'. ENDIF. WHEN 'POPUP_TO_DECIDE'. IF mv_popup_to_decide = abap_true. lv_code = '006'. ENDIF. WHEN 'ROUND'. IF mv_round = abap_true. lv_code = '007'. ENDIF. WHEN 'GUI_DOWNLOAD' OR 'GUI_UPLOAD'. IF mv_gui = abap_true. lv_code = '008'. ENDIF. WHEN 'GUID_CREATE'. IF mv_guid = abap_true. lv_code = '009'. ENDIF. WHEN 'WS_FILENAME_GET'. IF mv_ws_filename = abap_true. lv_code = '010'. ENDIF. WHEN 'F4_FILENAME'. IF mv_f4_filename = abap_true. lv_code = '011'. ENDIF. WHEN 'SSFC_BASE64_DECODE' OR 'SSFC_BASE64_ENCODE' OR 'SCMS_BASE64_DECODE_STR'. IF mv_base64 = abap_true. lv_code = '012'. ENDIF. WHEN 'ECATT_CONV_XSTRING_TO_STRING' OR 'SCMS_STRING_TO_XSTRING'. IF mv_binary = abap_true. lv_code = '013'. ENDIF. ENDCASE. IF NOT lv_code IS INITIAL. inform( p_sub_obj_type = c_type_include p_sub_obj_name = <ls_statement>-include p_line = <ls_statement>-start-row p_position = <ls_statement>-index p_param_1 = lv_name p_kind = mv_errty p_test = myname p_code = lv_code ). ENDIF. ENDLOOP. ENDMETHOD. METHOD constructor. super->constructor( ). version = '001'. position = '053'. has_attributes = abap_true. attributes_ok = abap_true. enable_rfc( ). set_uses_checksum( ). mv_errty = c_error. mv_reuse_alv_grid_display = abap_true. mv_so_new_document_att_send = abap_true. mv_sapgui_progress_indicator = abap_true. mv_subst_get_file_list = abap_true. mv_job = abap_true. mv_popup_to_decide = abap_true. mv_round = abap_true. mv_gui = abap_true. mv_guid = abap_true. mv_ws_filename = abap_true. mv_f4_filename = abap_true. mv_base64 = abap_true. mv_binary = abap_true. ENDMETHOD. "CONSTRUCTOR METHOD get_attributes. EXPORT mv_errty = mv_errty mv_reuse_alv_grid_display = mv_reuse_alv_grid_display mv_so_new_document_att_send = mv_so_new_document_att_send mv_sapgui_progress_indicator = mv_sapgui_progress_indicator mv_subst_get_file_list = mv_subst_get_file_list mv_job = mv_job mv_popup_to_decide = mv_popup_to_decide mv_round = mv_round mv_gui = mv_gui mv_guid = mv_guid mv_ws_filename = mv_ws_filename mv_f4_filename = mv_f4_filename mv_base64 = mv_base64 mv_binary = mv_binary TO DATA BUFFER p_attributes. ENDMETHOD. METHOD get_message_text. CLEAR p_text. p_text = 'Function &1 used, see documentation'. "#EC NOTEXT ENDMETHOD. METHOD if_ci_test~query_attributes. zzaoc_top. zzaoc_fill_att mv_errty 'Error Type' ''. "#EC NOTEXT zzaoc_fill_att mv_reuse_alv_grid_display 'REUSE_ALV_GRID_DISPLAY' ''. "#EC NOTEXT zzaoc_fill_att mv_so_new_document_att_send 'SO_NEW_DOCUMENT_ATT_SEND_API1' ''. "#EC NOTEXT zzaoc_fill_att mv_sapgui_progress_indicator 'SAPGUI_PROGRESS_INDICATOR' ''. "#EC NOTEXT zzaoc_fill_att mv_subst_get_file_list 'SUBST_GET_FILE_LIST' ''. "#EC NOTEXT zzaoc_fill_att mv_job 'JOB_CREATE, JOB_SUBMIT' ''. "#EC NOTEXT zzaoc_fill_att mv_popup_to_decide 'POPUP_TO_DECIDE' ''. "#EC NOTEXT zzaoc_fill_att mv_round 'ROUND' ''. "#EC NOTEXT zzaoc_fill_att mv_gui 'GUI_DOWNLOAD and GUI_UPLOAD' ''. "#EC NOTEXT zzaoc_fill_att mv_guid 'GUID_CREATE' ''. "#EC NOTEXT zzaoc_fill_att mv_ws_filename 'WS_FILENAME_GET' ''. "#EC NOTEXT zzaoc_fill_att mv_f4_filename 'F4_FILENAME' ''. "#EC NOTEXT zzaoc_fill_att mv_base64 'Base 64' ''. "#EC NOTEXT zzaoc_fill_att mv_base64 'Binary conversions' ''. "#EC NOTEXT zzaoc_popup. ENDMETHOD. METHOD put_attributes. IMPORT mv_errty = mv_errty mv_reuse_alv_grid_display = mv_reuse_alv_grid_display mv_so_new_document_att_send = mv_so_new_document_att_send mv_sapgui_progress_indicator = mv_sapgui_progress_indicator mv_subst_get_file_list = mv_subst_get_file_list mv_job = mv_job mv_popup_to_decide = mv_popup_to_decide mv_round = mv_round mv_gui = mv_gui mv_guid = mv_guid mv_ws_filename = mv_ws_filename mv_f4_filename = mv_f4_filename mv_base64 = mv_base64 mv_binary = mv_binary FROM DATA BUFFER p_attributes. "#EC CI_USE_WANTED ASSERT sy-subrc = 0. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 64, 420, 62, 9122, 62, 4310, 5550, 20032, 17941, 44731, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 64, 420, 62, 16668, 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, 1234, 62, 1078, 7657, 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, 48006, 9782, 1961, 44513, 13, 628, 220, 220, 220, 42865, 285, 85, 62, 260, 1904, 62, 282, 85, 62, 25928, 62, 13812, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 568, 62, 3605, 62, 22897, 62, 1078, 62, 21280, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 82, 499, 48317, 62, 33723, 62, 521, 26407, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 7266, 301, 62, 1136, 62, 7753, 62, 4868, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 48317, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 21858, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 12924, 929, 62, 1462, 62, 12501, 485, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 744, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 18504, 62, 34345, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 5162, 312, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 69, 19, 62, 34345, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 39491, 41876, 31841, 62, 30388, 764, 198, 220, 220, 220, 42865, 285, 85, 62, 8692, 2414, 41876, 31841, 62, 30388, 764, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 32, 4503, 62, 50084, 62, 4310, 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, 83, 62, 14269, 3196, 41876, 1259, 62, 14269, 3196, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 83, 62, 35312, 220, 220, 220, 220, 220, 41876, 49053, 9795, 43679, 3963, 4731, 13315, 5550, 38865, 35374, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 3672, 220, 220, 220, 220, 220, 220, 41876, 4731, 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, 1279, 7278, 62, 26090, 29, 34178, 48920, 3963, 300, 83, 62, 14269, 3196, 13, 628, 198, 220, 220, 220, 300, 83, 62, 14269, 3196, 796, 1382, 62, 14269, 3196, 7, 198, 220, 220, 220, 220, 220, 220, 220, 340, 62, 83, 482, 641, 220, 220, 220, 220, 796, 340, 62, 83, 482, 641, 198, 220, 220, 220, 220, 220, 220, 220, 340, 62, 14269, 3196, 796, 340, 62, 14269, 3196, 6739, 628, 220, 220, 220, 17579, 3185, 5161, 300, 83, 62, 14269, 3196, 24994, 3528, 15871, 1279, 7278, 62, 26090, 28401, 198, 220, 220, 220, 220, 220, 30301, 1503, 300, 85, 62, 8189, 13, 628, 220, 220, 220, 220, 220, 16876, 1279, 7278, 62, 26090, 29, 12, 2536, 28498, 705, 34, 7036, 29397, 4177, 2849, 1635, 4458, 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, 46341, 2043, 1279, 7278, 62, 26090, 29, 12, 2536, 5161, 705, 7061, 6, 39319, 43679, 300, 83, 62, 35312, 13, 198, 220, 220, 220, 220, 220, 16876, 3951, 7, 300, 83, 62, 35312, 1267, 1279, 362, 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, 300, 83, 62, 35312, 24413, 6369, 362, 39319, 300, 85, 62, 3672, 13, 198, 220, 220, 220, 220, 220, 24994, 17395, 827, 12, 7266, 6015, 796, 657, 13, 628, 220, 220, 220, 220, 220, 42001, 300, 85, 62, 3672, 13, 198, 220, 220, 220, 220, 220, 220, 220, 42099, 705, 2200, 19108, 62, 1847, 53, 62, 10761, 2389, 62, 26288, 31519, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16876, 285, 85, 62, 260, 1904, 62, 282, 85, 62, 25928, 62, 13812, 796, 450, 499, 62, 7942, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 8189, 796, 705, 8298, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 220, 220, 220, 220, 42099, 705, 15821, 62, 13965, 62, 38715, 5883, 3525, 62, 17139, 62, 50, 10619, 62, 17614, 16, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16876, 285, 85, 62, 568, 62, 3605, 62, 22897, 62, 1078, 62, 21280, 796, 450, 499, 62, 7942, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 8189, 796, 705, 21601, 4458, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 5064, 13, 198, 220, 220, 220, 220, 220, 220, 220, 42099, 705, 50, 2969, 40156, 62, 4805, 49656, 7597, 62, 12115, 2149, 25633 ]
[ 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, 1, 1, 1 ]
********************************************************************** * UTIL ********************************************************************** CLASS lcl_nodes_helper DEFINITION FINAL. PUBLIC SECTION. DATA mt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. METHODS add IMPORTING iv_str TYPE string. METHODS clear. METHODS sorted RETURNING VALUE(rt_nodes) TYPE zif_abapgit_ajson=>ty_nodes_ts. ENDCLASS. CLASS lcl_nodes_helper IMPLEMENTATION. METHOD add. FIELD-SYMBOLS <n> LIKE LINE OF mt_nodes. DATA lv_children TYPE string. DATA lv_index TYPE string. DATA lv_order TYPE string. APPEND INITIAL LINE TO mt_nodes ASSIGNING <n>. SPLIT iv_str AT '|' INTO <n>-path <n>-name <n>-type <n>-value lv_index lv_children lv_order. CONDENSE <n>-path. CONDENSE <n>-name. CONDENSE <n>-type. CONDENSE <n>-value. <n>-index = lv_index. <n>-children = lv_children. <n>-order = lv_order. ENDMETHOD. METHOD sorted. rt_nodes = mt_nodes. ENDMETHOD. METHOD clear. CLEAR mt_nodes. ENDMETHOD. ENDCLASS. ********************************************************************** * PARSER ********************************************************************** CLASS ltcl_parser_test DEFINITION FINAL FOR TESTING RISK LEVEL HARMLESS DURATION SHORT. PUBLIC SECTION. CLASS-METHODS sample_json IMPORTING iv_separator TYPE string OPTIONAL RETURNING VALUE(rv_json) TYPE string. PRIVATE SECTION. DATA mo_cut TYPE REF TO lcl_json_parser. DATA mo_nodes TYPE REF TO lcl_nodes_helper. METHODS setup. METHODS parse FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS parse_string FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS parse_number FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS parse_float FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS parse_boolean FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS parse_false FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS parse_null FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS parse_date FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS parse_bare_values FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS parse_error FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS duplicate_key FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS non_json FOR TESTING RAISING zcx_abapgit_ajson_error. ENDCLASS. CLASS ltcl_parser_test IMPLEMENTATION. METHOD setup. CREATE OBJECT mo_cut. CREATE OBJECT mo_nodes. ENDMETHOD. METHOD parse_bare_values. DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. mo_nodes->add( ' | |str |abc | |0' ). lt_act = mo_cut->parse( '"abc"' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). mo_nodes->clear( ). mo_nodes->add( ' | |num |-123 | |0' ). lt_act = mo_cut->parse( '-123' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). mo_nodes->clear( ). mo_nodes->add( ' | |bool |true | |0' ). lt_act = mo_cut->parse( 'true' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). mo_nodes->clear( ). mo_nodes->add( ' | |bool |false | |0' ). lt_act = mo_cut->parse( 'false' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). mo_nodes->clear( ). mo_nodes->add( ' | |null | | |0' ). lt_act = mo_cut->parse( 'null' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). ENDMETHOD. METHOD parse_error. DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. DATA lx_err TYPE REF TO zcx_abapgit_ajson_error. TRY. lt_act = mo_cut->parse( 'abc' ). cl_abap_unit_assert=>fail( 'Parsing of string w/o quotes must fail (spec)' ). CATCH zcx_abapgit_ajson_error INTO lx_err. cl_abap_unit_assert=>assert_char_cp( act = lx_err->get_text( ) exp = '*parsing error*' ). cl_abap_unit_assert=>assert_char_cp( act = lx_err->location exp = 'Line 1, Offset 1' ). ENDTRY. TRY. lt_act = mo_cut->parse( '{' && cl_abap_char_utilities=>newline && '"ok": "abc",' && cl_abap_char_utilities=>newline && '"error"' && cl_abap_char_utilities=>newline && '}' ). cl_abap_unit_assert=>fail( 'Parsing of invalid JSON must fail (spec)' ). CATCH zcx_abapgit_ajson_error INTO lx_err. cl_abap_unit_assert=>assert_char_cp( act = lx_err->get_text( ) exp = '*parsing error*' ). cl_abap_unit_assert=>assert_char_cp( act = lx_err->location exp = 'Line 3, Offset 8' ). ENDTRY. ENDMETHOD. METHOD parse_string. mo_nodes->add( ' | |object | | |1' ). mo_nodes->add( '/ |string |str |abc | |0' ). DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. lt_act = mo_cut->parse( '{"string": "abc"}' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). ENDMETHOD. METHOD parse_number. mo_nodes->add( ' | |object | | |1' ). mo_nodes->add( '/ |number |num |123 | |0' ). DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. lt_act = mo_cut->parse( '{"number": 123}' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). ENDMETHOD. METHOD parse_float. mo_nodes->add( ' | |object | | |1' ). mo_nodes->add( '/ |float |num |123.45 | |0' ). DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. CREATE OBJECT mo_cut. lt_act = mo_cut->parse( '{"float": 123.45}' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). ENDMETHOD. METHOD parse_boolean. mo_nodes->add( ' | |object | | |1' ). mo_nodes->add( '/ |boolean |bool |true | |0' ). DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. lt_act = mo_cut->parse( '{"boolean": true}' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). ENDMETHOD. METHOD parse_false. mo_nodes->add( ' | |object | | |1' ). mo_nodes->add( '/ |false |bool |false | |0' ). DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. lt_act = mo_cut->parse( '{"false": false}' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). ENDMETHOD. METHOD parse_null. mo_nodes->add( ' | |object | | |1' ). mo_nodes->add( '/ |null |null | | |0' ). DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. lt_act = mo_cut->parse( '{"null": null}' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). ENDMETHOD. METHOD parse_date. mo_nodes->add( ' | |object | | |1' ). mo_nodes->add( '/ |date |str |2020-03-15 | |0' ). DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. lt_act = mo_cut->parse( '{"date": "2020-03-15"}' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = mo_nodes->mt_nodes ). ENDMETHOD. METHOD sample_json. rv_json = '{\n' && ' "string": "abc",\n' && ' "number": 123,\n' && ' "float": 123.45,\n' && ' "boolean": true,\n' && ' "false": false,\n' && ' "null": null,\n' && ' "date": "2020-03-15",\n' && ' "issues": [\n' && ' {\n' && ' "message": "Indentation problem ...",\n' && ' "key": "indentation",\n' && ' "start": {\n' && ' "row": 4,\n' && ' "col": 3\n' && ' },\n' && ' "end": {\n' && ' "row": 4,\n' && ' "col": 26\n' && ' },\n' && ' "filename": "./zxxx.prog.abap"\n' && ' },\n' && ' {\n' && ' "message": "Remove space before XXX",\n' && ' "key": "space_before_dot",\n' && ' "start": {\n' && ' "row": 3,\n' && ' "col": 21\n' && ' },\n' && ' "end": {\n' && ' "row": 3,\n' && ' "col": 22\n' && ' },\n' && ' "filename": "./zxxx.prog.abap"\n' && ' }\n' && ' ]\n' && '}'. REPLACE ALL OCCURRENCES OF '\n' IN rv_json WITH iv_separator. ENDMETHOD. METHOD parse. DATA lo_cut TYPE REF TO lcl_json_parser. DATA lt_act TYPE zif_abapgit_ajson=>ty_nodes_tt. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |8' ). lo_nodes->add( '/ |string |str |abc | |0' ). lo_nodes->add( '/ |number |num |123 | |0' ). lo_nodes->add( '/ |float |num |123.45 | |0' ). lo_nodes->add( '/ |boolean |bool |true | |0' ). lo_nodes->add( '/ |false |bool |false | |0' ). lo_nodes->add( '/ |null |null | | |0' ). lo_nodes->add( '/ |date |str |2020-03-15 | |0' ). lo_nodes->add( '/ |issues |array | | |2' ). lo_nodes->add( '/issues/ |1 |object | |1 |5' ). lo_nodes->add( '/issues/1/ |message |str |Indentation problem ... | |0' ). lo_nodes->add( '/issues/1/ |key |str |indentation | |0' ). lo_nodes->add( '/issues/1/ |start |object | | |2' ). lo_nodes->add( '/issues/1/start/ |row |num |4 | |0' ). lo_nodes->add( '/issues/1/start/ |col |num |3 | |0' ). lo_nodes->add( '/issues/1/ |end |object | | |2' ). lo_nodes->add( '/issues/1/end/ |row |num |4 | |0' ). lo_nodes->add( '/issues/1/end/ |col |num |26 | |0' ). lo_nodes->add( '/issues/1/ |filename |str |./zxxx.prog.abap | |0' ). lo_nodes->add( '/issues/ |2 |object | |2 |5' ). lo_nodes->add( '/issues/2/ |message |str |Remove space before XXX | |0' ). lo_nodes->add( '/issues/2/ |key |str |space_before_dot | |0' ). lo_nodes->add( '/issues/2/ |start |object | | |2' ). lo_nodes->add( '/issues/2/start/ |row |num |3 | |0' ). lo_nodes->add( '/issues/2/start/ |col |num |21 | |0' ). lo_nodes->add( '/issues/2/ |end |object | | |2' ). lo_nodes->add( '/issues/2/end/ |row |num |3 | |0' ). lo_nodes->add( '/issues/2/end/ |col |num |22 | |0' ). lo_nodes->add( '/issues/2/ |filename |str |./zxxx.prog.abap | |0' ). CREATE OBJECT lo_cut. lt_act = lo_cut->parse( sample_json( ) ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = lo_nodes->mt_nodes ). lt_act = lo_cut->parse( sample_json( |{ cl_abap_char_utilities=>newline }| ) ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = lo_nodes->mt_nodes ). lt_act = lo_cut->parse( sample_json( |{ cl_abap_char_utilities=>cr_lf }| ) ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = lo_nodes->mt_nodes ). ENDMETHOD. METHOD duplicate_key. DATA lo_cut TYPE REF TO lcl_json_parser. DATA lx TYPE REF TO zcx_abapgit_ajson_error. TRY. CREATE OBJECT lo_cut. lo_cut->parse( '{ "a" = 1, "a" = 1 }' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_not_initial( lx ). ENDTRY. ENDMETHOD. METHOD non_json. DATA lo_cut TYPE REF TO lcl_json_parser. DATA lx TYPE REF TO zcx_abapgit_ajson_error. TRY. CREATE OBJECT lo_cut. lo_cut->parse( '<html><head><title>X</title></head><body><h1>Y</h1></body></html>' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_not_initial( lx ). ENDTRY. ENDMETHOD. ENDCLASS. ********************************************************************** * SERIALIZER ********************************************************************** CLASS ltcl_serializer_test DEFINITION FINAL FOR TESTING RISK LEVEL HARMLESS DURATION SHORT. PUBLIC SECTION. CLASS-METHODS sample_json RETURNING VALUE(rv_json) TYPE string. CLASS-METHODS sample_nodes RETURNING VALUE(rt_nodes) TYPE zif_abapgit_ajson=>ty_nodes_ts. PRIVATE SECTION. METHODS stringify_condensed FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS stringify_indented FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS array_index FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS item_order FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS simple_indented FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS empty_set FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS escape FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS empty FOR TESTING RAISING zcx_abapgit_ajson_error. ENDCLASS. CLASS ltcl_serializer_test IMPLEMENTATION. METHOD sample_json. rv_json = '{\n' && ' "boolean": true,\n' && ' "date": "2020-03-15",\n' && ' "false": false,\n' && ' "float": 123.45,\n' && ' "issues": [\n' && ' {\n' && ' "end": {\n' && ' "col": 26,\n' && ' "row": 4\n' && ' },\n' && ' "filename": "./zxxx.prog.abap",\n' && ' "key": "indentation",\n' && ' "message": "Indentation problem ...",\n' && ' "start": {\n' && ' "col": 3,\n' && ' "row": 4\n' && ' }\n' && ' },\n' && ' {\n' && ' "end": {\n' && ' "col": 22,\n' && ' "row": 3\n' && ' },\n' && ' "filename": "./zxxx.prog.abap",\n' && ' "key": "space_before_dot",\n' && ' "message": "Remove space before XXX",\n' && ' "start": {\n' && ' "col": 21,\n' && ' "row": 3\n' && ' }\n' && ' }\n' && ' ],\n' && ' "null": null,\n' && ' "number": 123,\n' && ' "string": "abc"\n' && '}'. rv_json = replace( val = rv_json sub = '\n' with = cl_abap_char_utilities=>newline occ = 0 ). ENDMETHOD. METHOD sample_nodes. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |8' ). lo_nodes->add( '/ |string |str |abc | |0' ). lo_nodes->add( '/ |number |num |123 | |0' ). lo_nodes->add( '/ |float |num |123.45 | |0' ). lo_nodes->add( '/ |boolean |bool |true | |0' ). lo_nodes->add( '/ |false |bool |false | |0' ). lo_nodes->add( '/ |null |null | | |0' ). lo_nodes->add( '/ |date |str |2020-03-15 | |0' ). lo_nodes->add( '/ |issues |array | | |2' ). lo_nodes->add( '/issues/ |1 |object | |1 |5' ). lo_nodes->add( '/issues/1/ |message |str |Indentation problem ... | |0' ). lo_nodes->add( '/issues/1/ |key |str |indentation | |0' ). lo_nodes->add( '/issues/1/ |start |object | | |2' ). lo_nodes->add( '/issues/1/start/ |row |num |4 | |0' ). lo_nodes->add( '/issues/1/start/ |col |num |3 | |0' ). lo_nodes->add( '/issues/1/ |end |object | | |2' ). lo_nodes->add( '/issues/1/end/ |row |num |4 | |0' ). lo_nodes->add( '/issues/1/end/ |col |num |26 | |0' ). lo_nodes->add( '/issues/1/ |filename |str |./zxxx.prog.abap | |0' ). lo_nodes->add( '/issues/ |2 |object | |2 |5' ). lo_nodes->add( '/issues/2/ |message |str |Remove space before XXX | |0' ). lo_nodes->add( '/issues/2/ |key |str |space_before_dot | |0' ). lo_nodes->add( '/issues/2/ |start |object | | |2' ). lo_nodes->add( '/issues/2/start/ |row |num |3 | |0' ). lo_nodes->add( '/issues/2/start/ |col |num |21 | |0' ). lo_nodes->add( '/issues/2/ |end |object | | |2' ). lo_nodes->add( '/issues/2/end/ |row |num |3 | |0' ). lo_nodes->add( '/issues/2/end/ |col |num |22 | |0' ). lo_nodes->add( '/issues/2/ |filename |str |./zxxx.prog.abap | |0' ). rt_nodes = lo_nodes->sorted( ). ENDMETHOD. METHOD stringify_condensed. DATA lv_act TYPE string. DATA lv_exp TYPE string. lv_act = lcl_json_serializer=>stringify( sample_nodes( ) ). lv_exp = sample_json( ). lv_exp = replace( val = lv_exp sub = cl_abap_char_utilities=>newline with = '' occ = 0 ). CONDENSE lv_exp. lv_exp = replace( val = lv_exp sub = `: ` with = ':' occ = 0 ). lv_exp = replace( val = lv_exp sub = `{ ` with = '{' occ = 0 ). lv_exp = replace( val = lv_exp sub = `[ ` with = '[' occ = 0 ). lv_exp = replace( val = lv_exp sub = ` }` with = '}' occ = 0 ). lv_exp = replace( val = lv_exp sub = ` ]` with = ']' occ = 0 ). lv_exp = replace( val = lv_exp sub = `, ` with = ',' occ = 0 ). cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). ENDMETHOD. METHOD stringify_indented. DATA lv_act TYPE string. DATA lv_exp TYPE string. lv_act = lcl_json_serializer=>stringify( it_json_tree = sample_nodes( ) iv_indent = 2 ). lv_exp = sample_json( ). cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). ENDMETHOD. METHOD array_index. DATA lv_act TYPE string. DATA lv_exp TYPE string. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | |3' ). lo_nodes->add( '/ |1 |str |abc |2 |0' ). lo_nodes->add( '/ |2 |num |123 |1 |0' ). lo_nodes->add( '/ |3 |num |123.45 |3 |0' ). lv_act = lcl_json_serializer=>stringify( lo_nodes->sorted( ) ). lv_exp = '[123,"abc",123.45]'. cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). ENDMETHOD. METHOD item_order. DATA lv_act TYPE string. DATA lv_exp TYPE string. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |3 |0' ). lo_nodes->add( '/ |beta |str |b | |0 |3' ). lo_nodes->add( '/ |zulu |str |z | |0 |1' ). lo_nodes->add( '/ |alpha |str |a | |0 |2' ). lv_act = lcl_json_serializer=>stringify( lo_nodes->sorted( ) ). lv_exp = '{"alpha":"a","beta":"b","zulu":"z"}'. " NAME order ! (it is also a UT) cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). lv_act = lcl_json_serializer=>stringify( it_json_tree = lo_nodes->sorted( ) iv_keep_item_order = abap_true ). lv_exp = '{"zulu":"z","alpha":"a","beta":"b"}'. cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). ENDMETHOD. METHOD simple_indented. DATA lv_act TYPE string. DATA lv_exp TYPE string. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | |3' ). lo_nodes->add( '/ |1 |object | |2 |2' ). lo_nodes->add( '/1/ |a |num |1 | |0' ). lo_nodes->add( '/1/ |b |num |2 | |0' ). lo_nodes->add( '/ |2 |num |123 |1 |0' ). lo_nodes->add( '/ |3 |num |123.45 |3 |0' ). lv_act = lcl_json_serializer=>stringify( it_json_tree = lo_nodes->sorted( ) iv_indent = 2 ). lv_exp = '[\n' && ' 123,\n' && ' {\n' && ' "a": 1,\n' && ' "b": 2\n' && ' },\n' && ' 123.45\n' && ']'. lv_exp = replace( val = lv_exp sub = '\n' with = cl_abap_char_utilities=>newline occ = 0 ). cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). ENDMETHOD. METHOD empty_set. DATA lv_act TYPE string. DATA lv_exp TYPE string. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | |0' ). lv_act = lcl_json_serializer=>stringify( it_json_tree = lo_nodes->sorted( ) iv_indent = 0 ). lv_exp = '[]'. cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). lv_act = lcl_json_serializer=>stringify( it_json_tree = lo_nodes->sorted( ) iv_indent = 2 ). lv_exp = '[]'. cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). ENDMETHOD. METHOD escape. DATA lv_act TYPE string. DATA lv_exp TYPE string. DATA lv_val TYPE string. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lv_val = 'a' && '"' && '\' && cl_abap_char_utilities=>horizontal_tab && cl_abap_char_utilities=>cr_lf. lo_nodes->add( | \| \|str \|{ lv_val }\| \|0| ). lv_act = lcl_json_serializer=>stringify( lo_nodes->sorted( ) ). lv_exp = '"a\"\\\t\r\n"'. cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). ENDMETHOD. METHOD empty. DATA lv_act TYPE string. DATA lv_exp TYPE string. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lv_act = lcl_json_serializer=>stringify( lo_nodes->sorted( ) ). lv_exp = ''. cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). ENDMETHOD. ENDCLASS. ********************************************************************** * UTILS ********************************************************************** CLASS ltcl_utils_test DEFINITION FINAL FOR TESTING RISK LEVEL HARMLESS DURATION SHORT. PRIVATE SECTION. METHODS normalize_path FOR TESTING. METHODS split_path FOR TESTING. METHODS validate_array_index FOR TESTING RAISING zcx_abapgit_ajson_error. ENDCLASS. CLASS zcl_abapgit_ajson DEFINITION LOCAL FRIENDS ltcl_utils_test. CLASS ltcl_utils_test IMPLEMENTATION. METHOD validate_array_index. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>validate_array_index( iv_path = 'x' iv_index = '123' ) exp = 123 ). TRY. lcl_utils=>validate_array_index( iv_path = 'x' iv_index = 'a' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error. ENDTRY. TRY. lcl_utils=>validate_array_index( iv_path = 'x' iv_index = '0' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error. ENDTRY. ENDMETHOD. METHOD normalize_path. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>normalize_path( '' ) exp = '/' ). cl_abap_unit_assert=>assert_equals( act = lcl_utils=>normalize_path( '/' ) exp = '/' ). cl_abap_unit_assert=>assert_equals( act = lcl_utils=>normalize_path( 'abc' ) exp = '/abc/' ). cl_abap_unit_assert=>assert_equals( act = lcl_utils=>normalize_path( '/abc' ) exp = '/abc/' ). cl_abap_unit_assert=>assert_equals( act = lcl_utils=>normalize_path( 'abc/' ) exp = '/abc/' ). cl_abap_unit_assert=>assert_equals( act = lcl_utils=>normalize_path( '/abc/' ) exp = '/abc/' ). ENDMETHOD. METHOD split_path. DATA ls_exp TYPE zif_abapgit_ajson=>ty_path_name. DATA lv_path TYPE string. lv_path = ''. " alias to root ls_exp-path = ''. ls_exp-name = ''. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>split_path( lv_path ) exp = ls_exp ). lv_path = '/'. ls_exp-path = ''. ls_exp-name = ''. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>split_path( lv_path ) exp = ls_exp ). lv_path = '/abc/'. ls_exp-path = '/'. ls_exp-name = 'abc'. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>split_path( lv_path ) exp = ls_exp ). lv_path = 'abc'. ls_exp-path = '/'. ls_exp-name = 'abc'. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>split_path( lv_path ) exp = ls_exp ). lv_path = '/abc'. ls_exp-path = '/'. ls_exp-name = 'abc'. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>split_path( lv_path ) exp = ls_exp ). lv_path = 'abc/'. ls_exp-path = '/'. ls_exp-name = 'abc'. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>split_path( lv_path ) exp = ls_exp ). lv_path = '/abc/xyz'. ls_exp-path = '/abc/'. ls_exp-name = 'xyz'. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>split_path( lv_path ) exp = ls_exp ). lv_path = '/abc/xyz/'. ls_exp-path = '/abc/'. ls_exp-name = 'xyz'. cl_abap_unit_assert=>assert_equals( act = lcl_utils=>split_path( lv_path ) exp = ls_exp ). ENDMETHOD. ENDCLASS. ********************************************************************** * READER ********************************************************************** CLASS ltcl_reader_test DEFINITION FINAL FOR TESTING RISK LEVEL HARMLESS DURATION SHORT. PRIVATE SECTION. METHODS get_value FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS get_node_type FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS exists FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS value_integer FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS value_number FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS value_boolean FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS value_string FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS members FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS slice FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS array_to_string_table FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS get_date FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS get_timestamp FOR TESTING RAISING zcx_abapgit_ajson_error. ENDCLASS. CLASS zcl_abapgit_ajson DEFINITION LOCAL FRIENDS ltcl_reader_test. CLASS ltcl_reader_test IMPLEMENTATION. METHOD slice. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | |2' ). lo_nodes->add( '/ |1 |object | |1 |5' ). lo_nodes->add( '/1/ |message |str |Indentation problem ... | |0' ). lo_nodes->add( '/1/ |key |str |indentation | |0' ). lo_nodes->add( '/1/ |start |object | | |2' ). lo_nodes->add( '/1/start/ |row |num |4 | |0' ). lo_nodes->add( '/1/start/ |col |num |3 | |0' ). lo_nodes->add( '/1/ |end |object | | |2' ). lo_nodes->add( '/1/end/ |row |num |4 | |0' ). lo_nodes->add( '/1/end/ |col |num |26 | |0' ). lo_nodes->add( '/1/ |filename |str |./zxxx.prog.abap | |0' ). lo_nodes->add( '/ |2 |object | |2 |5' ). lo_nodes->add( '/2/ |message |str |Remove space before XXX | |0' ). lo_nodes->add( '/2/ |key |str |space_before_dot | |0' ). lo_nodes->add( '/2/ |start |object | | |2' ). lo_nodes->add( '/2/start/ |row |num |3 | |0' ). lo_nodes->add( '/2/start/ |col |num |21 | |0' ). lo_nodes->add( '/2/ |end |object | | |2' ). lo_nodes->add( '/2/end/ |row |num |3 | |0' ). lo_nodes->add( '/2/end/ |col |num |22 | |0' ). lo_nodes->add( '/2/ |filename |str |./zxxx.prog.abap | |0' ). lo_cut = zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). lo_cut ?= lo_cut->zif_abapgit_ajson~slice( '/issues' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). " ********************************************************************** CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |8' ). lo_nodes->add( '/ |string |str |abc | |0' ). lo_nodes->add( '/ |number |num |123 | |0' ). lo_nodes->add( '/ |float |num |123.45 | |0' ). lo_nodes->add( '/ |boolean |bool |true | |0' ). lo_nodes->add( '/ |false |bool |false | |0' ). lo_nodes->add( '/ |null |null | | |0' ). lo_nodes->add( '/ |date |str |2020-03-15 | |0' ). lo_nodes->add( '/ |issues |array | | |2' ). lo_nodes->add( '/issues/ |1 |object | |1 |5' ). lo_nodes->add( '/issues/1/ |message |str |Indentation problem ... | |0' ). lo_nodes->add( '/issues/1/ |key |str |indentation | |0' ). lo_nodes->add( '/issues/1/ |start |object | | |2' ). lo_nodes->add( '/issues/1/start/ |row |num |4 | |0' ). lo_nodes->add( '/issues/1/start/ |col |num |3 | |0' ). lo_nodes->add( '/issues/1/ |end |object | | |2' ). lo_nodes->add( '/issues/1/end/ |row |num |4 | |0' ). lo_nodes->add( '/issues/1/end/ |col |num |26 | |0' ). lo_nodes->add( '/issues/1/ |filename |str |./zxxx.prog.abap | |0' ). lo_nodes->add( '/issues/ |2 |object | |2 |5' ). lo_nodes->add( '/issues/2/ |message |str |Remove space before XXX | |0' ). lo_nodes->add( '/issues/2/ |key |str |space_before_dot | |0' ). lo_nodes->add( '/issues/2/ |start |object | | |2' ). lo_nodes->add( '/issues/2/start/ |row |num |3 | |0' ). lo_nodes->add( '/issues/2/start/ |col |num |21 | |0' ). lo_nodes->add( '/issues/2/ |end |object | | |2' ). lo_nodes->add( '/issues/2/end/ |row |num |3 | |0' ). lo_nodes->add( '/issues/2/end/ |col |num |22 | |0' ). lo_nodes->add( '/issues/2/ |filename |str |./zxxx.prog.abap | |0' ). lo_cut = zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). lo_cut ?= lo_cut->zif_abapgit_ajson~slice( '/' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). " ********************************************************************** CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |2' ). lo_nodes->add( '/ |row |num |3 | |0' ). lo_nodes->add( '/ |col |num |21 | |0' ). lo_cut = zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). lo_cut ?= lo_cut->zif_abapgit_ajson~slice( '/issues/2/start/' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). ENDMETHOD. METHOD get_value. DATA lo_cut TYPE REF TO zif_abapgit_ajson. lo_cut ?= zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get( '/string' ) exp = 'abc' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get( '/string/' ) exp = 'abc' ). " Hmmm ? cl_abap_unit_assert=>assert_equals( act = lo_cut->get( '/boolean' ) exp = 'true' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get( '/issues/2/start/row' ) exp = '3' ). ENDMETHOD. METHOD get_node_type. DATA li_cut TYPE REF TO zif_abapgit_ajson. li_cut = zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). cl_abap_unit_assert=>assert_equals( act = li_cut->get_node_type( '/' ) exp = 'object' ). cl_abap_unit_assert=>assert_equals( act = li_cut->get_node_type( '/string' ) exp = 'str' ). cl_abap_unit_assert=>assert_equals( act = li_cut->get_node_type( '/number' ) exp = 'num' ). cl_abap_unit_assert=>assert_equals( act = li_cut->get_node_type( '/float' ) exp = 'num' ). cl_abap_unit_assert=>assert_equals( act = li_cut->get_node_type( '/boolean' ) exp = 'bool' ). cl_abap_unit_assert=>assert_equals( act = li_cut->get_node_type( '/false' ) exp = 'bool' ). cl_abap_unit_assert=>assert_equals( act = li_cut->get_node_type( '/null' ) exp = 'null' ). cl_abap_unit_assert=>assert_equals( act = li_cut->get_node_type( '/date' ) exp = 'str' ). cl_abap_unit_assert=>assert_equals( act = li_cut->get_node_type( '/issues' ) exp = 'array' ). ENDMETHOD. METHOD get_date. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lv_exp TYPE d. CREATE OBJECT lo_cut. lv_exp = '20200728'. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |1' ). lo_nodes->add( '/ |date1 |str |2020-07-28 | |0' ). lo_cut->mt_json_tree = lo_nodes->mt_nodes. cl_abap_unit_assert=>assert_equals( act = lo_cut->zif_abapgit_ajson~get_date( '/date1' ) exp = lv_exp ). CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |1' ). lo_nodes->add( '/ |date1 |str |2020-07-28T01:00:00Z | |0' ). lo_cut->mt_json_tree = lo_nodes->mt_nodes. cl_abap_unit_assert=>assert_equals( act = lo_cut->zif_abapgit_ajson~get_date( '/date1' ) exp = lv_exp ). CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |1' ). lo_nodes->add( '/ |date1 |str |20200728 | |0' ). lo_cut->mt_json_tree = lo_nodes->mt_nodes. cl_abap_unit_assert=>assert_equals( act = lo_cut->zif_abapgit_ajson~get_date( '/date1' ) exp = '' ). ENDMETHOD. METHOD get_timestamp. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lv_exp TYPE timestamp VALUE `20200728000000`. CREATE OBJECT lo_cut. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |1' ). lo_nodes->add( '/ |timestamp|str |2020-07-28T00:00:00Z | |0' ). lo_cut->mt_json_tree = lo_nodes->mt_nodes. cl_abap_unit_assert=>assert_equals( act = lo_cut->zif_abapgit_ajson~get_timestamp( '/timestamp' ) exp = lv_exp ). ENDMETHOD. METHOD exists. DATA lo_cut TYPE REF TO zif_abapgit_ajson. lo_cut ?= zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). cl_abap_unit_assert=>assert_equals( act = lo_cut->exists( '/string' ) exp = abap_true ). cl_abap_unit_assert=>assert_equals( act = lo_cut->exists( '/string/' ) exp = abap_true ). " mmmm ? cl_abap_unit_assert=>assert_equals( act = lo_cut->exists( '/xxx' ) exp = abap_false ). cl_abap_unit_assert=>assert_equals( act = lo_cut->exists( '/issues/2/start/row' ) exp = abap_true ). ENDMETHOD. METHOD value_integer. DATA lo_cut TYPE REF TO zif_abapgit_ajson. lo_cut ?= zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_integer( '/string' ) exp = 0 ). " Hmmmm ???? cl_abap_unit_assert=>assert_equals( act = lo_cut->get_integer( '/number' ) exp = 123 ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_integer( '/float' ) exp = 123 ). ENDMETHOD. METHOD value_number. DATA lo_cut TYPE REF TO zif_abapgit_ajson. lo_cut ?= zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_number( '/string' ) exp = 0 ). " Hmmmm ???? cl_abap_unit_assert=>assert_equals( act = lo_cut->get_number( '/number' ) exp = +'123.0' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_number( '/float' ) exp = +'123.45' ). ENDMETHOD. METHOD value_boolean. DATA lo_cut TYPE REF TO zif_abapgit_ajson. lo_cut ?= zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_boolean( '/string' ) exp = abap_true ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_boolean( '/number' ) exp = abap_true ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_boolean( '/xxx' ) exp = abap_false ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_boolean( '/boolean' ) exp = abap_true ). ENDMETHOD. METHOD value_string. DATA lo_cut TYPE REF TO zif_abapgit_ajson. lo_cut ?= zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_string( '/string' ) exp = 'abc' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_string( '/number' ) exp = '123' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_string( '/xxx' ) exp = '' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->get_string( '/boolean' ) exp = 'true' ). ENDMETHOD. METHOD members. DATA lt_exp TYPE string_table. DATA lo_cut TYPE REF TO zif_abapgit_ajson. lo_cut ?= zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). CLEAR lt_exp. APPEND '1' TO lt_exp. APPEND '2' TO lt_exp. cl_abap_unit_assert=>assert_equals( act = lo_cut->members( '/issues' ) exp = lt_exp ). CLEAR lt_exp. APPEND 'col' TO lt_exp. APPEND 'row' TO lt_exp. cl_abap_unit_assert=>assert_equals( act = lo_cut->members( '/issues/1/start/' ) exp = lt_exp ). ENDMETHOD. METHOD array_to_string_table. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lt_act TYPE string_table. DATA lt_exp TYPE string_table. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | |6' ). lo_nodes->add( '/ |1 |num |123 |1|0' ). lo_nodes->add( '/ |2 |num |234 |2|0' ). lo_nodes->add( '/ |3 |str |abc |3|0' ). lo_nodes->add( '/ |4 |bool |true |4|0' ). lo_nodes->add( '/ |5 |bool |false |5|0' ). lo_nodes->add( '/ |6 |null |null |6|0' ). APPEND '123' TO lt_exp. APPEND '234' TO lt_exp. APPEND 'abc' TO lt_exp. APPEND 'X' TO lt_exp. APPEND '' TO lt_exp. APPEND '' TO lt_exp. CREATE OBJECT lo_cut. lo_cut->mt_json_tree = lo_nodes->mt_nodes. lt_act = lo_cut->zif_abapgit_ajson~array_to_string_table( '/' ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = lt_exp ). " negative DATA lx TYPE REF TO zcx_abapgit_ajson_error. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |1' ). lo_nodes->add( '/ |a |str |abc | |0' ). lo_cut->mt_json_tree = lo_nodes->mt_nodes. TRY. lo_cut->zif_abapgit_ajson~array_to_string_table( '/x' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Path not found: /x' ). ENDTRY. TRY. lo_cut->zif_abapgit_ajson~array_to_string_table( '/' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Array expected at: /' ). ENDTRY. TRY. lo_cut->zif_abapgit_ajson~array_to_string_table( '/a' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Array expected at: /a' ). ENDTRY. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | |1' ). lo_nodes->add( '/ |1 |object | |1|0' ). lo_cut->mt_json_tree = lo_nodes->mt_nodes. TRY. lo_cut->zif_abapgit_ajson~array_to_string_table( '/' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Cannot convert [object] to string at [/1]' ). ENDTRY. ENDMETHOD. ENDCLASS. ********************************************************************** * JSON TO ABAP ********************************************************************** CLASS ltcl_json_to_abap DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL. PRIVATE SECTION. TYPES: BEGIN OF ty_struc, a TYPE string, b TYPE i, END OF ty_struc, tty_struc TYPE STANDARD TABLE OF ty_struc WITH DEFAULT KEY, tty_struc_sorted TYPE SORTED TABLE OF ty_struc WITH UNIQUE KEY a, tty_struc_hashed TYPE HASHED TABLE OF ty_struc WITH UNIQUE KEY a, BEGIN OF ty_complex, str TYPE string, int TYPE i, float TYPE f, bool TYPE abap_bool, obj TYPE ty_struc, tab TYPE tty_struc, tab_plain TYPE string_table, tab_hashed TYPE tty_struc_hashed, oref TYPE REF TO object, date1 TYPE d, date2 TYPE d, timestamp1 TYPE timestamp, timestamp2 TYPE timestamp, timestamp3 TYPE timestamp, END OF ty_complex. METHODS to_abap_struc FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS to_abap_value FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS to_abap_array FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS to_abap_array_of_arrays FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS to_abap_w_tab_of_struc FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS to_abap_w_plain_tab FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS to_abap_hashed_tab FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS to_abap_sorted_tab FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS to_abap_hashed_plain_tab FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS to_abap_negative FOR TESTING RAISING zcx_abapgit_ajson_error. ENDCLASS. CLASS ltcl_json_to_abap IMPLEMENTATION. METHOD to_abap_struc. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA ls_mock TYPE ty_complex. DATA ls_exp TYPE ty_complex. DATA lv_exp_date TYPE d VALUE '20200728'. DATA lv_exp_timestamp TYPE timestamp VALUE '20200728000000'. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | ' ). lo_nodes->add( '/ |str |str |hello | ' ). lo_nodes->add( '/ |int |num |5 | ' ). lo_nodes->add( '/ |float |num |5.5 | ' ). lo_nodes->add( '/ |bool |bool |true | ' ). lo_nodes->add( '/ |obj |object | | ' ). lo_nodes->add( '/obj/ |a |str |world | ' ). lo_nodes->add( '/ |tab |array | | ' ). lo_nodes->add( '/ |date1 |str |2020-07-28 | ' ). lo_nodes->add( '/ |date2 |str |2020-07-28T00:00:00Z | ' ). lo_nodes->add( '/ |timestamp1 |str |2020-07-28T00:00:00 | ' ). lo_nodes->add( '/ |timestamp2 |str |2020-07-28T00:00:00Z | ' ). lo_nodes->add( '/ |timestamp3 |str |2020-07-28T01:00:00+01:00 | ' ). CREATE OBJECT lo_cut. lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = ls_mock ). ls_exp-str = 'hello'. ls_exp-int = 5. ls_exp-float = '5.5'. ls_exp-bool = abap_true. ls_exp-obj-a = 'world'. ls_exp-date1 = lv_exp_date. ls_exp-date2 = lv_exp_date. ls_exp-timestamp1 = lv_exp_timestamp. ls_exp-timestamp2 = lv_exp_timestamp. ls_exp-timestamp3 = lv_exp_timestamp. cl_abap_unit_assert=>assert_equals( act = ls_mock exp = ls_exp ). ENDMETHOD. METHOD to_abap_value. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA lv_mock TYPE string. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |str |hello | ' ). CREATE OBJECT lo_cut. lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lv_mock ). cl_abap_unit_assert=>assert_equals( act = lv_mock exp = 'hello' ). ENDMETHOD. METHOD to_abap_array. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA lt_mock TYPE string_table. DATA lt_exp TYPE string_table. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | ' ). lo_nodes->add( '/ |1 |str |One |1' ). lo_nodes->add( '/ |2 |str |Two |2' ). CREATE OBJECT lo_cut. lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lt_mock ). APPEND 'One' TO lt_exp. APPEND 'Two' TO lt_exp. cl_abap_unit_assert=>assert_equals( act = lt_mock exp = lt_exp ). ENDMETHOD. METHOD to_abap_array_of_arrays. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA lt_mock TYPE TABLE OF string_table. DATA lt_exp TYPE TABLE OF string_table. DATA lt_tmp TYPE string_table. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | ' ). lo_nodes->add( '/ |1 |array | |1' ). lo_nodes->add( '/ |2 |array | |2' ). lo_nodes->add( '/1/ |1 |str |One |1' ). lo_nodes->add( '/1/ |2 |str |Two |2' ). lo_nodes->add( '/2/ |1 |str |Three |1' ). lo_nodes->add( '/2/ |2 |str |Four |2' ). CREATE OBJECT lo_cut. lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lt_mock ). APPEND 'One' TO lt_tmp. APPEND 'Two' TO lt_tmp. APPEND lt_tmp TO lt_exp. CLEAR lt_tmp. APPEND 'Three' TO lt_tmp. APPEND 'Four' TO lt_tmp. APPEND lt_tmp TO lt_exp. cl_abap_unit_assert=>assert_equals( act = lt_mock exp = lt_exp ). ENDMETHOD. METHOD to_abap_w_tab_of_struc. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA ls_mock TYPE ty_complex. DATA ls_exp TYPE ty_complex. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | ' ). lo_nodes->add( '/ |tab |array | | ' ). lo_nodes->add( '/tab/ |1 |object | |1' ). lo_nodes->add( '/tab/1/|a |str |One | ' ). lo_nodes->add( '/tab/ |2 |object | |2' ). lo_nodes->add( '/tab/2/|a |str |Two | ' ). CREATE OBJECT lo_cut. lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = ls_mock ). DATA ls_elem LIKE LINE OF ls_exp-tab. ls_elem-a = 'One'. APPEND ls_elem TO ls_exp-tab. ls_elem-a = 'Two'. APPEND ls_elem TO ls_exp-tab. cl_abap_unit_assert=>assert_equals( act = ls_mock exp = ls_exp ). ENDMETHOD. METHOD to_abap_w_plain_tab. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA ls_mock TYPE ty_complex. DATA ls_exp TYPE ty_complex. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | ' ). lo_nodes->add( '/ |tab_plain |array | | ' ). lo_nodes->add( '/tab_plain/ |1 |str |One |1' ). lo_nodes->add( '/tab_plain/ |2 |str |Two |2' ). CREATE OBJECT lo_cut. lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = ls_mock ). APPEND 'One' TO ls_exp-tab_plain. APPEND 'Two' TO ls_exp-tab_plain. cl_abap_unit_assert=>assert_equals( act = ls_mock exp = ls_exp ). ENDMETHOD. METHOD to_abap_hashed_plain_tab. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA lt_mock TYPE HASHED TABLE OF string WITH UNIQUE KEY table_line. DATA lt_exp TYPE HASHED TABLE OF string WITH UNIQUE KEY table_line. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | ' ). lo_nodes->add( '/ |1 |str |One |1' ). lo_nodes->add( '/ |2 |str |Two |2' ). CREATE OBJECT lo_cut. lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lt_mock ). INSERT `One` INTO TABLE lt_exp. INSERT `Two` INTO TABLE lt_exp. cl_abap_unit_assert=>assert_equals( act = lt_mock exp = lt_exp ). ENDMETHOD. METHOD to_abap_hashed_tab. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA lt_mock TYPE tty_struc_hashed. DATA lt_exp TYPE tty_struc_hashed. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | ' ). lo_nodes->add( '/ |1 |object | |1' ). lo_nodes->add( '/ |2 |object | |2' ). lo_nodes->add( '/1/ |a |str |One | ' ). lo_nodes->add( '/1/ |b |num |1 | ' ). lo_nodes->add( '/2/ |a |str |Two | ' ). lo_nodes->add( '/2/ |b |num |2 | ' ). CREATE OBJECT lo_cut. lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lt_mock ). DATA ls_elem LIKE LINE OF lt_exp. ls_elem-a = 'One'. ls_elem-b = 1. INSERT ls_elem INTO TABLE lt_exp. ls_elem-a = 'Two'. ls_elem-b = 2. INSERT ls_elem INTO TABLE lt_exp. cl_abap_unit_assert=>assert_equals( act = lt_mock exp = lt_exp ). ENDMETHOD. METHOD to_abap_sorted_tab. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA lt_mock TYPE tty_struc_sorted. DATA lt_exp TYPE tty_struc_sorted. DATA lo_nodes TYPE REF TO lcl_nodes_helper. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | ' ). lo_nodes->add( '/ |1 |object | |1' ). lo_nodes->add( '/ |2 |object | |2' ). lo_nodes->add( '/1/ |a |str |One | ' ). lo_nodes->add( '/1/ |b |num |1 | ' ). lo_nodes->add( '/2/ |a |str |Two | ' ). lo_nodes->add( '/2/ |b |num |2 | ' ). CREATE OBJECT lo_cut. lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lt_mock ). DATA ls_elem LIKE LINE OF lt_exp. ls_elem-a = 'One'. ls_elem-b = 1. INSERT ls_elem INTO TABLE lt_exp. ls_elem-a = 'Two'. ls_elem-b = 2. INSERT ls_elem INTO TABLE lt_exp. cl_abap_unit_assert=>assert_equals( act = lt_mock exp = lt_exp ). ENDMETHOD. METHOD to_abap_negative. DATA lo_cut TYPE REF TO lcl_json_to_abap. DATA lx TYPE REF TO zcx_abapgit_ajson_error. DATA ls_mock TYPE ty_complex. CREATE OBJECT lo_cut. DATA lo_nodes TYPE REF TO lcl_nodes_helper. TRY. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ' ). lo_nodes->add( '/ |str |object | ' ). lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = ls_mock ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Expected structure' ). ENDTRY. TRY. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ' ). lo_nodes->add( '/ |str |array | ' ). lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = ls_mock ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Expected table' ). ENDTRY. TRY. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ' ). lo_nodes->add( '/ |int |str |hello ' ). lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = ls_mock ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Source is not a number' ). ENDTRY. TRY. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ' ). lo_nodes->add( '/ |date1 |str |baddate ' ). lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = ls_mock ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Unexpected date format' ). ENDTRY. TRY. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ' ). lo_nodes->add( '/ |missing |str |123 ' ). lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = ls_mock ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Path not found' ). ENDTRY. TRY. DATA lt_str TYPE string_table. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | ' ). lo_nodes->add( '/ |a |str |hello |1' ). lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lt_str ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Need index to access tables' ). ENDTRY. TRY. DATA lr_obj TYPE REF TO object. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |str |hello | ' ). lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lr_obj ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Cannot assign to ref' ). ENDTRY. TRY. DATA lr_data TYPE REF TO data. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |str |hello | ' ). lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lr_data ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Cannot assign to ref' ). ENDTRY. TRY. DATA lt_hashed TYPE HASHED TABLE OF string WITH UNIQUE KEY table_line. CREATE OBJECT lo_nodes. lo_nodes->add( ' | |array | | ' ). lo_nodes->add( '/ |1 |str |One |1' ). lo_nodes->add( '/ |2 |str |One |2' ). lo_cut->to_abap( EXPORTING it_nodes = lo_nodes->sorted( ) CHANGING c_container = lt_hashed ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Duplicate insertion' ). ENDTRY. ENDMETHOD. ENDCLASS. ********************************************************************** * WRITER ********************************************************************** CLASS ltcl_writer_test DEFINITION FINAL FOR TESTING RISK LEVEL HARMLESS DURATION SHORT. PRIVATE SECTION. METHODS set_ajson FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_value FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS ignore_empty FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_obj FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_obj_w_date_time FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_tab FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_tab_hashed FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS prove_path_exists FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS delete_subtree FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS delete FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS arrays FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS arrays_negative FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS root_assignment FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_bool FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_str FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_int FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_date FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_timestamp FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS read_only FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_array_obj FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_with_type FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_with_type_slice IMPORTING io_json_in TYPE REF TO zcl_abapgit_ajson io_json_out TYPE REF TO zif_abapgit_ajson iv_path TYPE string RAISING zcx_abapgit_ajson_error. ENDCLASS. CLASS zcl_abapgit_ajson DEFINITION LOCAL FRIENDS ltcl_writer_test. CLASS ltcl_writer_test IMPLEMENTATION. METHOD prove_path_exists. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. lo_cut = zcl_abapgit_ajson=>create_empty( ). CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |object | ||1' ). lo_nodes_exp->add( '/a/ |b |object | ||1' ). lo_nodes_exp->add( '/a/b/ |c |object | ||1' ). lo_nodes_exp->add( '/a/b/c/ |d |object | ||0' ). lo_cut->prove_path_exists( '/a/b/c/d/' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |object | ||1' ). lo_nodes_exp->add( '/a/ |b |object | ||1' ). lo_nodes_exp->add( '/a/b/ |c |object | ||1' ). lo_nodes_exp->add( '/a/b/c/ |d |object | ||1' ). lo_nodes_exp->add( '/a/b/c/d |e |object | ||0' ). lo_cut->prove_path_exists( '/a/b/c/d/e/' ). ENDMETHOD. METHOD delete_subtree. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. lo_cut = zcl_abapgit_ajson=>create_empty( ). CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |object | ||1' ). lo_nodes_exp->add( '/a/ |b |object | ||1' ). lo_nodes_exp->add( '/a/b/ |c |object | ||1' ). lo_nodes_exp->add( '/a/b/c/ |d |object | ||0' ). lo_cut->mt_json_tree = lo_nodes_exp->mt_nodes. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |object | ||0' ). lo_cut->delete_subtree( iv_path = '/a/' iv_name = 'b' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD delete. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. lo_cut = zcl_abapgit_ajson=>create_empty( ). CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |object | ||1' ). lo_nodes_exp->add( '/a/ |b |object | ||1' ). lo_nodes_exp->add( '/a/b/ |c |object | ||1' ). lo_nodes_exp->add( '/a/b/c/ |d |object | ||0' ). lo_cut->mt_json_tree = lo_nodes_exp->mt_nodes. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |object | ||0' ). lo_cut->zif_abapgit_ajson~delete( iv_path = '/a/b' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |object | ||1' ). lo_nodes_exp->add( '/a/ |b |object | ||1' ). lo_nodes_exp->add( '/a/b/ |c |object | ||1' ). lo_nodes_exp->add( '/a/b/c/ |d |object | ||0' ). lo_cut->mt_json_tree = lo_nodes_exp->mt_nodes. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |object | ||0' ). lo_cut->zif_abapgit_ajson~delete( iv_path = '/a/b/' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD set_ajson. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lo_src TYPE REF TO zcl_abapgit_ajson. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. lo_src = zcl_abapgit_ajson=>create_empty( ). lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. " Prepare source CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ||1' ). lo_nodes->add( '/ |x |object | ||2' ). lo_nodes->add( '/x/ |b |str |abc ||0' ). lo_nodes->add( '/x/ |c |num |10 ||0' ). lo_src->mt_json_tree = lo_nodes->mt_nodes. " Test 1 - assign root li_writer->set( iv_path = '' iv_val = lo_src ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). li_writer->set( iv_path = '/' iv_val = lo_src ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). " Test 2 - assign deep CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ||1' ). lo_nodes->add( '/ |a |object | ||1' ). lo_nodes->add( '/a/ |b |object | ||1' ). lo_nodes->add( '/a/b/ |c |object | ||1' ). lo_nodes->add( '/a/b/c/ |x |object | ||2' ). lo_nodes->add( '/a/b/c/x/ |b |str |abc ||0' ). lo_nodes->add( '/a/b/c/x/ |c |num |10 ||0' ). li_writer->clear( ). li_writer->set( iv_path = '/a/b/c' iv_val = lo_src ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). " Test 3 - assign rewrite CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ||1' ). lo_nodes->add( '/ |a |object | ||1' ). lo_nodes->add( '/a/ |b |object | ||1' ). lo_nodes->add( '/a/b/ |x |object | ||2' ). lo_nodes->add( '/a/b/x/ |b |str |abc ||0' ). lo_nodes->add( '/a/b/x/ |c |num |10 ||0' ). li_writer->set( iv_path = '/a/b' iv_val = lo_src ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). ENDMETHOD. METHOD set_value. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. " Prepare source CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ||1' ). lo_nodes->add( '/ |x |object | ||2' ). lo_nodes->add( '/x/ |b |str |abc ||0' ). lo_nodes->add( '/x/ |c |num |10 ||0' ). li_writer->set( iv_path = '/x/b' iv_val = 'abc' ). li_writer->set( iv_path = '/x/c' iv_val = 10 ). li_writer->set( " ignore empty iv_path = '/x/d' iv_val = 0 ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). ENDMETHOD. METHOD ignore_empty. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA li_cut TYPE REF TO zif_abapgit_ajson. li_cut = zcl_abapgit_ajson=>create_empty( ). CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ||1' ). lo_nodes->add( '/ |a |num |1 ||0' ). li_cut->set( iv_path = '/a' iv_val = 1 ). li_cut->set( " ignore empty iv_path = '/b' iv_val = 0 ). cl_abap_unit_assert=>assert_equals( act = li_cut->mt_json_tree exp = lo_nodes->sorted( ) ). CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ||2' ). lo_nodes->add( '/ |a |num |1 ||0' ). lo_nodes->add( '/ |b |num |0 ||0' ). li_cut->set( iv_ignore_empty = abap_false iv_path = '/b' iv_val = 0 ). cl_abap_unit_assert=>assert_equals( act = li_cut->mt_json_tree exp = lo_nodes->sorted( ) ). ENDMETHOD. METHOD set_obj. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA: BEGIN OF ls_struc, b TYPE string VALUE 'abc', c TYPE i VALUE 10, d TYPE d VALUE '20220401', END OF ls_struc. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. " Prepare source CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ||1' ). lo_nodes->add( '/ |x |object | ||3' ). lo_nodes->add( '/x/ |b |str |abc ||0' ). lo_nodes->add( '/x/ |c |num |10 ||0' ). lo_nodes->add( '/x/ |d |str |20220401 ||0' ). li_writer->set( iv_path = '/x' iv_val = ls_struc ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). ENDMETHOD. METHOD set_obj_w_date_time. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lo_cut TYPE REF TO zif_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA: BEGIN OF ls_struc, d TYPE d VALUE '20220401', d_empty TYPE d, t TYPE t VALUE '200103', t_empty TYPE t, ts TYPE timestamp VALUE '20220401200103', p(5) TYPE p DECIMALS 2 VALUE '123.45', END OF ls_struc. lo_cut = zcl_abapgit_ajson=>create_empty( )->format_datetime( ). li_writer = lo_cut. " Prepare source CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ||6' ). lo_nodes->add( '/ |d |str |2022-04-01 ||0' ). lo_nodes->add( '/ |d_empty |str | ||0' ). lo_nodes->add( '/ |t |str |20:01:03 ||0' ). lo_nodes->add( '/ |t_empty |str | ||0' ). lo_nodes->add( '/ |ts |str |2022-04-01T20-01-03Z ||0' ). lo_nodes->add( '/ |p |num |123.45 ||0' ). li_writer->set( iv_path = '/' iv_val = ls_struc ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). ENDMETHOD. METHOD set_tab. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA lt_tab TYPE string_table. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. APPEND 'hello' TO lt_tab. APPEND 'world' TO lt_tab. " Prepare source CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |1' ). lo_nodes->add( '/ |x |array | | |2' ). lo_nodes->add( '/x/ |1 |str |hello|1|0' ). lo_nodes->add( '/x/ |2 |str |world|2|0' ). li_writer->set( iv_path = '/x' iv_val = lt_tab ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). ENDMETHOD. METHOD set_tab_hashed. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA lt_tab TYPE HASHED TABLE OF string WITH UNIQUE DEFAULT KEY. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. INSERT `hello` INTO TABLE lt_tab. INSERT `world` INTO TABLE lt_tab. " Prepare source CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | | |1' ). lo_nodes->add( '/ |x |array | | |2' ). lo_nodes->add( '/x/ |1 |str |hello|1|0' ). lo_nodes->add( '/x/ |2 |str |world|2|0' ). li_writer->set( iv_path = '/x' iv_val = lt_tab ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes->sorted( ) ). ENDMETHOD. METHOD arrays. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA li_writer TYPE REF TO zif_abapgit_ajson. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. " touch CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | | |1' ). lo_nodes_exp->add( '/ |a |array | | |0' ). li_writer->touch_array( iv_path = '/a' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " add string CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | | |1' ). lo_nodes_exp->add( '/ |a |array | | |1' ). lo_nodes_exp->add( '/a/ |1 |str |hello|1|0' ). li_writer->push( iv_path = '/a' iv_val = 'hello' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " add obj CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | | |1' ). lo_nodes_exp->add( '/ |a |array | | |2' ). lo_nodes_exp->add( '/a/ |1 |str |hello|1|0' ). lo_nodes_exp->add( '/a/ |2 |object | |2|1' ). lo_nodes_exp->add( '/a/2/ |x |str |world| |0' ). DATA: BEGIN OF ls_dummy, x TYPE string VALUE 'world', END OF ls_dummy. li_writer->push( iv_path = '/a' iv_val = ls_dummy ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " re-touch li_writer->touch_array( iv_path = '/a' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " re-touch with clear CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | | |1' ). lo_nodes_exp->add( '/ |a |array | | |0' ). li_writer->touch_array( iv_path = '/a' iv_clear = abap_true ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " free-add array item (index must be updated) CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | | |1' ). lo_nodes_exp->add( '/ |a |array | | |2' ). lo_nodes_exp->add( '/a/ |1 |object | |1|1' ). lo_nodes_exp->add( '/a/1/ |x |num |123 | |0' ). lo_nodes_exp->add( '/a/ |2 |num |234 |2|0' ). li_writer->set( iv_path = '/a/1/x' iv_val = 123 ). li_writer->set( iv_path = '/a/2' iv_val = 234 ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD arrays_negative. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. li_writer->touch_array( iv_path = '/a' ). li_writer->push( iv_path = '/a' iv_val = 123 ). " touch another node DATA lx TYPE REF TO zcx_abapgit_ajson_error. TRY. li_writer->touch_array( iv_path = '/a/1' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Path [/a/1] already used and is not array' ). ENDTRY. " push to not array TRY. li_writer->push( iv_path = '/a/1' iv_val = 123 ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Path [/a/1] is not array' ). ENDTRY. " push to not array TRY. li_writer->push( iv_path = '/x' iv_val = 123 ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Path [/x] does not exist' ). ENDTRY. " set array item with non-numeric key TRY. li_writer->set( iv_path = '/a/abc/x' iv_val = 123 ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Cannot add non-numeric key [abc] to array [/a/]' ). ENDTRY. TRY. li_writer->set( iv_path = '/a/abc' iv_val = 123 ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Cannot add non-numeric key [abc] to array [/a/]' ). ENDTRY. " set array item with zero key TRY. li_writer->set( iv_path = '/a/0' iv_val = 123 ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error INTO lx. cl_abap_unit_assert=>assert_equals( act = lx->message exp = 'Cannot add zero key to array [/a/]' ). ENDTRY. ENDMETHOD. METHOD root_assignment. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA: BEGIN OF ls_dummy, x TYPE string VALUE 'hello', END OF ls_dummy. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. " object CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |x |str |hello||0' ). li_writer->set( iv_path = '/' iv_val = ls_dummy ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " object empty path CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |x |str |hello||0' ). li_writer->clear( ). li_writer->set( iv_path = '' iv_val = ls_dummy ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " array CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |array | | |1' ). lo_nodes_exp->add( '/ |1 |str |hello|1|0' ). li_writer->clear( ). li_writer->touch_array( iv_path = '' ). li_writer->push( iv_path = '' iv_val = 'hello' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " value CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |str |hello||0' ). li_writer->clear( ). li_writer->set( iv_path = '' iv_val = 'hello' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD set_bool. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA lt_tab TYPE string_table. " abap_bool lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||2' ). lo_nodes_exp->add( '/ |a |bool |true ||0' ). lo_nodes_exp->add( '/ |b |bool |false ||0' ). li_writer->set_boolean( iv_path = '/a' iv_val = abap_true ). li_writer->set_boolean( iv_path = '/b' iv_val = abap_false ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " int lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||2' ). lo_nodes_exp->add( '/ |a |bool |true ||0' ). lo_nodes_exp->add( '/ |b |bool |false ||0' ). li_writer->set_boolean( iv_path = '/a' iv_val = 1 ). li_writer->set_boolean( iv_path = '/b' iv_val = 0 ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). " tab lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||2' ). lo_nodes_exp->add( '/ |a |bool |true ||0' ). lo_nodes_exp->add( '/ |b |bool |false ||0' ). APPEND 'hello' TO lt_tab. li_writer->set_boolean( iv_path = '/a' iv_val = lt_tab ). CLEAR lt_tab. li_writer->set_boolean( iv_path = '/b' iv_val = lt_tab ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD set_str. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA lv_date TYPE d. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||3' ). lo_nodes_exp->add( '/ |a |str |123 ||0' ). lo_nodes_exp->add( '/ |b |str |X ||0' ). lo_nodes_exp->add( '/ |c |str |20200705 ||0' ). li_writer->set_string( iv_path = '/a' iv_val = '123' ). li_writer->set_string( iv_path = '/b' iv_val = abap_true ). lv_date = '20200705'. li_writer->set_string( iv_path = '/c' iv_val = lv_date ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD set_int. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA li_writer TYPE REF TO zif_abapgit_ajson. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |num |123 ||0' ). li_writer->set_integer( iv_path = '/a' iv_val = 123 ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD set_date. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA lv_date TYPE d. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||2' ). lo_nodes_exp->add( '/ |a |str |2020-07-05 ||0' ). lo_nodes_exp->add( '/ |b |str | ||0' ). lv_date = '20200705'. li_writer->set_date( iv_path = '/a' iv_val = lv_date ). CLEAR lv_date. li_writer->set_date( iv_path = '/b' iv_val = lv_date ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD set_timestamp. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA lv_timestamp TYPE timestamp. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||1' ). lo_nodes_exp->add( '/ |a |str |2021-05-05T12-00-00Z ||0' ). lv_timestamp = '20210505120000'. li_writer->set_timestamp( iv_path = '/a' iv_val = lv_timestamp ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD read_only. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. " Prepare source li_writer->set( iv_path = '/a' iv_val = 'abc' ). li_writer->touch_array( iv_path = '/b' ). li_writer->push( iv_path = '/b' iv_val = 'abc' ). lo_cut->freeze( ). TRY. li_writer->set( iv_path = '/c' iv_val = 'abc' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error. ENDTRY. TRY. li_writer->touch_array( iv_path = '/d' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error. ENDTRY. TRY. li_writer->push( iv_path = '/b' iv_val = 'xyz' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error. ENDTRY. TRY. li_writer->delete( iv_path = '/a' ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error. ENDTRY. TRY. li_writer->clear( ). cl_abap_unit_assert=>fail( ). CATCH zcx_abapgit_ajson_error. ENDTRY. ENDMETHOD. METHOD set_array_obj. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA li_writer TYPE REF TO zif_abapgit_ajson. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | | |1' ). lo_nodes_exp->add( '/ |issues |array | | |2' ). lo_nodes_exp->add( '/issues/ |1 |object | |1 |1' ). lo_nodes_exp->add( '/issues/ |2 |object | |2 |1' ). lo_nodes_exp->add( '/issues/1/ |end |object | | |2' ). lo_nodes_exp->add( '/issues/1/end/ |col |num |26 | |0' ). lo_nodes_exp->add( '/issues/1/end/ |row |num |4 | |0' ). lo_nodes_exp->add( '/issues/2/ |end |object | | |2' ). lo_nodes_exp->add( '/issues/2/end/ |col |num |22 | |0' ). lo_nodes_exp->add( '/issues/2/end/ |row |num |3 | |0' ). lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. li_writer->touch_array( iv_path = '/issues' ). li_writer->set( iv_path = '/issues/1/end/col' iv_val = 26 ). li_writer->set( iv_path = '/issues/1/end/row' iv_val = 4 ). li_writer->set( iv_path = '/issues/2/end/col' iv_val = 22 ). li_writer->set( iv_path = '/issues/2/end/row' iv_val = 3 ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD set_with_type. DATA lo_sample TYPE REF TO zcl_abapgit_ajson. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. lo_sample = zcl_abapgit_ajson=>parse( ltcl_parser_test=>sample_json( ) ). lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. set_with_type_slice( io_json_in = lo_sample io_json_out = li_writer iv_path = '/' ). cl_abap_unit_assert=>assert_equals( act = lo_cut->mt_json_tree exp = lo_sample->mt_json_tree ). ENDMETHOD. METHOD set_with_type_slice. DATA lv_path TYPE string. FIELD-SYMBOLS <node> TYPE zif_abapgit_ajson=>ty_node. LOOP AT io_json_in->mt_json_tree ASSIGNING <node> WHERE path = iv_path. lv_path = <node>-path && <node>-name && '/'. CASE <node>-type. WHEN 'array'. io_json_out->touch_array( lv_path ). set_with_type_slice( io_json_in = io_json_in io_json_out = io_json_out iv_path = lv_path ). WHEN 'object'. set_with_type_slice( io_json_in = io_json_in io_json_out = io_json_out iv_path = lv_path ). WHEN OTHERS. io_json_out->set( iv_path = lv_path iv_val = <node>-value iv_node_type = <node>-type ). ENDCASE. ENDLOOP. ENDMETHOD. ENDCLASS. ********************************************************************** * INTEGRATED ********************************************************************** CLASS ltcl_integrated DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL. PRIVATE SECTION. TYPES: BEGIN OF ty_loc, row TYPE i, col TYPE i, END OF ty_loc, BEGIN OF ty_issue, message TYPE string, key TYPE string, filename TYPE string, start TYPE ty_loc, end TYPE ty_loc, END OF ty_issue, tt_issues TYPE STANDARD TABLE OF ty_issue WITH DEFAULT KEY, BEGIN OF ty_target, string TYPE string, number TYPE i, float TYPE f, boolean TYPE abap_bool, false TYPE abap_bool, null TYPE string, date TYPE string, " ??? TODO issues TYPE tt_issues, END OF ty_target. METHODS reader FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS array_index FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS array_simple FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS stringify FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS item_order_integrated FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS chaining FOR TESTING RAISING zcx_abapgit_ajson_error. ENDCLASS. CLASS ltcl_integrated IMPLEMENTATION. METHOD array_simple. DATA lt_act TYPE string_table. DATA lt_exp TYPE string_table. DATA lv_exp TYPE string. DATA lv_src TYPE string. lv_src = '['. DO 10 TIMES. IF sy-index <> 1. lv_src = lv_src && `, `. ENDIF. lv_src = lv_src && |"{ sy-index }"|. lv_exp = |{ sy-index }|. APPEND lv_exp TO lt_exp. ENDDO. lv_src = lv_src && ']'. DATA li_reader TYPE REF TO zif_abapgit_ajson. li_reader = zcl_abapgit_ajson=>parse( lv_src ). li_reader->to_abap( IMPORTING ev_container = lt_act ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = lt_exp ). ENDMETHOD. METHOD array_index. DATA lt_act TYPE TABLE OF ty_loc. DATA lt_exp TYPE TABLE OF ty_loc. DATA ls_exp TYPE ty_loc. DATA lv_src TYPE string. lv_src = '['. DO 10 TIMES. IF sy-index <> 1. lv_src = lv_src && `, `. ENDIF. lv_src = lv_src && |\{ "row": { sy-index } \}|. ls_exp-row = sy-index. APPEND ls_exp TO lt_exp. ENDDO. lv_src = lv_src && ']'. DATA li_reader TYPE REF TO zif_abapgit_ajson. li_reader = zcl_abapgit_ajson=>parse( lv_src ). li_reader->to_abap( IMPORTING ev_container = lt_act ). cl_abap_unit_assert=>assert_equals( act = lt_act exp = lt_exp ). ENDMETHOD. METHOD reader. DATA lv_source TYPE string. DATA li_reader TYPE REF TO zif_abapgit_ajson. lv_source = ltcl_parser_test=>sample_json( ). li_reader = zcl_abapgit_ajson=>parse( lv_source ). cl_abap_unit_assert=>assert_equals( act = li_reader->get( '/string' ) exp = 'abc' ). DATA ls_act TYPE ty_target. DATA ls_exp TYPE ty_target. FIELD-SYMBOLS <i> LIKE LINE OF ls_exp-issues. ls_exp-string = 'abc'. ls_exp-number = 123. ls_exp-float = '123.45'. ls_exp-boolean = abap_true. ls_exp-false = abap_false. ls_exp-date = '2020-03-15'. APPEND INITIAL LINE TO ls_exp-issues ASSIGNING <i>. <i>-message = 'Indentation problem ...'. <i>-key = 'indentation'. <i>-filename = './zxxx.prog.abap'. <i>-start-row = 4. <i>-start-col = 3. <i>-end-row = 4. <i>-end-col = 26. APPEND INITIAL LINE TO ls_exp-issues ASSIGNING <i>. <i>-message = 'Remove space before XXX'. <i>-key = 'space_before_dot'. <i>-filename = './zxxx.prog.abap'. <i>-start-row = 3. <i>-start-col = 21. <i>-end-row = 3. <i>-end-col = 22. li_reader->to_abap( IMPORTING ev_container = ls_act ). cl_abap_unit_assert=>assert_equals( act = ls_act exp = ls_exp ). ENDMETHOD. METHOD stringify. DATA lo_cut TYPE REF TO zcl_abapgit_ajson. DATA li_writer TYPE REF TO zif_abapgit_ajson. DATA lv_exp TYPE string. DATA: BEGIN OF ls_dummy, x TYPE i, END OF ls_dummy. ls_dummy-x = 1. lo_cut = zcl_abapgit_ajson=>create_empty( ). li_writer = lo_cut. li_writer->set( iv_path = '/a' iv_val = 1 ). li_writer->set( iv_path = '/b' iv_val = 'B' ). li_writer->set( iv_path = '/c' iv_val = abap_true ). li_writer->set_null( iv_path = '/d' ). " simple test lv_exp = '{"a":1,"b":"B","c":true,"d":null}'. cl_abap_unit_assert=>assert_equals( act = lo_cut->stringify( ) exp = lv_exp ). li_writer->touch_array( iv_path = '/e' ). li_writer->touch_array( iv_path = '/f' ). li_writer->push( iv_path = '/f' iv_val = 5 ). li_writer->push( iv_path = '/f' iv_val = ls_dummy ). li_writer->set( iv_path = '/g' iv_val = ls_dummy ). " complex test lv_exp = '{"a":1,"b":"B","c":true,"d":null,"e":[],"f":[5,{"x":1}],"g":{"x":1}}'. cl_abap_unit_assert=>assert_equals( act = lo_cut->stringify( ) exp = lv_exp ). " complex test indented lv_exp = '{\n' && ' "a": 1,\n' && ' "b": "B",\n' && ' "c": true,\n' && ' "d": null,\n' && ' "e": [],\n' && ' "f": [\n' && ' 5,\n' && ' {\n' && ' "x": 1\n' && ' }\n' && ' ],\n' && ' "g": {\n' && ' "x": 1\n' && ' }\n' && '}'. lv_exp = replace( val = lv_exp sub = '\n' with = cl_abap_char_utilities=>newline occ = 0 ). cl_abap_unit_assert=>assert_equals( act = lo_cut->stringify( iv_indent = 2 ) exp = lv_exp ). ENDMETHOD. METHOD item_order_integrated. DATA: BEGIN OF ls_dummy, zulu TYPE string, alpha TYPE string, beta TYPE string, END OF ls_dummy. DATA lv_act TYPE string. DATA lv_exp TYPE string. DATA li_cut TYPE REF TO zif_abapgit_ajson. ls_dummy-alpha = 'a'. ls_dummy-beta = 'b'. ls_dummy-zulu = 'z'. " NAME order li_cut = zcl_abapgit_ajson=>create_empty( ). li_cut->set( iv_path = '/' iv_val = ls_dummy ). lv_act = li_cut->stringify( ). lv_exp = '{"alpha":"a","beta":"b","zulu":"z"}'. cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). " STRUC order (keep) li_cut = zcl_abapgit_ajson=>create_empty( ). li_cut->keep_item_order( ). li_cut->set( iv_path = '/' iv_val = ls_dummy ). lv_act = li_cut->stringify( ). lv_exp = '{"zulu":"z","alpha":"a","beta":"b"}'. cl_abap_unit_assert=>assert_equals( act = lv_act exp = lv_exp ). ENDMETHOD. METHOD chaining. DATA li_cut TYPE REF TO zif_abapgit_ajson. li_cut = zcl_abapgit_ajson=>create_empty( ). cl_abap_unit_assert=>assert_bound( li_cut->set( iv_path = '/a' iv_val = 1 ) ). cl_abap_unit_assert=>assert_bound( li_cut->delete( iv_path = '/a' ) ). cl_abap_unit_assert=>assert_bound( li_cut->touch_array( iv_path = '/array' ) ). cl_abap_unit_assert=>assert_bound( li_cut->push( iv_path = '/array' iv_val = '1' ) ). cl_abap_unit_assert=>assert_bound( li_cut->keep_item_order( ) ). ENDMETHOD. ENDCLASS. ********************************************************************** * ABAP TO JSON ********************************************************************** CLASS ltcl_abap_to_json DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL. PRIVATE SECTION. TYPES: BEGIN OF ty_struc, a TYPE string, b TYPE i, c TYPE abap_bool, d TYPE xsdboolean, END OF ty_struc, tt_struc TYPE STANDARD TABLE OF ty_struc WITH DEFAULT KEY, BEGIN OF ty_struc_complex. INCLUDE TYPE ty_struc. TYPES: el TYPE string, struc TYPE ty_struc, tab TYPE tt_struc, stab TYPE string_table, END OF ty_struc_complex. METHODS set_ajson FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_value_number FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_value_string FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_value_true FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_value_false FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_value_xsdboolean FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_null FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_obj FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_array FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS set_complex_obj FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS prefix FOR TESTING RAISING zcx_abapgit_ajson_error. ENDCLASS. CLASS zcl_abapgit_ajson DEFINITION LOCAL FRIENDS ltcl_abap_to_json. CLASS ltcl_abap_to_json IMPLEMENTATION. METHOD set_ajson. DATA lo_nodes TYPE REF TO lcl_nodes_helper. DATA lo_src TYPE REF TO zcl_abapgit_ajson. lo_src = zcl_abapgit_ajson=>create_empty( ). CREATE OBJECT lo_nodes. lo_nodes->add( ' | |object | ||1' ). lo_nodes->add( '/ |a |object | ||1' ). lo_nodes->add( '/a/ |b |object | ||1' ). lo_nodes->add( '/a/b/ |c |object | ||0' ). lo_src->mt_json_tree = lo_nodes->mt_nodes. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. lt_nodes = lcl_abap_to_json=>convert( iv_data = lo_src ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes->mt_nodes ). ENDMETHOD. METHOD set_value_number. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. " number CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |num |1 ||' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = 1 ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. METHOD set_value_string. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. " string CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |str |abc ||' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = 'abc' ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. METHOD set_value_true. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. " true CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |bool |true ||' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = abap_true ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. METHOD set_value_false. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. " false CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |bool |false ||' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = abap_false ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. METHOD set_value_xsdboolean. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. DATA lv_xsdboolean TYPE xsdboolean. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |bool |true ||' ). lv_xsdboolean = 'X'. lt_nodes = lcl_abap_to_json=>convert( iv_data = lv_xsdboolean ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. METHOD set_null. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. DATA lv_null_ref TYPE REF TO data. " null CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |null |null ||' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = lv_null_ref ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. METHOD prefix. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. DATA ls_prefix TYPE zif_abapgit_ajson=>ty_path_name. ls_prefix-path = '/a/'. ls_prefix-name = 'b'. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( '/a/ |b |num |1 ||' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = 1 is_prefix = ls_prefix ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. METHOD set_obj. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA ls_struc TYPE ty_struc. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. ls_struc-a = 'abc'. ls_struc-b = 10. ls_struc-c = abap_true. ls_struc-d = 'X'. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||4' ). lo_nodes_exp->add( '/ |a |str |abc ||0' ). lo_nodes_exp->add( '/ |b |num |10 ||0' ). lo_nodes_exp->add( '/ |c |bool |true ||0' ). lo_nodes_exp->add( '/ |d |bool |true ||0' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = ls_struc ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. METHOD set_complex_obj. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA ls_struc TYPE ty_struc_complex. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. FIELD-SYMBOLS <i> LIKE LINE OF ls_struc-tab. ls_struc-a = 'abc'. ls_struc-b = 10. ls_struc-c = abap_true. ls_struc-d = 'X'. ls_struc-el = 'elem'. ls_struc-struc-a = 'deep'. ls_struc-struc-b = 123. APPEND 'hello' TO ls_struc-stab. APPEND 'world' TO ls_struc-stab. APPEND INITIAL LINE TO ls_struc-tab ASSIGNING <i>. <i>-a = 'abc'. APPEND INITIAL LINE TO ls_struc-tab ASSIGNING <i>. <i>-a = 'bcd'. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | ||8' ). lo_nodes_exp->add( '/ |a |str |abc ||0' ). lo_nodes_exp->add( '/ |b |num |10 ||0' ). lo_nodes_exp->add( '/ |c |bool |true ||0' ). lo_nodes_exp->add( '/ |d |bool |true ||0' ). lo_nodes_exp->add( '/ |el |str |elem ||0' ). lo_nodes_exp->add( '/ |struc |object | ||4' ). lo_nodes_exp->add( '/struc/|a |str |deep ||0' ). lo_nodes_exp->add( '/struc/|b |num |123 ||0' ). lo_nodes_exp->add( '/struc/|c |bool |false||0' ). lo_nodes_exp->add( '/struc/|d |bool |false||0' ). lo_nodes_exp->add( '/ |tab |array | | |2' ). lo_nodes_exp->add( '/tab/ |1 |object | |1|4' ). lo_nodes_exp->add( '/tab/1/|a |str |abc | |0' ). lo_nodes_exp->add( '/tab/1/|b |num |0 | |0' ). lo_nodes_exp->add( '/tab/1/|c |bool |false| |0' ). lo_nodes_exp->add( '/tab/1/|d |bool |false| |0' ). lo_nodes_exp->add( '/tab/ |2 |object | |2|4' ). lo_nodes_exp->add( '/tab/2/|a |str |bcd | |0' ). lo_nodes_exp->add( '/tab/2/|b |num |0 | |0' ). lo_nodes_exp->add( '/tab/2/|c |bool |false| |0' ). lo_nodes_exp->add( '/tab/2/|d |bool |false| |0' ). lo_nodes_exp->add( '/ |stab |array | | |2' ). lo_nodes_exp->add( '/stab/ |1 |str |hello|1|0' ). lo_nodes_exp->add( '/stab/ |2 |str |world|2|0' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = ls_struc ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. METHOD set_array. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. DATA lt_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. DATA lt_tab TYPE TABLE OF ty_struc. FIELD-SYMBOLS <s> LIKE LINE OF lt_tab. APPEND INITIAL LINE TO lt_tab ASSIGNING <s>. <s>-a = 'abc'. <s>-b = 10. APPEND INITIAL LINE TO lt_tab ASSIGNING <s>. <s>-a = 'bcd'. <s>-b = 20. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |array | | |2' ). lo_nodes_exp->add( '/ |1 |object | |1|4' ). lo_nodes_exp->add( '/1/ |a |str |abc | |0' ). lo_nodes_exp->add( '/1/ |b |num |10 | |0' ). lo_nodes_exp->add( '/1/ |c |bool |false| |0' ). lo_nodes_exp->add( '/1/ |d |bool |false| |0' ). lo_nodes_exp->add( '/ |2 |object | |2|4' ). lo_nodes_exp->add( '/2/ |a |str |bcd | |0' ). lo_nodes_exp->add( '/2/ |b |num |20 | |0' ). lo_nodes_exp->add( '/2/ |c |bool |false| |0' ). lo_nodes_exp->add( '/2/ |d |bool |false| |0' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = lt_tab ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). DATA lt_strtab TYPE string_table. APPEND 'abc' TO lt_strtab. APPEND 'bcd' TO lt_strtab. CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |array | | |2' ). lo_nodes_exp->add( '/ |1 |str |abc |1|0' ). lo_nodes_exp->add( '/ |2 |str |bcd |2|0' ). lt_nodes = lcl_abap_to_json=>convert( iv_data = lt_strtab ). cl_abap_unit_assert=>assert_equals( act = lt_nodes exp = lo_nodes_exp->mt_nodes ). ENDMETHOD. ENDCLASS. ********************************************************************** * FILTER TEST ********************************************************************** CLASS ltcl_filter_test DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PUBLIC SECTION. INTERFACES zif_abapgit_ajson_filter. PRIVATE SECTION. TYPES: BEGIN OF ty_visit_history, path TYPE string, type TYPE zif_abapgit_ajson_filter=>ty_visit_type, END OF ty_visit_history. DATA mt_visit_history TYPE TABLE OF ty_visit_history. METHODS simple_test FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS array_test FOR TESTING RAISING zcx_abapgit_ajson_error. METHODS visit_types FOR TESTING RAISING zcx_abapgit_ajson_error. ENDCLASS. CLASS ltcl_filter_test IMPLEMENTATION. METHOD zif_abapgit_ajson_filter~keep_node. DATA ls_visit_history LIKE LINE OF mt_visit_history. IF iv_visit > 0. ls_visit_history-type = iv_visit. ls_visit_history-path = is_node-path && is_node-name && '/'. APPEND ls_visit_history TO mt_visit_history. ENDIF. rv_keep = boolc( NOT is_node-name CA 'xX' AND NOT is_node-value CA 'xX' ). ENDMETHOD. METHOD simple_test. DATA lo_json TYPE REF TO zcl_abapgit_ajson. DATA lo_json_filtered TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. lo_json = zcl_abapgit_ajson=>create_empty( ). lo_json->set( iv_path = '/a' iv_val = 1 ). lo_json->set( iv_path = '/b' iv_val = 1 ). lo_json->set( iv_path = '/x' iv_val = 1 ). lo_json->set( iv_path = '/c/x' iv_val = 1 ). lo_json->set( iv_path = '/c/y' iv_val = 1 ). lo_json_filtered = zcl_abapgit_ajson=>create_from( ii_source_json = lo_json ii_filter = me ). CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |object | | |3' ). lo_nodes_exp->add( '/ |a |num |1 | |0' ). lo_nodes_exp->add( '/ |b |num |1 | |0' ). lo_nodes_exp->add( '/ |c |object | | |1' ). lo_nodes_exp->add( '/c/ |y |num |1 | |0' ). cl_abap_unit_assert=>assert_equals( act = lo_json_filtered->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD array_test. DATA lo_json TYPE REF TO zcl_abapgit_ajson. DATA lo_json_filtered TYPE REF TO zcl_abapgit_ajson. DATA lo_nodes_exp TYPE REF TO lcl_nodes_helper. lo_json = zcl_abapgit_ajson=>create_empty( ). lo_json->touch_array( '/' ). lo_json->push( iv_path = '/' iv_val = 'a' ). lo_json->push( iv_path = '/' iv_val = 'x' ). lo_json->push( iv_path = '/' iv_val = 'b' ). lo_json_filtered = zcl_abapgit_ajson=>create_from( ii_source_json = lo_json ii_filter = me ). CREATE OBJECT lo_nodes_exp. lo_nodes_exp->add( ' | |array | | |2' ). lo_nodes_exp->add( '/ |1 |str |a |1|0' ). lo_nodes_exp->add( '/ |2 |str |b |2|0' ). cl_abap_unit_assert=>assert_equals( act = lo_json_filtered->mt_json_tree exp = lo_nodes_exp->sorted( ) ). ENDMETHOD. METHOD visit_types. DATA lo_json TYPE REF TO zcl_abapgit_ajson. DATA lo_json_filtered TYPE REF TO zcl_abapgit_ajson. DATA lt_visits_exp LIKE mt_visit_history. FIELD-SYMBOLS <v> LIKE LINE OF lt_visits_exp. DATA: BEGIN OF ls_dummy, d TYPE i VALUE 10, e TYPE i VALUE 20, END OF ls_dummy. CLEAR mt_visit_history. lo_json = zcl_abapgit_ajson=>create_empty( ). lo_json->touch_array( '/' ). lo_json->push( iv_path = '/' iv_val = 'a' ). lo_json->push( iv_path = '/' iv_val = 'b' ). lo_json->push( iv_path = '/' iv_val = ls_dummy ). lo_json_filtered = zcl_abapgit_ajson=>create_from( ii_source_json = lo_json ii_filter = me ). APPEND INITIAL LINE TO lt_visits_exp ASSIGNING <v>. <v>-path = '/'. <v>-type = zif_abapgit_ajson_filter=>visit_type-open. APPEND INITIAL LINE TO lt_visits_exp ASSIGNING <v>. <v>-path = '/3/'. <v>-type = zif_abapgit_ajson_filter=>visit_type-open. APPEND INITIAL LINE TO lt_visits_exp ASSIGNING <v>. <v>-path = '/3/'. <v>-type = zif_abapgit_ajson_filter=>visit_type-close. APPEND INITIAL LINE TO lt_visits_exp ASSIGNING <v>. <v>-path = '/'. <v>-type = zif_abapgit_ajson_filter=>visit_type-close. cl_abap_unit_assert=>assert_equals( act = mt_visit_history exp = lt_visits_exp ). ENDMETHOD. ENDCLASS.
[ 17174, 17174, 2466, 1174, 198, 9, 19255, 4146, 198, 17174, 17174, 2466, 1174, 198, 31631, 300, 565, 62, 77, 4147, 62, 2978, 525, 5550, 20032, 17941, 25261, 13, 198, 220, 44731, 44513, 13, 628, 220, 220, 220, 42865, 45079, 62, 77, 4147, 41876, 1976, 361, 62, 397, 499, 18300, 62, 1228, 1559, 14804, 774, 62, 77, 4147, 62, 926, 13, 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, 21628, 62, 2536, 41876, 4731, 13, 198, 220, 220, 220, 337, 36252, 50, 1598, 13, 198, 220, 220, 220, 337, 36252, 50, 23243, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 77, 4147, 8, 41876, 1976, 361, 62, 397, 499, 18300, 62, 1228, 1559, 14804, 774, 62, 77, 4147, 62, 912, 13, 198, 198, 10619, 31631, 13, 198, 198, 31631, 300, 565, 62, 77, 4147, 62, 2978, 525, 30023, 2538, 10979, 6234, 13, 198, 220, 337, 36252, 751, 13, 628, 220, 220, 220, 18930, 24639, 12, 23060, 10744, 3535, 50, 1279, 77, 29, 34178, 48920, 3963, 45079, 62, 77, 4147, 13, 198, 220, 220, 220, 42865, 300, 85, 62, 17197, 41876, 4731, 13, 198, 220, 220, 220, 42865, 300, 85, 62, 9630, 41876, 4731, 13, 198, 220, 220, 220, 42865, 300, 85, 62, 2875, 41876, 4731, 13, 628, 220, 220, 220, 43504, 10619, 3268, 2043, 12576, 48920, 5390, 45079, 62, 77, 4147, 24994, 3528, 15871, 1279, 77, 28401, 628, 220, 220, 220, 46341, 2043, 21628, 62, 2536, 5161, 705, 91, 6, 39319, 198, 220, 220, 220, 220, 220, 1279, 77, 29, 12, 6978, 198, 220, 220, 220, 220, 220, 1279, 77, 29, 12, 3672, 198, 220, 220, 220, 220, 220, 1279, 77, 29, 12, 4906, 198, 220, 220, 220, 220, 220, 1279, 77, 29, 12, 8367, 198, 220, 220, 220, 220, 220, 300, 85, 62, 9630, 198, 220, 220, 220, 220, 220, 300, 85, 62, 17197, 198, 220, 220, 220, 220, 220, 300, 85, 62, 2875, 13, 198, 220, 220, 220, 7102, 35, 24290, 1279, 77, 29, 12, 6978, 13, 198, 220, 220, 220, 7102, 35, 24290, 1279, 77, 29, 12, 3672, 13, 198, 220, 220, 220, 7102, 35, 24290, 1279, 77, 29, 12, 4906, 13, 198, 220, 220, 220, 7102, 35, 24290, 1279, 77, 29, 12, 8367, 13, 198, 220, 220, 220, 1279, 77, 29, 12, 9630, 796, 300, 85, 62, 9630, 13, 198, 220, 220, 220, 1279, 77, 29, 12, 17197, 796, 300, 85, 62, 17197, 13, 198, 220, 220, 220, 1279, 77, 29, 12, 2875, 796, 300, 85, 62, 2875, 13, 628, 220, 23578, 49273, 13, 628, 220, 337, 36252, 23243, 13, 198, 220, 220, 220, 374, 83, 62, 77, 4147, 796, 45079, 62, 77, 4147, 13, 198, 220, 23578, 49273, 13, 628, 220, 337, 36252, 1598, 13, 198, 220, 220, 220, 30301, 1503, 45079, 62, 77, 4147, 13, 198, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198, 198, 17174, 17174, 2466, 1174, 198, 9, 350, 27415, 1137, 198, 17174, 17174, 2466, 1174, 198, 198, 31631, 300, 83, 565, 62, 48610, 62, 9288, 5550, 20032, 17941, 25261, 198, 220, 7473, 43001, 2751, 198, 220, 45698, 42, 49277, 43638, 5805, 7597, 198, 220, 360, 4261, 6234, 6006, 9863, 13, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 6291, 62, 17752, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 25512, 1352, 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, 81, 85, 62, 17752, 8, 41876, 4731, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42865, 6941, 62, 8968, 41876, 4526, 37, 5390, 300, 565, 62, 17752, 62, 48610, 13, 198, 220, 220, 220, 42865, 6941, 62, 77, 4147, 41876, 4526, 37, 5390, 300, 565, 62, 77, 4147, 62, 2978, 525, 13, 628, 220, 220, 220, 337, 36252, 50, 9058, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 62, 8841, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 62, 17618, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 62, 22468, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 62, 2127, 21052, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 62, 9562, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 62, 8423, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 62, 4475, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 62, 49382, 62, 27160, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 21136, 62, 18224, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 23418, 62, 2539, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 1559, 62, 18224, 13, 198, 220, 220, 220, 337, 36252, 50, 1729, 62, 17752, 7473, 43001, 2751, 17926, 1797, 2751, 1976, 66, 87, 62, 397, 499, 18300, 62, 1228, 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1, 1, 1 ]
class ZCL_Z_MONSTER_DELIVERY_MPC definition public inheriting from /IWBEP/CL_MGW_PUSH_ABS_MODEL create public . public section. interfaces IF_SADL_GW_MODEL_EXPOSURE_DATA . types: TS_I_DRAFTADMINISTRATIVEDATATY type SDRAFT_ADMIN_CDS . types: TT_I_DRAFTADMINISTRATIVEDATATY type standard table of TS_I_DRAFTADMINISTRATIVEDATATY . types: begin of TS_ZCDS_MONSTER_DELIVERIESTYPE. include type ZV_MONS_DELS. types: ACTIVEUUID type ZMN_DRAFT_DELS-ACTIVEUUID, DRAFTENTITYCREATIONDATETIME type ZMN_DRAFT_DELS-DRAFTENTITYCREATIONDATETIME, DRAFTENTITYLASTCHANGEDATETIME type ZMN_DRAFT_DELS-DRAFTENTITYLASTCHANGEDATETIME, HASACTIVEENTITY type SDRAFT_HAS_ACTIVE, HASDRAFTENTITY type SDRAFT_HAS_DRAFT, ISACTIVEENTITY type SDRAFT_IS_ACTIVE, A_ACTIVATION type SADL_GW_DYNAMIC_ACTN_PROPERTY, A_EDIT type SADL_GW_DYNAMIC_ACTN_PROPERTY, A_PREPARATION type SADL_GW_DYNAMIC_ACTN_PROPERTY, A_VALIDATION type SADL_GW_DYNAMIC_ACTN_PROPERTY, end of TS_ZCDS_MONSTER_DELIVERIESTYPE . types: TT_ZCDS_MONSTER_DELIVERIESTYPE type standard table of TS_ZCDS_MONSTER_DELIVERIESTYPE . constants GC_I_DRAFTADMINISTRATIVEDATATY type /IWBEP/IF_MGW_MED_ODATA_TYPES=>TY_E_MED_ENTITY_NAME value 'I_DraftAdministrativeDataType' ##NO_TEXT. constants GC_ZCDS_MONSTER_DELIVERIESTYPE type /IWBEP/IF_MGW_MED_ODATA_TYPES=>TY_E_MED_ENTITY_NAME value 'ZCDS_MONSTER_DELIVERIESType' ##NO_TEXT. methods DEFINE redefinition . methods GET_LAST_MODIFIED redefinition . protected section. private section. methods DEFINE_RDS_4 raising /IWBEP/CX_MGW_MED_EXCEPTION . methods GET_LAST_MODIFIED_RDS_4 returning value(RV_LAST_MODIFIED_RDS) type TIMESTAMP . ENDCLASS. CLASS ZCL_Z_MONSTER_DELIVERY_MPC IMPLEMENTATION. method DEFINE. *&---------------------------------------------------------------------* *& Generated code for the MODEL PROVIDER BASE CLASS &* *& &* *& !!!NEVER MODIFY THIS CLASS. IN CASE YOU WANT TO CHANGE THE MODEL &* *& DO THIS IN THE MODEL PROVIDER SUBCLASS!!! &* *& &* *&---------------------------------------------------------------------* model->set_schema_namespace( 'Z_MONSTER_DELIVERY_CDS_PULL_SRV' ). define_rds_4( ). get_last_modified_rds_4( ). endmethod. method DEFINE_RDS_4. *&---------------------------------------------------------------------* *& Generated code for the MODEL PROVIDER BASE CLASS &* *& &* *& !!!NEVER MODIFY THIS CLASS. IN CASE YOU WANT TO CHANGE THE MODEL &* *& DO THIS IN THE MODEL PROVIDER SUBCLASS!!! &* *& &* *&---------------------------------------------------------------------* * This code is generated for Reference Data Source * 4 *&---------------------------------------------------------------------* TRY. if_sadl_gw_model_exposure_data~get_model_exposure( )->expose( model )->expose_vocabulary( vocab_anno_model ). CATCH cx_sadl_exposure_error INTO DATA(lx_sadl_exposure_error). RAISE EXCEPTION TYPE /iwbep/cx_mgw_med_exception EXPORTING previous = lx_sadl_exposure_error. ENDTRY. endmethod. method GET_LAST_MODIFIED. *&---------------------------------------------------------------------* *& Generated code for the MODEL PROVIDER BASE CLASS &* *& &* *& !!!NEVER MODIFY THIS CLASS. IN CASE YOU WANT TO CHANGE THE MODEL &* *& DO THIS IN THE MODEL PROVIDER SUBCLASS!!! &* *& &* *&---------------------------------------------------------------------* CONSTANTS: lc_gen_date_time TYPE timestamp VALUE '20180810130012'. "#EC NOTEXT DATA: lv_rds_last_modified TYPE timestamp . rv_last_modified = super->get_last_modified( ). IF rv_last_modified LT lc_gen_date_time. rv_last_modified = lc_gen_date_time. ENDIF. lv_rds_last_modified = GET_LAST_MODIFIED_RDS_4( ). IF rv_last_modified LT lv_rds_last_modified. rv_last_modified = lv_rds_last_modified . ENDIF . endmethod. method GET_LAST_MODIFIED_RDS_4. *&---------------------------------------------------------------------* *& Generated code for the MODEL PROVIDER BASE CLASS &* *& &* *& !!!NEVER MODIFY THIS CLASS. IN CASE YOU WANT TO CHANGE THE MODEL &* *& DO THIS IN THE MODEL PROVIDER SUBCLASS!!! &* *& &* *&---------------------------------------------------------------------* * This code is generated for Reference Data Source * 4 *&---------------------------------------------------------------------* CONSTANTS: co_gen_date_time TYPE timestamp VALUE '20180810130017'. TRY. rv_last_modified_rds = CAST cl_sadl_gw_model_exposure( if_sadl_gw_model_exposure_data~get_model_exposure( ) )->get_last_modified( ). CATCH cx_root. rv_last_modified_rds = co_gen_date_time. ENDTRY. IF rv_last_modified_rds < co_gen_date_time. rv_last_modified_rds = co_gen_date_time. ENDIF. endmethod. method IF_SADL_GW_MODEL_EXPOSURE_DATA~GET_MODEL_EXPOSURE. CONSTANTS: co_gen_timestamp TYPE timestamp VALUE '20180810130020'. DATA(lv_sadl_xml) = |<?xml version="1.0" encoding="utf-16"?>| & |<sadl:definition xmlns:sadl="http://sap.com/sap.nw.f.sadl" syntaxVersion="" >| & | <sadl:dataSource type="CDS" name="ZCDS_MONSTER_DELIVERIES" binding="ZCDS_MONSTER_DELIVERIES" />| & |<sadl:resultSet>| & |<sadl:structure name="ZCDS_MONSTER_DELIVERIES" dataSource="ZCDS_MONSTER_DELIVERIES" maxEditMode="RO" exposure="TRUE" >| & | <sadl:query name="SADL_QUERY">| & | </sadl:query>| & |</sadl:structure>| & |</sadl:resultSet>| & |</sadl:definition>| . ro_model_exposure = cl_sadl_gw_model_exposure=>get_exposure_xml( iv_uuid = CONV #( 'Z_MONSTER_DELIVERY_CDS_PULL' ) iv_timestamp = co_gen_timestamp iv_sadl_xml = lv_sadl_xml ). endmethod. ENDCLASS.
[ 4871, 1168, 5097, 62, 57, 62, 27857, 41809, 62, 35, 3698, 3824, 19664, 62, 44, 5662, 6770, 198, 220, 1171, 198, 220, 10639, 1780, 422, 1220, 40, 45607, 8905, 14, 5097, 62, 20474, 54, 62, 47, 27143, 62, 32, 4462, 62, 33365, 3698, 198, 220, 2251, 1171, 764, 198, 198, 11377, 2665, 13, 628, 220, 20314, 16876, 62, 50, 2885, 43, 62, 33191, 62, 33365, 3698, 62, 6369, 37997, 11335, 62, 26947, 764, 628, 220, 3858, 25, 198, 220, 220, 26136, 62, 40, 62, 35, 44700, 2885, 23678, 1797, 5446, 1404, 3824, 1961, 1404, 1404, 56, 2099, 9834, 44700, 62, 2885, 23678, 62, 34, 5258, 764, 198, 220, 3858, 25, 198, 220, 220, 26653, 62, 40, 62, 35, 44700, 2885, 23678, 1797, 5446, 1404, 3824, 1961, 1404, 1404, 56, 2099, 3210, 3084, 286, 26136, 62, 40, 62, 35, 44700, 2885, 23678, 1797, 5446, 1404, 3824, 1961, 1404, 1404, 56, 764, 198, 220, 3858, 25, 198, 220, 220, 220, 2221, 286, 26136, 62, 57, 34, 5258, 62, 27857, 41809, 62, 35, 3698, 38757, 40, 6465, 56, 11401, 13, 198, 220, 220, 220, 220, 220, 2291, 2099, 1168, 53, 62, 44, 19213, 62, 35, 37142, 13, 198, 220, 3858, 25, 198, 220, 220, 220, 220, 220, 11741, 9306, 52, 27586, 2099, 1168, 39764, 62, 35, 44700, 62, 35, 37142, 12, 10659, 9306, 52, 27586, 11, 198, 220, 220, 220, 220, 220, 360, 44700, 3525, 9050, 43387, 6234, 35, 1404, 2767, 12789, 2099, 1168, 39764, 62, 35, 44700, 62, 35, 37142, 12, 35, 44700, 3525, 9050, 43387, 6234, 35, 1404, 2767, 12789, 11, 198, 220, 220, 220, 220, 220, 360, 44700, 3525, 9050, 43, 11262, 3398, 15567, 1961, 1404, 2767, 12789, 2099, 1168, 39764, 62, 35, 44700, 62, 35, 37142, 12, 35, 44700, 3525, 9050, 43, 11262, 3398, 15567, 1961, 1404, 2767, 12789, 11, 198, 220, 220, 220, 220, 220, 33930, 10659, 9306, 3525, 9050, 2099, 9834, 44700, 62, 39, 1921, 62, 10659, 9306, 11, 198, 220, 220, 220, 220, 220, 33930, 35, 44700, 3525, 9050, 2099, 9834, 44700, 62, 39, 1921, 62, 35, 44700, 11, 198, 220, 220, 220, 220, 220, 3180, 10659, 9306, 3525, 9050, 2099, 9834, 44700, 62, 1797, 62, 10659, 9306, 11, 198, 220, 220, 220, 220, 220, 317, 62, 10659, 3824, 6234, 2099, 311, 2885, 43, 62, 33191, 62, 35, 40760, 2390, 2149, 62, 10659, 45, 62, 4805, 31054, 9936, 11, 198, 220, 220, 220, 220, 220, 317, 62, 24706, 2099, 311, 2885, 43, 62, 33191, 62, 35, 40760, 2390, 2149, 62, 10659, 45, 62, 4805, 31054, 9936, 11, 198, 220, 220, 220, 220, 220, 317, 62, 46437, 27082, 6234, 2099, 311, 2885, 43, 62, 33191, 62, 35, 40760, 2390, 2149, 62, 10659, 45, 62, 4805, 31054, 9936, 11, 198, 220, 220, 220, 220, 220, 317, 62, 23428, 2389, 6234, 2099, 311, 2885, 43, 62, 33191, 62, 35, 40760, 2390, 2149, 62, 10659, 45, 62, 4805, 31054, 9936, 11, 198, 220, 220, 220, 886, 286, 26136, 62, 57, 34, 5258, 62, 27857, 41809, 62, 35, 3698, 38757, 40, 6465, 56, 11401, 764, 198, 220, 3858, 25, 198, 220, 220, 26653, 62, 57, 34, 5258, 62, 27857, 41809, 62, 35, 3698, 38757, 40, 6465, 56, 11401, 2099, 3210, 3084, 286, 26136, 62, 57, 34, 5258, 62, 27857, 41809, 62, 35, 3698, 38757, 40, 6465, 56, 11401, 764, 628, 220, 38491, 20145, 62, 40, 62, 35, 44700, 2885, 23678, 1797, 5446, 1404, 3824, 1961, 1404, 1404, 56, 2099, 1220, 40, 45607, 8905, 14, 5064, 62, 20474, 54, 62, 30733, 62, 3727, 13563, 62, 9936, 47, 1546, 14804, 9936, 62, 36, 62, 30733, 62, 3525, 9050, 62, 20608, 1988, 705, 40, 62, 37741, 41862, 13260, 6601, 6030, 6, 22492, 15285, 62, 32541, 13, 198, 220, 38491, 20145, 62, 57, 34, 5258, 62, 27857, 41809, 62, 35, 3698, 38757, 40, 6465, 56, 11401, 2099, 1220, 40, 45607, 8905, 14, 5064, 62, 20474, 54, 62, 30733, 62, 3727, 13563, 62, 9936, 47, 1546, 14804, 9936, 62, 36, 62, 30733, 62, 3525, 9050, 62, 20608, 1988, 705, 57, 34, 5258, 62, 27857, 41809, 62, 35, 3698, 38757, 11015, 6030, 6, 22492, 15285, 62, 32541, 13, 628, 220, 5050, 23449, 8881, 198, 220, 220, 220, 34087, 17750, 764, 198, 220, 5050, 17151, 62, 43, 11262, 62, 33365, 28343, 198, 220, 220, 220, 34087, 17750, 764, 198, 24326, 2665, 13, 198, 19734, 2665, 13, 628, 220, 5050, 23449, 8881, 62, 49, 5258, 62, 19, 198, 220, 220, 220, 8620, 198, 220, 220, 220, 220, 220, 1220, 40, 45607, 8905, 14, 34, 55, 62, 20474, 54, 62, 30733, 62, 6369, 42006, 2849, 764, 198, 220, 5050, 17151, 62, 43, 11262, 62, 33365, 28343, 62, 49, 5258, 62, 19, 198, 220, 220, 220, 8024, 198, 220, 220, 220, 220, 220, 1988, 7, 49, 53, 62, 43, 11262, 62, 33365, 28343, 62, 49, 5258, 8, 2099, 31742, 6465, 23518, 764, 198, 10619, 31631, 13, 628, 198, 198, 31631, 1168, 5097, 62, 57, 62, 27857, 41809, 62, 35, 3698, 3824, 19664, 62, 44, 5662, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 2446, 23449, 8881, 13, 198, 9, 5, 10097, 30934, 9, 198, 9, 5, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2980, 515, 2438, 329, 262, 19164, 3698, 36592, 41237, 49688, 42715, 220, 220, 220, 220, 220, 220, 220, 220, 1222, 9, 198, 9, 5, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1222, 9, 198, 9, 5, 220, 220, 10185, 12161, 5959, 19164, 5064, 56, 12680, 42715, 13, 3268, 42001, 7013, 41300, 5390, 5870, 27746, 3336, 19164, 3698, 220, 1222, 9, 198, 9, 5, 220, 220, 220, 220, 220, 220, 220, 8410, 12680, 3268, 3336, 19164, 3698, 36592, 41237, 13558, 2749, 43, 10705, 10185, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1222, 9, 198, 9, 5, 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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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 ]
class /GAL/STREAM definition public abstract create public . *"* public components of class /GAL/STREAM *"* do not include other source files here!!! public section. constants ACCESS_RANDOM type /GAL/FILE_ACCESS value /GAL/FILE=>ACCESS_RANDOM. "#EC NOTEXT constants ACCESS_READ type /GAL/FILE_ACCESS value /GAL/FILE=>ACCESS_READ. "#EC NOTEXT constants ACCESS_WRITE type /GAL/FILE_ACCESS value /GAL/FILE=>ACCESS_WRITE. "#EC NOTEXT constants LINE_BREAK_AUTO type /GAL/FILE_LINE_BREAK value /GAL/FILE=>LINE_BREAK_AUTO. "#EC NOTEXT constants LINE_BREAK_UNDEFINED type /GAL/FILE_LINE_BREAK value /GAL/FILE=>LINE_BREAK_UNDEFINED. "#EC NOTEXT constants LINE_BREAK_UNIX type /GAL/FILE_LINE_BREAK value /GAL/FILE=>LINE_BREAK_UNIX. "#EC NOTEXT constants LINE_BREAK_WINDOWS type /GAL/FILE_LINE_BREAK value /GAL/FILE=>LINE_BREAK_WINDOWS. "#EC NOTEXT constants MODE_BINARY type /GAL/FILE_MODE value /GAL/FILE=>MODE_BINARY. "#EC NOTEXT constants MODE_TEXT type /GAL/FILE_MODE value /GAL/FILE=>MODE_TEXT. "#EC NOTEXT constants OPTIONS_APPEND type /GAL/FILE_OPTIONS value /GAL/FILE=>OPTIONS_APPEND. "#EC NOTEXT constants OPTIONS_APPEND_ONLY type /GAL/FILE_OPTIONS value /GAL/FILE=>OPTIONS_APPEND_ONLY. "#EC NOTEXT constants OPTIONS_CREATE type /GAL/FILE_OPTIONS value /GAL/FILE=>OPTIONS_CREATE. "#EC NOTEXT constants OPTIONS_CREATE_ONLY type /GAL/FILE_OPTIONS value /GAL/FILE=>OPTIONS_CREATE_ONLY. "#EC NOTEXT constants OPTIONS_RECREATE type /GAL/FILE_OPTIONS value /GAL/FILE=>OPTIONS_RECREATE. "#EC NOTEXT constants OPTIONS_RECREATE_ONLY type /GAL/FILE_OPTIONS value /GAL/FILE=>OPTIONS_RECREATE_ONLY. "#EC NOTEXT constants OPTIONS_TRUNCATE type /GAL/FILE_OPTIONS value /GAL/FILE=>OPTIONS_TRUNCATE. "#EC NOTEXT data ACCESS type /GAL/FILE_ACCESS read-only . data CAN_READ type ABAP_BOOL read-only . data CAN_SEEK type ABAP_BOOL read-only . data CAN_WRITE type ABAP_BOOL read-only . data FILE type ref to /GAL/FILE read-only . data IS_CLOSED type ABAP_BOOL read-only . data IS_EOF type ABAP_BOOL read-only . data LENGTH type I read-only . data LINE_BREAK type /GAL/FILE_LINE_BREAK read-only . data MODE type /GAL/FILE_MODE read-only . data OPTIONS type /GAL/FILE_OPTIONS read-only . data POSITION type I read-only . methods CLOSE raising /GAL/CX_IO_EXCEPTION . methods CONSTRUCTOR importing !FILE type ref to /GAL/FILE !ACCESS type /GAL/FILE_ACCESS default ACCESS_READ !MODE type /GAL/FILE_MODE default MODE_TEXT !OPTIONS type /GAL/FILE_OPTIONS default OPTIONS_CREATE !LINE_BREAK type /GAL/FILE_LINE_BREAK default LINE_BREAK_AUTO . methods COPY_TO importing !TARGET_STREAM type ref to /GAL/STREAM raising /GAL/CX_IO_EXCEPTION . methods FLUSH raising /GAL/CX_IO_EXCEPTION . methods READ_ALL_BYTES exporting !BYTES type XSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods READ_ALL_BYTES_TO_XSTRING returning value(BYTES) type XSTRING raising /GAL/CX_IO_EXCEPTION . methods READ_ALL_CHARS exporting !CHARS type CSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods READ_ALL_CHARS_TO_STRING returning value(CHARS) type STRING raising /GAL/CX_IO_EXCEPTION . methods READ_ALL_LINES exporting !LINES type /GAL/STRINGTABLE raising /GAL/CX_IO_EXCEPTION . methods READ_BYTE exporting !BYTE type XSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods READ_BYTES importing !COUNT type I exporting !BYTES type XSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods READ_BYTES_TO_END exporting !BYTES type XSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods READ_CHAR exporting !CHAR type CSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods READ_CHARS importing !COUNT type I exporting !CHARS type CSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods READ_CHARS_TO_END exporting !CHARS type CSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods READ_LINE exporting !LINE type CLIKE raising /GAL/CX_IO_EXCEPTION . methods READ_LINES changing !LINES type ANY TABLE raising /GAL/CX_IO_EXCEPTION . methods SEEK importing !POSITION type I raising /GAL/CX_IO_EXCEPTION . methods SET_LENGTH importing !LENGTH type I raising /GAL/CX_IO_EXCEPTION . methods WRITE_BYTE importing !BYTE type XSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods WRITE_BYTES importing !BYTES type XSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods WRITE_CHAR importing !CHAR type CSEQUENCE raising /GAL/CX_IO_EXCEPTION . methods WRITE_CHARS importing !CHARS type STRING raising /GAL/CX_IO_EXCEPTION . methods WRITE_LINE importing !LINE type CLIKE raising /GAL/CX_IO_EXCEPTION . methods WRITE_LINES importing !LINES type ANY TABLE raising /GAL/CX_IO_EXCEPTION . protected section. *"* protected components of class /GAL/STREAM *"* do not include other source files here!!! methods UPDATE . private section. *"* private components of class /GAL/STREAM *"* do not include other source files here!!! ENDCLASS. CLASS /GAL/STREAM IMPLEMENTATION. METHOD close. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ENDIF. flush( ). is_closed = abap_true. file->unregister_stream( me ). ENDMETHOD. METHOD constructor. me->file = file. me->access = access. me->mode = mode. me->options = options. me->line_break = line_break. * Set attributes IF access O access_read. can_read = abap_true. ELSE. can_read = abap_false. ENDIF. IF access O access_write. can_write = abap_true. ELSE. can_write = abap_false. ENDIF. is_closed = abap_false. file->register_stream( me ). ENDMETHOD. METHOD copy_to. DATA l_data_bin TYPE xstring. DATA l_data_txt TYPE string. IF mode <> target_stream->mode. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_types_do_not_match. ENDIF. CASE mode. WHEN mode_binary. read_all_bytes( IMPORTING bytes = l_data_bin ). target_stream->write_bytes( l_data_bin ). WHEN mode_text. read_all_chars( IMPORTING chars = l_data_txt ). target_stream->write_chars( l_data_txt ). ENDCASE. ENDMETHOD. METHOD flush. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ENDIF. ENDMETHOD. METHOD read_all_bytes. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_ALL_BYTES`. ELSEIF mode <> mode_binary. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_binary_mode_stream var1 = `READ_ALL_BYTES`. ENDIF. seek( 0 ). CALL METHOD read_bytes EXPORTING count = length IMPORTING bytes = bytes. ENDMETHOD. METHOD read_all_bytes_to_xstring. read_all_bytes( IMPORTING bytes = bytes ). ENDMETHOD. METHOD read_all_chars. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_ALL_CHARS`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `READ_ALL_CHARS`. ENDIF. seek( 0 ). read_chars( EXPORTING count = length IMPORTING chars = chars ). ENDMETHOD. METHOD read_all_chars_to_string. read_all_chars( IMPORTING chars = chars ). ENDMETHOD. METHOD read_all_lines. DATA l_line TYPE string. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_ALL_LINES`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `READ_ALL_LINES`. ENDIF. seek( 0 ). CLEAR lines. WHILE NOT is_eof = abap_true. read_line( IMPORTING line = l_line ). INSERT l_line INTO TABLE lines. ENDWHILE. ENDMETHOD. METHOD read_byte. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_BYTE`. ELSEIF mode <> mode_binary. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_binary_mode_stream var1 = `READ_BYTE`. ENDIF. CALL METHOD read_bytes EXPORTING count = 1 IMPORTING bytes = byte. ENDMETHOD. METHOD read_bytes. CLEAR bytes. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_BYTES`. ELSEIF mode <> mode_binary. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_binary_mode_stream var1 = `READ_BYTES`. ENDIF. ENDMETHOD. METHOD read_bytes_to_end. DATA l_count TYPE i. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_BYTES_TO_END`. ELSEIF mode <> mode_binary. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_binary_mode_stream var1 = `READ_BYTES_TO_END`. ENDIF. l_count = length - position. CALL METHOD read_bytes EXPORTING count = l_count IMPORTING bytes = bytes. ENDMETHOD. METHOD read_char. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_CHAR`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `READ_CHAR`. ENDIF. CALL METHOD read_chars EXPORTING count = 1 IMPORTING chars = char. ENDMETHOD. METHOD read_chars. CLEAR chars. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_CHARS`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `READ_CHARS`. ENDIF. ENDMETHOD. METHOD read_chars_to_end. DATA l_count TYPE i. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_CHARS_TO_END`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `READ_CHARS_TO_END`. ENDIF. l_count = length - position. CALL METHOD read_chars EXPORTING count = l_count IMPORTING chars = chars. ENDMETHOD. METHOD read_line. CLEAR line. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_LINE`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `READ_LINE`. ENDIF. ENDMETHOD. METHOD read_lines. DATA l_line TYPE REF TO data. FIELD-SYMBOLS <l_line> TYPE any. * Initialize result CLEAR lines. * Check stream status and mode IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_read <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `READ_LINES`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `READ_LINES`. ENDIF. * Read lines until end of file WHILE NOT is_eof = abap_true. CREATE DATA l_line LIKE LINE OF lines. ASSIGN l_line->* TO <l_line>. read_line( IMPORTING line = <l_line> ). INSERT <l_line> INTO TABLE lines. ENDWHILE. ENDMETHOD. METHOD seek. DATA l_position_string TYPE string. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_seek <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `SEEK`. ENDIF. IF position < 0 OR position > length. l_position_string = position. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>invalid_seek_position var1 = l_position_string. ENDIF. me->position = position. IF position = length. is_eof = abap_true. ELSE. is_eof = abap_false. ENDIF. ENDMETHOD. METHOD set_length. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_write <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `SET_LENGTH`. ENDIF. IF length < 0. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>invalid_stream_length. ENDIF. me->length = length. update( ). ENDMETHOD. METHOD update. * Update position IF position < 0. position = 0. ELSEIF position > length. position = length. ENDIF. * Update EOF flag IF position = length. is_eof = abap_true. ELSE. is_eof = abap_false. ENDIF. ENDMETHOD. METHOD write_byte. DATA l_length TYPE i. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_write <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `WRITE_BYTE`. ELSEIF mode <> mode_binary. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_binary_mode_stream var1 = `WRITE_BYTE`. ENDIF. DESCRIBE FIELD byte LENGTH l_length IN BYTE MODE. IF l_length <> 1. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>write_byte_argument_mismatch. ENDIF. write_bytes( bytes = byte ). ENDMETHOD. METHOD write_bytes. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_write <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `WRITE_BYTES`. ELSEIF mode <> mode_binary. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_binary_mode_stream var1 = `WRITE_BYTES`. ENDIF. ENDMETHOD. METHOD write_char. DATA l_length TYPE i. DATA l_type TYPE c. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_write <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `WRITE_CHAR`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `WRITE_CHAR`. ENDIF. DESCRIBE FIELD char TYPE l_type. IF l_type = 'g'. l_length = STRLEN( char ). ELSE. DESCRIBE FIELD char LENGTH l_length IN CHARACTER MODE. ENDIF. IF l_length <> 1. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>write_char_argument_mismatch. ENDIF. IF l_type = 'C' AND char = space. write_chars( chars = ` ` ). ELSE. write_chars( chars = char ). ENDIF. ENDMETHOD. METHOD write_chars. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_write <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `WRITE_CHARS`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `WRITE_CHARS`. ENDIF. ENDMETHOD. METHOD write_line. DATA l_line TYPE string. IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_write <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `WRITE_LINE`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `WRITE_LINE`. ENDIF. CASE line_break. WHEN line_break_unix. CONCATENATE line /gal/string=>line_break_unix INTO l_line RESPECTING BLANKS. WHEN line_break_windows. CONCATENATE line /gal/string=>line_break_windows INTO l_line RESPECTING BLANKS. WHEN OTHERS. CONCATENATE line /gal/string=>line_break_unix INTO l_line RESPECTING BLANKS. ENDCASE. write_chars( chars = l_line ). ENDMETHOD. METHOD write_lines. FIELD-SYMBOLS <l_line> TYPE any. * Check stream status and mode IF is_closed = abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>stream_already_closed. ELSEIF can_write <> abap_true. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>method_not_supported_by_stream var1 = `WRITE_LINES`. ELSEIF mode <> mode_text. RAISE EXCEPTION TYPE /gal/cx_io_exception EXPORTING textid = /gal/cx_io_exception=>requires_text_mode_stream var1 = `WRITE_LINES`. ENDIF. * Write all lines to stream LOOP AT lines ASSIGNING <l_line>. write_line( line = <l_line> ). ENDLOOP. ENDMETHOD. ENDCLASS.
[ 4871, 1220, 38, 1847, 14, 2257, 32235, 6770, 198, 220, 1171, 198, 220, 12531, 198, 220, 2251, 1171, 764, 198, 198, 9, 1, 9, 1171, 6805, 286, 1398, 1220, 38, 1847, 14, 2257, 32235, 198, 9, 1, 9, 466, 407, 2291, 584, 2723, 3696, 994, 10185, 198, 11377, 2665, 13, 628, 220, 38491, 15859, 7597, 62, 49, 6981, 2662, 2099, 1220, 38, 1847, 14, 25664, 62, 26861, 7597, 1988, 1220, 38, 1847, 14, 25664, 14804, 26861, 7597, 62, 49, 6981, 2662, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 15859, 7597, 62, 15675, 2099, 1220, 38, 1847, 14, 25664, 62, 26861, 7597, 1988, 1220, 38, 1847, 14, 25664, 14804, 26861, 7597, 62, 15675, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 15859, 7597, 62, 18564, 12709, 2099, 1220, 38, 1847, 14, 25664, 62, 26861, 7597, 1988, 1220, 38, 1847, 14, 25664, 14804, 26861, 7597, 62, 18564, 12709, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 48920, 62, 40438, 10206, 62, 39371, 46, 2099, 1220, 38, 1847, 14, 25664, 62, 24027, 62, 40438, 10206, 1988, 1220, 38, 1847, 14, 25664, 14804, 24027, 62, 40438, 10206, 62, 39371, 46, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 48920, 62, 40438, 10206, 62, 4944, 7206, 20032, 1961, 2099, 1220, 38, 1847, 14, 25664, 62, 24027, 62, 40438, 10206, 1988, 1220, 38, 1847, 14, 25664, 14804, 24027, 62, 40438, 10206, 62, 4944, 7206, 20032, 1961, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 48920, 62, 40438, 10206, 62, 4944, 10426, 2099, 1220, 38, 1847, 14, 25664, 62, 24027, 62, 40438, 10206, 1988, 1220, 38, 1847, 14, 25664, 14804, 24027, 62, 40438, 10206, 62, 4944, 10426, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 48920, 62, 40438, 10206, 62, 33207, 2099, 1220, 38, 1847, 14, 25664, 62, 24027, 62, 40438, 10206, 1988, 1220, 38, 1847, 14, 25664, 14804, 24027, 62, 40438, 10206, 62, 33207, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 337, 16820, 62, 33, 1268, 13153, 2099, 1220, 38, 1847, 14, 25664, 62, 49058, 1988, 1220, 38, 1847, 14, 25664, 14804, 49058, 62, 33, 1268, 13153, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 337, 16820, 62, 32541, 2099, 1220, 38, 1847, 14, 25664, 62, 49058, 1988, 1220, 38, 1847, 14, 25664, 14804, 49058, 62, 32541, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 39852, 11053, 62, 24805, 10619, 2099, 1220, 38, 1847, 14, 25664, 62, 3185, 51, 11053, 1988, 1220, 38, 1847, 14, 25664, 14804, 3185, 51, 11053, 62, 24805, 10619, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 39852, 11053, 62, 24805, 10619, 62, 1340, 11319, 2099, 1220, 38, 1847, 14, 25664, 62, 3185, 51, 11053, 1988, 1220, 38, 1847, 14, 25664, 14804, 3185, 51, 11053, 62, 24805, 10619, 62, 1340, 11319, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 39852, 11053, 62, 43387, 6158, 2099, 1220, 38, 1847, 14, 25664, 62, 3185, 51, 11053, 1988, 1220, 38, 1847, 14, 25664, 14804, 3185, 51, 11053, 62, 43387, 6158, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 39852, 11053, 62, 43387, 6158, 62, 1340, 11319, 2099, 1220, 38, 1847, 14, 25664, 62, 3185, 51, 11053, 1988, 1220, 38, 1847, 14, 25664, 14804, 3185, 51, 11053, 62, 43387, 6158, 62, 1340, 11319, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 39852, 11053, 62, 38827, 2200, 6158, 2099, 1220, 38, 1847, 14, 25664, 62, 3185, 51, 11053, 1988, 1220, 38, 1847, 14, 25664, 14804, 3185, 51, 11053, 62, 38827, 2200, 6158, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 39852, 11053, 62, 38827, 2200, 6158, 62, 1340, 11319, 2099, 1220, 38, 1847, 14, 25664, 62, 3185, 51, 11053, 1988, 1220, 38, 1847, 14, 25664, 14804, 3185, 51, 11053, 62, 38827, 2200, 6158, 62, 1340, 11319, 13, 25113, 2943, 5626, 13918, 198, 220, 38491, 39852, 11053, 62, 5446, 4944, 34, 6158, 2099, 1220, 38, 1847, 14, 25664, 62, 3185, 51, 11053, 1988, 1220, 38, 1847, 14, 25664, 14804, 3185, 51, 11053, 62, 5446, 4944, 34, 6158, 13, 25113, 2943, 5626, 13918, 198, 220, 1366, 15859, 7597, 2099, 1220, 38, 1847, 14, 25664, 62, 26861, 7597, 1100, 12, 8807, 764, 198, 220, 1366, 15628, 62, 15675, 2099, 9564, 2969, 62, 8202, 3535, 1100, 12, 8807, 764, 198, 220, 1366, 15628, 62, 36078, 42, 2099, 9564, 2969, 62, 8202, 3535, 1100, 12, 8807, 764, 198, 220, 1366, 15628, 62, 18564, 12709, 2099, 9564, 2969, 62, 8202, 3535, 1100, 12, 8807, 764, 198, 220, 1366, 45811, 2099, 1006, 284, 1220, 38, 1847, 14, 25664, 1100, 12, 8807, 764, 198, 220, 1366, 3180, 62, 5097, 48751, 2099, 9564, 2969, 62, 8202, 3535, 1100, 12, 8807, 764, 198, 220, 1366, 3180, 62, 4720, 37, 2099, 9564, 2969, 62, 8202, 3535, 1100, 12, 8807, 764, 198, 220, 1366, 406, 49494, 2099, 314, 1100, 12, 8807, 764, 198, 220, 1366, 48920, 62, 40438, 10206, 2099, 1220, 38, 1847, 14, 25664, 62, 24027, 62, 40438, 10206, 1100, 12, 8807, 764, 198, 220, 1366, 337, 16820, 2099, 1220, 38, 1847, 14, 25664, 62, 49058, 1100, 12, 8807, 764, 198, 220, 1366, 39852, 11053, 2099, 1220, 38, 1847, 14, 25664, 62, 3185, 51, 11053, 1100, 12, 8807, 764, 198, 220, 1366, 28069, 17941, 2099, 314, 1100, 12, 8807, 764, 628, 220, 5050, 7852, 14058, 198, 220, 220, 220, 8620, 198, 220, 220, 220, 220, 220, 1220, 38, 1847, 14, 34, 55, 62, 9399, 62, 6369, 42006, 2849, 764, 198, 220, 5050, 7102, 46126, 1581, 198, 220, 220, 220, 33332, 198, 220, 220, 220, 220, 220, 5145, 25664, 2099, 1006, 284, 1220, 38, 1847, 14, 25664, 198, 220, 220, 220, 220, 220, 5145, 26861, 7597, 2099, 1220, 38, 1847, 14, 25664, 62, 26861, 7597, 4277, 15859, 7597, 62, 15675, 198, 220, 220, 220, 220, 220, 5145, 49058, 2099, 1220, 38, 1847, 14, 25664, 62, 49058, 4277, 337, 16820, 62, 32541, 198, 220, 220, 220, 220, 220, 5145, 3185, 51, 11053, 2099, 1220, 38, 1847, 14, 25664, 62, 3185, 51, 11053, 4277, 39852, 11053, 62, 43387, 6158, 198, 220, 220, 220, 220, 220, 5145, 24027, 62, 40438, 10206, 2099, 1220, 38, 1847, 14, 25664, 62, 24027, 62, 40438, 10206, 4277, 48920, 62, 40438, 10206, 62, 39371, 46, 764, 198, 220, 5050, 27975, 56, 62, 10468, 198, 220, 220, 220, 33332, 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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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 ]
*&---------------------------------------------------------------------* *& Include ZABAPGIT_GIT *&---------------------------------------------------------------------* CLASS ltcl_git_pack DEFINITION DEFERRED. *----------------------------------------------------------------------* * CLASS lcl_transport DEFINITION *----------------------------------------------------------------------* CLASS lcl_git_transport DEFINITION FINAL. PUBLIC SECTION. * remote to local CLASS-METHODS upload_pack IMPORTING io_repo TYPE REF TO lcl_repo_online iv_deepen TYPE abap_bool DEFAULT abap_true it_branches TYPE lcl_git_branch_list=>ty_git_branch_list_tt OPTIONAL EXPORTING et_objects TYPE ty_objects_tt ev_branch TYPE ty_sha1 RAISING lcx_exception. * local to remote CLASS-METHODS receive_pack IMPORTING iv_url TYPE string iv_old TYPE ty_sha1 iv_new TYPE ty_sha1 iv_branch_name TYPE string iv_pack TYPE xstring RAISING lcx_exception. CLASS-METHODS branches IMPORTING iv_url TYPE string RETURNING VALUE(ro_branch_list) TYPE REF TO lcl_git_branch_list RAISING lcx_exception. PRIVATE SECTION. CONSTANTS: BEGIN OF c_service, receive TYPE string VALUE 'receive', "#EC NOTEXT upload TYPE string VALUE 'upload', "#EC NOTEXT END OF c_service. CLASS-METHODS branch_list IMPORTING iv_url TYPE string iv_service TYPE string EXPORTING eo_client TYPE REF TO lcl_http_client eo_branch_list TYPE REF TO lcl_git_branch_list RAISING lcx_exception. CLASS-METHODS find_branch IMPORTING iv_url TYPE string iv_service TYPE string iv_branch_name TYPE string EXPORTING eo_client TYPE REF TO lcl_http_client ev_branch TYPE ty_sha1 RAISING lcx_exception. CLASS-METHODS parse EXPORTING ev_pack TYPE xstring CHANGING cv_data TYPE xstring RAISING lcx_exception. ENDCLASS. "lcl_transport DEFINITION *----------------------------------------------------------------------* * CLASS lcl_pack DEFINITION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS lcl_git_pack DEFINITION FINAL FRIENDS ltcl_git_pack. PUBLIC SECTION. TYPES: BEGIN OF ty_node, chmod TYPE ty_chmod, name TYPE string, sha1 TYPE ty_sha1, END OF ty_node. TYPES: ty_nodes_tt TYPE STANDARD TABLE OF ty_node WITH DEFAULT KEY. TYPES: BEGIN OF ty_commit, tree TYPE ty_sha1, parent TYPE ty_sha1, parent2 TYPE ty_sha1, author TYPE string, committer TYPE string, body TYPE string, END OF ty_commit. CLASS-METHODS decode IMPORTING iv_data TYPE xstring RETURNING VALUE(rt_objects) TYPE ty_objects_tt RAISING lcx_exception. CLASS-METHODS decode_tree IMPORTING iv_data TYPE xstring RETURNING VALUE(rt_nodes) TYPE ty_nodes_tt RAISING lcx_exception. CLASS-METHODS decode_commit IMPORTING iv_data TYPE xstring RETURNING VALUE(rs_commit) TYPE ty_commit RAISING lcx_exception. CLASS-METHODS encode IMPORTING it_objects TYPE ty_objects_tt RETURNING VALUE(rv_data) TYPE xstring RAISING lcx_exception. CLASS-METHODS encode_tree IMPORTING it_nodes TYPE ty_nodes_tt RETURNING VALUE(rv_data) TYPE xstring. CLASS-METHODS encode_commit IMPORTING is_commit TYPE ty_commit RETURNING VALUE(rv_data) TYPE xstring. PRIVATE SECTION. CONSTANTS: c_pack_start TYPE x LENGTH 4 VALUE '5041434B', " PACK c_zlib TYPE x LENGTH 2 VALUE '789C', c_zlib_hmm TYPE x LENGTH 2 VALUE '7801', c_version TYPE x LENGTH 4 VALUE '00000002'. CLASS-METHODS decode_deltas CHANGING ct_objects TYPE ty_objects_tt RAISING lcx_exception. CLASS-METHODS type_and_length IMPORTING is_object TYPE ty_object RETURNING VALUE(rv_xstring) TYPE xstring RAISING lcx_exception. CLASS-METHODS delta IMPORTING is_object TYPE ty_object CHANGING ct_objects TYPE ty_objects_tt RAISING lcx_exception. CLASS-METHODS delta_header EXPORTING ev_header TYPE i CHANGING cv_delta TYPE xstring. CLASS-METHODS sort_tree IMPORTING it_nodes TYPE ty_nodes_tt RETURNING VALUE(rt_nodes) TYPE ty_nodes_tt. CLASS-METHODS get_type IMPORTING iv_x TYPE x RETURNING VALUE(rv_type) TYPE ty_type RAISING lcx_exception. CLASS-METHODS get_length EXPORTING ev_length TYPE i CHANGING cv_data TYPE xstring. ENDCLASS. "lcl_pack DEFINITION *----------------------------------------------------------------------* * CLASS lcl_transport IMPLEMENTATION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS lcl_git_transport IMPLEMENTATION. METHOD find_branch. DATA: lo_branch_list TYPE REF TO lcl_git_branch_list. branch_list( EXPORTING iv_url = iv_url iv_service = iv_service IMPORTING eo_client = eo_client eo_branch_list = lo_branch_list ). IF ev_branch IS SUPPLIED. ev_branch = lo_branch_list->find_by_name( iv_branch_name )-sha1. ENDIF. ENDMETHOD. "find_branch METHOD branches. DATA: lo_client TYPE REF TO lcl_http_client. lcl_git_transport=>branch_list( EXPORTING iv_url = iv_url iv_service = c_service-upload IMPORTING eo_client = lo_client eo_branch_list = ro_branch_list ). lo_client->close( ). ENDMETHOD. "branches METHOD branch_list. DATA: lv_data TYPE string. eo_client = lcl_http=>create_by_url( iv_url = iv_url iv_service = iv_service ). lv_data = eo_client->get_cdata( ). CREATE OBJECT eo_branch_list EXPORTING iv_data = lv_data. ENDMETHOD. "branch_list METHOD receive_pack. DATA: lo_client TYPE REF TO lcl_http_client, lv_cmd_pkt TYPE string, lv_line TYPE string, lv_tmp TYPE xstring, lv_xstring TYPE xstring, lv_string TYPE string, lv_cap_list TYPE string, lv_buffer TYPE string. find_branch( EXPORTING iv_url = iv_url iv_service = c_service-receive iv_branch_name = iv_branch_name IMPORTING eo_client = lo_client ). lo_client->set_headers( iv_url = iv_url iv_service = c_service-receive ). lv_cap_list = 'report-status agent=' && lcl_http=>get_agent( ) ##NO_TEXT. lv_line = iv_old && ` ` && iv_new && ` ` && iv_branch_name && lcl_git_utils=>get_null( ) && ` ` && lv_cap_list && gc_newline. "#EC NOTEXT lv_cmd_pkt = lcl_git_utils=>pkt_string( lv_line ). lv_buffer = lv_cmd_pkt && '0000'. lv_tmp = lcl_convert=>string_to_xstring_utf8( lv_buffer ). CONCATENATE lv_tmp iv_pack INTO lv_xstring IN BYTE MODE. lv_xstring = lo_client->send_receive_close( lv_xstring ). lv_string = lcl_convert=>xstring_to_string_utf8( lv_xstring ). IF NOT lv_string CP '*unpack ok*'. lcx_exception=>raise( 'unpack not ok' ). ELSEIF lv_string CP '*pre-receive hook declined*'. lcx_exception=>raise( 'pre-receive hook declined' ). ELSEIF lv_string CP '*funny refname*'. lcx_exception=>raise( 'funny refname' ). ENDIF. ENDMETHOD. "receive_pack METHOD parse. CONSTANTS: lc_band1 TYPE x VALUE '01'. DATA: lv_len TYPE i, lv_contents TYPE xstring, lv_pack TYPE xstring. WHILE xstrlen( cv_data ) >= 4. lv_len = lcl_git_utils=>length_utf8_hex( cv_data ). IF lv_len > xstrlen( cv_data ). lcx_exception=>raise( 'parse, string length too large' ). ENDIF. lv_contents = cv_data(lv_len). IF lv_len = 0. cv_data = cv_data+4. CONTINUE. ELSE. cv_data = cv_data+lv_len. ENDIF. lv_contents = lv_contents+4. IF xstrlen( lv_contents ) > 1 AND lv_contents(1) = lc_band1. CONCATENATE lv_pack lv_contents+1 INTO lv_pack IN BYTE MODE. ENDIF. ENDWHILE. ev_pack = lv_pack. ENDMETHOD. "parse METHOD upload_pack. DATA: lo_client TYPE REF TO lcl_http_client, lv_buffer TYPE string, lv_xstring TYPE xstring, lv_line TYPE string, lv_pack TYPE xstring, lt_branches TYPE lcl_git_branch_list=>ty_git_branch_list_tt, lv_capa TYPE string. FIELD-SYMBOLS: <ls_branch> LIKE LINE OF lt_branches. CLEAR et_objects. find_branch( EXPORTING iv_url = io_repo->get_url( ) iv_service = c_service-upload iv_branch_name = io_repo->get_branch_name( ) IMPORTING eo_client = lo_client ev_branch = ev_branch ). IF it_branches IS INITIAL. APPEND INITIAL LINE TO lt_branches ASSIGNING <ls_branch>. <ls_branch>-sha1 = ev_branch. ELSE. lt_branches = it_branches. ENDIF. lo_client->set_headers( iv_url = io_repo->get_url( ) iv_service = c_service-upload ). LOOP AT lt_branches FROM 1 ASSIGNING <ls_branch>. IF sy-tabix = 1. lv_capa = 'side-band-64k no-progress multi_ack agent=' && lcl_http=>get_agent( ) ##NO_TEXT. lv_line = 'want' && ` ` && <ls_branch>-sha1 && ` ` && lv_capa && gc_newline. "#EC NOTEXT ELSE. lv_line = 'want' && ` ` && <ls_branch>-sha1 && gc_newline. "#EC NOTEXT ENDIF. lv_buffer = lv_buffer && lcl_git_utils=>pkt_string( lv_line ). ENDLOOP. IF iv_deepen = abap_true. lv_buffer = lv_buffer && lcl_git_utils=>pkt_string( 'deepen 1' && gc_newline ). "#EC NOTEXT ENDIF. lv_buffer = lv_buffer && '0000' && '0009done' && gc_newline. lv_xstring = lo_client->send_receive_close( lcl_convert=>string_to_xstring_utf8( lv_buffer ) ). parse( IMPORTING ev_pack = lv_pack CHANGING cv_data = lv_xstring ). IF lv_pack IS INITIAL. lcx_exception=>raise( 'empty pack' ). ENDIF. et_objects = lcl_git_pack=>decode( lv_pack ). ENDMETHOD. "upload_pack ENDCLASS. "lcl_transport IMPLEMENTATION *----------------------------------------------------------------------* * CLASS lcl_git_pack IMPLEMENTATION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS lcl_git_pack IMPLEMENTATION. METHOD sort_tree. TYPES: BEGIN OF ty_sort, sort TYPE string, node TYPE ty_node, END OF ty_sort. DATA: lt_sort TYPE STANDARD TABLE OF ty_sort WITH DEFAULT KEY. FIELD-SYMBOLS: <ls_sort> LIKE LINE OF lt_sort, <ls_node> LIKE LINE OF it_nodes. LOOP AT it_nodes ASSIGNING <ls_node>. APPEND INITIAL LINE TO lt_sort ASSIGNING <ls_sort>. IF <ls_node>-chmod = gc_chmod-dir. CONCATENATE <ls_node>-name '/' INTO <ls_sort>-sort. ELSE. <ls_sort>-sort = <ls_node>-name. ENDIF. <ls_sort>-node = <ls_node>. ENDLOOP. * following has to be done, or unpack will fail on server side SORT lt_sort BY sort ASCENDING. LOOP AT lt_sort ASSIGNING <ls_sort>. APPEND <ls_sort>-node TO rt_nodes. ENDLOOP. ENDMETHOD. METHOD type_and_length. DATA: lv_bits TYPE string, lv_type TYPE string, lv_result TYPE string, lv_c TYPE c, lv_offset TYPE i, lv_x4 TYPE x LENGTH 4, lv_x TYPE x LENGTH 1. CASE is_object-type. WHEN gc_type-commit. lv_type = '001'. WHEN gc_type-tree. lv_type = '010'. WHEN gc_type-blob. lv_type = '011'. WHEN gc_type-ref_d. lv_type = '111'. WHEN OTHERS. lcx_exception=>raise( 'Unexpected object type while encoding pack' ). ENDCASE. lv_x4 = xstrlen( is_object-data ). DO 32 TIMES. GET BIT sy-index OF lv_x4 INTO lv_c. CONCATENATE lv_bits lv_c INTO lv_bits. ENDDO. IF lv_bits(28) = '0000000000000000000000000000'. CONCATENATE '0' lv_type lv_bits+28(4) INTO lv_result. ELSEIF lv_bits(21) = '000000000000000000000'. CONCATENATE '1' lv_type lv_bits+28(4) INTO lv_result. CONCATENATE lv_result '0' lv_bits+21(7) INTO lv_result. ELSEIF lv_bits(14) = '00000000000000'. CONCATENATE '1' lv_type lv_bits+28(4) INTO lv_result. CONCATENATE lv_result '1' lv_bits+21(7) INTO lv_result. CONCATENATE lv_result '0' lv_bits+14(7) INTO lv_result. ELSEIF lv_bits(7) = '0000000'. CONCATENATE '1' lv_type lv_bits+28(4) INTO lv_result. CONCATENATE lv_result '1' lv_bits+21(7) INTO lv_result. CONCATENATE lv_result '1' lv_bits+14(7) INTO lv_result. CONCATENATE lv_result '0' lv_bits+7(7) INTO lv_result. ELSE. * this IF can be refactored, use shifting? lcx_exception=>raise( 'Todo, encoding length' ). ENDIF. * convert bit string to xstring CLEAR lv_x. DO strlen( lv_result ) TIMES. lv_offset = sy-index - 1. IF lv_result+lv_offset(1) = '1'. SET BIT ( lv_offset MOD 8 ) + 1 OF lv_x. ENDIF. IF ( lv_offset + 1 ) MOD 8 = 0. CONCATENATE rv_xstring lv_x INTO rv_xstring IN BYTE MODE. CLEAR lv_x. ENDIF. ENDDO. ENDMETHOD. "type_and_length METHOD get_length. DATA: lv_x TYPE x, lv_length_bits TYPE string, lv_bitbyte TYPE ty_bitbyte. lv_x = cv_data(1). lv_bitbyte = lcl_convert=>x_to_bitbyte( lv_x ). cv_data = cv_data+1. lv_length_bits = lv_bitbyte+4. WHILE lv_bitbyte(1) <> '0'. lv_x = cv_data(1). lv_bitbyte = lcl_convert=>x_to_bitbyte( lv_x ). cv_data = cv_data+1. CONCATENATE lv_bitbyte+1 lv_length_bits INTO lv_length_bits. ENDWHILE. ev_length = lcl_convert=>bitbyte_to_int( lv_length_bits ). ENDMETHOD. "get_length METHOD encode_tree. CONSTANTS: lc_null TYPE x VALUE '00'. DATA: lv_string TYPE string, lt_nodes LIKE it_nodes, lv_hex20 TYPE x LENGTH 20, lv_xstring TYPE xstring. FIELD-SYMBOLS: <ls_node> LIKE LINE OF it_nodes. lt_nodes = sort_tree( it_nodes ). LOOP AT lt_nodes ASSIGNING <ls_node>. ASSERT NOT <ls_node>-chmod IS INITIAL. ASSERT NOT <ls_node>-name IS INITIAL. ASSERT NOT <ls_node>-sha1 IS INITIAL. CONCATENATE <ls_node>-chmod <ls_node>-name INTO lv_string SEPARATED BY space. lv_xstring = lcl_convert=>string_to_xstring_utf8( lv_string ). lv_hex20 = to_upper( <ls_node>-sha1 ). CONCATENATE rv_data lv_xstring lc_null lv_hex20 INTO rv_data IN BYTE MODE. ENDLOOP. ENDMETHOD. "encode_tree METHOD encode_commit. DATA: lv_string TYPE string, lv_tmp TYPE string, lv_tree_lower TYPE string, lv_parent_lower TYPE string. lv_tree_lower = is_commit-tree. TRANSLATE lv_tree_lower TO LOWER CASE. lv_string = ''. CONCATENATE 'tree' lv_tree_lower INTO lv_tmp SEPARATED BY space. "#EC NOTEXT CONCATENATE lv_string lv_tmp gc_newline INTO lv_string. IF NOT is_commit-parent IS INITIAL. lv_parent_lower = is_commit-parent. TRANSLATE lv_parent_lower TO LOWER CASE. CONCATENATE 'parent' lv_parent_lower INTO lv_tmp SEPARATED BY space. "#EC NOTEXT CONCATENATE lv_string lv_tmp gc_newline INTO lv_string. ENDIF. IF NOT is_commit-parent2 IS INITIAL. lv_parent_lower = is_commit-parent2. TRANSLATE lv_parent_lower TO LOWER CASE. CONCATENATE 'parent' lv_parent_lower INTO lv_tmp SEPARATED BY space. "#EC NOTEXT CONCATENATE lv_string lv_tmp gc_newline INTO lv_string. ENDIF. CONCATENATE 'author' is_commit-author INTO lv_tmp SEPARATED BY space. "#EC NOTEXT CONCATENATE lv_string lv_tmp gc_newline INTO lv_string. CONCATENATE 'committer' is_commit-committer INTO lv_tmp SEPARATED BY space. "#EC NOTEXT CONCATENATE lv_string lv_tmp gc_newline INTO lv_string. CONCATENATE lv_string gc_newline is_commit-body INTO lv_string. rv_data = lcl_convert=>string_to_xstring_utf8( lv_string ). ENDMETHOD. "encode_commit METHOD get_type. DATA: lv_char3 TYPE c LENGTH 3, lv_bitbyte TYPE ty_bitbyte. lv_bitbyte = lcl_convert=>x_to_bitbyte( iv_x ). lv_char3 = lv_bitbyte+1. CASE lv_char3. WHEN '001'. rv_type = gc_type-commit. WHEN '010'. rv_type = gc_type-tree. WHEN '011'. rv_type = gc_type-blob. WHEN '111'. rv_type = gc_type-ref_d. WHEN OTHERS. lcx_exception=>raise( 'Todo, unknown type' ). ENDCASE. ENDMETHOD. "get_type METHOD decode_commit. DATA: lv_string TYPE string, lv_word TYPE string, lv_trash TYPE string ##NEEDED, lt_string TYPE TABLE OF string. FIELD-SYMBOLS: <lv_string> LIKE LINE OF lt_string. lv_string = lcl_convert=>xstring_to_string_utf8( iv_data ). SPLIT lv_string AT gc_newline INTO TABLE lt_string. LOOP AT lt_string ASSIGNING <lv_string>. IF NOT rs_commit-committer IS INITIAL. CONCATENATE rs_commit-body <lv_string> INTO rs_commit-body SEPARATED BY gc_newline. ELSE. SPLIT <lv_string> AT space INTO lv_word lv_trash. CASE lv_word. WHEN 'tree'. rs_commit-tree = <lv_string>+5. WHEN 'parent'. IF rs_commit-parent IS INITIAL. rs_commit-parent = <lv_string>+7. ELSE. rs_commit-parent2 = <lv_string>+7. ENDIF. WHEN 'author'. rs_commit-author = <lv_string>+7. WHEN 'committer'. rs_commit-committer = <lv_string>+10. WHEN OTHERS. ASSERT 0 = 1. ENDCASE. ENDIF. ENDLOOP. * strip first newline IF strlen( rs_commit-body ) >= 2. rs_commit-body = rs_commit-body+2. ENDIF. IF rs_commit-author IS INITIAL OR rs_commit-committer IS INITIAL OR rs_commit-tree IS INITIAL. lcx_exception=>raise( 'multiple parents? not supported' ). ENDIF. ENDMETHOD. "decode_commit METHOD delta_header. DATA: lv_bitbyte TYPE ty_bitbyte, lv_bits TYPE string, lv_x TYPE x. lv_bits = ''. DO. lv_x = cv_delta(1). cv_delta = cv_delta+1. lv_bitbyte = lcl_convert=>x_to_bitbyte( lv_x ). CONCATENATE lv_bitbyte+1 lv_bits INTO lv_bits. IF lv_bitbyte(1) = '0'. EXIT. " current loop ENDIF. ENDDO. ev_header = lcl_convert=>bitbyte_to_int( lv_bits ). ENDMETHOD. "delta_header METHOD delta. DATA: lv_delta TYPE xstring, lv_base TYPE xstring, lv_result TYPE xstring, lv_bitbyte TYPE ty_bitbyte, lv_offset TYPE i, lv_message TYPE string, lv_sha1 TYPE ty_sha1, ls_object LIKE LINE OF ct_objects, lv_len TYPE i, lv_x TYPE x. FIELD-SYMBOLS: <ls_object> LIKE LINE OF ct_objects. lv_delta = is_object-data. * find base READ TABLE ct_objects ASSIGNING <ls_object> WITH KEY sha1 = is_object-sha1. IF sy-subrc <> 0. CONCATENATE 'Base not found,' is_object-sha1 INTO lv_message SEPARATED BY space. "#EC NOTEXT lcx_exception=>raise( lv_message ). ELSE. lv_base = <ls_object>-data. ENDIF. * sanity check IF <ls_object>-type = gc_type-ref_d. lcx_exception=>raise( 'Delta, base eq delta' ). ENDIF. * skip the 2 headers delta_header( CHANGING cv_delta = lv_delta ). delta_header( CHANGING cv_delta = lv_delta ). WHILE xstrlen( lv_delta ) > 0. lv_x = lv_delta(1). lv_delta = lv_delta+1. lv_bitbyte = lcl_convert=>x_to_bitbyte( lv_x ). IF lv_bitbyte(1) = '1'. " MSB lv_offset = 0. IF lv_bitbyte+7(1) = '1'. lv_x = lv_delta(1). lv_delta = lv_delta+1. lv_offset = lv_x. ENDIF. IF lv_bitbyte+6(1) = '1'. lv_x = lv_delta(1). lv_delta = lv_delta+1. lv_offset = lv_offset + lv_x * 256. ENDIF. IF lv_bitbyte+5(1) = '1'. lv_x = lv_delta(1). lv_delta = lv_delta+1. lv_offset = lv_offset + lv_x * 65536. ENDIF. IF lv_bitbyte+4(1) = '1'. lv_x = lv_delta(1). lv_delta = lv_delta+1. lv_offset = lv_offset + lv_x * 16777216. " hmm, overflow? ENDIF. lv_len = 0. IF lv_bitbyte+3(1) = '1'. lv_x = lv_delta(1). lv_delta = lv_delta+1. lv_len = lv_x. ENDIF. IF lv_bitbyte+2(1) = '1'. lv_x = lv_delta(1). lv_delta = lv_delta+1. lv_len = lv_len + lv_x * 256. ENDIF. IF lv_bitbyte+1(1) = '1'. lv_x = lv_delta(1). lv_delta = lv_delta+1. lv_len = lv_len + lv_x * 65536. ENDIF. IF lv_len = 0. lv_len = 65536. ENDIF. CONCATENATE lv_result lv_base+lv_offset(lv_len) INTO lv_result IN BYTE MODE. ELSE. " lv_bitbyte(1) = '0' * insert from delta lv_len = lv_x. CONCATENATE lv_result lv_delta(lv_len) INTO lv_result IN BYTE MODE. lv_delta = lv_delta+lv_len. ENDIF. ENDWHILE. lv_sha1 = lcl_hash=>sha1( iv_type = <ls_object>-type iv_data = lv_result ). CLEAR ls_object. ls_object-sha1 = lv_sha1. ls_object-type = <ls_object>-type. ls_object-data = lv_result. APPEND ls_object TO ct_objects. ENDMETHOD. "delta METHOD decode_deltas. DATA: ls_object LIKE LINE OF ct_objects, lt_deltas LIKE ct_objects. LOOP AT ct_objects INTO ls_object WHERE type = gc_type-ref_d. DELETE ct_objects INDEX sy-tabix. APPEND ls_object TO lt_deltas. ENDLOOP. LOOP AT lt_deltas INTO ls_object. delta( EXPORTING is_object = ls_object CHANGING ct_objects = ct_objects ). ENDLOOP. ENDMETHOD. "decode_deltas METHOD decode_tree. CONSTANTS: lc_sha_length TYPE i VALUE 20, lc_null TYPE x VALUE '00'. DATA: lv_xstring TYPE xstring, lv_chmod TYPE ty_chmod, lv_name TYPE string, lv_string TYPE string, lv_len TYPE i, lv_offset TYPE i, lv_cursor TYPE i, ls_node TYPE ty_node, lv_start TYPE i. DO. IF lv_cursor >= xstrlen( iv_data ). EXIT. " current loop ENDIF. IF iv_data+lv_cursor(1) = lc_null. lv_len = lv_cursor - lv_start. lv_xstring = iv_data+lv_start(lv_len). lv_string = lcl_convert=>xstring_to_string_utf8( lv_xstring ). SPLIT lv_string AT space INTO lv_chmod lv_name. lv_offset = lv_cursor + 1. CLEAR ls_node. ls_node-chmod = lv_chmod. IF ls_node-chmod <> gc_chmod-dir AND ls_node-chmod <> gc_chmod-file AND ls_node-chmod <> gc_chmod-executable. lcx_exception=>raise( 'Unknown chmod' ). ENDIF. ls_node-name = lv_name. ls_node-sha1 = iv_data+lv_offset(lc_sha_length). TRANSLATE ls_node-sha1 TO LOWER CASE. APPEND ls_node TO rt_nodes. lv_start = lv_cursor + 1 + lc_sha_length. lv_cursor = lv_start. ELSE. lv_cursor = lv_cursor + 1. ENDIF. ENDDO. ENDMETHOD. "decode_tree METHOD decode. DATA: lv_x TYPE x, lv_data TYPE xstring, lv_type TYPE c LENGTH 6, lv_zlib TYPE x LENGTH 2, lv_objects TYPE i, lv_len TYPE i, lv_sha1 TYPE ty_sha1, lv_ref_delta TYPE ty_sha1, lv_adler32 TYPE lcl_hash=>ty_adler32, lv_compressed TYPE xstring, lv_compressed_len TYPE i, lv_decompress_len TYPE i, lv_decompressed TYPE xstring, lv_xstring TYPE xstring, lv_expected TYPE i, ls_object LIKE LINE OF rt_objects, ls_data TYPE lcl_zlib=>ty_decompress. lv_data = iv_data. * header IF NOT xstrlen( lv_data ) > 4 OR lv_data(4) <> c_pack_start. lcx_exception=>raise( 'Unexpected pack header' ). ENDIF. lv_data = lv_data+4. * version IF lv_data(4) <> c_version. lcx_exception=>raise( 'Version not supported' ). ENDIF. lv_data = lv_data+4. * number of objects lv_xstring = lv_data(4). lv_objects = lcl_convert=>xstring_to_int( lv_xstring ). lv_data = lv_data+4. DO lv_objects TIMES. lv_x = lv_data(1). lv_type = get_type( lv_x ). get_length( IMPORTING ev_length = lv_expected CHANGING cv_data = lv_data ). IF lv_type = gc_type-ref_d. lv_ref_delta = lv_data(20). lv_data = lv_data+20. ENDIF. * strip header, '789C', CMF + FLG lv_zlib = lv_data(2). IF lv_zlib <> c_zlib AND lv_zlib <> c_zlib_hmm. lcx_exception=>raise( 'Unexpected zlib header' ). ENDIF. lv_data = lv_data+2. ******************************* IF lv_zlib = c_zlib. cl_abap_gzip=>decompress_binary( EXPORTING gzip_in = lv_data IMPORTING raw_out = lv_decompressed raw_out_len = lv_decompress_len ). IF lv_expected <> lv_decompress_len. lcx_exception=>raise( 'Decompression falied' ). ENDIF. cl_abap_gzip=>compress_binary( EXPORTING raw_in = lv_decompressed IMPORTING gzip_out = lv_compressed gzip_out_len = lv_compressed_len ). IF lv_compressed(lv_compressed_len) <> lv_data(lv_compressed_len). lcx_exception=>raise( 'Compressed data doesnt match' ). ENDIF. lv_data = lv_data+lv_compressed_len. ELSEIF lv_zlib = c_zlib_hmm. * cl_abap_gzip copmression works for header '789C', but does not work for * '7801', call custom implementation of DEFLATE algorithm. * The custom implementation could handle both, but most likely the kernel * implementation runs faster than the custom ABAP. ls_data = lcl_zlib=>decompress( lv_data ). lv_compressed_len = ls_data-compressed_len. lv_decompressed = ls_data-raw. IF lv_compressed_len IS INITIAL. lcx_exception=>raise( 'Decompression falied :o/' ). ENDIF. lv_data = lv_data+lv_compressed_len. lv_adler32 = lcl_hash=>adler32( lv_decompressed ). IF lv_data(4) <> lv_adler32. lv_data = lv_data+1. ENDIF. IF lv_data(4) <> lv_adler32. lv_data = lv_data+1. ENDIF. IF lv_data(4) <> lv_adler32. lcx_exception=>raise( 'Wrong Adler checksum' ). ENDIF. ENDIF. lv_data = lv_data+4. " skip adler checksum ************************* CLEAR ls_object. IF lv_type = gc_type-ref_d. ls_object-sha1 = lv_ref_delta. TRANSLATE ls_object-sha1 TO LOWER CASE. ELSE. ls_object-sha1 = lcl_hash=>sha1( iv_type = lv_type iv_data = lv_decompressed ). ENDIF. ls_object-type = lv_type. ls_object-data = lv_decompressed. APPEND ls_object TO rt_objects. ENDDO. * check SHA1 at end of pack lv_len = xstrlen( iv_data ) - 20. lv_xstring = iv_data(lv_len). lv_sha1 = lcl_hash=>sha1_raw( lv_xstring ). IF to_upper( lv_sha1 ) <> lv_data. lcx_exception=>raise( 'SHA1 at end of pack doesnt match' ). ENDIF. decode_deltas( CHANGING ct_objects = rt_objects ). ENDMETHOD. "decode METHOD encode. DATA: lv_sha1 TYPE x LENGTH 20, lv_adler32 TYPE lcl_hash=>ty_adler32, lv_len TYPE i, lv_compressed TYPE xstring, lv_xstring TYPE xstring. FIELD-SYMBOLS: <ls_object> LIKE LINE OF it_objects. rv_data = c_pack_start. CONCATENATE rv_data c_version INTO rv_data IN BYTE MODE. lv_len = lines( it_objects ). lv_xstring = lcl_convert=>int_to_xstring( iv_i = lv_len iv_length = 4 ). CONCATENATE rv_data lv_xstring INTO rv_data IN BYTE MODE. LOOP AT it_objects ASSIGNING <ls_object>. lv_xstring = type_and_length( <ls_object> ). CONCATENATE rv_data lv_xstring INTO rv_data IN BYTE MODE. cl_abap_gzip=>compress_binary( EXPORTING raw_in = <ls_object>-data IMPORTING gzip_out = lv_compressed ). CONCATENATE rv_data c_zlib lv_compressed INTO rv_data IN BYTE MODE. lv_adler32 = lcl_hash=>adler32( <ls_object>-data ). CONCATENATE rv_data lv_adler32 INTO rv_data IN BYTE MODE. ENDLOOP. lv_sha1 = to_upper( lcl_hash=>sha1_raw( rv_data ) ). CONCATENATE rv_data lv_sha1 INTO rv_data IN BYTE MODE. ENDMETHOD. "encode ENDCLASS. "lcl_pack IMPLEMENTATION CLASS ltcl_git_porcelain DEFINITION DEFERRED. *----------------------------------------------------------------------* * CLASS lcl_porcelain DEFINITION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS lcl_git_porcelain DEFINITION FINAL FRIENDS ltcl_git_porcelain. PUBLIC SECTION. TYPES: BEGIN OF ty_expanded, path TYPE string, name TYPE string, sha1 TYPE ty_sha1, chmod TYPE ty_chmod, END OF ty_expanded. TYPES: ty_expanded_tt TYPE STANDARD TABLE OF ty_expanded WITH DEFAULT KEY. CLASS-METHODS pull IMPORTING io_repo TYPE REF TO lcl_repo_online EXPORTING et_files TYPE ty_files_tt et_objects TYPE ty_objects_tt ev_branch TYPE ty_sha1 RAISING lcx_exception. CLASS-METHODS push IMPORTING io_repo TYPE REF TO lcl_repo_online is_comment TYPE ty_comment io_stage TYPE REF TO lcl_stage EXPORTING ev_branch TYPE ty_sha1 et_updated_files TYPE ty_file_signatures_tt RAISING lcx_exception. CLASS-METHODS create_branch IMPORTING io_repo TYPE REF TO lcl_repo_online iv_name TYPE string iv_from TYPE ty_sha1 RAISING lcx_exception. CLASS-METHODS delete_branch IMPORTING io_repo TYPE REF TO lcl_repo_online is_branch TYPE lcl_git_branch_list=>ty_git_branch RAISING lcx_exception. CLASS-METHODS full_tree IMPORTING it_objects TYPE ty_objects_tt iv_branch TYPE ty_sha1 RETURNING VALUE(rt_expanded) TYPE ty_expanded_tt RAISING lcx_exception. PRIVATE SECTION. TYPES: BEGIN OF ty_tree, path TYPE string, data TYPE xstring, sha1 TYPE ty_sha1, END OF ty_tree. TYPES: ty_trees_tt TYPE STANDARD TABLE OF ty_tree WITH DEFAULT KEY. TYPES: BEGIN OF ty_folder, path TYPE string, count TYPE i, sha1 TYPE ty_sha1, END OF ty_folder. TYPES: ty_folders_tt TYPE STANDARD TABLE OF ty_folder WITH DEFAULT KEY. CONSTANTS: c_zero TYPE ty_sha1 VALUE '0000000000000000000000000000000000000000'. CLASS-METHODS build_trees IMPORTING it_expanded TYPE ty_expanded_tt RETURNING VALUE(rt_trees) TYPE ty_trees_tt RAISING lcx_exception. CLASS-METHODS find_folders IMPORTING it_expanded TYPE ty_expanded_tt RETURNING VALUE(rt_folders) TYPE ty_folders_tt. CLASS-METHODS walk IMPORTING it_objects TYPE ty_objects_tt iv_sha1 TYPE ty_sha1 iv_path TYPE string CHANGING ct_files TYPE ty_files_tt RAISING lcx_exception. CLASS-METHODS walk_tree IMPORTING it_objects TYPE ty_objects_tt iv_tree TYPE ty_sha1 iv_base TYPE string RETURNING VALUE(rt_expanded) TYPE ty_expanded_tt RAISING lcx_exception. CLASS-METHODS receive_pack IMPORTING is_comment TYPE ty_comment io_repo TYPE REF TO lcl_repo_online it_trees TYPE ty_trees_tt it_blobs TYPE ty_files_tt io_stage TYPE REF TO lcl_stage RETURNING VALUE(rv_branch) TYPE ty_sha1 RAISING lcx_exception. ENDCLASS. "lcl_porcelain DEFINITION *----------------------------------------------------------------------* * CLASS lcl_porcelain IMPLEMENTATION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS lcl_git_porcelain IMPLEMENTATION. METHOD receive_pack. DATA: lv_time TYPE lcl_time=>ty_unixtime, lv_commit TYPE xstring, lt_objects TYPE ty_objects_tt, lv_pack TYPE xstring, ls_object LIKE LINE OF lt_objects, ls_commit TYPE lcl_git_pack=>ty_commit. FIELD-SYMBOLS: <ls_tree> LIKE LINE OF it_trees, <ls_blob> LIKE LINE OF it_blobs. lv_time = lcl_time=>get( ). READ TABLE it_trees ASSIGNING <ls_tree> WITH KEY path = '/'. ASSERT sy-subrc = 0. * new commit ls_commit-committer = |{ is_comment-committer-name } <{ is_comment-committer-email }> { lv_time }|. IF is_comment-author-name IS NOT INITIAL. ls_commit-author = |{ is_comment-author-name } <{ is_comment-author-email }> { lv_time }|. ELSE. ls_commit-author = ls_commit-committer. ENDIF. ls_commit-tree = <ls_tree>-sha1. ls_commit-parent = io_stage->get_branch_sha1( ). ls_commit-parent2 = io_stage->get_merge_source( ). ls_commit-body = is_comment-comment. lv_commit = lcl_git_pack=>encode_commit( ls_commit ). CLEAR ls_object. ls_object-sha1 = lcl_hash=>sha1( iv_type = gc_type-commit iv_data = lv_commit ). ls_object-type = gc_type-commit. ls_object-data = lv_commit. APPEND ls_object TO lt_objects. LOOP AT it_trees ASSIGNING <ls_tree>. CLEAR ls_object. ls_object-sha1 = <ls_tree>-sha1. ls_object-type = gc_type-tree. ls_object-data = <ls_tree>-data. APPEND ls_object TO lt_objects. ENDLOOP. LOOP AT it_blobs ASSIGNING <ls_blob>. CLEAR ls_object. ls_object-sha1 = lcl_hash=>sha1( iv_type = gc_type-blob iv_data = <ls_blob>-data ). READ TABLE lt_objects WITH KEY type = gc_type-blob sha1 = ls_object-sha1 TRANSPORTING NO FIELDS. IF sy-subrc = 0. * two identical files added at the same time, only add one blob to the pack CONTINUE. ENDIF. ls_object-type = gc_type-blob. ASSERT NOT <ls_blob>-data IS INITIAL. ls_object-data = <ls_blob>-data. APPEND ls_object TO lt_objects. ENDLOOP. lv_pack = lcl_git_pack=>encode( lt_objects ). rv_branch = lcl_hash=>sha1( iv_type = gc_type-commit iv_data = lv_commit ). lcl_git_transport=>receive_pack( iv_url = io_repo->get_url( ) iv_old = io_stage->get_branch_sha1( ) iv_new = rv_branch iv_branch_name = io_stage->get_branch_name( ) iv_pack = lv_pack ). ENDMETHOD. "receive_pack METHOD delete_branch. DATA: lt_objects TYPE ty_objects_tt, lv_pack TYPE xstring. * "client MUST send an empty packfile" * https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt#L514 lv_pack = lcl_git_pack=>encode( lt_objects ). lcl_git_transport=>receive_pack( iv_url = io_repo->get_url( ) iv_old = is_branch-sha1 iv_new = c_zero iv_branch_name = is_branch-name iv_pack = lv_pack ). ENDMETHOD. METHOD create_branch. DATA: lt_objects TYPE ty_objects_tt, lv_pack TYPE xstring. IF iv_name CS ` `. lcx_exception=>raise( 'Branch name cannot contain blank spaces' ). ENDIF. * "client MUST send an empty packfile" * https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt#L514 lv_pack = lcl_git_pack=>encode( lt_objects ). lcl_git_transport=>receive_pack( iv_url = io_repo->get_url( ) iv_old = c_zero iv_new = iv_from iv_branch_name = iv_name iv_pack = lv_pack ). ENDMETHOD. METHOD push. DATA: lt_expanded TYPE ty_expanded_tt, lt_blobs TYPE ty_files_tt, lv_sha1 TYPE ty_sha1, lt_trees TYPE ty_trees_tt, lt_objects TYPE ty_objects_tt, lt_branches TYPE lcl_git_branch_list=>ty_git_branch_list_tt, lt_stage TYPE lcl_stage=>ty_stage_tt. FIELD-SYMBOLS: <ls_stage> LIKE LINE OF lt_stage, <ls_updated> LIKE LINE OF et_updated_files, <ls_branch> LIKE LINE OF lt_branches, <ls_exp> LIKE LINE OF lt_expanded. CLEAR et_updated_files. IF io_stage->get_branch_sha1( ) = io_repo->get_sha1_remote( ). * objects cached in io_repo can be used, if pushing to the branch configured in repo lt_objects = io_repo->get_objects( ). ELSE. APPEND INITIAL LINE TO lt_branches ASSIGNING <ls_branch>. <ls_branch>-name = io_stage->get_branch_name( ). <ls_branch>-sha1 = io_stage->get_branch_sha1( ). lcl_git_transport=>upload_pack( EXPORTING io_repo = io_repo it_branches = lt_branches IMPORTING et_objects = lt_objects ). ENDIF. lt_expanded = full_tree( it_objects = lt_objects iv_branch = io_stage->get_branch_sha1( ) ). lt_stage = io_stage->get_all( ). LOOP AT lt_stage ASSIGNING <ls_stage>. " Save file ref to updated files table APPEND INITIAL LINE TO et_updated_files ASSIGNING <ls_updated>. MOVE-CORRESPONDING <ls_stage>-file TO <ls_updated>. CASE <ls_stage>-method. WHEN lcl_stage=>c_method-add. APPEND <ls_stage>-file TO lt_blobs. READ TABLE lt_expanded ASSIGNING <ls_exp> WITH KEY name = <ls_stage>-file-filename path = <ls_stage>-file-path. IF sy-subrc <> 0. " new files APPEND INITIAL LINE TO lt_expanded ASSIGNING <ls_exp>. <ls_exp>-name = <ls_stage>-file-filename. <ls_exp>-path = <ls_stage>-file-path. <ls_exp>-chmod = gc_chmod-file. ENDIF. lv_sha1 = lcl_hash=>sha1( iv_type = gc_type-blob iv_data = <ls_stage>-file-data ). IF <ls_exp>-sha1 <> lv_sha1. <ls_exp>-sha1 = lv_sha1. ENDIF. <ls_updated>-sha1 = lv_sha1. "New sha1 WHEN lcl_stage=>c_method-rm. DELETE lt_expanded WHERE name = <ls_stage>-file-filename AND path = <ls_stage>-file-path. ASSERT sy-subrc = 0. CLEAR <ls_updated>-sha1. " Mark as deleted WHEN OTHERS. lcx_exception=>raise( 'stage method not supported, todo' ). ENDCASE. ENDLOOP. lt_trees = build_trees( lt_expanded ). ev_branch = receive_pack( is_comment = is_comment io_repo = io_repo it_trees = lt_trees it_blobs = lt_blobs io_stage = io_stage ). ENDMETHOD. "push METHOD walk_tree. DATA: ls_object LIKE LINE OF it_objects, lt_expanded LIKE rt_expanded, lt_nodes TYPE lcl_git_pack=>ty_nodes_tt. FIELD-SYMBOLS: <ls_exp> LIKE LINE OF rt_expanded, <ls_node> LIKE LINE OF lt_nodes. READ TABLE it_objects INTO ls_object WITH KEY sha1 = iv_tree type = gc_type-tree. IF sy-subrc <> 0. lcx_exception=>raise( 'tree not found' ). ENDIF. lt_nodes = lcl_git_pack=>decode_tree( ls_object-data ). LOOP AT lt_nodes ASSIGNING <ls_node>. CASE <ls_node>-chmod. WHEN gc_chmod-file OR gc_chmod-executable. APPEND INITIAL LINE TO rt_expanded ASSIGNING <ls_exp>. <ls_exp>-path = iv_base. <ls_exp>-name = <ls_node>-name. <ls_exp>-sha1 = <ls_node>-sha1. <ls_exp>-chmod = <ls_node>-chmod. WHEN gc_chmod-dir. lt_expanded = walk_tree( it_objects = it_objects iv_tree = <ls_node>-sha1 iv_base = iv_base && <ls_node>-name && '/' ). APPEND LINES OF lt_expanded TO rt_expanded. WHEN OTHERS. lcx_exception=>raise( 'walk_tree: unknown chmod' ). ENDCASE. ENDLOOP. ENDMETHOD. METHOD full_tree. DATA: ls_object LIKE LINE OF it_objects, ls_commit TYPE lcl_git_pack=>ty_commit. READ TABLE it_objects INTO ls_object WITH KEY sha1 = iv_branch type = gc_type-commit. IF sy-subrc <> 0. lcx_exception=>raise( 'commit not found' ). ENDIF. ls_commit = lcl_git_pack=>decode_commit( ls_object-data ). rt_expanded = walk_tree( it_objects = it_objects iv_tree = ls_commit-tree iv_base = '/' ). ENDMETHOD. "root_tree METHOD pull. DATA: ls_object LIKE LINE OF et_objects, ls_commit TYPE lcl_git_pack=>ty_commit. CLEAR et_files. CLEAR et_objects. CLEAR ev_branch. lcl_git_transport=>upload_pack( EXPORTING io_repo = io_repo IMPORTING et_objects = et_objects ev_branch = ev_branch ). READ TABLE et_objects INTO ls_object WITH KEY sha1 = ev_branch type = gc_type-commit. IF sy-subrc <> 0. lcx_exception=>raise( 'Commit/branch not found' ). ENDIF. ls_commit = lcl_git_pack=>decode_commit( ls_object-data ). walk( EXPORTING it_objects = et_objects iv_sha1 = ls_commit-tree iv_path = '/' CHANGING ct_files = et_files ). ENDMETHOD. "pull METHOD find_folders. DATA: lt_paths TYPE TABLE OF string, lv_split TYPE string, lv_path TYPE string. FIELD-SYMBOLS: <ls_folder> LIKE LINE OF rt_folders, <ls_new> LIKE LINE OF rt_folders, <ls_exp> LIKE LINE OF it_expanded. LOOP AT it_expanded ASSIGNING <ls_exp>. READ TABLE rt_folders WITH KEY path = <ls_exp>-path TRANSPORTING NO FIELDS. IF sy-subrc <> 0. APPEND INITIAL LINE TO rt_folders ASSIGNING <ls_folder>. <ls_folder>-path = <ls_exp>-path. ENDIF. ENDLOOP. * add empty folders LOOP AT rt_folders ASSIGNING <ls_folder>. SPLIT <ls_folder>-path AT '/' INTO TABLE lt_paths. CLEAR lv_path. LOOP AT lt_paths INTO lv_split. CONCATENATE lv_path lv_split '/' INTO lv_path. READ TABLE rt_folders WITH KEY path = lv_path TRANSPORTING NO FIELDS. IF sy-subrc <> 0. APPEND INITIAL LINE TO rt_folders ASSIGNING <ls_new>. <ls_new>-path = lv_path. ENDIF. ENDLOOP. ENDLOOP. LOOP AT rt_folders ASSIGNING <ls_folder>. FIND ALL OCCURRENCES OF '/' IN <ls_folder>-path MATCH COUNT <ls_folder>-count. ENDLOOP. ENDMETHOD. METHOD build_trees. DATA: lt_nodes TYPE lcl_git_pack=>ty_nodes_tt, ls_tree LIKE LINE OF rt_trees, lv_sub TYPE string, lv_len TYPE i, lt_folders TYPE ty_folders_tt. FIELD-SYMBOLS: <ls_folder> LIKE LINE OF lt_folders, <ls_node> LIKE LINE OF lt_nodes, <ls_sub> LIKE LINE OF lt_folders, <ls_exp> LIKE LINE OF it_expanded. lt_folders = find_folders( it_expanded ). * start with the deepest folders SORT lt_folders BY count DESCENDING. LOOP AT lt_folders ASSIGNING <ls_folder>. CLEAR lt_nodes. * files LOOP AT it_expanded ASSIGNING <ls_exp> WHERE path = <ls_folder>-path. APPEND INITIAL LINE TO lt_nodes ASSIGNING <ls_node>. <ls_node>-chmod = <ls_exp>-chmod. <ls_node>-name = <ls_exp>-name. <ls_node>-sha1 = <ls_exp>-sha1. ENDLOOP. * folders lv_sub = <ls_folder>-path && '+*'. LOOP AT lt_folders ASSIGNING <ls_sub> WHERE count = <ls_folder>-count + 1 AND path CP lv_sub. APPEND INITIAL LINE TO lt_nodes ASSIGNING <ls_node>. <ls_node>-chmod = gc_chmod-dir. * extract folder name, this can probably be done easier using regular expressions lv_len = strlen( <ls_folder>-path ). <ls_node>-name = <ls_sub>-path+lv_len. lv_len = strlen( <ls_node>-name ) - 1. <ls_node>-name = <ls_node>-name(lv_len). <ls_node>-sha1 = <ls_sub>-sha1. ENDLOOP. CLEAR ls_tree. ls_tree-path = <ls_folder>-path. ls_tree-data = lcl_git_pack=>encode_tree( lt_nodes ). ls_tree-sha1 = lcl_hash=>sha1( iv_type = gc_type-tree iv_data = ls_tree-data ). APPEND ls_tree TO rt_trees. <ls_folder>-sha1 = ls_tree-sha1. ENDLOOP. ENDMETHOD. METHOD walk. DATA: lv_path TYPE string, ls_file LIKE LINE OF ct_files, lt_nodes TYPE lcl_git_pack=>ty_nodes_tt. FIELD-SYMBOLS: <ls_tree> LIKE LINE OF it_objects, <ls_blob> LIKE LINE OF it_objects, <ls_node> LIKE LINE OF lt_nodes. READ TABLE it_objects ASSIGNING <ls_tree> WITH KEY sha1 = iv_sha1 type = gc_type-tree. IF sy-subrc <> 0. lcx_exception=>raise( 'Walk, tree not found' ). ENDIF. lt_nodes = lcl_git_pack=>decode_tree( <ls_tree>-data ). LOOP AT lt_nodes ASSIGNING <ls_node>. IF <ls_node>-chmod = gc_chmod-file. READ TABLE it_objects ASSIGNING <ls_blob> WITH KEY sha1 = <ls_node>-sha1 type = gc_type-blob. IF sy-subrc <> 0. lcx_exception=>raise( 'Walk, blob not found' ). ENDIF. CLEAR ls_file. ls_file-path = iv_path. ls_file-filename = <ls_node>-name. ls_file-data = <ls_blob>-data. ls_file-sha1 = <ls_blob>-sha1. APPEND ls_file TO ct_files. ENDIF. ENDLOOP. LOOP AT lt_nodes ASSIGNING <ls_node> WHERE chmod = gc_chmod-dir. CONCATENATE iv_path <ls_node>-name '/' INTO lv_path. walk( EXPORTING it_objects = it_objects iv_sha1 = <ls_node>-sha1 iv_path = lv_path CHANGING ct_files = ct_files ). ENDLOOP. ENDMETHOD. "walk ENDCLASS. "lcl_porcelain IMPLEMENTATION
[ 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, 38, 2043, 198, 9, 5, 10097, 30934, 9, 198, 198, 31631, 300, 83, 565, 62, 18300, 62, 8002, 5550, 20032, 17941, 23449, 1137, 22083, 13, 198, 198, 9, 10097, 23031, 9, 198, 9, 220, 220, 220, 220, 220, 220, 42715, 300, 565, 62, 7645, 634, 5550, 20032, 17941, 198, 9, 10097, 23031, 9, 198, 198, 31631, 300, 565, 62, 18300, 62, 7645, 634, 5550, 20032, 17941, 25261, 13, 198, 220, 44731, 44513, 13, 198, 198, 9, 6569, 284, 1957, 198, 220, 220, 220, 42715, 12, 49273, 50, 9516, 62, 8002, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 33245, 62, 260, 7501, 220, 220, 220, 220, 41876, 4526, 37, 5390, 300, 565, 62, 260, 7501, 62, 25119, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 22089, 268, 220, 220, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 7942, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 340, 62, 1671, 12140, 41876, 300, 565, 62, 18300, 62, 1671, 3702, 62, 4868, 14804, 774, 62, 18300, 62, 1671, 3702, 62, 4868, 62, 926, 39852, 2849, 1847, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 2123, 62, 48205, 220, 41876, 1259, 62, 48205, 62, 926, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 819, 62, 1671, 3702, 220, 220, 41876, 1259, 62, 26270, 16, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 300, 66, 87, 62, 1069, 4516, 13, 198, 198, 9, 1957, 284, 6569, 198, 220, 220, 220, 42715, 12, 49273, 50, 3328, 62, 8002, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 6371, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 727, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1259, 62, 26270, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 3605, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1259, 62, 26270, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 1671, 3702, 62, 3672, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 8002, 220, 220, 220, 220, 220, 220, 220, 41876, 2124, 8841, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 300, 66, 87, 62, 1069, 4516, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 13737, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 6371, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 305, 62, 1671, 3702, 62, 4868, 8, 41876, 4526, 37, 5390, 300, 565, 62, 18300, 62, 1671, 3702, 62, 4868, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 300, 66, 87, 62, 1069, 4516, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 25, 347, 43312, 3963, 269, 62, 15271, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3328, 41876, 4731, 26173, 8924, 705, 260, 15164, 3256, 220, 220, 220, 220, 220, 220, 25113, 2943, 5626, 13918, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9516, 220, 41876, 4731, 26173, 8924, 705, 25850, 3256, 220, 220, 220, 220, 220, 220, 220, 25113, 2943, 5626, 13918, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 269, 62, 15271, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 8478, 62, 4868, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 6371, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 15271, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 304, 78, 62, 16366, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 300, 565, 62, 4023, 62, 16366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 304, 78, 62, 1671, 3702, 62, 4868, 41876, 4526, 37, 5390, 300, 565, 62, 18300, 62, 1671, 3702, 62, 4868, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 300, 66, 87, 62, 1069, 4516, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 1064, 62, 1671, 3702, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 21628, 62, 6371, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 15271, 220, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 1671, 3702, 62, 3672, 41876, 4731, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 304, 78, 62, 16366, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 300, 565, 62, 4023, 62, 16366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 819, 62, 1671, 3702, 220, 220, 220, 220, 220, 41876, 1259, 62, 26270, 16, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 300, 66, 87, 62, 1069, 4516, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 21136, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 819, 62, 8002, 41876, 2124, 8841, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 220, 269, 85, 62, 7890, 41876, 2124, 8841, 198, 220, 220, 220, 220, 220, 17926, 1797, 2751, 220, 220, 300, 66, 87, 62, 1069, 4516, 13, 198, 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,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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 ]
INTERFACE if_ci_atc_quickfix PUBLIC. TYPES ty_code TYPE STANDARD TABLE OF string WITH EMPTY KEY. METHODS insert_before IMPORTING context TYPE REF TO cl_ci_atc_quickfix_context code TYPE ty_code RETURNING VALUE(self) TYPE REF TO if_ci_atc_quickfix. METHODS insert_after IMPORTING context TYPE REF TO cl_ci_atc_quickfix_context code TYPE ty_code RETURNING VALUE(self) TYPE REF TO if_ci_atc_quickfix. METHODS replace IMPORTING context TYPE REF TO cl_ci_atc_quickfix_context code TYPE ty_code RETURNING VALUE(self) TYPE REF TO if_ci_atc_quickfix. ENDINTERFACE.
[ 41358, 49836, 611, 62, 979, 62, 265, 66, 62, 24209, 13049, 198, 220, 44731, 13, 628, 220, 24412, 47, 1546, 1259, 62, 8189, 41876, 49053, 9795, 43679, 3963, 4731, 13315, 38144, 9936, 35374, 13, 628, 220, 337, 36252, 50, 7550, 62, 19052, 198, 220, 220, 220, 30023, 9863, 2751, 4732, 41876, 4526, 37, 5390, 537, 62, 979, 62, 265, 66, 62, 24209, 13049, 62, 22866, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2438, 41876, 1259, 62, 8189, 198, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 944, 8, 41876, 4526, 37, 5390, 611, 62, 979, 62, 265, 66, 62, 24209, 13049, 13, 198, 220, 337, 36252, 50, 7550, 62, 8499, 198, 220, 220, 220, 30023, 9863, 2751, 4732, 41876, 4526, 37, 5390, 537, 62, 979, 62, 265, 66, 62, 24209, 13049, 62, 22866, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2438, 41876, 1259, 62, 8189, 198, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 944, 8, 41876, 4526, 37, 5390, 611, 62, 979, 62, 265, 66, 62, 24209, 13049, 13, 198, 220, 337, 36252, 50, 6330, 198, 220, 220, 220, 30023, 9863, 2751, 4732, 41876, 4526, 37, 5390, 537, 62, 979, 62, 265, 66, 62, 24209, 13049, 62, 22866, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2438, 41876, 1259, 62, 8189, 198, 220, 220, 220, 30826, 4261, 15871, 26173, 8924, 7, 944, 8, 41876, 4526, 37, 5390, 611, 62, 979, 62, 265, 66, 62, 24209, 13049, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
* regenerated at 31.05.2021 09:04:02 ******************************************************************* * System-defined Include-files. * ******************************************************************* INCLUDE LZWFE_TBLTOP. " Global Data INCLUDE LZWFE_TBLUXX. " Function Modules ******************************************************************* * User-defined Include-files (if necessary). * ******************************************************************* * INCLUDE LZWFE_TBLF... " Subroutines * INCLUDE LZWFE_TBLO... " PBO-Modules * INCLUDE LZWFE_TBLI... " PAI-Modules * INCLUDE LZWFE_TBLE... " Events * INCLUDE LZWFE_TBLP... " Local class implement. * INCLUDE LZWFE_TBLT99. " ABAP Unit tests INCLUDE LZWFE_TBLF00 . " subprograms INCLUDE LZWFE_TBLI00 . " PAI modules INCLUDE LSVIMFXX . " subprograms INCLUDE LSVIMOXX . " PBO modules INCLUDE LSVIMIXX . " PAI modules
[ 9, 16935, 515, 379, 3261, 13, 2713, 13, 1238, 2481, 7769, 25, 3023, 25, 2999, 198, 17174, 17174, 8162, 198, 9, 220, 220, 4482, 12, 23211, 40348, 12, 16624, 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, 1635, 198, 17174, 17174, 8162, 198, 220, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 9148, 35222, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8060, 6060, 198, 220, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 9148, 52, 8051, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 15553, 3401, 5028, 198, 198, 17174, 17174, 8162, 198, 9, 220, 220, 11787, 12, 23211, 40348, 12, 16624, 357, 361, 3306, 737, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 198, 17174, 17174, 8162, 198, 9, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 9148, 37, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3834, 81, 448, 1127, 198, 9, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 9148, 46, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 350, 8202, 12, 5841, 5028, 198, 9, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 9148, 40, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8147, 40, 12, 5841, 5028, 198, 9, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 19146, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18715, 198, 9, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 9148, 47, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 10714, 1398, 3494, 13, 198, 9, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 9148, 51, 2079, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 9564, 2969, 11801, 5254, 198, 220, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 9148, 37, 405, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 366, 850, 23065, 82, 198, 220, 3268, 5097, 52, 7206, 406, 57, 54, 15112, 62, 51, 9148, 40, 405, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 366, 8147, 40, 13103, 198, 220, 3268, 5097, 52, 7206, 30948, 53, 3955, 37, 8051, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 366, 850, 23065, 82, 198, 220, 3268, 5097, 52, 7206, 30948, 53, 3955, 46, 8051, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 366, 350, 8202, 13103, 198, 220, 3268, 5097, 52, 7206, 30948, 53, 3955, 40, 8051, 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 ]
*----------------------------------------------------------------------* ***INCLUDE RPCIFU02I01 . *----------------------------------------------------------------------* *&---------------------------------------------------------------------* *& Module USER_COMMAND_2000 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE user_command_2000 INPUT. CASE ok_code. WHEN 'DELE'. CALL METHOD ALV2000->GET_SELECTED_ROWS IMPORTING ET_INDEX_ROWS = gt_index_ROWs[]. perform check_marked_results. PERFORM delete_marked_results. WHEN 'MARK'. perform select_last_results. CALL METHOD alv2000->set_selected_rows EXPORTING it_index_rows = gt_index_rows[]. WHEN 'BACK'. CALL METHOD g_custom_container2000->free. CLEAR: alv2000, g_custom_container2000. LEAVE TO SCREEN 0. WHEN 'EXIT'. LEAVE PROGRAM. WHEN 'CANC'. LEAVE TO TRANSACTION ' '. WHEN OTHERS. ENDCASE. ENDMODULE. " USER_COMMAND_2000 INPUT
[ 9, 10097, 23031, 9, 201, 198, 8162, 1268, 5097, 52, 7206, 39400, 5064, 52, 2999, 40, 486, 764, 201, 198, 9, 10097, 23031, 9, 201, 198, 9, 5, 10097, 30934, 9, 201, 198, 9, 5, 220, 220, 220, 220, 220, 19937, 220, 1294, 1137, 62, 9858, 44, 6981, 62, 11024, 220, 3268, 30076, 201, 198, 9, 5, 10097, 30934, 9, 201, 198, 9, 220, 220, 220, 220, 220, 220, 2420, 201, 198, 9, 10097, 23031, 9, 201, 198, 33365, 24212, 2836, 62, 21812, 62, 11024, 3268, 30076, 13, 201, 198, 201, 198, 220, 42001, 12876, 62, 8189, 13, 201, 198, 220, 220, 220, 42099, 705, 7206, 2538, 4458, 201, 198, 220, 220, 220, 220, 220, 42815, 337, 36252, 8355, 53, 11024, 3784, 18851, 62, 46506, 1961, 62, 49, 22845, 201, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 12152, 62, 12115, 6369, 62, 49, 22845, 796, 308, 83, 62, 9630, 62, 49, 3913, 82, 58, 4083, 201, 198, 220, 220, 220, 220, 220, 1620, 2198, 62, 23505, 62, 43420, 13, 201, 198, 220, 220, 220, 220, 220, 19878, 21389, 12233, 62, 23505, 62, 43420, 13, 201, 198, 220, 220, 220, 42099, 705, 44, 14175, 4458, 201, 198, 220, 220, 220, 220, 220, 1620, 2922, 62, 12957, 62, 43420, 13, 201, 198, 220, 220, 220, 220, 220, 42815, 337, 36252, 435, 85, 11024, 3784, 2617, 62, 34213, 62, 8516, 201, 198, 220, 220, 220, 220, 220, 220, 220, 7788, 15490, 2751, 340, 62, 9630, 62, 8516, 796, 308, 83, 62, 9630, 62, 8516, 58, 4083, 201, 198, 220, 220, 220, 42099, 705, 31098, 4458, 201, 198, 220, 220, 220, 220, 220, 42815, 337, 36252, 308, 62, 23144, 62, 34924, 11024, 3784, 5787, 13, 201, 198, 220, 220, 220, 220, 220, 30301, 1503, 25, 435, 85, 11024, 11, 308, 62, 23144, 62, 34924, 11024, 13, 201, 198, 220, 220, 220, 220, 220, 12509, 32, 6089, 5390, 6374, 2200, 1677, 657, 13, 201, 198, 220, 220, 220, 42099, 705, 6369, 2043, 4458, 201, 198, 220, 220, 220, 220, 220, 12509, 32, 6089, 46805, 13, 201, 198, 220, 220, 220, 42099, 705, 34, 20940, 4458, 201, 198, 220, 220, 220, 220, 220, 12509, 32, 6089, 5390, 44069, 44710, 705, 45302, 201, 198, 220, 220, 220, 42099, 440, 4221, 4877, 13, 201, 198, 220, 23578, 34, 11159, 13, 201, 198, 201, 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, 11024, 220, 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, 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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 ]
CLASS zcl_abapgit_res_repo_pull DEFINITION PUBLIC INHERITING FROM cl_adt_rest_resource FINAL CREATE PUBLIC. PUBLIC SECTION. TYPES: BEGIN OF ty_s_result, reason TYPE string, message TYPE string, END OF ty_s_result. TYPES: BEGIN OF ty_request_pull_data, branch TYPE string, transportrequest TYPE string, user TYPE string, password TYPE string, END OF ty_request_pull_data. TYPES: BEGIN OF ty_repo_w_links. INCLUDE TYPE zif_abapgit_persistence=>ty_repo. TYPES: links TYPE if_atom_types=>link_t. TYPES: END OF ty_repo_w_links. TYPES: tt_repo_w_links TYPE STANDARD TABLE OF ty_repo_w_links WITH DEFAULT KEY. CONSTANTS co_class_name TYPE seoclsname VALUE 'ZCL_ABAPGIT_RES_REPOS' ##NO_TEXT. CONSTANTS co_resource_type TYPE string VALUE 'REPOS' ##NO_TEXT. "EC NOTEXT CONSTANTS co_st_name_pull TYPE string VALUE 'ZABAPGIT_ST_REPO_PULL' ##NO_TEXT. CONSTANTS co_st_name_post_res TYPE string VALUE 'ZABAPGIT_ST_REPO_POST_RES'. CONSTANTS co_root_name_pull TYPE string VALUE 'REPOSITORY' ##NO_TEXT. CONSTANTS co_root_name_post_res TYPE string VALUE 'OBJECTS'. CONSTANTS co_content_type_repo_v1 TYPE string VALUE 'application/abapgit.adt.repo.v3+xml' ##NO_TEXT. CONSTANTS co_content_type_repos_v1 TYPE string VALUE 'application/abapgit.adt.repos.v2+xml' ##NO_TEXT. CONSTANTS co_content_type_object_v1 TYPE string VALUE 'application/abapgit.adt.repo.object.v2+xml' ##NO_TEXT. CONSTANTS co_st_name_get TYPE string VALUE 'ZABAPGIT_ST_REPOS' ##NO_TEXT. CONSTANTS co_root_name_get TYPE string VALUE 'REPOSITORIES' ##NO_TEXT. CONSTANTS co_content_type_repo_v2 TYPE string VALUE 'application/abapgit.adt.repo.v4+xml' ##NO_TEXT. METHODS post REDEFINITION. PROTECTED SECTION. PRIVATE SECTION. METHODS validate_request_data IMPORTING !is_request_data TYPE ty_request_pull_data iv_repo_key TYPE zif_abapgit_persistence=>ty_value RAISING zcx_abapgit_exception . ENDCLASS. CLASS zcl_abapgit_res_repo_pull IMPLEMENTATION. METHOD post. TYPES: BEGIN OF t_obj_result, obj_type TYPE trobjtype, obj_name TYPE sobj_name, obj_status TYPE symsgty, package TYPE devclass, msg_type TYPE symsgty, msg_text TYPE string, END OF t_obj_result. DATA lt_result_table TYPE STANDARD TABLE OF t_obj_result WITH DEFAULT KEY. DATA: ls_request_data TYPE ty_request_pull_data, lv_repo_key TYPE zif_abapgit_persistence=>ty_value. DATA lo_log TYPE REF TO zcl_abapgit_log. TRY. *------ Get Repository Key request->get_uri_attribute( EXPORTING name = 'key' mandatory = abap_true IMPORTING value = lv_repo_key ). *------ Content Handler DATA(lo_request_content_handler) = cl_adt_rest_comp_cnt_handler=>create( request = request content_handler = cl_adt_rest_cnt_hdl_factory=>get_instance( )->get_handler_for_xml_using_st( st_name = co_st_name_pull root_name = co_root_name_pull content_type = co_content_type_repo_v1 ) ). *------ Retrieve request data request->get_body_data( EXPORTING content_handler = lo_request_content_handler IMPORTING data = ls_request_data ). "Prerequisite check for request values validate_request_data( is_request_data = ls_request_data iv_repo_key = lv_repo_key ). *NEW start **------ Create new application logger object * DATA ls_header TYPE if_a4c_logger=>ts_header. * ls_header-scope = if_a4c_logger=>cs_scope-agit. * ls_header-external_id = cl_system_uuid=>create_uuid_c32_static( ). * mo_application_log = cl_a4c_logger_factory=>get_new_logger( ls_header ). * **------ Create new log in history table before starting batch processing * DATA(lo_log_factory) = zcl_abapgit_app_log_factory=>get_instance( ). * DATA(lo_log) = lo_log_factory->create_new( iv_repo_key = lv_repo_key * iv_repo_branch = ls_request_data-branch ). * lo_log->save( ). * * DATA ls_alog_key TYPE tsa4c_agit_applog_key. * ls_alog_key-app_log = lo_log->get_data( )-app_log. * **------ Execute background job " lo_job_scheduler = NEW cl_cbo_job_scheduler( ). * " lo_job_action = NEW zcl_abapgit_repo_pull_action( " is_alog_key = ls_alog_key " iv_repo_key = lv_repo_key " is_req_data = ls_request_data ). * * "create new job from action " lo_job_scheduler->start_job( " EXPORTING " io_action = lo_job_action " IMPORTING " es_job_key = DATA(ls_job_key) ). * ** "persist jobname/jobcount in application log table -> DONE inside ** lo_log->set_batch_job( jobname = ls_job_key-job_name jobcount = ls_job_key-job_count ). ** lo_log->save( ). *NEW end *OLD start *------ Set log-on information if supplied IF ls_request_data-user IS NOT INITIAL AND ls_request_data-password IS NOT INITIAL. zcl_abapgit_default_auth_info=>refresh( ). zcl_abapgit_default_auth_info=>set_auth_info( iv_user = ls_request_data-user iv_password = ls_request_data-password ). ENDIF. *------ Set the default transport request IF ls_request_data-transportrequest <> ''. zcl_abapgit_default_transport=>get_instance( )->set( CONV #( ls_request_data-transportrequest ) ). ENDIF. *------ Create online repo DATA(lo_repo) = zcl_abapgit_repo_srv=>get_instance( )->get( lv_repo_key ). lo_repo->refresh( ). DATA(ls_checks) = lo_repo->deserialize_checks( ). *------ Settings to overwrite existing objects LOOP AT ls_checks-overwrite ASSIGNING FIELD-SYMBOL(<ls_overwrite>). <ls_overwrite>-decision = 'Y'. ENDLOOP. LOOP AT ls_checks-warning_package ASSIGNING FIELD-SYMBOL(<ls_warning_package>). <ls_warning_package>-decision = 'Y'. ENDLOOP. ls_checks-transport-transport = ls_request_data-transportrequest. lo_log = NEW #( ). *------ Import Objects lo_repo->deserialize( is_checks = ls_checks ii_log = lo_log ). "response content handler DATA(lo_resp_content_handler) = cl_adt_rest_cnt_hdl_factory=>get_instance( )->get_handler_for_xml_using_st( st_name = co_st_name_post_res root_name = co_root_name_post_res content_type = co_content_type_object_v1 ). *------ prepare response information response->set_body_data( content_handler = lo_resp_content_handler data = lt_result_table ). *OLD end *NEW start * response->set_status( cl_rest_status_code=>gc_success_accepted ). *NEW end *---- Handle issues CATCH zcx_abapgit_exception cx_uuid_error INTO DATA(lx_exception). ROLLBACK WORK. zcx_adt_rest_abapgit=>raise_with_error( ix_error = lx_exception iv_http_status = cl_rest_status_code=>gc_server_error_internal ). ENDTRY. ENDMETHOD. METHOD validate_request_data. DATA: lv_msg TYPE string. " only check transport if package requires a transport DATA(lo_repo) = zcl_abapgit_repo_srv=>get_instance( )->get( iv_repo_key ). DATA(lv_package_key) = lo_repo->get_package( ). DATA(lo_package) = zcl_abapgit_factory=>get_sap_package( lv_package_key ). IF lo_package->are_changes_recorded_in_tr_req( ) = abap_true. "transport request exists SELECT SINGLE * FROM e070 INTO @DATA(ls_e070) WHERE trkorr = @is_request_data-transportrequest. IF sy-subrc NE 0. lv_msg = |Transport { is_request_data-transportrequest } not found|. zcx_abapgit_exception=>raise( lv_msg ). ELSEIF ls_e070-trstatus NE 'D'. lv_msg = |Transport { is_request_data-transportrequest } is released or protected|. zcx_abapgit_exception=>raise( lv_msg ). ELSEIF ls_e070-as4user NE sy-uname. lv_msg = |Transport { is_request_data-transportrequest } is not owned by { sy-uname }|. zcx_abapgit_exception=>raise( lv_msg ). ENDIF. ENDIF. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 411, 62, 260, 7501, 62, 31216, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 3268, 16879, 2043, 2751, 16034, 537, 62, 324, 83, 62, 2118, 62, 31092, 198, 220, 25261, 198, 220, 29244, 6158, 44731, 13, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 220, 1259, 62, 82, 62, 20274, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1738, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 82, 62, 20274, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 1259, 62, 25927, 62, 31216, 62, 7890, 11, 198, 220, 220, 220, 220, 220, 220, 220, 8478, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4839, 25927, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2836, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 9206, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 25927, 62, 31216, 62, 7890, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 1259, 62, 260, 7501, 62, 86, 62, 28751, 13, 198, 220, 220, 220, 220, 220, 220, 220, 3268, 5097, 52, 7206, 41876, 1976, 361, 62, 397, 499, 18300, 62, 19276, 13274, 14804, 774, 62, 260, 7501, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 220, 220, 6117, 41876, 611, 62, 37696, 62, 19199, 14804, 8726, 62, 83, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 23578, 3963, 1259, 62, 260, 7501, 62, 86, 62, 28751, 13, 198, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 256, 83, 62, 260, 7501, 62, 86, 62, 28751, 41876, 49053, 9795, 43679, 3963, 1259, 62, 260, 7501, 62, 86, 62, 28751, 13315, 5550, 38865, 35374, 13, 628, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 4871, 62, 3672, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 384, 420, 7278, 3672, 26173, 8924, 705, 57, 5097, 62, 6242, 2969, 38, 2043, 62, 19535, 62, 35316, 2640, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 31092, 62, 4906, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 35316, 2640, 6, 22492, 15285, 62, 32541, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 2943, 5626, 13918, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 301, 62, 3672, 62, 31216, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 57, 6242, 2969, 38, 2043, 62, 2257, 62, 2200, 16402, 62, 5105, 3069, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 301, 62, 3672, 62, 7353, 62, 411, 220, 220, 220, 220, 220, 220, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 57, 6242, 2969, 38, 2043, 62, 2257, 62, 2200, 16402, 62, 32782, 62, 19535, 4458, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 15763, 62, 3672, 62, 31216, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 35316, 2640, 2043, 15513, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 15763, 62, 3672, 62, 7353, 62, 411, 220, 220, 220, 220, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 9864, 41, 2943, 4694, 4458, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 11299, 62, 4906, 62, 260, 7501, 62, 85, 16, 220, 220, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 31438, 14, 397, 499, 18300, 13, 324, 83, 13, 260, 7501, 13, 85, 18, 10, 19875, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 11299, 62, 4906, 62, 260, 1930, 62, 85, 16, 220, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 31438, 14, 397, 499, 18300, 13, 324, 83, 13, 260, 1930, 13, 85, 17, 10, 19875, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 11299, 62, 4906, 62, 15252, 62, 85, 16, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 31438, 14, 397, 499, 18300, 13, 324, 83, 13, 260, 7501, 13, 15252, 13, 85, 17, 10, 19875, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 301, 62, 3672, 62, 1136, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 57, 6242, 2969, 38, 2043, 62, 2257, 62, 35316, 2640, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 15763, 62, 3672, 62, 1136, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 35316, 2640, 2043, 1581, 11015, 6, 22492, 15285, 62, 32541, 13, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 763, 62, 11299, 62, 4906, 62, 260, 7501, 62, 85, 17, 220, 220, 41876, 4731, 220, 220, 220, 220, 26173, 8924, 705, 31438, 14, 397, 499, 18300, 13, 324, 83, 13, 260, 7501, 13, 85, 19, 10, 19875, 6, 22492, 15285, 62, 32541, 13, 628, 220, 220, 220, 337, 36252, 50, 1281, 23848, 36, 20032, 17941, 13, 628, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 337, 36252, 50, 26571, 62, 25927, 62, 7890, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 25927, 62, 7890, 41876, 1259, 62, 25927, 62, 31216, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 260 ]
[ 1, 1, 1, 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* System-defined Include-files. * ******************************************************************* INCLUDE lnumber_get_nexttop. " Global Declarations INCLUDE lnumber_get_nextuxx. " Function Modules ******************************************************************* * User-defined Include-files (if necessary). * ******************************************************************* * INCLUDE LNUMBER_GET_NEXTF... " Subroutines * INCLUDE LNUMBER_GET_NEXTO... " PBO-Modules * INCLUDE LNUMBER_GET_NEXTI... " PAI-Modules * INCLUDE LNUMBER_GET_NEXTE... " Events * INCLUDE LNUMBER_GET_NEXTP... " Local class implement. * INCLUDE LNUMBER_GET_NEXTT99. " ABAP Unit tests
[ 17174, 17174, 8162, 198, 9, 220, 220, 4482, 12, 23211, 40348, 12, 16624, 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, 1635, 198, 17174, 17174, 8162, 198, 1268, 5097, 52, 7206, 300, 17618, 62, 1136, 62, 19545, 4852, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8060, 16691, 24355, 198, 1268, 5097, 52, 7206, 300, 17618, 62, 1136, 62, 19545, 2821, 87, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 15553, 3401, 5028, 198, 198, 17174, 17174, 8162, 198, 9, 220, 220, 11787, 12, 23211, 40348, 12, 16624, 357, 361, 3306, 737, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 198, 17174, 17174, 8162, 198, 9, 3268, 5097, 52, 7206, 406, 41359, 13246, 62, 18851, 62, 45, 6369, 10234, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3834, 81, 448, 1127, 198, 9, 3268, 5097, 52, 7206, 406, 41359, 13246, 62, 18851, 62, 45, 6369, 10468, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 350, 8202, 12, 5841, 5028, 198, 9, 3268, 5097, 52, 7206, 406, 41359, 13246, 62, 18851, 62, 45, 13918, 40, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8147, 40, 12, 5841, 5028, 198, 9, 3268, 5097, 52, 7206, 406, 41359, 13246, 62, 18851, 62, 45, 6369, 9328, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18715, 198, 9, 3268, 5097, 52, 7206, 406, 41359, 13246, 62, 18851, 62, 45, 6369, 7250, 986, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 10714, 1398, 3494, 13, 198, 9, 3268, 5097, 52, 7206, 406, 41359, 13246, 62, 18851, 62, 45, 13918, 51, 2079, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 9564, 2969, 11801, 5254 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
CLASS y_check_empty_catches DEFINITION PUBLIC INHERITING FROM y_check_base CREATE PUBLIC . PUBLIC SECTION. METHODS constructor . PROTECTED SECTION. METHODS inspect_tokens REDEFINITION. METHODS get_token_abs REDEFINITION. PRIVATE SECTION. METHODS is_test_double_framework RETURNING VALUE(result) TYPE abap_bool. ENDCLASS. CLASS y_check_empty_catches IMPLEMENTATION. METHOD constructor. super->constructor( ). settings-pseudo_comment = '"#EC EMPTY_CATCH'. settings-alternative_pseudo_comment = '"#EC NO_HANDLER'. settings-disable_threshold_selection = abap_true. settings-threshold = 0. settings-documentation = |{ c_docs_path-checks }empty-catch.md|. set_check_message( 'Empty catch should be removed!' ). ENDMETHOD. METHOD inspect_tokens. CHECK keyword( ) = 'CATCH'. CHECK get_token_abs( statement-to + 1 ) = if_kaizen_keywords_c=>gc_endtry OR get_token_abs( statement-to + 1 ) = 'ENDCATCH'. CHECK is_test_double_framework( ) = abap_false. DATA(check_configuration) = detect_check_configuration( statement ). raise_error( statement_level = statement-level statement_index = index statement_from = statement-from check_configuration = check_configuration ). ENDMETHOD. METHOD get_token_abs. p_result = super->get_token_abs( p_n ). if token_wa-type = scan_token_type-comment. p_result = get_token_abs( p_n + 1 ). endif. ENDMETHOD. METHOD is_test_double_framework. DATA(catch_structure) = ref_scan->structures[ statement_wa-struc ]. DATA(before_try_structure) = ref_scan->structures[ catch_structure-back - 1 ]. DATA(search_from_token) = ref_scan->statements[ before_try_structure-stmnt_from ]-from. DATA(search_to_token) = ref_scan->statements[ before_try_structure-stmnt_to ]-to. DATA(range_tokens) = VALUE stokesx_tab( FOR token IN ref_scan->tokens FROM search_from_token TO search_to_token ( token ) ). result = xsdbool( line_exists( range_tokens[ str = 'CL_ABAP_TESTDOUBLE=>CONFIGURE_CALL(' ] ) ). ENDMETHOD. ENDCLASS.
[ 31631, 331, 62, 9122, 62, 28920, 62, 9246, 2052, 5550, 20032, 17941, 44731, 3268, 16879, 2043, 2751, 16034, 331, 62, 9122, 62, 8692, 29244, 6158, 44731, 764, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 23772, 764, 628, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 10104, 62, 83, 482, 641, 23848, 36, 20032, 17941, 13, 198, 220, 220, 220, 337, 36252, 50, 651, 62, 30001, 62, 8937, 23848, 36, 20032, 17941, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 337, 36252, 50, 318, 62, 9288, 62, 23352, 62, 30604, 30826, 4261, 15871, 26173, 8924, 7, 20274, 8, 41876, 450, 499, 62, 30388, 13, 198, 198, 10619, 31631, 13, 628, 198, 198, 31631, 331, 62, 9122, 62, 28920, 62, 9246, 2052, 30023, 2538, 10979, 6234, 13, 628, 198, 220, 337, 36252, 23772, 13, 198, 220, 220, 220, 2208, 3784, 41571, 273, 7, 6739, 628, 220, 220, 220, 6460, 12, 7752, 12003, 62, 23893, 796, 705, 1, 2, 2943, 38144, 9936, 62, 34, 11417, 4458, 198, 220, 220, 220, 6460, 12, 33645, 876, 62, 7752, 12003, 62, 23893, 796, 705, 1, 2, 2943, 8005, 62, 39, 6981, 39878, 4458, 198, 220, 220, 220, 6460, 12, 40223, 62, 400, 10126, 62, 49283, 796, 450, 499, 62, 7942, 13, 198, 220, 220, 220, 6460, 12, 400, 10126, 796, 657, 13, 198, 220, 220, 220, 6460, 12, 22897, 341, 796, 930, 90, 269, 62, 31628, 62, 6978, 12, 42116, 1782, 28920, 12, 40198, 13, 9132, 91, 13, 628, 220, 220, 220, 900, 62, 9122, 62, 20500, 7, 705, 40613, 4929, 815, 307, 4615, 13679, 6739, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 10104, 62, 83, 482, 641, 13, 198, 220, 220, 220, 5870, 25171, 21179, 7, 1267, 796, 705, 34, 11417, 4458, 628, 220, 220, 220, 5870, 25171, 651, 62, 30001, 62, 8937, 7, 2643, 12, 1462, 1343, 352, 1267, 796, 611, 62, 4914, 33977, 62, 2539, 10879, 62, 66, 14804, 36484, 62, 437, 28311, 198, 220, 220, 220, 220, 220, 220, 6375, 651, 62, 30001, 62, 8937, 7, 2643, 12, 1462, 1343, 352, 1267, 796, 705, 1677, 9697, 11417, 4458, 628, 220, 220, 220, 5870, 25171, 318, 62, 9288, 62, 23352, 62, 30604, 7, 1267, 796, 450, 499, 62, 9562, 13, 628, 220, 220, 220, 42865, 7, 9122, 62, 11250, 3924, 8, 796, 4886, 62, 9122, 62, 11250, 3924, 7, 2643, 6739, 628, 220, 220, 220, 5298, 62, 18224, 7, 2643, 62, 5715, 796, 2643, 12, 5715, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2643, 62, 9630, 796, 6376, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2643, 62, 6738, 796, 2643, 12, 6738, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2198, 62, 11250, 3924, 796, 2198, 62, 11250, 3924, 6739, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 651, 62, 30001, 62, 8937, 13, 198, 220, 220, 220, 279, 62, 20274, 796, 2208, 3784, 1136, 62, 30001, 62, 8937, 7, 279, 62, 77, 6739, 198, 220, 220, 220, 611, 11241, 62, 10247, 12, 4906, 796, 9367, 62, 30001, 62, 4906, 12, 23893, 13, 198, 220, 220, 220, 220, 220, 279, 62, 20274, 796, 651, 62, 30001, 62, 8937, 7, 279, 62, 77, 1343, 352, 6739, 198, 220, 220, 220, 45762, 13, 198, 220, 23578, 49273, 13, 628, 198, 220, 337, 36252, 318, 62, 9288, 62, 23352, 62, 30604, 13, 198, 220, 220, 220, 42865, 7, 40198, 62, 301, 5620, 8, 796, 1006, 62, 35836, 3784, 7249, 942, 58, 2643, 62, 10247, 12, 19554, 66, 20740, 198, 220, 220, 220, 42865, 7, 19052, 62, 28311, 62, 301, 5620, 8, 796, 1006, 62, 35836, 3784, 7249, 942, 58, 4929, 62, 301, 5620, 12, 1891, 532, 352, 20740, 198, 220, 220, 220, 42865, 7, 12947, 62, 6738, 62, 30001, 8, 796, 1006, 62, 35836, 3784, 14269, 3196, 58, 878, 62, 28311, 62, 301, 5620, 12, 301, 76, 429, 62, 6738, 2361, 12, 6738, 13, 198, 220, 220, 220, 42865, 7, 12947, 62, 1462, 62, 30001, 8, 796, 1006, 62, 35836, 3784, 14269, 3196, 58, 878, 62, 28311, 62, 301, 5620, 12, 301, 76, 429, 62, 1462, 2361, 12, 1462, 13, 198, 220, 220, 220, 42865, 7, 9521, 62, 83, 482, 641, 8, 796, 26173, 8924, 336, 3369, 87, 62, 8658, 7, 7473, 11241, 3268, 1006, 62, 35836, 3784, 83, 482, 641, 16034, 2989, 62, 6738, 62, 30001, 5390, 2989, 62, 1462, 62, 30001, 357, 11241, 1267, 6739, 198, 220, 220, 220, 1255, 796, 2124, 82, 9945, 970, 7, 1627, 62, 1069, 1023, 7, 2837, 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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 ]
CLASS zcl_abapgit_objects_activation DEFINITION PUBLIC CREATE PUBLIC . PUBLIC SECTION. CLASS-METHODS add IMPORTING !iv_type TYPE trobjtype !iv_name TYPE clike !iv_delete TYPE abap_bool DEFAULT abap_false RAISING zcx_abapgit_exception . CLASS-METHODS add_item IMPORTING !is_item TYPE zif_abapgit_definitions=>ty_item RAISING zcx_abapgit_exception . CLASS-METHODS activate IMPORTING !iv_ddic TYPE abap_bool DEFAULT abap_false !ii_log TYPE REF TO zif_abapgit_log RAISING zcx_abapgit_exception . CLASS-METHODS clear . CLASS-METHODS is_ddic_type IMPORTING !iv_obj_type TYPE trobjtype RETURNING VALUE(rv_result) TYPE abap_bool . PROTECTED SECTION. PRIVATE SECTION. TYPES: BEGIN OF ty_classes, object TYPE trobjtype, clsname TYPE seoclsname, END OF ty_classes. CLASS-DATA: gt_classes TYPE STANDARD TABLE OF ty_classes WITH DEFAULT KEY . CLASS-DATA: gt_objects TYPE TABLE OF dwinactiv . CLASS-METHODS update_where_used IMPORTING !ii_log TYPE REF TO zif_abapgit_log. CLASS-METHODS use_new_activation_logic RETURNING VALUE(rv_use_new_activation_logic) TYPE abap_bool . CLASS-METHODS activate_new IMPORTING !iv_ddic TYPE abap_bool DEFAULT abap_false !ii_log TYPE REF TO zif_abapgit_log RAISING zcx_abapgit_exception . CLASS-METHODS activate_old IMPORTING !iv_ddic TYPE abap_bool DEFAULT abap_false !ii_log TYPE REF TO zif_abapgit_log RAISING zcx_abapgit_exception . CLASS-METHODS activate_ddic IMPORTING !ii_log TYPE REF TO zif_abapgit_log RAISING zcx_abapgit_exception . CLASS-METHODS add_errors_and_warnings_to_log IMPORTING !iv_logname TYPE ddmass-logname !ii_log TYPE REF TO zif_abapgit_log RAISING zcx_abapgit_exception . CLASS-METHODS add_activation_errors_to_log IMPORTING !io_checklist TYPE REF TO cl_wb_checklist !ii_log TYPE REF TO zif_abapgit_log RETURNING VALUE(rv_try_again) TYPE abap_bool RAISING zcx_abapgit_exception . ENDCLASS. CLASS zcl_abapgit_objects_activation IMPLEMENTATION. METHOD activate. " Make sure that all changes are committed since any activation error will lead to a rollback COMMIT WORK AND WAIT. IF use_new_activation_logic( ) = abap_true. activate_new( iv_ddic = iv_ddic ii_log = ii_log ). ELSE. activate_old( iv_ddic = iv_ddic ii_log = ii_log ). ENDIF. update_where_used( ii_log ). ENDMETHOD. METHOD activate_ddic. DATA: lt_gentab TYPE STANDARD TABLE OF dcgentb, lv_rc TYPE sy-subrc, ls_gentab LIKE LINE OF lt_gentab, lt_deltab TYPE STANDARD TABLE OF dcdeltb, lt_action_tab TYPE STANDARD TABLE OF dctablres, lv_logname TYPE ddmass-logname. FIELD-SYMBOLS: <ls_object> LIKE LINE OF gt_objects. LOOP AT gt_objects ASSIGNING <ls_object>. " Filter types supported by mass activation IF is_ddic_type( <ls_object>-object ) = abap_false. CONTINUE. ENDIF. ls_gentab-tabix = sy-tabix. ls_gentab-type = <ls_object>-object. ls_gentab-name = <ls_object>-obj_name. IF ls_gentab-type = 'INDX' OR ls_gentab-type = 'XINX' OR ls_gentab-type = 'MCID'. CALL FUNCTION 'DD_E071_TO_DD' EXPORTING object = <ls_object>-object obj_name = <ls_object>-obj_name IMPORTING name = ls_gentab-name id = ls_gentab-indx. ENDIF. INSERT ls_gentab INTO TABLE lt_gentab. ENDLOOP. IF lt_gentab IS NOT INITIAL. lv_logname = |ABAPGIT_{ sy-datum }_{ sy-uzeit }|. CALL FUNCTION 'DD_MASS_ACT_C3' EXPORTING ddmode = 'O' " activate changes in Original System frcact = abap_true " force Activation medium = 'T' " transport order device = 'T' " saves to table DDRPH? version = 'M' " activate newest version logname = lv_logname write_log = abap_true log_head_tail = abap_true t_on = space prid = 1 IMPORTING act_rc = lv_rc TABLES gentab = lt_gentab deltab = lt_deltab cnvtab = lt_action_tab EXCEPTIONS access_failure = 1 no_objects = 2 locked = 3 internal_error = 4 OTHERS = 5. IF sy-subrc <> 0. zcx_abapgit_exception=>raise_t100( ). ENDIF. IF lv_rc > 0. add_errors_and_warnings_to_log( iv_logname = lv_logname ii_log = ii_log ). ENDIF. IF lv_rc > 4. zcx_abapgit_exception=>raise( 'Activation cancelled. Check the inactive objects.' ). ENDIF. " Remove objects from activation queue to avoid double activation in activate_old LOOP AT lt_gentab INTO ls_gentab. DELETE gt_objects WHERE object = ls_gentab-type AND obj_name = ls_gentab-name. ENDLOOP. DELETE gt_objects WHERE object = 'INDX' OR object = 'XINX' OR object = 'MCID'. ENDIF. ENDMETHOD. METHOD activate_new. IF gt_objects IS INITIAL. RETURN. ENDIF. IF iv_ddic = abap_true. activate_ddic( ii_log ). ELSE. activate_old( ii_log ). ENDIF. ENDMETHOD. METHOD activate_old. DATA: lv_popup TYPE abap_bool, lv_no_ui TYPE abap_bool, lv_try_again TYPE abap_bool, lv_msg TYPE string, lo_checklist TYPE REF TO cl_wb_checklist. IF gt_objects IS NOT INITIAL. IF zcl_abapgit_ui_factory=>get_frontend_services( )->gui_is_available( ) = abap_true. IF zcl_abapgit_persist_factory=>get_settings( )->read( )->get_activate_wo_popup( ) = abap_true. lv_popup = abap_false. ELSE. lv_popup = abap_true. ENDIF. ELSE. lv_popup = abap_false. ENDIF. lv_no_ui = boolc( lv_popup = abap_false ). TRY. CALL FUNCTION 'RS_WORKING_OBJECTS_ACTIVATE' EXPORTING activate_ddic_objects = iv_ddic with_popup = lv_popup ui_decoupled = lv_no_ui IMPORTING p_checklist = lo_checklist TABLES objects = gt_objects EXCEPTIONS excecution_error = 1 cancelled = 2 insert_into_corr_error = 3 OTHERS = 4 ##SUBRC_OK. CATCH cx_sy_dyn_call_param_not_found. CALL FUNCTION 'RS_WORKING_OBJECTS_ACTIVATE' EXPORTING activate_ddic_objects = iv_ddic with_popup = lv_popup IMPORTING p_checklist = lo_checklist TABLES objects = gt_objects EXCEPTIONS excecution_error = 1 cancelled = 2 insert_into_corr_error = 3 OTHERS = 4 ##SUBRC_OK. ENDTRY. CASE sy-subrc. WHEN 1 OR 3 OR 4. zcx_abapgit_exception=>raise_t100( ). WHEN 2. lv_msg = 'Check the log and inactive objects.'. IF lv_popup = abap_false. lv_try_again = add_activation_errors_to_log( ii_log = ii_log io_checklist = lo_checklist ). IF lv_try_again = abap_true. lv_msg = 'Turn on "Activation Popup" in "Personal Settings" and try again'. ENDIF. ENDIF. zcx_abapgit_exception=>raise( |Activation cancelled. { lv_msg }| ). ENDCASE. ENDIF. ENDMETHOD. METHOD add. * function group SEWORKINGAREA * function module RS_INSERT_INTO_WORKING_AREA * class CL_WB_ACTIVATION_WORK_AREA FIELD-SYMBOLS: <ls_object> TYPE dwinactiv, <ls_classes> LIKE LINE OF gt_classes. IF iv_type = 'CLAS' OR iv_type = 'INTF'. APPEND INITIAL LINE TO gt_classes ASSIGNING <ls_classes>. <ls_classes>-object = iv_type. <ls_classes>-clsname = iv_name. ELSE. APPEND INITIAL LINE TO gt_objects ASSIGNING <ls_object>. <ls_object>-object = iv_type. <ls_object>-obj_name = iv_name. <ls_object>-delet_flag = iv_delete. ENDIF. ENDMETHOD. METHOD add_activation_errors_to_log. DATA: ls_item TYPE zif_abapgit_definitions=>ty_item, lt_message TYPE swbme_error_tab. FIELD-SYMBOLS: <lv_msg> TYPE string, <ls_message> LIKE LINE OF lt_message. io_checklist->get_error_messages( IMPORTING p_error_tab = lt_message ). LOOP AT lt_message ASSIGNING <ls_message> WHERE mtype = 'E'. " When activting without popup, includes used in multiple main programs cause error " Run again WITH activation popup (see abapGit, Personal Settings) IF <ls_message>-message-msgid = 'EU' AND <ls_message>-message-msgno = '404'. rv_try_again = abap_true. ENDIF. CLEAR ls_item. IF strlen( <ls_message>-object_text ) > 5. ls_item-obj_type = <ls_message>-object_text(4). ls_item-obj_name = <ls_message>-object_text+5(*). ENDIF. LOOP AT <ls_message>-mtext ASSIGNING <lv_msg>. ii_log->add_error( iv_msg = <lv_msg> is_item = ls_item ). ENDLOOP. ENDLOOP. ENDMETHOD. METHOD add_errors_and_warnings_to_log. DATA: lt_lines TYPE STANDARD TABLE OF trlog, lv_logname_db TYPE ddprh-protname. FIELD-SYMBOLS: <ls_line> LIKE LINE OF lt_lines. lv_logname_db = iv_logname. CALL FUNCTION 'TR_READ_LOG' EXPORTING iv_log_type = 'DB' iv_logname_db = lv_logname_db TABLES et_lines = lt_lines EXCEPTIONS invalid_input = 1 access_error = 2 OTHERS = 3. IF sy-subrc <> 0. zcx_abapgit_exception=>raise_t100( ). ENDIF. " Only error messsages DELETE lt_lines WHERE severity <> 'E' AND severity <> 'W'. " Remove "Return code..." message DELETE lt_lines WHERE class = 'D0' AND number = '319'. LOOP AT lt_lines ASSIGNING <ls_line>. ii_log->add( iv_msg = <ls_line>-line iv_type = <ls_line>-severity ). ENDLOOP. ENDMETHOD. METHOD add_item. add( iv_type = is_item-obj_type iv_name = is_item-obj_name ). ENDMETHOD. METHOD clear. CLEAR gt_objects. CLEAR gt_classes. ENDMETHOD. METHOD is_ddic_type. " Determine if object can be handled by mass activation (see RADMASUTC form ma_tab_check) CONSTANTS: lc_domain TYPE c LENGTH 9 VALUE 'DOMA DOMD', lc_types TYPE c LENGTH 50 VALUE 'DTEL DTED TABL TABD SQLT SQLD TTYP TTYD VIEW VIED', lc_technset TYPE c LENGTH 24 VALUE 'TABT VIET SQTT INDX XINX', lc_f4_objects TYPE c LENGTH 35 VALUE 'SHLP SHLD MCOB MCOD MACO MACD MCID', lc_enqueue TYPE c LENGTH 9 VALUE 'ENQU ENQD', lc_sqsc TYPE c LENGTH 4 VALUE 'SQSC', lc_stob TYPE c LENGTH 4 VALUE 'STOB', lc_ntab TYPE c LENGTH 14 VALUE 'NTTT NTTB NTDT', lc_ddls TYPE c LENGTH 14 VALUE 'DDLS DRUL DTDC', lc_switches TYPE c LENGTH 24 VALUE 'SF01 SF02 SFSW SFBS SFBF', lc_para TYPE c LENGTH 4 VALUE 'PARA', " can be referenced by DTEL lc_enhd TYPE c LENGTH 4 VALUE 'ENHD'. rv_result = abap_true. IF lc_domain NS iv_obj_type AND lc_types NS iv_obj_type AND lc_technset NS iv_obj_type AND lc_f4_objects NS iv_obj_type AND lc_enqueue NS iv_obj_type AND lc_sqsc NS iv_obj_type AND lc_stob NS iv_obj_type AND lc_ntab NS iv_obj_type AND lc_ddls NS iv_obj_type AND lc_para NS iv_obj_type AND lc_switches NS iv_obj_type AND iv_obj_type <> lc_enhd. rv_result = abap_false. ENDIF. ENDMETHOD. METHOD update_where_used. DATA: ls_class LIKE LINE OF gt_classes, lo_cross TYPE REF TO cl_wb_crossreference, ls_item TYPE zif_abapgit_definitions=>ty_item, lv_error TYPE c LENGTH 1, lv_include TYPE programm. LOOP AT gt_classes INTO ls_class. CASE ls_class-object. WHEN 'CLAS'. lv_include = cl_oo_classname_service=>get_classpool_name( ls_class-clsname ). WHEN 'INTF'. lv_include = cl_oo_classname_service=>get_interfacepool_name( ls_class-clsname ). ENDCASE. CREATE OBJECT lo_cross EXPORTING p_name = lv_include p_include = lv_include. lo_cross->index_actualize( IMPORTING p_error = lv_error ). IF lv_error = abap_true. ls_item-obj_type = ls_class-object. ls_item-obj_name = ls_class-clsname. ii_log->add( iv_msg = 'Error updating where-used list' is_item = ls_item ). ENDIF. ENDLOOP. ENDMETHOD. METHOD use_new_activation_logic. CALL FUNCTION 'FUNCTION_EXISTS' EXPORTING funcname = 'DD_MASS_ACT_C3' EXCEPTIONS function_not_exist = 1 OTHERS = 2. IF sy-subrc = 0. rv_use_new_activation_logic = abap_true. ENDIF. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 48205, 62, 48545, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 29244, 6158, 44731, 764, 628, 220, 44731, 44513, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 751, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 4906, 220, 220, 41876, 4161, 50007, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3672, 220, 220, 41876, 537, 522, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 33678, 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, 220, 220, 220, 42715, 12, 49273, 50, 751, 62, 9186, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 271, 62, 9186, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 9186, 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, 15155, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 1860, 291, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 4178, 62, 6404, 220, 41876, 4526, 37, 5390, 1976, 361, 62, 397, 499, 18300, 62, 6404, 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, 1598, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 318, 62, 1860, 291, 62, 4906, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 26801, 62, 4906, 220, 220, 220, 220, 41876, 4161, 50007, 4906, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 20274, 8, 41876, 450, 499, 62, 30388, 764, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 347, 43312, 3963, 1259, 62, 37724, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2134, 220, 41876, 4161, 50007, 4906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 537, 82, 3672, 41876, 384, 420, 7278, 3672, 11, 198, 220, 220, 220, 220, 220, 23578, 3963, 1259, 62, 37724, 13, 628, 220, 220, 220, 42715, 12, 26947, 25, 198, 220, 220, 220, 220, 220, 308, 83, 62, 37724, 41876, 49053, 9795, 43679, 3963, 1259, 62, 37724, 13315, 5550, 38865, 35374, 764, 198, 220, 220, 220, 42715, 12, 26947, 25, 198, 220, 220, 220, 220, 220, 308, 83, 62, 48205, 41876, 43679, 3963, 288, 5404, 15791, 764, 628, 220, 220, 220, 42715, 12, 49273, 50, 4296, 62, 3003, 62, 1484, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 4178, 62, 6404, 41876, 4526, 37, 5390, 1976, 361, 62, 397, 499, 18300, 62, 6404, 13, 198, 220, 220, 220, 42715, 12, 49273, 50, 779, 62, 3605, 62, 48545, 62, 6404, 291, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 81, 85, 62, 1904, 62, 3605, 62, 48545, 62, 6404, 291, 8, 41876, 450, 499, 62, 30388, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 15155, 62, 3605, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 1860, 291, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 4178, 62, 6404, 220, 41876, 4526, 37, 5390, 1976, 361, 62, 397, 499, 18300, 62, 6404, 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, 15155, 62, 727, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 1860, 291, 41876, 450, 499, 62, 30388, 5550, 38865, 450, 499, 62, 9562, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 4178, 62, 6404, 220, 41876, 4526, 37, 5390, 1976, 361, 62, 397, 499, 18300, 62, 6404, 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, 15155, 62, 1860, 291, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 4178, 62, 6404, 41876, 4526, 37, 5390, 1976, 361, 62, 397, 499, 18300, 62, 6404, 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, 751, 62, 48277, 62, 392, 62, 40539, 654, 62, 1462, 62, 6404, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 75, 2360, 480, 41876, 49427, 22208, 12, 75, 2360, 480, 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, 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, 751, 62, 48545, 62, 48277, 62, 1462, 62, 6404, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 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,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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 ]
CLASS /dmo/cl_flight_legacy09 DEFINITION PUBLIC FINAL CREATE PRIVATE GLOBAL FRIENDS /dmo/cl_flight_data_generat_09. PUBLIC SECTION. INTERFACES /dmo/if_flight_legacy09. TYPES: BEGIN OF ENUM ty_change_mode STRUCTURE change_mode," Key checks are done separately create, update," Only fields that have been changed need to be checked END OF ENUM ty_change_mode STRUCTURE change_mode. CLASS-METHODS: get_instance RETURNING VALUE(ro_instance) TYPE REF TO /dmo/cl_flight_legacy09. " With respect to the same method call of create/update/delete_travel() we have All or Nothing. " I.e. when one of the levels contains an error, the complete call is refused. " However, the buffer is not cleared in case of an error. " I.e. when the caller wants to start over, he needs to call Initialize() explicitly. METHODS set_status_to_booked IMPORTING iv_travel_id TYPE /dmo/travel_id09 EXPORTING et_messages TYPE /dmo/if_flight_legacy09=>tt_if_t100_message. METHODS create_travel IMPORTING is_travel TYPE /dmo/if_flight_legacy09=>ts_travel_in it_booking TYPE /dmo/if_flight_legacy09=>tt_booking_in OPTIONAL it_booking_supplement TYPE /dmo/if_flight_legacy09=>tt_booking_supplement_in OPTIONAL EXPORTING es_travel TYPE /dmo/travel09 et_booking TYPE /dmo/if_flight_legacy09=>tt_booking et_booking_supplement TYPE /dmo/if_flight_legacy09=>tt_booking_supplement et_messages TYPE /dmo/if_flight_legacy09=>tt_if_t100_message. METHODS update_travel IMPORTING is_travel TYPE /dmo/if_flight_legacy09=>ts_travel_in is_travelx TYPE /dmo/if_flight_legacy09=>ts_travel_inx it_booking TYPE /dmo/if_flight_legacy09=>tt_booking_in OPTIONAL it_bookingx TYPE /dmo/if_flight_legacy09=>tt_booking_inx OPTIONAL it_booking_supplement TYPE /dmo/if_flight_legacy09=>tt_booking_supplement_in OPTIONAL it_booking_supplementx TYPE /dmo/if_flight_legacy09=>tt_booking_supplement_inx OPTIONAL EXPORTING es_travel TYPE /dmo/travel09 et_booking TYPE /dmo/if_flight_legacy09=>tt_booking et_booking_supplement TYPE /dmo/if_flight_legacy09=>tt_booking_supplement et_messages TYPE /dmo/if_flight_legacy09=>tt_if_t100_message. METHODS delete_travel IMPORTING iv_travel_id TYPE /dmo/travel_id09 EXPORTING et_messages TYPE /dmo/if_flight_legacy09=>tt_if_t100_message. METHODS get_travel IMPORTING iv_travel_id TYPE /dmo/travel_id09 iv_include_buffer TYPE abap_boolean iv_include_temp_buffer TYPE abap_boolean OPTIONAL EXPORTING es_travel TYPE /dmo/travel09 et_booking TYPE /dmo/if_flight_legacy09=>tt_booking et_booking_supplement TYPE /dmo/if_flight_legacy09=>tt_booking_supplement et_messages TYPE /dmo/if_flight_legacy09=>tt_if_t100_message. METHODS save. METHODS initialize. METHODS convert_messages IMPORTING it_messages TYPE /dmo/if_flight_legacy09=>tt_if_t100_message EXPORTING et_messages TYPE /dmo/if_flight_legacy09=>tt_message. PROTECTED SECTION. PRIVATE SECTION. CLASS-DATA go_instance TYPE REF TO /dmo/cl_flight_legacy09. CLASS-METHODS: "! Calculation of Price <br/> "! <br/> "! Price will be calculated using distance multiplied and occupied seats.<br/> "! Depending on how many seats in percentage are occupied the formula <br/> "! 3/400·x² + 25<br/> "! will be applied.<br/> "! 0% seats occupied leads to 25% of distance as price.<br/> "! 75% seats occupied leads to 50% of distance as price.<br/> "! 100% seats occupied leads to 100% of distance as price.<br/> "! @parameter iv_seats_occupied_percent | occupied seats "! @parameter iv_flight_distance | flight distance in kilometer "! @parameter rv_price | calculated flight price calculate_flight_price IMPORTING iv_seats_occupied_percent TYPE /dmo/plane_seats_occupied09 iv_flight_distance TYPE i RETURNING VALUE(rv_price) TYPE /dmo/flight_price09 ##RELAX. METHODS lock_travel IMPORTING iv_lock TYPE abap_bool RAISING /dmo/cx_flight_legacy09 ##RELAX ##NEEDED. METHODS _resolve_attribute IMPORTING iv_attrname TYPE scx_attrname ix TYPE REF TO /dmo/cx_flight_legacy09 RETURNING VALUE(rv_symsgv) TYPE symsgv. "! Final determinations / derivations after all levels have been prepared, e.g. bottom-up derivations METHODS _determine EXPORTING et_messages TYPE /dmo/if_flight_legacy09=>tt_if_t100_message CHANGING cs_travel TYPE /dmo/travel09 ct_booking TYPE /dmo/if_flight_legacy09=>tt_booking ct_booking_supplement TYPE /dmo/if_flight_legacy09=>tt_booking_supplement. METHODS _determine_travel_total_price CHANGING cs_travel TYPE /dmo/travel09 ct_booking TYPE /dmo/if_flight_legacy09=>tt_booking ct_booking_supplement TYPE /dmo/if_flight_legacy09=>tt_booking_supplement ct_messages TYPE /dmo/if_flight_legacy09=>tt_if_t100_message ##NEEDED. METHODS _convert_currency IMPORTING iv_currency_code_source TYPE /dmo/currency_code09 iv_currency_code_target TYPE /dmo/currency_code09 iv_amount TYPE /dmo/total_price09 RETURNING VALUE(rv_amount) TYPE /dmo/total_price09. ENDCLASS. CLASS /dmo/cl_flight_legacy09 IMPLEMENTATION. METHOD calculate_flight_price. DATA: lv_percentage_of_max_price TYPE i. lv_percentage_of_max_price = ( 3 * iv_seats_occupied_percent ** 2 DIV 400 ) + 25 ##OPERATOR[**]. rv_price = lv_percentage_of_max_price * iv_flight_distance DIV 100. ENDMETHOD. METHOD convert_messages. CLEAR et_messages. DATA ls_message TYPE symsg. LOOP AT it_messages INTO DATA(lr_error) ##INTO_OK. ls_message-msgty = 'E'. ls_message-msgid = lr_error->t100key-msgid. ls_message-msgno = lr_error->t100key-msgno. IF lr_error IS INSTANCE OF /dmo/cx_flight_legacy09. DATA(lx) = CAST /dmo/cx_flight_legacy09( lr_error ). ls_message-msgv1 = _resolve_attribute( iv_attrname = lr_error->t100key-attr1 ix = lx ). ls_message-msgv2 = _resolve_attribute( iv_attrname = lr_error->t100key-attr2 ix = lx ). ls_message-msgv3 = _resolve_attribute( iv_attrname = lr_error->t100key-attr3 ix = lx ). ls_message-msgv4 = _resolve_attribute( iv_attrname = lr_error->t100key-attr4 ix = lx ). ENDIF. APPEND ls_message TO et_messages. ENDLOOP. ENDMETHOD. METHOD create_travel. CLEAR: es_travel, et_booking, et_booking_supplement, et_messages. " Travel lcl_travel_buffer=>get_instance( )->cud_prep( EXPORTING it_travel = VALUE #( ( CORRESPONDING #( is_travel ) ) ) it_travelx = VALUE #( ( travel_id = is_travel-travel_id action_code = /dmo/if_flight_legacy09=>action_code-create ) ) IMPORTING et_travel = DATA(lt_travel) et_messages = et_messages ). IF et_messages IS INITIAL. ASSERT lines( lt_travel ) = 1. es_travel = lt_travel[ 1 ]. ENDIF. " Bookings IF et_messages IS INITIAL. DATA lt_booking TYPE /dmo/if_flight_legacy09=>tt_booking. DATA lt_bookingx TYPE /dmo/if_flight_legacy09=>tt_bookingx. LOOP AT it_booking INTO DATA(ls_booking_in). DATA ls_booking TYPE /dmo/booking09. ls_booking = CORRESPONDING #( ls_booking_in ). ls_booking-travel_id = es_travel-travel_id. INSERT ls_booking INTO TABLE lt_booking. INSERT VALUE #( travel_id = ls_booking-travel_id booking_id = ls_booking-booking_id action_code = /dmo/if_flight_legacy09=>action_code-create ) INTO TABLE lt_bookingx. ENDLOOP. lcl_booking_buffer=>get_instance( )->cud_prep( EXPORTING it_booking = lt_booking it_bookingx = lt_bookingx IMPORTING et_booking = et_booking et_messages = DATA(lt_messages) ). APPEND LINES OF lt_messages TO et_messages. ENDIF. " Booking Supplements IF et_messages IS INITIAL. DATA lt_booking_supplement TYPE /dmo/if_flight_legacy09=>tt_booking_supplement. DATA lt_booking_supplementx TYPE /dmo/if_flight_legacy09=>tt_booking_supplementx. LOOP AT it_booking_supplement INTO DATA(ls_booking_supplement_in). DATA ls_booking_supplement TYPE /dmo/book_sup_09. ls_booking_supplement = CORRESPONDING #( ls_booking_supplement_in ). ls_booking_supplement-travel_id = es_travel-travel_id. IF lcl_booking_buffer=>get_instance( )->check_booking_id( EXPORTING iv_travel_id = ls_booking_supplement-travel_id iv_booking_id = ls_booking_supplement-booking_id CHANGING ct_messages = et_messages ) = abap_false. EXIT. ENDIF. INSERT ls_booking_supplement INTO TABLE lt_booking_supplement. INSERT VALUE #( travel_id = ls_booking_supplement-travel_id booking_id = ls_booking_supplement-booking_id booking_supplement_id = ls_booking_supplement-booking_supplement_id action_code = /dmo/if_flight_legacy09=>action_code-create ) INTO TABLE lt_booking_supplementx. ENDLOOP. IF et_messages IS INITIAL. lcl_booking_supplement_buffer=>get_instance( )->cud_prep( EXPORTING it_booking_supplement = lt_booking_supplement it_booking_supplementx = lt_booking_supplementx IMPORTING et_booking_supplement = et_booking_supplement et_messages = lt_messages ). APPEND LINES OF lt_messages TO et_messages. ENDIF. ENDIF. " Now do any derivations that require the whole business object (not only a single node), but which may in principle result in an error IF et_messages IS INITIAL. _determine( IMPORTING et_messages = et_messages CHANGING cs_travel = es_travel ct_booking = et_booking ct_booking_supplement = et_booking_supplement ). ENDIF. IF et_messages IS INITIAL. lcl_travel_buffer=>get_instance( )->cud_copy( ). lcl_booking_buffer=>get_instance( )->cud_copy( ). lcl_booking_supplement_buffer=>get_instance( )->cud_copy( ). ELSE. CLEAR: es_travel, et_booking, et_booking_supplement. lcl_travel_buffer=>get_instance( )->cud_disc( ). lcl_booking_buffer=>get_instance( )->cud_disc( ). lcl_booking_supplement_buffer=>get_instance( )->cud_disc( ). ENDIF. ENDMETHOD. METHOD delete_travel. CLEAR et_messages. get_travel( EXPORTING iv_travel_id = iv_travel_id iv_include_buffer = abap_true iv_include_temp_buffer = abap_true IMPORTING et_booking = DATA(lt_booking) et_booking_supplement = DATA(lt_booking_supplement) et_messages = et_messages ). IF et_messages IS INITIAL. lcl_booking_supplement_buffer=>get_instance( )->cud_prep( EXPORTING it_booking_supplement = CORRESPONDING #( lt_booking_supplement MAPPING travel_id = travel_id booking_id = booking_id booking_supplement_id = booking_supplement_id EXCEPT * ) it_booking_supplementx = VALUE #( FOR ls_bs IN lt_booking_supplement ( action_code = /dmo/if_flight_legacy09=>action_code-delete travel_id = ls_bs-travel_id booking_id = ls_bs-booking_id booking_supplement_id = ls_bs-booking_supplement_id ) ) iv_no_delete_check = abap_true " No existence check required IMPORTING et_messages = DATA(lt_messages) ). APPEND LINES OF lt_messages TO et_messages. ENDIF. IF et_messages IS INITIAL. lcl_booking_buffer=>get_instance( )->cud_prep( EXPORTING it_booking = CORRESPONDING #( lt_booking MAPPING travel_id = travel_id booking_id = booking_id EXCEPT * ) it_bookingx = VALUE #( FOR ls_b IN lt_booking ( action_code = /dmo/if_flight_legacy09=>action_code-delete travel_id = ls_b-travel_id booking_id = ls_b-booking_id ) ) iv_no_delete_check = abap_true " No existence check required IMPORTING et_messages = lt_messages ). APPEND LINES OF lt_messages TO et_messages. ENDIF. IF et_messages IS INITIAL. lcl_travel_buffer=>get_instance( )->cud_prep( EXPORTING it_travel = VALUE #( ( travel_id = iv_travel_id ) ) it_travelx = VALUE #( ( travel_id = iv_travel_id action_code = /dmo/if_flight_legacy09=>action_code-delete ) ) iv_no_delete_check = abap_true " No existence check required IMPORTING et_messages = lt_messages ). APPEND LINES OF lt_messages TO et_messages. ENDIF. IF et_messages IS INITIAL. lcl_travel_buffer=>get_instance( )->cud_copy( ). lcl_booking_buffer=>get_instance( )->cud_copy( ). lcl_booking_supplement_buffer=>get_instance( )->cud_copy( ). ELSE. lcl_travel_buffer=>get_instance( )->cud_disc( ). lcl_booking_buffer=>get_instance( )->cud_disc( ). lcl_booking_supplement_buffer=>get_instance( )->cud_disc( ). ENDIF. ENDMETHOD. METHOD get_instance. go_instance = COND #( WHEN go_instance IS BOUND THEN go_instance ELSE NEW #( ) ). ro_instance = go_instance. ENDMETHOD. METHOD get_travel. CLEAR: es_travel, et_booking, et_booking_supplement, et_messages. IF iv_travel_id IS INITIAL. APPEND NEW /dmo/cx_flight_legacy09( textid = /dmo/cx_flight_legacy09=>travel_no_key ) TO et_messages. RETURN. ENDIF. lcl_travel_buffer=>get_instance( )->get( EXPORTING it_travel = VALUE #( ( travel_id = iv_travel_id ) ) iv_include_buffer = iv_include_buffer iv_include_temp_buffer = iv_include_temp_buffer IMPORTING et_travel = DATA(lt_travel) ). IF lt_travel IS INITIAL. APPEND NEW /dmo/cx_flight_legacy09( textid = /dmo/cx_flight_legacy09=>travel_unknown travel_id = iv_travel_id ) TO et_messages. RETURN. ENDIF. ASSERT lines( lt_travel ) = 1. es_travel = lt_travel[ 1 ]. lcl_booking_buffer=>get_instance( )->get( EXPORTING it_booking = VALUE #( ( travel_id = iv_travel_id ) ) iv_include_buffer = iv_include_buffer iv_include_temp_buffer = iv_include_temp_buffer IMPORTING et_booking = et_booking ). lcl_booking_supplement_buffer=>get_instance( )->get( EXPORTING it_booking_supplement = CORRESPONDING #( et_booking MAPPING travel_id = travel_id booking_id = booking_id EXCEPT * ) iv_include_buffer = iv_include_buffer iv_include_temp_buffer = iv_include_temp_buffer IMPORTING et_booking_supplement = et_booking_supplement ). ENDMETHOD. METHOD initialize. lcl_travel_buffer=>get_instance( )->initialize( ). lcl_booking_buffer=>get_instance( )->initialize( ). lcl_booking_supplement_buffer=>get_instance( )->initialize( ). ENDMETHOD. METHOD lock_travel ##NEEDED. * IF iv_lock = abap_true. * CALL FUNCTION 'ENQUEUE_/DMO/ETRAVEL09' * EXCEPTIONS * foreign_lock = 1 * system_failure = 2 * OTHERS = 3. * IF sy-subrc <> 0. * RAISE EXCEPTION TYPE /dmo/cx_flight_legacy09 * EXPORTING * textid = /dmo/cx_flight_legacy09=>travel_lock. * ENDIF. * ELSE. * CALL FUNCTION 'DEQUEUE_/DMO/ETRAVEL09'. * ENDIF. ENDMETHOD. METHOD save. lcl_travel_buffer=>get_instance( )->save( ). lcl_booking_buffer=>get_instance( )->save( ). lcl_booking_supplement_buffer=>get_instance( )->save( ). initialize( ). ENDMETHOD. METHOD set_status_to_booked. lcl_travel_buffer=>get_instance( )->set_status_to_booked( EXPORTING iv_travel_id = iv_travel_id IMPORTING et_messages = et_messages ). ENDMETHOD. METHOD update_travel. CLEAR es_travel. CLEAR et_booking. CLEAR et_booking_supplement. CLEAR et_messages. " Travel IF is_travel-travel_id IS INITIAL. APPEND NEW /dmo/cx_flight_legacy09( textid = /dmo/cx_flight_legacy09=>travel_no_key ) TO et_messages. RETURN. ENDIF. DATA ls_travelx TYPE /dmo/if_flight_legacy09=>ts_travelx. ls_travelx = CORRESPONDING #( is_travelx ). ls_travelx-action_code = /dmo/if_flight_legacy09=>action_code-update. lcl_travel_buffer=>get_instance( )->cud_prep( EXPORTING it_travel = VALUE #( ( CORRESPONDING #( is_travel ) ) ) it_travelx = VALUE #( ( ls_travelx ) ) IMPORTING et_travel = DATA(lt_travel) et_messages = et_messages ). " We may need to delete Booking Supplements of deleted Bookings " Read all Booking Supplements before any Bookings are deleted get_travel( EXPORTING iv_travel_id = is_travel-travel_id iv_include_buffer = abap_true iv_include_temp_buffer = abap_true IMPORTING et_booking_supplement = DATA(lt_booking_supplement_del) ). " Bookings IF et_messages IS INITIAL. " Ignore provided Travel ID of subnode tables DATA lt_booking TYPE /dmo/if_flight_legacy09=>tt_booking. DATA lt_bookingx TYPE /dmo/if_flight_legacy09=>tt_bookingx. LOOP AT it_booking INTO DATA(ls_booking_in). DATA ls_booking TYPE /dmo/booking09. ls_booking = CORRESPONDING #( ls_booking_in ). ls_booking-travel_id = is_travel-travel_id. INSERT ls_booking INTO TABLE lt_booking. ENDLOOP. LOOP AT it_bookingx INTO DATA(ls_booking_inx). DATA ls_bookingx TYPE /dmo/if_flight_legacy09=>ts_bookingx. ls_bookingx = CORRESPONDING #( ls_booking_inx ). ls_bookingx-travel_id = is_travel-travel_id. INSERT ls_bookingx INTO TABLE lt_bookingx. ENDLOOP. lcl_booking_buffer=>get_instance( )->cud_prep( EXPORTING it_booking = lt_booking it_bookingx = lt_bookingx IMPORTING et_booking = et_booking et_messages = DATA(lt_messages) ). APPEND LINES OF lt_messages TO et_messages. ENDIF. " Booking Supplements IF et_messages IS INITIAL. " Ignore provided Travel ID of subnode tables DATA lt_booking_supplement TYPE /dmo/if_flight_legacy09=>tt_booking_supplement. DATA lt_booking_supplementx TYPE /dmo/if_flight_legacy09=>tt_booking_supplementx. LOOP AT it_booking_supplement INTO DATA(ls_booking_supplement_in). DATA ls_booking_supplement TYPE /dmo/book_sup_09. ls_booking_supplement = CORRESPONDING #( ls_booking_supplement_in ). ls_booking_supplement-travel_id = is_travel-travel_id. IF lcl_booking_buffer=>get_instance( )->check_booking_id( EXPORTING iv_travel_id = ls_booking_supplement-travel_id iv_booking_id = ls_booking_supplement-booking_id CHANGING ct_messages = et_messages ) = abap_false. EXIT. ENDIF. INSERT ls_booking_supplement INTO TABLE lt_booking_supplement. ENDLOOP. IF et_messages IS INITIAL. LOOP AT it_booking_supplementx INTO DATA(ls_booking_supplement_inx). DATA ls_booking_supplementx TYPE /dmo/if_flight_legacy09=>ts_booking_supplementx. ls_booking_supplementx = CORRESPONDING #( ls_booking_supplement_inx ). ls_booking_supplementx-travel_id = is_travel-travel_id. INSERT ls_booking_supplementx INTO TABLE lt_booking_supplementx. ENDLOOP. lcl_booking_supplement_buffer=>get_instance( )->cud_prep( EXPORTING it_booking_supplement = lt_booking_supplement it_booking_supplementx = lt_booking_supplementx IMPORTING et_booking_supplement = et_booking_supplement et_messages = lt_messages ). APPEND LINES OF lt_messages TO et_messages. ENDIF. ENDIF. " For Bookings to be deleted we also need to delete the Booking Supplements IF et_messages IS INITIAL AND lt_booking_supplement_del IS NOT INITIAL AND line_exists( lt_bookingx[ action_code = CONV /dmo/action_code09( /dmo/if_flight_legacy09=>action_code-delete ) ] ). " Remove any Bookings from internal table that must not be deleted LOOP AT lt_booking_supplement_del ASSIGNING FIELD-SYMBOL(<s_booking_supplement_del>). READ TABLE lt_bookingx TRANSPORTING NO FIELDS WITH KEY action_code = CONV /dmo/action_code09( /dmo/if_flight_legacy09=>action_code-delete ) travel_id = <s_booking_supplement_del>-travel_id booking_id = <s_booking_supplement_del>-booking_id. IF sy-subrc <> 0. DELETE lt_booking_supplement_del. ENDIF. ENDLOOP. lcl_booking_supplement_buffer=>get_instance( )->cud_prep( EXPORTING it_booking_supplement = CORRESPONDING #( lt_booking_supplement_del MAPPING travel_id = travel_id booking_id = booking_id booking_supplement_id = booking_supplement_id EXCEPT * ) it_booking_supplementx = VALUE #( FOR ls_bs IN lt_booking_supplement_del ( action_code = /dmo/if_flight_legacy09=>action_code-delete travel_id = ls_bs-travel_id booking_id = ls_bs-booking_id booking_supplement_id = ls_bs-booking_supplement_id ) ) iv_no_delete_check = abap_true " No existence check required IMPORTING et_messages = et_messages ). ENDIF. IF et_messages IS INITIAL. ASSERT lines( lt_travel ) = 1. " Now do any derivations that require the whole business object (not only a single node), but which may in principle result in an error " The derivation may need the complete Business Object, i.e. including unchanged subnodes get_travel( EXPORTING iv_travel_id = lt_travel[ 1 ]-travel_id iv_include_buffer = abap_true iv_include_temp_buffer = abap_true IMPORTING es_travel = es_travel et_booking = et_booking et_booking_supplement = et_booking_supplement et_messages = et_messages ). ASSERT et_messages IS INITIAL. _determine( IMPORTING et_messages = et_messages CHANGING cs_travel = es_travel ct_booking = et_booking ct_booking_supplement = et_booking_supplement ). IF et_messages IS INITIAL. " We do not want to return all subnodes, but only those that have been created or changed. " So currently it is not implemented that a determination of a booking changes another booking as the other booking cannot be properly returned. LOOP AT et_booking ASSIGNING FIELD-SYMBOL(<s_booking>). LOOP AT it_bookingx TRANSPORTING NO FIELDS WHERE booking_id = <s_booking>-booking_id AND ( action_code = CONV /dmo/action_code09( /dmo/if_flight_legacy09=>action_code-create ) OR action_code = CONV /dmo/action_code09( /dmo/if_flight_legacy09=>action_code-update ) ). EXIT. ENDLOOP. IF sy-subrc <> 0. DELETE et_booking. ENDIF. ENDLOOP. LOOP AT et_booking_supplement ASSIGNING FIELD-SYMBOL(<s_booking_supplement>). LOOP AT it_booking_supplementx TRANSPORTING NO FIELDS WHERE booking_id = <s_booking_supplement>-booking_id AND booking_supplement_id = <s_booking_supplement>-booking_supplement_id AND ( action_code = CONV /dmo/action_code09( /dmo/if_flight_legacy09=>action_code-create ) OR action_code = CONV /dmo/action_code09( /dmo/if_flight_legacy09=>action_code-update ) ). EXIT. ENDLOOP. IF sy-subrc <> 0. DELETE et_booking_supplement. ENDIF. ENDLOOP. ENDIF. ENDIF. IF et_messages IS INITIAL. lcl_travel_buffer=>get_instance( )->cud_copy( ). lcl_booking_buffer=>get_instance( )->cud_copy( ). lcl_booking_supplement_buffer=>get_instance( )->cud_copy( ). ELSE. CLEAR: es_travel, et_booking, et_booking_supplement. lcl_travel_buffer=>get_instance( )->cud_disc( ). lcl_booking_buffer=>get_instance( )->cud_disc( ). lcl_booking_supplement_buffer=>get_instance( )->cud_disc( ). ENDIF. ENDMETHOD. METHOD _convert_currency. DATA(lv_exchange_rate_date) = cl_abap_context_info=>get_system_date( )." Do not buffer: Current date may change during lifetime of session /dmo/cl_flight_amdp09=>convert_currency( EXPORTING iv_amount = iv_amount iv_currency_code_source = iv_currency_code_source iv_currency_code_target = iv_currency_code_target iv_exchange_rate_date = lv_exchange_rate_date IMPORTING ev_amount = rv_amount ). ENDMETHOD. METHOD _determine. ASSERT cs_travel-travel_id IS NOT INITIAL. LOOP AT ct_booking TRANSPORTING NO FIELDS WHERE travel_id <> cs_travel-travel_id. EXIT. ENDLOOP. ASSERT sy-subrc = 4. LOOP AT ct_booking_supplement TRANSPORTING NO FIELDS WHERE travel_id <> cs_travel-travel_id. EXIT. ENDLOOP. ASSERT sy-subrc = 4. CLEAR et_messages. _determine_travel_total_price( CHANGING cs_travel = cs_travel ct_booking = ct_booking ct_booking_supplement = ct_booking_supplement ct_messages = et_messages ). ENDMETHOD. METHOD _determine_travel_total_price. DATA lv_add TYPE /dmo/total_price09. DATA(lv_currency_code_target) = cs_travel-currency_code. " If we do not have a Travel Currency Code yet, " we may derive it when all the subnodes have the same non-initial Currency Code IF lv_currency_code_target IS INITIAL. DATA lv_ok TYPE abap_bool. lv_ok = abap_true. LOOP AT ct_booking ASSIGNING FIELD-SYMBOL(<s_booking>). IF sy-tabix = 1. lv_currency_code_target = <s_booking>-currency_code. ENDIF. IF <s_booking>-currency_code IS INITIAL. lv_ok = abap_false. EXIT. ENDIF. IF lv_currency_code_target <> <s_booking>-currency_code. lv_ok = abap_false. EXIT. ENDIF. ENDLOOP. IF lv_ok = abap_true. LOOP AT ct_booking_supplement ASSIGNING FIELD-SYMBOL(<s_booking_supplement>). IF <s_booking_supplement>-currency_code IS INITIAL. lv_ok = abap_false. EXIT. ENDIF. IF lv_currency_code_target <> <s_booking_supplement>-currency_code. lv_ok = abap_false. EXIT. ENDIF. ENDLOOP. ENDIF. ENDIF. IF lv_currency_code_target IS NOT INITIAL. " Total Price = Booking Fee + Booking Flight Prices + Booking Supplement Prices cs_travel-total_price = cs_travel-booking_fee. cs_travel-currency_code = lv_currency_code_target. LOOP AT ct_booking ASSIGNING <s_booking> GROUP BY <s_booking>-currency_code INTO DATA(booking_currency_code). lv_add = REDUCE #( INIT sum = 0 FOR b IN GROUP booking_currency_code NEXT sum = sum + b-flight_price ). IF booking_currency_code <> lv_currency_code_target. lv_add = _convert_currency( iv_currency_code_source = booking_currency_code iv_currency_code_target = lv_currency_code_target iv_amount = lv_add ). ENDIF. cs_travel-total_price = cs_travel-total_price + lv_add. ENDLOOP. LOOP AT ct_booking_supplement ASSIGNING <s_booking_supplement> GROUP BY <s_booking_supplement>-currency_code INTO DATA(supplement_currency_code). lv_add = REDUCE #( INIT sum = 0 FOR s IN GROUP supplement_currency_code NEXT sum = sum + s-price ). IF supplement_currency_code <> lv_currency_code_target. lv_add = _convert_currency( iv_currency_code_source = supplement_currency_code iv_currency_code_target = lv_currency_code_target iv_amount = lv_add ). ENDIF. cs_travel-total_price = cs_travel-total_price + lv_add. ENDLOOP. lcl_travel_buffer=>get_instance( )->cud_prep( EXPORTING it_travel = VALUE #( ( travel_id = cs_travel-travel_id total_price = cs_travel-total_price currency_code = cs_travel-currency_code ) ) it_travelx = VALUE #( ( action_code = /dmo/if_flight_legacy09=>action_code-update travel_id = cs_travel-travel_id total_price = abap_true currency_code = abap_true ) ) IMPORTING et_messages = DATA(lt_messages) ). ASSERT lt_messages IS INITIAL. ENDIF. ENDMETHOD. METHOD _resolve_attribute. CLEAR rv_symsgv. CASE iv_attrname. WHEN ''. rv_symsgv = ''. WHEN 'MV_TRAVEL_ID'. rv_symsgv = |{ ix->mv_travel_id ALPHA = OUT }|. WHEN 'MV_BOOKING_ID'. rv_symsgv = |{ ix->mv_booking_id ALPHA = OUT }|. WHEN 'MV_BOOKING_SUPPLEMENT_ID'. rv_symsgv = |{ ix->mv_booking_supplement_id ALPHA = OUT }|. WHEN 'MV_AGENCY_ID'. rv_symsgv = |{ ix->mv_agency_id ALPHA = OUT }|. WHEN 'MV_CUSTOMER_ID'. rv_symsgv = |{ ix->mv_customer_id ALPHA = OUT }|. WHEN 'MV_CARRIER_ID'. rv_symsgv = |{ ix->mv_carrier_id ALPHA = OUT }|. WHEN 'MV_CONNECTION_ID'. rv_symsgv = |{ ix->mv_connection_id ALPHA = OUT }|. WHEN 'MV_SUPPLEMENT_ID'. rv_symsgv = ix->mv_supplement_id. WHEN 'MV_BEGIN_DATE'. rv_symsgv = |{ ix->mv_begin_date DATE = USER }|. WHEN 'MV_END_DATE'. rv_symsgv = |{ ix->mv_end_date DATE = USER }|. WHEN 'MV_BOOKING_DATE'. rv_symsgv = |{ ix->mv_booking_date DATE = USER }|. WHEN 'MV_FLIGHT_DATE'. rv_symsgv = |{ ix->mv_flight_date DATE = USER }|. WHEN 'MV_STATUS'. rv_symsgv = ix->mv_status. WHEN 'MV_CURRENCY_CODE'. rv_symsgv = ix->mv_currency_code. WHEN 'MV_UNAME'. rv_symsgv = ix->mv_uname. WHEN OTHERS. ASSERT 1 = 2. ENDCASE. ENDMETHOD. ENDCLASS.
[ 31631, 1220, 67, 5908, 14, 565, 62, 22560, 62, 1455, 1590, 2931, 5550, 20032, 17941, 198, 220, 44731, 198, 220, 25261, 198, 220, 29244, 6158, 4810, 3824, 6158, 198, 220, 10188, 9864, 1847, 48167, 1677, 5258, 1220, 67, 5908, 14, 565, 62, 22560, 62, 7890, 62, 8612, 265, 62, 2931, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 23255, 37, 2246, 1546, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 13, 628, 220, 220, 220, 24412, 47, 1546, 25, 347, 43312, 3963, 12964, 5883, 1259, 62, 3803, 62, 14171, 19269, 18415, 11335, 1487, 62, 14171, 553, 7383, 8794, 389, 1760, 13869, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2251, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4296, 553, 5514, 7032, 326, 423, 587, 3421, 761, 284, 307, 10667, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23578, 3963, 12964, 5883, 1259, 62, 3803, 62, 14171, 19269, 18415, 11335, 1487, 62, 14171, 13, 628, 220, 220, 220, 42715, 12, 49273, 50, 25, 651, 62, 39098, 30826, 4261, 15871, 26173, 8924, 7, 305, 62, 39098, 8, 41876, 4526, 37, 5390, 1220, 67, 5908, 14, 565, 62, 22560, 62, 1455, 1590, 2931, 13, 628, 220, 220, 220, 366, 220, 220, 2080, 2461, 284, 262, 976, 2446, 869, 286, 2251, 14, 19119, 14, 33678, 62, 35927, 3419, 356, 423, 1439, 393, 10528, 13, 198, 220, 220, 220, 366, 220, 220, 314, 13, 68, 13, 618, 530, 286, 262, 2974, 4909, 281, 4049, 11, 262, 1844, 869, 318, 6520, 13, 198, 220, 220, 220, 366, 220, 220, 2102, 11, 262, 11876, 318, 407, 12539, 287, 1339, 286, 281, 4049, 13, 198, 220, 220, 220, 366, 220, 220, 314, 13, 68, 13, 618, 262, 24955, 3382, 284, 923, 625, 11, 339, 2476, 284, 869, 20768, 1096, 3419, 11777, 13, 628, 220, 220, 220, 337, 36252, 50, 900, 62, 13376, 62, 1462, 62, 2070, 276, 30023, 9863, 2751, 21628, 62, 35927, 62, 312, 41876, 1220, 67, 5908, 14, 35927, 62, 312, 2931, 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, 7788, 15490, 2751, 2123, 62, 37348, 1095, 220, 41876, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 14804, 926, 62, 361, 62, 83, 3064, 62, 20500, 13, 628, 220, 220, 220, 337, 36252, 50, 2251, 62, 35927, 30023, 9863, 2751, 318, 62, 35927, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 14804, 912, 62, 35927, 62, 259, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 340, 62, 2070, 278, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 14804, 926, 62, 2070, 278, 62, 259, 39852, 2849, 1847, 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, 340, 62, 2070, 278, 62, 18608, 1732, 41876, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 14804, 926, 62, 2070, 278, 62, 18608, 1732, 62, 259, 39852, 2849, 1847, 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, 7788, 15490, 2751, 1658, 62, 35927, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1220, 67, 5908, 14, 35927, 2931, 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, 2123, 62, 2070, 278, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 14804, 926, 62, 2070, 278, 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, 2123, 62, 2070, 278, 62, 18608, 1732, 41876, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 14804, 926, 62, 2070, 278, 62, 18608, 1732, 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, 2123, 62, 37348, 1095, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 14804, 926, 62, 361, 62, 83, 3064, 62, 20500, 13, 198, 220, 220, 220, 337, 36252, 50, 4296, 62, 35927, 30023, 9863, 2751, 318, 62, 35927, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 14804, 912, 62, 35927, 62, 259, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 62, 35927, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1220, 67, 5908, 14, 361, 62, 22560, 62, 1455, 1590, 2931, 14804, 912, 62, 35927, 62, 28413, 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, 340, 62, 2070, 278, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1220, 67, 5908, 14 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
REPORT zglds_demo_switch_template. CLASS lcl_solution DEFINITION. PUBLIC SECTION. INTERFACES zif_glds_demo_numin_strout. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS lcl_solution IMPLEMENTATION. METHOD zif_glds_demo_numin_strout~test_me. * implementation ENDMETHOD. ENDCLASS. "* use this source file for your ABAP unit test classes *UT:CLASS lcl_test DEFINITION *UT: INHERITING FROM zcl_glds_demo_switch_tests *UT: FOR TESTING *UT: RISK LEVEL HARMLESS *UT: DURATION SHORT. *UT:ENDCLASS.
[ 2200, 15490, 1976, 70, 335, 82, 62, 9536, 78, 62, 31943, 62, 28243, 13, 198, 198, 31631, 300, 565, 62, 82, 2122, 5550, 20032, 17941, 13, 628, 220, 44731, 44513, 13, 198, 220, 220, 220, 23255, 37, 2246, 1546, 1976, 361, 62, 70, 335, 82, 62, 9536, 78, 62, 77, 7230, 62, 2536, 448, 13, 198, 220, 48006, 9782, 1961, 44513, 13, 198, 220, 4810, 3824, 6158, 44513, 13, 198, 10619, 31631, 13, 628, 198, 31631, 300, 565, 62, 82, 2122, 30023, 2538, 10979, 6234, 13, 198, 220, 337, 36252, 1976, 361, 62, 70, 335, 82, 62, 9536, 78, 62, 77, 7230, 62, 2536, 448, 93, 9288, 62, 1326, 13, 198, 198, 9, 7822, 628, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198, 198, 1, 9, 779, 428, 2723, 2393, 329, 534, 9564, 2969, 4326, 1332, 6097, 198, 9, 3843, 25, 31631, 300, 565, 62, 9288, 5550, 20032, 17941, 198, 9, 3843, 25, 220, 3268, 16879, 2043, 2751, 16034, 1976, 565, 62, 70, 335, 82, 62, 9536, 78, 62, 31943, 62, 41989, 198, 9, 3843, 25, 220, 7473, 43001, 2751, 198, 9, 3843, 25, 220, 45698, 42, 49277, 43638, 5805, 7597, 198, 9, 3843, 25, 220, 360, 4261, 6234, 6006, 9863, 13, 198, 9, 3843, 25, 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 ]
CLASS zcl_abapgit_branch_overview DEFINITION PUBLIC FINAL CREATE PRIVATE GLOBAL FRIENDS zcl_abapgit_factory . PUBLIC SECTION. INTERFACES zif_abapgit_branch_overview . CONSTANTS c_deleted_branch_name_prefix TYPE string VALUE '__DELETED_BRANCH_' ##NO_TEXT. METHODS constructor IMPORTING io_repo TYPE REF TO zcl_abapgit_repo_online RAISING zcx_abapgit_exception . PROTECTED SECTION. PRIVATE SECTION. TYPES: tyt_commit_sha1_range TYPE RANGE OF zif_abapgit_definitions=>ty_sha1 . DATA mt_branches TYPE zif_abapgit_definitions=>ty_git_branch_list_tt . DATA mt_commits TYPE zif_abapgit_definitions=>ty_commit_tt . DATA mt_tags TYPE zif_abapgit_definitions=>ty_git_tag_list_tt . METHODS compress_internal IMPORTING !iv_name TYPE string CHANGING !ct_temp TYPE zif_abapgit_definitions=>ty_commit_tt !ct_commits TYPE zif_abapgit_definitions=>ty_commit_tt . CLASS-METHODS parse_commits IMPORTING !it_objects TYPE zif_abapgit_definitions=>ty_objects_tt RETURNING VALUE(rt_commits) TYPE zif_abapgit_definitions=>ty_commit_tt RAISING zcx_abapgit_exception . METHODS parse_annotated_tags IMPORTING !it_objects TYPE zif_abapgit_definitions=>ty_objects_tt RAISING zcx_abapgit_exception . METHODS determine_branch RAISING zcx_abapgit_exception . METHODS determine_merges RAISING zcx_abapgit_exception . METHODS fixes RAISING zcx_abapgit_exception . METHODS get_git_objects IMPORTING !io_repo TYPE REF TO zcl_abapgit_repo_online RETURNING VALUE(rt_objects) TYPE zif_abapgit_definitions=>ty_objects_tt RAISING zcx_abapgit_exception . METHODS determine_tags RAISING zcx_abapgit_exception . METHODS _sort_commits CHANGING !ct_commits TYPE zif_abapgit_definitions=>ty_commit_tt . METHODS _get_1st_child_commit IMPORTING !it_commit_sha1s TYPE tyt_commit_sha1_range EXPORTING !et_commit_sha1s TYPE tyt_commit_sha1_range !es_1st_commit TYPE zif_abapgit_definitions=>ty_commit CHANGING !ct_commits TYPE zif_abapgit_definitions=>ty_commit_tt . METHODS _reverse_sort_order CHANGING !ct_commits TYPE zif_abapgit_definitions=>ty_commit_tt . ENDCLASS. CLASS ZCL_ABAPGIT_BRANCH_OVERVIEW IMPLEMENTATION. METHOD compress_internal. FIELD-SYMBOLS: <ls_temp> LIKE LINE OF ct_temp, <ls_new> LIKE LINE OF ct_commits, <ls_temp_end> LIKE LINE OF ct_temp. IF lines( ct_temp ) >= 10. READ TABLE ct_temp ASSIGNING <ls_temp> INDEX 1. ASSERT sy-subrc = 0. READ TABLE ct_temp ASSIGNING <ls_temp_end> INDEX lines( ct_temp ). ASSERT sy-subrc = 0. APPEND INITIAL LINE TO ct_commits ASSIGNING <ls_new>. <ls_new>-sha1 = <ls_temp_end>-sha1. <ls_new>-parent1 = <ls_temp>-parent1. <ls_new>-time = <ls_temp>-time. <ls_new>-message = |Compressed, { lines( ct_temp ) } commits|. <ls_new>-branch = iv_name. <ls_new>-compressed = abap_true. ELSE. APPEND LINES OF ct_temp TO ct_commits. ENDIF. CLEAR ct_temp. ENDMETHOD. METHOD constructor. DATA: lt_objects TYPE zif_abapgit_definitions=>ty_objects_tt. lt_objects = get_git_objects( io_repo ). mt_commits = parse_commits( lt_objects ). _sort_commits( CHANGING ct_commits = mt_commits ). parse_annotated_tags( lt_objects ). CLEAR lt_objects. determine_branch( ). determine_merges( ). determine_tags( ). fixes( ). ENDMETHOD. METHOD determine_branch. CONSTANTS: lc_head TYPE string VALUE 'HEAD'. TYPES: BEGIN OF ty_branch_with_time, time TYPE string, name TYPE string, sha1 TYPE zif_abapgit_definitions=>ty_sha1, END OF ty_branch_with_time. DATA: lt_branches_sorted_by_time TYPE SORTED TABLE OF ty_branch_with_time WITH NON-UNIQUE KEY time, ls_branches_with_time TYPE ty_branch_with_time. FIELD-SYMBOLS: <ls_branch> LIKE LINE OF mt_branches, <ls_branch_sorted_by_time> LIKE LINE OF lt_branches_sorted_by_time, <ls_head> LIKE LINE OF mt_branches, <ls_commit> LIKE LINE OF mt_commits, <ls_create> LIKE LINE OF <ls_commit>-create. * Exchange HEAD, and make sure the branch determination starts with the HEAD branch READ TABLE mt_branches ASSIGNING <ls_head> WITH KEY name = lc_head. ASSERT sy-subrc = 0. LOOP AT mt_branches ASSIGNING <ls_branch> WHERE sha1 = <ls_head>-sha1 AND name <> lc_head. <ls_head>-name = <ls_branch>-name. DELETE mt_branches INDEX sy-tabix. EXIT. ENDLOOP. * Sort Branches by Commit Time LOOP AT mt_branches ASSIGNING <ls_branch>. READ TABLE mt_commits ASSIGNING <ls_commit> WITH KEY sha1 = <ls_branch>-sha1. IF sy-subrc = 0. ls_branches_with_time-name = <ls_branch>-name+11. ls_branches_with_time-sha1 = <ls_branch>-sha1. IF <ls_branch>-is_head = abap_true. ls_branches_with_time-time = '0000000000'. "Force HEAD to be the first one ELSE. ls_branches_with_time-time = <ls_commit>-time. ENDIF. INSERT ls_branches_with_time INTO TABLE lt_branches_sorted_by_time. CLEAR ls_branches_with_time. ENDIF. ENDLOOP. LOOP AT lt_branches_sorted_by_time ASSIGNING <ls_branch_sorted_by_time>. READ TABLE mt_commits ASSIGNING <ls_commit> WITH KEY sha1 = <ls_branch_sorted_by_time>-sha1. ASSERT sy-subrc = 0. DO. IF <ls_commit>-branch IS INITIAL. <ls_commit>-branch = <ls_branch_sorted_by_time>-name. ELSE. APPEND INITIAL LINE TO <ls_commit>-create ASSIGNING <ls_create>. <ls_create>-name = <ls_branch_sorted_by_time>-name. <ls_create>-parent = <ls_commit>-branch. EXIT. ENDIF. IF <ls_commit>-parent1 IS INITIAL. EXIT. ELSE. READ TABLE mt_commits ASSIGNING <ls_commit> WITH KEY sha1 = <ls_commit>-parent1. ASSERT sy-subrc = 0. ENDIF. ENDDO. ENDLOOP. ENDMETHOD. METHOD determine_merges. DATA: BEGIN OF ls_deleted_branch_info, created TYPE abap_bool, index TYPE string, name TYPE string, END OF ls_deleted_branch_info. FIELD-SYMBOLS: <ls_merged_branch_commit> TYPE zif_abapgit_definitions=>ty_commit, <ls_merged_branch_parent> TYPE zif_abapgit_definitions=>ty_commit, <ls_commit> TYPE zif_abapgit_definitions=>ty_commit, <ls_create> TYPE zif_abapgit_definitions=>ty_create. * we need latest first here: latest -> initial _reverse_sort_order( CHANGING ct_commits = mt_commits ). LOOP AT mt_commits ASSIGNING <ls_commit> WHERE NOT parent2 IS INITIAL. ASSERT NOT <ls_commit>-branch IS INITIAL. READ TABLE mt_commits ASSIGNING <ls_merged_branch_commit> WITH KEY sha1 = <ls_commit>-parent2. IF sy-subrc = 0. <ls_commit>-merge = <ls_merged_branch_commit>-branch. * orphaned, branch has been deleted after merge ls_deleted_branch_info-created = abap_false. WHILE <ls_merged_branch_commit>-branch IS INITIAL. IF ls_deleted_branch_info-created = abap_false. ls_deleted_branch_info-created = abap_true. ls_deleted_branch_info-index = ls_deleted_branch_info-index + 1. ls_deleted_branch_info-name = c_deleted_branch_name_prefix && ls_deleted_branch_info-index && '__'. CONDENSE ls_deleted_branch_info-name NO-GAPS. <ls_commit>-merge = ls_deleted_branch_info-name. ENDIF. <ls_merged_branch_commit>-branch = ls_deleted_branch_info-name. READ TABLE mt_commits ASSIGNING <ls_merged_branch_parent> WITH KEY sha1 = <ls_merged_branch_commit>-parent1. IF sy-subrc <> 0. EXIT. ELSE. ASSIGN <ls_merged_branch_parent> TO <ls_merged_branch_commit>. ENDIF. ENDWHILE. IF <ls_merged_branch_parent> IS ASSIGNED. APPEND INITIAL LINE TO <ls_merged_branch_parent>-create ASSIGNING <ls_create>. <ls_create>-name = ls_deleted_branch_info-name. <ls_create>-parent = <ls_commit>-branch. ENDIF. ENDIF. ENDLOOP. " switch back to initial -> latest _reverse_sort_order( CHANGING ct_commits = mt_commits ). ENDMETHOD. METHOD determine_tags. DATA: lv_tag TYPE LINE OF zif_abapgit_definitions=>ty_commit-tags. FIELD-SYMBOLS: <ls_tag> LIKE LINE OF mt_tags, <ls_commit> LIKE LINE OF mt_commits. LOOP AT mt_tags ASSIGNING <ls_tag>. IF <ls_tag>-type = zif_abapgit_definitions=>c_git_branch_type-lightweight_tag. READ TABLE mt_commits WITH KEY sha1 = <ls_tag>-sha1 ASSIGNING <ls_commit>. "#EC CI_SUBRC ELSEIF <ls_tag>-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag. READ TABLE mt_commits WITH KEY sha1 = <ls_tag>-object ASSIGNING <ls_commit>. ENDIF. CHECK sy-subrc = 0. lv_tag = zcl_abapgit_git_tag=>remove_tag_prefix( <ls_tag>-name ). INSERT lv_tag INTO TABLE <ls_commit>-tags. ENDLOOP. ENDMETHOD. METHOD fixes. FIELD-SYMBOLS: <ls_commit> LIKE LINE OF mt_commits. LOOP AT mt_commits ASSIGNING <ls_commit> WHERE NOT merge IS INITIAL. * commits from old branches IF <ls_commit>-branch = <ls_commit>-merge. CLEAR <ls_commit>-merge. ENDIF. ENDLOOP. ENDMETHOD. METHOD get_git_objects. DATA: lo_branch_list TYPE REF TO zcl_abapgit_git_branch_list, li_progress TYPE REF TO zif_abapgit_progress, lt_branches_and_tags TYPE zif_abapgit_definitions=>ty_git_branch_list_tt, lt_tags TYPE zif_abapgit_definitions=>ty_git_branch_list_tt, ls_tag LIKE LINE OF mt_tags. FIELD-SYMBOLS: <ls_branch> LIKE LINE OF lt_tags. li_progress = zcl_abapgit_progress=>get_instance( 1 ). li_progress->show( iv_current = 1 iv_text = |Get git objects { io_repo->get_name( ) }| ). * get objects directly from git, mo_repo only contains a shallow clone of only * the selected branch "TODO refactor lo_branch_list = zcl_abapgit_git_transport=>branches( io_repo->get_url( ) ). mt_branches = lo_branch_list->get_branches_only( ). INSERT LINES OF mt_branches INTO TABLE lt_branches_and_tags. lt_tags = lo_branch_list->get_tags_only( ). INSERT LINES OF lt_tags INTO TABLE lt_branches_and_tags. LOOP AT lt_tags ASSIGNING <ls_branch>. IF <ls_branch>-name CP '*^{}'. CONTINUE. ENDIF. MOVE-CORRESPONDING <ls_branch> TO ls_tag. INSERT ls_tag INTO TABLE mt_tags. ENDLOOP. zcl_abapgit_git_transport=>upload_pack_by_branch( EXPORTING iv_url = io_repo->get_url( ) iv_branch_name = io_repo->get_branch_name( ) iv_deepen = abap_false it_branches = lt_branches_and_tags IMPORTING et_objects = rt_objects ). DELETE rt_objects WHERE type = zif_abapgit_definitions=>c_type-blob. ENDMETHOD. METHOD parse_annotated_tags. DATA: ls_raw TYPE zcl_abapgit_git_pack=>ty_tag. FIELD-SYMBOLS: <ls_object> LIKE LINE OF it_objects, <ls_tag> LIKE LINE OF mt_tags. LOOP AT it_objects ASSIGNING <ls_object> USING KEY type WHERE type = zif_abapgit_definitions=>c_type-tag. ls_raw = zcl_abapgit_git_pack=>decode_tag( <ls_object>-data ). READ TABLE mt_tags ASSIGNING <ls_tag> WITH KEY sha1 = <ls_object>-sha1. ASSERT sy-subrc = 0. <ls_tag>-name = zif_abapgit_definitions=>c_git_branch-tags_prefix && ls_raw-tag. <ls_tag>-sha1 = <ls_object>-sha1. <ls_tag>-object = ls_raw-object. <ls_tag>-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag. <ls_tag>-display_name = ls_raw-tag. <ls_tag>-tagger_name = ls_raw-tagger_name. <ls_tag>-tagger_email = ls_raw-tagger_email. <ls_tag>-message = ls_raw-message. <ls_tag>-body = ls_raw-body. ENDLOOP. ENDMETHOD. METHOD parse_commits. DATA: ls_commit LIKE LINE OF mt_commits, lt_body TYPE STANDARD TABLE OF string WITH DEFAULT KEY, ls_raw TYPE zcl_abapgit_git_pack=>ty_commit. FIELD-SYMBOLS: <ls_object> LIKE LINE OF it_objects, <lv_body> TYPE string. LOOP AT it_objects ASSIGNING <ls_object> USING KEY type WHERE type = zif_abapgit_definitions=>c_type-commit. ls_raw = zcl_abapgit_git_pack=>decode_commit( <ls_object>-data ). CLEAR ls_commit. ls_commit-sha1 = <ls_object>-sha1. ls_commit-parent1 = ls_raw-parent. ls_commit-parent2 = ls_raw-parent2. SPLIT ls_raw-body AT zif_abapgit_definitions=>c_newline INTO TABLE lt_body. READ TABLE lt_body WITH KEY table_line = ' -----END PGP SIGNATURE-----' TRANSPORTING NO FIELDS. IF sy-subrc = 0. DELETE lt_body TO sy-tabix. DELETE lt_body TO 2. ENDIF. READ TABLE lt_body INDEX 1 INTO ls_commit-message. "#EC CI_SUBRC " The second line is always empty. Therefore we omit it. LOOP AT lt_body ASSIGNING <lv_body> FROM 3. INSERT <lv_body> INTO TABLE ls_commit-body. ENDLOOP. zcl_abapgit_utils=>extract_author_data( EXPORTING iv_author = ls_raw-author IMPORTING ev_author = ls_commit-author ev_email = ls_commit-email ev_time = ls_commit-time ). APPEND ls_commit TO rt_commits. ENDLOOP. ENDMETHOD. METHOD zif_abapgit_branch_overview~compress. DATA: lv_previous TYPE i, lv_index TYPE i, lv_name TYPE string, lt_temp LIKE it_commits. FIELD-SYMBOLS: <ls_branch> LIKE LINE OF mt_branches, <ls_commit> LIKE LINE OF it_commits. LOOP AT mt_branches ASSIGNING <ls_branch>. CLEAR lt_temp. lv_name = <ls_branch>-name+11. LOOP AT it_commits ASSIGNING <ls_commit> WHERE branch = lv_name. lv_index = sy-tabix. IF NOT <ls_commit>-merge IS INITIAL OR NOT <ls_commit>-create IS INITIAL. * always show these vertices lv_previous = -1. ENDIF. IF lv_previous + 1 <> sy-tabix. compress_internal( EXPORTING iv_name = lv_name CHANGING ct_temp = lt_temp ct_commits = rt_commits ). ENDIF. lv_previous = lv_index. APPEND <ls_commit> TO lt_temp. ENDLOOP. compress_internal( EXPORTING iv_name = lv_name CHANGING ct_temp = lt_temp ct_commits = rt_commits ). ENDLOOP. _sort_commits( CHANGING ct_commits = rt_commits ). ENDMETHOD. METHOD zif_abapgit_branch_overview~get_branches. rt_branches = mt_branches. ENDMETHOD. METHOD zif_abapgit_branch_overview~get_commits. rt_commits = mt_commits. ENDMETHOD. METHOD zif_abapgit_branch_overview~get_tags. rt_tags = mt_tags. ENDMETHOD. METHOD _get_1st_child_commit. DATA: lt_1stchild_commits TYPE zif_abapgit_definitions=>ty_commit_tt, ls_parent LIKE LINE OF it_commit_sha1s, lt_commit_sha1s LIKE it_commit_sha1s. FIELD-SYMBOLS: <ls_child_commit> TYPE zif_abapgit_definitions=>ty_commit. CLEAR: es_1st_commit. * get all reachable next commits lt_commit_sha1s = it_commit_sha1s. LOOP AT ct_commits ASSIGNING <ls_child_commit> WHERE parent1 IN lt_commit_sha1s OR parent2 IN lt_commit_sha1s. INSERT <ls_child_commit> INTO TABLE lt_1stchild_commits. ENDLOOP. * return oldest one SORT lt_1stchild_commits BY time ASCENDING. READ TABLE lt_1stchild_commits INTO es_1st_commit INDEX 1. * remove from available commits DELETE ct_commits WHERE sha1 = es_1st_commit-sha1. * set relevant parent commit sha1s IF lines( lt_1stchild_commits ) = 1. CLEAR et_commit_sha1s. ELSE. et_commit_sha1s = it_commit_sha1s. ENDIF. ls_parent-sign = 'I'. ls_parent-option = 'EQ'. ls_parent-low = es_1st_commit-sha1. INSERT ls_parent INTO TABLE et_commit_sha1s. ENDMETHOD. METHOD _reverse_sort_order. DATA: lt_commits TYPE zif_abapgit_definitions=>ty_commit_tt. FIELD-SYMBOLS: <ls_commit> TYPE zif_abapgit_definitions=>ty_commit. LOOP AT ct_commits ASSIGNING <ls_commit>. INSERT <ls_commit> INTO lt_commits INDEX 1. ENDLOOP. ct_commits = lt_commits. FREE lt_commits. ENDMETHOD. METHOD _sort_commits. DATA: lt_sorted_commits TYPE zif_abapgit_definitions=>ty_commit_tt, ls_next_commit TYPE zif_abapgit_definitions=>ty_commit, lt_parents TYPE tyt_commit_sha1_range, ls_parent LIKE LINE OF lt_parents. FIELD-SYMBOLS: <ls_initial_commit> TYPE zif_abapgit_definitions=>ty_commit. * find initial commit READ TABLE ct_commits ASSIGNING <ls_initial_commit> WITH KEY parent1 = space. IF sy-subrc = 0. ls_parent-sign = 'I'. ls_parent-option = 'EQ'. ls_parent-low = <ls_initial_commit>-sha1. INSERT ls_parent INTO TABLE lt_parents. * first commit INSERT <ls_initial_commit> INTO TABLE lt_sorted_commits. * remove from available commits DELETE ct_commits WHERE sha1 = <ls_initial_commit>-sha1. DO. _get_1st_child_commit( EXPORTING it_commit_sha1s = lt_parents IMPORTING et_commit_sha1s = lt_parents es_1st_commit = ls_next_commit CHANGING ct_commits = ct_commits ). IF ls_next_commit IS INITIAL. EXIT. "DO ENDIF. INSERT ls_next_commit INTO TABLE lt_sorted_commits. ENDDO. ENDIF. ct_commits = lt_sorted_commits. ENDMETHOD. ENDCLASS.
[ 31631, 1976, 565, 62, 397, 499, 18300, 62, 1671, 3702, 62, 2502, 1177, 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, 628, 220, 220, 220, 23255, 37, 2246, 1546, 1976, 361, 62, 397, 499, 18300, 62, 1671, 3702, 62, 2502, 1177, 764, 198, 220, 220, 220, 7102, 2257, 1565, 4694, 269, 62, 2934, 33342, 62, 1671, 3702, 62, 3672, 62, 40290, 41876, 4731, 26173, 8924, 705, 834, 7206, 28882, 1961, 62, 11473, 1565, 3398, 62, 6, 22492, 15285, 62, 32541, 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, 33245, 62, 260, 7501, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 260, 7501, 62, 25119, 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, 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, 83, 62, 41509, 62, 26270, 16, 62, 9521, 41876, 371, 27746, 3963, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 26270, 16, 764, 628, 220, 220, 220, 42865, 45079, 62, 1671, 12140, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 18300, 62, 1671, 3702, 62, 4868, 62, 926, 764, 198, 220, 220, 220, 42865, 45079, 62, 9503, 896, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 41509, 62, 926, 764, 198, 220, 220, 220, 42865, 45079, 62, 31499, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 18300, 62, 12985, 62, 4868, 62, 926, 764, 628, 220, 220, 220, 337, 36252, 50, 27413, 62, 32538, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 452, 62, 3672, 220, 220, 220, 41876, 4731, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 310, 62, 29510, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 41509, 62, 926, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 310, 62, 9503, 896, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 41509, 62, 926, 764, 198, 220, 220, 220, 42715, 12, 49273, 50, 21136, 62, 9503, 896, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 48205, 220, 220, 220, 220, 220, 220, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 48205, 62, 926, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 9503, 896, 8, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 41509, 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, 21136, 62, 34574, 515, 62, 31499, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 48205, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 48205, 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, 5004, 62, 1671, 3702, 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, 5004, 62, 647, 3212, 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, 13040, 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, 651, 62, 18300, 62, 48205, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 952, 62, 260, 7501, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 260, 7501, 62, 25119, 198, 220, 220, 220, 220, 220, 30826, 4261, 15871, 198, 220, 220, 220, 220, 220, 220, 220, 26173, 8924, 7, 17034, 62, 48205, 8, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 48205, 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, 5004, 62, 31499, 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, 4808, 30619, 62, 9503, 896, 198, 220, 220, 220, 220, 220, 5870, 15567, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 310, 62, 9503, 896, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 41509, 62, 926, 764, 198, 220, 220, 220, 337, 36252, 50, 4808, 1136, 62, 16, 301, 62, 9410, 62, 41509, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 5145, 270, 62, 41509, 62, 26270, 16, 82, 41876, 1259, 83, 62, 41509, 62, 26270, 16, 62, 9521, 198, 220, 220, 220, 220, 220, 7788, 15490, 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,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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 ltcl_diff DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. DATA: mt_new TYPE TABLE OF string, mt_old TYPE TABLE OF string, mt_expected TYPE zif_abapgit_definitions=>ty_diffs_tt, ms_expected LIKE LINE OF mt_expected. METHODS: setup. METHODS: test. METHODS: diff01 FOR TESTING, diff02 FOR TESTING, diff03 FOR TESTING, diff04 FOR TESTING, diff05 FOR TESTING, diff06 FOR TESTING. ENDCLASS. "ltcl_Diff CLASS ltcl_diff IMPLEMENTATION. DEFINE _new. APPEND &1 TO mt_new. END-OF-DEFINITION. DEFINE _old. APPEND &1 TO mt_old. END-OF-DEFINITION. DEFINE _expected. CLEAR ms_expected. ms_expected-new_num = &1. ms_expected-new = &2. ms_expected-result = &3. ms_expected-old_num = &4. ms_expected-old = &5. APPEND ms_expected TO mt_expected. END-OF-DEFINITION. METHOD setup. CLEAR mt_new. CLEAR mt_old. CLEAR mt_expected. ENDMETHOD. "setup METHOD test. DATA: lv_new TYPE string, lv_xnew TYPE xstring, lv_old TYPE string, lv_xold TYPE xstring, lo_diff TYPE REF TO zcl_abapgit_diff, lt_diff TYPE zif_abapgit_definitions=>ty_diffs_tt. FIELD-SYMBOLS: <ls_diff> LIKE LINE OF lt_diff. CONCATENATE LINES OF mt_new INTO lv_new SEPARATED BY zif_abapgit_definitions=>gc_newline. CONCATENATE LINES OF mt_old INTO lv_old SEPARATED BY zif_abapgit_definitions=>gc_newline. lv_xnew = zcl_abapgit_convert=>string_to_xstring_utf8( lv_new ). lv_xold = zcl_abapgit_convert=>string_to_xstring_utf8( lv_old ). CREATE OBJECT lo_diff EXPORTING iv_new = lv_xnew iv_old = lv_xold. lt_diff = lo_diff->get( ). LOOP AT lt_diff ASSIGNING <ls_diff>. CLEAR <ls_diff>-short. ENDLOOP. cl_abap_unit_assert=>assert_equals( act = lt_diff exp = mt_expected ). ENDMETHOD. "test METHOD diff01. * insert _new 'A'. " " NEW " STATUS " OLD _expected 1 'A' zif_abapgit_definitions=>c_diff-insert '' ''. test( ). ENDMETHOD. "diff01 METHOD diff02. * identical _new 'A'. _old 'A'. " " NEW " STATUS " OLD _expected 1 'A' '' 1 'A'. test( ). ENDMETHOD. "diff02 METHOD diff03. * delete _old 'A'. " " NEW " STATUS " OLD _expected '' '' zif_abapgit_definitions=>c_diff-delete 1 'A'. test( ). ENDMETHOD. "diff03 METHOD diff04. * update _new 'A+'. _old 'A'. " " NEW " STATUS " OLD _expected 1 'A+' zif_abapgit_definitions=>c_diff-update 1 'A'. test( ). ENDMETHOD. "diff04 METHOD diff05. * identical _new 'A'. _new 'B'. _old 'A'. _old 'B'. " " NEW " STATUS " OLD _expected 1 'A' '' 1 'A'. _expected 2 'B' '' 2 'B'. test( ). ENDMETHOD. "diff05 METHOD diff06. _new 'A'. _new 'B'. _new 'inserted'. _new 'C'. _new 'D update'. _old 'A'. _old 'B'. _old 'C'. _old 'D'. " " NEW " STATUS " OLD _expected 1 'A' '' 1 'A'. _expected 2 'B' '' 2 'B'. _expected 3 'inserted' zif_abapgit_definitions=>c_diff-insert '' ''. _expected 4 'C' '' 3 'C'. _expected 5 'D update' zif_abapgit_definitions=>c_diff-update 4 'D'. test( ). ENDMETHOD. "diff06 ENDCLASS.
[ 198, 31631, 300, 83, 565, 62, 26069, 5550, 20032, 17941, 7473, 43001, 2751, 198, 220, 360, 4261, 6234, 6006, 9863, 198, 220, 45698, 42, 49277, 43638, 5805, 7597, 13, 628, 220, 4810, 3824, 6158, 44513, 13, 198, 220, 220, 220, 42865, 25, 45079, 62, 3605, 220, 220, 220, 220, 220, 41876, 43679, 3963, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 727, 220, 220, 220, 220, 220, 41876, 43679, 3963, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 40319, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 67, 10203, 62, 926, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13845, 62, 40319, 34178, 48920, 3963, 45079, 62, 40319, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 9058, 13, 198, 220, 220, 220, 337, 36252, 50, 25, 1332, 13, 628, 220, 220, 220, 337, 36252, 50, 25, 198, 220, 220, 220, 220, 220, 814, 486, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2999, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 3070, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 3023, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 2713, 7473, 43001, 2751, 11, 198, 220, 220, 220, 220, 220, 814, 3312, 7473, 43001, 2751, 13, 198, 198, 10619, 31631, 13, 220, 220, 220, 220, 220, 220, 366, 2528, 565, 62, 28813, 628, 198, 31631, 300, 83, 565, 62, 26069, 30023, 2538, 10979, 6234, 13, 628, 220, 23449, 8881, 4808, 3605, 13, 198, 220, 220, 220, 43504, 10619, 1222, 16, 5390, 45079, 62, 3605, 13, 198, 220, 23578, 12, 19238, 12, 7206, 20032, 17941, 13, 628, 220, 23449, 8881, 4808, 727, 13, 198, 220, 220, 220, 43504, 10619, 1222, 16, 5390, 45079, 62, 727, 13, 198, 220, 23578, 12, 19238, 12, 7206, 20032, 17941, 13, 628, 220, 23449, 8881, 4808, 40319, 13, 198, 220, 220, 220, 30301, 1503, 13845, 62, 40319, 13, 198, 220, 220, 220, 13845, 62, 40319, 12, 3605, 62, 22510, 796, 1222, 16, 13, 198, 220, 220, 220, 13845, 62, 40319, 12, 3605, 220, 220, 220, 220, 796, 1222, 17, 13, 198, 220, 220, 220, 13845, 62, 40319, 12, 20274, 220, 796, 1222, 18, 13, 198, 220, 220, 220, 13845, 62, 40319, 12, 727, 62, 22510, 796, 1222, 19, 13, 198, 220, 220, 220, 13845, 62, 40319, 12, 727, 220, 220, 220, 220, 796, 1222, 20, 13, 198, 220, 220, 220, 43504, 10619, 13845, 62, 40319, 5390, 45079, 62, 40319, 13, 198, 220, 23578, 12, 19238, 12, 7206, 20032, 17941, 13, 628, 220, 337, 36252, 9058, 13, 198, 220, 220, 220, 30301, 1503, 45079, 62, 3605, 13, 198, 220, 220, 220, 30301, 1503, 45079, 62, 727, 13, 198, 220, 220, 220, 30301, 1503, 45079, 62, 40319, 13, 198, 220, 23578, 49273, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 40406, 628, 220, 337, 36252, 1332, 13, 628, 220, 220, 220, 42865, 25, 300, 85, 62, 3605, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 87, 3605, 41876, 2124, 8841, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 727, 220, 41876, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 85, 62, 87, 727, 41876, 2124, 8841, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2376, 62, 26069, 41876, 4526, 37, 5390, 1976, 565, 62, 397, 499, 18300, 62, 26069, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 83, 62, 26069, 41876, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 774, 62, 67, 10203, 62, 926, 13, 628, 220, 220, 220, 18930, 24639, 12, 23060, 10744, 3535, 50, 25, 1279, 7278, 62, 26069, 29, 34178, 48920, 3963, 300, 83, 62, 26069, 13, 628, 198, 220, 220, 220, 39962, 1404, 1677, 6158, 43277, 1546, 3963, 45079, 62, 3605, 39319, 300, 85, 62, 3605, 7946, 27082, 11617, 11050, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 36484, 62, 3605, 1370, 13, 198, 220, 220, 220, 39962, 1404, 1677, 6158, 43277, 1546, 3963, 45079, 62, 727, 39319, 300, 85, 62, 727, 7946, 27082, 11617, 11050, 1976, 361, 62, 397, 499, 18300, 62, 4299, 50101, 14804, 36484, 62, 3605, 1370, 13, 628, 220, 220, 220, 300, 85, 62, 87, 3605, 796, 1976, 565, 62, 397, 499, 18300, 62, 1102, 1851, 14804, 8841, 62, 1462, 62, 87, 8841, 62, 40477, 23, 7, 300, 85, 62, 3605, 6739, 198, 220, 220, 220, 300, 85, 62, 87, 727, 796, 1976, 565, 62, 397, 499, 18300, 62, 1102, 1851, 14804, 8841, 62, 1462, 62, 87, 8841, 62, 40477, 23, 7, 300, 85, 62, 727, 6739, 628, 220, 220, 220, 29244, 6158, 25334, 23680, 2376, 62, 26069, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 3605, 796, 300, 85, 62, 87, 3605, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 62, 727, 796, 300, 85, 62, 87, 727, 13, 628, 220, 220, 220, 300, 83, 62, 26069, 796, 2376, 62, 26069, 3784, 1136, 7, 6739, 628, 220, 220, 220, 17579, 3185, 5161, 300, 83, 62, 26069, 24994, 3528, 15871, 1279, 7278, 62, 26069, 28401, 198, 220, 220, 220, 220, 220, 30301, 1503, 1279, 7278, 62, 26069, 29, 12, 19509, 13, 198, 220, 220, 220, 23578, 21982, 3185, 13, 628, 220, 220, 220, 537, 62, 397, 499, 62, 20850, 62, 30493, 14804, 30493, 62, 4853, 874, 7, 719, 796, 300, 83, 62, 26069, 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, 1033, 796, 45079, 62, 40319, 6739, 628, 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, 9288, 628, 220, 337, 36252, 814, 486, 13, 198 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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 ]
*&---------------------------------------------------------------------* *& Report ZBOOK_TEST_EXCEPTIONS *&---------------------------------------------------------------------* * * * _____ _ _____ * * |_ _| | | /\ / ____| * * | | _ ____ _____ _ __| | _____ _ __ / \ | | __ * * |_____|_| |_|\_/\_/ \___|_| |_|\_\___|_| |_| /_/ \_\_____| * * * * einfach Inwerken. * * * *&---------------------------------------------------------------------* REPORT zbook_test_exceptions. DATA exc_stat TYPE REF TO cx_static_check. DATA exc_dyn TYPE REF TO cx_dynamic_check. DATA exc_book TYPE REF TO zcx_book_exception. *TRY . * RAISE EXCEPTION TYPE zcx_book_exception. * CATCH cx_dynamic_check INTO exc_dyn. * WRITE: / 'Dynamic'. * CATCH zcx_book_exception INTO exc_stat. * WRITE / 'Book'. * CATCH cx_static_check INTO exc_stat. * WRITE: / 'Static'. * *ENDTRY. * *TRY . * TRY . * CATCH zcx_book_exception. * ENDTRY. * CATCH cx_static_check. *ENDTRY. DATA n TYPE i. DATA exc_test TYPE REF TO zcl_book_exception_test. TRY . TRY . n = 1 / 0. " !!! CATCH cx_static_check. CLEANUP. " Cleanup-Block zuerst ENDTRY. CATCH cx_sy_arithmetic_error INTO exc_dyn. " Catch-Block danach ENDTRY. WRITE: / 'Resumable Exceptions'. SKIP. WRITE: / '1. RETRY'. n = 0. CREATE OBJECT exc_test. TRY. exc_test->throw_exception( ). CATCH zcx_book_exception. n = n + 1. WRITE: / n. IF n < 5. RETRY. ENDIF. ENDTRY. SKIP. WRITE: / '2. RESUME'. n = 0. CREATE OBJECT exc_test. TRY. exc_test->throw_exception( ). CATCH BEFORE UNWIND zcx_book_exception. n = n + 1. WRITE: / n. IF n < 5. RESUME. ENDIF. ENDTRY.
[ 9, 5, 10097, 30934, 9, 198, 9, 5, 6358, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1168, 39453, 62, 51, 6465, 62, 6369, 42006, 11053, 198, 9, 5, 10097, 30934, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 220, 220, 220, 220, 220, 29343, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29343, 220, 220, 220, 220, 1635, 198, 9, 220, 220, 220, 930, 62, 220, 220, 4808, 91, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 930, 930, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1220, 59, 220, 220, 1220, 220, 1427, 91, 220, 220, 220, 1635, 198, 9, 220, 220, 220, 220, 220, 930, 930, 220, 4808, 220, 1427, 220, 220, 220, 220, 220, 220, 29343, 4808, 11593, 91, 930, 220, 29343, 4808, 11593, 220, 220, 220, 220, 220, 1220, 220, 3467, 930, 930, 220, 11593, 220, 220, 220, 220, 1635, 198, 9, 220, 220, 220, 930, 29343, 91, 62, 91, 930, 62, 91, 59, 62, 14, 59, 62, 14, 3467, 17569, 91, 62, 91, 220, 930, 62, 91, 59, 62, 59, 17569, 91, 62, 91, 930, 62, 91, 1220, 62, 14, 220, 220, 220, 3467, 62, 59, 29343, 91, 220, 220, 220, 1635, 198, 9, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 304, 10745, 620, 554, 15448, 3464, 13, 220, 220, 1635, 198, 9, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 198, 9, 5, 10097, 30934, 9, 198, 198, 2200, 15490, 1976, 2070, 62, 9288, 62, 1069, 11755, 13, 198, 198, 26947, 2859, 62, 14269, 220, 220, 41876, 4526, 37, 5390, 43213, 62, 12708, 62, 9122, 13, 198, 26947, 2859, 62, 67, 2047, 220, 220, 220, 41876, 4526, 37, 5390, 43213, 62, 67, 28995, 62, 9122, 13, 198, 26947, 2859, 62, 2070, 220, 220, 41876, 4526, 37, 5390, 1976, 66, 87, 62, 2070, 62, 1069, 4516, 13, 198, 198, 9, 40405, 764, 198, 9, 220, 220, 220, 17926, 24352, 7788, 42006, 2849, 41876, 1976, 66, 87, 62, 2070, 62, 1069, 4516, 13, 198, 9, 220, 327, 11417, 43213, 62, 67, 28995, 62, 9122, 39319, 2859, 62, 67, 2047, 13, 198, 9, 220, 220, 220, 44423, 25, 1220, 705, 44090, 4458, 198, 9, 220, 327, 11417, 1976, 66, 87, 62, 2070, 62, 1069, 4516, 39319, 2859, 62, 14269, 13, 198, 9, 220, 220, 220, 44423, 1220, 705, 10482, 4458, 198, 9, 220, 327, 11417, 43213, 62, 12708, 62, 9122, 39319, 2859, 62, 14269, 13, 198, 9, 220, 220, 220, 44423, 25, 1220, 705, 45442, 4458, 198, 9, 198, 9, 10619, 40405, 13, 198, 9, 198, 9, 40405, 764, 198, 9, 220, 220, 220, 7579, 56, 764, 198, 9, 220, 220, 220, 220, 220, 327, 11417, 1976, 66, 87, 62, 2070, 62, 1069, 4516, 13, 198, 9, 220, 220, 220, 23578, 40405, 13, 198, 9, 220, 327, 11417, 43213, 62, 12708, 62, 9122, 13, 198, 9, 10619, 40405, 13, 198, 198, 26947, 299, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41876, 1312, 13, 198, 26947, 2859, 62, 9288, 220, 220, 41876, 4526, 37, 5390, 1976, 565, 62, 2070, 62, 1069, 4516, 62, 9288, 13, 198, 40405, 764, 198, 220, 220, 220, 7579, 56, 764, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 352, 1220, 657, 13, 366, 220, 10185, 198, 220, 220, 220, 220, 220, 327, 11417, 43213, 62, 12708, 62, 9122, 13, 198, 220, 220, 220, 220, 220, 30301, 1565, 8577, 13, 198, 220, 220, 220, 220, 220, 220, 220, 366, 5985, 929, 12, 12235, 1976, 15573, 301, 198, 220, 220, 220, 23578, 40405, 13, 198, 220, 327, 11417, 43213, 62, 1837, 62, 283, 29848, 62, 18224, 39319, 2859, 62, 67, 2047, 13, 198, 220, 220, 220, 366, 25750, 12, 12235, 46078, 620, 198, 10619, 40405, 13, 628, 198, 18564, 12709, 25, 1220, 705, 4965, 388, 540, 1475, 11755, 4458, 198, 18831, 4061, 13, 198, 18564, 12709, 25, 1220, 705, 16, 13, 30826, 18276, 4458, 198, 77, 796, 657, 13, 198, 43387, 6158, 25334, 23680, 2859, 62, 9288, 13, 198, 40405, 13, 198, 220, 220, 220, 2859, 62, 9288, 3784, 16939, 62, 1069, 4516, 7, 6739, 198, 220, 327, 11417, 1976, 66, 87, 62, 2070, 62, 1069, 4516, 13, 198, 220, 220, 220, 299, 796, 299, 1343, 352, 13, 198, 220, 220, 220, 44423, 25, 1220, 299, 13, 198, 220, 220, 220, 16876, 299, 1279, 642 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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( EXPORTING input = source IMPORTING data = result ). ENDMETHOD. ENDCLASS. *********************************************** CLASS lcl_out DEFINITION. PUBLIC SECTION. INTERFACES if_abap_conv_out. ENDCLASS. CLASS lcl_out IMPLEMENTATION. METHOD if_abap_conv_out~convert. DATA conv TYPE REF TO cl_abap_conv_out_ce. conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ). conv->convert( EXPORTING data = source IMPORTING buffer = result ). ENDMETHOD. ENDCLASS.
[ 31631, 300, 565, 62, 259, 5550, 20032, 17941, 13, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 23255, 37, 2246, 1546, 611, 62, 397, 499, 62, 42946, 62, 259, 13, 198, 10619, 31631, 13, 198, 198, 31631, 300, 565, 62, 259, 30023, 2538, 10979, 6234, 13, 198, 220, 337, 36252, 611, 62, 397, 499, 62, 42946, 62, 259, 93, 1102, 1851, 13, 198, 220, 220, 220, 42865, 3063, 41876, 4526, 37, 5390, 537, 62, 397, 499, 62, 42946, 62, 259, 62, 344, 13, 198, 220, 220, 220, 3063, 796, 537, 62, 397, 499, 62, 42946, 62, 259, 62, 344, 14804, 17953, 7, 21004, 796, 705, 48504, 12, 23, 6, 6739, 198, 220, 220, 220, 3063, 3784, 1102, 1851, 7, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 220, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 796, 2723, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 220, 796, 1255, 6739, 198, 220, 23578, 49273, 13, 198, 10619, 31631, 13, 198, 198, 17174, 46068, 8162, 198, 198, 31631, 300, 565, 62, 448, 5550, 20032, 17941, 13, 198, 220, 44731, 44513, 13, 198, 220, 220, 220, 23255, 37, 2246, 1546, 611, 62, 397, 499, 62, 42946, 62, 448, 13, 198, 10619, 31631, 13, 198, 198, 31631, 300, 565, 62, 448, 30023, 2538, 10979, 6234, 13, 198, 220, 337, 36252, 611, 62, 397, 499, 62, 42946, 62, 448, 93, 1102, 1851, 13, 198, 220, 220, 220, 42865, 3063, 41876, 4526, 37, 5390, 537, 62, 397, 499, 62, 42946, 62, 448, 62, 344, 13, 198, 220, 220, 220, 3063, 796, 537, 62, 397, 499, 62, 42946, 62, 448, 62, 344, 14804, 17953, 7, 21004, 796, 705, 48504, 12, 23, 6, 6739, 198, 220, 220, 220, 3063, 3784, 1102, 1851, 7, 198, 220, 220, 220, 220, 220, 7788, 15490, 2751, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 220, 220, 796, 2723, 198, 220, 220, 220, 220, 220, 30023, 9863, 2751, 220, 198, 220, 220, 220, 220, 220, 220, 220, 11876, 796, 1255, 6739, 198, 220, 23578, 49273, 13, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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