?
Solved

4GL Table Copy ?

Posted on 2008-10-30
5
Medium Priority
?
586 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 1200 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 300 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

719 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