Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ztoad.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@
ENDIF.

WHEN 'DELETE_HIST'.
CONCATENATE sy-uname '+++' INTO lw_queryid.
CONCATENATE sy-uname '***' INTO lw_queryid. " Change +++ to wildcard symbol ***
LOOP AT t_node_repository INTO ls_histo
WHERE queryid CP lw_queryid.
PERFORM repo_delete_history USING ls_histo-node_key
Expand Down Expand Up @@ -1488,7 +1488,7 @@
* Remove * comment
LOOP AT lt_query INTO ls_query WHERE line(1) = '*'.
CLEAR ls_query-line.
MODIFY lt_query FROM ls_query.

Check failure on line 1491 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Ambiguous statement. Use explicit syntax.

https://rules.abaplint.org/ambiguous_statement
ENDLOOP.

* Remove " comment
Expand All @@ -1504,7 +1504,7 @@
FIND ALL OCCURRENCES OF '''' IN ls_query-line(ls_find-offset)
RESULTS lt_find_sub.
IF sy-subrc = 0.
DESCRIBE TABLE lt_find_sub LINES lw_lines.

Check failure on line 1507 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Avoid use of DESCRIBE LINES, use lines() instead

https://rules.abaplint.org/avoid_use
lw_lines = lw_lines MOD 2.
IF lw_lines = 1.
CONTINUE.
Expand All @@ -1517,7 +1517,7 @@
EXIT. "exit loop
ENDIF.
ENDLOOP.
MODIFY lt_query FROM ls_query.

Check failure on line 1520 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Ambiguous statement. Use explicit syntax.

https://rules.abaplint.org/ambiguous_statement
ENDLOOP.

* Find active query
Expand All @@ -1540,7 +1540,7 @@
READ TABLE lt_query INTO ls_query INDEX ls_find-line.
FIND ALL OCCURRENCES OF '''' IN ls_query(ls_find-offset)
RESULTS lt_find_sub.
DESCRIBE TABLE lt_find_sub LINES lw_lines.

Check failure on line 1543 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Avoid use of DESCRIBE LINES, use lines() instead

https://rules.abaplint.org/avoid_use
lw_lines = lw_lines MOD 2.
* If open ' found, ignore the dot
IF lw_lines = 1.
Expand All @@ -1555,11 +1555,11 @@
OR ( lw_last = abap_true AND fw_force_last = abap_true ).
* Delete all query after query active
ls_find-line = ls_find-line + 1.
DELETE lt_query FROM ls_find-line.

Check failure on line 1558 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Ambiguous statement. Use explicit syntax.

https://rules.abaplint.org/ambiguous_statement
ls_find-line = ls_find-line - 1.
* Do not keep the . for active query
IF ls_find-offset = 0.
DELETE lt_query FROM ls_find-line.

Check failure on line 1562 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Ambiguous statement. Use explicit syntax.

https://rules.abaplint.org/ambiguous_statement
ELSE.
ls_query-line = ls_query-line(ls_find-offset).
MODIFY lt_query FROM ls_query INDEX ls_find-line.
Expand Down Expand Up @@ -1888,7 +1888,7 @@
lw_strlen_string TYPE string,
lw_explicit TYPE string.

DEFINE c.

Check failure on line 1891 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Avoid use of DEFINE

https://rules.abaplint.org/avoid_use
lw_strlen_string = &1.
perform add_line_to_table using lw_strlen_string
changing lt_code_string.
Expand Down Expand Up @@ -1938,7 +1938,7 @@
SPLIT lw_from AT space INTO TABLE lt_split.
LOOP AT lt_split INTO lw_string.
IF lw_string IS INITIAL OR lw_string CO space.
DELETE lt_split.

Check failure on line 1941 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Ambiguous statement. Use explicit syntax.

https://rules.abaplint.org/ambiguous_statement
ENDIF.
ENDLOOP.
DO.
Expand Down Expand Up @@ -2597,7 +2597,7 @@
READ TABLE lt_ddic_fields TRANSPORTING NO FIELDS
WITH KEY tabname = ls_table_list-table.
IF sy-subrc NE 0.
DELETE lt_table_list.

Check failure on line 2600 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Ambiguous statement. Use explicit syntax.

https://rules.abaplint.org/ambiguous_statement
CONTINUE.
ENDIF.

