14.01.2020 Views

ABAP_to_the_Future

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Enhancing Custom Reports with ABAP2XLSX 11.2

The class ZCL_EXCEL_STYLE_NUMBER_FORMAT has a whole raft of constants for the

most common formats for dates and percentages and the like, but as you can see

you can mix and match, and within SAP you are able to do anything that’s possible

with the Excel formatting options.

Figure 11.7 Cells Formatted Using Accounting Conventions

As can be seen in Figure 11.7, by the time the accountant has downloaded the

spreadsheet from SAP, none of the usual work to reformat the cells in the way

that he likes is needed.

11.2.3 Establishing Printer Settings

Even while I was still at school, I hear d talk about the dawn of the “paperless

office,” in which nothing would ever be printed, because everything could be

done on a computer. Technology has move d on in leaps and bounds since then,

but even now I don’t think that the ink companies need to be too worried. Realistically,

the first thing people do when they have downloaded a report from SAP

onto a spreadsheet is to print it out so they can scribble all over it.

Given that premise, the first problem your user is going to have is that in 99% of

reports there are more columns than th ere are rows, and be cause the default

printing mode for a spreadsheet is Portrait, there will be more columns than can

fit on the page. If the user tries to print it out without changing the orientation,

then the result will look horrible, with the information from one row being on

two different pieces of paper. Therefore, the first thing someone would do before

printing is to change the orientation to Landscape, then usually change the setting

so that all the columns fit on on e page, and finally add some headers and

footers and set some rows as header rows so that each printed page has header

information above each column saying what the column represents.

Why not do all of that in SAP before downloading the spreadsheet so that your

users don’t have to? First, change the orientation and make a few other general

471

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

Saved successfully!

Ooh no, something went wrong!