cancel
Showing results for 
Search instead for 
Did you mean: 

Ibase Search Enhancement

Former Member
0 Kudos

Hi Experts,

I need to enhance Ibase Search with two fields MANUFACT_MODEL and MANUFACT_PART which come under Set type COM_TA_MANUFAC. I have enhanced my attribute structure and made changes in Design layer to get these fields. I have identified that I have to copy standard Class CL_CRM_PRIL_ADVSEARCH_BASE and create Z class to redefine method IF_CRM_PRIL_DQUERY~GET_RANGESEARCH_RESULT. Where do I maintain the entry to trigger this Z method. I tried maintaining it in CRMV_OBJ_BTIL_C view. I am getting an error saying "Entry ibcomptoiobjectadv does not exist in CRMC_OBJ_BTIL". If I try to maintain an entry there I get an error when I open Equipment search in Webui. Kindly guide me how to proceed further.

UI Component: CRMCMP_IBSEARCH

View: CRMCMP_IBSEARCH/ComponentByIObject

Context Node: Search

Bol Entity: ibcomptoiobjectadv

Att Structure: CRMT_COMP_IL_OBJECT_QS which has been enhanced with 2 fields.

Accepted Solutions (0)

Answers (1)

Answers (1)

kavindra_joshi
Active Contributor
0 Kudos

Just enhancing the search criteria is enough if the underlying Data/DB tables have the same fields already available.( I guess they are available in your case).

In your case you need to implement the new search query class which you have done already. The control to search class is passed from the Genil class. You have make sure that from the GENIL class , GET_QUERY_RESULT or GET_DQUERY_RESULT method for the query name , the control should go to your Z class.

You can debug and check the flow.

Regards

Kavindra

Former Member
0 Kudos

Hi Kavindra,

Just enhancing the search crieteria does not fetch results based on my fields. I did debug the flow. From CL_CRM_IBASE_IL method IF_GENIL_APPL_INTLAY~GET_DYNAMIC_QUERY_RESULT it is going into GET_ADV_PRODUCT_GUIDS method class CL_IBCOMPTOIOBJECT_IL and then into our class CL_CRM_PRIL_ADVSEARCH_BASE. How do I change the flow to trigger my Z class. I need to maintain this Z class in some table right?

kavindra_joshi
Active Contributor
0 Kudos

spro->CRM->CRM Cross-Application Components->Generic Interaction /Object layer->Basic Settings.

Copy the old entry for your GENIL component and change the class name against the GENIL Component with your Z Class name.  ( Follow the naming conventions)

Then in the ZCLASS's IF_GENIL_APPL_INTLAY~GET_DYNAMIC_QUERY_RESULT you have make sure that when your query is executed then the call is made to your ZClass for query.

Regards

Kavindra

Former Member
0 Kudos

Hi Kavindra,

In SPRO, I see class for Ibase as CL_CRM_IBASE_IL. Now, I can change it to Z class say ZCL_CRM_IBASE_IL. But this should trigger my Z class ZCL_CRM_PRIL_ADVSEARCH_BASE where I need to code. This will still trigger standard class CL_CRM_PRIL_ADVSEARCH_BASE. Hope you got my doubt? Thanks for all your replies. they are really helpful!

kavindra_joshi
Active Contributor
0 Kudos

Change the super class of ZCL_CRM_IBASE_IL to CL_CRM_IBASE_IL. This way you have inherited the new class from the original class and you would reuse the coding in CL_CRM_IBASE_IL.

Now you have change the name of the class in the customizing to ZCL_CRM_IBASE_IL. Now redefine the IF_GENIL_APPL_INTLAY~GET_DYNAMIC_QUERY_RESULT in ZCL_CRM_IBASE_IL and then when your query is executed then call the ZCL_CRM_PRIL_ADVSEARCH_BASE. ( Inherit this also from

CL_CRM_PRIL_ADVSEARCH_BASE) and redefine the method that contains the query logic.

I hope the explanation is clear.

Regards

Kavindra


Former Member
0 Kudos

Hi Anirudh,

In customizing enter class ZCL_CRM_IBASE_IL ( which inherits CL_CRM_IBASE_IL ) and redefine the method IF_GENIL_APPL_INTLAY~GET_DYNAMIC_QUERY_RESULT. Copy the same code and add

If query_name = “ your query name “.

Lv_class_name = “ZCL_CRM_PRIL_ADVSEARCH_BASE”. ( which inherits CL_CRM_PRIL_ADVSEARCH_BASE ).

TRY.
        CREATE OBJECT lr_search  TYPE (lv_class_name).
      CATCH cx_sy_create_object_error.

Else.

lr_search = cl_crm_ibase_il_factory=>get_query_object( ir_msg_container = lv_msg_cont
                                                              iv_query_name = iv_query_name ).

Endif.

Regards,

Nithish

Former Member
0 Kudos

Guys,

It is working without any enhancement. Just maintain field in table crmc_prsea_attr table mentioning standard Set Type. Thanks for all your replies.