Convert 0calmonth into 0calday with lookup on custom periods

Hi All,
I need to convert 0calmonth into 0calday and it has to lookup on my own calender month,period and year.
The following custom objects are created based on infotype Change on Date ZIOI_CGON for inline with payroll periods.
PY Reporting Month   ZIO_PYMM
PY Reporting Period  ZIOI_PYPD
PY Reporting Year    ZIO_PYYY
so that i will get my actual correct data into infocube.
PY Reporting Period  ZIOI_PYPD*
Data : var_pypd type /BIC/OIZIOI_PYPD,
            var_cgon type /BIC/OIZIOI_CGON.
     var_cgon = SOURCE_FIELDS-/BIC/ZIOI_CGON.
  select single /BIC/ZIOI_PYPD into var_pypd
     from /BIC/PZIOI_PYPD
     where OBJVERS = 'A'
     and   DATEFROM <= var_cgon
     and   DATETO  >= var_cgon.
  if sy-subrc eq '0'.
     RESULT = var_pypd.
     else.
     RESULT = ''.
     ENDIF.
PY Reporting Month ZIO_PYMM
Data : var_pypd type /BIC/OIZIOI_PYPD,
            var_cgon type /BIC/OIZIOI_CGON,
            var_pymm type /BIC/OIZIO_PYMM.
     var_cgon = SOURCE_FIELDS-/BIC/ZIOI_CGON.
   select single /BIC/ZIOI_PYPD into var_pypd
     from /BIC/PZIOI_PYPD
     where OBJVERS = 'A'
     and   DATEFROM <= var_cgon
     and   DATETO  >= var_cgon.
   if sy-subrc eq '0'.
     var_pymm = var_pypd+4(2).
     RESULT = var_pyMM.
     else.
     RESULT = ''.
     ENDIF.
PY Reporting Year  ZIO_PYYY
Data : var_pypd type /BIC/OIZIOI_PYPD,
            var_cgon type /BIC/OIZIOI_CGON,
            var_pyYY type /BIC/OIZIO_PYYY.
     var_cgon = SOURCE_FIELDS-/BIC/ZIOI_CGON.
   select single /BIC/ZIOI_PYPD into var_pypd
     from /BIC/PZIOI_PYPD
     where OBJVERS = 'A'
     and   DATEFROM <= var_cgon
     and   DATETO  >= var_cgon.
  if sy-subrc eq '0'.
     var_pyYY = var_pypd+0(4).
     RESULT = var_pyYY.
     else.
     RESULT = ''.
     ENDIF.
while converting into 0calday the record has to be look up on my reporting month and year.
my req. is i need to get the start date from  pa9211 info type. we have our own payrol calender. so when we are extracting the data the data has to be in line with payroll calender
let say if emp 12345 start date is 21/09/2009. then as per our payrol calender he will fall under into oct payroll bcz speptember payroll has been already ran.the dates were 22/08/2009 to 17/09/2009
Appriciate if anybody advice me on this
Regards
Aravinda

Solved my self

