E1

jtlaser

Member
Hello,

I am a bit new to JDE, about two or three months of learning, so hopefully I use the correct terminology to describe my problem, and hopefully I'm in the correct forum. Also I believe my information is correct in my signature, please say something if it looks off.

So now to my problem. I am struggling with what I believe is File_I/O_Status reporting success an extra time, thus I'm getting A+B+B instead of A+B.

I'm using a LBF to print out my information, breaking on a change in AN8. I'm using tables F07830/F07831/F07832, all but one user for the year has one entry. I'm using a custom view with most columns selected and a join between F07830/F07831 on AN8 and DTEY.

<font class="small">Code:</font><hr /><pre>0019 F07830.Select
BC Date - YR = TK Date - YR
BC Address Number = TK Address Number
BC Type of W-2 = TK Type of W-2
0020 F07830.Fetch Next
VA rpt_mnSavedFedAddressNumber <- TK Address Number
VA rpt_cSavedFedTypeofW2 <- TK Type of W-2
VA rpt_mnWagesFederalAdjusted <- TK Amount - Wages, Federal Taxable Adjusted
VA rpt_mnAmountFederalTax <- TK Amount - Federal Income Tax
VA rpt_mnWagesSocSecAdjusted <- TK Amount - Wages, OASDI Taxable Adjusted
VA rpt_mnAmountSocSecTax <- TK Amount - OASDI Tax
VA rpt_mnWagesMedicareAdjusted <- TK Amount - Wages, Medicare Taxable Adjust
VA rpt_mnAmountMedicareTax <- TK Amount - Medicare Tax
VA rpt_mnTipsSocSecTaxable <- TK Amount - Tips, OASDI Taxable
VA rpt_mnAmountTipsAllocated <- TK Amount - Tips, Allocated
0021 VA rpt_cFedTypeofW2 = ""
0022 While SV File_IO_Status is equal to CO SUCCESS
0025 If VA rpt_cSavedFedTypeofW2 is not equal to VA rpt_cFedTypeofW2
0026 VA rpt_cSavedFedTypeofW2 = VA rpt_cFedTypeofW2
0027 VA rpt_mnGTWagesFederalAdjusted = [VA rpt_mnWagesFederalAdjusted]+[VA rpt_mnGTWagesFederalAdjusted]
0028 VA rpt_mnGTAmountFederalTax = [VA rpt_mnAmountFederalTax]+[VA rpt_mnGTAmountFederalTax]
0029 VA rpt_mnGTWagesSocSecAdjusted = [VA rpt_mnWagesSocSecAdjusted]+[VA rpt_mnGTWagesSocSecAdjusted]
0030 VA rpt_mnGTAmountSocSecTax = [VA rpt_mnAmountSocSecTax]+[VA rpt_mnGTAmountSocSecTax]
0031 VA rpt_mnGTWagesMedicareAdjusted = [VA rpt_mnWagesMedicareAdjusted]+[VA rpt_mnGTWagesMedicareAdjusted]
0032 VA rpt_mnGTAmountMedicareTax = [VA rpt_mnAmountMedicareTax]+[VA rpt_mnGTAmountMedicareTax]
0033 VA rpt_mnGTTipsSocSecTaxable = [VA rpt_mnTipsSocSecTaxable]+[VA rpt_mnGTTipsSocSecTaxable]
0034 VA rpt_mnGTAmountTipsAllocated = [VA rpt_mnAmountTipsAllocated]+[VA rpt_mnGTAmountTipsAllocated]
0035 End If
0037 F07830.Fetch Next
VA rpt_mnSavedFedAddressNumber <- TK Address Number
VA rpt_cFedTypeofW2 <- TK Type of W-2
VA rpt_mnWagesFederalAdjusted <- TK Amount - Wages, Federal Taxable Adjusted
VA rpt_mnAmountFederalTax <- TK Amount - Federal Income Tax
VA rpt_mnWagesSocSecAdjusted <- TK Amount - Wages, OASDI Taxable Adjusted
VA rpt_mnAmountSocSecTax <- TK Amount - OASDI Tax
VA rpt_mnWagesMedicareAdjusted <- TK Amount - Wages, Medicare Taxable Adjust
VA rpt_mnAmountMedicareTax <- TK Amount - Medicare Tax
VA rpt_mnTipsSocSecTaxable <- TK Amount - Tips, OASDI Taxable
VA rpt_mnAmountTipsAllocated <- TK Amount - Tips, Allocated
0038 End While</pre><hr />

I added "If VA rpt_cSavedFedTypeofW2 is not equal to VA rpt_cFedTypeofW2" because it looked as though it was processing the next item regardless, but it still processes the next item regardless.

I've tried a few other things, but I think I'm missing something in the way JDE is processing the information.

I've tried debugging, but most of my variables are not showing up, this again is probably from either bad design on my part or lack of knowledge as to where they should be.

Thanks for your time, and again, I apologize if any of my information seems off, I'll clarify whatever is asked for to the best of my abilities.
 
Hi,

Here is a guess ... In a LBF you want to refer to the PC values not BC. BC will be populated with the "next" record in relation to your level break.

