on 01-18-2012 12:53 PM
Hello
My user accidentally used transaction type 20A to retire some asset. To make the matter worse, the transactions didn't create a FI document.
Now there is inconsistency between assets and GL account, although the depreciation run seems with no errors.
This inconsistencies display at ABST.
(I found similar question ,with no answer... )
Can anyone help?
Thank you
Tami
Refer to OSS note 1759379 - Error F5A009: Reversal of Retirement in Transaction AB08 - Transaction Type 20A and Create REPORT with CODE below and RUN them in your system.
Hopefully it will resolve the Issue, but NOTE the Transaction wills till appear in AW01N (Can't help).
*&---------------------------------------------------------------------*
*& Report ZFIX_UPDATE_ASSET_AB08
*&
*&---------------------------------------------------------------------*
*& Initial Version : 08/01/2016
*&
*& This Report bascially Deletes the Records posted for an Asset with
*& Transaction Type 20A as per OSS Note: 0001759379
*& NOTE this REPORT should be Executed with CAUTION as it deletes Entry
*& from Standard SAP TABLES ANEP/ANEK/ANEA
*&---------------------------------------------------------------------*
REPORT zfix_update_asset_ab08.
******** START OF DATA DECLARATION ******************
TYPE-POOLS: slis.
TABLES : anep,
anek,
anea.
*-------------------------------------------------------------------*
*SELECTION SCREEN
*-------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER : p_bukrs TYPE anek-bukrs OBLIGATORY,
p_anln1 TYPE anek-anln1 OBLIGATORY,
p_gjahr TYPE anek-gjahr OBLIGATORY,
p_mode AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b1.
*-------------------------------------------------------------------*
*DATA DECLARATIONS
*-------------------------------------------------------------------*
DATA: lt_anep TYPE STANDARD TABLE OF anep,
lt_anek TYPE STANDARD TABLE OF anek,
lt_anea TYPE STANDARD TABLE OF anea,
lw_anea TYPE anea,
lw_anep TYPE anep,
lw_anek TYPE anek,
t_layout TYPE slis_layout_alv,
t_fieldcatelog TYPE slis_t_fieldcat_alv,
t_listheader TYPE slis_t_listheader,
t_events TYPE slis_t_event,
t_sortinfo TYPE slis_t_sortinfo_alv.
*-------------------------------------------------------------------*
*START-OF-SELECTION
*-------------------------------------------------------------------*
START-OF-SELECTION.
REFRESH lt_anep.
CLEAR lw_anep.
*-------------------------------------------------------------------*
* SELECT Asset Line Items
*-------------------------------------------------------------------*
SELECT * FROM anep INTO
TABLE lt_anep WHERE
bukrs EQ p_bukrs AND
anln1 EQ p_anln1 AND
gjahr EQ p_gjahr AND
bwasl EQ '20A'.
IF sy-subrc EQ 0.
IF NOT lt_anep IS INITIAL.
*-------------------------------------------------------------------*
* SELECT Document Header Asset Posting
*-------------------------------------------------------------------*
SELECT * FROM anek INTO
TABLE lt_anek FOR ALL ENTRIES IN lt_anep
WHERE
bukrs EQ lt_anep-bukrs AND
anln1 EQ lt_anep-anln1 AND
anln2 EQ lt_anep-anln2 AND
gjahr EQ lt_anep-gjahr AND
lnran EQ lt_anep-lnran.
*-------------------------------------------------------------------*
* SELECT Asset Line Items for Proportional Values
*-------------------------------------------------------------------*
SELECT * FROM anea INTO
TABLE lt_anea FOR ALL ENTRIES IN lt_anep
WHERE
bukrs EQ lt_anep-bukrs AND
anln1 EQ lt_anep-anln1 AND
anln2 EQ lt_anep-anln2 AND
gjahr EQ lt_anep-gjahr AND
lnran EQ lt_anep-lnran.
ENDIF.
ELSE.
MESSAGE s208(00) WITH text-003.
EXIT.
ENDIF.
IF p_mode NE 'X'.
IF NOT lt_anep IS INITIAL.
*-------------------------------------------------------------------*
* DELETE Asset Line Items
*-------------------------------------------------------------------*
DELETE anep FROM TABLE lt_anep.
ENDIF.
*-------------------------------------------------------------------*
* DELETE Document Header Asset Posting
*-------------------------------------------------------------------*
IF NOT lt_anek IS INITIAL.
DELETE anek FROM TABLE lt_anek.
ENDIF.
*-------------------------------------------------------------------*
* DELETE Asset Line Items for Proportional Values
*-------------------------------------------------------------------*
IF NOT lt_anea IS INITIAL.
DELETE anea FROM TABLE lt_anea.
ENDIF.
*-------------------------------------------------------------------*
* COMMIT WORK TO UPDATE DATABASE Table Entries
*-------------------------------------------------------------------*
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
*-------------------------------------------------------------------*
* SUCESSFULL Update Message to USER on DATABASE update for TABLES.
*-------------------------------------------------------------------*
IF sy-subrc EQ 0 AND
NOT lt_anep IS INITIAL.
MESSAGE s208(00) WITH text-002.
PERFORM build_fieldcatelog.
PERFORM display_gridreport.
ENDIF.
ELSE.
PERFORM build_fieldcatelog.
PERFORM display_gridreport.
ENDIF.
*&---------------------------------------------------------------------*
*& Form display_gridreport
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM display_gridreport.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = 'LT_ANEP'
is_layout = t_layout
it_fieldcat = t_fieldcatelog[]
it_sort = t_sortinfo[]
it_events = t_events[]
TABLES
t_outtab = lt_anep
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "DISPLAY_GRIDREPORT
*&---------------------------------------------------------------------*
*& Form BUILD_FIELDCATELOG
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM build_fieldcatelog.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'LT_ANEP'
i_structure_name = 'ANEP'
i_client_never_display = 'X'
i_inclname = sy-repid
CHANGING
ct_fieldcat = t_fieldcatelog[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
ENDFORM. " BUILD_FIELDCATELOG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Anyhow, you have TIT for TAT solution available with you.
Just reverse that errorised document with AB08.
Cheers,
Srinu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Overview AB08 (before post) seems like it going to post at FI accounting,
This would make the problem worse.
I'm concern about the inconsistency between assets and GL account,
(I didn't succeed repeat the problem at test system. at test system - 20a did post at FI-accounting, and so the reverse document)
Thank you
Tami
Hi,
Practically, if your original document was not posted any accounting document, then when you reverse the same also it will not post any accounting documents.
If you dont want to reverse, then you must do some other transaction, in case if the other workaround also makes you trouble....do you want to be in???
According to me, there is no other solution available for your case.
Regards,
Srinu
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.