09-10-2007 1:50 PM
How to display match code/F4 help for a a MONTH.YEAR field?
For example 05.2007 should be the selection screen field and it should be selected from a calender.
Thanks.
Ramya
09-10-2007 2:38 PM
HI,
You can acehive it by using 'Search help exit' create a serch help with a Search help exit in which before DISP event you populate the months of that year in MM.YYYY format and assign this search help while declaring the field using MATCH CODE statment. It will display the F4 in MM.YYYY.
Hope solved your issue.
<b>Always Reward points for helpfull answers</b>
Thanks and Regards
Tanweer
09-10-2007 1:57 PM
Hi
F4_DATE displays a calendar in a popup window and allows user to choose a date, or it can be displayed read only.
Example:
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
o_begru-low = t_return-fieldval.
if o_begru-low = 'PAR*'.
o_begru-option = 'CP'.
else.
o_begru-option = 'EQ'.
endif.
o_begru-sign = 'I'.
append o_begru to s_begru.
else.
o_begru = i_begru.
endif.
thanks
vivekanand
09-10-2007 2:38 PM
HI,
You can acehive it by using 'Search help exit' create a serch help with a Search help exit in which before DISP event you populate the months of that year in MM.YYYY format and assign this search help while declaring the field using MATCH CODE statment. It will display the F4 in MM.YYYY.
Hope solved your issue.
<b>Always Reward points for helpfull answers</b>
Thanks and Regards
Tanweer
09-12-2007 5:59 AM
I dont have an idea in search help exit. Can you please help me in this.
Thanks.
Ramya
09-12-2007 6:01 AM
Hi,
Use FM :POPUP_TO_SELECT_MONTH in AT Selection screen Onvalue request for the Field.
Hope this help you. If you have any issues, please let me know
Thanks & regards,
Lijo Joseph
09-12-2007 6:09 AM
Hi
i nthis way we need to give the condition and call the FM
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.
IF S_OBJID IS NOT INITIAL.
SELECT OTYPE OBJID FROM HRP1000
INTO TABLE IT_OBJID_SH
WHERE OTYPE = 'D'.
IF SY-SUBRC EQ 0.
SEARCH HELP FOR QUALIFICATION.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'OBJID'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'S_OBJID'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_OBJID_SH
FIELD_TAB =
RETURN_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.
ENDIF.
.
reward if usefull
09-12-2007 7:07 AM
HI Ramya,
Pls check this code,
SELECT-OPTIONS: s_date FOR mceks-buper NO-EXTENSION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_date-low.
*Local variable declaration
DATA: li_ret_tab TYPE STANDARD TABLE OF ddshretval,
lwa_ret_tab LIKE LINE OF li_ret_tab.
*Functional Module to provide F4 help
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = ' '
fieldname = ' '
searchhelp = text-028
TABLES
return_tab = li_ret_tab
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.
IF sy-subrc IS INITIAL.
READ TABLE li_ret_tab INTO lwa_ret_tab INDEX 1.
IF sy-subrc IS INITIAL.
CONCATENATE lwa_ret_tab-fieldval3(2) '.' lwa_ret_tab-fieldval6(4)
INTO s_date-low.
ENDIF.
ENDIF.
Regards,
Sheron