Posts

Showing posts with the label isTableMapped

How to find if a table is mapped in a map?

Sometimes we would like to know if a particular table is mapped in a map. To achieve this, SysDictTable::isTableMapped() method can be used. This method takes two parameters, the map name and the table which we want to check if it is mapped. SysDictTable::isTableMapped(tablenum(AddressMap), tablenum(LedgerTable)); SysDictTable::isTableMapped(tablenum(AddressMap), tablenum(CustTable)); The first statement will return false since LedgerTable does not have a mapping in AddressMap map. The second statement will return true since the CustTable fields have a mapping in the AddressMap map. Note how the tablenum() function can also be used to return the id of a map.