How to get week & quarter for entered date

I need help on below query
1) when i enter date, it should bring previous & further week of that month. As per my requirement my week starts from Saturday to Friday. Lets say that i am entering 24.01.2006, then it should bring week 1 from 7th Jan to 13th Jan 206, 14th Jan to 20th Jan 2006 & so on.
2) Similarly when i enter date as above , i want data coming on quarter basis instead of week..
I will be highly thankfull to you for the help..
Regards
[HASAN]

HI
try HR_99S_GET_QUARTER.
type-pools: p99sg.
data: l_week type P99SG_QUARTER.
CALL FUNCTION 'HR_99S_GET_QUARTER'
  EXPORTING
    IM_DATE             = sy-datum
  IM_ABKRS            =
  IM_PERMO            =
IMPORTING
   EX_QUARTER          = l_week.
  EX_RETURNCODE       =
          write:/ l_week-begda.
           write:/ l_week-endda.
Message was edited by: Harikishore Sreenivasulu

Similar Messages

  • How to get Inventory Balances for PO data

    Hi Guys,
                   How to get Inventory Balances for PO data.
    from which tables I can get it ?
    We are migrating material data to a new plant.. for this process.. The inventory data also has to be moved..
    I am using BAPI_GOODMVT_CREATE to post inventory balances for the new plant.
    Thanks

    Hi,
    Try MARC, MSKA, MARD .
    Thanks,
    Krishna

  • How to get pop-up for entering some value on it by user on Adobe INTERACTIV

    Hello
    We are developing a interactive adobe form,
    1) User would like get some popups for entering the values in the popup and clicking either OK or CONTINUE, pls. let me know how to handle this?
    2) can i get CALENDER, when user tries to input DATE entry? how its?

    Hi,
    You can create a subform overlapping you main body page and you can use this subform as pop-up.
    You just need to do following things:
    1. Create a subform over you main body page in the area where you want to show the pop-up, say SF_POPUP is the name of this subform.
    2. Give it a background colour(So that it looks different from the main page).
    3. On this subform SF_POPUP, create the fields you want the user to enter. along with these fields create a button 'OK' or 'Continue' as per your requirement.
    4. Write the below code on click event of this button:
        SF_POPUP.presence = "Hidden".
    5. On you main body area create a button to show this popup and write the below code on it:
       SF_POPUP.presence = "Visible".
    6. By default set this popup SF_POPUP as hidden from subform properties.
    Hope this will help for your first requirement, for your second requirement Arvind has already given a solution.
    Regards,
    Vaibhav

  • How to get week starting with sunday date

    Hi
    I have a date column "start_date", i need to create a report for all the weeks starting from sunday , for eg:
    i need to get week dates as :
    mm/dd/yy - 01/23/11 , 01/16/11 , 01/09/11 and so on...
    Please help
    Thanks...

    Hi,
    To find the last Sunday before or equal to start_date:
    SELECT     TRUNC ( start_date + 1
               , 'IW'
               ) - 1          AS week_start_date
    ...You can use an expression like this in a GROUP BY clause, also.
    This does not depend on you NLS settings. ISO weeks always start on Monday. Your week starts 1 day earlier, so that's why the expression above has the +1 and -1.
    (Depending on you NLS settings,
    SELECT     TRUNC ( start_date
               , 'D'
               )          AS week_start_date
    ...might do the same thing, but I still rocommend using 'IW'; a few extra keystrokes isn;t much to pay for a guarantee that it will always work.)
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data.

  • How to get organisation unit for given date.

    Hi Everyone,
    I have created a report to display all the hired and left employees
    for the given date. I have to display department wise.
          CALL FUNCTION 'RH_DIR_ORG_STRUC_GET'
            EXPORTING
             ACT_ORGUNIT           = S1_ORGEH-LOW
             ACT_PLVAR             = '01'
             ACT_DATE              = SO_DATE-HIGH
             SORT_FLAG             = 'X'
             ADD_FLAG_PDATA        = 'X'
           TABLES
             ORG_UNITS             = IT_ORG_UNITS.
    This function module will bring all the active org unit existing
    in our system. If an organisation unit is delimited.
    This function module is not getting the delimited org unit.
    How to get that org unit.
    Plz its vry urgent,
    thanks in advance,
    regards,
    stanley

    did you try RH_STRUC_GET?
    Regards
    Raja
    close your previous threads
    Re: ALV in browser

  • How to get week nos for a month ?

    hi frends...
    i ve a requirement i ve to display week nos available in a  month....
    for e.g.,
    this is my input  month = 0908 that is (september 2008)
    and i ve to get output as
    36
    37
    38
    39 ....these are all week nos

    hi ,
    make use of the following code  for your requirment.
    FUNCTION ZZTEST1.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_DATE) TYPE  CHAR4 OPTIONAL
    *"  EXPORTING
    *"     REFERENCE(EX_WEEK1) TYPE  CHAR2
    *"     REFERENCE(EX_WEEKUPTO) TYPE  CHAR2
    data : lv_date1 type sy-datum,
           lv_date2 type sy-datum,
           lv_week1 type scal-week,
           lv_week2 type scal-week,
           lv_mon type sy-datum,
           lv_sun type sy-datum,
           lv_enddt type S033-SPTAG.
    Data : lv_mm(2) type c,
           lv_yy(2) type c,
           lv_dd(2) type c.
    lv_mm = i_date(2).
    lv_yy = i_date+2(2).
    lv_dd = '01'.
    concatenate '20' lv_yy lv_mm lv_dd into lv_date1.
    CALL FUNCTION 'DATE_GET_WEEK'
            EXPORTING
                date         = lv_date1
            IMPORTING
                WEEK         = lv_Week1
            EXCEPTIONS
                DATE_INVALID = 1
                OTHERS       = 2.
    ex_week1 = lv_week1+4(2).
    CALL FUNCTION 'CBIH_RP02_GET_END_MONTH'
      EXPORTING
        DATE_MONTH       = lv_date1
    IMPORTING
       END_MONTH        =  lv_enddt.
    CALL FUNCTION 'DATE_GET_WEEK'
            EXPORTING
                date         = lv_enddt
            IMPORTING
                WEEK         = lv_Week2
            EXCEPTIONS
                DATE_INVALID = 1
                OTHERS       = 2.
    ex_weekupto = lv_week2+4(2).
    ENDFUNCTION.

  • Function module to get month lists for entered date

    Hi Experts,
    Is there any function module which gives me output as mentioned below.
    Eg Input : 01.10.2010 - 01.02.2011
         OUTPUT :  OCT 2010
                          NOV 2010
                          DEC 2010
                          JAN 2011
                          FEB 2011
    Please suggest.
    Regards,
    Kaustubh.

    Moderator message - Please see How to post code in SCN, and some things NOT to do... before posting - post locked
    Please do not ask basic date questions
    Rob

  • How to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • ABAP Get Week Number for a Given Date.

    Hi All,
    I want to calculate week number for given date.
    SAP has provided function modules like DATE_GET_WEEK.. Etc are giving week number. taking default start day as Monday. But for my requirement is calculate week number based on start day as Sunday.
    Please let me know if we have any custom logic ??
    Thanks & Regards
    Vasu Yadav

    Hi Vasu,
    SAP standard functionality takes MONDAY as first day.
    But if you want then you can change it to SUNDAY by implementing BADI CALENDAR_DEFINITION. Create a new implementation for method IF_CALENDAR_DEFINITION~GET_FIRST_DAY_OF_WEEK and assign value as SUNDAY.
    Hope it solves your problem.
    Thanks
    Saurabh Kabra

  • Formula variable to find week name for a date

    hi,
    i want to get the week name for a date value and i want to do this in query designer.can anybody tell me whther ican create any formula variable for this and if yes how can i do it???

    y dont use text varaible processing by customer exit

  • How will get stoppage hours for PM02 orders

    Hello Guru,
    I want to find out stoppage hours for PM02 orders according to PM Act Type (eg. PM, predictive maint., TPM, etc). Background is that, our PM02 process schedules maint order as per maint plan & it wont triggers Notification in background so users are unable to enter work details ie. work start date/time & End date/time.
    In this situation, how will get stoppage hours for PM02 orders?
    << Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
    Regards,
    Amol
    Edited by: Rob Burbank on Jan 17, 2011 4:25 PM

    Hi PMAmol,
    As Babu suggest,  You can use Act Start and Act End date and time  from Order Header for your requirement , Now how to use those ?
    Once you do Order Confirmation via IW41 , for first operation mention date and time in  Work Starts on date and time when you start your work,
    Then this date and time will reflect in Act Start in Order Header, after that when you finish your work , then in IW41 along with final Confirmtn tick mention the date and time in Work Start on and Ends on field , when CNF status set on order you can check in order header , this date and time will reflect in Actual End date and time.
    For report you can use Iw39.
    Riyaj

  • Qry:How to get different price for each price list (variable area) in order

    1-How to get different price for each price list (variable area) in order for sale. for the opportunity to display and select multiple prices.
    2- I add a location store from a table in line item and I want to see this area in order,.
    I 'm created 2 field location(item line and order), 1 table location
    I tried this for exemple : select $ [userfieldlocation.OITW]

    Thanks Suda for your answer,
    the Formatted Search for prices is OK, but for the Item locations in warehouse this is not so simple,     
    I must have several (at least 2) locations for the item in the Warehouse and a track of this location and search possibilities.
    read carefully and imagine how (Management warehouse locations)
    I added a user table '@Location' who linked to a user field 'U_Location in Item master data --> lnventory data  line and an ather user field 'U_Location' in sales order
    I met the value of location in the table (list of locations for any warehouse), I select the location of each item while receiving merchandise in the user field of inventory data line (Item M data) and this value appears in the sales order 'U_Location' user field ( only the location value in the default warehouse for this Item)
    or
    create an user field 'location' in Good receipt PO to fill it while receiving merchandise that appears in the sales order to give possibility to find/select the location of the item at this order and in Item master data
    I think we will use all these tables
    @LOCATION
    PDN1
    OITM
    OITW
    OWHS
    RDR1
    Juste a another question : where you found this and What is: ' 38.1.0 '
    Is it in document (System information):Item=38 Pane=1 ??
    Thanks,
    Ouchen

  • How to get internal table from SAP Data Provider C#

    Hello.
    ABAP:
       DATA: lt_t001 TYPE TABLE OF t001.
       DATA: url(1000) TYPE c.
      SELECT * INTO TABLE lt_t001 FROM t001.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type                 = 'APPLICATION'
          subtype           = 'X-R3TABLE'
        TABLES
          data                 = lt_t001
        CHANGING
          url                    = url
        EXCEPTIONS
          OTHERS           = 4.
    C#:
    using SAPDataProvider;
    using SAPTableFactoryCtrl;
    public void SetDataFromUrl(string url)
                SAPDataProviderClass p = new SAPDataProviderClass();
                p.SetDataFromURL("APPLICATION", "X-R3TABLE", url);
                ISapDPR3Table tbl = p.GetDataAsR3Table("APPLICATION", "X-R3TABLE");
                SAPTableFactoryClass tf = new SAPTableFactoryClass();
                Table tb = (Table)tf.NewTable();
                tb.ISAPrfcITab = tbl.DataTable; // Exception !!!!!!
    How to get internal table from SAP Data Provider ?

    Hi Sergey,
    I'm trying to do the same, have you found a solution to solved it?
    thanks for your help.
    Regards.
    Jonathan

  • How to get the ItemKey for a Workflow triggered by an event in Oracle Apps

    Hello,
    I have added a custom sub process to the seeded "OM Order Header" workflow. The process sends a notification. There are a few attributes in the body of the message tied to this notification, to which I am trying to assign values to using the syntax:
    SetItemAttrText (itemtype, itemkey, attrname, attrvalue).
    I have the internal names for the item type and attribute name, but don't know how to get the value for the item key. I understand the item key is supposed to be unique for each item type and is automatically generated by the workflow engine when the work flow fires. Is there a built-in function or some means to get this value?
    Regards,
    Smita

    Have you tried to query WF_ITEMS? -- http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=WF_ITEMS&c_owner=APPLSYS&c_type=TABLE
    bde_wf_item.sql - Runtime Data of a Single Workflow Item [ID 187071.1]
    Thanks,
    Hussein

  • How to get a reference for custom controller

    Hi All,
         I am working with the custom controller but i dont know how to call the functionality of custom controller into a view controller.For accessing component controller functionality we have a attribute wd_comp_controller in view controller.Like this how to get a refernce for the custom controller.
    Thanks in Advance.

    hi,
    Lets say view1 has the event ONACTIONNAVIGATE and you want to call a method 'start_navigation' in the custom controller named 'navigation'.
    Use the following code.
    METHOD onactionnavigate .
    DATA lo_navigation_controller TYPE REF TO ig_navigation.
    lo_navigation_controller = wd_this->get_navigation_ctr( ).
    CASE navigation_type.
    WHEN 'BACKWARD'.
    lo_navigation_controller->start_navigation( if_fitv_fpm_api=>gc_navigate_backward ).
    WHEN 'FORWARD'.
    lo_navigation_controller->start_navigation( if_fitv_fpm_api=>gc_navigate_forward ).
    ENDCASE.
    ENDMETHOD.
    Thanks,
    Rajkumar.S

