f$ABAS_PutObject (f$ABAS_ObjektSchreiben)
f$ABAS_PutObject (f$ABAS_ObjektSchreiben)
An object (e.g. offer, customer, article) and its possible positions are written to ABAS with this function. The identification number for the object is always to be entered first in the field list. Depending on if a data record with this value exists, the data record is modified or created. When creating a data record, the identification number is not evaluated but is instead generated by ABAS and returned to the parameter group. If the object does not contain any positions, empty strings (") can be entered for the arguments which relate to the positions.
With this function you can also modify existing objects. To do this, the first field must identify the object. If you want to modify only one row, you have to set the argument: count to the negative number of the position.
A database name and group name must be entered with this function. These could be, for example, Sales and Order. When using these keywords, the search only works if the ABAS system is set to English, so it is recommended to instead use the internal numbers:

This list can be viewed with the EDPViewer tool.
Please note: the name of the parameter groups is usually entered in string constants, i.e. in quotation marks.
Syntax: | Status = f$ABAS_PutObject (DBName,GruppenName,FieldListM,PGM,Count,FieldListP,PGP) | ||
| Argument | Type | Meaning |
| DBName | String | Name of the database to which the object is to be written. The name of the database is e.g.: Part. To avoid being language-dependent, the number should be used instead. |
| GruppenName | String | Name of the object group to be edited, e.g.: Articles. To avoid being language-dependent, the number should be used instead. |
| FieldListM | String | Field list of ePOS parameters in the PGM parameter group that are to be written to the header of the object. |
| PGorder | String | Name of the parameter group containing the object data. This parameter group either does not have to be indexed, or the index used must be entered as well (e.g. 'Offerdata[1]' |
| Count | Integer | Number of positions to be transferred or the negative number of the row, which has to be modified. 0 if no positions are entered. |
| FieldListP | String | Field list of ePOS parameters in the PGP parameter that are to be written with the positions for the object. |
| PGP | String | Name of the parameter group containing the position data. This parameter group must be indexed. If no positions are entered, an empty string can be entered. |
Result: | Integer | Status of the function: -5 : a field list is Noval -4 : argument is not consistent -3 : the operation has failed (an error analysis can be performed using the log file) -2 : the ABAS interface is not installed -1 : the interface has not been logged in to 0 : the data was transferred successfully. | |
Example: | Example1: write an order Status = f$abas_login('linux',6550,'erp','sy') f$abas_logfile('c:\\temp\\abas' + f$date('yyyyMMdd_hh_mm_ss') +'.log') FieldsOrder = 'OrderNo,Customer,Status' FieldsOrder = 'PosNo,MaterialNo,Quantity,ListpriceUnit' Status = f$abas_putobject('3','22',FieldsOrder,'abas_order',2,FieldsPosition,'abas_positions') f$abas_logfile('') Status = f$abas_logout() Example2: write an address Status = f$abas_login('linux',6550,'erp','sy') f$abas_logfile('c:\\temp\\abas' + f$date('yyyyMMdd_hh_mm_ss') +'.log') FieldsAddress = 'FiBuNr,Search,PreferredName,Company1,CountryCode,ZipCode,Town,Street' Status = f$abas_putobject('0','1',FieldsAddress,'abas_address',0,'','') f$abas_logfile('') Status = f$abas_logout() | ||