Skip to content

Commit 8cc6d7c

Browse files
committed
Fix indentation inconsistencies in ABAP code snippets
- xlsx.md: Fix METHOD indentation (4 spaces -> 2 spaces) in z2ui5_cl_sample_upload - xlsx.md: Fix CLASS/ENDCLASS capitalization in lcl_help DEFINITION - xlsx.md: Fix PUBLIC SECTION indentation (no indent -> 2 spaces) - xlsx.md: Fix TRY block indentation in get_xlsx_by_itab method - xlsx.md: Fix client->follow_up_action indentation (6 spaces -> 4 spaces) - files.md: Fix METHOD name capitalization (Z2UI5_if_app -> z2ui5_if_app) All code snippets now use consistent 2-space indentation for ABAP structure
1 parent a8baeba commit 8cc6d7c

File tree

2 files changed

+44
-45
lines changed

2 files changed

+44
-45
lines changed

docs/development/specific/files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CLASS z2ui5_cl_sample_upload DEFINITION PUBLIC.
1818
ENDCLASS.
1919
2020
CLASS z2ui5_cl_sample_upload IMPLEMENTATION.
21-
METHOD Z2UI5_if_app~main.
21+
METHOD z2ui5_if_app~main.
2222
2323
client->view_display( z2ui5_cl_xml_view=>factory(
2424
)->page(

docs/development/specific/xlsx.md

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@ CLASS z2ui5_cl_sample_upload DEFINITION PUBLIC.
2222
ENDCLASS.
2323
2424
CLASS z2ui5_cl_sample_upload IMPLEMENTATION.
25-
METHOD z2ui5_if_app~main.
25+
METHOD z2ui5_if_app~main.
2626
27-
client->view_display( z2ui5_cl_xml_view=>factory(
28-
)->page(
29-
)->_z2ui5( )->file_uploader(
30-
value = client->_bind_edit( mv_value )
31-
path = client->_bind_edit( mv_path )
32-
placeholder = `filepath here...`
33-
upload = client->_event( `UPLOAD` )
34-
)->stringify( ) ).
27+
client->view_display( z2ui5_cl_xml_view=>factory(
28+
)->page(
29+
)->_z2ui5( )->file_uploader(
30+
value = client->_bind_edit( mv_value )
31+
path = client->_bind_edit( mv_path )
32+
placeholder = `filepath here...`
33+
upload = client->_event( `UPLOAD` )
34+
)->stringify( ) ).
3535
36-
IF client->get( )-event = `UPLOAD`.
36+
IF client->get( )-event = `UPLOAD`.
3737
38-
data(lr_itab) = lcl_help=>itab_get_by_xlsx( mv_value ).
39-
"further process with itab...
40-
client->message_box_display( `xlsx uploaded` ).
41-
ENDIF.
38+
data(lr_itab) = lcl_help=>itab_get_by_xlsx( mv_value ).
39+
"further process with itab...
40+
client->message_box_display( `xlsx uploaded` ).
41+
ENDIF.
4242
43-
ENDMETHOD.
43+
ENDMETHOD.
4444
ENDCLASS.
4545
```
4646

@@ -121,16 +121,16 @@ ENDMETHOD.
121121
```
122122

123123
```abap [lcl_help]
124-
class lcl_help DEFINITION.
124+
CLASS lcl_help DEFINITION.
125125
126-
PUBLIC SECTION.
126+
PUBLIC SECTION.
127127
CLASS-METHODS xlsx_get_by_itab
128128
IMPORTING
129129
VALUE(val) TYPE STANDARD TABLE
130130
RETURNING
131131
VALUE(result) TYPE string.
132132
133-
endclass.
133+
ENDCLASS.
134134
135135
CLASS lcl_help IMPLEMENTATION.
136136
@@ -208,9 +208,9 @@ METHOD z2ui5_if_app~main.
208208
( count = `3` value = `red` descr = `this is a description` ) ).
209209
210210
DATA(lv_file) = lcl_help=>get_xlsx_by_itab( lt_tab ).
211-
client->follow_up_action( val = client->_event_client(
212-
val = client->cs_event-download_b64_file
213-
t_arg = VALUE #( ( lv_file ) ( `test.xlsx` ) ) ) ).
211+
client->follow_up_action( val = client->_event_client(
212+
val = client->cs_event-download_b64_file
213+
t_arg = VALUE #( ( lv_file ) ( `test.xlsx` ) ) ) ).
214214
ENDIF.
215215
216216
ENDMETHOD.
@@ -232,37 +232,36 @@ CLASS lcl_help IMPLEMENTATION.
232232
METHOD get_xlsx_by_itab.
233233
TRY.
234234
235-
DATA: lo_excel TYPE REF TO zcl_excel,
236-
lo_writer TYPE REF TO zif_excel_writer,
237-
lo_worksheet TYPE REF TO zcl_excel_worksheet.
238-
239-
DATA: lt_field_catalog TYPE zexcel_t_fieldcatalog,
240-
ls_table_settings TYPE zexcel_s_table_settings.
235+
DATA: lo_excel TYPE REF TO zcl_excel,
236+
lo_writer TYPE REF TO zif_excel_writer,
237+
lo_worksheet TYPE REF TO zcl_excel_worksheet.
241238
242-
" Creates active sheet
243-
CREATE OBJECT lo_excel.
239+
DATA: lt_field_catalog TYPE zexcel_t_fieldcatalog,
240+
ls_table_settings TYPE zexcel_s_table_settings.
244241
245-
" Get active sheet
246-
lo_worksheet = lo_excel->get_active_worksheet( ).
247-
lo_worksheet->set_title( `Internal table` ).
242+
" Creates active sheet
243+
CREATE OBJECT lo_excel.
248244
249-
lt_field_catalog = zcl_excel_common=>get_fieldcatalog( ip_table = val ).
250-
ls_table_settings-table_style = zcl_excel_table=>builtinstyle_medium5.
251-
lo_worksheet->bind_table( ip_table = val
252-
is_table_settings = ls_table_settings
253-
it_field_catalog = lt_field_catalog ).
245+
" Get active sheet
246+
lo_worksheet = lo_excel->get_active_worksheet( ).
247+
lo_worksheet->set_title( `Internal table` ).
254248
255-
lo_worksheet->freeze_panes( ip_num_rows = 1 ).
249+
lt_field_catalog = zcl_excel_common=>get_fieldcatalog( ip_table = val ).
250+
ls_table_settings-table_style = zcl_excel_table=>builtinstyle_medium5.
251+
lo_worksheet->bind_table( ip_table = val
252+
is_table_settings = ls_table_settings
253+
it_field_catalog = lt_field_catalog ).
256254
257-
CREATE OBJECT lo_writer TYPE zcl_excel_writer_2007.
258-
DATA(lv_file) = lo_writer->write_file( lo_excel ).
255+
lo_worksheet->freeze_panes( ip_num_rows = 1 ).
259256
260-
result = z2ui5_cl_util=>conv_encode_x_base64( lv_file ).
261-
result = `data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,` && result.
257+
CREATE OBJECT lo_writer TYPE zcl_excel_writer_2007.
258+
DATA(lv_file) = lo_writer->write_file( lo_excel ).
262259
260+
result = z2ui5_cl_util=>conv_encode_x_base64( lv_file ).
261+
result = `data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,` && result.
263262
264-
CATCH cx_root INTO DATA(x).
265-
z2ui5_cL_util=>x_raise( x->get_text( ) ).
263+
CATCH cx_root INTO DATA(x).
264+
z2ui5_cL_util=>x_raise( x->get_text( ) ).
266265
ENDTRY.
267266
ENDMETHOD.
268267
ENDCLASS.

0 commit comments

Comments
 (0)