Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Fill CRMD_CUSTOMER_H with customer field from Incident Management (SolMan)

$
0
0

Hello,

I have an issue:

Customer is working with Incident Management (Solution Manager), and they have created custom field ZZFLD000003 to save the additional time for incident solving.

Please see attached pictures.

They have explained me, that they need to save values from ZZFLD000003 to CRMD_CUSTOMER_H table, but values are not moved to database table.

 

For solution they created custom FM zai_crm_im_incident_create_rfc, the copy of standard and they need to extend it to solve issue above.

 

I am really beginner in ABAP, can you please help me? Source code for your info is below.

 

Many thans in advance!

Dimitrij

 

 

 

 

function zai_crm_im_incident_create_rfc.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  IMPORTING

*"    VALUE(IV_PROC_TYPE) TYPE  CRMT_PROCESS_TYPE OPTIONAL

*"    VALUE(IV_SHORT_TEXT) TYPE  CRMT_PROCESS_DESCRIPTION

*"    VALUE(IV_PRIORITY) TYPE  CRMT_PRIORITY

*"    VALUE(IV_CATEGORY) TYPE  CRMT_ACTIVITY_CATEGORY

*"    VALUE(IV_SUBJECT_PROFILE) TYPE  CRMT_SUBJECT_PROFILE

*"    VALUE(IV_CATALOG) TYPE  CRMT_SRV_SUBJECT_EXT

*"    VALUE(IV_PRODUCT_ID) TYPE  COMT_PRODUCT_ID OPTIONAL

*"    VALUE(IV_IBASE) TYPE  IB_IBASE OPTIONAL

*"    VALUE(IV_IBASE_INSTANCE) TYPE  IB_INSTANCE OPTIONAL

*"    VALUE(IT_PARTNERS) TYPE  CRMT_PARTNER_COMT OPTIONAL

*"    VALUE(IT_TEXTS) TYPE  CRMT_TEXT_COMT OPTIONAL

*"    VALUE(IV_SAP_DATA) TYPE  AIC_S_SAP_ATTR

*"    VALUE(IV_BPM_INFO) TYPE  AIC_S_BPM

*"    VALUE(IT_APPX_HEADER) TYPE  ZSML_APPX_HEADER

*"    VALUE(IT_APPX_DATA) TYPE  BCSY_TEXT

*"    VALUE(IT_APPX_DATA_BIN) TYPE  SOLIX_TAB

*"    VALUE(IT_SAP_NOTES) TYPE  AIC_T_SAP_NOTES_T

*"    VALUE(IV_EXEC_BADI) TYPE  FLAG DEFAULT 'X'

*"    VALUE(IV_UNLOCK) TYPE  CRMT_BOOLEAN DEFAULT SPACE

*"    VALUE(IV_PERTNERS_RFC) TYPE  ZSML_PARTNERS_CRM OPTIONAL

*"  EXPORTING

*"    VALUE(ET_MSG) TYPE  /TMWFLOW/MO_TT_MSG

*"    VALUE(ES_ERROR_OCCURRED) TYPE  FLAG

*"    VALUE(ES_ID_CREATED) TYPE  CRMT_RETURN_OBJECTS_STRUC

*"----------------------------------------------------------------------

  data : ls_partner type zsms_partners_crm,

        ls_partner_in type crmt_partner_com.

  if iv_pertners_rfc[] is not initial .

    loop at iv_pertners_rfc into ls_partner.

      clear ls_partner_in.

      ls_partner_in-ref_guid = ls_partner-ref_guid.

      ls_partner_in-partner_fct = ls_partner-partner_fct.

      ls_partner_in-partner_no  = ls_partner-partner_no.

      ls_partner_in-no_type    = ls_partner-no_type.

      append ls_partner_in to it_partners.

    endloop.

  endif.

  call function 'AI_CRM_IM_INCIDENT_CREATE'

    exporting

      iv_proc_type      = iv_proc_type

      iv_short_text      = iv_short_text

      iv_priority        = iv_priority

      iv_category        = iv_category

      iv_subject_profile = iv_subject_profile

      iv_catalog        = iv_catalog

      iv_product_id      = iv_product_id

      iv_ibase          = iv_ibase

      iv_ibase_instance  = iv_ibase_instance

      it_partners        = it_partners

      it_texts          = it_texts

      iv_sap_data        = iv_sap_data

      iv_bpm_info        = iv_bpm_info

      it_appx_header    = it_appx_header

      it_appx_data      = it_appx_data

      it_appx_data_bin  = it_appx_data_bin

      it_sap_notes      = it_sap_notes

      iv_exec_badi      = iv_exec_badi

      iv_unlock          = iv_unlock

    importing

      et_msg            = et_msg

      es_error_occurred  = es_error_occurred

      es_id_created      = es_id_created.

 

 

endfunction.


Viewing all articles
Browse latest Browse all 8332

Trending Articles