Different Posting codeunits

Hi

Why do we have two different posting codeunits for posting a purchase order like CU 90 and CU 91 we can have a single CU instead.

Some clear explanation on this would be appreciated.

Thanks

Anil

Good question! i would like to know answer too! i did check the codes! CU 90 gives in detail about the purchase posting! CU 91 is an condition applied in that i think! 'm not very sure!

Yes but i can do all that coding in a single codeunit. Why we need two codeunits to write that code.

Thanks,

Anil

dear if i know that i will surely let you know! 'm trying to find the really reason too!

Hi,

I do not know what do you mean, because cu90 is the codeunit of posting of purchase order, the cu91 is handling what type of Purchase Header do you post. Because all of purchase are using the same tables t38 and t39. The type of a header is determining your orders has an invoice or a shipment, or both of them. The cu91 is about the choices of your Purchase. It is necessary to posting an invoice and shipment or just the one of these.

Yes that is what im exactly askig you. Why do i need two codeunits i can write all the code in a single codeunit 90 then y did microsoft use 91 for small piece of code.

Thanks,

Anil

Anil,

Seemingly you have come to Navision world after MS bought it and wiped away the granular licensing approach [:)]

ALL code can be packed in one giant CU - but why? Besides, Navision’s security (and licensing, BTW, too) is based on Objects - license file + Roles determines what level of access one haves to different Objects, so ONE SINGLE application fits everyone, from small enduser with limited functionality to developer.

Well - and Purchase Journal has no header to post. It was possible NOT to buy purchase documents license and use ONLY this journal in pre-MS times, that was cheaper.

Look Anil,

This is a good technical solution for the programming in modules. That what some of Programming Language are describe. A Best case, module programming. If you would like to understand it, please read some technical issue, for example http://en.wikipedia.org/wiki/Modular_programming

:slight_smile: