‎2008 Mar 11 7:08 PM
Hi,
Hello,
when i import data from a tab delimited file, with the function module GUI_UPLOAD, i always get the BAD_DATA_FORMAT error.
I have notice that the field who causes the problem is a numeric field(EX: 12.50). If i put only 1250, the problem disappear.
Before i use this function module i use another that is now obsolete WS_UPLOAD, and with this old... function it works very well... the numeric field is convert into the correct format to the internal table.
Us suggested by SAP, we must use the new function module GUI_UPLOAD.
But if we need to change all the programs that use the old WS_UPLOAD to the new one... we must create new internal tables only with char fields and the pass this data to the existent table.
.
Anybody has a clue? or not?
Thanks in advance
AOL
‎2008 Mar 12 9:54 AM
Kindly check this function module the internal table got after file upload is having string format (DATA_TAB). hence whenever the internal file will having numeric field it will create error.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = i_fname
DAT_MODE = 'X'
TABLES
DATA_TAB = mt_tab.
try function module UPLOAD. It will work.
anya
‎2008 Mar 11 7:11 PM
Can you post your internal table declaration and whic field is failing? Most likely is a P data type without decimal points
‎2008 Mar 11 7:16 PM
The field has the data element ERFMG.
Data type QUAN with 3 decimals.
thanks,
AOL
‎2008 Mar 11 7:22 PM
‎2008 Mar 11 7:26 PM
Hi
Try replacing the . (dot) with , (comma) in a number.
So not 12.50 but 12,50.
Rgds
Mat
‎2008 Mar 12 9:44 AM
Hello,
all this thinks were tested, in the GUI_UPLOAD doesn,t work.
What i need to know is: is obligatory move the quantity fields from the source table to text fields in the abap table.
And after that pass to other table with the correspondig fields in quantity format.
Many thanks,
AOL.
‎2008 Mar 12 9:54 AM
Kindly check this function module the internal table got after file upload is having string format (DATA_TAB). hence whenever the internal file will having numeric field it will create error.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = i_fname
DAT_MODE = 'X'
TABLES
DATA_TAB = mt_tab.
try function module UPLOAD. It will work.
anya