Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Update #46

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
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
32 changes: 14 additions & 18 deletions src/01/01/zabap2ui5_cl_core_srv_draft.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ CLASS zabap2ui5_cl_core_srv_draft DEFINITION
CREATE PUBLIC.

PUBLIC SECTION.

TYPES ty_s_db TYPE zabap2ui5_t_01.

METHODS count_entries
Expand All @@ -17,23 +16,22 @@ CLASS zabap2ui5_cl_core_srv_draft DEFINITION

METHODS read_draft
IMPORTING
!id TYPE clike
id TYPE clike
RETURNING
VALUE(result) TYPE ty_s_db.

METHODS read_info
IMPORTING
!id TYPE clike
id TYPE clike
RETURNING
VALUE(result) TYPE zabap2ui5_if_types=>ty_s_draft.

METHODS cleanup.

PROTECTED SECTION.

METHODS read
IMPORTING
!id TYPE clike
id TYPE clike
check_load_app TYPE abap_bool DEFAULT abap_true
RETURNING
VALUE(result) TYPE ty_s_db.
Expand All @@ -43,6 +41,7 @@ ENDCLASS.


CLASS zabap2ui5_cl_core_srv_draft IMPLEMENTATION.

METHOD cleanup.

DATA(lv_four_hours_ago) = zabap2ui5_cl_util=>time_substract_seconds( time = zabap2ui5_cl_util=>time_get_timestampl( )
Expand All @@ -58,18 +57,16 @@ CLASS zabap2ui5_cl_core_srv_draft IMPLEMENTATION.
ASSERT draft-id IS NOT INITIAL.

DATA(ls_db) = VALUE ty_s_db( id = draft-id
id_prev = draft-id_prev
id_prev_app = draft-id_prev_app
id_prev_app_stack = draft-id_prev_app_stack
uname = zabap2ui5_cl_util=>context_get_user_tech( )
timestampl = zabap2ui5_cl_util=>time_get_timestampl( )
data = model_xml ).
id_prev = draft-id_prev
id_prev_app = draft-id_prev_app
id_prev_app_stack = draft-id_prev_app_stack
timestampl = zabap2ui5_cl_util=>time_get_timestampl( )
data = model_xml ).

MODIFY zabap2ui5_t_01 FROM @ls_db.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zabap2ui5_cx_util_error
EXPORTING
val = `CREATE_OF_DRAFT_ENTRY_ON_DATABASE_FAILED`.
EXPORTING val = `CREATE_OF_DRAFT_ENTRY_ON_DATABASE_FAILED`.
ENDIF.
COMMIT WORK AND WAIT.

Expand All @@ -86,16 +83,15 @@ CLASS zabap2ui5_cl_core_srv_draft IMPLEMENTATION.
ELSE.

SELECT SINGLE id, id_prev, id_prev_app, id_prev_app_stack
FROM zabap2ui5_t_01
FROM zabap2ui5_t_01
WHERE id = @id
INTO CORRESPONDING FIELDS OF @result ##SUBRC_OK.

ENDIF.

IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zabap2ui5_cx_util_error
EXPORTING
val = `NO_DRAFT_ENTRY_OF_PREVIOUS_REQUEST_FOUND`.
EXPORTING val = `NO_DRAFT_ENTRY_OF_PREVIOUS_REQUEST_FOUND`.
ENDIF.

ENDMETHOD.
Expand All @@ -117,9 +113,9 @@ CLASS zabap2ui5_cl_core_srv_draft IMPLEMENTATION.

METHOD count_entries.

SELECT COUNT( * )
FROM zabap2ui5_t_01
SELECT COUNT( * ) FROM zabap2ui5_t_01
INTO @result.

ENDMETHOD.

