cancel
Showing results for 
Search instead for 
Did you mean: 

Add activity number to inbox result view

Former Member
0 Kudos

Hi,

I'm looking for some more information how to add addional fields to the inbox result view, for example the activity number.

The inbox search is using the BOL model 'Inbox_Query' where activity number is not yet available.

I probably have to extend the BOL model or query or structure or something, but I can't figure out which one and how.

If i try to add a attribute for example EXT_KEY to the context node it will result in "Inbox_Query/EXT_KEY not bound"

I was be able to add additional fields like 'Person responsible' to the 'Activity Search' because this is using the BOL Model 'EIC_ACTIVITY_QUERY' where more fields are already available.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I have same type of requirements...i am very new to EIC and BSP....I am trying to understand how the data flows in this EIC world....I found this Class: CL_HREIC_INBOXRESULT_CN00_VP where there is method(GET_TABLE_LINE_SAMPLE) where SAP is taking in the line sample for the table....perhaps we need to modify this one to start with....

I am not trying to answer you question...just trying to add on to what you are trying to solve...pls do let us know if you find the solution to it....

Thanks...

AS...

Former Member
0 Kudos

You're looking at the correct spot (CL_HREIC_INBOXRESULT_CN00_VP~GET_TABLE_LINE_SAMPL), but probably the wrong way to adjust.

You should use tcode: bsp_wd_workbench

There you can copy a default view to your own bsp application. Then if you change/add attributes in the context node it will generate a new class ZL_HREIC_INBOXRESULT_CN00_VP. In this class you can redefine the method GET_TABLE_LINE_SAMPLE.

I did this for the view ActivitySearchResultView. But this view is using the BOL Model 'EIC_ACTIVITY_QUERY'.

If you use the tcode GENIL_MODEL_BROWSER you can see that the used structure has most of the EIC fields available. (More fields than you see in the EIC Activity Search). Therefore it would be easy to show some more fields in the Activity Search that are already available in the used model. For example the responsible org.unit.

My problem is that i want to do some changes in the InboxResultView_VP. This view is using another BOL Model (Inbox_Query) where only a few fields are available (the ones you see in the EIC inbox). But i want to show the activity number, which is not available in the BOL Model. This is my question, how can i make other fields available in the BOL model.

I'm not sure how to describe a BOL model. I just call it some sort of a query.

What is your requirement? Maybe I can help.

Some other tcodes you probably need are GENIL_MODEL_BROWSER and GENIL_BOL_BROWSER.

Former Member
0 Kudos

Hi,

too bad i can not assign you points....you have given me the starting point...I will come back to this project in a bit(working on a different project at the moment)...and than perhaps can share with you what i need to to do....with the workbench...

really appreciate your response....

AS....

Former Member
0 Kudos

Hi,

for Inbox_Query...you need to enhance the structure...HREIC_S_IB_QUERY...this way you can get custom fields in....

thanks...

AS...

Former Member
0 Kudos

I already did an append on this structure, but how to get/fill this with a value?

Former Member
0 Kudos

Hi,

I added the field in the layout...it shows up but for the data....it is showing the following error:

"inbox_query/EXT_KEY not bound"

I noticed that all the methods: getter and setter are not being called??? so i guess we are missing something else...

need to find that....if you get to know this....pls let us know....

thanks...

AS...

Former Member
0 Kudos

You probably have to redefine the method 'GET_TABLE_LINE_SAMPLE' and add the EXT_KEY to it. If i'm correct, by doing this the getter/setter will be called. However the result will be the same. The EXT_KEY is maybe available in the structure but still not bound.

Former Member
0 Kudos

Hi,

I already re-defined the method and added the new column to get_table_line_sample...what i think...is that i only added this field to the result table....using the bsp_wd_workbench....since the context node does not know about this new field...I think we need to add this field to context itself....by creating a new node there...i will not be able to do this today...since do not have access to the system...but i will try this tomorrow...and let you know...once this field is inserted in the context as a context node...i think this way the bsp model will be able to get this attribute....since as i mentioned that when i debugged the program yesterday...it was not getting called...since it does not pass our new column to the iterator...so no way it can be bound....

well i guess you got my idea what i am trying to say....otherwise will update you on this tomorrow some time...

thanks...

AS...

Former Member
0 Kudos

Using the tcode BSP_WD_WORKBENCH, I created a new attribute in the Context Node 'RESULT'.

Doing this I used the 'Add Model Attribute' and BOL Entity 'Inbox_Query'. For the BOLAttribute you can now choose the

field 'ZZ_EXT_KEY' from appended structure. This will generate your setters and getters for the specific field.

When you add this attribute name to the method 'GET_TABLE_LINE_SAMPLE', the GET_ZZ_EXT_KEY is being called. However, the data is still not available and the error is still 'Not Bound'.

