Application Development and Automation 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: 
Read only

Text for the key in dialog program

Former Member
0 Likes
1,089

Hi,

I have created a dialog program with four input values, My requirment is if i enter select employee number from f4, then next input field should automatically filled with the desired employee name that is in the table. How can we achieve this ?

Regards

1 ACCEPTED SOLUTION
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,046

Try this :

      • If we use F4 help on one field and want to transfer values for another field on the screen with values from this

    data loto TYPE TABLE OF dselc.

    data ls_loto TYPE dselc.

Fill DYNPFLD_MAPPING with fieldname and screen-name

    ls_loto-fldname = 'CARRID'.

    ls_loto-dyfldname = 'ABC'.

    APPEND ls_loto to loto.

    CLEAR ls_loto.

     ls_loto-fldname = 'CONNID'.

    ls_loto-dyfldname = 'ABCD'.

    APPEND ls_loto to loto.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

  EXPORTING

   DDIC_STRUCTURE         = 'SFLIGHT'

    retfield               = 'CARRID'

*   PVALKEY                = ' '

   DYNPPROG               = sy-repid

   DYNPNR                 = sy-dynnr

   DYNPROFIELD            = 'ABC'

   VALUE_ORG              = 'S'

  tables

    value_tab             = it_sflight

   FIELD_TAB              = lot

   RETURN_TAB             = ret

   DYNPFLD_MAPPING        = loto.

This will automatically fill the other field as well (here CONNID).

Hi,

I have created a dialog program with four input values, My requirment is if i enter select employee number from f4, then next input field should automatically filled with the desired employee name that is in the table. How can we achieve this ?

Regards

5 REPLIES 5
Read only

Former Member
0 Likes
1,046

Hi Renjith,

If you have created your own process on value request event and added the code for F4 help in that event - then you can (in the same module) retrieve the employee name (when user selects an employee number e.g.) and populate the screen field. Hence when PBO is recalled, then both employee nr. and employee name will be filled.

Cheers,

Aditya

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,047

Try this :

      • If we use F4 help on one field and want to transfer values for another field on the screen with values from this

    data loto TYPE TABLE OF dselc.

    data ls_loto TYPE dselc.

Fill DYNPFLD_MAPPING with fieldname and screen-name

    ls_loto-fldname = 'CARRID'.

    ls_loto-dyfldname = 'ABC'.

    APPEND ls_loto to loto.

    CLEAR ls_loto.

     ls_loto-fldname = 'CONNID'.

    ls_loto-dyfldname = 'ABCD'.

    APPEND ls_loto to loto.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

  EXPORTING

   DDIC_STRUCTURE         = 'SFLIGHT'

    retfield               = 'CARRID'

*   PVALKEY                = ' '

   DYNPPROG               = sy-repid

   DYNPNR                 = sy-dynnr

   DYNPROFIELD            = 'ABC'

   VALUE_ORG              = 'S'

  tables

    value_tab             = it_sflight

   FIELD_TAB              = lot

   RETURN_TAB             = ret

   DYNPFLD_MAPPING        = loto.

This will automatically fill the other field as well (here CONNID).

Read only

RenjithKumar
Product and Topic Expert
Product and Topic Expert
0 Likes
1,046

Hi,

I tried like this

delclared like this

data loto TYPE TABLE OF dselc.

data ls_loto TYPE dselc.

IN POV

======

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-repid

dynumb = sy-dynnr

translate_to_upper = 'X'

TABLES

dynpfields = it_dynpfields.

      • code suggesed in SDN

ls_loto-fldname = 'ZEMPID'.

ls_loto-dyfldname = '/BIC/PZEMPLOYEE-ZEMPID'.

APPEND ls_loto to loto.

CLEAR ls_loto.

ls_loto-fldname = '/BIC/ZCNAME'.

ls_loto-dyfldname = '/BIC/PZEMPLOYEE-/BIC/ZCNAME'.

APPEND ls_loto to loto.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'EMPID'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'ZEMPTEAM-ZEMPID'

value_org = 'S'

TABLES

value_tab = values_tab1

FIELD_TAB = loto <<<<<<<<Short dump on this

  • RETURN_TAB = ret

DYNPFLD_MAPPING = loto.

I have included a screen field for displaying text, is any other thing missing.

Read only

MarcinPciak
Active Contributor
0 Likes
1,046

You can easily achieve that using [search help|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee5f446011d189700000e8322d00/frameset.htm]. Also by other means like mentioned above.

Refer standard programs:

DEMO_DYNPRO_F4_HELP_DICTIONARY

DEMO_DYNPRO_F4_HELP_DYNPRO

DEMO_DYNPRO_F4_HELP_MODULE

Regards

Marcin

Read only

Former Member
0 Likes
1,046

Hi,

To achieve this use the FM F4IF_INT_TABLE_VALUE_REQUEST there in the TABLES parameter , check the Long text documentation given for the DYNPFLD_MAPPING . This will give you the idea to achieve your requirement.

Regards,

Smart.