05-27-2006 1:36 PM
PLZ SUGGEST ME HOW I CAN ADD A F4 OR SEARCH HELP FOR AN INPUT FIELD.
05-27-2006 1:47 PM
Hi !
If it's a report's selection-screen you can use the
selection-screen command "MATCHCODE ID".
See online-help for parameters and select-options command.
Regards
Rainer
Some points would be nice if that helped a bit.
05-27-2006 1:49 PM
Hi
It depends on where your input field is.
If a field of selection-screen you have to use the event AT SELECTION-SCREEN VALUE REQUEST FOR <FIELD NAME>
If a field of a screen you can assign a search help by several ways:
- A) Yuo can assign a search help in the characteristic of the field by screen-painter;
- B) You can use the event PROCESS ON VALUE-REQUEST
You can use fm F4IF_FIELD_VALUE_REQUEST to call the search help, so:
AT SELECTION-SCREEN VALUE REQUEST FOR <FIELD NAME>.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
..............
PROCESS ON VALUE-REQUEST.
FIELD <INPUT FIELD> MODULE F4_FOR_FIELD.
MODULE F4_FOR_FIELD.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
..............
ENDMODULE.
Max
05-27-2006 1:49 PM
Hi Pawan,
You can use this FM <b>F4IF_FIELD_VALUE_REQUEST</b>.
Please check this sample codes.
REPORT ZTEST01.
TYPE-POOLS: shlp.
DATA: lt_return TYPE STANDARD TABLE OF ddshretval.
PARAMETERS: p_belnr LIKE vbkpf-belnr,
p_gjahr LIKE vbkpf-gjahr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_belnr.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'VBKPF'
fieldname = 'BELNR'
searchhelp = 'H_VBKPF'
shlpparam = 'BELNR'
dynpprog = 'ZSRITEST59'
dynpnr = sy-dynnr
dynprofield = 'P_BELNR'
* STEPL = 0
* VALUE = ' '
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = 'ZSRITEST59'
CALLBACK_FORM = 'HANDLE_F4'
TABLES
return_tab = lt_return[]
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.
START-OF-SELECTION.
*---------------------------------------------------------------------*
* FORM handle_f4 *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> LT_DATA *
* --> LS_SHLP *
* --> LS_CALLCONTROL *
*---------------------------------------------------------------------*
FORM handle_f4 TABLES lt_data STRUCTURE seahlpres
****The following TYPE SHLP_DESCR_T is replaced with
****SHLP_DESCR from 4.7 onwards
CHANGING ls_shlp TYPE shlp_descr_t
ls_callcontrol LIKE ddshf4ctrl.
DATA: lwa_interface LIKE LINE OF ls_shlp-interface.
lwa_interface-valtabname = ''.
lwa_interface-valfield = 'P_GJAHR'.
MODIFY ls_shlp-interface FROM lwa_interface
TRANSPORTING valtabname valfield
WHERE shlpfield = 'GJAHR'.
ENDFORM.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.
05-27-2006 2:05 PM
Hi Pawan,
here is the sample code for the select options inputt fields
u can check this below links also for further assiistance
Regards,
Naveen
05-27-2006 2:31 PM
For an inputfield on the selection screen u can attach as follows..
PARAMETERS P1 TYPE I MATCHCODE OBJECT <search help name>
for input field on the screen you can add it in the input field attribute "search help"...
Cheers,
Abdul
05-28-2006 2:30 PM
hi
use matchcode object <search help name>....while defining the parameters..
gunjan