Updating Financial Periods

Hello to all,
i am developing the addon, and i have to update the financial period from my code. i have a  problem in getting the particular finance period from table OFPR and OACP.
i have the following code, it will update the last record of OACP and OFPR Table, but my problem is that, whatever the user wants to update, he should be able to do so.
                                        SAPbobsCOM.PeriodCategoryParamsCollection oPeriodCategoryColl = null;
                                        SAPbobsCOM.PeriodCategoryParams oPerCategory = null;
                                        SAPbobsCOM.FinancePeriod oFinancePeriod = null;
                                        SAPbobsCOM.FinancePeriods oFinancePeriods = null;
                                        oPeriodCategoryColl = oCompanyService.GetPeriods();
                                                                                int Count = oPeriodCategoryColl.Count;
                                            for (int i = 0; i < Count; i++)
                                               if (i == Count - 1)  //this is for updating the last financial period (only for test:)
                                                    //oPerCategory = oPeriodCategoryColl.Item(i);
                                                    oPerCategory = oPeriodCategoryColl.Item(i);  //this will filter out the unique period(for Eg: 2012 (Code)) in OACP(need to find out how?)
                                                    oPeriodCategory = oCompanyService.GetPeriod(oPerCategory);
                                                    //This is for updating the OACP Table
                                                    oPeriodCategory.FinancialYear = Convert.ToInt16(FsclYr);
                                                    oPeriodCategory.BeginningofFinancialYear = Convert.ToDateTime(StartOfFsclYr);
                                                    oCompanyService.UpdatePeriod(oPeriodCategory);
                                                    //This is for updating the OFPR i.e Financial Period
                                                    oFinancePeriods = oCompanyService.GetFinancePeriods(oPerCategory);
                                                    int financeCount = oFinancePeriods.Count;
                                                    for (int j = 0; j < financeCount; j++)
                                                        if (j == oFinancePeriods.Count - 1)  //this is for updating the last financial period (only for test:)
                                                            oFinancePeriod = oFinancePeriods.Item(j);//this will filter out the unique finance period(for Eg: 2012-10(Code)) in OFPR (need to find out how?)
                                                                                oFinancePeriod.PeriodCode = PeriodCode;
                                                            oFinancePeriod.PeriodName = PeriodName;
                                                            oFinancePeriod.PeriodIndicator = PeriodIndicator;
                                                            oCompanyService.UpdateFinancePeriod(oFinancePeriod);
Please help me

Based on the help the
>Public Sub UpdatePeriod( ByVal pIPeriodCategory As PeriodCategory )
updates a period category not the period !
I really do not know a method for updateing periods.
Regards,
J.
Ps:
You code to locate the period named  "2010-12" .  You can also apply AbsoluteEntry instead of PeriodName  to locate the Period by Abs Entry.
for (int j = 0; j < financeCount; j++)
    oFinancePeriod = oFinancePeriods.Item(j)
    if (oFinancePeriods.PeriodName = "2010-12") 
        oFinancePeriod.PeriodCode = PeriodCode;
        oFinancePeriod.PeriodName = PeriodName;
        oFinancePeriod.PeriodIndicator = PeriodIndicator;
        oCompanyService.UpdateFinancePeriod(oFinancePeriod);
Edited by: János Nagy on Mar 1, 2010 4:30 PM

