on 02-16-2016 12:54 PM
Hello Experts,
I am currently working on a UI5 App and want to display the WebUI ticket favorites of the User in my App.I already found the WCF_FAV_* tables with the favorites text and user but what I need is the link to the ticket (i.e. the ticket guid with which I can select the ticket data in the table CRMD_ORDERADM_H).
I hope you can help me with this.
Thanks,
Matthias
Hi Matthias,
thanks for the information about the WCF_FAV_* tables.
I did a little research, the favorite is stored in table WCF_ML_OBJECT as an BOL object.
You can use the following code to get a collection which contains the BTOrder entity for a favorite:
DATA: lr_bol TYPE REF TO cl_crm_bol_core,
ls_instances TYPE crmt_genil_obj_instance,
lt_instances TYPE crmt_genil_obj_instance_tab,
lr_col TYPE REF TO if_bol_bo_col,
ls_object TYPE wcf_ml_object.
TRY.
lr_bol = cl_crm_bol_core=>get_instance( ).
lr_bol->start_up( 'BT' ).
CATCH cx_root.
RETURN.
ENDTRY.
SELECT SINGLE * FROM wcf_ml_object INTO ls_object. "here select with the ID from the WCF_FAV_* tables
CLEAR lt_instances.
ls_instances-object_name = ls_object-name.
ls_instances-object_id = ls_object-genil_id.
INSERT ls_instances INTO TABLE lt_instances.
lr_col = lr_bol->get_access_entities( it_instances = lt_instances ).
IF lr_col IS BOUND.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthias,
no problem, here is the complete code:
DATA: lr_bol TYPE REF TO cl_crm_bol_core,
ls_instances TYPE crmt_genil_obj_instance,
lt_instances TYPE crmt_genil_obj_instance_tab,
lr_col TYPE REF TO if_bol_bo_col,
lv_genil_id TYPE string,
ls_object TYPE wcf_ml_object,
lr_entity TYPE REF TO cl_crm_bol_entity,
lv_guid TYPE crmt_object_guid.
TRY.
lr_bol = cl_crm_bol_core=>get_instance( ).
lr_bol->start_up( 'BT' ).
CATCH cx_root.
RETURN.
ENDTRY.
SELECT SINGLE * FROM wcf_ml_object INTO ls_object. "here select with the ID from the WCF_FAV_* tables
CLEAR lt_instances.
ls_instances-object_name = ls_object-name. "'BTOrder'.
ls_instances-object_id = ls_object-genil_id. "lv_genil_id.
INSERT ls_instances INTO TABLE lt_instances.
lr_col = lr_bol->get_access_entities( it_instances = lt_instances ).
IF lr_col IS BOUND.
lr_entity ?= lr_col->get_first( ).
IF lr_entity IS BOUND.
lv_guid = lr_entity->get_property_as_string( iv_attr_name = 'CRM_GUID' ).
ENDIF.
ENDIF.
Best Regards,
Christoph
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.