Loading...
 

CX_ITEM::AccountOwner

CX_ITEM::AccountOwner

Description:

This function is used to control whether a variant part - in relation to its sub-parts - is the owner of a joint account. This is usually a joint warehouse and/or MRP account in particular.

For example, in the case of a "joint stock account", all stock postings of a sub-part of a variant part labelled in this way are written to the stock account of the variant part. This is the case, for example, if the "colour" of a variant part exists as a material characteristic, but the quantity in the warehouse is not relevant with regard to the colour of the sub-parts.

This information is stored as a CX_STRING (e.g. "CX_STOCK_ACCOUNT") in the"accountOwner" slot of type COLLECTION.

237305, the slot accountOwnerPhantom is used for phantom parts instead. CX_ITEM::AccountOwnerPhantom can be used to check whether a variant part is the owner of a shared account in relation to its phantom sub-parts.

Code example:
item Copy(AccountOwner("CX_DISPO_ACCOUNT")) ifnot return

If a joint account of the transferred type exists, a 1 or TRUE is returned. If this is not the case, 0 or FALSE.

To delete an entry from this collection accountOwner , the MA function AccountOwnerMA must be used. Per:

FALSE item Put(AccountOwnerMA("CX_DISPO_ACCOUNT"))

the entry CX_DISPO_ACCOUNT is removed from the collection.

Conversely, using :

TRUE item Put(AccountOwnerMA("CX_DISPO_ACCOUNT"))

an entry can be added to the collection.

If ForceMonitor("CX_DISPO_ACCOUNT") is used to address a sub-part that has a variant part with a shared MRP account, the function automatically recognises whether the higher-level variant part has a shared account. If the entry "CX_DISPO_ACCOUNT" exists in the collection accountOwner of the variant part, the function returns the dispo account of the variant part and does not create a new dispo account for the sub-part.

If sub-parts are to have their own MRP accounts again, the entry "CX_DISPO_ACCOUNT" in the collection accountOwner of the variant part must be removed (as described above) and ForceMonitor("CX_DISPO_ACCOUNT") must be called on the sub-part. A new MRP account is now created for the sub-part.

Stack
Stack Position Object type Brief description
Stack(In) Top CX_ITEMOne thing
Top 1 STRING Class of the account (e.g. "CX_DISPO_ACCOUNT")
Stack(Out) Top INTEGERTRUE or FALSE
Function call: Call(AccountOwner)