Program or FM to convert number of days into a CalDay format (ddmmyyy)

Hi ABAP friends,
I input calendar day values via a popup calendar from a spreadsheet to BW. So, the values that are populated in BW are the numbers, and not the date.
For ex. when user selects a calendar day for ex. 11-April-2010, the value in excel is stored as 40279 (which is the number of days starting from 01-Jan-1900) and this is the value that gets stored in BW once we save the data.
I'm looking for a function module or method or whatever that converts the above number (40279) into CalDay and writes it to the 0CALDAY infoobject ???
Please help,
Thanks,
Venkat

Thanks Pranaam.
Two things:
1. I cannot find this FM. It says FM doesn't exist. SE37 -->  HR_HK_DIFF_BT_2_DATES
2. My requirement is actually reverse as you explained. I can certainly hard code the starting date: 01011900, but here the input should be the number of days. and I need the date (date2 in your ex.) based on the no. of days entered.
I found another FM which does exist in my BW system. That is: FIMA_DAYS_AND_MONTHS_AND_YEARS
Based on "From" & "To" dates, it outputs the number of days.
But my requirement is:
Based on the starting date (i.e. always 01011900) and number of days, it should give me the "To" date value.

Similar Messages

  • Convert number of dayes per year to data

    Please i need help in Convert number of dayes to date
    I have ID's like id
    FT*09025*0000000001 date=20090125
    FT*01171*0000000002 date=20100620
    so should convert first five number after FT to date
    example *09025*
    09 map to 2009
    025 number of dayes per year map to 25 jan
    example *01171*
    01 map to 2010
    171 number of dayes per year map to 20 jun
    (jan+feb+mar+apr+may)=(31+28+31+30+31)=151
    171-151=20 for the next month
    Please need help so will added filter to informatica map with date
    Edited by: user8929623 on Jul 4, 2010 7:04 PM

    Well, I do not follow why when 09 maps into 2009, 01 maps into 2010, not into 2001. Assuming it should be 2001, use YYDDD format:
    SQL> with t as (
      2             select 'FT*09025*0000000001' id from dual union all
      3             select 'FT*01171*0000000002' from dual
      4            )
      5  select  to_date(substr(id,4,5),'yyddd') dt
      6    from  t
      7  /
    DT
    20090125
    20010620
    SQL> SY.

  • Function module which convert number to days to date

    Hi,
    Any one knows any function module which convert total number of days into date.
    thnaks,
    shilpa k

    Hi,
        FIMA_DAYS_AND_MONTHS_AND_YEARS
    FI_PSO_DAYS_MONTHS_YEARS_GET
    RSSM_CONVERT_DAYSEC2TIMESTAMP
    RSSM_CONVERT_TIMESTAMP2DAYSEC
    Function Modules related to Date and Time Calculations
    DATE_COMPUTE_DAY : Returns weekday for a date
    DATE_GET_WEEK : Returns week for a date
    DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
    MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
    END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
    HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
    FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
    MONTH_NAMES_GET : Get the names of the month
    WEEK_GET_FIRST_DAY : Get the first day of the week
    HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
    SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
    L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
    HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
    LAST_DAY_OF_MONTHS : Returns the last day of the month
    Regards

  • Used to convert all my videos into iPhone mp4 format using Any Video Converter - then add it to my iPhone 3GS. But last few days, I cant add video files to iTunes. and the iTunes doesnt even specify the reason except for that "files are not supported"

    Everyting was perfect earlier. Used to convert all my videos into iPhone mp4 format using Any Video Converter - then add it to my iPhone 3GS. But last few days, I cant add video files to iTunes. and the iTunes doesnt even specify the reason except for that "files are not supported"
    Everything is fine.
    -They are the right format
    -Quicktime is updated
    -I have tried simply dragging them into the 'movie' library
    -I have tried going to file<add file to library
    Nothing works, has anyone else had this problem and found a way around it?
    Any and all help appreciated.

    In addition to Mike's suggestions,  you only have 4GB of RAM and Mavericks does use more RAM than other versions. You may also want to look at the apps that startup on login and the possiblity of upgrading RAM.

  • How to convert a word document into the PDF format?

    Please instruct me step by step on how to convert several Word documents into the PDF format?

    If properly installed and updated (depending on the WORD version), you can simply do any of the following:
    1. Open the doc in WORD and select Print, choose the Adobe PDF printer, print.
    2. Open the doc in WORD and go to the Acrobat menu in WORD and select create PDF (this uses PDF Maker).
    3. Open the doc in Acrobat and the conversion should be done based on PDF Maker.

  • How can I convert a Word document into Adobe PDF format?

    How can I convert a Word document into Adobe PDF format?

    You can use Adobe Acrobat or Adobe CreatePDF.

  • How can you convert a PDF File into a picture format for uploading?

    How can you convert a PDF File into a picture format for uploading?

    If you have Acrobat 11, you'd select: File > Save As Other > Image
    and select one of the available image formats.

  • How to Convert Analog Music Recordings into a Digital Format

    I am relatively new to Mac computing and would really like to convert my older LP records into a digital format so I can listen to them via an IPod or CD player.
    I need to know the basics and what I would need to be successful. Can anyone help?

    Hi Kcv
    no prob's!
    so for the interface, well it really depends on a few factors:
    1. your budget
    2. what else you will be using it for (e.g. will you be making/creating music using Garageband or perhaps any audio creation program in he future?)
    3. the portability of the interface.
    4. Whether you really need firewire (relates to 2.)
    Needless to say, the more you spend the better the quality and vice versa. However, if you're thinking of only transfering vinyl to digital then the imic will suffice. However, i found a few others that might give you a few more choices. I can't vouch for their quality - but the manufacturers are all reputable in the world of semi-pro audio.
    1. http://www.dv247.com/invt/30313/ Edirol UA-1EX (USB around £25 - sorry i'm London based so am not sure what that is i canadian dollars but am sure it will be better than the price if you convert it yourself)
    2. http://www.dv247.com/invt/32730/ Behringer UCA202 (also USB and around £24)
    3. http://www.dv247.com/invt/30207/ Behringer FCA202 (cheapest firewire interface i've ever seen similar price to the above)
    If you anticipate using Garageband or another program to make music then i'd recommend getting a firewire interface and spending more.
    the imic seems cheaper than the rest and i'm sure will do the job just fine.
    As for where you can purchase it. Just did a quick google and came up with www.vibecomputers.com selling the imic at about $41 canadian and FrontierPC selling the imic at $50 CDN.
    If you choose another product look for a computer or audio equipment retailer.
    Cool.
    Hope that helps. By the way if you feel any of the posts in this thread have helped feel free to award stars appropriately.
    If you have any more questions feel free to ask!
    Rounik

  • Quicktime does not convert my .MOV file into a watchable format on Quicktime

    Hi guys!
    I won't give you all a long sob story but basically, I went to my first music festival over the weekend and uploaded my videos onto my friends computer, I then uploaded these videos (i took with my iPhone) to Google Drive. When i got back onto my own computer, I download the .MOV files from Google Drive, these videos would not convert into a watchable format. It gives me the message -
    "QuickTime Player can't open "IMG_8788.MOV". To see if additional software is available that will enable QuickTime Player to open the movie, click Tell Me More."
    It says that Quicktime should support MOV files. I am using version 10.3 Quicktime player with iOS Mavericks. I really want help with this issue as I will be devastated if these videos are lost. My friend obviously deleted them off his computer because they did take up alot of space!

    I won't give you all a long sob story but basically, I went to my first music festival over the weekend and uploaded my videos onto my friends computer, I then uploaded these videos (i took with my iPhone) to Google Drive. When i got back onto my own computer, I download the .MOV files from Google Drive, these videos would not convert into a watchable format. It gives me the message -
    "QuickTime Player can't open "IMG_8788.MOV". To see if additional software is available that will enable QuickTime Player to open the movie, click Tell Me More."
    It says that Quicktime should support MOV files. I am using version 10.3 Quicktime player with iOS Mavericks. I really want help with this issue as I will be devastated if these videos are lost. My friend obviously deleted them off his computer because they did take up alot of space!
    iPhone recorded files should already be compatible QT X v10.3 (and QL) as is in the MOV file container. However, the process of downloading, uploading, and again downloading the files may have created some sort of issue causing QT X to not properly "recognize" the content and thus, wants you to check for additional support.
    In any case, will the files open in any other media players? (E.g., VLC, MPlayerX, NicePlayer, QT 7, MPEG Streamclip, etc.) For instance, if the files open in QT 7 Pro, MPEG Streamclip, or VLC, you may be able to copy the data to a new MOV file container which QT X will open and play. (I.e., this procedure does not recompress the data and is reasonable quick. Also not sure if using the "Command-D" Finder option to "duplicate" the file will create a "readable" file or not but you might try it.)

  • To convert a crystal report into word(*.doc) format

    Dear members,
    I have designed and generated a report using crystal as tool,but
    i want to convert this report into Microsoft word format(*.doc).
    Can anybody please help me in this regard?
    Thanks and regards,
    Venkatesh.R

    Hi
    Simple way is to you use Cristal Reports Designer: you can use CR Report convertion function.
    File/Export/Export Report... choose Word Document (rtf) modificable what can be opened with Word and saved how Word Document (.doc).
    Other way:
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Dim CrxReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
    CrxReport.ExportToDisk(CrystalDecisions.[Shared].ExportFormatType.RichText, _
                                        "c:\open_me_with_word.rtf")
    HTH
    Regards
    Sierdna S.
    Edited by: Sierdna S on Sep 24, 2008 12:49 PM

  • Converting the DATE(yyyymmdd) into MONTH(yyyymm) format

    HAI
    I have one date InfoObject(ZDATE) in the format of YYYYMMDD format.
    My client wants another 'Month InfoObject(ZMONTH) in the format of YYYYMM . This ZMONTH infoobject should be derived from ZDATE.
    So please tell me how can i convert the ZDATE data into ZMONTH format.
    I think , it is possible by writing the ABAP code.
    Please give the ABAP CODE for converting the ZDATE data into ZMONTH format also .
    i wll assing the points
    bye
    rizwan

    Hi Rizwan,
    You can use offset like:
    zmonth = zdate+0(6)
    Zmonth is variable in which yyyymm is going to be stored
    and zdate is variable in which yyyymmdd is stored.
    I think this will slove your issue.
    Thanks=points

  • Converting numeric level identifier into Parent/Child format to load.

    I am unable to receive meta data in parent child format from a ERP source system and need to load these into Planning through ODI. Each member is identified with a numeric level indicator. Is there any wasy to convert this into Parent/Child format using the level indicator?
    Thank you.

    If you are using oracle you could look into using the "Connect by prior" function.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Converting a number of  frames into smpte timecode format

    Hi all,
    I've been thinking about this for a while but don't think I've come up with a good solution just yet. So I wanted to see if anybody could show me a swift and efficient way.
    The problem:
    A given number of frames is to be translated into the corresponding smpte timecode. A single frame lasts 1/25th of a second.
    So, for example: the timecode 01:30:12:24 (hh:mm:ss:ff) translates to 24+(12*25)+(30*60*25)+(1*60*60*25) = 135324 frames. As you see it's very simple to break it down into frames. But how would you reverse the procedure?
    I have two ideas, the first was to subtract from the sum of frames until i have broken it down completely. That seems to involve quite a complicated if structure but I guess it's a reasonably fast way. Next I had the idea that I could iterate through the whole lot and on every 25th iteration step up the seconds variable, and when it reached 60 step up the minute variable and so forth. I do have doubts about the efficiency of that particular code though as this will be a very frequent task in my application.
    My guess is the best and only real option is to go with the former idea, but I want to make sure I am not missing a super simple and elegant way of doing this.
    Thanks,
    Johan

    You can slightly simplify the calculation with:
    01:30:12:24 (hh:mm:ss:ff)  = 24+(12*25)+(30*60*25)+(1*60*60*25)
    = 25 * (60 * (60 * 1 + 30) + 12) + 24
                  --minutes--
            ------- seconds -------
       ------------- frames -------------
    Notice how we multiply by 25, then 60, then 60 again Working from inside the brackets to the outside we multiply by 60, then 60 again then 25, adding some "extra" each time.
    This also suggests how you might "reverse" the process. Start with 135324 and begin at the left hand end. If we divide by 25 we get 5412 seconds with 24 frames "left over". 24 is the ff.
    We can then divide the 5412 seconds by the 60 to get 90 minutes with 12 seconds "left over". 12 is the ss.
    Divide 90 by the next 60 to get 1 hour and 30 remainder. 30 is the mm.
    There are no more numbers to divide by so we take the 1 as hh.
    Look up the integer operators: / which does division, and % which tells you how much is left over. Basically the division is what you were getting at when you spoke of "subtract from the sum of frames", but more effecient than repeated subtraction.
    Edited by: pbrockway2 on Aug 2, 2008 9:58 PM

  • How can I convert OPENGL canvas graphics into bitmap image format.

    I used the following code... but no conversion made... plz tell the write way..
    public static void savePaintingJPG(GLCanvas canvas, String fileName) {
            // saves the content of the 'panel' in a file 'file'.jpg
            String name = "";
    int framewidth = canvas.getSize().width; // get the canvas' dimensions
    int frameheight = canvas.getSize().height;
    System.out.println(framewidth);
    System.out.println(frameheight);
      java.nio.ByteBuffer pixelsRGB = BufferUtils.newByteBuffer(framewidth * frameheight * 3); // create a ByteBuffer to hold the image data
    GL gl = canvas.getGL(); // acquire our GL Object
          // read the Frame back into our ByteBuffer
    gl.glReadBuffer(GL.GL_BACK);
    gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, 1);
    gl.glReadPixels(0, 0, framewidth, frameheight, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, pixelsRGB);
    int[] pixelInts = new int[framewidth * frameheight*3];       // Convert RGB bytes to ARGB ints with no transparency. Flip image vertically by reading the
         // rows of pixels in the byte buffer in reverse - (0,0) is at bottom left in OpenGL.
    int p = framewidth * frameheight * 3; // Points to first byte (red) in each row.
         int q;   // Index into ByteBuffer
      int i = 0;   // Index into target int[]
      int w3 = framewidth*3;    // Number of bytes in each row
      for (int row = 0; row < frameheight; row++) {
        p -= w3;
        q = p;
        for (int col = 0; col < framewidth; col++) {
          int iR = pixelsRGB.get(q++);
          int iG = pixelsRGB.get(q++);
          int iB = pixelsRGB.get(q++);
          pixelInts[i++] = 0xFF000000 | ((iR & 0x000000FF) << 16) | ((iG & 0x000000FF) << 8) | (iB & 0x000000FF);
            BufferedImage bimg = new BufferedImage(framewidth,frameheight,BufferedImage.TYPE_INT_ARGB);
              bimg.setRGB(0,0,framewidth, frameheight, pixelInts, 0, framewidth);
            try
                File imageFile = new File("final.jpg");
                File imagf = new File("final.png");
                File image = new File("final.bmp");
                ImageIO.write(bimg, "jpg", imageFile); // saves files
                ImageIO.write(bimg, "png", imagf);
                ImageIO.write(bimg, "bmp", image);
                   System.out.println("Success");
            catch (IOException e) {
                e.printStackTrace();
        }

    You want to convert it to an array of what? Of numbers? Of LabVIEW colors?
    The "Read BMP File.vi" VI outputs a 1-D array of the pixels, but I suspect it is not exactly in the format that you need. I am NOT sure, but I think that each group of 3 elements of that 1-D array (which is inside the cluster "image data" that the VI outputs) represents the red, green and blue levels of a single pixel (but it may be hue, saturation and lum.). Also, since it is a 1-D array, you would have to divide it by the width (which is also included in the "image data" cluster) to get some sort of 2-D array of data.
    You can find the "Read BMP File.vi" VI in the functions palete> "Graphics & sound">"Graphics Formats".

  • I can't convert a DVD video into my movie format?

    I can't used my Quick Time Software with all futures, I want to convert from the CDRoom a DVD video to movie format into my computer, would you help with a good solution.
    Thanks

    Are you referring to a commercial and hence copy-protected video DVD? If so, it's illegal in the US to attempt to break the copy protection, so we cannot help you with that question here.
    If that's not what you mean, please post back and explain further. Feel free to post in your native language if you're more comfortable that way. There are people here who speak other languages and can probably help you more quickly.
    Regards.

Maybe you are looking for