Trial Balance between two effective_date

HI,
i am new to OBIEE. i have to create Trial Balance between two effective_date.
filter should be: from effective_date: date1, to effective_date: date2.
report should show following columns:
company (group by this column), sum(accounted_cr) between date1 and date2, sum(accounted_cr) to date1 (like opening balance).
i made repository file. but i can't filter as i need. could anyone help me?
Thanks
Sebuhi

na

Similar Messages

  • Difference in GL Balances between two Standard Report fbl3n and fagll03

    Hi ,
    Mismatch of balances between two standard report ie.fbl3n and fagll03 . We are giving the complete example of what we are facing right now ... please go through the examples .
    ENTRY NO. 1
    We have posted one MIRO , Accounting Posting is as below : -
    PK         Description    Amount       
    86         GR/IR             1000.00               
    31         Vendor           -800.00
    50          TDS               -200.00
    ENTRY NO. 2
    We have Reversed the MIRO through MR8M , Accounting Posting was as below : -
    PK         Description     Amount       
    21         Vendor             800.00
    40          TDS                 200.00
    96          GR/IR            -1000.00
    But in Standard report FAGLL03 , .The line items of above twoi entries under GL " TDS " are showing in this way  : -
    Doc No.      PK      Ammount
    Entry 1       50          -200.00
    Entry 2       40          -200.00 -
    > ?????
    *OPEN ITEMS          - 400.00----
    > ?????
    Although in other Standard report FBL3N , the same are showing correctly as shown below
    Doc No.      PK      Ammount
    Entry 1       50          -200.00
    Entry 2       40          +200.00
    *OPEN ITEMS                0.00
    PLEASE HELP
    Regards
    Soumitra Bhattacharya

    Hi
    FAGLL03 - Display/Change Items (New)  - this report is related to ledger reporting purpose.  this reports is available after ECC 5.0.
    FBL3N - is line item display - this is only GL reports (not in ledger reporting)
    if you find any difference is values please check the report variant you are using and ledger you are activated.
    hope this will help you.
    Regards
    Ram

  • Load balancing between two routers

    I have two routers connected through the LAN connection. The first one is using as routing protocol EIGRP, the other one is part of the managed service and I do not have access to it. I would like to make a load balancing between the two of them by redistributing the static routes in EIGRP. When I tried this, I am loosing the EIGRP entry for this route in the routing table. I would like to have both of them , so we could have traffic sharing. I appreciate if you give me any hints.

    Raju,
    you have two choices as far as I can see. If you want to use static routing over the WAN to your branch, you could duplicate your static routes to the branch and point them to the secondary router. You will have two identical sets of static routes in the primary router, one set pointing to the WAN interface and the other one pointing to the secondary router.
    ip route x.x.x.x "WAN-interface"
    ip route x.x.x.x "secondary router"
    ip route y.y.y.y "WAN-interface"
    ip route y.y.y.y "secondary router"
    etc.
    As a result the primary router will have two routes to the branch and will load-balance. If one next-hop fails (either the WAN interface or the secondary router), only the other will be used. If the next-hop comes back up, load-balancing will resume.
    The other choice would be to use EIGRP over the WAN, and make sure the two routers become EIGRP neighbors. Then you can use the "variance" command to achieve unequal cost load-balancing between the two routers. Let me know if you need more information about this, but i think static routes will be sufficient in your situation.
    HTH, Thomas

  • Load balancing between two interfaces on 2811

    Hi,
    We have a 2811 router with VPN and NAT configured. We have two internet connection from different ISPs. The speed of our original connection is 2MB up and down. The speed of our new connection is 1MB up and down. We want to configure load balancing between the two connections. Our new ISP has provided us with a CISCO 837 router. We want to connect that router into our 2811 on one of the free WIC card and then configure load balancing between the two interfaces on our 2811. The third interface has a local address configured. Please suggest where to start. I tried searching on net for any configuration example but I was unable to find any particular example with commands. I am new on CISCO platform. Any help will be hugely appreciated. Thanks in advance.

    Raju,
    you have two choices as far as I can see. If you want to use static routing over the WAN to your branch, you could duplicate your static routes to the branch and point them to the secondary router. You will have two identical sets of static routes in the primary router, one set pointing to the WAN interface and the other one pointing to the secondary router.
    ip route x.x.x.x "WAN-interface"
    ip route x.x.x.x "secondary router"
    ip route y.y.y.y "WAN-interface"
    ip route y.y.y.y "secondary router"
    etc.
    As a result the primary router will have two routes to the branch and will load-balance. If one next-hop fails (either the WAN interface or the secondary router), only the other will be used. If the next-hop comes back up, load-balancing will resume.
    The other choice would be to use EIGRP over the WAN, and make sure the two routers become EIGRP neighbors. Then you can use the "variance" command to achieve unequal cost load-balancing between the two routers. Let me know if you need more information about this, but i think static routes will be sufficient in your situation.
    HTH, Thomas

  • Vendor /Customer Trial Balance between a particular date

    HI
    Is there a standard report in SAP which provides Vendor/Customer Trial balance. We are using the standard  SAP Reports for
    Vendor S_ALR_87012082 Vendor balances in local Currency
    Customer S_ALR_87012172 Customer Balances in local currency
    We also need to filter the data in Trial Balance based on profit centers. All our plants are created as profit centers
    Regards
    Sanil Bhandari

    na

  • Opening and closing balance between 2 dates

    hi.
    i am facing a problem while fetching the opening and closing balance for a particular G/L account.
    In my  program  i am entering G/L account for a date range i.e, between two dates and i want opening and closing balance for these 2 date ranges.
    So, please tell me is there any function module to fetch opening and closing balance between two dates.
    Regards,
    ROHINI.K.

    Hi Rohini,
                 Check this FM :   BAPI_GL_GETGLACCPERIODBALANCES.
    If we use this functional module, we will get opening and closing balance of corresponding G/L Acc.
    (e.g)
    CALL FUNCTION 'BAPI_GL_GETGLACCPERIODBALANCES'
        EXPORTING
          companycode                   =  '1000'
          glacct                              = '0000548101'
          fiscalyear                         = '2007'    
         currencytype                      = '10'
       IMPORTING
    BALANCE_CARRIED_FORWARD       =  gs_bal-balance
         RETURN                                        =  v_return
        TABLES
          account_balances                            = gt_bal.

  • One trial balance out of two company codes

    Our clinet has two company codes in legacy system, now we are implimenting SAP.
    In legacy system, company codes are combined into one overall trail balance. Once in SAP they will there be two separate LEu2019s. Will they be required to apply transfer pricing methodology for intercompany movements between themselves ?.
    Please advise how to configure this?
    How to have a one trial balance out of two company codes?

    Please note you have a few questions - I would recommend a single post per question to make it easier for others to answer.
    Please note - people will not share config guides or notes so you may want to ask a particular question around transfer pricing.
    If you have 2 Company Codes in ERP 6, that have the same controlling Area, FSV you can produce trial balances for more than one company code by activating the new GL.
    It seems your client is new to SAP, therefore the new GL will be activated as standard. The standard transaction F.01 allows for a single trial balance for 2 company codes, that have the same CoA, Controlling Area and currency.

  • Trial Balance for combination of two years

    In our company we follow fiscal year of January to December to report to the foreign holding company. For Statutory requirements we prepare financial statements for April to March. How do we extract trail balance for April to March which falls in two different years?

    Hi Pranav,
    You need to build custom report which takes GL balances from two years. e.g. Trial balance of FY2013-14 would need data from 1st April 2013 to 31st March 2014.
    SAP standard report will give GL balances only for one fiscal year (Jan-Dec).
    For custom report, you may consider GL balance from totals table for (April-March) period.
    Thanks,
    Mayank

  • Mismatch Between Audit Report And Trial Balance

    Hi all,
    There is a difference between Inventory Audit Report And Trial Balance figure.
    how to match both the things ?
    Thanking you
    Malhaar

    Hi,
    If there is no manual transation then you can then check the following page:
    [Inventory valuation Checkup|https://websmp204.sap-ag.de/~sapidb/011000358700001515052008]
    There is a script in the link which provides you the determination of the database or the system which could present inconsistent inventory values between stock audit reports and general ledger stock accounts, resulting in potential asset valuation discrepancies.
    Check the link. You would be needing S-user ID and password for it.
    Check Note No. : 1563308 as well.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Load-Balancing between Foreign and two Anchors

    Hi, we have two foreign controllers (one active, one standby) and two anchor controllers. All APs are connected to the active foreign controller. The layer 3 networks for the wlan clients on both anchors are different for the same SSID. SSID: Internet, anchor 1: Subnet A, anchor 2: Subnet B. So when a client is getting anchored to Anchor 1, the clients will get an ip from subnet A and when the client is getting anchored to anchor 2, the client will get an ip from subnet B.
    This is so far not a big problem because we only have a few accesspoints in some rooms. But what will happen, when we have a full covered wlan and the client roams from one AP to the other AP? Is there a possibility, that the client will anchored to a different anchor while roaming? I think this will result in a lack of connectivity because without a real disconnect the client will not ask for a new IP address.
    Other question: Is it possible to disable this load-balancing between anchor controllers? Or can i make a client sticky to only one anchor as long as an access-session is established?
    All controllers are 5760 with 3.3.3 software.

    Hi acontes, 
    It's an interesting question. 
    In this case, if all AP's are on WLC-A and there is no possibility that an L3 inter-subnet roam will occur between WLC-A and WLC-B, I would just forward WLC-A to Anchor A and WLC-B (in the event of fail over) to Anchor B (if Anchors reside on different subnets). If you must specify Anchor A and Anchor B on each WLC for redundancy purposes, it's important to understand the guidelines and limitations with regard to Foreign / Anchor Design.  
    As Scott mentioned, the limitation with Anchoring design is that there is no primary / secondary configuration for an Anchor on the Foreign WLC.
    If WLC-A has two entries (1) for Anchor-A and (2) for Anchor-B, the EoIP tunnels are establish and load-balancing occurs in a round robin fashion.
    Keep in mind the following with regard to guest N+1 redundancy:
    •A given foreign controller load balances wireless client connections across the list of anchor controllers configured for the guest WLAN. There is currently no method to designate one anchor as primary with one or more secondary anchors.
    •Wireless clients that are associated with an anchor WLC that becomes unreachable are re-associated with another anchor defined for the WLAN. When this happens, assuming web authentication is being used, the client is redirected to the web portal authentication page and required to re-submit their credentials.
    Since traffic is transported at Layer 2 via EoIP, the first point at which DHCP services can be implemented is either locally on the anchor controller or the controller can relay client DHCP requests to an external server. Since the IP address directly correlates to the DMZ subnet or the interface where the traffic egresses, it is possible for some clients to get IP's from both Subnet A or Subnet B in the event that WLC-A is building EoIP to both anchors.
    1) What happens if my clients roam?
    Nothing... since all AP's are on WLC-A, it's Intra-Controller Roaming
    Each controller supports same-controller client roaming across access points managed by the same controller. This roaming is transparent to the client as the session is sustained, and the client continues using the same DHCP-assigned or client-assigned IP address. The controller provides DHCP functionality with a relay function. Same-controller roaming is supported in single-controller deployments and in multiple-controller deployments.
    Would it be better to choose the same DHCP Pool on both anchors?
    It's probably better to have redundant anchors on the same subnet, but it's not required. 
    3) How would you design this :-)
    WLC-A <--EoIP--> Anchor A (DHCP Pool A)
    WLC-A <--EoIP--> Anchor B (DHCP Pool A)
    It's important to remeber what Scott mentioned about the lack of a primary / secondary relationship. If multiple controllers are added as mobility anchors for a particular WLAN on a foreign controller, the foreign controller internally sorts the controller by their IP address. The controller with the lowest IP address is the first anchor. For example, a typical ordered list would be 172.16.7.25, and 172.16.7.28. If the first client associates to the foreign controller's anchored WLAN, the client database entry is sent to the first anchor controller in the list, the second client is sent to the second controller in the list, and so on, until the end of the anchor list is reached. The process is repeated starting with the first anchor controller.
    If any of the anchor controller is detected to be down, all the clients anchored to the controller are deauthenticated, and the clients then go through the authentication/anchoring process again in a round-robin manner with the remaining controller in the anchor list. This functionality is also extended to regular mobility clients through mobility failover. This feature enables mobility group members to detect failed members and reroute clients.

  • Difference between Asset Register and Trial Balance

    Hai Guys,
    Our client went live in the year 1999. At present they are in Ver. 6.0 but New GL is not activated.
    There is a situation where some of the Asset accounts have a difference between the amounts shown by the Asset Register and the amounts shown by the Trial Balance.
    The issue was written to SAP support team. I was told about a special T code (ABF1) which is not available through the standard menu. But the same can be used only if we need to change the GL in line with the Asset accounting and that too if the GL balance is less than the Asset accounting balance. But, in our case, the situation is such that the GL figures have been freezed for the year end and cannot be changed.
    In such a situation, SAP support replied me about a program RACORR05 which will give the missing line items in asset accounting. If I run the same, it is giving a output of some document numbers and I am not exactly understanding the same.
    The balance has been carried over for quiet some years and it is of no used to go into those years and find out the reason for the difference. Now, the Asset accounting is to be set in line with the GL balances and that too without hitting the GL balances by any way. I know that the same is difficult.
    But will any of you be able to help me in this regard as I have tried all ways out but could not find a solution.

    Hai Paul,
    Thanks for your reply. I have already gone through the note 69225. In our case, the requirement is to align the Asset Accounting without hitting the GL balances of the concerned assets which is a difficult situation. When contacted, the SAP Support team has given a program RACORR05, which outputs some list of documents which are existing both in GL and AA. I do not understand the output. I have seen all the related notes in this regard. The difference has been carried over for quiet some years and there is no use in going into the details of the reason for the difference as the years are already closed.
    The total difference as between asset Register and GL is around 55 lacs (GL balance is less than asset register balance) and the difference in accum. depreciation is around 43 Crores (!!!!!!!!) (Balance as per Asset Register is less than the GL balance).
    Is there any way out to resolve this. can I handle this using AS92 (Legacy asset transfer values). But I need to change the Legacy asset transfer date for this. I hope the same is not advisable in a live company code. Please comment on the same as to whether it can be done.
    THanks again for your reply.

  • How do I load balance TFTP between two servers and a client on the same subnet?

    Hi,
    I have trawled through several documents and tried umpteen different configs, all to no avail. I have a PXE boot client trying to access a boot file via TFTP from a couple of TFTP servers on the same VLAN/subnet. For HA purposes I want to load balance the two TFTP servers.
    Config is currently;
    =====
    probe icmp ICMP_PROBE
      description icmp probe for default gateway tracking
      interval 5
      passdetect interval 15
    rserver host server1
      description Server1
      ip address 10.0.0.1
      inservice
    rserver host server2
      description Server 2
      ip address 10.0.0.2
      inservice
    serverfarm host serverfarm_01
      description servers used
      probe ICMP_PROBE
      rserver server1
        inservice
      rserver server2
        inservice
    class-map match-all L4_VIP_TFTP
      10 match virtual-address 10.0.0.10 udp eq 69
    policy-map type loadbalance first-match L7_TFTP
      class class-default
        serverfarm serverfarm_01
    policy-map multi-match L4_LB_VIP_POLICY
      class L4_VIP_TFTP
        loadbalance vip inservice
        loadbalance policy L7_TFTP
        loadbalance vip icmp-reply active
    nat dynamic 1 vlan 200
    interface vlan 200
      ip address 10.0.0.250 255.255.255.0
      nat-pool 1 10.0.0.241 10.0.0.243 netmask 255.255.255.255 pat
      service-policy input L4_LB_VIP_POLICY
      no shutdown
    ip route 0.0.0.0 0.0.0.0 10.0.0.254
    =====
    I have read the doco by Ivan Kovacevic amongst many others but as my clients and servers are on the same subnet, the config doesnt work.
    Can anybody point me in the right direction please. The devices are ACE 4710 running A3(2.3).
    Thanks

    Try using the following configuration:
    Note: Please make sure to configure also a udp probe to probe udp port 69, in case the application is down.
    You need to configure a management policy on the interface when using a UDP probe.
    That is because, when port 69 on the server will be unreachable, the server will send an ICMP unreachable.
    ACE will consider a udp probe as "failed" only when it sees ICMP unreachable.
    Without a management policy-map, the ICMP unreachable message will be dropped.
    Also, add an ICMP probe to the rserver because udp probe will not be enough when the physical interface will be down.
    That is because UDP is a connection-less protocol. To consider a UDP probe successfull, ACE need to see NO answer from the server in respose to the probe.
    The ACE will not see any answer from the server when the interface is down and thus, will consider the probe as "sucessful".
    With ICMP probe attached to the rserver, you also test the reachability of the server and not only the UDP port.
    Here is the configuration (of course, you can chage the names of the of the objects to the name you are using if you want) :
    access-list ALL line 10 extended permit ip any any
    probe udp TFTP
      port 69
      interval 5
      passdetect interval 15
    probe icmp ICMP_PROBE
      interval 5
      passdetect interval 15
    rserver host TFTP_1
      ip address 10.0.0.1
      probe TFTP
      probe ICMP_PROBE
      inservice
    rserver host TFTP_2
      ip address 10.0.0.2
      probe TFTP
      probe ICMP_PROBE
      inservice
    serverfarm host TFTP-SFARM
      rserver TFTP_1
        inservice
      rserver TFTP_2
        inservice
    sticky ip-netmask 255.255.255.255 address source TFTP-STICKY
      timeout 10
      replicate sticky
      serverfarm TFTP-SFARM
    class-map type management match-any MANAGE
      2 match protocol icmp any
    class-map match-all NAT
      2 match virtual-address 0.0.0.0 0.0.0.0 udp any
    class-map match-all TFTP
      2 match virtual-address 10.0.0.10 udp eq 69
    policy-map type management first-match MANAGE
      class MANAGE
        permit
    policy-map type loadbalance first-match ROUTE
      class class-default
        forward
    policy-map type loadbalance first-match TFTP-POL
      class class-default
        sticky-serverfarm TFTP-STICKY
    policy-map multi-match TFTP-MULTI
      class TFTP
        loadbalance vip inservice
        loadbalance policy TFTP-POL
        nat dynamic 1 vlan 212
      class NAT
        loadbalance vip inservice
        loadbalance policy ROUTE
        nat dynamic 2 vlan 212
    interface vlan 212
      ip address 10.0.0.250 255.255.255.0
      no normalization
      access-group input ALL
      nat-pool 1 10.0.0.241 10.0.0.243 netmask 255.255.255.0 pat
      nat-pool 2 10.0.0.10 10.0.0.10 netmask 255.255.255.0 pat
      service-policy input TFTP-MULTI
      service-policy input MANAGE
      no shutdown
    Let me know how it goes.
    Good luck!

  • What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?

    Hi Guys,
    What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?
    I have to write an AP Invoice Aging Report in Discoverer to show all unpaid invoices that have been transferred into GL... Business wants it to match one-to-one with the AP Trial Balance standard report...
    Business wants to run the report for any date in a past...
    The report has two parameters:
    As Of Date - the same as As of Date for the AP Trial Report
    Trial Balance Run Date - the date when Trial Balance was run...
    Conditions are:
    TRUNC(Invoice Date) <=TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    TRUNC(NVL(Payment Date,'01-JAN-5000')) > TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    TRUNC(Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
    Distr Accounting Date <= TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    NVL(Distr Creation Date,Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
    Show_Flag = 'YES', where:
    Show_Flag = CASE WHEN ( NVL(Cancelled Date,'01-JAN-1901') > NVL(:As Of Date,SYSDATE) AND NVL(Inv Amount Aud,0) = 0 ) THEN 'YES' ELSE ( CASE WHEN NVL(Inv Amount Aud,0) = 0 THEN 'NO' ELSE 'YES' END ) END
    There is a difference between the logic of my report, and the logic of AP Trial Balance...
    Could you please advise what I'm missing?
    Thanks,
    Iana

    What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10? You can get the code by opening the report in Reports Builder and get the query.
    Or, enable trace/debug as per (FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]).
    Thanks,
    Hussein

  • Trial balance report - general question

    Hi,
    This is the first time that I am using the trial balance report (to compare it with a Discoverer report that was built for another purpose).
    If I am running a trial balance for the end of May, and an account has a payment due in June, then the account does not appear in the report.
    The user feels that it really should.
    Can someone explain to me the purpose of the trial balance, i.e. if the report is supposed to only show the balance of due invoices or of any invoice that is not fully paid?
    Thank you.
    Leah

    Hi John,
    First, let me explain that we have an aging report that was written and our user is comparing it with the trial balance report. This is how the whole thing began. There is too big a difference. Yesterday, our user suggested that we run the trial balance for May since there is too much activity happening now in June.
    I decided to run a trial balance for the first of February 2010 figuring that was plenty safe. One of the customers listed had 4 invoices in the report. One invoice that was missing, though, was an invoice from January 17, 2010 that was paid (GL date) March 28, 2010. (There are others like that). The question: should it have been listed or not? It was in the aging report which our user felt was correct.
    Being (I assume-maybe I am wrong) that the trial balance report was not written just for our company, I am assuming that it must be correct otherwise there would be complaints from all over. That is why I finally turned to the forum to try to get an understanding. If the trial balance is correct, then the user cannot compare the aging report with the trial balance. If it is not correct, then we must turn to Oracle.
    Is there some information that I should look for from the missing invoice that I gave as an example that would explain it not appearing in the report?
    Thank you.
    Leah
    I would just like to add that I just noticed that there is another invoice from January 17th that IS in the report. It is also paid on March 28th. The only difference between the two invoices that I see, is in the distributions. The one that is in the report has the amount split between ITEM and TAX while the one that is not in the report has the full amount as type ITEM. Both have Withholding Tax as 0.
    Sorry for these added comments. We had an electricity problem all day at work (I am at home right now) but someone suggested that the invoice that is missing might have had a creation date AFTER the first of February even though the invoice day was in January and that is why it does not appear. I will not be able to check it until I am at work tomorrow (which will be around 10:00GMT).
    Thanks.
    Edited by: user476771 on Jun 21, 2010 9:52 PM
    Edited by: user476771 on Jun 21, 2010 10:21 PM
    Edited by: user476771 on Jun 22, 2010 5:41 AM

  • Building Trial Balance Report. Please help

    Hello guys,
    I have a trial balance report which reports over more than one period (say between jan and march).
    I have registered functions to get the opening and closing balance. Then included total debits and credits for each period. I'd like to think I've done this successfully and to the best of my knowledge.
    However for some code combinations I see an opening balance (say 1,000,000) , total credits 0, total debits 5,000 and closing balance 400,000. What I mean basically is, the figures do not seem to tally. When I analyze the account from GL inquiry the total debits and total credits are exactly as shown in my report. Can anyone help me with this or maybe anyone with a better query. I am doing this project on 11i.
    Many Thanks.
    Here are my functions:
    create or replace function get_open_balance
    (p_code_combination_id in number,
    p_set_of_books_id in number,
    p_period_name in varchar2)
    return number
    is
    v_open_balance number := 0;
    begin
              SELECT
    nvl(sum(bal.begin_balance_dr - bal.begin_balance_cr),0)
    INTO v_open_balance
              FROM gl_code_combinations_kfv cc
              ,gl_balances bal
              WHERE
              cc.code_combination_id = bal.code_combination_id
              AND cc.code_combination_id = p_code_combination_id
              AND bal.period_name = p_period_name
              AND bal.set_of_books_id = p_set_of_books_id
              ORDER by
              cc.concatenated_segments;
    return v_open_balance;
    exception
    when no_data_found then
    return 0;
    when others then
    return 0;
    end get_open_balance;
    create or replace function get_close_balance
    (p_code_combination_id in number,
    p_set_of_books_id in number,
    p_period_name in varchar2)
    return number
    is
    v_close_balance number := 0;
    begin
              SELECT
    nvl(sum(bal.begin_balance_dr - bal.begin_balance_cr +
    bal.period_net_dr - bal.period_net_cr),0)
    INTO v_close_balance
              FROM gl_code_combinations_kfv cc
              ,gl_balances bal
              WHERE
              cc.code_combination_id = bal.code_combination_id
              AND cc.code_combination_id = p_code_combination_id
              AND bal.period_name = p_period_name
              AND bal.set_of_books_id = p_set_of_books_id
              ORDER by
              cc.concatenated_segments;
    return v_close_balance;
    exception
    when no_data_found then
    return 0;
    when others then
    return 0;
    end get_close_balance;
    Then here is my query:
    select
    gcc.code_combination_id,
    gcc.concatenated_segments,
    gsob.currency_code,
    gsob.name sob_name,
    gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id,
    4, gcc.segment4) account_description,
    get_open_balance(gcc.code_combination_id, gsob.set_of_books_id, :p_period_from) opening_balance,
    nvl((select sum(entered_cr)
    from gl_je_lines gjl
    where gjl.code_combination_id = gcc.code_combination_id
    and gjl.status = 'P'
    and gjl.effective_date between to_date('01-' || :p_period_from)
    and last_day(to_date('01-' || :p_period_to))),0) credit,
    nvl((select sum(entered_dr)
    from gl_je_lines gjl
    where gjl.code_combination_id = gcc.code_combination_id
    and gjl.status = 'P'
    and gjl.effective_date between to_date('01-' || :p_period_from)
    and last_day(to_date('01-' || :p_period_to))),0) debit,
    get_close_balance(gcc.code_combination_id, gsob.set_of_books_id, :p_period_to) closing_balance
    from gl_code_combinations_kfv gcc, gl_sets_of_books gsob
    where gsob.chart_of_accounts_id = gcc.chart_of_accounts_id
    and gsob.set_of_books_id = nvl(:p_set_of_books_id, gsob.set_of_books_id)

    Excellent!
    Thank you very much.
    Here is the update (this is for R12. In 11i just replace bal.ledger_id in the get_open_balance and get_close_balance functions with bal.set_of_books_id):
    create or replace
    function get_open_balance
    (p_company in varchar2,
    p_code_combination_id in number,
    p_set_of_books_id in number,
    p_period_name in varchar2)
    return number
    is
    v_open_balance number := 0;
    v_currency_code varchar2(500);
    begin
    -- get currency code for the set of books
    begin
    select currency_code
    into v_currency_code
    from gl_sets_of_books
    where set_of_books_id = p_set_of_books_id;
    exception
    when others then
    null;
    end;
    -- get sum
    SELECT
    nvl(sum(bal.begin_balance_dr - bal.begin_balance_cr),0)
    INTO v_open_balance
    FROM gl_code_combinations_kfv cc
    ,gl_balances bal
    WHERE
    cc.code_combination_id = bal.code_combination_id
    AND cc.code_combination_id = p_code_combination_id
    AND bal.period_name = p_period_name
    AND bal.actual_flag = 'A'
    AND bal.translated_flag is null
    AND cc.segment1 = p_company
    AND bal.currency_code = v_currency_code
    AND bal.ledger_id = p_set_of_books_id
    ORDER by
    cc.concatenated_segments;
    return v_open_balance;
    exception
    when no_data_found then
    return 0;
    when others then
    return 0;
    end get_open_balance;
    create or replace
    function get_close_balance
    (p_company in varchar2,
    p_code_combination_id in number,
    p_set_of_books_id in number,
    p_period_name in varchar2)
    return number
    is
    v_close_balance number := 0;
    v_currency_code varchar2(500);
    begin
    -- get currency code for the set of books
    begin
    select currency_code
    into v_currency_code
    from gl_sets_of_books
    where set_of_books_id = p_set_of_books_id;
    exception
    when others then
    null;
    end;
    -- get sum
    SELECT
    nvl(sum(bal.begin_balance_dr - bal.begin_balance_cr +
    bal.period_net_dr - bal.period_net_cr),0)
    INTO v_close_balance
    FROM gl_code_combinations_kfv cc
    ,gl_balances bal
    WHERE
    cc.code_combination_id = bal.code_combination_id
    AND cc.code_combination_id = p_code_combination_id
    AND bal.period_name = p_period_name
    AND bal.actual_flag = 'A'
    AND bal.translated_flag is null
    AND cc.segment1 = p_company
    AND bal.currency_code = v_currency_code
    AND bal.ledger_id = p_set_of_books_id
    ORDER by
    cc.concatenated_segments;
    return v_close_balance;
    exception
    when no_data_found then
    return 0;
    when others then
    return 0;
    end get_close_balance;
    select
    gcc.code_combination_id,
    gcc.concatenated_segments,
    gsob.currency_code,
    gsob.name sob_name,
    gcc.segment3 account_code,
    gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id,
    3, gcc.segment3) account_description,
    get_open_balance(gcc.segment1, gcc.code_combination_id, gsob.set_of_books_id, :p_period_from) opening_balance,
    nvl((select sum(decode(gjh.currency_code, gsob.currency_code, entered_cr, accounted_cr))
    from gl_je_lines gjl, gl_je_headers gjh
    where gjl.code_combination_id = gcc.code_combination_id
    and gjh.actual_flag = 'A'
    and gjh.je_header_id = gjl.je_header_id
    and gjh.status = 'P'
    and gjh.ledger_id = gjl.ledger_id
    and gjl.status = 'P'
    and gjl.effective_date between to_date('01-' || :p_period_from)
    and last_day(to_date('01-' || :p_period_to))),0) credit,
    nvl((select sum(decode(gjh.currency_code, gsob.currency_code, entered_dr, accounted_dr))
    from gl_je_lines gjl, gl_je_headers gjh
    where gjl.code_combination_id = gcc.code_combination_id
    and gjh.actual_flag = 'A'
    and gjh.je_header_id = gjl.je_header_id
    and gjh.status = 'P'
    and gjl.status = 'P'
    and gjh.ledger_id = gjl.ledger_id
    and gjl.effective_date between to_date('01-' || :p_period_from)
    and last_day(to_date('01-' || :p_period_to))),0) debit,
    get_close_balance(gcc.segment1, gcc.code_combination_id, gsob.set_of_books_id, :p_period_to) closing_balance
    from gl_code_combinations_kfv gcc, gl_sets_of_books gsob
    where gsob.chart_of_accounts_id = gcc.chart_of_accounts_id
    and gcc.segment1 = :p_company
    and gsob.set_of_books_id = nvl(:p_set_of_books_id, gsob.set_of_books_id)
    Edited by: igwe on Jul 16, 2012 4:21 AM

