F4211 Begin Doc, error 0037 at line 7118

Frosty the Coder

Legendary Poster
I have a custom UBE that calls F4211 FS Begin, Edit, and End Document master business functions.

I'm testing it over a series of orders.

Begin Doc is SOMETIMES throwing error 0037 from line 7118. (The address book entered is not found in F0101).

Once this happens, subsequent orders throw the same message into the WC.

If you rerun the process, some of the order headers that failed no longer throw the 0037 error.

If you rerun the process enough times, each smaller unprocessed set of orders that previously errored will process cleanly.
confused.gif


I can look at the C code to see what throws the error,
and it looks like its on the "else" to a "If Credit Message <> Blank" test.

That's as far as my "C" skills get me.
I cannot tell WHICH address book number is not on F0101.

Would someone with stronger "C" skills please let me know what conditions result in 0037 being thrown at line 7118?

Your assistance is GREATLY appreciated.
 
Oops.
This is on 90.
I'm not sure what you're asking with "specific function or file".
It's the B4200310 (SOE MBF, "F4211 FS Begin Doc" subfunction).

It FEELS like there's a variable not being cleared within the UBE.
This would be blank/null at the start of each process.
 
You probably do not need 'c' skills here.
All you need is to populate MBF's with valid values and call MBF's in proper sequence.

To get valid values and sequence check jdedebug.log generated by SOE application

1) Enable jdedebug.log
2) Run SOE application
3) Create SO's for different SO types/clients (save/clear logs for each order)
4) Run UBE
5) Compare logs

IMHO that's it.
 
[ QUOTE ]

Begin Doc is SOMETIMES throwing error 0037 from line 7118. (The address book entered is not found in F0101).

Once this happens, subsequent orders throw the same message into the WC.


[/ QUOTE ]

This is one thing I would look very carefully at in your process. This seems to indicate to me that cache is not being cleared out properly and you are retaining the values from one order when processing subsequent orders.

Make Sure that:
1. If F4211FSBeginDoc or F4211FSEditLine fail or have an error be sure and call F4211ClearWorkFile. As a general rule once you call either F4211FSBeginDoc or F4211FSEditLine you MUST call either F4211FSEndDoc to save your edits or call F4211ClearWorkFile to cancel your edits and free resources.

2. For each Sales Order you should call F4211FSBeginDoc (you can optionally just call F4211FSEditLine on an existing sales order line w/o calling F4211FSBeginDoc) passing in zero for mnCMJobNumber. BegDoc will assign a new unique job number and you should use the returned value with subsequent calls to F4211FSEditLine, F4211FSEditLinePreProcess, F4211FSEndDoc, F4211ClearWorkFile and all other SOE related MBF calls. In this way, even if something goes wrong with #1 and resources for a previous order are not free'd it won't effect the processing of subsequent orders.
 
Brian,

That IS what it "feels like".
I will review where the F4211_Delete(s) are in the code.

Still , out of curiousity, I'd like to know how F4211 Begin Doc finds its way to throwing the 0037 error.

Thanks!
Gene
 
[ QUOTE ]

Still , out of curiousity, I'd like to know how F4211 Begin Doc finds its way to throwing the 0037 error.


[/ QUOTE ]

Off hand I don't know that, would need to debug/review the code. However, I will say that obviously a given Customer Number will need a customer master record. I also believe the A/B search type must be set up some place (sales order constants or UDC???) as a valid A/B type for sales orders.

Are these new orders or edits to existing sales orders?
 
AND THE ANSWER IS.....

The code for Begin Doc had the "Credit Message" Parm pointing in both directions.
Order one's customer would return a credit message,
and order two would try to use that message, winding it's way to line 7118 in Begin Doc.

I'm kicking myself in the butt for not noticing the pattern sooner.

Thanks for the assistance.
 
Back
Top