ABAP Events - AT SELECTION-SCREEN ON VALUE REQUEST FOR field.


AT SELECTION-SCREEN ON VALUE REQUEST FOR <FIELD>.



This event is triggered when the user hits F4 on the field in a selection screen. This event gets triggered at the POV of the selection screen.


If an input field declared in an executable program refers to a field in the ABAP Dictionary for which possible entries help is defined, the list of values from the Dictionary is automatically displayed when the user calls the F4 help for that field.


In case, if a user wants to create possible values help for report input fields that have no Dictionary reference, or to override the Dictionary input help linked to the field, he/she can create one by using AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field> event.


Also remember that if there is a select-option field, then this event has to be written twice i.e. one for field-low and another for field-high.


SAMPLE PROGRAM:


REPORT ztest .

TABLES: t001.

TYPES: BEGIN OF x_t001,
bukrs TYPE t001-bukrs,
butxt TYPE t001-butxt,
ort01 TYPE t001-ort01,
land1 TYPE t001-land1,
stceg TYPE t001-land1,
END OF x_t001.

DATA: it_t001 TYPE TABLE OF x_t001 WITH HEADER LINE.

SELECT-OPTIONS s_bukrs FOR t001-bukrs.

INITIALIZATION.

SELECT bukrs butxt ort01 land1 stceg
INTO TABLE it_t001
FROM t001.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bukrs-low.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
dynprofield = 'S_BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = it_t001.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bukrs-high.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
dynprofield = 'S_BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = it_t001.


OUTPUT:

On pressing F4 button on the input field of company code the event AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field> gets triggered.



ALSO READ:

- ABAP EVENTS During Runtime Of A Report Program.

- INITIALIZATION Event - Introduction With A Sample Code.

- AT SELECTION-SCREEN Event - Introduction With A Sample Code.

- AT SELECTION-SCREEN OUTPUT Event - Introduction With A Sample Code.

- AT SELECTION-SCREEN ON VALUE REQUEST- Introduction With A Sample Code.

- AT SELECTION-SCREEN ON HELP REQUEST- Introduction With A Sample Code.

- AT SELECTION-SCREEN ON - Introduction With A Sample Code.


- Sample Program On AT SELECTION-SCREEN OUTPUT - 1.

- Sample Program On AT SELECTION-SCREEN OUTPUT - 2.

- Sample Program On AT SELECTION-SCREEN OUTPUT - 3.

- Sample Program On AT SELECTION-SCREEN OUTPUT - 4.

- Sample Program On AT SELECTION-SCREEN ON VALUE REQUEST FOR field - 1.

- Sample Program On AT SELECTION-SCREEN ON VALUE REQUEST FOR field - 2.

- Sample Program On AT SELECTION-SCREEN ON HELP REQUEST FOR field- 1.


Your suggestions and comments are welcome in this section.

Please mail all your contributions to administrator@abapmadeeasy.com We request you to mention your Name, Designation, Experience & Organization you are working for. Your posts will be verified and posted in this site with your name.

No comments:

Post a Comment