Free Essay

Srs User Prmission Doc

In:

Submitted By apj12374
Words 31215
Pages 125
FOP Programming The commands from A to Z
______________________________________________________________________________________

Contents
FOP Programming (1) Commands from A to Z .ACTION - Transaction .ACTION ABORT .ADD – Loading an additional record .ASSIGN – Assignment of values .ATEXT – Select abbreviation text .BOX – Multi-line messages .BROWSER – Internet browser .BUDGET – Summation of accounts .CHART – Displaying charts Options of .CHART –INIT, always in one line .COLOUR – Setting colors in screens .COMMAND – Running abas ERP commands .COMMAND - PARALLEL .COMMAND -WAIT .COMMAND -WINDOW .COMMAND -LOADER Command syntax if abas ERP commands .CONTINUE – Return to the called FOP .CONTINUE LABEL .COPY – Copying from database buffers Constant texts and .COPY Creating type conversions .CURSOR – Cursor control .DDE - Command .DELETE – Deleting records .DOWN - Footers .EDIT – System calls .END - FOP end .ERROR – Error message .FILE – File input .FORMAT – HTML output .FORMAT XML – XML generation .FORMULA – Assigning values to variables .HELP – Help chapter .INPUT – FOP program .JUSTIFIED – Text formatting .LEFT – Left margin .LENGTH – Page length .LINE – Line length .LOAD – Loading contents
©ABAS Software AG 2005

4 4 6 7 8 9 11 13 13 15 15 28 32 32 34 35 37 38 39 39 40 41 42 42 44 47 47 48 49 50 51 56 57 57 58 59 62 62 63 63 64
Page 1 February 2006/2006r2n01

Know how using abas Business Software

FOP Programming The commands from A to Z
______________________________________________________________________________________ .MAKE – Creating records Creating and deleting rows 67 .MENU – Menu selection window 72 .NOTE - Messages 78 .OCCUPY – Synchronization of file outputs 79 Lock option for .OCCUPY 79 .OUTPUT – Text output 81 .PAGE – Page range 86 .PARA – Paragraph protection 86 .PC – Commands for the PC-Client communication 88 .PRINT – Print output 92 .PRINTED – Print queue 93 .PRINTLN 93 .PROTECTION – Write protection 95 .READ – Reading contents 97 .RESERVE – Selection of a record which was reserved before 98 .REWRITE – Rewriting the record which was selected last 100 .RIGHT – Right margin 100 .SELECT – Selection of records 101 Select commands by means of which procurement suggestions can be accessed via a selection bar in FOP 124 File-spanning commands 124 Access lock when selecting a record 125 Lock options for .SELECT 126 .SEPARATOR – Separating character 132 .SET - Command 133 .SORT - Sorting 158 .SYSTEM - Running operating system commands 160 .TABLERECORD – Text formatting 162 .TEXT - Controlling the language of text output - based on message numbers 162 .TRANSLATE - Translation 163 .TYPE – Types of variables 166 .UNJUSTIFIED – Text formatting 168 .UP – Header lines 169 .VIEW 'feature' 169 .VTAB – Vertical tabulators 171 .WINDOW – Window size 174 .. Comment 175 Jumps and labels 176 Setting labels 176 Jumping to a label 176 ? - for conditions 178 Conditions 178 ..!INTERPRETER 179 Deactivating the abbreviation of variables 183 Information on various variable names 183 Predefined text variables 186
©ABAS Software AG 2005

Know how using abas Business Software

Page 2 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ German – English 194

©ABAS Software AG 2005

Know how using abas Business Software

Page 3 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

FOP Programming (1) Commands from A to Z
In this training document you will find the list of FOP commands with explanations on their function and use along with some examples. A list of all short references of the FOP (1) – Commands from A to Z can be found in the Online Help as well.

.ACTION - Transaction
Using the commands .ACTION- and .ACTION+ a program section with its write accesses of the database can be marked as a transaction. Then the write accesses within the transaction will either be carried out all together or not at all.
Syntax: .ACTION +/Command .ACTION + Meaning This command starts a transaction. The program section with its write accesses to the database will be marked and the write accesses will be bundled. This command will be used if several .REWRITE commands are carried out. Ends the .ACTION + transaction, the batch of write permissions will be released. Aborts a transaction in FOP. All effects on the database will be rolled back. (For more on this see the .ACTION ABORT chapter below.)

.ACTION .ACTION ABORT

In particular, this means that: • • • • All changes will only become active when .ACTION – is run. All locks will be held until that time. When the FOP is ended and there is an open transaction, .ACTION – will be run implicitly. If the program crashes, all changes made to the database will be rolled back.

This guarantees data consistency. When a sales order is saved, a record should be created in an additional database for every line of the sales order. Both parts, "saving the sales order" and "creating the records", belong together. The bundling of the write accesses which belong together using the .ACTION command increases the comprehensibility and the readability of the program. • Write access and user inputs which are interlinked:
©ABAS Software AG 2005

Know how using abas Business Software

Page 4 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Interlinked write accesses should be carried out as soon as possible and, if possible, should not contain any user input. If the user should be queried, this can be done without causing any problems before the beginning of the interlinking. • Interlinked write access and : If interlinked write accesses are contained in a FOP, this paragraph should generally be processes with a cancel lock, i.e. with the command .SET CANCEL - or .SET CANCEL --. This is, however, at the discretion of the FOP programmer. When the .ACTION command is carried out, the current status will be retained. When transaction is started, each FOP is allowed. Proper usage of .ACTION: .ACTION generally only has to be used if several .REWRITE commands are carried out. If the screen is left in edit editing mode, the transaction of the screen will always be active. This means that .ACTION can but does not have to be used. The usage of .ACTION also affects the lock behavior. Generally all read and write locks will be retained until the end of the transaction. In purchasing, sales and production reading is generally carried out using read locks. Please note: The holding of locks only has an "external" effect, i.e. with regard to other processes. It does not replace .SELECT LOCK. The transaction with .ACTION should be used if the application requires the interlinked writing of several records. For example, this is used for postings which consistently has to change several transaction figure records so that the account balance always remains unchanged. A counter-example is the mass change of, for example, master files. In this case each individual record can be changed independent of whether an other one is changed. This also applies if, for example, other actions can only be carried out after the mass change was carried out successfully. Ability to nest: Nesting is allowed. However, the commands .ACTION + and .ACTION – always have to be used together. Open processes in which .ACTION – is missing will be recognized at .END and an error message will be outputted. The same applies if the FOP is ended with an error. The transaction, however, will only be canceled if .SET CANCEL – is used. Otherwise the missing closing bracket will be completed using .ACTION -. note: Interlinked write accesses and .SET INTERRUPT can only be used outside paragraphs which are put into brackets using .ACTION. Please

Roll-back of transactions in the case of errors (.ACTION)
©ABAS Software AG 2005

Know how using abas Business Software

Page 5 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Transactions combine database changes that are inseparably linked to one another and thereby secures the data consistency. abas ERP offers the user the possibility to define transactions and to embed these in abas transactions using the screen exit FOP, for example. If an error or user abort occurs in such a FOP or EFOP, then the user-defined data consistency is no longer secured. In some cases such transactions are aborted and reversed in certain cases, namely when the FOP is running under unconditional cancel lock (i.e. after .SET CANCEL --). A message giving the cause of the error and warning of the abort will be outputted. For compatibility reasons the cancelation will not always take place. Otherwise existing exit screen FOPs would be affected as well, which can be canceled by the user when they are not critical. This would not be acceptable, since the transaction abort leads to the cancellation of all screen entries, to the end of the application process and thereby also to the closure of all windows. The abort occurs only when the FOP aborts due to an error, which includes the programming error in which the .ACTION – command belonging to the .ACTION + command is missing at the FOP end. .ACTION ABORT In FOP the current transaction can be canceled with the .ACTION ABORT command. All effects on the database will be rolled back. Other changes, such as those to the file system, will not be reversed and the FOP programmer is responsible for taking any necessary action. This command means that the current server process will be shut down as well. For the user this means that all associated windows will be closed. A warning message will appear to this effect. The message also contains the name and line number of the FOP that caused the abortion.
Syntax:

.ACTION ABORT When are transactions run?

A transaction which can be aborted with .ACTION ABORT will be run in two cases: 1. If a transaction was explicitly started from FOP with .ACTION + before. 2. In an EFOP in the case of screen exit and workflow events. This transaction will be automatically opened by abas ERP.

What happens in the case of nested transactions?

A transaction using
©ABAS Software AG 2005

Know how using abas Business Software

.ACTION + .. .ACTION –

Page 6 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ can also be nested. This has the same effect as one single big transaction. This means that an abortion with .ACTION ABORT always reverses the entire, that is, the outermost open transaction.

Behavior in Java-FOPs

As mentioned above, a consequence of an unsolicited rolling back of a transaction is the shutdown of the server process. Java-FOPs run in a separate process which communicates with the server process. This Java process will not be aborted, but it receive a CommunicationException. This is a RuntimeException. If the JFOP catches them, it can still carry out general clean-up work. Database actions or other method calls of the FOP class are of course no longer possible. Normally the CommunicationException will not be caught and the JFOP will be ended.

.ADD – Loading an additional record
Command .ADD .ADD 'reference field' .ADD VKZ Meaning If you use this command without specifying a name, the attached record will become inaccessible. This command selects a variable for the current record. In order to be allowed to use this command, a record must already have been loaded (e.g. via .SELECT). The reference record will then be loaded as well. Selects transactions figures.

A reference is often made in one record to another record. This results in the following situation: the vendor (supplier) and working plan is found in product records, and the product is found in sales order items, etc. If the attached record is required for the selected record, it can not be obtained with "Select", because this would mean that the first procurement would be replaced by the second. The .ADD 'reference field' command requires that a record has already been loaded, either explicitly by using the .SELECT command or implicitly via a screen event.

'reference field' has to be replaced with the name of a field from this record. It only makes sense

to use those fields, which refer to other fields. Such reference fields are indicated by a greater than sign (>) in the list of names for text variables ("variables and types"). The reference record will thus be loaded as well.
©ABAS Software AG 2005

Know how using abas Business Software

Page 7 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Restrictions with regard to .SELECT: • The record can not be edited or reset. • You can not query fields from a table which may exist. However, .ADD is much faster than .SELECT if records have a long table. If the record selected and the attached record both have the same name entries (e.g. "number"), the attached record will be read when the clash in names is discovered. Therefore, it can be desirable, to undo the process to obtain the attached record. Then you can make the entries (same name) for the record selected accessible once more. If you use the .ADD command without entering a name, the attached record will become inaccessible.

Example:

.SELECT sales sorder .ADD customer 'nummer' here returns the customern umber .ADD

In this case, 'nummer' will provide you with the sales order number again, since the attached customer was made inaccessible. FOP can return a record selected with .SELECT to the function key level. This is done by ending the formatting by using .CONTINUE (.CONTINUE – return to the called FOP). The relevant screen can then be further edited with the , or command in the dialog. You can not return packing slips (delivery notes), invoices and open items from the outstanding payments. The .SELECT ADD command has the same effect as the .ADD command, i.e. another record will be loaded to which a reference can be made from the record loaded with .SELECT. The difference is that if you use .ADD, a record which was previously loaded with .SELECT will be overwritten.

.ASSIGN – Assignment of values

©ABAS Software AG 2005

Know how using abas Business Software

Page 8 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ This command is a modification of the .FORMULA command and carries out different types of assignments. The syntax is similar to .FORMULA, though the reference object (H|, D|, etc.) for the variables must always be specified and the name can not be abbreviated.
.ASSIGN 'X|Name'='expression'

The command .ASSIGN is used to assign values to fields with a value range verification. The value will only be assigned if it lies within the value range of the variables to which it is to be assigned. If the value is outside of the variable value range, the variable will be set to "leer" ("empty"). The command .ASSIGN will set the variable 'mehr' if the assignment was successful. The types of variables on the left side and the formula on the right side must be of the same calculation method or "text" is found to the left or to the right. Calculation methods are the methods with which expressions are calculated, i.e integer, real, text, date, time, bool, week, due.date. In addition, there are the types reference, counter and fiscal year, for which the only operation is assignment.
Example: .TYPE I3 xi3 .TYPE I4 xi4 .ASSIGN T|xi3=xi4

will be successful if the value in xi4 has a value between –99 and 999 and if 'mehr' has been set to "yes". Otherwise, 'mehr' will have been set to "no" and xi3 will have the value zero.
Please take note of the following:

Even when
.ASSIGN T|xi4=xi3 is used, 'mehr' can have the value "no" as with: .FORMULA xi3=100000 a value > 999 can be assigned to xi3.

The types BU and TN basically can not be edited with .ASSIGN. Using .ASSIGN The command .ASSIGN replaces .FORMULA except for the types BU and TN.
It will be checked

if the value of the expression is an acceptable value for the variable "name". The FOP program will not be canceled if the value is not allowed, but 'mehr' will be set. References can also easily be assigned.

.ATEXT – Select abbreviation text
©ABAS Software AG 2005

Know how using abas Business Software

Page 9 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ The .ATEXT command selects the abbreviation(s)/text(s) with the number 'message number' from the msg.dat file (generated from msg.cc.dic) and inserts it in the 'name' FOP variable.
Syntax: .ATEXT 'name' 'message number' 'abbreviation'

or
.ATEXT 'name' 'message number' 'text'

Command

Meaning This command selects the abbreviation with the defined message number* from the file (generated from msg.cc.dic) and inputs it into the defined text variable ('name'). This command selects the text with the defined message number* from the file (generated from msg.cc.dic) and inputs it into the defined text variable ('name'). The parameter –LANGUAGE takes the text in language 'lsprache' from msg.cc.dic (see the following example):

.ATEXT 'name' 'message number' 'abbreviation' .ATEXT 'name' 'message number' 'text' .ATEXT –LANGUAGE ['lsprache']

*The message number is the text number from the "msg.tx.dic" dictionary; it can either be entered by hand or by via the "trans" program. Certain rules have to be observed so that the translation program of the FOP commands can recognize and translate all commands. When a command word is integrated in a text variable, it will not be recognized as a command and will remain German. When such a FOP is run, abas ERP will output an error message saying that there is an unknown command. Due to the extension of the analysis of FOP commands such constructions are only required if the .FORMULA command is used.
Example: .ATEXT -LANGUAGE 'lsprache' xcmd 3397 formula .FORMULA xcmd = xcmd + "xfinh = m | " + evtvarori .'xcmd'

The .ATEXT command shown above takes the text no. 3397 in language 'lsprache' from msg.cc.dic. The following text "Formula" is merely a comment and can be omitted. After the execution of the .ATEXT command you will either find "Formula" or "Formel" in 'xcmd', depending on the FOP command language.
Example: .ATEXT xt 1

©ABAS Software AG 2005

Know how using abas Business Software

Page 10 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ The overflow of the LIFO/FIFO buffer 'xt' contains the above text with number 1 from msg.cc.dic in the language which is specified in the code column (column 7 in msg.cc.dic) production/installation/FOP/operating language. The 'text' here is only a comment. The whole text is always read from the file.
Example: .ATEXT xt 1312 F 'xt' contains the abbreviation for "foreign currency" in the respective operating language. F is the abbreviation for the "foreign currency" line from msg.cc.dic: 1312.D.UGBFSLWX (Summary of all the

formula codes, to avoid double occurrences in a translation.)
Background:

Abbreviations, which go into the database, have to be available in future in every operating language (key). They are thus always saved in the installation language. If you are searching for a record in the database using FOP, the corresponding abbreviation in the installation language has to be selected using the .ATEXT command. (See also chapter .TEXT – Controlling the language of the text output independent of the message number”).

.BOX – Multi-line messages
The command .BOX is used for outputting messages with several lines via FOP or EFOP. The messages appear in a window which will be closed when a key has been pressed. The position of the window can be specified. The .BOX command can basically be run and used just like the .MENU command. Please note: The .MENU command is sometimes used in order to output multi-line messages which looks weird, especially in the graphical user interface. You just need to exchange the .MENU command and the .BOX command in these cases.

The .BOX command has the following syntax:

©ABAS Software AG 2005

Know how using abas Business Software

Page 11 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
.BOX .BOX .BOX .BOX .BOX (LINE, COLUMN) TITLE (LINE, COLUMN) TITLE corresponds to .BOX(0,0)

EFOP without output window: "row" and "column" are the screen coordinates, "0" means centered. EFOP with output window: "row" is the number of blank rows before the menu display. "column" is the x screen coordinate. "0" means centered. Location and measures: In the GUI .BOX is a separate window which is positioned above the current window and whose dimensions are suited to the length of the text. The start coordinates have no meaning in this case.
Example:

Enter the following command in the FOP program:
.BOX(0,0) Status Data transfer was successful

A message box will then be outputted to the screen saying that the data has been successfully transferred.
Differences to .MENU:

• •

text can not be scrolled through – will be cut off 'mentxt' and 'menu' will not be set!

Related topics: .WINDOW Window size .MENU Selection window .ERROR Error messages in EFOP .NOTE Notes in EFOP

©ABAS Software AG 2005

Know how using abas Business Software

Page 12 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.BROWSER – Internet browser
The .BROWSER command is used to activate the internet browser. In the graphical user interface, the following browsers are supported: • • • • • • ERP Web browser (part of the GUI ERP) Firefox Mozilla Internet Explorer Netscape Opera

Syntax: .BROWSER 'Internet page' .BROWSER -FILE 'erp file' Meaning: .BROWSER 'Internet page'

is used, the respective 'URL' (web site) will be displayed via the browser. When the option -END is used, it will not be displayed straight away, but only once the program has ended.
.BROWSER –FILE 'vk/Liste.html'

The specified 'file' will be displayed with the browser. The file has to be specified with the path to the current directory (client directory). In the GUI only files from the win sub-directory of the client directory can be displayed.

.BUDGET – Summation of accounts
The .BUDGET command is used for defining the summation of accounts.
Syntax: .BUDGET -'options' 'account range' 'account range',...

Please note: The two standard accounts for "other accounts payable" and "other accounts receivable" are treated like entry accounts by the .BUDGET command.

©ABAS Software AG 2005

Know how using abas Business Software

Page 13 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ The .BUDGET command accepts account numbers and account search words as well as the range search in the following form "from ! to". (For example 100000!19999) The sum total of all specified accounts is calculated (related to the period set using the .SELECT MONTH command) and stores the results in the following FOP variables:
Variable ssum hsum asoll ahaben asaldo nasaldo esaldo nesaldo jasaldo esoll ehaben kbjasaldo kbasaldo kbesaldo Contents Sum total of transaction figures (debit) Sum total of transaction figures (credit) Opening balance (debit) (contains the transaction figures - sum total up to the start of the given period and the balance carried forward (on the side to be debited)). Opening balance (credit) (contains the transaction figures - sum total up to the start of the given period and the balance carried forward (on the side to be credited)). Balanced opening balance (debit) Opening balance with a preceding minus sign Closing balance (asaldo + ssum - hsum) Closing balance with a preceding minus sign Opening balance (year) Closing sum total (debit) Closing sum total (credit) This variable determines the opening balance of the year. This variable determines the opening balance of the actual data. This variable determines the closing balance of the actual data.

"asoll" und "ahaben" contain the total of the transaction figures at the beginning of the respective period. This command can be used with the following options: s or v

b g p k

Collective or summarization accounts included. If this option is missing, the summarization accounts will not be taken into account. Only the accounts "Accounts receivable" and "Accounts payable" are independent of the options and are always taken into account. Balance sheet accounts: Profit and loss accounts are not taken into account (is excluded with option g) Profit and loss accounts: Balance sheet accounts are not taken into account (is excluded with option b) The planned figures can be accessed with this option. Used for the determination of the amounts from the transaction figures of the cost centers/cost objects.

The options b and g exclude each other. All options have to be preceded by a minus sign (-).

©ABAS Software AG 2005

Know how using abas Business Software

Page 14 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.CHART – Displaying charts
Using this command charts can be displayed in screens in the GUI (Graphical User Interface).
Syntax of .CHART Several .CHART instructions have to be executed one after the other:

