ALV Tutorial 02 - PF-STATUS, GUI Title and Exception Lights - Spider's Web
ALV Tutorial 02 - PF-STATUS, GUI Title and Exception Lights - Spider's Web
ALV Tutorial 02 - PF-STATUS, GUI Title and Exception Lights - Spider's Web
Spider's web
…share your own experience
In this step we’ll customize our ALV with custom PF-STATUS (buttons, menu, …), GUI title and we’ll also add a column
with exception lights (Red/Yellow/Green)
1. We need to modify our table gt_data with SFLIGHT data to hold one more information – exception light.
2. Then we have to fill this info field with data – most probably during data retrieval so in our case in FORM
get_data:
FORM read_data.
DATA:
l_color TYPE c.
FIELD-SYMBOLS:
<fs_data> TYPE ty_data.
3. We have to tell our ALV which field holds the exception light information so we have to add this information to
layout (new variable ls_layout) of ALV used during it’s display:
FORM display_grid.
DATA: ls_layout TYPE lvc_s_layo.
ls_layout-excp_fname = 'EXC_LIGHT'.
4. We are now done with the exception light and we can step into adding the PF-STATUS (modify the toolbar,
define response on user actions, …)
First of all we will separate the PF-STATUS and titlebar modification from our code so we’ll add new module into
screen 0100 PBO section (we’ll put it’s definition into main program).
At the same time we add new module for handling user actions to the PAI section (we’ll create it’s definition in the
main program)
oprsteny.com/?p=496 2/5
11/20/2019 ALV tutorial 02 – PF-STATUS, GUI title and exception lights | Spider's web
In the above code you can see we set the TITLEBAR to ALV_EXAMPLES – double click on ALV_EXAMPLES, create
new GUI title object and set your desired title text. We alse set name of the PF-STATUS 'MAIN'. We’ll create this
status in object tree by right-click on the program name -> Create -> GUI status and name it MAIN. In our
program we won’t handle any special user commands so we’ll implement only the BACK, EXIT and CANCEL
actions.
6. The next is new MODULE display_grid where we moved our data handling and calling the ALV display
(separation into modules depends only on your choice)
oprsteny.com/?p=496 3/5
11/20/2019 ALV tutorial 02 – PF-STATUS, GUI title and exception lights | Spider's web
RELAT E D
ALV tutorial 05 - Handling events ALV tutorial 07 - coloring rows ALV tutorial 03 - ICON column
2013-04-28 2013-04-28 2013-04-28
In "ABAP" In "ABAP" In "ABAP"
Youssef.B
on 2015-04-22 at 3:15 pm said:
Hello,
Thank you very much for your tutorial. Their is mistake on the condition of step 2, you have to reverse the
condition test of yellow and red light otherwise we will never go to red condition test.
Loading...
oprsteny.com/?p=496 4/5
11/20/2019 ALV tutorial 02 – PF-STATUS, GUI title and exception lights | Spider's web
FuryNocturn
on 2017-10-02 at 8:24 am said:
Loading...
FuryNocturn
on 2017-10-02 at 8:34 am said:
Loading...
oprsteny.com/?p=496 5/5