Function Module for converting timestamp

Hi all
I have a scenario where in the timestamp is getting stored in a z table in the UTC format (i.e. 20,100,125,080,528).
Now when i have to display this value to the user, it should be like "25.01.2010 08:05:28". Is there any standard function module to accomplish this? or is it like i have to do it in my code using the offset?
please guide me.
Thanks in advance.
Regards
Gaurav

Hello
Use this:
DATA:
tstamp  TYPE timestamp,
d TYPE D VALUE '19971224',
t TYPE T VALUE '235500'.
CONVERT TIME STAMP tstamp TIME ZONE 'UTC+12' INTO DATE d TIME t.
Just press F1 on TIME STAMP.

Similar Messages

  • Problem with Time stamp function module for converting US to Japan

    Hi All,
    I need standard function module for converting US Timestamp to Japan, Can any one let me know is there any standard function modules.
    thanks in advance!
    Regards,
    Kalidas.T
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:29 PM
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM

    Try this way:
    CONVERT TIME STAMP <tst> TIME ZONE <tz> INTO DATE <d> TIME <t>.
    CONVERT DATE <d> TIME <t> INTO TIME STAMP <tst> TIME ZONE <tz>.
    <tst> is of type P(8) or P(11) with 7 decimal places
    <tz> of type C(6)
    Refer to help.sap.com for more details.

  • Function module for converting the foreign currency to words

    hi,
    can anybody tell me about the function module for converting the foreign currency to words format.
    Like 25.50 USD
    should be "Twenty Five Dollar & Fifty Sents."
    foreign currency can be anyone like USD, JPY, EUR etc.
    Regards
    Nitin Varshney

    Hi,
    Try using the FM SPELL_AMOUNT
    Check this wiki
    [SPELL_AMOUNT|https://wiki.sdn.sap.com/wiki/display/Snippets/SpelltheAmountenteredin+words]
    Regards
    Sarves

  • Function module for converting number to exponential???

    Hi All
      please tell me Function module for converting number to exponential.
    Deepak

    try:
    REPORT Zconvertf.
    parameters p1 type p decimals 2 default '4711.99'.
    data f1 type f.
    move p1 to f1.
    write: / p1, f1.
    hope that helps
    Andreas

  • Function module for converting weight unit to another unit.

    What is the function module for converting weight unit to another unit.
    I want to convert LB to KG.
    Tried with fm UNIT_CONVERSION_SIMPLE.
    INPUT                           100
    NO_TYPE_CHECK
    ROUND_SIGN                      X
    UNIT_IN                         LB
    UNIT_OUT                        KG
    But there is no output.
    Can some one help.

    The trick here is we need decalre input output with non-character data type like VBPLK-BRGEW.
    We can test using normal SE37.
    I tested and this program worked fine:
       data: UNIT_IN  LIKE T006-MSEHI,
           UNIT_OUT LIKE T006-MSEHI,
           output LIKE VBPLK-BRGEW,
           input LIKE VBPLK-BRGEW.
    input = 10.
      CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
           EXPORTING
                INPUT    = INPUT
                UNIT_IN  = 'LB' "UNIT_IN
                UNIT_OUT = 'KG' "UNIT_OUT
           IMPORTING
                OUTPUT   = OUTPUT.
      write: output.

  • Function modules for converting Char value to hexadecimal value

    Hi All,
    Function modules for converting Char value to hexadecimal value.
    Thanks in advance

    Hi,
    use this function module:
    <b>RSS_UNIQUE_CONVERT_TO_HEX</b>
    regards
    Debjani
    Rewards point for helpful answer

  • Function module for converting sap script to smartforms?

    hi ,
       wat is the name of  function module for converting sap script to smartforms?
    regard's
    Deepak sharma

    Hi,
    No function module is there..
    But go to T-code..Smartforms and in the menubar..
    Utilities-->Migration->Import SApScript Form.
    U can thus migrate SAPScipt to smartforms...
    How ever a lot of changes have to be done in the migrated one,,
    Regards

  • Need Function Module for convertion of  Foreign currency to Indian currency

    hi friends,
    i need function module for converting amount from
    Foreign currency to Indian currency
    thanks

    hi Venkat,
    Please use the function module CONVERT_TO_LOCAL_CURRENCY
    <b><u>Sample code:</u></b>
          call function 'CONVERT_TO_LOCAL_CURRENCY'
            exporting
              date             = p_alv_tab-begda
              foreign_amount   = p_alv_tab-kkost_p_person
              foreign_currency = p_alv_tab-kwaer                 " foreign currency
              local_currency   = l_ev_waer                           " Indian currency
            importing
              local_amount     = p_alv_tab-kkost_p_person
            exceptions
              no_rate_found    = 1
              overflow         = 2
              no_factors_found = 3
              no_spread_found  = 4
              others           = 5.
    Hope this helps,
    Sajan Joseph.

  • Function module for convert date as sap internal format ?

    Hi All,
    Is there any standard function module to convert the date filed as SAP internal date?
    My problem is while uploading data from excel sheet date filed can be any format
    for exp: dd/mm/yyyy or mm/dd/yyyy or yyyy/dd/mm or dd-mm-yyyy,mm-dd-yyyy
                 dd-mm-yyyy or dd.mm.yyyy or mm.dd.yyyy  etc...
    In our case there is no particular format in excel it can be differ for each user. I know we have few FM's in standard.
    But those are not working for my req. pls help me if you have any idea.
    Thanks in advance.
    Regards,
    Venkat Mote.

    Hi Venkatesh,
    Can you please check with the following function module. For my case, it is working fine.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
      EXPORTING
        datum = p_gs_date
        dtype = 'DATS'
      IMPORTING
        idate = p_gs_date
    Hope it helps to you.
    Regards
    Rajkumar Narasimman

  • 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

  • Function module for converting German Data/Time to Indian Date/Time

    Dear All,
    My requirement is to convert German date and time to Indian date and time. Is there any function module available or any way we can get it?
    Thanks and regards,
    Atanu

    hi,
    first get the timezone of that country
    CALL FUNCTION 'TZON_LOCATION_TIMEZONE'
          EXPORTING
            if_country        = p_it_userid-zcountry
          IMPORTING
            ef_timezone       = l_tzone
          EXCEPTIONS
            no_timezone_found = 1
            OTHERS            = 2.
    then use the below statements
    -- Convert from server time to GMT
          CLEAR l_tstmp.
          CONVERT DATE l_datum
                  TIME l_ctime
             INTO TIME STAMP l_tstmp TIME ZONE sy-zonlo.
    *-- Convert from GMT to user backup time
          CONVERT TIME STAMP l_tstmp TIME ZONE it_usr_timezone-ztzone
            INTO DATE it_usr_timezone-zdate
                 TIME it_usr_timezone-ztime.

  • Function module for convertion

    hi,
    can any body send me function modules to extract location id(32 ) and location no . my input to this function modules must be location id(22).
    1)
    input location id (22)
    output
    loaction id (32)
    2)
    input location id (22)
    output
    location no.
    points will be awarded.
    regards,
    pradeep A.

    Pradeep - if you know the location and want to retrieve the locid or you know the locid and want to retrieve the location then go to table /sapapo/loc. This table will contain the guid in 22 length - in order to retrieve the 32 length guid call FM GUID_CONVERT or /SAPAPO/CIF_GUID_CONVERT. You can convert from 22 to 32 or 32 to 22 using these FM's.
    Regards
    Andy

  • Function module for USD amount to TWD

    Hi,
    Any one send me function module for converting USD currency to TWD.
    Thanks,
    donald

    HI,
    DATA: gd_fcurr TYPE tcurr-fcurr,
          gd_tcurr TYPE tcurr-tcurr,
          gd_date  TYPE sy-datum,
          gd_value TYPE i.
    gd_fcurr = 'USD'.
    gd_tcurr = 'TWD'.
    gd_date  = sy-datum.
    gd_value = 10.
    PERFORM currency_conversion USING gd_fcurr
                                      gd_tcurr
                                      gd_date
                             CHANGING gd_value.
    * Convert value to Currency value
    *&      Form  currency_conversion
    *       text
    *      -->P_GD_FCURR  text
    *      -->P_GD_TCURR  text
    *      -->P_GD_DATE   text
    *      <--P_GD_VALUE  text
    FORM currency_conversion  USING    p_fcurr
                                       p_tcurr
                                       p_date
                              CHANGING p_value.
      DATA: t_er        TYPE tcurr-ukurs,
            t_ff        TYPE tcurr-ffact,
            t_lf        TYPE tcurr-tfact,
            t_vfd       TYPE datum,
            ld_erate(12)   TYPE c.
      CALL FUNCTION 'READ_EXCHANGE_RATE'
        EXPORTING
    *       CLIENT                  = SY-MANDT
          date                    = p_date
          foreign_currency        = p_fcurr
          local_currency          = p_tcurr
          TYPE_OF_RATE            = 'M'
    *       EXACT_DATE              = ' '
       IMPORTING
          exchange_rate           = t_er
          foreign_factor          = t_ff
          local_factor            = t_lf
          valid_from_date         = t_vfd
    *       DERIVED_RATE_TYPE       =
    *       FIXED_RATE              =
    *       OLDEST_RATE_FROM        =
       EXCEPTIONS
         no_rate_found           = 1
         no_factors_found        = 2
         no_spread_found         = 3
         derived_2_times         = 4
         overflow                = 5
         zero_rate               = 6
         OTHERS                  = 7
      IF sy-subrc EQ 0.
        ld_erate = t_er / ( t_ff / t_lf ).
        p_value = p_value * ld_erate.
      ENDIF.
    ENDFORM.                    " currency_conversion
    You can use
    <b>CONVERT_TO_FOREIGN_CURRENCY</b> Convert local currency to foreign
    <b>CONVERT_TO_LOCAL_CURRENCY</b> Convert from foreign currency to local currency currency.

  • Function Module to convert Current Date & Time to Julain Date.

    Hi Guys,
                  Is there any Function Module for converting Current system Date to Julian Date.
    I only want a Function Module not any report program.
    Thanks......
    Sudheer.

    hiii
    i tried to find a FM for that but could not find any..ya after reading this thread i read about how julian date can be make..from this link only i read about Julian date
    and for this time is also needed but i think there is not any FM for this.still i am searching.let me know if you get any.

  • Function Modules for Data and Time

    Hi all,
              I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
    Thanks in advance

    Hi Ranjith,
    i think this will b usefull for you..
    SAP Bar Chart Function Modules and what they are used for
    Function module
    Used for
    BARC_GRAPHIC_PBO
    Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
    BARC_GRAPHIC_PAI
    Analyzing data returned by the graphic
    BARC_SET_TIME_AXIS
    Setting start and end of time axis
    BARC_SET_OPTIONS
    Setting options
    BARC_ADD_CHART
    Creating a chart
    BARC_SET_CHART_ATTRIB
    Setting chart attributes
    BARC_ADD_SECTION
    Creating a section on the time axis
    BARC_SET_SECTION_ATTRIB
    Setting section attributes
    BARC_ADD_RIBBON
    Adding a ribbon to the time axis
    BARC_SET_RIBBON_ATTRIB
    Setting attributes for ribbons in the chart
    BARC_ADD_GRID
    Adding a time grid
    BARC_SET_GRID_ATTRIB
    Setting grid attributes
    BARC_ADD_LAYER
    Adding a layer (graphic elements)
    BARC_SET_LAYER_ATTRIB
    Setting layer attributes
    BARC_ADD_LINE
    Adding a line
    BARC_ADD_CALENDAR
    Creating a calendar
    BARC_SET_CALENDAR_ATTRIB
    Setting attributes for a calendar
    BARC_ADD_TIME_PROFILE
    Creating time profiles
    BARC_SET_TIME_PROFILE_ATTRIB
    Setting attributes for time profile
    BARC_ADD_INTERVAL
    Adding a time interval
    BARC_SET_INTERVAL_ATTRIB
    Setting time interval attributes
    BARC_ADD_TIME_OBJECT
    Creating a time object
    BARC_CONVERT_DATE
    Creating a date string in bar chart format
    BARC_REVERT_DATE
    Converting a date string in bar chart format to date and time
    BARC_ADD_DATELINE
    Creating a date line
    BARC_SET_DATELINE_ATTRIB
    Setting dateline attributes
    BARC_GET_PROFILE_CONTENTS
    Obtaining profile contents for customizing a chart
    BARC_GET_COLUMN_WIDTH
    Selecting new column width
    BARC_SET_COLUMN_WIDTH
    Setting the column width
    BARC_GET_TEXTINDEX
    Obtaining the text index of a field
    BARC_SET_LABELS
    Positioning the chart display
    BARC_SET_COLUMN_ATTRIB
    Setting column attributes
    BARC_SET_ROW_ATTRIB
    Setting row attributes
    BARC_SET_ROW_HEIGHT
    Setting the line height
    BARC_SET_MAXCHARTS
    Setting the maximum number of charts sent
    <b>If its usefull reward points
    </b>

