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: 

Search help from an internal table

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member195698
Active Contributor
0 Kudos

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

4 REPLIES 4

former_member195698
Active Contributor
0 Kudos

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

0 Kudos

HI,

You can use this function module also.

HELP_VALUES_GET_WITH_TABLE..

Points for helpful answer.

Lincon

Former Member
0 Kudos

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

harimanjesh_an
Active Participant
0 Kudos

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