2007 Aug 08 3:04 PM
Hello,
I am using OO alv and i would like to have F4 help for field column in ALV screen/tab.
On pressing F4, i should be able to retrive values from custom table. How can that be done?
Could someone can explain me all the steps that needs to be followed in order to achieve my objective?
POINTS WILL BE REWARDED FOR SOLUTION.
Thanks,
Ravi.
Hello,
I am using OO alv and i would like to have F4 help for field column in ALV screen/tab.
On pressing F4, i should be able to retrive values from custom table. How can that be done?
Could someone can explain me all the steps that needs to be followed in order to achieve my objective?
POINTS WILL BE REWARDED FOR SOLUTION.
Thanks,
Ravi.
2007 Aug 09 2:15 AM
Hello Ravi
If the column field is related to the domain containing the custom table as value table then the F4 should work automatically.
However, you may look for a different solution. The SAP demo report
BCALV_TEST_GRID_F4_HELP
shows several different ways of realizing F4 helps in ALV grids. Following is the documentation (in the header section) of the report.*&---------------------------------------------------------------------
*& Report BCALV_GRID_F4_HELP *
*& *
*&---------------------------------------------------------------------*
*& *
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
* Purpose:
* ~~~~~~~~
* This report illustrates the use of f4-Help in an alv grid control.
*-----------------------------------------------------------------
* Background:
* ~~~~~~~~~~~
* There a two possibilities to implement an f4-Help in the alv grid
* control: one can either use standard f4-help or write one by Hand.
* For the former there is nothing to do at all. This report shows how
* to implement user-defined f4-help.
*-----------------------------------------------------------------
* The user should look at the definition of classes grid_application
* and lcl_event_receiver:
* all the grid-specific things happen there, while the rest
* of the program is concerned with dynpro programming
*---------------------------------------------------------------------
* To check program behavior
* ~~~~~~~~~~~~~~~~~~~~~~~~~
* For each choice it is explained in detail which functionality the
* f4-help dispalys. Just try out different modes at the start-dynpro.
* We also included a message signaling when datatable update actually
* occurs.
*-----------------------------------------------------------------
* Essential steps (search for '§')
* ~~~~~~~~~~~~~~~
* First you must define and set an event handler for event onf4
* of class cl_gui_alv_grid, just as with any event in the object
* model. In our case, its method on_f4 of (the local) class
* lcl_event_receiver (definition see below).
* We set the handler in PBO-module create_object of dynpro 100.
*
* For the easiest case where you don't want to make changes do step
* 1. Register all columns for which you want to define an f4-help.
* 1a.You can deregister columns during run-time to use standard f4-help.
* 1b.Or register additional columns during run-time.
* 2. Implement your event handler method.
* 3. Set attribute m_event_handled of er_event_data to avoid standard
* f4-help.
* If you want to allow the user to change data via f4-help you have to
* 4. set in the fieldcatalog the corresponding column editable (see
* Documentation). It does not suffice to set the complete grid
* editable.
* 5. Declare data and field-symbols for values to be changed.
* 6. Assign the values for the corresponding cells you want to edit:
* you can edit any cells. Do not refresh your table!
* 7. If your f4-help relates to other values of your table, you must
* set parameters getbefore and/or chngeafter during registration.
* 8. In case the column you want to define an f4-help has no standard
* f4-help defined, you must set parameter F4AVAILABL in the field
* catalog.
* 9. If you want to check the data yourself, you can register for the
* events data_changed and/or data_changed_finished. For the former
* you can check where the event was raised and act accordingly.
*10. Often one uses drop down boxes instead of f4-help. To do so, you
* first have to extend your datatable by one field and set the
* fieldcatalog parameter drdn_field accordingly.
*11. Then you have to prepare a drop down table, give it to your grid
* and fill in the additional field of your datatable appropritately.
*!! If you define a drop down box for a column, you can not define an
* f4-help for the same column.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
report bcalv_grid_f4_help.
...Regards
Uwe
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |