Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 5th December 2001, 07:42
gfasbender gfasbender is offline
Senior Member
 
Join Date: Aug 2001
Location: Seattle, WA USA
Posts: 172
gfasbender is on a distinguished road
Baan: Baan IV, Baan5, A&D extension - DB: Oracle, MSSQL, Informix - OS: Unix, NT
Post CODE: Validate Import Exchange Scheme Data

Overview:

Baan provides an "Exchange" module which is a facility for batch communication between Baan tables and other sources of data (ASCII files). While this is a powerful tool, it falls short in two areas, which I have enhanced. One, it does not provide a facility for testing exchange schemes without actually loading the data. Two, though it produces error messages, their vagueness often requires developers to waste valuable time in resolving them.

Solution: Validate Import Exchange Data (tuxch9223m000):

This session is a pre-processor for validating ASCII input files. Since it is a pre-processor, data is validated without being inserted into a table. This saves considerable time as it avoids loading and reloading company data each time an exchange scheme is tested. With this pre-processor, the exchange scheme test cycle can be performed until all errors are resolved.

The validation process is designed for import exchange schemes, only. Software contained in exchange scheme conditions are not processed and are not in scope for this session. The following are examples of the error level checks performed by the pre-processor:

Exchange Scheme Level Validations
  1. The input ASCII file exists in the Data Path directory and it is accessible.

Record Level Validations
  1. The data on the input record doesn't already exist in the table.
  2. The number of delimited fields on the record matches the ASCII file definition.
  3. Valid text header lines with data fields are defined with a text domain.
  4. Text trailer lines exist that correspond to the text header.

Field Level Validations
  1. Fields defined as numeric can only have the follow characters "01234567890-+."
  2. Fields defined as numeric can not be blank or (null).
  3. Fields defined as dates have the format defined in the Exchange Scheme.

Reference Level Validations
  1. All reference data in fields, including combination fields, that are not blank and have a reference to another table, actually exists in that table. (No more 606 errors).

Attached zip file includes:
tuxch9223.bc - the session source code
tuxch9223.doc - Word 97 information document

Enjoy!
Attached Files
File Type: zip tuxch9223.zip (26.1 KB, 547 views)
__________________
Gordon Fasbender
GW Consulting
Reply With Quote
  #2  
Old 10th October 2005, 09:29
Kingsto88 Kingsto88 is offline
Senior Member
 
Join Date: Oct 2004
Posts: 208
Kingsto88 is an unknown quantity at this point
Baan: Baan 4, Baan 5 - DB: SQL server, Informix - OS: Windows 2000, HP Unix
Report

Hi expert,

I am trying to use this code. This thread is already so old.
Does anyone know how to create the report for this session.

I have created the form and added the script. But do not know how to create the report because there is no sample here. What fields should
I add and in which layout?

Thanks and regards,
Reply With Quote
  #3  
Old 11th October 2005, 18:33
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,935
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Attached is a zipped word document of some screen prints for the report we have. All it has is some screen shots of the input fields, the layouts and a couple of shots of the layout display.
Attached Files
File Type: zip report.zip (106.3 KB, 144 views)
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #4  
Old 13th October 2005, 08:29
Kingsto88 Kingsto88 is offline
Senior Member
 
Join Date: Oct 2004
Posts: 208
Kingsto88 is an unknown quantity at this point
Baan: Baan 4, Baan 5 - DB: SQL server, Informix - OS: Windows 2000, HP Unix
Thank you

Hi Mark,

Thank you for the layouts. Appreciate it

regards,
Reply With Quote
Sponsored Links
  #5  
Old 13th October 2005, 10:37
Kingsto88 Kingsto88 is offline
Senior Member
 
Join Date: Oct 2004
Posts: 208
Kingsto88 is an unknown quantity at this point
Baan: Baan 4, Baan 5 - DB: SQL server, Informix - OS: Windows 2000, HP Unix
Testing

Hi Mark,

I don't know whether you have the time to test the program at your place.

But for me, after I copied the whole program into my env and run it.
This message appears:

Invalid SQL Error 301 (Query not correct on SELECT.SQL=<SELECT tcmcs012.uset, tcmcs012.stgu from tcmcs012 WHERE tcmcs012._comprn=960 and tcmcs012._index1 = {"SET1","PCS"}>


The field name is wrong for tcmcs012.stgu as there is no field name stgu in tcmcs012

What do you think is wrong. Can you correct the program?

Thanks and regards,
Reply With Quote
  #6  
Old 13th October 2005, 15:07
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,935
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
The version attached to this post is a little different than the version Gordon left with us. I do know that we only use it to validate full table loads(all fields on table in the data file). I know it does work. I am attaching our version. I would recommend putting the other version in debug mode and finding what is creating that bad sql statement. Is tcmcs012 the table you were loading? Or is it another another table with a reference to tcmcs012? If so then it is probably in the does.reference.data.exist() routine.
Attached Files
File Type: cln tuxch92230.cln (44.9 KB, 119 views)
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #7  
Old 14th October 2005, 08:48
Kingsto88 Kingsto88 is offline
Senior Member
 
Join Date: Oct 2004
Posts: 208
Kingsto88 is an unknown quantity at this point
Baan: Baan 4, Baan 5 - DB: SQL server, Informix - OS: Windows 2000, HP Unix
question

Hi Mark,

I tried the program using your attached file. It runs without the error message. But then I noticed you commented out the messages of "Invalid SQL"

Using the first program, I also will not get the error message if I comment out the "Invalid SQL" message statements.

So actually why did you comment out the messages. If you do not comment out, the error message will also appear, if i use your program. So it is suppose to be commented out or not??

thanks and regards,
Reply With Quote
  #8  
Old 14th October 2005, 15:55
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,935
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Actually I have never worked on the session. I just knew that Gordon left us a copy that I do know works. We are still using it for our finance loads. I really can not answer whether they should be commented out or not. We have some loads going today and I will not be able to test uncommenting the lines. I will try some time next week.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #9  
Old 27th May 2009, 12:51
thangtq739 thangtq739 is offline
Member
 
Join Date: Oct 2008
Posts: 73
thangtq739 is on a distinguished road
Baan: 6.1 - DB: SQL - OS: Win 2k3
Hi Guru

what is the session have the same function with tuxch9223m000 session?

Regards,

Thang
Reply With Quote
  #10  
Old 17th November 2009, 23:41
hunzian hunzian is offline
Newbie
 
Join Date: Nov 2009
Posts: 2
hunzian is on a distinguished road
Baan: BAAN IV - DB: ORACLE - OS: XP PROFESSIONAL
Import Data In BAAN JVR (Ver IV)

is there anyone know how to import excel data in BAAN JVR (Ver IV).....?????
Reply With Quote
  #11  
Old 18th November 2009, 00:19
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,935
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
This is not the correct thread, but the process is simple one to me. Save the excel file as comma delimited, read the file in, and then use stpapi commands to write the JV records. You can check out the AFS/DDC/OLE forum for information on the stpapi commands.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERPJewels Hitesh Shah Third Party Products 10 6th November 2006 06:38
CODE: Launch exchange scheme from custom session. Francesco Code & Utilities 0 14th January 2003 00:18


All times are GMT +2. The time now is 17:58.


©2001-2017 - Baanboard.com - Baanforums.com