14.01.2020 Views

ABAP_to_the_Future

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

11

ABAP2XLSX

ls_stylemapping-complete_style-number_format-format_code = '#,##0;#,##

0'.”i.e. no minus sign when negative

lo_worksheet->change_cell_style(

ip_column

= lc_age_column

ip_row

= ld_sheet_row “this would be a loop

ip_number_format_format_code = ls_stylemapping-complete_style-number_

format-format_code ).

Listing 11.21 Changing the Formatting to Make Negatives Look Positive

The result can be seen in Figure 11.10. What’s more, you can set the value thresholds

(i.e., when a green traffic light turns into a yellow or red traffic light) by having

them on the selection screen of the ABAP report with default values that the

user can then change. Certain values might be more stringent at year end, for

example.

Figure 11.10 Conditional Formatting with Icons

11.2.5 Creating Spreadsheets with Multiple Worksheets

Many times, preparing a spreadsheet in volves downloading several reports and

then merging them so that each report lives on a separate workbook in the

482

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!