10-30-2007 9:55 PM
Hi
I have a dialog screen in which I want a F4 search help on one of the fields . However , this should pop out values from an internal table instead of a databse table , Can this be done.
THank you
Krish
10-30-2007 9:58 PM
Code this in the event, Process On Value Request for the field.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = <name of return field in internal table>
DYNPPROG = <Report Name i.e sy-repid>
DYNPNR = <Screen number>
DYNPROFIELD = <screen field name>
VALUE_ORG = 'S'
TABLES
VALUE_TAB = <internal Table with values>
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
Message was edited by:
Abhishek Jolly
10-30-2007 9:58 PM
Code this in the event, Process On Value Request for the field.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = <name of return field in internal table>
DYNPPROG = <Report Name i.e sy-repid>
DYNPNR = <Screen number>
DYNPROFIELD = <screen field name>
VALUE_ORG = 'S'
TABLES
VALUE_TAB = <internal Table with values>
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
Message was edited by:
Abhishek Jolly
10-30-2007 10:01 PM
HI,
You can use this function module also.
HELP_VALUES_GET_WITH_TABLE..
Points for helpful answer.
Lincon
10-31-2007 2:18 AM
Hi
This is possible: Follow below steps:
1. Select The data u want to show in your Internal Table
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE values_tab
WHERE carrid = field_value-fieldvalue.
2. If records are there in the Internal table
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CONNID'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'CONNECTION'
value_org = 'S'
TABLES
value_tab = values_tab.
Hope this helps.
Thanks ,
Praveen
10-31-2007 3:16 AM
hi krish,
For ur requirement u have to use FM <b>'F4IF_INT_TABLE_VALUE_REQUEST'</b>.
Use this FM in <b>AT SELECTION-SCREEN ON VALUE REQUEST</b> Event.
In this Event Populate ur internal table and just pass this internal table to FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
1) Populate internal table....
<b>AT SELECTION-SCREEN ON VALUE REQUEST.
SELECT matnr werks
FROM marc
INTO TABLE t_marc
WHERE matnr = s_matnr.</b>
*s_matnr is select-options.
2. Pass ur internal table to FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
<b>CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'P_WERKS'
value_org = 'S'
TABLES
value_tab = t_marc.</b>
Above Code provides F4 help for Plant
Reward me if useful.....
Harimanjesh AN