foreign table definition

jdepgmmer

Active Member
i need to read a table from a sql server that is outside the JDE environments. I read how we can create the foreign environment specs.
Can someone guide me how to create the field specifications for the file in jde system? I know we can only access foreign tables in a Table conversion. I am confused as I know that the field names will be different in the foreign environment as compared to what we can define in jde....

any help will be greatly appreciated.
 
JDE PGMR,

Welcome to the realm of a Virtual Table - one 'good' solution for your
situation.

As has been discussed before - If you can create an SQL Statement over a
table (or tables), you can probably create an SQL View over it/them, also.

1. Determine which Columns you want to make available to E1
2. Create an SQL Statement that will pull back those values
3. Duplicate that SQL Statement - this time renaming the
fields (Select ExampleField1 V1FIELD1, ExampleField2 V1FIELD2, ExampleField3
V1FIELD3 from XampleTable). Note - you have to use JDE Naming Conventions
for all the column names. Each Column name must be prefixed by a
two-character value, followed by a VALID E1 Data Dictionary Field/Value name
4. Create the SQL View: Create View F55XMPL as ("Use the SQL
Statement created in step 3")
5. CHANGE SECURITY TO *PUBLIC at the Database Level (you can fix this
later, after the proof of concept)
6. DESCRIBE THE VIEW - so you have a template for the next steps
7. Create Data Dictionary items for fields in external table that did
not previously exist - making absolute sure they match types and constraints
(Char ar Char, Numeric are Numeric and Length/Decimal match exactly). Place
as few constraints as possible - you don't want to limit, till the proof of
concept is 'proven'.
8. Create the Virtual E1 Table - In FDA create a new table that:
1. Exactly matches the name of the SQL View
2. Exactly matches the Column Header (First two characters of
Column name)
3. EXACTLY matches the Field Sequences (match the DD items
agains the newly renamed column titles
4. DO NOT GENERATE THE TABLE
9. Test using UTB (yes, UTB is available in ALL versions of E1 -
though it may have been secured, it is there). Use UTB so you can look at
the JDE.LOG if there are any issues.

Now - you have a 'Virtual Table' in E1 that can see data from a third-party
application. Things to consider include:

1. The SQL View 'should' exist in an existing E1 Datasource (at least
for testing). If the Target Data is in a third-party location, consider
creating a new datasource ( you do not want to cross
databased/libraries/tablespaces with SQL Views.
2. If you accidentally Generate the table in FDA, simply Drop the View
and recreate it using the Database script/statement
3. Most common issue is Security - at the DB level, *Public to start,
then close the hatches till it breaks

Enjoy!

(db)







--
 
Use Database Views to replace foreign tables

Daniel's exhaustive explanations should help you create 'virtual'/'fake' tables in E1. Their usage is not limited to Table Conversions (as foreign table are).
If you need more details, see the attached document.
Warm regards,
 

Attachments

  • 132816-OneWorld Database Views.doc
    37 KB · Views: 317
just wanted to say you guys are awesome to say the least!!!!!!!!!!!!!!!!

thank you!!!!!!!!!
 
Re: Use Database Views to replace foreign tables

Hi,
Can any one please tell me the difference between Foreign tables(non JDE
table) and JDE tables.

Regards,
lakshmi

On Mon, May 5, 2008 at 1:42 PM, Adrian_Chimirel <[email protected]>
wrote:



--
Bindu K
 
RE: Use Database Views to replace foreign tables

A JDE table is a table that has been defined using the JDE toolset,
therefore JDE knows it exists, what the fields are, etc...



A Foreign table is a table/file defined outside of the JDE toolset,
therefore JDE does not know it exists, does not know what the fields
are, etc...



Ellen Deak

Senior Systems Developer

Cooper Standard Automotive

JDE EnterpriseOne (OneWorld XE Update 7 SP23_M1), AS400 DB2 V5R3M0,
Citrix Clients
 
Re: Use Database Views to replace foreign tables

Hi Deak,
thanks for your reply.......
i have some more doubts regarding this.......
how we access these Foreign tables in integrations.
I created number of integration. like in-bound (flat file to E1) and
out-bound(E1 to flat file). flat file to E1 : we use one BSFN which is ' Fetch
Next Line from Flat File'. using this we transfer flat file data to one
table which is custom table.
these tables are call custom tables or Foreign tables?
why we use Foreign tables?

Thanks & Regards,
lakshmi





--
Bindu K
 
Re: Use Database Views to replace foreign tables

Ellen,

Perfect explanation - but, I'd like to add one more part...

JDE Table - one that was 'generated' by the JDE Toolset (at least if you are
using OneWorld/E1)

Foreign Table - one that was'generated' outside of the JDE Toolset (example
- a third-party table or belonging to third-party software)

Other foreign tables include;
- those that dirve on the wrong side of the road
- have to exchange '$Bens' for something more collorful
- don't have a set speed-limit (what ever speed causes you to crash is the
limit)
- if you can't undersand it - it must be foreign

(db)



--
 
RE: Use Database Views to replace foreign tables

A base JDE table is something like F0101 (Address Book Master). It came
with JDE when you bought it. Everyone who purchased JDE has an F0101. A
base JDE table can be affected by JDE upgrades, if the upgrade includes
changes to the base table.



A custom table is any table you create that is not part of base JDE. A
custom table is something you (the JDE client) created to support a
custom application, custom report or your own custom modifications to
base JDE programs. As long as you define your custom tables using the
one of the client reserved system codes, your custom tables will not be
touched by a JDE upgrade.



I am having a little difficulty understanding your English, so hopefully
I've addressed your question adequately.



Ellen Deak

Senior Systems Developer

Cooper Standard Automotive

JDE EnterpriseOne (OneWorld XE Update 7 SP23_M1), AS400 DB2 V5R3M0,
Citrix Clients
 
Re: Use Database Views to replace foreign tables

Lakshmi,
Since there are two threads going on in same post.

A flat file is not called a foreign table. its a simple text file uploaded into a JDE table.
Any custom table created in JDE as explain in earlier post are not called as foreign tables.

All the tables existing outside of the JDE database are foreign tables.

Hope this clears your confusion.
 
Back
Top