cancel
Showing results for 
Search instead for 
Did you mean: 

List of Instructions

Former Member
0 Kudos

Hi all

We need to get a complete list (descriptions, how to use...) of all the functions that we can use into XI (ex.: arithmetic, text, date...)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Two types of Node Functions:

/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

a. graphical node functions

b. user defined node functions

below are some of the user defined node functions:

createIf,

removeContexts,

replaceValue,

Exists,

SplitByValue,

collapseContexts,

useOneAsMany,

sort,

sortByKey,

mapwithDefault,

formatByExample

video link:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/b9af5e71-0701-0010-d0b8-f612f...

Graphical Mapping

http://help.sap.com/saphelp_nw04/helpdata/en/03/398c4024d26e1de10000000a1550b0/content.htm

Standard functions:

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

Regards,

Ram

Former Member
0 Kudos

Function Name

Function

add

R = X + Y

subtract

R = X - Y

equalsA

R = true, if value X equals value Y, otherwise R = false. The values are interpreted numerically, therefore the value 1.5 is the same as 1.50.

abs

O = Absolute value of I

sqrt

R is the square root of X

sqr

R is the square of X

sign

R = 1, when X is a positive number

R = 0, when X equals 0

R = 1, when X is a negative number

neg

R = -X

1/x

R is the reciprocal of X

power

R = XY

less

True, when X < Y, otherwise false

greater

True, when X > Y, otherwise false

multiply

R = X * Y

divide

R = X / Y

max

R = Maximum of values X and Y

min

R = Minimum of values X and Y

ceil

