‎2008 Aug 22 1:34 PM
hi all,
I have a requirement to upload an excel file through BDC.
In that file I have a decimal field.
SAP environment can take it in two formats viz 12.23 or 12,00 which we can set manually in user profile in system option in toolbar.
System -> User Profile -> own data -> default -> decimal notation.
but if the decimal notation in SAP environment is opposite of what we are providing in excel file field,
then it will give an error viz Input must be in ___,____ or ____.____ format
So I want to change my data field in excel to the decimal notation as in SAP environment.
Please suggest. Its urgent.
Thanks in advance
Manish Gupta
Edited by: MANISH GUPTA on Aug 22, 2008 2:34 PM
Edited by: MANISH GUPTA on Aug 22, 2008 2:34 PM
Edited by: MANISH GUPTA on Aug 22, 2008 2:35 PM
‎2008 Aug 22 1:39 PM
Hi Manish,
Take one character variable of sufficient length usually 19 for currency and quantity fields.
Now use WRITE to statement to move data from ur work area to this variable and use this variable while populating the BDC.
It works fine.
What it does is it will write the data absed on user settings.
eg:
DATA: w_currency(19) TYPE c.
WRITE wa-currency TO w_currency.
CONDENSE w_currency.
Now use this variable while populating the BDCdata table.
U have to follow same for date and time fields as well.
Thanks,
Vinod.
‎2008 Aug 22 1:38 PM
U Upload the Data from Excel sheet into an internal table of all fields character format, then map that to standard sap fields.
As in Data transfer we usually upload data into character field table, so that sap automatically converts the fields to its desired form if the incoming data is of character format.
‎2008 Aug 22 1:38 PM
Hi
set the decimal places from user data and set accordingly x 123456789.000 like that.
and create ur data in file as decimal places 12.23
This will not throw error.
‎2008 Aug 22 1:39 PM
Hi Manish,
Take one character variable of sufficient length usually 19 for currency and quantity fields.
Now use WRITE to statement to move data from ur work area to this variable and use this variable while populating the BDC.
It works fine.
What it does is it will write the data absed on user settings.
eg:
DATA: w_currency(19) TYPE c.
WRITE wa-currency TO w_currency.
CONDENSE w_currency.
Now use this variable while populating the BDCdata table.
U have to follow same for date and time fields as well.
Thanks,
Vinod.
‎2008 Aug 22 1:54 PM
‎2008 Aug 22 1:59 PM
Hi gupta,
Go to SU01 transaction and then change ur values
to your required format.
I hope this solve ur problem.
Regards,
Ranjith C.