cancel
Showing results for 
Search instead for 
Did you mean: 

Add renewal term to existing contract using BAPI?

Former Member
0 Kudos

Hi

I'm trying to add a renewal term to an existing contract using BAPI_RE_CN_CHANGE.

The renewal type must be [Individual Renewal Rule] with a custom specified term name and [Type of Automatic Renewal] must be [One or More Repititions].

When calling the BAPI i get an error: Individual renewal rule does not contain any extension periods.

If i set the Type of Automatic Renewal to 'U' i.e. [Unlimited after This Point], the BAPI successfully creates the Renewal Term.

Please advise where I'm going wrong.

Code snippet:

      gs_contractx-set_all = 'X'.

      gs_renewal_term-TERM_TEXT = '1 x 5 years; 6 months notification'.
      gs_renewal_term-RENEWAL_TYPE = '2'.
      gs_renewal_term-RENEWAL_RULE = '1000'.
      gs_renewal_term-RENEWAL_AUTO_TYPE = ''.

      gs_renewal_termx-set_all = 'X'.

      gs_renewal_rulesc-CHANGE_INDICATOR = 'I'.
      gs_renewal_rulesc-RENEWAL_RULE_TYPE = '0'.
      gs_renewal_rulesc-RENEWAL_RULE_NO = '0001'.
      gs_renewal_rulesc-NUMBER_OF_RENEWALS = '01'.
      gs_renewal_rulesc-RENEW_NUM_YEARS = '05'.
      gs_renewal_rulesc-RENEW_ROUNDING_RULE = '2'.
      gs_renewal_rulesc-NOTIF_NUM_MONTHS = '06'.
      gs_renewal_rulesc-NOTIF_ROUNDING_RULE = '2'.
      APPEND gs_renewal_rulesc to gt_renewal_rulesc.

      CALL FUNCTION 'BAPI_RE_CN_CHANGE'
        EXPORTING
          compcode                    = g_vicncn-bukrs
          contractnumber            = g_vicncn-recnnr
          contract                       = gs_contractc
          contract_x                   = gs_contractx
          TERM_RENEWAL        = gs_renewal_term
          TERM_RENEWAL_X    = gs_renewal_termx
        TABLES
          TERM_RENEWAL_RULE = gt_renewal_rulesc
          return         = gt_bapiret2.

Kind Regards,

Utian G

Message was edited by: Utian Goliath

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Good day,

I managed to resolve the issue myself.

I've passed an incorrect Renewal Rule Type to the BAPI. I used a 0 (zero) instead of the letter 'O'.

After changing that, the BAPI created the Renewal Term including its extension periods successfully.

Regards
Utian Goliath

Answers (0)