‎2006 Sep 15 8:02 AM
I AM USEING THE FUNCTIONAL MODULE 'F4IF_INT_TABLE_VALUE_REQUEST' FOR F4 HELP IN MY REPORT.
BUT HERE I AM UNABLE TO SELECT MULTIPLE VALUES IN THE F4 HELP.
‎2006 Sep 15 8:03 AM
you have to set the importing parameter MULTIPLE_CHOICE to 'X'for multiple choice
‎2006 Sep 15 8:09 AM
Hi,
F4IF_INT_TABLE_VALUE_REQUEST
This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = field from int table whose value will be returned
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'screen field'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = internal table whose values will be shown.
RETURN_TAB = internal table of type DDSHRETVAL
EXCEPTIONS
parameter_error = 1
no_values_found = 2
others = 3.
regards,
keerthi.
‎2006 Sep 15 8:14 AM
Hi cyrilvictor,
1. Multipe selection in F4
2. This code shall help you
3.
REPORT ABC.
*----
DATA : BEGIN OF ITAB OCCURS 0,
UNAME LIKE USR01-BNAME,
END OF ITAB.
data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .
data : wa LIKE DDSHRETVAL .
DATA : MY(12) TYPE C.
*----
SELECT-OPTIONS: A FOR MY.
*----
AT SELECTION-SCREEN ON VALUE-REQUEST FOR A-LOW.
PERFORM MYPOPULATE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR A-HIGH.
PERFORM MYPOPULATE.
*----
mypopulate
*----
FORM MYPOPULATE.
REFRESH ITAB.
CLEAR ITAB.
ITAB-UNAME = 'U01'. APPEND ITAB.
ITAB-UNAME = 'U02'. APPEND ITAB.
ITAB-UNAME = 'U03'. APPEND ITAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'ITAB-UNAME'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'A'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = 'X'
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = ITAB
FIELD_TAB = FTAB
RETURN_TAB = return_tab
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF RETURN_TAB IS NOT INITIAL.
REFRESH A.
CLEAR A.
*----
LOOP AT RETURN_TAB INTO WA.
A-SIGN = 'I'.
A-OPTION = 'EQ'.
A-LOW = WA-FIELDVAL.
A-HIGH = WA-FIELDVAL.
APPEND A.
ENDLOOP.
ENDIF.
ENDFORM. "MYPOPULATE
regards,
amit m.