cancel
Showing results for 
Search instead for 
Did you mean: 

Creating RE Contract with Adjustment Rule BAPI_RE_CN_CREATE

juancarlos_dasilva
Participant
0 Kudos

I'm trying to create a contract with BAPI_RE_CN_CREATE.

I'm passing the parameter TERM_ADJUSTMENT only with the field ELEMENTARY_ADJ_RULE.

I'm getting error RECABC 010 saying that the adjustment rule does not exist, but it does on the table TIVAJRULE.

Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

juancarlos_dasilva
Participant
0 Kudos

I already found a solution to my problem.

I added the adjustment rule to a contract on transaction RECN and then execute BAPI_RE_CN_GET_DETAIL for that contract and I was able to see how to inform the adjustment to BAPI_RE_CN_CREATE.

Answers (1)

Answers (1)

touzik_itc
Active Participant
0 Kudos

In the method CL_REAJC_RULE=>READ_BUFFER_INTO_HL the message e010(recabc) is created if some adjustment rule ADJMRULE does not exist.

SELECT SINGLE *
      INTO     CORRESPONDING FIELDS OF ms_buffer_hl
      FROM     tivajrule
      WHERE    ( adjmrule = id_adjmrule )
        .
    IF sy-subrc = 0.
"...	
      RETURN.
    ENDIF.
" ...
  MESSAGE e010(recabc)
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
          RAISING not_found.

It corresponds to BAPI_RE_TERM_AJ_DAT-ADJUSTMENT_RULE, not to BAPI_RE_TERM_AJ_DAT-ELEMENTARY_ADJ_RULE.