Professional Documents
Culture Documents
Formula Extension (FOX) - SAP Help Portal
Formula Extension (FOX) - SAP Help Portal
Table of Contents
Highlighting results for "Formula Extension (FOX)"
US/ffd2865315b86359e1000000
Formula Extension (FOX)
License Usage Con rmation
(/viewer/d26cb97cca534166b0cd Aa
US/abd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd
US/dcd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd Formula extensions contain a few, easy to learn language elements, with which you can
US/6cd2865315b86359e100000
solve almost all planning tasks, which occur in practice. The syntax of this language
Outgoing Royalties for the Licens element is very similar to the SAP programming language ABAP. Therefore, you can use
(/viewer/d26cb97cca534166b0cd any existing ABAP knowledge, without having to concern yourself with the complexity of a
US/c6d1865315b86359e1000000 full programming language (for example memory management, database access).
Outgoing Royalties for the Service
(/viewer/d26cb97cca534166b0cd
US/f4d3865315b86359e1000000 Integration
Revenues (Accrual Engine)
The formula extensions are not an independent SEM-BPS function type, they are an
(/viewer/d26cb97cca534166b0cd enhancement to the formulas. You can continue to create formulas in the usual way,
US/83d3865315b86359e100000
without having to make use of the formula extensions.
Paid Con rmations
(/viewer/d26cb97cca534166b0cd
US/09d2865315b86359e100000 Features
Product Sales
(/viewer/d26cb97cca534166b0cd General
US/b3d3865315b86359e100000
Contract All formula extension statements must be completed with a period “.” A statement can
extend across multiple lines in the formula builder, and several statements can be in the
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 1/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
same line. No distinction is made between upper and lower case. The system automatically
Table of Contents converts lower case entries into upper case entries.
US/ffd2865315b86359e1000000
Comments
License Usage Con rmation
(/viewer/d26cb97cca534166b0cd
You can create comments in the formula builder to explain the statements you
Aa
US/abd2865315b86359e100000
programmed, and to make the code easier to read. To do this, set the indicator * in the rst
License Sales Contract (Rights-R
column of a row. This means that the row is ignored by the syntax check, and is skipped
(/viewer/d26cb97cca534166b0cd
when executing the function.
US/dcd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd Syntax
US/6cd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd
Explanations
US/c6d1865315b86359e1000000
(/viewer/d26cb97cca534166b0cd You can declare local variables for a parameter group in the formula builder. You use these
US/09d2865315b86359e100000 variables for example to check the dynamic conditions at the runtime of the planning
Product Sales function, which are dependent on the current key gure values. First you could determine
(/viewer/d26cb97cca534166b0cd the largest or smallest posted value of a key gure within a loop using the transaction data.
US/b3d3865315b86359e100000 Then you can save this value in a variable and then generate new plan data independently
Contract of the variable value. The system initializes variables of the types F and I with the value 0.
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 2/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
Table of Contents
Note
US/ffd2865315b86359e1000000
For the language elements FOREACH and MESSAGE it is absolutely necessary that
License Usage Con rmation reference to characteristics take place via the variables declared before. A direct
(/viewer/d26cb97cca534166b0cd reference to a characteristic using its name is not possible with these language Aa
US/abd2865315b86359e100000 elements.
License Sales Contract (Rights-R
(/viewer/d26cb97cca534166b0cd
Syntax
US/dcd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd varname:
US/eed3865315b86359e100000
Service Contract (Rights-Relevan Name of the variable. The name can contain letters and gures, but must always begin
with a letter. The name must differ from the reserved words of the formula extension. All
(/viewer/d26cb97cca534166b0cd
US/6cd2865315b86359e100000 language elements belong to this (for example DATA, IF) and all formula operators (for
example SIN, CEIL, DECL).
Outgoing Royalties for the Licens
(/viewer/d26cb97cca534166b0cd
typname:
US/c6d1865315b86359e1000000
Product Sales
(/viewer/d26cb97cca534166b0cd F: Floating point. Used to save decimals with up to three decimal places; decimal point is
US/b3d3865315b86359e100000 the period “.”. You use this type for all calculation operations.
Contract
Context-speci c types:
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 3/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
Table of Contents Context-speci c types are types, which refer to the key gures and characteristic in the
US/ffd2865315b86359e1000000 planning level to which the formula function belongs. Which types are allowed depends on
which characteristics of the planning level were included in the list of elds to be changed
License Usage Con rmation
of the formula function. The correct type name is then identical with the technical name of
(/viewer/d26cb97cca534166b0cd
a characteristic. A variable whose type refers to a characteristic of the planning level, can
Aa
US/abd2865315b86359e100000
accept all values which are maintained for this characteristic.
License Sales Contract (Rights-R
(/viewer/d26cb97cca534166b0cd
The KEYFIGURE_NAME type is an exception: This type is only allowed, when you have
US/dcd2865315b86359e100000
included the generic entry "key gure name" in the list of elds to be changed. You can
License Acquisition Contract (Bil
program a loop with a variable of this type, which iterates over all key gures of the
(/viewer/d26cb97cca534166b0cd planning level. In such a loop, you can for example assign all key gures the same value, or
US/8ed2865315b86359e100000
you can de ne conditions on which the value assignment should depend.
Service Contract (Billing Items)
(/viewer/d26cb97cca534166b0cd Example
US/eed3865315b86359e100000
Service Contract (Rights-Relevan In the following example, the system loops through all key gures of the planning level
(/viewer/d26cb97cca534166b0cd using the KeyFigure variable. Key gures, which contain the value 0, are assigned the value
US/6cd2865315b86359e100000 1. The other key gures remain unchanged.
Outgoing Royalties for the Licens
DATA KeyFigure TYPE KEYFIGURE_NAME. FOREACH KeyFigure. ..IF { KeyFigure } = 0. ....
(/viewer/d26cb97cca534166b0cd
US/c6d1865315b86359e1000000 { KeyFigure } = 1. ..ENDIF. ENDFOR.
(/viewer/d26cb97cca534166b0cd Syntax
US/b3d3865315b86359e100000
Contract IF expression1 .
(/ ie er/d26cb97cca534166b0cd
t t t1
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 4/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
.. statement1 .
Table of Contents
US/ffd2865315b86359e1000000 [ ELSEIF expression2 .
License Usage Con rmation
.. statement2 . ]
(/viewer/d26cb97cca534166b0cd Aa
US/abd2865315b86359e100000
[ ELSE.
License Sales Contract (Rights-R
(/viewer/d26cb97cca534166b0cd .. statement3 . ]
US/dcd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd expression n:
US/eed3865315b86359e100000
Service Contract (Rights-Relevan Logical expression. If expression n results in the value True, then the appropriate
statement block statement n is executed. Otherwise the next logical expression is checked
(/viewer/d26cb97cca534166b0cd
US/6cd2865315b86359e100000 (if available), or the statement block assigned to the language element ELSE is executed (if
available). Then processing is continued behind the language element ENDIF.
Outgoing Royalties for the Licens
(/viewer/d26cb97cca534166b0cd
You can use the usual comparison operators in a logical expression (=, <>, <, >, <=, >= or
US/c6d1865315b86359e1000000
EQ, NE, LT, GT, LE, GE) as well as the following additional operator:
Outgoing Royalties for the Service
Revenues (Accrual Engine) IS NIL: Delivers the value True, if it was attempted to read over and above the last data
(/viewer/d26cb97cca534166b0cd record.
US/83d3865315b86359e100000
Paid Con rmations IS INITIAL: Delivers the value True, if a key gure or characteristic contains the initial
value.
(/viewer/d26cb97cca534166b0cd
US/09d2865315b86359e100000
Product Sales
(/viewer/d26cb97cca534166b0cd The operators AND and OR are available for the interlinkage of several logical expressions
US/b3d3865315b86359e100000 to a complex expression. You make the grouping of subexpressions within a complex
Contract expression with round brackets.
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 5/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
statement n:
Table of Contents
US/ffd2865315b86359e1000000 Statement block, which is then executed, when the check of the previous logical statement
results in the value True. Otherwise the statement block is skipped.
License Usage Con rmation
(/viewer/d26cb97cca534166b0cd
Example
Aa
US/abd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd DATA Customer TYPE 0CUSTOMER. FOREACH Customer. ..IF { REVENUE, Customer, 0 }
US/eed3865315b86359e100000 >= 50000. ....{ REVENUE, Customer, 1 } = { REVENUE, Customer, 0 } * 1.1. ..ELSEIF {
Service Contract (Rights-Relevan REVENUE, Customer, 0 } < 50000. ....{ REVENUE, Customer, 1 } = { REVENUE,
(/viewer/d26cb97cca534166b0cd Customer, 0 } * 1.2. ..ENDIF. ENDFOR.
US/6cd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd
The formula extensions offer two different language elements for the programming of
US/c6d1865315b86359e1000000
loops: DO ... ENDDO and FOREACH ... ENDFOR. Both language elements are used for
Outgoing Royalties for the Service
different purposes:
(/viewer/d26cb97cca534166b0cd
US/f4d3865315b86359e1000000
The statement DO ... ENDDO executes a statement block between the language
Revenues (Accrual Engine) elements until a termination condition is ful lled. When this condition is ful lled,
(/viewer/d26cb97cca534166b0cd processing must be explicitly terminated with the command EXIT. Processing is
US/83d3865315b86359e100000 continued in this case with the statement which follows ENDDO.
Paid Con rmations
The statement FOREACH ... ENDFOR executes an iteration over the values of a
(/viewer/d26cb97cca534166b0cd
US/09d2865315b86359e100000 characteristic sorted in ascending order (restricted by selection conditions from
planning level or package, if required), or over the key gures contained in the
Product Sales
(/viewer/d26cb97cca534166b0cd planning level. The reference to the characteristic or list of key gures must always
US/b3d3865315b86359e100000 take place via a previously declared local variable. The termination criterion is
Contract implicitly speci ed when the last characteristic value or last key gure is reached.
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 6/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
Syntax
Table of Contents
US/ffd2865315b86359e1000000 1. DO ... ENDDO
License Usage Con rmation
DO.
(/viewer/d26cb97cca534166b0cd Aa
US/abd2865315b86359e100000
.. statement1 .
License Sales Contract (Rights-R
(/viewer/d26cb97cca534166b0cd
.. IF expression1 .
US/dcd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd .. ENDIF.
US/eed3865315b86359e100000
(/viewer/d26cb97cca534166b0cd
US/6cd2865315b86359e100000 2. FOREACH ... ENDFOR
(/viewer/d26cb97cca534166b0cd ENDFOR.
US/f4d3865315b86359e1000000
Product Sales
(/viewer/d26cb97cca534166b0cd executed (if available). In any case, the EXIT command must be used when the termination
US/b3d3865315b86359e100000 condition is reached, as otherwise there is no possibility to exit the loop.
Contract
statement1:
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 7/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
(/viewer/d26cb97cca534166b0cd
Optional statement block, which is executed when the termination condition is reached. Aa
US/abd2865315b86359e100000
(/viewer/d26cb97cca534166b0cd With the FOREACH loop you can not only iterate over the values of an individual
US/eed3865315b86359e100000
characteristic, but also over characteristic combinations, which are contained in the
Service Contract (Rights-Relevan transaction data of the package. For this you should include the characteristics
(/viewer/d26cb97cca534166b0cd involved in a list separated by commas in the FOREACH statement (for example
US/6cd2865315b86359e100000 FOREACH var1, var2, var3.). In this way, in most cases, you achieve a considerably
Outgoing Royalties for the Licens quicker processing than with several FOREACH statements nested in each other,
(/viewer/d26cb97cca534166b0cd which only iterate over one of the characteristics.
US/c6d1865315b86359e1000000
(/viewer/d26cb97cca534166b0cd The example shows how you can calculate the factorial of a number (here the factorial of
US/83d3865315b86359e100000 5) with the statement DO ... ENDDO. It is very important that the loop passes are counted
Paid Con rmations in the variable Counter, and the loop is exited with the EXIT statement when the
(/viewer/d26cb97cca534166b0cd termination criterion is reached.
US/09d2865315b86359e100000
Product Sales
(/viewer/d26cb97cca534166b0cd DATA Factorial TYPE I. DATA Counter TYPE I. DATA Result TYPE I. Result = 1. Counter =
US/b3d3865315b86359e100000 0. Factorial = 5. DO. ..Counter = Counter + 1. ..IF Counter <= Factorial. ....Result = Result
Contract * Counter. ..ELSE. ....EXIT. ..ENDIF. ENDDO.
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 8/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
2. FOREACH ... ENDFOR
Table of Contents
US/ffd2865315b86359e1000000 In the following example, the system loops through all key gures of the planning level. Key
gures, which contain the value 0, are assigned the value 1. The other key gures remain
License Usage Con rmation
unchanged.
(/viewer/d26cb97cca534166b0cd Aa
US/abd2865315b86359e100000
DATA KeyFigure TYPE KEYFIGURE_NAME. FOREACH KeyFigure. ..IF { KeyFigure } = 0. ....
License Sales Contract (Rights-R
{ KeyFigure } = 1. ..ENDIF. ENDFOR.
(/viewer/d26cb97cca534166b0cd
US/dcd2865315b86359e100000
Messages
License Acquisition Contract (Bil
(/viewer/d26cb97cca534166b0cd You can issue messages to point out errors and special features to users when executing a
US/8ed2865315b86359e100000
formula function, or to give information about processing progress with time-consuming
Service Contract (Billing Items) operations.
(/viewer/d26cb97cca534166b0cd
US/eed3865315b86359e100000 Syntax
Service Contract (Rights-Relevan
(/viewer/d26cb97cca534166b0cd
MESSAGE Tnnn ( class ) [WITH var1 [[[ var2 ] var3 ] var4 ]].
US/6cd2865315b86359e100000
Explanations
Outgoing Royalties for the Licens
(/viewer/d26cb97cca534166b0cd
T:
US/c6d1865315b86359e1000000
(/viewer/d26cb97cca534166b0cd
If you issue a message of type E, then the results of the planning function are not
US/83d3865315b86359e100000
written in the internal transaction data buffer, and can therefore not be posted (see
Paid Con rmations
Saving Concept).
(/viewer/d26cb97cca534166b0cd
US/09d2865315b86359e100000
Product Sales
nnn:
(/viewer/d26cb97cca534166b0cd Three- gure number of the message to be issued within the message class.
US/b3d3865315b86359e100000
Contract class:
(/ ie er/d26cb97cca534166b0cd
E t f th l l di db k t t hi h th
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX)
t b i d 9/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
Entry of the message class enclosed in round brackets, to which the message to be issued
Table of Contents belongs.
US/ffd2865315b86359e1000000
License Usage Con rmation Recommendation
(/viewer/d26cb97cca534166b0cd Aa
US/abd2865315b86359e100000 As far as possible, use messages from a message class you created in the ABAP
License Sales Contract (Rights-R Workbench. In this way, you make sure that your messages are independent of
(/viewer/d26cb97cca534166b0cd possible changes to delivered message classes. However, you must transport the
US/dcd2865315b86359e100000 message class you created, from the test system into the production system.
License Acquisition Contract (Bil
Service Contract (Billing Items) Optional extra, to issue up to four text variables in the message text. You can use local
(/viewer/d26cb97cca534166b0cd variables, which reference characteristics or the list of key gures, as text variables, or text
US/eed3865315b86359e100000 constants. The text variables are inserted into the static message text (short and long text)
Service Contract (Rights-Relevan in the places, which were prepared for it with the placeholder &.
(/viewer/d26cb97cca534166b0cd
US/6cd2865315b86359e100000 Example
(/ ie er/d26cb97cca534166b0cd
A t Ti Ch t i ti
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 10/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
Access to Time Characteristics
Table of Contents
US/ffd2865315b86359e1000000 You can access time characteristics with the function TMVL. The function returns the
current value of the speci ed time characteristic, if necessary, marked up with an offset,
License Usage Con rmation
which is also speci ed. The entry of an offset offers the advantage that in this way such
(/viewer/d26cb97cca534166b0cd
characteristics can also be delivered, which are not contained in the transaction data of
Aa
US/abd2865315b86359e100000
the current planning package.
License Sales Contract (Rights-R
(/viewer/d26cb97cca534166b0cd
Syntax
US/dcd2865315b86359e100000
Service Contract (Rights-Relevan Technical name of the time characteristic, whose value should be calculated.
(/viewer/d26cb97cca534166b0cd
US/6cd2865315b86359e100000 offset:
(/viewer/d26cb97cca534166b0cd Example
US/f4d3865315b86359e1000000
Revenues (Accrual Engine) In the following example, the net book values of an asset are calculated with straight-line
(/viewer/d26cb97cca534166b0cd depreciation over a ve year duration of depreciation. Cost price is 1000, net book value
US/83d3865315b86359e100000 100, depreciation percentage rate 20%. The function TMVL determines the value of the
Paid Con rmations time characteristic FYEAR and adds an offset of 1. The value increased by 1, is assigned to
(/viewer/d26cb97cca534166b0cd FYEAR within the DO...ENDDO loop, so that the calculation of the net book value is
US/09d2865315b86359e100000 executed for a sequence of ve scal years. After that the iteration is terminated. The
Product Sales operand for this formula has the form { key gure name, scal year }.
(/viewer/d26cb97cca534166b0cd DATA YEAR TYPE I. DATA FYEAR TYPE 0FISCYEAR. FYEAR = VARV('ACTYEAR'). DO.
US/b3d3865315b86359e100000 .YEAR = YEAR + 1. .FYEAR = TMVL(FYEAR, 1). .{0AMOUNT, FYEAR} = DECL(1000, 100,
Contract 20, YEAR}. .IF YEAR = 5. . .EXIT. .ENDIF. ENDDO.
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 11/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
Access to Attributes
Table of Contents
US/ffd2865315b86359e1000000 With this function, you can access data, which neither concerns characteristics or key
gures, but master data attributes, which can be assigned to a characteristic.
License Usage Con rmation
(/viewer/d26cb97cca534166b0cd Aa
US/abd2865315b86359e100000 Note
License Sales Contract (Rights-R
(/viewer/d26cb97cca534166b0cd
US/8ed2865315b86359e100000
Syntax
Service Contract (Billing Items)
(/viewer/d26cb97cca534166b0cd
US/6cd2865315b86359e100000 attributname:
(/viewer/d26cb97cca534166b0cd Variable, which refers to the characteristic, to which the attribute belongs.
US/f4d3865315b86359e1000000
(/viewer/d26cb97cca534166b0cd
name of the attribute to be read (for example 0PRICE) as parameter, and a variable, which
US/09d2865315b86359e100000 refers to the characteristic, to which the attribute belongs (for example 0ARTICLE). The
Product Sales
operand for this formula has the form { key gure name, article }.
Table of Contents With this function, you can determine the value of a (global) Variable , which was de ned in
US/ffd2865315b86359e1000000 the context of the current planning area.
License Usage Con rmation
(/viewer/d26cb97cca534166b0cd Note Aa
US/abd2865315b86359e100000
License Sales Contract (Rights-R In the context of formula extensions, only such variables can be used, which are
(/viewer/d26cb97cca534166b0cd restricted to single value. Otherwise the system cannot clearly determine the value of
US/dcd2865315b86359e100000 the variables.
License Acquisition Contract (Bil
Direct access to a global variable using its name (in a value assignment with the form "
(/viewer/d26cb97cca534166b0cd
US/8ed2865315b86359e100000 {Operator} = varname.") is not possible. Always use the VARV function for this
purpose.
Service Contract (Billing Items)
(/viewer/d26cb97cca534166b0cd
US/eed3865315b86359e100000 Syntax
Service Contract (Rights-Relevan
VARV( varname )
(/viewer/d26cb97cca534166b0cd
US/6cd2865315b86359e100000
Explanations
Outgoing Royalties for the Licens
(/viewer/d26cb97cca534166b0cd
varname:
US/c6d1865315b86359e1000000
(/viewer/d26cb97cca534166b0cd In the following example two variables of the type 0CUSTOMER are declared. One of them
US/83d3865315b86359e100000 is used as a control variable for an iteration over all customers. The other one is reserved
Paid Con rmations using the VARV function with the value of the global variable VCUST, as it was de ned in
(/viewer/d26cb97cca534166b0cd the context of the planning area. In the iteration, as soon as the customer de ned by the
US/09d2865315b86359e100000 variable is reached, the planned revenue for all articles is increased by 10%. Subsequently,
Product Sales
(/viewer/d26cb97cca534166b0cd the iteration is terminated with the EXIT statement. The operand for this formula has the
US/b3d3865315b86359e100000 form { key gure name, article }.
Contract
DATA ARTICLE TYPE 0ARTICLE. DATA CUSTOMER TYPE 0CUSTOMER. DATA
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 13/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
VCUSTOMER TYPE 0CUSTOMER. VCUSTOMER = VARV('VCUST'). FOREACH
Table of Contents CUSTOMER. .IF CUSTOMER = VCUSTOMER. . .FOREACH ARTICLE. . . .{REVENUE,
US/ffd2865315b86359e1000000 ARTICLE} = (REVENUE, ARTICLE) * 1.1. ..ENDFOR. . .EXIT. .ENDIF ENDFOR.
License Usage Con rmation
Determination of the Current Characteristic Value
(/viewer/d26cb97cca534166b0cd Aa
US/abd2865315b86359e100000
With this function, you can transfer the current value of a characteristic to a variable, and
License Sales Contract (Rights-R
in this way nd out which data was currently edited. The function OBJV is called up
(/viewer/d26cb97cca534166b0cd
without entering parameters. First the type of the variable (and with it the characteristic,
US/dcd2865315b86359e100000
to which the variable refers) is determined, to which the function result should be
License Acquisition Contract (Bil
assigned. Then the function determines the current value of the characteristic referenced
(/viewer/d26cb97cca534166b0cd by the variable, and returns the value as function result.
US/8ed2865315b86359e100000
Service Contract (Billing Items) Above all, the function is used to keep the list of elds to be changed as small as possible.
(/viewer/d26cb97cca534166b0cd This has the following advantages:
US/eed3865315b86359e100000
(/viewer/d26cb97cca534166b0cd
US/c6d1865315b86359e1000000 Note
(/viewer/d26cb97cca534166b0cd
US/83d3865315b86359e100000 Syntax
Paid Con rmations
varname = OBJV()
(/viewer/d26cb97cca534166b0cd
US/09d2865315b86359e100000
Explanations
Product Sales
(/viewer/d26cb97cca534166b0cd varname:
US/b3d3865315b86359e100000
(/ ie er/d26cb97cca534166b0cd
E l
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 14/15
3/27/2020 Formula Extension (FOX) - SAP Help Portal
Example
Table of Contents
US/ffd2865315b86359e1000000 In the following example, the example used above for the VARV function is enhanced in the
following way: An additional variable is declared of the type 0COUNTRY, to which the
License Usage Con rmation
current value of the characteristic is transferred within the FOREACH loop. Revenue
(/viewer/d26cb97cca534166b0cd
planning is executed as in the example above, however, not for articles that were sold in
Aa
US/abd2865315b86359e100000
Germany. Prerequisite for calling up the OBJV() function is that the characteristic
License Sales Contract (Rights-R
0COUNTRY is not contained in the quantity of elds to be changed.
(/viewer/d26cb97cca534166b0cd
US/dcd2865315b86359e100000
DATA ARTICLE TYPE 0ARTICLE. DATA COUNTRY TYPE 0COUNTRY. DATA CUSTOMER
License Acquisition Contract (Bil
TYPE 0CUSTOMER. DATA VCUSTOMER TYPE 0CUSTOMER. VCUSTOMER =
(/viewer/d26cb97cca534166b0cd VARV('VCUST'). FOREACH CUSTOMER. .IF CUSTOMER = VCUSTOMER. . .FOREACH
US/8ed2865315b86359e100000
ARTICLE. . . .COUNTRY = OBJV(). . . .IF COUNTRY = 'DE'. . . . .{REVENUE, ARTICLE} =
Service Contract (Billing Items) (REVENUE, ARTICLE) * 1.1. . . .ENDIF. ..ENDFOR. . .EXIT. .ENDIF ENDFOR.
(/viewer/d26cb97cca534166b0cd
US/eed3865315b86359e100000 See also:
Service Contract (Rights-Relevan
(/viewer/d26cb97cca534166b0cd
US/c6d1865315b86359e1000000
(/viewer/d26cb97cca534166b0cd
US/f4d3865315b86359e1000000
(/viewer/d26cb97cca534166b0cd
US/83d3865315b86359e100000
(/viewer/d26cb97cca534166b0cd
US/09d2865315b86359e100000
Product Sales
(/viewer/d26cb97cca534166b0cd
US/b3d3865315b86359e100000
Contract
(/ ie er/d26cb97cca534166b0cd
https://help.sap.com/viewer/d26cb97cca534166b0cd52f94e935524/7.57.25/en-US/a9f9895360b93d58e10000000a174cb4.html?q=Formula Extension (FOX) 15/15