Map is a collection.Have two types map。
1. Map is such as a class or object
Map myMap = new Map(types::string,types::integer);
myMap.insert("ABC",11);
myMap.insert("DEFG",23);
print myMap.toString()
pause;
2. Table Map
1),Create a Map such as CustVendTrans in Map of Data Directory node;
2),Create Fields on the CustVendTrans;
3),Create two Mappings on CustVendTrans with CustTrans and VendTrans;
4),Create methods on the CustVendTrans, All method will share for CustTrans and VendTrans Tables such as remainAmountCur() method:
display AmountCur remainAmountCur()
{
return this.amountCur - this.settleAmountCur;
}
5),In CustTrans and VentTrans Table, we have a method named remainAmountCur() also, Format is Table.MapName::MethodName;
display AmountCur remainAmountCur()
{
return this.CustVendTrans::remainAmountCur();
}
6), So we use remainAmountCur() in CustTrans and VendTrans tables and this method's function is the same in two tables.
So, table map is like as inherit