Maybe you are looking for

  • How to print multiple items in SAPScripts

    Hi gurus, I have a list of items to print out in SAPScript but I can implement it. I've searched this forum for over a day and I can't find the correct answer. I post my code here. Hope you can help me. Thanks in advance. __P/S:__ I found that someon

  • How to dynamic order of groups & How to fetch data at runtime from database

    Post Author: ferikpatel CA Forum: Formula I am using visual studio .net application having inbuilt crystal report feature. Now, what I want to do is, i have create 5 groups in crystal report, but dynamically want to change the order of those reports

  • Strange Safari message....HELP

    My Ibook G3 is giving me a message i've never seen before: Safari can't open the page "(whatever page)". The error was "POSIX error" cannot allocate memory" (NSPOSIXErrorDomain:12) Please shoose Report Bug to Apple from the Safari Menu, note the erro

  • The Single Threaded Nature of Swing

    I am designing a program that uses the basic <i>Model View Controller</i> design pattern. The controller allows you to manipulate the <i>Model</i> and the <i>Views</i> then display a graphical representation of the <i>Model</i>. Any way I want to hav

  • FLV file size vs longer WMV file

    When I created a FLV file of a live presentation (narrator on screen demonstrating products, etc), it came out to 8 mb for a 320x240 window size. However, one of my trainers just recorded a Camtasia (or was it Captivate, we have both) presentation, w