2008 Feb 18 8:50 PM
hi,
i need to do F4 help to selection screen or parametrs ,
i have program that bring details for employee and i wont
that the user can choose emp name from the screen field
what is the best way to do that?
i new with this topic.
Regards
2008 Feb 19 5:10 AM
Hi,
TYPES: BEGIN OF 1_tab,
pernr TYPE pernr_d,
nachn TYPE pad_nachn,
vorna TYPE pad_vorna,
END OF 1_tab.
DATA: emp_tab TYPE TABLE OF 1_tab WITH HEADER LINE.
PARAMETERS p_nachn TYPE pad_nachn.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_nachn.
SELECT pernr nachn vorna
FROM pa0002
INTO TABLE emp_tab
WHERE begda LE sy-datum
AND endda GE sy-datum.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'NACHN'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = '1000'
dynprofield = 'P_NACHN'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = emp_tab
* FIELD_TAB =
* RETURN_TAB =
* 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.
Regards............
Dayakar
2008 Feb 19 4:30 AM
suppose ur parameter is
p_name.
at selection-screen on value request p_name.
select the employee names in a internal table say itab.
use this function module then
CALL FUNCTION 'POPUP_WITH_TABLE'
EXPORTING
endpos_col = 60
endpos_row = SY-SROWS
startpos_col = 1
startpos_row = 1
titletext =
IMPORTING
CHOICE = P_NAME
tables
valuetab = ITAB
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2
.
IF sy-subrc <> 0.
RETURN.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2008 Feb 19 4:39 AM
hi,
you can use
empname type empname matchcode object zemployee_info.
in the above statement zemployee_info is the search help you created.
to create search help goto se11 select search heip radio button
give the tablename name for which you want to create search help
hope it is useful.
2008 Feb 19 4:42 AM
2008 Feb 19 4:48 AM
hi,
to add to my above post.
declare below statement in parameters.
empname type empname matchcode object zemployee_info.
in the above statement zemployee_info is the search help you created.
to create search help goto se11 select search heip radio button
give the tablename name for which you want to create search help in selection method.
give empname in search help paramter also mention data element name.
hope it is useful.
regards,
sreelakshmi.
2008 Feb 19 4:49 AM
The F4 help to the selection screen parameters can be given with :
DATA : lc_dynprofield TYPE help_info-dynprofld VALUE 'X',
lc_value_org TYPE c VALUE 'S',
lc_zfieldTYPE dfies-fieldname VALUE 'ZTABLE-EMP_NO'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_trial-low.
perform f4_help.
form f4_help.
SELECT land1 emp_no
INTO TABLE lt_table
FROM ztable.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = lc_zfield
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = lc_dynprofield
value_org = lc_value_org
TABLES
value_tab = lt_table.
endform.
wherein 'ztable-emp_no' is the field from where i have chosen values.
here in ur case, it wil b the emp. number to b taken from the desired table.
now when u do a F4 help on the selection screen parameter- a pop-up comes which shows the desired values as u have chosen into the internal table lt_table.
Regards
Deepti
2008 Feb 19 4:58 AM
HI,
to add to my above post,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_EMPNAME.
.
and CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
give table name and field name.
hope it is useful.
regards,
sreelakshmi.
2008 Feb 19 5:10 AM
Hi,
TYPES: BEGIN OF 1_tab,
pernr TYPE pernr_d,
nachn TYPE pad_nachn,
vorna TYPE pad_vorna,
END OF 1_tab.
DATA: emp_tab TYPE TABLE OF 1_tab WITH HEADER LINE.
PARAMETERS p_nachn TYPE pad_nachn.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_nachn.
SELECT pernr nachn vorna
FROM pa0002
INTO TABLE emp_tab
WHERE begda LE sy-datum
AND endda GE sy-datum.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'NACHN'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = '1000'
dynprofield = 'P_NACHN'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = emp_tab
* FIELD_TAB =
* RETURN_TAB =
* 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.
Regards............
Dayakar