Revenue recognition wrt project system

Hello friends,
We have a scenario like:
Total cost incurred on a project100(PWIP)
Billing to the customer is 200
Here my client says revenue is only 100 not 200 as he incurred cost 100.
What is the configuration reequired to show the revenue as 100.
How do we recognise the actual revenue on on Sales revenue A/c.
Regards,
SK

Hi,
You can find the info here:
http://help.sap.com/saphelp_erp60_sp/helpdata/en/32/b447e9a84011d1a5080000e839d0e1/frameset.htm
Regards,
Eli

Similar Messages

  • Revenue Recognition in Project System

    Hello All,
    At my current client, they are using the Project System (i.e. WBS) only for Cost and Revenue collection. POC,RA,Milestone billing,Network, Activities are out of scope. Keeping the above thing in mind, I need to know how I do the Revenue recognition thru WBS.
    Mu understanding is that If I assign a WBS element on a Sales Order line item, as an account assignment it should collect the Revenue. The only requiremnt should be that WBS should be a billing element and Cost/Revenue profile should carry SD relevant settings. Once the billing is done and invoicing is done, the Revenue should appear against the WBS on running the report S_ALR_87013563/64/65/66.
    Please let me know if this will work or do I need to do some more configuration from PS perspective.
    Thanks
    Sarang

    Hi Sarang,
    1. Mark WBS as billing element.
    2. Assign the sales order line item to the WBS in point 1 or any WBS below that in the hierarchy.
    3. Create a billing plan for the sales order line item.
    4. The billing plan amount would appear as planned revenue against the WBS element (provided no credit hold useVKM3 to release).
    5. Once the line item has been billed ie. Billing document has been created using VF01 or VF04, the Actual revenue would appear against the WBS element.
    In terms of Config:
    Creat a planning profile that allows Automatic Revenue planning form Sales Order (tcode: OPSB)
    Ensure that the planning profile is attached to your project profile (Controlling tab) (tcode:OPSA).
    Please let me know if this helps.
    jibat
    Edited by: Jibat Sankar De Sarkar on Jan 21, 2009 2:49 PM

  • Revenue Recognition in projects

    I have the following requirement:
    1 Scenario is MTO.
    2 Once the order is complete, the stock is shipped to the customer site. At this point no COGS should be recognised and it should remain a stock.
    3 Once the stock is shipped to the customer site, customer will invoice but it will not hit the revenue account, rathet it should hit accrued revenue.
    4 Once the installation is complete, customer will recognize the COGS and the Revenue in my books.
    Appreciate if you any one could throw light on how to deal with such scenario.

    Hello,
    You have to use RA for this. There are 7 standard SAP methods of RA calculation.
    In your case, you need to choose revenue realization method E for calculating RA in OKG3.
    Define status based valuation methods:
    1. Status REL, calculate WIP, no COS, no REV
    2. Status DLV, calculate WIP, no COS, Revenue surplus = Invoiced revenue
    3. Status based on Installation/commisioning, make WIP=0, create COS, Create Revenue= billed amount
    For the help on customizing RA, pl go to help.sap.com.
    Thanks,
    Sourabh

  • Revenue Recognition calcolation...

    I have a problem with periodic task "Revenue Recognition". When I launch the execution, for example, for the month of September, the system does not calculate the schare of accounting of revenue but it relize all amount of revenue. I want to understand why the system does not execute the right calculation.
    Please can you explain me this situation?
    Thanks

    Hi Andrea,
    I believe you are referring to accrual method "percentage of completion" calculation process
    Lets take for instance Sales Order % POC calculation.
    Calculated POC = ( Actual Cost / Estimated Cost ) * 100 %
    For Item 123-10 , Calculated POC = ( 14277 / 8550 ) *
    100 % = 166.98 %                                                         
    For Item 123-20 , Calculated POC = ( 0 / 8550 ) * 100 % = 0 %
    ================
    Also refer to
    1.Revenue Recognition for Project Sales - help document
    2.Revenue Recognition for Customer Contracts - help document this may help.
    Thanks
    Lokesh Sharma

  • Multiple Revenue Recognition Methods on a Project(Task Level)

    We have projects where certain portion of revenue is recognized based on events(ex: equipment shipment) and certain portion is recognized as cost is incurred(Percentage of Completion).
    In Oracle Projects we can have only one Distribution rule for Revenue per project and doesn't allow to have different Revenue distribution rule at the task level.
    Business case: Project is for Equipment and Additional Service is purchased, separate tasks are created for Equipment(Task#10) and Service(Task#20).
    Billing is based on Events.
    Equipment(task#10) revenue is recognized based on order line shipment(event created),
    revenue for Service(task#20) is recognized as Cost is incurred to perform the Service, based on POC calculation.
    Following is what we tried as Proof Of Concept:
    Funding is at Task Level (set at Project Type), Baseline Funding without Budget is enabled(i.e Revenue budgets are created when funding is baselined)
    Billing extension Cost-to-Cost Revenue is assigned on project type, Forecast Cost Budget is used in calculations
    Set the distribution rule on project to COST/EVENT
    On tasks for Equipment(Task 10), we entered $0 Forecast cost budget
    On tasks for Service(Task 20) we entered a $$ Amount(non zero) for Forecast Cost budgets.
    Task 10( Equipment - Event based revenue), $0 Cost budget
    Create Costs on task 10, Distribute, Account, run the processes to generate revenue
    Create a manual revenue event for equipment shipment
    Revenue events from Billing extension are not generated, since there is no cost budget, Revenue is generated only for the manual event we created - This works as expected.
    Task 20(Service - POC based revenue), Cost budget is $10000 (for ex:)
    Create Costs on task 20, Distribute, Account, run the processes to generate revenue
    Automatic Revenue events from Billing extension(Cost-to-Cost Revenue) are generated, since there is cost budget, Revenue is generated based on POC calculation.
    Questions:
    With the assumption that we will not maintain forecast cost budgets for equipment tasks and use the standard Cost-to-Cost Revenue extension.
    We would like to know what is the impact of the above solution option on standard Project Billing functionality and any others.
    Any other workarounds to achieve what we are looking for(i.e multiple revenue recognition methods on a project)
    How others achieved similar business requirement with Oracle Projects(At present we are creating a 2nd project for Service component) and it has it's cons(consolidated billing etc, since we will be funding 2 projects)
    Harish

    Dear Harish,
    I am not sure i have a perfect solution but you can try this.
    Set Billing extension to Cost/Event (Percent complete revenue) this will be used for all the scenarios where revenue should be recognised by the system like Ex: Task20
    Use Pre-Approved batches for rest of transactions where the cost directly effects the Project.
    Regards
    Shaan

  • Revenue Recognition Process in Oracle Projects

    I am new to Oracle Projects and needs to understand the Revenue Recognition process.
    User has created one Contract under which he has Intercompany Billing, Costing and Elimination Projects. He booked the cost under the Costing project and then ran a custom elimination program to eliminate the intercompany cost. Now he is going to the billing project and running the 'Generate Draft Revenue' program however nothing is getting generated. He wants to know why revenue is not getting recoginised.
    Is it the correct way of recognizing the revenue. The Distribution rule being used is Event/Event however no event has got created in the billing project to recognize the revenue.
    Please suggest.

    Hi ,
    The subcontracting process can be exceuted in the following way..
    The modules involved will be PA, PO, AP..
    This can be handle with the P2P cycle..
    Raise a servie PO with the project information in the PO distributions for the service that needs to be subcotracted..
    specify the matchig option in the PO Shipments
    Enter a receipt (Optional)
    Enter a AP invoice and match it with PO or receipt as per the requirement and then run PRC: Interface supplier costs..
    this will post the expenditure in the Projects.
    In addition to the above i fu have complex PO (with helding some portion of the order amount as retention, advace payment to be provded)
    this can be handled through creating the PO through selfsevice PO which accomodates this functionality.l
    Thanks
    Vijay.

  • Revenue recognition for Fixed price project

    Dear Friends,
    We are facing an issue with revenue recognition. This is with regard to fixed price project(Item catagory: FPR) wherein process follows with Sales order-->Delivery-->PGI--->Revenue recognition(VF44). Revenue recognition is carried out with reference to the delivery document.
    After completing revenue recognition w.r.t the delivery document, still document is appearing in VF44 for revenue recognition. My understanding is it is not supposed to be appeared in VF44. One more thing is in VF44 "Follow On" document is appearing as Sales order number.
    please suggest how to fix this issue.
    with regards,
    S Dayananda Murthy

    Dear Dayananda
    I think if you see Document number in VF44 It means That document is successfully Posted

  • Integration revenues and earnings in project system

    Hi,
    can anybody send me documentation about the integration between SD and PS?
    thanks
    my email is [email protected]

    Hi David,
    Project System(PS) works for any project e.g construction, operation or any large projects where project management tools are required. it integrates all modules may be like MM for vendor process or for RFQ etc or say may be SD for Resource related quotation with the help of DIP profile or Milestone process etc. IT is largely used in construction projects. IT helps in controlling the whole of project from one single screen and it works with 3 elements WBS element ( work break down structure), Network and Activity.
    Please go throgh this Please check this links perhaps they may help.
    http://help.sap.com/bp_imcv1500/IMC_US/HTML/preconfigured_scenarios.htm
    ETO:
    http://help.sap.com/bp_imcv1500/IMC_DE/HTML/E83_EN_DE.htm
    http://help.sap.com/bp_bblibrary/500/HTML/E46_EN_DE.htm
    MTO:
    http://help.sap.com/bp_bblibrary/500/HTML/V66_BB_EN_US.htm
    http://help.sap.com/bp_imcv1500/IMC_DE/HTML/E70_MTOQuotProc_EN_DE.htm
    PS - SD integration are on
    1.Billing pan, at each WBS element, network and Activity level.
    2. DIP profile which is assigend to item category. DIP for resource related quotation works only with ECP ( easy cost planning).
    3.sales pricing - generally, there r 2 types of sales pricing in PS . lumpsum contract and unit rate contract.
    4. BOS - bill of Services. which has to be activated. It is industry specific solution. If BOS is activated you also have integration for vendor RFQ and Analysis.
    5. resource related Billing
    The specified item was not found.
    http://help.sap.com/saphelp_46c/helpdata/en/aa/96853478616434e10000009b38f83b/frameset.htm
    Following is the SD & PS integration scenarios where milestone billing & Periodic billing plays the implortant role for these integration:
    Milestone billing is typically used for billing projects, such as plant engineering and
    construction projects. Such projects often include a series of milestones that mark the
    completion of different stages of the work. In the SAP R/3 System, milestones are defined
    in a network along with planned and actual dates for the completion of work. The milestones
    are also assigned to the billing dates in the billing plan. The connection between the project and the sales document item is made in the individual
    schedule lines of the item. Each schedule item can be assigned to a network in a project.
    PS-SD Integration as below :
    A)Billing plan, at each WBS element, network and Activity level.
    B)DIP profile which is assigend to item category. DIP for resource related quotation works only with ECP ( easy cost planning).
    C)sales pricing - generally, there r 2 types of sales pricing in PS . lumpsum contract and unit rate contract.
    D)BOS - bill of Services. which has to be activated. It is industry specific solution. If BOS is activated you also have integration for vendor RFQ and Analysis.
    Reward points if find useful..
    Regards..
    Praveen Kumar.D

  • Problem in project system report ZPS_PROJSUMMARY

    i am working with a report ZPS_PROJSUMMARY which extracts all project summary report.now problem is it is extracting las financila years (2006 ) closed WBS element also with this years WBS elements. this problem happening in production only. this is not coming in pre production.in pre production it is deleting all the previous years WBS using this subroutine perform process_delete_child using it_report-pspnr which is based on condition  if l_status_fyear lt s_fyear-low.  
    i am giving the full code below:-
    report zps_projsummary line-size 623
                      line-count 65
                      no standard page heading
                      message-id zfiwip.
    Report Name: ZPS_PROJSUMMARY
    Author:      Rey Salvador  (for NDC)
    Date:        14.09.2001
    Purpose:     Project Summary Report (with Commitments)
    Modifications Log
    Mod Id   Author      Date      References  Purpose
    M001     R.Salvador  19.10.01  THOR 2845   Add YTD Rev.Recognised
    M002     R.Salvador  19.11.01  THOR 2978   Fix YTD Rev.Rec. Level 1
    M003     R.Salvador  19.11.01  THOR 3050   Fix YTD Rev.Rec. Level 1
    M004     R.Salvador  08.03.02  THOR 3222   Fix Include Closed WBS
    M005     R.Salvador  17.05.02  THOR 3342   Fix issue with Profile
    M006     C.Kontkanen 22.05.02  LOB         Add ProjManager sel
    M007     R.Salvador  19.06.02  LOB         Incl. WIP/COGS Adjustments
    M008     R.Salvador  26.07.02  THOR xxxx   Add ProjOfficer
    M009     R.Salvador  06.08.02  THOR 3508   Revenue Recognition Changes
    M010     R.Salvador  29.11.02  THOR 3704   New Billing Reports
    M011     R.Salvador  17.12.02  THOR 3646   Fix problem with statuses
    M012     R.Salvador  20.01.03  THOR 3930   Add CP/SP/WO number
    M013     R.Salvador  07.03.03  THOR 3953   Incorrect Status
    M014     R.Salvador  15.04.03  THOR 4056   Fix Level 1 Calculation
    M015     R.Salvador  01.05.03  THOR 4070   Fix Level 1 Calculation
    M016     R.Salvador  17.06.03  THOR 4125   Fix Level 2 Calculation
    M017     R.Salvador  03.09.03  THOR 4220   Change RevRec Calculation
    M018     R.Salvador  25.09.03  THOR 4237   Fix WBS Selection
    M019     R.Salvador  11.11.03  THOR 4297   Add SP number
    M020     R.Salvador  16.01.04  THOR 4342   Fix Revenue Recognition
    M021     R.Salvador  28.01.04  THOR 4344   Fix Revenue Recognition
    M022     R.Salvador  11.02.04  THOR 4340   Fix Selection Criteria
             Ta Tran     10.06.04  DI4K900626  Copied from NDC
    M023     Maccha      29.08.05  DI2K921397  Honing the selection
             Srinivas                          process for Director and
                                               Manager criteria.
    M024     M.Srinivas  20.09.05  DI2K921599  Rectifying the order level
                                               - Partner profile
                                               selections. Ref.
                                               docket:203680869
    M025     M.Srinivas  01.05.06  DI2K922837  Order level - Status
                                               profile selections
                                               rectification. PD:203960491
    M026     Gaurav Dixit18.09.06  DI2K923361  Not to select the deleted
                                               partners from IHPA table.
    M027    SaiKiran Reddy07.06.07 DI2K923793  To Exclude Deleted partner
                                               from IHPA table.
    include zps_projsummcomd.
    types: begin of ty_wbs_report2,                      "Reporting Table
             Pdir(20),                                   "Prog Dir
             posid         like prps-posid,              "WBS Element
             post1         like prps-post1,              "Short Text
             fkstl         like prps-fkstl,              "resp const centre
             prart         like prps-prart,              "Proj Type
             ZZORDERLEVEL(2),                            "order level
             ZZACTTYP(6),                                "Activity type
             sstatus       like bsvx-sttxt,              "system status
             ustatus       like bsvx-sttxt,              "user status
             ZZIMCINITIATIVE(24),                        "IMC initiative
             ZZIMCPROGRAM(02),                           "IMC Program
             ZZWORKCATEGORY(02),                         "Work Cat
             ZZWPMANLOB(01),                             "LOB
             ZZSOURCE(02),                               "Source
             ZZPRIN(02),                                 "Principal
             ZZIMPLEMENTREG(01),                         "IMP Reg
             ZZCONTRACTID(10),                           "Contract
             ZZWPNUM(08),                                "WP No
             ZZsPNUM(08),                                "SP No
             ZZORDERNUM(04),                             "Order No
             lead(20),                                   "Prog Lead
             Pmgr(20),                                   "Prog Mgr
             Poff(20),                                   "Prog Officer
           acthours      type megxxx, "megXXX: 3decimal"Actual Hours
             acthours      type wkgxxx, "wkgXXX: 2decimal"Actual Hours
             planhours     type wkgxxx,                  "Planned Hours
             PLANLABOUR    type wkgxxx,                  "PLAN LABOUR
             ACTLABOUR     type wkgxxx,                  "ACTUAL LABOUR
             planmatcosts  type wkgxxx,               "plan material costs
             actmatcosts   type wkgxxx,               "actual material costs
             plancosts     type wkgxxx,                   "Planned COsts
             actcosts      type wkgxxx,                   "Actual Costs
             prcommitment  type wkgxxx,                   "PR Commitment
             pocommitment  type wkgxxx,                   "PO Commitment
             totcommitment type wkgxxx,                   "Total Commitment
             zzwip         like prps-zzwip,               "rev rec process
             planrev       type wkgxxx,                   "Planned Revenues
             actrev        type wkgxxx,                   "Actual Revenues
             pcnt_comp(8)   type p decimals 2,            "% complete
             acttotrevrec  type wkgxxx,                   "Act.Rev.Rec m009
             actytdrevrec  type wkgxxx,                   "Act.Rev Rec m009
             revrec        type wkgxxx,                   "revenue Recognise
             revrecytd     type wkgxxx,                   "RevRec YTD M001
             rev_collected like vbrp-netwr,               "Collected Rev
           end of ty_wbs_report2.
    types: begin of ty_wbs_report,                        "Reporting Table
             Pdir(20),                                    "Prog Dir
             posid         like prps-posid,               "WBS Element
             post1         like prps-post1,               "Short Text
             fkstl         like prps-fkstl,               "resp const centre
             prart         like prps-prart,               "Proj Type
             ZZORDERLEVEL(2),
             ZZACTTYP(6),                                 "Activity type
             sstatus       like bsvx-sttxt,               "system status
             ustatus       like bsvx-sttxt,               "user status
             ZZIMCINITIATIVE(24),                         "IMC initiative
             ZZIMCPROGRAM(02),                            "IMC Program
             ZZWORKCATEGORY(02),                          "Work Cat
             ZZWPMANLOB(01),                              "LOB
             ZZSOURCE(02),                                "Source
             ZZPRIN(02),                                  "Principal
             ZZIMPLEMENTREG(01),                          "IMP Reg
             ZZCONTRACTID(10),                            "Contract
             ZZWPNUM(08),                                 "WP No
             ZZSPNUM(08),                                 "SP No
             ZZORDERNUM(04),                              "Order No
             lead(20),                                    "Prog Lead
             Pmgr(20),                                    "Prog Mgr
             poff(20),                                    "Prog Officer
             acthours      type wkgxxx,                   "Actual Hours
             planhours     type wkgxxx,                   "Planned Hours
             PLANLABOUR    type wkgxxx,                   "PLAN LABOUR
             ACTLABOUR     type wkgxxx,                   "ACTUAL LABOUR
             planmatcosts  type wkgxxx,               "plan material costs
             actmatcosts   type wkgxxx,               "actual material costs
             plancosts     type wkgxxx,                   "Planned COsts
             actcosts      type wkgxxx,                   "Actual Costs
             prcommitment  type wkgxxx,                   "PR Commitment
             pocommitment  type wkgxxx,                   "PO Commitment
             totcommitment type wkgxxx,                   "Total Commitment
             zzwip         like prps-zzwip,               "rev rec process
             planrev       type wkgxxx,                   "Planned Revenues
             actrev        type wkgxxx,                   "Actual Revenues
             pcnt_comp(8)   type p decimals 2,            "% complete
             acttotrevrec  type wkgxxx,                   "Act.Rev.Rec m009
             actytdrevrec  type wkgxxx,                   "Act.Rev Rec m009
             revrec        type wkgxxx,                   "revenue Recognise
             revrecytd     type wkgxxx,                   "RevRec YTD M001
             pspnr         like prps-pspnr,               "WBS Internal Key
             postu         like prps-postu,               "Short Text
             fakkz         like prps-fakkz,
             psphi         like prps-psphi,               "proj def
             zzcust        like prps-zzcustNUM,           "Customer
             zzcustnum     like prps-zzcustnum,           "Customer
             kostl         like prps-kostl,               "Cost Centres
             prsumm(1)     type c,                        "Project Summary
             actcostscfy   type wkgxxx,                   "Current FY Costs
             actrevcfy     type wkgxxx,                   "Current FY Rev
             rev_billed    like vbrp-netwr,               "Billed Revenue
             gst_billed    like vbrp-mwsbp,               "Billed GST
             rev_collected like vbrp-netwr,               "Collected Rev
             gst_collected like vbrp-mwsbp,               "Collected GST
             totbudget     type wkgxxx,                   "Total Budget
             verna         like prps-verna,                     "PM m006
             astna         like prps-astna,                     "PO m006
             totcogs  type wkgxxx,                        "Total COGS m009
             ytdcogs  type wkgxxx,                        "YTD COGS m009
           end of ty_wbs_report.
    types: begin of ty_totals,              "Structure for Sub-totals
             actmatcosts type wkgxxx,          "Actual material Costs
             actcosts    type wkgxxx,          "Actual Costs Total
             actrev      type wkgxxx,          "Actual Revenues Total
             planmatcosts type wkgxxx,         "plan material Costs
             plancosts   type wkgxxx,          "Planned Costs
             planrev     type wkgxxx,          "Planned Revenues
             acthours    type wkgxxx,          "Actual Hours
             planhours   type wkgxxx,          "Planned Hours
             ACTLABOUR   type wkgxxx,          "ACTUAL LABOUR
             PLANLABOUR  type wkgxxx,          "Planned LABOUR
             revrec      type wkgxxx,          "Revenue Recognised
             revrecytd     type wkgxxx,        "RevRec YTD M001
             acttotrevrec  type wkgxxx,        "RevRec Actual M009
             profit        type wkgxxx,        "Planned Profit/Loss
             actcostscfy   type wkgxxx,        "Actual Costs Current FY
             actrevcfy     type wkgxxx,        "Actual Revenues Current FY
             rev_billed    type wkgxxx,        "Billed Revenue
             gst_billed    type wkgxxx,        "Billed GST
             rev_collected type wkgxxx,        "Collected Rev
             gst_collected type wkgxxx,        "Collected GST
             prcommitment  type wkgxxx,        "PR Commitment
             pocommitment  type wkgxxx,        "PO Commitment
             totcommitment type wkgxxx,        "Total Commitment
             totbudget     type wkgxxx,        "Total Budget
             actytdrevrec  TYPE wkgxxx,
           end of ty_totals.
    type-pools: gsetc.
    tables: cepct.
    data: it_wbs_report TYPE ty_wbs_report OCCURS 0 WITH HEADER LINE,
          it_wbs_report2 TYPE ty_wbs_report2 OCCURS 0 WITH HEADER LINE,
          wr_wbs_report type ty_wbs_report,
          it_prctr      type standard table of setlist,
          it_stat(72) occurs 0 with header line,
          et_stat(72) occurs 0 with header line,
          begin of it_tj49 occurs 0,
            stats like tj49-stats,
            incex like tj49-incex,
            verkz like tj49-verkz,
          end of it_tj49,
          begin of it_csla occurs 150,
          vksta like csla-vksta,
          end of it_csla,
          w_stat_flg,
          w_join(3),
          w_not(3),
          w_stat_val(7) value '''     ''',
          W_LEAD(40),
          W_PDIR(40),
          W_PMGR(40),
          w_poff(40),
          w_tab like sy-tabix,
          n like sy-index,
          w_reporting_level(2) type c,
          w_gtotal_text(500)   type c,
          w_other_level(1)     type c,
          w_budat              like bkpf-budat,                 "m002
          w_level like prps-stufe,
          w_record_count(8)    type n,
          w_pspid_ind(1)       type c,                          "m003
          begin of ziheader,
            w_strlen   type i,
            hdr_pos    type p,
            hold_name(30),
            conf_txt(54) value
            '* CONFIDENTIAL - PROPERTY OF BACCHUS *',
          end of ziheader,
          p_budat like bkpf-budat,
          w_sel_posid like prps-posid,
    Internal tables to hold set hierarchy, values, pointers and sorts
          set_hierarchy    like sethier     occurs 0 with header line,
          set_values       like setvalues   occurs 0 with header line,
          set_id like rgsbs-setnr,
          set_id2         like rgsbs-setnr,
          w_setnr(30)        type c,
          w_set_values like rgsb4 occurs 0 with header line,
          lt_objlst type standard table of onr00,
          lr_objlst type onr00,
          w_first   type c.
    Start of M011
    data: it_wbs1 like it_wbs occurs 0.
    data: it_wbs_tmpo  like it_wbs occurs 0 with header line.   "M024
    data: begin of loc_wbs occurs 0.
            include structure  zco_wip_wbslst.  "test '''
    data:         pdir(20),
                  zzacttyp(6),
                  ZZIMCINITIATIVE(24),
                  ZZIMCPROGRAM(02),
                  ZZWORKCATEGORY(02),
                  ZZWPMANLOB(01),
                  ZZSOURCE(02),
                 ZZPRIN(02),
                  ZZIMPLEMENTREG(01),
                  ZZCONTRACTID(10),
                  ZZWPNUM(08),
                  ZZSPNUM(08),
                  ZZORDERNUM(04),
                  PERNR(08),
                  PERNR2(08),
           end of loc_wbs.
    data: begin of it_report occurs 0,
            posid like prps-posid,
            pspnr like prps-pspnr,
          end of it_report.
    End of M011
    data: begin of it_deleted occurs 0,
            posid like prps-posid,
            pspnr like prps-pspnr,
          end of it_deleted.
    data: begin of l_deleted occurs 0,
            posid like prps-posid,
            pspnr like prps-pspnr,
          end of l_deleted.
    data: w_year like bkpf-gjahr.
    data: begin of t_date occurs 0,
          w_budat  like bkpf-budat,
          poper    like t_poper-poper,
    end of t_date.
    data: t_ihpa like ihpa occurs 0 with header line,
          t_ihpa1 like ihpa occurs 0 with header line,
          t_ihpa2 like ihpa occurs 0 with header line,
          t_ihpa3 like ihpa occurs 0 with header line,
          t_ihpa4 like ihpa occurs 0 with header line,
          l_status(3),
          w_PLANHOURS like it_wbs-PLANHOURS,
          w_PLANREV   like it_wbs-PLANREV,
          w_PLANCOSTS like it_wbs-PLANCOSTS,
          it_tmp_wbs3 type zco_proj_summary_v2 occurs 0 with header line,
          W_it_wbs5 like it_wbs .
    ranges: r_prctr for prps-prctr.
    ranges: r_stufe for prps-stufe.
    ranges: r_posid for prps-posid.
    constants: c_crtd like tj49-stats value 'I0001'.
    CONSTANTS: C_LEAD(2) VALUE '4A',
               C_PDIR(2) VALUE '4B',
               C_PMGR(2) VALUE 'A1',
               C_Poff(2) VALUE 'A2',
               c_pdn like ihpa-OBTYP value 'PDN',
               c_prn like ihpa-OBTYP value 'PRN'.               "M023
    tables : pa0002.
    ---------------------Organisational Units------------------------*
    selection-screen begin of block orgunit with frame title text-t06.
    *WP/CP Managing LOB
    select-options: S_ZWP for PRPS-ZZWPMANLOB MATCHCODE OBJECT  ZZWPMANLOB.
    *Implementing Region
    select-options: S_ZIMP for PRPS-ZZIMPLEMENTREG MATCHCODE OBJECT
    ZZIMPLEMENTREG.
    *Cost center group
    PARAMETERS: P_CTGRP  LIKE RKSB1-KSGRU no-display.
    *Responsible Cost Center
    select-options: s_fkstl  for prps-fkstl.
    select-options: s_src    for  proj-zzsource MATCHCODE OBJECT ZzSOURCE.
    select-options: s_prin   for  proj-zzprin MATCHCODE OBJECT ZzPRINCIPAL .
    select-options: s_wcat   for  proj-zzworkcategory MATCHCODE OBJECT
    ZZWORKCATEGORY.
    select-options: s_wpcpt  for  proj-ZZTYPE MATCHCODE OBJECT ZzTYPE.
    selection-screen end of block orgunit.
    selection-screen begin of block periods with frame title text-t05.
    selection-screen begin of line.
    selection-screen comment 1(20) text-c04 for field p_kokrs.
    selection-screen position pos_low.
    parameters: p_kokrs type kokrs obligatory default 'TELC'.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(20) text-c01 for field s_fyear.
    selection-screen position pos_low.
    select-options: s_fyear for bkpf-gjahr obligatory no intervals
                    no-extension.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(20) text-c02 for field s_poper.
    selection-screen position pos_low.
    select-options: s_poper for T009B-poper obligatory no intervals
                    no-extension.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen position pos_low.
    selection-screen end of line.
    data: p_incwip(1) type c value ' '.
    selection-screen begin of line.
    selection-screen comment 1(30) text-c25 for field p_calrev.
    selection-screen position pos_low.
    parameters:  p_calrev radiobutton group 0001 default 'X'.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(30) text-c26 for field p_actrev.
    selection-screen position pos_low.
    parameters:  p_actrev radiobutton group 0001.
    selection-screen end of line.
    End of M007 Mods
    selection-screen end of block periods.
    selection-screen begin of block psjsel with frame title text-t01.
    *Program Leadhouse
    select-options: s_plead for pa0002-pernr matchcode object  ZPA0002.
    *Project Director
    select-options: s_pdir for pa0002-pernr  matchcode object  ZPA0002.
    *Project Manager
    select-options: s_pmgr for pa0002-pernr  matchcode object  ZPA0002.
    *Project Profile
    select-options: s_PROFL FOR PROJ-PROFL default 'EXTERN' obligatory.
    *Project Definition
    select-options: s_pspid  for proj-pspid.
    *WBS Element
    select-options: s_posid  for prps-posid.
    selection-screen end of block psjsel.
    selection-screen begin of block othersel with frame title text-t07.
    parameters: p_lvl1 radiobutton group rplv,
                p_lvl2 radiobutton group rplv,
                p_wip  radiobutton group rplv.
    selection-screen begin of line.
    selection-screen comment 1(20) text-c16 for field p_oth.
    selection-screen position pos_low.
    parameters:  p_oth  radiobutton group rplv.
    selection-screen comment 40(20) text-c17 for field p_level.
    parameters:  p_level like prps-stufe.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(22) text-c22 for field p_incwbs.
    selection-screen position 42.
    parameters:  p_incwbs as checkbox.
    selection-screen end of line.
    Start of M006 Mods
    selection-screen begin of line.
    selection-screen comment 1(41) text-c23 for field p_clwbs.
    selection-screen position 42.
    parameters:  p_clwbs as checkbox default 'X'.
    selection-screen end of line.
    End of M006 Mods
    parameters:
      p_status like tj49-selid.
    select-options:
      s_prart for prps-prart.
    selection-screen end of block othersel.
    selection-screen begin of block outfile with frame title text-t11.
    selection-screen begin of line.
    selection-screen comment 1(20) text-c11 for field p_file.
    selection-screen position pos_low.
    parameters: p_file as checkbox.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(20) text-c13 for field p_runid.
    selection-screen position pos_low.
    parameters: p_runid like zcnwip_log-zrunid.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(20) text-c12 for field p_filenm.
    selection-screen position pos_low.
    parameters: p_filenm(40) type c default '/batch/int/send/ndcreports/'
                                    lower case.
    selection-screen end of line.
    selection-screen end of block outfile.
    initialization.
      perform ini_fiscal_year_current.
    Default year/period in the selection screen
      s_fyear-sign = 'I'.
      s_fyear-option = 'EQ'.
      APPEND s_fyear.
      s_poper-sign = 'I'.
      s_poper-option = 'EQ'.
      APPEND s_poper.
      perform ini_file_path.
    at selection-screen on block outfile.
      if not p_file is initial.
        if p_filenm is initial.
          message e017.
        endif.
        if p_runid is initial.
          message e017.
        endif.
      endif.
    at selection-screen on p_status.
      clear it_stat.
      refresh it_stat.
      if p_status is initial.
        w_stat_flg = 'N'.
      else.
        w_stat_flg = 'Y'.
      endif.
    at selection-screen.
      include ZCNWIPCOMF_V2.
      if not p_actrev is initial.
        move: w_curr_year   to w_curr_fperiod+0(4),
              w_curr_period to w_curr_fperiod+4(2),
              s_fyear-low       to w_sel_fperiod+0(4),
              s_poper-low       to w_sel_fperiod+4(2).
        if w_sel_fperiod le '200212'.  "temp
          message e025.
        endif.
        if w_sel_fperiod ge w_curr_fperiod.
          message e026.
        endif.
      endif.
    Check if Other level check, specify level from 3-4
      if not p_oth is initial and
         p_level is initial.
        message e021.
      endif.
    Validate File Information
      if not p_file is initial.
        if p_runid is initial or
           p_filenm is initial.
          message e014.
        endif.
        select count(*) from zcnwip_log
          where zrunid eq p_runid
          and   zrep   eq 'PROJCE'. " to be changed
        if sy-subrc eq 0.
          message w022 with p_runid.
        endif.
      endif.
      if not p_ctgrp is initial and not s_FKSTL is initial.
        message e087 with 'Cost Center Group' 'Responsible Cost Center'.
      endif.
      if not p_ctgrp is initial.
        clear w_setnr.
        move: '0101'     to w_setnr+0(4),
              P_KOKRS    to w_setnr+4(4),
              p_ctgrp    to w_setnr+8.
        call function 'G_SET_GET_ALL_VALUES'
             EXPORTING
                  setnr         = w_setnr
             TABLES
                  set_values    = w_set_values
             EXCEPTIONS
                  set_not_found = 1
                  others        = 2.
        if sy-subrc eq 0.
          loop at w_set_values.
            if w_set_values-from = w_set_values-to.
              S_FKSTL-low = w_set_values-from.
              S_FKSTL-option = 'EQ'.
            else.
              S_FKSTL-low  = w_set_values-from.
              S_FKSTL-high = w_set_values-to.
              S_FKSTL-option = 'BT'.
            endif.
            S_FKSTL-sign   = 'I'.
            append S_FKSTL.
          endloop.
        else.
          message e201 with p_ctgrp.
        endif.
      endif.
    start-of-selection.
      data: w_poper like s_poper-low,
            w_fyear like s_fyear-low.
      w_poper = s_poper-low.
      loop at s_poper.
        case s_poper-option.
          when 'EQ'.
            move s_poper-low to t_poper.
            append t_poper.
            clear t_poper.
          when 'BT'.
            move s_poper-low to t_poper.
            append t_poper.
            clear t_poper.
            while w_poper < s_poper-high.
              w_poper = w_poper + 1.
              move w_poper to t_poper.
              append t_poper.
              clear t_poper.
            endwhile.
        endcase.
      endloop.
      w_fyear = s_fyear-low.
      loop at s_fyear.
        case s_fyear-option.
          when 'EQ'.
            move s_fyear-low to t_fyear.
            append t_fyear.
            clear t_fyear.
          when 'BT'.
            move s_fyear-low to t_fyear.
            append t_fyear.
            clear t_fyear.
            while w_fyear < s_fyear-high.
              w_fyear = w_fyear + 1.
              move w_fyear to t_fyear-fyear.
              append t_fyear.
              clear t_fyear.
            endwhile.
        endcase.
      endloop.
      sort t_fyear by fyear .
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
       EXPORTING
         I_DATE               = sy-datum
         I_PERIV              = 'V6'
      IMPORTING
      E_BUPER              =
        E_GJAHR              =  w_fyear.
      w_fyear =   s_fyear-low.
    s_fyear-low = w_fyear.
    Reset Indicator
      if p_calrev is initial.
        move 'X' to p_incwip.
      else.
        clear p_incwip.
      endif.
      loop at t_poper.
    *get last day in each period of range
        t_date-poper = t_poper-poper.
    *------ Start of M002 modifications
    *------ Determine last day of the posting period
        call function 'LAST_DAY_IN_PERIOD_GET'
             EXPORTING
                  i_gjahr = s_fyear-low
                  i_periv = tka01-lmona
                  i_poper = t_poper-poper
             IMPORTING
                  e_date  = t_date-w_budat.
        append t_date.
        clear t_date.
      endloop.
    *get last day of last period in previous fiscal years chosen
    *016 = last period
      delete t_fyear where fyear = w_fyear. "remove current fyear
      loop at t_fyear.
        call function 'LAST_DAY_IN_PERIOD_GET'
             EXPORTING
                  i_gjahr = t_fyear-fyear
                  i_periv = 'V6'
                  i_poper = '016'
             IMPORTING
                  e_date  = t_date-w_budat.
        t_date-poper = '016'.
        append t_date.
        clear t_date.
      endloop.
    *Get the Proj Def from WBS selct option and refresh wbs select option.
      data: begin of l_psphi occurs 0,
              POSID like prps-POSID,
              pspid like prps-psphi,
            end of l_psphi.
      data: begin of l_pspid occurs 0,
              pspid like proj-pspid,
            end of l_pspid.
      data: begin of i_proj occurs 0,                           "M023
            pspnr like proj-pspnr,                              "M023
            end of i_proj.                                      "M023
      data: begin of i_prps occurs 0,                           "M023
            objnr like prps-objnr,                              "M023
            end of i_prps.                                      "M023
      data: begin of i_psphi1 occurs 0,                         "M023
            psphi like prps-psphi,                              "M023
            end of i_psphi1.                                    "M023
      data: len_posid type i.
      if not s_posid[] is initial.
        select posid psphi into table l_psphi
                           from prps
                           where posid in s_posid.
        if sy-subrc ne 0.
          message i100.
          exit.
        endif.
        if not l_psphi[] is initial.
          sort l_psphi.
          select  pspid into table l_pspid
                              from proj
                              for all entries in l_psphi
                              where pspnr = l_psphi-pspid and
                                    profl in s_profl.
          if sy-subrc = 0.
            delete adjacent duplicates from l_pspid.
            loop at l_pspid.
              s_pspid-sign = 'I'.
              s_pspid-option = 'EQ'.
              s_pspid-low = l_pspid-pspid.
              append s_pspid.
              clear s_pspid.
            endloop.
          else.
            message i100.
            exit.
          endif.
        endif.
        clear s_posid.
        refresh s_posid.
        loop at l_psphi.
          s_posid-sign = 'I'.
          s_posid-option = 'CP'.
          CALL FUNCTION 'CONVERSION_EXIT_ABPSN_OUTPUT'
               EXPORTING
                    INPUT  = l_psphi-posid
               IMPORTING
                    OUTPUT = l_psphi-posid.
          while l_psphi-posid ca '.'.
            replace '.' with space into l_psphi-posid.
          endwhile.
          condense l_psphi-posid no-gaps.
          concatenate l_psphi-posid '*' into s_posid-low.
          append s_posid.
        endloop.
      endif.
    *------ End of M002 modifications
    ----- Exclude the P. WBS elements, these are only used for
    *----- intermediate postings and are not relevant for WIP, COGS,...
      perform ini_posid_range.
      perform ini_pspid_range.
    if not s_pspid[] is initial.
    *----- If projects are selected, then make sure we have the internal
    *----- key to PROJ (ie, field PSPNR)
      perform get_partners.
      perform sos_prepare_proj_range.
      if r_psphi[] is initial.
        message i100.
        exit.
      endif.
    endif.
    *----- WBS ranges with "CP" (Contains Pattern) entries need
    *----- to be condensed, because the conversion exit for field POSID
    ----- causes an entry entered as "P." to be stored as "P    *". Hence
    *----- selection is flawed.
      perform sos_condense_range_wbs.
    *----- Activity Type Group is used to determine what Activity Types
    *----- to take into account for the computation of planned and actual
    *----- hours. The Activity Type Group must be exploded into its
    *----- individual Activity Types, so we can build a range of Activity
    *----- types.
      perform sos_build_act_type_range.
    *----- Selection of WBS as per selection criteria, but only Billing WBS
    *----- Elements or Level 2 WBS elements
    Get Level re-determined
      if not p_oth is initial.
        case p_level.
          when 1.
            move c_on to p_lvl1.
            clear p_oth.
          when 2.
            move c_on to p_lvl2.
            clear p_oth.
        endcase.
      endif.
      if not p_lvl1 is initial.
        w_reporting_level = 'L1'.
        w_level = 1.
      endif.
      if not p_lvl2 is initial.
        w_reporting_level = 'L2'.
        w_level = 2.
      endif.
      if not p_wip is initial.
        w_reporting_level = 'BE'.
        w_level = 0.
      endif.
      refresh r_stufe.
      if not p_lvl1 is initial.
        clear: r_stufe.
        move: '1'     to r_stufe-low,
              '2'     to r_stufe-high,
              'BT'    to r_stufe-option,
              'I'     to r_stufe-sign.
        append r_stufe.
      elseif not p_oth is initial.
        clear: r_stufe.
        move: p_level to r_stufe-low,
              'EQ'    to r_stufe-option,
              'I'     to r_stufe-sign.
        append r_stufe.
      elseif not p_wip is initial. "INS DI5K902370
        clear: r_stufe. "INS DI5K902370
       move: '1' to r_stufe-low, "INS DI5K902370
             '99' to r_stufe-HIGH, "INS DI5K902370
             'BT'    to r_stufe-option, "INS DI5K902370
             'I'     to r_stufe-sign. "INS DI5K902370
        move: '2'     to r_stufe-low,
              '99'    to r_stufe-HIGH,
              'BT'    to r_stufe-option,
              'I'     to r_stufe-sign.
        append r_stufe. "INS DI5K902370
      else.
        clear: r_stufe.
        move: '2'     to r_stufe-low,
              'EQ'    to r_stufe-option,
              'I'     to r_stufe-sign.
        append r_stufe.
      endif.
      perform select_wbs_new tables r_psphi.
      commit work.
    Process any WBS elements missed during initial selection
      if  not s_posid[] is initial.
        perform check_billing_elements.
        sort it_wbs by psphi
                       pspnr.
      endif.
      delete adjacent duplicates from it_wbs.
      append lines of it_wbs to it_wbs1.
      sort it_wbs1 by psphi
                     pspnr.
    Transfer to temporary table before calling function
      refresh loc_wbs.
      loop at it_wbs1 into wr_wbs.
        w_tabix = sy-tabix.
        if wr_wbs-psphi ne w_ref_psphi.
          if not loc_wbs[] is initial.
    *----- CAREFUL: THIS FUNCTION MODULE ASSUMES THAT THE WBS ELEMENTS
    *----- PASSED INTO TABLE I_WBS ALL BELONG TO THE SAME PROJECT
    *----- DEFINITION. FUNCTION MODULE WILL NOT GIVE PROPER RESULTS
    *----- IF CALLED FOR A TABLE I_WBS WITH WBS ELEMENTS BELONGING
    *----- TO VARIOUS PROJECT DEFINITIONS. BE WARNED!!!
            call function 'Z_CN_DETERMINE_REPORTS'
                 EXPORTING
                      i_fyear        = s_fyear-low
                      i_prsumm_level = w_level
                      i_closed       = 'X'
                 TABLES
                      i_wbs          = loc_wbs
                      i_deleted      = l_deleted.
            if not p_lvl2 is initial.
              loop at loc_wbs where stufe gt 2 and lvl2_posid is initial.
                do.
                  select single up into prhi-up
                                   from prhi
                                   where posnr = loc_wbs-pspnr.
                  select single * from prps
                  where pspnr = prhi-up.
                  if prps-stufe = 2.
                    loc_wbs-lvl2_pspnr = prps-pspnr.
                    loc_wbs-lvl2_posid = prps-posid.
                    exit.
                  else.
                    loc_wbs-pspnr = prhi-up.
                  endif.
                enddo.
                modify loc_wbs.
              endloop.
            endif.
            perform sos_append_wbs.
            refresh l_deleted.
          endif.
          w_ref_psphi = wr_wbs-psphi.
          refresh loc_wbs.
        endif.
        clear loc_wbs.
        move-corresponding wr_wbs to loc_wbs.
        append loc_wbs.
      endloop.
      if not loc_wbs[] is initial.
    *----- CAREFUL: THIS FUNCTION MODULE ASSUMES THAT THE WBS ELEMENTS
    *----- PASSED INTO TABLE I_WBS ALL BELONG TO THE SAME PROJECT
    *----- DEFINITION. FUNCTION MODULE WILL NOT GIVE PROPER RESULTS
    *----- IF CALLED FOR A TABLE I_WBS WITH WBS ELEMENTS BELONGING
    *----- TO VARIOUS PROJECT DEFINITIONS. BE WARNED!!!
        call function 'Z_CN_DETERMINE_REPORTS'
             EXPORTING
                  i_fyear        = s_fyear-low
                  i_prsumm_level = w_level
                  i_closed       = 'X'
             TABLES
                  i_wbs          = loc_wbs
                  i_deleted      = l_deleted.
        if not p_lvl2 is initial.
          loop at loc_wbs where stufe gt 2 and lvl2_posid is initial.
            do.
              select single up into prhi-up
                               from prhi
                               where posnr = loc_wbs-pspnr.
              select single * from prps
              where pspnr = prhi-up.
              if prps-stufe = 2.
                loc_wbs-lvl2_pspnr = prps-pspnr.
                loc_wbs-lvl2_posid = prps-posid.
                exit.
              else.
                loc_wbs-pspnr = prhi-up.
              endif.
            enddo.
            modify loc_wbs.
          endloop.
        endif.
        perform sos_append_wbs.
        refresh loc_wbs.
        refresh l_deleted.
      endif.
      perform process_report_table.
    End of M011
    Check Status Profile
      if not p_status is initial.
        perform process_check_status_profile.
        sort it_wbs by psphi
                     pspnr.
      endif.
    Start of M006 mods
      if p_clwbs is initial.
    Ignore projects/WBS closed based on the year
        perform process_closed_projects.
      endif.
    End of M006 mods
      describe table it_wbs lines w_lines.
      if w_lines eq 0.
        message i100.
        exit.
      endif.
      sort it_wbs by psphi
                     pspnr.
      loop at it_wbs
           into wr_wbs.
        w_tabix = sy-tabix.
    *----- We will extract costs and determine to which reports a WBS
    *----- by Project Hierarchy, ie, we will look at all the WBS Elements
    *----- in a given hierarchy in one hit. This simplifies the
    *----- process of determining the highest billing element or the
    *----- Level 2 WBS element for a selected WBS
    *----- It also had the advantage of allowing parallel processing
    *----- using CALL FUNCTION STARTING NEW TASK if required in
    *----- the future
        if wr_wbs-psphi ne w_ref_psphi.
          if not it_tmp_wbs[] is initial.
            loop at t_date.
              it_tmp_wbs2[] =  it_tmp_wbs[].
              call function 'Z_PS_WIP_GET_COSTS_COMMITMENT'
                   EXPORTING
                        i_fyear          = s_fyear-low
                        i_poper          = t_date-poper
                        i_billing        = 'X'
                        i_prsumm_level   = w_level
                        i_other_level    = w_other_level
                        i_budat          = t_date-w_budat
                        i_commitment     = 'X'
                        i_include_wipadj = p_incwip             "M007
                   TABLES
                        i_rsparams       = it_rsparams
                        i_wbs            = it_tmp_wbs2.
              loop at it_tmp_wbs2 into it_tmp_wbs3.
                collect it_tmp_wbs3.
              endloop.
              w_tab = sy-tabix.
              n = 1.
              while n <= w_tab .
                read table it_tmp_wbs2 index n.
                it_tmp_wbs3 = it_tmp_wbs2.
                modify table it_tmp_wbs3
             index n
                transporting
                PLANLABOUR PLANHOURS PLANREV PLANCOSTS stufe.
                n = n + 1.
              endwhile.
            endloop.
            it_tmp_wbs[] =  it_tmp_wbs2[].
            perform sos_process_tmp_table.
          endif.
          w_ref_psphi = wr_wbs-psphi.
          refresh it_tmp_wbs.
        endif.
        wr_wbs-tabix = w_tabix.
        append wr_wbs to it_tmp_wbs.
        if w_tabix eq w_lines.
    *----- Don't forget to process the last hierarchy!!
          if not it_tmp_wbs[] is initial.
            loop at t_date.
              it_tmp_wbs2[] =  it_tmp_wbs[].
              call function 'Z_PS_WIP_GET_COSTS_COMMITMENT'
                   EXPORTING
                        i_fyear          = s_fyear-low
                        i_poper          = t_date-poper
                        i_billing        = 'X'
                        i_prsumm_level   = w_level
                        i_other_level    = w_other_level
                        i_budat          = t_date-w_budat
                        i_commitment     = 'X'
                        i_include_wipadj = p_incwip             "M007
                   TABLES
                        i_rsparams       = it_rsparams
                        i_wbs            = it_tmp_wbs2.
                  exceptions
                       not_found        = 1.
              loop at it_tmp_wbs2 into it_tmp_wbs3.
                collect it_tmp_wbs3.
              endloop.
              w_tab = sy-tabix.
              n = 1.
              while n <= w_tab .
                read table it_tmp_wbs2 index n.
                it_tmp_wbs3 = it_tmp_wbs2.
                modify it_tmp_wbs3 index n transporting stufe
                PLANLABOUR PLANHOURS PLANREV PLANCOSTS .
                n = n + 1.
              endwhile.
            endloop.
            it_tmp_wbs[] =  it_tmp_wbs2[].
            perform sos_process_tmp_table.
          endif.
        endif.
      endloop.
    end-of-selection.
    Delete WBS with no financial information
      loop at it_wbs_report into wr_wbs_report.
        if wr_wbs_report-actcosts      eq 0 and
           wr_wbs_report-plancosts     eq 0 and
           wr_wbs_report-planrev       eq 0 and
           wr_wbs_report-acthours      eq 0 and
           wr_wbs_report-actrev        eq 0 and
           wr_wbs_report-revrec        eq 0 and
           wr_wbs_report-revrecytd     eq 0 and
           wr_wbs_report-acttotrevrec  eq 0 and
           wr_wbs_report-actytdrevrec  eq 0 and
           wr_wbs_report-pocommitment  eq 0 and
           wr_wbs_report-prcommitment  eq 0 and
           p_incwbs is initial.
          delete it_wbs_report index sy-tabix.
        endif.
      endloop.
      loop at it_wbs_report.
        select  single
                   objnr
                   psphi
                   zzacttyp
                   ZZIMCINITIATIVE
                   ZZIMCPROGRAM
                   ZZWPMANLOB
                   ZZIMPLEMENTREG
                   ZZCONTRACTID
                   ZZWPNUM
                   ZZSPNUM
                   ZZORDERNUM
                   ZZORDERLEVEL
                   ZZWIP
              from prps
              into corresponding fields of w_it_wbs5
              where posid eq it_wbs_report-posid.
        CLEAR: W_LEAD, W_PDIR, W_PMGR, w_poff.
        select single zztype ZZWORKCATEGORY ZZPRIN ZZSOURCE from proj into
        (w_it_wbs5-zztype, w_it_wbs5-ZZWORKCATEGORY, w_it_wbs5-ZZPRIN,
        w_it_wbs5-ZZSOURCE) where pspnr = w_it_wbs5-psphi.
        CLEAR w_it_wbs5-lead.
        select single parnr from ihpa into w_it_wbs5-lead
        where objnr = w_it_wbs5-objnr and
        parvw = C_LEAD and
        KZLOESCH NE 'X'.                                        " M026
        PERFORM READ_PA0002 USING w_it_wbs5-lead CHANGING W_LEAD.
        CLEAR w_it_wbs5-pdir.
        select single parnr from ihpa into w_it_wbs5-pdir
        where objnr = w_it_wbs5-objnr and
        parvw = C_PDIR and
        KZLOESCH NE 'X'.                                        " M026
        PERFORM READ_PA0002 USING w_it_wbs5-PDIR CHANGING W_PDIR.
        CLEAR w_it_wbs5-pmgr.
        select single parnr from ihpa into w_it_wbs5-pmgr
        where objnr = w_it_wbs5-objnr and
        parvw = C_PMGR and
        KZL

    hi,
    1.Capacity check takes place at plant level itself..
    2.Pooled capacity:- This is created separately in [u wil find in PP] and this capacity can be used by different work centers.
    regards
    pushpa

  • Service Based Revenue Recognition - Prov Account Missing when using WBS

    Hi,
    I´ve activated RR functionality using service based and aceptance date.
    I've followed the intructions from the best practices documents and the notes:
    Note 820417 u2013 IMPLEMENTATION GUIDE FOR REVENUE RECOGNITION
    Note 1172799 u2013 NEW VERSION OF BEST PRACTICES FOR REVENUE RECOGNITION
    Note 678260 CONSTRAINTS
    Note 777996 u2013 ACCOUNT SETTINGS FOR  REVENUE RECOGNITION PROCESS     
    Note 779366 u2013 REVENUE RECOGNITION IN THE SD MODULE
    Note 1166848 u2013 CUSTOMIZING SETTINGS
    Note 782758 u2013 PREREQUISITS FOR USING REVENUE RECOGNITION
    Note 835367 - Activating SAP ERP SD revenue recognition
    Note 1000830 - Revenue recognition through incoming invoice (third-party
    Note 1025066 - Revenue recognition by proof of delivery (POD)
    Note 1120297 - Revenue recognition by acceptance date
    Note 1125456 - Revenue recognition due to customer-specific event
    We are implementing SD, FI (using New Gral Ledger), PS, CO and MM in a company that sells projects. Therefore we're posting everything to the WBS elements.
    We need to post the revenue values to the WBS elements too.
    The problem is that when we create a sales order for RR indicating a WBS element and try to save it, the system activates the incompletion log saying that the provision account is missing, despite the account is in VKOA.
    The strange thing is that if we use a material with profit center (without any WBS or order indication in the sales order) all the revenue recognition process runs perfectly (we save the order, VBREVK is fullfiled, VF44 is run and the invoice is done correctly).
    Does anybody know why when using a WBS element in the sales order, SAKN2 field is not fullfiled and the incompletion log is activated???
    Is it a program error? Or are we doing something wrong?
    Quick responses will be apreciated since we need to move on within two weeks!
    Thanks in advance!
                                     María del Valle Pintor.
    Moderator: This thread has been locked due to crossposting.
    Please do not post the same question in different forums.

    sap note 883544

  • Remaining Revenue Recognition

    Hi all,
        I am trying to figure out what is Remaining Revenue Recognition for the past few days , but cudnt get it ...can anyone explain me the process of Remaining revenue Recognition...
    In SAP PS we have developed a Customised report which has a column "Remainig Revenue Recognition", One of the users would like to know from where the amount XXXX is getting fetched in the customised report for remaining revenue recognition.

    Hi,
    As Gokul mentioned you need to find out what Revenue Recognition stands as per your business process. But to give an idea based one of the instance that i came across; if the projects are undergoing RA, then system posts Calculated Revenue at the end of each run based on the PoC of the project. This was considered as "Revenue Recognition" for that period. So in RPSCO if we look at the calculated revenue for this project's life cycle it gives us the total revenu recognition till date. So the difference of this amount and the planned revenue gives the remaing revenue that needs to be recognised. Hope this helps.
    Regards
    Sreekanth

  • Revenue recognition through RA

    Hi CO and RA Gurus
    Does any one know how to do Revenue Recognition using Result Analysis Keys.
    thanks
    KT

    Hi,
    Result Analysis:
    Overview:
    The objective for calculating Work in Process (WIP) is to determine the value of manufacturing activity in process at the end of a fiscal period, during a fiscal period and to properly reflect this value on the financial statements. WIP calculation is a facet of Results Analysis (RA). RA is a specialized tool within the controlling module that computes and analyzes the value of WIP. The terms WIP calculation and RA are generally interchangeable.
    Results analysis is used to:
    a. Calculate the inventory value of finished and unfinished products in a non-valuated project stock or non-valuated sales stock environment or
    b. You are using a valuated sales order stock or valuated project stock and want to capitalize goods that have been delivered but not yet invoiced.
    The difference between SAP and other systems is in the treatment of material consumption for manufacturing. Component issues to production orders, run schedules, WBSs, etc is immediately treated as an expense to the P&L statement. The issue is not treated as a reclassification from raw or semi-finished inventory to WIP inventory. SAP considers WIP to be a snapshot of values that can be computed on demand and passed to the general ledger as required to re-class the values to the balance sheet. This process demands a specific, methodical approach to be used for period-end and mid-period processing. Rules used to calculate the value of WIP and settle WIP to the G/L are defined in multiple RA tables depending upon the requirements of the company. RA is designed to support a variety of calculation techniques and there may and are alternate settings depending on the demands of the company. To support the configuration, scenarios and unit testing need to be thorough. RA needs to be configured towards the middle of the of the implementation with subsequent testing. This will allow for configuration of the data needed to support WIP and RA (chart of accounts, production orders, projects, cost centers, cost elements, etc.)
    Configuration Transactions:
    OKG1 u2014 Create Results Analysis Key
    OKG2 u2014 Results Analysis Version
    OKG9 u2014 Results Analysis Version
    OKGC u2013 OKGD u2014 Valuation Methods
    IMG SPRO u2014 Define Line IDs
    OKGB u2014 Define Assignment Mapping by incoming charges by cost element to line IDs
    OKG5 u2014 Define Assignment Mapping by incoming charges by cost element to line IDs
    OKG4 u2014 Define Update
    OKG6 u2014 Define Number Ranges
    If your done with RA configuration and posted actual cost,plan cost and plan revenue.
    you can calculate revenue recognistion using KKA2 T.code for projects.
    Hope this helps you.
    Thanks,
    Rau

  • Difference between Revenue Acct Determination , Revenue Recognition

    Hi All,,
    Can any one exmplain me clearly the difference between Revenue Account Determination, Revenue Recognition and Reconciliation Account determination
    Regards
    Rajesh

    Hi Rajes
    REVENUE ACCT. DETERMINATION:
    Account Determination
    Use
    To be able to use revenue recognition, you should select several special general ledger accounts. Choose: Sales and Distribution -> Basic Functions -> Account assignment/Costing -> Revenue Recognition
    Determining the Revenue Account
    Revenue recognition uses revenue account determination. To set up revenue account determination, use transaction VKOA.
    Determining Non-Billed Receivables Accounts
    The account for non-billed receivables is a special general ledger account, used to determine revenue which has been implemented but not yet billed.
    If you want to set up an account, join an account with non-billed receivables together with a customer reconciliation account which is a part of your chart of accounts. You can use the transaction OVUR for this.
    The standard system has the balance sheet account 142100 for non-billed receivables in the USA and in Canada (Accruals and Deferred Income).
    Determining the Deferred Revenue Account
    The deferred revenue account is a special general ledger account, used to determine revenue which has been billed but not yet implemented.
    The system determines the deferred revenue account for a document item using standard SD account determination. Use the transaction VKOA for this.
    REVENUE RECOGNITION:
    Revenue Recognition Method 1: Sales Basis
    This is the method that probably makes the most sense to investors. Under the sales basis method, revenue is recognized at the time of sale (defined as the moment when the title of the goods or services is transferred to the buyer.) The sale can be for cash or credit (i.e., accounts receivable.) This means that revenue is not recognized even if cash is received before the transaction is complete. A magazine publisher, for example, that receives $120 a year for an annual subscription, will only recognize $10 of revenue every month. The reason is simple: if they went out of business, they would have to return a pro-rated portion of the annual subscription price to the customer since it had not yet delivered the merchandise for which it had been paid.
    Revenue Recognition Method 2: Percentage of Completion
    Companies that build bridges or aircraft take years to deliver the product to the customer. In this case, the company responsible for building the product wants to be able to show its shareholders that it is generating revenue and profits even though the project itself is not yet complete. As a result, it will use the percentage of completion method for revenue recognition if two conditions are met: 1.) there is a long-term legally enforceable contract and 2.) it is possible to estimate the percentage of the project complete, revenues and costs.
    Under this method, there are two ways revenue recognition can occur:
    Using milestones such as number of railway track complete
    A construction company is paid $100,000 to build fifty miles of highway. For every mile the company completes, it is going to recognize $2,000 in revenue on its income statement ($100,000 / 50 miles = $2,000 per mile.)
    Cost incurred to estimated total cost
    Using this metric, the construction company would approach revenue recognition by comparing the cost incurred to-date by the estimated total cost. For example: The business expects the same $100,000 of highway to cost it $80,000 in parts, material, labor, etc. At the end of the first month, it has spent $5,000 working on the project. $5,000 is 6.25% of $80,000; therefore, it would multiply the total revenue ($100,000) by the percentage of the cost incurred (6.25%), or $6,250, and recognize this amount as revenue on its income statement.
    One caveat: if you find yourself reading through the 10K of a company that is utilizing the percentage of completion revenue recognition method, you may want to watch out for premature booking of expenses such as the purchase of raw goods. Until the goods have actually been used in the production cycle (e.g., pouring the actual concrete on the job site, not purchasing the concrete at Home Depot), the cost should not be counted. A business that does not make this distinction is prone to overstate revenue, gross profit, and net income for the period as a result.
    Reward if useful to u

  • HELP: AR Open Invoices Conversion with Revenue Recognition (Daily Revenue)

    Hi,
    I need some help on Conversion of AR Open Invoices with Accounting Rules in R12, Here the client wanted to use Daily Revenue Schedule rule,
    I am developing Functional Specification Document (CV.040); Need to understand the Assumptions, Approach and Which data needs to be extracted from Legacy System.
    Appreciate your reply at the earliest
    Thanks
    Ravi

    Anil,
    Thanks for your response, Here are the answers to your questions.
    1) The invoices that you want to convert - Do they already have revenue recognition on them?
    Ans: Yes they have Revenue Recognition On Them.
    2) Are you bringing only Open Invoices? What about Invoices that are closed (paid), but still have unrecognized revenue on them? DO you want to bring them
    over? If no, how will be mage the recognition of those invoices?
    Ans: We want to bring only Open Invoices. i.e the following scenarios want in Data Extraction
    a) Invoice is Fully Paid (REC is Zero) and Unearned is Full Invoice Amount, Revenue is 0
    b) Invoice is Partially Paid (REC is Partial) and Unearned is Partial, Revenue is partial
    c) Invoice is fully Paid (Rec is Zero) and Unearned is Partial and Revenue is Partial
    d) We do not want to bring the invoices with Fully Paid and Fully Recognized, Unearned is Zero
    3) What about partially paid invoices? How do you want to bring them in?
    Ans: See above scenarios.
    4) Do you want to bring in all Invoice details,or just bring in a summary line with the outstanding amount?
    we assume only Summary, but if the Invoices with Several Lines and Different Accounting Rules, We may have to bring them too
    Appreciate your response; Suggest some possibilties?
    Thanks
    Ravi

  • Price Change for Revenue Recognition

    Dear experts,
    I am using Revenue Recognition of type B with Revenue Recognition before invoicing.
    I have an issue/question about the way price changes are treated in the functionality.
    The below example is used to describe the issue for your understanding:
    1.Pricing master data: $100/EA
    2.Price of item in sales order: $100/EA
    3.Qty in sales order: 10 EA
    4.Delivery & Goods issue: 10 EA
    5.Revenue Recognised (VF44) for: $1000
    Accounting Entry:
    DR Unbilled Accounts Receivable $1000
    CR Revenue $1000
    6.Change in pricing master data: $120/EA
    7.Partial Invoice for: 2 EA @ $120/EA
    Accounting Entry:
    DR Customer $240
    CR Unbilled Accounts Receivable $240
    8.Partial Invoice for balance qty: 8 EA @ $120/EA
    Accounting Entry:
    DR Customer $960
    CR Unbilled Accounts Receivable $760
    CR Deferred revenue $200
    9.Subsequent Revenue Recognition (VF44)
    Accounting Entry:
    DR Deferred revenue $200
    CR Revenue $200
    As you can see in the example above, the amount of the price difference is not credited to sales in step 7. From what I have seen so far the additional amount due to price difference gets credited to sales only after the total invoice value for the item exceeds the revenue recognized.
    Is there any option to set the system so that the price difference is taken into account for revenue recognition during each invoicing (even
    when the invoicing is partial) ?
    Thanks in advance for your help.

    The price difference will not go to Sales in Step 7.  The reason being Revenue Recognition works on the item rather than the amount.  Since you have run F-44, the system finds the same in Unbilled Receivables and posts to that account.
    For updating the price changes, you have to run VF46 to cancel the original RR entries.  In this case, it will just clear of the RR lines if realization has not happened and post a reversal if realization has happened.  This txn will also create a new RR line for VF44 which you can process.
    Refer Note 820417 Implementation guide for RR.  Download the attachments and look into Part2 doc page 13.  This explains how to deal with price changes in sales document.
    Hope this helps.
    Ravi.

