-   Code & Utilities (
-   -   DEV: Extend Baan code without sources (

~Vamsi 6th December 2001 07:02

DEV: Extend Baan code without sources
1 Attachment(s)
Trying to work without Baan code has been an issue for quite a while. Those who discovered QKEY know that 4GL sessions can be customized to a good extent without the source code. The idea of creating an equivalent has been in my mind for quite a while now. About a year ago I wrote a little bit of code as a proof of concept. And it has been stagnating ever since. I made an attempt to create a list of volunteer developers through this thread without much success. People just did not say anything after receiving the code. I just do not know if they did not understand what the code did (very possible - I sent it out with practically no documentation - just like now) or they expected me to give a fully working script (this is not true even now - notice the DEV in the heading).

However inadequate the two scripts that I am posting may be, they do work (or atleast did before I made changes :)).

Deliverables expected at the end of this project:
  • a name for this project/product
  • documentation
  • technical design so that the maintenace can be easy
  • added features like ease of use / being not affected by changes to Baan standard object

Please try this program and post changes. Thanks to Krishna Eranki / Praveen Ambekar / Patrick Van der Veken (in chronological order of their contributions) for making this possible.

KlayVessel 30th December 2001 04:59


I don't think I could contribute to this project...I'm sure that would taint it! Ha!

Don't know whether to be happy about this or not...but I am always glad to see people working on innovative code.

evesely 3rd January 2002 22:20

DEV: Updated script
I have updated the code for ~Vamsi's main.bc file. I had a couple of problems running the original version. This now works well for me on IVc4. The following changes were made:
  • Extended to handle a larger number of functions (it died trying to handle tdsls4102 before)
  • Now works with functions that return values (e.g., function extern domain tcmcs.long
  • Added missing "functions:" statement
  • Fixed problem that occurred when parent had a "before.program" section
  • It is now skipping functions that seemed to be added as part of the compilation process (and hence caused the original compilation to fail) like g.check.input.funcs()

My compliments to MohanaVamsi Potluru and Praveen Ambekar on the original code. Also my apologies regarding my efforts to modify the copyright, disclaimer, etc. I was unsure how to put in my changes and still fit under the protection of the disclaimer. If I should fix this, please let me know -- I will be happy to do so.

A brief test seems to indicate that this works on Baan 5c, too, but I didn't do a lot of testing there. I'm sure others will have more features to add...

~Vamsi 7th January 2002 20:24


Could you post the revised main.bc file? The "disclaimers" apply to all authors. If you feel you have rewritten the code you can put your name in the author field while acknowledging the original author(s). Alternatively leave the original authors as such and add your name to the "contributors" (which is not present in the template at this moment).

evesely 8th January 2002 16:23

DEV: Updated script
1 Attachment(s)
I obviously forgot to attach this last time.

toolswizard 16th January 2002 20:52

I tried to compile the sources and have many errors. Is the a compilable version?

~Vamsi 16th January 2002 21:46


Thanks for trying the code. I have not worked on this code for a long time. My client does not have a need for such a product as they have source code. Hence it is not a priority on my list of things right now :(. I have posted the code I have in hopes that others will be able to extend it further and make it useful.

Since Ed posted revisions to main.bc I think he must have been successful in compiling the code. Please post your compilation errors to the thread and may be we can find out what the problem is.

toolswizard 16th January 2002 22:02

I am taking a chance and changing the "options" variable and changing it to opt. It would seem baan has a macro (#define) for the work options and it is trying to expand it. It now compiles with a unrelated warning.

BTY did you get an email from me in the last few days asking more questions?

toolswizard 16th January 2002 22:22

ok, I have it compiled and did run it against a small display session. I have a new file created by rush. Now does this file take place of the user script in the session, replacing the original script? Is it supposed to run stand alone? Please explain how I should test this out. Once I have a working model, I should be able to continue on more advanced development.

evesely 16th January 2002 22:56

This file that is generated should be used as the program script for the session in question. It can be modified just like any other Baan 4GL program script. The one caveat is that you can't have the same section name as an external function call. For example, this is not allowed:

function extern on.choice.cont.process()
        other code

You can put things in either place, but not both.

Once you have attached this program script to the session, you should be able to run that session and access all of the functionality of the parent (i.e., standard Baan) script plus or minus any changes you desire. Unfortunately, you don't have the ability to modify the underlying functionality, but rather only decide if and when that code runs. If you want more flexibility, getting the Baan source code would help. ;-)

toolswizard 16th January 2002 23:28

Thanks ED,

I am not trying this for my regular job. This is more of a curiosity. I would like to help get this into a usefull open source product. As your post states, you can use the call in either syntax, but not in both. I was already thinking of how this can be used to make the code more readable for the user.

I have access to development systems and source code to test all of this out. I can see where knowing the fuctionality of the standard is going to be needed to do any kind of development. Expecially to test it out fully. A programmers guide is surely going to be needed for those new to Baan.

If anyone is planning to try a development effort please let me know.

Bill Prokurat

klixy23 20th February 2002 16:27

I tested the program. I made the changes from toolswizard in this thread (variable "options" to "opt"). I compiled and run it.


Thanks for this great idea.

klixy23 22nd February 2002 16:16

In my last post I wrote "IT WORKS", but somthing is wrong.
I tested the session tisfc0202m000 (Report Complete Order and Adjust Stock) and add an information field.
The session did the work, but the field tisfc001.cmdt wasn't update correctly, it was blank. This is always happen, if the form field cmdt.frm leave blank and the user press the continue button.
If the user fill the field, then all is ok.

So I changed back to the original session. I tested in the same way and the field is updated correctly. I think there is something in the original baan code, that fill the field automatically if it is blank or there is an internal function call.

Can someone check this? Or do you need more information?



~Vamsi 22nd February 2002 20:09

What version of Baan? Once klixy responds could someone who has that version with code check to see what is really happening. I have access only to Baan 5b.

toolswizard 22nd February 2002 21:24

I have access to almost all versions of source. But I really would like to see his code also. klixy can you please post your source for that field.

All times are GMT +2. The time now is 12:16.

©2001-2017 - -