• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

C BSFN .....

kiant

Member
Hi list,

Can someone give me ideas on how to go about writing a 'C' code, for a BSFN?
A sample simple code would be great..
Also, if u'all can throw some light on API's....

kiant

XE Demo.
 

Wkunneke

Active Member
2 Possibilities for you. 1, take a look at the ones that ship with JD Edwards. You'll find them in the B7\<environment path>\source\ folder. Even easier, in Xe, add a business function to your project and use the Business Function Design Aid. The tool will allow you to create a working business function without writing any code, they you can take it apart to see the C code generated behind the covers. Hope this helps.



Live: B733.1 SP7.1
Oracle 805 AS400/DB2
Sandbox: XE SP15
Migrating Central Objects to AS400/DB2
 

Christian Audet

Moderator
Staff member
Hi kiant,

If you need the API documentation for Xe, look on the Knowledge Garden to find file "b7333jdeapis.chm". This file list all APIs functions with all parameters description and also examples.

William trick is also a good one to beging your first C function. As a sugestion I will tell you build a simple NER BSFN (ex: N550001) and then go to the source folder and look for N550001.C. This C function is a working one that you can write entirely in C next time. What you will see inside the C code is mainly a sequence of APIs.

If you want to write a C function from scatch, first like other function you need your Data Structure and then in the Business Function Design Aid clic on Form/create, the Designer will ask you if you want a skeleton of the function.

After this step you have a empty C function waiting for new APIs calls. The most important part is that all the standard JDE #include and setup is already there.

I did not include the file with this eMail because it was 1.26MB

Christian Audet

Implementing B7333 (Xe) SP14.1, SQL
(Support B732, B7331 and B7332)
 

kiant

Member
Hi Wkunneke,

Thanks.
I got started on C BSFN's. Managed to code a sample one. But when I exeecute it I get an error " Business Function load failed - CALLBSFN.DLL - _CBSFNeg@12"

Any clues why I might me getting these.

Thanks in advance...

kiant
 

Zoltan_Gyimesi

Legendary Poster
Hi Kiant,

You have to build your BSFN into a DLL.
The best practice is first to define a new custom DLL for your BSFNs and define this DLL for your BSFNs.

You can build DLLs and BSFNs on your workstation or on your deployment server. If you do it on your workstation then you have to have an installed C++ before installing OW and you have to install a FULL OW Package onto your machine.

If you built the BSFN on your machine then you can use it on this machine immediatly. Building on deployment and deploying BSFNs is an other story.

Building first time a new custom DLL on a workstation sometimes could be problematical.

Generally I can suggest you first to check the appropriate chapters in the Development Tools documentation on your documentation CD.

About APIs: you can access informations (and other useful informations too) in your OneWold help. Start from your OneWorld Explorer and select Contents from the Help menu. Suppposly you will get two overlapped window. Close the upper one which has the input focus and choose "Tools, Technical and Foundation" from the other. Here you will find a "OneWorld Tools API Reference".

If you use other language preference than blank (Domestic English) when you sign-on OW then you can have problems to acces the mentioned help. In this case please, sign-on with a user ID who have blank Language Preference code in her/his user profile.

Good Luck and Read You Again,
Zoltán


B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

Wkunneke

Active Member
I don't think you can always immediately use the dll. You may need to shut down OneWorld and restart before you "see" changes you make.

Live: B733.1 SP7.1
Oracle 805 AS400/DB2
Sandbox: XE SP15
Migrating Central Objects to AS400/DB2
 

Zoltan_Gyimesi

Legendary Poster
William,

You are right, the best practice is shut down and restart OneWorld when you made changes in BSFN. Generally this is my habit too in this cases, always to be on the safe side.

Although, it seems to me that sometimes I was able to use new or modified custom BSFNs (NER) in our (already existing) custom DLL after rebuilding the BSFN and without restarting OneWorld but I am not really sure that I remember well.

Regards,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

Wkunneke

Active Member
From what I've seen in my short period of work with JDE, you will need to shut down and restart OW if you have made use of the dll before making a change to it. In other words, if you have run an appl that calls it, then modify and rebuild it, you will have to restart. This is consistant with the cacheing I've seen. Still, as Zoltan pointed out, better to be safe.

Live: B733.1 SP7.1
Oracle 805 AS400/DB2
Sandbox: XE SP15
Migrating Central Objects to AS400/DB2
 

Zoltan_Gyimesi

Legendary Poster
William,

I really do not want to debate with you about what is consistent with the cacheing, further as I wrote, my habit is also to be always on the safe side that is restart OW in this cases.
But ...
I can imagine that OneWorld invalidates the already used DLL in the cache of the workstation when you rebuild one of its BSFN using the Build in the Object Librarian, so forcing to reload it when it will be called again. This happens too when you modify an already called interactive application (APPL) with FDA, you can check the changes immediately (of course, supposing that it wasn't kept open while using FDA). Maybe, the behaviour of OW in this issue could be different from release to release and/or under different SP level.
Unfortunately (?), I work on many releases, so very hard to me to keep in mind always everything that where, what on which have I observed or experienced.

At last, I will keep my mentioned habit(s) instead of making experiments with this issue.

William, your short period of work with JDE becomes day to day longer.
You are very welcome among us!

Zoltán
P.S.: If somebody still have time to make some experiments then please, share the results on the List/Forum. Thanks.
(I am just curious.)

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Zoltan,
For my case, I've been able to use my modified BSFN everytime after i have
modified and compile it. It doesn't seem to provide any problem to me so
far, and maybe i can try to logout and login next time if i encounter this
problem. sometimes, when i need to test the customised bsfn on other
machine, i only backup the original copy and put my dll on that pc. this
skips re-compilation cause other pc doesn't have VC++ installed. well, i'll
jot down you best practise. :)

