cancel
Showing results for 
Search instead for 
Did you mean: 

SC-Sourcing getting contracts based on category_id? BADI-bbp_sos_Badi?

Former Member
0 Kudos

Hi,

In Shopping Cart-Sourcing, by default it is selecting contracts based on ORDERED_PROD,PRODUCT (material no).

But I want to implement search logic to get contracts based on CATEGORY_ID.

All the contracts related to this category_id I want to get that contracts.

Can any one give idea how I can get this?

I tried to implement BADI -BBP_SOS_BADI

Method -BBP_SOS_SEARCH

I tried to use the FM - BBP_PD_INDEX_FIND and pass the contracts to the BADI but it is not working.

Did anyone worked on this method, please let me know how to get the complete contracts info and sending back to BADI?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

peter_novoth
Employee
Employee
0 Kudos

Hi,

there is one open point for me in your question. Would you like to search:

1) only for product category contracts (which don't have product ID)

2) for contracts, which category equals to the category ID of the SC item (practically also contracts should appear, which have from the SC items product ID different product ID)

For the first case you only need to modificate the coding in the form SOS_LOCAL_CALL_PD (LBBP_SC_APPF87):


Kontext-Block                                           
  else.                                                 
    clear ev_error.                                     
*   Delete heade contract from the SOS                  
Delete-Block                                            
    DELETE et_con_list WHERE ctr_item_number = space.   
Insert-Block                                            
*    DELETE et_con_list WHERE ctr_item_number = space.  

With this change in addition to the ORDERED_PROD search also product category contracts will be found.

Regards,

Peter

Former Member
0 Kudos

Hi Peter,

Sorry for late replay,

I want the second option,

I only need to display the contracts which are having category id = category id of the SC item.

(For contracts which category id equals to the category ID of the SC item . )

Thanks.

peter_novoth
Employee
Employee
0 Kudos

Hi Murali,

in this case you would also need to modificate the selection parameters which are sent to the function BBP_PD_INDEX_FIND in order that also contracts can be selected which belong to the same product category, but have a different product ID.

Regards,

Peter