
Industry sector: SAP Grantor Management
SAP CRM Objects: SAP CRM Case Management and One Order Management - Applications
Business Scenario: As part of Grantor management process, fund manager reviewing multiple applications based on business criteria and project (funding area). To progress the applications further for review, applications will have to be linked to SAP CRM Case. Manual linking will be a cumbersome task for end user, to automate the linking process following logic can be used in a report.
Above scenario can vary from client to client.
How to Link One order object to SAP CRM CASE?
SAP CRM WEB UI enables users to link case to one order object and vice-versa.
Below logic is for linking one order object to SAP CRM CASE programmatically.
Note: Pass your own data in fields marked with(traingular brackets) < XX >
DATA : lv_bor_key TYPE swo_typeid,
lr_crm_case TYPE REF TO if_crm_cmg_api,
ls_message TYPE crmt_cmg_error,
lt_link_message TYPE crmt_cmg_attr_error_t,
TRY.
* Open case in mode edit
CALL METHOD cl_crm_cmg_manager=>open_case
EXPORTING
iv_case_guid = <CASE GUID>
iv_activity = if_scmg_authorization=>c_activity_modify
IMPORTING
er_crm_case = lr_crm_case
es_message = ls_message.
CATCH cx_sy_ref_is_initial.
RETURN.
ENDTRY.
lv_bor_key = <One order object GUID>.
* Adding the One order document to case.
CALL METHOD lr_crm_case->insert_element
EXPORTING
iv_bor_key = lv_bor_key
iv_relation = <relationship> ( example = 'CJ')
iv_check_consistency = 'X'
IMPORTING
es_message = ls_message.
* Save the Linked Case
CALL METHOD lr_crm_case->save
IMPORTING
et_message_with_attr = lt_link_message.
COMMIT WORK
* Close the Opened case
TRY.
CALL METHOD cl_crm_cmg_manager=>close_case
EXPORTING
iv_case_guid = <CASE GUID>
IMPORTING
es_message = ls_message.
CATCH cx_sy_ref_is_initial.
RETURN.
ENDTRY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |