Funtion Module to convet Date's month from numeric to words ???

Hi guys,
I have a requirement such that:-
For Date:- 06.07.2007 (DD.MM.YYYY)
i want it to display as 06-July-2007
Is there any funtion module to do that.
Regards
Rahul

Hi,
Please use code as under :
data : date(10),
        text1(26),
        num1(10),
        test_day(15),
        o_date(20),
        idate type sy-datum.
data : Day(2), month(2), Year(4).
data : ODay(2), Omonth(2), OYear(4).
data : Ltext Type T247-LTX.
date = '06.07.2007'.
day = date+0(2).
month = date+3(2).
year = date+6(4).
concatenate year month day into idate.
CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
  EXPORTING
    idate                               = idate
IMPORTING
   DAY                                 = oday
   MONTH                               = omonth
   YEAR                                = oyear
   LTEXT                               = ltext.
concatenate oday '-' ltext '-' oyear into o_date.
write : O_date.
Reward points, if helpful,
Sandeep Kaushik

Similar Messages

  • Function Module to convert date to week from Sunday to Saturday

    Hi,
    In BW the convertion date to week always give week from Monday(1) to Sunday(7)
    I'm looking for a function module to convert date to week from Sunday(1) to Saturday(7)
    Thanks
    Sebastien

    Hi,
    I think this SAP standardized. Maybe you need to create custom FM.
    You can copy SAP FM DATE_GET_WEEK. in the FORM FIRSTWEEK, I see below case,
    CASE start_weekday.
        WHEN if_calendar_definition=>c_monday.
          start_weekday_number = 1.
        WHEN if_calendar_definition=>c_tuesday.
          start_weekday_number = 2.
        WHEN if_calendar_definition=>c_wednesday.
          start_weekday_number = 3.
        WHEN if_calendar_definition=>c_thursday.
          start_weekday_number = 4.
        WHEN if_calendar_definition=>c_friday.
          start_weekday_number = 5.
        WHEN if_calendar_definition=>c_saturday.
          start_weekday_number = 6.
        WHEN if_calendar_definition=>c_sunday.
          start_weekday_number = 7.
      ENDCASE.
    Maybe you can play something here.

  • How do I display today's date and a date 1 month from today in livecycle designer

    Hello,
    Does anyone know how to display a future dates in 3 date fields that would be 1 month; 2 months and 3 months from today?
    I am making a sales contract form and in a date field is today's date (which can be altered if the user needs to change it).  The javascript I have is:
    if 
    (this.rawValue == null){
    var  
    msNow = (new Date()).getTime();
    var  
    d1 = new Date(msNow); this.rawValue
    = util.printd("mmm/dd/yyyy", d1);}
    else  
    { this.rawValue
    = rawValue;
    Then in the next date field i need to display the date 1 month from today
    The third date field 2 months from today
    the fourth date filed 3 months from today.
    Any suggestions would be greatly appreciated.

    Hi Peter,
    If you need to be more exact than adding 30 days then you can use the following code;
    function 
    addMonth(date){
      var year = date.getFullYear();  
      var month = date.getMonth();  
      var day = date.getDate();  month= (month % 12) + 1;  year
    += parseInt(month / 12); 
      var days = daysInMonth(month, year);  
      if (day > days)  {
        day= days;   }
      return new Date(year, month, day);}
     function  daysInMonth(iMonth, iYear){
      return 32 - new Date(iYear, iMonth, 32).getDate();}
    You need to pass in a Date object to addMonth so (assuming DateTimeField1 is your date field);
    NextMonth.rawValue= util.printd("mmm/dd/yyyy", addMonth(
    = util.printd("mmm/dd/yyyy", addMonth(
    Date.parse(DateTimeField1.formattedValue));
    Bruce

  • How to calculate first date of month from a given date in IDT BusinessObjects

    Hello Experts,
    I have a date field in IDT Universe which shows date in this format: Dec 13,2014 12.00.00 PM. Now I want to extract first day and last day of month from this date value. For example: here I want to see Dec 01,2014 12:00:00 PM and Dec 31, 2014 12:00:00 PM in First day of month and Last day of month columns. Also, if database date value is Nov 17, 2014 12:00:00 PM then in first day of month column, it should show Nov 01, 2014 12:00:00 PM and in last day of month it should show Nov 30, 2014 12:00:00 PM.
    I got some google help but 'Date' function is not supported by IDT tool in BusinessObjects.
    Please help.
    Thanks in advance.

    Hi
    Try to use the DB Functions to find out the First and last day. Please find out the below screenshot.
    If DB is BW, you can calculate the First and last day @ BW level use same object in BO directly.
    SQL DB:
    http://docs.oracle.com/html/A95915_01/sqfunc.htm#i1006893
    Oracle DB:
    http://msdn.microsoft.com/en-US/library/ms189794(v=sql.90).aspx

  • Defaulting date 3 months from present date

    HI!
    In my selection screen in my report I need to default a
    selection option to a future date which is 3 months from the
    present date. Can anyone tell me whats the way to do this so
    that I can add 3 montsh from the present date and default it in my selection screen.
    example : if we consider todays date  then we need to
    default that date to 9th of september 2008 so it keeps of
    changing everyday as dates proceed.
    Thanks

    Check the below program :
    REPORT ZTEST78 .
    data v_fdate type d.
    CALL FUNCTION 'HR_PSD_DATES_ADD_MONTHS'
      EXPORTING
        V_DATE             = sy-datum
       V_MONTHS           = 3
    IMPORTING
       E_DATE             = v_fdate
    EXCEPTIONS
      NOT_POSITIVE       = 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.
    write:/ v_fdate.
    do not add 90 days ,some months may have 31 or 29 or 28,you will not get exact calculation,so use FM 'HR_PSD_DATES_ADD_MONTHS'
    Thanks
    Seshu
    Thanks
    Seshu

  • Restrict last date of month from date picker

    Hi All,
    I have a requirement to restrict the date picker.
    I want to allow the user to select only the last date of the month from the following four months march, June, September and December.
    I have googled about this i couldn't get related that except that restrict invalid days/months.
    Please suggest to find solution for this.
    My Jdev version is 11.1.2.0.0
    Thanks in advance,
    SAN

    Hi,
    Have a backing bean to construct a list of days to be disabled and set that to disabledDays property of the picker component.
    Ex : Re: Bug on the property "disabledDays" of the component af|inputDate ?
    -Arun

  • GUI_Download funtion module problem

    HI All,
    I am Using GUI_Download funtion module for downloading data from internal table to flat file. But one of the field is having the value &#1054;&#1040;&#1054; "&#1057;&#1040;&#1053; &#1048;&#1085;&#1090;&#1077;&#1088;&#1073;&#1088;&#1102; &#1059;&#1082;&#1088;&#1072;&#1080;&#1085;&#1072;"
    After downloading data, the letters are being replaced by # in the download.
    If any one know please let me as early as possible.
    Thanks in advance.....
    Satish

    Check the sap documentation for the funtion module(Especially for CODE page)
    Character Representation for Output                                                                               
    Description                                                                               
    Use parameter CODEPAGE to specify the desired target codepage. If this 
        parameter is not set, the codepage of the SAP GUI is used as the target
        codepage.                                                                               
    Value range                                                                               
    4-digit number of the SAP codepage. Function module                    
        SCP_CODEPAGE_BY_EXTERNAL_NAME returns the SAP codepage number for an   
        external character set name such as "iso-8859-1". Function module      
        NLS_GET_FRONTEND_CP returns the related non-Unicode frontend codepage  
        for a language.                                                                               
    You can specify the desired codepage interactively, if the parameter   
        with_encoding of method file_save_dialog is set by                     
        cl_gui_frontend_services.                                                                               
    SPACE: Codepage of the frontend operating system.                      
    Regards,
    Ravi

  • 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

  • Set variant in infopackage to get backward data 1 month automatically

    Dear all,
    Could anyone tell me how could I set variant in infopackag => tab Data selection  to get backward data 1 month from schedule day (every Monday) automatically? 
    Many thanks & Regards,
    Bigtree K.

    Use this code...
    l_t_range-option = 'BT'
    l_t_range-sign = 'I'.
    l_t_range-low = SY-DATUM - 1.
    l_t_range-high = SY-DATUM.
    Append l_t_range.
    Take a look at this link for more info...
    http://help.sap.com/saphelp_nw04/helpdata/en/a3/4f8f3b294a7f2de10000000a11402f/content.htm

  • Load of XML datstore fails after change of PK in from numeric to varchar

    I am facing the following problem.
    I am trying to load an XML datastore (target) from an Oracle table (source) via an interface.
    The primary key in the Oracle table is of data type varchar. However, the primary key in the XML datastore after reverse engineering is created as datatype numeric. When I change the data type of the XML data store PK from numeric to varchar and then execute the interface the load fails with error:
    Wrong data type for input string.
    Taking the geo_dim.xml in the ODI demo folder as an example I take the following steps:
    - I reverse engineered the geo_dim XML that creates amongst other things the Country datastore in the XML model
    - When reverse engineering, ODI adds surrogate PK keys to the XML datastore. These are of data type numeric.
    - I change this surrogate PK key to data type varchar via the ODI designer and load the XML via an Interface from an Oracle source table that has a PK of type varchar.
    - The load of the XML datastore fails with the error "Wrong data type for input string."
    Looks like a bug to me. Any ideas?
    Thanks
    uli

    I figured this one out myself. As part of the JDBC URL you can submit a parameter ni. If set to false this will generate FKs and PKs as varchar.
    It's in the documentation:
    numeric_id or ni
    No
    boolean (true | false)
    true
    If set to true, all internal Primary and Foreign Keys are of NUMERIC type. Otherwise, they are of the VARCHAR type.

  • Function Module to Return MM/DD/YYYY after 6 Months from today's Date

    Hi,
    I need to find out the Month/Date/Year, after 6 months from the given Date. Can any one please suggest me a suitable Function Module to get the MM/DD/YYYY after 6 months from current date.
    Appreciate your help!
    Thanks,
    Kannan.

    You can also use :-
    RE_ADD_MONTH_TO_DATE
    Kindly reward in case useful.
    Regards,
    Darshan Mulmule

  • How to get the first day in the month from a domain date ?

    Hi,
    I like to know how to get the first day in the month from a domain date?
    Thanks
    Stephen

    Hi Gokul...
    Instead of using the funtion module you can just write the 3 statements of code to get the first day of the week.
    Its similar to the above one but instead of writing case statement you can achive the following.
    data : w_res type i,
             w_data type d,
    w_res = w_date mod 7.
    w_date = w_date - w_res.
    write w_date.
    This works.
    Regards,
    Siddarth

  • 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

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • How to make a report to display next 18 months of data with when user select a particular month from the filter in power pivot tabular model.

    Hi,
    i have a  dimension table  with month_key having values (201201,201202,201203.......202011,202012) and month name ( Jan 12, feb 12,......NOV 20, Dec 20)  and a fact  table with columns (month_key ,measure_types, Amount)
    My requirement is to create a power pivot report  in which when a user select a month from the filter, the report should display the (selected month+18 ) month's data against each type . when JAN 12 is selected ,the jan 2012 +18 = june 2013
    , month name should be populated with months till june 2013 only .
    i tried creating calculated column"END DATE " in the fact table with  dax expression to calculate the 18th monh from the current month  as below 
    month_key END DATE
    201201       201306    
    201202       201307      
    and thought of filtering the table with month key <= ENDDATE but it is not working as expected. could you please guide me on this ? Is there any time intelligence function that serve the purpose . Iam using  excel 2010
    ..hence could not do any calculation on the report side also. please suggest .
    Thanks in advance                                                                                                                                               

    Do you need to show the measure calculated for those 18 months as a total on 1 row, or do you need to select a single month and then display on row filters 18 distinct rows?
    The first is trivial as driezl has suggested.
    The second will require a second calendar table.
    I created this example workbook for a coworker who had a similar problem. You will have to use the disconnected table as your filter and pull your related table onto the rows.
    Finally, the easiest way to deal with the sort of date arithmetic you need to do is to restructure your date table to have a series of "Sequential" fields. These fields should be the number of units of time since the beginning of your calendar.
    For example, consider a calendar starting on January 1, 2010. For January - December 2010, [MonthSequential] = 1, 2, ..., 12. For January - December 2011, [MonthSequential] = 13, 14, ..., 24, and so on, incrementing by 1 for each sequential month in time.
    Assuming you have this set up in your date tables (one related to your model - DimDate - and one disconnected - DisconDimDate) your measure would look like this:
    18 Month Measure:=
    CALCULATE( [Measure]
    , FILTER( DimDate
    , DimDate[MonthSequential] >= MAX( DisconDimDate[MonthSequential] )
    && DimDate[MonthSequential] <= MAX( DisconDimDate[MonthSequential] ) + 18
    Please review this example along with the workbook I have linked above.

Maybe you are looking for

  • Error while creating Transport role

    Hi, I have created a new transport role - " Transport manager"  but unfortunately the import function of that doens,t work. It gives Error: "Unexpected Error. See System log for more details...." In the NWA i see:  ' ( ' com.sapportals.portal.transpo

  • How do I move files, photo's and itunes to new imac hard drive permanently?

    Hi, just bought (on route) new iMac and want to know how to move all files, photos and itunes to it hard drive permanently from my MacBook. MacBook being given to daughter after so want to transfer everything and then wipe clean. I am ok with compute

  • Loading xml file with multiple rows

    I am loading data from xml files using xsl for transformation. I have created xsl's and loaded some of the data. In an xml file with multiple row, it's only loading one (the first) row. Any idea how I can get it to read and load all the records in th

  • MR02 exemption to certain Document Types

    Hi all, Greetings of the Day Iam having a typical problem, I have an Invoice for which TDS has been deducted & TDS Document is generated. Both the Invoice & TDS Documents are Flagged with Payment Block "R". When I released the Invoice Document and tr

  • Non-editable view after succesful save of complaint

    Hello, We want to make the view of Complaints non-editable after succesful save of the Complaint. I think I must add some code in method EH_ONSAVE of component BT120H_CPL/ OVViewset. Do you have any idea of how to achieve this? Best Regards.