[go: up one dir, main page]

0% found this document useful (0 votes)
182 views4 pages

Table Prefix - ADempiere ERP Wiki

This document discusses table prefixes in ADempiere ERP software. It explains that table names are prefixed with two-letter codes to indicate their category or module. For example, "C_" prefixes core tables, "AD_" prefixes application dictionary tables, and custom tables often use "EXT_" or "CUST_". The document also provides guidance on best practices for custom table naming conventions and standard column definitions in ADempiere.

Uploaded by

Riki Okta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
182 views4 pages

Table Prefix - ADempiere ERP Wiki

This document discusses table prefixes in ADempiere ERP software. It explains that table names are prefixed with two-letter codes to indicate their category or module. For example, "C_" prefixes core tables, "AD_" prefixes application dictionary tables, and custom tables often use "EXT_" or "CUST_". The document also provides guidance on best practices for custom table naming conventions and standard column definitions in ADempiere.

Uploaded by

Riki Okta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

6/23/2015

TablePrefixADempiereERPWiki

TablePrefix
FromADempiereERPWiki
ReturntoTutorials

Contents
1TablePrefix
2Prefixesusedorreservedbyaddonprojects
3SpecialColumnSuffix&Prefix
4SomeTipsaboutCustomTables
5AboutReferences(DataTypes)
6SomeSpecialColumns
7StandardColumns
8Commoncolumnuseinmaster
9VirtualColumns

TablePrefix
WhenyouopentheAdempiere'sdatabaseyoucanseemanytablesprefixes.Whatiseachone?
AD_:ApplicationDictionary(i.e.:AD_Element)
A_:AssetsManagement(i.e.:A_Asset_Group)
ASP_:ApplicationServiceProvider(i.e.:ASP_Module)
B_:Marketplace(i.e.:B_Buyer)
C_:CommonorCoreFunctionality(i.e.:C_AcctSchema)
CM_:CollaborationManagement(i.e.:CM_WebProject)
FACT_:MultiDimensionalCube(i.e.:Fact_Acct)
GL_:GeneralLedger(i.e.:GL_Journal)
HR_:HumanResource(i.e.:HR_Payroll)(IntegrationtoLibero)
I_:Import(i.e.:I_BPartner)
K_:KnowledgeManagement(i.e.:K_Category)
M_:MaterialManagement(i.e.:M_Cost)
PA_:PerformanceAnalysis(i.e.:PA_Report)
PP_:ProductionPlanning(i.e.:PP_Order)(IntegrationtoLibero)
R_:Requests(i.e.:R_Request)
RV_:ReportView(i.e.:RV_BPartner)
S_:Service(i.e.:S_Resource)
T_:TemporaryTables(i.e.:T_Report)
W_:Web(i.e.:W_Basket)
WS_:WebService(i.e.:WS_WebService)

Prefixesusedorreservedbyaddonprojects
Thesearenotfinal,sinceIamstillanewbie.Butsomethinglikethisisneeded.
ABI_:AutomatedBrokerInterface(USImportandExport)SDGathman18:00,20April2007(EDT)
AWB_:AirWayBill(USImportandExportInternationalAirTransportation)SDGathman
http://www.adempiere.com/Table_Prefix

1/4

6/23/2015

TablePrefixADempiereERPWiki

