Need a function Module to retrive the weekly absence data from PNP logical

hi all,
i have generated a report for absence data according to my report when u enter the start date and end date and absence type it will give u the list of employees and starting date and end date and absence hours.
But my client wants the report in following format:
YEAR    week number      number of absence hourse in that week
2006  -
    WEEK  -
              HOURS
infotype is pa2001.
thx in advance.
Sunil

Hi Sunil,
I think you have to use zreport.
Regards,
kumar

Similar Messages

  • Reg:function module to retrive the ekko table data

    Hi all,
    Is there any function module to retrive the ekko table data for the given select-options and parametrs.
    could you provide that.
    Thanks & regards,
    S.chaitanya.

    dear chaitanya,
    may be you can use this function module ME_READ_EKKO_MULTIPLE which can be used to pass the select options to retrieve the desired EKKO data.
    OR the best way would be to do a SELECT Query which would retrieve the data faster and in an effective manner.
    Hope this helps you.
    Help Children of U.N World Food Program by rewarding and enocourage others to answer your queries
    Thanks
    Venugopal

  • Retriving Absence data from PNP logical database

    hi all,
    there is an function where i can get the absence data but my client wants in the following order
    But my client wants the report in following format:
    YEAR--- week number--
    number of absence hourse in that week
    2006 -
    WEEK -
    HOURS
    infotype is pa2001.
    thx in advance.
    Sunil

    Sunil,
    Table PTQUODED may be better suited than PA2001 because in PA2001 it is <b>very difficult to distinguish between absences that overlap between 2 or more weeks</b>.
    Here is sample code that does exactly what you need:
    REPORT  zggar_abs.
    DATA: ta_ptquoded  TYPE TABLE OF ptquoded.
    DATA: l_week       TYPE scal-week.
    DATA: BEGIN OF ta_abs OCCURS 0,
            pernr    TYPE pernr,
            year(4)  TYPE c,
            week(2)  TYPE c,
            abs      TYPE f,
          END OF ta_abs.
    DATA: wa_abs  LIKE LINE OF ta_abs.
    FIELD-SYMBOLS: <fs_ptquoded>  LIKE LINE OF ta_ptquoded.
    PARAMETERS : p_pernr  TYPE p_pernr.
    SELECT * FROM ptquoded
             INTO TABLE ta_ptquoded
             WHERE pernr = p_pernr.
    LOOP AT ta_ptquoded ASSIGNING <fs_ptquoded>.
      wa_abs-pernr = <fs_ptquoded>-pernr.
      CLEAR: l_week.
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          date = <fs_ptquoded>-datum
        IMPORTING
          week = l_week.
      wa_abs-year = l_week+0(4).
      wa_abs-week = l_week+4(2).
      wa_abs-abs  = <fs_ptquoded>-quode.
      COLLECT wa_abs INTO ta_abs.
    ENDLOOP.
    SORT ta_abs BY year week.
    LOOP AT ta_abs INTO wa_abs.
      WRITE : wa_abs-year, wa_abs-week, wa_abs-abs.
      NEW-LINE.
    ENDLOOP.
    Please, assign points and close the thread if solved.
    Best regards,
    Guillaume

  • Function module to derive start and end dates from fiscal year and period.

    Hi,
    I want to know a function module to derive start and end dates from fiscal year and period.
    ie: If I have say fiscal year '2010' and period '07', then the start date of this period would be '01.10.2010'.
    Thanks.
    Moderator Messge: Basic Date questions are not allowed.
    Edited by: kishan P on Oct 18, 2010 4:45 PM

    Hi,
    This is one of my exit that display the calmonth (offset -12). Usefull when I have to retrieve in a KF a complete rolling year depending one calmonth.
    S_VMUCMN is my selection variable
    S_TXTCMN_M12 is my text variable calmonth-12
    S_TXTCMN_M0 is my text variable for selected calmonth.
    WHEN 'S_TXTCMN_M12'.
        IF i_step = '2'.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'S_VMUCMN'.
            CLEAR l_s_range.
            " First day of the selected month
            CONCATENATE loc_var_range-low '01' INTO l_calday.
            CALL FUNCTION 'YFRBW_FUM_CAL_DATE_IN_INTERVAL'
              EXPORTING
                date      = l_calday
                months    = 12
                signum    = '-'
              IMPORTING
                calc_date = l_calday.
            l_s_range-low = l_calday+0(6).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    Thus, in KF header you have to put the two text variable to display the complete period.
    Hope it helps,

  • I need a Functional module to get the header material from the component .

    Dear Guru's
    Please help me .
    I need a name of the Functional module to get the header material from the component .
    As in if I put the Component in the Input I should get ALL the Main header materials using this Component.
    Regards,
    Roshan Lilaram Wadhwani.

    This was not answered

  • Need a Function Module for fetching the prior date-Urgent!!

    Hi All,
         I need a function module which will give the prior date with respect to the no: of days days that are entered as input.
    Can anyone please help me to fing one function module which acts as the above.
    Required very urgently!!!
    Thanks and Regards,
        Neethu

    Hi Neethu,
    Please run the report 'ZRECTIFY_FM_DOCUMENTS' in your system.
    Before running the report, create the following selection texts for the parameters/select-options as given below:
    P_BUKRS:  Company code
    S_GJAHR:  Fiscal year
    S_BELNR:  FI document no.
    P_TEST:   Test run
    For More information please refer <b>SAP Note: 309619</b>
    Best Regards,
    Johnny.

  • Function module to get the difference of dates ..

    Hi ,
    Can somebody pls help me with the function module to get the difference between two dates?
    I need to find the difference value and delete records if >1.
    Thanks in advance.
    Regds,
    Leeza.

    Leeza,
       When I tested the FM in my Program, it is <b>working</b>!!!!!
       Note that the Two Input Dates are to be in the format of <b>DATS</b> type (Eg: <b>vimimv-dmibeg</b>).
      U can want the Day which u have specified in the parameter I_DATUM_BIS (eg: 20050101) to be included for
    the calculation , then put X in the parameter I_KZ_INCL_BIS.
    Sample Code :
    report zkam01.
    data:           
    <b>sav_nlaufz like rf60v-nlaufz, 
    date1 type vimimv-dmibeg,
    date2 type vimimv-dmiend.</b>
    date1 = '20050101'.
    date2 = '20051001'.
    call function 'MONTHS_BETWEEN_TWO_DATES'
         exporting
             i_datum_von   = date1
             i_datum_bis   = date2
             i_kz_incl_bis = 'X'
         importing
             e_monate      = sav_nlaufz.
    write:
    date1,
    / date2,
    / sav_nlaufz.
    Please allot points if the problem is solved.
    Thanks
    Kam
    Message was edited by: Kam

  • Function module to modify the vendor confirmation data

    Hi,
    I am using ME_CONFIRMATION_UPODATE to add a new record to table EKES, ie I am able to see the vendor confirmation in purchase order. Can I use the same function module to modify the same record in above table EKES or anyother function module is there? My requirment is to change the delivery date once again in confirmation tab in purchase order.
    Please help,
    Thanks,
    Vengal Rao.

    Hi All,
    I could use the same function module and change the delivery date, i thing I changed is the data in field KZ , instead of 'I'  used 'U'.   to update the existing data.
    Thanks,
    Vengal Rao.

  • Function Module to find the Last Execution date of Back ground Job

    Hi,
    Is there any function module to find the <b>last execution date of back ground job</b>.
    So that I can transfer the data from SAP to Legacy system based on the document creation date should be in between last execution date and current date.
    thanks in advance.
    Eswar.

    Don't know of a function module, but you should be able to use the information in table TBTCO to get the last start date and time of the job you are interested in.

  • Need a functional module to compute the invoice balance

    Hi,
    I need to know if there is a functional module which we can use to compute the invoice balance by deducting the credit notes and the payments.

    This was not answered

  • Function module to display the time and date in the report-sy-udate And s

    Hi.
    wish to have a function module which can display the system time and date through function module.
    the format that this function module should display should be like this:
    if its today-date and time then:
    05-Jan-08 01.25.57 PM
    please note that i want them to be in one single row in the top-of page
    kinldy help on this.
    thanks!

    hi,
    check this.
    https://forums.sdn.sap.com/click.jspa?searchID=19175181&messageID=4628668
    Thanks

  • Function module to retrieve the material master data

    Hi all,
    creating material master dta i am using BAPI_MATERIAL_SAVEDATA .is there any f.m with same structures as BAPI_MATERIAL_SAVEDATA to retrieve the materi master data.

    Hi,
    Not sure if there is any function module to get material master data with the same structure..
    But..
    You can select the data from MARA, MARC, etc...and convert it to the BAPI structures using the following function modules..
    CFX_MAP2E_MARA_TO_BAPI_MARA
    CFX_MAP2E_MARC_TO_BAPI_MARC
    Thanks,
    Naren

  • Function Module to get the MMBE transaction Data

    Hi All,
    My requirement is to calculate the open stock of a given part number in all the plants. I was told that the MMBE transaction in SAP can give me the data. So, I was searching for a function module or Bapi which could get this data which I can call in my program. Can anyone help me out?? Thanks.

    Hi Mohan,
    You can try this code..with slight modifications.. (to work for all PLANTS)
    Regards,
    Raj
    FUNCTION ZMM_ISSUES_PER_YEAR_POWER.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(I_MATNR) LIKE  MARA-MATNR
    *"     REFERENCE(I_PLANT) LIKE  T001W-WERKS
    *"     REFERENCE(I_GJAHR) LIKE  MSEG-GJAHR
    *"  EXPORTING
    *"     REFERENCE(E_STK_OPBAL) LIKE  BSIM-MENGE
    *"     REFERENCE(E_STK_VAL) LIKE  BSIM-DMBTR
    DATA : V_STK_OPBAL LIKE BSIM-MENGE,
           V_STK_VAL   LIKE BSIM-DMBTR,
           V_GJAHR     LIKE MSEG-GJAHR.
    DATA : BEGIN OF IT_BSIM OCCURS 0,
              MATNR LIKE BSIM-MATNR,
              SHKZG LIKE BSIM-SHKZG,
              MENGE LIKE BSIM-MENGE,
              DMBTR LIKE BSIM-DMBTR,
           END OF IT_BSIM.
    TYPES: BEGIN OF ST_MSEG,
              MATNR LIKE MSEG-MATNR,
              SHKZG LIKE MSEG-SHKZG,
              MENGE LIKE MSEG-MENGE,
              DMBTR LIKE MSEG-DMBTR,
              BWART LIKE MSEG-BWART,
              LGORT LIKE MSEG-LGORT,
           END OF ST_MSEG.
    DATA : IT_MSEG  TYPE ST_MSEG OCCURS 0 WITH HEADER LINE,
           TMP_MSEG TYPE ST_MSEG OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF IT_MBEW OCCURS 0,
              MATNR LIKE MBEW-MATNR,
              LBKUM LIKE MBEW-LBKUM,
              SALK3 LIKE MBEW-SALK3,
           END OF IT_MBEW.
    *V_KEYDT = I_KEYDT + 1.
    SELECT MATNR
           SHKZG
           SUM( MENGE )
           SUM( DMBTR )
      INTO TABLE IT_BSIM
      FROM BSIM
    WHERE MATNR EQ I_MATNR
       AND BWKEY EQ I_PLANT
       AND GJAHR EQ I_GJAHR
       AND BLART IN ('RE','WE','WA','PR')
    GROUP BY MATNR SHKZG.
    *SELECT MATNR
          SUM( LBKUM )
          SUM( SALK3 )
    INTO TABLE IT_MBEW
    FROM MBEW
    WHERE MATNR EQ I_MATNR
      AND BWKEY EQ I_PLANT
      AND VPRSV EQ 'V'
      AND BWTAR EQ ''
    GROUP BY MATNR VPRSV.
    SELECT A~MATNR
           A~SHKZG
           SUM( A~MENGE )
           SUM( A~DMBTR )
           A~BWART
           A~LGORT
      INTO TABLE IT_MSEG
      FROM MKPF AS B
      JOIN MSEG AS A
        ON BMBLNR EQ AMBLNR
       AND BMJAHR EQ AMJAHR
    WHERE A~MATNR EQ I_MATNR
       AND A~WERKS EQ I_PLANT
       AND A~KZBEW IN (' ','B')
       AND A~BWART NOT IN ('541','542','321','322','121')
       AND A~KZVBR NOT IN ('A')
       AND A~GJAHR EQ I_GJAHR
    GROUP BY AMATNR ASHKZG ABWART ALGORT.
    LOOP AT IT_MSEG WHERE BWART EQ '544' AND LGORT EQ ''.
       TMP_MSEG = IT_MSEG.
       APPEND TMP_MSEG.
    ENDLOOP.
    DELETE IT_MSEG WHERE ( BWART EQ '309' AND DMBTR EQ 0  ).
    DELETE IT_MSEG WHERE ( BWART NE '543' AND LGORT EQ '' ).
    LOOP AT TMP_MSEG.
       IT_MSEG = TMP_MSEG.
       APPEND IT_MSEG.
    ENDLOOP.
    *READ TABLE IT_MBEW WITH KEY MATNR = I_MATNR.
    *V_STK_OPBAL = IT_MBEW-LBKUM.
    *V_STK_VAL   = IT_MBEW-SALK3.
    LOOP AT IT_MSEG.
       IF IT_MSEG-SHKZG EQ 'H'.
          V_STK_OPBAL = V_STK_OPBAL  - IT_MSEG-MENGE.
          V_STK_VAL   = V_STK_VAL    - IT_MSEG-DMBTR.
      ELSE.
         V_STK_OPBAL = V_STK_OPBAL  + IT_MSEG-MENGE.
       ENDIF.
    ENDLOOP.
    LOOP AT IT_BSIM.
       IF IT_BSIM-SHKZG EQ 'H'.
         V_STK_OPBAL = V_STK_OPBAL  - IT_BSIM-MENGE.
         V_STK_VAL   = V_STK_VAL    - IT_BSIM-DMBTR.
      ELSE.
         V_STK_OPBAL = V_STK_OPBAL  + IT_BSIM-MENGE.
         V_STK_VAL   = V_STK_VAL    + IT_BSIM-DMBTR.
       ENDIF.
    ENDLOOP.
    E_STK_OPBAL = V_STK_OPBAL.
    E_STK_VAL   = V_STK_VAL.
    ENDFUNCTION.

  • Is there any function module to get the purchase order conditions from EONP

    Hi,
    I want to get the EONP and EONH table details for the purchase orders with the help of function module. Can anyone tell me any function module name which would give me those details.
    Thanks,
    Atanu

    Hi
    Check with BAPI function module BAPI_PO_GETDETAIL and BAPI_PO_GETDETAIL1.
    Regards
    Srilaxmi

  • How to get the week start date from ISO week number

    Hi,
    I have a table with the following stucture
    Year    error    Week1     week2   week3 ......week53
    2012       error1     2           4         2             1
    2012       error2    3          0        1                 1I was hoping to get something like select year, error, week1||'Week start date which is a monday of that week' , week2||'Week start date,again monday',....week53 from table
    Any suggestions please?
    Thanks,
    Sun

    Hi, Sun,
    To see when week N started, add 7 * (N - 1) days to the beginning of the year. (By definition, the beginning of the ISO year is the start of week 1 of the ISO year.)
    To see when week 22 of the current year started:
    SELECT  TRUNC (SYSDATE, 'IYYY') + (7 * (22 - 1))
    FROM    dual
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

Maybe you are looking for