Solved

4GL Table Copy ?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
The purpose of an index when the key is unique 10 93
sql calculate reminders 11 69
oracle query help 18 99
SQL Server encoding for storing Indian languages 9 27
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
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…

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now