09-07-2008 2:44 PM
Hi all,
I am creating a custom F4 help for a screen field DUE_MONTH using the fm F4IF_INT_TABLE_VALUE_REQUEST. The problem is that when i click on a the dropdown list icon on the field, it displays the pop-up screen but does not show any results in it. Can anyone suggest a solution. I am using the following code:
DATA: BEGIN OF i_month OCCURS 0,
month(9) TYPE c,
END OF i_month.
REFRESH: i_month.
i_month-month = 'January'.
APPEND i_month.
i_month-month = 'February'.
APPEND i_month.
i_month-month = 'March'.
APPEND i_month.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MONTH'
PVALKEY = ' '
dynpprog = sy-repid "SY-CPROG"' '
dynpnr = sy-dynnr "'2000'
dynprofield = 'DUE_MONTH'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'F'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = i_month
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,
Hamza
09-07-2008 2:47 PM
Hi,
Pass the tables parameter i_month with table body operator [ ] because u declared ur itab with OCCURS 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MONTH'
PVALKEY = ' '
dynpprog = sy-repid "SY-CPROG"' '
dynpnr = sy-dynnr "'2000'
dynprofield = 'DUE_MONTH'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'F'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = i_month[ ] " Change like this
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.
Thanks,
Vinod.
09-07-2008 2:58 PM
Dear Vinod,
Thank you very much for your quick reply. However, the solution you provided is not working. I made the changes you requested, but the F4 list is still not showing any results.
regards,
Hamza
09-07-2008 3:25 PM
Hi,
I have corrected ur code. Now it is working fine. Just copy paste the code in some sample program and check the functionality.
PARAMETERS: po_month TYPE dtresr-weekday.
DATA: i_return TYPE TABLE OF ddshretval,
wa_return TYPE ddshretval.
DATA: BEGIN OF i_month OCCURS 0,
month TYPE dtresr-weekday,
END OF i_month.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR po_month.
REFRESH: i_month.
i_month-month = 'January'.
APPEND i_month.
i_month-month = 'February'.
APPEND i_month.
i_month-month = 'March'.
APPEND i_month.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MONTH'
* pvalkey = ' '
* dynpprog = sy-repid
* dynpnr = sy-dynnr
* dynprofield = 'DUE_MONTH'
* stepl = 0
* window_title =
* value = ' '
value_org = 'S'
* multiple_choice = ' '
* display = 'F'
* callback_program = ' '
* callback_form = ' '
* mark_tab =
* IMPORTING
* user_reset =
TABLES
value_tab = i_month
* field_tab =
return_tab = i_return
* dynpfld_mapping =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE i_return INTO wa_return INDEX 1.
po_month = wa_return-fieldval.
U can place this code in appropriate event.
Thanks,
Vinod.
09-08-2008 5:58 AM
hi,
Declare the field month the same way as the field on d screen for which u need custom search help.
I too had the same prob and wen i declared my table field same as the screen field it worked.
jst try it out and let me knw