cancel
Showing results for 
Search instead for 
Did you mean: 

Add Plant to Product ID Search Help

DebbieEmerson
Explorer
0 Kudos

I wish to add Plant (WERKS) to the Product ID Search Help.  I would prefer to do it as an Enhancement rather than a Modification, but I am not seeing a way to enhance /SAPSRM/BBPH_PRODUCT.  Has anyone done this?

Accepted Solutions (1)

Accepted Solutions (1)

lisa_sheil
Contributor
0 Kudos

Dear Debbie,

It depends on your SRM release and how you can achieve this change. If you are on SRM 5.0 you could possible use BADI BBP_F4_READ_ON_EXIT.

However, BADI BBP_F4_READ_ON_EXIT is not valid anymore in SRM 7.0.

The value help tools for products include search help parameter LOGSYS,
category ID, product type, product description.

With this you can filter on standard criteria.

However, if you further want some logic to be implemented in order to
filter the product, you can do so by creating an enhancement in the
below search helps.

In SRM 7.0, there are two search helps for products used in BOs:
- /SAPSRM/BBPH_PRODUCT has exit /SAPSRM/F4_EXIT_PRODUCT_GEN and
  is used in
  Shopping Cart
  Shopping Cart template
  PO Overview
  PO Item
  Invoice Overview
  Invoice Item
  Assign source of supply
  Quota arrangement
  Auction Item
  Auction template Item
  RFx Item
  RFx template Item

- BBPH_PRODUCT has included search help BBPH_PRODUCT_GENERAL
  with exit  BBP_F4IF_SHLP_EXIT_PRODUCT_GEN and is used in
  Contract overview
  Contract Item
  Contract template overview
  Contract template Item

The enhancement needs to be done in both exits.

I hope this helps,

Kind Regards,

Lisa

DebbieEmerson
Explorer
0 Kudos

Dear Lisa,

We are on version 7.0.  I did add the logic as an enhancement to /SAPSRM/F4_EXIT_PRODUCT_GEN, but in order to determine the material number in each record brought back, I needed the record_tab table filled.  This is only filled during the DISP step, and the enhancement is not executed because of the EXIT statement during this step.  The only way I could get this to work is to do a modification and comment out the EXIT statement in the DISP step.  I did have to make another modification to the /SAPSRM/BBPH_PRODUCT structure, adding the WERKS field for the user to fill in.  I was unable to do this via an enhancement.

If there are any other better ways to do this with only enhancements, I would appreciate the information. I am not happy having to do modifications, but it is an absolute user requirement to be able to also filter the Product ID by plant.  We have hundreds of thousands of material numbers, and not all of them are set up in the MARC table for every plant.  I am very surprised that SRM does not have a MARC table similar to ECC as part of the standard process.

Thanks,

Debbie

lisa_sheil
Contributor
0 Kudos

Hi Debbie,

I checked a little further and found the following from another thread, maybe this can help:

You need to enhance the standard search help /SAPSRM/BBPH_PRODUCT or you can create a custom SH by copying the standard one and then assign it to the respective field in webdynpro view.

Add a new field to the SH

WERKS - Check Imp and Exp boxes and use data element BE_WERK

Then if enhancing standard SH enhance the search help exit /SAPSRM/F4_EXIT_PRODUCT_GEN or if using a custom SH create a new SH Exit as copy of /SAPSRM/F4_EXIT_PRODUCT_GEN and then for

  callcontrol-step = 'DISP'.

read the value of WERKS field

Populate data according to interface of BAPI 'BAPI_MATERIAL_GETLIST'

to get the data based on plant.

last step would be for callcontrol-step = 'RETURN' map the result from BAPI to SH fields.

Kind Regards,

Lisa

DebbieEmerson
Explorer
0 Kudos

Lisa,

Thanks for the information.  It did point me in a direction that allowed me to solve the issue. 

We decided to create a custom table with a daily batch to upload all of the data from the MARC table in ECC.  This would eliminate the need to constantly go to ECC for information every time a user did a search.

I solved the problem with two modifications and one enhancement. 

I use a modification to add the WERKS field to the Search Help /SAPSRM/BBPH_PRODUCT. 

I used an enhancement to add code to the Search Help Exit /SAPSRM/F4_EXIT_PRODUCT_GEN to get the material number from the record_tab internal table during the DISP step and make sure it exists for the plant entered in our custom MARC table.  If it didn't exist, it was deleted from the record_tab table and doesn't display. 

I used a modification to comment out the EXIT line in the DISP step because with that line in there, the enhancement would not run.  It really isn't needed because the next line is if the step is RETURN and then the function ends.

Thanks,

Debbie

Answers (0)