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 in Dialog program

Former Member
0 Kudos

Hi Experts,

I am using a table control to display and edit internal table data with two fields 'Characteristic. and 'Value'. Here I want display provide the F4 for "Value" field based on field 'Characteristic' value. Suppose if 'Characteristic' is Material then F4 on 'Value' field should Material list and if Characteristic is date then F4 on value field should be date.

CharacteristicValue
Material12345678
Date05/06/1983

Could you please let me know how can I do this?

3 REPLIES 3

g_srivastava
Active Contributor
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Shoban,

The values in the field characteristic  "Material"/ "Date"  are entered by the user  in the screen right.

If yes,

The solution is,

In the screen there is an event called Process on Value request.

under this event create module for each field.

for example

PROCESS ON VALUE-REQUEST

Field tablecontrolname-value module f4_value.

logic in the module

Use the FM DYNP_VALUES_READ to read the value in the screen

populate the table DYNPFIELDS with the following fields

DYNPFIELDS-FIELDNAME = 'tablecontrolname-characteristic'

DYNPFIELDS-STEPL = line number (Use GET CURSOR FIELD to get the line number and pass it)

pass the export parameters DYNAME and DYNUMB with values program name(SY-REPID) and screen number (SY-DYNNR) .

once the FM is executed the value is populated in the table DYNPFIELDS. read the table using the field name and the field DYNPFIELDS-FIELDVALUE will have the value mentioned in the screen.

Use this value to check if it is Material/ Date. Based on the value fetch the required data and display the F4 help for the value field.

for example, if the value is material then fetch the data from MARA for all materials and display the list of materials in the F4 help.

Hope this solution will help you and let me know in case of any questions.

Regards,

Phani

former_member212124
Active Participant
0 Kudos

Hi Shoban,

1) Please use  'Process On Value Request' Event for this

2) Use following FM:

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MATNR'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'FIELDNAME'

value_org = 'S'

TABLES

value_tab = it_F4_help

thanks,

vidyasagar.