Maybe you are looking for

  • Probook 430 G1 - The worst notebook I have ever had

    Good Afternoon HP (or whoever may be reading this), This email is written to address HP customer support. I will try to keep this message as civilized as possible. I abhor people who abuse manufacturers/sellers just because they have a problem with a

  • Date Taken lost on normal import (after successful initial migration)

    USB stick with 100 photos exported from Aperture on another computer. If I drag and drop the photos into OS X Photos all the photos import, but all then show with current date time as time taken and not the correct date taken timestamp. The nutty thi

  • MobileMe and iCloud accounts

    After installing iOS5, I now have a MobileMe account AND an iCloud account in the mail settings on my iPad 2.  This means double the mail. This did not happen on my iPhone 4, which only shows an iCloud account. Can I safely delete the MobileMe accoun

  • I need to switch my ipod from windows to mac

    I know that this is kind of a dumb question but i want to be correct. I have a 30gig video ipod currently on a windows format but want to switch it to mac format since i now have a macbook. But the last time i tried to do this on a mini it didnt work

  • Calendar very slow (5-10 s) to load from the iPhone 4.0 software update

    I am NOT happy with this 4.0 Software Calendar. New with this 4.0 Software, it takes at least 5 to 10 seconds for my Calendar to load on my iPhone screen. TOO LONG TO WAIT! Previous from the 4.0 Software, my Calendar was one calendar and instant load