Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to get report on asset balances rom view ANLAV

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Sijin_Chandran
Active Contributor
0 Kudos

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 ).

11 REPLIES 11

Sijin_Chandran
Active Contributor
0 Kudos

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 ).

raymond_giuseppi
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos
  • Logical database is easier (just add the logical database to attributes of program, sélect  a selection-screen and use a GET ANLAV. to read the records.
  • JOIN between ANLA and ANLZ should get better performances.

Regards,

Raymond

0 Kudos

Hi Sijin,

I would also need to fetch data from ANLC and ANLB for deprication values.

0 Kudos

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.

0 Kudos

Hi Priyanka ,

LDB ADA is the most efficient solution for you.

0 Kudos

For logical database sample -> See Example for Reporting Events in on line Abap documentation.

Regards,

Raymond

0 Kudos

Hello Sir ,

I have used LDBs like VFV.

But very thanks for this informative link

0 Kudos

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