cancel
Showing results for 
Search instead for 
Did you mean: 

howto Get Service Ticket number

0 Kudos
125

Hi!

Is there any FM or anyway for me to get the current service ticket number?

Thanks

Tu

Accepted Solutions (0)

Answers (1)

Answers (1)

ymAllen
Participant
0 Kudos

Hi Tu,

You may try the code below. It will help you to get the root object of it.


  DATA:  lr_bdc        TYPE REF TO if_crm_ui_data_context,
         lr_propacc    TYPE REF TO if_bol_bo_property_access,
         lr_btorder    TYPE REF TO cl_crm_bol_entity,

  TRY.
      lr_bdc = cl_crm_ui_data_context_srv=>get_instance( ).

      CALL METHOD lr_bdc->get_entity_by_path
        EXPORTING
          path                 = '//CURRENTSERVICETICKET'
          iv_suppress_creation = abap_true
        RECEIVING
          value                = lr_propacc.

      lr_btorder ?= lr_propacc.

    CATCH cx_crm_bdc_no_data.
    CATCH cx_crm_bdc_xpath_error.
    CATCH cx_root.
  ENDTRY.

Regards, Chew

0 Kudos

Hi!

Unfortunately your code snip did not help me out, however meanwhile i solved the problem. There is a function module called "CRM_ORDERADM_H_GET_OB" which will get me all the runtime GUIDs and their corresponding Service Ticket Numebers.

Regards

Tu