Create Closing Balance via SDK

Hi All,
Similar to the Opening Balance - oAccountsService.CreateOpenBalance(oOpenningBalanceAccount, oGLAccounts) -, the ability to create Closing Balances postings through SDK would be very useful.
B1's closing period functionality is not flexible enough to allow the standard Portuguese closing period procedure.
Regards,
Vítor Vieira

Hi Martin,
It's not a legal requirement issue. It's a functionality issue.
Portuguese Period Closing (or Year End) procedure is usually executed by steps. Each of these steps consists of a Template.
An example:
1st Step: Close Cost Accounts - there's a template stating all the Cost Account to close and to which is the Closing Account
    61xxx   to   81xxx
    62xxx   to   81xxx
2nd Step: Close Profits Accounts - there's a template stating all the Profit Accounts to close and which Closing Account to use;
    71xxx   to   82xxx
    72xxx   to   82xxx
(more steps)
n-1th Step: Result postings
    81xxx  - 82xxx    to   84xxx
n th Step: Year Closing
84xxx + 85xxx + ...   to  89xxx
If we have the ability to create Closing Balance via SDK, we can create these procedures ourselves.
Regards,
Vítor Vieira

Similar Messages

  • Creating action log entry for incident via SDK in C#

    Hi,
    Does anyone have any example code, or pointer to, of how to add an action log entry (with icon) to an incident? I can't work out what the target for the relationship should be or how to configure it...
    With Thanks,
    Rob

    Anton,
    Thanks for your response! I think the problem may be in how I'm creating "WorkItemMP". In the method below I'm trying to pass in an issue Id parameter to add an action log item to an Issue. 
    How are you creating the  "WorkItemMP"?
    public
    void
    UpdateActionLog(string
    nsId)
    EnterpriseManagementGroup
    emg1 = new
    EnterpriseManagementGroup("server01.xyx.com"
    ManagementPackClass
    classIncident = emg1.EntityTypes.GetClass(new
    Guid(SYSTEM_WORKITEM_INCIDENT_CLASSS));
    // A604B942-4C7B-2FB2-28DC-61DC6F465C68
    EnterpriseManagementObjectProjection
    incidentProjection = new
    EnterpriseManagementObjectProjection
    (emg1, classIncident);
    ManagementPack
    WorkItemMP = emg1.ManagementPacks.GetManagementPack(new
    Guid("DD26C521-7C2D-58C0-0980-DAC2DACB0900"));
    //System.WorkItem.Incident.Library MP
    CreatableEnterpriseManagementObject
    cemoIncident = new
    CreatableEnterpriseManagementObject(emg1,
    classIncident);
    cemoIncident[classIncident,
    "Id"
    ].Value = nsId;
    ManagementPackClass
    typeActionLog = emg1.EntityTypes.GetClass("System.WorkItem.TroubleTicket.ActionLog"
    , WorkItemMP);
    CreatableEnterpriseManagementObject
    objectActionLog = new
    CreatableEnterpriseManagementObject
    (emg1, typeActionLog);
    objectActionLog[typeActionLog,
    "Id"].Value
    = Guid
    .NewGuid().ToString();
    objectActionLog[typeActionLog,
    "Description"].Value
    = "Incident updated via SDK.\n"
    objectActionLog[typeActionLog,
    "Title"].Value
    = "Incident updated via SDK"
    objectActionLog[typeActionLog,
    "EnteredBy"].Value
    = "Administrator"
    objectActionLog[typeActionLog,
    "EnteredDate"].Value
    = DateTime
    .Now.ToUniversalTime();
    ManagementPackEnumeration
    enumeration6 = WorkItemMP.GetEnumerations().GetItem("System.WorkItem.ActionLogEnum.TaskExecuted"
    objectActionLog[typeActionLog,
    "ActionType"
    ].Value = enumeration6.Id;
    ManagementPackRelationship
    relationship2 = emg1.EntityTypes.GetRelationshipClass("System.WorkItem.TroubleTicketHasActionLog"
    , WorkItemMP);
    if
    (incidentProjection != null
    incidentProjection.Add(objectActionLog, relationship2.Target);
    incidentProjection.Commit();

  • GL account opening/closing balances by day

    Hi All.
    I wish to list day by day opening and closing balances of G/L account by restricting the result to a time interval.
    Anyone know how to write the query for G/L account opening & closing balances by day?
    I found this in the forum and modify it to below:
    declare @fr char(10)
    declare @to char(10)
    set @fr=convert (char(10),[%0],20)
    set @to=convert (char(10),[%1],20)
    declare @PrCl dec(19,6)
    declare @de dec(19,6)
    declare @cr dec(19,6)
    declare @acc char(20)
    declare @Pracc char(20)
    Create table #W
      (M char(10), Acc char(20), Me char(100), Tid char(10), Br char(10), TT char(30), Op dec(19,6),De dec(19,6),Cr dec(19,6),Cl dec(19,6) )
    Insert into #W (M,Acc,Me,Tid,Br,TT,Op,De,Cr,Cl)
    SELECT convert (char(10),T1.[RefDate],20)Mo, T1.[Account],T0.Memo, T0.TransId, T0.BaseRef, CASE
    WHEN T0.TransType = 13 THEN 'AR Inv'
    WHEN T0.TransType = 14 THEN 'AR CN'
    WHEN T0.TransType = 18 THEN 'AP Inv'
    WHEN T0.TransType = 19 THEN 'AP CN'
    WHEN T0.TransType = 24 THEN 'Incoming Payment'
    WHEN T0.TransType = 30 THEN 'JE'
    WHEN T0.TransType = 46 THEN 'Outgoing Payment'
    ELSE 'Other'
    END AS 'Trans Type',
      0,T1.[Debit] De , T1.[Credit] Cr,0
    FROM OJDT T0 INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId
    Group by T1.[Account],convert (char(10),T1.[RefDate],20),T0.Memo, T0.TransId, T0.BaseRef, T0.TransType,  T1.Debit, T1.Credit
    Order By T1.[Account],convert (char(10),T1.[RefDate],20)
    Declare cu cursor for
    Select acc,de,cr from #W
      for update
    set @PrAcc=''
    Open cu
    Fetch next from cu into @acc,@de,@cr
    While @@FETCH_STATUS = 0
    Begin
    If @acc!=@PrAcc set @PrCl=0
    Update #W
       set op=@PrCl,
           cl=@PrCl-@Cr+@de
      where current of cu
    set @PrCl=@PrCl-@Cr+@de
    set @PrAcc=@acc
    Fetch next from cu into @acc,@de,@cr
    End
    deallocate cu
    Select * from #w
    Where M between @fr and @to
    Drop table #W
    but some of the rows are missing from the result. e.g. row with the same value of debit/credit ( same TransId and BaseRef) will come out once only in the result.
    Please guide me on the above issue.
    Thanks & Best Regards,
    Leng

    Hi,
    You have to make use of many tables for this purpose.
    1. You have to claculate the previuos period and finscal year for the given date..
    2. You have to calculate the G/L balances for this period for the given G/L account from table GLT0.(You can use some of the standard function modules for the same)
    3. You have get the line items from the various tables like BSIS,BSAS,BSIK, BASK, BSID and BSAD for the dates from the begining of the month to the given date-1. sum upthis amount with the amount retrieved from step 2 .This will be the opening balance for the given date.
    4.retrieve the data from he same tables like step 3 for the given date. This will the transactions of the given date.
    5. sum up  the amounts from step 4 with step 3. this will be the closing balance for that date.
    let me know id you want any further info..
    Reward the points if i answered your question..

  • Calculate closing balance

    Hi everyone,
    I've got a problem with writting a formula wich will calculate a closing balance for each account side, I mean debet and credit. In my SQL database I've got columns with: OpeningBalanceDt, OpeningBalanceCt , DtTurnover, CtTurnover, IDaccount and TIMEID.
    When I create a Calculated Field:
    BalanceDt:=IF(([OBDt+Dt]-[ObCt+Ct])>0;[OBDt+Dt]-[ObCt+Ct];0)
    BalanceCt:=IF(([ObCt+Ct]-[OBDt+Dt])>0;[ObCt+Ct]-[OBDt+Dt];0)
    it works for particular account eg:11575, but it doesn't when I remove filter and check global account nr 111 (then I have per account result).
    Do you have any idea what formula I need to write to have a proper view it pivot table for both account side ? Meaby I need to create a calculate column not filed...
    The problem concerns the fact that pp check columns globally and then compare calculeted sum. In this case global sum of BalanceDt has a higher value than BalanceCt so the final balance is Dt.
    In excel I can calculate 2 columns:
    =if((OBDt+Dt-(ObCt+Ct))<=0;0;OBDt+Dt-(ObCt+Ct))
    =if((OBCt+Ct-(ObDt+Dt))<=0;0;OBCt+Ct-(ObDt+CDt))
    and when I create a sum I've got a proper result. Maybe the solution will be in grouping the accounts and then conduct a comparision.
    Thanks in advice,
    Paul

    Hi,
    I will change a subject a little bit. Now I have the following columns:
    ObrotyKontID, WN, MA, BO_WN, BO_MA, KontoFinansoweID, KontoSyntetyczneID and TIMEID. Guy from ERP wrote two formulas which works perfect in system and calculate closing balance for each account side:
    Debit
    Sum(Filter(existing[KontoAnalityczne],[Measures].[ObrotyWNNar]>[Measures].[ObrotyMANar]),[Measures].[ObrotyWNNar]-[Measures].[ObrotyMANar])
    Credit
    Sum(Filter(existing[KontoAnalityczne],[Measures].[ObrotyWNNar]<[Measures].[ObrotyMANar]),[Measures].[ObrotyMANar]-[Measures].[ObrotyWNNar])
    and 2 more formulas to calculate Debit and Credit
    ObrotyWNNar
    Sum(StrToMember("[Czas].[Miesiąc].&["+left(Tail(existing [SET_Data]).Item(0).Properties("KEY"),4)+"01]"
    ):StrToMember("[Czas].[Miesiąc].&["+left(Tail(existing [SET_Data]).Item(0).Properties("KEY"),6)+"]"
    ),[Measures].[ObrotyWN]+[Measures].[BO WN])
    ObrotyMANar
    Sum(StrToMember("[Czas].[Miesiąc].&["+left(Tail(existing [SET_Data]).Item(0).Properties("KEY"),4)+"01]"
    ):StrToMember("[Czas].[Miesiąc].&["+left(Tail(existing [SET_Data]).Item(0).Properties("KEY"),6)+"]"
    ),[Measures].[ObrotyMA]+[Measures].[BO MA])
    I have got the same sum in ObrotyWNNar by forumla
    =[WN]+[BO_WN]
    and ObrotyMANar by
    =[MA]+[BO_MA]
    However I can't create proper formulas in powerpiwot which calculate Debit and Credit.  I suppose that I need to use some agregate formulas like SUMX.
    If anyone have any idea ?
    Thanks in advice,
    Paul

  • Opening Balance and closing balance

    Dear All,
                 Can i create a calculated field for ledger opening balance and closing balance. we are using  epicor. I dont know the exact table which captures opening balance and closing balance, where as i got credit balances and debit balances for the segments, i could not find opening and closing balances in this table. table name is GLjrntdtl . Any ideas on this subject please.
    Thanks & Regards,
    Akram

    hi Akram,
    this is a question that you may wish to ask at the epicor forums
    -jamie

  • Opening balance and closing balances for discounts?

    Hi all,
    I have a typical sceanario where in
    opening balance for discounts 10,000 (balance of last month)
    actual discounts  from the sales order 5,000
    manual upload is   from flat file            2,000
    closing balance is 7,000 (which is opening balance + manual upload - actual discounts)
    opening and closing balance needs to be calculated, how to calculate nor handle this on every month?
    level of granularity of the data is
    sku, month, rebate category and rebate amount?
    Thanks

    Hi Pooja,
    can you please let us know few things about your report requirements
    What is the extractor you are using?
    What are the KFs ?
    what are the selection parameters that you want to enter at the reporting level?
    is it the report related to FI AR. do you want to display the values based on the customer -->profitcenter?
    Bcoz we had a same requirement where our requirement was global recievables aging report in which the report need to display opening bal, sales,adjustment,colelction and closing balance and the aging values.
    here what we did is changed the modeling of the DSO and infocube.
    we had used non-cumulative KF in order to calculate closing balance and from that derived opening balance and again create a new formula to get the closing balance.
    if you can be specific with your requirement hope can help you with your report.

  • Cash Flow Statement - Opening and Closing balances!

    Dear Friends,
    I have created cash flow statement (Indirect Method) using T code FSI1 and FSI4 (Form)..........but i am not able
    Why wouldnu2019t Cash and Cash Equivalents at the End of the Year (Fiscal 2008) be EXACTLY equal to Cash and Cash Equivalents at the Beginning of Year (Fiscal 2009)...?
    How do we need to set up for Cash for Current year closing balances and Next year's opening balances....?
    Thanks,
    Elan N.

    Hi,
    I tested in ECC6.0 and i could able to do so, you try as mentioned below.
    In the output screen of MB5B, goto menu details > click on list > select save > select file > select spreadsheet. Here you can save tthe output in excel format.
    Regards,
    Prabu

  • Trying to get the Opening and Closing Balance, 0TOTALSTCK and 0VALSTCKVAL

    Hi Experts, Good Day.
    I am developing a query for Stock Balances, Using Custom cube created with copy from 0ic_c03.
    I am trying to get the Opening and Closing Balance, based on Non-Cumulative KF - 0TOTALSTCK and 0VALSTCKVAL.
    Both The KF's Behaviour for Exception Aggregat. = Last Value
    I am using VARIABLE OFFSET as -1 to get Opening Balance, and just restriction for Closing Balance based on 0CALMONTH
    Unfortunately i am getting data for the periods which does not have data in my Cube. It is taking the total value as closing balance for the periods which we don't have transaction in the cube.
    For Ex. I have data for 09.2010 & 10.2010 a particular material, when i enter 08.2010 as input i am getting the total value of the material.
    I hope you understand the problem and solution soon.
    I will give you more explanation if needed.
    Thanks in Advance....
    Have a great Day Ahead.....
    GopalN

    Hi GopaIN,
    can you explain us process you have done about initialization of data (2LIS_03_BX, cube compression)? it seams like there was data before 09.2010 and you load it with 2LIS_03_BX data source. That data is not in cube, but just used for update markers.
    Edited by: Sasa Todorovic on Mar 25, 2011 9:48 AM

  • RG1 register opening balance and closing balance updation

    Hi All,
    We are using the RG1 register recently i.e. after the Functional Upgrade (ECC 6.0). While executing J2I6 RG1 Excel report, opening balance and closing balance is not appearing in the report even though we have done the J1I5 extraction.
    Is it mandatory to update the J_2IRG1BAL table with zero stock as and when the new material codes are created.
    Regards,
    Praveen

    HI
    Yes it is mandatory to update the table J_2IRG1BAL with material form and opening stock etc. for all the new materials
    EXGRP: Excise group of the material
    DATUM: Date from which you want RG1 report i.e. 01.01.2004
    MATNR: Material
    FORM:  P for packed, L for loose. note that the same material cannot be maintained as both packed and loose.
    WERKS: Leave it blank
    Maintain all relevant opening balance fields. These fields start with OP
    Note 951955 - CIN: General clarifications for RG1 goods*
    check the above note
    regards
    Prashanth

  • How to calculate opening and closing balance for period

    Hi all,
    i have to find out opening and closing balance.
    the table structure of temporary table is
    select * from hwcn_xn_fa_report_temp1 where asset_id=10029400
    PERIOD_COUNTER CST_OP_BAL CST_ADDITION CST_TRANSFER CST_DISPOSAL COST_CLOSING_BALANCE
    24108 0 0 0
    24109 12000
    24110 0 0 0
    24111 0 0 0
    in this table cst_op_balnce and cost_closing_balace is null
    i have display cost_op_bal and cost_closing_balnce
    cost_closing_balance=cst_op_bal+cst_addition+cst_transfer+cst_disposal
    for period 2408 op_balnce=0 closing_bal=0
    for period 2409 op_balnce=0 closing_balce=1200
    for period 2410 op_bal=1200 closing_bal=1200
    closing balance of dec will be opening bal of jan
    thanks and regards
    Edited by: user10664276 on Apr 19, 2009 11:08 PM
    Edited by: user10664276 on Apr 19, 2009 11:13 PM

    Hi,
    user11118871 wrote:
    Can you explain what that is? Thank you if you have one example.
    ROWS BETWEEN  UNBOUNDED PRECEDING AND 1 PRECEDING
    When you use the analytic SUM (c) function, then, on each row, it returns the values of column (or expression) c from several rows in the result set added together.
    Which rows? That depends.
    If the analytic clause (the part in parentheses after OVER) does not include ORDER BY, then it is all rows.
    If the analytic clause has an ORDER BY clause, but no windowing clause (that is, ROWS BETWEEN ... or RANGE BETWEEN ...), then the rows included in the sum are all rows up to and including the row where the function is being called (as sorted by the analytic ORDER BY).
    If the analytic cluase has both ORDER BY and a windowing clause "ROWS BETWEEN x PRECEDING AND y PRECEDING", then the rows included in the sum are the rows from x to y rows before the one where the function is called.
    Do some experiments with different values of x and y.
    First, create a table like the one in the problem above, but simplified a little.
    CREATE TABLE     test_sum
    (      period     NUMBER
    ,      new_amt     NUMBER
    INSERT INTO test_sum (period, new_amt) VALUES (24108,     1);
    INSERT INTO test_sum (period, new_amt) VALUES (24109,     4);
    INSERT INTO test_sum (period, new_amt) VALUES (24110,     2);
    INSERT INTO test_sum (period, new_amt) VALUES (24111,     8);
    INSERT INTO test_sum (period, new_amt) VALUES (25001,     32);
    INSERT INTO test_sum (period, new_amt) VALUES (25002,     16);
    COMMIT;The original problem above used names that were meaningful for its application, and columns that have nothing to do with the SUM function. Let's simplify the former and lose the latter.
    That problem involved the SUM of three columns added together. Since we just want to understand how the windowing clause works, let's simplify that to one column.
    With these simplifications, my original query is:
    SELECT       period
    ,       new_amt     
    ,       SUM (new_amt) OVER ( ORDER BY          period
                                         ROWS BETWEEN  UNBOUNDED PRECEDING
                                 AND          1            PRECEDING
                        ) AS opening_balance
    ,       SUM (new_amt) OVER ( ORDER BY          period
                        ) AS closing_balance
    FROM       test_sum
    ORDER BY  period;Given the data above, it produces these results:
    .   PERIOD    NEW_AMT OPENING_BALANCE CLOSING_BALANCE
         24108          1                               1
         24109          4               1               5
         24110          2               5               7
         24111          8               7              15
         25001         32              15              47
         25002         16              47              63So, for example, on the row where period=24110,
    opening_balance=5, which is the total of new_amt from all rows up to but not including that row: 5=1+4, and
    closing_balance=7, which is the total of new_amt from all rows up to and including that row: 7=1+4+2.
    To really understand how the windowing clause works, do some experiments. Change the definition of opening_balance to include " BETWEEN x PRECEDING AND y PRECEDING". You'll find that:
    (a) "UNBOUNDED PRECEDING" means the same as "n PRECEDING", where n is greater than the number of rows in your result set.
    (b) "CURRENT ROW" means the same as "0 PRECEDING"
    (c) x must be greater than or equal to y
    (d) neither x nor y can be negative (but you can use "FOLLOWING" instead of "PRECEDING" to get the same effect).
    For more, see the introduction to "Analytic Functions" in the [SQL Language manual|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions001.htm#sthref972]
    When you're finished, don't forget to
    DROP TABLE     test_sum;

  • Closing balance of january to be carried forward as February opening bal.

    Hi Gurus,
            I am looking for the script logic which helps me to carry the closing balance of a month to the next month as opening balance. Please can anyone help me with the code.
    Thanks in advance.
    Regards,
    KumarMG
    Edited by: KumarMG on Jun 7, 2011 4:40 PM

    Hi Kumar,
    From consolidation perspective, carry forward is a period-end activity and has to be done every period. CATEGORY dimension has a property called OPENING_PERIOD which can be used to define the source period from where you want to copy the data. The target period is defined as variable in the data manager package. So you have to run it for each period.
    Normally, we bring closing balances from ECC (or any other source system) and also load supplemental movements types (F_120 etc). Then we use default logic (as shown below) to check the data integrity and post differences in error flow.
    [ACCDETAILDIM].[#F_ERR] =IIF([ACCOUNTDIM].CURRENTMEMBER.PROPERTIES("DIMLIST1")="L1_E",  [ACCDETAILDIM].[F_999] - [ACCDETAILDIM].[F_100] - [ACCDETAILDIM].[F_120] + [ACCDETAILDIM].[F_140],0)
    Say if you are loading periodic data from source systems (ECC) and want to calculate the closing balance from openings/movements then you can create a script logic for the same. You can also use transformation rules and post the closing balances.

  • Opening vs closing balance of the bank does not match

    Hi expert,
    I have loaded 2 bank statements via transaction FF_5. (for Spain)
    When looking at transaction FEBA, I see that the opening balance of today is not the same as the closing balance of yesterday.
    What could be the problem?
    Thank you for providing your feedback.
    Kind regards,
    Linda

    Good morning,
    Thank you.
    It seems that both bank statements are the same, with the same value date
    How can it be that 2 statements which have the same values can be loaded?
    The ID in FEBA is different.
    Thank you.
    Kind regards,
    Linda

  • EBS Importing Opening / Closing Balances

    I am Importing EBS via transation FF.5 (APACS EBS), the file is importing all details except the Opening Balance and Closing Balance.  I have checked Algorithm and they are set up.   Using 4.7 Enterprise.  Has anyone got any suggestions.

    Hi,
    There are various t. code to check line items for vendor like: S_ALR_87012103 but Any table is not helping to check opening/closeing balance for vendor.
    Table BSIK and BSAK are having are records for open items and close items for vendor and system calculate the balance by using these tables.
    Regards,
    Vinod

  • Getting Opening & Closing Balance in Customer Ledger Report

    Hi Guys.
    I am developing a report of Customer Ledger. There I have to display the Opening Balance & Closing balance of individual customers on m onthly basis.
    I have date related objects
    1. Fiscal Year/Period,
    2. Fiscal Year Variant,
    3. Posting Date,
    4. Clearing Date and
    5. Entry Date.

    I am sorry for the above posting...
    Hi Guys.
    I am developing a report of Customer Ledger. There I have to display the Opening Balance & Closing balance of individual customers on m onthly basis from debit amout and .credit amount.
    I have date related objects
    1. Fiscal Year/Period,
    2. Fiscal Year Variant,
    3. Posting Date,
    4. Clearing Date and
    5. Entry Date.
    I have created a variable on posting date with "interval". 
    Please let me know how to restict the keyfigures to get my report to display Opening & Closing Balance.
    ThanX in advance
    Peter

  • Insert and update query to calculate the opening and closing balance

    create table purchase(productid number(5) ,dateofpurchase date,
    qty number(5));
    create table inventory(invid number(5),productid number(5),
    idate date,openingqty number(5),closingqty number(5));
    Records in inventory:
    1,1,'01-jan-2009', 10, 20
    2,1,'03-jan-2009', 20, 30
    3,1,'04-jan-2009', 40, 50
    when I enter the purchase invoice for 15 qty on 02-jan-2009
    after say '15-jan-09' , a new record should get inserted
    with opening balance = (closing balance before 02-jan-2009)
    and all the opening and closing balance for that product should
    get affected.
    If the invoice for 20 qty is entered for the existing date say
    '03-jan-2009' in inventory , then the closing balance
    for 03-jan-2009 should get updated and all the following records
    should get affected.
    I need the insert for the first one and update query for the
    second one.
    Vinodh

    <strike>You can do this in one statement by using the merge statement</strike>
    Hmm, maybe I spoke too soon.
    Edited by: Boneist on 25-Sep-2009 13:56
    Thinking about it, why do you want to design your system like this?
    Why not simply have your purchases table hold the required information and then either work out the inventory on the fly, or have a job that calls a procedure to add a row for the previous day?
    If you continue with this design, you're opening yourself up to a world of pain - what happens when the data doesn't match the purchases table? Also when is the inventory cut-off to reset the opening/closing balances? Monthly? Annually? Weekly? If it's set to one of those, what happens when the business request the inventory for a particular week?
    Edited by: Boneist on 25-Sep-2009 13:59

Maybe you are looking for