MDBREADMI transactions
Limitation
Creating user-defined API transactions in M3 Business Engine can be done in several ways, each of them has its own strengths. MDBREADMI transactions are quick and simple to define and have good performance. Although, it is limited to use a single database table and cannot use virtual fields.
MDBREADMI definition
- Get - to retrieve a single record from the table.
- List - to retrieve the first record followed by a list of records.
- Selection - to retrieve all records that match the input selection.
The sorting option is the basis for the input for the MDBREADMI transaction. If the transaction is either a list or a selection type, you can remove input fields to extend the table selection. You can also use a search query as the input using Infor Enterprise Search. As for output fields for the MDBREADMI transaction, any field from the table can be selected.
The setup of MDBREADMI transactions is done by defining API metadata in a specific way. Programs MRS010-MRS012 are intended to simplify this setup.
Follow these steps
- Create a new transaction in 'MDBREADMI Transaction. Open' (MRS010),
where other existing MDBREADMI transactions are also listed. The name of an MDBREADMI
transaction consists of four elements in the format XxxYYYYYYZZsfxx where the characters
correspond to:
- Xxx: The API transaction type, such as Either Get, List (Lst) or Select (Sel)
- YYYYYY: The table or the database file for the transaction
- ZZ: The sorting option for the transaction
- Sfxx: The transaction name suffix which is optional
If some of these elements are unknown, create a transaction on (MRS010/B) and define the elements later on the E panel. At the point of creation, you can make the transaction use search query instead of input fields. For MDBREADMI list transactions, you can use number of filters as input rather than defining a fixed set of filters for the transaction. When the transaction is created in (MRS010), it automatically creates ingoing API transaction fields that are viewed in 'API Transaction Fields. Open' (MRS012).Note: MDBREADMI list transactions cannot use custom sorting options that contains the NFTR – 'Number of filters' field. Where needed, use a selection transaction instead or EXPORTMI. - Set the output fields for an MDBREADMI transaction in 'Work with Outgoing API
Fields. Open' (MRS011). All available fields for the selected table are
listed. The fields that are included in the transaction should have 'field enabled'. To
alter the order of fields, specify a number in the series of 'New Sequence No'
fields.
There are also function keys F15='Add all fields' to add all fields to the transaction, F16='Remove all fields' to remove all fields from the transaction, and an F17='Add bookmark fields' to add bookmark fields to the transaction.
Note: Changes made are only applied to the MDBREADMI transaction after the program is closed. Remember to apply changes. - Change the ingoing fields in 'API Transaction Fields. Open' (MRS012) if necessary. For 'API Transaction Type' list and selection, use function keys F15='Remove last field' to remove the last ingoing API transaction field and F16='Add next field' to add the previously deleted ingoing API transaction field. If the transaction is using number of filters as input, these function keys are not needed.
- Verify that all required fields are included by using standard sorting option 2 in (MRS012) to list both ingoing and outgoing fields for the API transaction.
By exporting the configuration, you can save or transfer the MDBREADMI transactions. Use alternative 20='Export Configuration' on one or several MDBREADMI transactions and specify the file name and version number of the configuration. Locate the file by opening 'Configuration Data Jobs. Open' (MNS200). Use sorting order 4, then specify the file name and start date. Use alternative 20='Display XML file' to download the XML file as a compressed ZIP file.