09-12-2014 5:48 AM
Dear Expert,
I am using a program to upload value in table though excel. But I am facing a issue,
Value uploaded are 5.00 but when I am seeing in se11 value is shown as 0.05.
Please check screen shot and suggest some solutions.
Best Regards
Harsh
09-12-2014 5:52 AM
Hi Harsh,
Confirm data before inserting into table.
or...
Check the reference currency or quantity field.
09-12-2014 6:02 AM
Hi Sreekanth,
Same value are showing correct in QAS server with same reference currency.
I have debugged the code seems data is correct while inserting.
09-12-2014 5:56 AM
Hi Harsh,
Can you check your user profile via
System-->User Profile-->Own Data.
Ensure Decimal Notation is of correct format.
Regards,
Kannan
09-12-2014 6:01 AM
09-12-2014 6:07 AM
Hi Harsh,
Are the both fields of same type? Can you please share the declaration?
If they are different try converting the input into internal format by CONVERSION_EXIT_ALPHA_INPUT. Please let us know the results.
Thanks,
Anubhab
09-12-2014 7:40 AM
Hi
Yes the declaration seems different.
In SE38
peracr(15) TYPE c, "Accruals Percentage
In SE11
09-12-2014 6:10 AM
Hi Harsh,
Kindly share the Fm used for uploading the excel and which is the table you are trying to upload.
Regards,
Kannan
09-12-2014 7:36 AM
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_tab_raw_data = rawdata
i_filename = w_filenm
TABLES
i_tab_converted_data = itab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
09-12-2014 6:35 AM
Hi,
Hope it help full.
Check it with your Data Type as 'DEC' in table .
Regards,
Venkat.
09-12-2014 7:33 AM
09-12-2014 10:02 AM
Hi harsha,
Can you tell me reference table and reference field
Regards,
Venkat.
09-12-2014 6:42 AM
Hi Harsh,
I beleive you are uploading a currency amount value here. If so, please let us know the currency.
-Amit
09-12-2014 7:32 AM
09-12-2014 7:45 AM
Hi Harsh,
Can you check any Coversion routine is attached to that field in se11 table.Check in the domain level for that field.
I took the example of matnr field in mara table.Check if you are getting any clue.
Regards,
Kannan
09-12-2014 7:55 AM
Hi Kannan,
No such routine is attached.
Also, things are working fine is QAS server.
09-12-2014 7:49 AM
Well there is an error in database definition, a percentage has no unit of measure, nor any currency so it cannot be defined as a CURR or QUAN field.
Your definition corresponds more to a "discount amount" than to a "discount percentage", use a DEC type of data.
Regards,
Raymond
09-12-2014 7:59 AM
Hi
Can you please guide me to do it ?
We have tested it in QAS and everything is working fine. But the problem persist in PRD.
09-12-2014 10:23 AM
Hi Harsh,
Have you tried to delete the leading spaces before the char field in program, there is every possibility to miss the value because in program length of char is 15 and in table field length is 11+ 2 = 13
As Character field the text is right aligned, I think because of this reason it is showing 0.05 in PRD.
Please once try this inside the loop of itab as a first statement and revert.
SHIFT peracr LEFT DELETING LEADING SPACE.
Regards,
Pavan
09-12-2014 11:05 AM
Your definition corresponds more to a "discount amount" than to a "discount percentage", use a DEC type of data.
Finally someone is talking sense here.
09-15-2014 12:54 PM
Hi Harsh,
As Raymond has mentioned above, you should only use CURR type for currency amount field which requires reference to a currency code. So there is no doubt that you table definition needs to be corrected. And that will fix your problem too.
Regarding you question about why it works in QAS and not in other environments. Do you see any difference in values maintained in table TCURX. This table tells system how many decimal places to use for a particular currency. Since different currencies can have different number of decimal places but the database tables have 2 decimal places to store, this table allows SAP to control internal and external representation of currencies.
If you see an entry with blank in CURRKEY field and 0 in CURRDEC field only in QAS and not in DEV or PRD, then that would explain behavior of your upload program.