Skip to content

Commit 4d6fe6c

Browse files
oblomov-devclaude
andauthored
fix - replace _bind_local (#17)
* fix: replace removed _bind_local with _bind (#16) The _bind_local method was removed from the z2ui5_if_client interface in a recent abap2UI5 update. Replace with _bind which now handles both public attributes and local variables/field symbols. https://claude.ai/code/session_01SiKPSNXdhzLE2bHRbXdG64 * fix: use public REF TO data attributes for _bind instead of local variables _bind cannot trace local variables back to the app class. Added public mr_preview_tab / mr_output_data attributes, assigned the data references to them, and dereferenced from the public attribute before passing to _bind. https://claude.ai/code/session_01SiKPSNXdhzLE2bHRbXdG64 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 26c107d commit 4d6fe6c

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/abap/z2ui5_sql_cl_app_01.clas.abap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ CLASS z2ui5_sql_cl_app_01 DEFINITION PUBLIC.
9393
DATA t_tab_group TYPE STANDARD TABLE OF ty_sort WITH EMPTY KEY .
9494
DATA t_tab_filter TYPE STANDARD TABLE OF ty_sort WITH EMPTY KEY .
9595

96+
DATA mr_preview_tab TYPE REF TO data.
9697

9798
PROTECTED SECTION.
9899

@@ -370,11 +371,12 @@ CLASS Z2UI5_SQL_CL_APP_01 IMPLEMENTATION.
370371

371372
IF ms_draft-s_preview-tab IS BOUND.
372373
FIELD-SYMBOLS <tab> TYPE table.
373-
ASSIGN ms_draft-s_preview-tab->* TO <tab>.
374+
mr_preview_tab = ms_draft-s_preview-tab.
375+
ASSIGN mr_preview_tab->* TO <tab>.
374376

375377
DATA(tab) = lo_view_nested->ui_table(
376378
id = `previewTab`
377-
rows = client->_bind_local( <tab> )
379+
rows = client->_bind( <tab> )
378380
editable = abap_false
379381
alternaterowcolors = abap_true
380382
showcolumnvisibilitymenu = abap_true

src/native/zcl_2ui5_native_sql_console.clas.abap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class zcl_2ui5_native_sql_console definition
3232

3333
data state type ref to zcl_2ui5_native_sql_console_st.
3434

35+
data mr_output_data type ref to data.
36+
3537
protected section.
3638

3739
data a_ui5_client type ref to z2ui5_if_client.

src/native/zcl_2ui5_native_sql_console.clas.locals_imp.abap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,14 +607,16 @@ class data_result_view implementation.
607607

608608
me->a_parser = z2ui5_cl_xml_view=>factory( ).
609609

610-
assign i_state->results_pane-output_data->* to <data>.
610+
data(app) = cast zcl_2ui5_native_sql_console( i_ui5_client->get_app( i_ui5_client->get( )-s_draft-id ) ).
611+
app->mr_output_data = i_state->results_pane-output_data.
612+
assign app->mr_output_data->* to <data>.
611613

612614
if <data> is assigned.
613615

614616
data(fields) = z2ui5_cl_util=>rtti_get_t_attri_by_any( <data> ).
615617

616618
data(table) = me->a_parser->ui_table( id = `previewTab`
617-
rows = me->a_ui5_client->_bind_local( <data> )
619+
rows = me->a_ui5_client->_bind( <data> )
618620
editable = abap_false
619621
alternaterowcolors = abap_true
620622
showcolumnvisibilitymenu = abap_true

0 commit comments

Comments
 (0)