ENDCLASS.
10 changes: 1 addition & 9 deletions src/01/01/zabap2ui5_t_01.tabl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<TABCLASS>TRANSP</TABCLASS>
<CLIDEP>X</CLIDEP>
<DDTEXT>abap2UI5 - drafts</DDTEXT>
<MASTERLANG>E</MASTERLANG>
<CONTFLAG>A</CONTFLAG>
<EXCLASS>1</EXCLASS>
</DD02V>
Expand Down Expand Up @@ -71,15 +72,6 @@
<ADMINFIELD>0</ADMINFIELD>
<COMPTYPE>E</COMPTYPE>
</DD03P>
<DD03P>
<FIELDNAME>UNAME</FIELDNAME>
<ADMINFIELD>0</ADMINFIELD>
<INTTYPE>C</INTTYPE>
<INTLEN>000040</INTLEN>
<DATATYPE>CHAR</DATATYPE>
<LENG>000020</LENG>
<MASK> CHAR</MASK>
</DD03P>
<DD03P>
<FIELDNAME>DATA</FIELDNAME>
<ADMINFIELD>0</ADMINFIELD>
Expand Down
36 changes: 18 additions & 18 deletions src/01/02/zabap2ui5_cl_core_client.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ CLASS zabap2ui5_cl_core_client IMPLEMENTATION.
WHEN 'E' THEN `Error`
WHEN 'S' THEN `Success`
WHEN `W` THEN `Warning`
ELSE `Information` ).
ELSE `Information` ).

ELSEIF lines( lt_msg ) > 1.
lv_text = | { lines( lt_msg ) } Messages found: |.
Expand All @@ -109,7 +109,7 @@ CLASS zabap2ui5_cl_core_client IMPLEMENTATION.
WHEN 'E' THEN `Error`
WHEN 'S' THEN `Success`
WHEN `W` THEN `Warning`
ELSE `Information` ).
ELSE `Information` ).
ENDIF.
lv_type = zabap2ui5_cl_util=>ui5_get_msg_type( lt_msg[ 1 ]-type ).
ELSE.
Expand Down Expand Up @@ -312,11 +312,11 @@ CLASS zabap2ui5_cl_core_client IMPLEMENTATION.
DATA(lo_bind) = NEW zabap2ui5_cl_core_srv_bind( mo_action->mo_app ).
result = lo_bind->main( val = zabap2ui5_cl_util=>conv_get_as_data_ref( val )
type = zabap2ui5_if_core_types=>cs_bind_type-one_way
config = VALUE #( path_only = path
custom_filter = custom_filter
custom_mapper = custom_mapper
tab = zabap2ui5_cl_util=>conv_get_as_data_ref( tab )
tab_index = tab_index
config = VALUE #( path_only = path
custom_filter = custom_filter
custom_mapper = custom_mapper
tab = zabap2ui5_cl_util=>conv_get_as_data_ref( tab )
tab_index = tab_index
switch_default_model = switch_Default_Model ) ).


Expand All @@ -327,13 +327,13 @@ CLASS zabap2ui5_cl_core_client IMPLEMENTATION.
DATA(lo_bind) = NEW zabap2ui5_cl_core_srv_bind( mo_action->mo_app ).
result = lo_bind->main( val = zabap2ui5_cl_util=>conv_get_as_data_ref( val )
type = zabap2ui5_if_core_types=>cs_bind_type-two_way
config = VALUE #( path_only = path
custom_filter = custom_filter
custom_filter_back = custom_filter_back
custom_mapper = custom_mapper
custom_mapper_back = custom_mapper_back
tab = zabap2ui5_cl_util=>conv_get_as_data_ref( tab )
tab_index = tab_index
config = VALUE #( path_only = path
custom_filter = custom_filter
custom_filter_back = custom_filter_back
custom_mapper = custom_mapper
custom_mapper_back = custom_mapper_back
tab = zabap2ui5_cl_util=>conv_get_as_data_ref( tab )
tab_index = tab_index
switch_default_model = switch_Default_Model ) ).

ENDMETHOD.
Expand All @@ -342,9 +342,9 @@ CLASS zabap2ui5_cl_core_client IMPLEMENTATION.

DATA(lo_bind) = NEW zabap2ui5_cl_core_srv_bind( mo_action->mo_app ).
result = lo_bind->main_local( val = val
config = VALUE #( path_only = path
custom_mapper = custom_mapper
custom_filter = custom_filter
config = VALUE #( path_only = path
custom_mapper = custom_mapper
custom_filter = custom_filter
switch_default_model = switch_Default_Model ) ).

