cancel
Showing results for 
Search instead for 
Did you mean: 

Update End Date of ISUCONTRACT

0 Kudos

Hi Gurus,

I want to update CONTEND date in CRMV_ISU_INDEX_H for some ISUCONTRACTs, but it is not updating the date. Below is the code I have used. Kindly help with your inputs. GUIDs are passed correctly.

CALL METHOD cl_crm_isu_order_change=>set_date

       EXPORTING

         iv_guid        = wa_cont-guid

         iv_date        = wa_cont-contstart

         iv_appt_type   = 'ISURQCONTEND'

       EXCEPTIONS

         error_occurred = 1

         OTHERS         = 2.

     IF sy-subrc = 0.

       CALL METHOD cl_crm_isu_order_change=>set_date

         EXPORTING

           iv_guid        = wa_cont-guid

           iv_date        = wa_cont-contstart

           iv_appt_type   = 'CONTEND'

         EXCEPTIONS

           error_occurred = 1

           OTHERS         = 2.

       IF sy-subrc = 0.

         CALL METHOD cl_crm_isu_order_change=>cancel

           EXPORTING

             iv_guid        = wa_cont-guid

             iv_canc_proc   = 'ISUC'

             iv_canc_party  = 'ISUC'

             iv_canc_reason = 'ISUC'.

         INSERT wa_cont-header INTO TABLE lt_final.

         CALL FUNCTION 'CRM_ORDER_SAVE'

           EXPORTING

             it_objects_to_save = lt_final

           IMPORTING

             et_saved_objects   = lt_saved_objects

             et_exception       = i_exception

           EXCEPTIONS

             document_not_saved = 1

             OTHERS             = 2.

         IF sy-subrc = 0 AND lt_saved_objects IS NOT INITIAL.

           CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

             EXPORTING

               wait   = 'X'.


Regards-

Chirag Keswani

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

  Kindly explain the use of cl_crm_isu_order_change=>cancel method within sy-subrc = '0' . Is it required ? Are you trying to achieve a reverse move in scenario here?