Change Amount depending on number of decimals for a given currency

Hi All,
I have a requirement to change the amount field based on the number of decimals.
I am using 'BAPI_CURRENCY_GETDECIMALS' to get the number of decimals for the given currency.
I am having an amount field(say 3000.00), that needs to be changed.
In our case, we have to change the amount field if the decimals are less or great than 2.
Eg:
Suppose, if no.of decimals is 2, then the same amount should be returned, i.e., 3000.00.
If the number of decimals is 1, then the amount value should be multiplied by 10, that is 30000.0 should be returned. If the number of decimals is 0, then the amount value should be multiplied by 100, that is 300000 should be returned.
If the number of decimals is 3, then the amount value should be divided by 10, that is 300.000 should be returned. If the number of decimals is 4, then the amount value should be divided by 100, that is 30.0000 should be returned and so on.
Any pointers would be helpful..
Thanks & Regards
Gowthami

Hi All,
This logic works fine for multiplication. But checking conditions for decimals > 2 would involve many conditons.
I think this can be achieved by two ways.
First way is by concatenating number of zeros to 1 depending on decimals and either by dividing or multiplying the values by checking the condition.
Second way is by shifting the decimal point either left or right depending on the decimals.
Please help me in implementing the above.
Thanks & Regards
Gowthami

