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

왘 ID_POSITION

Then, you need to determine the priority. For example, if you want to sort by

monster color first and then sort all monsters of the same color by sanity, the

color has to have priority one and sanity priority two.

왘 IF_DESCENDING

Next, you need to say if you wish to sort the values in ascending or descending

order. Most often, the vast majority of data is sorted in ascending order in a

report.

왘 IF_SUBTOTAL

Then, you need to say if a change of value of the column will trigger a subtotal

for numeric fields (e.g., does the repo rt say how many green monsters there

are).

왘 ID_GROUP

If you don’t want subtotals, then you can put a line or a page break in the report

output when the value of the field changes by using the group import criteria.

You use the constant IF_SALV_C_SORT=>GROUP_UNDERLINE to say you want a line

and the constant IF_SALV_C_SORT=>GROUP_NEWPAGE for a page break.

왘 IF_OBLIGATORY

If for some reason you do not want your users to be able to override the sort

criteria you’ve defi ned programmatically, then you can set the obligatory

parameter to lock them in place. (However, this is not a feature you would ever

normally use.)

Figure 10.8 Add Sort Criteria Method Parameters

You usually want to have a default sort order for the report data that’s independent

of how the internal table might be sorted when it gets passed into the report.

434

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

Saved successfully!

Ooh no, something went wrong!