Solved

4GL Table Copy ?

Posted on 2008-10-30
5
570 Views
Last Modified: 2013-12-25
I am using epicor Vantage and i am trying to get one table copy to another.
I have two fields from the same table.

Mfgsys.RcvDtl.PONum
Mfgsys.RcvDtl.Lotnum

For Each RcvDtl Where RcvDtl.Lotnum <> 0
DO: RcvDtl.lotnum = Rcvdtl.PONum

I know that this code doesnt work obviously it totally wrong. but this is what im trying to accomplish. I want The LotNum to Equal the POnum. I only need there the Relationship statment. the program will know how to execute it.
* EDIT*
I had Figured out a Solution my self, and the Code for this to happen is as follows. However

For each ttrcvdtl where ttrcvdtl.RowMod = 'A' and
ttrcvdtl.PONum <> 0:
       assign ttrcvdtl.LotNum = string(ttrcvdtl.PONum).
       end.

I would also like to Add that when the the Supplier Qty is 0 that it would not get a lot number so. this is what i have tried so far but it doesnt Seem to work. If you need more infor on whats happening i will try my best to explain
For Each ttrcvdtl where ttrcvdtl.RowMod = 'A' and
  ttrcvdtl.POnum <> 0 and ttrcvdtlMassRecepitsupplierqty > 0:
       Assign ttrcvdtl.LotNum = string(ttrcvdtl.POnum).
End.

Open in new window

0
Comment
Question by:Collegeguyes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 400 total points
ID: 22878771
Collegeguyes,

Can you be more specific as to how this "doesnt Seem to work" ?

Your code seems to be logically correct.

The only problem I noticed is that you missed a "." in your reference to SupplierQty.  On line 2, it seems like:

> ttrcvdtl.POnum <> 0 and ttrcvdtlMassRecepitsupplierqty > 0:

Should be:

ttrcvdtl.POnum <> 0 and ttrcvdtl.MassRecepitsupplierqty > 0:

An undeclared variable, if it does not cause a compile error, will likely default to zero in a numeric comparison.  

For example, if ttrcvdtlMassRecepitsupplierqty is indeed a typo, the condition
ttrcvdtlMassRecepitsupplierqty > 0
will never be met, because the typo ttrcvdtlMassRecepitsupplierqty will be treated as a zero.
0
 
LVL 4

Assisted Solution

by:progressor
progressor earned 100 total points
ID: 22898080
Maybe it doesn't seem to work because you have a big table and you are not using an index?
What are the indexes on that table.
If POnum is the first field of an index and cannot be negative then change <> 0 for > 0. That would at least help progress finding the right ( or an ) index.

Casper
0
 

Author Closing Comment

by:Collegeguyes
ID: 31511878
JUst wanted to say thanks for you input i Actually Changed the way that i wrote the table in the end so the question is now void.
for each ttrcvdtl where ttrcvdtl.RowMod = 'A' and

                        ttrcvdtl.PONum <> 0 and ttrcvdtl.vendorqty = ttrcvdtl.OurQty.

                       

If ttrcvdtl.CheckBox01 = false THEN do:

Assign ttrcvdtl.lotnum = string(ttrcvdtl.POnum).

end.

If ttrcvdtl.checkbox01 = true then do:

Assign ttrcvdtl.lotnum = "".

end.

 

end.

 

0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question