Skip to Content
avatar image
Former Member

SAP CRM cl_crm_ui_data_context_srv=>get_instance( ) no values in Background

Hello ,

We have implemented CRM with our client where it is being used as an Employee interaction center for HR services.

Quick Background:

In one of the scenario an inbound email into CRM 6.0 from ECC R/3 creates HR service request.

The Service request can also be created manually by the agents/operators.

When the HR requests are created manually by the agents the SLA gets calculated correctly.

However when the HR requests are created out of inbound emails, the SLA is not calculated correctly

Analysis:

For SLA calculations there is a custom function module implemented.

This Z function module gets called before HR service request creation.

Now in foreground (manual creation of HR request) , the below command which retrieves some global parameters works perfectly and in turn SLA gets calculated correctly.

However in background(when inbound email is triggered and this FM is called) this does not retrieve any class/global parameters.

Any ideas.

Quick replies would be appreciated.:)

Regards,

Abhishek Kokate

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 29, 2015 at 12:28 PM

    Hi Abhishek,

    That class, cl_crm_ui_data_context_srv, is only used inside the WebUI framework in some business roles. If used outside this framework, this class has no use.

    Maybe you have to review your development. Can't you pass a GUID for that function module so you can use order normal API's (like FM CRM_ORDER_READ) to fetch the data you need?

    Kind regards,

    Garcia

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Bruno,

      The problem with this scenario is that the request/order is still not created.

      Do you have any workaround where i can read the data from buffer (like org unit,partners etc)

      May be some method readily available for that.

      Regards

      Abhishek Kokate

  • avatar image
    Former Member
    Nov 02, 2015 at 10:07 AM

    HI  Abhishek Kokate,

    choice 1. Can you give some more insight on what your FM does ? if it is date change, you can make it trigger at initial stage of a document( it will work for both manual and automatic ).

    choice 2.There is a setting available in SPRO --> ERM(email response management )--> Service manager--> services. Each each services will have seperate class underneath and it will execute specific functions. Like sending the auto-response to the sender. Services will be called sequencly   say 1 to 10.

    Now for your ERMS  insert a custom service and  trigger your FM.

    Add comment
    10|10000 characters needed characters exceeded