Override System Value

JDE_JRC

Active Member
We are using a 3rd party software (barcoding) that calls JDE NER and subsequently a UBE to create / complete work orders. Our issue is that every work order created has the same generic User Name....which makes sense. I'm wondering if I was to change the input parameters to include UserName on the NER, can override the svUserName value to make the UBE think that someone else is running it besides the generic User? I've searched around for BSFN's and also tried setting svUser with no luck.

Any ideas would be appreciated.

JDE_JRC
OW Xe, SP20, Update 4, Windowns/SQL Server
 
I'm not clear on whether you are willing to change the NER, but you can create a UDC -say- 55/US (for user) and then for KY (the key) put in the NER (i.e. N9642342) and a description of the user you want to populate (i.e. ENEPUSTIL ). Then you modify the NER to look up SY=55, RT=US and KY=N9642342 and get the user you want populated. This way you can change the user anytime you wish. There is a VERY good 'Get UDC Description' business function out there to get just what you need.

Ben again,
 
Thanks for the ideas Ben. Re-reading my post I can see where I wasn't perfectly clear. The issue is that any user in the shop floor that picks up a barcode scanner can call this NER which will submit a report. It is easy to pass the User name into the NER...but within the report there are many calls to JDE Master BSFN's that do not look for User Name parameter....so the tables would not, as a result, be updated with the actual userID that was input. Simply the generic User/Machine name caling the report. Basically at runtime I want to be able to override the slUserID so the will perform all updates using that ID value.
 
So, each person that grabs the barcode scanner, logs in before using the scanner? If so, you may try looking at the MBF to see if USER is a parameter that can be passed in (it is in some other MBFs). Another idea might be to perform an 'end around'. This is where you wait for the MBF to finish and update the user value after the fact. It's kinda klugy but it can work for you.

Ben
 
Thanks again Ben...sometime klugy is our only option. Bunch of BSFN calls but it might just be easier than trying to find the "ultimate" solution.
 
I have another option to try: write a c bsfn that modifies lpBhvrCom->SysPref.szUserName with the user you supply. I believe this will stay in affect throughout the life of that job, so if it is interactive, I suggest you have a means of saving the original user and restoring when the particular task is finished.

Not sure if this will work in your app, because it sounds like the NER submits another UBE which may then lose the changed user...I'll let you play with it, but let us know if it works

Good luck
 
Back
Top