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.

10

ALV SALV Reporting Framework

10.2.1 Report Flow Step 1: Creating a Container (Generic/Optional)

The vast majority of reports you are called upon to create will take up the whole

screen, but occasionally you will need to have two or more tables of data on the

same screen. Each table of data to be displayed will have its own report object

(e.g., an instance of CL_SALV_TABLE), and when that object is being created you

can pass in a container object that represents an area of a DYNPRO screen inside

which the data table will appear.

Note

Creating such a container is an optional step for the SALV framework; if no such container

object is passed in, then the report will take up the whole screen without you

having to do anything.

If you do need to create a container, though, it can be quite painful: you have to

define a DYNPRO screen, th en paint a big blank custom control in the area the

report will be in, and then do some coding to link this big blank area to an ABAP

object that will represent it. If this was your least favorite part of creating a report

using CL_GUI_ALV_GRID, you’ll like CL_SALV_TABLE (and you’ll never want to go

back to creating containers manually again).

Luckily, it turns out that you don’t have to worry about this at all when defining

your generic interface. For now, don’t bo ther creating a container. If you don’t

pass a container into your INITIALIZE method, then the SA LV will create the

report in full screen mode, which is ge nerally fine. (However, in Section 10.3.1

you’ll see that when you do need to create a container, this step can be automated.)

10.2.2 Report Flow Step 2: Initializing a Report (Generic)

As noted earlier, three of the four steps in the high-level process flow are generic,

which means that they apply to every single report you create. No matter what UI

technology you’re using, there’s some basic information you need in order to

make some high-level report settings, and we need a method to pass in that basic

information. This is the INITIALIZE method.

In Figure 10.4, you can see the parameters of the INITIALIZE method, in which

you pass in some high-level parameters for the report as a whole.

416

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

Saved successfully!

Ooh no, something went wrong!