Writing record to the ERP database
Writing record to ERP database
Section titled “Writing record to ERP database”After file exchange processing, the commands that are registered in the synchronizer, in the ERP Send Integration option, will be processed in the configured database.
The objective is for us to record information in the ERP database.
To use data exchange information, you must have a file with data in the Retta layout in the Searched folder.
INSERT INTO TEST ( COL1, COL2 ) VALUES ( column[1], column[2] ) RECORD[18]
Where:
- TEST: is the database table.
- COL1 and COL2: are the columns (fields) of the table.
- column[1],column[0] and column[n] are the field values.
- REGISTRATION[18]: references the integration table.
In our integration layout you can see all tables and their fields.
As the counter in the integration starts at zero, the field number in the layout must be deducted from 1, as the layout starts at 1, example: The client code in the layout is position 2, but to use it in the SQL command, column(1) must be used. This is valid for all fields in all tables.