12-03-2007 1:37 PM
hi,
i have created a ztable in se11.
i have a field called zid.
now on my selection screen i want a f4 help for p_zid (parameter) field displaying the values which are present in the ztable for the zid field.
for that i ve to create f4 help in the ztable for the available values.
how can i get those?
thanls in advance.
12-03-2007 1:47 PM
hi Sneha,
in SE11 you have to maintain the search help for the field you created. Then it will appear automatically, if you place this field as parameter (or select option) on a selection screen.
PARAMETER : p_zid TYPE ztable-zid.
if it does not work you can add:
PARAMETER : p_zid TYPE ztable-zid MATCHCODE OBJECT name_of_the_search_help.
hope this helps
ec
12-03-2007 1:47 PM
hi Sneha,
in SE11 you have to maintain the search help for the field you created. Then it will appear automatically, if you place this field as parameter (or select option) on a selection screen.
PARAMETER : p_zid TYPE ztable-zid.
if it does not work you can add:
PARAMETER : p_zid TYPE ztable-zid MATCHCODE OBJECT name_of_the_search_help.
hope this helps
ec
12-03-2007 1:58 PM
thanks eric fro ur response...
but while creating search help there are import,export parameters to be filled in..
also lpos,spos..
wot has to be filled in this..
im not exactly getting wot they are meant for?
can u elaborate ina simlple way...
i read from sap library..i cudnt unserstand it to the full extent..
can you help me in this case?
thanks.
12-03-2007 2:45 PM
1. input and output..set both to ZID
2. other way is to use F4_INT_VALUE_REQUEST
in this u need to pass an internal table with one column
populate the internal table wirth the zid from ur database table..
hope dis will clear ur doubt...
12-03-2007 4:32 PM
Hi Sneha,
1. Import Perameter : This flag is used to Read the Values from table
Export Parameter : This Flag is used to get the value in your field
when you double click the value
in Posible values (f4).
2. Lpos,Fpos : One is Line Position and another is Field Position.
Ex: If you want to display carrid , connid in your f4 button
if Lpos Fpos
Carrid 1 2
Connid 2 1
In Selection Screen Carrid -
Connid -
In F4 Selection Connid | connid
-
| -
Plz Reward if help,
Mahi.
12-03-2007 1:54 PM
Hi ,
Try this..
Eg:
PARAMETERS Matnr TYPE mara-matnr MATCHCODE OBJECT Mat1.
Here, Mat1 is the search help for Matnr which Has defined as the Search help.
Rgards
Bala.
12-03-2007 2:22 PM
Try this code...
TABLES : ztab.
TYPES: BEGIN OF itab,
zid TYPE ztab-zid,
END OF itab.
DATA: itab TYPE STANDARD TABLE OF itab WITH HEADER LINE.
PARAMETERS: p_zid TYPE ztab-zid.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_zid.
SELECT zid FROM ztab INTO TABLE itab.
SORT itab.
DELETE ADJACENT DUPLICATES FROM itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZID'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_ZID'
value_org = 'S'
TABLES
value_tab = itab.
IF sy-subrc <> 0.
"some message
ENDIF.
12-03-2007 2:38 PM
What you asked for, may look like
1-Create the search help
Give the field zid as import/export parameter
Add a text field not as parameter but as a displayed field
2-In the PARAMETERS instruction use the clause MATCHCODE OBJECT
Other ways to perform it
- In your Z-table define zid as a foreign key on himself
- In the domain definition of zid give the ztable as a table of value
- Create the search help and add it to data-element definition
- Use function modules like F4IF_INT_TABLE_VALUE_REQUEST in an AT SELECTION-SCREEN ON VALUE REQUEST event.
Regards