cancel
Showing results for 
Search instead for 
Did you mean: 

Product Category - Overriding the defaults

Former Member
0 Kudos

I have implemented the BADI to map the Product Category during the external catalog shopping cart creation.

I have the mapping Ztables.

If the mapping is available, all is working good.

However if the mapping is not available, I have to pass the error message about missing mapping.

The error message is working as well but the product category is getting defaulted to the standard category of the User.

I dont want to set it to the standard category.

Any clue?

SRM Functional says there is config to default and they dont want to change it.

How can I override this config?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Pranu,

Could you please check thread below ?

[BBP_CATALOG_TRANSFER CATEGORY_ID value is getting defaulted|;

Regards.

Laurent.

Former Member
0 Kudos

Thanks Laurent.

My problem is something similar but not the same.

I can set the values to the product categories whenever the mapping is present in my Z Table.

However if the value is not present in Z Table, I have to pass the error message and product category as blank.

I am clearing it in the BADI (categoryt as well as GUID).

However after BADI execution, the default category is set.

Thanks

Former Member
0 Kudos

Check your SLG1 after you transfer an item, you will see a message some thing like " No matching product category found" is shown as a warning instead of an error. If you change in the message control configuration this from Warning to error , it will not add the item to shopping cart when ever there is no mapping entry in the table.

Thanks

Padhi

Former Member
0 Kudos

I am passing my custom message and it could be seen in SGL1 as error.

However the Shopping cart item is taking product category as 'MV004' which is Standard category of the user.

Error is displayed as desired.

But I want the Product Category column value = Blank.

Thanks

Edited by: Pranu Pranu on Dec 7, 2010 9:59 PM

laurent_burtaire
Active Contributor
0 Kudos

Hello Pranu,

So, use David Barber's workaround:

[Product category discription in the shoping card|;

In this way, your specific error message will be raised till the default dummy product category is changed by user.

Regards.

Laurent.

Former Member
0 Kudos

Sorry right now i don't have access to tell you exact message you need to convert it from warning to error. I will update that tomorrow. BUt mean time once you transfer the item , goto trnsaction slg1 and check the log , see if you can find the message i mentioned.

Thanks

Padhi

Edited by: Trailokyanath Padhi on Dec 7, 2010 10:22 PM

Former Member
0 Kudos

Thanks for the work around but is it not possible in SRM 7.0 to just blank out the Product Category?

Former Member
0 Kudos

In the configuration, under message control, for business object 2121 , change the message class BBPWS and no 013 from standard W to E (Error) and let me know if it works.

Thanks

Padhi

Former Member
0 Kudos

Hello Padhi,

I can see the Error Messages there. I can also convert the message from I to E.

I have also my own custom error messages.

My problem is the default Product Category is coming. I want it to be BLANK.

If the ZTable mapping is present, I want to use that mapping and this works fine.

If the mapping is not present, it should be BLANK but it is taking default.

Thanks again.

Pranu

Former Member
0 Kudos

I am using the David Barber's workaround as specified above.

In the BAD, I am calling the FM: BBP_PD_SC_GETDETAIL and it gives me the SC details.

After validations, I am updating the ET_MESSAGES.

The error messages are displayed if the dummy product group is used but the SC is getting saved inspite of errors.

Any idea?

  • I_OBJECT_ID =
  • I_ATTACH_WITH_DOC = ' '
  • I_WITH_ITEMDATA = 'X'
  • I_ITEM_SORTED_BY_HIERARCHY =
  • I_WITHOUT_HEADER_TOTALS =
  • I_READ_FROM_ARCHIVE = ' '
  • IMPORTING
  • E_HEADER =
  • EV_IS_PD =
  • ET_ATTACH =
  • E_ACCOUNT =
  • E_PARTNER =
  • E_CONFIRM =
  • E_LONGTEXT =
  • E_LIMIT =
  • E_ORGDATA =
  • E_TAX =
  • E_PRIDOC =
  • E_HCF =
  • E_ICF =
  • E_ACTVAL =
  • E_ACC_ACTVAL =
  • E_HEADER_REL =
  • E_ITMLIM_REL =
  • E_STATUS =
  • wa_msg-MESSAGE = 'TESTING'.
  • move-corresponding wa_msg to et_messages.
... CALL FUNCTION 'BBP_PD_SC_GETDETAIL' EXPORTING I_GUID = IV_DOC_GUID TABLES E_ITEM = i_item E_MESSAGES = i_msg . loop at i_item into wa_item. if wa_item-CATEGORY_ID = 'M0156'. wa_msg-MSGTY = 'E'. wa_msg-MSGID = 'BBPWS'. wa_msg-MSGNO = '029'. append wa_msg to et_messages. endif.

Any help would be appretiated.

Edited by: Pranu Pranu on Dec 8, 2010 5:27 PM