‎2005 Oct 20 8:33 AM
hi,
using lsmw i'm reciving an error :
"Enter date in format __-__-____"
My source field is DYMD and I have for example "20041010" as a date. (DYMD is 8 lenght).
Any idea what is wrong?
Lukasz
‎2005 Oct 20 9:59 AM
hi Lukasz Gruca
TRY THESE fUNCTION MODULES.MIGHT BE THEY SOLVE YOUR PROBLEM.
CONVERTING DATE(10) TO DATE(8)
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = VAR_DATE1
IMPORTING
DATE_INTERNAL = VAR_INDAT.
CONVERT_DATE_TO_EXTERNAL
This Function module Converts date from system storage format to users specified display format
cheers,
Vijay Raheja.
‎2005 Oct 20 8:38 AM
Hi,
The date format depends upon the date format specified in the user master. Check the user in SU01 transaction. It seems the field expects a format 'DD-MM-YYYY'. Try passing either '20041010' or '10-10-2004'.
Cheers
Vinod
‎2005 Oct 20 9:30 AM
Hi Lukasz,
That's likely because your LSMW project uses BDC as an input method and the corresponding field excpects external date format.
Try to use external date format with length 10 (DD.MM.YYYY)
‎2005 Oct 20 9:59 AM
hi Lukasz Gruca
TRY THESE fUNCTION MODULES.MIGHT BE THEY SOLVE YOUR PROBLEM.
CONVERTING DATE(10) TO DATE(8)
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = VAR_DATE1
IMPORTING
DATE_INTERNAL = VAR_INDAT.
CONVERT_DATE_TO_EXTERNAL
This Function module Converts date from system storage format to users specified display format
cheers,
Vijay Raheja.
‎2005 Oct 20 10:20 AM
thx Vijay Raheja.
That's solved my problem.
cheers
Lukasz Gruca
‎2006 Sep 27 10:36 PM
hi Lucas
I have the same problem with date for my LSMW asset load. Could you explain how you used the function.
If possible can you send me detailed documentation if you have any.
Thanks much
Krishna