Skip to content

Commit 6caacdb

Browse files
oblomov-devclaude
andauthored
refactor: migrate to popups addon (z2ui5_cl_popup_*) (#22)
The built-in popups were moved from the abap2UI5 core framework (obsolete package src/99/02) to the abap2UI5-addons/popups repository. Switch all usages to the new class names, add the popups repo as an abaplint dependency and document the new dependency in the README. Claude-Session: https://claude.ai/code/session_01EUm2VFnKDYma7WNGyBT3qb Co-authored-by: Claude <noreply@anthropic.com>
1 parent 65b3316 commit 6caacdb

5 files changed

Lines changed: 20 additions & 11 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ SQL Console in Your Browser – No Need for Eclipse or SAP GUI Installation
1111
* S/4 Private Cloud or On-Premise (ABAP for Cloud, Standard ABAP)
1212
* SAP NetWeaver AS ABAP 7.50 or higher (Standard ABAP)
1313

14+
#### Dependencies
15+
* [abap2UI5](https://github.com/abap2UI5/abap2UI5)
16+
* [popups](https://github.com/abap2UI5-addons/popups)
17+
1418
#### Credits
1519
* Logic for Query to ABAP SQL Translation used from [ZTOAD](https://github.com/marianfoo/ztoad), integrated by [choper725](https://github.com/choper725)
1620

abaplint.jsonc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"folder": "/abap2UI5",
1414
"files": "/src/**/*.*"
1515
},
16+
{
17+
"url": "https://github.com/abap2UI5-addons/popups",
18+
"folder": "/popups",
19+
"files": "/src/**/*.*"
20+
},
1621
{
1722
"url": "https://github.com/abap2UI5-addons/custom-controls",
1823
"folder": "/customcontrols",

src/abap/z2ui5_sql_cl_app_01.clas.abap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ CLASS z2ui5_sql_cl_app_01 DEFINITION PUBLIC.
124124
METHODS preview_on_filter_clear.
125125
METHODS z2ui5_on_callback_pop_confirm
126126
IMPORTING
127-
io_popup TYPE REF TO z2ui5_cl_pop_to_confirm.
127+
io_popup TYPE REF TO z2ui5_cl_popup_to_confirm.
128128
METHODS history_on_load.
129129
METHODS history_db_save.
130130
METHODS z2ui5_on_init_set_app.
@@ -215,7 +215,7 @@ CLASS z2ui5_sql_cl_app_01 IMPLEMENTATION.
215215
client->message_box_display( `No history entries found. No action needed.` ).
216216
RETURN.
217217
ENDIF.
218-
ms_control-callback_pop_history_clear = client->nav_app_call( z2ui5_cl_pop_to_confirm=>factory( `Delete all history entries from database?` ) ).
218+
ms_control-callback_pop_history_clear = client->nav_app_call( z2ui5_cl_popup_to_confirm=>factory( `Delete all history entries from database?` ) ).
219219

220220
ENDMETHOD.
221221

@@ -517,22 +517,22 @@ CLASS z2ui5_sql_cl_app_01 IMPLEMENTATION.
517517
z2ui5_on_event( ).
518518

519519
CATCH cx_root INTO DATA(x).
520-
client->nav_app_call( z2ui5_cl_pop_error=>factory( x ) ).
520+
client->nav_app_call( z2ui5_cl_popup_error=>factory( x ) ).
521521
ENDTRY.
522522
ENDMETHOD.
523523

524524

525525
METHOD z2ui5_on_callback.
526526

527527
TRY.
528-
DATA(lo_popup_confirm) = CAST z2ui5_cl_pop_to_confirm( client->get_app( client->get( )-s_draft-id_prev_app ) ).
528+
DATA(lo_popup_confirm) = CAST z2ui5_cl_popup_to_confirm( client->get_app( client->get( )-s_draft-id_prev_app ) ).
529529
z2ui5_on_callback_pop_confirm( lo_popup_confirm ).
530530
RETURN.
531531
CATCH cx_root.
532532
ENDTRY.
533533

534534
TRY.
535-
DATA(lo_popup_range) = CAST z2ui5_cl_pop_get_range_m( client->get_app( client->get( )-s_draft-id_prev_app ) ).
535+
DATA(lo_popup_range) = CAST z2ui5_cl_popup_get_range_m( client->get_app( client->get( )-s_draft-id_prev_app ) ).
536536
IF lo_popup_range->result( )-check_confirmed = abap_true.
537537
ms_draft-s_preview-t_filter = lo_popup_range->result( )-t_filter.
538538
preview_on_filter( ).
@@ -584,7 +584,7 @@ CLASS z2ui5_sql_cl_app_01 IMPLEMENTATION.
584584
z2ui5_on_init_set_app( ).
585585

586586
WHEN `PREVIEW_FILTER`.
587-
client->nav_app_call( z2ui5_cl_pop_get_range_m=>factory( ms_draft-s_preview-t_filter ) ).
587+
client->nav_app_call( z2ui5_cl_popup_get_range_m=>factory( ms_draft-s_preview-t_filter ) ).
588588

589589
WHEN `PREVIEW_CLEAR_FILTER`.
590590
preview_on_filter_clear( ).

src/native/zcl_2ui5_native_sql_console.clas.abap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class zcl_2ui5_native_sql_console implementation.
7676

7777
t->undo( ).
7878

79-
me->a_ui5_client->nav_app_call( z2ui5_cl_pop_error=>factory( e ) ).
79+
me->a_ui5_client->nav_app_call( z2ui5_cl_popup_error=>factory( e ) ).
8080

8181
endtry.
8282

src/native/zcl_2ui5_native_sql_console.clas.locals_imp.abap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class user_approval definition
227227

228228
protected section.
229229

230-
data a_confirmation_popup type ref to z2ui5_cl_pop_to_confirm.
230+
data a_confirmation_popup type ref to z2ui5_cl_popup_to_confirm.
231231

232232
endclass.
233233
interface popup_dialog.
@@ -249,7 +249,7 @@ class error_acknowledged_interaction definition
249249

250250
protected section.
251251

252-
data a_downcasted_ref type ref to z2ui5_cl_pop_error ##NEEDED. "as a safeguard that we are actually handling the intended popup
252+
data a_downcasted_ref type ref to z2ui5_cl_popup_error ##NEEDED. "as a safeguard that we are actually handling the intended popup
253253

254254
endclass.
255255
class sql_statement definition
@@ -744,7 +744,7 @@ class on_delete_history_items implementation.
744744

745745
else.
746746

747-
i_ui5_client->nav_app_call( z2ui5_cl_pop_to_confirm=>factory( conv #( 'Delete selected history entries from database?'(013) ) ) ).
747+
i_ui5_client->nav_app_call( z2ui5_cl_popup_to_confirm=>factory( conv #( 'Delete selected history entries from database?'(013) ) ) ).
748748

749749
state->event_awaiting_response = me->event_name( ).
750750

@@ -860,7 +860,7 @@ class error_acknowledged_interaction implementation.
860860
endmethod.
861861
method ui_interaction~id.
862862

863-
r_val = `\CLASS=Z2UI5_CL_POP_ERROR`.
863+
r_val = `\CLASS=Z2UI5_CL_POPUP_ERROR`.
864864

865865
endmethod.
866866

0 commit comments

Comments
 (0)