f$ABAS_NewOrder (f$ABAS_Auftraganlegen)
f$ABAS_NewOrder (f$ABAS_Auftraganlegen)
An order and its positions are written to ABAS with this function. The positions are transferred over without a structure. If it is necessary to transfer positions with structure, the order with the positions at the highest level must be created using this function and the structure subsequently written to an XML file. The position numbers are alphanumeric. Thus it is completely allowed to use, for example, 2.1 as a position number. In most cases it is sufficient to create the order without a structure and transfer all positions with their position numbers. The number of the order created is returned in the parameter group for the order data.
With this function you can also modify existing orders. To do this, the first field must identify the order. If you want to modify only one row, you have to set the argument: count to the negative number of the position.
Mit dieser Funktion können auch bestehende Aufträge verändert werden. Dazu muss als erstes Feld eine eineutige Identifikation des Auftrags übergeben werden. Insbesondere beim Start des Regelwerks aus ABAS ist dies eine gebräuchliche Vorgehensweise. Bei der Konfiguration einer einzelnen Position soll in der Regel auch nur diese Position verändert werden. Um dies zu steuern, wird bei der Übergabe der Daten anstelle der Anzahl die negative Zeilennummer der indizierten Parametergruppe übergeben.
Please note: the name of the parameter groups is usually entered in string constants, i.e. in quotation marks.
Attention: when writing an order, you must enter at least one position.
Syntax: | Status = f$ABAS_NewOrder (Fieldlistorder,PGorder,PositionCount,FieldlistPosition,PGPosition) | ||
| Argument | Type | Meaning |
| Fieldlistorder | String | Field list of ePOS parameters in the order parameter group that are to be written in the order header. |
| PGorder | String | Name of the parameter group containing the order data. This parameter group either does not have to be indexed, or the index used must also be given (e.g. 'Orderdata[1]' |
| Count | Integer | Number of positions to be transferred or the negative number of the row, which has to be modified. |
| FieldlistPosition | String | Field list of ePOS parameters in the position parameter group that are to be written with the order positions. |
| PGPosition | String | Name of the parameter group containing the position data. This parameter group must be indexed. |
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 order was transferred successfully | |
Example: | 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_neworder (FieldsOrder,'abas_order',Count,FieldsPosition,'abas_positions') f$abas_logfile('') Status = f$abas_logout() | ||