Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SIGN command

Former Member
0 Likes
631

Hi experts,

wa_billing_doc4-fkimg = abs ( wa_billing_doc3-fkimg ) * sign ( wa_billing_doc4-netwr ).

Does anyone know what the sign command do? I tried using F1 but it is showing help for SELECT options.

4 REPLIES 4
Read only

Former Member
0 Likes
609

Hi,

SIGN

Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of arg is positive

Thanks,

Sriram Ponna.

Read only

SureshRa
Active Participant
0 Likes
609

Hi,

SIGN built-in function returns value as below:

Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of arg is positive.

It is one of the overloaded functions where the data type of the argument determines the data type of the return value.

Regards

Suresh Radhakrishnan

Read only

Former Member
0 Likes
609

Hi,

The argument arg of a mathematical function must represent a numeric value. The data type of the return value is determined either by the argument of the function (overloaded functions) or by the function itself (floating point functions).

Outside of an arithmetic expression, the argument of a mathematical function must be a single, numeric data object. Within an arithmetic expression - that is, in the statement COMPUTE - the argument of a mathematical function can also be an arithmetic expression. In particular, a mathematical function in an arithmetic expression can have a different built-in function or a functional method as argument.

Overloaded Functions

The following table shows the overloaded functions where the data type of the argument determines the data type of the return value.

Function func Return value

abs Absolute value of the argument arg

sign Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of arg is positive.

ceil Smallest integer number that is not smaller than the value of the argument arg.

floor Largest integer number that is not larger than the value of the argument arg.

trunc Value of the integer part of the argument arg

frac Value of the decimal places of the argument arg

Regards,

Shiva Kumar

Read only

Former Member
0 Likes
609

Hi,

SIGN (X) is 1 when the value of X is positive values.

SIGN(X) is -1 When the value of X is negative. &

SIGN(X) is 0 when the value of X is 0

Where X is your input number

Regards,

Raghu