Expand Down Expand Up @@ -2691,10 +2691,10 @@
MESSAGE a000(tree_control_msg).
ENDIF.

DESCRIBE TABLE lt_table_list LINES lw_tabix.

Check failure on line 2694 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Avoid use of DESCRIBE LINES, use lines() instead

https://rules.abaplint.org/avoid_use

* If no table found, display message
IF lw_tabix = 0.

Check failure on line 2697 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Change IF to CASE

https://rules.abaplint.org/change_if_to_case
MESSAGE 'No valid table found'(m15) TYPE c_msg_success
DISPLAY LIKE c_msg_error.
* If 1 table found, expand it
Expand Down Expand Up @@ -2899,7 +2899,7 @@
APPEND s_node_repository TO t_node_repository.

CLEAR lw_node_key.
CONCATENATE sy-uname '+++' INTO lw_queryid.
CONCATENATE sy-uname '***' INTO lw_queryid. " Change +++ to wildcard symbol ***
LOOP AT lt_query_my INTO ls_query WHERE queryid NP lw_queryid.
lw_node_key = lw_node_key + 1.
CLEAR s_node_repository.
Expand Down Expand Up @@ -3063,7 +3063,7 @@
CONCATENATE lw_date lw_time INTO ls_ztoad-text SEPARATED BY space.

ls_ztoad-query = lw_query_with_cr.
MODIFY ztoad FROM ls_ztoad.

Check failure on line 3066 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Ambiguous statement. Use explicit syntax.

https://rules.abaplint.org/ambiguous_statement

w_last_loaded_query = ls_ztoad-queryid.

Expand Down Expand Up @@ -3457,7 +3457,7 @@
lw_started(1) TYPE c,
lw_started_field(1) TYPE c.

DEFINE c.

Check failure on line 3460 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Avoid use of DEFINE

https://rules.abaplint.org/avoid_use
lw_strlen_string = &1.
perform add_line_to_table using lw_strlen_string
changing lt_code_string.
Expand Down Expand Up @@ -3771,7 +3771,7 @@
CONCATENATE fw_text 'pasted to SQL Editor'(m27)
INTO lw_message SEPARATED BY space.
MESSAGE lw_message TYPE c_msg_success.
ENDFORM. " EDITOR_PASTE

Check failure on line 3774 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form QUERY_PROCESS_NATIVE
Expand Down Expand Up @@ -3836,7 +3836,7 @@
CONDENSE lw_msg.
MESSAGE lw_msg TYPE c_msg_success.
ENDIF.
ENDFORM. " QUERY_PROCESS_NATIVE

Check failure on line 3839 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form ddic_add_tree_zspro
Expand Down Expand Up @@ -3957,7 +3957,7 @@
ls_node-isfolder = abap_true.

ASSIGN COMPONENT 'NODETYPE' OF STRUCTURE <fs_zspro> TO <fw_zspro>.
IF <fw_zspro> = 1. "table entry

Check failure on line 3960 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
ls_node-n_image = '@PO@'.
ls_node-exp_image = '@PO@'.
ENDIF.
Expand All @@ -3968,7 +3968,7 @@
ls_item-node_key = lw_nodekey.
ls_item-class = cl_gui_column_tree=>item_class_text.
ls_item-item_name = c_ddic_col1.
IF <fw_zspro> = 1. "table entry

Check failure on line 3971 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
ASSIGN COMPONENT 'NODEPARAM' OF STRUCTURE <fs_zspro> TO <fw_zspro>.
ls_item-text = <fw_zspro>.
ELSE.
Expand All @@ -3979,7 +3979,7 @@

ls_item-item_name = c_ddic_col2.
ASSIGN COMPONENT 'NODETYPE' OF STRUCTURE <fs_zspro> TO <fw_zspro>.
IF <fw_zspro> = 1. "table entry

Check failure on line 3982 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
ASSIGN COMPONENT 'TEXT' OF STRUCTURE <fs_zspro> TO <fw_zspro>.
ls_item-text = <fw_zspro>.
ELSE.
Expand Down Expand Up @@ -4034,7 +4034,7 @@
TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
lw_found = abap_true.
DELETE t_node_zspro.

Check failure on line 4037 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Ambiguous statement. Use explicit syntax.

