Math Functions in SAP

What are the math functions in SAP?

Hi,
This is what u want may be
Mathematical Functions
ABAP contains a range of built-in functions that you can use as mathematical expressions, or as part of a mathematical expression:
[COMPUTE] <n> = <func>( <m> ).
The blanks between the parentheses and the argument <m> are obligatory. The result of calling the function <func> with the argument <m> is assigned to <n>.
Functions for all Numeric Data Types
The following built-in functions work with all three numeric data types (F, I, and P) as arguments.
Functions for all numeric data types
Function
Result
ABS
Absolute value of argument.
SIGN
Sign of argument:                      1 X > 0
                                              SIGN( X) = 0 if X = 0
                                                               -1 X < 0
CEIL
Smallest integer value not smaller than the argument.
FLOOR
Largest integer value not larger than the argument.
TRUNC
Integer part of argument.
FRAC
Fraction part of argument.
The argument of these functions does not have to be a numeric data type. If you choose another type, it is converted to a numeric type. For performance reasons, however, you should use the correct type whenever possible. The functions itself do not have a data type of their own. They do not change the numerical precision of a numerical operation.
DATA N TYPE P DECIMALS 2.
DATA M TYPE P DECIMALS 2 VALUE '-5.55'.
N = ABS( M ).   WRITE:   'ABS:  ', N.
N = SIGN( M ).  WRITE: / 'SIGN: ', N.
N = CEIL( M ).  WRITE: / 'CEIL: ', N.
N = FLOOR( M ). WRITE: / 'FLOOR:', N.
N = TRUNC( M ). WRITE: / 'TRUNC:', N.
N = FRAC( M ).  WRITE: / 'FRAC: ', N.
The output appears as follows:
ABS:              5.55
SIGN:             1.00-
CEIL:             5.00-
FLOOR:            6.00-
TRUNC:            5.00-
FRAC:             0.55-
DATA: T1(10),
T2(10) VALUE '-100'.
T1 = ABS( T2 ).
WRITE T1.
This produces the following output:
100
Two conversions are performed. First, the contents of field T2 (type C) are converted to type P. Then the system processes the ABS function using the results of the conversion. Then, during the assignment to the type C field T1, the result of the function is converted back to type C.
Floating-Point Functions
The following built-in functions work with floating point numbers (data type F) as an argument.
Functions for floating point data types
Function
Meaning
ACOS, ASIN, ATAN; COS, SIN, TAN
Trigonometric functions.
COSH, SINH, TANH
Hyperbolic functions.
EXP
Exponential function with base e (e=2.7182818285).
LOG
Natural logarithm with base e.
LOG10
Logarithm with base 10.
SQRT
Square root.
For all functions, the normal mathematical constraints apply (for example, square root is only possible for positive numbers). If you fail to observe them, a runtime error occurs.
The argument of these functions does not have to be a floating point field. If you choose another type, it is converted to type F. The functions themselves have the data type F. This can change the numerical precision of a numerical operation.
Regards

