05-30-2007 7:11 AM
Hi all, very gud morning
I have written a BDC program to a dialog UI screen,
So in dialog screen there is a date field, which wud be entered and updated.
So if v update the date, using screen its been updated into the database corectly.
ex: if i enter 30.05.2007, its updated as the same.
But if i have saved the data in a .txt file and if i update the database using BDC, its been updating as 30.05.2020 into the database instead of taking it as 30.05.2007
So do u knw watz the problem n solution for this?
Regards,
Sourav
05-30-2007 7:17 AM
Please make your date field as below because the txt format and sap formats are different for date .... so for any BDC the date's should followed as below .
Date format for entry into BDC
Because a date field is stored and displayed in different formats within SAP the following code is
required to convert the date into a format which can be input onto a screen field.
* Date field
data: ld_date(8).
ld_date(2) = sy-datum+6(2).
ld_date+2(2) = sy-datum+4(2).
ld_date+4(4) = sy-datum(4).
05-30-2007 7:26 AM
Hi Sowrabh,
When ever you use the date in BDC define it as a char10 field.
Check in the debugging what is the vaalue coming for this field.
Regards,
Atish
05-30-2007 7:39 AM
Hi,
After getting the field into screen use the Conversion exit for ex.
CONVERSION_EXIT_IDATE_INPUT
this will solve your problem. pass the field to this as input and again as output
Regards
Shiva