Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

F4 Help

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

I dont have an idea in search help exit. Can you please help me in this.

Thanks.

Ramya

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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