E9.1 URGENT! F4211 End Doc

JDE_MP

Active Member
Hi All,

This is a bit urgent.
Can someone help me with some knowledge/information on F4211 End Doc business function?
I am working on a custom UBE to cancel order lines and my Edit Line (with action code D) is in Do section.
Should I be writing the End Doc in Do Section itself or should it be in the End Section?
Currently the End Doc is written immediately after Edit Line and it's not working as expected.
It cancels one line, and then it doesn't cancel the next line. Then again goes on to cancel the third line, or some other line and so on.
I am not able to understand the root cause but I assume something to do with the placement of End Doc.
Please help!!

P.S. I am not using F4211 Begin Doc as I am using Edit Line to cancel lines (action code D). I hope that is not causing a problem.
Thanks in advance.
 
I think you still need to use BeginDoc. BeginDoc starts building the transaction in memory and sets the header information. There is some information in the header that is not duplicated on the line, and it may be required for a successful transaction.

Without seeing your code, I can't tell you specifically what to do. But I will try to give you some direction to help.

BeginDoc and EditLine are building your order transaction in cache. EndDoc takes that order in the cache and commits the transaction to the database and clears it from the cache.

If your volume isn't too large, you can do the BeginDoc, EditLine, EndDoc combination once for each order line.

There is some overhead in the BeginDoc/EndDoc, so if your volume is large and you have many lines to process per order you might want to structure your code so that you do the BeginDoc once at the start of each order then the EditLine for each order line you need to process followed by an EndDoc after the last order line.

Regards,
Ellen
 
Back
Top