‎2008 Jun 19 6:49 AM
Hi Friends,
I am create one upload program using bdc.
the I/P Text file has one date field(MM/DD/YYYY).
in internal table i declared DATE field is like sy-datum.
while uploadig it removes the last 2 chr of Year.
please explain 1. how to declare in internal table?
2. While uploading it automatically convert the system format or
SAP owndata format.
Thnakz & Regards,
Vallamuthu.M
‎2008 Jun 19 7:37 AM
Hi,
Declare ur date field in internal table as 10 characters.
pass the date u got from file to FM convert_ date_ to_ internal
this will convert the date to internal format.
then use WRITE TO statement so that the date will converted to user format.
‎2008 Jun 19 6:53 AM
Declare the internal table's date field as date(10) type c.
else, pass 8 character date field from the text file.
M S DhanaLakshmi
‎2008 Jun 19 7:04 AM
Try following :
1. use function module ' ISH_DATE_CONVERT_I2E ' to convert the date format.
or
2. check if field type ur useing is having any conversion exit.
if yes then u can use the same for format conversion.
‎2008 Jun 19 7:31 AM
hi,
It may not be uploading but check with debugger that even in the program before uploading the date value might be missing the last 2 digits of the year,
try this out: declare the variable as datum
after u have read the data from screen
use function convert_ date_ to_ internal .
exporting = variable having screen value of date
importing = variable declared above as datum
if useful do not forget to reward points.
‎2008 Jun 19 7:37 AM
Hi,
Declare ur date field in internal table as 10 characters.
pass the date u got from file to FM convert_ date_ to_ internal
this will convert the date to internal format.
then use WRITE TO statement so that the date will converted to user format.