The result is not suprising, you just add a field to a structure and in the view you tell to use that attribute. But there's still missing the part where it collects the data. It's based on a query, so there must be a part, like.... Select .., .., .., ..from DB and put to lt_table. This is the part i'm missing atm.

Note: When debugging it looks like the system will find an activity number. However this is the activity number only from the first record, used for the preview from the selected record. I managed to put an activity numer to the attribute ZZ_EXT_KEY, but the same (number from the selected record) for all records found .

Former Member
0 Kudos

With some help I found the answer. I will update this post today to explain how.

It's easier than expected.

Former Member
0 Kudos

Hi,

that is great....i still do not have access to system....perhaps by tomorrow i will be back to office....

but thanks alot....appreciate all your help....

AS...

Former Member
0 Kudos

Hi,

I am trying to modify my get_ext_key method this way...but i donot have the case_guid so that i can select that entry from the table(SCMG_T_CASE_ATTR)...I can see the hard code value in the column...but i can not figure out how to get the case_guid for that particular line...


DATA: current2 TYPE REF TO if_bol_bo_property_access.
  DATA: dref2 TYPE REF TO data.
  DATA lo_sytabix TYPE sy-tabix.
  DATA lo_size TYPE sy-tabix.
  lo_sytabix = iterator->get_current_index( ).
  lo_size =  iterator->size( ).
  DATA lo_index TYPE crmt_idx.

  lo_index =  lo_sytabix.

  DATA: lv_obj_model TYPE REF TO if_genil_obj_model.
  lv_obj_model = cl_crm_genil_model_service=>get_runtime_model( ).

  DATA: lt_query_names TYPE crmt_ext_obj_name_tab.

  CALL METHOD lv_obj_model->get_object_list
    EXPORTING
      iv_object_kind = if_genil_obj_model=>query_object
    IMPORTING
      et_object_list = lt_query_names.

  DATA: lv_query_name TYPE crmt_ext_obj_name.
  READ TABLE lt_query_names INTO lv_query_name WITH KEY table_line = 'Inbox_Query' .
* create a query service
  DATA: lv_query TYPE REF TO cl_crm_bol_query_service.
  lv_query = cl_crm_bol_query_service=>get_instance( lv_query_name ).

* set a query paramter
  lv_query->set_property( iv_attr_name = 'EXT_KEY'
                          iv_value = '000000002190' ).

* read a query parameter again
*DATA: lv_ext_key type data.
  dref = lv_query->get_property( 'EXT_KEY' ).

Former Member
0 Kudos

Hi, I forgot to update the post...

While debugging I was almost sure that only BOL model Inbox_Query was used. However it more looks like this BOL model is only used to pass the search criteria to EIC_ACTIVITY_QUERY. The EXT_KEY is available but the class behind is making it a little bit confusing.

1. Add an model attribute to the context node RESULT, for example ZZ_EXT_KEY

2. Choose for example BOL Entity 'EIC_ACTIVITY_QUERY' and BOLAttribute 'EXT_KEY'.

3. This will generate the method 'GET_ZZ_EXT_KEY'.

4. Update the code with the following:


    DATA: current TYPE REF TO if_bol_bo_property_access.
    DATA: dref    TYPE REF TO data.

    value =
'HREIC_S_IB_DETAIL not bound'."#EC NOTEXT

    if iterator is bound.
      current = iterator->get_current( ).
    else.
      current = collection_wrapper->get_current( ).
    endif.

  TRY.
    TRY.
          DATA lv_value type string.
          lv_value = current->GET_PROPERTY_AS_STRING( IV_ATTR_NAME = 'EXT_KEY' ).
          value = lv_value.

      CATCH cx_crm_cic_parameter_error.
    ENDTRY.

    CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
          cx_crm_genil_model_error.
      RETURN.
  ENDTRY.

If you look close, you see the GET_PROPERTY is changed to GET_PROPERTY_AS_STRING.

If you use the method GET_PROPERTY it takes the attribute name, for example EXT_KEY and it will use the attribute name starting with GET_ to open the method GET_EXT_KEY in class CL_HREIC_IB_ENTITY_ACT_VP. However, in the class CL_HREIC_IB_ENTITY_ACT_VP the GET_EXT_KEY method does not exist.

To find out the used class, put a breakpoint at 'current' in the GET methods. The ActivitySearchResultView for example uses a different class with different coding.

Former Member
0 Kudos

Hi,

thanks alot for your help....again....too bad can not assi gn the p oi nts...so the key was to create the attribute with the correct bol entity...and get that attribute using as string...

appreciate all your help....

AS....

Former Member
0 Kudos

Almost... To create an attribute, you just select a bol entity so it will generate most part of the code for you inclusing the correct parameters. After that you can adjust the code.

For this view the key was to use the GET_PROPERTY_AS_STRING.

I did some tests while searching for activities, I haven't test it when searching for e-mails and/or notifications.

Answers (0)