‎2008 Jul 09 11:54 AM
If the date is 01-01-08 , i want the output as Jan 01, 2008.
How can i get this ?
‎2008 Jul 09 12:02 PM
‎2008 Jul 09 12:01 PM
hi,
retrieve the 3-char month name from table t009c and use it to concatenate with the year and date to achieve your requirement
regards,
Peter
‎2008 Jul 09 12:02 PM
‎2008 Jul 09 12:02 PM
‎2008 Jul 09 12:08 PM
Hi,
Try this code.
DATA: day(2) TYPE c,
month(2) TYPE c,
month_in_words(3) TYPE c,
year(4) TYPE c,
delimiter(1) TYPE c VALUE '-',
date(10) TYPE c,
altered_date(10) TYPE c.
date = '01-01-2008'.
SPLIT date AT delimiter INTO day month year.
CASE month.
WHEN '01'.
month_in_words = 'JAN'.
WHEN '02'.
month_in_words = 'FEB'.
WHEN '03'.
month_in_words = 'MAR'.
WHEN '04'.
month_in_words = 'APR'.
*< continue this till when '12' >
ENDCASE.
CONCATENATE month_in_words space day ',' year INTO altered_date.
WRITE: altered_date.
Reward if Helpful.
‎2008 Jul 09 12:14 PM
Dear,
Use below code to get the monthg name and u can concatenate again what are the format u want.
concatenate date0(2) date3(2) date+6(4) to date1.
CALL FUNCTION 'ISP_GET_MONTH_NAME'
EXPORTING
DATE = DATE1
LANGUAGE = 'EN'
MONTH_NUMBER = '00'
IMPORTING
LANGU_BACK =
LONGTEXT = MONTH1
SHORTTEXT = MONTH2
EXCEPTIONS
CALENDAR_ID = 1
DATE_ERROR = 2
NOT_FOUND = 3
WRONG_INPUT = 4
OTHERS = 5
Thanks and Regards,
Edited by: chandra madapati on Jul 9, 2008 1:15 PM
‎2008 Jul 09 12:22 PM
Hi,
MONTH_NAMES_GET -It returns all the month and names in repective language and
refer to the link below to have a look at the other FM
http://www.erpgenie.com/abap/functions.htm
regards
pritam.
‎2008 Jul 09 12:24 PM
Hi Manjunath CN,
Here i am assuming that input date format is DD-MM-YY
If not then modify it according to ur need...
REPORT ZILESH_TEST_DATE_FORMAT.
DATA : LCDATE_IN(8),
LCDATE_OUT(13),
DD(2),
MM(2),
YY(2),
LCDATE_IN2 LIKE SY-DATUM.
LCDATE_IN = '13-01-08'.
DD = LCDATE_IN+0(2).
MM = LCDATE_IN+3(2).
YY = LCDATE_IN+6(2).
CONCATENATE '20' YY MM DD INTO LCDATE_IN2.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
INPUT = LCDATE_IN2
IMPORTING
OUTPUT = LCDATE_OUT.
CONCATENATE LCDATE_OUT+2(3) LCDATE_OUT(2) ',' LCDATE_OUT+5(4) INTO LCDATE_OUT SEPARATED BY SPACE.
WRITE : / LCDATE_OUT.Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
‎2008 Jul 09 12:28 PM
Hi ,
you can get the month descrption in table T247 based on month number.
Regards,
kv.