cancel
Showing results for 
Search instead for 
Did you mean: 

Mass creation of depreciaton simulation data

Former Member
0 Kudos

Dear SAP gurus,

I really need your help.

Our clients have huge quantity of investment projects and they want to be able to simulate depreciation based on depreciation simulation data prepared separately for each project. The depreciation simulation data may contain a lot of line items per project and manual maintenance (via IM22 for Investment program positions and CJ12 for WBS elements) is not acceptable.

Is there a standard SAP way to perform mass creation of depreciation simulation data?

I have tried with LSMW model but it is not simple master data. I have read many SAP notes, some of them are mentioning OK codes (=I+ for line forward, =I- for line backward; =POSI to enter sequence number). None of them worked. I doubt LSMW model can be used here.


I am thinking of developing new program for direct update of tables ANIA and ANIB.
How do you think, is there another way or this is the only possibility?


Best Regards,
Vladimir Halvadjiev

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I managed to resolve the problem with complicated LSMW model combining three separate recordings + a little ABAP code.

I will explain the case with mass creation of depreciation simulation data on IPP level (via t-code IM22).

First and very important thing - I used OK code UF24 for navigation during the creation of the line items with depreciation simulation data. This OK code actually represents the 'Last page' button from the navigation menu.

* The first recording is for entering only the very first line item with depreciation simulation data on screens 600 and 191. The system defaults 100% distribution for this first line item on the next screen - 310. I deleted it, pressed enter in order the next field for exact amount to become editable and specified the amount. Then went back and saved.

* The second recording is for entering all other line items with depreciation simulation data for the respective Investment program position (IPP) - except the very last line item! This time the depreciation simulation data is entered directly on screen 310 (using the OK code UF24 to reach the first available line). After entering an line item and pressing the button for going back, the system is showing a pop-up screen that not 100% of the assign budget is distributed (this is additional screen and it is not applicable for the last entry. That is why there is a need of separate, third, recording).

* The third recording is only for entering the very last line item again directly on screen 310.

How to combine the three recordings?

T-code: LSMW, the first option 'Maintain Object Attributes', section 'Object Type and Import Method', option 'Batch Input Recording' --> there is a button for multiple selection (it is called 'More recordings'). I specified the three recordings there.

One source structure with really a lot of source fields assigned to it. Some of them are included in all of the recordings so I had to rename them (adding '_02' or '_03' as suffixes).

The structure relations: all recordings are assigned to one structure.

Field Mapping and Conversion Rules --> here is the next tricky part. I set all fields with rule 'Transfer (Move)' + 'Only If Source Field Not Initial'. This is because I am using only one file for upload with a lot of columns in order to provide data for all three recordings simultaneously. Just an example - the first 10 columns are for recording 1, the next 10 columns are for recording 2 and the last 10 columns are for recording 3.

How do I prepare the upload file?

Let's assume I have 10 line items with depreciation simulation data for IPP X.

* I fill in the first line item on the first row in the file with data only in the first 10 columns (I leave the next 20 columns empty).

* The next 8 line items - I fill them on the following rows in the excel file (2nd - 9th rows) with data only in the middle 10 columns (the first 10 columns and the last 10 columns are empty).

* The last line item (10th) - I fill it on the last 10th row with data only in the last 10 columns.

That is why I set all fields to 'Transfer (Move)' + 'Only If Source Field Not Initial'.

The final issue was that when I converted the data from the file (of course, I saved it in text format before uploading it) the LSMW model read 12 rows but 36 entries (because of the 3 recordings) and at the end it displayed errors (even if it created the depreciation simulation data correctly). Why? Because I have empty columns (it means no data for some of the recordings). From my example above: Recording 1 does have data from the file for the first line item entered on the first row, but it does not have data for the other 9 rows. Recording 2 does have data from the file for rows from 2 to 9, but it does not have data for rows 1 and 10. Recording 3 does have data from the file for the last row, but it does not have data for the first 9 rows.

I resolved that last issue by editing the ABAP code for the very first field of each recording in the 'Maintain Field Mapping and Conversion Rules' step.

After choosing the rules 'Transfer (Move)' + 'Only If Source Field Not Initial', the default ABAP code is:

IF NOT IPP_ITEMS-PRNAM IS INITIAL.

  IPP_1-PRNAM = IPP_ITEMS-PRNAM.

endif.

I changed it to:

IF NOT IPP_ITEMS-PRNAM IS INITIAL.

  IPP_1-PRNAM = IPP_ITEMS-PRNAM.

else.

  skip_record.

endif.

So, when the LSMW model sees that there is no data in the first field for one of the recordings, it skips the record and continues with the next recording for the same row from the file (it checks the first field for the next recording which for example is in the 11th columns from the file).

I hope I am not forgetting something, but in general that is how I managed to prepare LSMW model for mass creation of depreciation simulation data.

Best Regards,

Vladimir Halvadjiev

former_member203108
Active Contributor
0 Kudos

Thanks for coming back and posting the solution, it would really help for other forum members.  But, did you try to look for some FM?

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vladimir,

Please check report S_ALR_87012936 - Depreciation Simulation .

Go to Menu Edit- All Selections. Then you can enter Investment Projects in multiple selection.

Try in test system and check if it works.

Also check thread http://scn.sap.com/thread/2138378

Regards

Tushar

Former Member
0 Kudos

Thank you for your reply, Mr. Vhora.

However, it is not answering my question. I know how the depreciation simulation program is working and how to use the mentioned report. I also checked the proposed thread but it is not on the topic.

The depreciation simulation is calculating planned depreciation based on existing assets in the Fixed Asset Register and/or future capitalizations (investment projects included in the Investment program).
The first point is clear - the existing assets are in the register.
The second point is also clear - in order the program to be able to calculate planned depreciation for investment projects, depreciation simulation data (asset class, capitalization date, cost object, distribution amount) should be entered on different levels. Currently, we are working with Investment program positions (IPPs) and WBS elements.


So, the depreciation simulation data on IPP level is entered manually via transaction IM22, tab 'Depn simulation data'. The depreciation simulation data on WBS level is entered manually via transaction CJ12 (there is a separate button for 'Depreciation sim.', it is next to the 'Settlement rule' button).

The depreciation simulation data (for both levels - IPP and WBS) is stored in two tables: ANIA and ANIB.


As the depreciation simulation data per investment project (it does not matter on which level - IPP or WBS) may contain a lot of line items (different combinations between asset class, capitalization date, cost object and distributed amounts), manual maintenance is not acceptable. Furthermore, our clients do not have only one investment project, but many.

Best Regards,
Vladimir Halvadjiev