O = The smallest possible integer value (up to minus 'infinite’) that is not smaller than the argument I. Corresponds to the Java function java.lang.Math.ceil().

floor

O = The largest possible integer value that is not larger than the argument I. Corresponds to the Java function java.lang.Math.floor().

round

O = Integer value back that is closest to the value of argument I. Corresponds to the Java function java.lang.Math.round().

counter

O = Number of calls for this target-field mapping where you specify the initial value and the increment of the counter in the function properties.

FormatNum

Converts I according to a pattern that you define using the function properties. The possible patterns are the same as in the Java class java.text.DecimalFormat.

Boolean

All functions in this category expect Boolean input values (see above).

Function Name

Function

And

R is true if X and Y have the value true. Otherwise, R is false.

Or

R is true if X or Y have the value true. Otherwise, R is false.

Not

&#9679; O is false if I has the value true

&#9679; O is true if I has the value false

Equals

Compares both Boolean values X and Y and returns true if both are equal, otherwise false. Non-Boolean values are interpreted as false (see above).

Use the functions equalsS or compare from the Text category to compare strings.

notEquals

R = Not(Equals(X,Y))

if

&#9679; If condition X is fulfilled (returns true): R = Y

&#9679; If condition X is not fulfilled (returns false): R = Z

ifWithoutElse

If condition X is fulfilled (returns true): R = Y. Otherwise, the target field is not created.

Constants

Since these functions do not have any input values, they are generating functions.

Function

Use

Constant

O gets any string constant that you can enter in the dialog for the function properties.

copyValue

For a frequently occurring element, copies the value at a defined position in the source structure to the assigned target field.

sender

O gets the name of the sender business system. Test_Sender_System is output when you test the message mapping in the Integration Builder.

receiver

O returns the name of the receiver business system. Test_Receiver_System is output when you test the message mapping in the Integration Builder.

Conversions

Function

Use

FixValues

Executes a value mapping using a fixed value table that you complete using the function properties. The table is saved together with the most current message mapping and can only be used once.

Date

The following functions enable you to define the date format for the source or target format using the dialog for the function properties.

The format adheres to the convention as defined in the standard Java class java.util.SimpleDateFormat. The function properties dialog provides you with a wizard that you can use to enter the most frequently used date formats.

Function

Use

currentDate

Returns the current date using O. This function is a generating function.

DateTrans

Converts date format I to another date format O.

DateBefore

R = true, when date X comes before date Y, otherwise false

DateAfter

R = true, when date X comes after date Y, otherwise false

CompareDates

R = 1, when date X is after date Y

R = 0, when date X is the same as date Y

R = -1, when date X is before date Y

Node Functions

Function

Use

createIf

If there are structuring elements in your target structure that do not exist in the source structure, insert them using this function. Using condition I you can control whether the element is inserted or not. You connect the element in the target structure using O.

removeContexts

Removes all higher-level contexts of a source field. In this way, you can delete all hierarchy levels and generate a list.

replaceValue

Replaces the value I with a value that you can define in the dialog for the function properties.

exists

O = true, if the source field assigned to inbound channel I exists in the XML instance. Otherwise, false.

SplitByValue

Inserts a context change for an element.

collapseContexts

Replaces all values within all contexts with an empty string. This is a useful function when used in combination with SplitByValue.

useOneAsMany

Replicates a value of a field occurring once to pair it as a record with the values of a field occurring more than once.

sort

Sorts all values of the multiply-occurring inbound field I within the existing or set context. The sorting process is stable (the order of elements that are the same is not switched) and it sorts the values in O(n*log(n)) steps. Using the function properties, you can specify whether values are to be sorted numerically or lexicographically (case-sensitive or non case-sensitive) and in ascending or descending order.

sortByKey

Like sort, but with two inbound parameters to sort (key/value) pairs. The sort process can be compared to that of a table with two columns.

&#9679; Using the first parameter, you pass key values from the first column, which are used to sort the table. If you have classified the key values as numeric in the function properties, they must not be equal to the constant ResultList.SUPPRESS. See also: ResultList Object

&#9679; Using the second parameter, you pass the values from the second column of the table.

If there is a discrepancy between the number of keys and values, the mapping runtime triggers an exception. The function returns a queue with the values sorted according to the keys.

mapWithDefault

Replaces empty contexts in the inbound queue with a default value, which you specify in the function properties.

Example:

If Default is the default value and

A|B1,B2| |C| |D

is the inbound queue

then mapWithDefault gets the following outbound queue:

A | B1,B2 | Default | C | Default |D.

The function corresponds to the following combination of standard functions:

If(

[]field,

exists([]field),

Constant([value=default]))

formatByExample

This function has two inbound queues, which must both have the same number of values. To generate the result queue, the function takes the values from the first queue and combines them with the context changes from the second queue.

Statistics

The functions of this function category are designed for source fields that occur more than once in the source structure (maxOccurs = i > 1).

Function

Use

sum

R = Sum of values X1 to Xi of a context.

average

R = Average of values X1 to Xi of a context

count

R = Number of fields in a context

index

R = Index i of Xi. In the function properties, you specify the following: the initial value of i, the increment, and whether the index value is to be reinitialized at the beginning of every new context, or whether it is to have the same value for the entire source structure.

Text

In position specifications, the 0 position corresponds to the first character in the string.

Function

Use

substring

Returns a substring O for a string I. Use the dialog for the function properties to specify the position of the substring. Example: substring(“Hello”, 0,1) = “H”, means that the substring from Startindex 0 to Endindex 1 (not including position 1) is shown.

concat

R = Linking of strings X and Y (without blanks).

Example: X = “Mrs.”; Y = “Miller”; R = “Mrs.Miller”. Use the dialog for the function properties to insert a separator in the string.

equalsS

R = true, if string X equals string Y, otherwise R = false.

indexOf

(2 input parameters)

R = first position at which string Y is found in X and –1 if Y does not occur at all.

indexOf

(3 input parameters)

R = first position from position Z at which string Y is found in X and –1 if Y does not occur at all.

lastIndexOf

(2 input parameters)

R = last position at which string Y is found in X and –1 if Y does not occur at all.

lastIndexOf

(3 input parameters)

R = last position from position z at which string Y is found in X and –1 if Y does not occur at all.

compare

Compares string X with string Y:

R = 0, when the strings are equal

R = positive number i, when X is lexicographically larger than Y

R = negative number i, when X is lexicographically smaller than Y

i specifies the difference between the two strings lexicographically.

The function acts in the same way as the compareTo() method of the JDK class java.lang.String.

replaceString

X: String in which something is to be replaced

Y: String to be replaced in X

Z: String to replace Y

R = String in which each occurrence of Y in X is replaced by Z.

X = "sparring with a purple porpoise"

Y = “p”

Z = “t”

R = "starring with a turtle tortoise"

length

O = Length of string

endsWith

R = true, when Y is the last string in X;

otherwise false.

startsWith

(2 input parameters)

R = true, when Y is the first string in X;

otherwise false.

startsWith

(3 input parameters)

R = true, when Y is the same as X from position Z;

otherwise false.

toUpperCase

Converts all lower case letters in I to upper case letters.

trim

Removes all white space characters (spaces, tabs, returns) at the start and end of a string. Acts the same as the trim() method of the JDK class java.lang.String.

toLowerCase

Converts all upper case letters in I to lower case letters.

former_member335553
Active Contributor
0 Kudos