cancel
Showing results for 
Search instead for 
Did you mean: 

custom program to save partners.. not saving Partners.

Former Member
0 Kudos

Saving Partners.

Hi Guys,

I am working on Solution Manager - and I am trying to save Business Partners in Solution Manager.

I am using the function module - CRM_ORDER_MAINTAIN and then CRM_ORDER_SAVE to confirm the changes. This gives no errors - but does not save the Partners.

I also tried the program (se38 program) CRM_ORDER_MAINTAIN but even that is not able to save the partners.

I check CRMD_ORDER - no partners are updated.

As far as I remember, this function module used to work and I was able to save the partners, but after upgrade it stopped saving partners - but I may be wrong over here.

Has anyone seen code to save partners ?? Can you help me with what all parameters I need to pass to the function module to save the partners?

I also tried - BAPI_LEAD_CREATEMULTI, that saves everything except the partners - and this is only for creation - I also need to change. (actually this FM also first creates and then calls - CRM_ORDER_MAINTAIN).

I also tried - CRMXIF_ORDER_SAVE and failed.

Please help.

Navdeep

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

please check function module CRM_DNO_UPDATE_PARTNER for code to save partners with CRM_ORDER_MAINTAIN.

You will have to call CRM_ORDER_SAVE afterwards.

Regards,

Christoph

Former Member
0 Kudos

Hi Christoph,

Thanks for the input.

This function module calls again - CRM_ORDER_MAINAIN and in exactly the same way as I do.

Unfortunately - this fucntion module also did not save the Partner.

Regards,

Navdeep

Former Member
0 Kudos

Hi,

i think you have to call function module CRM_ORDER_SAVE after this.

CRM_ORDER_SAVE only works if an change event has been raised, and i think here could be the problem.

Please try the following:

After your CRM_ORDER_MAINTAIN call the following modules and COMMIT afterwards:


  include: crm_mode_con,
           crm_object_kinds_con,
           crm_events_con,
           crm_object_names_con.

    call function 'CRM_EVENT_PUBLISH_OW'
      exporting
        iv_obj_name = gc_object_name-action
        iv_guid_hi  = lv_guid
        iv_kind_hi  = gc_object_kind-orderadm_h
        iv_event    = gc_event-save.

  call function 'CRM_ORDER_SAVE'
    exporting
      it_objects_to_save   = lt_guids
      iv_no_bdoc_send      = abap_true
    importing
      et_saved_objects     = lt_saved_objects
      et_exception         = lt_exception
      et_objects_not_saved = lt_not_saved
    changing
      cv_log_handle        = l_loghndl
    exceptions
      document_not_saved   = 1
      others               = 2.

COMMIT WORK.

Hope this helps,

Christoph

Former Member
0 Kudos

Hi,

COMMIT WORK ... was needed after save.

The event call... was also not needed...

COMMIT WORK - did the trick...

Thanks man....

Best Regards,

Navdeep

Answers (0)