https://rules.abaplint.org/ambiguous_statement
DELETE t_item_zspro WHERE node_key = ls_node-node_key.
ENDIF.
ENDLOOP.
Expand All @@ -4042,7 +4042,7 @@
EXIT.
ENDIF.
ENDDO.
ENDFORM. "ddic_add_tree_zspro

Check failure on line 4045 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form REPO_DELETE_HISTORY
Expand All @@ -4067,7 +4067,7 @@
ENDIF.
ENDIF.
fw_subrc = sy-subrc.
ENDFORM. " REPO_DELETE_HISTORY

Check failure on line 4070 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form options_load
Expand All @@ -4082,10 +4082,10 @@
SPLIT lw_options AT ';' INTO lw_rows
s_customize-paste_break
s_customize-techname
lw_options. "dummy

Check failure on line 4085 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
s_customize-default_rows = lw_rows.
ENDIF.
ENDFORM. " options_load

Check failure on line 4088 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form options_save
Expand All @@ -4111,10 +4111,10 @@
EXCEPTIONS
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e082(s1). "Error saving parameter changes

Check failure on line 4114 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
ENDIF.

ENDFORM. "options_save

Check failure on line 4117 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form DDIC_REFRESH_TREE
Expand Down Expand Up @@ -4174,7 +4174,7 @@

* Refresh ddic tree with list of table/fields of the actual query
PERFORM ddic_set_tree USING lw_from.
ENDFORM. " DDIC_REFRESH_TREE

Check failure on line 4177 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form DDIC_FIND_IN_TREE
Expand Down Expand Up @@ -4219,11 +4219,11 @@
error_in_fields = 1
OTHERS = 2.
IF sy-subrc NE 0 OR lw_returncode NE space.
EXIT. "exit do

Check failure on line 4222 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
ENDIF.
READ TABLE lt_sval INTO ls_sval INDEX 1.
IF ls_sval-value = space.
EXIT. "exit do

Check failure on line 4226 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
ENDIF.

* For new search, start from line 1
Expand Down Expand Up @@ -4266,7 +4266,7 @@
ENDIF.

ENDDO.
ENDFORM. " DDIC_FIND_IN_TREE

Check failure on line 4269 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form OPTIONS_INIT
Expand Down Expand Up @@ -4352,7 +4352,7 @@
EXPORTING
properties = lt_ptab
refresh = abap_true.
ENDFORM. " OPTIONS_INIT

Check failure on line 4355 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form OPTIONS_DISPLAY
Expand Down Expand Up @@ -4413,7 +4413,7 @@

* Save values in user parameters
PERFORM options_save.
ENDFORM. " OPTIONS_DISPLAY

Check failure on line 4416 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form RESULT_SAVE_FILE
Expand Down Expand Up @@ -4477,7 +4477,7 @@
EXCEPTIONS
OTHERS = 0.

ENDFORM. " RESULT_SAVE_FILE

Check failure on line 4480 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form DDIC_F4
Expand All @@ -4502,11 +4502,11 @@
lw_dummy type c. "#EC NEEDED

* Get selection in ddic tree
CALL METHOD s_tab_active-o_tree_ddic->get_selected_node "line selected

Check failure on line 4505 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
IMPORTING
node_key = lw_nodekey.
IF lw_nodekey IS INITIAL.
CALL METHOD s_tab_active-o_tree_ddic->get_selected_item "item selected

Check failure on line 4509 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
IMPORTING
node_key = lw_nodekey
item_name = lw_item.
Expand Down Expand Up @@ -4576,7 +4576,7 @@
PERFORM editor_paste USING lw_val lw_line_start lw_pos_start.
ENDIF.

ENDFORM. " DDIC_F4

Check failure on line 4579 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form EDITOR_GET_DEFAULT_QUERY
Expand Down Expand Up @@ -4606,7 +4606,7 @@
APPEND 'WHERE <conditions>' TO ft_query. "#EC NOTEXT
APPEND '.' TO ft_query. "#EC NOTEXT

ENDFORM. " EDITOR_GET_DEFAULT_QUERY

Check failure on line 4609 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form TAB_NEW
Expand All @@ -4617,7 +4617,7 @@
DATA : l_numb TYPE i,
l_tab TYPE string.

DESCRIBE TABLE t_tabs LINES l_numb.