.CHART .CHART .CHART .CHART .CHART .CHART ... .CHART .CHART .CHART ... .CHART .CHART .CHART ... .CHART

-INIT 'option' -PARAM 'option' -CONSTANTX 'option' (optional) -CONSTANTY 'option' (optional) -STRIPEX 'option' (optional) -STRIPEY 'option' (optional) -STARTVALUES 'option' -VALUE 'option' -VALUE 'option' -STARTVALUES 'option' -VALUE 'option' -VALUE 'option' -SHOW 'file' 'tab'

Data will be displayed in these fields with the help of the FOP command .CHART. This command is only available via EFOPs. Options of .CHART –INIT, always in one line This instruction always has to be executed before a chart can be displayed. (Exception: .CHART -SHOW -FILE)
Optional: -FILE 'xtd' Normally .CHART uses a temporary file in order to save the chart options until the chart is displayed. The temporary file will be deleted after the diagram is displayed. With –FILE you can enter the name of a file which is to be used instead of the temporary file. This file will not be deleted after the chart has been displayed.

Syntax of .CHART -PARAM Sets the display options of the chart. If several display options are to be set, then several .CHART PARAM instructions have to be used.

©ABAS Software AG 2005

Know how using abas Business Software

Page 15 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
CHART -PARAM ... CHART -PARAM ... CHART -PARAM ...

