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: 

restrict F4 searchhelp for matnr: only show values of material-type ZXYZ

Former Member
0 Kudos

Hi all,

I want to restrict my F4 searchhelp for matnr: only show values of material-type ZFER

But I want to keep the nice standard searchhelp of matnr including it tabs and options and all.

Creating my own F4-search help using 'F4IF_INT_TABLE_VALUE_REQUEST' only shows one view forgetting all the standard F4-views for matnr.

Program

tables: mara, vbak.
constants co_mtart_ZFER type mtart value 'ZFER'.
*$*$          S E L E C T I O N   S C R E E N                       *
SELECTION-SCREEN: BEGIN OF BLOCK s01 WITH FRAME TITLE text-s01.
SELECT-OPTIONS:   so_matnr FOR MARA-matnr.
SELECTION-SCREEN: END OF BLOCK s01.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_matnr-low.
   PERFORM so_matnr_f4 using 'SOMARA-LOW'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_matnr-high.
  PERFORM so_matnr_f4 using 'SOMARA-HIGH'.


Is there a way to just restrict the values in the matnr-searchhelp to only those materials of type ZFER?


Best regards,

Tim van Steenbergen

Tieka.nl

5 REPLIES 5

Former Member
0 Kudos

Hi Tim,

I dont think there is any staright forward way to achieve this. Unless anybody has got any idea. What we can do here is to copy the standard collective search help MAT1 and add our own search help to it and then use MATCHCODE OBJECT to assign the search help to the report select option. Or else you can maximum default the material type in the standard elementary search help MAT1T("Material by material type") which is already included in the collective search help MAT1 by using set parameter ID option.

Regards,

R

Former Member
0 Kudos

I may be mis-understanding the question, but MAT1 is a collective search help and if you drill down deep enough there is an elementary search help called MAT1T_E that is Material by Material Type.  If the parameter id MTA is set to "ZFER" (or what ever you want) it should do the trick for you.

Also it is possible to make a customer mod to the search help MAT1 and add whatever additional SH you want to it.

We have done this to this very same search help and it works quite well.

former_member156446
Active Contributor
0 Kudos

You could add an "append search help" to standard collective search help and search on the web for "sap: parameter assignment search help" you could achieve it then.

Its a little tricky.. but can be achievable.

Former Member
0 Kudos

create new search help in se11,

and use search help exit.

serach help exits are basically used for these purposes to restrict the selection method.

refer this link:

exactly matches ur requirement.

http://www.saptechnical.com/Tutorials/ABAP/SearchHelp/Demo.htm

raymond_giuseppi
Active Contributor
0 Kudos

Yes you can if the field is a parameter of the search help. (read my answers in Show a standard SEARCH HELP using import parameters.

Regards,

Raymond