Cannot Copy NER BSFN

Joseph_Sadler

Joseph_Sadler

Well Known Member
[frown]
Üdvözöljük Zoltan, and Greetings to everybody else out there.

We searched the archives and retrieved Zoltan's solution for copying an NER Business Function from a post that was made on January 9th 2001. Unfortunately, it does not work for us.

We cannot "Paste" the event rules from our clipboard into the new BSFN as directed in step #8. (See below.) It is the Master BSFN N4600440 that we need to copy. It's too large to re-key ever line.

We can, however, copy the Event Rules from the original BSFN and paste them directly into the new BSFN, (bypassing the clipboard), but then almost every single line is disabled.
If we enable the line and open it, the variables are blank.
To fix each line would be the same work as re-keying the whole thing.

Has anybody else successfully copied an NER BSFN?
We are on B7333 SP 22, NT Deployment Server, AS/400 Enterprise server.

Thank you in advance to anybody who can even suggest the remotest possibility ;o)

Below is the solution we pulled out of the archives:
---------------------------------------------------------------------

Hey Venkat,
As you already well know, the object copy possibility vary under the different relases.
WHAT IS YOUR SYSTEM CONFIGURATION???? Is it still secret? :))

In response to your question:

A.) You can easily copy C BSFNs as files and making minor changes in the code.
B.) You can not copy NER BSFNs, you have to re-enter them as owguru has told. Some suggestion from me, how to do it efficiently:

1.) Open the old BSFN with the NER designer, select the entire ER, copy to Clipboard, save the clipboard file.
2.) Print the ER into a text file.
3.) Define your new BSFN in OL (or in OMW? ;-)) and open with NER designer.
4.) Place a comment-line into the NER or any dummy code. It makes possible to preserve the entered variables when you save NER without code (see the following).
5.) Define all ER variable and take care very much:
* to enter them in the same order as it was entered in the old one
(if you do not guess, how can you determine it, then ask me)
* to use exactly the same ER names (you copy/paste them from your ER printout text created under 2.)
* to use the same DD items
6.) Save the BSFN and re-open it.
7.) Open your clipboard file created in 1.)
8.) Paste the ER into the BSFN and delete the dummy comment/code entered in 4.)
(here you can also save and reopen. if you get some error message, don't mind.)
9.) Click all ER lines, revise them in the appropriate window and save them with OK.
10.) Go through on all parameters in BSFN Calls.
12.) Re-map all Table I/O, to be on the safe side.
13.) Enable disabled lines if you was able to save them with OK. (Generally I open and revise these lines again in enabled status and save them again.)
14.) Sometimes you will have to reproduce some lines. Use your printout as guide-line in these cases.

Sometimes IF statements will be disabled and when you enable it then the IF and ENDIF part will have an opposite enabling status. If it occurs for you, then ask me, how can you reslove it.

To reproduce the DSTR of the BSFN is an other story.

Good luck and success,
Zoltán
P.S.: ... do not forget...(you know)! I will answer your issues next time only when I will see your sys conf info in your post! (... it isn't a really serious threat :))
 
Suggest the remotest possibility say you?
Here's one:
- the NER BSFN gets actually translated into a C BSFN -see the N*****.c files in the Source folder.
- next, you copy THAT C BSFN, as per <<A.) You can easily copy C BSFNs as files and making minor changes in the code.>>
Warm regards,
PS Is it the remotest or what?
 
So nice to hear from you again Adrian my friend :0)
You are truly a Gentleman and a Scholar.

Not really so remote. We actually explored that scenario, as it was also in the archives.

However, as I do not know C++ I would not be able to make the necessary modifications.

But thank you kindly just the same.
Joe
 
Hi,
My experiences concerning any kind of ER copy from one object to the other:
If you enter the variables in the correct order with the same name the pasted ER lines find the references correctly and you don't get the "Most of the Lines are Disabled" error.
However if you have many variables this may take a lot of time.
Regards:
Gergely Pongrácz
e-Best, Hungary
 
Thank you kindly for your post Gergely.