Similar Messages

  • How to convert rows into columns with decode function

    Hi,
    How to convert rows into columns with the help of decode function in oracle.
    thanks and regards
    P Prakash

    say
    col1 col2
    1 10
    2 20
    3 30
    then use
    select col1,
    sum(decode(col2,10,10)) "new1"
    sum(decode(col2,20,20))"new2"
    sum(decode(col2,30,30))"new3"
    from table_name
    group by col1;
    we used sum u can use ny function if wont u have to give the column name i.e col2 name also
    so i think u got it nw
    regards

  • Last wish, preset converting RAW into JPG with more contrast, saturation & sharpening

    A close family member is dying and she has still many RAW files, which of course look slightly lifeless as all RAW files do. She asked me to look for a simple Lightroom preset which will convert her RAWs into Jpgs with more contrast, saturation and sharpening. She has Lightroom 3, but has no experience in making presets and neither do I. She needs the preset to make the RAW files as Jpgs available to her partner & children. No fancy effects; just simple. She cannot work on her computer anymore. Can you help me with a concrete preset or if not can you make one for her?

    This forum is for plugin developers - consider posting in 'Photoshop Lightroom' forum instead (at top of page, New -> Discussion -> Photoshop Lightroom).

  • Convert document into string with unicode

    I want to convert my document into string with all <,>,& to be converted into <, >, and &. When I am doing transformation, I am getting <,> etc.
    Can anybody suggest me how to do that.
    regards,
    Ranjan

    I don't know of any way to tell the parser to convert is for you, you'll have to replace the characters yourself after you got the string from the parser.
    Aviran
    http://www.aviransplace.com

  • Converting .m4a into .mov with Quick Time?

    trying to convert a .m4a file I pulled from itunes library into a .mov for use in FC7. this was easy to do in Snow leopard w/same quicktime10 with "save as" the option is not there in Lion, only export which does not have a .mov option. what am I missing or do I need another app now? I can't do it in Stream Clip either.

    nevermind, I found Quicktime7 in my aplications and used that to do the conversion.

  • Converting pdf into jpeg with Pages

    I took some scrapbook digital images and dragged them into pages. I then added pictures and text box. I used to go to Print and then save as jpeg but it won't allow me. I keep getting an error message and have no idea what it means. Finished project opens in Preview.
    The action “Copy Finder Items” encountered an error.Check the actionʼs properties and try running the workflow again.
    I just upgraded to Lion today.

    If you want to convert a whole page:
    Press command-P to open the Print dialogue.
    Click the PDF button at the lower left and choose Save PDF.
    In the Finder, locate the saved file, Right click on it's icon and choose Open with... Preview.
    Save or Export the Preview document as a jpeg.
    Alternate method (for less than a full page, also works for full page)
    Select all of the objects on the page.
    Go Arrange > Group
    Copy
    Launch Preview, then go File > New from Clipboard (or press command-N)
    Save or Export the Preview document as a jpeg.
    These methods work in previous versions of Mac OS X. I'm unable to test them in Lion.
    Regards,
    Barry

  • Problem converting MSWord into PDF with Acrobat 8.1

    I have a problem very similar to this. I also have a new laptop with WINDOWS Vista professional, MS Office 2007, and Acrobat Standard 8.1.
    The 'Create PDF' button in MSWord (and MSExcel, Powerpoint etc) does not work even for the simplest of Word file without any speacial character. Also if I try to convert the file from inside Adobe Acrobat using "Create PDF/From File...", I get the following message: "An unexpected error occurred. PDFMaker was unable to produce the Adobe PDF." The Acrobat printer is working fine.
    Any Remedy?

    See my answer to your duplicate posting
    http://www.adobeforums.com/webx/.59b4eeda/0

  • Convert file into XSTRING

    Hi expert,
    I want test some Function Module, and for do this i need to convert a generic file (pdf doc txt) into XSTRING... And after convert XSTRING into file, with use mimetype to read this...
    I search into FM, and in SDN but i don't find anything, can someone help me to do this??
    Thank you all...

    Hi,
    Check if FM SCMS_FTEXT_TO_XSTRING can be of help.
    Regards, Bert

  • Logic - Average value for a particular Customer + Period

    Hello Experts,
    Please help me in the Logic to find out Average for the below scenario:
    This is the Output:
    Customer
    Period
    Payment Timeliness
    Cust-001
    01/97
    -4
    Cust-001
    01/97
    2
    Cust-001
    01/97
    3
    Cust-001
    04/97
    3
    Cust-001
    04/97
    5
    Cust-001
    06/97
    -4
    Cust-001
    07/97
    2
    Cust-001
    08/97
    3
    Cust-002
    09/97
    5
    Cust-002
    09/97
    4
    Cust-002
    10/97
    6
    Cust-002
    10/97
    -2
    Cust-002
    12/97
    -4
    Requirement is:
    Customer
    Period
    Payment Timeliness
    Cust-001
    01/97
    0.333
    Cust-001
    04/97
    4
    Cust-001
    06/97
    -4
    Cust-001
    07/97
    2
    Cust-001
    08/97
    3
    Cust-002
    09/97
    4.5
    Cust-002
    10/97
    2
    Cust-002
    12/97
    -4
    Display the Average of all the Payment Timeliness for a particular Month as shown above.
    My Code is:
    *&      Form  fetch_data
    FORM fetch_data .
      SELECT bukrs
             belnr
             gjahr
             blart
             bldat
             budat
             monat
       FROM  bkpf
       INTO  TABLE g_t_bkpf
       WHERE bukrs EQ '0470'
       AND   gjahr EQ p_year
       AND ( blart EQ 'EZ'
       OR    blart EQ 'DZ' )
       AND   monat IN s_month.
      IF sy-subrc EQ 0.
        SELECT bukrs
               belnr
               gjahr
               augdt
               buzei
               shkzg
               kunnr
               zfbdt
               zbd1t
               zbd2t
               zbd3t
               rebzg
         FROM  bseg
         INTO  TABLE g_t_bseg
         FOR ALL ENTRIES IN g_t_bkpf
         WHERE bukrs EQ g_t_bkpf-bukrs
         AND   belnr EQ g_t_bkpf-belnr
         AND   gjahr EQ g_t_bkpf-gjahr
         AND   kunnr IN s_kunnr.
        IF sy-subrc EQ 0.
        ELSE.
          WRITE:/'No Data Found'.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fetch_data
    FORM display_paystats .
      DATA: l_due_date     TYPE faedt_fpos,
            l_timeliness   TYPE p,
            l_kunnr        type kunnr,
            l_counter      type i,
            l_period       type char5,
            l_tot_timeli   type p.
      IF g_t_bseg IS NOT INITIAL.
        WRITE: /10 'Customer ', 24 'Period ', 35 'Payment Timeliness'.
        WRITE: /10 sy-uline(44).
        LOOP AT g_t_bseg INTO g_wa_bseg.
          CLEAR l_due_date.
          CALL FUNCTION 'NET_DUE_DATE_GET'
            EXPORTING
              i_zfbdt       = g_wa_bseg-zfbdt
              i_zbd1t       = g_wa_bseg-zbd1t
              i_zbd2t       = g_wa_bseg-zbd2t
              i_zbd3t       = g_wa_bseg-zbd3t
              i_shkzg       = g_wa_bseg-shkzg
              i_rebzg       = g_wa_bseg-rebzg
           IMPORTING
             e_faedt       = l_due_date.
          READ TABLE g_t_bkpf INTO g_wa_bkpf WITH KEY
                                              bukrs = g_wa_bseg-bukrs
                                              belnr = g_wa_bseg-belnr
                                              gjahr = g_wa_bseg-gjahr.
          IF sy-subrc EQ 0.
            l_timeliness = g_wa_bkpf-budat - l_due_date.
          ENDIF.
          CLEAR g_wa_paystat.
          g_wa_paystat-kunnr = g_wa_bseg-kunnr.
          CONCATENATE g_wa_bseg-augdt+4(2) '/' g_wa_bseg-augdt+2(2) INTO g_wa_paystat-period.
          g_wa_paystat-timeli = l_timeliness.
          APPEND g_wa_paystat TO g_t_paystat.
          CLEAR : g_wa_bseg, g_wa_paystat.
        ENDLOOP.
        SORT g_t_paystat BY period.
        LOOP AT g_t_paystat INTO g_wa_paystat.
          WRITE:/10 g_wa_paystat-kunnr, 24 g_wa_paystat-period, 35 g_wa_paystat-timeli.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " display_paystats
    Where should I check the condition?
    I thought of assigning the Period / KUNNR in a Variable; then compare from the second record.
    But then how can I skip the check for 1st time inside a Loop?
    Since this is BSEG/BKPF entries; it is slow. So, please suggest some logic that doesn't affect the performance.
    Is it possible to write this logic within BSEG LOOP?
    Appreciate your help.
    Thank you!
    Thanks & Regards,
    Sowmya

    Found out by myself
    Closing the thread.
    SORT g_t_paystat BY kunnr period.
        LOOP AT g_t_paystat INTO g_wa_paystat.
          l_kunnr = g_wa_paystat-kunnr.
          l_period = g_wa_paystat-period.
          l_tot_timeli = g_wa_paystat-timeli.
          IF sy-tabix NE 1.
            READ TABLE g_t_paystat INTO g_wa_paystat1 WITH KEY kunnr  = l_kunnr
                                                               period = l_period.
            IF sy-subrc EQ 0.
              l_counter = l_counter + 1.
              l_tot_timeli = l_tot_timeli + 1.
            ELSE.
              g_wa_paystat-timeli = l_tot_timeli / l_counter.
              MODIFY g_t_paystat FROM g_wa_paystat TRANSPORTING timeli WHERE kunnr  = l_kunnr
                                                                       AND   period = l_period.
              CLEAR:
                l_counter,
                l_tot_timeli.
            ENDIF.
          ENDIF.
        ENDLOOP.
        DELETE ADJACENT DUPLICATES FROM g_t_paystat COMPARING kunnr period.
        LOOP AT g_t_paystat INTO g_wa_paystat.
          WRITE:/10 g_wa_paystat-kunnr, 24 g_wa_paystat-period, 35 g_wa_paystat-timeli.
        ENDLOOP.

  • I have a number of pages with html extension in different files. Is it possible to merge them into one file? Is it possible to convert them into another file type such as PDF, MOBI, or EPUB? Thanks

    While downloading an eBook from internet, I found a book in a folder containing around 123 files, which is equivalent to the number of pages of the book.
    My interest is to bring them together in one file so that I can read it at a time. As the interface is not comfortable with html, I also like to convert it into another more suitable file format.

    Hello djensen1x,
    Could you please let me know what version of Acrobat are you using.
    Also, tell me your workflow of combining those PDF files?
    Please share the screenshot of the error message that you get.
    Hope to get your response.
    Regards,
    Anubha

  • How do i convert a voice memo into MP3 with itunes 12?

    I need to convert a voice memo into MP3 with itunes 12.

    Today, I emailed myself an .m4a voice recording from an Android smartphone that had created that sound file minutes earlier.
    After opening that email message, I saved the .m4a sound file (a whopping 352 KB) to my Mac (iMac 21.5 inch running Yosemite).
    Clicking on the sound file's icon launched iTunes (version 12.0.1.26), which then did nothing no matter what I tried.
    However, when I selected the file on the desktop and navigated to the Finder/File/Open With dropdown window, a dialog box opened with alternative applications to use for opening the sound file. The available applications shown were VLC, QuickTime Player, Flip Player, and RealPlayer. I was pleased to find that VLC, QuickTime, Flip Player, and RealPlayer each opened and played the file straightforwardly and flawlessly.
    Apparently, Flip Player Pro (which I do not own) has a "save as" feature that might help you convert the file to the format you desire.

  • Convert a scatter graph with multiple data series into individual graphs

    I am trying to convert a scatter graph with multiple data series into individual graphs, with the series having the same formatting as in the graph when all series are together.
    Normally, if I delete any series, the color scheme for all the other series vanishes. I can then waste more time in having to re-adjust the  color and shape of the series, but this is tedious. This, I do not want. Is there an automated way to do this?
    Ideally, of course, all series would appear in little subsections in the space of the former one graph, all with individual axes, but I can't have all, so I'll settle with having several individual new graphs, each with just one series, and with the original
    formatting.
    Thx.

    How about creating a copy of the chart, and then setting all series except one to be transparent (no line, no marker)? Repeat for each series.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Trying to convert .vob into something I can work with PLEASE HELP

    I figured I would be making a DVD no problem today, but instead I'm dealing with this; The DVD camcorder we used to record my wedding is using .vob format, so when I plug the camera in, I see a Video_TS file with several .vob files, I can't import them into iDVD or anything..
    I have Toast 7, and I read online that you can convert them to .dv with no problem, however when I do export them in this format it is only converts about 2 seconds of the file...thats all it plays.
    Can someone please tell me how I can take these few .vob files and put them on iDVD and finish this project?

    Hello Jcisco,
    have a look at Dan Slagle's Unofficial iMovie FAQ: Using Mpeg (DVD) footage
    http://danslagle.com/mac/iMovie/tips_tricks/6010.shtml
    and also Matti Haveri's website: How can I edit MPEG or convert DVD or MPEG to DV
    http://www.sjoki.uta.fi/%7Eshmhav/SVCDon_a_Macintosh.html#edit_convertMPEG
    Tools:
    MPEG StreamClip:
    http://www.apple.com/downloads/macosx/video/mpegstreamclip.html
    Apple MPEG2 PlayBack:
    http://www.apple.com/quicktime/mpeg2/
    hope this helps
    mish

  • Why are the videos sent from my daughter's iPhone 4 to my 4S in 3gp format? i need to drag to desktop - open with QuickTime - convert - reimport into iPhoto.

    why are the videos sent from my daughter's iPhone 4 to my 4S in 3gp format? i need to drag to desktop - open with QuickTime - convert - reimport into iPhoto. There must be another way.  Plus

    Hey joshuafromisr,
    If you resintall iTunes, it should fix the issue. The following document will go over how to remove iTunes fully and then reinstall. Depending on what version of Windows you're running you'll either follow the directions here:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    http://support.apple.com/kb/HT1925
    or here:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923
    Best,
    David

  • How can I convert JPG files in multiple subfolders into PDFs with a batch?

    So here's the situation. I'm sitting on 400+ files, each in its own individual subfolder which also contains 4-10 other files. Those files I don't care about, only the .jpg file. I want to be able to take all of those .jpg files and convert them into PDFs, saving them in the same original folder. I've tried making an action to do this but it selects all the files in the folder and converts them as well.

    Should be, yes... It's one of the options of the batch processes. I believe
    it's under the first step, the one where you select which folder/files to
    process. There should be a window there to select which file types to
    process as well. Untick everything except for JPG and it should work...

Maybe you are looking for

  • Safari crashes every time I tried to open it

    I got this error message: Process:               Safari [1018] Path:                  /Applications/Safari.app/Contents/MacOS/Safari Identifier:            com.apple.Safari Version:               8.0.3 (10600.3.18) Build Info:            WebBrowser-7

  • Can I watch my ibooks on iMac?

    I am thinking of buying an iPad. When I download an iBook from iTune store, can I also download it to my iMac and read it on my iMac?

  • Boris Title 3D freezing?

    Greetings Sometimes when I open up Boris Title 3D to copy the text box and put it into a word document, it freezes on me. Any suggestions? Thanks!

  • Kmem_free error

    Hi, I am getting "prom_panic: kmem_free: block already free as a neighbor" error when install tries to load the secondary boot. HW description: Compaq Proliant 7000 server 4 Gb RAM 3100ES controller using 1 9.1 Gb drive in the array (port 1) Latest R

  • Dreamweaver properties panel is half hidden / obscured

    I recently installed Dreamweaver CS4 on a Win 7 laptop and noticed that some of the elements on the properties pane are half obscured so you can't see them (see highlight in attached screenshot).  I've tried moving the panel to other parts of the scr