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
Similar Messages
-
Is there any function module to convert date formats
i want to conver from any format of date to mmddyyyy
how to do thishi,
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 -
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 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 -
Is there any function module that generates date of 30th september of next
is there any function module that generates date of 30th september of next year.?
May be u mean...20100930
You can simply
Add 10000 to this years sept 30...If you want sept 30 from today...
Data: G_DATE Type Sy-DATUM.
G_DATE = Sy-DATUM.
G_DATE+4(02) = '09'.
G_DATE+6(02) = '30'.
G_DATE0(04) = G_DATE0(04) + 1.
Santhosh -
Function module to convert date format to yyyymmdd
Hi All,
Would like to seek for your advice. Is there any function module to convert the date format from mm/dd/yyyy to yyyy/mm/dd? Thanks in advance.
Regards,
Shawn
Moderator Message: Basic date question. Thread locked.
Edited by: Suhas Saha on Dec 30, 2011 12:44 PMHi,
Use the FM CONVERT_DATE_TO_EXTERNAL.
Edited by: emax nagu on Dec 30, 2011 7:53 AM -
Function module to convert date format from yyyymmdd to mmddyyyy format
function module to convert date format from yyyymmdd to mmddyyyy format
Hi Rajitha,
Do like this
Data: Var1 type sy-datum,
var2(8) type c.
var1 = sy-datum.
Concatanate var1+4(2) var1+6(2) var1+0(4) into var2.
write var2.
Reward Points if this helps,
Satish -
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 to Convert date formate
Hi All,
I need to convert the date formate from ex :01-Jan-2009 into 01-01-2009.
Is there any Function Module for this?
Thanks
Partha.
Moderator message - Babu Kilari is correct - post locked
Edited by: Rob Burbank on Apr 27, 2009 9:36 AMHello Partha,
I wanted to ask you a question. Why did you not search SDN Forums before posting.
I think the time take for posting is higher than the time taken for searching.
Am I right??
Please let me know. I think the question you have posted is very basic
Thanks,
Babu Kilari -
Function module to convert date format
hi all,
i need a function module which will take the input as 09.02.2006(mmddyyy) and the out put should be sep-06. etc.
Thanks & Regards
sureshHi Suresh,
Use the function module 'MONTH_NAMES_GET' to get the month name and then use CONCATENATE to get SEP-06.
You can also check another post which is currently running 'Regarding Date Format'.
Thanks
Vinod -
Function module to change date format
hi
is there any function module to change date format from 20080318 to 18.03.2008Hi,
Use this FM CONVERT_DATE_FORMAT Convert date from yyyymmdd to ddmmyyyy format
Regards,
Jyothi CH. -
Function module to convert date and time
Hi ,
Requirment is i want to create a file in the application server.So the file name should be in the following format.
0XX-XXXX-YYYYMMDDHH.format.
in this HH-hours.I need to take current date and time.so is there any function module to convert into this format.If it is not there how to create file name in this format.
Thanks,
MRREPORT ZTEST_CONV.
data: time_stamp TYPE timestampl.
GET TIME STAMP FIELD time_stamp.
You can try with GET TIME STAMP
But it will be in Different format. -
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 todelete decimal values
hi all
is there any function module todelete decimal values not converting charcter or numeric values i want to change my value with decimals to with out decimals.
please give me suggetion.
Thanks
Ramana reddyhi dear
you can use type P or I
Data W_VAL type P.
Data W_VAL type I.
or assigned dictionary field like Mara-MATNR as getting your value
Rewards if Useful. -
Hi is there any function module for radix conversion
Hi,
I need to convert number of base 36 to decimal number. Is there any function module for that.
i.e) z to 35
10 to 36
11 t0 37Hai,
This program perfectly converts a number from one number system to another number system.
REPORT Z_RADIX_CONVERSION.
PARAMETERS:
P_S_RAD(2) TYPE N, " Source Radix
P_D_RAD(2) TYPE N, " Destination Radix
P_S_NUM(5) TYPE C. " Source Number
*" Data declarations...................................................
Work variables *
DATA:
W_LEN TYPE I,
W_FACT TYPE I,
W_D_NUM(5) TYPE N,
W_T_LEN TYPE I,
W_NUM TYPE C,
W_NUM1 TYPE I,
W_REM TYPE I,
W_INDEX TYPE I VALUE 20,
W_T_NUM(30) TYPE C,
W_T_NUMBER(5) TYPE N.
IF P_S_RAD GE 1 AND
P_S_RAD LE 16 AND
P_D_RAD GE 1 AND
P_D_RAD LE 16.
IF P_S_RAD EQ 01 AND P_S_NUM CO '0 ' OR
P_S_RAD EQ 02 AND P_S_NUM CO '01 ' OR
P_S_RAD EQ 03 AND P_S_NUM CO '012 ' OR
P_S_RAD EQ 04 AND P_S_NUM CO '0123 ' OR
P_S_RAD EQ 05 AND P_S_NUM CO '01234 ' OR
P_S_RAD EQ 06 AND P_S_NUM CO '012345 ' OR
P_S_RAD EQ 07 AND P_S_NUM CO '0123456 ' OR
P_S_RAD EQ 08 AND P_S_NUM CO '01234567 ' OR
P_S_RAD EQ 09 AND P_S_NUM CO '012345678 ' OR
P_S_RAD EQ 10 AND P_S_NUM CO '0123456789 ' OR
P_S_RAD EQ 11 AND P_S_NUM CO '0123456789A ' OR
P_S_RAD EQ 12 AND P_S_NUM CO '0123456789AB ' OR
P_S_RAD EQ 13 AND P_S_NUM CO '0123456789ABC ' OR
P_S_RAD EQ 14 AND P_S_NUM CO '0123456789ABCD ' OR
P_S_RAD EQ 15 AND P_S_NUM CO '0123456789ABCDE ' OR
P_S_RAD EQ 16 AND P_S_NUM CO '00123456789ABCDEF ' .
W_LEN = STRLEN( P_S_NUM ).
W_T_LEN = W_LEN - 1.
DO W_LEN TIMES.
W_NUM = P_S_NUM+W_T_LEN(1).
CASE W_NUM.
WHEN 'A'.
W_NUM1 = 10.
WHEN 'B'.
W_NUM1 = 11.
WHEN 'C'.
W_NUM1 = 12.
WHEN 'D'.
W_NUM1 = 13.
WHEN 'E'.
W_NUM1 = 14.
WHEN 'F'.
W_NUM1 = 15.
WHEN OTHERS.
W_NUM1 = W_NUM.
ENDCASE.
W_D_NUM = W_D_NUM + W_NUM1 * ( P_S_RAD ** W_FACT ).
ADD 1 TO W_FACT.
SUBTRACT 1 FROM W_T_LEN.
ENDDO.
ELSE.
WRITE'Invalid Number'(003).
ENDIF.
ELSE.
WRITE'Enter radix between 1 and 16 '(002).
ENDIF.
W_T_NUMBER = W_D_NUM.
IF P_D_RAD = 1.
DO W_D_NUM TIMES.
WRITE'O'.
ENDDO.
ELSE.
WHILE W_T_NUMBER NE 0.
W_REM = W_T_NUMBER MOD P_D_RAD.
CASE W_REM.
WHEN 10.
W_T_NUM+W_INDEX(1) = 'A'.
WHEN 11.
W_T_NUM+W_INDEX(1) = 'B'.
WHEN 12.
W_T_NUM+W_INDEX(1) = 'C'.
WHEN 13.
W_T_NUM+W_INDEX(1) = 'D'.
WHEN 14.
W_T_NUM+W_INDEX(1) = 'E'.
WHEN 15.
W_T_NUM+W_INDEX(1) = 'F'.
WHEN OTHERS.
W_T_NUM+W_INDEX(1) = W_REM.
ENDCASE. " CASE W_REM.
SUBTRACT 1 FROM W_INDEX.
W_T_NUMBER = W_T_NUMBER DIV P_D_RAD.
ENDWHILE.
ENDIF.
WRITE:
/10 'The Equivallent number in Base'(001),
P_D_RAD,
'is',
W_T_NUM.
<b>Reward points if helpful .</b>
regards,
rama pammi
Maybe you are looking for
-
Print error scheduling a background job
HI I am using Transaction F110 Automatic Payment. When I am scheduling job for printing in background,I am getting error The error <Status Text in spool > states front end unavailable. Any inputs asap pls
-
No internet connection after Mavericks upgrade
Hi All, I have recently installed Mavericks on a drive and imported the settings from Mountain Lion. When booted in Mavericks I am connected to the internet from my Time Capsule to the system through ethernet which is fine, however the Time capsule i
-
Internet through computer connection
Is there a way I can connect to the internet by pluging my iPhone into my Mac directly? I've tried and it doesn't seem to work. Is there a setting I need to put into place?
-
Error reading ByteArrayInputStream after Parsing it.
Hello All, I have an XML string: String ji = "<book><person>dsdds</person></book>"; ByteArrayInputStream str = new ByteArrayInputStream(ji.getBytes());I can succesfully read it into a ByteArrayOutputStream like this: ByteArrayOutputStream bos = new B
-
Unable to access Music Store w/ new v.7
I am unable to get into the Music Store since I've updated to the new versions of Quick Time and iTunes.