01-03-2013 6:43 AM
Hi,
We are to create a report for Asset Balances using the same input as that of S_ALR_87011964 tcode but the output requires more fields.
The table ANLA does not have business area, cost center, etc but are found in the view ANLAV.
Based on the user input of the selections provided, we need to filter n fetch data.
How do we fetch data from a view or is there another alternative to join tables to obtain this view?
Please do not mind as I am relatively new to abap programming.
Regards,
Priyanka
01-03-2013 7:04 AM
HI Priyanka ,
You can use table ANLZ to link between Asset number and Cost Centre.
And there may be standard FI reports for Cost Centre based Asset Balances report (S_ALR_87011966 ).
01-03-2013 7:04 AM
HI Priyanka ,
You can use table ANLZ to link between Asset number and Cost Centre.
And there may be standard FI reports for Cost Centre based Asset Balances report (S_ALR_87011966 ).
01-03-2013 7:18 AM
ANLAV is not a view but a structure. This structure is used in logical datbase ADA (transaction SE36), so either
- use logical database ADA in your report
- Analyze logical database ADA (*) and use same logic with performance improvements of course
Regards,
Raymond
(*) Look for "put anlav" giving anlz and other tables in code before this statement.
01-03-2013 10:03 AM
Hi,
Thanks. I found most of the selection fields in ANLZ.
Would it be better to use selection query with joins or would it be better to get it from the logical database? Can you please provide a sample code for this?
Regards,
Priyanka
01-03-2013 10:08 AM
Hi Priyanka ,
If you just need data from ANLA and ANLZ then I think SELECTION query with JOINS would do better.
Logical database is a better option if you want to access data form all Asset related tables.
01-03-2013 10:13 AM
Regards,
Raymond
01-03-2013 10:15 AM
Hi Sijin,
I would also need to fetch data from ANLC and ANLB for deprication values.
01-03-2013 10:20 AM
Agreed Sir ,
And I guess She want to access almost all ASSET related tables as well.
So LDB will do better and will also provide a Standard Selection screen also.
01-03-2013 10:24 AM
01-03-2013 10:28 AM
For logical database sample -> See Example for Reporting Events in on line Abap documentation.
Regards,
Raymond
01-03-2013 10:34 AM
Hello Sir ,
I have used LDBs like VFV.
But very thanks for this informative link
05-15-2013 10:49 AM
Hi All,
Thank you for the suggestions. I was not able to implement ldb since there is hardly any data in test server and we cannot create xrfcs for programs using ldbs. Thus have created a program with select queries. Once we get the ANLC records, all the calculated fields of ANLCV are obtained by the function module 'FI_AA_VALUES_CALCULATE'. The critical part here was to obtain these calulated values to be displayed in the report.
Also, would this be a better approach compared to the use of LDBs in terms of performance?
I also need to fetch the Remaining useful life years and periods which is visible in the parameters tab of asset values for AS03. From where do I obtain these values?
I have attached my program, requesting you to please provide your suggestions.
Regards,
Priyanka