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

Populating two fields from a search help

0 Likes
2,960

Hi all,

I have a table control TBC in a module pool screen which has two fields classification id (SCID) and classfication name(SCNM).

I have added F4 search help functionality for SCID by creating a module in Process on value request.

When f4 is clicked for SCID the f4 search help pops up displaying the classification id and classfication name.

When i select an entry, the classification id field gets filled.

But i want the classification name field also to be filled automaticcally when an option from f4 search help is clicked.

How to achieve this?

Inputs on this would be very helpful.

Thanks in advance.

Regards,

Vignesh Sunkasi.K

1 ACCEPTED SOLUTION
Read only

former_member202818
Active Contributor
0 Likes
1,747

Hi Vignesh,

Which FM are you using for F4?

If it  F4IF_INT_TABLE_VALUE_REQUEST use its parameter ' dynpfld_mapping' for fill other fields from F4...

Regards

Sreekanth

Hi all,

I have a table control TBC in a module pool screen which has two fields classification id (SCID) and classfication name(SCNM).

I have added F4 search help functionality for SCID by creating a module in Process on value request.

When f4 is clicked for SCID the f4 search help pops up displaying the classification id and classfication name.

When i select an entry, the classification id field gets filled.

But i want the classification name field also to be filled automaticcally when an option from f4 search help is clicked.

How to achieve this?

Inputs on this would be very helpful.

Thanks in advance.

Regards,

Vignesh Sunkasi.K

5 REPLIES 5
Read only

Former Member
0 Likes
1,747

Hi Vignesh,

You need to use below function modules in Process on value request event.

DYNP_GET_STEPL

DYNP_VALUES_UPDATE

Refer  below url.

Thanks,

Ashok.

Read only

former_member202818
Active Contributor
0 Likes
1,748

Hi Vignesh,

Which FM are you using for F4?

If it  F4IF_INT_TABLE_VALUE_REQUEST use its parameter ' dynpfld_mapping' for fill other fields from F4...

Regards

Sreekanth

Read only

0 Likes
1,747

Hi Sreekanth,

I am using 'F4IF_INT_TABLE_VALUE_REQUEST'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

       
EXPORTING

          retfield       
= 'SCID'

          dynpprog       
= sy-repid

          dynpnr         
= sy-dynnr

          dynprofield    
= 'GW_CASE_MANGEMT-ZZSCID'

          value_org      
= 'S'

       
TABLES

          value_tab      
= lt_subclass

*         return_tab      = lt_return_tab

       
EXCEPTIONS

          parameter_error
= 1

          no_values_found
= 2

         
OTHERS          = 3
.

Can you please specify what else has to be done

Read only

0 Likes
1,747

Here is an example....

   DATA lit_fields TYPE TABLE OF dselc,

            lwa_fields TYPE dselc.

   lwa_fields-fldname = 'F0003'.  "3rd Position of field in F4

   lwa_fields-dyfldname = 'GV_COUNTRYFR'. "Screen field to be populated

   APPEND lwa_fields TO lit_fields.


   lwa_fields-fldname = 'F0004'.

   lwa_fields-dyfldname = 'GV_COUNTRYTO'.

   APPEND lwa_fields TO lit_fields.



CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

     EXPORTING

       retfield               = 'CONNID'

       dynpprog               = sy-cprog

       dynpnr                 = sy-dynnr

       dynprofield            = 'GV_CONNID'

*   STEPL                  = 0

       value_org              = 'S'

     TABLES

       value_tab              = lit_f4

     dynpfld_mapping        = lit_fields

    EXCEPTIONS

      parameter_error        = 1

      no_values_found        = 2

      OTHERS                 = 3

             .

Read only

0 Likes
1,747

Hi Sreekanth,

Thank you so much.

I have been passing the name of the field to FLDNAME instead of the position.

That is where the problem was.