hexsha
stringlengths 40
40
| size
int64 16
758k
| ext
stringclasses 1
value | lang
stringclasses 1
value | max_stars_repo_path
stringlengths 6
146
| max_stars_repo_name
stringlengths 8
73
| max_stars_repo_head_hexsha
stringlengths 40
40
| max_stars_repo_licenses
sequencelengths 1
2
| max_stars_count
int64 1
17.3k
⌀ | max_stars_repo_stars_event_min_datetime
stringclasses 530
values | max_stars_repo_stars_event_max_datetime
stringclasses 529
values | max_issues_repo_path
stringlengths 6
146
| max_issues_repo_name
stringlengths 8
73
| max_issues_repo_head_hexsha
stringlengths 40
40
| max_issues_repo_licenses
sequencelengths 1
2
| max_issues_count
int64 1
3.24k
⌀ | max_issues_repo_issues_event_min_datetime
stringclasses 350
values | max_issues_repo_issues_event_max_datetime
stringclasses 350
values | max_forks_repo_path
stringlengths 6
146
| max_forks_repo_name
stringlengths 8
73
| max_forks_repo_head_hexsha
stringlengths 40
40
| max_forks_repo_licenses
sequencelengths 1
2
| max_forks_count
int64 1
4.6k
⌀ | max_forks_repo_forks_event_min_datetime
stringclasses 388
values | max_forks_repo_forks_event_max_datetime
stringclasses 388
values | content
stringlengths 16
758k
| avg_line_length
float64 4.13
40.4k
| max_line_length
int64 9
40.4k
| alphanum_fraction
float64 0.04
0.97
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f702dd98900e80f27b0ff4729f38a8f72faf6284 | 300 | abap | ABAP | zis_example.prog.abap | sbcgua/abap_include_assembler | 5660773df238668bf654ec322dc46fe8c0757dbb | [
"MIT"
] | 3 | 2016-03-20T09:52:55.000Z | 2020-05-18T23:30:45.000Z | zis_example.prog.abap | sbcgua/abap_include_assembler | 5660773df238668bf654ec322dc46fe8c0757dbb | [
"MIT"
] | 6 | 2016-03-20T10:14:01.000Z | 2020-08-27T16:48:13.000Z | zis_example.prog.abap | sbcgua/abap_include_assembler | 5660773df238668bf654ec322dc46fe8c0757dbb | [
"MIT"
] | 1 | 2020-08-27T14:14:59.000Z | 2020-08-27T14:14:59.000Z | *&---------------------------------------------------------------------*
*& Report ZIS_EXAMPLE
*&---------------------------------------------------------------------*
report zis_example.
include zis_example_top.
include zis_example_f01.
start-of-selection.
include = 'X'.
perform perform_write.
| 23.076923 | 72 | 0.406667 |
f7059ca25a13836de140134550b96c66d4d503dc | 2,640 | abap | ABAP | sap-data-retrieval/src/test/resources/sap/ZCAFM_CUSTOMER_DELETE.abap | mulesoft-consulting/anypoint-examples | 20f17b2f162c7a81787aafddd54b0ba196edd8d7 | [
"Apache-2.0"
] | 1 | 2019-03-08T16:08:23.000Z | 2019-03-08T16:08:23.000Z | sap-data-retrieval/src/test/resources/sap/ZCAFM_CUSTOMER_DELETE.abap | mulesoft-consulting/anypoint-examples | 20f17b2f162c7a81787aafddd54b0ba196edd8d7 | [
"Apache-2.0"
] | null | null | null | sap-data-retrieval/src/test/resources/sap/ZCAFM_CUSTOMER_DELETE.abap | mulesoft-consulting/anypoint-examples | 20f17b2f162c7a81787aafddd54b0ba196edd8d7 | [
"Apache-2.0"
] | 1 | 2019-03-08T16:08:28.000Z | 2019-03-08T16:08:28.000Z | FUNCTION zcafm_customer_delete.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(PI_CUSTOMER) TYPE KNA1-KUNNR
*" VALUE(PI_TEST) TYPE CHAR1
*" EXPORTING
*" VALUE(SE_RETURN) TYPE BAPIRET2
*"----------------------------------------------------------------------
*----------------------------------------------------------------------*
* Function Module ZCAFM_CUSTOMER_DELETE *
* *----------------------------------------------------------------------*
* * *
* * ID-Reference: MuleSoft templates *
* * *
* * This BAPI aims to set deletion flag for particular customer. If par. *
* * PI_TEST is provided no change is performed. *
* *----------------------------------------------------------------------*
* * Change Log: *
* * *
* * Who Date Text *
* * MMARUSKIN 03.07.2014 Init creation. *
* *----------------------------------------------------------------------*
* Global data declarations
CONSTANTS: lc_obj_task TYPE cmd_ei_object_task VALUE 'M', "M=Create/Change
lc_msg_cls TYPE sy-msgid VALUE 'ZMULESOFTINTEGRATION'.
DATA: ls_customer TYPE cmds_ei_extern,
lt_customers TYPE cmds_ei_main,
ls_mes_error TYPE cvis_message,
lv_par TYPE sy-msgv1.
*- Prepare data
ls_customer-header-object_instance-kunnr = pi_customer.
ls_customer-header-object_task = lc_obj_task.
ls_customer-central_data-central-data-loevm = 'X'.
ls_customer-central_data-central-datax-loevm = 'X'.
APPEND ls_customer TO lt_customers-customers.
lv_par = pi_customer.
*- Run change of material via standard functionality
CALL METHOD cmd_ei_api=>maintain_bapi
EXPORTING
iv_test_run = pi_test
iv_collect_messages = 'X'
is_master_data = lt_customers
IMPORTING
es_message_defective = ls_mes_error.
*- Error handling
IF ls_mes_error-is_error IS INITIAL AND pi_test IS INITIAL.
COMMIT WORK AND WAIT.
CALL FUNCTION 'BALW_BAPIRETURN_GET2' "okay: flag set!
EXPORTING
type = 'I'
cl = lc_msg_cls
number = 100
par1 = lv_par
parameter = ''
field = ''
IMPORTING
return = se_return.
ELSE.
ROLLBACK WORK. "#EC CI_ROLLBACK
CALL FUNCTION 'BALW_BAPIRETURN_GET2' "problem: flag NOT set!
EXPORTING
type = 'E'
cl = lc_msg_cls
number = 101
par1 = lv_par
parameter = ''
field = ''
IMPORTING
return = se_return.
ENDIF.
ENDFUNCTION. | 29.333333 | 76 | 0.524242 |
f706c5d249ab3a4ce3d3753967774b9920a31554 | 7,390 | abap | ABAP | src/fcat/zdemo_ain_cl25.prog.abap | fidley/ALVGridInNutschell | d3c95d7f31afbff001fff50edae0c2e09e51fe90 | [
"Apache-2.0"
] | 5 | 2019-07-08T11:40:25.000Z | 2021-10-02T12:26:06.000Z | src/fcat/zdemo_ain_cl25.prog.abap | fidley/ALVGridInNutschell | d3c95d7f31afbff001fff50edae0c2e09e51fe90 | [
"Apache-2.0"
] | null | null | null | src/fcat/zdemo_ain_cl25.prog.abap | fidley/ALVGridInNutschell | d3c95d7f31afbff001fff50edae0c2e09e51fe90 | [
"Apache-2.0"
] | 4 | 2020-03-21T12:44:33.000Z | 2021-09-27T08:43:38.000Z | *&---------------------------------------------------------------------*
*& Report zdemo_ain_cl25
*&---------------------------------------------------------------------*
*& This is the demo program written for book:
*& ALV grid in nutshell by Łukasz Pęgiel
*&---------------------------------------------------------------------*
*&- 1st character ='C' if we're using custom colour or 'X' for default *
*&- 2nd character = colour code (from 0 to 7) *
*& 0 = background colour *
*& 1 = blue *
*& 2 = gray *
*& 3 = yellow *
*& 4 = blue/gray *
*& 5 = green *
*& 6 = red *
*& 7 = orange *
*&- 3rd character = intensified (0=off, 1=on) *
*&- 4th character = inverse display (0=off, 1=on) *
*&---------------------------------------------------------------------*
report zdemo_ain_cl25.
include zdemo_ain_include_screen.
start-of-selection.
types: begin of t_data,
no_emphasize type spfli-carrid,
standard type spfli-carrid,
c100 type spfli-carrid,
c101 type spfli-carrid,
c110 type spfli-carrid,
c111 type spfli-carrid,
c200 type spfli-carrid,
c201 type spfli-carrid,
c210 type spfli-carrid,
c211 type spfli-carrid,
c300 type spfli-carrid,
c301 type spfli-carrid,
c310 type spfli-carrid,
c311 type spfli-carrid,
c400 type spfli-carrid,
c401 type spfli-carrid,
c410 type spfli-carrid,
c411 type spfli-carrid,
c500 type spfli-carrid,
c501 type spfli-carrid,
c510 type spfli-carrid,
c511 type spfli-carrid,
c600 type spfli-carrid,
c601 type spfli-carrid,
c610 type spfli-carrid,
c611 type spfli-carrid,
c700 type spfli-carrid,
c701 type spfli-carrid,
c710 type spfli-carrid,
c711 type spfli-carrid,
c000 type spfli-carrid,
c001 type spfli-carrid,
c010 type spfli-carrid,
c011 type spfli-carrid,
end of t_data.
data flights type standard table of t_data.
select carrid as no_emphasize
up to 50 rows from spfli
into corresponding fields of table @flights.
loop at flights assigning field-symbol(<fl>).
<fl>-standard = <fl>-c100 = <fl>-c101 = <fl>-c110 = <fl>-c111 =
<fl>-c200 = <fl>-c201 = <fl>-c210 = <fl>-c211 =
<fl>-c300 = <fl>-c301 = <fl>-c310 = <fl>-c311 =
<fl>-c400 = <fl>-c401 = <fl>-c410 = <fl>-c411 =
<fl>-c500 = <fl>-c501 = <fl>-c510 = <fl>-c511 =
<fl>-c600 = <fl>-c601 = <fl>-c610 = <fl>-c611 =
<fl>-c700 = <fl>-c701 = <fl>-c710 = <fl>-c711 =
<fl>-c000 = <fl>-c001 = <fl>-c010 = <fl>-c011 = <fl>-no_emphasize.
endloop.
data(grid) = new cl_gui_alv_grid(
i_parent = new cl_gui_custom_container( container_name = 'CC' )
).
data(fcat) = value lvc_t_fcat(
( fieldname = 'NO_EMPHASIZE' reptext = 'NO_EMPHASIZE' )
( fieldname = 'STANDARD' emphasize = abap_true reptext = 'STANDARD' )
( fieldname = 'C100' emphasize = 'C100' reptext = 'C100')
( fieldname = 'C101' emphasize = 'C101' reptext = 'C101')
( fieldname = 'C110' emphasize = 'C110' reptext = 'C110')
( fieldname = 'C111' emphasize = 'C111' reptext = 'C111')
( fieldname = 'C200' emphasize = 'C200' reptext = 'C200')
( fieldname = 'C201' emphasize = 'C201' reptext = 'C201')
( fieldname = 'C210' emphasize = 'C210' reptext = 'C210')
( fieldname = 'C211' emphasize = 'C211' reptext = 'C211')
( fieldname = 'C300' emphasize = 'C300' reptext = 'C300')
( fieldname = 'C301' emphasize = 'C301' reptext = 'C301')
( fieldname = 'C310' emphasize = 'C310' reptext = 'C310')
( fieldname = 'C311' emphasize = 'C311' reptext = 'C311')
( fieldname = 'C400' emphasize = 'C400' reptext = 'C400')
( fieldname = 'C401' emphasize = 'C401' reptext = 'C401')
( fieldname = 'C410' emphasize = 'C410' reptext = 'C410')
( fieldname = 'C411' emphasize = 'C411' reptext = 'C411')
( fieldname = 'C500' emphasize = 'C500' reptext = 'C500')
( fieldname = 'C501' emphasize = 'C501' reptext = 'C501')
( fieldname = 'C510' emphasize = 'C510' reptext = 'C510')
( fieldname = 'C511' emphasize = 'C511' reptext = 'C511')
( fieldname = 'C600' emphasize = 'C600' reptext = 'C600')
( fieldname = 'C601' emphasize = 'C601' reptext = 'C601')
( fieldname = 'C610' emphasize = 'C610' reptext = 'C610')
( fieldname = 'C611' emphasize = 'C611' reptext = 'C611')
( fieldname = 'C700' emphasize = 'C700' reptext = 'C700')
( fieldname = 'C701' emphasize = 'C701' reptext = 'C701')
( fieldname = 'C710' emphasize = 'C710' reptext = 'C710')
( fieldname = 'C711' emphasize = 'C711' reptext = 'C711')
( fieldname = 'C000' emphasize = 'C000' reptext = 'C000')
( fieldname = 'C001' emphasize = 'C001' reptext = 'C001')
( fieldname = 'C010' emphasize = 'C010' reptext = 'C010')
( fieldname = 'C011' emphasize = 'C011' reptext = 'C011')
).
grid->set_table_for_first_display(
exporting
is_layout = value #( col_opt = abap_true )
changing
it_fieldcatalog = fcat
it_outtab = flights
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4
).
if sy-subrc eq 0.
call screen 0100.
endif.
| 55.149254 | 102 | 0.407307 |
f707aa256126ec981696b25d4cbe9173d6a74a1f | 3,452 | abap | ABAP | src/#mbtools#cl_ajson_filter_lib.clas.locals_imp.abap | Marc-Bernard-Tools/Mirror-AJSON | 4bc1b5b661a6e0197770da766293d9434c75e559 | [
"MIT"
] | null | null | null | src/#mbtools#cl_ajson_filter_lib.clas.locals_imp.abap | Marc-Bernard-Tools/Mirror-AJSON | 4bc1b5b661a6e0197770da766293d9434c75e559 | [
"MIT"
] | 5 | 2021-07-12T19:07:01.000Z | 2021-09-08T00:29:05.000Z | src/#mbtools#cl_ajson_filter_lib.clas.locals_imp.abap | Marc-Bernard-Tools/Mirror-AJSON | 4bc1b5b661a6e0197770da766293d9434c75e559 | [
"MIT"
] | 1 | 2022-03-21T23:27:43.000Z | 2022-03-21T23:27:43.000Z | **********************************************************************
* FILTER EMPTY VALUES
**********************************************************************
CLASS lcl_empty_filter DEFINITION FINAL.
PUBLIC SECTION.
INTERFACES /mbtools/if_ajson_filter.
ENDCLASS.
CLASS lcl_empty_filter IMPLEMENTATION.
METHOD /mbtools/if_ajson_filter~keep_node.
rv_keep = boolc(
( iv_visit = /mbtools/if_ajson_filter=>visit_type-value AND is_node-value IS NOT INITIAL ) OR
( iv_visit <> /mbtools/if_ajson_filter=>visit_type-value AND is_node-children > 0 ) ).
" children = 0 on open for initially empty nodes and on close for filtered ones
ENDMETHOD.
ENDCLASS.
**********************************************************************
* FILTER PREDEFINED PATHS
**********************************************************************
CLASS lcl_paths_filter DEFINITION FINAL.
PUBLIC SECTION.
INTERFACES /mbtools/if_ajson_filter.
METHODS constructor
IMPORTING
it_skip_paths TYPE string_table OPTIONAL
iv_skip_paths TYPE string OPTIONAL
RAISING
/mbtools/cx_ajson_error.
PRIVATE SECTION.
DATA mt_skip_paths TYPE HASHED TABLE OF string WITH UNIQUE KEY table_line.
ENDCLASS.
CLASS lcl_paths_filter IMPLEMENTATION.
METHOD /mbtools/if_ajson_filter~keep_node.
DATA lv_path TYPE string.
lv_path = is_node-path && is_node-name.
READ TABLE mt_skip_paths WITH KEY table_line = lv_path TRANSPORTING NO FIELDS.
rv_keep = boolc( sy-subrc <> 0 ).
ENDMETHOD.
METHOD constructor.
DATA lv_s TYPE string.
DATA lt_tab TYPE string_table.
FIELD-SYMBOLS <s> TYPE string.
IF boolc( iv_skip_paths IS INITIAL ) = boolc( it_skip_paths IS INITIAL ). " XOR
/mbtools/cx_ajson_error=>raise( 'no filter path specified' ).
ENDIF.
LOOP AT it_skip_paths INTO lv_s.
lv_s = to_lower( lv_s ).
APPEND lv_s TO lt_tab.
ENDLOOP.
IF iv_skip_paths IS NOT INITIAL.
SPLIT iv_skip_paths AT ',' INTO TABLE lt_tab.
LOOP AT lt_tab ASSIGNING <s>.
IF <s> IS INITIAL.
DELETE lt_tab INDEX sy-tabix.
CONTINUE.
ENDIF.
<s> = condense( to_lower( <s> ) ).
ENDLOOP.
ENDIF.
SORT lt_tab BY table_line.
DELETE ADJACENT DUPLICATES FROM lt_tab.
mt_skip_paths = lt_tab.
ENDMETHOD.
ENDCLASS.
**********************************************************************
* MULTI FILTER
**********************************************************************
CLASS lcl_and_filter DEFINITION FINAL.
PUBLIC SECTION.
INTERFACES /mbtools/if_ajson_filter.
METHODS constructor
IMPORTING
it_filters TYPE /mbtools/if_ajson_filter=>ty_filter_tab
RAISING
/mbtools/cx_ajson_error.
PRIVATE SECTION.
DATA mt_filters TYPE /mbtools/if_ajson_filter=>ty_filter_tab.
ENDCLASS.
CLASS lcl_and_filter IMPLEMENTATION.
METHOD /mbtools/if_ajson_filter~keep_node.
DATA li_filter LIKE LINE OF mt_filters.
rv_keep = abap_true.
LOOP AT mt_filters INTO li_filter.
rv_keep = li_filter->keep_node(
is_node = is_node
iv_visit = iv_visit ).
IF rv_keep = abap_false.
RETURN.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD constructor.
DATA li_filter LIKE LINE OF it_filters.
LOOP AT it_filters INTO li_filter WHERE table_line IS BOUND.
APPEND li_filter TO mt_filters.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| 26.553846 | 99 | 0.614716 |
f70ff1b7c91543804aad129c14175a625e0efafb | 130 | abap | ABAP | src/zexpimp_vx_gener_test_code.fugr.lzexpimp_vx_gener_test_codetop.abap | sandraros/export-import-vx | a818910f825f6a19105bb1f6ad3563e93a477c38 | [
"MIT"
] | 1 | 2021-07-18T19:47:43.000Z | 2021-07-18T19:47:43.000Z | src/zexpimp_vx_gener_test_code.fugr.lzexpimp_vx_gener_test_codetop.abap | sandraros/export-import-vx | a818910f825f6a19105bb1f6ad3563e93a477c38 | [
"MIT"
] | null | null | null | src/zexpimp_vx_gener_test_code.fugr.lzexpimp_vx_gener_test_codetop.abap | sandraros/export-import-vx | a818910f825f6a19105bb1f6ad3563e93a477c38 | [
"MIT"
] | null | null | null | FUNCTION-POOL ZEXPIMP_VX_GENER_TEST_CODE. "MESSAGE-ID ..
* INCLUDE LZEXPIMP_GENERATE_TEST_CODED... " Local class definition
| 32.5 | 69 | 0.784615 |
f716c8b0d82be34e9fbe78fecb464a6889c1dfc6 | 7,465 | abap | ABAP | src/objects/zcl_abapgit_object_ssst.clas.abap | sb-sap/abapGit | 8d1f1c312f5cf70b97fb6f00530be53a5e968a5b | [
"MIT"
] | null | null | null | src/objects/zcl_abapgit_object_ssst.clas.abap | sb-sap/abapGit | 8d1f1c312f5cf70b97fb6f00530be53a5e968a5b | [
"MIT"
] | null | null | null | src/objects/zcl_abapgit_object_ssst.clas.abap | sb-sap/abapGit | 8d1f1c312f5cf70b97fb6f00530be53a5e968a5b | [
"MIT"
] | null | null | null | CLASS zcl_abapgit_object_ssst DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
CONSTANTS: c_style_active TYPE tdactivate VALUE 'A'.
PRIVATE SECTION.
METHODS validate_font
IMPORTING iv_tdfamily TYPE tdfamily
RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_SSST IMPLEMENTATION.
METHOD validate_font.
DATA: lv_tdfamily TYPE tfo01-tdfamily.
SELECT SINGLE tdfamily FROM tfo01 INTO lv_tdfamily
WHERE tdfamily = iv_tdfamily.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Font family not found' ).
ENDIF.
ENDMETHOD. "validate_font
METHOD zif_abapgit_object~changed_by.
SELECT SINGLE lastuser FROM stxsadm INTO rv_user
WHERE stylename = ms_item-obj_name.
IF sy-subrc <> 0.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~compare_to_remote_version.
CREATE OBJECT ro_comparison_result TYPE zcl_abapgit_comparison_null.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_stylename TYPE tdssname.
lv_stylename = ms_item-obj_name.
CALL FUNCTION 'SSF_DELETE_STYLE'
EXPORTING
i_stylename = lv_stylename
i_with_dialog = abap_false
i_with_confirm_dialog = abap_false
EXCEPTIONS
no_name = 1
no_style = 2
style_locked = 3
cancelled = 4
no_access_permission = 5
illegal_language = 6
OTHERS = 7.
IF sy-subrc <> 0 AND sy-subrc <> 2.
zcx_abapgit_exception=>raise( 'error from SSF_DELETE_STYLE' ).
ENDIF.
ENDMETHOD. "delete
METHOD zif_abapgit_object~deserialize.
* see fm SSF_UPLOAD_STYLE
DATA: ls_header TYPE ssfcats,
ls_new_header TYPE ssfcats,
lt_paragraphs TYPE TABLE OF ssfparas,
lt_strings TYPE TABLE OF ssfstrings,
lt_tabstops TYPE TABLE OF stxstab.
FIELD-SYMBOLS: <lv_spras> TYPE spras.
io_xml->read( EXPORTING iv_name = 'HEADER'
CHANGING cg_data = ls_header ).
io_xml->read( EXPORTING iv_name = 'SSFPARAS'
CHANGING cg_data = lt_paragraphs ).
io_xml->read( EXPORTING iv_name = 'SSFSTRINGS'
CHANGING cg_data = lt_strings ).
io_xml->read( EXPORTING iv_name = 'STXSTAB'
CHANGING cg_data = lt_tabstops ).
validate_font( ls_header-tdfamily ).
CALL FUNCTION 'SSF_READ_STYLE' "Just load FG
EXPORTING
i_style_name = ls_header-stylename
i_style_active_flag = 'A'
EXCEPTIONS
OTHERS = 0.
SET PARAMETER ID 'EUK' FIELD iv_package.
ASSIGN ('(SAPLSTXBS)MASTER_LANGUAGE') TO <lv_spras>.
IF sy-subrc = 0.
<lv_spras> = ls_header-masterlang.
ENDIF.
CALL FUNCTION 'SSF_SAVE_STYLE'
EXPORTING
i_header = ls_header
IMPORTING
e_header = ls_new_header
TABLES
i_paragraphs = lt_paragraphs
i_strings = lt_strings
i_tabstops = lt_tabstops.
IF ls_new_header IS NOT INITIAL.
CALL FUNCTION 'SSF_ACTIVATE_STYLE'
EXPORTING
i_stylename = ls_header-stylename
EXCEPTIONS
no_name = 1
no_style = 2
cancelled = 3
no_access_permission = 4
illegal_language = 5
OTHERS = 6.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from SSF_ACTIVATE_STYLE' ).
ENDIF.
ENDIF.
ENDMETHOD. "deserialize
METHOD zif_abapgit_object~exists.
DATA: lv_stylename TYPE stxsadm-stylename.
SELECT SINGLE stylename
FROM stxshead INTO lv_stylename
WHERE active = c_style_active
AND stylename = ms_item-obj_name
AND vari = ''.
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD. "zif_abapgit_object~exists
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
ENDMETHOD. "zif_abapgit_object~get_metadata
METHOD zif_abapgit_object~has_changed_since.
rv_changed = abap_true.
ENDMETHOD. "zif_abapgit_object~has_changed_since
METHOD zif_abapgit_object~jump.
DATA: ls_bcdata TYPE bdcdata,
lt_bcdata TYPE STANDARD TABLE OF bdcdata.
ls_bcdata-program = 'SAPMSSFS'.
ls_bcdata-dynpro = '0100'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO lt_bcdata.
CLEAR ls_bcdata.
ls_bcdata-fnam = 'SSFSCREENS-SNAME'.
ls_bcdata-fval = ms_item-obj_name.
APPEND ls_bcdata TO lt_bcdata.
CLEAR ls_bcdata.
ls_bcdata-fnam = 'BDC_OKCODE'.
ls_bcdata-fval = '=DISPLAY'.
APPEND ls_bcdata TO lt_bcdata.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
STARTING NEW TASK 'GIT'
EXPORTING
tcode = 'SMARTSTYLES'
mode_val = 'E'
TABLES
using_tab = lt_bcdata
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from ABAP4_CALL_TRANSACTION, SSST' ).
ENDIF.
ENDMETHOD. "jump
METHOD zif_abapgit_object~serialize.
* see fm SSF_DOWNLOAD_STYLE
DATA: lv_style_name TYPE tdssname,
ls_header TYPE ssfcats,
lt_paragraphs TYPE TABLE OF ssfparas,
lt_strings TYPE TABLE OF ssfstrings,
lt_tabstops TYPE TABLE OF stxstab.
lv_style_name = ms_item-obj_name.
CALL FUNCTION 'SSF_READ_STYLE'
EXPORTING
i_style_name = lv_style_name
i_style_active_flag = c_style_active
i_style_variant = '%MAIN'
i_style_language = mv_language
IMPORTING
e_header = ls_header
TABLES
e_paragraphs = lt_paragraphs
e_strings = lt_strings
e_tabstops = lt_tabstops
EXCEPTIONS
no_name = 1
no_style = 2
active_style_not_found = 3
inactive_style_not_found = 4
no_variant = 5
no_main_variant = 6
cancelled = 7
no_access_permission = 8
OTHERS = 9.
IF sy-subrc = 2.
RETURN.
ELSEIF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from SSF_READ_STYLE' ).
ENDIF.
CLEAR ls_header-version.
CLEAR ls_header-firstuser.
CLEAR ls_header-firstdate.
CLEAR ls_header-firsttime.
CLEAR ls_header-lastuser.
CLEAR ls_header-lastdate.
CLEAR ls_header-lasttime.
io_xml->add( iv_name = 'HEADER'
ig_data = ls_header ).
io_xml->add( ig_data = lt_paragraphs
iv_name = 'SSFPARAS' ).
io_xml->add( ig_data = lt_strings
iv_name = 'SSFSTRINGS' ).
io_xml->add( ig_data = lt_tabstops
iv_name = 'STXSTAB' ).
ENDMETHOD. "serialize
METHOD zif_abapgit_object~is_locked.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'E_SMSTYLE'
iv_argument = |{ ms_item-obj_name }| ).
ENDMETHOD.
ENDCLASS.
| 27.344322 | 96 | 0.609243 |
f71793fca6d480c5256f9bac057cd8998adf9969 | 591 | abap | ABAP | src/backend/zcx_aof_not_found.clas.abap | larshp/abapOpenFix | fe5ab30b5ee8e1354f26a87a93a4819e0a0a46c5 | [
"MIT"
] | null | null | null | src/backend/zcx_aof_not_found.clas.abap | larshp/abapOpenFix | fe5ab30b5ee8e1354f26a87a93a4819e0a0a46c5 | [
"MIT"
] | 5 | 2017-02-28T14:52:06.000Z | 2017-05-30T10:28:37.000Z | src/backend/zcx_aof_not_found.clas.abap | larshp/abapOpenFix | fe5ab30b5ee8e1354f26a87a93a4819e0a0a46c5 | [
"MIT"
] | 2 | 2017-03-08T08:31:57.000Z | 2019-02-28T08:43:34.000Z | class ZCX_AOF_NOT_FOUND definition
public
inheriting from ZCX_AOF_ERROR
create public .
public section.
methods CONSTRUCTOR
importing
!TEXTID like IF_T100_MESSAGE=>T100KEY optional
!PREVIOUS like PREVIOUS optional .
protected section.
private section.
ENDCLASS.
CLASS ZCX_AOF_NOT_FOUND IMPLEMENTATION.
method CONSTRUCTOR.
CALL METHOD SUPER->CONSTRUCTOR
EXPORTING
PREVIOUS = PREVIOUS
.
clear me->textid.
if textid is initial.
IF_T100_MESSAGE~T100KEY = IF_T100_MESSAGE=>DEFAULT_TEXTID.
else.
IF_T100_MESSAGE~T100KEY = TEXTID.
endif.
endmethod.
ENDCLASS.
| 17.382353 | 60 | 0.781726 |
f71f25604c7dc0814f2c072f313e45013ea5d59e | 416 | abap | ABAP | src/zmci_deneme10.prog.abap | Mcanipekci/test4 | 16ac6fd93850c5a8f55bab02baf6e7ed05585b4d | [
"Apache-2.0"
] | null | null | null | src/zmci_deneme10.prog.abap | Mcanipekci/test4 | 16ac6fd93850c5a8f55bab02baf6e7ed05585b4d | [
"Apache-2.0"
] | null | null | null | src/zmci_deneme10.prog.abap | Mcanipekci/test4 | 16ac6fd93850c5a8f55bab02baf6e7ed05585b4d | [
"Apache-2.0"
] | null | null | null | *&---------------------------------------------------------------------*
*& Report ZMCI_DENEME10
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZMCI_DENEME10.
select *
FROM lfa1
INTO TABLE @DATA(lt_lfa1).
"xxxx
LOOP AT lt_lfa1 INTO DATA(ls_lfa1).
WRITE:/ ls_lfa1-name1, ls_lfa1-name2.
ENDLOOP.
| 27.733333 | 72 | 0.336538 |
f71fe84d09efceb7fc43bc72fb7caf850b0028e5 | 1,212 | abap | ABAP | src/zamp_customizing/zcl_amp_customizing.clas.abap | treee111/abap-metrics-provider | fda1f2e21a91f5a6c04d31462970a5a9a1c40f2e | [
"MIT"
] | 12 | 2021-01-22T08:36:08.000Z | 2021-11-19T22:43:53.000Z | src/zamp_customizing/zcl_amp_customizing.clas.abap | treee111/abap-metrics-provider | fda1f2e21a91f5a6c04d31462970a5a9a1c40f2e | [
"MIT"
] | 163 | 2020-03-12T19:23:27.000Z | 2022-03-31T10:09:03.000Z | src/zamp_customizing/zcl_amp_customizing.clas.abap | treee111/abap-metrics-provider | fda1f2e21a91f5a6c04d31462970a5a9a1c40f2e | [
"MIT"
] | 6 | 2021-01-21T08:07:09.000Z | 2021-03-10T08:18:21.000Z | CLASS zcl_amp_customizing DEFINITION PUBLIC ABSTRACT.
PUBLIC SECTION.
TYPES ty_metric_collectors TYPE STANDARD TABLE OF zamp_config_prov WITH KEY metric_group.
METHODS constructor
IMPORTING scenario TYPE zamp_config_scen-metric_scenario.
METHODS get_metric_collectors ABSTRACT
RETURNING VALUE(metric_collectors) TYPE ty_metric_collectors.
METHODS get_metric_converter ABSTRACT
RETURNING VALUE(converter_class) TYPE REF TO zif_amp_converter.
PROTECTED SECTION.
DATA scenario TYPE zamp_config_scen-metric_scenario.
DATA metric_collectors TYPE ty_metric_collectors.
DATA metric_converter_class_name TYPE zamp_config_scen-converter_class.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_amp_customizing IMPLEMENTATION.
METHOD constructor.
me->scenario = scenario.
SELECT SINGLE converter_class
FROM zamp_config_scen
INTO @me->metric_converter_class_name
WHERE metric_scenario = @me->scenario.
IF sy-subrc <> 0.
ASSERT 1 = 2.
ENDIF.
SELECT *
FROM zamp_config_prov
INTO TABLE @metric_collectors
WHERE metric_scenario = @me->scenario.
IF sy-subrc <> 0.
ASSERT 1 = 2.
ENDIF.
ENDMETHOD.
ENDCLASS.
| 24.24 | 93 | 0.75495 |
f720b74363c0db8dedfcc62920e9feb14bc355f1 | 475 | abap | ABAP | org.conqat.engine.sourcecode/test-data/org.conqat.engine.sourcecode.dataflow.heuristics/abap/LSELECT_GROUPU02.abap | SvenPeldszus/conqat | 28fe004a49453894922aeb27ee3467b1748d23e9 | [
"Apache-2.0"
] | 1 | 2020-04-28T20:06:30.000Z | 2020-04-28T20:06:30.000Z | org.conqat.engine.sourcecode/test-data/org.conqat.engine.sourcecode.shallowparser/abap/LSELECT_GROUPU02.abap | SvenPeldszus/conqat | 28fe004a49453894922aeb27ee3467b1748d23e9 | [
"Apache-2.0"
] | null | null | null | org.conqat.engine.sourcecode/test-data/org.conqat.engine.sourcecode.shallowparser/abap/LSELECT_GROUPU02.abap | SvenPeldszus/conqat | 28fe004a49453894922aeb27ee3467b1748d23e9 | [
"Apache-2.0"
] | null | null | null | FUNCTION SELECT_COUNT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_KEY) TYPE KEY
*" EXPORTING
*" REFERENCE(E_COUNT) TYPE SY-DBCNT
*"----------------------------------------------------------------------
SELECT COUNT(*) FROM some_table INTO e_count
WHERE key = i_key AND
state >= '000' AND state <= '999'.
ENDFUNCTION. | 29.6875 | 72 | 0.383158 |
f723a00c8be7aa075c6505ab3c175b101b9327a0 | 3,402 | abap | ABAP | src/zadf_demo/zadf_demo_azure_eventhub.prog.abap | hobru/ABAP-SDK-for-Azure | 7e0f2dbf484a87deacae3fe62e2d8fd6357a1d05 | [
"MIT"
] | null | null | null | src/zadf_demo/zadf_demo_azure_eventhub.prog.abap | hobru/ABAP-SDK-for-Azure | 7e0f2dbf484a87deacae3fe62e2d8fd6357a1d05 | [
"MIT"
] | null | null | null | src/zadf_demo/zadf_demo_azure_eventhub.prog.abap | hobru/ABAP-SDK-for-Azure | 7e0f2dbf484a87deacae3fe62e2d8fd6357a1d05 | [
"MIT"
] | 1 | 2018-12-10T10:55:02.000Z | 2018-12-10T10:55:02.000Z | *&---------------------------------------------------------------------*
*& Report ZADF_DEMO_AZURE_EVENTHUB
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zadf_demo_azure_eventhub.
CONSTANTS: gc_interface TYPE zinterface_id VALUE 'DEMO_EHUB'.
TYPES: BEGIN OF lty_data,
carrid TYPE s_carr_id,
connid TYPE s_conn_id,
fldate TYPE s_date,
planetype TYPE s_planetye,
END OF lty_data.
DATA: it_headers TYPE tihttpnvp,
wa_headers TYPE LINE OF tihttpnvp,
lv_string TYPE string,
lv_response TYPE string,
cx_interface TYPE REF TO zcx_interace_config_missing,
cx_http TYPE REF TO zcx_http_client_failed,
cx_adf_service TYPE REF TO zcx_adf_service,
oref_eventhub TYPE REF TO zcl_adf_service_eventhub,
oref TYPE REF TO zcl_adf_service,
filter TYPE zbusinessid,
lv_http_status TYPE i,
lo_json TYPE REF TO cl_trex_json_serializer,
lv1_string TYPE string,
lv_xstring TYPE xstring,
it_data TYPE STANDARD TABLE OF lty_data.
*Sample data population for sending it to Azure eventhub
SELECT carrid connid fldate planetype
FROM sflight UP TO 10 ROWS
INTO TABLE it_data.
IF sy-subrc EQ 0.
TRY.
**Calling Factory method to instantiate eventhub client
oref = zcl_adf_service_factory=>create( iv_interface_id = gc_interface
iv_business_identifier = filter ).
oref_eventhub ?= oref.
**Setting Expiry time
CALL METHOD oref_eventhub->add_expiry_time
EXPORTING
iv_expiry_hour = 0
iv_expiry_min = 15
iv_expiry_sec = 0.
CREATE OBJECT lo_json
EXPORTING
data = it_data.
lo_json->serialize( ).
lv1_string = lo_json->get_data( ).
*Convert input string data to Xstring format
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = lv1_string
IMPORTING
buffer = lv_xstring
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
**Sending Converted SAP data to Azure Eventhub
CALL METHOD oref_eventhub->send
EXPORTING
request = lv_xstring "Input XSTRING of SAP Business Event data
it_headers = it_headers "Header attributes
IMPORTING
response = lv_response "Response from EventHub
ev_http_status = lv_http_status. "Status
CATCH zcx_interace_config_missing INTO cx_interface.
lv_string = cx_interface->get_text( ).
MESSAGE lv_string TYPE 'E'.
CATCH zcx_http_client_failed INTO cx_http .
lv_string = cx_http->get_text( ).
MESSAGE lv_string TYPE 'E'.
CATCH zcx_adf_service INTO cx_adf_service.
lv_string = cx_adf_service->get_text( ).
MESSAGE lv_string TYPE 'E'.
ENDTRY.
IF lv_http_status NE '201' AND
lv_http_status NE '200'.
MESSAGE 'SAP data not sent to Azure EventHub' TYPE 'E'.
ELSE.
MESSAGE 'SAP data sent to Azure EventHub' TYPE 'I'.
ENDIF.
ELSE.
MESSAGE 'No data in SFLIFHT' TYPE 'E'.
ENDIF.
| 32.711538 | 80 | 0.584068 |
f735197f8002d474d2c36a31e42a7ab06cd6cf5d | 31,751 | abap | ABAP | lbn-gtt-template-tso/ABAP/zsrc/zcl_im__gtt_sof_le_shipmnt.clas.abap | DanHaer/logistics-business-network-gtt-samples | 739978ac389da6f3530b26cd6402a3892f4b605a | [
"Apache-2.0"
] | null | null | null | lbn-gtt-template-tso/ABAP/zsrc/zcl_im__gtt_sof_le_shipmnt.clas.abap | DanHaer/logistics-business-network-gtt-samples | 739978ac389da6f3530b26cd6402a3892f4b605a | [
"Apache-2.0"
] | null | null | null | lbn-gtt-template-tso/ABAP/zsrc/zcl_im__gtt_sof_le_shipmnt.clas.abap | DanHaer/logistics-business-network-gtt-samples | 739978ac389da6f3530b26cd6402a3892f4b605a | [
"Apache-2.0"
] | null | null | null | class ZCL_IM__GTT_SOF_LE_SHIPMNT definition
public
final
create public .
public section.
interfaces IF_EX_BADI_LE_SHIPMENT .
protected section.
private section.
ENDCLASS.
CLASS ZCL_IM__GTT_SOF_LE_SHIPMNT IMPLEMENTATION.
method IF_EX_BADI_LE_SHIPMENT~AT_SAVE.
endmethod.
METHOD if_ex_badi_le_shipment~before_update.
INCLUDE /saptrx/constants.
TYPE-POOLS: trxas.
DATA: l_structure_package TYPE devclass,
l_extflag TYPE flag.
DATA: lv_count TYPE i,
ls_comwa5 TYPE vbco5,
ls_comwa6 TYPE vbco6,
lv_fstop TYPE char255,
lv_lstop TYPE char255,
* Location Id
lv_locid TYPE zgtt_locid,
lv_appobjid TYPE /saptrx/aoid.
DATA: ls_vttk_old TYPE vttkvb,
ls_vttk TYPE vttkvb,
ls_vttk_tmp TYPE vttk,
ls_vtts_old TYPE vttsvb,
ls_vtts_delta TYPE vttsvb,
ls_vttp_delta TYPE vttpvb,
ls_vtsp_delta TYPE vtspvb,
ls_likp_delta TYPE likpvb,
ls_likp TYPE likp,
ls_likp_tmp TYPE likp,
ls_vbfas TYPE vbfas,
ls_vbfa_new TYPE vbfavb,
ls_likp_new TYPE likp,
ls_lips TYPE lips,
ls_stop TYPE zgtt_stop_info,
ls_dlv_watching_stop TYPE zgtt_dlv_watch_stop,
ls_eerel TYPE zgtt_sof_ee_rel.
DATA: lt_vbfas TYPE STANDARD TABLE OF vbfas,
lt_vbfa_new TYPE STANDARD TABLE OF vbfavb,
lt_vttk TYPE STANDARD TABLE OF vttkvb,
lt_vtts_delta TYPE STANDARD TABLE OF vttsvb,
lt_vttp_delta TYPE STANDARD TABLE OF vttpvb,
lt_vttp_delta_tmp TYPE STANDARD TABLE OF vttpvb,
lt_vtsp_delta TYPE STANDARD TABLE OF vtspvb,
lt_vtsp_delta_tmp TYPE STANDARD TABLE OF vtspvb,
lt_likp_delta TYPE STANDARD TABLE OF likpvb,
lt_likp_new TYPE STANDARD TABLE OF likp,
lt_lips TYPE STANDARD TABLE OF lips.
DATA: lt_stops_tmp TYPE zgtt_stops,
lt_dlv_watching_stops_tmp TYPE zgtt_dlv_watch_stops,
lt_stops TYPE zgtt_stops,
lt_dlv_watching_stops TYPE zgtt_dlv_watch_stops.
DATA: lt_control TYPE /saptrx/bapi_trk_control_tab,
lt_tracking_id TYPE /saptrx/bapi_trk_trkid_tab,
ls_trxserv TYPE /saptrx/trxserv,
lv_appsys TYPE logsys,
lt_appobj_ctabs TYPE trxas_appobj_ctabs,
lt_bapireturn TYPE bapiret2_t,
lv_trxserver_id TYPE /saptrx/trxservername,
lv_tzone TYPE timezone,
lt_exp_events TYPE /saptrx/bapi_trk_ee_tab.
DATA: ls_control TYPE LINE OF /saptrx/bapi_trk_control_tab,
ls_tracking_id TYPE LINE OF /saptrx/bapi_trk_trkid_tab,
ls_appobj_ctabs TYPE LINE OF trxas_appobj_ctabs,
ls_expeventdata TYPE LINE OF /saptrx/bapi_trk_ee_tab.
DATA: BEGIN OF ls_aotype,
obj_type TYPE /saptrx/trk_obj_type,
aot_type TYPE /saptrx/aotype,
END OF ls_aotype.
DATA: lt_aotype LIKE STANDARD TABLE OF ls_aotype,
lt_aotype_item LIKE STANDARD TABLE OF ls_aotype.
* Check package dependent BADI disabling
l_structure_package = '/SAPTRX/SCEM_AI_R3'.
CALL FUNCTION 'GET_R3_EXTENSION_SWITCH'
EXPORTING
i_structure_package = l_structure_package
IMPORTING
e_active = l_extflag
EXCEPTIONS
not_existing = 1
object_not_existing = 2
no_extension_object = 3
OTHERS = 4.
IF sy-subrc <> 0.
EXIT.
ENDIF.
IF l_extflag <> 'X'.
EXIT.
ENDIF.
* Check if any tracking server defined
CHECK im_shipments_before_update-tra_save_caller <> 'TRX'.
CALL FUNCTION '/SAPTRX/EVENT_MGR_CHECK'
EXCEPTIONS
no_event_mgr_available = 1.
IF sy-subrc <> 0.
EXIT.
ENDIF.
* Check if at least 1 active extractor exists
SELECT COUNT(*) INTO lv_count FROM /saptrx/aotypes
WHERE trk_obj_type EQ 'ESC_SHIPMT'
AND torelevant EQ 'X'.
CHECK lv_count GE 1. CLEAR lv_count.
SELECT COUNT(*) INTO lv_count FROM /saptrx/aotypes
WHERE trk_obj_type EQ 'ESC_DELIV'
AND torelevant EQ 'X'.
CHECK lv_count GE 1.
* GET CURRENT LOGICAL SYSTEM
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = lv_appsys.
* Actual Business Time zone
CALL FUNCTION 'GET_SYSTEM_TIMEZONE'
IMPORTING
timezone = lv_tzone
EXCEPTIONS
customizing_missing = 1
OTHERS = 2.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_INT_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_AZ_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_IF_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PF_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PR_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PT_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_DM_HD'. APPEND ls_aotype TO lt_aotype.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_INT_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_AZ_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_IF_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PF_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PR_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_PT_ITEM'. APPEND ls_aotype TO lt_aotype_item.
ls_aotype-obj_type = 'ESC_DELIV'. ls_aotype-aot_type = 'ZGTT_DE_ACC_DM_ITEM'. APPEND ls_aotype TO lt_aotype_item.
* get the shipment header
MOVE im_shipments_before_update-new_vttk TO lt_vttk.
LOOP AT im_shipments_before_update-old_vttk INTO ls_vttk_old WHERE updkz = 'D'.
APPEND ls_vttk_old TO lt_vttk.
ENDLOOP.
LOOP AT lt_vttk INTO ls_vttk WHERE shtyp EQ '0003'.
CLEAR: lt_vttp_delta, lt_likp_delta, lt_vttp_delta_tmp, lt_vtsp_delta, lt_vtsp_delta_tmp, lt_vtts_delta.
MOVE im_shipments_before_update-new_vttp TO lt_vttp_delta.
APPEND LINES OF im_shipments_before_update-old_vttp TO lt_vttp_delta.
MOVE lt_vttp_delta TO lt_vttp_delta_tmp.
DELETE lt_vttp_delta WHERE ( updkz NE 'I' AND updkz NE 'D' ) OR tknum NE ls_vttk-tknum.
IF lt_vttp_delta IS NOT INITIAL.
LOOP AT lt_vttp_delta INTO ls_vttp_delta.
MOVE ls_vttp_delta-vbeln TO ls_likp_delta-vbeln.
COLLECT ls_likp_delta INTO lt_likp_delta.
ENDLOOP.
ENDIF.
MOVE im_shipments_before_update-new_vtsp TO lt_vtsp_delta.
APPEND LINES OF im_shipments_before_update-old_vtsp TO lt_vtsp_delta.
MOVE lt_vtsp_delta TO lt_vtsp_delta_tmp.
DELETE lt_vtsp_delta WHERE ( updkz NE 'I' AND updkz NE 'D' ) OR tknum NE ls_vttk-tknum.
IF lt_vtsp_delta IS NOT INITIAL.
LOOP AT lt_vtsp_delta INTO ls_vtsp_delta.
READ TABLE lt_vttp_delta_tmp INTO ls_vttp_delta WITH KEY tknum = ls_vtsp_delta-tknum
tpnum = ls_vtsp_delta-tpnum BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE ls_vttp_delta-vbeln TO ls_likp_delta-vbeln.
COLLECT ls_likp_delta INTO lt_likp_delta.
ENDIF.
ENDLOOP.
ENDIF.
MOVE im_shipments_before_update-new_vtts TO lt_vtts_delta.
APPEND LINES OF im_shipments_before_update-old_vtts TO lt_vtts_delta.
DELETE lt_vtts_delta WHERE tknum NE ls_vttk-tknum.
IF lt_vtts_delta IS NOT INITIAL.
LOOP AT lt_vtts_delta INTO ls_vtts_delta WHERE updkz = 'I' OR updkz = 'D'.
CLEAR: ls_vtsp_delta, ls_vttp_delta.
LOOP AT lt_vtsp_delta_tmp INTO ls_vtsp_delta WHERE tknum = ls_vtts_delta-tknum
AND tsnum = ls_vtts_delta-tsnum.
READ TABLE lt_vttp_delta_tmp INTO ls_vttp_delta WITH KEY tknum = ls_vtsp_delta-tknum
tpnum = ls_vtsp_delta-tpnum BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE ls_vttp_delta-vbeln TO ls_likp_delta-vbeln.
COLLECT ls_likp_delta INTO lt_likp_delta.
ENDIF.
ENDLOOP.
ENDLOOP.
LOOP AT lt_vtts_delta INTO ls_vtts_delta WHERE updkz <> 'I' AND updkz <> 'D'.
READ TABLE im_shipments_before_update-old_vtts INTO ls_vtts_old WITH KEY tknum = ls_vtts_delta-tknum
tsnum = ls_vtts_delta-tsnum BINARY SEARCH.
CHECK sy-subrc IS INITIAL.
IF ls_vtts_delta-knota NE ls_vtts_old-knota OR
ls_vtts_delta-vstel NE ls_vtts_old-vstel OR
ls_vtts_delta-werka NE ls_vtts_old-werka OR
ls_vtts_delta-kunna NE ls_vtts_old-kunna OR
ls_vtts_delta-lifna NE ls_vtts_old-lifna OR
ls_vtts_delta-kunnz NE ls_vtts_old-kunnz OR
ls_vtts_delta-vstez NE ls_vtts_old-vstez OR
ls_vtts_delta-lifnz NE ls_vtts_old-lifnz OR
ls_vtts_delta-werkz NE ls_vtts_old-werkz OR
ls_vtts_delta-knotz NE ls_vtts_old-knotz OR
ls_vtts_delta-dptbg NE ls_vtts_old-dptbg OR
ls_vtts_delta-uptbg NE ls_vtts_old-uptbg OR
ls_vtts_delta-dpten NE ls_vtts_old-dpten OR
ls_vtts_delta-upten NE ls_vtts_old-upten. .
CLEAR: ls_vtsp_delta, ls_vttp_delta.
LOOP AT lt_vtsp_delta_tmp INTO ls_vtsp_delta WHERE tknum = ls_vtts_delta-tknum
AND tsnum = ls_vtts_delta-tsnum.
READ TABLE lt_vttp_delta_tmp INTO ls_vttp_delta WITH KEY tknum = ls_vtsp_delta-tknum
tpnum = ls_vtsp_delta-tpnum BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE ls_vttp_delta-vbeln TO ls_likp_delta-vbeln.
COLLECT ls_likp_delta INTO lt_likp_delta.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR: lt_vbfa_new, lt_likp_new.
LOOP AT lt_likp_delta INTO ls_likp_delta.
CLEAR: ls_comwa6, lt_vbfas.
MOVE-CORRESPONDING ls_likp_delta TO ls_comwa6.
CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
EXPORTING
comwa = ls_comwa6
TABLES
vbfa_tab = lt_vbfas.
LOOP AT lt_vbfas INTO ls_vbfas WHERE vbtyp_n EQ '8' AND vbtyp_v EQ 'J'.
SELECT SINGLE * INTO ls_likp FROM likp WHERE vbeln = ls_vbfas-vbelv
AND lfart = 'LBNP'.
CHECK sy-subrc EQ 0.
SELECT SINGLE * INTO ls_vttk_tmp FROM vttk WHERE tknum = ls_vbfas-vbeln
AND shtyp EQ '0003'.
CHECK sy-subrc EQ 0.
MOVE-CORRESPONDING ls_vbfas TO ls_vbfa_new.
APPEND ls_vbfa_new TO lt_vbfa_new.
ENDLOOP.
SELECT SINGLE * INTO ls_likp FROM likp WHERE vbeln = ls_likp_delta-vbeln
AND lfart = 'LBNP'.
IF sy-subrc = 0.
COLLECT ls_likp INTO lt_likp_new.
ENDIF.
ENDLOOP.
LOOP AT lt_vttp_delta INTO ls_vttp_delta WHERE updkz = 'D'.
DELETE lt_vbfa_new WHERE vbeln = ls_vttp_delta-tknum
AND vbelv = ls_vttp_delta-vbeln.
ENDLOOP.
LOOP AT lt_vttp_delta INTO ls_vttp_delta WHERE updkz = 'I'.
READ TABLE lt_vbfa_new WITH KEY vbeln = ls_vttp_delta-tknum
vbelv = ls_vttp_delta-vbeln
TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
SELECT SINGLE * INTO ls_likp FROM likp WHERE vbeln = ls_vttp_delta-vbeln
AND lfart = 'LBNP'.
CHECK sy-subrc EQ 0.
CLEAR ls_vbfa_new.
ls_vbfa_new-vbelv = ls_vttp_delta-vbeln.
ls_vbfa_new-vbeln = ls_vttp_delta-tknum.
COLLECT ls_vbfa_new INTO lt_vbfa_new.
ENDIF.
ENDLOOP.
CHECK lt_likp_new IS NOT INITIAL.
CLEAR: lt_stops, lt_dlv_watching_stops.
LOOP AT lt_vbfa_new INTO ls_vbfa_new.
CLEAR: lt_stops_tmp, lt_dlv_watching_stops_tmp.
IF ls_vbfa_new-vbeln = ls_vttk-tknum.
CALL FUNCTION 'ZGTT_GET_STOPS_FROM_SHIPMENT'
EXPORTING
iv_tknum = ls_vttk-tknum
it_vtts_new = im_shipments_before_update-new_vtts
it_vtsp_new = im_shipments_before_update-new_vtsp
it_vttp_new = im_shipments_before_update-new_vttp
IMPORTING
et_stops = lt_stops_tmp
et_dlv_watching_stops = lt_dlv_watching_stops_tmp.
ELSE.
CALL FUNCTION 'ZGTT_GET_STOPS_FROM_SHIPMENT'
EXPORTING
iv_tknum = ls_vbfa_new-vbeln
IMPORTING
et_stops = lt_stops_tmp
et_dlv_watching_stops = lt_dlv_watching_stops_tmp.
ENDIF.
APPEND LINES OF lt_stops_tmp TO lt_stops.
APPEND LINES OF lt_dlv_watching_stops_tmp TO lt_dlv_watching_stops.
ENDLOOP.
SORT lt_stops BY stopid loccat.
SORT lt_dlv_watching_stops BY vbeln stopid loccat.
DELETE ADJACENT DUPLICATES FROM lt_stops COMPARING stopid loccat.
DELETE ADJACENT DUPLICATES FROM lt_dlv_watching_stops COMPARING vbeln stopid loccat.
* *************************************************************COMPOSE IDOC->
LOOP AT lt_aotype INTO ls_aotype.
SELECT SINGLE trxservername INTO lv_trxserver_id FROM /saptrx/aotypes
WHERE trk_obj_type EQ ls_aotype-obj_type
AND aotype EQ ls_aotype-aot_type.
SELECT SINGLE trx_server_id trx_server INTO ( ls_trxserv-trx_server_id, ls_trxserv-trx_server )
FROM /saptrx/trxserv
WHERE trx_server_id = lv_trxserver_id.
CLEAR: lt_appobj_ctabs, lt_control, lt_tracking_id, lt_exp_events.
LOOP AT lt_likp_new INTO ls_likp_new.
CLEAR: ls_appobj_ctabs.
ls_appobj_ctabs-trxservername = ls_trxserv-trx_server_id.
ls_appobj_ctabs-appobjtype = ls_aotype-aot_type.
ls_appobj_ctabs-appobjid = ls_likp_new-vbeln.
APPEND ls_appobj_ctabs TO lt_appobj_ctabs.
* update the impacted deliveries' shipment composition and tracking id table=>
CLEAR: ls_control.
ls_control-appsys = lv_appsys.
ls_control-appobjtype = ls_aotype-aot_type.
ls_control-appobjid = ls_likp_new-vbeln.
ls_control-paramname = 'YN_DLV_NO'.
ls_control-value = ls_likp_new-vbeln.
APPEND ls_control TO lt_control.
ls_control-paramname = 'ACTUAL_BUSINESS_TIMEZONE'.
ls_control-value = lv_tzone.
APPEND ls_control TO lt_control.
ls_control-paramname = 'ACTUAL_BUSINESS_DATETIME'.
CONCATENATE '0' sy-datum sy-uzeit INTO ls_control-value.
APPEND ls_control TO lt_control.
CLEAR: lv_count.
LOOP AT lt_vbfa_new INTO ls_vbfa_new WHERE vbelv = ls_likp_new-vbeln.
lv_count = lv_count + 1.
ls_control-paramname = 'YN_SHP_LINE_COUNT'.
ls_control-paramindex = lv_count.
ls_control-value = lv_count.
SHIFT ls_control-value LEFT DELETING LEADING space.
APPEND ls_control TO lt_control.
ls_control-paramname = 'YN_SHP_NO'.
ls_control-paramindex = lv_count.
ls_control-value = ls_vbfa_new-vbeln.
APPEND ls_control TO lt_control.
CLEAR: lv_fstop, lv_lstop.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_vbfa_new-vbelv
AND stopid(10) = ls_vbfa_new-vbeln.
IF lv_fstop IS INITIAL.
lv_fstop = ls_dlv_watching_stop-stopid.
ENDIF.
lv_lstop = ls_dlv_watching_stop-stopid.
ENDLOOP.
ls_control-paramname = 'YN_SHP_FIRST_STOP'.
ls_control-paramindex = lv_count.
ls_control-value = lv_fstop.
APPEND ls_control TO lt_control.
ls_control-paramname = 'YN_SHP_LAST_STOP'.
ls_control-paramindex = lv_count.
ls_control-value = lv_lstop.
APPEND ls_control TO lt_control.
ENDLOOP.
IF sy-subrc NE 0.
ls_control-paramname = 'YN_SHP_LINE_COUNT'.
ls_control-paramindex = '1'.
ls_control-value = ''.
APPEND ls_control TO lt_control.
ENDIF.
CLEAR: ls_tracking_id.
ls_tracking_id-appsys = lv_appsys.
ls_tracking_id-appobjtype = ls_aotype-aot_type.
ls_tracking_id-appobjid = ls_likp_new-vbeln.
ls_tracking_id-trxcod = 'OUTBOUND_DELIVERY'.
ls_tracking_id-trxid = ls_likp_new-vbeln.
CONCATENATE '0' sy-datum sy-uzeit INTO ls_tracking_id-start_date.
ls_tracking_id-end_date = '099991231000000'.
ls_tracking_id-timzon = lv_tzone.
APPEND ls_tracking_id TO lt_tracking_id.
CLEAR ls_tracking_id-start_date.
CLEAR ls_tracking_id-end_date.
CLEAR ls_tracking_id-timzon.
LOOP AT lt_vttp_delta INTO ls_vttp_delta WHERE vbeln = ls_likp_new-vbeln.
CLEAR ls_tracking_id-action.
ls_tracking_id-trxcod = 'SHIPMENT_ORDER'.
ls_tracking_id-trxid = ls_vttp_delta-tknum.
IF ls_vttp_delta-updkz = 'D'.
ls_tracking_id-action = 'D'.
ENDIF.
APPEND ls_tracking_id TO lt_tracking_id.
ENDLOOP.
* update the impacted deliveries' shipment composition and tracking id table=<
* update the impacted deliveries' planned event table=>
CLEAR ls_expeventdata.
ls_expeventdata-appsys = lv_appsys.
ls_expeventdata-appobjtype = ls_aotype-aot_type.
ls_expeventdata-language = sy-langu.
ls_expeventdata-appobjid = ls_likp_new-vbeln.
ls_expeventdata-evt_exp_tzone = lv_tzone.
CLEAR ls_eerel.
SELECT SINGLE * INTO ls_eerel FROM zgtt_sof_ee_rel WHERE appobjid = ls_expeventdata-appobjid.
IF ls_eerel-z_wbstk = 'X'.
ls_expeventdata-milestone = 'GOODS_ISSUE'.
IF ls_likp_new-wadat IS INITIAL.
CLEAR ls_expeventdata-evt_exp_datetime.
ELSE.
CONCATENATE '0' ls_likp_new-wadat ls_likp_new-wauhr INTO ls_expeventdata-evt_exp_datetime.
ENDIF.
ls_expeventdata-loctype = 'ShippingPoint'.
ls_expeventdata-locid1 = ls_likp_new-vstel.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ls_expeventdata-milestone = 'DEPARTURE'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_likp_new-vbeln
AND loccat = 'S'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDLOOP.
ls_expeventdata-milestone = 'ARRIV_DEST'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_likp_new-vbeln
AND loccat = 'D'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDLOOP.
ls_expeventdata-milestone = 'POD'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_likp_new-vbeln
AND loccat = 'D'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
CLEAR: lv_locid.
SELECT SINGLE kunnr INTO lv_locid FROM likp WHERE vbeln = ls_likp_new-vbeln.
IF lv_locid EQ ls_stop-locid AND ls_eerel-z_pdstk = 'X'.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ENDLOOP.
READ TABLE lt_exp_events WITH KEY appobjid = ls_likp_new-vbeln TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
ls_expeventdata-evt_exp_datetime = '000000000000000'.
ls_expeventdata-milestone = ''.
ls_expeventdata-evt_exp_tzone = ''.
ls_expeventdata-loctype = ''.
ls_expeventdata-locid1 = ''.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
* update the impacted deliveries' planned event table=<
ENDLOOP.
IF lt_control IS NOT INITIAL.
CALL METHOD zcl_gtt_sof_upd_xtp_references=>send_idoc_ehpost01
EXPORTING
it_control = lt_control
it_tracking_id = lt_tracking_id
it_exp_event = lt_exp_events
is_trxserv = ls_trxserv
iv_appsys = lv_appsys
it_appobj_ctabs = lt_appobj_ctabs.
ENDIF.
ENDLOOP.
* update the impacted delivery items' planned event table=>
CLEAR lt_lips.
IF lt_likp_new IS NOT INITIAL.
SELECT * INTO TABLE lt_lips FROM lips FOR ALL ENTRIES IN lt_likp_new WHERE vbeln = lt_likp_new-vbeln.
ENDIF.
LOOP AT lt_aotype_item INTO ls_aotype.
SELECT SINGLE trxservername INTO lv_trxserver_id FROM /saptrx/aotypes
WHERE trk_obj_type EQ ls_aotype-obj_type
AND aotype EQ ls_aotype-aot_type.
SELECT SINGLE trx_server_id trx_server INTO ( ls_trxserv-trx_server_id, ls_trxserv-trx_server )
FROM /saptrx/trxserv
WHERE trx_server_id = lv_trxserver_id.
CLEAR: lt_appobj_ctabs, lt_control, lt_tracking_id, lt_exp_events.
LOOP AT lt_lips INTO ls_lips.
CLEAR: ls_appobj_ctabs.
ls_appobj_ctabs-trxservername = ls_trxserv-trx_server_id.
ls_appobj_ctabs-appobjtype = ls_aotype-aot_type.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_appobj_ctabs-appobjid.
APPEND ls_appobj_ctabs TO lt_appobj_ctabs.
CLEAR: ls_control.
ls_control-appsys = lv_appsys.
ls_control-appobjtype = ls_aotype-aot_type.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_control-appobjid.
ls_control-paramname = 'YN_DLV_NO'.
ls_control-value = ls_lips-vbeln.
APPEND ls_control TO lt_control.
ls_control-paramname = 'YN_DLV_ITEM_NO'.
ls_control-value = ls_lips-posnr.
APPEND ls_control TO lt_control.
ls_control-paramname = 'ACTUAL_BUSINESS_TIMEZONE'.
ls_control-value = lv_tzone.
APPEND ls_control TO lt_control.
ls_control-paramname = 'ACTUAL_BUSINESS_DATETIME'.
CONCATENATE '0' sy-datum sy-uzeit INTO ls_control-value.
APPEND ls_control TO lt_control.
CLEAR: ls_tracking_id.
ls_tracking_id-appsys = lv_appsys.
ls_tracking_id-appobjtype = ls_aotype-aot_type.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_tracking_id-appobjid.
ls_tracking_id-trxcod = 'OUTBOUND_DELIVERY_IT'.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_tracking_id-trxid.
CONCATENATE '0' sy-datum sy-uzeit INTO ls_tracking_id-start_date.
ls_tracking_id-end_date = '099991231000000'.
ls_tracking_id-timzon = lv_tzone.
APPEND ls_tracking_id TO lt_tracking_id.
CLEAR ls_expeventdata.
ls_expeventdata-appsys = lv_appsys.
ls_expeventdata-appobjtype = ls_aotype-aot_type.
ls_expeventdata-language = sy-langu.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO ls_expeventdata-appobjid.
ls_expeventdata-evt_exp_tzone = lv_tzone.
SELECT SINGLE * INTO ls_likp_tmp FROM likp WHERE vbeln = ls_lips-vbeln.
CLEAR ls_eerel.
SELECT SINGLE * INTO ls_eerel FROM zgtt_sof_ee_rel WHERE appobjid = ls_expeventdata-appobjid.
IF ls_eerel-z_kostk = 'X'.
ls_expeventdata-milestone = 'PICKING'.
IF ls_likp_tmp-kodat IS INITIAL.
CLEAR ls_expeventdata-evt_exp_datetime.
ELSE.
CONCATENATE '0' ls_likp_tmp-kodat ls_likp_tmp-kouhr INTO ls_expeventdata-evt_exp_datetime.
ENDIF.
ls_expeventdata-loctype = 'ShippingPoint'.
ls_expeventdata-locid1 = ls_likp_tmp-vstel.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
IF ls_eerel-z_pkstk = 'X'.
CLEAR ls_expeventdata-evt_exp_datetime.
ls_expeventdata-milestone = 'PACKING'.
ls_expeventdata-loctype = 'ShippingPoint'.
ls_expeventdata-locid1 = ls_likp_tmp-vstel.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
IF ls_eerel-z_wbstk = 'X'.
ls_expeventdata-milestone = 'GOODS_ISSUE'.
IF ls_likp_tmp-wadat IS INITIAL.
CLEAR ls_expeventdata-evt_exp_datetime.
ELSE.
CONCATENATE '0' ls_likp_tmp-wadat ls_likp_tmp-wauhr INTO ls_expeventdata-evt_exp_datetime.
ENDIF.
ls_expeventdata-loctype = 'ShippingPoint'.
ls_expeventdata-locid1 = ls_likp_tmp-vstel.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
IF ls_eerel-z_pdstk = 'X'.
CLEAR ls_expeventdata-evt_exp_datetime.
ls_expeventdata-milestone = 'POD'.
ls_expeventdata-loctype = 'Customer'.
ls_expeventdata-locid1 = ls_likp_tmp-kunnr.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ls_expeventdata-milestone = 'DEPARTURE'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_lips-vbeln
AND loccat = 'S'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDLOOP.
ls_expeventdata-milestone = 'ARRIV_DEST'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_lips-vbeln
AND loccat = 'D'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDLOOP.
ls_expeventdata-milestone = 'POD'.
LOOP AT lt_dlv_watching_stops INTO ls_dlv_watching_stop WHERE vbeln = ls_lips-vbeln
AND loccat = 'D'.
READ TABLE lt_stops INTO ls_stop WITH KEY stopid = ls_dlv_watching_stop-stopid
loccat = ls_dlv_watching_stop-loccat.
CLEAR: lv_locid.
SELECT SINGLE kunnr INTO lv_locid FROM likp WHERE vbeln = ls_lips-vbeln.
IF lv_locid EQ ls_stop-locid AND ls_eerel-z_pdstk = 'X'.
ls_expeventdata-locid2 = ls_stop-stopid.
ls_expeventdata-loctype = ls_stop-loctype.
ls_expeventdata-locid1 = ls_stop-locid.
ls_expeventdata-evt_exp_datetime = ls_stop-pln_evt_datetime.
ls_expeventdata-evt_exp_tzone = ls_stop-pln_evt_timezone.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ENDLOOP.
CONCATENATE ls_lips-vbeln ls_lips-posnr INTO lv_appobjid.
READ TABLE lt_exp_events WITH KEY appobjid = lv_appobjid TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
ls_expeventdata-evt_exp_datetime = '000000000000000'.
ls_expeventdata-milestone = ''.
ls_expeventdata-evt_exp_tzone = ''.
ls_expeventdata-loctype = ''.
ls_expeventdata-locid1 = ''.
ls_expeventdata-locid2 = ''.
APPEND ls_expeventdata TO lt_exp_events.
ENDIF.
ENDLOOP.
IF lt_control IS NOT INITIAL.
CALL METHOD zcl_gtt_sof_upd_xtp_references=>send_idoc_ehpost01
EXPORTING
it_control = lt_control
it_tracking_id = lt_tracking_id
it_exp_event = lt_exp_events
is_trxserv = ls_trxserv
iv_appsys = lv_appsys
it_appobj_ctabs = lt_appobj_ctabs.
ENDIF.
ENDLOOP.
* update the impacted delivery items' planned event table=<
ENDLOOP.
ENDMETHOD.
method IF_EX_BADI_LE_SHIPMENT~IN_UPDATE.
endmethod.
ENDCLASS.
| 44.782793 | 123 | 0.634468 |
f73619273b5dc49f93d9ddb109ac5c3b00fc701e | 122 | abap | ABAP | objects/CLAS/ZCL_IM_AS_CREDIT/CPUB ZCL_IM_AS_CREDIT.abap | abhilashhaa/HCL_Githup | 454be7f157c72fbb75550dea67c9167e405a4fdb | [
"Apache-2.0"
] | null | null | null | objects/CLAS/ZCL_IM_AS_CREDIT/CPUB ZCL_IM_AS_CREDIT.abap | abhilashhaa/HCL_Githup | 454be7f157c72fbb75550dea67c9167e405a4fdb | [
"Apache-2.0"
] | null | null | null | objects/CLAS/ZCL_IM_AS_CREDIT/CPUB ZCL_IM_AS_CREDIT.abap | abhilashhaa/HCL_Githup | 454be7f157c72fbb75550dea67c9167e405a4fdb | [
"Apache-2.0"
] | null | null | null | class ZCL_IM_AS_CREDIT definition
public
final
create public .
public section.
interfaces IF_EX_UKM_EV_FORMULA . | 15.25 | 35 | 0.795082 |
f736713dcc5ab864fa6449b685dbb7da33e04f2c | 6,818 | abap | ABAP | src/zcl_uom_alv_ida.clas.abap | Keller-Michael/ALV_with_IDA_example | 1b9495e2fcace5dd16e5d9d2cd2ec01f7f85b1f9 | [
"MIT"
] | 6 | 2021-01-31T12:56:46.000Z | 2022-03-10T00:40:50.000Z | src/zcl_uom_alv_ida.clas.abap | Keller-Michael/ALV_with_IDA_example | 1b9495e2fcace5dd16e5d9d2cd2ec01f7f85b1f9 | [
"MIT"
] | null | null | null | src/zcl_uom_alv_ida.clas.abap | Keller-Michael/ALV_with_IDA_example | 1b9495e2fcace5dd16e5d9d2cd2ec01f7f85b1f9 | [
"MIT"
] | 3 | 2021-08-30T06:20:32.000Z | 2022-03-10T00:38:44.000Z | CLASS zcl_uom_alv_ida DEFINITION PUBLIC FINAL CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES zif_uom_alv_ida.
TYPES ty_uom_selection TYPE RANGE OF msehi.
TYPES ty_language_selection TYPE RANGE OF spras.
METHODS constructor
IMPORTING
it_uom_selection TYPE ty_uom_selection
it_language_selection TYPE ty_language_selection.
CLASS-METHODS get_instance
IMPORTING
it_uom_selection TYPE ty_uom_selection
it_language_selection TYPE ty_language_selection
RETURNING
VALUE(ro_result) TYPE REF TO zif_uom_alv_ida.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS mc_cds_view_name TYPE dbtabl VALUE 'zb_uom'.
CLASS-DATA mo_instance TYPE REF TO zcl_uom_alv_ida.
DATA mo_alv_with_ida TYPE REF TO if_salv_gui_table_ida.
METHODS on_double_click_on_cell FOR EVENT double_click OF if_salv_gui_table_display_opt
IMPORTING
ev_field_name
eo_row_data.
METHODS on_toolbar_function_selected FOR EVENT function_selected OF if_salv_gui_toolbar_ida
IMPORTING ev_fcode.
METHODS create_alv_with_ida.
METHODS provide_select_options
IMPORTING
it_uom_selection TYPE ty_uom_selection
it_language_selection TYPE ty_language_selection.
METHODS activate_text_search.
METHODS activate_layout_persistence.
METHODS register_double_click_event.
METHODS get_row_data
IMPORTING
row_object TYPE REF TO if_salv_gui_row_data_ida
RETURNING
VALUE(rs_result) TYPE zb_uom.
METHODS add_buttons_to_toolbar.
METHODS change_toolbar.
METHODS register_toolbar_event.
ENDCLASS.
CLASS zcl_uom_alv_ida IMPLEMENTATION.
METHOD activate_text_search.
mo_alv_with_ida->standard_functions( )->set_text_search_active( abap_true ).
TRY.
mo_alv_with_ida->field_catalog( )->enable_text_search( 'SHORT_TEXT' ).
mo_alv_with_ida->field_catalog( )->enable_text_search( 'LONG_TEXT' ).
CATCH cx_salv_ida_unknown_name.
CATCH cx_salv_call_after_1st_display.
ENDTRY.
ENDMETHOD.
METHOD activate_layout_persistence.
DATA(ls_persistence_key) = VALUE if_salv_gui_layout_persistence=>ys_persistence_key( report_name = sy-repid
handle = 'ZUOM' ).
TRY.
mo_alv_with_ida->layout_persistence( )->set_persistence_options(
EXPORTING
is_persistence_key = ls_persistence_key
* i_global_save_allowed = ABAP_TRUE
* i_user_specific_save_allowed = ABAP_TRUE
).
CATCH cx_salv_ida_layout_key_invalid.
ENDTRY.
ENDMETHOD.
METHOD constructor.
create_alv_with_ida( ).
provide_select_options( it_uom_selection = it_uom_selection
it_language_selection = it_language_selection ).
activate_text_search( ).
activate_layout_persistence( ).
change_toolbar( ).
register_double_click_event( ).
ENDMETHOD.
METHOD create_alv_with_ida.
TRY.
mo_alv_with_ida = cl_salv_gui_table_ida=>create_for_cds_view(
EXPORTING
iv_cds_view_name = mc_cds_view_name
* io_gui_container =
* io_calc_field_handler =
).
CATCH cx_salv_db_connection.
CATCH cx_salv_db_table_not_supported.
CATCH cx_salv_ida_contract_violation.
CATCH cx_salv_function_not_supported.
ENDTRY.
ENDMETHOD.
METHOD on_double_click_on_cell.
DATA(ls_row_data) = get_row_data( eo_row_data ).
DATA(lv_message_text) = |Double click on field in column { ev_field_name }|.
MESSAGE lv_message_text TYPE 'S'.
ENDMETHOD.
METHOD get_row_data.
TRY.
row_object->get_row_data(
EXPORTING
iv_request_type = if_salv_gui_selection_ida=>cs_request_type-all_fields
* its_requested_fields =
IMPORTING
es_row = rs_result ).
CATCH cx_salv_ida_contract_violation.
CATCH cx_salv_ida_sel_row_deleted.
ENDTRY.
ENDMETHOD.
METHOD provide_select_options.
DATA(lo_collector) = NEW cl_salv_range_tab_collector( ).
lo_collector->add_ranges_for_name( iv_name = 'UNIT_OF_MEASUREMENT'
it_ranges = it_uom_selection ).
lo_collector->add_ranges_for_name( iv_name = 'LANGUAGE'
it_ranges = it_language_selection ).
lo_collector->get_collected_ranges( IMPORTING et_named_ranges = DATA(lt_ranges) ).
TRY.
mo_alv_with_ida->set_select_options(
EXPORTING
it_ranges = lt_ranges
* io_condition =
).
CATCH cx_salv_ida_associate_invalid.
CATCH cx_salv_db_connection.
CATCH cx_salv_ida_condition_invalid.
CATCH cx_salv_ida_unknown_name.
ENDTRY.
ENDMETHOD.
METHOD register_double_click_event.
TRY.
mo_alv_with_ida->selection( )->set_selection_mode( if_salv_gui_selection_ida=>cs_selection_mode-single ).
CATCH cx_salv_ida_contract_violation.
ENDTRY.
mo_alv_with_ida->display_options( )->enable_double_click( ).
SET HANDLER on_double_click_on_cell FOR mo_alv_with_ida->display_options( ).
ENDMETHOD.
METHOD on_toolbar_function_selected.
mo_alv_with_ida->refresh( ).
ENDMETHOD.
METHOD add_buttons_to_toolbar.
mo_alv_with_ida->toolbar( )->add_button( iv_fcode = 'REFRESH'
iv_icon = icon_refresh
iv_is_checked = abap_false
iv_text = space
iv_quickinfo = 'Refresh list'
iv_before_standard_functions = abap_false ).
mo_alv_with_ida->toolbar( )->add_separator( EXPORTING iv_before_standard_functions = abap_true ).
ENDMETHOD.
METHOD change_toolbar.
add_buttons_to_toolbar( ).
register_toolbar_event( ).
ENDMETHOD.
METHOD register_toolbar_event.
SET HANDLER on_toolbar_function_selected FOR mo_alv_with_ida->toolbar( ).
ENDMETHOD.
METHOD zif_uom_alv_ida~display.
TRY.
mo_alv_with_ida->fullscreen( )->display( ).
CATCH cx_salv_ida_contract_violation.
ENDTRY.
ENDMETHOD.
METHOD get_instance.
IF mo_instance IS NOT BOUND.
mo_instance = NEW zcl_uom_alv_ida(
it_uom_selection = it_uom_selection
it_language_selection = it_language_selection ).
ENDIF.
ro_result = mo_instance.
ENDMETHOD.
ENDCLASS.
| 31.13242 | 113 | 0.659284 |
f737554adf6f5300c5ba291f32f1cd634fb72036 | 748 | abap | ABAP | src/zdemos_qrfc_modules.fugr.z_demos_qrfc_mod_process.abap | MDJoerg/Demos_QRFC | fe579ef444dea650ea89b73b7c8fe8a37edfa67a | [
"MIT"
] | null | null | null | src/zdemos_qrfc_modules.fugr.z_demos_qrfc_mod_process.abap | MDJoerg/Demos_QRFC | fe579ef444dea650ea89b73b7c8fe8a37edfa67a | [
"MIT"
] | null | null | null | src/zdemos_qrfc_modules.fugr.z_demos_qrfc_mod_process.abap | MDJoerg/Demos_QRFC | fe579ef444dea650ea89b73b7c8fe8a37edfa67a | [
"MIT"
] | null | null | null | FUNCTION Z_DEMOS_QRFC_MOD_PROCESS.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_DATA) TYPE VTEXT OPTIONAL
*" EXCEPTIONS
*" ERROR_1
*" ERROR_2
*"----------------------------------------------------------------------
* ----------- local data
DATA: lv_rc TYPE i VALUE 0.
DATA: lr_qrfc TYPE REF TO ZCL_DEMOS_QRFC_UTIL.
* ----------- init
lr_qrfc ?= ZCL_DEMOS_QRFC_UTIL=>get_instance( ).
* ----------- process
WAIT UP TO 1 SECONDS.
* ---------- error handling
CASE lv_rc.
WHEN 0.
" OK
WHEN 1.
RAISE error_1.
WHEN 2.
RAISE error_2.
WHEN OTHERS.
lr_qrfc->set_status_retry_later( ).
ENDCASE.
ENDFUNCTION.
| 20.216216 | 72 | 0.48262 |
f73a744e3dbe5e0e7fdbf4a6b423aa20d0b43546 | 23,763 | abap | ABAP | src/ui/zcl_abapgit_gui_router.clas.abap | ElNovi/abapGit | fbe618002093887d023649f77165c6ecbad8c09b | [
"MIT"
] | null | null | null | src/ui/zcl_abapgit_gui_router.clas.abap | ElNovi/abapGit | fbe618002093887d023649f77165c6ecbad8c09b | [
"MIT"
] | null | null | null | src/ui/zcl_abapgit_gui_router.clas.abap | ElNovi/abapGit | fbe618002093887d023649f77165c6ecbad8c09b | [
"MIT"
] | null | null | null | CLASS zcl_abapgit_gui_router DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abapgit_gui_event_handler.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_event_data,
action TYPE string,
prev_page TYPE string,
getdata TYPE string,
postdata TYPE cnht_post_data_tab,
END OF ty_event_data .
METHODS general_page_routing
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS abapgit_services_actions
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS db_actions
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
CLASS-METHODS file_download
IMPORTING
!iv_package TYPE devclass
!iv_xstr TYPE xstring
RAISING
zcx_abapgit_exception .
METHODS git_services
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS remote_origin_manipulations
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS sap_gui_actions
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS zip_services
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS repository_services
IMPORTING
!is_event_data TYPE ty_event_data
EXPORTING
!ei_page TYPE REF TO zif_abapgit_gui_renderable
!ev_state TYPE i
RAISING
zcx_abapgit_exception.
METHODS get_page_diff
IMPORTING
!iv_getdata TYPE clike
RETURNING
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
RAISING
zcx_abapgit_exception .
METHODS get_page_branch_overview
IMPORTING
!iv_getdata TYPE clike
RETURNING
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
RAISING
zcx_abapgit_exception .
METHODS get_page_stage
IMPORTING
!iv_getdata TYPE clike
RETURNING
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
RAISING
zcx_abapgit_exception .
METHODS get_page_background
IMPORTING
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
RETURNING
VALUE(ri_page) TYPE REF TO zif_abapgit_gui_renderable
RAISING
zcx_abapgit_exception .
CLASS-METHODS jump_display_transport
IMPORTING
!iv_getdata TYPE clike
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS zcl_abapgit_gui_router IMPLEMENTATION.
METHOD abapgit_services_actions.
DATA: li_main_page TYPE REF TO zcl_abapgit_gui_page_main.
CASE is_event_data-action.
" ABAPGIT services actions
WHEN zif_abapgit_definitions=>c_action-abapgit_home.
CREATE OBJECT li_main_page.
ei_page = li_main_page.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-abapgit_install. " Install abapGit
zcl_abapgit_services_abapgit=>install_abapgit( ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
ENDCASE.
ENDMETHOD.
METHOD db_actions.
CASE is_event_data-action.
" DB actions
WHEN zif_abapgit_definitions=>c_action-db_edit.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_db_edit
EXPORTING
is_key = zcl_abapgit_html_action_utils=>dbkey_decode( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
IF is_event_data-prev_page = 'PAGE_DB_DIS'.
ev_state = zcl_abapgit_gui=>c_event_state-new_page_replacing.
ENDIF.
WHEN zif_abapgit_definitions=>c_action-db_display.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_db_dis
EXPORTING
is_key = zcl_abapgit_html_action_utils=>dbkey_decode( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ENDCASE.
ENDMETHOD.
METHOD file_download.
DATA:
lv_path TYPE string,
lv_default TYPE string,
li_fe_serv TYPE REF TO zif_abapgit_frontend_services,
lv_package TYPE devclass.
lv_package = iv_package.
TRANSLATE lv_package USING '/#'.
CONCATENATE lv_package '_' sy-datlo '_' sy-timlo INTO lv_default.
li_fe_serv = zcl_abapgit_ui_factory=>get_frontend_services( ).
lv_path = li_fe_serv->show_file_save_dialog(
iv_title = 'Export ZIP'
iv_extension = 'zip'
iv_default_filename = lv_default ).
li_fe_serv->file_download(
iv_path = lv_path
iv_xstr = iv_xstr ).
ENDMETHOD.
METHOD general_page_routing.
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
lv_last_repo_key TYPE zif_abapgit_persistence=>ty_repo-key.
lv_key = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" General PAGE routing
WHEN zcl_abapgit_gui=>c_action-go_home.
IF zcl_abapgit_persist_settings=>get_instance( )->read( )->get_show_default_repo( ) = abap_true.
lv_last_repo_key = zcl_abapgit_persistence_user=>get_instance( )->get_repo_show( ).
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_view_repo
EXPORTING iv_key = lv_last_repo_key.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ELSE.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_main.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ENDIF.
WHEN zif_abapgit_definitions=>c_action-go_repo_overview. " Go Repository overview
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_repo_over.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_db. " Go DB util page
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_db.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_debuginfo.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_debuginfo.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_settings.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_settings.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_background_run. " Go background run page
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_bkg_run.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_background. " Go Background page
ei_page = get_page_background( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_diff. " Go Diff page
ei_page = get_page_diff( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page_w_bookmark.
WHEN zif_abapgit_definitions=>c_action-go_stage. " Go Staging page
ei_page = get_page_stage( is_event_data-getdata ).
IF is_event_data-prev_page = 'PAGE_DIFF'.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ELSE.
ev_state = zcl_abapgit_gui=>c_event_state-new_page_w_bookmark.
ENDIF.
WHEN zif_abapgit_definitions=>c_action-go_branch_overview. " Go repo branch overview
ei_page = get_page_branch_overview( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-go_tutorial. " Go to tutorial
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_tutorial.
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
ENDCASE.
ENDMETHOD.
METHOD get_page_background.
CREATE OBJECT ri_page TYPE zcl_abapgit_gui_page_bkg
EXPORTING
iv_key = iv_key.
ENDMETHOD.
METHOD get_page_branch_overview.
DATA: lo_repo TYPE REF TO zcl_abapgit_repo_online,
lo_page TYPE REF TO zcl_abapgit_gui_page_boverview,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key.
lv_key = iv_getdata.
lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
CREATE OBJECT lo_page
EXPORTING
io_repo = lo_repo.
ri_page = lo_page.
ENDMETHOD.
METHOD get_page_diff.
DATA: ls_file TYPE zif_abapgit_definitions=>ty_file,
ls_object TYPE zif_abapgit_definitions=>ty_item,
lo_page TYPE REF TO zcl_abapgit_gui_page_diff,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key.
zcl_abapgit_html_action_utils=>file_obj_decode(
EXPORTING
iv_string = iv_getdata
IMPORTING
ev_key = lv_key
eg_file = ls_file
eg_object = ls_object ).
CREATE OBJECT lo_page
EXPORTING
iv_key = lv_key
is_file = ls_file
is_object = ls_object.
ri_page = lo_page.
ENDMETHOD.
METHOD get_page_stage.
DATA: lo_repo TYPE REF TO zcl_abapgit_repo_online,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
lv_seed TYPE string,
lo_stage_page TYPE REF TO zcl_abapgit_gui_page_stage,
lo_code_inspector_page TYPE REF TO zcl_abapgit_gui_page_code_insp.
FIND FIRST OCCURRENCE OF '=' IN iv_getdata.
IF sy-subrc <> 0. " Not found ? -> just repo key in params
lv_key = iv_getdata.
ELSE.
zcl_abapgit_html_action_utils=>stage_decode(
EXPORTING iv_getdata = iv_getdata
IMPORTING ev_key = lv_key
ev_seed = lv_seed ).
ENDIF.
lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
IF lo_repo->get_local_settings( )-code_inspector_check_variant IS NOT INITIAL.
CREATE OBJECT lo_code_inspector_page
EXPORTING
io_repo = lo_repo.
ri_page = lo_code_inspector_page.
ELSE.
" force refresh on stage, to make sure the latest local and remote files are used
lo_repo->refresh( ).
CREATE OBJECT lo_stage_page
EXPORTING
io_repo = lo_repo
iv_seed = lv_seed.
ri_page = lo_stage_page.
ENDIF.
ENDMETHOD.
METHOD git_services.
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key.
lv_key = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" GIT actions
WHEN zif_abapgit_definitions=>c_action-git_pull. " GIT Pull
zcl_abapgit_services_git=>pull( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_reset. " GIT Reset
zcl_abapgit_services_git=>reset( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_branch_create. " GIT Create new branch
zcl_abapgit_services_git=>create_branch( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_branch_delete. " GIT Delete remote branch
zcl_abapgit_services_git=>delete_branch( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_branch_switch. " GIT Switch branch
zcl_abapgit_services_git=>switch_branch( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-go_tag_overview. " GIT Tag overview
zcl_abapgit_services_git=>tag_overview( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_tag_create. " GIT Tag create
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_tag
EXPORTING
io_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-git_tag_delete. " GIT Tag create
zcl_abapgit_services_git=>delete_tag( lv_key ).
zcl_abapgit_services_repo=>refresh( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-git_tag_switch. " GIT Switch Tag
zcl_abapgit_services_git=>switch_tag( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
ENDCASE.
ENDMETHOD.
METHOD jump_display_transport.
DATA: lv_transport TYPE trkorr,
lv_transport_adt_uri TYPE string,
lv_adt_link TYPE string,
lv_adt_jump_enabled TYPE abap_bool.
lv_transport = iv_getdata.
lv_adt_jump_enabled = zcl_abapgit_persist_settings=>get_instance( )->read( )->get_adt_jump_enabled( ).
IF lv_adt_jump_enabled = abap_true.
TRY.
CALL METHOD ('CL_CTS_ADT_TM_URI_BUILDER')=>('CREATE_ADT_URI')
EXPORTING
trnumber = lv_transport
RECEIVING
result = lv_transport_adt_uri.
lv_adt_link = |adt://{ sy-sysid }{ lv_transport_adt_uri }|.
cl_gui_frontend_services=>execute( EXPORTING document = lv_adt_link
EXCEPTIONS OTHERS = 1 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'ADT Jump Error' ).
ENDIF.
CATCH cx_root.
CALL FUNCTION 'TR_DISPLAY_REQUEST'
EXPORTING
i_trkorr = lv_transport.
ENDTRY.
ELSE.
CALL FUNCTION 'TR_DISPLAY_REQUEST'
EXPORTING
i_trkorr = lv_transport.
ENDIF.
ENDMETHOD.
METHOD remote_origin_manipulations.
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key.
lv_key = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" Remote ORIGIN manipulations
WHEN zif_abapgit_definitions=>c_action-repo_remote_attach. " Remote attach
zcl_abapgit_services_repo=>remote_attach( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_remote_detach. " Remote detach
zcl_abapgit_services_repo=>remote_detach( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_remote_change. " Remote change
zcl_abapgit_services_repo=>remote_change( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
ENDCASE.
ENDMETHOD.
METHOD repository_services.
DATA: lv_url TYPE string,
lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
li_log TYPE REF TO zif_abapgit_log.
lv_key = is_event_data-getdata. " TODO refactor
lv_url = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" REPOSITORY services actions
WHEN zif_abapgit_definitions=>c_action-repo_newoffline. " New offline repo
zcl_abapgit_services_repo=>new_offline( ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_add_all_obj_to_trans_req.
zcl_abapgit_transport=>add_all_objects_to_trans_req( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_refresh. " Repo refresh
zcl_abapgit_services_repo=>refresh( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_syntax_check.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_syntax
EXPORTING
io_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-repo_code_inspector.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_code_insp
EXPORTING
io_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-repo_purge. " Repo remove & purge all objects
zcl_abapgit_services_repo=>purge( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_remove. " Repo remove
zcl_abapgit_services_repo=>remove( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_newonline.
zcl_abapgit_services_repo=>new_online( lv_url ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_refresh_checksums. " Rebuild local checksums
zcl_abapgit_services_repo=>refresh_local_checksums( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_toggle_fav. " Toggle repo as favorite
zcl_abapgit_services_repo=>toggle_favorite( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_transport_to_branch.
zcl_abapgit_services_repo=>transport_to_branch( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-repo_settings.
CREATE OBJECT ei_page TYPE zcl_abapgit_gui_page_repo_sett
EXPORTING
io_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-new_page.
WHEN zif_abapgit_definitions=>c_action-repo_log.
li_log = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key )->get_log( ).
zcl_abapgit_log_viewer=>show_log( ii_log = li_log
iv_header_text = li_log->get_title( ) ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
ENDCASE.
ENDMETHOD.
METHOD sap_gui_actions.
DATA: ls_item TYPE zif_abapgit_definitions=>ty_item.
CASE is_event_data-action.
" SAP GUI actions
WHEN zif_abapgit_definitions=>c_action-jump. " Open object editor
zcl_abapgit_html_action_utils=>jump_decode(
EXPORTING iv_string = is_event_data-getdata
IMPORTING ev_obj_type = ls_item-obj_type
ev_obj_name = ls_item-obj_name ).
zcl_abapgit_objects=>jump( ls_item ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
WHEN zif_abapgit_definitions=>c_action-jump_transport.
jump_display_transport( is_event_data-getdata ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
ENDCASE.
ENDMETHOD.
METHOD zif_abapgit_gui_event_handler~on_event.
DATA: ls_event_data TYPE ty_event_data.
ls_event_data-action = iv_action.
ls_event_data-getdata = iv_getdata.
ls_event_data-postdata = it_postdata.
general_page_routing(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
repository_services(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
git_services(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
zip_services(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
db_actions(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
abapgit_services_actions(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
remote_origin_manipulations(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
sap_gui_actions(
EXPORTING
is_event_data = ls_event_data
IMPORTING
ei_page = ei_page
ev_state = ev_state ).
IF ev_state IS INITIAL.
ev_state = zcl_abapgit_gui=>c_event_state-not_handled.
ENDIF.
ENDMETHOD.
METHOD zip_services.
DATA: lv_key TYPE zif_abapgit_persistence=>ty_repo-key,
lo_repo TYPE REF TO zcl_abapgit_repo,
lv_package TYPE devclass,
lv_path TYPE string,
lv_xstr TYPE xstring.
lv_key = is_event_data-getdata. " TODO refactor
CASE is_event_data-action.
" ZIP services actions
WHEN zif_abapgit_definitions=>c_action-zip_import. " Import repo from ZIP
lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
lv_path = zcl_abapgit_ui_factory=>get_frontend_services( )->show_file_open_dialog(
iv_title = 'Import ZIP'
iv_extension = 'zip'
iv_default_filename = '*.zip' ).
lv_xstr = zcl_abapgit_ui_factory=>get_frontend_services( )->file_upload( lv_path ).
lo_repo->set_files_remote( zcl_abapgit_zip=>load( lv_xstr ) ).
zcl_abapgit_services_repo=>refresh( lv_key ).
ev_state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN zif_abapgit_definitions=>c_action-zip_export. " Export repo as ZIP
lo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( lv_key ).
lv_xstr = zcl_abapgit_zip=>export( lo_repo ).
file_download( iv_package = lo_repo->get_package( )
iv_xstr = lv_xstr ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
WHEN zif_abapgit_definitions=>c_action-zip_package. " Export package as ZIP
zcl_abapgit_zip=>export_package( IMPORTING
ev_xstr = lv_xstr
ev_package = lv_package ).
file_download( iv_package = lv_package
iv_xstr = lv_xstr ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
WHEN zif_abapgit_definitions=>c_action-zip_transport. " Export transports as ZIP
zcl_abapgit_transport_mass=>run( ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
WHEN zif_abapgit_definitions=>c_action-zip_object. " Export object as ZIP
zcl_abapgit_zip=>export_object( ).
ev_state = zcl_abapgit_gui=>c_event_state-no_more_act.
ENDCASE.
ENDMETHOD.
ENDCLASS.
| 35.733835 | 111 | 0.671548 |
f73c1491937fabc719756680162f0701848a2cfb | 24,158 | abap | ABAP | day09/task2.abap | julianschmuckli/adventofcode_2020 | 18c6aa2014f1994a9cccb36346bf52a46038242e | [
"Apache-2.0"
] | 1 | 2020-12-04T14:41:29.000Z | 2020-12-04T14:41:29.000Z | day09/task2.abap | julianschmuckli/adventofcode_2020 | 18c6aa2014f1994a9cccb36346bf52a46038242e | [
"Apache-2.0"
] | null | null | null | day09/task2.abap | julianschmuckli/adventofcode_2020 | 18c6aa2014f1994a9cccb36346bf52a46038242e | [
"Apache-2.0"
] | null | null | null | TYPES: BEGIN OF t_input,
row TYPE string,
END OF t_input.
* Input declaration
DATA: lv_input TYPE TABLE OF t_input,
wa_input LIKE LINE OF lv_input.
* Assign with the puzzle input.
lv_input = VALUE #(
( row = '33' )
( row = '18' )
( row = '22' )
( row = '44' )
( row = '49' )
( row = '15' )
( row = '12' )
( row = '38' )
( row = '41' )
( row = '46' )
( row = '3' )
( row = '42' )
( row = '37' )
( row = '19' )
( row = '13' )
( row = '7' )
( row = '21' )
( row = '29' )
( row = '34' )
( row = '40' )
( row = '39' )
( row = '35' )
( row = '27' )
( row = '25' )
( row = '48' )
( row = '87' )
( row = '10' )
( row = '16' )
( row = '17' )
( row = '45' )
( row = '18' )
( row = '30' )
( row = '20' )
( row = '22' )
( row = '23' )
( row = '73' )
( row = '24' )
( row = '26' )
( row = '28' )
( row = '53' )
( row = '31' )
( row = '37' )
( row = '51' )
( row = '32' )
( row = '33' )
( row = '34' )
( row = '36' )
( row = '35' )
( row = '54' )
( row = '27' )
( row = '38' )
( row = '39' )
( row = '40' )
( row = '74' )
( row = '70' )
( row = '41' )
( row = '93' )
( row = '144' )
( row = '45' )
( row = '63' )
( row = '87' )
( row = '66' )
( row = '65' )
( row = '55' )
( row = '58' )
( row = '62' )
( row = '72' )
( row = '105' )
( row = '59' )
( row = '76' )
( row = '61' )
( row = '67' )
( row = '68' )
( row = '77' )
( row = '106' )
( row = '78' )
( row = '79' )
( row = '183' )
( row = '86' )
( row = '117' )
( row = '96' )
( row = '100' )
( row = '108' )
( row = '104' )
( row = '123' )
( row = '113' )
( row = '114' )
( row = '116' )
( row = '129' )
( row = '119' )
( row = '178' )
( row = '120' )
( row = '196' )
( row = '126' )
( row = '177' )
( row = '184' )
( row = '135' )
( row = '182' )
( row = '192' )
( row = '201' )
( row = '174' )
( row = '360' )
( row = '186' )
( row = '190' )
( row = '210' )
( row = '248' )
( row = '214' )
( row = '282' )
( row = '217' )
( row = '227' )
( row = '229' )
( row = '304' )
( row = '235' )
( row = '370' )
( row = '308' )
( row = '261' )
( row = '302' )
( row = '300' )
( row = '542' )
( row = '376' )
( row = '309' )
( row = '317' )
( row = '356' )
( row = '364' )
( row = '375' )
( row = '407' )
( row = '396' )
( row = '400' )
( row = '404' )
( row = '585' )
( row = '599' )
( row = '514' )
( row = '444' )
( row = '907' )
( row = '456' )
( row = '633' )
( row = '687' )
( row = '496' )
( row = '665' )
( row = '561' )
( row = '563' )
( row = '832' )
( row = '1056' )
( row = '626' )
( row = '673' )
( row = '681' )
( row = '720' )
( row = '731' )
( row = '840' )
( row = '819' )
( row = '796' )
( row = '800' )
( row = '1033' )
( row = '1117' )
( row = '900' )
( row = '958' )
( row = '940' )
( row = '952' )
( row = '1017' )
( row = '1019' )
( row = '1748' )
( row = '1177' )
( row = '1422' )
( row = '1124' )
( row = '1578' )
( row = '1189' )
( row = '1299' )
( row = '1678' )
( row = '1307' )
( row = '1354' )
( row = '2702' )
( row = '2476' )
( row = '1689' )
( row = '3775' )
( row = '1740' )
( row = '2813' )
( row = '2706' )
( row = '1977' )
( row = '1898' )
( row = '1840' )
( row = '2630' )
( row = '2864' )
( row = '1971' )
( row = '2439' )
( row = '2143' )
( row = '2932' )
( row = '2301' )
( row = '2313' )
( row = '2423' )
( row = '2488' )
( row = '2496' )
( row = '3194' )
( row = '2661' )
( row = '2996' )
( row = '3043' )
( row = '4416' )
( row = '3429' )
( row = '3529' )
( row = '3580' )
( row = '3638' )
( row = '3738' )
( row = '3983' )
( row = '4830' )
( row = '3811' )
( row = '4114' )
( row = '4724' )
( row = '5782' )
( row = '4394' )
( row = '4444' )
( row = '7143' )
( row = '6623' )
( row = '6882' )
( row = '7267' )
( row = '5149' )
( row = '7823' )
( row = '5855' )
( row = '5657' )
( row = '5704' )
( row = '6425' )
( row = '7026' )
( row = '6958' )
( row = '9666' )
( row = '7109' )
( row = '7218' )
( row = '10249' )
( row = '8535' )
( row = '7794' )
( row = '11512' )
( row = '14327' )
( row = '9969' )
( row = '15906' )
( row = '8838' )
( row = '10101' )
( row = '9593' )
( row = '12082' )
( row = '10806' )
( row = '10853' )
( row = '13451' )
( row = '17489' )
( row = '13073' )
( row = '11361' )
( row = '12129' )
( row = '17210' )
( row = '13383' )
( row = '13984' )
( row = '30562' )
( row = '16329' )
( row = '14903' )
( row = '15753' )
( row = '19306' )
( row = '16632' )
( row = '23920' )
( row = '26456' )
( row = '26113' )
( row = '18431' )
( row = '27032' )
( row = '19644' )
( row = '27882' )
( row = '20399' )
( row = '37885' )
( row = '21659' )
( row = '27976' )
( row = '24812' )
( row = '23490' )
( row = '24744' )
( row = '25345' )
( row = '25512' )
( row = '42785' )
( row = '27367' )
( row = '29737' )
( row = '30656' )
( row = '45579' )
( row = '31535' )
( row = '32385' )
( row = '35063' )
( row = '52788' )
( row = '38075' )
( row = '38830' )
( row = '44544' )
( row = '40090' )
( row = '40043' )
( row = '55249' )
( row = '57897' )
( row = '42058' )
( row = '45149' )
( row = '52712' )
( row = '48234' )
( row = '48302' )
( row = '72946' )
( row = '50089' )
( row = '64342' )
( row = '52879' )
( row = '103551' )
( row = '57104' )
( row = '72428' )
( row = '62191' )
( row = '79837' )
( row = '63920' )
( row = '71215' )
( row = '73138' )
( row = '80133' )
( row = '84587' )
( row = '82148' )
( row = '156430' )
( row = '90132' )
( row = '152323' )
( row = '113146' )
( row = '90360' )
( row = '197733' )
( row = '100946' )
( row = '105591' )
( row = '101113' )
( row = '98391' )
( row = '288093' )
( row = '154280' )
( row = '109983' )
( row = '204497' )
( row = '164424' )
( row = '152975' )
( row = '137058' )
( row = '126111' )
( row = '191473' )
( row = '181079' )
( row = '144353' )
( row = '153271' )
( row = '170265' )
( row = '166735' )
( row = '183261' )
( row = '180492' )
( row = '188523' )
( row = '236094' )
( row = '235449' )
( row = '188751' )
( row = '202059' )
( row = '262815' )
( row = '305610' )
( row = '199504' )
( row = '208374' )
( row = '247041' )
( row = '312042' )
( row = '254336' )
( row = '440591' )
( row = '353175' )
( row = '442859' )
( row = '263169' )
( row = '270464' )
( row = '616344' )
( row = '297624' )
( row = '311088' )
( row = '320006' )
( row = '402829' )
( row = '377274' )
( row = '363753' )
( row = '369015' )
( row = '501377' )
( row = '388255' )
( row = '390810' )
( row = '397125' )
( row = '401563' )
( row = '407878' )
( row = '446545' )
( row = '455415' )
( row = '471543' )
( row = '732768' )
( row = '524800' )
( row = '751679' )
( row = '1043856' )
( row = '533633' )
( row = '626922' )
( row = '568088' )
( row = '581552' )
( row = '608712' )
( row = '699343' )
( row = '631094' )
( row = '697280' )
( row = '779065' )
( row = '926958' )
( row = '921925' )
( row = '868668' )
( row = '785380' )
( row = '969651' )
( row = '856978' )
( row = '798688' )
( row = '809441' )
( row = '989430' )
( row = '901960' )
( row = '1036967' )
( row = '996343' )
( row = '1285312' )
( row = '1133512' )
( row = '1101721' )
( row = '1195010' )
( row = '1115185' )
( row = '1149640' )
( row = '1330437' )
( row = '1911355' )
( row = '1239806' )
( row = '1328374' )
( row = '1912577' )
( row = '1476345' )
( row = '3239729' )
( row = '1654048' )
( row = '1655666' )
( row = '1594821' )
( row = '1584068' )
( row = '1608129' )
( row = '1758938' )
( row = '1700648' )
( row = '1711401' )
( row = '2365341' )
( row = '1898303' )
( row = '2895658' )
( row = '2098064' )
( row = '2216906' )
( row = '4654596' )
( row = '3293074' )
( row = '2769233' )
( row = '2354991' )
( row = '3039775' )
( row = '2834627' )
( row = '3238116' )
( row = '3810880' )
( row = '3132011' )
( row = '3060413' )
( row = '3178889' )
( row = '3284716' )
( row = '3192197' )
( row = '3202950' )
( row = '3295469' )
( row = '4253294' )
( row = '3928307' )
( row = '3412049' )
( row = '4720332' )
( row = '4993722' )
( row = '4867297' )
( row = '3996367' )
( row = '4571897' )
( row = '8152013' )
( row = '4986139' )
( row = '5124224' )
( row = '5189618' )
( row = '6472462' )
( row = '5394766' )
( row = '5874402' )
( row = '5895040' )
( row = '7003077' )
( row = '6192424' )
( row = '7385305' )
( row = '8181601' )
( row = '6476913' )
( row = '6395147' )
( row = '6487666' )
( row = '8716699' )
( row = '6707518' )
( row = '7408416' )
( row = '8398188' )
( row = '7983946' )
( row = '8568264' )
( row = '8863664' )
( row = '8982506' )
( row = '9120591' )
( row = '13184431' )
( row = '10860541' )
( row = '10110363' )
( row = '10313842' )
( row = '10584384' )
( row = '11289806' )
( row = '15470172' )
( row = '11769442' )
( row = '12382706' )
( row = '16579789' )
( row = '15056088' )
( row = '12872060' )
( row = '13896082' )
( row = '12964579' )
( row = '13102665' )
( row = '25185888' )
( row = '24474237' )
( row = '14115934' )
( row = '20633106' )
( row = '16382134' )
( row = '16552210' )
( row = '23098440' )
( row = '19092869' )
( row = '18103097' )
( row = '24209924' )
( row = '24392471' )
( row = '27842016' )
( row = '24254385' )
( row = '28687481' )
( row = '24152148' )
( row = '23059248' )
( row = '38150467' )
( row = '24641502' )
( row = '25347285' )
( row = '25836639' )
( row = '42357482' )
( row = '36023827' )
( row = '26067244' )
( row = '27080513' )
( row = '35645079' )
( row = '49033973' )
( row = '30498068' )
( row = '39463219' )
( row = '42619454' )
( row = '32934344' )
( row = '34655307' )
( row = '29221323' )
( row = '37195966' )
( row = '60665329' )
( row = '62725592' )
( row = '47313633' )
( row = '50901264' )
( row = '47211396' )
( row = '82958712' )
( row = '47700750' )
( row = '48406533' )
( row = '49988787' )
( row = '50708746' )
( row = '51183924' )
( row = '51903883' )
( row = '53147757' )
( row = '88497192' )
( row = '77789259' )
( row = '56301836' )
( row = '86546343' )
( row = '67694034' )
( row = '59719391' )
( row = '70130310' )
( row = '81340877' )
( row = '101892670' )
( row = '63876630' )
( row = '66417289' )
( row = '84407362' )
( row = '96107283' )
( row = '94525029' )
( row = '146096070' )
( row = '94912146' )
( row = '95617929' )
( row = '103087807' )
( row = '101554290' )
( row = '180025291' )
( row = '103136544' )
( row = '102612629' )
( row = '110903315' )
( row = '105051640' )
( row = '109449593' )
( row = '116021227' )
( row = '120178466' )
( row = '122719125' )
( row = '178932391' )
( row = '197661573' )
( row = '123596021' )
( row = '167971579' )
( row = '130293919' )
( row = '283113098' )
( row = '199576669' )
( row = '245349680' )
( row = '199243827' )
( row = '189437175' )
( row = '213515944' )
( row = '190530075' )
( row = '196466436' )
( row = '197172219' )
( row = '233045614' )
( row = '390106744' )
( row = '223315010' )
( row = '225331754' )
( row = '207664269' )
( row = '214501233' )
( row = '396748888' )
( row = '225470820' )
( row = '291567600' )
( row = '312156300' )
( row = '478395294' )
( row = '343809863' )
( row = '253889940' )
( row = '298265498' )
( row = '509328519' )
( row = '319731094' )
( row = '472550273' )
( row = '379967250' )
( row = '385903611' )
( row = '386609394' )
( row = '479221694' )
( row = '711440908' )
( row = '545201914' )
( row = '393638655' )
( row = '629794502' )
( row = '422165502' )
( row = '439972053' )
( row = '680214542' )
( row = '461554209' )
( row = '433135089' )
( row = '468391173' )
( row = '1024423608' )
( row = '479360760' )
( row = '545457540' )
( row = '552155438' )
( row = '854294784' )
( row = '573621034' )
( row = '617996592' )
( row = '678232748' )
( row = '705634705' )
( row = '699698344' )
( row = '938840569' )
( row = '773605905' )
( row = '772513005' )
( row = '780248049' )
( row = '815804157' )
( row = '1170152030' )
( row = '826773744' )
( row = '855192864' )
( row = '1418201329' )
( row = '862137555' )
( row = '1794033433' )
( row = '1024818300' )
( row = '894689298' )
( row = '1051131681' )
( row = '1163454132' )
( row = '1031516198' )
( row = '1052981794' )
( row = '1119078574' )
( row = '1125776472' )
( row = '1191617626' )
( row = '1450745753' )
( row = '1485882754' )
( row = '1377931092' )
( row = '1405333049' )
( row = '1472211349' )
( row = '2266130803' )
( row = '1546118910' )
( row = '1552761054' )
( row = '2576522225' )
( row = '1642577901' )
( row = '1717330419' )
( row = '1681966608' )
( row = '1749882162' )
( row = '2300022347' )
( row = '1886955855' )
( row = '2216435926' )
( row = '1919507598' )
( row = '2242749307' )
( row = '2084497992' )
( row = '2150594772' )
( row = '2157292670' )
( row = '2172060368' )
( row = '2244855046' )
( row = '2317394098' )
( row = '2569548718' )
( row = '2891215803' )
( row = '2783264141' )
( row = '2850142441' )
( row = '2877544398' )
( row = '3762554836' )
( row = '3098879964' )
( row = '4533830024' )
( row = '3195338955' )
( row = '4384520339' )
( row = '5066578367' )
( row = '3399297027' )
( row = '3568922463' )
( row = '3636838017' )
( row = '8170668041' )
( row = '6514382415' )
( row = '4373728596' )
( row = '4467988870' )
( row = '4322655140' )
( row = '6446466861' )
( row = '4307887442' )
( row = '5674479944' )
( row = '4416915414' )
( row = '7406767406' )
( row = '5100658239' )
( row = '5352812859' )
( row = '5978603096' )
( row = '7105919281' )
( row = '6498176991' )
( row = '8669580702' )
( row = '6294218919' )
( row = '6735717981' )
( row = '11048212439' )
( row = '8021358356' )
( row = '6968219490' )
( row = '11573908151' )
( row = '7036135044' )
( row = '7205760480' )
( row = '7944725459' )
( row = '9423313379' )
( row = '8630542582' )
( row = '8790644010' )
( row = '17868127070' )
( row = '8724802856' )
( row = '9408545681' )
( row = '9982367386' )
( row = '10453471098' )
( row = '9517573653' )
( row = '11079261335' )
( row = '12792395910' )
( row = '18253972919' )
( row = '12272822015' )
( row = '13400138200' )
( row = '13233894972' )
( row = '13029936900' )
( row = '13262438409' )
( row = '14912944949' )
( row = '14004354534' )
( row = '27677286298' )
( row = '17188127866' )
( row = '20436273244' )
( row = '14241895524' )
( row = '21790395668' )
( row = '20502574714' )
( row = '17421186592' )
( row = '19499941039' )
( row = '17515446866' )
( row = '25912930722' )
( row = '23687366070' )
( row = '18926119334' )
( row = '20435838484' )
( row = '25672960215' )
( row = '24109198235' )
( row = '44865414164' )
( row = '25065217925' )
( row = '25302758915' )
( row = '25506716987' )
( row = '26263831872' )
( row = '30683625001' )
( row = '27034291434' )
( row = '27504333933' )
( row = '28246250058' )
( row = '31192482400' )
( row = '48104811593' )
( row = '36921127631' )
( row = '33168014858' )
( row = '31663082116' )
( row = '42486404517' )
( row = '34936633458' )
( row = '43188407081' )
( row = '50683461724' )
( row = '36441566200' )
( row = '43991337259' )
( row = '81786541795' )
( row = '39361957818' )
( row = '44545036719' )
( row = '49174416160' )
( row = '49411957150' )
( row = '61876107401' )
( row = '50367976840' )
( row = '53549008973' )
( row = '51770548859' )
( row = '53298123306' )
( row = '54538625367' )
( row = '55280541492' )
( row = '59909332174' )
( row = '84348590608' )
( row = '87706640225' )
( row = '64831096974' )
( row = '82346543840' )
( row = '71025039934' )
( row = '66599715574' )
( row = '71378199658' )
( row = '126331578514' )
( row = '75803524018' )
( row = '121746176498' )
( row = '93956993869' )
( row = '115923236377' )
( row = '89729934658' )
( row = '83906994537' )
( row = '93719452879' )
( row = '143131410029' )
( row = '99779933990' )
( row = '102138525699' )
( row = '136119139467' )
( row = '125563665301' )
( row = '106309174226' )
( row = '107836748673' )
( row = '109819166859' )
( row = '115189873666' )
( row = '126509047748' )
( row = '185622690877' )
( row = '147177640814' )
( row = '131430812548' )
( row = '287761216576' )
( row = '137624755508' )
( row = '192931294088' )
( row = '165533458676' )
( row = '159710518555' )
( row = '177626447416' )
( row = '201793742542' )
( row = '173636929195' )
( row = '183449387537' )
( row = '183686928527' )
( row = '186045520236' )
( row = '193499386869' )
( row = '206089108216' )
( row = '217655915532' )
( row = '208447699925' )
( row = '407882850758' )
( row = '423745023748' )
( row = '232818221974' )
( row = '239267561221' )
( row = '300145976943' )
( row = '241698921414' )
( row = '314880200085' )
( row = '269055568056' )
( row = '330627028351' )
( row = '291141331103' )
( row = '353209905424' )
( row = '343159906092' )
( row = '392134628452' )
( row = '325243977231' )
( row = '351263376611' )
( row = '363671967652' )
( row = '357086316732' )
( row = '416505150501' )
( row = '367136316064' )
( row = '399588495085' )
( row = '394493220161' )
( row = '745756596772' )
( row = '414536808141' )
( row = '426103615457' )
( row = '441265921899' )
( row = '472085783195' )
( row = '584858827506' )
( row = '474517143388' )
( row = '592477466645' )
( row = '709373420246' )
( row = '510754489470' )
( row = '783641466565' )
( row = '560196899159' )
( row = '841653459452' )
( row = '616385308334' )
( row = '694423282703' )
( row = '719737197392' )
( row = '676507353842' )
( row = '886622591336' )
( row = '720758284384' )
( row = '724222632796' )
( row = '1071000574003' )
( row = '810998370662' )
( row = '1010962442963' )
( row = '794081715246' )
( row = '1208618523387' )
( row = '1150639342145' )
( row = '1001462821058' )
( row = '867369537356' )
( row = '915783065287' )
( row = '946602926583' )
( row = '985271632858' )
( row = '1034714042547' )
( row = '1176582207493' )
( row = '1070951388629' )
( row = '1127139797804' )
( row = '1587106734748' )
( row = '1812461191720' )
( row = '2502889800035' )
( row = '1292892662176' )
( row = '1370930636545' )
( row = '1396244551234' )
( row = '1607380875720' )
( row = '3537603842582' )
( row = '1444980917180' )
( row = '1795174021425' )
( row = '1938370111359' )
( row = '1661451252602' )
( row = '1709864780533' )
( row = '2086974377422' )
( row = '1950497107834' )
( row = '1813972463939' )
( row = '1783152602643' )
( row = '2105665431176' )
( row = '1986734453916' )
( row = '1931874559441' )
( row = '2019985675405' )
( row = '3108456766934' )
( row = '2198091186433' )
( row = '2788591050406' )
( row = '2420032459980' )
( row = '2689137213410' )
( row = '3769887056559' )
( row = '4136461297792' )
( row = '2663823298721' )
( row = '2767175187779' )
( row = '3003625426954' )
( row = '4056162539010' )
( row = '3106432169782' )
( row = '3228133519823' )
( row = '3371316033135' )
( row = '3733649710477' )
( row = '4887228399843' )
( row = '3493017383176' )
( row = '3597125066582' )
( row = '5109290858130' )
( row = '3803138278048' )
( row = '5917270733233' )
( row = '4125651106581' )
( row = '3951860234846' )
( row = '4129965745874' )
( row = '4218076861838' )
( row = '4618123646413' )
( row = '4861914485154' )
( row = '5109169673390' )
( row = '7773114156851' )
( row = '6156840681897' )
( row = '6840081880259' )
( row = '5430998486500' )
( row = '5667448725675' )
( row = '6500824898256' )
( row = '6110057596736' )
( row = '6721150902999' )
( row = '10235708703317' )
( row = '7446210381661' )
( row = '6968441099717' )
( row = '7090142449758' )
( row = '8743774752994' )
( row = '7296155661224' )
( row = '7400263344630' )
( row = '8912307951438' )
( row = '8665052763202' )
( row = '8077511341427' )
( row = '8081825980720' )
( row = '9079991346992' )
( row = '15069148633335' )
( row = '10374917543735' )
( row = '13510320941366' )
( row = '9971084158544' )
( row = '11219227270126' )
( row = '14917593221686' )
( row = '12271080366759' )
( row = '11098447212175' )
( row = '12168273623931' )
( row = '11777506322411' )
( row = '12610882494992' )
( row = '12831208499735' )
( row = '13689592002716' )
( row = '14058583549475' )
( row = '14264596760941' )
( row = '14368704444347' )
( row = '14386298110982' )
( row = '14696419005854' )
( row = '23369527578934' )
( row = '20231471844365' )
( row = '16159337322147' )
( row = '24824390085349' )
( row = '25915646275980' )
( row = '26997180605974' )
( row = '25678594565297' )
( row = '22242164525303' )
( row = '22802292658279' )
( row = '22139357782475' )
( row = '21069531370719' )
( row = '22317674482301' )
( row = '22875953534586' )
( row = '25442090994727' )
( row = '28961015766795' )
( row = '25836089871886' )
( row = '26042103083352' )
( row = '26300474497708' )
( row = '40284350720327' )
( row = '28755002555329' )
( row = '28323180310416' )
( row = '35334128131660' )
( row = '51203180292098' )
( row = '36525655893457' )
( row = '45044457183582' )
( row = '45193628016887' )
( row = '36390809166512' )
( row = '42074983598127' )
( row = '48153764354187' )
( row = '43311695896022' )
( row = '49176428032294' )
( row = '43208889153194' )
( row = '43387205853020' )
( row = '43871824028998' )
( row = '44457032264776' )
( row = '73989854226073' )
( row = '47759765477028' )
( row = '48318044529313' )
( row = '51278180866613' )
( row = '54591092427215' )
( row = '69044979025080' )
( row = '52342577581060' )
( row = '54623654808124' )
( row = '57078182865745' )
( row = '76082945787444' )
( row = '92610796618963' )
( row = '71724937298172' )
( row = '72916465059969' )
( row = '78465792764639' )
( row = '79599698319706' )
( row = '81584437183399' )
( row = '79702505062534' )
( row = '122092893092263' )
( row = '86596095006214' )
( row = '86520585049216' )
( row = '87080713182192' )
( row = '96799609845836' )
( row = '87259029882018' )
( row = '99080687072900' ) ).
DATA: lv_checked TYPE abap_bool VALUE abap_false,
lv_current_index TYPE i VALUE 0.
" Task 1
LOOP AT lv_input INTO wa_input.
IF lines( lv_input ) GE ( sy-tabix + 25 ).
lv_checked = abap_false.
lv_current_index = sy-tabix + 25.
READ TABLE lv_input INTO DATA(wa_cur_result) INDEX lv_current_index.
" Go through the preamble
DO 25 TIMES.
DATA(lv_cur_index_a) = sy-index.
DO 25 TIMES.
DATA(lv_cur_index_b) = sy-index.
READ TABLE lv_input INTO DATA(lv_number_a) INDEX lv_current_index - lv_cur_index_a.
READ TABLE lv_input INTO DATA(lv_number_b) INDEX lv_current_index - lv_cur_index_b.
DATA(lv_check_result) = lv_number_a-row + lv_number_b-row.
IF lv_check_result EQ wa_cur_result-row.
lv_checked = abap_true.
EXIT.
ENDIF.
ENDDO.
IF lv_checked EQ abap_true.
EXIT.
ENDIF.
ENDDO.
IF lv_checked EQ abap_false.
WRITE: 'Task 1 - Found value: ' && wa_cur_result-row.
EXIT.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDLOOP.
" Task 2
LOOP AT lv_input INTO DATA(wa_input_a).
DATA(lv_cur_range) = sy-tabix.
LOOP AT lv_input INTO DATA(wa_input_b).
DATA(lv_cur_range_sum) = 0.
DATA(lv_cur_range_index) = sy-tabix.
DO lv_cur_range TIMES.
READ TABLE lv_input INTO DATA(lv_cur_num) INDEX ( sy-index + lv_cur_range_index - 1 ).
IF sy-index EQ 1.
DATA(lv_cur_range_start) = lv_cur_num-row.
ENDIF.
lv_cur_range_sum = lv_cur_range_sum + lv_cur_num-row.
ENDDO.
DATA(lv_cur_range_end) = lv_cur_num-row.
IF lv_cur_range_sum EQ wa_cur_result-row.
EXIT.
ENDIF.
ENDLOOP.
IF lv_cur_range_sum EQ wa_cur_result-row.
EXIT.
ENDIF.
ENDLOOP.
DATA(lv_result) = lv_cur_range_start + lv_cur_range_end.
WRITE: 'Task 2 - Found range sum: ' && lv_result && ' (' && lv_cur_range_start && '-' && lv_cur_range_start && ')'.
| 22.451673 | 115 | 0.515067 |
f73c7613195632d2c87c14333d7e5b6272d854ea | 1,039 | abap | ABAP | src/zcx_idoc_data_not_for_send.clas.abap | engswee/equalize-idoc-framework | 0d08659a9633d7c54be5da959d7839ce4c38fb8f | [
"MIT"
] | 1 | 2019-04-23T07:12:21.000Z | 2019-04-23T07:12:21.000Z | src/zcx_idoc_data_not_for_send.clas.abap | engswee/equalize-idoc-framework | 0d08659a9633d7c54be5da959d7839ce4c38fb8f | [
"MIT"
] | null | null | null | src/zcx_idoc_data_not_for_send.clas.abap | engswee/equalize-idoc-framework | 0d08659a9633d7c54be5da959d7839ce4c38fb8f | [
"MIT"
] | null | null | null | class ZCX_IDOC_DATA_NOT_FOR_SEND definition
public
inheriting from CX_STATIC_CHECK
final
create public .
public section.
*"* public components of class ZCX_IDOC_DATA_NOT_FOR_SEND
*"* do not include other source files here!!!
constants ZCX_IDOC_DATA_NOT_FOR_SEND type SOTR_CONC value '00505697691A1ED98BBA9DB88013C51D' ##NO_TEXT.
data MSG type STRING .
methods CONSTRUCTOR
importing
!TEXTID like TEXTID optional
!PREVIOUS like PREVIOUS optional
!MSG type STRING optional .
protected section.
*"* protected components of class ZCX_IDOC_DATA_NOT_FOR_SEND
*"* do not include other source files here!!!
private section.
*"* private components of class ZCX_IDOC_DATA_NOT_FOR_SEND
*"* do not include other source files here!!!
ENDCLASS.
CLASS ZCX_IDOC_DATA_NOT_FOR_SEND IMPLEMENTATION.
method CONSTRUCTOR.
CALL METHOD SUPER->CONSTRUCTOR
EXPORTING
TEXTID = TEXTID
PREVIOUS = PREVIOUS
.
IF textid IS INITIAL.
me->textid = ZCX_IDOC_DATA_NOT_FOR_SEND .
ENDIF.
me->MSG = MSG .
endmethod.
ENDCLASS.
| 23.613636 | 105 | 0.775746 |
f73ea22c8aa6ae99a06e4f3304bdf45bd84922b8 | 6,951 | abap | ABAP | final_release/src/zex_f01.abap | abeljohny/ZEX_HTML_EDITOR | a8d43aeae35072ba118e55b987fe16a392fee0b3 | [
"MIT"
] | 2 | 2018-03-12T20:42:22.000Z | 2019-05-06T14:19:10.000Z | final_release/src/zex_f01.abap | abeljohny/ZEX_HTML_EDITOR | a8d43aeae35072ba118e55b987fe16a392fee0b3 | [
"MIT"
] | null | null | null | final_release/src/zex_f01.abap | abeljohny/ZEX_HTML_EDITOR | a8d43aeae35072ba118e55b987fe16a392fee0b3 | [
"MIT"
] | null | null | null | *----------------------------------------------------------------------*
*INCLUDE ZEX_F01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form create_instances
*&---------------------------------------------------------------------*
FORM create_instances .
IF editor IS INITIAL.
* create instance for HTML Editor custom control
CREATE OBJECT editor
EXPORTING
container_name = c_editor
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
IF g_editor IS INITIAL.
* create instance for HTML Editor text editor
CREATE OBJECT g_editor
EXPORTING
wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder
wordwrap_to_linebreak_mode = cl_gui_textedit=>true
parent = editor
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
gui_type_not_supported = 5
OTHERS = 6
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
PERFORM create_viewer_instances.
ENDFORM. " create_instances
*&---------------------------------------------------------------------*
*& Form display_initial
*&---------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM display_initial .
IF html_viewer IS NOT INITIAL.
REFRESH g_text.
APPEND '<HTML><BODY><H4>Press Execute HTML(F5) to view your HTML Output!</H4></BODY></HTML>'
TO g_text.
CALL METHOD html_viewer->load_data
IMPORTING
assigned_url = url
CHANGING
data_table = g_text
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_general = 2
cntl_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL METHOD html_viewer->show_url
EXPORTING
url = url
EXCEPTIONS
cntl_error = 1
cnht_error_not_allowed = 2
cnht_error_parameter = 3
dp_error_general = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " display_initial
*&---------------------------------------------------------------------*
*& Form check_editor_initial
*&---------------------------------------------------------------------*
FORM check_editor_initial .
IF g_editor IS NOT INITIAL.
CALL METHOD g_editor->get_text_as_stream
IMPORTING
text = g_text
EXCEPTIONS
error_dp = 1
error_cntl_call_method = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF g_text IS NOT INITIAL.
CALL FUNCTION 'C14A_POPUP_SAVE_BEFORE_ACTION'
EXPORTING
i_text1 = 'Unsaved Data will be lost.'
IMPORTING
e_continue = g_continue.
IF g_continue = 'X'.
LEAVE PROGRAM.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " check_editor_initial
*&---------------------------------------------------------------------*
*& Form EXEC_HTML
*&---------------------------------------------------------------------*
FORM exec_html .
DATA: url TYPE c LENGTH 255.
PERFORM free_instances.
REFRESH g_text.
PERFORM create_viewer_instances.
CALL METHOD g_editor->get_text_as_stream
IMPORTING
text = g_text
EXCEPTIONS
error_dp = 1
error_cntl_call_method = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF g_text IS INITIAL.
PERFORM display_initial.
EXIT.
ENDIF.
CALL METHOD html_viewer->load_data " generate url
IMPORTING
assigned_url = url
CHANGING
data_table = g_text
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_general = 2
cntl_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
html_viewer->show_url( url = url ). " display HTML o/p
ENDFORM. " EXEC_HTML
*&---------------------------------------------------------------------*
*& Form free_instances
*&---------------------------------------------------------------------*
FORM free_instances .
IF html_viewer IS NOT INITIAL.
CALL METHOD html_viewer->free.
FREE html_viewer.
ENDIF.
IF viewer IS NOT INITIAL.
CALL METHOD viewer->free.
FREE viewer.
ENDIF.
ENDFORM. " free_instances
*&---------------------------------------------------------------------*
*& Form CREATE_VIEWER_INSTANCES
*&---------------------------------------------------------------------*
FORM create_viewer_instances .
IF viewer IS INITIAL.
CREATE OBJECT viewer
EXPORTING
container_name = c_viewer
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
CREATE OBJECT html_viewer
EXPORTING
parent = viewer
EXCEPTIONS
cntl_error = 1
cntl_install_error = 2
dp_install_error = 3
dp_error = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " CREATE_VIEWER_INSTANCES
| 33.907317 | 96 | 0.470148 |
f73f763c8ae884165da019edda792eb97f109bb6 | 1,623 | abap | ABAP | src/zdbgl_get_locals.clas.abap | germanysources/regression_test | 41bca2f67036fbf89b56a0cc83ec5fcb41d95edc | [
"MIT"
] | 6 | 2019-12-09T16:47:39.000Z | 2022-02-23T15:16:05.000Z | src/zdbgl_get_locals.clas.abap | germanysources/regression_test | 41bca2f67036fbf89b56a0cc83ec5fcb41d95edc | [
"MIT"
] | 2 | 2020-01-14T17:50:27.000Z | 2020-11-10T12:21:24.000Z | src/zdbgl_get_locals.clas.abap | germanysources/regression_test | 41bca2f67036fbf89b56a0cc83ec5fcb41d95edc | [
"MIT"
] | 2 | 2021-01-05T11:38:44.000Z | 2021-12-10T10:33:30.000Z | class ZDBGL_GET_LOCALS definition
public
INHERITING FROM zdbgl_getter
final
create public .
public section.
TYPES: BEGIN OF _source_position,
abap_program TYPE tpda_program,
include TYPE tpda_include,
line TYPE tpda_sc_line,
END OF _source_position.
class-methods FACTORY
IMPORTING
key_testcase TYPE zdbgl_key_testcases
source_position TYPE _source_position
RETURNING VALUE(instance) TYPE REF TO zdbgl_get_locals
RAISING
zcx_dbgl_testcase.
protected section.
private section.
ENDCLASS.
CLASS ZDBGL_GET_LOCALS IMPLEMENTATION.
method FACTORY.
TYPES: BEGIN OF _record,
locals TYPE zdbgl_locals-locals,
END OF _record.
DATA: full_record TYPE STANDARD TABLE OF _record,
locals_json_string TYPE string,
record TYPE REF TO _record.
SELECT locals FROM zdbgl_locals
INTO CORRESPONDING FIELDS OF TABLE @full_record
WHERE abap_program = @source_position-abap_program
AND include = @source_position-include AND line = @source_position-line
AND key_testcase = @key_testcase.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zcx_dbgl_testcase
EXPORTING
textid = zcx_dbgl_testcase=>testcase_not_found
key_testcase = key_testcase
program = source_position-abap_program.
ENDIF.
LOOP AT full_record REFERENCE INTO record.
locals_json_string = locals_json_string &&
record->*-locals.
ENDLOOP.
CREATE OBJECT instance
EXPORTING
values = locals_json_string
program = source_position-abap_program.
endmethod.
ENDCLASS.
| 25.761905 | 77 | 0.720271 |
f7409c204802080a4e46031b2bce25bc8dbd73b8 | 25,190 | abap | ABAP | src/objects/zcl_abapgit_object_tran.clas.abap | Fmueller17/abapGit | 0db2c9c0859403330726fc64913e133c854f2667 | [
"MIT"
] | 1 | 2022-01-19T05:10:00.000Z | 2022-01-19T05:10:00.000Z | src/objects/zcl_abapgit_object_tran.clas.abap | Fmueller17/abapGit | 0db2c9c0859403330726fc64913e133c854f2667 | [
"MIT"
] | null | null | null | src/objects/zcl_abapgit_object_tran.clas.abap | Fmueller17/abapGit | 0db2c9c0859403330726fc64913e133c854f2667 | [
"MIT"
] | null | null | null | CLASS zcl_abapgit_object_tran DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_objects_super
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abapgit_object .
ALIASES mo_files
FOR zif_abapgit_object~mo_files .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
ty_param_values TYPE STANDARD TABLE OF rsparam
WITH NON-UNIQUE DEFAULT KEY ,
ty_tstca TYPE STANDARD TABLE OF tstca
WITH DEFAULT KEY.
CONSTANTS:
c_oo_program TYPE c LENGTH 9 VALUE '\PROGRAM=' ##NO_TEXT,
c_oo_class TYPE c LENGTH 7 VALUE '\CLASS=' ##NO_TEXT,
c_oo_method TYPE c LENGTH 8 VALUE '\METHOD=' ##NO_TEXT,
c_oo_tcode TYPE tcode VALUE 'OS_APPLICATION' ##NO_TEXT,
c_oo_frclass TYPE c LENGTH 30 VALUE 'CLASS' ##NO_TEXT,
c_oo_frmethod TYPE c LENGTH 30 VALUE 'METHOD' ##NO_TEXT,
c_oo_frupdtask TYPE c LENGTH 30 VALUE 'UPDATE_MODE' ##NO_TEXT,
c_oo_synchron TYPE c VALUE 'S' ##NO_TEXT,
c_oo_asynchron TYPE c VALUE 'U' ##NO_TEXT,
c_true TYPE c VALUE 'X' ##NO_TEXT,
c_false TYPE c VALUE space ##NO_TEXT,
BEGIN OF c_variant_type,
dialog TYPE rglif-docutype VALUE 'D' ##NO_TEXT,
report TYPE rglif-docutype VALUE 'R' ##NO_TEXT,
variant TYPE rglif-docutype VALUE 'V' ##NO_TEXT,
parameters TYPE rglif-docutype VALUE 'P' ##NO_TEXT,
object TYPE rglif-docutype VALUE 'O' ##NO_TEXT,
END OF c_variant_type.
DATA:
mt_bcdata TYPE STANDARD TABLE OF bdcdata .
METHODS transaction_read
IMPORTING
iv_transaction TYPE tcode
EXPORTING
es_transaction TYPE tstc
es_gui_attr TYPE tstcc
RAISING
zcx_abapgit_exception.
METHODS shift_param
CHANGING
!ct_rsparam TYPE s_param
!cs_tstcp TYPE tstcp .
METHODS add_data
IMPORTING
!iv_fnam TYPE bdcdata-fnam
!iv_fval TYPE clike .
METHODS call_se93
RAISING
zcx_abapgit_exception .
METHODS set_oo_parameters
IMPORTING
!it_rsparam TYPE s_param
CHANGING
!cs_rsstcd TYPE rsstcd .
METHODS split_parameters
CHANGING
!ct_rsparam TYPE s_param
!cs_rsstcd TYPE rsstcd
!cs_tstcp TYPE tstcp
!cs_tstc TYPE tstc .
METHODS split_parameters_comp
IMPORTING
!ig_type TYPE any
!ig_param TYPE any
CHANGING
!cg_value TYPE any .
METHODS serialize_texts
IMPORTING
!io_xml TYPE REF TO zif_abapgit_xml_output
RAISING
zcx_abapgit_exception .
METHODS deserialize_texts
IMPORTING
!io_xml TYPE REF TO zif_abapgit_xml_input
RAISING
zcx_abapgit_exception .
METHODS deserialize_oo_transaction
IMPORTING
!iv_package TYPE devclass
!is_tstc TYPE tstc
!is_tstcc TYPE tstcc
!is_tstct TYPE tstct
!is_rsstcd TYPE rsstcd
RAISING
zcx_abapgit_exception .
METHODS save_authorizations
IMPORTING
iv_transaction TYPE tstc-tcode
it_authorizations TYPE ty_tstca
RAISING
zcx_abapgit_exception.
METHODS clear_functiongroup_globals.
METHODS is_variant_transaction IMPORTING is_tstcp TYPE tstcp
RETURNING VALUE(rv_variant_transaction) TYPE abap_bool.
ENDCLASS.
CLASS zcl_abapgit_object_tran IMPLEMENTATION.
METHOD add_data.
DATA: ls_bcdata LIKE LINE OF mt_bcdata.
ls_bcdata-fnam = iv_fnam.
ls_bcdata-fval = iv_fval.
APPEND ls_bcdata TO mt_bcdata.
ENDMETHOD.
METHOD call_se93.
DATA: lt_message TYPE STANDARD TABLE OF bdcmsgcoll.
FIELD-SYMBOLS: <ls_message> TYPE bdcmsgcoll.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
EXPORTING
tcode = 'SE93'
mode_val = 'N'
TABLES
using_tab = mt_bcdata
mess_tab = lt_message
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error deserializing { ms_item-obj_type } { ms_item-obj_name }| ).
ENDIF.
LOOP AT lt_message ASSIGNING <ls_message> WHERE msgtyp CA 'EAX'.
MESSAGE ID <ls_message>-msgid
TYPE <ls_message>-msgtyp
NUMBER <ls_message>-msgnr
WITH <ls_message>-msgv1 <ls_message>-msgv2 <ls_message>-msgv3 <ls_message>-msgv4
INTO sy-msgli.
zcx_abapgit_exception=>raise_t100( ).
ENDLOOP.
ENDMETHOD.
METHOD clear_functiongroup_globals.
TYPES ty_param_vari TYPE abap_bool.
DATA lt_error_list TYPE STANDARD TABLE OF rsmp_check WITH DEFAULT KEY.
FIELD-SYMBOLS <lv_param_vari> TYPE ty_param_vari.
" only way to clear global fields in function group
CALL FUNCTION 'RS_TRANSACTION_INCONSISTENCIES'
EXPORTING
transaction_code = 'ZTHISTCODENEVEREXIST'
TABLES
error_list = lt_error_list
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
"Expected - fine
" but there is no other way to clear this field
ASSIGN ('(SAPLSEUK)PARAM_VARI') TO <lv_param_vari>.
IF sy-subrc = 0.
CLEAR <lv_param_vari>.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD deserialize_oo_transaction.
" You should remember that we don't use batch input just for fun,
" but because FM RPY_TRANSACTION_INSERT doesn't support OO transactions.
DATA: ls_bcdata TYPE bdcdata.
CLEAR mt_bcdata.
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0390'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'TSTC-TCODE'
iv_fval = is_tstc-tcode ).
IF zif_abapgit_object~exists( ) = abap_true.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=CHNG' ).
ELSE.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=ADD' ).
ENDIF.
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0300'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'TSTCT-TTEXT'
iv_fval = is_tstct-ttext ).
add_data( iv_fnam = 'RSSTCD-S_CLASS'
iv_fval = 'X' ).
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=ENTR' ).
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'RSSTCD-S_TRFRAME'
iv_fval = is_rsstcd-s_trframe ).
add_data( iv_fnam = 'RSSTCD-S_UPDTASK'
iv_fval = is_rsstcd-s_updtask ).
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=TR_FRAMEWORK' ).
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'RSSTCD-CLASSNAME'
iv_fval = is_rsstcd-classname ).
add_data( iv_fnam = 'RSSTCD-METHOD'
iv_fval = is_rsstcd-method ).
IF is_rsstcd-s_local IS NOT INITIAL.
add_data( iv_fnam = 'RSSTCD-S_LOCAL'
iv_fval = is_rsstcd-s_local ).
ENDIF.
IF is_rsstcd-s_updlok IS NOT INITIAL.
add_data( iv_fnam = 'RSSTCD-S_UPDLOK'
iv_fval = is_rsstcd-s_updlok ).
ENDIF.
add_data( iv_fnam = 'TSTC-PGMNA'
iv_fval = is_tstc-pgmna ).
IF is_tstcc-s_webgui = '2'.
add_data( iv_fnam = 'G_IAC_EWT'
iv_fval = abap_true ).
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = 'MAKE_PROFI' ).
ls_bcdata-program = 'SAPLSEUK'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
ELSEIF is_tstcc-s_webgui IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_WEBGUI'
iv_fval = is_tstcc-s_webgui ).
ENDIF.
IF is_tstcc-s_pervas IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_PERVAS'
iv_fval = is_tstcc-s_pervas ).
ENDIF.
IF is_tstcc-s_service IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_SERVICE'
iv_fval = is_tstcc-s_service ).
ENDIF.
IF is_tstcc-s_platin IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_PLATIN'
iv_fval = is_tstcc-s_platin ).
ENDIF.
IF is_tstcc-s_win32 IS NOT INITIAL.
add_data( iv_fnam = 'TSTCC-S_WIN32'
iv_fval = is_tstcc-s_win32 ).
ENDIF.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=WB_SAVE' ).
ls_bcdata-program = 'SAPLSTRD'.
ls_bcdata-dynpro = '0100'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'KO007-L_DEVCLASS'
iv_fval = iv_package ).
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=ADD' ).
ls_bcdata-program = 'BDC_OKCODE'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=WB_BACK' ).
ls_bcdata-program = 'BDC_OKCODE'.
ls_bcdata-dynpro = '0360'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO mt_bcdata.
add_data( iv_fnam = 'BDC_OKCODE'
iv_fval = '=WB_BACK' ).
call_se93( ).
ENDMETHOD.
METHOD deserialize_texts.
DATA lt_tpool_i18n TYPE TABLE OF tstct.
FIELD-SYMBOLS <ls_tpool> LIKE LINE OF lt_tpool_i18n.
" Read XML-files data
io_xml->read( EXPORTING iv_name = 'I18N_TPOOL'
CHANGING cg_data = lt_tpool_i18n ).
" Force t-code name (security reasons)
LOOP AT lt_tpool_i18n ASSIGNING <ls_tpool>.
<ls_tpool>-tcode = ms_item-obj_name.
ENDLOOP.
IF lines( lt_tpool_i18n ) > 0.
MODIFY tstct FROM TABLE lt_tpool_i18n.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Update of t-code translations failed' ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD is_variant_transaction.
rv_variant_transaction = boolc( is_tstcp-param(1) = '@' ).
ENDMETHOD.
METHOD save_authorizations.
CONSTANTS: lc_hex_chk TYPE x VALUE '04'.
DATA: ls_transaction TYPE tstc.
transaction_read( EXPORTING iv_transaction = iv_transaction
IMPORTING es_transaction = ls_transaction ).
DELETE FROM tstca WHERE tcode = iv_transaction.
IF ls_transaction IS NOT INITIAL.
INSERT tstca FROM TABLE it_authorizations.
ls_transaction-cinfo = ls_transaction-cinfo + lc_hex_chk.
UPDATE tstc SET cinfo = ls_transaction-cinfo WHERE tcode = ls_transaction-tcode.
ENDIF.
ENDMETHOD.
METHOD serialize_texts.
DATA lt_tpool_i18n TYPE TABLE OF tstct.
IF io_xml->i18n_params( )-main_language_only = abap_true.
RETURN.
ENDIF.
" Skip main language - it was already serialized
" Don't serialize t-code itself
SELECT sprsl ttext
INTO CORRESPONDING FIELDS OF TABLE lt_tpool_i18n
FROM tstct
WHERE sprsl <> mv_language
AND tcode = ms_item-obj_name ##TOO_MANY_ITAB_FIELDS. "#EC CI_GENBUFF
IF lines( lt_tpool_i18n ) > 0.
SORT lt_tpool_i18n BY sprsl ASCENDING.
io_xml->add( iv_name = 'I18N_TPOOL'
ig_data = lt_tpool_i18n ).
ENDIF.
ENDMETHOD.
METHOD set_oo_parameters.
DATA: ls_param LIKE LINE OF it_rsparam.
IF cs_rsstcd-call_tcode = c_oo_tcode.
cs_rsstcd-s_trframe = c_true.
LOOP AT it_rsparam INTO ls_param.
CASE ls_param-field.
WHEN c_oo_frclass.
cs_rsstcd-classname = ls_param-value.
WHEN c_oo_frmethod.
cs_rsstcd-method = ls_param-value.
WHEN c_oo_frupdtask.
IF ls_param-value = c_oo_synchron.
cs_rsstcd-s_upddir = c_true.
cs_rsstcd-s_updtask = c_false.
cs_rsstcd-s_updlok = c_false.
ELSEIF ls_param-value = c_oo_asynchron.
cs_rsstcd-s_upddir = c_false.
cs_rsstcd-s_updtask = c_true.
cs_rsstcd-s_updlok = c_false.
ELSE.
cs_rsstcd-s_upddir = c_false.
cs_rsstcd-s_updtask = c_false.
cs_rsstcd-s_updlok = c_true.
ENDIF.
ENDCASE.
ENDLOOP.
ENDIF.
ENDMETHOD.
METHOD shift_param.
DATA: ls_param LIKE LINE OF ct_rsparam,
lv_length TYPE i.
FIELD-SYMBOLS <lg_f> TYPE any.
DO 254 TIMES.
IF cs_tstcp-param = space.
EXIT.
ENDIF.
CLEAR ls_param.
IF cs_tstcp-param CA '='.
CHECK sy-fdpos <> 0.
ASSIGN cs_tstcp-param(sy-fdpos) TO <lg_f>.
ls_param-field = <lg_f>.
IF ls_param-field(1) = space.
SHIFT ls_param-field.
ENDIF.
sy-fdpos = sy-fdpos + 1.
SHIFT cs_tstcp-param BY sy-fdpos PLACES.
IF cs_tstcp-param CA ';'.
IF sy-fdpos <> 0.
ASSIGN cs_tstcp-param(sy-fdpos) TO <lg_f>.
ls_param-value = <lg_f>.
IF ls_param-value(1) = space.
SHIFT ls_param-value.
ENDIF.
ENDIF.
sy-fdpos = sy-fdpos + 1.
SHIFT cs_tstcp-param BY sy-fdpos PLACES.
APPEND ls_param TO ct_rsparam.
ELSE.
lv_length = strlen( cs_tstcp-param ).
CHECK lv_length > 0.
ASSIGN cs_tstcp-param(lv_length) TO <lg_f>.
ls_param-value = <lg_f>.
IF ls_param-value(1) = space.
SHIFT ls_param-value.
ENDIF.
lv_length = lv_length + 1.
SHIFT cs_tstcp-param BY lv_length PLACES.
APPEND ls_param TO ct_rsparam.
ENDIF.
ENDIF.
ENDDO.
ENDMETHOD.
METHOD split_parameters.
* see subroutine split_parameters in include LSEUKF01
DATA: lv_off TYPE i,
lv_param_beg TYPE i.
CLEAR cs_rsstcd-s_vari.
IF cs_tstcp-param(1) = '\'. " OO-Transaktion ohne FR
split_parameters_comp( EXPORTING ig_type = c_oo_program
ig_param = cs_tstcp-param
CHANGING cg_value = cs_tstc-pgmna ).
split_parameters_comp( EXPORTING ig_type = c_oo_class
ig_param = cs_tstcp-param
CHANGING cg_value = cs_rsstcd-classname ).
split_parameters_comp( EXPORTING ig_type = c_oo_method
ig_param = cs_tstcp-param
CHANGING cg_value = cs_rsstcd-method ).
IF NOT cs_tstc-pgmna IS INITIAL.
cs_rsstcd-s_local = c_true.
ENDIF.
RETURN.
ELSEIF cs_tstcp-param(1) = '@'. " Transaktionsvariante
cs_rsstcd-s_vari = c_true.
IF cs_tstcp-param(2) = '@@'.
cs_rsstcd-s_ind_vari = c_true.
lv_off = 2.
ELSE.
CLEAR cs_rsstcd-s_ind_vari.
lv_off = 1.
ENDIF.
IF cs_tstcp-param CA ' '.
ENDIF.
sy-fdpos = sy-fdpos - lv_off.
IF sy-fdpos > 0.
cs_rsstcd-call_tcode = cs_tstcp-param+lv_off(sy-fdpos).
sy-fdpos = sy-fdpos + 1 + lv_off.
cs_rsstcd-variant = cs_tstcp-param+sy-fdpos.
ENDIF.
ELSEIF cs_tstcp-param(1) = '/'.
cs_rsstcd-st_tcode = c_true.
cs_rsstcd-st_prog = space.
IF cs_tstcp-param+1(1) = '*'.
cs_rsstcd-st_skip_1 = c_true.
ELSE.
CLEAR cs_rsstcd-st_skip_1.
ENDIF.
IF cs_tstcp-param CA ' '.
ENDIF.
lv_param_beg = sy-fdpos + 1.
sy-fdpos = sy-fdpos - 2.
IF sy-fdpos > 0.
cs_rsstcd-call_tcode = cs_tstcp-param+2(sy-fdpos).
ENDIF.
SHIFT cs_tstcp-param BY lv_param_beg PLACES.
ELSE.
cs_rsstcd-st_tcode = space.
cs_rsstcd-st_prog = c_true.
ENDIF.
shift_param(
CHANGING ct_rsparam = ct_rsparam
cs_tstcp = cs_tstcp ).
set_oo_parameters(
EXPORTING it_rsparam = ct_rsparam
CHANGING cs_rsstcd = cs_rsstcd ).
ENDMETHOD.
METHOD split_parameters_comp.
DATA: lv_off TYPE i.
IF ig_param CS ig_type.
lv_off = sy-fdpos + strlen( ig_type ).
cg_value = ig_param+lv_off.
IF cg_value CA '\'.
CLEAR cg_value+sy-fdpos.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD transaction_read.
DATA: lt_tcodes TYPE TABLE OF tstc,
lt_gui_attr TYPE TABLE OF tstcc.
CLEAR: es_transaction, es_gui_attr.
CALL FUNCTION 'RPY_TRANSACTION_READ'
EXPORTING
transaction = iv_transaction
TABLES
tcodes = lt_tcodes
gui_attributes = lt_gui_attr
EXCEPTIONS
permission_error = 1
cancelled = 2
not_found = 3
object_not_found = 4
OTHERS = 5.
IF sy-subrc = 4 OR sy-subrc = 3.
RETURN.
ELSEIF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
READ TABLE lt_tcodes INDEX 1 INTO es_transaction.
ASSERT sy-subrc = 0.
READ TABLE lt_gui_attr INDEX 1 INTO es_gui_attr.
ASSERT sy-subrc = 0.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = c_user_unknown. " todo
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_transaction TYPE tstc-tcode.
lv_transaction = ms_item-obj_name.
CALL FUNCTION 'RPY_TRANSACTION_DELETE'
EXPORTING
transaction = lv_transaction
EXCEPTIONS
not_excecuted = 1
object_not_found = 0
OTHERS = 3.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
CONSTANTS: lc_hex_tra TYPE x VALUE '00',
* lc_hex_men TYPE x VALUE '01',
lc_hex_par TYPE x VALUE '02',
lc_hex_rep TYPE x VALUE '80',
* lc_hex_rpv TYPE x VALUE '10',
lc_hex_obj TYPE x VALUE '08'.
DATA: lv_dynpro TYPE d020s-dnum,
ls_tstc TYPE tstc,
lv_type TYPE rglif-docutype,
ls_tstct TYPE tstct,
ls_tstcc TYPE tstcc,
ls_tstcp TYPE tstcp,
lt_tstca TYPE ty_tstca,
lt_param_values TYPE ty_param_values,
ls_rsstcd TYPE rsstcd.
IF zif_abapgit_object~exists( ) = abap_true.
zif_abapgit_object~delete( iv_package = iv_package
iv_transport = iv_transport ).
ENDIF.
io_xml->read( EXPORTING iv_name = 'TSTC'
CHANGING cg_data = ls_tstc ).
io_xml->read( EXPORTING iv_name = 'TSTCC'
CHANGING cg_data = ls_tstcc ).
io_xml->read( EXPORTING iv_name = 'TSTCT'
CHANGING cg_data = ls_tstct ).
io_xml->read( EXPORTING iv_name = 'TSTCP'
CHANGING cg_data = ls_tstcp ).
io_xml->read( EXPORTING iv_name = 'AUTHORIZATIONS'
CHANGING cg_data = lt_tstca ).
lv_dynpro = ls_tstc-dypno.
IF ls_tstc-cinfo O lc_hex_rep.
lv_type = c_variant_type-report.
ELSEIF ls_tstc-cinfo O lc_hex_obj.
lv_type = c_variant_type-object.
ELSEIF ls_tstc-cinfo O lc_hex_par.
IF is_variant_transaction( ls_tstcp ) = abap_true.
lv_type = c_variant_type-variant.
ELSE.
lv_type = c_variant_type-parameters.
ENDIF.
ELSEIF ls_tstc-cinfo O lc_hex_tra.
lv_type = c_variant_type-dialog.
ELSE.
zcx_abapgit_exception=>raise( 'Transaction, unknown CINFO' ).
ENDIF.
IF ls_tstcp IS NOT INITIAL.
split_parameters( CHANGING ct_rsparam = lt_param_values
cs_rsstcd = ls_rsstcd
cs_tstcp = ls_tstcp
cs_tstc = ls_tstc ).
ENDIF.
CASE lv_type.
WHEN c_variant_type-object.
deserialize_oo_transaction( iv_package = iv_package
is_tstc = ls_tstc
is_tstcc = ls_tstcc
is_tstct = ls_tstct
is_rsstcd = ls_rsstcd ).
WHEN OTHERS.
clear_functiongroup_globals( ).
CALL FUNCTION 'RPY_TRANSACTION_INSERT'
EXPORTING
transaction = ls_tstc-tcode
program = ls_tstc-pgmna
dynpro = lv_dynpro
language = mv_language
development_class = iv_package
transaction_type = lv_type
shorttext = ls_tstct-ttext
called_transaction = ls_rsstcd-call_tcode
called_transaction_skip = ls_rsstcd-st_skip_1
variant = ls_rsstcd-variant
cl_independend = ls_rsstcd-s_ind_vari
html_enabled = ls_tstcc-s_webgui
java_enabled = ls_tstcc-s_platin
wingui_enabled = ls_tstcc-s_win32
TABLES
param_values = lt_param_values
EXCEPTIONS
cancelled = 1
already_exist = 2
permission_error = 3
name_not_allowed = 4
name_conflict = 5
illegal_type = 6
object_inconsistent = 7
db_access_error = 8
OTHERS = 9.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDCASE.
IF lt_tstca IS NOT INITIAL.
save_authorizations( iv_transaction = ls_tstc-tcode
it_authorizations = lt_tstca ).
ENDIF.
" Texts deserializing (translations)
deserialize_texts( io_xml ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_tcode TYPE tstc-tcode.
SELECT SINGLE tcode FROM tstc INTO lv_tcode
WHERE tcode = ms_item-obj_name. "#EC CI_GENBUFF
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
DATA: lv_object TYPE eqegraarg.
lv_object = |TN{ ms_item-obj_name }|.
OVERLAY lv_object WITH ' '.
lv_object = lv_object && '*'.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'EEUDB'
iv_argument = lv_object ).
ENDMETHOD.
METHOD zif_abapgit_object~jump.
DATA: lt_bdcdata TYPE TABLE OF bdcdata.
FIELD-SYMBOLS: <ls_bdcdata> LIKE LINE OF lt_bdcdata.
APPEND INITIAL LINE TO lt_bdcdata ASSIGNING <ls_bdcdata>.
<ls_bdcdata>-program = 'SAPLSEUK'.
<ls_bdcdata>-dynpro = '0390'.
<ls_bdcdata>-dynbegin = abap_true.
APPEND INITIAL LINE TO lt_bdcdata ASSIGNING <ls_bdcdata>.
<ls_bdcdata>-fnam = 'BDC_OKCODE'.
<ls_bdcdata>-fval = '=SHOW'.
APPEND INITIAL LINE TO lt_bdcdata ASSIGNING <ls_bdcdata>.
<ls_bdcdata>-fnam = 'TSTC-TCODE'.
<ls_bdcdata>-fval = ms_item-obj_name.
zcl_abapgit_ui_factory=>get_gui_jumper( )->jump_batch_input(
iv_tcode = 'SE93'
it_bdcdata = lt_bdcdata ).
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lv_transaction TYPE tstc-tcode,
ls_tcode TYPE tstc,
ls_tstct TYPE tstct,
ls_tstcp TYPE tstcp,
lt_tstca TYPE ty_tstca,
ls_gui_attr TYPE tstcc.
lv_transaction = ms_item-obj_name.
transaction_read( EXPORTING iv_transaction = lv_transaction
IMPORTING es_transaction = ls_tcode
es_gui_attr = ls_gui_attr ).
IF ls_tcode IS INITIAL.
RETURN.
ENDIF.
SELECT SINGLE * FROM tstct INTO ls_tstct
WHERE sprsl = mv_language
AND tcode = lv_transaction. "#EC CI_SUBRC "#EC CI_GENBUFF
SELECT SINGLE * FROM tstcp INTO ls_tstcp
WHERE tcode = lv_transaction. "#EC CI_SUBRC "#EC CI_GENBUFF
SELECT * FROM tstca INTO TABLE lt_tstca
WHERE tcode = lv_transaction.
IF sy-subrc <> 0.
CLEAR: lt_tstca.
ENDIF.
io_xml->add( iv_name = 'TSTC'
ig_data = ls_tcode ).
io_xml->add( iv_name = 'TSTCC'
ig_data = ls_gui_attr ).
io_xml->add( iv_name = 'TSTCT'
ig_data = ls_tstct ).
IF ls_tstcp IS NOT INITIAL.
io_xml->add( iv_name = 'TSTCP'
ig_data = ls_tstcp ).
ENDIF.
io_xml->add( iv_name = 'AUTHORIZATIONS'
ig_data = lt_tstca ).
" Texts serializing (translations)
serialize_texts( io_xml ).
ENDMETHOD.
ENDCLASS.
| 28.176734 | 102 | 0.595117 |
f7413ec96dcef18660c1c9193a3bf5ceb94585a0 | 10,730 | abap | ABAP | src/ui/zcl_abapgit_gui_page_tag.clas.abap | Manny27nyc/abapGit | dc51247e9b8c0c792193aba857ec31df3a82db4a | [
"MIT"
] | 317 | 2020-09-25T19:50:59.000Z | 2022-03-29T22:59:01.000Z | src/ui/zcl_abapgit_gui_page_tag.clas.abap | Manny27nyc/abapGit | dc51247e9b8c0c792193aba857ec31df3a82db4a | [
"MIT"
] | 1,114 | 2020-09-24T07:44:36.000Z | 2022-03-31T18:01:19.000Z | src/ui/zcl_abapgit_gui_page_tag.clas.abap | Manny27nyc/abapGit | dc51247e9b8c0c792193aba857ec31df3a82db4a | [
"MIT"
] | 167 | 2020-09-24T18:31:37.000Z | 2022-03-24T10:07:04.000Z | CLASS zcl_abapgit_gui_page_tag DEFINITION PUBLIC FINAL
CREATE PUBLIC INHERITING FROM zcl_abapgit_gui_page.
PUBLIC SECTION.
CONSTANTS: BEGIN OF c_action,
commit_post TYPE string VALUE 'commit_post',
commit_cancel TYPE string VALUE 'commit_cancel',
change_tag_type TYPE string VALUE 'change_tag_type',
END OF c_action.
METHODS:
constructor
IMPORTING io_repo TYPE REF TO zcl_abapgit_repo
RAISING zcx_abapgit_exception,
zif_abapgit_gui_event_handler~on_event REDEFINITION.
PROTECTED SECTION.
METHODS:
render_content REDEFINITION.
PRIVATE SECTION.
CONSTANTS:
BEGIN OF c_tag_type,
lightweight TYPE string VALUE 'lightweight',
annotated TYPE string VALUE 'annotated',
END OF c_tag_type .
DATA mo_repo_online TYPE REF TO zcl_abapgit_repo_online .
DATA mv_selected_type TYPE string .
METHODS render_menu
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS render_form
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
METHODS render_text_input
IMPORTING
!iv_name TYPE string
!iv_label TYPE string
!iv_value TYPE string OPTIONAL
!iv_max_length TYPE string OPTIONAL
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
METHODS create_tag
IMPORTING
!ii_event TYPE REF TO zif_abapgit_gui_event
RAISING
zcx_abapgit_exception .
METHODS parse_tag_request
IMPORTING
!ii_event TYPE REF TO zif_abapgit_gui_event
RETURNING
VALUE(rs_git_tag) TYPE zif_abapgit_definitions=>ty_git_tag
RAISING
zcx_abapgit_exception .
METHODS parse_change_tag_type_request
IMPORTING
!it_postdata TYPE zif_abapgit_html_viewer=>ty_post_data .
METHODS render_scripts
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
ENDCLASS.
CLASS ZCL_ABAPGIT_GUI_PAGE_TAG IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
mo_repo_online ?= io_repo.
ms_control-page_title = 'Tag'.
mv_selected_type = c_tag_type-lightweight.
ENDMETHOD.
METHOD create_tag.
DATA:
ls_tag TYPE zif_abapgit_definitions=>ty_git_tag,
lx_error TYPE REF TO zcx_abapgit_exception,
lv_text TYPE string.
ls_tag = parse_tag_request( ii_event ).
IF ls_tag-name IS INITIAL.
zcx_abapgit_exception=>raise( |Please supply a tag name| ).
ENDIF.
ls_tag-name = zcl_abapgit_git_tag=>add_tag_prefix( ls_tag-name ).
ASSERT ls_tag-name CP zif_abapgit_definitions=>c_git_branch-tags.
CASE mv_selected_type.
WHEN c_tag_type-lightweight.
ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
WHEN c_tag_type-annotated.
ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag.
WHEN OTHERS.
zcx_abapgit_exception=>raise( |Invalid tag type: { mv_selected_type }| ).
ENDCASE.
TRY.
zcl_abapgit_git_porcelain=>create_tag( iv_url = mo_repo_online->get_url( )
is_tag = ls_tag ).
CATCH zcx_abapgit_exception INTO lx_error.
zcx_abapgit_exception=>raise( |Cannot create tag { ls_tag-name }. Error: '{ lx_error->get_text( ) }'| ).
ENDTRY.
IF ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-lightweight_tag.
lv_text = |Lightweight tag { zcl_abapgit_git_tag=>remove_tag_prefix( ls_tag-name ) } created|.
ELSEIF ls_tag-type = zif_abapgit_definitions=>c_git_branch_type-annotated_tag.
lv_text = |Annotated tag { zcl_abapgit_git_tag=>remove_tag_prefix( ls_tag-name ) } created|.
ENDIF.
MESSAGE lv_text TYPE 'S'.
ENDMETHOD.
METHOD parse_change_tag_type_request.
FIELD-SYMBOLS <lv_postdata> LIKE LINE OF it_postdata.
READ TABLE it_postdata ASSIGNING <lv_postdata> INDEX 1.
IF sy-subrc = 0.
FIND FIRST OCCURRENCE OF REGEX `type=(.*)` IN <lv_postdata> SUBMATCHES mv_selected_type.
ENDIF.
mv_selected_type = condense( mv_selected_type ).
ENDMETHOD.
METHOD parse_tag_request.
DATA lo_map TYPE REF TO zcl_abapgit_string_map.
lo_map = ii_event->form_data( ).
lo_map->strict( abap_false ). " Hack, refactor !
lo_map->to_abap( CHANGING cs_container = rs_git_tag ).
REPLACE ALL OCCURRENCES
OF zif_abapgit_definitions=>c_crlf
IN rs_git_tag-body
WITH zif_abapgit_definitions=>c_newline.
ENDMETHOD.
METHOD render_content.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( '<div class="repo">' ).
ri_html->add( render_menu( ) ).
ri_html->add( render_form( ) ).
ri_html->add( '</div>' ).
register_deferred_script( render_scripts( ) ).
ENDMETHOD.
METHOD render_form.
CONSTANTS: lc_body_col_max TYPE i VALUE 150.
DATA: li_user TYPE REF TO zif_abapgit_persist_user,
lv_user TYPE string,
lv_email TYPE string,
lv_s_param TYPE string,
lo_settings TYPE REF TO zcl_abapgit_settings,
lv_body_size TYPE i,
lt_type TYPE string_table,
lv_selected TYPE string.
FIELD-SYMBOLS: <lv_type> LIKE LINE OF lt_type.
li_user = zcl_abapgit_persistence_user=>get_instance( ).
lv_user = li_user->get_repo_git_user_name( mo_repo_online->get_url( ) ).
IF lv_user IS INITIAL.
lv_user = li_user->get_default_git_user_name( ).
ENDIF.
IF lv_user IS INITIAL.
" get default from user record
lv_user = zcl_abapgit_user_record=>get_instance( sy-uname )->get_name( ).
ENDIF.
lv_email = li_user->get_repo_git_user_email( mo_repo_online->get_url( ) ).
IF lv_email IS INITIAL.
lv_email = li_user->get_default_git_user_email( ).
ENDIF.
IF lv_email IS INITIAL.
" get default from user record
lv_email = zcl_abapgit_user_record=>get_instance( sy-uname )->get_email( ).
ENDIF.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( '<div class="form-container">' ).
ri_html->add( '<form id="commit_form" class="aligned-form grey70"'
&& ' method="post" action="sapevent:commit_post">' ).
INSERT c_tag_type-lightweight
INTO TABLE lt_type.
INSERT c_tag_type-annotated
INTO TABLE lt_type.
ri_html->add( '<div class="row">' ).
ri_html->add( 'Tag type <select name="folder_logic" onchange="onTagTypeChange(this)">' ).
LOOP AT lt_type ASSIGNING <lv_type>.
IF mv_selected_type = <lv_type>.
lv_selected = 'selected'.
ELSE.
CLEAR: lv_selected.
ENDIF.
ri_html->add( |<option value="{ <lv_type> }" | && |{ lv_selected }>| && |{ <lv_type> }</option>| ).
ENDLOOP.
ri_html->add( '</div>' ).
ri_html->add( '</select>' ).
ri_html->add( '<br>' ).
ri_html->add( '<br>' ).
ri_html->add( render_text_input( iv_name = 'sha1'
iv_label = 'SHA1'
iv_value = mo_repo_online->get_current_remote( ) ) ).
ri_html->add( render_text_input( iv_name = 'name'
iv_label = 'tag name' ) ).
IF mv_selected_type = c_tag_type-annotated.
ri_html->add( render_text_input( iv_name = 'tagger_name'
iv_label = 'tagger name'
iv_value = lv_user ) ).
ri_html->add( render_text_input( iv_name = 'tagger_email'
iv_label = 'tagger e-mail'
iv_value = lv_email ) ).
lo_settings = zcl_abapgit_persist_factory=>get_settings( )->read( ).
lv_s_param = lo_settings->get_commitmsg_comment_length( ).
ri_html->add( render_text_input( iv_name = 'message'
iv_label = 'message'
iv_max_length = lv_s_param ) ).
ri_html->add( '<div class="row">' ).
ri_html->add( '<label for="c-body">body</label>' ).
lv_body_size = lo_settings->get_commitmsg_body_size( ).
IF lv_body_size > lc_body_col_max.
lv_body_size = lc_body_col_max.
ENDIF.
ri_html->add( |<textarea id="c-body" name="body" rows="10" cols="{ lv_body_size }"></textarea>| ).
ENDIF.
ri_html->add( '<input type="submit" class="hidden-submit">' ).
ri_html->add( '</div>' ).
ri_html->add( '</form>' ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD render_menu.
DATA lo_toolbar TYPE REF TO zcl_abapgit_html_toolbar.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
CREATE OBJECT lo_toolbar.
lo_toolbar->add( iv_act = 'submitFormById(''commit_form'');'
iv_txt = 'Create'
iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_opt = zif_abapgit_html=>c_html_opt-strong ).
lo_toolbar->add( iv_act = c_action-commit_cancel
iv_txt = 'Cancel'
iv_opt = zif_abapgit_html=>c_html_opt-cancel ).
ri_html->add( '<div class="paddings">' ).
ri_html->add( lo_toolbar->render( ) ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD render_scripts.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->set_title( cl_abap_typedescr=>describe_by_object_ref( me )->get_relative_name( ) ).
ri_html->add( 'setInitialFocus("name");' ).
ENDMETHOD.
METHOD render_text_input.
DATA lv_attrs TYPE string.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF iv_value IS NOT INITIAL.
lv_attrs = | value="{ iv_value }"|.
ENDIF.
IF iv_max_length IS NOT INITIAL.
lv_attrs = | maxlength="{ iv_max_length }"|.
ENDIF.
ri_html->add( '<div class="row">' ).
ri_html->add( |<label for="{ iv_name }">{ iv_label }</label>| ).
ri_html->add( |<input id="{ iv_name }" name="{ iv_name }" type="text"{ lv_attrs }>| ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD zif_abapgit_gui_event_handler~on_event.
CASE ii_event->mv_action.
WHEN c_action-commit_post.
create_tag( ii_event ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-go_back.
WHEN c_action-change_tag_type.
parse_change_tag_type_request( ii_event->mt_postdata ).
rs_handled-state = zcl_abapgit_gui=>c_event_state-re_render.
WHEN c_action-commit_cancel.
rs_handled-state = zcl_abapgit_gui=>c_event_state-go_back.
ENDCASE.
ENDMETHOD.
ENDCLASS.
| 29.078591 | 112 | 0.642777 |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
Use the Edit dataset card button to edit it.
- Downloads last month
- 54