You should add code to codeunit 12, which posted lines to table 81 (Gen. Journal Line) and to the codeunit 90 which created rows in 81 table before posting
If you are adding a field in the Purh. Header, and you want to flow this to the VLE then follow this.
1. Add the same field in the VLE, Gen. Jnl Line, Posted Purch. Invoices
2. Modify the codeunit Purch. Post and CU12 according to your need
3. In Purch. Post you don't have to do anything extra as the transfields will help flow the field in the posted documents (if u keep the field no. same)
Do check for the function called PostVendor, this might help you achieve what you are trying to.
Comments
an easy way to find out is to put code coverage on ->post a PO ->go see what codeunit(s) are being accessed.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks for the reply . could you please explain the functions which i need to add the code...
If you are adding a field in the Purh. Header, and you want to flow this to the VLE then follow this.
1. Add the same field in the VLE, Gen. Jnl Line, Posted Purch. Invoices
2. Modify the codeunit Purch. Post and CU12 according to your need
3. In Purch. Post you don't have to do anything extra as the transfields will help flow the field in the posted documents (if u keep the field no. same)
Do check for the function called PostVendor, this might help you achieve what you are trying to.
For any queries you can also visit my blog site: http://msnavarena.blogspot.com/