f$PSI_SetFields (f$PSI_SetzeWerte)
f$PSI_SetFields (f$PSI_SetzeWerte)
The value of all fields contained in the entered list is written in the current view with this function. The names of the parameters in the entered parameter group must be entered in this list. Like with the function f$PSI_GetFields (PGName), the parameters must contain the PSIPENTA field name as designation. The parameter group does not have to be agreed globally and should not be indexed. It is however possible to use a specified index of an indexed parameter group (e.g. (Article[Line]).
It is checked in a loop of all parameters in the list if the PSIPENTA field designation is entered in the column Designation of the parameter. If yes, an attempt is made to write on this field. If a field cannot be written on, the remaining list is still processed though the status is set to –7 and the corresponding error message is written on the error parameter.
Syntax:
Status = f$PSI_SetFields (PGname,NameList,NameError)
Argument
Type
Meaning
PGName
String
Name of the parameter group
NameList
String
Name of the field containing the names of the parameters to be processed
NameError
String
Name of a parameter of string type on which the PSIPENTA message is written in case of an error.
Result:
Integer
Function status
Possible values: -3,-4,-7,-9,-13
In the following example, parts of the example rule-based controls (PSIPENTA_STD:Anschrift_Zu_PSI) for creating/adjusting addresses in PSIPENTA with addresses from SalesManager are presented.
Prefill the list of parameters:
List_A[1] = ’Company1’
List_A[2] = ’Street’
List_A[3] = ’Zipcode’
List_A[4] = ’Town’
List_A[5] = ’State’
List_A[6] = ’Countrycode_PSI’
List_A[7] = ’Countrycode_A2’
List_A[8] = ’CustLanguage’
The parameter PSI_A_EXIST carries the information for if a customer number needs to be created (-1), the address needs to be created (0) or if only an existing address is to be modified (1). PSIAddress.FiBuNr is the customer number. It must already exist before the address can be created.