Craig
 
Hi E1 - welcome to JDEList.

Your code looks OK to me for doing a basic Select/Fetch Loop. Not familiar with the JDE payroll system so not sure if your assumption that only 1 record per employee per year is valid. I do suggest that you select based on SSN rather than employee number as its not uncommon for a employee to leave and be rehired with a different employee number . . .

You mention other tables and a view which are not used in the code sample below.

Testing for File-IO Status = Success has never failed me. I find it far more likely that the section/event that your code resides in is being executed more times then you think. Either due to your coding or the data is different from what you think it is. I'd start with the data, try looking at the data using UTB (just type in UTB from the menu Fast Path field.

Since you're able to get the debugger to work just set your breakpoints and any variable whose scope is available at that point can be examined. Give it another shot - sounds like you've already come a long ways in learning JDE tools - you'll figure it out.

Cheers,
 
Hi



A couple of things you might want to check:

- When you are on the LBF, the BC values are already loaded with the NEXT
record, so BC AN8 is probably not the one you want to use to get those
totals

- You are using 'rpt' variables, so do check that they are reset when
appropriate. Personally, I prefer using 'evt' variables in such cases, so I
know that they won't get polluted with values coming from a previous
iteration.



Regards



De : [email protected] [mailto:[email protected]] De la
part de jtlaser
Envoy=E9 : Thursday, 14 June, 2012 9:00 PM
=C0 : [email protected]
Objet : E1



Hello,

I am a bit new to JDE, about two or three months of learning, so hopefully I
use the correct terminology to describe my problem, and hopefully I'm in the
correct forum. Also I believe my information is correct in my signature,
please say something if it looks off.

So now to my problem. I am struggling with what I believe is File_I/O_Status
reporting success an extra time, thus I'm getting A+B+B instead of A+B.

I'm using a LBF to print out my information, breaking on a change in AN8.
I'm using tables F07830/F07831/F07832, all but one user for the year has one
entry. I'm using a custom view with most columns selected and a join between
F07830/F07831 on AN8 and DTEY.

Code:

_____

0019 F07830.Select
BC Date - YR =3D TK Date - YR
BC Address Number =3D TK Address Number
BC Type of W-2 =3D TK Type of W-2
0020 F07830.Fetch Next
VA rpt_mnSavedFedAddressNumber <- TK Address Number
VA rpt_cSavedFedTypeofW2 <- TK Type of W-2
VA rpt_mnWagesFederalAdjusted <- TK Amount - Wages, Federal Taxable
Adjusted
VA rpt_mnAmountFederalTax <- TK Amount - Federal Income Tax
VA rpt_mnWagesSocSecAdjusted <- TK Amount - Wages, OASDI Taxable
Adjusted
VA rpt_mnAmountSocSecTax <- TK Amount - OASDI Tax
VA rpt_mnWagesMedicareAdjusted <- TK Amount - Wages, Medicare
Taxable Adjust
VA rpt_mnAmountMedicareTax <- TK Amount - Medicare Tax
VA rpt_mnTipsSocSecTaxable <- TK Amount - Tips, OASDI Taxable
VA rpt_mnAmountTipsAllocated <- TK Amount - Tips, Allocated
0021 VA rpt_cFedTypeofW2 =3D ""
0022 While SV File_IO_Status is equal to CO SUCCESS
0025 If VA rpt_cSavedFedTypeofW2 is not equal to VA rpt_cFedTypeofW2
0026 VA rpt_cSavedFedTypeofW2 =3D VA rpt_cFedTypeofW2
0027 VA rpt_mnGTWagesFederalAdjusted =3D [VA rpt_mnWagesFed!
eralAdjusted]+[VA rpt_mnGTWagesFederalAdjusted]
0028 VA rpt_mnGTAmountFederalTax =3D [VA rpt_mnAmountFederalTax]+[VA
rpt_mnGTAmountFederalTax]
0029 VA rpt_mnGTWagesSocSecAdjusted =3D [VA
rpt_mnWagesSocSecAdjusted]+[VA rpt_mnGTWagesSocSecAdjusted]
0030 VA rpt_mnGTAmountSocSecTax =3D [VA rpt_mnAmountSocSecTax]+[VA
rpt_mnGTAmountSocSecTax]
0031 VA rpt_mnGTWagesMedicareAdjusted =3D [VA
rpt_mnWagesMedicareAdjusted]+[VA rpt_mnGTWagesMedicareAdjusted]
0032 VA rpt_mnGTAmountMedicareTax =3D [VA
rpt_mnAmountMedicareTax]+[VA rpt_mnGTAmountMedicareTax]
0033 VA rpt_mnGTTipsSocSecTaxable =3D [VA
rpt_mnTipsSocSecTaxable]+[VA rpt_mnGTTipsSocSecTaxable]
0034 VA rpt_mnGTAmountTipsAllocated =3D [VA
rpt_mnAmountTipsAllocated]+[VA rpt_mnGTAmountTipsAllocated]
0035 End If
0037 F07830.Fetch Next
VA rpt_mnSavedFedAddressNumber <- TK Address Number
VA rpt_cFedTypeofW2 <- TK Type of W-2
VA rpt_mnWagesFederalAdjusted <- TK Amount - Wages, Federal
Taxable Adjusted
VA rpt_mnAmountFederalTax <- TK Amount - Federal Income Tax
VA rpt_mnWagesSocSecAdjusted <- TK Amount - Wages, OASDI Taxable
Adjusted
VA rpt_mnAmountSocSecTax <- TK Amount - OASDI Tax
VA rpt_mnWagesMedicareAdjusted <- TK Amount - Wages, Medicare
Taxable Adjust
VA rpt_mnAmountMedicareTax <- TK Amount - Medicare Tax
VA rpt_mnTipsSocSecTaxable <- TK Amount - Tips, OASDI Taxable
VA rpt_mnAmountTipsAllocated <- TK Amount - Tips, Allocated
0038 End While
_____




