ATP.10_FA.FSPEC.07
Version: 1.0
Last Revision Date:
Print Date:
Wednesday, 11192014
Wednesday, 11192014
Document Statistics
Document
Identification
The following is current information about the document: (Maintain all relevant
sections)
Object ID
Title
Version
Creation Date
Author
Developer
SAP Version
Development Type
Document Status
Complexity
Programming Standards
ATP.10_FA.FSPEC.07
Asset Reversal Upload
1.0
November 19, 2014
Hari Chungath
Gurushantha S Doddamani
SAP ECC 6.0 IS-Retail
Enhancement
Draft
Medium
EAD SAP ABAP Standard and Controls
Revision
History
Sections to
Fill
Version
Author of
revision
1.0
Gurushanta D
Doddamani
Mod
#
Creation
Date
Comments
19/11
Initial version
Sections to Fill
Form
Interface - File
Enhancement
1,2,3 and 10
1,2 3 and 8
1,2,3
Module Pool
Report
Webdynpro ABAP
1,2,3 and 4
1,2,3 and 5
1,2,3 and 12
Design Summary
Describe what type of technical development is planned for this requirement..
The asset mass reversal program functionality with regard to the following two scenarios:
Asset document reversal for documents posted from Project System settlement.
Asset document reversal for documents posted directly to the Fixed Assets module (Non-Project
Systems assets)
Inputs:
The Input Selection screen as below
Selection Field Text
Field Name
Company Code
Asset Number
Asset Sub-No.
Document Number
Fiscal Year
Document Type
Posting Date
Reason for Reversal
Posting Date
Posting Period
Test Run
ANLA-BUKRS
ANLA-ANLN1
ANLA-ANLN2
BKPF-BELNR
ANEP-GJAHR
BKPF-BLART
ANEK-BUDAT
T041C-STGRD
ANEK-BUDAT
ANEK-MONAT
ALLGTEST
Select-Option (S) /
Parameter (P) /
Radio-Button /
Check Box
S
S
S
S
S
S
S
P
P
P
Check box
Single/Ra
nge
Range
Range
Range
Range
Range
Range
Range
Single
Single
Single
Single
Obligator
y
N
N
N
N
N
N
N
N
N
N
N
Default
Value
01
Output:
The output is displayed as ALV as below
Field Description
Company Code
Asset Number
Asset Sub-No.
Accounting Doc. No.
Asset Value Date
WBS Element
Trans. Type
Field Name
ANLA-BUKRS
ANLA-ANLN1
ANLA-ANLN2
BKPF-BELNR
ANEP-BZDAT
ANEK-ZUONR
TABW-BWASL
Format
CHAR
CHAR
CHAR
CHAR
DATS
CHAR
CHAR
5
Text
Amount Posted
Ord. Deprec.
Spec. Deprec.
Interest
Retmt. Rev.
Retmt. Cost
Reason for Reversal
Fiscal Year
Posting Date
Posting Period
ANEK-SGTXT
ANEP-ANBTR
ANEP-NAFAB
ANEP-SAFAB
ANEP-DZINSB
ANEA-ERLBT
ANEA-VERKO_D
T041C-STGRD
ANEP-GJAHR
ANEK-BUDAT
ANEK-MONAT
CHAR
CURR
CURR
CURR
CURR
CURR
CURR
CHAR
NUMC
DATS
NUMC
Comments
Program Type
Online __X___
Batch _____
Transaction :ZAB08
Job Name __N/A_____________
Common Subroutines
A list of common, external routines.
N/A
Type
Description
Transport Request
Inputs / Outputs
A list of required inputs and outputs.
The following fields need to be provided as selection criteria :
Selection Field Text
Field Name
Company Code
Asset Number
Asset Sub-No.
Document Number
Fiscal Year
Document Type
Posting Date
Reason for Reversal
Posting Date
Posting Period
Test Run
ANLA-BUKRS
ANLA-ANLN1
ANLA-ANLN2
BKPF-BELNR
ANEP-GJAHR
BKPF-BLART
ANEK-BUDAT
T041C-STGRD
ANEK-BUDAT
ANEK-MONAT
ALLGTEST
Select-Option (S) /
Parameter (P) /
Radio-Button /
Check Box
S
S
S
S
S
S
S
P
P
P
Check box
Single/Ra
nge
Range
Range
Range
Range
Range
Range
Range
Single
Single
Single
Single
Obligator
y
N
N
N
N
N
N
N
N
N
N
N
Default
Value
01
Field Name
ANLA-BUKRS
ANLA-ANLN1
ANLA-ANLN2
BKPF-BELNR
ANEP-BZDAT
ANEK-ZUONR
TABW-BWASL
ANEK-SGTXT
ANEP-ANBTR
ANEP-NAFAB
ANEP-SAFAB
ANEP-DZINSB
ANEA-ERLBT
ANEA-VERKO_D
T041C-STGRD
ANEP-GJAHR
ANEK-BUDAT
ANEK-MONAT
Format
CHAR
CHAR
CHAR
CHAR
DATS
CHAR
CHAR
CHAR
CURR
CURR
CURR
CURR
CURR
CURR
CHAR
NUMC
DATS
NUMC
N/A
Message Class
Message Type
Message Id
Message Text
Long Text
Detailed Logic
Describe logic through the use of pseudo code, flow charts and supporting text. Include specific error handling.
Use Visio 4.0 for flow charts (double click on any of the flow chart shapes below to open Visio, click outside of the
Visio workspace to switch back to your Word document). Number all Ifs, Whens and condition checks to drive
test scenarios.
AT SELECTION-SCREEN.
Validation of selection screen:
Validate the company code(BUKRS) , Asset subnumber (ANLN2), Document Type (BLART), Reason of
Reversal (STGRD) and Document Number (BELNR) from the respective value table and the input values
in the screen validate subroutine.
Fetch the Data Subroutine:
Select the bukrs anln1 anln2 anlkl ernam erdat felei ktogr etc from the
Asset Master Record Segment (ANLA) table into lt_anla internal table.
Select the bukrs anln1 anln2 gjahr lnran bldat budat monat cpudt cputm usnam tcode sgtxt menge
meins etc from header details from the ANEK table, into gt_anek for all entries of lt_anla table.
Select the bukrs anln1 anln2 gjahr lnran afabe belnr buzei bzdat etc from the Document Header
Asset Posting (ANEP) table into lt_anep internal table of for all entries of gt_anek table.
Loop at Global internal table gt_anek and read lt_anep table into lwa_anep work area with key of
company code and asset number and take all the data into one more internal table lt_anek1.
Select the bukrs belnr gjahr awtyp awkey stgrd from the Accounting Document Header from BKPF
table into lt_bkpf internal table for all entries of lt_anek1.
Select the bukrs anln1 anln2 gjahr lnran afabe erlbt verkofrom the Asset Line Items for
Proportional Values from ANEA table into lt_anea internal table of for all rntries of lt_anep table.
In the Exact Subroutine from the above respective internal table make the proper data from the proper
conditions.
Populate_alv:
In this subroutine loop at lt_anek1 internal table and read the lt_anep, lt_bkpf and lt_anea internal table
into gt_alv internal table to display the ALV.
Display the ALV:
To Display the ALV call the SCREEN 9000.
The build_fieldcatlog subroutine is used to build the field catlog and maintained in the lt_fieldcat internal
table.
9
The layout subroutine is used to create the layout format for the ALV display.
In this screen create a container called ALVGRID and populate the ALV into the GRID by using the
set_table_for_first_display method of the calss alv_grid.
On this ALVGRID the hotspot click event is set using the SET_HANDLER Method , and the ALV table is
refreshed using the refresh_table_display method of alv_grid class.
The ALV table is displayed by the final internal table gt_alv by deleting the duplicate entries.
Select the Assets which we want to reverse it in the foreground and press the MASS_REVERSE button
the n selected assets are taken into the internal table and Baed on the Reference Transaction (anekawtyp)
If Reference Transaction value is AMBU then the BAPI BAPI_ASSET_REVERSAL_POST is called by
passing origindocumentkey and reversaldata in the export parameters and the result is taken in the return
parameter based on the message id of the return parameter the BAPI_TRANSACTION_COMMIT is
called.
If Reference Transaction value is AUAK then the FM K_SETTLEMENT_GROUP_PROCESS is called and
the auak, control, kabrt_object_tables are passed as export parameter and table lt_objnr, lt_wsum and
lt_gsum as table parameter is taken into the respective internal tables.
Based on the lt_gsum internal table the asset is reversed or not confirmed.
After reversing the assets the information is displayed to the user interms of pop up table display using the
FM POPUP_WITH_TABLE_DISPLAY_OK by passing the lt_status internal table as a table parameter.
The user is able to execute the program in the background mode also in that case the all the assets are
reversed and the output is saved in the spool.
10
Screen Description
Screen Layout
Screen print and highlight the different sections of the screen.
Variable
Type
Variable
Length
Screen Label
Description
Screen Attributes
11
Report Description
Credit and Gift card settlement activity report
Report Type
ALV,Classic, etc
NA
Report Medium
Special forms, paper, electronic, etc.
NA
Report Layout
Pictorial view of report.
Field Name
12
Conditions
Report Messages
Message Number
Severity
Description
13
BDC Transaction
Table Name
Table Element
Reference
Update
Delete
14
Database Description
Change Type
New _____
Field Name
Modified _____
Field
Type
Field
Length
Key
Information
Field Description
15
File Description
Modified _____
Field
Type
Field
Length
Key
Information
Field Description
16
Transaction Type
Program & selection screen (Report transaction)
Transaction Program
Transaction Program Name
Transaction Description
Transaction Screen Flow
17
Form Description
Form layout
Form Logic
18
Table Name
Table Description
Change Type
New _____
Field Name
Modified _____
Field
Type
Field
Length
Key
Information
Field Description
19
Model
View
Controller
Layout
20
Roles
Role Name
Role
ID
Works
ets/Fol
ders
Groups
Role Description
Works
et/Fold
er ID
Roles
iViews/Pages
Workset Description
Page
ID
Works
ets
iViews/Pages
Page Description
iView
ID
Pages
Worksets/Rol
es
iView Description
Worksets/Folders
Workset/Folder Name
Pages
Page Name
iViews
iView Name
21
Parameter Name
Parameter Value
Param1
Param2
Value 1
Value 2
Parameter Name
Parameter Value
Param1
Param2
Value 1
Value 2
System Objects
22