Copying a C bsfn (to retrieve P/opt values)

Frosty the Coder

Legendary Poster
List,

I'm trying to HACK my way into creating
a copy of B4301710, which retrieves the
P/OPT values of a version.

Here are some _initial_ questions.....

1: OMW won't let me COPY the "C" bsfn.
When I try to ADD one, the PARENT DLL
defaults to CCUSTOM. I've been told
to use CBUSPART. Where can I override
CCUSTOM to allow me CBUSPART?

2: IF I get past step one, AND I manage
to get the "C" code in, I plan on:
a: Creating my own data structure to mimic D4301710;
b: Changing all variables w/4301 to be names meaningful
w/in my bsfn;
c: Changing existing code to reflect MY p/opts, deleting
all extra code.

Is this enough? My _guess_ would be NO. What else would
I have to do to set this up?

Has anyone out there already done this that they
could provide some guidance?

Thanks.

Gene

Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
AS/400, B733, SP14, W2000 client
XE, SP15.1
 
Hi Gene,

I have done already this type of task when I copied and extended, modified the Flat File Operations Business Function.

I suppose, I won't tell you all necessary steps but here are some.

1.) Copy the BSFN .C and .H files to the new names.

2.) Replace all "4301710" references in the sources to your new name, e.g. "5501007".

3.) Add the new BSFN in the OMW instead of copy the other.

4.) If your projects hold the token of the BSFN and you have enough right (User Role) in the current status (supposly 21) then you can change the Parent DLL:
* select the BSFN in the Project
* press Design button in OMW
* select Design Tools tab
* press Start Business Funtion Design Aid button
* now, you can override, select the desired DLL to be Parent DLL

5.) If you do not want to change the Data Structure of the BSFN then it isn't necessary to create your mimic DSTR. If you do so then create the new type definition of the DSTR (Design tab, Create a type defintion button). This will create the type def on the clipboard. You have to replace the appropriate part with this type def in the .H file.

Good luck,

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
I'm not sure why you'd call it a hack. . . no programmer worthy of the title actually writes their own code! See, you've given yourself away.

1. You change the paren DLL in OMWs Business Function Design form. You have to have the BSFN checked out though, otherwise the field is disabled.

Now, I would stay away from letting OW 'copy' anything here. It's had a poor reputation in the past for this type of thing. Instead, I'd go straight to your #2. Create your own DSTR and get a skeleton of your BSFN working. Then copy the existing JDE code into your BSFN, make your changes and voila, it's done.

Darren Ricciardi - OneWorld Whipping Boy

Looking for work WEST of DENVER

Home of OWTEK: http://www.cris.com/~grzero
 
Back
Top