How get the number of some week in the year

such as:
1/1/2002 is 1
1/7/2002 is 2
1/21/2002 is 4

hi, you can do it using the field "WEEK_OF_YEAR" of class java.util.calendar.
such as:
Calendar calendar = Calendar.getInstance();
int weekNumber = calendar.get(WEEK_OF_YEAR );

Similar Messages

  • How get the user initiador in gp?

    hi all
    How get the user initiator of a process GP with a Web Dynpro Callable Object?
    because with this code I get the current user...
    IWDClientUser wdUser = WDClientUser.getCurrentUser();
    IUser user = wdUser.getSAPUser();
    String userid = user.getUniqueID();
    thanks!

    Hi,
    processId is the design time template id of the process. This you can find in the instantiation tab while designing the process.
    Code for getting user context:
    IWDClientUser wdUser = WDClientUser.getCurrentUser();
                   IUser user = wdUser.getSAPUser();
                   IGPUserContext userContext = GPContextFactory.getContextManager()
                             .createUserContext(user);
                   IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
    Hope it helps.
    Regards,
    Srinivasan Subbiah

  • Get the year out of a date

    I have a date '12/02/1989'. how do i get the year out of this date.
    or take a sysdate and get the year out of it.
    Thanks

    this?
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT EXTRACT (YEAR FROM TO_DATE('12/02/1989','mm/dd/yyyy')) year
      2* FROM dual
      3  /
          YEAR
          1989
    or this/
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT to_char( TO_DATE('12/02/1989','mm/dd/yyyy'),'YYYY') year
      2* FROM dual
    SQL> /
    YEAR
    1989too late
    Message was edited by:
    devmiral

  • Howto to get the year timestamp in syslog and logadm files

    5.10 Generic_141414-10 sun4u sparc
    Howto to get the year timestamp in syslog and logadm
    We have to keep logs files for a long time, I was exploring logs in /var/adm/secure and noticed that log files over a year old did not have a year time stamp, they are in this format:
    Nov 12 09:09:16
    And on the face of it. /varlog/syslog is the same, I thought no problem, there will be something in syslog.conf or logadm.conf I change and it will be fixed, but I cannot find any options to change this, how do I get the year in my log files?
    The "date" command does output the year:
    Friday, September 14, 2012  7:57:36 AM

    My guess is that the fields in a message logged by syslog are fixed, so you can't add a field to it.
    The reason for this is simply that there might be other applications parsing your syslog messages, or there might be other systems syslogging to your system, and that would break if you would add fields.
    The easiest workaround is probably to keep better track of your logs by either implementing an annual rotation of them from crontab, or log the date using the "logger" command on a regular basis.
    A third option would be to look at syslog-ng or rsyslog, which is more flexible when it comes to storing logs, and among other things can store them into a SQL db..
    .7/M.

  • How transfor the year ending balances to next year

    hi,
    Now i am  learn in SAP FICO.
    i want how transfor the year ending balance to next year
    i am waiting for answar
    thanks

    Hi,
    Up to 4.7 use T.code for Transfer GL Balances F.16,
    ECC use T.Code: FAGLGVTR
    Customer & Vendor Balances: F.07
    Asset A/C:
    Close Fiscal Year: AJAB
    Open New Year: AJRW
    Regards,
    Viswa

  • How get the dynamic parameter values

    <p>Hi everyone. <br /><br />I have made an application to show the Crystal Report . Because the input interface is not very good, so I write an interface by myself. Now this funcation can show all static parameters. But I have some troubles with the dynamic parameters.  How to get the values of the dynamic parameters?</p><p>By the way, if I add a dynamic parameters , it will show the dadabase logon window twice. How to add the logon infomations for dynamic parameters using .net?</p><p>My develop entironment is : Crystal Report XI, RAS XI, Visual Studio 2003 c#.</p>

    See note number 1412611 in the notes database:
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
    Ludek

  • FM to find the number of fiscal weeks in a year

    Hi All,
    Can anyone pls give me the  function module to find the number of fiscal weeks in the given year.
    Thanks,
    Rajani.

    Eric Cartman wrote:
    Ámit Güjärgoüd wrote:
    > > Eric,
    > >
    > > Did you actually enjoy 2004 ?
    wasn't bad...
    do you mean, there were 53 weeks in that year? because I have concern, how it is actually counted...
    wasn't bad... :)
    Thats sounds Sweet
    do you mean, there were 53 weeks in that year?
    Yes
    because I have concern, how it is actually counted...
    If in a leap year fabruary falls in 5 weeks then that is the only possibility for 53 weeks
    Cheers
    PS:But No logic would be applied in this case

  • How get the all the table values to another table based on Action

    Hi All,
    I am new to webdyn pro.
    I have two tables Table1 and Table2 with context nodes Tab and Tab1.
    Table1 I have a button Save If I submit Save the data from first table to second table .
    I was written the code
    IPrivateTableScrollBar.ITabElement element;
         for(int i=0;i<10;i++)
              element=wdContext.createTabElement();
              element.setName("test"+i);
              element.setSal("100"+i);
              wdContext.nodeTab().addElement(element);
    added some data to first table.
    how can I get the all 10 rows from first table to second table  if I write wdContext.node<Element>.getName() and getSal() I can get only selected one row .how can I get the all rows in a sigle click to second table.
    please help.

    Hi mohammed,
    Use the following lines of code to iterate through the elements :
    Iprivate<your view>.I<your node1 name>Element elmt1 = null;
    Iprivate<your view>.I<your node2 name>Element elmt2 = null;
    for(int i=0;i<wdContext.node<your node1 name>().size();i++)
    elmt2 = wdContext.node<your node2 name>().create<your node2 name>Element();
    elmt1 = wdContext.node<your node1 name>().get<your node1 name>ElementAt(i);
    elmt2.set<attribute name>(elmt1.get<attribute name>);
    wdContext.node<your node2 name>().addElement(elmt2);
    Hope this helps,
    Best Regards,
    Nibu.

  • [b]PG_MIN_ROW - how get the value??[/b]

    Hi,
    How can I get the value of PG_MIN_ROW when paginating?
    I want to use the value in a Java script, how can I set a variable=pg_min_row?
    Regards
    Evelyn

    You are correct the page is not submitted when the user clicks on the NEXT or PREVIOUS links. Here are some threads that may help you:
         Re: Submit data when click on pagination
         Re: Challenge: Save "dirty" form before navigating awayMaybe what would help is if you stepped back and explained what you attempting to do at a higher-level.
    Mike

  • How come the year the album was released gets deleted when I edit the album name?

    When ever I edit the name of an album, the year gets deleted. Under "edit info" it says it is there but it never goes through to my ipod? This is the second time this has happened. What do I do?

    You might be able to do some of this with retaining the original information if you enter it into the sort ___ fields.  Never worked with those myself.

  • How get the RVS4000's DHCP server to assign another IP address other than its own as the default gateway to its DHCP clients?

    Hi,
    I have a RVS4000 router with DHCP enabled and in router mode. 
    The LAN is 192.168.2.x.  The RVS4000 static IP address is 192.168.2.8
    The router is not the RVS4000 and is at 192.168.2.1
    The RVS4000 dhcp is assigning it's clients a default gateway of 192.168.2.8 instead of what I want 192.168.2.1.
    How can I get the RVS4000's DHCP server to assign another IP address other than its own as the default gateway to its DHCP clients?
    Thanks

    Hi Gail, you cannot do this. The router, as the DHCP server will only assign a default gateway of what IP interface the DHCP server runs on. If you have the default IP, the gateway is 192.168.1.1. If you create a second vlan, by default it would be 192.168.2.1.
    There are not configuration options for the built-in DHCP server. If you'd like to expand this functionality, you would need an external dhcp server.
    -Tom
    Please mark answered for helpful posts

  • How get the string back?

    Hello with this code I put my string in a byte array.
    String code = "This is a testString";
    bytes[] ver = code.getBytes();
    Can someone tell me how I can get the original string back?

    I tried this
    String s = (ver);
    When I do this and try to compile I get the error that
    found byte[] required java.lang.string

  • How get the actual hours worked by the employee in SAP.

    Hello Experts,
    How to get the actual hours worked by employee in a month.( Any infotypes or tables or fm)
    I have report to get planned hours of the employee
    Thanks and Regards
    Reddy

    Hello expert,
    I am a technical guy, I dont have functional knowledge and HR functional support is not available at the moment..
    I have requriement to develop a report to caluclate the actual night shift hours worked by the employee...
    I have report : RPTEDT00 where in I have actual hours worked day and night..
    But I am not able to find how do in my custom program from the program reference...So I want to know is there any way where in I see this data in tables or infotypes
    Thanks and Regards
    Reddy

  • How get the correct generic type from Class.forName()?

    I have:
    public class Test2 {
        void foo() throws ClassNotFoundException {
            Class<Test2> c = Class.forName("Test2");
    }Of course, this doesn't compile:
    javac -Xlint Test2.java
    Test2.java:4: incompatible types
    found   : java.lang.Class<capture#965 of ?>
    required: java.lang.Class<Test2>
            Class<Test2> c = Class.forName("Test2");Other than casting to Class and suppressing the unchecked warning, how can I get the code to do what I think should be a common use case? I try
    public class Test2 {
        void foo() throws ClassNotFoundException {
            Class<Test2> c = Class.forName("Test2").asSubclass(Test2.class);
    }Which doesn't compile either:
    javac -Xlint Test2.java
    Test2.java:4: incompatible types
    found   : java.lang.Class<capture#400 of ? extends Test2>
    required: java.lang.Class<Test2>
            Class<Test2> c = Class.forName("Test2").asSubclass(Test2.class);Not sure I understand what the javac error is about.
    Help!

    kinmanc wrote:
    This is just a simplified version of what I had. The name of the class being loaded is unknown at compile time, though it is known to implement an interface. Isn't this a common use case?Yes, its' quite common.

  • How get the duration in days of 2 key figures with use  of factory calendar

    Hi all,
    in a query i have two key figures (dates!). Now i want to get the duration in days between the two dates with the use of one factory calendar.
    FYI
    I made this in the past in the update rule (...DURATION_DETERMINE..) but now in this situation i have two cubes and i want to make an report on a multicub.
    Thank you very much for any help.
    Frank

    You would probably accomplish this with a virtual key figure.  I did this and the performance was not bad.  I developed a class with a signature for 2 dates and a calendar to return the number of business days. 
    Hope that helps...

  • How get the condition type of PO's item

    Dear All,
    I want to get the condition type of PO's item.
    I have checked the EKPO, there is Purchasing Info Record but no Purchasing info record category(esokz) that is the key of in table A017.
    How can i get the Purchasing info record category(esokz) of PO's item?
    Thank you in advance.

    Hi,
    Purchase info records are stored in EINA and EINE table. The field you are looking for is in table EINE.
    Hope this helps.
    ashish

Maybe you are looking for