Professional Documents
Culture Documents
This page shows how to find out the outbound mail information with their linked service ticket no in ERMS.
Overview
In ERMS we can easily find out the inbound mails and out outbound mails Information but its difficult to find out
the outbound mail with their linking service ticket no information.
This wiki will help how to find out the outbound mails with their linking service ticket numbers before that I will
explain what are the tables which is used in ERMS.
if we want to know the service ticket no for the replied mail id we have a function module.
In that function module we have to pass CON_ID and object type = SOFM then will get guid for the corresponding linked
service ticket.
Pass that GUID into crmd_order_read or crmd_orderadm_h you will get service ticket no.
lv_root-objkey = lv_conid.
lv_root-objtype = 'SOFM'.
EXPORTING
object
= lv_root
max_hops
=1
TABLES
links
= lt_bor
EXCEPTIONS
internal_error = 1
no_logsys
=2
OTHERS
= 3.
IF sy-subrc <> 0.
RETURN.
ENDIF.
READ TABLE lt_bor INTO ls_bor INDEX 1.
IF sy-subrc = 0.
lv_guid = ls_bor-objkey_a.
APPEND lv_guid TO it_header_guid.
2)
3)
4)
Here we have so many blogs which is already explained how to create custom model and search/result bsp component.
So that I havent explain procedure to create model or search/result view.
Creating Custom Search/result view link..
http://scn.sap.com/docs/DOC-26564
http://scn.sap.com/community/crm/webclient-ui-framework/blog/2012/05/29/custom-component-based-on-custom-genilcomponent
Creating Custom Model..
http://scn.sap.com/community/crm/webclient-ui-framework/blog/2012/05/28/custom-genil-object-model-an-overview
ZCRM_ERMS_SRVO this is my structure which is I have used in my model.
*****************************************************
* Declaring select-options
*
*****************************************************
TYPES : BEGIN OF t_selopttab,
sign TYPE crmsignran,
option TYPE crmoptran,
low TYPE symsgv,
high TYPE symsgv,
END OF t_selopttab.
DATA : it_sel_objdes
TYPE STANDARD TABLE OF t_selopttab,
it_sel_crdate
TYPE STANDARD TABLE OF t_selopttab,
it_sel_emaifrom TYPE STANDARD TABLE OF t_selopttab,
it_sel_emailto
wa_sel
wa_param
lr_entity
lr_attr_props
v_key
lv_conid
DATA : lv_root
TYPE borident,
lt_bor
TYPE crmt_ic_irec_links,
ls_bor
TYPE relgraphlk,
lv_guid
TYPE swo_typeid,
it_header_guid TYPE crmt_object_guid_tab,
it_orderadm_h TYPE crmt_orderadm_h_wrkt,
wa_orderadm_h TYPE crmt_orderadm_h_wrk,
lv_log_handle TYPE balloghndl.
*****************************************************
*
DECLARE THE TYPES
*
*****************************************************
*****************************************************
* Search Qurey and Selection Screen inputs
*****************************************************
IF iv_query_name = 'SEARCH_SRVO'.
WHEN 'EMAIL_TO'.
TRANSLATE wa_param-low TO LOWER CASE.
SELECT objtp objyr objno objdes crdat crtim INTO CORRESPONDING FIELDS OF TABLE gt_sood FROM sood
WHERE crdat IN it_sel_crdate
AND owntp = 'USR'.
SELECT rectp recyr recno objtp objyr objno msgid FROM sost INTO CORRESPONDING FIELDS OF TABLE
gt_sost
FOR ALL ENTRIES IN gt_sood WHERE objtp = gt_sood-objtp
AND objyr = gt_sood-objyr
AND objno = gt_sood-objno
AND msgid = 'SO'.
IF gt_sost[] IS NOT INITIAL.
SELECT rectp recyr recno msgid msgv1 msgv2 msgv4 status FROM soes INTO CORRESPONDING FIELDS
OF TABLE gt_soes FOR ALL ENTRIES IN gt_sost
WHERE rectp = gt_sost-rectp
AND recyr = gt_sost-recyr
AND recno = gt_sost-recno
AND msgv1 IN it_sel_emailto
AND msgv2 IN it_sel_emaifrom.
ENDIF.
ENDIF.
objyr = gs_sost-objyr
objno = gs_sost-objno.
IF sy-subrc = 0.
wa_data-objtp = gs_sood-objtp.
wa_data-objyr = gs_sood-objyr.
wa_data-objno = gs_sood-objno.
wa_data-description = gs_sood-objdes.
wa_data-from_date = gs_sood-crdat.
wa_data-send_time = gs_sood-crtim.
wa_data-email_from = gs_soes-msgv2.
wa_data-email_to = gs_soes-msgv1.
lv_msgid = gs_soes-msgid.
lv_msgno = gs_soes-status.
lv_msgv1 = gs_soes-msgv1.
lv_msgv2 = gs_soes-msgv2.
lv_msgv4 = gs_soes-msgv4.
wa_data-status = lv_message.
CLEAR : lv_msgid,lv_msgno,lv_msgv1,lv_msgv2,lv_msgv4.
lv_root-objkey = lv_conid.
lv_root-objtype = 'SOFM'.
error_occurred
=2
document_locked
=3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS
= 7.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
wa_data-service_tkt = wa_orderadm_h-object_id.
ENDIF.
TRY.
CALL METHOD iv_root_list->add_object
EXPORTING
iv_object_name = 'RESULT_SRVO'
is_object_key = wa_data
RECEIVING
rv_result
= lr_entity.
CATCH cx_crm_genil_duplicate_rel .
CATCH cx_crm_genil_model_error .
ENDTRY.
CLEAR : wa_data.
ENDLOOP.
ENDIF.
this is the final output here we can come to know sent mails based on creating date.
Related Content
http://scn.sap.com/thread/1340812
http://scn.sap.com/thread/3181618
Related Documents
E-MAIL INBOUND CONFIGURATION- ALM: Incident Management#MAILINBOUNDCONFIGURATIONALM:IncidentManagement-3SAPBusinessWorkflowandCommunicationSettings
How to set up Threading in ERMS