The dreaded Sales Order Master Business Function

Ben_Britain

Active Member
BTW, I am running on XE unix.

Ben again

Dear dear dear dear list,

I have created (actually I have been made responsible for) a NER
which uses the SO MBFs. I encounter a problem when I try to create a
new SO with an existing/duplicate Customer PO. We supposedly have the
system set to allow duplicate POs and the error we see displays only as
a warning. The problem is that when Edit Line completes, it returns an
error flag equal to '2' which indicates error instead of the expected
'1' which indicates a warning. With this returned error code the Edit
Line does not enter the code into cache or the work file. I want to
programmatically accomplish the same thing that a user accomplishes by
hitting the OK button a second time getting past the warning. I have
scoured the documentation and can't seem to get past this problem.

This is a tough one for me, Any ideas Whipping Boy......Zoltan
the Magnificent.....anybody?

Ben again

OneWorld XE unix
 

atone

Member
Hi Ben

I had a similar problem to yours in that the customer did not want the warning (for duplicates) to appear but did want a warning for blanks. In the end, the master bsfn was modified to remove the validation. This was an easy decision (and a simple mod) as the bsfn had already been modified elsewhere but is not a solution I would normally recommend unless as a last resort.

Regards



OW 7332 & Xe, HP9000, Oracle, NT & 2000
 

WhippingBoy

VIP Member
What. . I'm not magnificent?!

I'm a bit confused. Is this in an interactive app, or is it batch somehow?

The simplest thing is to disable that warning when your NER calls the function. If you need to get tricky and can't change the MBF for some reason I've got some other ideas.

If it's interactive and you just need the ER to press 'OK' again but only when that singular warning is present, consider this. . . . . (it's incomplete and it's pseudo-code)


JDERTN(int) jdeErrorGetCountEx(LPBHVRCOM lpBhvrCom, LPINT lpiErrorCount, LPINT lpiWarningCount, LPVOID lpVoid );

If ErrorCount=0 AND Warning>0
__Do until no more errors
____(LPCSTR)warning jdeErrorGetNext(LPBHVRCOM lpBhvrCom, LPVOID lpVoid);
____If warning=='duplicate PO'
______pressButton=TRUE
____Endif
__EndDo
Endif

If pressButton
__Press 'OK' again
Endif

I didn't test it. In fact I pulled this off the top of my head, but I bet you can make it work. After all, you're good enough, you're smart enough, and gosh darn it. . .people like you. I say that to myself every day. .over and over. And, golly, I think it's starting to work. =8^D

Darren Ricciardi - OneWorld Whipping Boy

Looking for work in Amsterdam THE NETHERLANDS
 
Top