Bell
OneWorld Developer
One World B7332,SP 9, AS/400 V4R4M0
Windows NT; Win2000+Citrix Metaframe 1.8a

----- Original Message -----
From: "Zoltan_Gyimesi" <zoltan.gyimesi@synergon.hu>
To: <jdeowdevml@jdelist.com>
Sent: Tuesday, April 10, 2001 1:20 AM
Subject: Re: C BSFN .....


you made changes in BSFN. Generally this is my habit too in this cases,
always to be on the safe side.
custom BSFNs (NER) in our (already existing) custom DLL after rebuilding the
BSFN and without restarting OneWorld but I am not really sure that I
remember well.
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Numbe
r=8820
 

Zoltan_Gyimesi

Legendary Poster
Hi Bell,

Thank you very much your confirmation that not always necessary to restart OneWorld after BSFN modifications and rebuilds.
As far as I remember, I did also several times when I have made corrections or experiments. It was a bit long time ago, so I wasn't enough sure to state it here.

After your confirmation, I think, restarting OneWorld is necessary only when you can not exactly detect the effect your modifications.
(... and of course, after DLL copy!)

Thank you again,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

Bill_Feeney

Active Member
I have been following the responses to this issue with great interest. I had
the very same problem with a custom BSFN that was written by a consultant
then jput on the self for a few months. He named the parent DLL as CDIST but
when we tried to run the App that used the BSFN it would error out with the
same message as Kiant got. The only way I was able to solve it was to
re-specify the Parent DLL as CALLBSFN, then JDE found it. Seemed like the
simple way to go, as that is where JDE was looking for it.

Was this incorrect?

Bill Feeney
JDE Technical Developer
B733.2, SP 13.1, Unix, Oracle 8.1.6
 

Zoltan_Gyimesi

Legendary Poster
Re: RE: C BSFN .....

Hi Bill,

In my humble opinion, everything is correct when it works correctly without any problem and side-effect.

I think, the best method after changing the DLL for a BSFN is to rebuild the both effected whole DLL on the deployment server and re-deploy them. Before you do it, you can check it via doing the same on a full Development client.

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

Larry_Jones

Legendary Poster
Re: RE: C BSFN .....

Bill, Zoltan, all ...

First, my experience also is that BSFNs when compiled into a DLL do not require you to log out/in to see the change. HOWEVER it is also my practice to not have open any applications that may be using the DLL when I'm compiling ...

Second - I would advise Bill to put any custom BSFNs in a custom DLL - not a standard JDE one - but am curious as to what Zoltan and others with more experience think about this.


Larry Jones
ljones@wagstaff.com
OneWorld B733.1, SP 11.3
HPUX 11, Oracle SE 8.1.6
SandBox: OneWorld XE SP13
 

Zoltan_Gyimesi

Legendary Poster
Re: RE: C BSFN .....

Larry,
You are right, as it is usual ;-)
By my humble opinion, the right place of a custom BSFN is a custom DLL and not a standard one of OneWorld. Our practice is the same.
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
RE: RE: C BSFN .....

It is a good practice to use the standard JDEdwards CCUSTOM.dll as the
parent DLL for custom BSFNs. This will help minimize the confusion during
upgrades, etc. and you can easily isolate any future problems.

You can also create your own custom DLL. Verify that F9860 file has a record
of that; else your BSFN build will fail. In Busbuild, you can link your
custom DLL information with standard JDE DLLs. In Xe, you can create a
custom DLL using OMW.

If you ever have to change the parent DLL for a BSFN, you need not exit
OneWorld to run the build again. After you check in the BSFN, you want to
make sure that you transfer this information to all the path codes by using
standard practice for object transfers. If this is not done soon, you'll
have integrity issues across OneWorld.

Hope this helps!
 

Bill_Feeney

Active Member
RE: RE: C BSFN .....

Thank you all for responding! I'll look into either putting the BSFN into
CCustom.DLL or creating my own custom DLL.

Bill Feeney
JDE Technical Developer
B733.2, SP 13.1, Unix, Oracle 8.1.6
 

kiant

Member
Hi all,

Your inputs are always a gr8 help.
I understood a few things more that what I wanted to know. That helps.
But my problem still exists , and I feel that somehow it's and Oneworld Demo issue. Coz I tried building my BSFN and I get an error " Busbuild has caused and erorr in <unknown> Busbuild will now close. Try restarting your computer " !!!!.

Has anyone experienced this error b4.

Keep your thoughts on this flowing...

Thanks

kiant,

XE Demo
 

Larry_Jones

Legendary Poster
Kiant,

just to confirm ... you have Visual C++ 6.0 installed? What Visual Studio Service Pack is installed on top of that?


Larry Jones
ljones@wagstaff.com
OneWorld B733.1, SP 11.3
HPUX 11, Oracle SE 8.1.6
SandBox: OneWorld XE SP13
 
Top