I added "If VA rpt_cSavedFedTypeofW2 is not equal to VA rpt_cFedTypeofW2"
because it looked as though it was processing the next item regardless, but
it still processes the next item regardless.

I've tried a few other things, but I think I'm missing something in the way
JDE is processing the information.

I've tried debugging, but most of my variables are not showing up, this
again is probably from either bad design on my part or lack of knowledge as
to where they should be.

Thanks for your time, and again, I apologize if any of my information seems
off, I'll clarify whatever is asked for to the best of my abilities.

EnterpriseOne Release: B7333 Service Pack: 24.11 Toolset: XJDE Server: AS400


_____


The entire JDELIST thread
<http://www.jdelist.com/ubb/showflat.php?Cat=3D&Board=3DOWDEV&Number=3D17 available for viewing.


Looking for a job? Check out the Job Opportunities forum


This is the JDELIST EnterpriseOne Developers Mailing List.
JDELIST is not affiliated with JDEdwards=AE.

To unsubscribe from this list via email, Click here
<mailto: [email protected]?Subject=3DUnsubscribe&Body=3DSirs,

P
lease remove this address from the JDELIST EnterpriseOne
 
Re: RE: E1

FYI all code I'm posting is from the group section. I'm not calculating anything in my LBF, it's just displaying, with the exception of some concatenation. So I think I'm supposed to be using BC.

I zero out all non-grand total math numerics at the bottom of this object, and zero out/null all variables in the "After Last Object Printed" object of the LBF.

Unfortunately a lot of those lessons weren't learned until the 3rd or 4th day of attempting to make this report. But everything mentioned so far was a problem at one point or another, but most of it has been hashed out.

After running the debug tool again with a few more breakpoints, I found that it's actually doing something completely different than what I thought it was. It seems to be erroring out on the fetch next within the while loop every time. Which I thought was strange, but then I saw that my do section was executing 4 times.

I'll provide a little more information, but hopefully someone can tell me where/why/what is going on.

Data sequencing is on AN8(F07830), sort ascending, level break. There were other items I was sequencing on, but for the moment, I've turned them all off.

Data selection is coming from a PO, Date - YR and/or AN8, user preference, not mine.

Again, joins are simple joins across F07830/F07831 on AN8 and DTEY.

The data in the table has two entries for the person in F07830, two entries for them in F07831, and three entries for the person in the F07832. Nearly everyone has multiple entries in the F07832.

I can drop the entire code block if need from the group section if you want, but it's not going to be pretty.

Anything else?

Does the Index matter when I'm doing a fetch? There are multiple keys for almost all of them, and I'm not using all of them for any fetch next. I think I'm using +E for all cases. If they were different before and during the loop would there be a problem?
 
Re: RE: E1

Any chance you are using a different index on the select and fetch next table IO calls? Those must match.
 
Re: RE: E1

[ QUOTE ]
FYI all code I'm posting is from the group section. I'm not calculating anything in my LBF, it's just displaying, with the exception of some concatenation. So I think I'm supposed to be using BC.

[/ QUOTE ]

No. As two others have already mentioned. Always use PC in LBF's.

[ QUOTE ]
Does the Index matter when I'm doing a fetch? There are multiple keys for almost all of them, and I'm not using all of them for any fetch next. I think I'm using +E for all cases. If they were different before and during the loop would there be a problem?

[/ QUOTE ]

Yes. Always match the FetchNext index(es) with the index of its accompanying Select.
 
Re: RE: E1

[ QUOTE ]
FYI all code I'm posting is from the group section. I'm not calculating anything in my LBF, it's just displaying, with the exception of some concatenation. So I think I'm supposed to be using BC.


[ QUOTE ]
No. As two others have already mentioned. Always use PC in LBF's.

[/ QUOTE ]

[/ QUOTE ]

Again, all code I've posted is from the Group Section that is the parent of the LBF. If I should be using all this code in the LBF, that may be my problem, at that point I would change it to PCs.

I'll double check my indexes, they may or may not be uniform
 
Re: RE: E1

Did get this fixed by putting it in the LBF section, and using PCs of course. Thanks for all your help.
 
Back
Top