RPD Variable Required : First day/date of the week

Hi All,
Under a requirement I need to create a repository variable which would show the first day of everyweek. That is, I need to show monday's date for every week.
Could you please let me know how that can be done.
Thanks,
Ronny

Hi,
under a variable you can hold only a value, not a set of values...(eg. First day of week from this week or next week, not all weeks)
What is your exact requirement? Can it be achieved with filter on DAYOFWEEK(Time.Day) = 2?
Regards
Nicolae

Similar Messages

  • Getting the start  and end dates of the week

    Hi,
    I was stuck with a problem in getting the start date and end date of the week,i know the month ,week and year also,with these three values how can i get the start and end dates of a week.please help me
    Thanks

    There is no simple way. It has to be a math calculation.
    There are several ways you can get the dates. First you have to know what day is January 1st and what day is december 31st for a particular year. Second you have to check whether the given year is a leap year or not. Based on the abvove information you should be able to find out what day is a particular date.
    Hope this helps to get you started.
    - Venkat Dhurjati.

  • How to get last date of the week

    hi,
    how to get last date of the week like FM WEEK_GET_FIRST_DAY gives the date of the first day of the week i need the date of the last day of the week..
    thnx

    data : p_week type KWEEK,
    p_Date type SYDATUM.
    p_week = <incoming value in week of year>
    CALL FUNCTION 'WEEK_GET_FIRST_DAY'
    EXPORTING
    week = p_week
    IMPORTING
    DATE = p_date
    EXCEPTIONS
    WEEK_INVALID = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To get the last day of the week.
    p_date = p_date + 6.
    You can find the available fm in the system from se37 transaction code.

  • How can I see more than 6 all day events in the week view without scrolling?

    How can I see more than 6 all day events in the week view without scrolling?  I need to see all of my all day events at once.  I use this for scheduling and comparing of # invoices.  Going back and forth to scroll is cumbersome.  I just want to be able to expand the top section so I can see everything at once.

    Any ideas, anyone?

  • How do I change the start date for the week from Monday to Sunday on my iPhone 5?

    How do I change the start date for the week on iCal from Monday to Sunday on my iPhone5?

    Yes. On my new iPhone 5 the iCal week begins on a Monday not a Sunday and does not give me the option to edit in settings on the phone

  • Adding a summary column in a table which contains the start and end dates in the week

    Hi,
    I've got a DIMENSION DATE table and want to add in another column which shows the start and end date of the week.
    See below, the new column is WEEKOFYEARTEXT.
    Does anybody know how i may generate this column using SQL and using the existing columns?
    Umar Javed

    See:  http://www.sqlusa.com/bestpractices/datetimeconversion/
    DECLARE @Year INT = '2015';
    WITH cteDays AS (SELECT DayOfYear=Dateadd(dd, number,
    CONVERT(DATE, CONVERT(char(4),@Year)+'0101'))
    FROM master.dbo.spt_values WHERE type='P'),
    CTE AS (SELECT DayOfYear, WeekOfYear=DATEPART(week,DayOfYear)
    FROM cteDays WHERE YEAR(DayOfYear)= @YEAR)
    SELECT WeekOfYear, StartOfWeek=MIN(DayOfYear), EndOfWeek=MAX(DayOfYear)
    FROM CTE GROUP BY WeekOfYear ORDER BY WeekOfYear;
    WeekOfYear StartOfWeek EndOfWeek
    1 2015-01-01 2015-01-03
    2 2015-01-04 2015-01-10
    3 2015-01-11 2015-01-17
    4 2015-01-18 2015-01-24
    5 2015-01-25 2015-01-31
    6 2015-02-01 2015-02-07
    7 2015-02-08 2015-02-14
    8 2015-02-15 2015-02-21
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Not All Variables Bound - Only on Dates in the Visual Studio/Table Adapter

    I am trying to execute a SQL statement created in a table adapter. I am using VS 2010 and ODP 11.2.0.1.2.
    Anytime I add a DATE column in the where clause with a parameter (in bold below) I get one of two errors.
    1. Pass date as 01/01/2010: "Bad Month" -ok I know what this is...
    2. Pass date as 01-JAN-10: ORA-01008: not all variables bound
    where pro.user_id = :user_id
    and (pro.select_typ_cd = 'adr'
    and acct.mkt_uw_empl_id = pro.select_key
    or pro.select_typ_cd = 'abc'
    and acct.mstr_agy_lgl_entity = pro.select_key)
    and (:BUSINESS_TYP_CD = 'all' or acct.BUSINESS_TYP_CD = :BUSINESS_TYP_CD)     
    and (USER_ACCT_STS_CD != 'lost' or SYS_ACCT_STS_CD != 'lost')
    and LOB_EFF_DATE = :EFF_FROM

    Got this to work in one case
    First use to_date LOB_EFF_DATE > to_date(:EFF_DATE_TO,'MM/DD/YYYY').
    Second on the table adapter parameter you have to define the DBType as string not Date, and the provider type as VARCHAR2 not Date. Make sure you change the length to 10 it defaults to 7.
    Oracle needs to fix this why in the world do I have to pass a date in a parameter on a table adapter as a string and go through this mess.

  • Variable required for 0DOC_DATE, same as the SAP exit variable 0P_KEYDT

    Hi Gurus,
    I am currently trying to create a query based upon the InfoProvider -  FIAP: Line Item (0FIAP_C03).
    For the Characteristic Net Due Date (0NETDUEDATE) there is a SAP exit variable called Key Due Date (0P_KEYDT).
    I need to replicate this variable for 0DOC_DATE, which is what I need to use in this query.
    I do not have any knowledge of ABAP therefore could you please advise;
    1) Whether this variable can be replicated for 0DOC_DATE so that it defaults to system date - 1 day
    2) What steps I need to take to create this variable
    3) What is the exact ABAP code that I will need to do this.
    If there is a variable that already exists for 0DOC_DATE that acts in the same way as 0P_KEYDT then please let me know.
    Thanks
    Nate

    Hello,
    1&3) goto CMOD - create e.g. ZBWVARS. Add RSR00001enhancement. Modify ZXRSRU01 include.
    You need developer key to do that.
    CASE i_vnam.
    WHEN 'ZDOC_DATE,'.
        IF i_step EQ '2'.
          CLEAR l_s_range.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          l_s_range-low = sy-datum - 1.
          APPEND l_s_range TO e_t_range.
        ENDIF.
    ENDCASE.
    2) In Query Designer create customer-exit variable ZDOC_DATE.
    BR
    Ondrej

  • SAP Bex: How to calculate formula variable, without dragging corresponding date in the row

    Hi Experts,
    In my requirement, we should not do any changes in the BW system. I need to create a Bex query on the existing Info-set, KPI need to be calculated from the date objects.
    e.g
    Delivery date - Order date - which has been done with the formula variable in the bex, I'm getting exact value. the  problem is if I'm not dragging the Delivery date or order date in the Bex ROW, its not populating value. I'm expecting consolidated value for a month.
    It has an impact in the BOBJ system. since i'm not getting consolidated value, the number of data which is coming in BOBJ system is very huge. Hence doing calculating in the bobj will affect performance.
    Regards
    Vijaykumar

    Hi,
    i think your calculating the value form Delivery date - Order date.
    if you drag the Delivery date - Order date object to rows it will give values.
    Thanks,
    Phani.

  • I'm new to Apple (MacBook Pro). Had a PC before.  First day I had the new Apple, somehow I lost the return arrow to go back to an original page (if that makes sense).

    First day I had my Apple I was on Craig's List looking at an item and somehow I deleted the return arrow to go back to the original list. So now when I'm on a site, there's no arrow to go back and I have to close and start all over.  How do I get the return arrow that I believe is on the left side of the screen?  I've never had an Apple, so all of this is new to me.  Thanks!  Jo

    If I understand your question, you need to select View > Customize Toolbar from the Safari menu bar. Drag the back/forward arrows into the toolbar wherever you want them, then click Done.
    You can also go back to the previous page by pressing command-left arrow on the keyboard.

  • How to get the exact day date with the another date field?

    Hi,
    Please help me how to get the specific day of the week's date with the help of another date field.
    Actually , one field(week_day) has 1,2,3,4,5,6,7 here 1--MON,2-- TUE like that.
    another field has the date. based on that date, we have to go to that particular week and need to pick up the date by the above week_day. It should be in that week itself.
    Thanks in advance!!
    Regards,
    Vissu...
    Edited by: vissu on Oct 29, 2010 3:07 AM

    Hi,
    Something like this
    SELECT TRUNC(<DATE_COLUMN>,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the particular week of the date
    SELECT TRUNC(SYSDATE,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the current week
    cheers
    VT

  • Where we can Read first pay date from the Payroll cluster ?

    Hi,
      I need Employee’s first pay date for that plan year.
      If u know plz help me in this.
    with regards,
    Suresh

    Hi there.  Do you mean the first date that the employee was actually paid?  If so, you can use this:
        CALL FUNCTION 'CU_READ_RGDIR'
          EXPORTING
            persnr          = employee_pernr
          TABLES
            in_rgdir        = rgdir
          EXCEPTIONS
            no_record_found = 1
            OTHERS          = 2.
        IF sy-subrc EQ 0.
        Store only active payroll results.
          DELETE rgdir WHERE srtza NE 'A'.                "Active
        Delete all the payroll results not from the requested year
          DELETE rgdir WHERE paydt+0(4) NE pay_year. "Reporting Year
        Delete voided payroll data.
          DELETE rgdir WHERE voidr NE space.              "Voided
        Sort so the first record is the last for the requested year.
          SORT rgdir BY paydt ASCENDING fpend DESCENDING.
          LOOP AT rgdir INTO ws_rgdir
            WHERE paydt > pay_year_begda.
            first_pay = ws_rgdir-paydt.
            EXIT.
          ENDLOOP.
    ENDIF.
    I hope this helps.
    - April King

  • How to calculate start date of the week based on week number ?

    i need to get week number of the current date and based on that i need to calculate start date falling in the same week for last year.
    Eg. today is 31st week of year and 31st july date. so what will be the date on the 31st week of last year. i need the start date of that week.
    we can calculate the week number by select to_char(sysdate,'ww') from dual.
    DO we have a single line query for that or will it require writing a pl/sql block ?

    you can try following query
    it can be as inline but for more clean look and create it as select with include select
    with t as
    (select sysdate as dt from dual)
    select to_char(prev_year_dt - to_char(prev_year_dt, 'D') + 1, 'DD.MM.YYYY') as start_of_week from (select
    -- get day from prev year with the same week number
        case
               when to_number(to_char(add_months(dt, -12), 'WW')) > to_number(to_char(dt, 'WW')) then
                dt - (to_number(to_char(add_months(dt, -12), 'WW')) - to_number(to_char(dt, 'WW'))) * 7
               when to_number(to_char(add_months(dt, -12), 'WW')) < to_number(to_char(dt, 'WW')) then
                dt + (to_number(to_char(dt, 'WW')) - to_number(to_char(add_months(dt, -12), 'WW'))) * 7
               else
                add_months(dt, -12)
           end as prev_year_dt
      from t) t1good luck
    Sergii
    'Monday' is not first day of week in 100% ;)
    Edited by: Galbarad on Jul 30, 2012 11:00 PM

  • Date of the week

    Hi,
    Does anybody has a sample or suggestions on how to get the day of the week form a date for example if I have a date String of 8/28/2006 the day of the week should be Monday
    Thanks

    If u r getting this field from the database then u can use a function (I use PoatgreSql, there i use to_timestamp() function ) to convert that string to date and then use another function (here its to_char('timestamp value', 'DAY')) to get the day.
    Regards,
    Gaurav Goel.

  • RRI : Passing the dates of the weeks

    Hi All,
    I have 2 queries and there is a jump from one query to another.
    In query 1 I have to display result for 4 weeks in a month (Week 1, Week 2, Week 3, Week 4) for the current year and prior year. And from this query I have a jump to Prior Year, where I have to show data only for the week i select. But here the problem I am having is when I click on the header for ex:- "Week 2", I get all the data I have in that cube. On the other hand if I make a jump to query 2 selecting the cell for current year & week 2, I get only the data for 2007(current year) and nothing displays in the prior year  column.
    Please suggest me ways in which I can display only the weeks data exactly.
    Thanks & Regards,
    Max.

    In my page one i have one multiselect list. I have to send the value to this multiselect list to my another page. I have created same name item in both the pages and through branch and passing the addess of page 1 to page 2. But the last selected data is comig in the page 2. I need all the values of page 1 should come in page 2.Once page 1 is submitted and the values are in session state they can just as easily be referenced in page 2 as they can in page 1, so the source of the page 2 value can reference the page 1 value. If the value is not displayed on page 2 then there is the option of not duplicating it all&mdash;just reference the page 1 value.
    As stated above, multiselect list values are separated using ":"s and can't be passed via the URL. If the value has to be passed in a branch then using the *save state before branching* option in the branch avoids this restriction.

Maybe you are looking for

  • Can no longer telnet to my Cisco 2924 xl

    Hi, I have a Cisco 2924 XL where port 24 is trunked to another port on Cisco 3750. Both interfaces are up, but I can no longer telnet til the switch. I get this error message "VLAN-4-VTP_INTERNAL_ERROR: VLAN manager received an internal error 26 from

  • MBP to MacPro Network Connection Deadly Slow

    I recently purchased an Intel MBP, and am connected to my home network wirelesly via a Belkin N1 router. Connecting to the Internet works just fine: speed is good, connection is strong, etc. But connecting to shared drives over my home network - spec

  • What is used in CRM 2007

    hi  Experts, I need some clarifications regarding the CRM2007 UI Architecture. Is Webdynpro ABAP or BSP is avilable in CRM 2007 or both avialable in 2007? What is the UI stretegy in CRM2007? what is the Architecture of CRM2007? We are planning to upg

  • Why does not java support raw sockets?

    Java does not have support for raw sockets, that means it cannot receive the packet header, just the payload data. But the header data of an ICMP packet consists of 20 bytes, and you can still write single bytes in Java, so why isn´t is possible to w

  • Where is the Android version of Lightroom mobile

    Why is it that android always plays second fiddle to IOS. I pay the same as anyone else, but because I choose to use the freer plaform, not controlled by meglomaniacs, who insist on producing the hardware as well as the software, I am penalised. Andr