How to extract year alone form a given date

Hi all,
How to extract year from a given date alone.
eg: 01/01/2000.
i want 2000 separately. How can i do that?
Plz help me regarding this.
Thanks & Regards,
vineel

Hi Vineel,
You can use the first four chars of the date field..
w_year = w_date(4)
Else, you can use the FM:
GET_CURRENT_YEAR
Thanks and Best Regards,
Vikas Bittera.
**Reward if useful**

Similar Messages

  • How to download interactive adobe form with filled data

    Hi Experts,
    i have created a module pool program that is showing interactive adobe form, i created a button 'SAVE' to download the interactive adobe form to the presentation server.
    but the problem is that i am unable to save the interactive adobe form with filled data. Please provide me the code how to download interactive adobe form with filled data.
    Please provide me valuable information to clear the issue.
    Thank you,
    B. Raghu Prasad.

    Hi Raghu,
    is this adobe form in web dynpro ? if so, I suggest to go to [Web Dynpro |Web Dynpro ABAP; forum to get more advice because it seems to be more specific topic.
    Regards,
    Vincent

  • How to extract the nodes of any given XML document ???

    Hello,
    Greetings! It is an interesting forum.
    A Snippet of XML Schema PurchaseOrder.xsd as given in user guide is as follows
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb"
    version="1.0" xdb:storeVarrayAsTable="true">
    <xs:element name="PurchaseOrder" type="PurchaseOrderType"
    xdb:defaultTable="PURCHASEORDER"/>
    <xs:complexType name="PurchaseOrderType" xdb:SQLType="PURCHASEORDER_T">
    <xs:sequence>
    <xs:element name="Reference" type="ReferenceType" minOccurs="1"
    xdb:SQLName="REFERENCE"/>
    <xs:element name="Actions" type="ActionsType" xdb:SQLName="ACTIONS"/>
    <xs:element name="Reject" type="RejectionType" minOccurs="0"
    xdb:SQLName="REJECTION"/>
    <xs:element name="Requestor" type="RequestorType"
    xdb:SQLName="REQUESTOR"/>
    <xs:element name="User" type="UserType" minOccurs="1"
    xdb:SQLName="USERID"/>
    <xs:element name="CostCenter" type="CostCenterType"
    xdb:SQLName="COST_CENTER"/>
    <xs:element name="ShippingInstructions" type="ShippingInstructionsType"
    xdb:SQLName="SHIPPING_INSTRUCTIONS"/>
    <xs:element name="SpecialInstructions" type="SpecialInstructionsType"
    xdb:SQLName="SPECIAL_INSTRUCTIONS"/>
    <xs:element name="LineItems" type="LineItemsType"
    xdb:SQLName="LINEITEMS"/>
    </xs:sequence>
    </xs:complexType>
    full schema is available in url
    http://download-west.oracle.com/docs/cd/B12037_01/appdev.101/b10790/xdb03usg.htm#BABBGIED
    The views use XPath expressions and functions such as extractValue() to define the mapping between columns in the view and nodes in the XML document. The following view is created on purchase order schema.
    Creating Relational Views On XML Content
    CREATE OR REPLACE view PURCHASEORDER_MASTER_VIEW
    (REFERENCE, REQUESTOR, USERID, COSTCENTER,
    SHIP_TO_NAME,SHIP_TO_ADDRESS, SHIP_TO_PHONE,
    INSTRUCTIONS)
    AS
    SELECT extractValue(value(p),'/PurchaseOrder/Reference'),
    extractValue(value(p),'/PurchaseOrder/Requestor'),
    extractValue(value(p),'/PurchaseOrder/User'),
    extractValue(value(p),'/PurchaseOrder/CostCenter'),
    extractValue(value(p),'/PurchaseOrder/ShippingInstructions/name'),
    extractValue(value(p),'/PurchaseOrder/ShippingInstructions/address'),
    extractValue(value(p),'/PurchaseOrder/ShippingInstructions/telephone'),
    extractValue(value(p),'/PurchaseOrder/SpecialInstructions')
    FROM PURCHASEORDER p;
    When we register XML Schema in Oracle 9i, the schema elements of XML documents are stored as XMLType, that is, stored using object-relational storage techniques.
    For a small schema, we could build the above view manually, but for large/nested schema, if we have query to build XML documents node list, it will help us to build Relational Views on XML Content.
    How do we extract the nodes of any given XML document through O-R structures or XML DB using XML DB functions?
    Any alternate thoughts are welcome.
    I appreciate your help.
    Regards
    Ram

    Ram
    Once again, I do not think that you can solve the problem you are trying to solve. Fundamentally you need to determine for a given element of a given complex type what are it's child elements. For each of those elements you then need to find out whether or not it in turn has child elements...
    Then you have to think about elements defined as ref rather than type, elements that are substituteable, and the rest of possibilities that can be described with XML Schema.
    If you can solve that problem you're a better man than I as the saying goes. Anyone rather than give you a fish, I'll show you how to at least put a worm on the hook..
    The following query gets the names of the elements inside a each of the global complex types
    Good luck, if you come up with a query to do this I'd love to see it...
    SQL> column COMPLEX_TYPE format A32
    SQL> column ELEMENT format A32
    SQL> --
    SQL> select extractvalue
    2 (
    3 value(ct),
    4 '/xs:complexType/@name',
    5 'xmlns:xs="http://www.w3.org/2001/XMLSchema"'
    6 ) COMPLEX_TYPE,
    7 extractvalue
    8 (
    9 value(et),
    10 '/xs:element/@name',
    11 'xmlns:xs="http://www.w3.org/2001/XMLSchema"'
    12 ) ELEMENT
    13 from resource_view,
    14 table
    15 (
    16 xmlsequence
    17 (
    18 extract
    19 (
    20 res,
    21 '/r:Resource/r:Contents/xs:schema/xs:complexType',
    22 'xmlns:r="http://xmlns.oracle.com/xdb/XDBResource.xsd"
    23 xmlns:xs="http://www.w3.org/2001/XMLSchema"')
    24 )
    25 ) ct,
    26 table
    27 (
    28 xmlsequence
    29 (
    30 extract
    31 (
    32 value(ct),
    33 '/xs:complexType/*/xs:element',
    34 'xmlns:xs="http://www.w3.org/2001/XMLSchema"'
    35 )
    36 )
    37 ) et
    38 where equals_path(res,'/home/SCOTT/poSource/xsd/purchaseOrder.xsd') = 1
    39 /
    COMPLEX_TYPE ELEMENT
    -------------------------------- ------------------------PurchaseOrderType Reference
    PurchaseOrderType Actions
    PurchaseOrderType Reject
    PurchaseOrderType Requestor
    PurchaseOrderType User
    PurchaseOrderType CostCenter
    PurchaseOrderType ShippingInstructions
    PurchaseOrderType SpecialInstructions
    PurchaseOrderType LineItems
    LineItemsType LineItem
    LineItemType Description
    LineItemType Part
    ActionsType Action
    RejectionType User
    RejectionType Date
    RejectionType Comments
    ShippingInstructionsType name
    ShippingInstructionsType address
    ShippingInstructionsType telephone
    19 rows selected.

  • How to open a pdf form with fdf data

    Hi all,
          I am working on a new project. In that, I have to load a PDF contract form with FDF data on Internet Explorer Window.
    I don't know how to do it. Actually I tried using this format on the URL (while loading the respective page)
    http://www.example.org/pdf_file_name.pdf#FDF=http://www.example.org/fdf_file_name.fdf
    But it opened as an empty pdf document. . Actually I need it with the fdf data.
    Can anyone know any other way to do this?
    Or is this not possible to open a pdf form with fdf data in a browser?
    Thanks in advance
    Annamalai

    @ Bernd. It still opens a text file
    Here's my FDF file sample
    %FDF-1.2
    %âãÏÓ
    1 0 obj
    <<
    /FDF << /Fields
    <</V (07/22/2009)/T (Loan_Note_Date)>><</V (22.29)/T (Loan_AnnualPercentage_Rate)>></V ()/T (Seller_ESignatureArea1_Date)>><</V (GA Dealer)/T (Seller_Signer_FullNameTitle)>><</V ()/T (ThirdParty_ESignatureArea1_Date)>>
    /F (MARSMFLZ.pdf)/ID [ <1f0b6b55f345db39e8246247138fe562><e960588530b0d06d35cd618b34d4c314>
    ]>>
    >> endobj
    trailer
    <<
    /Root 1 0 R
    >>
    %%EOF
    (I have uploaded the related pdf file before.)
    Just now I got an idea to use WScript (the code is written in javascript)
    ws = new ActiveXObject("WScript.shell");
    ws.Run('"AcroRd32.exe" "C:\\annukar\\Refi\\Refinance_Module\\Forms\\Contract.fdf"', 1, true);
    this opens my fdf document in Acrobat reader using command prompt.
    I have a doubt now, can i use some string in place of "C:\\annukar\\Refi\\Refinance_Module\\Forms\\Contract.fdf" in the above command?
    I mean something like fdf_file = "C:\\annukar\\Refi\\Refinance_Module\\Forms\\Contract.fdf"
    and replace ws.Run('"AcroRd32.exe" fdf_file,1,true). I tried it but it doesn't work Any idea's? Since the path will not remain the same always. So i need to change it

  • How to calculate a week & Month in given date range (not for sele-options)

    Hi ,
      I have defined 2 date parameters in sel-screen (Plz remember that date variable are not a SELECT-OPTIONS).  Now i want ot display week nos & monts in output.
          Ex: date1: 20080101 & date2: 20080229. then
                    weeks : 1, 2, 3,---9.
                    months: jan-08, feb-08.
    Plz help me with block of code or any FM.
    Regards,

    Hi Srikanth,
            The FM HR_99S_INTERVAL_BETWEEN_DATES   is doesn't existing, but there is a fm HR_MX_INTERVAL_BETWEEN_DATES but it returns no of Years & Days.
           But i found some FM which r returns no of months for given date range. but my requirement is, want to display the month no bw 1 to 12. (ex: dat1=15-03-2008 & dat2= 01-06-2008 then in month fields 03,04,05 & 06. ).
    Plz help me on this.
    -Regards.

  • How to know the day of a given date?

    Hello Experts,
    Is there any function module that can give the day of a given date? For example, If
    I put in 10/30/2007, it will give me Tuesday. Hope you can help me guys.Thank you and take care!

    Hi
    Yes, DATE_COMPUTE_DAY
    Sample code:
      clear: hold_day_of_week.
      CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
                DATE = workdate
           IMPORTING
                DAY  = day_of_week_num
           EXCEPTIONS
                OTHERS  = 8.
      CASE day_of_week_num.
        WHEN 1.
          hold_day_of_week = 'Monday'.
        WHEN 2.
          hold_day_of_week = 'Tuesday'.
        WHEN 3.
          hold_day_of_week = 'Wednesday'.
        WHEN 4.
          hold_day_of_week = 'Thursday'.
        WHEN 5.
          hold_day_of_week = 'Friday'.
        WHEN 6.
          hold_day_of_week = 'Saturday'.
        WHEN 7.
          hold_day_of_week = 'Sunday'.
        WHEN OTHERS.
          hold_day_of_week = 'invalid'.
      ENDCASE.
    or 
    You can use  DATE_COMPUTE_DAY to get the day number of the week (for example, today gives 5)
    then use WEEKDAY_GET which returns an itab with seven entries (one for each day of the week.)
    You enter in this itab and get the field langt to get the day name.
    code @ http://www.sap-img.com/abap/fm-to-get-the-day-for-a-particular-date.htm
    Pls reawrd points

  • How to extract/format the calendar week from date?

    Hi,
    we are using WebI XI 3.1 SP3 in combination with SAP-BI(BW) 7.2.
    From a BW-Query we get a normal date (21.03.2011) and we want
    to show our KPIs/ key data per calender week (12.2011).
    In the universe-designer we only can get calender month from a calender day
    (right click to the dimension --> object format --> Date/.. --> Mmm jjjj).
    So the question is, HOW CAN WE GET THE CAL WEEK within SAP-BO (Universe/WEBI)?
    Thanks for help.

    Hi Tim,
    Can't you use the Week() function in Webi for this? It will return the week of the year as a number.
    Thanks

  • How to lock a pdf form after entering data

    Hi
    I have created certificate with editable fields for a client, I was of the thinking that the certificate is to be filled-in and printed however the client informed me that it is instead emailed to recipients. How can I make it possible for the client to lock the certificate after entering data.
    Bear in mind that the client is using Adobe Reader not Acrobat. I have tried setting a security password but Reader does not require the password in order to enable or disable the fields.

    If the user has Acrobat, not the free Reader, they could flatten the PDF form. If they only have Reader they can make the fields read only. They also might want to use a digital certificate to invisibly sign the PDF. Signing the PDF will add code to disclose if the PDF has been changed since it was signed.

  • How to calculate correct week startdate with given date

    import java.util.Date;
    public class MyDate
    public static void main(String args[]){
    Date d1 = new Date();
    System.out.println("The system date is "+d1.toString());
    //enter some date and it should get starting date and ending date
    //say for sample I enter 01/23/2006 and it should get
    //start date as 12.00 AM 01/23/2006 and end date as 11.99 01/29/2006
    //and it should automatically do whatever that gets for current
    //date
    Hi,
    I have some date has current date and it should calculate starting date of the week and the
    the next date that is 7 days old with one second less as described below
    //enter some date and it should get starting date and ending date
    //say for sample I enter 01/23/2006 and it should get
    //start date as 12.00 AM 01/23/2006 and end date as 11.99 01/29/2006
    //and it should automatically do whatever that gets for current
    //date
    Any help in this regard is appreciated.
    Thanks
    Chatf

    For starters, you'll want to use the java.util.Calendar class.

  • How to Search BPM Processes for a Given Date Range through a VC Report

    Hi All,
    We have a VC component build to view the BPM process information. Here we are supposed to provide a Date range option for searching the processes. But the Range search is not working.
    I tried in below ways.
    1. On Action Submit, I set the Occurance_D value as "=DSTR(@DATE_FROM,"M/D/YY")&" - "&DSTR(DADD(@DATE_TO,1,"D"),"M/D/YY")" it is working only if there are processes existing either on DATE_FROM or on DATE_TO, otherwise its not working.
    Like, I have 5 processes triggered on Sep-5-2011, then if i give the Date Range as 9/5/11 - 9/11/11  or 9/1/11 - 9/5/11  it is working. But if I give 9/1/11 - 9/11/11 it is not working.
    I tried this way as well.
    =DSTR(@DATE_FROM,"M/D/YY")&" : "&DSTR(DADD(@DATE_TO,1,"D"),"M/D/YY") . Even this is not working.
    Can some one please help.
    Regards,
    SrinivaS

    Dear SrinivaS,
    The main things you need to consider are:
    - store your date value from the UI in a store
    - the store gets used to submit a filter string in format (MM/DD/YY) to
    BI_START_TIME_D.
    If you follow http://help.sap.com/saphelp_nw72/helpdata/en/81/541300d147
    41b39057c8ab3be61f7a/frameset.htm
    you find that the process data source can be filtered in format  "9/9/11
    - 9/12/11" for field BI_START_TIME_D and BI_END_TIME_D.
    The trick is now at submission time to concatenate the strings
    accordingly and submit to BI_START_TIME_D. Use the following dynamic
    expression
    =DSTR(store@START_DATE_FROM,"MM/DD/YY")&" - "
    &DSTR(store@START_DATE_TO,"MM/DD/YY")
    to format the string during submission. I was able to verify this on my
    machine. I hope that also your locale settings work with this
    implementation.
    Find attached a link to a small sample application [(test_date.zip) |please find attached a small sample application (test_date.zip) which]which shows you the proper usage of a date picker in conjunction with the
    process data source. Please import the zip file into VC and deploy it.
    Best regards,
    Ralf.

  • How to get period date of for a given month from a given date in mdx for SSRS report (mm/dd/yyyy)

    I have a situation,  where i need to write expression Period to date(PTD). i want to know how to get the period date. i want you to help in writing Period date or else is there any function to get period date for a given date(the  date is given
    from the parameter dynamically) in MDX for SSRS report
    ram

    Hi ram,
    Per my understanding that you want to get the period date based on the month selected and the given date, right?
    Could you please provide details information below to help us better understanding your requirements, thus we will be more effective to provide an solution:
    What is the format of the period date you want to get, is this date in the DB and you want to filter it based on the month and the given Date?
    Did the month and given date are two parameters in the report? if possible, could you please provide some sample data in the DB and also the snapshot of the report structure
    I assume you want to get the period date(mm/dd/yyy) between the select month(e.g:Feb) and the given date (10/1/2014) and you should get the date between(02/01/2014-10/1/2014).
    If so,and you also have two parameter "Month","EndDate"(EndDate is the given date), please reference to details information below:
    You can create an new parameter "BeginDate" (Date/Time) which is the begin date of the period, you can use the expression to get the value based on the value of the month and the year value from the given date,finally hide this parameter:
    Specify the available value:
    Label:=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value)
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Specify the default Value:
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Add filter to the dataset as below:
    Preview you will get all the date in the given Period:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • How to download interactive adobe form

    Hi Experts,
    could you please tell me how to download interactive adobe form with filled data through report program (not by WebDynpro ABAP).
    Note:- The downloaded form should be static.
    Thankyou,
    B. Raghu

    Hi,
    look at the example report FP_TEST_00 in the workbench.
    Steps to generate an adobe form:-
    First get name of the generated function module
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
    *open the form for printing
      CALL FUNCTION 'FP_JOB_OPEN'
    Now call the generated function module
      CALL FUNCTION fm_name
    Close spool job
      CALL FUNCTION 'FP_JOB_CLOSE'
    Steps to download the adobe form on your PC:-
    convert the pdf into a binary file
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    *download the form on your PC
      CALL METHOD cl_gui_frontend_services=>gui_download
    Regards
    Manisha

  • First Date of the Given date and month

    Hi Evryone,
    I want to extract first day of the given date.
    For Ex: i aam giving date "30-jan-2013" but i want to show "01-jan-2013".
    In Oracle, Trunc function behaving mentioned above. So i need appropriote function in HANA to get the FIRSTDATE....
    I observed HANA Given last_date function but what about First_Date function? can i use it?
    Regards,
    Chandrakanth

    Hi Chandrakanth,
    Did you have a look on this blog:
    SAP HANA: Get the First Date and the Last Date of Month from a Given Date | WuaWua
    There is LAST_DAY in HANA but not FIRST_DAY.
    Since last day of the month may vary but first day of the month will always be '01'. Hence they may not have added that function.
    So either you can follow that approach in the blog or you can simply replace the day '01'.
    Regards,
    Krishna Tangudu

  • How many hosted web response forms allowed per month or per year with monthly and yearly plans?

    I am trying to pick out the right membership plan for us and the monthly plan and yearly plan allow a ceretain number of forms, however the membership materials do not clearly state how many hosted web response forms are allowed in each plan whether it is monthly or yearly? I need the answer before we decide

    With the Basic plan you can have up to 5 online forms at any given time. There is no quota per month or per year. If you need to create a another form after your reached the quota then just delete one of the other form first. There is no quota for the Plus plan.
    Same is true for the maximum responses. You can always export and delete responses to receive more if you have reached the maximum number of responses the plan allows.
    Not that the Plus plan comes cheaper per month than the Basic plan but this is because you get a discount for commiting for the whole year.
    Gen

  • How to insert a JavaBean in a given form in forms 9i ?

    How to insert a JavaBean in a given form in forms 9i????
    Hi,
    Would somebody tell me precisely the required steps to insert a javabean into a given form?
    Indeed, I tried with the slider sample: I create a bean area field, but when i attempted to insert the class name in the specific field in the form properties, I had an error message like "Could not find the class name". Although, the class needed does exist in some folder on my computer, I see it. When I run my form on the web, nothing happened in my form, and the bean area was blank !!!
    I don't know what should i do? is there any particular setting to carry out?
    Thank you very much in advance..

    Mohammed,
    the bean's jar file must be in teh Forms90_Builder_Classpath to instantiate the bean in teh Forms Development environment and should be in teh Forms90/Java directory at runtime. Also, at runtime, add the jar file to the archive_jini tag of your application.
    Frank
    Ps.: Check the Forms9i collateral on otn.oracle.com/products/forms for Java whitepapers.

Maybe you are looking for