FM to default the date to SUNDAY

Hi,
I need to default the date to SUNDAY on the selection screen. Is there any FM to do the same.

Hi.
I really don't know a FM to make sunday as default to a selection screen parameter. However, I would make a workaround to achieve that goal. You have your parameter p_date, right? So, in INITIALIZATION event do the following:
PARAMETERS: p_date TYPE dats.
DATA: return TYPE p.
INITIALIZATION.
p_date = sy-datum.
DO.
  CLEAR return.
  CALL FUNCTION 'DAY_IN_WEEK'
    EXPORTING
      datum = p_date
    IMPORTING
      wotnr = return.
  IF return EQ '7'. "sunday
    EXIT.
  ELSE.
    ADD 1 TO p_date.
  ENDIF.
ENDDO.
Regards.
Valter Oliveira.

Similar Messages

  • Default the Date Picker to Today

    Hi,
    I have a date item called Due Date that has a defualt set to
    PL/SQL Function Body
    return to_char(to_date('31-Dec-2050'), 'dd-Mon-yyyy');
    But my user would like the date picker to show today when they open it to change it. Is this possible? Is there no 'Today' button option?
    Thanks,
    Samantha

    Hello Samantha,
    >> I need my date to default to 31 Dec 2050
    First, and out of sheer curiosity, what is the nature of your application, that you have a due date on 2050?
    >> BUT when the user finally does edit and want to change the date they want the data picker to show today's date and not 31-Dec-2050
    I don’t think this behavior is possible with the current date picker. The date picker points to the item current date, as it should be, and don’t include a “today” button. What you can do is to add such a button yourself, using the “post element text” field of the date picker item. This button, using a JavaScript code, can set the value of the date picker item to “today” – using a hidden item containing “today” date. If the user still need to look for a closer date, he can open the date picker, and now it should open on the “today” date.
    Another option is to use an external date picker, like the one in here - http://www.dynarch.com/projects/calendar/ . This one include a “today” button.
    Regards,
    Arie.

  • Getting the data between Sunday and Saturday of last week.(DAYS NOT DATES)

    I have a stored procedure (that has no parameters right now) and does some extraction of data from different tables. One of the table has a column called 'DeliveryDate'.
    Based on the requirements, I have to create an SSRS 2008 R2 Report out of that stored procedure, so that users can see the data of last week from Sunday(Start DAY) to Saturday(End DAY). Even if it is Wednesday today, they should be able to see the data
    from Last Sunday to this Saturday. I don't want to get data of Monday, tuesday or wednesday. Also, these values shouldn't be STATIC. Meaning, if one user wanted to see deliveries on 04-15-2011, then he shoud see the values of the previous week (and NOT
    CURRENT week)
    1. Do I need to create parameters in my stored proc. Are they needed at all ?
    2. Should I use DateAdd, Datediff functions (If someone can explain, how will they be calculated!)

    to get last week sunday and saturday use below. I prefer to use parameters.
    set @startdate = DATEADD(wk,
    DATEDIFF(wk,
    0,
    getdate()),
    -2) --for
    sunday
    set @enddate = DATEADD(wk,
    -1,
    DATEADD(wk,
    DATEDIFF(wk,
    0,getdate()),
    -1))-- for saturday
    also
    refer the following link
    http://blog.sqlauthority.com/2008/08/29/sql-server-few-useful-datetime-functions-to-find-specific-dates/
    ESHANI. Please click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you
    If I run the query on 5/4/2014, will it give me 4/27/2014 for Sunday and 5/3/2014 for Saturday? Meaning if I run it on a Sunday, it will give me the previous Sunday and not the current Sunday's date.

  • A Date prompt defaulting the data in Report based on selection

    Gurus,
    I have a requirement , where i have a (in between) date prompt set in the dashboard current defulting to Start Month date and End Month date of current month.
    What the user want is based on the selection using a drop down in dashboard which has got values Last Day, Last week, Last Month , the default values in Date filter should change in dashboard.
    For Eg. If the user select Last Week, the in between date filter show the default date value as Last Week Mon and Last Sun, and should filter out the report based on that.
    Any idea's are welcome....
    Thanks & Regards
    -Saurabh

    Try to see if you can get user to agree on something easier.
    Here are the steps to achieve what you want.
    1. Create a prompt for 1 day, 2 week, and 3 month
    2. Create three separate reports based on above selection, which has page prompt for day/week/month respectively.
    3. Create GN based on step in 1 and then let UI change between three reports you created in step 2
    I hope this helps,
    Best luck

  • Get the date of a particular week day from given date

    I have a given date.
    from that date i want to get the date of sunday of that week
    wat is the best possible way to do the same.
    for eg:
    if i am given 03/11/2007 which is a saturday
    i want to get 27/10/2007 which is the sunday which falls in the same week as of 03/11/2007
    can anybody please help.

    hi,
    Here I am posting code for your requirement.
    Here I am hard coding the date value.
    import java.util.*;
    public class DateTest{
         public static void main(String ar[]){
              Calendar calendar =new GregorianCalendar(2007,7,4);
              System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
              calendar.set(2007,7,4-calendar.get(Calendar.DAY_OF_WEEK)+1);
              System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
    }

  • Default Value Date in Cash management

    Hi experts!
    I'm configuring Cash Management with document -Cash Management Germany (B46)
    I  want to configure "Default Value Date" :IMG: Treasury --> Cash Management --> Basic Settings -->Define Value Date Default
    But where I don't see Treasury?
    Please help me
    Thanks & reguards
    Ngocpt

    In ECC 6. treasury is replaced by Financial supply chain management. You can default the date in the following path:
    IMG - Financial supply chain management - cash and liquidity management - cash managment - Basic Settings -->Define Value Date Default
    Regards,
    Mayank
    *assign points if useful

  • How to change the default "no data found"

    Hi,
    Is there a way to change the default "no data found" message of the "When No Data Found Message" in the Report Attributes?
    I would like to change that message for a French message. I know that I can change it manually in every section, but I would like another default messages appearing when i create a Report Section.
    Thanks

    Can you point me to a tutorial?Sure, Users Guide > Managing...Globalization (Chapter 15?)
    Is this not happening at run-time?Yes. What happens at runtime is the selection of the application to run. If you run a page in the Application Builder (app 4000) and that application had not been translated or your browser language were set to some flavor (flavour) of English, you get 4000. If app 4000 had been translated to French, say, and you request a page in 4000 and have your browser language set to French, then you'll really run the requested page from app 4002 which is a copy of 4000 translated to French long before your request came along.
    If you look at our distribution, you'll find 9 (or more) versions of each of the internal applications in the builder directory.
    Scott

  • TS3579 I found this useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up

    I found this  (TS3579: If the wrong date or time is displayed in some apps on your Mac Learn about If the wrong date or time is displayed in some apps on your Mac) useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up in Finder. 

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • When creating a fillable form and saving it as a pdf, the default color of the data fields is a light blue. How do I change the color to something else that will copy better, e.g. a light yellow?

    When creating a fillable form and saving it as a pdf, the default color of the data fields is a light blue. How do I change the color to something else that will copy better, e.g. a light yellow?

    It's probably the fields highlight color of the application, which you can change via Edit - Preferences - Forms.

  • How to set the default display date of Calender prompt of SMPortal???

    Good Day!!
    As for as my knowledge, the default date Visible in all Calender prompt will be the
    Starting Date in the Specified date range either "RelativeDateRange" or "AbosoluteDateRange".
    But we have a requirement to set the default date to a date in the middle of the specified range, I don't find any option to specify in Request Offering Wizard or MP's xml file.
    Our scenario is as follows,
        We are trying to customize the CSPP's request offer "Request Virtual Machine", which has a user promt to select Decommission Date for the New VM. We have configured the date prompt as Relative Date range and set the
    Start date as "1 day next to user's current time" and Maximum date to "90 days after relative date".  So the user will get option to select Decomm date from (1-90) days with the defalut date as 1st day next to his current
    time. But our requirement is to set the default available date as 90th date in the above mentioned Relative Date Range.  
         I couldn't find any option in Request offering Wizard as attached below,
          Also I couldn't even find any tag to specify the default display date in the MP's XML file as attached below. Is there any other <tag> can be included inside <Details> tag to accomplish this ??
        Is there any other way to accomplish this???
        Please advise
    Thanks,
    Narayanababu
    Thanks and Regards, Narayana Babu

    This is probably a link editor parameter, see the linker and loader guide.
    Another thing you can do is write your own sbrk() that will log whenever it's called, so you can at least see how many times it's called and with what values. If you really need in-depth instrumentation, write your own heap routines and give them the same names as the CRTL routines. The linker should find yours first and route all memory operations through them. At least, that's the way it worked for me on SunOS 4.1....

  • Defaulting a date field in the table

    Hi Experts,
    I need to default a date field(DATBI) in a table to 12/31/9999. Since the date is system specific i cannot hardcode it as 12/31/9999 in the events.
    For eg . in our quality system date is maintained as 12.31.9999.
    Please let me know how i can implement this.
    Regards,
    Anjali

    In my table say ZXXXX i have a field DATBI.  My requirement is to default this field's value to 12/31/9999 while maintaining the table.
    Since date field is system specific. For eg , in our Dev system Date format is 12/31/9999. where as in quality it is 12.31.9999, I cannot hardcode it as 12/31/9999.
    I need to default the value for field DATBI irrespective of the system.

  • Default current date in the variable

    Hi Friends,
                     I have developed an Ageing Query. Now the requirement is, as soon as the query is executed, by default the variable should have the current date. I have the restricted Keyfigures as 0-10, 11-25 etc in the Column. Can someone tell me, how to go about it.

    If u want to populate it through variable then-
    Create a formula variable
    In processing by give customer exit.
    Then goto T.code CMOD
    Create a project and assign the component RSR00001 to the project(Do not repeat if already done).
    Open components.
    Goto include of exit.
    Writ the code in include.
    Sample code
    CASE i_vnam.
      WHEN 'DEF_DATE'.
        IF i_step = 1.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          l_s_range-low  = sy-datum.
          APPEND l_s_range TO e_t_range.
       End if
    ENDCASE.
    Then use this variable in the report.
    Assign points if usefull.
    regards,
    Rajendra

  • Hello everyone, How do I add by default a date on the actual E-mail page the date and time of when I have sent the e-mail ? Thank you very much for your suggestions. Kind regards, Christopher H. Bull, Birmingham, UK.

    Birmingham, Thursday 2. Feb. 2012
    To whom it may concern,
    I have an issue regarding the e-mail system, and I wanted to know how I can add a default that the date and time is added automatically to the E-mail page everytime I draft a new e-mail.
    Does anyone know how do create a "plug-in" to enable me to have the date and t ime posted on the e0-mail page every time i send a new e-mail ?
    If there is a plug in which is compatible with Lion iMac computers thart insert the date and time into every E-mail I send ?
    Kind  regards
    Christipoher H. Bull
    E-mail: [email protected]

    This supports macros and variables, it doesn't specifically state date and time, but if it supports variables I'd be surprised if it didn't have variables for those:
    http://email.about.com/cs/mailplugins/gr/mailtemplate.htm
    This one also supports variables and may do what you want:
    http://itunes.apple.com/gb/app/logical-mail-free/id451881152?mt=12
    You may want to look for more, I found those by googling 'mac email templates variables'.

  • Windows Client MP is using the default action account to write to the Data Warehouse

    Hi,
    I have recently installed SCOM 2012R2, and am in the process of migrating everthing from SCOM 2007R2.
    Just after I installed the Windows Client MP (version 6.0.7250.0), I started getting this Event 11852:
    OleDb Module encountered a failure 0x80004005 during execution and will post it as output data item. Unspecified error
    : Cannot open database "OperationsManagerDW" requested by the login. The login failed.
    Workflow name: Microsoft.Windows.Client.Win7.ComputerGroup.MemoryTrendsRAM
    Instance name: Microsoft System Center Data Warehouse
    Instance ID: {16781F33-F72D-033C-1DF4-65A2AFF32CA3}
    Management group: 2012SCOMDEV
    This is happening every 7 days and only happening on the Win7 Management pack. I checked the DW logs and found that it was using the default action acount (SCOM ACTION)to send to the DW.  This account doesn't have access to the DW DB.
    I assume it should be using the Data Warehouse action account.  This is how the acount is setup
    Can anyone tell me where I'm going wrong here?  I have not had to touch the permissions for any of the other Management packs.  the rest of them just work.

    For this issue, you can check below link
    http://blog.metasplo.it/2014/01/scom-2012-oledb-module-0x80004005.html
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"Mai Ali | My blog:
    Technical | Twitter:
    Mai Ali

  • How can I set the date today as default value in a parameter?

    Hi,
    I have in my report a date parameter and I want to set as default value the date today.
    How can I do this?
    Thanks in advance

    If you are using a datatemplate , you can have a beforereport trigger that will have a package call.
    In the package spec, define a date variable and also define the function beforereporttrigger that retruns boolean.
    In the body, define the beforereporttrigger function with
    begin
    select sysdate into specvariable from dual
    return(true);
    end;
    You can then use the variable in the datatemplate as :variable.
    Hope this helps.
    - Vasu -

Maybe you are looking for

  • Turn off auto-correction in 2.0?

    Is there a way to turn off auto-correction in firmware 2.0? I live in a non-English speaking country and most of my typing is in non-English. It's really annoying when my iPod tries to correct every other word that I type.

  • Y have problem with bios of motherboard K9N2-GM 8200 GE FORCE

    y have updated the bios of my motherboard k9N2-GM 8200 nvidia geforce (y have a cpu athlon 64 bit dual core 6000+ 3000 Ghz) and it is missing in Advanced Bios Feature. in the bios, CPU FEATURE  the SVM (secure virtual machine) Y have replaced the old

  • Which ram do you recommend?

    Corsair PC3500(433MHz) 2-3-3-7 or Corsair PC4000(500MHz)(3-8-8-4) Which one is faster?For my board?

  • Send to Shake Difficulties

    I am having difficulty sending clips to Shake and getting them back on the timeline. I have followed all the tutorials that I can get by hands on but it just does not seem to work on my system. here is a screen capture of what I am talking about http

  • Automatic elimination of holding co investments with subsid share capital

    Hi all, I have the following common scenario, before elimination of share capital                                   Co A (Holding)                   Co B (100 % owned by A) Investments                      5000                      Cash