LCO_:LocalizationColombiaCarlosRuiz
LBR_:LocalizationBrazilFer_luck
LMX_:LocalizationMexicoVictorPerez
LVE_:LocalizationVenezuelaMarcosMedina
LRU_:LocalizationRussia(http://sourceforge.net/projects/lru/)RyabikovAleksandr(http://www.adempiere.ru)

SpecialColumnSuffix&Prefix
_ID
DataType:Number(10)
Primarykeyorforeignkeycolumn.Wherepossible,shouldusethepatternTableName_ID.
Fore.g,AD_User_IDistheprimarykeycolumnfortheAD_Usertable.
Is
DataType:Char(1)Value:Y/N
Useforyes/noflag,fore.gIsApproved,IsActive,IsVendor,etc.

SomeTipsaboutCustomTables
Naming:
UsePrefixEXT_,CUST_orSystemCustomPrefix
It'srecommendedtousecustomprefixeswiththreeormoreletters.Themodelclasses
mustbelookedwithprefix.I.e.ifyouhaveatablecalledXX_Invoicethemodelclass
mustbelookedasMInvoiceandcanconflictwiththeproductmodelclass,butifyou
haveatablecalledCUS_Invoice,thenthemodelclasslookedwillbeMCUSInvoice.
Trytobedescriptive.
Usecaseconventionsconsistently.
RequiredColumns:
AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy
SuggestedColumns:
Value(theKey),Name,Description,Help
VeryImportant:TheColumnNamesarecasesensitive.

AboutReferences(DataTypes)
TableDir
ColumnNamewithout_IDistheTableName
IfColumn:C_BPartner_ID....ThenTableis:C_BPartner
Don'tforget:Casesensitive
Search
SameasTableDir:displayedinSearchandInfoWindowratherthenComboBox
Table
DefineDisplayColumnandKeyColumn
ColumnCreatedBy=Table:C_BPartnerDisplay:NameKey:C_BPartner_ID
DynamicValidationRules
ThecontentisrevaluatedwhenchangetheVariable.
AD_Column.AD_Table_ID=@AD_Table_ID@

SomeSpecialColumns
http://www.adempiere.com/Table_Prefix

2/4

6/23/2015

TablePrefixADempiereERPWiki

Processed
DataType:CHAR(1)Values:Y/N
UsedforallTransactionTables.
IfYthenyourrecordisReadOnly.
FieldsmarkedasAlwaysUpdateablearen'treadonly
WhenthetablehasthiscolumntheHistorybuttonisenabledonthetoolbar
Posted
DataType:CHAR(1)Values:Y/N
IfYthenisdisplayedasPostingButton.
Processing
DataType:CHAR(1)Values:Y/N
LockforBatchprocessing.
SeconduseforstartinganyProcess.
Record_ID
DataType:NUMBER(10)
WithAD_Table_ID,systemreference(Zoom)

StandardColumns
AD_Client_ID
DataType:Number(10)NOTNULL
AD_Org_ID
DataType:Number(10)NOTNULL
IsActive
DataType:Char(1)Values:Y/N
Created
DataType:DateNOTNULL
CreatedBy
DataType:Number(10)NOTNULL
Updated
DataType:DateNOTNULL
UpdatedBy
DataType:Number(10)NOTNULL

Commoncolumnuseinmaster
Value
DataType:NVarchar2(40)
SearchKeyorCode
Name
DataType:NVarchar2(60)
Displayname
Description
DataType:NVarchar2(255)
Longdescription
Help
DataType:NVarchar2(2000)
Helporcomments
http://www.adempiere.com/Table_Prefix

3/4

6/23/2015

TablePrefixADempiereERPWiki

VirtualColumns
Youcandefinevirtualcolumns(notstoredinthedatabase).Ifdefined,theColumnnameisthesynonym
oftheSQLexpressiondefinedhere.TheSQLexpressionmustbevalid.Example:"UpdatedCreated"
wouldlisttheageoftheentryindays.
TocreateaVirtualColumnyoumustgotoColumnTabintoTableandColumnwindowandenteryour
ExpressionintheColumnSQLField.
InaTable,definecalculatedColumns(notstored).
UpdatedCreatedAgeindays
Morecomplex,as
(SELECTValueFROMM_ProductpWHERE
p.M_Product_ID=M_InventoryLine.M_Product_ID)
ComplexExpressionsin()
Fullyqualifybasetable
InColumn,definevalidSQLExpression
ColumnName:AgeInDays
ColumnSQL:SysDateCreated
CreatesSQL:SysDateCreatedASAgeInDays
Becareful:Thevirtualcolumnsarenotrecalculatedifyoumodifysomethingonwhatisbasedthe
virtualcolumn.
YoucanfindsomeexamplesofVirtualColumnsinthewindows:
TaxDeclaration:TheAccountedCredit,AccountedDebit,SourceCredit,SourceDebit,Business
Partner,Currency,TaxandAccountDateareallVirtualColumns.
ProductCosts:TheCostingMethodfieldusedisaVirtualColumn.
Note:inordertoseetheColumnsdefinition,youmustbeloggedasSystemAdministratorRole.
Linkrelated:VirtualColumnsGuide
Retrievedfrom"http://www.adempiere.com/Table_Prefix"
Category:Developerdocumentation
Thispagewaslastmodifiedon7August2010,at08:47.
ContentisavailableunderGNUFreeDocumentationLicense1.2.

http://www.adempiere.com/Table_Prefix

4/4

You might also like