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: 

How to fill input parameter automatically.

former_member273995
Participant
0 Kudos
1,311

Hi Gurrus,

Need a help. I am creating an executable program. In the program I have 2 input parameters (Batch No: & Material No) their data types are ( MCH1-CHARG &  MCH1-MATNR) respectively.

When I do search help (f4) at batch no field, it show a list of batch no with material no. when I select any batch from the list it only returns batch no to the parameter field MCH1-CHARG. My requirement is that when I select batch no it should return both batch no & material no to the fields (MCH1-CHARG &  MCH1-MATNR).

Can you please help that how to achieve this.

7 REPLIES 7

Former Member
0 Kudos
361

Hi Shadab,

Use collective search help.Hope this will help you.

Regards,

Arun

0 Kudos
361

Hi Arun,

thanks for your reply but how to use a collective search help at parameter level.

0 Kudos
361

This message was moderated.

0 Kudos
361

This message was moderated.

rajkumarnarasimman
Active Contributor
0 Kudos
361

Hi Shadab,

Use F4IF_INT_TABLE_VALUE_REQUEST, please find the below thread..

Regards

Rajkumar Narasimman

raymond_giuseppi
Active Contributor
0 Kudos
361

You could manage the search help in a PROCESS ON VALUE-REQUEST module or AT SELECTION-SCREEN ON VALUE-REQUEST FOR event associated to second field.

Read  the value of the first field with FM DYNP_VALUES_READ

Then you could either

Sample (second case)

TYPE-POOLS: shlp.

DATA: return_tab TYPE TABLE OF ddshretval WITH HEADER LINE,
      return_wa
TYPE ddshretval.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
 
EXPORTING
    searchhelp       
= 'MCH1'
    shlpparam        
= 'CHARG'
    tabname          
= 'MCH1'
    fieldname        
= 'CHARG'
    callback_program 
= 'ZRGSTST'
    callback_form    
= 'F4FILTERFORM'
 
TABLES
    return_tab       
= return_tab
 
EXCEPTIONS
    field_not_found  
= 1
    no_help_for_field
= 2
    inconsistent_help
= 3
    no_values_found  
= 4
   
OTHERS            = 5.
IF sy-subrc = 0.
 
LOOP AT return_tab INTO return_wa.
   
" etc.
 
ENDLOOP.
ENDIF.
(…)
FORM f4filterform TABLES   record_tab STRUCTURE seahlpres
                 
CHANGING shlp TYPE shlp_descr_t
                           callcontrol
LIKE ddshf4ctrl.
* Local data
 
DATA: ls_ddshiface TYPE ddshiface,
        lv_matnr
TYPE mch1-matnr.
* Get other field values
*    CALL FUNCTION 'DYNP_VALUES_READ'
* Filter material
 
LOOP AT shlp-interface INTO ls_ddshiface.
   
CASE  ddshiface-shlpfield.
     
WHEN 'MATNR'.
        ls_ddshiface
-valtabname = 'MCH1'.
        ls_ddshiface
-valfield   = 'MATNR'.
        ls_ddshiface
-value      = lv_matnr.
       
MODIFY shlp-interface FROM ls_ddshiface.
   
ENDCASE.
 
ENDLOOP.
ENDFORM.                    "f4filterform

Regards,

Raymond

venuarun
Active Participant
0 Kudos
361

Hi Shadab,

Use this function module for attaching search help F4IF_INT_TABLE_VALUE_REQUEST.

With Regards

Arun VS