Similar Messages

  • How to find out  number of includes for a given program dynamically

    Hi all
    I have a requirement in which, I have to find out  number of includes and their names for a given  user defined program dynamically
    if u know the answer pls let me know
    Thanks in advance
    Devi

    Hi rama,
    1. use this FM - RS_GET_ALL_INCLUDES_FOR_PRTAB
    regards,
    amit m .

  • How to find the number of decimals in a given value

    Hi all,
    Can u please help me in solving the problem,
    i have a value called 5987.45
    and decimal places are 45 that is 2 numbers
    2) 765.987
    number of digits in decimals are 3.
    3) 67543.1
    number of digits in decimals are 1.
    for this i need a coding
    thanks.

    Hi,
    While printing your text element give as;
    &wa_tab-dec_value(.2C)&
    This will always print everything with 2 decimals.
    Regards
    Karthik D

  • My iPhone 4S is passcode locked.  Is there a way to use Find My iPhone to remotely change the Passcode Lock number?

    My iPhone 4S is passcode locked.  Is there a way to use Find My iPhone to remotely change the Passcode Lock number?
    Thanks for any advice.

    You cannot remotely undo a remote lock nor remotely unlock it.

  • Conditions in SQVI for amount depending upon the Debitcredit Indicator

    Hello ABAP's
    I am new to this forum & learning. I am using SQVI for getting Information from Table BSEG. The data is getting extracted but I am unable to give any conditions for amount depending upon the Debitcredit Indicator. If it is "H" ie. Credit the Amount should change colour and if it is "S" it should be as it is.Just like in tcode MB51 when we get negative amount the Line is dispalyed in Pink and in case of Positive in Green.
    Looking forward to your help.
    With regards
    Sandy

    Hi Sandesh,
    You can not manipulate data in SQVI. For that you can write a query in infostructures transaction SQ01/02/03.
    1. Go in SQ02, create an infoset and assign it to user-group available.
    2. Inside infoset, declare table BSEG and click on button 'Extras'. here, you can write your code to multply by '-1' to a field depending upon some condition. Select 'Code' tab and code section as 'Record Processing'. Write code in window displayed.
    3. In SQ01, select infoset you just created and select the query.
    Execute the same and you will get required output.
    Let me know if it helps.
    Gouri.

  • Imessage on Mac has my wifes phone number and its greyed out and i cant change it to my number (on the beta version of iMessage for the mac)

    hey-- so iMessage on ONE computer has my wifes phone number in under iMessage and its greyed out and i cant change it to my number.  any ideas?  ive done what people have suggested on these forums, e.g., check your apple id make sure your number is associated with it etc.  how do i change the iMessage number from my wifes to my actual number?  thanks! R

    HI,
    This can depend on the the Apple ID that is used.
    I was under the impression that the invididual parts of an iCloud ID could be "registered" separately for iMessages but this may not be correct.
    I have an Apple ID that is based on a email from a source external to Apple. (an old Dial-up account email)
    I registered this for iCloud and at the time got an @me.com name as well.
    I also have two iPhones so I decided to use the @me.com name on one iPhone and the older Dial-up on the other.
    This seemed to work up to the OS X10.8.2 and iOS 6 updates.
    AT this points I did the OS X one first then the iPhones
    I got alerts in Messages on the Mac to add the Dial-up ID iPhone's number to Messages which I accepted.
    The Messages Menu > Accounts > iMessages showed the iPhone Number as an alternative Receive ID and offered itself in the Drop as the Send from ID.
    I then set up the second iPhone and got an alert in Messages to add the Apple ID and the iPhone number to Messages.
    I said no to this.
    At iOS 6 this did not get added to the Messages > Preferences > Accounts > iMessage panel.
    However at iOS 6.0.2 the iPhones are showing their own Numbers as Greyed out  and even though I refused again the @me.com ID and second iPhone's Number they have been added to the Message Menu > Preferences > Accounts > iMessages pane although they are not ticked.
    The only link these two Apple ID Names have is that they are both associated with the iCloud Account.
    (I Can log in to the same iTunes account with either name, and post here, and access iCloud in a web browser - the password is the same).
    I have successfully managed to get one iPhone to have it's greyed out Number ticked so it can accept iMessages sent to the Number.
    This involved removing the Apple ID on that iPhone, Closing iMessages, restarting iMessages and then re-adding the Apple ID
    I did get an alert to say the ID  would not work anywhere in iMessages when removing it.
    It was 24 hours before I got an alert in Messages again to add the iPhone Number and Apple ID (I said no and they are not active but do show in the iMessage account on the Mac)
    I am a little confused by this bit:-
    ...ONE computer has my wife's phone number in under iMessage and its greyed out ...
    I can see the iPhone Numbers in Messages Menu > Preferences > Accounts >iMessages Account pane but they are not greyed out even when not active
    They are only greyed out on the iPhone's themselves.
    I would also make sure the Apple IDs used on each computer and it's related iPhone are separate from each other.
    9:52 PM      Tuesday; November 27, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How can I change my credit card number for my Adobe ID?

    Hello,
    I'd like to change my credit card number, but Adobe site do not allow this.
    Support chat redirected me to a chinese adobe page (I'm from Hungary, can't read Chinese..), then told me to call local reseller support instead.
    Local reseller support told us that they can't support creative cloud members, they are being dealt with centrally by Adobe.
    Back to chat, describing again what I need to a new agent..
    Got the same chinese page from him as well first, then got the same "call local reseller" advice again.
    After telling the agent that does not work, he gave me a phone number to call: 852 2916 2125, which never answers. And the agent dropped off..
    I haven't been so depressed over a customer support for years.
    Can somebody please help me out on how to change my credit card number for my Adobe ID?
    Thanks for any useful help in advance.

    Ok, found a way:  "under the billing section of your subscription within the My Adobe section of Adobe.com after you login with your Adobe ID "
    But after updating my info with my new (working) credit card (matercard) it says:
    There was a problem in the store. If you wish to complete your purchase immediately, please call 800 0280148.
    And this number than answers 'it cannot be accessed'
    I'd need this done immediately, so please anyone - any ideas ?!
    Thanks.

  • Calculation of change amount for cash payments via cash desk, release 602

    Does anyone know how to get the change amount to calculate for cash payments via cash desk?
    I am only able to enter the amount in each payment type tab and then the payment amount in the summary. The total of the individual payments must add up to the summary payment amount or I get an error.
    How then if a customer wants to pay $20 towards their account and they give me $50 in cash, do I get the change of $30 to display?
    Any assistance would be appreciated as the old version of cash desk had a "given" and "back" field that no longer exist.

    Was not an error, just using the fields the wrong way around. So enter the amount received in the seperate tabs and the amount that is being paid to the account in the summary payment amount field. After you hit post, the change field is filled.
    Is another issue though as if pay by multiple payment types, system allows you to give change greater than the amount of cash received. This should not occur as people could use this process to cash for cheques or credit card payments. Especially an issue as cheque could be returned.

  • Why is there a limit on the number of times a "DVD player region" can be changed, and can it be adjusted for more region changes, or an indefinite number of region changes?

    Why is there a limit on the number of times a "DVD player region" can be changed, and can this numbert be adjusted for more region changes, or an indefinite number of region changes?

    Region encoding is the mechanism that enables motion picture studios to control the worldwide release of their movies. It is required by the DVD Forum (http://www.dvdforum.org/forum.shtml) in all commercial hardware DVD players. Every DVD-Video disc contains one byte of data representing a region code, which limits where the disc can be played.
    http://support.apple.com/kb/HT2397
    Once you have set the region in DVD Player five times it cannot be changed.
    Instead, use VLC to view videos from different regions:
    http://www.videolan.org/vlc/download-macosx.html

  • Hello does anyone knows how to re-enter the decimals for the tempo cause i only have a full number and can't enter a decimal number ?

    hello does anyone knows how to re-enter the decimals for the tempo cause i only have a full number and can't enter a decimal number ?

    Hi
    Go to Preferences:Display and check that you have:
    HTH
    CCT

  • Change Photoshop Elements 11 for windows into Phot now I don't have a windows PC anymore. Can change my windows serial number into a MAC/OS serial number? What do I have to do to get Elements 11(download) for OS an a serial number for Elements 11 for OS ?

    I have Photoshop Elements 11 (full version with Serial Number) for windows; now I don't have a windows PC anymore. Can change my windows serial number into a MAC/OS serial number? What do I have to do to get Elements 11(download) for OS an a serial number for Elements 11 ?

    You can download PSE 11 via the following linked web page:
    PSE 10, 11 - http://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-10-11-downloads.html

  • HT201303 For added security how do you change the iphone security number to stop hacking

    For added security how do you change the iphone security number to stop hacking

    Forgotten security questions - https://discussions.apple.com/message/18402551
    More involved forgotten question issues - https://discussions.apple.com/thread/3961813

  • The phone number and website for my business in iPhone Maps are wrong. How can I change them?

    The phone number and website for my business in iPhone Maps are wrong. How can I change them?

    SEARCH !!
    http://lmgtfy.com/?q=report+a+problem+in+apple+maps

  • Random Number being changed to the same number for all rows

    hello all,
    first of all I want to mention that this problem start happening after 2.14 instalation of Power Query.
    I'm creating new column in my query and setting all values to random numbers. The problem is that next step (doesn't matter what it do itself) somehow changes all those random numbers to the same random number for all lines.
    here's code sample:
    InsertedCustom = Table.AddColumn(RemovedColumns3, "Random Number", each Number.Random()),
        InsertedCustom2 = Table.AddColumn(InsertedCustom, "Analyst Full Name", each [Analyst First Name]&" "&[Analyst Last Name]),
    when I'm checking step by step, InsertedCustom  creates new column and all values are being set randomly for all lines BUT when going to the next step (InsertedCustom2) all values in the column "Random Number" are being changed to the
    same number (no matter that InsertedCustom2 itself should not be doing anything to column named "Random Number") . I even tried moving InsertedCustom step to the bottom of my code but it didn't help and still facing this issue.
    p.s. updated my PQ to 2.15 - didn't help

    This is a known issue. Power Query assumes that functions are idempotent (given the same arguments, they produce the same result), which isn't true for Number.Random. Our optimization pipeline is turning Number.Random() into a constant in the scenario you
    encountered, which results in all rows having the same value.
    There's been some discussion of how to fix this, but that won't help you in the near term. Can you describe a bit more about your scenario and what you're trying to accomplish? Perhaps we can help you find a workaround.
    Ehren

  • Change Ship to party number for outbound delivery

    Hi guys
    I have a problem 
    We need to change Ship to party number for outbound delivery
    Any suggestions
    Any Table level changes posibility???
    Thanks
    SAP MM

    Hi,
    You cannot change the ship to party in delivery, nor should you change it.
    If you really want to change the SH in delivery, please delete the delivery (after cancelling the picking) and then go to sales order in change mode and then change the ship to party there. After doing this, create the delivery once again with the new SH.
    It is not advisable even through programatically to change SH in delivery. This will have lot of implications in the further processes like PGI, Proof of Delivery and so on.

Maybe you are looking for