Similar Messages

  • How can I use Seeburger java functions on SAP XI's user defined functions?

    Hi All,
    As my title implies; how can I use Seeburger java functions on SAP XI's user defined functions?  I've tried searching over the net in tutorials regarding this topic but I failed to find one; can someone provide me information regarding my question? thanks very much.
    best regards,
    Mike

    Hi Mike !
    You should check your documentation about which java classes you need to reference in the "import" section of your UDF. And also deploy the java classes into the java stack or include them as a imported archive in integration repository...it should be stated in the seeburger documentation.
    What kind of functions are you trying to use?
    Regards,
    Matias.

  • Using advanced math functions in plugins

    I have an application built in LabVIEW 8.5 that calls external VIs as PlugIns. Normally adding any subVIs of these PlugIns in the same directory as the plugin is located in (or a sub-directory of that) will enable the plugin to execute (I have several such plugins that do run properly).
    The problem now however is that one of these PlugIns use a few math functions (linear fit etc.) and, although all the subVIs and dlls (including the ones from the vi.lib etc.) are located in the same directory - and the application is run on a machine that actually has the full professional LV 8.5 installed on it, it is still not executable (I've built a source distribution to get all the code it depends on out, with no exclusions). If I hit the broken run-button it says the full development system is required to resolve the issue.
    The same plugin works fine in LV 7.1.1 (although then it is distributed as a top level VI in an llb with the support-VIs in it instead).
    Is there still a way in LV 8.5 to distribute a plugin that uses the math functions without having to include the functions in the built application that will launch the plugin?
    MTO

    Hi, Mads,
    My "Quick and Dirty" test shows that it should be no any problems. Just deselect "Exclude vi.lib" Vis in the Distribution, and select that dependecies should be deployed with PlugIn. See attachment, hopefully its will be helpful for you. Such distribution way produced huge llb (because not only linear fit embedded into library, but all math library), but at least it works.
    best regards,
    Andrey.
    Attachments:
    PlugInWithMathDistributionTest.zip ‏21 KB

  • Importance of Bounce management functionality in SAP CRM

    Hi All,
    I want to discuss few interesting issues which I have come a cross while doing a setting for bounce management functionality in SAP CRM 7.0
    Before sharing my experience I want to discuss some term related to Bounce email than will discuss about types of bounce emails and cause of the bounce email.The setting of bounce functionality is describing in below link .
    http://help.sap.com/saphelp_crm700_ehp01/helpdata/en/46/3f509215835fa7e10000000a1553f7/content.htm
    In general when a website visitor sigh up they receive email from the company site, the information the site collected saved in the database but It commonly happen some of your email will be undeliever. In marketing term we say it as 'Bounce'. this is the same way happen as when a person give a bank cheque to bank and don't have sufficient money to his/her account the bank people say the cheque got bounce ..
    As we are aware emails are bounce for variety of reason such as.
         - In case the recipient email address is invalid.
         - recipient email address is inactive or closed
         - recipient mailbox is full or mail server have some technical issue etc
    In general all these bounces emails categorize in two category.
    Hard bounce- When email address is not active. example wrong email address, email address de-activated, deleted,or closed
    Soft bounce-  recipient mailbox is full, mail server have some technical issue, Out_of_office is setup .
    Now finally we come to know about the cause of bounce email and types. Now the question arises why this is so important when we have bounce management functionality active in sap crm marketing ? as described in above url.
    suppose that there is a campaigning happening for an product where 3000 person visited it. Now incase 2000 visitors shown interest so have qualified as prospect bases on the information they have provided such as name, address, salary or employment detail.
    After successfully execution of campaign now senior executives create a mailing list for all the prospects in the target group of campaign and sends email to all the users.Now if I say to how many customers really company have reached reached after campaign execution answer will be we can not have the correct fact and figure as there could be some bounce happened.
    Now incase bounce management setting is configure in your CRM system than system will receive inbound e-mails for each bounce.Suppose we have received one thousand bounce emails than we would say actual customer contacted is 1000. this is the correct fact and figure and very much useful for marketing people.
    After than executive could remove email address which were hard bounced and for soft bounce they can use some other channel to contact like telephone calls etc to reach them.
    The correct facts and figures are very much important for marketing strategy and planning and also to know success level of each campaign. Assume a scnario where in day a company launches more than 5 campaign. I feel the importace is transparent now.
    I hope you would find some interest in above blog.
    Thanks
    prem

    HI, Sreedhar
    Check this thread:
    Re: New search help on CRMD_ORDER locator
    Denis.

  • E-mail functionality in SAP BO X1 3.1

    Hi All,
    I have few questions regarding the E-mail functionality in SAP BO X1 3.1
    1)Is there a limitation on size of report in Email within the SAP BO X1 3.1? 
    2)Can you zip reports within SAP BO X1 3.1 ?file type options(?)
    3)Is there an Impact on performance front end/back end if many users are mailing the reports using SAP BO X1 3.1?
    4)How can we restrict users to only email the public folder Reports?
    5)Only people with Scheduling have access to Email Functionality - Are there any other ways we can place restrictions around this?
    Please help in this regard
    Thanks in Advance
    Regards,
    Pavithra P

    Hi Pavithra,
    We can send a report instance (after schedulling) to an email address and not the actual report.
    Adaptive Job Server (Web Intelligence Scheduling and Publishing Service) is used to generate the instance and Destination Job Server is used to deliver that instance to the email address.
    If multiple users are expected to send instances to email concurrently then we could have multiple instances of Destination Job Server.
    As far as I am aware, there is no direct way to zip reports.
    If I am not wrong, the size of attachment would depend on the limitations set at Mail Servers. Your network administrator might help you on this.
    Hope this will help.
    Regards,
    Yuvraj

  • Bank chain functionality in SAP

    Hi,
    If anyone has knowledge as to how to use bank chain functionality in SAP for vendor payment in SAP. Please let me know I will get in touch with more details for my query. This is required when we are making payments to a vendor and there are some intermediary banks involved between our bank and vendors bank. The tcode for setting up bank chain is FIBPU
    Regards,
    Vijay

    Hi,
    Mainly this bank chain is used for giving payments to foreign vendors. Normally house bank will finalise via which bank the payment should be made. But using this bank chain, you can specify this.
    Configuration:
    Create a scenario in IMG under bank chains.
    Here you can maintain your search criteria. If you select Gen.Search (General Search), you should use IMG activity Create General Bank Chain. After maintain this, you need to activate your chain in IMG Activity.
    Then in Easy Access, you can maintain Master data for Bank Chains under Bank accounting. Note, you can define upto 3 intermediary banks for a bank chain.
    Hope this will help you.
    Thanks,
    Krishna..

  • How to invoke math functions from dbx?

    Is there an easy way to invoke math functions from dbx? If I try, for example, to call sqrt I get meaningless results:
    (dbx) print sqrt(4.0)
    sqrt(4) = 1074790400
    (dbx)
    This is from code which uses sqrt, so sqrt should be accessible. Does this need some kind of cast?

    It turns out that this is a bit different than it looks: dbx is indeed able to invoke functions invoked in this way correctly; dbx just fails to print a sensible return value.
    I tried with the following small function:
    #include <stdio.h>
    int printme(double x) {
    printf("This is %g\n",x);
    return (int)2*x;
    Compiling this without -g, linking this with some hello world program and invoking the function from dbx gives
    (dbx) print ((int (*)(double))printme)(4.0)
    This is 4
    ((int (*)(double)) printme)(4) = &(noname)(double) at 0x8
    (dbx)
    The line "This is 4" clearly indicates that the function has been invoked correctly. Just the printed return value is meaningless. In this case, it is even possible to construct expressions with the return value:
    (dbx) print 5 + ((int (*)(double))printme)(4.0)
    This is 4
    5+((int (*)(double)) printme)(4) = 13
    i.e. dbx "knows" the correct return value 8. This does, however, apparently not work with return values of type double (i.e. in the original sqrt-Example).
    I have therefore submitted a bug report with bugs.sun.com; I will post the BugID when (and if) this has been accepted.

  • Any report or Table to see orders with BP partner functions  in SAP CRM?

    Hello All,
    Could anyone help me  in getting  the table or any report  for orders with BP partner functions in SAP CRM?
    Would appreciate replying at the earliest.
    Cheers
    Sreedhar

    Hello Bruno,
    Thanks very much.
    It is somehow helpful for my need but  not completly. This is ok when the orders are less in number.
    My requirement is how to check the first name , last name and number for  contact persons in a list of  CRM orders(simply who is the contact person for a list of orders).Let me know for any additional info.
    I would apprecaite if you could help me in getting any other way.
    Cheers
    Sreedhar
    Edited by: sreedharhazari2 on Jun 8, 2010 9:18 AM

  • IS IT POSSIBLE TO CALL FUNCTION IN sap QUERY sq01

    IS IT POSSIBLE TO CALL FUNCTION IN sap QUERY sq01

    Use enhancement project SQUE0001 for background downloads of query data.  Use the 'Private File' option with the query execution.

  • Functionality in SAP to allow you to print multiple copies of a form

    I've been asked by a SD functional team member how to: 
    This is the table and field names for  Number of Messages functionality in SAP which should allow you to print multiple copies of a form at one time.
    Program Name:SAPMV13B
    Screen #:0211
    Transparent Table: NACH
    Field Name: ANZAL
    Data Element: NA_ANZAL
    How do I go about setting up this functionalilty?
    Thanks,
    Laurie

    Hi Laurie,
       There are three possible ways -
       1. Predefined number of copies - You can define number of copies in the print parameters while creating condition record. Ask you functional team member how they are setting up condition records. You have an option to setup print parameters on condition record screen. This is the only option if you are using output determination.
       2. If you have an isolated print program then you can choose to let user enter print parameters by using parameter " DIALOG = ' ' " in "open_form".
       3. If you have an isolated print program and do not want to let user control other print parameters you can take input from user ( or hard code ) number of copies and use that in parameter " OPTIONS " in "open_form".
    Cheers,
    Sanjeev

  • Output determination functionality in SAP QM for certificates

    I did not worked on the output determination functionality in Quality certificates function of SAP. Can someone guide me thru that with a very brief on that subject.
    Thanks
    Vineeth

    hi,
    Output Determination is used to provide the output type for your certificate.
    here few of the parameters like condition type, Sold to party, ship to party , Delievery item category and apllication type against which u want the Quality certificate.
    U need to config all those things  SPRO--> Quality Management-> Quality Certificate---> Output determination and start your config according to ur requirement.
    Regards
    Shailendra Gaur
    SAP-QM

  • What advantage does HiQ provide over LabView Math Functions

    I'm evaluating how HiQ can help me to solve engineering modeling problems. I have used LabView to write several DAQ programs and a few programs to numerically solve modeling and simulation problems. What advantage are there to using HiQ compared to the math functions provided in LabView.

    There aren't really any advantages. There are some visualization options that are available in HiQ that would be very difficult in LabVIEW. HiQ is just another option to use, for a different type of interface and programming than is available in LabVIEW.
    Best Regards,
    Chris Matthews
    National Instruments

  • Advanced math functions/libraries

    Are there any more advanced math functions/libraries available for Java (other than in the normal Math class)? Right now I'm looking for something that will rapidly return all the factors of an integer, but I am likely to be interested in other features in the future as well. Thanks.

    Kramis wrote:
    Are there any more advanced math functions/libraries available for Java (other than in the normal Math class)? Right now I'm looking for something that will rapidly return all the factors of an integer, but I am likely to be interested in other features in the future as well. Thanks.Not in the standard classes.
    You could look at the Apache Math library:
    [http://commons.apache.org/math/]
    perhaps it has some number theory methods.
    Or you could look into a Java bridge/interface between existing computer algebra systems (CAS) like Maple, Mathcad (both commercial) or the excellent opensource alternative: Octave. All these CAS have a bridge/interface to Java.

  • Math functions for dates

    Hello,
    Have you ever used a math function for dates (MMDDYYYY) not just a number? I'm looking to send an email out based on date field. For example, if someone's contract expires on 1/1/2016, I'd like to send them out emails 30, 152, 212 and 335 days before that date. Right now, we have fields set up for those 30, 152, 212 and 335 days and would like to know if there's a math function that would automatically fill them in dynamically based on their contract exp. date.
    Thanks for your help and suggestions.

    rmabrey wrote:
    I have the calculator working but I am having trouble figuring out thow to do a square root function, nth factorial, absolute value, and Fibonacci. java.lang.Math.sqrt()
    nothing for factorial - write your own.
    java.lang.Math.abs()
    nothing for Fibonacci - write your own.
    %

  • C99 math functions

    Hello all yet again,
    I'm trying to use the C99 math functions: nearbyint, round, exp2, cbrt, etc... But they don't seem to be defined in the CVI2013 header file.
    I previously would compile them (with gcc) only if __STDC_HOSTED__ was defined, but it appears that, although it doesn't appear in the predefined options listed in the build options, this macro is now defined in CVI2013...
    So if CVI is now C99 compliant, where are those functions ? And if not, how do I know if they are present or not, short of doing #ifdef _CVI_ ?
    Note, the official test seems to be:
    #if _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
    // C99 math functions present
    #endif
    Solved!
    Go to Solution.

    gdargaud wrote:
    So if CVI is now C99 compliant, where are those functions ? And if not, how do I know if they are present or not, short of doing #ifdef _CVI_ ?
    Nobody said so..., see here

Maybe you are looking for

  • Dropdown Custom Field in CATS Time Sheet in ESS

    I have added a custom field in CAT2 transaction with drop down values from the custom table.  When I log on to ESS I was not able to see the dropdown in timesheet for that field. I am able to configure the field to have a search help dialog box. Let

  • How to make BSEG-DMBTR (amt in loc CoCode currency) Optional or mandatory?

    Hi, Normally, the field BSEG-DMBTR is hidden unless you put a value (other than that of the company code currency) in the field BKPF-WAERS  (Document Currency). However, for data conversion purposes, we are uploading an excel file with our open items

  • Views Counts on iWeb Hit Counter

    Is there any way to view the number of counts for a page using the iWeb-provided hit counter without going to the actual published page and thereby 'hitting' the site? My .mac account site provides a hit count for my iWeb pages but only for the top 5

  • A strange problem of using jbuilder6&weblogic6.1 to develop EJB

    I just use jbuilder create an blank EJB, without add anything,then I begin to compile��when it excute "run ejbc on west.jar",there are some errors: "west.ejbgrpx": <2002-5-14 AM 02:46:35> <Warning> <EJB> <EJB Deployment: west has a class www.westBean

  • Howto pack/integrate  j2ee appllication into a portal env?

    Hi, I have some j2ee web application(war file) and i need to integrate it into portal. I dont want to use URL iView, is there any other way how to do it? Is there any possibility to call some class which extends HttpServlet(some description in portal