‎2008 Feb 15 11:03 AM
Hi,
I have a screen with a field of type NUMC that refers to a global variable (declared in my top include) of type QUAN size 13 decimals 3.
When I enter the value 1 in the screen field, it saves in the database field 0.001. If I enter, for example, 2100, it puts 2.100.
Of course, the problem occurs in the transparent conversion between the screen field and my variable that will be saved in database.
Somebody realize how can I solve this?
Please, help ASAP.
Regards,
Charles
‎2008 Feb 15 11:38 AM
hi,
you have said the the field in the screen is refering to global variable which has decimals 3. so you are getting 21 if u give 21,000.
if u want 21,000 to be updated in database the declare a variable quan with decimals 0.
hope it is useful.
regards,
sreelakshmi.
‎2008 Feb 15 11:59 AM
Dear,
Try this, yr prob may be solved :-
You can change the screen field to Quan of same size (just greater than 2 like for eg . in this case type quan size 15 decimal 3 ) Also u have to give reference field (for eg give mara-meins)
Otherwise, u have to change the decimal places in yr top include to 0.
Best Regards,
P Singh
‎2008 Feb 15 12:41 PM
Hi P Singh,
My variable is of the same type of table column (that is QUAN 13 decimals 3). So I think I can't change that.
I tried change the screen field type to QUAN, but occurs a error on activation because I have to give a reference to a unit and I don't know how to do that (what unit is).
If you have another sugestions, or correction to what I say above, please tell me.
Thanks,
Charles
‎2008 Feb 15 12:50 PM
Try to multiply the value by 1000 when saving to the database.
‎2008 Feb 15 1:09 PM
‎2008 Feb 15 4:18 PM
Give reference of BSEG-MEINS to your quantity field....
it should solve the problem..
‎2008 Feb 15 4:31 PM
I solved my problem by relating the screen field to the database table field.
That isn't the solution that I want (because the screen field should be NUMC), but work.
If no more solutions I'll leave that.
Thanks.
‎2008 Feb 15 4:54 PM
Hello Charles,
Is it possible for you to give the way the global variable is declared in your program. This would be helpful in looking in a different perspective.
Regards,
Pavan
‎2008 Feb 15 5:30 PM
Hi Pavan,
gv_field TYPE ddic_table-field.I my screen I have a field of type NUMC that refers to this gv_field.