12-23-2005 6:43 AM
Hi ALL
I wanna to change the date in the flat file when I am entering into BDC, please give me the code for this one.
Regards
Praveen
12-23-2005 6:48 AM
Hi praveen,
I don't know whether i understood u question properly.
1. The date field in the flat file should
be in the format YYYYMMDD
2. Now while putting this date
on the screen field use this funda.
data : ds(10) type c.
write itab-field to ds.
(ds will now contain dd.mm.yyyy
which is required on the screen )
(screen does not requrie YYYYMMDD)
3. Use DS field for BDC.
I hope it helps.
regards,
amit m.
12-23-2005 7:13 AM
Hi,
Try this...
Local variables to set date
DATA:lv_dd(2),
lv_mm(2),
lv_yyyy(4),lv_date1(10).
*pass the date field from file into a variable
SPLIT x_data_tab-str1 AT ',' INTO lv_date1.
Set Date into DDMMYYYY format or according to ur *requirement
lv_dd = lv_date1+0(2).
lv_mm = lv_date1+3(2).
lv_yyyy = lv_date1+6(4).
CONCATENATE lv_dd lv_mm lv_yyyy INTO x_final-bldat.
or if this does not work then use write to field statement
Regards,
Sridhar Reddy k
Message was edited by: sridhar reddy kondam
12-23-2005 7:13 AM
hi,
take a char(10) fields length and using write to statement write the date to this char field.
satish