Ansicht
Dokumentation

RASPEC01 - Redestribution of special assets

RASPEC01 - Redestribution of special assets

rdisp/max_wprun_time - Maximum work process run time   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

Title

Purpose

This program allows write-up or write-down postings to assets (which belong to a special asset) and to special assets. A user exit (function 'REDISTRIBUTE_DEPRECIATION') provides the ability to calculate the posting amounts according to customer needs.

The program passes the following tables to the user exit:

T_ANL

T_SPEC

T_SPEC_CUM

Additional asset data (such as ANLB fields) can be selected from within the user exit.

If the program is run without the 'Test' option a BDC session is created. The BDC session will contain all write-up/write-down documents and can be processed to create the actual postings.

Table details

T_ANL

This table lists all information for the individual assets which belong to a special asset. In particular, this table contains all ANLA, ANLZ and ANLC fields. In addition, for each individual asset the corresponding special asset number is stored in fields ANLN1_ABG and ANLN2_ABG.

Especially important are the following fields:

NAFAG_ABG - ordinary depreciation

SAFAG_ABG - special depreciation

AAFAG_ABG - unplanned depreciation

MAFAG_ABG - transfer of reserves

These fields can be assigned values for the write-up/write-down postings within the user exit. The user exit will then pass the tables back to the calling program where the amounts are read. If these amounts are positive the program will use the write-up transaction type. If these amounts are negative the program will use the write-down transaction type respectively. If the amounts are zero for a particular asset no posting is created for this asset.

T_SPEC_CUM

This table has nearly the same structure as T_ANL, but only contains the special assets' main- and sub-number as well as the accumulated ANLC values for its individual assets. This table is used only to assist the calculations within the user exit. The contents of this table should not be modified as the main program would ignore this information.

Prerequisites

This program assumes that the customer is using the special assets functionality within the FI-AA system (either via direct assignments or via substitution and/or user exit).

Also, the transaction types used must be configured correctly so that postings are made to the corresponding depreciation area.

Output

If the 'List Assets' option is selected in the selection screen of the program, a report with the following detail is output:

  • special asset main- and sub-number
  • individual asset main- and sub-number
  • individual asset description
  • write-up/write-down amounts for:
  • ordinary depreciation

  • special depreciation

  • unplanned depreciation

  • transfer of reserves

Activities

Example

FUNCTION REDISTRIBUTE_DEPRECIATION
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(P_AFABE) LIKE ANLC-AFABE
*" VALUE(P_GJAHR) LIKE ANLC-GJAHR
*" TABLES
*" T_ANL STRUCTURE RASPEC OPTIONAL
*" T_SPEC_CUM STRUCTURE RASPEC OPTIONAL
*" EXCEPTIONS
*" ERROR
*"----------------------------------------------------------------------

DATA: LD_TOTAL LIKE ANLC-KANSW,
LD_AMOUNT LIKE ANLC-KANSW,
LD_SUMME LIKE ANLC-KANSW.

CONSTANTS: CON_X VALUE 'X'.
LOOP AT T_SPEC_CUM.

  CLEAR LD_SUMME. CLEAR LD_TOTAL.
  LD_TOTAL = T_SPEC_CUM-GJE_KUMAFA.
  LOOP AT T_ANL WHERE
    ANLN1_ABG = T_SPEC_CUM-ANLN1 AND
    ANLN2_ABG = T_SPEC_CUM-ANLN2 AND
    SPECIAL_ASSET <> CON_X.
    LD_SUMME = LD_SUMME + T_ANL-GJE_KANSW.
  ENDLOOP.
  LOOP AT T_ANL.
    LD_AMOUNT = ( T_ANL-GJE_KANSW / LD_SUMME ) *
    LD_TOTAL.
    MOVE LD_AMOUNT TO T_ANL-NAFAV_ABG.
    MODIFY T_ANL.
    CLEAR LD_AMOUNT.
  ENDLOOP.
ENDLOOP.
ENDFUNCTION.






Fill RESBD Structure from EBP Component Structure   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 5098 Date: 20240520 Time: 124742     sap01-206 ( 71 ms )