Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal Value in SE11

harshsisodia31
Participant
0 Kudos

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

20 REPLIES 20

former_member202818
Active Contributor
0 Kudos

Hi Harsh,

Confirm data before inserting into table.

or...

Check the reference currency or quantity field.

0 Kudos

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.

Former Member
0 Kudos

Hi Harsh,

Can you check your user profile via

System-->User Profile-->Own Data.

Ensure Decimal Notation is of correct format.

Regards,

Kannan

0 Kudos

Hi Kannan,

Notation is in correct form.

0 Kudos

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

0 Kudos

Hi

Yes the declaration seems different.

In SE38

    peracr(15)      TYPE c,      "Accruals Percentage

In SE11

Former Member
0 Kudos

Hi Harsh,

Kindly share the Fm used for uploading the excel and which is the table you are trying to upload.

Regards,

Kannan

0 Kudos

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.

VenkatRamesh_V
Active Contributor
0 Kudos

Hi,


Hope it help full.


Check it with your  Data Type  as 'DEC'     in table .



Regards,

Venkat.




0 Kudos

My table is as attached in screen shot.

http:/

0 Kudos

Hi harsha,

Can you tell me   reference table and reference field

Regards,

Venkat.

amitkumar24
Explorer
0 Kudos

Hi Harsh,

I beleive you are uploading a currency amount value here. If so, please let us know the currency.

-Amit

0 Kudos

I am loading % value.

Former Member
0 Kudos

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

0 Kudos

Hi Kannan,

No such routine is attached.

Also, things are working fine is QAS server.

raymond_giuseppi
Active Contributor
0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

amitkumar24
Explorer
0 Kudos

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.