Options of .CHART -PARAM for the whole chart
-CHARTTYPE 'type' Determines the chart type to be used. Possible are: PIE (pie chart); BAR (bar chart); LINES (line chart); AREA (filled out line chart); CURVE (curve chart); CURVEAREA (filled out curve chart); STEP (line chart with steps), GANTT (Gantt chart) and BUBBLE (bubble chart). The chart heading can consist of several lines. A semicolon causes a linebreak. Sets the background color. If you do not define this, the background color of the screens will be used. 'col': Color number (1, 2, 3, ...) Sets the background color. If you do not define this, the background color of the screens will be used. 'red' 'yellow' 'blue': RGB color (0 0

©ABAS Software AG 2005

Know how using abas Business Software

Page 53 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Example:

Read a number from each of the files NUMBERS1 and NUMBERS2 (which have the same length) and output them together:
.TYPE int x1 x2 xzahlen1 xzahlen2 .FILE -OPEN xzahlen1 "NUMBERS1" .FILE -OPEN xzahlen2 "NUMBERS2" !WHILE .FILE -READ 'xzahlen1 x1 .FILE -READ 'xzahlen2 x2 .END ? _mehr 'x1' 'x2' .CONTINUE WHILE

If, in contrast to the precondition, the file NUMBERS1 is shorter than NUMBERS2, the program will be cancelled and the error message "End of file already reached" will be outputted in the first line with – READ. If the file NUMBERS1 or NUMBERS2 does not exist, the program will be canceled. If this is not intended, the option –TEST has to be used.
Example:

.FILE -TEST -OPEN xzahlen1 "NUMBERS1" .CONTINUE NOERROR ? mehr .BOX File NUMBERS1 does not exist or can not be read! .. .CONTINUE NONEXISTENCE !NOERROR ...

Using the variable 'descriptor name':

You should never assign values to this variable. The .FILE command always sets the variables to a suitable value. Upon opening successfully the value will be unequal to zero. Upon closing, either explicitly or once the end of the file has been reached, the value will be reset to zero. If, for example, you would like to work with several files in a line of .FILE -READ, you can use the replacement of dots: Using the above as an example this would mean:
.TYPE TEXT oneoftwo .FORMULA oneoftwo = "1" or "2" .FILE -READ xzahlen.oneoftwo xxxx

©ABAS Software AG 2005

Know how using abas Business Software

Page 54 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ You can use the comparison with zero to decide if a descriptor name should point to an opened file.
Determining if a file exists:

The existence of a file can be ascertained by using
.FILE – TEST 'file name'

. The variable 'mehr' will then be set.
Example: .FILE -TEST "AN" .FILE -TEST "vk/AN"

As usual, the file will be searched for in the permitted working directories, unless the sub-directory is explicitly specified. Comparison of .FILE and .SELECT FROM: In contrast to .SELECT FROM (and to .load 0), .file can be used in sub-programs without causing problems. It does not influence the main program. Even if both work with .FILE. If files are already open in the main program, then the sub-program will be assigned the next available descriptors. This procedure is transparent for the programmers. With this, the sub-program can read a file that is already open in the main program. This is possible, because descriptor variables are being worked with rather than file names. In all cases, you should be sure that files which are no longer needed are closed when the end of the file is reached. On the one hand, this conserves system resources, on the other hand, the limit of 9 open files could be exceeded in cases such as when a sub-program is run again and again in a loop. PC files can not be opened with .FILE. .FILE prevents you from going on reading when the end of the file has been reached. Even if you forget to query 'mehr'. When .SELECT FROM is used, the range will be read again. This is cannot be changed, since it is probably already used as a feature.

©ABAS Software AG 2005

Know how using abas Business Software

Page 55 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.FORMAT – HTML output
The .FORMAT command can be used to switch from FOP output to HTML format.
Syntax: .FORMAT [options ...] HTML

The specification of an output format has no influence on the output medium you use. HTML texts can be outputted both on the screen or on the printer. The .FORMAT command has the following effect: • • • • • A required introduction precedes the output. 8-bit characters (e.g. umlauts) are converted into the corresponding HTML command. Protected blanks are converted into the corresponding HTML characters ("nobraking space"). Characters with a special HTML meaning (&,) are protected. FOP commands of the type .PRINTE 'attribute' are converted into corresponding HTML instructions. Note: The command .FORMAT must not be abbreviated as otherwise it could be confused with the .FORMULA command.

Example:

When the command .PRINT SF.ROT is run, the font color will be red. At the end of the program, the conclusion, which syntactically belongs to the HTML introduction text, will be attached to the document.
Terminating the HTML output

The command
.FORMAT ABAS

cancels the effect of the .FORMAT HTML command.

©ABAS Software AG 2005

Know how using abas Business Software

Page 56 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ .FORMAT XML – XML generation The support of the XML generation solves the following problems: • • The output character set is switched from the abas ERP character set to ISO 8859-1. Characters with special meanings in XML can be quoted, if desired.

The necessary commands are the same as those used in HTML (.FORMAT HTML). However, only XML code that has been specified explicitly will be created. "Comfort functions" like the automatic generation of tables and the conversion of FOP commands into HTML codes are omitted. This gives the FOP programmer full control over the output. However, he/she has to know the required syntax exactly. The XML feature can also be used to generate HTML. This is useful when the programmer does not want to use the "convenience functions" and wants to gain full control over the HTML code that is generated.
Syntax:

The syntax is identical with the syntax of the HTML generation. The XML format is set with
.FORMAT XML

In addition, the following can be set:
.SET COLON +

(for more on this see chapter .SET COLON)

.FORMULA – Assigning values to variables
The .FORMULA command assigns new contents to the 'name' variables.
Syntax: .FORMULA 'name'='expression'

The variable left of the equals sign is given the calculated value of the expression as the new contents, whereby you have to deal with an arithmetical operation (addition, subtraction, multiplication and division). The expression can contain variables, numbers, texts, brackets, operations or other commands.
©ABAS Software AG 2005

Know how using abas Business Software

Page 57 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Texts have to be indicated by quotation marks. In addition to the usual arithmetic operations "+,- ,* , /" the types bool, text, time, date and week can also be used for the variable types integer and real. When a value is assigned to the variable of a record in the M reference area via an EFOP, the application methods of this record will be accessed as well in order to retain the application logic. The editability of the field and the admissibility of the value assignment are checked in this way. If these checks fail, the program will be canceled. In addition to the M record, this logic is also used for records which were created with .MAKE. In all other cases, the entry in the table of variables determines the editability of the fields. By default only such fields will be marked as being editable, for which no call of an application method is required. This will be the case if no follow-up actions, no dynamical write protection, no non-syntactical checks, etc. are used.

.HELP – Help chapter
The .HELP command opens the specified help chapter:
Syntax: .HELP 'chapter'

The individual help can thus be connected with a function key via an EFOP.

More information on this can be found in the "EFOP – Event-driven programming" training document.

Since you also know the current screen field, the field-oriented help can be opened in this way as well. Company-internal, individual help chapters can also be opened with this command. (Individual help texts should be saved in chapter 100, which is not affected by upgrades.)
©ABAS Software AG 2005

Know how using abas Business Software

Page 58 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.INPUT – FOP program
The .INPUT 'ftext' command runs a FOP program. When you use the command .INPUT 'name', the specified 'text' will be loaded and processed as an additional FOP program (sub-program). This FOP program as well can contain any FOP commands, so that text modules can be used in order to specify page formats. FOPs can be stacked, i.e. they themselves can contain "input" commands. Up to 10 sub-programs can be nested inside one another. If the name is missing, the text will be read from the keyboard, i.e. input via the keyboard is required (a "+" will appear on the screen and you will be in direct mode).
Command .INPUT .INPUT 'free text' .INPUT 'name' .INPUT -TEXT 'file name' Meaning Input via the keyboard is expected (direct mode). Input of free texts in fields the variables of which can, for example, have the name 'free text' and 'free text2'. (See the example below.) Imports a file. The specified text will be read as additional input text (sub-program) and processed. This input text can contain any FOP commands so that text modules can also be used in order to set page formats. Pure text output without interpretation: With this command you can switch off the interpretation and read-in a file as pure text instead of as a FOP command file. No commands will be carried out and no variables will be replaced by contents. Each character (i.e. also ,.:'?) stands for itself. Before the output all activated formatting (e.g. justified, page margins or header and footer) will be carried out. When .INPUT –TEXT is used, variables in inverted commas, e.g. 'page', can be used anyway in the upper and lower buffer, although the variable replacement for the actual text has been deactivated.

Examples:
.INPUT 'free text' .SELECT CUSTOMER "1"
'free text'

Simplification:

The command
.INPUT 'variable'

will have no effect when 'variable' is empty. In this way you can, for example, easily process free text references with

©ABAS Software AG 2005

Know how using abas Business Software

Page 59 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
.INPUT 'free text'

You do not have to query if 'free text' is available. The direct mode can even be used when no argument has been specified.
Stack information for FOPs

The FOP call stack (i.e. the nested called sub-programs including line numbers) can now be queried. Thereby a row of information can be determined: • • • • • • • •
SYS.FEHL.SOFTWAREPARTNER)

Call stack including row numbers for error logs (mechanism

The name of the current row of the currently running sub-program (e.g. for test output, error messages) The current nesting depth (can also be used for local identifiers) The question if at all and, if "yes" is the response, which JFOP called a FOP The direct caller of the currently running sub-program The question, if a specific FOP is lying in the stack, i.e. if it is at least an indirect caller The question, from which work area the callers are The question, from which language directory a FOP originates.

The following variables are available for this: framecount stackframe linenumber stack

Number of FOPs in the stack Array(1..framecount): Name of the FOP in the stack Array(1..framecount): Line number of the FOP in the stack Total stack (all sub-programs: line numbers, separated by ->)

Please note that, in contrast to 'txname', in 'stackframe' the name of the language directory will also be obvious if the FOP was found in one of these. For the common variable txname the following applies:

txname = stackframe1

if the FOP does not originate from the language directory.
Example: vk/LKU --> txname=vk/LKU stackframe1=vk/LKU E/vk/LKU --> txname=vk/LKU stackframe1=E/vk/LKU

©ABAS Software AG 2005

Know how using abas Business Software

Page 60 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ In a Java program the following applies: framecount = 0 Example:

Outputs the current line I am line 'linenumber.framecount' of 'stackframe.framecount' Outputs the direct caller
.FORMULA before = framecount – 1 My caller is 'stackframe.vor':'linenumber.vor'

Outputting a stack as a text
'stack' Example:

für eine mögliche Ausgabe
->Direct mode->XY:2->YY:4->FRAMETEST:18

Output stack by loop
.FORMULA i = 0 !WHILE .FORMULA i = i + 1 .CONTINUE ENDWHILE ? i > framecount stackframe['i']: 'stackframe.i':'linenumber.i' .CONTINUE WHILE !ENDWHILE

Using this one can write a sub-program that can be called in error situations and will output the stack (apart from the own stack frame).

©ABAS Software AG 2005

Know how using abas Business Software

Page 61 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Was it called from a JFOP? If "yes", the 'stack' variable will display this at first as well as the .java extension. If a specific FOP is on the stack To check whether vk/ABC is saved in the stack memory:
.PRINT yes ? stack / "->vk/ABC:"

Not specific enough:
.PRINT yes ? stack / "vk/ABC"

returns true even for "owvk/ABCD". As 'stack' always begins with "->", the first query is always possible.

.JUSTIFIED – Text formatting
Using the command .JUSTIFIED a text is filled in a right-justified manner by inserting blanks. If necessary and possible, words are separated by syllables. Several blank spaces, which occur one after the other, will be removed from the input text. Blanks will be inserted after punctuation marks and the paragraph protections will be activated (see .PARA – paragraph protection).

.LEFT – Left margin
.LEFT ''n' columns' specifies the left border. When 'n' has no preceding sign, the following text will start in column 'n'. The space before this thus makes up the left margin. 'n' can have a +/- sign in order to be able to make shiftings in relation to the text environment.
Command .LEFT 'n' .LEFT 'n' .LEFT -'n' .LEFT 'n' mm .LEFT 'n' +'m' .LEFT 'n' -'m' Meaning Defines column 'n' as the left margin. Increases the left margin by 'n' columns. Reduces the left margin by 'n' columns. Sets the left margin to 'n' millimeters (1 inch = 25.4mm). The left margin of the first line of every paragraph will be increased by 'm' columns (indention). The left margin of the first line in every paragraph will be reduced by 'm' columns. Example .LEFT 10 .LEFT +3 .LEFT -3 .LEFT 50 mm .LEFT 5 +5 .LEFT 5 -2

©ABAS Software AG 2005

Know how using abas Business Software

Page 62 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ The left margin can also be defined in millimeters. .LEFT 'n' mm sets it to 'n' millimeters. According to this, every other form of .LEFT can also contain "mm" or "millimeter". When using millimeters, you should take into account that the number of characters depends on the character width of the monitor or the printer. You can find out the character width from the instruction manual of the monitor or printer. It is usually specified as characters per inch ("char per inch", cpi). Typical values for printers are 10 or 12 cpi for normal font and 16 to 20 cpi for close-spaced lettering. For the conversion the following applies: 1 inch = 25.4 mm. When the character width is changed (see chapter .PRINT – Print output, .VIEW, .PRINT), all margin settings will remain in the unit which was specified last.

.LENGTH – Page length
The command .LENGTH 'number of lines' specifies the number of lines per page. .LENGTH 'n': The 'n' in this command stand for a positive integer number (1,2,3 ...). 'n' lines per page are assumed as the page length. If the length specification is missing, the page length will be set to the standard length of 72 lines per page. The standard page setting is 72 lines and 80 columns if the normal density is 10 cpi (characters per inch) and 6 lpi (lines per inch) (1 inch = 2,54 cm) on 12” pager (12 inches). This is the normal width for continuous paper. This paper format has the same width as DIN A4, but it is slightly longer. The .LENGTH command makes it possible to use another page layout and other paper formats.

.LINE – Line length
Command .LINE 'line number' Meaning Writes the following text into the respective line.

The standard page setting is 72 lines and 80 columns if the normal density is 10 cpi (characters per inch) and 6 lpi (lines per inch) (1 inch = 2,54 cm) on 12” pager (12 inches). This is the normal width for continuous paper. This paper format has the same width as DIN A4, but it is slightly longer. The .LINE command makes it possible to use another page layout and other paper formats. The 'n' in this command stand for a positive integer number (1,2,3 ...).
.LINE 'z' The following text will be written into line 'z'. A page break may be needed for this.

©ABAS Software AG 2005

Know how using abas Business Software

Page 63 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.LOAD – Loading contents
The .LOAD command loads the current contents of the record reserved with .RESERVE. • Semantics of the FOP .LOAD command: The buffers 0-9 are available for the .LOAD command. In the text x always means a loader buffer, i.e. a figure from 0-9. Additionally, there are also buffer name variables. .LOAD x 'file name': x stands for the loader buffer, represented by a figure from 0 to 9. If no other argument is entered, no

additional search will be carried out.
'file name' stands for a database name. The same names as in the file commands of the command syntax and for .SELECT can be used. The pseudo name "object" is allowed as well.

Buffer 10 of the .LOAD command releases all FOP buffers and thus possibly also records which are locked in FOP. It can be used in conjunction with .input ALLBUF.FREE.
Command .LOAD x 'file name' .LOAD x ADD 'reference' .LOAD x CONTINUE .LOAD x .LOAD x LINE ['n'] Meaning "Range" or "variable". x stands for a loader buffer and is represented by a figure from 0 to 9. Loads exactly one object; "range" will only contain this single object. Switches to the next object. Buffer x and "range" will be deleted. Loads the next or n-th line when there are tables in the objects or in sales/purchasing as with .REWRITE. The "range" and the loaded object remain intact.

Explanations:
.LOAD x 'file name' with one argument .LOAD x CONTINUE and 'file name' without argument .LOAD x ADD 'reference field' .LOAD x without any other argument .LOAD x LINE with usual arguments .LOAD x ADD without any other argument .LOAD x 'file without an argument name' Defines a range and loads the first record of the range. Switches to the next object in the range. Defines a range with a maximum of one element, i.e. the record to which the reference field refers. The "buffer" and the "range" will be deleted. Positions on a line. Apart from this, the loading status remains unchanged. Other verbs which you may know from .SELECT – e.g. lock – do not work! DOES NOT WORK In contrast to .SELECT , this will not run a new search if the load buffer has been empty before.
Page 64 February 2006/2006r2n01

©ABAS Software AG 2005

Know how using abas Business Software

FOP Programming The commands from A to Z
______________________________________________________________________________________
States of the loader buffer
Buffer and range empty Buffer filled and range defined Initial condition when you run the FOP. Fields can not be accessed. The previous .LOAD operation returned 'mehr'="yes"

All .LOAD operations can be carried out when the loader buffers are empty of filled in. You can query if buffer X has been filled with
... ? defined(X|id)

When is 'mehr' set to "yes".
.LOAD x 'file name' "" .LOAD x ADD 'reference field' .LOAD x CONTINUE .LOAD x .LOAD x LINE … The range seams to have been defined and a first object was found and loaded in the range. Reference is not empty; the object to which was referred was loaded. The buffer was filled before and another object could be loaded. After .LOAD x ADD REFERENCE in .LOAD x CONTINUE 'mehr' will always be set to "no". Will never return "mehr=yes"; the load buffer will subsequently always be empty. This is an exception: The loading status will not be changed. Itwill be merely set on the appropriate line. 'mehr' will be set to "yes" if the relevant line exists in the buffer. Rule: If after .load x 'mehr' is set to "yes", the buffer will always be filled.

When is 'mehr' set to "no"?

When the area is used up or not defined.
Rule:

If after .LOAD x 'mehr' is set to "no", the buffer will be empty. Field accesses can only be carried out via
'x|fieldname'

Buffer-related procedures can be used as well (e.g. x|selzeile). This means that the buffer always has to be specified with '1|nummer'. Otherwise it will have no effect. Especially not on other buffers and no other switches, especially as far as "locking" is concerned.

©ABAS Software AG 2005

Know how using abas Business Software

Page 65 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Simple area example:

.LOAD 0 mehr -> .LOAD 0 mehr -> .LOAD 0 mehr -> .LOAD 0 mehr ->

CUSTOMER "$kunde,num=1,2" yes CONTINUE yes CONTINUE CONTINUE CONTINUE no

Example of how to delete an range

.LOAD 0 mehr -> .LOAD 0 .LOAD 0 mehr ->

OBJECT "$kunde;num=1,2" yes (# works!) OBJECT no

Example with .ADD .LOAD 0 mehr -> .LOAD 0 mehr -> ADD 'reference' yes OBJECT no (# .LOAD 0 ADD range contains exactly 1 element!)

selzeile is used for the access of found rows in a row selection: Example:

.LOAD 0 OBJECT 'M|select' .CONTINUE END ? _T|mehr .. whereby M|select is a row selection with the selection syntax component @rows=yes (see the selection syntax) .. !NEXTROW .LOAD 0 LINE '0|selzeile' .CONTINUE END ? _T|mehr .. The row is processed in some way .. .. After the processing of the row loaded with 0|selzeile, the next row is to be loaded for editing .LOAD 0 OBJECT

©ABAS Software AG 2005

Know how using abas Business Software

Page 66 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.MAKE – Creating records Creating and deleting rows
Records (supplementary files, messages, EDI, stocktaking, forwarding agency, lot, documentation) can be created and rows can be created and deleted in any files with the .MAKE command.
Command .MAKE 'file' ['group'] Meaning Creates records for specific files (additional files, message, EDI, stocktaking, shipping order, lot, documentation) or deletes and creates rows. A blank record can be created for an additional file with this command. If no group is specified in the command, a record will be generated by FOP in group 0 . You have to specify if 'group' is GROUP0, GROUP1,...,GROUP9. These groups have to have been defined in the company data record before. The group, identity number, review date and search term are optional specifications and can be omitted. The search word and the file name, however, always must be specified. The .MAKE command does not change the 'mehr' variable. When an identity number is specified, it will not be checked if this number is unique. The uniqueness check will only take place when the record is rewritten (.REWRITE command). The record obtained will be recorded in the additional file with .REWRITE. In doing so, either a new, consecutive identity number will be assigned or the specified identity number will be checked (uniqueness). If it is not unique, an error message will be outputted and the FOP will be canceled. A shipping order can be generated with this command. A customer has to be entered in order to rewrite the shipping order using the .REWRITE command. This command is used to create a message. The variables found in the mail screen (and only these) can then be set using .FORMULA commands.

.MAKE FORWARDING GROUP1 .MAKE MESSAGE

(For more on this see the example below.)
Command .MAKE [SCREEN] LINE + Meaning Inserts a new row under the current table row. (+) is optional. The cursor will be positioned on the row created at the same time. Inserting after the header is the same as inserting before or generating the first row of the table. (See the explanations below.) Deletes the current table row. (See the explanations below.) Removes all table rows at once. (See the explanations below.) Optimization of the action: Increases the speed when inserting many rows in a screen; Please note: you can not have any blanks between the plus sign and the argument O. (See the explanations below.) Optimization of the action: The deletion of many screen rows will be increased; Please note: You can not have any blanks between minus signs and the argument O. (See the explanations below.)

.MAKE [SCREEN] LINE .MAKE [SCREEN] LINE -.MAKE SCREEN LINE +O

.MAKE SCREEN LINE -O

©ABAS Software AG 2005

Know how using abas Business Software

Page 67 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ .MAKE – Creating records This command creates a blank record in the H buffer. The general syntax of .MAKE for the creation of records is:
.MAKE 'file name' ['group specification'] Example:

.MAKE FILE2

creates a blank record of the second additional file with group 0 in the H buffer. Just like when .SELECT and .LOAD are used, an abas ERP file has to be specified as the 'file name'. The system variable 'hdatname.i' can be used for this as well. If, however, .MAKE is used, only the files specified above can be used. For 'group' something like GROUP0, GROUP1, … has to be specified. If nothing is specified, a record with group 0 will be created if this is allowed for the application concerned. If there was already a record in "H", this will be removed and a new, blank record of the requested file and group will be created. As usual, fields can be set by means of .FORMULA, provided that they are writeable. The records is (in contrast to the .SELECT command) completely controlled by the application – just as it was edited in a screen. This means that the application logic of screens, e.g. with regard to the write-protection and mandatory fields, i.e. the application methods will be run. This is an advantage as thus the generous EFOP write-protection will be valid an not the writeability according to the FOP column of the vartab which is much stricter. However, the mandatory fields of the screen must be set as otherwise saving is not allowed. Note: When all fields have been set, .REWRITE has to be run.

If it was not set by the user, the identity number will only be entered when .REWRITE is run. The groups that can be created and the mandatory fields that must be set depends on the application. The following table contains the information about this:

©ABAS Software AG 2005

Know how using abas Business Software

Page 68 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Application Additional file Shipping order Message EDI Stocktaking Lots Document Allowed groups All groups which have been defined in the company data record. Group1 No group specification allowed – except for group1. Group0 Group1 Group1 Group1 and group2

Just as in the screens, all mandatory fields must be filled in. In messages, for example, a subject has to be entered. The .MAKE command does not change the variable 'mehr' because it will always be successful if the command is syntactically correct. In the following you will find some examples on the individual applications. .MAKE SHIPPINGORDER GROUP1 A shipping order can be created with the command .MAKE SHIPPINGORDER GROUP1. A shipping order which was generated in this way can only be used in sales packing slips (delivery notes).
Example: .MAKE SHIPPINGORDER GROUP1 .FORMULA h|kunde = "ABAS" .REWRITE

.MAKE MESSAGE This command is used to create a message. The variables found in the mail screen (and only these) can then be set with .FORMULA commands.

©ABAS Software AG 2005

Know how using abas Business Software

Page 69 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Example: .MAKE MESSAGE .FORMULA SUBJECT = "Shutdown" .FORMULA FTEXT = "SHUT.TXT" .MAKE LINE .FORMULA EMPFEX = "all" .REWRITE

Creates a blank message Enters the subject Copies SHUT.TXT in the free text Creates the first line of the recipient list and goes to it Enters the distributor "all" Saves the message (sends it)

.MAKE - Creating and deleting rows This command creates a new row or deletes one or all rows. This is allowed for the H buffer (but only for the additional files) and the M buffer. Syntax:

.MAKE [SCREEN] LINE [+|-|--][O]

The options have the following meaning:
SCREEN LINE + -O

The operation is to be run in the M buffer. If nothing is specified, it will be run in the H buffer. Must be specified if you are dealing with row operations Inserts a row under the current row The option + is the default value (can be omitted). Deletes the current row Deletes all rows Optimization: This must be specified directly after + or – (without a blank) and accelerates the output.

The options are explained in detail in the following. Rows can be inserted under the current table row with .MAKE [SCREEN] LINE + ("+" is optional). The

cursor will be positioned on the row created at the same time. Inserting after the header is the same as inserting before or generating the first row of the table. Rows which only contain blank fields will be removed with the .REWRITE command. The current table row can be deleted with .MAKE LINE -, all table rows can be deleted with .MAKE LINE --. .MAKE LINE can only be run for the screen record (addition "screen") or a locked (.SELECT LOCK) or a newly generated (.MAKE) record.

©ABAS Software AG 2005

Know how using abas Business Software

Page 70 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ .MAKE SCREEN LINE +/-O Using the additional option "O" (like optimization) accelerates the insertion and deletion of many screen rows considerably. There can be no blank spaces between "+" or "-" and the "O"! This option does only affect the M buffer. If you do not use the optimization, then all the commands such as
.FORMULA M|fieldname = value .MAKE SCREEN LINE + .MAKE SCREEN LINE -

can all be seen in the screen straight away. When you optimize the action, the screen will only be update at the end of the EFOP.

Note: You should not optimize the action if the FOP still requires input and the user should see the result of the commands up to now in the screen. You should only optimize the action if a certain number of rows is changed because after the EFOP has been run the complete screen must be rebuilt.

Deletion of rows during an event handling

If in an EFOP the current event still has follow-up events you have to make sure that the current row is not moved or even deleted. Otherwise, subsequent events would be applied to the wrong row. As a result, in such cases you can not delete or insert rows up to the current row and the EFOP will be canceled with a corresponding error message. The following events are concerned among others: "Field filled in", "Field validation", "Button (before)"; "Delete line (before)"; "Insert line (before)". This means that you have to insert or delete rows when the closing event is taking place, i.e. "Field exit", "Button (after)" etc.

©ABAS Software AG 2005

Know how using abas Business Software

Page 71 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.MENU – Menu selection window
Menus and menu windows are created using this command. In addition to the .READ command, the .MENU command can also be used by the user to request answers.
Syntax: .MENU (heading) Menu line 1 Menu line 2 ..

If you use .MENU, each row will be formatted as in the text output. Even multi-row variables will be outputted with several rows and the left margin will be taken into consideration as well.
.MENU creates a selection window. You can go to the rows using the arrow keys and or by entering the initial letter of the desired row and select it by pressing . Selection = variable contents of 'menue'

The selection you have made can be queried with the integer variable 'menue'. When you press 'menue' will be zero. Otherwise, it will contain the number of the selected menu line.
Menu title: When .MENU is used, a text can be entered into the same line – which will be entered as heading into

the frame of the menu window – as well as further parameters.
Menu lines and end of menu:

A menu command should always be closed with two dots (comment) so that this syntactical unit has a uniform closing which can be recognized easily. Otherwise, the menu will end at the first dot command or comment after .MENU. All lines between .MENU and this closing are menu lines, i.e. the prompt texts of the menu which can be seen on the terminal. They can also contain variables (e.g. 'frei') which are replaced by their value as usual.
Example: .MENU OptionA OptionB OptionC ?OptionD Example >> >> >> ? .CONTINUE LABEL Occupy xvar=yes

©ABAS Software AG 2005

Know how using abas Business Software

Page 72 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ The following will be outputted on the terminal:
+--- Example ---+ | OptionA | | OptionB | | OptionC | | OptionD | +---------------+ Selection: Action: -------------------------------OptionA Integer variable menue=1 OptionB menue=2, Jumpt to LABEL OptionC menue=3, FOP variable mentxt=occupy OptionD This line will only be displayed if xvar=yes; menue=4. menue=0

Explanations: Integration of dot commands:

After each menu line you can enter a dot command, separated by two ">>" (greater than signs). This dot command can not be seen on the screen behind the menu window:

©ABAS Software AG 2005

Know how using abas Business Software

Page 73 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Example: Standard input which requires a lot of writing can be adopted into the screen ('bem' field) via the menu in EFOP:
.FORMULA xa .FORMULA xb .FORMULA xc

= = =

"Please take note of the changes compared to our last quotation" "Changes might be made due to technical progress" "The warranty is 12 months"

.MENU Select the text for the remarks field
'xa' >> .FORMULA bem = xa 'xb' >> .FORMULA bem = xb

The command behind the ">>" will be carried out immediately after the selection. You do not have to specify this explicitly in the program.
Integration of texts After the greater signs ">>" you can also specify a text which does not start with a dot ".". In this case, no command will be carried out but the text will become the contents of the "mentxt" variable. This text as

well does not appear in the menu output on the screen:
Example:

.MENU Line 1 >> dname Line 2 >> derg ... .OUTPUT NEW 'dn' ? mentxt="dname" .OUTPUT ADDEDTO 'dn' ? mentxt="derg"

Note: Please take note that the menu variables "menue" and "mentxt" will be overwritten when .MENU is run the next time.

Visual menu layout:

The visual menu layout on the terminal can be influenced as follows:

©ABAS Software AG 2005

Know how using abas Business Software

Page 74 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Positioning the menu window:

You can specify two parameters directly after this command. These specify the position of the menu window on the screen.
Example: .MENU(5,35) Title

The first figure specifies the number of blank spaces before the output upper menu frame, the second one the start column. The first round bracket has to follow the .MENU command without any blank space in between.
Special setting:

If the start column is "Q", then the menu will appear centered to the side of the screen (the right and the left margin will have the same distance from the screen margin).
Example:

.MENU(5,30)

Main menu causes 5 blank lines to be outputted and the following menu will start with the title "Main menu" in column 30.
.MENU(5,30)

The main menu is incorrect! A menu with the title "(5,30) Main menu" will be outputted in column 1 of the following line.
.MENU(0,0)

a menu which has been centered on the menu border will be directly added to the last output.
Title and upper margin:

If blank spaces are typed before and after the title, the upper menu border will end the number of blank spaces before and after the menu title in the output. The blank spaces after the heading have to be closed by . .MENU has to be separated from the heading by at least 1 blank space. In this case, the margins will be approximately equal to the title.

©ABAS Software AG 2005

Know how using abas Business Software

Page 75 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Visual highlighting of the current selection:

The selected menu option will be highlighted by a bar or in full. The length of the bar first corresponds to the number of characters in the menu line of the FOP program (in the example below "1poss" would be shorter than "2possiblility"). In order to output bars of the same length for all the menu options, the greater than sign (>>) are used as well:
Example: .MENU TITLE Opt1 >> Option2 >>

Specifying the position of the menu selection bar in the GUI:

The position of the selection bar in FOP menus can be specified by means of the .MENU command. By doing so, you can realize multi-level menu systems in which the user will find the menu selection bar at the same position he was earlier when he returns to a menu he already visited before. The syntax for this is as follows:
.MENU('rows', 'column', 'selected row')

The syntax which was used up to now:
.MENU('rows', 'column')

can still be used. Example: • • (FOP for a small menu system) .. active menu items of the individual menu levels:

.TYPE INT xm1 xm2 ... .FORMULA xm1 = 1 .FORMULA xm2 = 1



©ABAS Software AG 2005

Know how using abas Business Software

Page 76 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ •
Menu width and length:

Generally a menu can cover the whole width and length of the screen. When writing the menu text, however, you must take into account that the frame takes some space at all borders and that the menu is clearly arranged. Note: In FOP you can scroll through the menus and they are not restricted to the size of the active window. In EFOPs up to 99 alternatives are possible. We can guarantee that not the whole text which was outputted before will be scrolled over by the menu. At least 2 lines will remain. .. Menu system with two levels
!WHILE .MENU(0, 0, 'xm1') first menu level 1 2 3 4 5 6 End >>.END 0 ... ................... Note selection: .FORMULA xm1 = menu !REPEAT .MENU(0, 0, 'xm2') second menu level, sub-menu for "'xm1'" Action 'xm1'.1 >> Action 'xm1'.2 >> returning to the previous menu >>back ... ................... Note selection: .FORMULA xm2 = menu .CONTINUE REPEAT ? mentxt "back" .CONTINUE WHILE

Format specification as the first selection text (GUI): The FOP command .MENU can even use a format specification as the first selection text. This format

specification specifies how the following texts will be structured by tabs. Due to this option, it is also possible in the GUI to output selection texts in columns. The format specification only consists of the characters "+", "-" and " " (blank space). + – Specifies the beginning of a right-justified column Specifies the beginning of a left-justified column "-" has to be used additionally as the closing of the last column if this is to be outputted in a right-justified manner.
Page 77 February 2006/2006r2n01

©ABAS Software AG 2005

Know how using abas Business Software

FOP Programming The commands from A to Z
______________________________________________________________________________________

Note: A format string will only be accepted if there is at least one blank between two format characters "+" or "-". This restriction is necessary to avoid that separator lines of type "--------" are misinterpreted as format strings.

.OUTPUT TERMINAL .INPUT BILD.F .. .MENU + + Number Name 10 Meier 111 Schulze 2000 Schmidt .. Variable 'mentxt': 'mentxt' Variable 'menue': 'menue' ..

Points 1253 >>Meier 999 >>Schulze 17 >>Schmidt

.NOTE - Messages
Single-line EFOP messages are not only possible via the .ERROR command but also via the .NOTE command. This will not be regarded as an error in the database loader. The syntax and use are exactly the same as they are for the .ERROR command:
.NOTE .NOTE .NOTE .NOTE ('n') 'any text' -IMMEDIATELY 'any text' -UPDATE 'any text'

An acoustical signal will outputted if the text of the error message – which is outputted via .NOTE in an EFOP – starts with an exclamation mark.

Note: When you use the .NOTE commands in the GUI, a corresponding message will appear in the status bar.

©ABAS Software AG 2005

Know how using abas Business Software

Page 78 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ In contrast to .ERROR, in this case the immediate output of the note can be forced in the GUI:
.NOTE -IMMEDIATELY ('n') .NOTE -IMMEDIATELY 'any text'

In the GUI furthermore all changes made to screen fields can be displayed immediately (normally they will only be displayed when the EFOP is ended):
.NOTE -IMMEDIATELY -UPDATE ('n') .NOTE -IMMEDIATELY -UPDATE 'any text'

.OCCUPY – Synchronization of file outputs
Command .OCCUPY 'lockword' Meaning When you run this command for the first time, a user lock will be set for the 'lock word' and FOP can be used as before. If the command is run for the second time with the same lock word by another user, this user obtains a message to that effect saying that use is currently not possible due to the lock. Cancels the lock.

.OCCUPY

Lock option for .OCCUPY Lock options and lock modifiers can also be used with .OCCUPY. All available lock options can be found in chapter "Access lock when loading a record". With .OCCUPY the same options can be used as with .SELECT.
Syntax:
.OCCUPY string semaphore lock options

If lock options are missing, then the following will be implicitly valid: Writelock cancel. If, however, ahead of this .SET CANCEL -- stops the cancelation, then the following will be valid:

©ABAS Software AG 2005

Know how using abas Business Software

Page 79 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Writelock: The options "nolock" and "release" in connection with .OCCUPY do not make sense. The lock modifiers are all permitted and do make sense. If no modifiers are set, the FOP programming will be ended with "cancel". Otherwise only the variable "gesperrt=no" ("locked=no") will be set. Please note: Only one string semaphore can be set at any one time. The next .OCCUPY implicitly releases the last one.
.OCCUPY without any further option releases one string semaphore, if one was occupied.

In FOP a string semaphore, which is valid within the whole installation, can be occupied with .OCCUPY 'string semaphore name' company. This is synonymous with setting using
"batchsperr.sh -i".

The string semaphores, which are valid in the whole installation, do not compete with the client-related ones. The command .OCCUPY can only continue to set an individual lock (either installation- or clientrelated), i.e. each .OCCUPY command releases the previous lock.
More options
.OCCUPY 'string semaphore name' installation

String semaphores which are occupied with "Installation" are valid for all clients of an installation. They correspond to locks which are occupied with batchsperr.sh -i -t LOCK -x "command"

These locks can be used for commands when translating and maintaining dictionaries with "trans".

©ABAS Software AG 2005

Know how using abas Business Software

Page 80 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.OUTPUT – Text output
Data output can be directed to various output media in FOP by using the .OUTPUT commands.
.OUTPUT specifies the output device which is to be used. The output will only be generated when .OUTPUT is run again or when the FOP is ended. When .OUTPUT TERMINAL is used, the output will be

generated after each line. The command has the following syntax:
.OUTPUT .OUTPUT 'device' .OUTPUT 'device' 'device option' .OUTPUT 'device' : option1 option2 ...

Command .OUTPUT .OUTPUT TERMINAL .OUTPUT .OUTPUT .OUTPUT .OUTPUT … BREAK... TERMINAL ... TERMINAL BREAK

Meaning Directs the output to the screen. The previous screen contents will be deleted. The three dots or the specification of BREAK mean a stop: This means that FOP will wait for the generation of another output text so that the current text can be read on the terminal. Only when is pressed, the FOP will continue to run. In the ASCII interface the terminal contents will be deleted before the FOP is continued. Directs the output to the local printer. Appends the output text to the end of the free text specified; the free text remains intact and is extended by the text appended. The free text will be overwritten when this command is used. In the adjacent example "text" will be come the contents of the free text. Adds the output text to the end of the specified file. The text, which was in the file until then, will still be there and will be extended by the new supplementary text. Directs the output to a file with the name you specified. The contents of the existing file will be overwritten!

Example

.OUTPUT .OUTPUT TERMINAL .OUTPUT... .OUTPUT BREAK... .OUTPUT TERMINAL ... .OUTPUT TERMINAL BREAK .OUTPUT A .SELECT CUSTOMER LOCK .OUTPUT ADDEDTO 'free text' .SELECT CUSTOMER LOCK .OUTPUT NEW 'free text' .OUTPUT ADDEDTO "TESTFILE"

.OUTPUT A .OUTPUT ADDEDTO 'free text'

.OUTPUT NEW 'free text'

.OUTPUT ADDEDTO 'file name'

.OUTPUT NEW 'file name'

.OUTPUT ADDEDTO PC "name of the DOS file"
©ABAS Software AG 2005

Appends the output text to the end of a DOS file.

.OUTPUT NEW "TESTFILE" .OUTPUT NEW 'xtd' xtd=Variable for file names .OUTPUT ADDEDTO PC "C:\TEST.DAT"
Page 81 February 2006/2006r2n01

Know how using abas Business Software

FOP Programming The commands from A to Z
______________________________________________________________________________________
.OUTPUT NEW PC "DOS file" Directs the output to a DOS file.

.OUTPUT NEW PC "C:/TEXT.DAT"

The command .OUTPUT ADDEDTO PC "c:\test.dat" appends the system data to the DOS file test.dat on the c:\ drive. A new file called test.dat will be created in the root directory on the c:\ drive when you run the following command: .OUTPUT NEW PC "c:\test.dat". If you enter nothing or a minus sign (-) instead of the DOS file when running these two .OUTPUT commands, a file selection box will ask you to specify a file name. The system automatically converts the unix slash into the DOS backslash.
Command .OUTPUT D: 'name' Meaning Directs the output to any MS Windows application. The system data can either be passed on to a R2Win variable or directly to the clipboard under MS Windows. Example

.OUTPUT D

In addition to the link with Word or Excel data can also be transferred to any other Windows application. For this reason data is filed in the Windows clipboard. This can be accessed by all Windows applications. The respective FOP command is:
.OUTPUT D: CLIP:

Copies all outputs, line by line, up to the next .OUTPUT command into the clipboard. There you will always find the line which was outputted last. Saves all following outputs and copies them into the clipboard when .OUTPUT is run the next time. Only in the ASCII interface no >= 4: Copies all following outputs into the Vno (V4, V5, ...) Reflection variable.

.OUTPUT D: CLIP+:

.OUTPUT D: Vno:

Other Windows applications can read out the contents of the clipboard.
Command .OUTPUT E .OUTPUT E: xyz Meaning Runs EXCEL (if required) and directs the output to an EXCEL table under MS Windows Example

.OUTPUT E :1,2,3

©ABAS Software AG 2005

Know how using abas Business Software

Page 82 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ The command .OUTPUT E runs, if necessary, EXCEL for Windows and opens a new table. If you run the command .OUTPUT E: xyz, the Excel command NEW will be run and the data will be outputted in the xyz table. xyz is the name of an Excel template file. If the .OUTPUT command is run without specifying "xyz", the Excel command NEW will be run as well and the system data will be written into Table 1. All following data will be written in this table. This will be started at the left upper border, i.e. in row 1 and column1. Each new row will be written into a new EXCEL row. The column separator is the semi-colon(;). If you re-enter the command .OUTPUT E, a new table will be opened. The name of the table last opened will then be displayed in the FOP variable 'ddename'. "Tab1" stands for the first table opened. The number of the DDE channel which was assigned when the .OUTPUT E command was run, can then be found in the FOP variable 'ddekanal'. FOP output to OpenOffice In FOP programs outputs using OpenOffice Calc or StarOffice Calc (short name: "OO Calc") can be made at the same time as outputs to MS Excel. This FOP program solution is a temporary implementation until it has been integrated in the application kernel. The FOP program OC.INIT or OC.ISINIT has to be read in instead of the FOP command .OUTPUT E in order to start the output to OO Calc. The FOP OC.ENDE additionally has to be read in at the end of the output. There are two output types ((is)atyp field) which can be used in order to use the OpenOffice application in the infosystem: • • OO Calc OO Writer Please note: More information on using the OpenOffice application can be found in the html file "oo-anbindung.thml" of the client. There you will also find information on the adjustments of your FOPs which are required in order to direct outputs to OpenOffice Calc.

Command .OUTPUT Fn

Meaning Directs the output to a fax machine.

Example

.OUTPUT F1 'faxno'

.OUTPUT F1 27126 directs the output to a fax machine. F1 etc. accesses the available fax channels.

This is followed by the fax number of the recipient. Variables can be used:
.OUTPUT F1 'faxno'

©ABAS Software AG 2005

Know how using abas Business Software

Page 83 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ The number of faxes to be outputted can be defined with
.OUTPUT F1 27126 copies=5

... ... further specifications have to be separated by a : (colon)
Example:
.OUTPUT F1 27126 : 3 12:37 comment

After the colon, you can specify the priority, sending time and comments. These specifications are optional. The format to be entered depends on the respective fax solution and can be found in the respective manuals.
Command .OUTPUT M Meaning Directs the output to an email program.

Syntax:
.OUTPUT M local domain:Param1 ... Param8

The parameters 1 to 8 stand for the following contents:
Parameter1 Parameter2 Parameter3 Parameter4

Consecutive number: Every document which is sent by email will be saved in the specified directory (Parameter2) as MAIL.consecNo. Directory: Specifies the directory in which the sent data is saved. SMTP mail server. Email address of the sender: The email address of the sender is saved in the journal (EM, view journal). First recipient from list of recipients: The first recipient is saved in the journal (EM, view journal). Copy code (yes/no): A document will only be saved if 'no' has been entered into the copy code! A document will be sent once again if the copy code is set to "yes". No further saving takes place in this case. Comment: The comment is saved in the journal (EM, view journal). External user name: The external user name can be used for the system call in
$HOMEDIR/ow/bin/print*.sh.

Parameter5 Parameter6

Parameter7 Parameter8

©ABAS Software AG 2005

Know how using abas Business Software

Page 84 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Command .OUTPUT S1 .OUTPUT W Meaning Directs the output to the system printer 1. This command runs Word for Windows (WinWord) and opens a new window using the command $win.open aus termcap.txt. All following data is written directly into the WinWord document. If you need to open a new window while the program is running, you

can do so by running the command .PRINT win.open, followed by the command .PRINT in order to run the initialisation string for the new document. All following data will be entered into the new document.

.OUTPUT W .OUTPUT W VORLAGE

If required this opens a new, blank window. If required this opens Word and opens a new window using the Word template VORLAGE. The template file has to be recorded in the win/winword directory of the client (GUI) or in C:/s3/winword (ASCII interface, see "pcinit").

All the following data will be written directly into the Word document line by line. The number of the DDE channel which was assigned when the .OUTPUT W command was run, can then be found in the FOP variable 'ddekanal'. If a new Word document is to be opened during the program run, this is done using the following command
Example: .PRINT win.open followed by the command .PRINT

to execute the initialization string for the new document. All following data will be entered into the new document. Word documents can be saved and closed.
Example: .DDE.exec 'ddechannel' [FileSaveAs .Name="test.doc"] .DDE.exec 'ddechannel' [FileClose]

If you use Word 95 or older versions, German commands must be used instead of English commands (e.g. Datei speichern unter).

©ABAS Software AG 2005

Know how using abas Business Software

Page 85 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.PAGE – Page range
Command .PAGE Meaning The command .PAGE triggers a page break (in the screen output identified by the numerical character "#").

Outputting a page range:

The standard page setting is 72 lines and 80 columns. This corresponds to a density of 10 cpi (characters per inch) and 6 lpi (lines per inch) (1 inch = 2,54 cm) on 12" paper (12 inches). This is the normal width for continuous paper. This paper has the same width as DIN A4, but it is slightly longer. The .PAGE command makes it possible to use another page layout and other paper formats.
.PAGE 'n' .PAGE 'n'-'m'

Starts a new page if the current page has already been used. On the screen page breaks are identified by a hash key (#). The page number 'n' can be omitted. Only the pages from 'n' to 'm' will be outputted. The first line of page ''m+1'' ends the FOP interpreter.

Command .PAGE 'page number' .PAGE 'page number' – 'page number'

Meaning Sets a page counter. Outputs the pages of the specified range.

.PARA – Paragraph protection
As the page break does not recognize the context of the text, it might happen that a paragraph starts in the last line of a page. This paragraph will then be cut into two pieces by the page break. To avoid this, you can define a paragraph protection:
Command .PARA Function Activates the previously defined minimum length of a paragraph. If the command is used without parameter, the second minimum length will be set to the following paragraph. If less than the specified minimum length is free on the page, the paragraph protection will cause a page break. Sets a paragraph protection for 'n' lines. When the command is used with a parameter (numeric value), the first specified minimum length will be set. If less than the specified minimum length is free on the page, the paragraph protection will cause a page break. Sets a paragraph protection for a second length. If the command is used with two parameters (numeric values), the first minimum length will be set and the second one will be reserved. If less than the specified minimum length is free on the page, the paragraph protection will cause a page break.

.PARA 'minimum length' .PARA 'second minimum length'

©ABAS Software AG 2005

Know how using abas Business Software

Page 86 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Syntax: .PARA 'minimum length' 'second minimum length' Summary:

When a page brake is made it might happen that a paragraph is split up. This can be prevented by means of a paragraph protection:
.PARA 'n' causes a paragraph protection of 'n' lines. This means that a paragraph will be completely

placed on the next page if there are less than 'n' lines available on the page. A paragraph can start with a blank line or a dot command. You can even note two different minimum lengths with one call. You can then switch between these with little writing effort:
Example: .PARA 'n' 'm' sets the paragraph protection to the standard value 'n'.

The command .PARA (without numeric value) sets the paragraph protection to the exceptional value 'm' for the following paragraph. After this paragraph, the standard value will be used again.

Please note: The paragraph protection can only be activated if justified or unjustified (text formatting) has been activated. If the specified number of free lines is not available, a new line will be started even if the next paragraph could have been entered on the current page.
Predefined standard values:

When FOP is run, the paragraph protection will be 5 (standard value) and 10 (exceptional value) i.e. as if you used the command PARA 5 10.

©ABAS Software AG 2005

Know how using abas Business Software

Page 87 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Example:

For all three options.
Text 1 (7 lines long) .PARA 8 25 Text 2 (8 lines long) .PARA Text 3 (20 lines long) Text 4 (18 lines long) .PARA 50 Text 5 (9 lines long)

Text 1 Might be split up as the standard setting 5 is valid. Text 2 Can not be split up as the minimum length was already set to 8 lines. Text 3 Is also protected as the setting of 25 (specified earlier) was activated by .PARA. However, this is only valid for one paragraph. Therefore, text 4 will not be protected. Text 5 Will definitely not be split up but it will probably be put on the next side and the previous page will then have up to 50 blank lines.

.PC – Commands for the PC-Client communication
Command .PC.CLIP 'file name' Meaning Selects the contents of the Windows clipboard and puts it into the file in order to be reprocessed in FOP

To do so, the following text must be in the first line of the clipboard:
Example: .. ERP TEXT...

Command .PC COPY [-PC] [-CONV] [-BIN] source file target file

Meaning Copies files between server and PC client.

©ABAS Software AG 2005

Know how using abas Business Software

Page 88 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ This command copies the "source file" to the "target file" whereby one of these files will be on the server and the other one on the PC client. If copying was successful, 'mehr' will be set to "yes", otherwise to "no". No error message will be outputted. When the PC.COPY syntax contains errors, the FOP will be aborted.
Syntax: .PC. COPY [ -PC ] [ -CONV ] [ -BIN ] 'source file' 'target file' Meaning of the options:

Target file is recorded on the PC client. If –PC is not specified, the target files will be recorded on the server. -CONV If the Unicode support has been activated, a conversion from the abas ERP character set to the UTF-16 character set will take place. Otherwise, a conversion to the Windows-ANSI character set will take place. When –CONV is not specified, no conversion will take place. -BIN Binary file - no conversions will take place. If –BIN is not specified, the line end conversion will be carried out. (Server: newline, PC client: carriage return + newline)
-PC

The options -BIN and -CONV can not be specified at the same time!
Example:

.PC. COPY -PC -CONV /USR/S3/EKS/BRIEF.TXT C:\BRIEFE\ERP\BRIEF.TXT

When a file has been copied to the PC client, it can be opened with .PC.OPEN or PC.EXEC.
Command .PC DLL Meaning With the FOP command .PC.DLL the functions can be called from an external DLL.

The external DLL will remain loaded in the working memory after the call has ended. Thus the external DLL (in contrast to .PC.EXEC) does not have to be initialized when it is called again. When .PC.EXEC is used, the external program will always be completely re-started) Therefore, the call will possibly be faster. Only functions and DLLs which have been released by ABAS can be used. Currently there is only one function: Starting the product configuration CAP Suite (http://www.abifilderstadt.de):
.PC.DLL 'xcappath' "S01" 'xsachber' 'xid' 'xkomm'

©ABAS Software AG 2005

Know how using abas Business Software

Page 89 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Then 'xcappath' will be the CAP Suite of the installation directory. The meaning of additional parameters is explained in the CAP Suite documentation.

Note: Version 6.2 or later of the CAP Suite must be used.

Command .PC.EXEC program [arguments …] name

Meaning Runs the PC program.

This command runs the program 'program name' on the PC client with the specified parameters. The command .PC.EXEC merely runs the PC program and does not wait until it is finished. When the program was run, 'mehr' will be set to "yes" - otherwise to "no". No error message will be outputted. The exit code of the program run cannot be queried. When the PC.EXEC syntax contains errors, the FOP will be aborted.
Syntax: .PC.EXEC PROGNAME [ args ... ] Example: .PC.EXEC FORMAT a:

Command .PC.EXEC - WAIT

Meaning The command does not continue to run immediately.

Syntax: .PC.EXEC –WAIT progname [ args ... ]

The command .PC.EXEC will continue to run immediately. Using the –WAIT option you can specify that the command should continue running after the started program has ended. This option is only available in the GUI.

©ABAS Software AG 2005

Know how using abas Business Software

Page 90 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Example: .PC.EXEC -WARTEN "mspaint ART10021.bmp" .SYSTEM "cp win/ART10021.bmp/u/Bilder" background

This command runs Microsoft Paint. The next FOP instruction will only be executed when Microsoft Paint is closed.

Note: Many Windows programs (e.g. Microsoft Word) can only be run once on each PC. When the program is run again, e.g. in order to open another file, only the file name will be sent to the program instance which was run first. The program instance which was run last, will then be ended. The second file will be opened by the program instance run last. .PC.EXEC – WAIT can not be used for such programs as the program will continue to run straight away when the file name was sent to the program instance which was run first and not only when the file has been edited.

Command .PC.OPEN [-FILE] 'file name'

Meaning Opens a file on the workstation PC using the appropriate program.

A file can be opened on the workstation PC via the appropriate program with the command .PC. OPEN [-FILE] 'file name']. The file ending determines which program is used. This command is only available in the GUI.
Example: .DOC MS Word

Note: The file either has to have been recorded in a win directory on the client or has to be accessible from the workstation PC. If the file is located in the win-directory of the client the option –FILE has to be entered.

©ABAS Software AG 2005

Know how using abas Business Software

Page 91 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ The file can also be copied to the PC client with .PC.COPY. If a specific program is to be used for the opening of the file, .PC.EXEC can be used.
Command .PC.OPEN -ACTION Meaning With this option one can specify what the PC program that is started should do with the file. The file will be opened as before if the option is missing. When PRINT is specified, the file will be printed. Which action can be used for specific programs is not so easy to determine. You must open the Windows registry and search for the entries of the corresponding application for the file name extension. OPEN always works (it is used if -ACTION is missing), PRINT often works. Windows Word/Excel also knows EDIT. The file will be opened for editing even if only "Word Viewer" and "Excel Viewer" have been installed on the PC and these are run with OPEN.

.PRINT – Print output
Command .PRINT 'number of copies to be printed' .PRINT 'features' Meaning Controls the multiple output to the printer ('n' copies will be printed; whereby .PRINT 0 = .PRINT 1 (1 copy will be printed out). .PRINT 7 prints 7 copies. Controls the printer features with which the font type, size, intensity etc can be changed (For more on this see .VIEW 'features' – font features.) Has the same effect as .PRINT. When printing it will be written into the specified temporary file and only be run when this file is called. Example .PRINT 2

.PRINT sg.capital in.bold .PRINT in.bold

.PRINT 'parameter'

Note: When you are outputting on the screen or to a file, the .PRINT commands will not be taken into account.

©ABAS Software AG 2005

Know how using abas Business Software

Page 92 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.PRINTED – Print queue
Purchasing and sales processes (quotations, requests, sales orders, purchase orders, packing slips (delivery notes), invoices), payment forms, work slips and work orders can be put into the print queue by activating the Print function. Payment forms are automatically put into the print queue when they are created. This function will remain active as long as there are processes in the print queue. The processes contained in the print queue can, for example, be accessed and printed with .SELECT … PRINT in FOP. After it has been printed, a process can be removed from the print queue with the .PRINTED command. This, however, does only apply to the file output and printer output, not to the terminal output. .PRINTED for the calculation of commissions: Posted sales invoices will be included in a calculation of commissions queue if a representative has been assigned to them. This queue can be processed with the command .SELECT SALES OUTST COMMISSION. Invoices, for which the commissions have already been calculated, can be removed from the queue by using the .PRINTED command. This will, however, only happen if the invoice has been procured via the command .SELECT SALES OUTST COMMISSION. If it was procured in another way, the command .PRINTED will try to remove it from the print queue. .PRINTED '-archive' This command is only used for the administration of documents. The generated documents are archived in the "Document" file. Archiving takes place when a document is printed. To do so, run the command .PRINTED with the option "archive". A document which has already been archived can be selected, displayed or printed again.

.PRINTLN
In FOP lines which contain HTML or XML code can be marked by a colon ":" at the beginning of the line. In this case, however, you can not specify a condition any more. (Question mark operator).

.PRINTLN-x

©ABAS Software AG 2005

Know how using abas Business Software

Page 93 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Command .PRINTLN –X Meaning The colon can be set by using .PRINTLN with the option -x. You can also additionally specify a condition in such a line.

Example: .PRINTLN -X 'x' ? x > 99 .PRINTLN -X 'x' ? x < = 99

instead of
.CONTINUE without B ? x < = 99 :'x' .COTINUE endIF !withoutB :'x' !endIF

Command .PRINTLN –N

Meaning Specifies that the following text is not to interpreted as an option.

Example: .PRINTLN -N -X is the XML option Output -X is the XML option

Command .PRINTLN –L

Meaning Outputs texts and variables without generating a line end character (-L stands for linefeed).

The output of the following command is thus carried out directly after the output of this .PRINT command. This is, for example, useful for a more flexible generation of files and also for brief progress messages during a long running program.

©ABAS Software AG 2005

Know how using abas Business Software

Page 94 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Example: .PRINTLN -L 'free text' .INPUT -TEXT 'free text' .PRINTLN '/free text'

Output

'free text' Contents of the free text '/freetext' Example: Progress message: !WHILE .PRINTLN -L .

.. do something long-lasting
.CONTINUE WHILE ? _endebedingung

Dots will be outputted in the lines.

.PROTECTION – Write protection
Command .PROTECTION [-RESET] [-HIDDEN] 'field name' ['line number'] Meaning Sets the write protection/view protection for a screen field.

This command sets the write protection / view protection for a screen field. The write protection prevents the user from entering something into this field. However, the field can still be changed by means of an EFOP. The view protection prevents the user from viewing the contents of the field (stars are displayed instead of the field contents). The option –RESET cancels a write protection which was set before.
Example: .PROTECTION ARTEX 1 .PROTECTION -HIDDEN vpr

©ABAS Software AG 2005

Know how using abas Business Software

Page 95 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Note: The first instruction sets the write protection for the field artex in the first line of the table. The second instruction prevents the display of the contents of the vpr field.

Command .PROTECTION [-RESET] LINE 'line number' [-HIDDEN] –

Meaning Sets the write protection/view protection for all screen fields of a row.

This command sets the write protection / view protection for all screen fields in a row (row write protection/view protection) or, if line number=0, for all screen fields of the header section (header section write protection/view protection). The option –RESET cancels a write protection/view protection for the lines/header section which was set before. A field write protection/view protection or a global write protection/view protection will not be canceled.
Example: .PROTECTION -LINE 0 .PROTECTION -HIDDEN -LINE 3

The first instruction sets the write protection for all fields of the header section. The second instructions prevents the display of the contents of the field in the third line of the table.
Command .PROTECTION [-RESET] [-HIDDEN] –ALL Meaning Sets the write protection/view protection for all screen field.

This command sets the write protection / view protection for all screen field (global write protection). The option –RESET cancels a global write protection/view protection which was set before. A field, row or header section write protection/view protection will not be canceled.
Example: .PROTECTION -ALL ? M|yreadonly .PROTECTION -RESET -ALL ? _M|yreadonly

These two instructions set the write protection for all fields of the records in which the field yreadonly has the value "yes".
©ABAS Software AG 2005

Know how using abas Business Software

Page 96 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.READ – Reading contents
The command .READ "text" 'name1' 'name2' imports a text. Depending on the notation of the variable – '(N)ame' or '(n)ame' – the keyboard echo will be converted into capital letters or not. The entered text will be used as a request for input. The .READ FOP command will continue to run until a correct input is made. The program is not canceled due to illegal inputs (e.g. typing errors, syntax errors) and thus does not have to be re-run.
Example:

If you do not wish to enter something after running the FOP command, the .READ command can still be canceld with . If has been locked in the FOP (.SET CANCEL -), you can use 'mehr' to query if was pressed.
Example:

The following command has been entered in the input text:
.READ "Short (s) or long (l) form?" xform

FOP will then output the following question:
Short (s) or long (l) form? :

and read your answer from the text you have typed in via the keyboard, until is pressed. The typed in text will become the contents of the variable 'xform'. Thus, further outputs can be made dependent on it. In the above example, the answer "s" (small) should have the same effect as the answer "S" (capital). As you don't know if the user has answered with small or capital letters the content of 'xform' has to be queried circumstantially:
... xform="k"; xform="K"

This will be avoided if the name of the variable in the .READ command starts with a capital letter. Then, the computer will convert the contents of the variable into capital letters as well. We will use the above command again but now we will write
.READ "Short (s) or long (l) form?" Xform

The variable name now starts with a capital letter but still describes the same variable. The user has answered with "s" (small), but the content of xform is "S" (capital), so that the evaluation of the answer is made easier.
©ABAS Software AG 2005

Know how using abas Business Software

Page 97 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ When the input is canceled, the variable 'mehr' will be set to "false", otherwise it will be set to "true". This, however, is only important when you use .SET CANCEL - as otherwise the whole program will be canceled anyway. The read variable will be empty when the program is canceled and when a blank imput is made. You can also use the .MENU command to request input from the keyboard. When a window is displayed in the GUI (Graphical User Interace) with the .READ FOP command, this window will also contain the name of the FOP.

.READ when the prompt text is several lines long (GUI) When you use the .READ command in the GUI (Graphical User Interface), semicolons in the requirements text will be replaced by word wraps. A requirements text of several lines can thus be entered.
Example: .READ "planned receipts and issues; enter product number or range" xt

.RESERVE – Selection of a record which was reserved before
The .MENU command saves the unique number of the current record, which can be reloaded with the .SELECT command.

Note: A previously selected record will be replaced by another record whenever .SELECT is used. The selection of records can be reserved in order to make records quickly accessible which are not loaded any more in the meantime.

©ABAS Software AG 2005

Know how using abas Business Software

Page 98 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
.RESERVE saves the last record which was selected with .SELECT. .SELECT (without any further

specification) reloads this "reserved" record. (The contents of this record may have been changed in the meantime by another user.) Furthermore, the same status will be set as there was at the time of the "reserving" – for example • • • the range set by (.select 'file' 'searchterms') the current row in records with a table (.SELECT LINE) set reference accounts

Saves the record loaded with .ADD Saves the unique number of the current record into a buffer (FIFO = first in first out) and can be reloaded with the command .SELECT FIFO. .RESERVE LIFO Saves the unique number of the current record into a buffer (LIFO = last in last out) and can be reloaded with the command .SELECT LIFO. .RESERVE APPLICATION Saves all procurements already planned which serve a certain UDF or all UDFs which are served by a certain procurement. .RESERVE APPLICATION + Saves all procurements already planned which serve a certain UDF or all UDFs which are served by a certain procurement. Using this option, BSTATUS can now not only show the parts of a sales order BOM which have already been scheduled but the whole sales order BOM (as long as it is strictly related to a sales order – scheduling type "V" – variant-related).
.RESERVE ADD .RESERVE FIFO

Note: The original record (procurement or reservation) has to have been loaded in the H buffer or the D buffer. This means that .RESERVE APPLICATION can only be used for the main buffer and the "add" buffer but not for screen objects.

©ABAS Software AG 2005

Know how using abas Business Software

Page 99 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

.REWRITE – Rewriting the record which was selected last
Rewrites the record selected last.
Command .REWRITE .REWRITE SCREEN .REWRITE LOCK Meaning This command rewrites the last record selected with .REWRITE. This command rewrites the record when an 'exit screen' event takes place. This command checks if the command .REWRITE can be run (program will be aborted with an error message if it can't be run)

.REWRITE is almost identical to the function of the key when a screen has been changed.

When dealing with purchasing/sales objects, please take note of the following: Evan if all the item rows are displayed in the same screen, they are independent records anyway. The .REWRITE command always only rewrites the item (or only the header) which was selected last with .SELECT LOCK LINE. Whereas, when you are dealing with e.g. a part, then the whole record including the table – will be rewritten. For more on this see chapter "Lock options for .SELECT".

.RIGHT – Right margin
The right margin is defined with the command .RIGHT. The procedure here is the same as described for the command .LEFT.
Command .RIGHT 'n' .RIGHT +'n' .RIGHT -'n' .RIGHT 'n' mm Meaning Defines column 'n' as the right margin. Increases the right margin by 'n' columns. Reduces the right margin by 'n' columns. Sets the right margin to 'n' millimeters (1 inch = 25.4mm). Example .RIGHT 10 .RIGHT +3 .RIGHT -3 .RIGHT 50mm

The right margin can also be defined in millimeters. .RIGHT 'n' mm sets it to 'n' millimeters. According to this, every other form of .RIGHT can also contain "mm" or "millimeter". When using millimeters, you should take into account that the number of characters depends on the character width of the monitor or the printer.
©ABAS Software AG 2005

Know how using abas Business Software

Page 100 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ You can find out the character width from the instruction manual of the monitor or printer. It is usually specified as characters per inch ("char per inch", cpi). Typical values for printers are 10 or 12 cpi for normal font and 16 to 20 cpi for close-spaced lettering. For the conversion the following applies: 1 inch = 25.4 mm. When the character width is changed (see chapter .PRINT – Print output, .View), all border settings will remain in the unit which was specified last.

.SELECT – Selection of records
Object selections can be carried out with the .SELECT FOP command. Notes and examples on the use of bars and the selection syntax in general can be found in the "FOP Programming 1 – Bars" training document. In order to be able to refer to master files and transaction data, records have to be selected for FOP. This command selects the current contents of the record noted with .RESERVE.
Syntax:

SELECT 'file name' 'search terms'
Command .SELECT .SELECT .SELECT ASCREEN [HEADER|LINE] Meaning Loads the current contents of the record reserved with .RESERVE. This command resets the selected record. Loads the header section or the table section of the A buffer. (See the following note "Row operations of the A buffer".)

Note: The A buffer or "father buffer" will only be available if a screen was accessed as a sub-screen, e.g. via a BU8 button. The variables will have the same status as in the screen buffer of an EFOP. Other operations for the A buffer are the row operations and a row of event variables, e.g.: AVTKOMMD.

©ABAS Software AG 2005

Know how using abas Business Software

Page 101 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Row operations of the A buffer:

The row operations correspond to the row operations in EFOPs if screen is always replaced by ASCREEN there.
.SELECT ASCREEN LINE .SELECT ASCREEN HEAD

Selects a row in the A buffer Selects the header section in the A buffer

Detailed information on the row operations can be found in the "FOP Programming 2 – EFOP" training document.

Command .SELECT STATEMENT

Meaning This command outputs all entries of the specified period of the selected customer, vendor (supplier), employee, G/L account, cost object or cost center.

With the optional parameters
.SELECT STATEMENT [FORWARD]

entries can be outputted starting with the latest entry.
.SELECT STATEMENT [BACKWARD]

Entries can be outputted starting with the earliest entry. This command will be used if .SELECT STATEMENT is used without a specification of the search direction. The command depends on the text variables fiscal year (T|gjahr), start month and end month (T|amon and T|emon).
Example: .SELECT GJAHR 05 1 5 .SELECT CUSTOMER "72432" .SELECT STATEMENT BACKWARD Statement with account transactions .SELECT STATEMENT PROCESS [FORWARD] [BACKWARD]

©ABAS Software AG 2005

Know how using abas Business Software

Page 102 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ This command outputs all entries with account transactions of the specified period for the selected customer, vendor (supplier), employee or G/L account. Using the optional parameters forwards and backwards the entries can be outputted starting with the latest or the earliest entry.
.SELECT STATEMENT PROCESS OPEN [FORWARD] [BACKWARD]

This command outputs all entries with outstanding account transactions of the specified period for the selected customer, vendor (supplier), employee or G/L account. Using the optional parameters forwards and backwards the entries can be outputted starting with the latest or the earliest entry. The extent of the selection of the account transactions can be restricted via the text variables for the start account transaction and the end account transaction T|akv and T|ekv. Example: Account transactions from A to B for customer Maier, customer number 72432, for the months 1 to 4 of fiscal year 2005, starting with the earliest one

.SELECT GJAHR 05 1 5 .FORMULA AKV = "A" .FORMULA EKV = "B" .SELECT CUSTOMER " 72432" .SELECT STATEMENT PROCESS Command Meaning Selects the company data according to the 'option' and is equivalent to .SELECT WORKORDER.

.SELECT COMPANY 'option'

The following options can be used with the command .SELECT WORKORDER: numerical select in numerical order "'Num'" select by work order number /work slip number "+'Num'" select by completion confirmation number suggestion Select work order suggestions outstanding Select capacity reservations from a work centre which was selected before list Select work orders with shortages lists print Select work orders from print queue transfer Select work order completion reports which have not yet been posted filingsystem Select all filed completion confirmations
Command .SELECT PDC .SELECT PDC 'option'
©ABAS Software AG 2005

Meaning Selects all staff and job time pairs in numerical order. Selects all staff and job time pairs according to the 'option'.

Know how using abas Business Software

Page 103 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ You can use the .SELECT PDC command with the following options:
.SELECT PDC ALPHABETICAL Selects all time pairs in order of search words .SELECT PDC JTICKET 'NUM' Selects all the time pairs of the number range of work orders or work slip 'Num' in order of time. .SELECT PDC 'description' Selects all time pairs with the search word 'description' .SELECT PDC OUTSTANDING Selects all outstanding time stamps, sorted by employee, start date

and start time or by employee, work order number, work slip number, start date and start time .SELECT PDC OUTSTANDING SPECIFIC Selects all the outstanding time stamps from a specific period (adatum - edatum) in chronological order. (Only allowed in connection with the command .SELECT employee) .SELECT PDC TRANSFER Selects all time pairs which have been entered but not yet posted .SELECT PDC PRINT Selects all time pairs which contain errors.

Command .SELECT ENTRY

Meaning Selects an entry; can also be used with an option.

You can use the .SELECT ENTRY command with the following options:
.SELECT entry numerical .SELECT entry 'num'

Selects an entry in numerical order Selects the entry with the identity number 'num'.
Meaning Selects serial numbers.

Command .SELECT SERIAL (RECEIPT/ISSUE) ()(part )

Syntax: .SELECT SERIAL (RECEIPT/ISSUE)()(part )

©ABAS Software AG 2005

Know how using abas Business Software

Page 104 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Specifies if you are dealing with serial numbers of a receipt or an issue (if nothing is specified, receipt will be used by default) () Indicates the search query for serial numbers (if specified, all serial numbers will be searched the beginning of which matches the specified serial number) (part ) Indicates the search for serial numbers of a certain product (the search can be carried out by product ID or product search word).
(Receipt/Issue) Example: .SELECT SERIAL ISSUE "11" PART "e3"

All serial numbers for product "E3" which start with "11" and have already been delivered, will be found when this command is used.
.SELECT SERIAL RECEIPT PART "e3"

If you use this command, FOP will find all serial numbers which are still in stock for product "E3". The variants of .SELECT SERIAL described in the examples specify a range and select the first record of the range. If there are several suitable records, these will be selected if you run the .SELECT SERIAL command without any other parameters (as long as the variable 'mehr' has the value "true"). Note: .SELECT EXAMPLE and .SELECT SERIAL can be used alternatively to the same effect.

Command .SELECT 'file name'

Meaning Selects the next record of this range

Example .SELECT 'TESTFILE'

Note: When any of the .SELECT file commands is run, a record can be found and selected via a selection screen. You can specify the selection screen and fill in the dialog boxes (% selection) or search without input in the selection screen opened.

©ABAS Software AG 2005

Know how using abas Business Software

Page 105 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Command .SELECT 'file name' .SELECT FILENAME "" .SELECT 'file name' "x" .SELECT 'file name' 'x' .SELECT 'file name' 'search terms' .SELECT file or .SELECT file2, ... .SELECT file 19 .SELECT 'file' review .SELECT ADD Meaning Selects the next record of this range Requires the input of a search term via the keyboard. Selects the record with the identity number or the search word "x" from the specified file. Selects the record with the identity number or the search word "Contents of the variable x" from the specified file. Reads the records from the specified file and specifies a range for future .SELECT 'file' calls. Accesses the additional files 1 or 2,... ,19.

Selects objects from the additional file, sorted by review date. Loads another record to which the record selected with .SELECT refers

Note: The command .ADD has the same effect as the .SELECT ADD command. In both cases another record will be loaded, to which a reference will be made from a record selected with the .SELECT command. The difference between the two commands is as follows: a record which may have been loaded with the .SELECT command will be overwritten when you use the .ADD command.

Command .SELECT PURCHASING

Meaning Selects the following in numerical order: purchase orders which have not yet been fully invoiced and packing slips (delivery notes) and invoices which have not yet been posted. Selects purchasing transactions according to specific criteria

Example .SELECT PURCHASING

.SELECT PURCHASING 'option'

.SELECT 'option'

PURCHASING

There are the following options for the command .SELECT PURCHASING:
.SELECT PURCHASING FILING .SELECT PURCHASING ALPHABETICAL .SELECT PURCHASING 'description'

Selects the filed purchasing processes. Selects purchase orders, packing slips (delivery notes), invoices by search word Selects processes with the search word

'description'.

©ABAS Software AG 2005

Know how using abas Business Software

Page 106 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
.SELECT .SELECT .SELECT .SELECT .SELECT PURCHASING PURCHASING PURCHASING PURCHASING PURCHASING PRINT ORDERS Selects purchase order processes from the print queue. PRINT DELNOTES Selects delivery processes from the print queue. PRINT INVOICE Selects invoice processes from the print queue. PRINT PAYMENT Selects payment transactions from the print queue. OUTSTANDING ORDERS Selects posted packing slips (delivery

notes) without purchase order and without posted invoice. Selects purchase orders for which a packing slip (delivery note) with "Separate invoice"=no was created and posted, but for which no invoice has yet been posted. .SELECT PURCHASING OUTSTANDING INVOICE Selects packing sips (delivery notes) for which a purchase order with "Separate invoice"=yes was created and posted, but for which no invoice has yet been posted. .SELECT PURCHASING TRANSFER Selects all purchase packing slips (delivery notes) and purchase invoices which have not yet been posted, sorted by creation date in ascending order. .SELECT PURCHASING SUGGESTION Selects purchase order suggestions by date of purchase order. (For more on this see chapter "Select commands by means of which procurement suggestions can be accessed via a selection bar in FOP".)
.SELECT PURCHASING OUTSTANDING DELNOTES

Command .SELECT EXAMPLE .SELECT 'option' PRODUCTION

Meaning Has the same function as the .SELECT SERIAL command. Has the same function as the .SELECT WORKORDER command.

The following options can be used with the command .SELECT PRODUCTION: Selects work orders, which have not yet been fully processed, as well as their work slips in numerical order .SELECT PRODUCTION "'Num'" Selects 'Num' work orders or work slips with the identity number .SELECT PRODUCTION "+'Num'" Selects the completion confirmation for the work order or work slip with the identity number 'Num'. .SELECT PRODUCTION SUGGESTION Selects work order suggestions. (For more on this see chapter "Select commands by means of which procurement suggestions can be accessed via a selection bar in FOP".)
.SELECT PRODUCTION NUMERICAL

©ABAS Software AG 2005

Know how using abas Business Software

Page 107 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
.SELECT PRODUCTION OUTSTANDING

Selects capacity reservations of a work centre, i.e. all operations which are in use in a work centre in a certain period of time; sorted by start date
(.SELECT capacity, .FORMULA .FORMULA edatum='due_date' outstanding). adatum='start_date' ", , .SELECT workorder

Selects work orders with shortages lists. Selects work orders in the print queue for which shop floor papers has to be printed. .SELECT PRODUCTION TRANSFER Selects completion confirmations, which have been recorded but not yet posted. .SELECT PRODUCTION FILING Selects all completion confirmations.
.SELECT PRODUTION LIST .SELECT PRODUTION PRINT

Command .SELECT FIFO .SELECT YEAR FY SM EM

Meaning Selects the reserved record from a buffer area (FIFO = first in first out). This command sets the variables AJAHR; EJAHR; AMONAT; EMONAT; ADATUM; EDATUM.

For the command .SELECT YEAR, which sets the variables AJAHR EJAHR; AMONAT EMONAT; ADATUM; EDATUM, there are the following options:
FY SM EM

Fiscal year
Start fiscal month

End fiscal month The last year-end closing was carried out on 31.12.2005
.SELECT YEAR 05 3 13

Example:

AJAHR EJAHR AMONAT EMONAT ADATUM EDATUM

= = = = = =

05 05 3 13 1.3.05 31.12.05

Only when AJAHR , EJAHR , AMONAT and EMONAT are known, the transaction figures SSUM (sum total – debit), HSUM (sum total – credit), ASALDO (opening balance), ESALDO (closing balance) etc. and the account statements can be displayed. The dynamic planned data PJASALTO, PASALDO, PSSUM, PHSUM, PESALDO will be set if a period of time is known and an account is selected and the planned data has been activated (.SET TARGET
+/-).

©ABAS Software AG 2005

Know how using abas Business Software

Page 108 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ If the period of time has been specified, the following variables will be set if the additional conditions are fulfilled: Subledger account was selected Additional planned data have been activated Part of group 1 was selected Additional planned data have been activated
UMSATZ PUMSATZ MZUGANG, WZUGANG, MABGANG, WABGANG PMZUGANG, PWZUGANG, PMABGANG, PWABGANG

Taking into consideration the variables, the following specifications are possible:
GNJAHR ANJAHR

ENJAHR

Means the n-th fiscal year of gjahr (will be set together with gjahr and abgjahr when FOP programs are initialized). Means the n-th fiscal year of ajahr (will be set together with ajahr and ejahr when the following commands are run: .SELECT PERIOD, .SELECT MONTH, .SELECT MONTH OLD, .SELECT MONTH NEW, .SELECT YEAR) Means the n-th fiscal year of ejahr (will be set together with ajahr and ejahr when the following commands are run: .SELECT PERIOD, .SELECT MONTH, .SELECT MONTH OLD, .SELECT MONTH NEW, .SELECT YEAR)

The fiscal year can be specified as the difference to the current fiscal year: Example: "gjahr" is 05, current "gjahr" is 06
.SELECT YEAR -1 1 3 or .TYPE int xx .FORMULA xx=-1 .SELECT YEAR 'xx' 1 3 or .TYPE TEXT xx .FORMULA xx="-1" .SELECT YEAR 'xx' 1 3

Example:

"gjahr" is 07, current "gjahr" is 06 or . .SELECT YEAR +1 1 3 .TYPE text xx .FORMULA xx="+1" .SELECT YEAR 'xx' 1 3

The variable xx has to be defined as a text variable for positive differences or for 0, as otherwise the data entered will be interpreted as a year:
©ABAS Software AG 2005

Know how using abas Business Software

Page 109 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Example: .SELECT YEAR 0 .SELECT YEAR +0 .SELECT YEAR –0 means the year 2000 means the current year means the current year

Note: In addition to the two-digit display of the year of fields of the types DATUM (date), WOCHE (week), JAHR (year) and GJAHR (fiscal year), in FOP fields of these types can also be outputted with a four-digit year specification.

This is done by adding ":4" to the variable name. This only works if these variables are converted into TEXT, i.e. if they are placed within inverted commas (apostrophes)!
Example: + .TYPE DATE d +.FORMULA d = "2.3.2006" +'d' 'd:4' 02.03.06 02.03.2006 +.TYPE WEEK w +.FORMULA w = d +'w' 'w:4' 9/06 9/2006 +'GJAHR' 'GJAHR:4' 06 2006

The shortened fiscal year is supported. Behind the year and "." or "/" you can specify if you are dealing with the first or second fiscal year. A year-end closing was carried out on 31.03.06. In the "Due Dates" record the last year-end closing was 31.03.06 Year-end closing carried out on 31.03.06 Old year-end closing was carried out on 31.12.05

©ABAS Software AG 2005

Know how using abas Business Software

Page 110 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Command Start ajahr = 06 anjahr = 1 amonat = 1 adatum = 01.01.06 ajahr = 02 anjahr = 2 amonat = 1 adatum = 01.04.06

End ejahr = 06 enjahr = 1 emonat = 2 edatum = 28.02.06 ejahr = 02 enjahr = 2 emonat = 2 edatum = 31.05.06

.SELECT YEAR 06.1 1 2

.SELECT YEAR 06/2 1 2

Comparison of fiscal years: Fiscal years should be compared via the FOP GJAHR.CMP. The period to be compared should be set with the .SELECT YEAR command. You should use the FOP VKZRAUM to run the query. The .SELECT YEAR command should be run via the FOP VKZHOLJAHR. The input/output parameters can be found in these FOPs which are included in the standard system supply.

Command .SELECT JOURNAL 'option'

Meaning Displays current entry processes.

The command .SELECT JOURNAL can be used with the following options:
.SELECT JOURNAL 'num' .SELECT JOURNAL 'such' .SELECT JOURNAL NUMERICAL .SELECT JOURNAL ALPHABETICAL .SELECT JOURNAL STATEMENT

Displays the current entry processes, sorted by identity numbers sorts Displays the current entry processes, sorted by search words Displays the current entry processes, sorted by number Displays the current entry transactions in alphabetical order Displays the current entry processes sorted by statements

Details can be displayed with * sy/HOLLISTE under "STOCKMOVEMENTJOURNAL".
Command .SELECT ACCOUNT Meaning Selects accounts. Example .SELECT ACCOUNT

File 5 (ACCOUNT) is an exception as it is group-dependent. The search word "ACCOUNT" can only be used for group 1:
.SELECT ACCOUNT

.SELECT COSTS .SELECT COSTS FIELD

- only group 1 - group 2, 4 and 8 - group 16

©ABAS Software AG 2005

Know how using abas Business Software

Page 111 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ For the files ACCOUNT and WAREHOUSE there are the generic terms ACCOUNTDATA and WAREHOUSEDATA. These terms can be used for all groups. Their key words are also contained in 'hdatname5' and 'hdatname39'. From FOP you can also access the WAREHOUSEGROUPPROPERTIES group.
Example: .SELECT ACCOUNTDATA "$,,@group=1" 'H|name' .SELECT ACCOUNTDATA "$,,@group=2" 'H|name'

When you have used'hdatname5' in a FOP, although you did not mean any data records from file 5 but only the group ACCOUNT, you will have to amend the program.
.FORMULA xobjecttype = hdatname.i .FORMULA xobjecttype = "ACCOUNT" ? i=5
Command .SELECT HEADER Meaning Reloads the header section for items in purchasing and sales. When items are run in purchasing/sales with the command .SELECT LINE, the header will no longer be loaded. It can then be restored with the command .SELECT HEADER. See also .SELECT SCREEN HEADER and .SELECT ASCREEN HEADER. Loads the header section. When [SCREEN] is used, the command will refer to the screen buffer. (For more on this see the command .SELECT LINE.) This command selects cost centers. Example: With .SELECT YEAR SM EM .SELECT COSTS .SELECT VKZ ACTUAL/TARGET the transaction figures of a cost center can be loaded for a specific period. When no transaction figures are loaded, no entries were made to the cost center in the specified period or it did not yet exist. See also .SELECT ACCOUNT. Selects a reserved record from the buffer area (LIFO = last in first out). Selects a reserved record from the buffer area (stock quantity)

.SELECT [SCREEN|ASCREEN] HEADER
.SELECT COSTS

.SELECT LIFO .SELECT SQUANTITY

Stock quantities can be loaded with the command .SELECT SQUANTITY. As, however, stock quantities neither have an identity number nor a search word, this means that the .SELECT SQUANTITY command has to be run with a selection bar. The syntax for this call is as follows:
.SELECT SQUANTITY "$SEL_number,parameter1=wert1;parameter2=wert2;..."

or
.SELECT SQUANTITY "$SEL_searchword,parameter1=wert1;parameter2=wert2;..."
©ABAS Software AG 2005

Know how using abas Business Software

Page 112 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Examples:

The selection bar LPLATZBEST must exist and must have the identity number 100. With the command

.SELECT SQUANTITY "$LPLATZBEST, product = 4711; location = L1.STD" a stock quantity of product 4711 was selected from location L1.STD. 'mehr' has the value "yes". With

the command
.SELECT SQUANTITY "$LPLATZBEST, product = 4711"

a stock quantity of product 4711was selected from any location. 'mehr' has the value "yes". With the command
.SELECT SQUANTITY

the next stock quantity of product 4711 was selected from any location. 'mehr' has the value "yes". The variable 'platz' (location) contains the location of the selected stock quantity. 'lager' (warehouse) contains the warehouse to which the location is allocated.
Command .SELECT SUBCONTRACTING Meaning Selects subcontracting suggestions. Alternatively to the .SELECT command, the procurement suggestions can be accessed in FOP via selection bars: (For more on this see chapter "Select commands by means of which procurement suggestions can be accessed via a selection bar in FOP" in this training document.) Selects a reserved record from the buffer area (location). Loads the header section or the table section of the M buffer. Loads the occupation of the work center or the department, which has been loaded into the main buffer, for the period "T|adatum" to "T|edatum". The loaded table will be evaluated with the variable "T|mbel". Selects the monthly data according to the 'option'. Selects a period of time for the financial accounting lists.

.SELECT LOCATION

.SELECT SCREEN [HEADER|LINE]
.SELECT MACHLOADING

.SELECT MONTH 'option' .SELECT MONTH 'from' 'to'

The command .SELECT MONTH can be used as follows: With the command
.SELECT MONTH 'from' 'to'

a period of time for the financial accounting lists is selected.

©ABAS Software AG 2005

Know how using abas Business Software

Page 113 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ With the command
.SELECT MONTH 1 NEW

month 1 of the new fiscal year is selected. Contrariwise, the months 1 to 12 of the closed year (all together, not individual ones) can be selected with the addition "old". The command
.SELECT MONTH 1 - 12 old

selects the months 1 - 12 of the closed fiscal year. If one of the follow-up posting months 13 to 15 is selected, the addition "old" can be omitted.
Command .SELECT MESSAGE .SELECT OBJECT "x" Meaning Selects messages (mail), mailing lists and users. Has the same effect as .SELECT 'file'"x". However, the file will only be specified by the area "x". The range specification must define a file, e.g. by means of a selection with selection bars. Example: .SELECT OBJECT "(155,0,0)" In dynamic selections this can be done by means of @file. (For more on this see chapter "File-spanning commands".) .SELECT TARGET Selects the procurements and material reservations of a product, sorted by requirement date; the product has to be selected before. This command selects records from the file "regions", which contains regions, countries and economic areas. Selects the named record and locks it for other users. For more on this see chapter "Lock options for .SELECT". Reads the BOM of the selected product. Reads the product of the warehouse group. Selects relocation suggestions. (For more on this see chapter "Select commands by means of which procurement suggestions can be accessed via a selection bar in FOP".) This command selects the following in numerical order: quotations, sales orders which have not yet been fully invoiced, packing slips (delivery notes) and invoices which have not yet been posted. Posted invoices in which the "Separate invoice" field has been activated will be selected as well.

.SELECT REGIONS
.SELECT LOCK 'name of the record' .SELECT PARTSLIST .SELECT PART SPECIFIC 'wgroup' .SELECT RELOCATIONSUGGESTION .SELECT SALES

©ABAS Software AG 2005

Know how using abas Business Software

Page 114 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ You can also use the following options for this command:
.SELECT .SELECT .SELECT .SELECT .SELECT .SELECT .SELECT .SELECT .SELECT .SELECT .SELECT .SELECT SALES SALES SALES SALES SALES SALES SALES SALES SALES SALES SALES SALES FILINGSYSTEM ALPHABETICAL "'description'" PRINT QUOTATIONS PRINT SORDERS PRINT DELNOTES PRINT INVOICES PRINT PAYMENTS OUTST QUOTATIONS OUTST SORDERS OUTST DELNOTES OUTST INVOICES

.SELECT SALES OUTST PAYMENTS .SELECT SALES OUTST COMMISSION .SELECT SALES TRANSFER

Selects all filed sales processes. Selects sales processes in order of search words. Selects processes with the search word 'description'. Selects quotations from the print queue. Selects sales orders from the print queue. Selects packing slips (delivery notes) from the print queue. Selects invoices from the print queue. Selects incoming payments from the print queue. Selects outstanding quotations. Selects outstanding sales orders. Selects outstanding packing slips (delivery notes). Selects outstanding invoices (if "art" (type) is blank when the invoice is called, an outstanding item will be selected, while if "art" (type) = A, a downpayment will be selected) Selects outstanding payments. Selects outstanding commissions. Selects all sales packing slips (delivery notes) and sales invoices which have not yet been posted, sorted by creation date in ascending order.

The shell objects quotation, invoice, packing slip (delivery note) etc. can be directly selected in purchasing and sales. Through this, additional mixed row selections with header and items data are possible. The items will be automatically outputted, in the sequence of the shell objects. These supplementary selection options simplify, especially at the EDP and ODBC interface, data export and analysis problems. Here the objects are now directly available as the respective tables, one saves in ODBC for example, the linking of header and item table in the call and receives them sorted in the sequence of the shell objects. Respective calls can, in comparison to the previous situation, be expressed significantly more simply and furthermore are processed more efficiently. By using shell groups in the FOP one can favorably influence the lock behavior and possibly the runtime behavior: In FOP programs which run through purchasing and sales objects with .SELECT LINE, the duration of the readlock to the total object can be shortened through the use of shell groups; when with the selection of
.SELECT SALES "xyzQuotation"

the readlock lasts as long as rows are run through, so with the use of shell groups (e.g. group 21 for quotations) the readlock is set only within the command
.SELECT SALES "...;@group=21"
©ABAS Software AG 2005

Know how using abas Business Software

Page 115 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ If the FOP program runs through the table of the object repeatedly then the runtime is reduced by the use of shell groups.
Command .SELECT APPLICATION Meaning Displays the product usage of the selected product.

The FOP command .SELECT APPLICATION (statement of procurement for a reservation, statement of use for a procurement) has been improved. It behaves in a slightly different manner than in previous versions. 1st case: There is a procurement in the H buffer. Each following .SELECT APPLICATION verifies which procurement partial quantity ("bvmge") is allocated to which requirement ("bvkenn"): bvkenn R L S .SELECT buffer Reservation Materials allocation mehr yes no yes no Meaning bvmge is adopted into the reservation in the H buffer bvmge is adopted into the warehouse bvmge is adopted into its own allocation in the H buffer (see "editable plan chart") End of the allocation list

Only the bvkenn="" criterion can be used as an end of loop criterion with .SELECT APPLICATION the 'mehr' variable can not be used for this as you can see in the above table. 2nd case: There is a reservation in the H buffer. Each following .SELECT APPLICATION verifies which requirement partial quantity ("bvmge") is taken from which "bvkenn" source: bvkenn B L S .SELECT buffer Procurement Materials allocation mehr yes no yes no Meaning bvmge is adopted from the procurement in the H buffer bvmge is taken from the warehouse bvmge is taken from its own allocation in the H buffer (see "editable plan chart") End of the allocation list

Note: Here as well only the criterion bvkenn="" can be used as the end of loop criterion.

©ABAS Software AG 2005

Know how using abas Business Software

Page 116 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Command .SELECT VKZ Meaning Loads the monthly transactions figures and monthly turnover of customers, vendors (suppliers), employees, products, subledger accounts and fixed assets of the fiscal year specified. Constants, variables and mixed forms can be specified.

You can use the .SELECT VKZ (transaction figures) command with the following options: Loads the monthly transactions figures and the monthly turnover of customers, vendors (suppliers), employees, products, G/L accounts and fixed assets of the specified fiscal year. .SELECT VKZ target [GJAHR] Loads the planned monthly transactions figures and the planned monthly turnover of customers, vendors (suppliers), employees, products, G/L accounts and fixed assets of the specified fiscal year. .ADD VKZ actual [GJAHR] Loads the monthly transactions figures and the monthly turnover of customers, vendors (suppliers), employees, products, G/L accounts and fixed assets of the specified fiscal year. .ADD VKZ target [GJAHR]Loads the planned monthly transactions figures and the planned monthly turnover of customers, vendors (suppliers), employees, products, G/L accounts and fixed assets of the specified fiscal year.
.SELECT VKZ actual [GJAHR]

The command .SELECT VKZ can be entered using Constants Variables Mixed form e.g. .SELECT VKZ actual 06-2 or using e.g. .SELECT VKZ 'xtyp' 'xtgjahr' or even using the e.g. .SELECT VKZ actual 'xtgjahr'.

There are several possible procedures:
Procedure 1 .SELECT YEAR 05 .SELECT CUSTOMER .. .SELECT VKZ actual .ADD VKZ target Output Actual 'H|s1' Target 'D|s1' Procedure 2 .SELECT YEAR 05 .SELECT CUSTOMER .SELECT actual 06 .ADD VKZ 06 Output Actual06 'H|s1' Target06 'D|s1' VKZ target .SELECT actual .. Output Actual 's1' VKZ Procedure 3 .. .SELECT CUSTOMER Procedure 4 .. .SELECT CUSTOMER .SELECT VKZ actual 04 .ADD VKZ actual 05 Output Actual04 'H|s1' Actual05 'D|s1'

©ABAS Software AG 2005

Know how using abas Business Software

Page 117 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Explanation on the procedures:
Procedure 1 Procedure 2 Procedure 3 Procedure 4 Comparison of the actual/planned transaction figures (VKZ) of the 2005 fiscal year (GJAHR). Comparison of the actual/planned transactions figures of the 2006 fiscal year. The GJAHR specification in the command .SELECT VKZ ... or the command .ADD VKZ ... has a higher priority than a .SELECT YEAR command which may have been run earlier. Output of the actual transaction figures of the current fiscal year. The default fiscal year (GJAHR) will be used if the fiscal year (GJAHR) has not yet been defined. Comparison of the actual transaction figures of the fiscal years 2004 and 20054. Before the transaction figures can be selected, the "father" (customer, vendor [supplier], product, fixed asset etc.) of the transaction figures has to be specified. You can decide if you would like to specify a fiscal year before you run the command .SELECT VKZ or .ADD VKZ command. It is an advantage to be able to attach the appropriate fiscal year to the .SELECT VKZ or .ADD VKZ command, particularly if you want to compare several fiscal years. The fiscal year (GJAHR) can, of course, also be specified related to the current fiscal year (GJAHR), e.g. by using the command .SELECT VKZ ACTUAL –1. The actual transaction figures of the old fiscal year (GJAHR) will then be loaded into the main buffer.

Example: Setting the fiscal year:
.SELECT YEAR 05

.. Fiscal year 05 has been set.
.SELECT CUSTOMER .SELECT VKZ ACTUAL

.. The actual transaction figures of the fiscal year 05 have been loaded in the main buffer.
.ADD VKZ ACTUAL 06 .. Actual transaction figures of 06 have been loaded in the main buffer and FY 06 has been set. .SELECT VKZ TARGET

.. The planned transaction figures of FY 06 have been loaded in the add buffer as well.
.SELECT VKZ ACTUAL –1

.. The actual transaction figures of the old fiscal year (current FY –1) have been loaded in the main buffer and the old FY has been replaced.

The following structures are also supported. Output of the transaction figures for the customers 1-9999
.SELECT YEAR 06 .SELECT CUSTOMER "1!9999" !LABEL1: Select transaction figures of the customer .SELECT VKZ ACTUAL .SELECT VKZ TARGET .. Output .SELECT CUSTOMER .CONTINUE LABEL1 ? mehr .. All customers processed.

in the 06 fiscal year: 06:
©ABAS Software AG 2005

Know how using abas Business Software

Page 118 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Transaction figures available (setting the FOP variable 'mehr'):

If no transaction figures are found for a valid fiscal year, a complete record will be provided anyway containing the father of the transaction figures object (customer, vendor [supplier], part etc.), the fiscal year and the type of the transaction figures. The corresponding transaction figures will be zero. The FOP variable 'mehr' will be set to "yes".
Error (FOP will be canceled):

If the fiscal year (GJAHR), for which you want to select the transaction figures, is later than the latest fiscal year (GJAHR) specified in the system admin master files (fiscal years table in the "DATES" record), the FOP will be canceled after .SELECT VKZ .... If the period of time set in the FOP covers several fiscal years, the FOP will be canceled after .SELECT VKZ .... This will be the case, for example, when you have specified the period of time with the .SELECT PERIOD command (e.g. .SELECT PERIOD 01.01.04 - 31.12.05).
Loading planned figures into the database via FOP:

Target figures of customers, vendors (suppliers), employees, parts, accounts and fixed assets can be loaded into the database using FOP. The procedure is as follows: 1. Loading the "father" of the transaction figures, e.g.
.SELECT CUSTOMER "number"

Loading the transaction figures (vkz) with a lock, e.g.
.SELECT VKZ TARGET LOCK

Setting the monthly figures, e.g. in the customer master files using
.FORMULA s3 = s3 +1 or .FORMULA u12=12

Writing the values into the database using
.REWRITE

You will not be allowed to rewrite inconsistent records! This applies, for example, if a financial year has been shortened to 10 months and the balances for the financial months 11 or 12 are not zero. Currency specification when the FOP commands .SELECT VKZ and .ADD VKZ are used: The commands .SELECT VKZ and .ADD VKZ access the transaction figures, turnover figures or planned figures of customers, vendors (suppliers), employees, products, etc.
Example:

A company has made the Euro conversion on 01.01.2001. Before, the home currency was DEM. This means that all financial figures, up to and including 2000, were posted in DEM. Let's assume that you would like to access past financial figures of a product:
.SELECT PART "" .ADD VKZ ACTUAL "00"

©ABAS Software AG 2005

Know how using abas Business Software

Page 119 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ As no currency is specified, the current home currency EUR would be used. As, however, the transaction figures of the fiscal year 2000 were posted in DEM, no figures will be found. Correct:
.SELECT PART "" .ADD VKZ ACTUAL "00" "DEM"

or better
.SELECT PART "" .ADD VKZ ACTUAL "00" 'ainland'

("ainland" is the home currency before the conversion to the EURO.) For any fiscal years it would be as follows:
.INPUT VKZRAUM .SELECT PART "" .FORMULA xwaehr=ainland .FORMULA xwaehr=ninland ? (bueuro ,, ,,," In all strings contained in the formatted variables will be replaced by and all by .
Command .SET 'character' .SET BACKGROUND Meaning QUESTION This command is used to set conditions (standard value: question mark (?)) to 'character'. (For more on this see chapter .SET – Meaning of special characters.) This command has an effect on the .SYSTEM commands. .BACKGROUND + has an effect on all the following .SYSTEM commands. It should therefore be avoided if possible! The command .SYSTEM BACKGROUND has the same effect but only for one single call. (For more on this see the "background" option of the .SYSTEM command.)

This command can be used with the following options:
.SET BACKGROUND +

.SET BACKGROUND -

After you have run a command by using .SYSTEM, the screen will not be deleted nor regenerated. The outputs (if there are some) of the system command are not affected. You should use this command if you are sure that the system command does not generate an output. After a system command has been run with .SYSTEM, the screen will be deleted each time and have a new layout. Disadvantage: This can lead to flickering if the system command had no output.
Meaning This command is used to mark inline attributes which can be used within the FOHTML output.

Command .SET INLINE

.SET INLINE + (paragraph recognition)

Blank lines and command lines (lines which start with a dot or a colon, unless the dot meaning was redefined) generally end the current paragraph. However, command lines can be evaluated as not being the end of a paragraph. The command .SET INLINE + is used for this. You can use this to make HTML-relevant commands effective within a paragraph. Only the commands .PARAGRAPH, .BROWSER and .OUTPU then output the paragraph completely and start a new one. You can also do this by means of a blank line.

©ABAS Software AG 2005

Know how using abas Business Software

Page 144 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ In inline mode the text processed so far will not necessarily have been already outputted when the FOP command is carried out as the output is buffered in center justification or left justification. You have to specify this explicitly with .PARAGRAPH when the output is already required for the next command. Generally this is not necessary as in inline mode the output is made to a file. The command can be canceled again with .SET INLINE -.
.SET INLINE (font attributes)

You can use inline attributes for HTML outputs, i.e. you can switch between font formattings within a line. This is illustrated by the following example:
Example: .SET INLINE .JUSTIFIED

This section contains a
.PRINT sg.gross

capital
.PRINT sg.norm

word and is merged by the browser.

Because of the first .SET command, the two print commands will not be regarded as the end of the paragraph. In the browser the total text is joined together to a paragraph and is set according to the window size.
Command .SET COMMAND 'character' Meaning When this command is used, the command (standard value: dot (.)) will be set to 'character'. (For more on this see chapter .SET – Meaning of special characters.) This command (standard value: underline (_)) is used for marking (hard) spaces. (For more on this see chapter .SET – Meaning of special characters.) This is only used for outputs to MS Windows

.SET EMPTY 'character'

.SET LF

This command can be used with the following options: .SET LF Prevents line breaks in MS Windows outputs. (This is important for forms in Microsoft WORD). Sends [insert paragraph] after every line of MS Windows outputs.

.SET LF +

©ABAS Software AG 2005

Know how using abas Business Software

Page 145 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Command .SET LABEL 'character' .SET MENUTRANS Meaning This command (standard value: exclamation mark (!)) sets labels. (For more on this see chapter .SET – Meaning of special characters.) All lines in FOP which belong to a .menu command and which contain the character sequence ">>" are processed separately in the "trans" program ("Foreign Language Translator" in the help menu).

This command can be used with the following options: .SET MENUTRANS + This only has to be used if a .MENU command and its menu alternatives are spread over a FOP and thus can not be recognized as belonging together by the "trans" program. The environment variable is expressed using FOP, the variable using FOP. Cancels .SET MENUTRANS +. This is the default setting of the environment variable expressed by FO.Variable in FOP.

.SET MENUTRANS -

.SET MENUTRANS only has to be used if a menu line which has the form
"one >> .FORMULA x = 1

was written "outside" the .MENU command, i.e. if, after .MENU, a reference was made to individual FOP sections by using .CONTINUE.
Example: .FORMULA xpunkt = "." .OUTPUT ADDEDTO TMP xpunkt' menu .SET MENUTRANS + one >> .FORMULA x = 1 two >> .FORMULA x = 2 end >> .END 'xpunkt' 'xpunkt' .SET MENUTRANS – .OUTPUT TERMINAL .INPUT TMP

©ABAS Software AG 2005

Know how using abas Business Software

Page 146 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Command .SET DEMAND Meaning If a variable which is used in FOP has not yet been set, it will be used in the dialog when .SET DEMAND + is specified. This can be deactivated by using .set demand –. The program will terminate with an error message if it comes across a variable which has not been set yet. We recommend that you always work with .SET DEMAND -, because the situation described above can generally be traced back to a program error. If you would really like to read in a variable, this can be done with the command .READ "output text" variable. The FOP is then easier to read. The standard setting will be reset when .SET DEMAND + is used. Sets the planned data.

.SET TARGET

This command can be used with the following options: .SET TARGET + .SET TARGET Command .SET RESV .SET RESTV

This command activates the setting of the planned data. This command deactivates the setting of the planned data.
Meaning This command unpacks the header user bars. This command unpacks the table user bars.

Access to the selection screens

You can access selection screens via the following procedures: Access to CHB Access to UDF Access to UDF Access to SEL
'sml' 'resv' (header section) 'restv' (table) 'select'

A list of all products can be created as shown in the following example: • • Define SEL, UDF, CHB templates in the systems admin files. Use one of these templates in an FOP program according to the following sample.

Example: .SELECT PART "!?" .SET TEMPLATE SEL "?" new command 'rohueb' new FOP variable (heading) 'select' FOP procedure (parts data)

©ABAS Software AG 2005

Know how using abas Business Software

Page 147 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Syntax
.SET TEMPLATE CHB .SET TEMPLATE UDF .SET TEMPLATE SEL .SET TEMPLATE SEL "Identity number/Search word" .SET TEMPLATE "Identity number/Search word" xdatname xidentnr [xgroup] .SET TEMPLATE "?" xd xn This command loads the CHB template of the object selected before (only for products at the moment). This command loads the UDF template of the object selected before. This command loads the first SEL template of the object selected before. This command loads the SEL template with the specified identity number or search word for the object selected before. Loads the SEL template with the specified identity number or search word for the object selected before. The name of the database, in the FOP language and not in the operating language any more, will be entered in xd.

In doing so, the corresponding template will be opened from the systems admin files and the following FOP text variable will be filled in:
'rohueb' 'rohein' 'rohstro' 'rohstrm' 'rohstru' Title line: contains the feature titles, separated by dashes. It can be up 8 lines long. Units line, separated by dashes as well. Upper "dash" line Middle "dash" line Lower "dash" line

When using the standard FOP, LG the previous output was always been limited to 3000 characters. The following FOP variables are affected:
(pr)sml (pr)resv (pr)select (pr)restv (pr)lgzeile (pr)rohueb (pr)rohein (pr)rohstro (pr)rohstrm (pr)rohstru

In addition, the specified parameters will be outputted – if necessary: xdatname xidentnr xgroup Name of file, to which the template refers, e.g. "Customer". "Part" etc. Identity number of the template. Group number of the file to which the template refers.

©ABAS Software AG 2005

Know how using abas Business Software

Page 148 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Application:
.SET TEMPLATE "?" xd xn .FORMULA xn2="%"+xn .SELECT 'xd' 'xn2' Used for the selection of a template. Provides you in xd with the name of the file in the FOP language. Assigns the identity number of the template. Selects the record from the file 'xd' via the CHB, SEL or UDF selection using the template 'xn'.

When you have loaded a part with .SELECT PART, you can access the data (which will be formatted in the desired way) by specifying 'select'.
Example:

If there is a SEL template which consists of 2 characteristics: Identity number and search word, a FOP created with the help of this template would look like the following. The layout of the list header is identical to the layout of the selection header which can be used to make selections using the corresponding template. The characteristics bar and the user bar will still be outputted using the FOP procedures: 'sml' or 'resv'. You can run 'sml', 'res' or 'select' without previously running the command .SET TEMPLATE. The list header variables, however, will then not be filled. 'select' would then use the first suitable SEL template from the system admin master files.
Access to the individual features of a characteristics bar or user bar:

The .SET command can be used in order to access individual features of a characteristics bar or user bar via FOP:
Command .SET CHB .SET RESV .SET RESTV Meaning Extracts the features of the characteristics bar. Extracts the features for the header user bars. Extracts the features of the table user bars.

The ID number or the search word of the characteristics bar template can be specified directly.
.SET CHB "4711"

The command loads the characteristics bar "4711" for the part which was loaded before, even if another characteristics bar is already available. The features of the bar will then always be empty. Even if the template has not been changed. The edit initial values entered in the template will be adopted into the list as they would be in the dialog via the "Parts" screen. In order to fill the bar for the first time, you do not need the allocation to a "q variable". After .SET CHB and .SET RES, 'mehr' will always be set.
©ABAS Software AG 2005

Know how using abas Business Software

Page 149 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Deleting a CHB/RES bar

You can also delete CHB/UDF bars.
Example:

.SET CHB – .SET CHB RESV – .SET RESTV Effect:

Deletes the bar and in the case of CHB also the (te)sach reference.
Command .SET SELSEPARATOR 'character' 'character' Meaning This command defines the separator. If the default character is redefined by means of the .SET SELSEPARATOR command, the output of the 4 FOP procedures ('sml', 'res', 'sel' and 'lgzeile') will furthermore have no fixed left and right margin, i.e. the separator at the beginning and the end of the line will be omitted. The default setting can be restored with .SET SELSEPARATOR. Save lock.

.SET SAVE

This command can be used with the following options: .SET SAVE + .SET SAVE Sets the save lock Cancels the lock again

For more on this see the commands .SET SINGLEUSER, .SET INTERRUPTION.
Command .SET STOP Meaning In the ASCII interface this command activates the pagewise mode.

This command can be used with the following options: .SET STOP + .SET STOP A key has to be pressed after each screen page. If then is pressed, however, the output will not wait any longer. The outputted text will be scrolled – without waiting.

Command .SET STRACE

Meaning Test log for selections.

This command can be used with the following options:
©ABAS Software AG 2005

Know how using abas Business Software

Page 150 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ .SET STRACE + The logging function is activated with this command. It will be valid from there on for all selections in FOP and in the dialog. .SET STRACE - This command is used to deactivate the function again.
Example:

In FOP a selection is carried out with .SELECT CUSTOMER. 11 records will be read – 1 matches and 10 do not match. 2 of these 10 do not match as they have another group and 8 as they have other selection criteria. If there is a big difference between the columns 6 and 7 or – so to say – if there is a very large number of unsuitable records, the selection, the selection criteria and the used key should be checked. If the selection is carried out with .SET STRACE +, an info message will appear for each selection. If a key is used without restriction, this will be an ineffective, slow search. Info message: (Example with an identity number in the parts master files) "Search is not ideal – Field empty: num2". If you choose a conditional key and if the condition field in the selection bar has been set in an inconsistent manner, abas ERP will output: "Search is inconsistent" A search will be inconsistent if Key type == "Field empty" and the selection criterion != empty or Key type == "Field empty" and the selection criterion != empty.
Command .SET SUBSTITUTION Meaning Substitutions for the output can be set globally for the access of variables with the .SET command.

Example:

.SET SUBSTITUTION "+LX/ 9 .END

Open non-exclusive loop followed by a condition
!MYLABEL .READ "Please enter number (end = 99)" ZL .CONTINUE MYLABEL ? ZL 99 .END

Jumps and labels can not be used in direct mode but only in program files.
Page 177 February 2006/2006r2n01

©ABAS Software AG 2005

Know how using abas Business Software

FOP Programming The commands from A to Z
______________________________________________________________________________________

? - for conditions
Command ? in the middle of a line ? at the beginning of a line Meaning If condition (for more on this see the next chapter "Conditions".) Conditional output of the line (? is additionally entered in the middle of the line) Example

.CONTINUE END ?_mehr ? name ? _mehr

Conditions
Every command can be followed by a condition which is separated from it by a question mark (?). The expression must either return "yes" or "no" as the result. In other words: Its variable type (.TYPE – variable types) must be "Bool". The command is then carried out conditionally, i.e. only if the expression returns "yes". The expression after the question mark is the condition for the command and the questions mark is read as meaning "if".
Example: .OUTPUT TO HELP ? datum>"20.2.05" .LEFT +10 ? x=""

Another output to the so-called "Help" file can only be carried out if the date 20.02.05 has been exceeded. The left margin will be indented by 10 columns if the text in the x variable consists of zero characters. If this condition is not fulfilled, the command will have no effect. The program will then be continued in the next line. Of course, commands without condition will always be carried out (unconditionally). In FOP there is no "short circuit logic" for Boolean expressions, i.e. a Boolean expression will be evaluated to the end even if the end result could be derived from the intermediate result. This is significant in connection with defined(). For example, the following program line is incorrect:

.PRINTLN yes ? defined(x) & x>10

Even if x has not bee defined, the condition x >10 will be checked and this check will fail because there is no definition.
Program is cancelled due to erroneous conditions

If an erroneous condition was specified in a FOP program,

©ABAS Software AG 2005

Know how using abas Business Software

Page 178 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Example:

.FORMULA i = 1 ... .CONTINUE LABEL ? i = true

the FOP will be canceled and an error message will be outputted. More information on conditions can be found in chapter "Jumps and labels".

..!INTERPRETER
A sophisticated FOP language version as well as the command language (German or English) can be specified for each FOP. Even FOPs with different language versions and command languages can work together without problems. It has to be specified in the first line of an FOP and only applies for this file. Sub-programs are not effected by this and can define own settings. These, in return, do not have any effect on the program currently running. By doing so, "old" and "new" programs can be integrated. You can, for example, also call up FOPs the command language of which is English in sub-programs the command language of which is German. Settings are not defined by the "FOP command" in its original sense but by a specific entry in the fist line of the FOP. This entry is started with the syntax:
..!INTERPRETER

At first glance this looks like a comment. Real comments, however, do not necessarily start with a dot but with the character which is defined as the command character at present (see the command .SET command 'character').
..!INTERPRETER is, however, totally independent of its environment. The FOP programmer does not

have to think about the current settings which are set when calling up a program or sub-program. For this reason, it is not allowed to use variables in this command. When you have started with ..!INTERPRETER the options can follow in any sequence. Just like the command itself, the options are independent of the operating language and the FOP command language. They are not translated.

©ABAS Software AG 2005

Know how using abas Business Software

Page 179 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
The options are described in the following: Options "English" and "German"

Only one of these two options is allowed. Doing so, the FOP command language is selected. If you select English, for example, you have to write ".MAKE" instead of ".MACHE". If no options is specified or if you do not work with
"..!INTERPRETER"

the FOP language, which has been defined in the configuration record, will be used as the command language. If FOPs are to be exchanged with other installations or "English" has been configured as the command language, we recommend to specify the command language explicitly each time. In this case, a corresponding first line should even be adopted into generated FOPs as well. The exchange becomes more robust and translation programs can easily see from the first line whether and how this file is to be translated.
Option "DECLARATION"

Every user variable (this means variables in the reference area T| you have defined yourself) you want to use has to have been declared with .TYPE before. If you declare one variable several times this is regarded as an error. In this way typing errors can be recognized easier and it avoids that the variable type is specified implicitly and possibly in a way you did not intend. If this option is not specified the traditional behavior applies (declaration is not compulsory!). However, we recommend to integrate checks which are as strict as possible into each FOP you develop. This facilitates the developing and testing of programs and increases the readability.

Other options (optional stricter checks are planned!)

Other options which will facilitate the creation of bigger program packages are planned and will be integrated step-by-step, for example,
Abbreviated variables are not allowed Own variables must start with a x in order to avoid conflicts, now or after an upgrade, with the system

and database variables. The reference object has to be specified for database variables (M, D, H, S). Only user variables (T|var) can stand without reference objects. • Options cannot be entered containing variables.

©ABAS Software AG 2005

Know how using abas Business Software

Page 180 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Example 1:

Program file X has the following contents:
..!INTERPRETER DECLARATION .TYPE int xanzahl|1 xnummer .FORMULA xanzal1 = 1 .FORMULA xnummer = 1

The program will be canceled in line 3 due to an error as the variable xnumber has not been declared.

Example 2:

An "old" German program Y is called in a "new" English program X. None of the programs need to know anything about the language of the other: Program file X has the following contents:
..!INTERPRETER ENGLISH DECLARATION .TYPE int xi .TYPE text xm .FORMULA xi = 1 .INPUT Y .CONTINUE

Program file Y has the following contents:
..! INTERPRETER GERMAN DECLARATION .FORMEL xrahmen = "|||" .FORMEL xm = xrahmen + mandant + xrahmen .WEITER

X is called up without causing any errors.
Process:

No error in line 2 of Y (xrahmen): Only X must be declared. No error in line 4 of Y (weiter): English is only valid for X No error in line 6 of X (continue): The command language is English again.

©ABAS Software AG 2005

Know how using abas Business Software

Page 181 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Example 3:

An "old" program X calls a "new" program Y; doing so, a programming error will be recognized: Program file X has the following contents:
..my local count variable xi .TYPE INT xi .FORMULA xi = H|anz .INPUT Y .FORMULA xi = xi +1

The program file Y (a sub-program which can be used generally) has the following contents:
..!INTERPRETER DECLARATION ..my local count variable xi .TYPE INT xi !WHILE .FORMULA xi = xi +1 etc.

Due to the naming conflict program Y would destroy the count variable xi of the caller as, as you certainly know, .type initializes a new variable. Program Y, however, is cancelled in line 3 as the variable xi was re-declared. Without this line, however, Y alone could not run as is uses the variable xi. If you set the FOP language to English in the configuration, all FOPs will be translated. In doing so, the following line will be entered in each FOP:
..!INTERPRETER ENGLISH

If the interpreter line already exists in the FOP program, proceed as follows: If a language is specified, the FOP will not be translated. In this way a FOP can be constantly used with German commands in an English environment. If no language is specified in the interpreter line, "English" will be added and the FOP will be translated.

©ABAS Software AG 2005

Know how using abas Business Software

Page 182 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Deactivating the abbreviation of variables If the variables can be abbreviated or not can be specified with the option NOABBREV of ..!INTERPRETER. The option works only on the current subprogram, as usual. If the option is set, then abbreviation is not possible. When it is not set, the tradition behavior will be valid, i.e. all variables can be used when .FORMULA is used. Note: Abstaining from making abbreviations is a quality improvement measure. In the case of larger programs abbreviation makes it less easy to locate variable accesses and program errors. In particular if a variable with the same name component is called accidentally.

The option NOABBREV automatically activates the option DECLARATION. Without this measure an unintentional abbreviation on the left side of .FORMULA is still possible – in contrast to not using the option, it would be interpreted as the creation of a new variable.

Information on various variable names
'num' and 'such' So far, except for FOP, the relevant database number of ID numbers and search words which have the same name in all databases had to be entered as well for variable names for ID numbers/search words, e.g. "num2" and "such2" in the product master files. You can access ID numbers and search words of all databases using the following names and ID numbers. You can thus control how blanks should be outputted.
Name number numberb such suchb Description ID number without preceding blanks ID number with preceding blanks Search word without succeeding blanks Search word with succeeding blanks Example "123" " 123" " " "ABC "ABC

©ABAS Software AG 2005

Know how using abas Business Software

Page 183 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ This also applies for FOP where num* and such* from the vartab have not been visible so far! For this aliases were added to the existing fields of all table of variables records so that the names can further on be used unchanged. These aliases are also visible in FOP.
Possible incompatibilities in customized FOPs Search sequence:

FOP programs always first search for the variables in the different database buffers and then in the process variables. The FOP variables (pr)nummer and (pr)such from the table of variables record V13-00 do not exist any more. Due to this, the search word sequence may change when accessing 'num' and 'such' in FOP:
Example: previously: D,H,M buffer and then D, H, M procedures new: D,H,M buffer; the procedure variables do not exist any more

This means that the variables 'num' and 'such' will be set in a different sequence if these variables are have been made visible in the table of variables for individual databases for FOPs.
Example: "num" in sales (Vartab V-03-01)

Has been made visible for FOP. The behavior of the following codes changes then:
.FORMULA xsuche="...search specification... " .SELECT SALES 'xsuche' .ADD CUSTOMER Identity number='num'

The identity number of the customer will be outputted by default. Up to now, the identity number of the sales object was outputted here using the sales identity number which is visible in FOP. In the future, however, the customer identity number will be outputted. This change only occurs in unqualified use ( without H|, D|, M|). When 'H|num' is specified, for example, the identity number of the sales object will always be outputted.

©ABAS Software AG 2005

Know how using abas Business Software

Page 184 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Omission of the procedure variables:

Up to now it was possible to query the variables 'num' and 'such' even if no loaded buffer existed at all. This is no longer possible. The FOP is cancelled due to an error. In this case, you should change the line or possibly add a line as follows: Example – Old: (FOP will be canceled)

.SELECT 'xdatei' .CONTINUE LABEL ? 'num'="" Example – New: .SELECT 'xdatei' .CONTINUE LABEL ?

mehr

Only one change in the EDP interface is incompatible: In EDP the 'such' field in the customer file (table of variables V-00-*) is trimmed when outputted, i.e.

without successive blanks. Up to now, the output has not been trimmed. If you need an output which is not trimmed, you will have to use the new "suchb" field.

Environment variable In FOP environment variables (environment variable, shell variable) can be expressed by FOP variables. This can be done by entering a preceding reference range E (”Environment”).
Example:

1. Architecture is 'E|ARCH' (architecture of the computer) 2. .SYSTEM "clock &" ? E|DISPLAY " " (Displays a clock on the screen – but only on the terminal X)
2. .FORMULA xtmp = "tmp/" + E|HOSTNAME + pid

(assigns a name for a temporary file which is also unique in computer networks provided that in profile HOSTMANE='hostname' was set.)

©ABAS Software AG 2005

Know how using abas Business Software

Page 185 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Normally, environment variables are set in profiles in order to set certain computer-dependant or userdependant configurations. With reference area E you are now provided with a comfortable transport of information from the shell level to the system. You can obtain all set environment variables using the env shell command. Variables which have not been set will not cause a program error when queries are carried out but provide you with the blank text. It is important to distinguish between small and capital letters as the shell does so as well.

Predefined text variables The system variables available in FOP can be found in V-13-00. These variables will be split into two groups: • • buffer-related variables and variables which are not related to buffers

Buffer-related variables are marked in the comments as "buffer related:". They refer to a record which was previously loaded into one of the buffers M, H or D. One of these buffers has to be specified in the syntax of the reference object.
Example: 'H|bush'

This syntax is strongly recommended because otherwise not only the priority rules must be noted, but also in this case the buffer with "unfounded" contents will be skipped. Variables which are not related to buffers can only be qualified by means of a T.
Example:

'T|datum'

Several of the non-buffer related variables are arrays; in the comments the lower and upper limit are specified for the index.
Example: "Array(0.. maxkdatnam):"

©ABAS Software AG 2005

Know how using abas Business Software

Page 186 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Some text variable are predefined when you start FOP. These contain configuration data from the system admin. master files, information about the current user session as well as the current FOP status (e.g. the output medium). All predefined text variables are contained in the system admin. master files, Vartab V-13-00 (table of variables: Text).

Note: We will only describe some of the predefined text variables here. Detailed information on this can be found in the chapter "FOP programming interface" of the Online Help.

'batchmode' This variable allows E(FOP) programmers to make a difference between interactive terminal use and automated loader or batch runs. The variable 'batchmode' has the type BOOL.

'datum' This variable contains the current date.

'mandant' This variable contains the name of the client according to mandantdir.env.

'grafik' There is also a variable in FOP called "grafik" (yes/no). Its value will be "yes" if the GUI (Graphical User Interface) is running. In this case, FOP can not run interactive Unix program as the input for these will fail, e.g. .SYSTEM vi generates the message "input read error". You should therefore integrate a query into existing programs, e.g. .CONTINUE ERROR ? grafik.

'bzeichen' This variable contains the operator code which has been recorded in the password record in the system admin. master files for the current user.

©ABAS Software AG 2005

Know how using abas Business Software

Page 187 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ 'ustid' This variable contains the VAT identification number from the company record. You can use this to cancel some of the .SELECT commands for the company record without substitution.

'loginname' This variable contains the system login name which has been recorded in the password record in the system admin. master files for the current user.

'geraet' This variable contains the current output medium. It can be changed with .OUTPUT TO … .

'r2path' This variable contains the directory in which you can find the models for MS Word and Excel. If you use the GUI you will also find the GUI program (wineks.exe) here (i.e. the sub-directory win in the client).

'edp' You can use the FOP variable 'edp' to query whether the FOP is running using the EDP interface.

'progvers' You can query the program version (as it is provided when you use the command "Servicing") using the FOP variable 'progvers'.

'bemail' The global FOP variable bemail provides you with the password-related email address from the Email (pemail) field. The variable is set with the address recorded in the password record when you start the system or whenever you log into the system again. You can use the field "email" to record the address in the password record.

©ABAS Software AG 2005

Know how using abas Business Software

Page 188 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Example: Recording an email address, based on a password (GUI) In order to load the password record into the screen, run the Password definitions command in the Master Files – Systems Admin. Files – Configuration Application menu.

When you have run the command and entered an identity number or a search word, you will be provided with the Password screen in Edit mode. You can then enter the address into the field Email address field (e.g. name@company.com).

©ABAS Software AG 2005

Know how using abas Business Software

Page 189 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

When you run a FOP or when you are in direct mode, 'bemail' provides you with the desired address, here: sy@abas.de.

'id (text)' The 'id' variable provides you with the object identity number of the object in the SELECT buffer ("H|id") or in the ADD buffer ("D|id"). Generally, the identity number of the screen buffer can only be determined when leaving the screen (it is only then assigned when you are creating new objects). There is no specific format for variable "id"! We can change it whenever you want. Please refrain from using sections of the "id". You can use the object identity number where the identity number or the search word for the selection of objects is used:
©ABAS Software AG 2005

Know how using abas Business Software

Page 190 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Object IDs are used for objects which have no identity number and no search word (e.g. sales/purchasing items, reservations, purchase order/work order suggestions). Such objects as well can be selected via their object ID.

'clhostadr' The "clhostadr" contains the IP address of the GUI client.

'disponiert' Since the scheduling has been running during operation it has been intended to be able to recognise in the FOP whether a specific scheduling operation has aleady been scheduled or not. This question now returns the answer "scheduled?" for the following processes: • • • Sales order/Purchase order items (V-03-02, V-04-02) Purchase order /Work order suggestions (V-04-02, V-04-05) Reservations (V-04-04)

If "scheduled?" is "TRUE", the corresponding process will have already been scheduled and no other planned changes for the scheduling exist (quantity changes, date changes, …). If "scheduled?" is "FALSE", either the corresponding process has not yet been scheduled or it has to be changed by the scheduling again.

'extuser' Especially when you are using the GUI you will face the problem that the user cannot be determined uniquely when integrating external software (e.g. fax programs running on Novell and NT). This is because the GUI application server is always started as the same Unix user (eks, demo, …). For this, there is the field "(fa)extuser" in the password record: You can record any text as an external user code in this field. The value of this field is available as the global FOP variable "extuser". This variable can be specified for fax or email outputs and be evaluated when the system is started.

'dezpunkt' This FOP variable contains the value of the corresponding fields in the configuration record. If the fields are emmpty, "dezpunkt" will have been set with a dot (.).

©ABAS Software AG 2005

Know how using abas Business Software

Page 191 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ 'dezpunktchar' This FOP variable always contains the current value of the decimal separator. If the value is 0, the default decimal point from the configuration record will be used. For more on this see also .SET DECPOINT.

'tsdtrenn' This FOP variable contains the value of the corresponding fields of the configuration record – unless these fields are empty. Then tsdtrenn will contain ".". Initially this variable contains the setting of the configuration record. It can be changed by using ".SET THOUSSEP". The requested character can also be specified by means of a variable, i.e. .SET THOUSSEP 'xseparator' can be used instead of .SET
THOUSSEP.

'tsdtrennchar' This FOP variable always contains the current value of the separator for thousands. If the separator character for thousands is set to "empty", this will have an effect on the types RDTx and MDTx. If the value is 0, the default separator for thousands from the configuration record will be used. See also: .SET DECPOINT and .SET THOUSSEP. If the separator character for thousands is reset with the command .SET THOUSSEP (without specifying an argument), the standard behavior will be used. This makes sense in three cases: when FOP is run or after: .SET THOUSSEP

All numbers of the types Real and Rx/Mx will be outputted with decimal separator character dot and without a separator character for thousands. All numbers of the types RDTx and MDTx will be outputted with "decpoint" and "thoussep".

when the standard separators are used in the output: .SET THOUSSEP 'tsdtrenn' .SET DECPOINT 'dezpunkt'

©ABAS Software AG 2005

Know how using abas Business Software

Page 192 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________ Independent of their type, all real numbers will be outputted with the decimal separator character "(pr)dezpunkt" and the thousands separator "(pr)tsdtrenn". Of course you can also use fixed values. In doing so you should note that the variable "separator character for thousands" can be empty but the "decimal separator character" can not be empty. If it is empty, a dot (.) will be used. when outputting to a file and when transferring data to external systems: .SET THOUSSEP "" .SET DECPOINT .

In this case, the variable for the separator character of thousands will always be empty. The decimal separator character is always the period. All FOPs delivered in the standards which include the thousands separator characters and decimal periods, were edited and where necessary adapted to one of the three standard cases.

©ABAS Software AG 2005

Know how using abas Business Software

Page 193 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

Appendix
Overview of FOP commands
German – English

FOP Commands
.absatz .aktion .art [INTEGER
REAL REALX REAL0 REAL2 REAL4 TEXT DATUM WOCHE ZEIT TERMIN]

.para .action BOOL .type [INTEGER

REAL REALX REAL0 REAL2 REAL4 BOOL TEXT DATE WEEK TIME UE.DATE]

.atext .atext .atext -SPRACHE .atext -LANGUAGE .ausgabe [auf an bildschirm drucker fax pause .output [new addedto terminal printer fax pause kopien mail] copies mail] .belegen .blocksatz .box .bringe .browser [-ENDE -DATEI -MAIL] .budget .chart .cursor .dazu .dde.advise .dde.exec .dde.exit .dde.info .dde.init .dde.request .dde.send .dde.unadvise .dde.wait .druck .editiere .eingabe .ende .ende. .farbe .fehler .occupy .justified .box .rewrite .browser [-END -FILE -MAIL] .budget .chart .cursor .add .dde.advise .dde.exec .dde.exit .dde.info .dde.init .dde.request .dde.send .dde.unadvise .dde.wait .print .editing .input .end .end. .colour .error

©ABAS Software AG 2005

Know how using abas Business Software

Page 194 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
.fenster [-HOEHE -BREITE -ZEILE -SPALTE - .window [-HEIGTH -WIDTH -LINE -COLUMN SCROLL] SCROLL] .flattersatz .format [ -TITEL -NOHEADER -TREIBER] .formel .gedruckt .hilfe .hinweis .hole .kommando [-BATCH -PARALLEL -LADER] .kopieren .lade .laenge .unjustified .format [-TITLE -NOHEADER -DRIVER] .formula .printed .help .note .select .command [-BATCH -PARALLEL -LOADER] .copy .load .length

.lesen .read .links .left .loeschen .delete .mache .make .menue .menu .merke .reserve .oben .up .pc.clip .pc.clip .pc.copy .pc.copy .pc.exec .pc.exec .pc.open .pc.open .println .println .rechts .right .schutz .protection .seite .page .setze .set .sortiere [abwaerts aufwaerts numerisch .sort [down up numberical alphanumerical] alphanumerisch] .system .system .tabellensatz [titel ueberschrift zeile ende] .tablerecord [title headline line end] .text .text .trenner .separator .uebersetzen .translate .unten .down .vtab .weiter [wenn] .zeigen .zeile .zuweisen .vtab .continue [if] .view .line .assign

©ABAS Software AG 2005

Know how using abas Business Software

Page 195 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

SEL Parameters
Account Acctransact Add Alphabetical Anchor Application backwards Capacity Column Command Commission Company Costs Costsheet Customer Delnotes Edifact Employee Entry EntryDate Evaluation Example Field Fifo File File10 File11 File12 File13 File14 File15 File16 File17 File18 File19 File2 File20 File21 File22 File23 File24 File25 File26 File27 File28 File29 File3 File30
©ABAS Software AG 2005

Konto Fibuchung Dazu Alphabetisch Anker Verwendung Rueckwaerts Kapazität Spalte Kommando Provision Firma Kosten Kblatt Kunde Lscheine Edifact Mitarbeiter Buchung Budatum Auswertung Exemplar Feld Fifo Datei Datei10 Datei11 Datei12 Datei13 Datei14 Datei15 Datei16 Datei17 Datei18 Datei19 Datei2 Datei20 Datei21 Datei22 Datei23 Datei24 Datei25 Datei26 Datei27 Datei28 Datei29 Datei3 Datei30
Page 196 February 2006/2006r2n01

Know how using abas Business Software

FOP Programming The commands from A to Z
______________________________________________________________________________________
File4 File5 File6 File7 File8 File9 Filingsystem Fixedasset Forwards From Group0 Group1 Group2 Group3 Group4 Group5 Group6 Group7 Group8 Group9 Header Invoices Issue Item JoCode Journal JTicket Lifo Line List Location Lock Lot Lottree Machloading MailingList Mallocation Mask Message Model Month Numbered Object Operation Outstanding Part PartsList Payments PDC Period
©ABAS Software AG 2005

Datei4 Datei5 Datei6 Datei7 Datei8 Datei9 Ablage Anlage Vorwärts Von Gruppe0 Gruppe1 Gruppe2 Gruppe3 Gruppe4 Gruppe5 Gruppe6 Gruppe7 Gruppe8 Gruppe9 Kopf Rechnungen Abgang Position JoKennzeichen Journal Aschein Lifo Zeile Liste Lplatz Sperren Charge Chargenbaum Mbelegung Verteiler Mzuordnung Maske Nachricht Vorlage Monat Nummeriert Objekt Arbeitsgang Obligo Teil Stueckliste Zahlungen BDE Zeitraum
Page 197 February 2006/2006r2n01

Know how using abas Business Software

FOP Programming The commands from A to Z
______________________________________________________________________________________
Plan chart Porder Printable Production Purchasing Quotations Receipt Recordnumber Requests Sales SalesOrder Serial SOrders Specific Squantity Statement Status Stocktaking Suggestion Supplier Takeover Target TaxCode Transaction TransportCompany User Vkz Warehouse Company Workorder Year Plankarte Bestellungen Druckbaren Fertigung Einkauf Angebote Zugang Satznr Anfragen Verkauf Auftrag Colli Auftraege Spezifisch Lmenge Auszug Stand Inventur Vorschlag Lieferant Uebernahme Plan Steuerschluessel Vorgang Spedition Benutzer Vkz Lager Betrieb Betriebsauftrag Jahr

©ABAS Software AG 2005

Know how using abas Business Software

Page 198 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

SET Parameters
Background Cancel chb CloseWindow Colon Command Currency Debug Decpoint Demand Empty ErrorReport File Foextern Inline Interrupt Label LF MenuTrans Outcurr Question Referenc Replacement restv resv Save SelSeparator Separator Single-user Stop STRACE Target Template Template chb Template res Template sel ThousSep 'character' Trace Trans VARQUOTE VTrace Hinterground Abbruch sml Fensterschließen Doppelpunkt Kommando Waehrung Debug Dezpunkt Nachfrage Leer Diagnose Datei Foextern Inline Unterbrechung Marke LF Menutrans Auswaehr Frage Verweis Ersetzung restv resv Sichern SelTrenner Trenner Allein Stop STRACE Plan Rohling Rohling sml Rohling res Rohling sel Tsdtrenn 'Zeichen' Trace Trans VARQUOTE Vtrace

©ABAS Software AG 2005

Know how using abas Business Software

Page 199 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

Database Loader Parameters * *

©ABAS Software AG 2005

Know how using abas Business Software

Page 200 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

©ABAS Software AG 2005

Know how using abas Business Software

Page 201 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

SELECT Parameters
Abgang Ablage Alphabetisch Anfragen Angebote Anker Anlage Arbeitsgang Aschein Auftraege Auftrag Auswertung Auszug Betrieb BDE Benutzer Bestellungen Betriebsauftrag Buchung Budatum Charge Chargenbaum Colli Datei Datei10 Datei11 Datei12 Datei13 Datei14 Datei15 Datei16 Datei17 Datei18 Datei19 Datei2 Datei20 Datei21 Issue Filingsystem Alphabetical Requests Quotations Anchor Fixedasset Operation JTicket SOrders SalesOrder Evaluation Statement Work-order PDC User Porder Work-order Entry EntryDate Lot Lottree Serial File File10 File11 File12 File13 File14 File15 File16 File17 File18 File19 File2 File20 File21

©ABAS Software AG 2005

Know how using abas Business Software

Page 202 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

Datei22 Datei23 Datei24 Datei25 Datei26 Datei27 Datei28 Datei29 Datei3 Datei30 Datei4 Datei5 Datei6 Datei7 Datei8 Datei9 Dazu Druckbaren Edifact Einkauf Exemplar Feld Fertigung Fibuchung Fifo Firma Gruppe0 Gruppe1 Gruppe2 Gruppe3 Gruppe4 Gruppe5 Gruppe6 Gruppe7 Gruppe8 Gruppe9 Inventur Jahr JoKennzeichen Journal Kapazität

File22 File23 File24 File25 File26 File27 File28 File29 File3 File30 File4 File5 File6 File7 File8 File9 Add Printable Edifact Purchasing Example Field Production Acctransact Fifo Company Group0 Group1 Group2 Group3 Group4 Group5 Group6 Group7 Group8 Group9 Stocktaking Year JoCode Journal Capacity

©ABAS Software AG 2005

Know how using abas Business Software

Page 203 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

Kblatt Kommando Konto Kopf Kosten Kunde Lager Lieferant Lifo Liste Lmenge Lplatz Lscheine Maske Mbelegung Mitarbeiter Monat Mzuordnung Nachricht Nummeriert Objekt Obligo Plan Plankarte Position Provision Rechnungen Rueckwaerts Satznr Spalte Spedition Sperren Spezifisch Stand Steuerschluessel Stueckliste Teil Uebernahme Verkauf Verteiler Verwendung

Costsheet Command Account Header Costs Customer Warehouse Supplier Lifo List Squantity Location Delnotes Mask Machloading Employee Month Mallocation Message Numbered Object Outstanding Target Planchart Item Commission Invoices backwards Recordnumber Column TransportCompany Lock Specific Status TaxCode PartsList Part Takeover Sales MailingList Application

©ABAS Software AG 2005

Know how using abas Business Software

Page 204 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________
Vkz Von Vorgang Vorlage Vorschlag Vorwärts Zahlungen Zeile Zeitraum Zugang Vkz From Transaction Model Suggestion Forwards Payments Line Period Receipt

©ABAS Software AG 2005

Know how using abas Business Software

Page 205 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

SET Parameters
Abbruch Allein Auswaehr Datei Debug Dezpunkt Diagnose Doppelpunkt Ersetzung Fensterschließen Foextern Frage Hinterground Inline Kommando Leer LF Marke Menutrans Nachfrage Plan restv resv Rohling Rohling res Rohling sel Rohling sml SelTrenner Sichern Sml Stop STRACE Trace Trans Trenner Tsdtrenn 'Zeichen' Unterbrechung VARQUOTE Verweis Vtrace Waehrung Cancel Single-user Outcurr File Debug Decpoint ErrorReport Colon Replacement CloseWindow Foextern Question Background Inline Command Empty LF Label MenuTrans Demand Target restv resv Template Template res Template sel Template chb SelSeparator Save chb Stop STRACE Trace Trans Separator ThousSep 'character' Interrupt VARQUOTE Referenc VTrace Currency

©ABAS Software AG 2005

Know how using abas Business Software

Page 206 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

Database Loader Parameters * *

©ABAS Software AG 2005

Know how using abas Business Software

Page 207 February 2006/2006r2n01

FOP Programming The commands from A to Z
______________________________________________________________________________________

©ABAS Software AG 2005

Know how using abas Business Software

Page 208 February 2006/2006r2n01

Similar Documents