Check failure on line 4620 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Avoid use of DESCRIBE LINES, use lines() instead

https://rules.abaplint.org/avoid_use
IF l_numb GE 30.
MESSAGE 'You cannot open more than 30 tabs'(m64)
TYPE c_msg_success DISPLAY LIKE c_msg_error.
Expand Down Expand Up @@ -4648,7 +4648,7 @@
* Tab management
APPEND s_tab_active TO t_tabs.

ENDFORM. " TAB_NEW

Check failure on line 4651 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form LEAVE_CURRENT_TAB
Expand Down Expand Up @@ -4682,7 +4682,7 @@

MODIFY t_tabs FROM s_tab_active INDEX w_tabstrip-activetab+3.
CLEAR s_tab_active.
ENDFORM. " LEAVE_CURRENT_TAB

Check failure on line 4685 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form TAB_UPDATE_TITLE
Expand Down Expand Up @@ -4735,7 +4735,7 @@
PERFORM editor_get_query USING space CHANGING lw_query.
<fs> = lw_query.

ENDFORM. " TAB_UPDATE_TITLE

Check failure on line 4738 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form Export_xml
Expand Down Expand Up @@ -4802,10 +4802,10 @@
lo_xml = cl_ixml=>create( ).
lo_document = lo_xml->create_document( ).

lo_root = lo_document->create_simple_element( name = c_xmlnode_root

Check failure on line 4805 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Align parameters to column 57

https://rules.abaplint.org/align_parameters
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align parameters to column 57

Suggest following fix,

Suggested change
lo_root = lo_document->create_simple_element( name = c_xmlnode_root
lo_root = lo_document->create_simple_element( name = c_xmlnode_root

parent = lo_document ).
LOOP AT lt_ztoad INTO ls_ztoad.
lo_element = lo_document->create_simple_element( name = c_xmlnode_file

Check failure on line 4808 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Align parameters to column 62

https://rules.abaplint.org/align_parameters
parent = lo_root ).
lw_string = ls_ztoad-visibility.
lo_element->set_attribute( name = c_xmlattr_visibility value = lw_string ).
Expand All @@ -4832,7 +4832,7 @@
filetype = 'BIN'
CHANGING
data_tab = lt_xml.
ENDFORM. "Export_xml

Check failure on line 4835 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form Import_xml
Expand Down Expand Up @@ -4931,7 +4931,7 @@
lw_node_name = lo_node->get_name( ).
IF lw_node_name = c_xmlnode_file.
* Cast node to element
lo_element ?= lo_node. "->query_interface( ixml_iid_element ).

Check failure on line 4934 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
CLEAR ls_ztoad.
ls_ztoad-visibility_group = lw_group.
ls_ztoad-owner = sy-uname.
Expand All @@ -4958,7 +4958,7 @@
IF sy-subrc NE 0.
READ TABLE lt_ztoad WITH KEY queryid = lw_guid TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
EXIT. "exit do

Check failure on line 4961 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
ENDIF.
ENDIF.
ENDDO.
Expand All @@ -4976,15 +4976,15 @@

INSERT ztoad FROM TABLE lt_ztoad.
IF sy-subrc = 0.
MESSAGE s031(r9). "Query saved

Check failure on line 4979 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
ELSE.
MESSAGE e220(iqapi). "Error when saving the query

Check failure on line 4981 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments
ENDIF.

* Refresh repository to display new saved query
PERFORM repo_fill.

ENDFORM. "import_xml

Check failure on line 4987 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments

*&---------------------------------------------------------------------*
*& Form SET_STATUS_010
Expand All @@ -5010,7 +5010,7 @@
ENDIF.
SET TITLEBAR 'STATUS010'.

DESCRIBE TABLE t_tabs LINES lw_max.

Check failure on line 5013 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Avoid use of DESCRIBE LINES, use lines() instead

https://rules.abaplint.org/avoid_use

LOOP AT SCREEN.
IF screen-name(6) = 'S_TAB-'.
Expand All @@ -5023,4 +5023,4 @@
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM. " SET_STATUS_010

Check failure on line 5026 in src/ztoad.prog.abap

View check run for this annotation

abaplint / abaplint

Do not use end of line comments - move comment to previous row instead

https://rules.abaplint.org/check_comments