cancel
Showing results for 
Search instead for 
Did you mean: 

Service ticket status change-ERMS

Former Member
0 Kudos
162

Hi All,

My requirement is to change the status of service ticket whenever the agent receives second e-mail contact to "New Message".

For this i've created a new service id in ERMS and created a class in which i've included the following logic in the method to achieve this functionality:

*Internal table and Work areas declaration
DATA : x_status_com TYPE crmt_status_comt,
       i_status_com TYPE STANDARD TABLE OF crmt_status_comt,
       x_input_field_name TYPE crmt_changeable VALUE 'X'.

*Assign the values to change the service ticket status
x_status_com-ref_guid = '0026D6FB55EBD04E98772A4C71045C32'.
x_status_com-ref_kind = 'A'.
x_status_com-status = 'E0008'. "New Message
x_status_com-activate = 'X'.

APPEND x_status_com TO i_status_com.

*Call this function to change the service ticket status
CALL FUNCTION 'CRM_STATUS_MAINTAIN_OW'
  EXPORTING
    it_status_com        = i_status_com
  CHANGING
    ct_input_field_names = x_input_field_name
  EXCEPTIONS
    not_allowed          = 1
    error_occurred       = 2
    warning_occurred     = 3
    OTHERS               = 4.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

*Call this function to perform the transaction commit.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

BUT the above code is not working as it is giving type-conflict error message in the runtime dump.

Can any one tell me how can i pass one entry in the above function module to change the status of my GUID or service ticket. Also, please let me know if the FM 'CRM_STATUS_MAINTAIN_OW' is correct when i want to change the status of my service ticket or an e-mail ticket/id.

Thanks,

Shamim

Edited by: S H A M I M on Jun 23, 2009 7:04 PM

View Entire Topic
former_member200342
Active Contributor
0 Kudos

Hi Shamim,

I dont know much abt the coding but you can try using FM:"CRM_STATUS_CHANGE_EXTERN" instead of 'CRM_STATUS_MAINTAIN_OW' which is used to set the user status.

Regards,

PePe

Former Member
0 Kudos

Hi PePe,

Thanks for the reply.

But the FM "CRM_STATUS_CHANGE_EXTERN" does not take the service order no as its paramter instead it is taking object no. please help me here...

Also when i'm hardcoding this function module, the message "User status E0008 is not allowed (CRMACTIV)" is displayed.

CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN'
  EXPORTING
*   client                    = sy-mandt
    objnr                     = '0026D6FB55EBD04E98772A4C71045C32'
    user_status               = 'E0008'
*   SET_INACT                 = ' '
*   SET_CHGKZ                 =
*   XNOAUTO                   =
   no_check                  = 'X'

thanks again,

shamim

former_member200342
Active Contributor
0 Kudos

Hi shamim,

After looking at the error it seems that you need to check your status profile CRMACTIV.

Check if the status E0008 is allowed in your current status.i mean u check whether the lowest and higest number in the status currently set and the status number of E0008 should lie between this two numbers.

Regards,

PePe

Former Member
0 Kudos

thanks again PePe.

But where should I check this status profile CRMACTIV? is there any tcode or table for this?

Could you please provide me the steps to check whether the lowest and highest number in the status is currently set?

regards,

shamim

former_member200342
Active Contributor
0 Kudos

HI shamim,

Check the status profile in the SPRO path:

Customer Relationship Management>Transactions>Basic Settings>Status Management>Change Status Profile for User Status.

Click on position and enter the status profile that you have attached to your service ticket.

Regards,

PePe

Former Member
0 Kudos

Hi,

You can check the table TJ30T for the same.

Regards,

Amit

Former Member
0 Kudos

Hi PePe,

I would also like to maintain the "Reason" for E0008 status. i.e. i would like to show up the reason for the status change whenever i get a new mail.

Could you please let me know the settings step by step where can i maintain these?

Below are the inputs that I would like to have in the settings for updating the "Reason" whenever a new mail arrives:

Subject Profile: YEIMST002

Code Group Profile: YEIMST002

Catalog: A2

Code Group: YEIMRFS2

Code: Y001 - Customer Sent Additional Email

Can we also maintain these settings using a program / FM?

Thanks,

Shamim