Similar Messages

  • Checking the Financial Period

    Hi Everybody,
    Every time im trying to add a journalEntry it fails because of the dates.
    The dates are from 2004 and the current financial period that im working with is 2004 as well but it still fails.
    The financial period is the whole year so i dont need to check the month.
    Anybody has ideas about the reason for the failure?
    Ronen Racz

    Hi Rasmus,
    the code is not the problem because it works fine when the financial period is 2006 and the dates are also 2006.
    when i change all the dates and the period to 2004, it stops working...
    does it check the computer date or something like that?
    Ronen
    p.s.
    if you still want to see the code its the first message in there
    Re: adding and updating journalentries

  • Removing the Financial Period

    Hello to all,
    This is my 3rd post on this forum for the same Problem.
    I have developed an Add-On Which will ADD/Update the Posting Period to more than 40 Companies at a time, I Know it very well that, there is no method exposed by the SAP B1 for the removal of the Posting Period, but if any undesired posting period gets Added, then it will be very tedious removing  each and every financial period from GUI.
    I.e why i want to remove the financial period any way, if i want to remove the financial period by hitting the database directly, How can i found that the corresponding financial period is being used, as the financial period should not be removed if it is used already in other place.
    *Anyone please help me!!*
    With Regards
    Bikram

    Hi Bikram,
    You can get the list of existing Posting Periods from the OFPR table.
    You can check any document's FinncPriod to check if an Posting Periods was used or not.
    SELECT T0.* FROM [dbo].[OFPR] T0 -- Posting Periods
    SELECT T0.FinncPriod FROM [dbo].[OJDT] T0 -- Journal Entries
    SELECT T0.FinncPriod FROM [dbo].[OINV] T0 -- A/R Invoices
    SELECT T0.FinncPriod FROM [dbo].[ORCT] T0 -- Payment Incoming
    Best Regards.
    Vítor Vieira

  • Create Overlapping Financial Period

    Hi,
    my question is that ;
    - actual values to be stored, change based on the update period (I've monthly, weekly updated projects)
    - "store period performance" work with financial periods
    - for same time span monthly and weekly financial periods cannot be created. Error message says "The financial period timescale overlaps with an existing financial period. The financial period was not added."
    what is the solution ? How I can create these financial periods or any other way to store actuals ?
    thanks for replies ,
    hatice

    Overlapping financial periods is not currently possible.
    There is an outstanding enhancement request for this functionality to be added so I would contact Oracle and add yourself to:
    "Is there a way to put in overlapping financial periods? [ID 900334.1]"
    Only alternative I can think of is to create a separate database for weekly vs monthly financial periods. Maybe someone else has a more creative solution.

  • XL-Reporter - Financial Periods specified in row and column selections

    Hello to all,
    again I have no idea how to solve an XLR problem after I tried different ways with unwanted results and after trying to find suggestions in the samples and help files.
    As a result I need a report which looks roughly like this
           2007 2006 2005 ...
    Jan.
    Feb.
    Mar.
    Dec.
    where each cell of the matrix is the total of invoices of a selected customer over the month in the specified year.
    I mainly tried to solve this in two different ways.:
    1.)
    Definition of a parameter for finacial period: name=fp, dimension, type=financial period, attribute=code
    Column selection summary for each year: PER(code=YearAll(@fp)) resp. PER(code=YearAll(@fp-12)) ...
    Row selection expansion: BPA(CardCode=@customer) ARDT(Code=Invoice) PER(PeriodInYear=1:12) Group By PER.PeriodInYear
    In each cell of the matrix the data attribute =ixGet(SO_LineTotal) is specified.
    The cell in the first colum (month) of the matrix is =ixDimGet(PER; PeriodInYear).
    2.)
    No parameter for the financial period is defined;
    Column selection summary for each year: PER(Year=2007) resp. PER(Year=2006) ...
    The rest is the same as in 1.)
    As a result I actually get a matrix with a column for each year and a row for each month, where the first column is 1, 2, ..., 12 (this is OK).
    But for all 12 month I get the same value, which is the (correct) total value for the whole year!
    Where is the failure in my intuition?
    Many thanks for your help!
    Regards,
    Frank Romeni

    I found it works if I don't set the selection to period in the Column and row.   Here are my selections
    Row
    Row 8-9  Expanding
    PER( * )  Group By PER.PeriodInYear
    Row 9 Expanding
    FACT BPA( CardCode = @BPCode ) ARDT( Code = "Invoice" )
    Column
    Column C Expanding
    FACT FIG( SO_TaxDate >= "01/01/2007" ) PER( * )  Group By PER.Year
    then I use a Column total to total the row expansion of the SO_LineTotal  with =SUM( ixRef(C9,2) ) were C9 is the expanding SO_LineTotal.  Then I hide Row 9 in excel to hide the details.
    If you post your email I can send you the IXR report definition
    Dan

  • Quiery for Financial Period

    Hi All
    I have some doubts which my client encountered. pls give your valauble suggestions on this.
    We have just closed our Dec08 a/c.
    Normally, we have to perform balance carry forward  and carry forward customer vendor balance before we start the 2009 data entries.
    Our company has changed the financial period to 31 March  instead of 31 December.
    Therefore, the financial data for statutory audit will be from 01Jan08 to 31Mar09.
    We urgently need your advice on the following:
    1.Please advise what are the procedures and areas we have to change  due to the change of financial period
    2.When should we change the financial period setting in SAP? Now or after March 2009 closing?
    3.Should we perform the carry forward customer vendor balance before we capture Jan 2009 transactions?
    4.Should we perform balance carry forward before we capture Jan 2009 transactions?
    Pls advise on above issues.
    regards
    Suresh Naidu

    In our senario _ cost is booking cost centers and revenues booking concern profit centers .
    for Financial reporting requirment can I include secondary cost to profit and loss a/c
    what is the impact on the report
    exp: salary booking in primary cost,than Per hour man hour cost computed by costing dept for allocate to concern department
    it is cost center activity price we specify in kp26 at the time of pm order confirm it will confim the activity quandity price will from planning area only,  so for salaries in primary g/ls already captured, if we consider secondary it may double booking
    srinivasa reddy

  • Function Module to retrieve "Start date of Next financial Period"

    Hi,
    I am doing an accrual financial posting, I would like to know that is there any function module that I can call to retrieve "Start date of Next financial Period" ?
    Thanks.

    Hi,
    Try this below Function Modules
    MC_PERIODE_ZUM_DATUM
    MC_PERIOTAB_BT_FIRST_LASTDAY
    MC_PERIOTAB_TO_DAYTAB
    MC_PERIO_CONVERT_TO_WEEK_MONTH
    MC_PERIO_GET_FIRST_AND_LASTDAY
    Hope it wil helpful.
    Regards,
    Anki Reddy

  • How to show financial period value columns in p6 web

    hi, is it possible to bring in the column of financial period value (.i.e when we use store period performance) in p6 web as we do in p6 client?

    I don't believe you can view it as a column, but you can add it to the Gantt. I tested it and it works in that view. See below....
    To manually adjust the timescale, in the top section of the timescale header,
    click and release the mouse. Then, drag the horizontal arrow that appears.
    To change the timescale setting (for example, Quarter/Month or Financial
    Period), either right-click in the timescale header row or choose timescale
    increments from the Customize View Bars tab.
    Tip: If the Financial Period timescale option is available,
    choose it to display the range of financial periods defined in the Project
    Management module.

  • Retrieve "Start date of Next financial Period" and "Current Period"

    Hi,
    T-code: cne5
    I would like to display 2 new fields in cne5 report result:-
    1) Start date of Next financial Period
    2) Current Period
    I can used
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
         EXPORTING
              I_DATE         = SY-DATUM
              I_PERIV        = 'K4'
    But what is I_PERIV ?
    How can I retrieve the above fields value? Any Function Module that I can used?
    Appreciate helps!
    THanks a lot.

    Hi,
    Yes, i_periv is Fiscal Year Variant.
    From running OB37, I can see that V3 and K4 fiscal year variant. Which one should I used when calling the function module DATE_TO_PERIOD_CONVERT?
    Thanks!

  • Option to select different financial periods in report:S_ALR_87100185

    Hi All,
    1) Is it possible to have option to select different financial periods, in report: S_ALR_87100185
    2) Excel download functionality in report : S_ALR_87100185
    Regards,
    Samir Bhadekar

    hi,
    1) all periods are already shown on standard report
    2) GO to report seting of 3CST1 & go to output type tab switch on available on  selection screen, then once you ren report select classic report option & system allow to save from classic view to rquired format
    hope this will help you..
    Reg,
    Sam L.
    Edited by: sam Lesha on Jan 12, 2011 9:15 AM

  • What kind of financial periods exist in SAP? What is the relevant table for

    What kind of financial periods exist in SAP? What is the relevant table for that?

    Hi venumadhav
                    In FInancial Accounting , Period is during time that you post G/L account  and you have to close period after  end of period and you will see the balance each G/L Account in each period.
                     There are 12 normal period and 4 special period (normal case , but can be changed by configuration ).  normal period are Jan , Feb ,...Dec and Special period are the extended period that use for posting in special case .For example if you close period in Dec and you have to adjust G/L Account by auditor checking  , you can post G/L Account to special period . special period are 13,14,15,16.  12 may use for Audit , 13 may use for changing after Sending to audit and found something mistake . that 's sample.
                  normally there is posting date to control the period (BUDAT) in the table BSIS. if the posting date is in the during time of period , we can say this posting is in that period .
    posting date : 03.09.2007            period : 09    
    posting date : 30.11.2007            period : 11
    Regards
    Wiboon

  • Userexit for changing financial period(MONAT)

    Hello.
    We need to change financial period(BKPF-MONAT) on FI document which is created by Other Goods Receipts(Trcd:MB1C).
    In additoion, we also need to do it following documents.
    -Profit center document
    -FI-SL document
    Does anyone know how to handle this situation ?
    Thanks and Regards,
    S.Hirai

    Hello,
      Can I know how you have changed the monat field in bkpf table while creation of fi document.
    Regards
    Srinivas

  • Exchange rate should be a fixed rate instead of the updated financial rate.

    For import and reconciliation purposes the used exchange rate should be a fixed rate in stead of the updated financial rate.
    Customer want to use  u20AC 1 = $1.25 from now on as fixed rate for products validated in Euro in his system to convert into USD on  commercial invoice and or shipping invoice for shipments going into the US.
    Thanks in advance
    Jeewnath

    What is the exchange rate type used?  I think we can do it by exchange rate type M.
    Thanks
    Krishna.

  • Planning for Next financial period

    Dear all
    I am with a company which had gone live one year back
    I have just joined the CO team.  I want to know how
    we can generate a cost centrewise planning for various
    cost elements ( atleat primary cost elements ) based on
    the LTP run for the next financial period
    FYI  our financial year ends on 31 3 07. We are likely
    to get the sales forecast for 2007-08 sometime by
    mid Jan 07.  Given this input, when PP runs the LTP
    in say End Jan, what should I do to make the system
    compute the cost centre / primary cost element wise
    anticipated planned expenses based on  2007 - 08 sales
    forecast
    Grateful your expert advice
    Thanks and regards
    Murali

    Hello Sumithra,
    Please see below link.
    http://help.sap.com/saphelp_47x200/helpdata/en/08/5149cf43b511d182b30000e829fbfe/frameset.htm
    Reward points if helpful.
    Regards,
    Santosh

  • Primavera P6 - Earned Value/Financial Periods

    I am using a weekly financial period to record earned value and actuals (units) in P6 v7.0 and then reporting on a monthly (made up of whole weeks) period the earned value and actual cost, but am experioencing some odd numbers within my reports.
    For example, on the completion of a task, my reports are generating the following:
    Week 1 Period Earned Value Cost = $2,050
    Week 2 Period Earned Value Cost = ($2,050)
    This doesn't relate to any change in the % complete that would result in a negative earned value - particularly one that is of the same magnitude as the previous week.
    I'm also finding that the financial period data is not consistent over time.  For example, if I generate a report for two months, the data within the weekly periods is not consistent with that generated in previous months:
    Previous report:
    Prior Period Earned Value Cost = $26,000
    Month 1 Period Earned Value Cost = $62,000
    New report:
    Prior Period Earned Value Cost = $26,000
    Month 1 Period Earned Value Cost = $52,000  (which should be $62,000)
    Month 2 Period Earned Value Cost = $25,000  (which shoud lbe $15,000)
    So far, I've been unable to identify the cause of this, but it appears that we're getting some sort of carry over effect between financial periods.
    Does anyone have any ideas what is causing this and how to fix it?  Any help would be greatly appreciated.

    Hi,
    Thank you very much for your quick reply..
    Unfortunately there is no data in the suggested tables (ACTIVITYSPREAD, PROJECTSPREAD) though the values have been posted already (Budgeted values and Earned values) against the projects.
    I request you please suggest, are there any other tables available to search the above data ..? if there please suggest.
    Regards,
    Srikanth.

Maybe you are looking for

  • Getting messagingException

    Hi, I am writing a simple client program to read mail using IMAP protocol but , I am getting following exception. I did search on net but didn't find any solution . Please help me out. javax.mail.MessagingException: A4 NO There is no replica for that

  • Can't render preview on some clips

    In my timeline I've got a bunch of clips - some have yellow lines above them in the render bar, some red, some green.  And then some have no lines at all, it's these that are the problem. When I tell it to 'render preview' it will make all the clips

  • Video file how to stop and find Video is completed.

    hi we have load the .flv file the following code: //=================================== var vid:Video = new Video(310, 174); vid.y=24; vid.x=308; addChild(vid); var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetS

  • Active Directory Operation on Disater Recovery Drill

    Hye everybody, Need some advice from you guys, i'll have to be ready for the DR Drill in upcoming week, my concern is this scenario, if we have a PDC in HQ, DC (GC) some branchs, and also DC (GC) in DR site. So when we do the DR operation where we di

  • Global Exception Handler

    Hello, I've implemented the Global Exception Handler how is saying at http://www.adobe.com/devnet/flex/articles/global-exception-handling.html Some errors are being catched by it, and others not. I looked at another thread here, but for him, the Debu