‎2007 Aug 11 9:52 AM
Hi All,
I need to upload data from Excel file to SAP. I need to convert date filed which is in the format MMDDYYYY from Excel file into SAP filed with TYPE C.
The problem is, when i am entering date ' 08112007' in excel sheet, it is not accepting the zero and it is storing as '8112007' which is then being entered in to SAP filed, which is not accepted by the system.
Can anypne please provide me with the code of how to convert this so that the system will accept?
For good solution, REWARD POINTS will be there
Thanks,
Harish
‎2007 Aug 11 9:57 AM
hI hARISH
check in program
loop at itab.
str = itab-date.
length = strlen ( str ).
if length = 7.
concatenate '0' str into string.
itab-date = string.
modify itab index sy-tabix.
endif.
endloop.
Reward points to helpful answers,
kiran.M
‎2007 Aug 11 9:57 AM
hI hARISH
check in program
loop at itab.
str = itab-date.
length = strlen ( str ).
if length = 7.
concatenate '0' str into string.
itab-date = string.
modify itab index sy-tabix.
endif.
endloop.
Reward points to helpful answers,
kiran.M
‎2007 Aug 11 10:47 AM
Hi Harish,
This is another solution.
Check this code
DATA V_STR(8) TYPE N.
loop at itab.
MOVE itab-date TO V_STR.
modify itab index sy-tabix.
endloop.
Thanks,
Vinay