go with this ans
Hi,
POV : This is triggered when user clicks F4 function key (for listing all possible values for the field).
You can call dialog modules in the POV event using the event keyword <b>PROCESS ON VALUE-REQUEST.</b>
PROCESS ON VALUE-REQUEST.
...
FIELD <f> MODULE <mod>.
Check the below link for sample code.
http://www.sap-basis-abap.com/abap/code-for-f4-in-dialog-program.htm
Regards,
Maha
...
pov --->process on value request this helps the user to select the data the data that is already present in the data base for a particular field when he places thae cursor and presses F4 on that particular field .
check the following code this may help you
&----
*& Module VENDORVALUE INPUT
&----
text
----
POV for vendor field
module vendorvalue input.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'LFA1'
fieldname = 'LIFNR'
SEARCHHELP = ' '
SHLPPARAM = ' '
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ZG8_EKKO-LLIEF'
STEPL = 0
VALUE = ' '
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
SELECTION_SCREEN = ' '
TABLES
RETURN_TAB =
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endmodule. " VENDORVALUE INPUT
&----
*& Module CURRENCYVALUE INPUT
&----
text
----
POV for currency field
module currencyvalue input.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'EKKO'
fieldname = 'WAERS'
SEARCHHELP = ' '
SHLPPARAM = ' '
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ZG8_EKKO-WAERS'
STEPL = 0
VALUE = ' '
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
SELECTION_SCREEN = ' '
TABLES
RETURN_TAB =
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endmodule. " CURRENCYVALUE INPUT
process on value request (pov),is used to select the data for a field which is already present in the data base.
say you create document number field, but you dont know what values can be passed to it,(whether starting from 100 or from 90000003 etc).so,if you provide pov help for it.and press F4,it will display the values for that field so,that you can choose from it.
u can press F4 placing cursor on the field.
for that we use a FM 'F4IF_FIELD_VALUE_REQUEST'
sample code:
module pov input.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'LFA1'
fieldname = 'LIFNR'
dynpprog = progname
dynpnr = dynnum
dynprofield = Z425427pov-LLIEF'
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endmodule. " pov input
for any field for which u need F4 help, use the above fm and pass the parameters as above..u will get pov..
.
Add a comment