Is there any function module to convert the date format

Dear ABAPers,
Is there any function module to convert the date format from dd.mm.yyyy to dd-mmm-yyyy.
       I want to convert the date format from dd.mm.yyy to dd.mmm.yyy Eg.from 10.03.2008 to 10-mar-2009.
Thanks & Regards,
Ashok.

hi,
create custom function module or copy the below code in the report ..and use it
the out put for below is :----Convert a DATE field into a full format date eg. March 23, 2000
FUNCTION Z_CONVERT_DATE_INTO_FULL_DATE.
""Local interface:
*"       IMPORTING
*"             VALUE(DATE) LIKE  SY-DATUM
*"       EXPORTING
*"             VALUE(FORMATTED_DATE)
*"       EXCEPTIONS
*"              INVALID_DATE
TABLES: TTDTG.
DATA: BEGIN OF T_DATE,
        YYYY(4) TYPE C,
        MM(2) TYPE C,
        DD(2) TYPE C,
      END OF T_DATE.
DATA: DAY(3) TYPE N.
DATA: VARNAME LIKE TTDTG-VARNAME.
IF DATE IS INITIAL.
  CLEAR FORMATTED_DATE.
  EXIT.
ENDIF.
check document date format
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
  EXPORTING
    DATE = DATE
  EXCEPTIONS
    PLAUSIBILITY_CHECK_FAILED = 1.
IF SY-SUBRC NE 0.
  RAISE INVALID_DATE.
ENDIF.
MOVE DATE TO T_DATE.
CONCATENATE '%%SAPSCRIPT_MMM_' T_DATE-MM INTO VARNAME.
SELECT SINGLE * FROM TTDTG WHERE SPRAS = 'EN' AND VARNAME = VARNAME.
WRITE T_DATE-DD TO DAY.
CONCATENATE DAY ',' INTO DAY.
CONCATENATE TTDTG-VARVALUE DAY T_DATE-YYYY INTO FORMATTED_DATE
  SEPARATED BY SPACE.
ENDFUNCTION.
the output is :--Convert a DATE field into a full format date eg. March 23, 2000
Regards,
Prabhudas

