‎2006 Sep 13 5:40 AM
hi all..
i want to diaply sy-datum in format like 20 january 2000..
the month should be in like janu, Feb ...
any suggestion..
venakt
‎2006 Sep 13 5:43 AM
Hi ,
hard code the Months like this .
date = sy-datum+6(2).
month = sy-datum+4(2).
year = sy-datum+0(4).
if month = 01.
mon = 'JAN'
else if.
like that.
endif.
finally u can disply
date_final = 20 jan 200.by using concatenate command.
Regards
Prabhu
‎2006 Sep 13 5:40 AM
use table <b>t247</b>
or u can use fm...
<b>CONVERSION_EXIT_IDATE_OUTPUT</b>
‎2006 Sep 13 5:43 AM
Hi ,
hard code the Months like this .
date = sy-datum+6(2).
month = sy-datum+4(2).
year = sy-datum+0(4).
if month = 01.
mon = 'JAN'
else if.
like that.
endif.
finally u can disply
date_final = 20 jan 200.by using concatenate command.
Regards
Prabhu
‎2006 Sep 13 6:04 AM
‎2006 Sep 13 6:07 AM
just copy and paste this program....
REPORT ZNEGI3 .
parameters: date like sy-datum.
data: begin of itab occurs 0,
SPRAS type SPRAS,
MNR LIKE T247-MNR,
KTX LIKE T247-KTX,
LTX LIKE T247-LTX,
end of itab.
DATA : month LIKE T247-MNR.
DATA: YEAR(4).
DATA: FINAL(18).
DATA: DAY(2).
DAY = DATE+6(2).
MONTH = DATE+4(2).
YEAR = DATE+0(4).
select SINGLE * from t247 into itab where mnr = month
AND SPRAS = 'S'.
APPEND ITAB.
CONCATENATE DAY ITAB-LTX YEAR INTO FINAL SEPARATED BY '-'.
WRITE: FINAL.or try with this fm...
<b>CONVERSION_EXIT_IDATE_OUTPUT</b>
data:lcdate(11).
call function
'converstion_exit_idate_output'
exporting
input = sy-datum
importing
output = lcdate.
concatenate lcdate(2) lcdate+2(3) lcdate+5(4) into lcdate seperated by '-'.
--lcdate is your required format.
sample data ..sy-datum = 20060830
lcdate = 30-AUG-2006Message was edited by: kishan negi
‎2006 Sep 13 5:45 AM
Hi,
DATA:GD_DATE LIKE SY-DATUM, GD_STRING(20) TYPE C,
GD_DAYS(10) TYPE C,
GD_MONTH(10) TYPE C,
GD_YEAR(10) TYPE C,
GD_TEXT LIKE T247-LTX.
GD_DATE = SY-DATUM. <b><<giving the date here>></b>
CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
EXPORTING
IDATE = GD_DATE
IMPORTING
DAY = GD_DAYS
MONTH = GD_MONTH
YEAR = GD_YEAR
LTEXT = GD_TEXT
.
IF SY-SUBRC = 0.
CONCATENATE GD_DAYS GD_TEXT GD_YEAR INTO GD_STRING SEPARATED BY SPACE.
ENDIF.
WRITE:/ GD_STRING.
regards,
sowjanya
Message was edited by: sowjanya suggula
‎2006 Sep 13 5:46 AM
i am new to abap so
can u elaborate more on CONVERSION_EXIT_IDATE_INPUT
thank u..
‎2006 Sep 13 5:53 AM
Hi,
in the above function i gave,
you give the <b>date</b>,
and <b>get days,month,year,and text</b> if you need
long text(ltext)
gives the text as <b>SEPTEMBER</b>(month full name)
or short text(stext)gives the month in the shortcut like <b>SEP</b>.
then you concatenate the days text and year
to get the date in reqd format
hope this is clear to you.
Message was edited by: sowjanya suggula
‎2006 Sep 13 6:07 AM
‎2006 Sep 13 6:17 AM
IT S NOT DISPLAYING ANY THING ....
I DONT HAVE AUTHORIZE TO ACCESS T247.. THATS THE REASON I AM NOT GETTING OUTPUT OR ....
VENKAT
‎2006 Sep 13 6:20 AM
Hi venkatesh,
1. 20060913
= 13.SEP.2006
2. just use the FM
<b>CONVERSION_EXIT_SDATE_OUTPUT</b>
regards,
amit m.
‎2006 Sep 13 6:59 AM
Hi Venkatesh,
Use the function month_names_get.
Regards,
Sunmit.
Please reward points if helpful
‎2006 Sep 13 7:29 AM
Hi
You can use FM's: CONVERSION_EXIT_IDATE_OUTPUT &
CONVERSION_EXIT_IDATE_OUTPUT depending how you want to
have your output. Just pass the date for the input
parameter and you will have the result with month name
in output parameter.
Eg:
data: l_input like sy-datum value '20000120',
l_output(20) type c.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
INPUT = l_input
IMPORTING
OUTPUT = l_output.
write:/ l_output.Try the above example for better understanding.
Kind Regards
Eswar