F4211 Edit Line/End Doc

AHyde

Member
Hello everyone,

I am writing a custom UBE to insert records into the SOP Header File F4201 and Detail File F4211. I have created one Begin Doc, three edit lines (one for each detail record for the order) and an End Doc. The problem is, the Begin Doc and edit lines are processed correctly with no errors, and appear to be written to cache, but the end doc only inserts the record corresponding to the FIRST Edit line and not the other two, and does not write the F4201 header record at all.

No error code is passed from any of the MBF's.

The following error appears in the JDE.log:

'Unable to retrieve DB Record for Application P4210, Version C00001 from F983051'

I am incrementing the line number (LNID) by one for each edit line and zeroising it on change of order.

Does anyone have any ideas as to why only the first detail record of the three is being written?

Thanks

Amanda Hyde ([email protected])
 
Check the following fields on your edit line calls.

cCMRecdWrittenToWF MUST BE BLANK, when adding a new line.
mnCMLineNo - Pass in as zero, and edit line calc's it, otherwise, whatever value you set it too.

BEWARE. If called in a loop, the mnCMLineNo value can be non-zero, if you "just" get it back, since the tool does not clear the DSTR on the second (or third) call.

Hope it's one of those two...






Peter Hamilton
B7332 SP14, Windows NT, Unix
 
Hi Amanda,
it is quite difficult to answer, as the set up of those BSFNs keep on changing with each new version of One World.
Anyway, the best way to proceed is both easy and ... boring :
you have to enter an order through P4210 in debug mode and see the value of each parameter passed in. Then give the same values in your custom program and it will work perfectly,
good luck,
Julien
 
Hi Peter,

Thanks for your suggestions, I felt sure when I read through them that the first one was the solution - as I hadn't blanked out the cCMRecdWrittenToWF between each Edit Line. Unfortunately, doing this didn't solve the problem.

My Line Number is incremented by 1 for each edit line, so should uniquely identify the lines in cache. I'm very puzzled but will just have to keep trying...

Thanks for your help

Amanda
 
Amanda,
Here's an idea:
Try changeing the parameter cCMWriteToWFFlag to '1', to populate the workfile instead of cache. This way, you can see what is written to the workfile.
So after each workfile, look in the database table F42UI01 for the header, and F42UI11 and make sure the records are there.
You can check out the data to make sure it's the right parameters.
So after Begin Doc, you should have 1 record in the F42UI01. After each Edit Line, you should have a record in the f42UI11. Make sure you have all 3 detail lines before the End Doc is called.
Hope this helps.....
--jj
 
Back
Top