Unfortunately, it didn't work for us.
We entered all variables in the same order first, as suggested by Zoltán. (We printed the ER's to get the order.)
We then pasted the ERs directly from the original BSFN, since we could not paste from the clipboard.
I estimate it will now take us 4 days to fix it line by line.
I'm afraid we've lost this battle.

However:
SAR# 2723317 was introduced in December of 1998 to allow the copy of NERs.
Priority: 3 Standard
Type: 2 - Enhancement
Status: 09 - Closed - No Further Action.

SAR# 4319588 was introduced in December of 2002 to readdress the request.
Priority: 2 Priority
Type: 2 - Enhancement
Status: 05 - Returned - Reconsider in Future.

Too little, too late :0(

Our thanks to you once again though.
We always appreciate it when somebody in the Forum takes the time to help us with a problem.

Joseph
 
Hi,
What I usualy do in this case is create a c BSFN and copy the code from the
NER in there. Then apply my changes in the newly created c BSFN.
Hope this helps
----- Original Message -----
From: "Joseph_Sadler" <[email protected]>
To: <[email protected]>
Sent: Wednesday, May 05, 2004 4:03 PM
Subject: Re: Cannot Copy NER BSFN


us.We entered all variables in the same order first, as suggested by Zoltán.
(We printed the ER's to get the order.)We then pasted the ERs directly from
the original BSFN, since we could not paste from the clipboard.I estimate it
will now take us 4 days to fix it line by line.I'm afraid we've lost this
battle.However:SAR# 2723317 was introduced in December of 1998 to allow the
copy of NERs.Priority: 3 StandardType: 2 - EnhancementStatus: 09 - Closed -
No Further Action.SAR# 4319588 was introduced in December of 2002 to
readdress the request.Priority: 2 PriorityType: 2 - EnhancementStatus: 05 -
Returned - Reconsider in Future.Too little, too late :0(Our thanks to you
once again though.We always appreciate it when somebody in the Forum takes
the time to help us with a problem.Joseph
http://www.jdelist.com/ubb/showthreaded.php?Cat=&Board=OWDEV&Number=71959
these messages, login to http://www.jdelist.com/forums, click Control Panel,
then click Edit by "Subscribe / Unsubscribe from receiving board posts by
email, change message notifications, etc." and adjust your subscription
preferences. JDEList is not affiliated with JDEdwards®
 
Ok, since I am currently out of work and have nothing else to do...I spent the weekend trying to solve this issue. I came up with a 'solution' that should be a BIG timesaver for those you need to copy NER bsfn's.

I've posted an attachment that has a Word document detailing the steps, etc. Please read as there are a couple of warnings.

Hope it helps.

PS Any companies in need of some developer consulting????
 

Attachments

  • 72140-CopyNER.zip
    70.6 KB · Views: 533
Nice work.

FYI - Two things I have used before, so that you can create a new NER without having to create the target NER first. The first line below can be used to create a new Spec key. The second set of code will create (with espectype = 16) a empty gbrspec.xdb and gbrspec.ddb in the path specified. Only other thing to add would be an insert into the F9862.

jdeRTMakeEventSpecKey( dsF9862_out.sievsk , sizeof( dsF9862_out.sievsk ) );

/*BEGIN Does spec file already Exist? If no then create appropriate Files*/
strcpy(zDS5.szFilePath,lpDS->szSUPathTo);
strcat(zDS5.szFilePath, "gbrspec.xdb");
pAppVars->iBusFuncRetCode = idRtnVal =jdeCallObject( "GetValidDataSource" ,(LPFNBHVR)NULL , lpBhvrCom , lpVoid ,&zDS5 , cmErrorMap_6 , NUMMAP_6 ,
(char*)NULL , (char*)NULL , 0 );
//strcpy(cDoesSpecFileExist , zDS5.cExistsYN);
if (zDS5.cExistsYN=='N');
{
eSpecType = 16;
TAMSpecificationCreateX (eSpecType,lpDS->szSUPathTo,NULL,0);
};
/*END Does spec file already Exist? If no then create appropriate Files*/
 
Aaron,

Thanks for the info. While doing my initial (not much) research, I was trying to figure out how the EventSpecKey was created. Had I known about this API, I think I would have gone a little different route and not required the user create the NER first.

I appreciate your two cents. Thanks.
 
Hi Jeremy.

Since I had resigned myself to modifying the ERs line by line, I did not get around to reading your solution until today.
It obviously was a remarkable effort, so I just wanted to say "Thank You".
Too late for this time... but there will always be a next time.
Nice work Jeremy.

My thanks to all who participated.
Joseph
 
OK all,

I have found a potential bug in the code I posted. Sorry! Although the chances of it having affected anybody is very, very small. There are two calls to I5900100_FindStringInBuffer...one before the 'while' statement and one inside the 'while' loop.

ONLY CHANGE THE ONE THAT IS __INSIDE__ THE 'WHILE' LOOP!!!

The statement's 3rd parameter currently is: lLenGBRRcd
Change just this parameter to be: lpGBRSpec->lVarLen - (szFound - (char *)lpSrcSpec).
 
Hey,

I dont see any other way to copy the BSFN. The steps that given by Zoltan is the best possible way to go about doing this, since decreases the errors. Take special care for Table I/O lines. Recreate all the Table I/O lines.
 
Thanks a lot!

I just followed your instructions, made the correction in the 'C' business function (see other message in the thread) and it worked like a charm!

I had 2 NER with a name conflict while upgrading to 8.11. R98700 could not handle this (shouldn't it at least try to rename the offending function!?!).

I was able to copy all the NER of the modules into new functions with a prefix to avoid naming conflict.

Thanks for the tip!
 
Hi Joseph,

I don't know how to copy NER BSFNs that big, but would it be enough for you to copy the C code of the NER BSFN into a new C BFSN? So you could easily make the changes you need... You could create a new B5546440 and paste the N4600440 C source code in its .c file. If you want you can use the same DSTR used in the NER, or either copy it into a new one.

Good luck!
 
Back
Top