cancel
Showing results for 
Search instead for 
Did you mean: 

Add custom partner field to incident search result list and criteria

Former Member
0 Kudos

We have this custom field created through configuration; BTPARTNER_ZLFN0004.  It's called Responsible Analyst.  I created an enhancement using transaction code bsp_wb_cmpwb and added this field to the details screen of the ticket under context node BTPARTNER.  I used the attribute description_name which links to the responsible analyst entered at the bottom half of the incident screen under Business Partner.  Here is the BOL Model path:

Root Objects

Btorder

  Relations

  Btorder Header

    BTADMINH

    Relations

      BTheaderPartnerset

      Relations

        BTPARTNER_ZLFN0004 and used the wizard to attribute description_name on the AIC_INCIDENT_H component in context node BTPARTNER and called the field ZZRESP_ANALYST.

I can't seem to get this field reportable into the search criteria and search result list on the search incidents screen.  The incident details are component AIC_INCIDENT_H and the search list is on the intial incident screen is AIC_INCIDENT_S. 

I was able to create the zzresp_analyst on the search screen using component AIC_INCIDENT_S, but it just says description_name with no values populated from the responsible analyst field.  I want the field to be populated with the name on the responsible analyst field.  I am definitely doing something wrong here. 

Any suggestions.  This was really hard to explain.  Please see attached document.

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

The population is normally done in the GET_Methode. There you have access to the current entity of the collection can you can read any data which is needed.

Best regards,

Thomas Wagner

Former Member
0 Kudos

I didn't quite understand what you were saying in your message, however, I was able to get it in the search result.  I added the attribute to the entity BTQRSrvReq and it works in the search result.

I'm having trouble getting it in the Search Criteria.  I did the same thing with adding the attribute to BTQSrvReq and I can't get it to work.  Notice the Search Criteria entity has one letter different.  They're not the same. 

Thank you for your response.

Linda

Former Member
0 Kudos

Hello Linda,

You have to do these steps:

- Add the attribute as value or model-attribute to BTQSrvReq.

- Include it in your view-configuration.

- Enhance the search so that the new attribute is included in the search in the GENIL-class or in the BADI to search for these transactions. There are other discussions available on how to do that. At the moment I don't know the name of the BADI. You have to di this step otherwise the search criteria is ignored.

Best regards,

Thomas Wagner

Former Member
0 Kudos

Hi Thomas,

Thank you with your response.  It's the second step that isn't working.  It isn't showing up in the view configuration.  I think I might be on to something.  In the get and set methods, there's an object that's in the path and I can't seem to find it.

I've bolded where I think the problem is.  I don't seem to find 

'BTSRQMObject' object in the BOL path anywhere.

   

value = ' '.

 

*'BTQSrvReq not bound'."#EC NOTEXT

 

 

if iterator is bound.

current = iterator->get_current( ).

else.

current = collection_wrapper->get_current( ).

endif.

 

TRY.

DATA: coll TYPE REF TO if_bol_entity_col.

DATA: entity TYPE REF TO cl_crm_bol_entity.

 

entity ?= current.

coll = entity->get_related_entities(

iv_relation_name = 'BTSRQMObject' ). "#EC NOTEXT

current = coll->get_current( ).

IF current IS NOT BOUND.

RETURN.

ENDIF.

entity ?= current.

coll = entity->get_related_entities(

iv_relation_name = 'BTOrderHeader' ). "#EC NOTEXT

current = coll->get_current( ).

IF current IS NOT BOUND.

RETURN.

ENDIF.

entity ?= current.

coll = entity->get_related_entities(

iv_relation_name = 'BTHeaderPartnerSet' ). "#EC NOTEXT

current = coll->get_current( ).

IF current IS NOT BOUND.

RETURN.

ENDIF.

entity ?= current.

coll = entity->get_related_entities(

iv_relation_name = 'BTPartner_ZLFN0004' ). "#EC NOTEXT

current = coll->get_current( ).

IF current IS NOT BOUND.

RETURN.

ENDIF.

TRY.

dref = current->get_property( 'DESCRIPTION_NAME' ). "#EC NOTEXT

CATCH cx_crm_cic_parameter_error.

ENDTRY.

Thank you for your help.  Happy Thanksgiving.

Former Member
0 Kudos

Hello Linda,

In transaction GENIL_MODEL_BROWSER I also can't see BTSRQMObject.

I see that BTQRSrvReq has a direct link to BTOrder called BTADVSSrvReq.

You should be able to see in debugging if you relation exists. It might even throw a dump. But this should not explain why this attribute is not available in the configuration. Are you really sure, it is not there. You can also swith on the technical names in configuration view.

Best regards,

Thomas Wagner

Former Member
0 Kudos

Hi Thomas,

Yes, I am sure it is not there and I know how to switch on the technical names.  Trust me it is not there.  It is in the Search Results list, but not in the Search Criteria(top half, you can't search by it). 

Thanks for your help.  It's well appreciated.  If you think of anything else, please let me know.

Linda Wilkins