11-21-2007 2:08 PM
hi this is satish,
how to change the date formate in the alv report.Actually the values are coming from the table.In the table the date format be yyyymmdd.but How to change the date formate in alv like ddmmyyyyy.Any one can send the code to change that format
11-21-2007 3:07 PM
Hi,
All you have to do is modify properties for this field in your fieldcatalog by setting the data type :
fieldcat-datatype = 'DATS'.
Then in your ALV report, system will automatically handle the output format for the field according to the user settings.
Regards,
Nicolas.
11-21-2007 2:11 PM
Hi,
You can use FM CONVERSION_EXIT_PDATE_OUTPUT.
Thanks,
Sriram Ponna.
11-21-2007 2:15 PM
11-21-2007 2:14 PM
11-21-2007 2:15 PM
Hi Satish,
IN DB tables date format will be always YYYYMMDD only..in front end depending upon settings it dispalys in particular format....
still you need solutions there are....
WRITE <datefld> DD/MM/YYYY to <var>.
"OR
DATA : date LIKE sy-datum.
DATA : date2 TYPE CHAR10.
date = sy-datum.
CONCATENATE date+6(2) date+4(2) date+0(4) INTO date2 SEPARATED BY '.'.
write 😕 date2.
11-21-2007 2:15 PM
hi,
you can use too:
data new_date type sy-datum.
WRITE your_date TO new_date DD/MM/YYYY.
I hope its help.
11-21-2007 2:16 PM
Set the edit_mask in the field catalog for that field.
fcat-edit_mask = 'ddmmyyyy'.
Regards,
Naimesh Patel
11-21-2007 2:36 PM
fcat-edit_mask = 'ddmmyyyy'.
where we have to give this
in the fcat date is we r giving therre
11-21-2007 2:51 PM
You need to do like this for your DATE field
LOOP AT FCAT WHERE FIELDNAME = 'DATE'.
LS_FCAT-EDIT_MAST = 'DDMMYYYY'.
MODIFY FCAT FROM LS_FCAT.
CLEAR LS_FCAT.
ENDLOOP.
Regards,
Naimesh Patel
11-21-2007 2:57 PM
actually that is alv report.
the values are coming from table(In pbo module fetch data from select query into inernal table)But the date is in the format yyyymmdd.Now i want to change the date in alv report that ddmmyyyy.Please send code/
11-21-2007 2:59 PM
This setting which I had provided you are for the ALV only.
In your ALV, you are filling up the feild cataloge. Just add the code which I have provided you.
Regards,
Naimesh Patel
11-21-2007 3:01 PM
Hi..
Try this code ,i had hardcode the date in yyyymmdd format but the output is coming in ddmmyyyy format itself..
REPORT ZBA_ALV.
type-pools slis.
data : begin of itab occurs 0,
date type d ,
end of itab,
it_fieldcat type slis_t_fieldcat_alv,
wa_fieldcat type slis_fieldcat_alv.
start-of-selection.
itab-date = '20071121'.
append itab.
wa_fieldcat-fieldname = 'DATE'.
append wa_fieldcat to it_fieldcat.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
IT_FIELDCAT = it_fieldcat
TABLES
t_outtab = itab.
Post for further queries.
Regards
Bala.
11-21-2007 2:19 PM
Satish,
REPORT ZTEST_TEST.
DATA : date type sy-datum.
data : date1(10) type c.
break akumar.
date = '20070321'.
write : date.
CONCATENATE date+6(2) date+4(2) date+0(4) into date1.
write /: date1.
Regards
Aneesh.
11-21-2007 2:39 PM
Hi.
Try like this.
CLEAR l_s_field_cat.
l_s_field_cat-fieldname = 'Date'.
<b> l_s_field_cat-edit_mask = '__,__%'.</b>
APPEND l_s_field_cat TO p_tab_field_cat.
Regards
Bala.
11-21-2007 3:07 PM
Hi,
All you have to do is modify properties for this field in your fieldcatalog by setting the data type :
fieldcat-datatype = 'DATS'.
Then in your ALV report, system will automatically handle the output format for the field according to the user settings.
Regards,
Nicolas.
11-28-2007 10:48 AM