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

Module pool f4 search help issue

Former Member
0 Likes
885

Hi Gurus,

In my requirement on CJ20N screen I have to add two fields and have provide f4 help for them.

I have used FM F4IF_INT_TABLE_VALUE_REQUEST for this help and its working fine.

Now I want that if user selects value on f4 search corresponding description should come in grey out area.

for ex - In CJ20N under basic data tab if you enter pers. resp. no. and then press enter description will come on right side.

Please help me on this.

1 ACCEPTED SOLUTION
Read only

former_member188282
Active Participant
0 Likes
736

Hi Abhinav

Try with below sample code you have to use FM parameter DYNPFLD_MAPPING

ls_dynpfld_mapping-fldname = 'F0001'.

  ls_dynpfld_mapping-dyfldname = 'MATNR'.

  APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.

  ls_dynpfld_mapping-fldname = 'F0002'.

  ls_dynpfld_mapping-dyfldname = 'MAKTX'.

  APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

      retfield        = 'MATNR'

      dynpprog        = sy-repid

      dynpnr          = sy-dynnr

      dynprofield     = 'MATNR'

      stepl           = v_stepl

      window_title    = 'material number'

      value_org       = 'S'

    TABLES

      value_tab       = lt_itm

      return_tab      = ret_tab

      dynpfld_mapping = lt_dynpfld_mapping.

Regards,

Rajesh

Hi Gurus,

In my requirement on CJ20N screen I have to add two fields and have provide f4 help for them.

I have used FM F4IF_INT_TABLE_VALUE_REQUEST for this help and its working fine.

Now I want that if user selects value on f4 search corresponding description should come in grey out area.

for ex - In CJ20N under basic data tab if you enter pers. resp. no. and then press enter description will come on right side.

Please help me on this.

5 REPLIES 5
Read only

Former Member
0 Likes
736

Hello,

You can create an internal table and add the description to your type

And then attach that to your function module

the below example gives that you have  structure and then you set the return field ..

one example:

DATA LT_RET TYPE TABLE OF DDSHRETVAL WITH HEADER LINE.


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

     EXPORTING

       DDIC_STRUCTURE  = 'ZVTR_BAR_S_CE_FIRMA'

       RETFIELD        = 'FIRNO'

       VALUE_ORG       = 'S'

       DISPLAY         = 'F'

     TABLES

       VALUE_TAB       = LT_VAL

       RETURN_TAB      = LT_RET

     EXCEPTIONS

       PARAMETER_ERROR = 1

       NO_VALUES_FOUND = 2

       OTHERS          = 3.

   CHECK SY-SUBRC = 0.

   READ TABLE LT_RET INDEX 1.

Read only

0 Likes
736

Hi Solen,

Thanks for your quick reply.

I want to display this description on the screen(right side of the field in greyed area) , will it come automatically.

Read only

0 Likes
736

Please add a display only field like label next to the field. Then in your F4 help whatever v alue is returned by F4IF_INT_TABLE_VALUE_REQUEST update the label field. It may happen you may need to use DYNPRO_MODIFY_DATA cant remember the exact name of FM.

Read only

0 Likes
736

Hello

Yes it will display in the order you add to the list at value_tab

TABLES

      value_tab       = lt_itm

You can try the code at Rajeshs too, that should work

Read only

former_member188282
Active Participant
0 Likes
737

Hi Abhinav

Try with below sample code you have to use FM parameter DYNPFLD_MAPPING

ls_dynpfld_mapping-fldname = 'F0001'.

  ls_dynpfld_mapping-dyfldname = 'MATNR'.

  APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.

  ls_dynpfld_mapping-fldname = 'F0002'.

  ls_dynpfld_mapping-dyfldname = 'MAKTX'.

  APPEND ls_dynpfld_mapping TO lt_dynpfld_mapping.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

      retfield        = 'MATNR'

      dynpprog        = sy-repid

      dynpnr          = sy-dynnr

      dynprofield     = 'MATNR'

      stepl           = v_stepl

      window_title    = 'material number'

      value_org       = 'S'

    TABLES

      value_tab       = lt_itm

      return_tab      = ret_tab

      dynpfld_mapping = lt_dynpfld_mapping.

Regards,

Rajesh