Skip to Content
author's profile photo Former Member
Former Member

CRM7 - How do I Read in the Main Catagory for selected row in IC inbox

Hi experts,

I am using the BAdi "CRM_IC_INBOX_BADI", method "XABLE_BUTTONS_FOR_SELECTION" to disable certain buttons depending on the main catagory of the row selected from the IC inbox.

The problem I have is I don't know how to use the appropriate classes / methods to obtain what I need. I should also point out were only interested in single selected rows as multiple rows are excluded.

If I place a breakpoint in the method and then select a row in the IC inbox the BAdi is triggered. The BAdi has an import parameter "I_SELECTED_INBOX_ITEMS" which is of type "CL_CRM_BOL_ENTITY_COOL" and when I click on this I can see all the attributes. The attribute I'm interested in here is "ENTITY_LIST" and If I click on ENTITY_LIST another BO reference is shown "->{0:4800*\CLASS=CL_CRM_AUI_ONEORDER} which has the attribute "GV_MAINCATEGORY" which I would like to read in. Can anyone help or offer some sample code?

Thanks in advance,


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Feb 27, 2013 at 03:26 PM

    Hello, Chris.

    Try something like this:

    DATA: lr_item TYPE REF TO cl_crm_aui_oneorder,            lv_maincategory TYPE CRMT_AUI_MAINCAT.try.  lr_item ?= i_selected_inbox_items->get_first( ).  lv_maincategory = lr_item->gv_maincategory. //as far as it is a public attributecatch cx_root.endtry.
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Sigrid Wieshofer

      Hi Sigrid,

      I now understand I can't read the main category for a work item.

      What I've done is to read in the item type for any work items that are selected.

      data: lr_wrkitm type ref to cl_crm_aui_entity,

      lv_item_type type crmt_aui_item_type.

      lr_wrkitm ?= i_selected_inbox_items->if_bol_col_entity~get_first.

      lv_item_type = lr_wrkitm->get_property_as_string( iv_attr_name = 'ITEM_TYPE' ).

      Thanks and regards,


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.