2015 Feb 24 6:27 AM
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.
2015 Feb 24 6:37 AM
Hi Shadab,
Use collective search help.Hope this will help you.
Regards,
Arun
2015 Feb 24 6:50 AM
Hi Arun,
thanks for your reply but how to use a collective search help at parameter level.
2015 Feb 25 7:23 AM
2015 Feb 25 7:33 AM
2015 Feb 24 6:51 AM
2015 Feb 25 8:32 AM
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
2015 Feb 25 8:44 AM
Hi Shadab,
Use this function module for attaching search help F4IF_INT_TABLE_VALUE_REQUEST.
With Regards
Arun VS