on 08-30-2012 1:38 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.