07-31-2007 8:52 AM
Hi,
I am using PNP LDB in sq03 for HR.
now i want F4 help for selection-screen.
I am selection AT SELECTION-SCREEN but it's not selected.
in which event i'll use the function module F4.
Thanks & Regrds,
Valla muthu.M
07-31-2007 8:53 AM
Hi,
You need to construct the F4 help in the event block
AT SELECTION-SCREEN ON VALUE-REQUEST FOR.
Here use this FM F4IF_INT_TABLE_VALUE_REQUEST to construct the F4 help.
Regards,
Sesh
07-31-2007 9:09 AM
Please see the below code is the best example of passing the table values as F4 help values in the selection screen through the even of the report .....
REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
<b>
There are number of function modules that can be used for the purpose, but these
can fullfill the task easily or combination of them.</b>
" DYNP_VALUE_READ
" F4IF_FIELD_VALUE_REQUEST
" F4IF_INT_TABLE_VALUE_REQUEST
" POPUP_WITH_TABLE_DISPLAY
" DYNP_VALUE_READ
This function module is used to read values in the screen fields. Use of this
FM causes forced transfer of data from screen fields to ABAP fields.
There are 3 exporting parameters
DYNAME = program name = SY-CPROG
DYNUMB = Screen number = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
and one importing TABLE parameter
DYNPFIELDS = Table of TYPE DYNPREAD
The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD
to this FM and the values read from the screen will be stored in this table.This
table consists of two fields:
FIELDNAME : Used to pass the name of screen field for which the value is to
be read.
FIELDVALUE : Used to read the value of the field in the screen.
reward points if it is usefull ...
Girish
07-31-2007 9:09 AM
U can also directly assign search help to the screen element using 'match code ' option
select-options:select-options: s_ihrez for vbak-ihrez matchcode object '.......'(search help name)
steps:
Step1: Execute transaction SE11
Step2: Create new search help called 'ZSH' (must be less than 5 chars long to be used as matchcode)
Step3: Enter the following details:
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
Step4: Save and activate
Step5: Add following line into your program: PARAMETER p_prog LIKE trdir-name MATCHCODE OBJECT zsh.
Or see other methods of adding a search help.
diff ways to implement search helps:
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_imp.htm
Regards,
swathi