problem in displaying the data
I am working on a report which is previously developed ,this is basically code for the smartforms in which it is showing the upper limit and the lower limit which are present in the table QPMK having the fields toleranzun and toleranzob. i.e. if the lower limit is specified and the upper limit is specified i.e. 0.15 and the lower limit is not then it is picking up the default value 0 and showing the data as :-
carbon -> 0.15 - 0.00
But i want to show the data that if its lower limit or upper limit is not defined then it should display the only value which is defined .
if upper limit is defined as 0.15 and the lower limit is not told then it should display the data as :-
carbon -> 0.15
i had tried to modify the code but it is able to display it.
here's d code:-
LOOP AT vv.
SELECT SINGLE toleranzob FROM qpmk INTO vv-toleranzob WHERE mkmnr = vv-verwmerkm AND toleranzob GT 0.
SELECT SINGLE toleranzun FROM qpmk INTO vv-toleranzun WHERE mkmnr = vv-verwmerkm AND toleranzun GT 0.
if vv-toleranzun > 0 and vv-toleranzob > 0.
MODIFY vv FROM vv INDEX sy-tabix TRANSPORTING toleranzob toleranzun.
elseif vv-toleranzun > 0 and vv-toleranzob = 0.
MODIFY vv FROM vv INDEX sy-tabix TRANSPORTING toleranzun.
elseif vv-toleranzun = 0 and vv-toleranzob > 0.
MODIFY vv FROM vv INDEX sy-tabix TRANSPORTING toleranzob.
it is still giving the same output..
even i had debugged it the statements are getting fetched.
I meant dont compare string with numbers and use packed decimals.
if vv-tot1 > 0 and vv-tot2 > 0. "Wrong
The following is correct format
if vv-toleranzob > 0 and vv-toleranzun > 0. "Correct