Skip to Content
author's profile photo Former Member
Former Member

Actual cost and Planed cost based on wbs project.

Hello Friends,

could you please provide me logic for actual cost and planned cost based on project and I have tried rpsco,coep tables but no use.

Thanks in adv,

Moderator Message: Please search in SCN before posting, this question has been asked and answered many times already

Message was edited by: Kesavadas Thekkillath

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 14, 2016 at 05:46 AM

    i sainath,

    i don't know about ,based on project ,

    but i can help u for actual cost and planned cost based on WBS...

    Add a comment
    10|10000 characters needed characters exceeded

    • select * from RPSCO by passing objnr from prps ...

      *to get actual cost *********************************************

      loop at it_rpsco2 into wa_rpsco2 WHERE wrttp eq '04'.               "here wlp01 to wlp12 is from month april to march     (to get actual)
      lv_act = lv_act + wa_rpsco2-WLP01 + wa_rpsco2-WLP02 + wa_rpsco2-WLP03 + wa_rpsco2-WLP04 + wa_rpsco2-WLP05 +
      wa_rpsco2-WLP06 + wa_rpsco2-WLP07 +wa_rpsco2-WLP08 + wa_rpsco2-WLP09 + wa_rpsco2-WLP10 +
      wa_rpsco2-WLP11 + wa_rpsco2-WLP12 + wa_rpsco2-WLP13 + wa_rpsco2-WLP14 +
      wa_rpsco2-WLP15 + wa_rpsco2-WLP16 .


      *to get plan *******************************

      if it_prps[] is NOT INITIAL.

      select * FROM rpsco
      INTO TABLE it_rpsco
      FOR ALL ENTRIES IN it_prps
      WHERE objnr eq it_prps-objnr.

      select * FROM afvc
      into TABLE it_afvc
      FOR ALL ENTRIES IN it_prps
      WHERE projn eq it_prps-pspnr.


      if it_afvc[] is NOT INITIAL.

      select * FROM rpsco
      into TABLE it_rpsco_plan1
      FOR ALL ENTRIES IN it_afvc
      WHERE objnr eq it_afvc-objnr
      and wrttp eq '01'. "wrrtp = '01' for plan


      sort it_afvc by objnr.

      sort it_rpsco_plan1 by objnr.

      sort it_prps by pspnr. "very imp

      loop at it_prps into wa_prps.

      at new pspnr.

      loop at it_afvc into wa_afvc WHERE projn eq wa_prps-pspnr.

      loop at it_rpsco_plan1 into wa_rpsco_plan1 WHERE objnr eq wa_afvc-objnr.

      APPEND wa_rpsco_plan1 to it_rpsco_plan2.




      loop at it_rpsco_plan2 into wa_rpsco_plan2.

      lv_plan = lv_plan + wa_rpsco_plan2-WLP01 + wa_rpsco_plan2-WLP02 + wa_rpsco_plan2-WLP03 + wa_rpsco_plan2-WLP04 + wa_rpsco_plan2-WLP05 + wa_rpsco_plan2-WLP06 + wa_rpsco_plan2-WLP07 +
      wa_rpsco_plan2-WLP08 + wa_rpsco_plan2-WLP09 + wa_rpsco_plan2-WLP10 + wa_rpsco_plan2-WLP11 + wa_rpsco_plan2-WLP12 + wa_rpsco_plan2-WLP13 + wa_rpsco_plan2-WLP14 +
      wa_rpsco_plan2-WLP15 + wa_rpsco_plan2-WLP16 .


      wa_prps-plan = lv_plan.

      MODIFY it_prps FROM wa_prps TRANSPORTING plan.

      REFRESH : it_rpsco_plan2.

      clear : lv_plan,wa_afvc, wa_rpsco_plan1.



      i have checked it, its working fine for me , any doubts get back to me...


      vinay reddy

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.