Maybe you are looking for

  • I can't get embedded formm to align properly on page

    Code html>     <body> <script type="text/javascript" src="https://formscentral.acrobat.com/Clients/Current/FormsCentral/htmlClient/scripts/adobe.for m.embed.min.js"></script> <script type="text/javascript">;ADOBEFORMS.EmbedForm({formId:"7WcAFl3ql65lZ

  • Multiple faces-config files

    can i have more than one faces-config.xml files in one web application ... e.g. I have my custom configs defined in my-faces-config.xml and I am using third party components whose configs are specified in their-faces-config.xml Can both of these co-e

  • IDVD disappeared

    I have a MacBook Pro with Mac OS X version 10.6.8.  It's about 2 years old.  I used to have iDVD, I even made a DVD project about 6 months ago.  Today I look to try to edit this project and I see that iDVD is completely missing from my computer. I ca

  • Can't download Lion from Recovery Disc

    So this all started when i wanted to upgrade to Mountain Lion. I went to the app store and purchased the app and the download started. It took about 45 minutes and when it finished and I tried to install it failed because it said the download was cor

  • Acrobat 8 reinstall invalid serial number?

    I bought CS3 in 2007.Recently did a trial of CS6 which updated Acrobat. Played around with it then uninstalled. Just reinstalled Acrobat 8 from original disk, but it is saying "Invalid Serial Number". Help?