Conversion of book dimension from decimal to fraction

Hi,
I am a crystal report developer and new to SAP R3 environment.  I am creating reports with SAP BW queries as source.  I am working for a publishing client.  They are storing the material (Book) details in the SAP system (Material table).   SAP has a provision to capture physical properties of the book like width, height and thickness.  They are entering details upto 3 decimal places precision in inches or in specified unit of measure. 
When some extracts are generated from SAP System the values like 10.380 is converted as 10-3/8.  But the actual 10-3/8 value is 10.375.  The rounding is not uniform when I checked with few other values.  I came to know from SAP experts these conversion are happened in an IDOC.  I don't know much about this.
Can anyone help me in this conversion logic.  Since I have to implement the same in my Crystal report.  My BW query is just giving it in the decimals, my users are interested in seeing it as fraction since the other exports from SAP is showing it in fraction.
Thanks and Regards,
Subbu S.

In the user exit of Outbound Idoc, they might have used some custom logic to implement the given logic.
It may vary on other factors as well. In your case, that should be verified or cross checked in your system only.
For converting the decimal to fraction in SAP, you can refer the below function module.
'CONVERT_TO_FRACTION'

Similar Messages

  • I want to convert from decimal (5, 2) to decimal (3,0) in data services

    Hi All,
    I want to convert from decimal (5, 2) to decimal (3,0) in data services.
    if anybody knows please let me know with syntax.

    https://scn.sap.com/community/data-services/blog/2013/06/12/conversion-functions-in-bods-with-examplespart3
    https://scn.sap.com/community/data-services/blog/2013/06/12/conversion-function-in-bods-with-examplespart3

  • C++, issues with converting a decimal to fraction

    Hi all,
    I am working on a C++ program that converts a decimal to a fraction, finds the lowest common multiple, multiplies the numerator by the denominator, then reduces the fraction again so the fraction will be 'numerator/1'. 
    I am using this code in a larger program to change a floating point slope value to a whole value for slope-intercept equations and standard form equations.
    The program will run but I tested almost 500 numbers and 20 numbers made the program crash (it stalled and did not finish the equation, I had to close the terminal and open it up again... )
    These 20 numbers I had problems with:
    2.36,  7.36,  1.11,  1.001,  1.66,  1.88,  2.22,  2.13,  3.24,  3,26,  3.32,  3.43,  3.49,  3.51,  3.57,  3.68,  3.74,  3.76,  3.82 
    (I am sure there are more...)
    I have tried c-style casting and dynamic and static casting to try to resolve this issue. Can someone help me out and point out why these certain numbers make the program crash and offer a possible sloution?
    I tried debugging this program on gdb and keep on getting this frustrating message..
    (gdb) break 16
    No line 16 in file "init.c".
    (gdb)
    Here is the program's code:
    //example.cc
    #include <iostream>
    #include "reduce.h"
    #include "decimal-to-fraction.h"
    using namespace std;
    int main()
    double deci;
    double n, d;
    while(1) {
    cout << "Enter a decimal to convert to a fraction ('0' to quit): ";
    cin >> deci;
    cin.ignore(INT_MAX, '\n');
    if(!deci) exit(0);
    dec_to_frac(deci, n, d);
    if (n * d != n){
    cout << '\n' << deci << " = " << n << '/' << d << "\n\n";
    cout<<'\n' << d << " x " << n;
    n = d * n;
    cout<< " = " << n << "\n\n";
    cout<<'\n' << n << '/' << d;
    reduce(n, d);
    cout << " = " << n << '/' << d << "\n\n";
    cout<<'\n' << n << "\n\n";
    else
    cout<<'\n' << deci<< "\n\n";
    return 0;
    #ifndef _REDUCE_H_
    #error You must include "reduce.h" before this file
    #endif /* def _REDUCE_H_ */
    #ifndef _DECIMAL_TO_FRACTION_H_
    #define _DECIMAL_TO_FRACTION_H_
    void dec_to_frac(double decimal, double &numerator, double &denominator)
    //numerator = static_cast<int >(decimal);
    //numerator = (int )decimal;
    numerator = decimal;
    denominator = 1;
    while(numerator != (int)numerator) {
    numerator *= 10;
    denominator *= 10;
    reduce(numerator, denominator);
    #endif /* def _DECIMAL_TO_FRACTION_H_ */
    #ifndef _REDUCE_H_
    #define _REDUCE_H_
    void reduce(double &numer, double &denom)
    int i;
    for(i=2; i<=numer; ++i) {
    if( ((numer/i) == ((int )(numer/i))) && ((denom/i) == ((int)(denom/i))) ) {
    numer /= i;
    denom /= i;
    --i;
    #endif /* def _REDUCE_H_ */

    Okay, a few things ('cause I'm picky too):  LCM == "least common multiple" or "lowest common multiple", it's really interchangable.  LCD == lowest common denominator, which is when you're adding two fractions and want to find the lowest denom.  Now that we have that out of the way...
    Using ++i or i++ as the third expression in your for loop will make zero difference. 
    for (int i=2; i<=numer; ++i)
    will have exactly the same effect as
    for (int i=2; i<=numer; i++)
    , though they may have slightly different performances.  The reason for this is that the third expression (i++ or ++i) is evaluated after every iteration of the loop, meaning it doesn't happen until the end of the loop body is reached, and then it's evaluated independently, meaning all you end up with is 'i' incrementing.
    As for this:
    if( ((numer/i) == ((int )(numer/i))) && ((denom/i) == ((int)(denom/i))) ) {
    becomes
    if (numer % i == denom % i == 0) {
    That's about right, it would look more like
    if (numer %i == 0 && denom % i == 0)
    - the other way would probably not behave the way you expect.
    Some other tips:
    numer and denom should be 'int' or 'long' - not double.  You don't expect your numerator and denominator to have decimal points, so use integral types - using floating point 'double's is likely what's getting you into this trouble -- floating point arithmetic is inherently imprecise.  You might have better luck parsing the input yourself and constructing the numerator from that instead of reading directly into a floating-point number.
    I'm hacking around with your code right now for fun; I'll let you know if I find anything.
    ==edit==
    Oh, something else I wanted to mention; to break on a line in gdb you type:
    break filename:linenumber
    ie.
    break example.cc:16
    Last edited by Cerebral (2007-06-03 02:43:42)

  • How to Delete the dimension from the cube ?

    Hi ,
    how to Delete the dimension from the cube ?
    i have added the new dimension by assiging one characteristic to that dimension .
    now i  want to delete it ,
    but system saying that   Dimension ZXXX  contains InfoObjects; deletion not possible .
    how to delete it ? any help .
    Thanks

    Make sure you donot have any data in cube. If you have some data in cube, then you will not be able to see Delete option.
    Right click on the cube-->Delete data.
    Then double click on the cube>Goto Edit mode> select the IO under that Dimension> right click> now you will be able to see the Delete option (provided you have deleted all the date from Cube)
    Then right click on Dimension-->Delete
    Regards,
    Pavan

  • HT201456 I have tried to install Windows 8.1 64 on my new Mac Book Pro from a full install disc.

    I have tried to install Windows 8.1 64 on my new Mac Book Pro from a full install disc. When I get the the choice of partitions to install Windows 8.1 on the Windows installer says that the Bootcamp partition is not valid.
    Has anyone encountered the same issue?

    BCA creates the partition as FAT, which the installer needs to format.
    Please see https://help.apple.com/bootcamp/mac/5.0/help/#/bcmp173b3bf2 for reference. Where does it break in your case?

  • How to update my mac book pro from 10.5.8 to the leatest version

    how to update my mac book pro from 10.5.8 to the leatest version

    Upgrading to Snow Leopard, Lion, or Mountain Lion
    Upgrading to Snow Leopard
    You can purchase Snow Leopard by contacting Customer Service: Contacting Apple for support and service - this includes international calling numbers. The price is $19.99 plus tax. You will receive physical media - DVD - by mail.
    Third-party sources for Snow Leopard are:
    Snow Leopard from Amazon.com
    Snow Leopard from eBay
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store.
    Before upgrading check that you computer meets the minimum requirements:
    Snow Leopard General requirements
      1. Mac computer with an Intel processor
      2. 1GB of memory
      3. 5GB of available disk space
      4. DVD drive for installation
      5. Some features require a compatible Internet service provider; fees may
          apply.
      6. Some features require Apple’s MobileMe service; fees and terms apply.
    Upgrading to Lion
    First, you need to upgrade to Snow Leopard 10.6.8 as stated above.
    You can purchase Lion by contacting Customer Service: Contacting Apple for support and service - this includes international calling numbers. The cost is $19.99 (as it was before) plus tax.  It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
    Before upgrading check that you computer meets the minimum requirements:
    Lion System Requirements
      1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or
          Xeon processor
      2. 2GB of memory
      3. OS X v10.6.6 or later (v10.6.8 recommended)
      4. 7GB of available space
      5. Some features require an Apple ID; terms apply.
    Upgrading to Mountain Lion
    Be sure your computer meets the minimum requirements:
    Apple - OS X Mountain Lion - Read the technical specifications.
    Macs that can be upgraded to OS X Mountain Lion
      1. iMac (Mid 2007 or newer)
      2. MacBook (Late 2008 Aluminum, or Early 2009 or newer)
      3. MacBook Pro (Mid/Late 2007 or newer)
      4. MacBook Air (Late 2008 or newer)
      5. Mac mini (Early 2009 or newer)
      6. Mac Pro (Early 2008 or newer)
      7. Xserve (Early 2009)
    Are my applications compatible?
    See App Compatibility Table - RoaringApps - App compatibility and feature support for OS X & iOS.
    Am I eligible for the free upgrade?
    See Apple - Free OS X Mountain Lion upgrade Program.
    For a complete How-To introduction from Apple see Apple - Upgrade your Mac to OS X Mountain Lion.

  • Webi report: Issue Cannot retrieve dimensions from Cube

    Hello Experts,  We're facing an issue with a partical set of Webi reports in Quality environment. The reports are BW reports based on OLAP BICS connectivity on top of Bex queries.y  Below is the scenario and the issue:  1. The backed Bex queries have been trasported to Quality BW system and they're running fine when run from RSRT or Bex analyzer. 2.The Webi reports along with the BICS connections have been migrated to the Quality box and the BICS connections have been editied so that they point to the Quality BOX bex queries and they're testing and responding to the connection successfully. 3. The Webi reports pointed to the Dev Box in the Dev BOBJ system are working fine, but when the same reports for which the connections were repointed in Quality as above, are giving the error "Cannot Retrieve Dimensions from Cube".  Steps taken: a. Deleted the reports and the BICS connection from Quality environment and remigrated the reports,connecitons and changed the connecitons but still the issue persists. b.Tried finding the root cause and got the following issue in the Bex query in Quality: There are filters put in the Bex query . All other filters are working fine except 0CALMONTH. We tried putting all sorts of variables on 0CALMONTH, but the moment a variable is put on 0CALMONTH, this issue occurs. But when we tried removing the variable from 0CALMONTH in filters and restricted it to a single value, the Report works fine.  However the same is not an issue in the Dev Box and all queries with similar variables are working fine.  So we're thinking this might be an issue on the BW backend and the cube might have to be transported again to the Quality Box.  ANy quick suggestions or inputs on this would be greatly appreciated.  Thanks and regards, Abhishek

    Hi Abhishek,
    I am facing same issue.Have you resolve this issue?
    Regards,
    Rajesh

  • Lost Mail and Address Book ikons from HD

    Preparing to upgrade to Tiger OX 10 from Panther. Recommended backup all vital info. In transfer process, both Mail and Address Book ikons from HD to backup Superdisk repeatedly came up Error 50. Only success was to lose both ikons from HD and Question Mark on Address Book in dock rendering it useless. Now have Mail and a Mail copy ikon on Desktop that will not open. Likewise an Address Book ikon and four copies on Desktop that will not open. Fortunate that Mail ikon in Dock still operates allowing acess to Mail and Address Book on Mail site.
    Would like to move forward. Help for an average computer user would be greatly appreciated.

    Sorry for the delayed response to your e-mail. Thank you very much for taking the time to addressing my problem.
    After posting the question the hard drive further deteriorated to the point where the computer became inoperative. Ended up with a new computer and a major challenge in transferring info from old to new computer. After a long day with two friends and computer programmers by day, we succeeded in retrieving and transferring the info. Whee!
    Thanks again for taking the time to address my question.

  • After upgrading to Photos, how can I work on a Book Project from another apple device?

    After upgrading to Photos, how can I work on a Book Project from another apple device?

    I'm not sure I understand what you are asking, but on the device/Settings, do you have iCloud and Photos sync turned on?

  • How to transfer iBooks books & PDFs from old iPad to new iPad?

    (Well, it seems my title got truncated; originally it read: How to transfer iBooks books & PDFs from old iPad to new iPad?)
    I've recently gotten an iPad Air to replace my previous iPad 2. I have a bunch of books and PDFs in iBooks on the old iPad, and want to transfer them to the new iPad.
    A search of Apple Support informs me that anything I've purchased from iBooks can be downloaded at any time to any of my devices (works like Amazon's Kindle system, apparently), but nearly all the content I have in iBooks on the iPad I've downloaded from other sources, so it won't be in my iBooks Store account (I might have bought one book there).
    I've also seen several instructions on how to copy all my data from the old iPad to the new via Backup & Restore, but that seems to require restoring the new iPad to factory setup, which would delete everything I have on it now – including a bunch more books I've gotten since I started using the new iPad. And I don't want to copy everything, only the books/PDFs (the new iPad has everything I want, except for the books).
    Since there seems to be no way to transfer files directly from one iPad to the other, it seems it must be done via iTunes on my MacBook Pro (and I want to copy all the books/PDFs to the computer anyway). So I connected the iPad 2 to my MacBook Pro (OS X 10.9.4) and opened iTunes (11.3.1). Then clicked on the iPad's name in the sidebar to the left, and on Books below it. I see a list of the books on the iPad. I check the little boxes by all their names to select them (not sure if that's necessary, but it seems like a good idea), then click on the Sync button at the lower right, to the right of the bar at the bottom of the window with colored bands showing memory usage on the iPad. A message appears saying "The app 'iBooks' was not installed on the iPad '[name]' because the app could not be found."
    But iBooks is already on the iPad; I have it open and see the list of books in it, which matches the list shown in iTunes. The message has a "More Information" button; I click that and it opens an Apple Support article titled "iOS: An app you installed unexpectedly quits, stops responding, or won’t open": "Learn what to do if you see one of these issues with an app you downloaded from the App Store on your iPhone, iPad, or iPod touch: The app unexpectedly quits; The app stops responding; You can’t open the app." But none of these apply; the iBooks app is on the iPad, and works fine there.
    The article suggests: (1) Restart the App. I've done that, no help. (2) Restart your device. Done that, no help. (3) Update your device software and your apps. The iPad is running iOS 6.1.3, iBooks 3.1.3; not the latest versions, no, but I'd rather not update it to newer, bigger, more power-hungry versions if I don't have to. Is it that iTunes 11 doesn't work with iOS 6? I haven't seen this stated anywhere.
    So instead I click the OK button on the message, but nothing further happens, so far as I can tell: None of the books/PDFs on the iPad (about 380MB) appear in iBooks on the MacBook Pro.
    I click on "Books" in the row of words across the top of the iTunes window, and it shows me the single PDF presently in iBooks on the MacBook Pro. I click the box by "Sync Books", and a message appears: "Are you sure you want to remove existing music, movies, TV shows, books, and tones from this iPad and sync with this iTunes library?" Well, no, that's exactly what I DON'T want to do. I don't want to erase the 380MB of books and PDFs on the iPad and replace them with the single PDF now in iBooks on the MacBook Pro. I want to copy the books from the iPad 2 to iTunes, so I can copy them back to the new iPad Air (if, God willing, I can figure out how to do that without erasing the books now on the iPad Air).
    I've been working with Macintosh computers for over 26 years. It's always been a fairly simple process to copy files from one computer to another. I don't want to "sync" all the data (address book, email, God knows what else) on the iPad with the corresponding information on the MacBook Pro – especially if that will erase everything on the iPad (which has information not on the MacBook Pro, e.g. 380MB of books). I just want to copy the books and PDFs in iBooks from the old iPad to the MacBook Pro, then to the new iPad, adding them to the books on the new iPad, so I don't lose anything.
    Can anybody give me a clue?

    How to Transfer Everything from an Old iPad to New iPad
    http://osxdaily.com/2012/03/16/transfer-old-ipad-to-new-ipad/
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    http://support.apple.com/kb/HT2109
    Moving Content to a New iPad
    http://tinyurl.com/qzk2a26
    How to Transfer App Data and Game Saves from One iOS Device to Another
    http://lifehacker.com/5891964/can-i-transfer-app-data-and-game-saves-from-my-iph one-to-a-new-ipad
    How to transfer data from your old iPad to your new iPad
    http://www.imore.com/how-transfer-data-your-old-ipad-your-new-ipad-air-or-retina -ipad-mini
    Transferring your prepaid cellular data account depends on your carrier. AT&T lets you move it yourself when you go to Cellular Data in Settings and log into your account with your previous AT&T user name and password. For iPads with Sprint service, you can set up an account on the new iPad and contact Sprint Customer Care (888-211-4727 and go through the menus) to deactivate the old plan and get credit for unused service. For Verizon, call the company’s customer service number for mobile broadband support (800-786-8419) and ask to have your account transferred.
     Cheers, Tom

  • How do I fix my mac book Pro  from running slow?

    How do I fix my mac book Pro  from running slow?

    Why is my computer slow?
    Step by Step to fix your Mac

  • I got a Mac Book Pro from my company, and I can't update the apps because they are registered to another Apple ID.  Is there a way to change this so I can update my Apps?

    As it says, I got a Mac Book Pro from my company and I would like to update the apps on it.  They are registered to a former employee's Apple ID, is there anyway for me to change it to my Apple ID?  Or do all of the Apps need to be re-purchased?

    Welcome to the Apple Support Communities
    You must repurchase the applications because you can't transfer programs from an Apple ID to another one

  • My iPhone is stolen. How can I get my address book back from the iCloud? I should have synchronized my iPad address book. However, I loss some recent contacts from iPhone.

    My iPhone is stolen. How can I get my address book back from the iCloud? I should have synchronized my iPad address book. However, I loss some recent contacts from iPhone.

    I use my iPad to get the address book backed up by iCloud from my iPhone. However, I cannot see the recent new contacts from my iPad. Is there anyway to check the iCloud server to see if my address book backup from my iPhone is still there?

  • Why can't I read books purchased from itunes on my macbook pro?

    I find it very upsetting that books purchased from itunes on a Macbook pro can not be read on a Macbook Pro.

    Many MacBook Pro users are professional authors, reseachers, teachers, ... and we need to manage large libraries of copy protected digital material (journals, book collections, protected imagery, ...) , which we directly reference and include (with citations) in our writing and analyses.
    Laptops and desktops are the only viable options in terms of screen real estate (multiple monitors needed), application availability (image analytics, serious statistics, real 2D and 3D modeling, ...) high speed storage attachment (the cloud can't handle many needs) and processing horse power. iPads and iPhones are a few generations away from being adequate for many such activities, which Apple had traditionally supported.
    This particular oversight by the  folks behind the Apple iTunes bookstore business, stands in stark contrast to what used to be our vision of the premier professional creative platfom. I find this deeply dissappointing and inconsiderate of our long term investment in apple technologies.
    Asking folks to simply abandon their investment in copy protected ebook material, purchased on iTunes, is just wrong.

  • Access Address Book data from terminal

    Hi everyone,
    I was wondering if there is a way to access Address Book data from the terminal. For instance, I would
    need a command that would output an address of a given person.
    Thanks in advance for your input

    this script could be used in Terminal (save the code below as
    "getaddress" and mark it as executable):
    case $# in
    2) firstname=$1; lastname=$2;;
    *) echo 'Usage: getaddress <firstname> <lastname>' 1>&2; exit 1 ;;
    esac
    count=`osascript -e "tell application \"Address Book\" to count (people whose first name is \"${firstname}\" and last name is \"${lastname}\")"`
    case $count in
    0) echo "$firstname $lastname is not in Address Book." 1>&2; exit 1;;
    1) ;;
    *) echo "There are multiple entries for $firstname $lastname in Address Book (unhandled error)." 1>&2; exit 1;;
    esac
    osascript -e "tell application \"Address Book\" to get formatted address of address of first person whose first name is \"${firstname}\" and last name is \"${lastname}\""
    Message was edited by: jazzy79

Maybe you are looking for

  • I suddenly can't connect to printer on wireless home network.

    I have an Officjet Pro L7680 and we just had a new cable company installation in our house. We have 1 desktop and 2 laptops. All three share this printer and we had no problems. Since the install, 1 laptop won't connect to the printer. The cable co.

  • Download link in Answers

    Hi, When you run a report in Answers, you can have the "Download" link at the bottom of the Page. Which privilege grants the option, so when a user runs a report, he can "Download" it to Excel, PowerPoint etc.? Thanks, rkingmdu

  • Creating array of buttons

    I'm trying to create an array of buttons, but I keep getting a npe Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl<Container.java:1031> at java.awt.Container.add<container.Java:352> at ButtonArray.main<ButtonAr

  • Using system resource to redirect class loading

    It seems to be an open secret that the JVM can be manipulated to load classes (or packages?) from alternate locations. Take, for example, this excerpt from a SAX user guide:      In case your Java environment did not arrange for a compiled-in default

  • Soft Keys not lighting up

    The soft keys (settings, home, back and search buttons) at the bottom of the phone are not lighting up in portrait mode.  I can sometimes get them to turn on when my phone goes into landscape mode, but never in portrait. Is anyone else having this pr