03-20-2006 6:09 AM
hi..
i want to create a f4 help on "gender" field.. but i m using Module-pool programming n not Reports so cant use the event---At selection-screen on value- requset for gender.
can someone help me out.
Thanks,
Neha
03-20-2006 6:13 AM
Hi Neha,
You can use :(Module pool)
function module F4IF_FIELD_VALUE_REQUEST
Check demo program DEMO_DYNPRO_F4_HELP_MODULE
FM : DYNP_VALUES_READ
Hope this will help you.
Cheers
Sunny
Rewrd points , if found helpful
Message was edited by: Sunny
03-20-2006 6:14 AM
Hi,
look at the sample example............
data: begin of t_itab occurs 0,
pernr like zfdmr_records-pernr,
end of t_itab.
DATA: t_return like ddshretval occurs 0 with header line.
**----
*at selection-screen on value-request for s_pernr-low.
**----
perform get_values changing s_pernr-low.
*
**----
*at selection-screen on value-request for s_pernr-high.
**----
perform get_values changing s_pernr-high.
&----
*& Form get_values
&----
text
----
-->P_S_PERNR_LOW text
----
FORM get_values CHANGING P_S_PERNR.
refresh t_itab.
clear t_return.
select pernr from zfdmr_records into table t_itab.
delete adjacent duplicates from t_itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'PERNR'
PVALKEY = ' '
DYNPPROG = sy-cprog
DYNPNR = sy-dynnr
DYNPROFIELD = 'ZFDMR_RECORDS-PERNR'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'F'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
VALUE_TAB = t_itab
FIELD_TAB =
RETURN_TAB = t_return
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE t_return INDEX 1.
p_s_pernr = t_return-fieldval.
ENDFORM. " get_values
Thanks.
If this helps you reward with points.
03-20-2006 6:20 AM
03-20-2006 6:34 AM
Hi,
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
* ddic_structure = 'LDAPGATEW'
retfield = 'RFCDEST'
dynpprog = prognr
dynpnr = dynpnr
dynprofield = dynpfd
tables
value_tab = value_tab
field_tab = field_tab
* RETURN_TAB = RETURN_TAB
exceptions
parameter_error = 1
no_values_found = 2.
From Prg: SAPMLDAP
Hope it heps you.
Regards,
Anjali
03-20-2006 6:40 AM
Hi,
check out this Demo program,
DEMO_DYNPRO_F4_HELP_MODULE.
this may help you.
regards,
prema.A
03-20-2006 6:48 AM
Hello Neha,
In ur screen section after PROCESS AFTER INPUT scetion u can code
PROCESS ON VALUE-REQUEST.
FIELD GENDER MODULE HELP_GENDER.
u can code ur F4 help in this module.
03-20-2006 6:49 AM
Hi,
If you want f4 for gender field, there can be only two values.
You create a custom domain with fixed values and create a data element from it.
Then use this data element to create the screen field in the module pool.
It will automatically show the seach help.
Regards,
Shashank
03-20-2006 6:54 AM
Hi Neha...
U can add the FM inside the Module check-gender here..
PROCESS ON VALUE-REQUEST.
FIELD p_gender MODULE check-gender.
07-26-2006 10:03 AM
Is it possible to restrict which columns are shown in the search help screen? How is this done?
09-02-2006 9:27 AM
write this code in the screen flow logic
PROCESS ON VALUE-REQUEST.
FIELD <screenfield> MODULE <module_name>.
then on the <module_name>--write the follwing code
write the select query and put it into the table 'INT_TABLE'.
we are pasiing this table to the below function.
retfield in the below function is return field from the table 'INT_TABLE'
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = ' ' "FIELD FROM 'INT_TABLE'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = int_table "
FIELD_TAB =
RETURN_TAB = int_ret "Return table
DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS .
READ TABLE INT_RET INDEX 1.
In the header of 'INT_RET' You will get the selected value