Maybe you are looking for

  • Lenovo 3000 n200 Type: 0769 game graphics problem

    Hi, I have a Lenovo 3000 n200 Type 0769 laptop which served me well at university with my 3D modelling in SolidWorks for my projects. However, when I tried to run games on it, the games always crash, even on a very low setting graphics setting which

  • Problem accessing hard drive for more than one user at the same time

    Hello all, I recently bought a 2nd generation AirPort Extreeme 802.11n to replace a cheapo wireless router. The main reason I wanted to get the AirPort was so I could attach a USB hard drive which holds iTunes music files Originaly I had a G4 MDD and

  • Nomad Jukebox Zen Xtra - cannot install firmware - PC says device "not connected&qu

    Hi everyone,?Below is a message I've just sent to Customer Support, but I thought I'd also post it here in case anyone has any words of wisdom. Thanks in advance for your help. -- - Dear Madam or Sir,?Yesterday, I tried to connect my Zen Xtra to my P

  • Elements 5.0 Organizer Freezing when I try to download my pics

    I am trying to download pictures from my vacation.  I plugged in my camera like usual, and when I select for my pictures to be downloaded in photoshop, everything freezes.  Then I went into organizer - which I could open - but when I go to get photos

  • Questions on DMS connector for KM

    Hi, I have two questions for this BP: I have installed this pachage into my portal 7.0. VariantPrefix is configured with 'KM' in  "System Administration -> System Configuration  ->  Knowledge Management  -> Content Management  -> Repository Managers