cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing "Actual Amounts" from previous years

uday_gubbala2
Active Contributor
0 Kudos

Hi Experts,

We had earlier developed a report to produce a list of projects which can be changed from status TECO to CLSD. If the project cannot be closed then the corresponding reason for failure should be displayed.

Now the problem is that there were some direct costs which were booked under certain WBS elements. These elements were created in the previous year & haven't been settled in that year. Our present program isn't able to capture & display these costs in the current year. We have based our logic up on a join of table COBK with tables COEP, PROJ & PRPS. We are referring to the SAP standard TCODE s_alr_87013533 which is able to find the unsettled dollars (Actual amount) even from previous years. Anyone please help advise as to how we can even capture the actual amounts from previous years.

Regards,

Uday

Our inner join statement is as shown below:

SELECT coep~objnr coep~wogbtr coep~megbtr coep~wrttp coep~kstar
         coep~owaer coep~vrgng coep~sgtxt coep~ebeln coep~ebelp
         coep~objnr_n1 coep~belnr coep~gjahr coep~perio
         cobk~blart cobk~refbn cobk~refbk cobk~refgj
    INTO CORRESPONDING FIELDS OF TABLE tb_actual
    FROM coep INNER JOIN cobk ON cobk~kokrs = coep~kokrs AND
                                 cobk~belnr = coep~belnr
              INNER JOIN prps ON coep~objnr = prps~objnr
              INNER JOIN proj ON proj~pspnr = prps~psphi
    WHERE proj~pspnr  = wa_proj-pspnr   "project definition
      AND prps~pspnr  = wa_prps-pspnr   "WBS element
  AND prps~belkz =  c_x             "Account assignment
  AND coep~wogbtr <> 0              "amount
  AND coep~lednr = c_00             "Ledger (needed to hit index)
  AND coep~wrttp IN (c_04, c_11)    "actual value type - real & stat
  AND coep~beknz IN r_beknz.        "D/C Ind <> Settlement

Accepted Solutions (1)

Accepted Solutions (1)

virendra_pal
Active Contributor
0 Kudos

I think your problem is related to settlement

firstly if you make settlement mandatory - possible by changing settlement profile, the system will generate standard SAP error if you try to set CLSD from TECO

secondly, you should use FUL settlement in your settlement rules rather than PER, this would never allow a situation that you have previous year settlement

I think if you get your settlement configuration right, clean up all the existing errors, then you should be OK - no need to modify code.

uday_gubbala2
Active Contributor
0 Kudos

Hi Virendra,

Thanks a lot for following up with the matter. Actually right now the report comes up with a message for such projects as, "Status can be changed from TECO to CLSD." The projects themselves however can't be closed through CJ20N as the system does manage to detect the pending amounts from previous years. So now they just want to try find out & implement the logic by which the report could detect actual amounts (unsettled dollars) from the previous years & display a message like, "Balance of WBS I-000109-2213-03-66-001 is not zero - (Unsettled Dollars)"

Regards,

Uday

virendra_pal
Active Contributor
0 Kudos

use CJI3 report to check which projects are not settled

if they are settled then the total should be zero, if not these are not settled

make sure you you date range as required

uday_gubbala2
Active Contributor
0 Kudos

Hi Virendra,

Thanks once again for your update. I was in quite a fix while going through a few things. Actually my functional consultant gave me a project ID specifying that it has some unsettled dollars from the previous years. I tried running CJI3 with the posting date as: 10/01/2004 - 10/31/2008. It came up with 5 entries & a final sum output as 0. (I tried checking the WOGBTR values which were getting captured in my report program and they were exactly the same 5 values which were being captured by CJI3. But when I run the transaction S_ALR_87013533 (shown to me by my functional guy) for the same project id it comes up with a different output quoting some amount under the Actual amount. Am confused with these 2 deviant results. I have mailed a copy of the snapshots to ur email id. Can you please have a look at it & advise me over these 2 deviant outputs?

Regards,

Uday

virendra_pal
Active Contributor
0 Kudos

the reason for this is the use of the settlement cost element 8xxxxxxxx

in the CJI3 report it takes into account the settlement cost element - whereas in the report your functional guy has suggested the settlement cost element is excluded

uday_gubbala2
Active Contributor
0 Kudos

Hi Virendra,

Am sorry but am not able to understand 1 thing here. My custom reports output is exactly the same as that of CJI3. Neither of them report any unsettled dollars. I only get some unsettled amount displayed when I run the TCODE S_ALR_87013533.

Regards,

Uday

Do you mean to say that the SAP transaction S_ALR_87013533 doesn't take into consideration the settlement cost element 8165000 as a result of which the total actual amount doesn't get equalized to zero?

Edited by: Uday Gubbala on Oct 21, 2008 5:58 PM

virendra_pal
Active Contributor
0 Kudos

based on the data provided -

I-001688

Cost line 7143.28 71710000

Cost line 42874.74 73120000

Cost line 22752.77 73120000

TOTAL COST 72770.79

Settlement line 65627.51 81650000

Settlement line 7143.28 81650000

TOTAL SETL 72770.79

you should be able to set CLSD to this project as there is no unsettled value in the project

CJI3 report confirms that there is no outstanding settlement and hence project can be set to CLSD. This report shows all the line items against project

The report S_ALR_87013533 shows the actual cost incurred in the project, but not settlement. This does not mean that the project is unsettled.

see another report (project cost element report) - that might help you S_ALR_87013542

uday_gubbala2
Active Contributor
0 Kudos

Hi Virendra,

Thanks a lot for your valuable inputs. I did try verify with a project which didn't have any unsettled dollars & which could be closed but S_ALR_87013533 still came up with some values.You were right the program shows the actual cost incurred in the project, but does not consider the settlement values. I am however unable to close this project with CJ20N am mailing you the snapshot of the error message that I get. My functional consultant has been quoting the reason for this failure as due to unsettled dollars from the previous year. Based on your inputs I can now conclude that it wasn't the right reason. Can you please check the snapshot & advise as to what might be the reason for not being able to close this project?

Regards,

Uday

virendra_pal
Active Contributor
0 Kudos

the reason for this is that you are using PS to settle project to final asset and the project profile has an investment profile which is creating AuC (capital project scenario)

basically you need to create a final asset using AS01

then use CJ20N to create a new settlement rule FUL to FXA and enter the new asset number

Now run settlement via CJ88 for the project

Now you will be able close the project

uday_gubbala2
Active Contributor
0 Kudos

Hi Virendra,

Thanks a lot for your valuable inputs. I will speak with my functional guy & confirm the issue. Thanks a lot once again.

Regards,

Uday

Answers (0)