Skip to content

Commit bef573b

Browse files
authored
Merge pull request #3 from abap2UI5-addons/Dev
Possibility to save without TR
2 parents 8f7ac5a + c4c7aa7 commit bef573b

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

src/z2ui5_cl_pop_show_tr.clas.abap

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ CLASS z2ui5_cl_pop_show_tr DEFINITION
2121
VALUE(result) TYPE REF TO z2ui5_cl_pop_show_tr.
2222

2323
PROTECTED SECTION.
24-
2524
METHODS on_init.
2625
METHODS render_view.
2726
METHODS on_event.
@@ -50,15 +49,13 @@ CLASS z2ui5_cl_pop_show_tr IMPLEMENTATION.
5049

5150
ENDMETHOD.
5251

53-
54-
5552
METHOD render_view.
5653
DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ).
5754

5855
popup->dialog( contentwidth = '40%'
5956
afterclose = client->_event( 'CLOSE' )
6057

61-
title = z2ui5_cl_util=>rtti_get_data_element_texts( `SRET_TRORD` )-long
58+
title = z2ui5_cl_util=>rtti_get_data_element_texts( `SRET_TRORD` )-long
6259
)->table( mode = 'SingleSelectLeft'
6360
items = client->_bind_edit( mt_data )
6461
)->columns(
@@ -71,9 +68,12 @@ CLASS z2ui5_cl_pop_show_tr IMPLEMENTATION.
7168
)->text( '{TRANSPORT}'
7269
)->text( '{SHORT_DESCRIPTION}'
7370
)->get_parent( )->get_parent( )->get_parent( )->get_parent(
74-
)->buttons( )->button( text = 'Select'
75-
press = client->_event( 'TRANSPORT_SELECT' )
76-
type = 'Emphasized' ).
71+
)->buttons( )->button( text = 'no transport'
72+
press = client->_event( 'LOCL' )
73+
type = 'Default'
74+
)->button( text = 'Select'
75+
press = client->_event( 'SELECT' )
76+
type = 'Emphasized' ).
7777

7878
client->popup_display( popup->stringify( ) ).
7979
ENDMETHOD.
@@ -87,7 +87,7 @@ CLASS z2ui5_cl_pop_show_tr IMPLEMENTATION.
8787
client->popup_destroy( ).
8888
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
8989

90-
WHEN `TRANSPORT_SELECT`.
90+
WHEN `SELECT`.
9191

9292
READ TABLE mt_data INTO DATA(line) WITH KEY selkz = abap_true.
9393
IF sy-subrc = 0.
@@ -97,6 +97,13 @@ CLASS z2ui5_cl_pop_show_tr IMPLEMENTATION.
9797
client->popup_destroy( ).
9898
client->nav_app_leave( ).
9999

100+
WHEN 'LOCL'.
101+
102+
ms_transport-locl = abap_true.
103+
104+
client->popup_destroy( ).
105+
client->nav_app_leave( ).
106+
100107
WHEN OTHERS.
101108

102109
ENDCASE.
@@ -108,11 +115,14 @@ CLASS z2ui5_cl_pop_show_tr IMPLEMENTATION.
108115

109116
METHOD add_data_to_tranport.
110117

118+
IF is_transport-locl = abap_true.
119+
RETURN.
120+
ENDIF.
121+
111122
z2ui5_cl_util=>bus_tr_add( ir_data = ir_data
112-
iv_tabname = iv_tabname
113-
is_transport = is_transport ).
123+
iv_tabname = iv_tabname
124+
is_transport = is_transport ).
114125

115126
ENDMETHOD.
116127

117-
118128
ENDCLASS.

0 commit comments

Comments
 (0)