{"id":4862,"date":"2014-04-29T15:42:07","date_gmt":"2014-04-29T10:12:07","guid":{"rendered":"http:\/\/erpschools.com\/?p=4862"},"modified":"2014-04-29T15:42:07","modified_gmt":"2014-04-29T10:12:07","slug":"gl-account-balance","status":"publish","type":"post","link":"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance","title":{"rendered":"GL Account Balance"},"content":{"rendered":"<p>GL Account Balance:<\/p>\n<p>The below SQL gets the beginning balance and ending balance of the specified GL Account for a giver ledger and period.<\/p>\n<p><code><br \/>\nSELECT gcc.concatenated_segments Code_combination,<br \/>\n  SUM(NVL(gb.begin_balance_dr,0)-NVL(gb.begin_balance_cr,0)) beginning_bal,<br \/>\n  SUM(NVL(gb.begin_balance_dr,0)-NVL(gb.begin_balance_cr,0) +<br \/>\n            (NVL(gb.period_net_Dr,0) - NVL(gb.period_net_cr,0))) end_bal<br \/>\nFROM gl_balances gb,<br \/>\n  gl_code_combinations_kfv gcc<br \/>\nWHERE gb.code_combination_id = gcc.code_combination_id<br \/>\nAND gcc.CONCATENATED_SEGMENTS = '01-000-1110-0000-000' -- Enter GL Account<br \/>\nAND gb.ledger_id             = 1 -- Enter the Ledger<br \/>\nAND gb.Actual_flag           = 'A'<br \/>\nAND gb.period_name           = 'Dec-13' --Enter the Period<br \/>\nAND gb.currency_code         = (SELECT currency_code FROM gl_ledgers WHERE ledger_id = gb.ledger_id)<br \/>\nGROUP BY gcc.concatenated_segments;<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GL Account Balance: The below SQL gets the beginning balance and ending balance of the specified GL Account for a giver ledger and period. SELECT gcc.concatenated_segments Code_combination, SUM(NVL(gb.begin_balance_dr,0)-NVL(gb.begin_balance_cr,0)) beginning_bal, SUM(NVL(gb.begin_balance_dr,0)-NVL(gb.begin_balance_cr,0) + (NVL(gb.period_net_Dr,0) &#8211; NVL(gb.period_net_cr,0))) end_bal FROM gl_balances gb, gl_code_combinations_kfv gcc WHERE gb.code_combination_id = gcc.code_combination_id AND gcc.CONCATENATED_SEGMENTS = &#8217;01-000-1110-0000-000&#8242; &#8212; Enter GL Account AND gb.ledger_id = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-4862","post","type-post","status-publish","format-standard","hentry","category-scripts"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>GL Account Balance - erpSchools<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prudhvi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance#article\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance\"},\"author\":{\"name\":\"Prudhvi\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512\"},\"headline\":\"GL Account Balance\",\"datePublished\":\"2014-04-29T10:12:07+00:00\",\"dateModified\":\"2014-04-29T10:12:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance\"},\"wordCount\":27,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"articleSection\":[\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance\",\"url\":\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance\",\"name\":\"GL Account Balance - erpSchools\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#website\"},\"datePublished\":\"2014-04-29T10:12:07+00:00\",\"dateModified\":\"2014-04-29T10:12:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/erpschools.com\/erps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GL Account Balance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/erpschools.com\/erps\/#website\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"name\":\"erpSchools\",\"description\":\"Oracle Apps\",\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/erpschools.com\/erps\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\",\"name\":\"erpSchools\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"contentUrl\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"width\":250,\"height\":60,\"caption\":\"erpSchools\"},\"image\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/facebook.com\/erpschools\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512\",\"name\":\"Prudhvi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g\",\"caption\":\"Prudhvi\"},\"sameAs\":[\"http:\/\/www.erpschools.com\"],\"url\":\"https:\/\/erpschools.com\/erps\/author\/prudhvi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GL Account Balance - erpSchools","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance","twitter_misc":{"Written by":"Prudhvi","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance#article","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance"},"author":{"name":"Prudhvi","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512"},"headline":"GL Account Balance","datePublished":"2014-04-29T10:12:07+00:00","dateModified":"2014-04-29T10:12:07+00:00","mainEntityOfPage":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance"},"wordCount":27,"commentCount":0,"publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"articleSection":["Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance#respond"]}]},{"@type":"WebPage","@id":"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance","url":"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance","name":"GL Account Balance - erpSchools","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/#website"},"datePublished":"2014-04-29T10:12:07+00:00","dateModified":"2014-04-29T10:12:07+00:00","breadcrumb":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/erpschools.com\/erps\/scripts\/gl-account-balance#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/erpschools.com\/erps"},{"@type":"ListItem","position":2,"name":"GL Account Balance"}]},{"@type":"WebSite","@id":"https:\/\/erpschools.com\/erps\/#website","url":"https:\/\/erpschools.com\/erps\/","name":"erpSchools","description":"Oracle Apps","publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/erpschools.com\/erps\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/erpschools.com\/erps\/#organization","name":"erpSchools","url":"https:\/\/erpschools.com\/erps\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/","url":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","contentUrl":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","width":250,"height":60,"caption":"erpSchools"},"image":{"@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/facebook.com\/erpschools"]},{"@type":"Person","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512","name":"Prudhvi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g","caption":"Prudhvi"},"sameAs":["http:\/\/www.erpschools.com"],"url":"https:\/\/erpschools.com\/erps\/author\/prudhvi"}]}},"_links":{"self":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/4862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/comments?post=4862"}],"version-history":[{"count":0,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/4862\/revisions"}],"wp:attachment":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/media?parent=4862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/categories?post=4862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/tags?post=4862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}