Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CRM_ORDER_MAINTAIN causing dump in AFTER_CHANGE of crm_order_status badi

Hi,

Could any help in this issue.I am using Below Code to update Date of Quote

  ls_input_field-ref_guid = is_status_wrk-guid.
         ls_input_field-objectname = 'APPOINTMENT'
         ls_input_field-ref_kind = 'A'
         ls_input_field-ref_handle = '0000000000'.
         ls_input_field-logical_key =  ZQUSA0 .

         ls_input_field_names-fieldname = TIMESTAMP_TO
         INSERT ls_input_field_names INTO TABLE lt_input_field_names.

         ls_input_field_names-fieldname = TIMESTAMP_FROM.
         INSERT ls_input_field_names INTO TABLE lt_input_field_names.

         ls_input_field-field_names = lt_input_field_names.
         APPEND ls_input_field TO lt_input_field.

         ls_appointment-mode = B.
         ls_appointment-ref_guid = is_status_wrk-guid .
         ls_appointment-ref_handle ='0000000000'
         ls_appointment-ref_kind = A
         ls_appointment-timestamp_to = lv_finish_quote. .
         ls_appointment-timestamp_from = lv_finish_quote.

         ls_appointment-appt_type = ZQUSA0 .
         APPEND ls_appointment  TO lt_appointment.
         ls_orderadm_h1-guid = is_status_wrk-guid.
         ls_orderadm_h1-handle = lc_handle.
         APPEND ls_orderadm_h1 TO lt_orderadm_h1.


         CALL FUNCTION 'CRM_ORDER_MAINTAIN'
           EXPORTING
             it_appointment    = lt_appointment
           CHANGING
             ct_orderadm_h     = lt_orderadm_h1
             ct_input_fields   = lt_input_field
           EXCEPTIONS
             error_occurred    = 1
             document_locked   = 2
             no_change_allowed = 3
             no_authority      = 4
             OTHERS            = 5.


Thnaks,

Anil

Tags:
Former Member
replied

Hi Anil,

You can try with FM 'CRM_APPT_MAINTAIN_MULTI_OW'. Check the link I've provided you earlier.

Kind regards,

Garcia

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question