Skip to Content
0

Report to reconcile Asset Ledger to Subledger

Apr 11 at 09:15 AM

15

avatar image

I have a report to write where I need to reconcile Sub ledger to ledger balances.

The report needs to be based on transaction ABST2 and it needs to be able to show the differences at profit center and GL account level. Currently, the report can only be executed at company code level.

Our current process involves running 3 separate transactions:

  1. ABST2 that shows the differences at company code level
  2. AR01 to identify Asset Ledger balance, and
  3. FAGLb03 to identify subledger balance and manually reconcile balances on Asset Ledger and Subledger.

Has anyone written anything like this before?

This is my SQL query so far but I don't think that the keys between the tables are strong enough.:

SELECT ANEK~BUKRS WERT KOSTL PRCTR ANEK~ANLN1 ANEK~ANLN2 KONTO ANEK~GJAHR ANEK~BUDAT FROM ANEK
JOIN ANLP ON
ANEK~BUKRS = ANLP~BUKRS AND
ANEK~ANLN1 = ANLP~ANLN1 AND
ANEK~ANLN2 = ANLP~ANLN2
JOIN EWUFIAASUM ON
ANEK~BUKRS = EWUFIAASUM~BUKRS AND
ANEK~GJAHR = EWUFIAASUM~GJAHR AND
ANEK~PARGB = EWUFIAASUM~GSBER
INTO CORRESPONDING FIELDS OF TABLE WA
WHERE ANLP~PRCTR IN SO_PRCTR AND
EWUFIAASUM~KONTO IN SO_GLACC AND
ANLP~KOSTL IN SO_KOSTL AND
ANEK~BUDAT IN SO_PDate.

LOOP AT wa.
    CALL FUNCTION 'BAPI_GL_ACC_GETPERIODBALANCES'
      EXPORTING
        companycode                   = wa-bukrs "'1000'
        glacct                        = wa-konto
        fiscalyear                    = wa-gjahr "'2018'
        currencytype                  = '10'
      IMPORTING
        return                        = ret
      TABLES
        account_balances              = bal3.
    IF sy-subrc = 0.
      READ TABLE bal3 with KEY fis_period = '01'.
      IF sy-subrc = 0.
        wa-gl = bal3-balance - bal3-per_sales.
        wa-valuediff = wa-wert - wa-gl .
        MODIFY wa.
      ENDIF.
    ENDIF.
    ENDLOOP.

This is what the report should show at the end of the day:

Profit Center: PRCTR

Asset Number: ANLN1

Sub Asset Number: ANLN2

Sub Ledger Value: ABST2 Calculation

Ledger Value: ABST2 calculation

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Cameron Smith Apr 12 at 07:57 AM
0

How do I combine ABST2, AR01 and FAGLB03 into one report.

I guess that this is what it comes down to.

Any help will be greatly appreciated.

Share
10 |10000 characters needed characters left characters exceeded