Similar Messages

  • Is there any function module to get the data from st06?

    Hi,
    I'm new to this forum.
    I would like to know if there is a way (maybe some function modules) to collect information like system architecture, and databases as displayed in transaction st06?
    I would like to call it from external program in order to view part of the data available in st06.
    Thanks,
    Erez Gordon.

    have a look at function group SMON.
    Not sure if these are remote enabled, otherwise create a wrapper function module (RFC).
    Edited by: Micky Oestreich on Dec 11, 2008 9:37 AM

  • Function module to change the date format

    hi guys
    is there any function module to change the date format
    from 08/28/2007(mm/dd/yyyy)
    to August 28, 2007.
    regards
    vamsi

    hi vamsi.,
    Use  CONVERSION_EXIT_SDATE_OUTPUT to get the month name,
    but it will give short form of the month name.
    if you want <b>long description of the month</b>,
    use this peice of code.
    PARAMETERS: V_DATUM(07) TYPE C. "(example input:12-2007)
      DATA:     V_MON(2)  TYPE C,
                V_YEAR(4)      TYPE  C,
                V_MONTHNAME(10) TYPE C,
                V_FULLDATE(30) type c.
    WRITE  V_DATUM+0(2) TO V_MON.
    SELECT SINGLE LTX FROM T247 INTO V_MONTHNAME
    WHERE        SPRAS = SY-LANGU
         AND       MNR  = V_MON.
    CONCATENATE  V_MONTHNAME  v_datum+3(4)
                      INTO V_FULLDATE  SEPARATED BY SPACE.  "(example output : December 2007)
                      write: v_fulldate.
    <i><b>Reawrd points if useful</b></i>
    Chandra

  • Is there any function module to convert hexadecimal format to normal decima

    Hi,
    is there any function module to convert hexadecimal format to normal decimals.
    Regards,
    Nandha.

    HI Naddy,
    simply do this..
    parameters  : num1(5) type x.
    data : dec type i.
    dec = num1.
    write : dec.
    remember to pad the input with zeros
    regards
    satesh

  • Is there any function module to get the variables used in a query?

    Hi experts
    Please, do you know if is there any function module to get the variables used in a query?
    Thanks and regards
    Luis

    Hi Srini
    Yes, I have checked the tables but I need a function module
    Thanks anyway!
    Luis

  • Is there any function module to convert date format?

    Is there any function module to convert date format from mm/dd/yyyy to dd.mm.yyyy or sy-datum?

    Hi,
    wirte statement converts any date fomat in system date fromat
        WRITE w_DateTO w_date_sys.
    Regards,
    Sriram

  • Is there any function module to Change the System Status

    Dear ABAPers,
             I am working in the Customer Service Module.I want to change the System status.
    Is there any function module to change the System Status.
    Thanks & Regards,
    Ashok.

    Hi Ashok
    Service Order status update function module ?
    How to set the system status
    Check above threads,
    Regards,
    Syf

  • Is there any function module for converting text to hyperlink?

    Hello all,
              I am designing an application in BSP wherein the user can enter hypertext values for some
              of the data enteries in the database table. Is there any function module available for converting
              text into hypertext. Eg. if the user enters 'www.mypersonalwp.com' then it should convert this
              text value into a hyperlink.
    Thanks in advance.
    Gurmahima.

    Hi,
    Refer the given below link
    http://help.sap.com/saphelp_erp2004/helpdata/EN/85/ce25c2d7ae11d3b56d006094192fe3/content.htm
    Hope it helps you
    Thanks
    Arun Kayal

  • Is there any function module to download abap data to a word document?

    Hi all,
    I know that the downloading to word can be done by ole automation...But is there any function module in sap which can do the same....?? please let me know your expert comments.......

    Hello Rich,
    I have tried the function module word_ole_formletter ..but i am facing a problem...once i execute the program i can see that the data is coming to word document but it is coming in read only mode and again reverting back to a blank document as was befor the data is coming to word document..Can you suggest where i am going wrong...Also I tried to debug the function module but the break point is not coming to the function module ....

  • Is there any function module to get the purchase order conditions from EONP

    Hi,
    I want to get the EONP and EONH table details for the purchase orders with the help of function module. Can anyone tell me any function module name which would give me those details.
    Thanks,
    Atanu

    Hi
    Check with BAPI function module BAPI_PO_GETDETAIL and BAPI_PO_GETDETAIL1.
    Regards
    Srilaxmi

  • Is there any function module to get the no. of days in a month?

    hi all,
    if i have the month and year then is there any FM by which i can get the no. of dayz in that month?
    regards,
    shweta upadhyay.

    Hi swetha,
    i have written my own function module,may be it helps u.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(DAY_IN) LIKE  SY-DATUM
    *"  EXPORTING
    *"     VALUE(FIRST_DAY_OF_MONTH) LIKE  SY-DATUM
    *"     VALUE(LAST_DAY_OF_MONTH) LIKE  SY-DATUM
    *"     VALUE(NUMBER_OF_DAYS) TYPE  I
    *"  EXCEPTIONS
    *"      DAY_IN_NO_DATE
      DATA: BEGIN OF DATE,
              J(4),
              M(2),
              T(2),
            END OF DATE.
      DATA: ZAHL TYPE I.
      DATA: DAYS_SUBTRACT TYPE I.
      DATA: XDATUM TYPE D.
      XDATUM = DAY_IN.
      XDATUM+6(2) = '01'.
      XDATUM = XDATUM + 35.
      XDATUM+6(2) = '01'. XDATUM = XDATUM - 1.
      NUMBER_OF_DAYS = XDATUM+6(2).
      DATE = DAY_IN.
      IF DATE-M LT JANUARY OR DATE-M GT DECEMBER.             
        raise DAY_IN_NO_DATE.
      ENDIF.
      IF DATE-J LT LOWDATE.                 
        raise DAY_IN_NO_DATE.
      ENDIF.
      IF DATE-J EQ HIGHDATE-J AND
         DATE-M EQ HIGHDATE-M.
        LAST_DAY_OF_MONTH = HIGHDATE.
      ELSE.
        IF DATE-M EQ DECEMBER.
          ZAHL = DATE-J + 1.
          UNPACK ZAHL TO DATE-J.
          DATE-M = FRIST.
          DAYS_SUBTRACT =   NUMBER_OF_DAYS - 1.
        ELSE.
          ZAHL = DATE-M + 1.
          UNPACK ZAHL TO DATE-M.
          DAYS_SUBTRACT =   NUMBER_OF_DAYS - 0.
        ENDIF.
    First of the subsequent month
        DATE-T = FRIST.
        LAST_DAY_OF_MONTH = DATE.
        FIRST_DAY_OF_MONTH = DATE.
        SUBTRACT 1 FROM LAST_DAY_OF_MONTH.
        SUBTRACT DAYS_SUBTRACT FROM FIRST_DAY_OF_MONTH.
      ENDIF.
    ENDFUNCTION.
    regards,
    nagaraj

  • Is there any Function Module will give the Transactional data of a cube?

    Hi Experts,
    I have one Infocube Zco3_BILT , I need to write a routine (BADI Program)on top of this info cube  to fetch a characterstic value in the infocube.
    F table  & Etable wont give any characterstic values.
    Is There any SAP provided FM to give characterstic values of the Infocube.
    Thanks in advance.
    Regards
    Mohan

    Hi Mohan,
    this is correct since the values are stored in different tables (fact, dimension etc) due to star sheme modelling. As far as I know there is no standard function module for this issue.
    However ABAP report RSDD_SHOW_ICUBE might help. This is the report for transaction listcube, all relevant data is build up, there you should find all necessary steps and standard reports/modules to fetch the required characteristic value. Although I do not know the exact requirement you will probably have to work with SID values.
    Perhaps this will help resolving your issue.
    Best Regards,
    Marcel

  • Is there any Function Module  to delete the  Responsibility for buyer

    Hi,
            I am able to insert a responsibility for a buyer using the FM, BBP_UPDATE_ATTRIBUTES. Can any one can tell me is there any FM to delete the responsibity for buyer. The BBP_UPDATE_ATTRIBUTES is not working for deletion and It is taking lot of time when i am trying to delete rsponsibility by using  the transactio code PPOSA_BBP .
    I found one badi, HRBAS00INFTY but there are no exporting or changing parameters in that badi to write some logic to delete.
    The  FM ,RH_BASE_UPDATE_DB_DIALOG is getting executed and updating the data base tables after the above badi got executed. can i use this FM ,RH_BASE_UPDATE_DB_DIALOG directly to delete the responsibility?I think it is not recomended.
    can any one give me some idea.

    Hi. You can use transaction PP01 instead of PPOMA_BBP.
    You might have to make some settings in table T777I to allow the responsibility to be maintained from PP01, but it it a lot faster than PPOMA_BBP, and you could use an ECATT or call transaction on PP01.
    You can also delete all the infotype using PP01, basically delete all the responsibility in 1 go if that is any use? Try all this in a test system first toget used to it though.
    Regards,
    Dave.

  • Is there any function module to convert date formats

    i want to conver from any format of date to mmddyyyy
    how to do this

    hi,
    use fm CONVERT_DATE_TO_INTERNAL
    or try:
    concatenate p_date4(2) p_date6(2) p_date(4) into o_date.
    Andreas
    Message was edited by: Andreas Mann

  • Function module to predict the date for a given date

    hi friends,
    is there any function module to predict the date
    means  for example if i enter one date  , what will be the date
    after 4 months(say)  to the given date.
    my requirement is when a person is hired today (10.06.2008)
    and if he is under probationary for 6 months, then on what date he comes into the permenant employee's list(predicted date after date 6 months)

    Date calculations
    DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
    DATE_IN_FUTURE Calculate a date N days in the future.
    RP_CALC_DATE_IN_INTERVAL Add days/months to a date
    RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date
    SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
    MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
    DATE_CREATE Calculates a date from the input parameters:
    Example: DATE_CREATE
    CALL FUNCTION 'DATE_CREATE'
    EXPORTING
       anzahl_jahre  = 1
       anzahl_monate = 2
       anzahl_tage   = 3
       datum_ein     = '20010101'
    IMPORTING
       datum_aus     = l_new_date.
       Result:
       l_new_date = 20020304
    Example: MONTH_PLUS_DETERMINE
    data: new_date type d.
    CALL FUNCTION 'MONTH_PLUS_DETERMINE'
    EXPORTING
    months = -5 " Negative to subtract from old date, positive to add
    olddate = sy-datum
    IMPORTING
    NEWDATE = new_date.
    write: / new_date.

Maybe you are looking for

  • Printing slow

    Adobe Reader and Acrobat are printing extremely slow from Windows 8 to HP Officejet 8630. Any suggestions appreciated.

  • New ipod, old itunes HELP!

    my ipod recently got stolen & i purchased a new one. Both are ipod videos 30 GB. but now that i have this new one my itunes doesnt do anything when i plug it in and i cant upload my music, videos, ect. onto it. I have TONS of songs and i do not want

  • Peak Audio Files

    Having real problems with peak audio generation.  Lots of projects that I open or re-open that where created in any version of Premiere CC (including 2014) have the wave form missing.  I have tried clearing the media cache to force Premiere to re-gen

  • Unable generate Barcode in XML publishar reports

    Hi all, I have requirement to generate Barcode in XML publisher Report in Oracle apps. for that i did following things 1) donloded the free font "free3of9" and copied in Font folder in windows and added bellow code in xdo.cfg <font family="Free 3 of

  • Ms SCM has compatibility issue with MS SQL 2008 & 2008 R2

    Hi, I'm trying to install Ms Security Compliance Manager in Windows 8.1  (64-bit machine). During the installation, it gives me the following error message: This program has compatibility issues Microsoft SQL Server (2008 & 2008 R2) Could anyone help