ENDMETHOD.
Expand Down Expand Up @@ -418,7 +418,7 @@ CLASS zabap2ui5_cl_core_client IMPLEMENTATION.

METHOD zabap2ui5_if_client~check_on_init.

result = xsdbool( CAST zabap2ui5_if_app( mo_action->mo_app->mo_app )->check_initialized = abap_false ).
result = xsdbool( CAST zabap2ui5_if_app( mo_action->mo_app->mo_app )->check_initialized = abap_false ).

ENDMETHOD.

Expand Down
2 changes: 1 addition & 1 deletion src/01/02/zabap2ui5_cl_core_handler.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ CLASS zabap2ui5_cl_core_handler IMPLEMENTATION.
s_front-app = zabap2ui5_cl_util=>rtti_get_classname_by_ref( mo_action->mo_app->mo_app )
).

IF ms_response-s_front-params-s_view-check_update_model = abap_true
IF ms_response-s_front-params-s_view-check_update_model = abap_true
OR ms_response-s_front-params-s_view_nest-check_update_model = abap_true
OR ms_response-s_front-params-s_view_nest2-check_update_model = abap_true
OR ms_response-s_front-params-s_popup-check_update_model = abap_true
Expand Down
2 changes: 1 addition & 1 deletion src/01/02/zabap2ui5_cl_core_srv_attri.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ CLASS zabap2ui5_cl_core_srv_attri IMPLEMENTATION.
LOOP AT mt_attri->* REFERENCE INTO DATA(lr_attri)
WHERE o_typedescr IS BOUND.

IF lr_attri->o_typedescr->kind <> cl_abap_typedescr=>kind_elem
IF lr_attri->o_typedescr->kind <> cl_abap_typedescr=>kind_elem
AND lr_attri->o_typedescr->kind <> cl_abap_typedescr=>kind_struct
AND lr_attri->o_typedescr->kind <> cl_abap_typedescr=>kind_table.
CONTINUE.
Expand Down
4 changes: 2 additions & 2 deletions src/01/02/zabap2ui5_cl_core_srv_diss.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ CLASS zabap2ui5_cl_core_srv_diss IMPLEMENTATION.
DATA(lt_attri) = zabap2ui5_cl_util=>rtti_get_t_attri_by_oref( lr_ref ).

LOOP AT lt_attri REFERENCE INTO DATA(lr_attri)
WHERE visibility = cl_abap_objectdescr=>public
WHERE visibility = cl_abap_objectdescr=>public
AND is_interface = abap_false
AND is_constant = abap_false.
TRY.
Expand Down Expand Up @@ -184,7 +184,7 @@ CLASS zabap2ui5_cl_core_srv_diss IMPLEMENTATION.
DATA(lt_attri_new) = VALUE zabap2ui5_if_core_types=>ty_t_attri( ).

LOOP AT mt_attri->* REFERENCE INTO DATA(lr_attri)
WHERE check_dissolved = abap_false
WHERE check_dissolved = abap_false
AND bind_type <> zabap2ui5_if_core_types=>cs_bind_type-one_time.

lr_attri->check_dissolved = abap_true.
Expand Down
4 changes: 2 additions & 2 deletions src/01/02/zabap2ui5_cl_core_srv_json.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ CLASS zabap2ui5_cl_core_srv_json IMPLEMENTATION.
ENDIF.

LOOP AT t_attri->* REFERENCE INTO DATA(lr_attri)
WHERE bind_type = zabap2ui5_if_core_types=>cs_bind_type-two_way
WHERE bind_type = zabap2ui5_if_core_types=>cs_bind_type-two_way
AND view = lv_view.
TRY.

Expand Down Expand Up @@ -155,7 +155,7 @@ CLASS zabap2ui5_cl_core_srv_json IMPLEMENTATION.

result-s_front-o_comp_data = lo_ajson->slice( `/CONFIG/ComponentData` ).

result-s_control-check_launchpad = xsdbool( result-s_front-search CS `scenario=LAUNCHPAD`
result-s_control-check_launchpad = xsdbool( result-s_front-search CS `scenario=LAUNCHPAD`
OR result-s_front-pathname CS `/ui2/flp`
OR result-s_front-pathname CS `test/flpSandbox`
).
Expand Down
Loading