Solved

4GL Table Copy ?

Posted on 2008-10-30
5
552 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
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

Suggested Solutions

Title # Comments Views Activity
Runtime 3044 error 14 44
Write Caching in the Cloud for VFP9 16 116
SQL Server encoding for storing Indian languages 9 47
SQL Server memory sizing - reallocation 16 70
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
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…

773 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