Skip to Content

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

Lease-in contract periodic posting errors

Dear All,

I have created a commercial lease in contract, with an object building and after all inputs when i execute periodic posting there are errors of FI CO anf FM.

If i enter expense GL..error is cost center is mandatory for GL...While i hae no input field fo cost centre

if i enter prepaid rent GL....error is fund centre not entered/ derived..

Kindly let me know configuration settings. Also i want simple entry

Debit....rent exp 

cr. ..vendors payable

or any other entry for accrued rent.

plz guide.

BR

Asif Shahzad

Tags:
Former Member
Former Member replied

Yes the adding is only the groundwork. The rest happens in BADI. You have to implement BADI BADI_RE_RA_CA. In Method 'BEFORE_POST' you got your table CT_ITEM with all positions of the document that has to be posted. There you have to fill for every GL position the order and cost center from your contract. You can get them with function 'API_RE_CN_GET_DETAIL'.

E.g. like:

LOOP AT ct_item ASSIGNING <ls_item>
     WHERE objnr(2) EQ 'IM' 
       AND   acctype  EQ 'S'.


       CALL FUNCTION 'API_RE_CN_GET_DETAIL'
         EXPORTING
           id_objnr      = <ls_item>-partnerobjnr
         IMPORTING
           et_object_rel = lt_object_rel
         EXCEPTIONS
           error         = 1
           OTHERS        = 2.


 

       LOOP AT lt_object_rel INTO ls_object_rel
         WHERE objtypecn = 'OR'

               OR objtypecn = 'KS'.
    

     IF  ls_object_rel-objtypecn = 'OR'.

               CALL FUNCTION 'CONVERSION_EXIT_AUFNR_INPUT'
                EXPORTING
                  input  = ls_object_rel-objidcn
                IMPORTING
                  output = <ls_item>-orderid.

          ELSEIF ls_object_rel-objtypecn = 'KS'.

              CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                   EXPORTING
                     input  = ls_object_rel-objnrcn+12(10)
                   IMPORTING
                    output = <ls_item>-costcenter.


          ENDIF.

       ENDLOOP.

ENDLOOP.

0 View this answer in context

Helpful Answer

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