Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

abap

Former Member
0 Kudos
80

can anybody plz explain me abt

"ON VALUE REQUEST"

4 REPLIES 4

Former Member
0 Kudos
59

hi

The events PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUE-REQUEST (POV) are triggered by the request for the field help (F1) or the input help (F4) for a screen element of the screen. In the relevant event block, the MODULE statement is executed, which is assiciated with the FIELD statement for the screen field of the selected screen element. If several FIELD statements exist for the same screen field, only the first is executed. The content of the field specified under FIELD is not automatically passed to the called module in the event block at POH or POV. After POH or POV processing is finished, the system returns to processing the screen displayed on the presentation server, without triggering the PBO event.

If a field in an executable program is defined with reference to an ABAP Dictionary field for which possible entries help is defined, the values from the ABAP Dictionary help are automatically displayed when the user calls the F4 help for that field. To create possible values help for input fields that have no Dictionary reference, or to override the help normally linked to the field, you can create an event block for the event

AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field>

The event is triggered when the user calls the F4 help for the field <field>. If no corresponding event block has been defined, the possible values help from the ABAP Dictionary is displayed, or none at all if the field has no Dictionary reference. If a corresponding event block exists, it takes precedence over the default possible values help mechanism. It is then up to the programmer to ensure that an appropriate list of values is displayed, and that the user can choose a value from it.

You cannot declare the event block AT SELECTION-SCREEN ON VALUE-REQUEST for input fields on the selection screen that are declared within a logical database. You cannot override the possible values help mechanism of a logical database within the program. You can define separate help within the logical database program using the VALUE-REQUEST option in the PARAMETERS and SELECT-OPTIONS statements.

REPORT SELECTION_SCREEN_F4_DEMO.

PARAMETERS: P_CARR_1 TYPE SPFLI-CARRID,

P_CARR_2 TYPE SPFLI-CARRID.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CARR_2.

CALL SCREEN 100 STARTING AT 10 5

ENDING AT 50 10.

MODULE VALUE_LIST OUTPUT.

SUPPRESS DIALOG.

LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.

SET PF-STATUS SPACE.

NEW-PAGE NO-TITLE.

WRITE 'Star Alliance' COLOR COL_HEADING.

ULINE.

P_CARR_2 = 'AC '.

WRITE: / P_CARR_2 COLOR COL_KEY, 'Air Canada'.

HIDE P_CARR_2.

P_CARR_2 = 'LH '.

WRITE: / P_CARR_2 COLOR COL_KEY, 'Lufthansa'.

HIDE P_CARR_2.

P_CARR_2 = 'SAS'.

WRITE: / P_CARR_2 COLOR COL_KEY, 'SAS'.

HIDE P_CARR_2.

P_CARR_2 = 'THA'.

4 WRITE: / P_CARR_2 COLOR COL_KEY, 'Thai International'.

HIDE P_CARR_2.

P_CARR_2 = 'UA '.

WRITE: / P_CARR_2 COLOR COL_KEY, 'United Airlines'.

HIDE P_CARR_2.

CLEAR P_CARR_2.

ENDMODULE.

AT LINE-SELECTION.

CHECK NOT P_CARR_2 IS INITIAL.

LEAVE TO SCREEN 0.

This program defines a selection screen with two parameters, both of which refer to the column CARRID in the database table SPFLI. The possible entries help from the ABAP Dictionary is used for P_CARR_1, and a separate possible entries help is programmed for P_CARR_2. Screen 100 is used for the possible entries help. The dialog module VALUE_LIST is started in its PBO event. The actual screen mask is not used, and there are no dialog modules used in the PAI.

reward if helpful.

regards,

kiran kumar k

Message was edited by:

kiran kumar kamati

Former Member
0 Kudos
59

Former Member
0 Kudos
59

Hi,

Check this link.

http://www.sap-img.com/abap/different-types-of-selection-screens.htm

Hope this resolves your query.

Reward all the helpful answers.

Regards

navin_khedikar2
Contributor
0 Kudos
59

HAI

F4 Help - Calling it from a program and limiting values ?

To avoid the standard F4 help to be show, insert the event PROCESS ON-VALUE-REQUEST in the program and add a field statement for the field that should trigger the F4 help. In the mdoule called from

PROCESS ON-VALUE-REQUEST, call function module

F4IF_FIELD_VALUE_REQUEST.

Example 1 - Dynpro

process before output.

.....

process after input.

.....

PROCESS ON VALUE-REQUEST.

FIELD it_zsd00003-prctr MODULE f4_help_for_pctr.

MODULE f4_help_for_pctr INPUT.

NOTE:

Tabname/fieldname is the name of the table and field for which F4 should be shown. *

Dynprog/Dynpnr/Dynprofield are the names of the Progran/Dynpro/Field in which the f4 value should be returned.* Value: The value of the Dynpro fuield when calling the F4 help. You can limit the values shown, by inseting a value in this parameter e.g '50*' to show only values beginning with 50

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'ZSD00003'

fieldname = 'PRCTR'

  • SEARCHHELP = ' '

  • SHLPPARAM = ' '

dynpprog =

'ZSD00002_BRUGERKONV_LISTE'

dynpnr = '0100'

dynprofield = 'IT_ZSD00003-PRCTR'

  • STEPL = 0

value = '50*'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • SUPPRESS_RECORDLIST = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

TABLES

  • RETURN_TAB =

EXCEPTIONS

  • FIELD_NOT_FOUND = 1

  • NO_HELP_FOR_FIELD = 2

  • INCONSISTENT_HELP = 3

  • NO_VALUES_FOUND = 4

  • OTHERS = 5

**Please reward suitable points***

With Regards

Navin Khedikar