Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Financial Management
Lawson S3 Financials
GLAMOUNTS and GLUNITS Tables
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Saef
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5226
People Online:
Visitors:
226
Members:
0
Total:
226
Online Now:
New Topics
S3 Systems Administration
ADFS certificate - new cert
12/3/2024 9:38 PM
The certificates on the windows boxes expired and
Lawson S3 HR/Payroll/Benefits
Post Tax Benefit Plan Table
11/14/2024 9:16 PM
Hi, totally new to Laswon. I have a repor
Lawson S3 Procurement
ED501 Error: Map 850 not supported by /law/c15vda/lawson/test10/edi/bin/laws_out_91
11/12/2024 3:47 PM
Tried runnning ED501 and getting the atathced erro
Lawson S3 HR/Payroll/Benefits
Error
11/6/2024 9:54 PM
When I try to enroll a retiree in 72.1 health plan
Infor ERP (Syteline)
Syteline: New Data Maintenance Wizard (Error) Need help
11/1/2024 4:24 PM
Hi, I need help with an error on syteline while us
Dealing with Lawson / Infor
Implementing Lawson v10 with Cerner Surginet, Case Cart Picking, and Quick Adds for the OR
10/29/2024 4:20 PM
Hi Everyone, I am wondering if there is any org
Lawson S3 HR/Payroll/Benefits
Canada Tax Calculation (Federal and Provincial) Issue
10/23/2024 5:00 AM
Initially, we had problem with CPP2 calculation is
Lawson S3 HR/Payroll/Benefits
CA Section 125 401k Plan
10/22/2024 10:13 PM
Does anyone have any recommendations on how to fac
S3 Systems Administration
Running AC120 deleted records from ACMASTER table
10/22/2024 3:40 PM
We recently ran the AC120 as normal and somehow it
Lawson S3 Procurement
RQ13 Approval Info
10/17/2024 2:12 PM
When a Requisition is approved on RQ13, what table
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1372
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Financial Management
Lawson S3 Financials
GLAMOUNTS and GLUNITS Tables
Please
login
to post a reply.
11 Replies
0
Subscribed to this topic
43 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
BShort
Basic Member
Posts: 13
6/28/2013 7:02 PM
I am using Crystal and have used these two tables independently. Now i am joining the tables as the report I am writing needs both sets of information at the department level. Here is my problem:
If an AU has both the amount accounts and the units accounts attached for example Salary accounts can have both amounts and units, I can get one or the other to pull correctly but not both when I play with joins. In the one report I have going, my salaried are tripple what they should be. I know it has to be a linkage issue but have tried I believe everthing.
I have these two tables and then one other one, GLMaster linking to both of these tables to be able to pull the accounts I need, etc easier by using the GLMaster since I could have units with amounts and vice versa.
How have others handled this join, if it is even possible.
I have almost picked the computer up and thru it outside a few times and have turned more gray.
:w00t:
Any help would be appreciated.
Thanks
Brian
ccarlson
Basic Member
Posts: 5
7/1/2013 11:13 PM
Brian:
Can you use an RW100 report as an input to your crystal report? We used to do this and with RW100, you don't need to do the SQL linking. It does take more processing time but if the report is small, it's not too bad.
If you need to do it in SQL here are some things that might help:
1. If your company has more than one defined COA in Lawson, be sure to choose 1 chart name in the Where clause.
2. Make sure you are linking Company, Accounting Unit, Account and Subaccount
3. Is fiscal year the problem? Try running for just one FY and see if that's the reason for duplicate entries.
4. You may need to do this in two queries that are then aggregated using a union and a third select clause:
4a. One query to get GLMaster and GLAMOUNTS - when you do this, do you get multiple records still - if so, see below)
4b. One query to get GLMaster and GLUNITS
4c. Join those two with a UNION
4d. Create a top level Select to combine those to (or do that in crystal).
5. If you are getting duplicate records with just GLMASTER and GLAMOUNTS query it sounds like you might want GLAMOUNTS to be on the left and do a left outer join.
Sorry if some of this is vague but hopefully it gives you some new ideas to try. Send me an e-mail if you'd like me to take a look at your query. There have been many times that my computer was at risk also! :)
Caroline
mark.cook
Veteran Member
Posts: 444
7/2/2013 11:22 AM
Have you tried pulling the values from GLCONSOL? It will give you the totals for both units and amounts based on the trans type. You would have to link in the GLNAMES to get AU name as it pulls it by Var level but this might get you closer than where you are.
BShort
Basic Member
Posts: 13
7/2/2013 11:53 AM
Mark
Thank you for the idea. I have used GLCONSOL a lot with my financial reporting as it is an easier table to use since I am wokring with company totals. I am looking for department totals on the bottom level and teh GLConsol does not go to that level, it goes to the level right above there so the AU does not show up. There may be another away around using that table to get to the AU amounts and units and I may relook at the linkage you suggest to see if that works.
Thanks
Brian
BShort
Basic Member
Posts: 13
7/2/2013 11:59 AM
Caroline
Thank you for the information. I can do RW100 reports, but can not use it as a datasource output as other end users will be running this report so this would have to be run over and over, so is not an option since I have other end users who do not have access to it.
By UNION are you referrring to subreports?
If so, I have thought about this and am not that good wtih subreports, but am under the impression it is hard to do calculations off a subreport information.
I have to also do some complicated formulas using the units for some additional ratios off the amounts.
The duplication issue is when there is an AU that has both an amount and a unit in the account, then I hit the duplication and wall. I think it is a linkage issue and have tried I believe all the linkage to find which one would work and none done. Let me take a look at your suggestions around number 4 down and see if it helps to figure it out further.
Thanks
Brian
ccarlson
Basic Member
Posts: 5
7/2/2013 1:18 PM
I was thinking about a union in the SQL itself. Not seeing the FROM clause, I thought it might be possible that you were getting duplications from the linking there that, if split, might be eliminated. Then, put the data back together in SQL with the union. Just a thought...
The.Sam.Groves
Veteran Member
Posts: 89
7/2/2013 2:51 PM
I may be teaching grandma to suck eggs here, but have you considered adding GLMaster twice to the report, Linking one copy to GLAmounts and one copy to GLUnits, then doing a full outer join on the two GLMasters?
Outside of brute forcing it in SQL, that would be my first go at it.
Deron
Advanced Member
Posts: 25
7/2/2013 3:09 PM
This is what I do...
SELECT nvl(gam.company, glu.company) AS company,
nvl(gam.fiscal_year, glu.fiscal_year) AS fiscal_year,
nvl(gam.acct_unit, glu.acct_unit) AS acct_unit,
nvl(gam.account, glu.account) AS account,
nvl(gam.sub_account, glu.sub_account) AS sub_account,
nvl(gam.db_amount_01 + gam.cr_amount_01, glu.db_units_01 + glu.cr_units_01) AS amount_01
FROM lawson.glamounts gam
FULL OUTER JOIN lawson.glunits glu
ON gam.company = glu.company
AND gam.fiscal_year = glu.fiscal_year
AND gam.acct_unit = glu.acct_unit
AND gam.account = glu.account
AND gam.sub_account = glu.sub_account
amynelson
Advanced Member
Posts: 25
7/2/2013 3:39 PM
This is what you need to do:
SELECT
X.COMPANY,
X.FISCAL_YEAR,
X.ACCT_UNIT,
X.ACCOUNT,
X.SUB_ACCOUNT,
SUM(X.AMOUNT) AS AMOUNT,
SUM(X.UNITS) AS UNITS
FROM(SELECT
GAM.COMPANY,
GAM.FISCAL_YEAR,
GAM.ACCT_UNIT,
GAM.ACCOUNT,
GAM.SUB_ACCOUNT,
GAM.DB_AMOUNT_01+GAM.CR_AMOUNT_01 AS AMOUNT,
0 AS UNITS
FROM lawson.GLAMOUNTS GAM
UNION ALL
SELECT
GLU.COMPANY,
GLU.FISCAL_YEAR,
GLU.ACCT_UNIT,
GLU.ACCOUNT,
GLU.SUB_ACCOUNT,
0 AS AMOUNT,
GLU.DB_UNITS_01+GLU.CR_UNITS_01 AS UNITS
FROM lawson.GLUNITS GLU)X
GROUP BY X.COMPANY,X.FISCAL_YEAR,X.ACCT_UNIT,X.ACCOUNT,X.SUB_ACCOUNT
Deron
Advanced Member
Posts: 25
7/2/2013 5:10 PM
The FULL OUTER JOIN will perform much better than a union.
BShort
Basic Member
Posts: 13
7/2/2013 6:32 PM
Thank you everyone for the response.
As a note, I do not know SQL so not sure how to try those items.
I just tried the linkage with putting the table in their twice and linking it as such and the salary data returned wacked up numbers once I added the units.
Everything is okay until I add the units then it blows up. So it tells me it is a linking issue possibly. I do not think I am trying to do the impossible but there may be another table needed but all the data is there between the three.
As a note, I do not need units for the salary accounts, it is just there because it is collected, but have limited by GLUNITS to the range needed. THese unit accounts being used do not have any dollar amounts associated with them.
It sounds as folks have been able to link these two tables without blowing up the units when there are units tied.
Here is what I have used as joins:
Company
AU
Acct
Var_Level
I have tired all of the different joins a an FYI as well and each can give different results.
I have tried using GLMaster to join GLAMOUTNS and GLUNITS, I did the double GLMaster and joined as suggested, and I have tried only using GLAMOUNTS and GLUNITS.
Right now none of the ways are working.
Any other possible ideas or thoughts?
Thanks
Deron
Advanced Member
Posts: 25
7/2/2013 6:40 PM
My suggestion, take one of the SQLmethods suggested above and have one of your DBAs create a view, then point your report at the view instead of the tables.
Please
login
to post a reply.