Entering content frameProcess documentationOutput of Exceptions Locate the document in its SAP Library structure

Purpose

Exceptions are a graphical means to indicate that a threshold value in a list line has been exceeded. For example, as far as the flight model is concerned, you would use the red traffic light to indicate that a flight is full. The different colors help the user to quickly understand what the data displayed means. You can use three different statuses:

Display

Internal value

Indicates (for example)

This graphic is explained in the accompanying text

3

Low occupancy

This graphic is explained in the accompanying text

2

Medium to high occupancy (critical: flight almost full)

This graphic is explained in the accompanying text

1

High occupancy (no seats available)

 

Note

You can also display an exception as an LED (see Exceptions).

Application developers must both determine the threshold values and adapt the value of an exception to the threshold.

Note

See also: Sample report BCALV_GRID_04 in development class SLIS .

 

Process Flow

  1. Define the layout structure of type LVC_S_LAYO :
  2. DATA gs_layout TYPE LVC_S_LAYO .

  3. Add a variable of type C to your output table, as shown in the following example:
  4. DATA: BEGIN OF GT_OUTTAB OCCURS 0.
            INCLUDE STRUCTURE <DDIC-Struktur>.

    DATA:   light TYPE C. "to display exceptions

    DATA: END OF GT_OUTTAB.

  5. Set field EXCP_FNAME of the layout structure to the field name of the exception:
  6. gs_layout-excp_fname = 'LIGHT'.

  7. If you want to display the exception as an LED, you must set field EXCP_LED of the layout structure.
  8. Read one row of the output table at a time in a loop, and query the fields that are related to the exception. Set your variable for the exception display format (which is LIGHT in our example) to '1', '2' or '3' (see above), depending on the threshold value you have chosen.
  1. Pass the layout structure and the output table using method set_table_for_first_display.

Note

If you have changed the values for an exception in the output table, refresh the output using method refresh_table_display.

 

Result

The ALV Grid Control contains an exception column at the beginning of the list:

 

This graphic is explained in the accompanying text

 

 

 

 

 

 

 

Leaving content frame