‎2005 Jun 24 8:47 AM
hi all,
please solve this small problem for me.
i have some parameters on a report selection screen which are of type CURR...
PARAMETERS : i_cenvat LIKE j_1ipart2-exbed MODIF ID ch1,
i_ecess LIKE j_1ipart2-exbed MODIF ID ch2.
now my requirement is that if the value of these are left blank then some calculation has to happen and the result is to be stored in a variable. however, if the user decides to enter some value in it...no calculation is to take place..........no problems so far....
the problem however arises when the user enters a 0 value in these fields. being a curr type field, the default value of 0 is taken up even if the field is left blank.....and my requirement is to do the calculation if it is left blank and not if 0 is entered....
i tried using type p but it gives me the same problem......
currently i m using a workaround by using character type.....but m sure there has to be a better way.....
can anyone guide....???? Plzzzz......
_________________
regards,
PJ
‎2005 Jun 24 8:52 AM
Hi PJ,
I'm not sure, if there is a better way.
The initial value of a curr (or other number fields) is 0 and not blank - so there is no difference ... unless you switch to character: here initial value is blank -> you can determine a 0, which was entered.
Regards,
Christian
‎2005 Jun 24 8:52 AM
Hi PJ,
I'm not sure, if there is a better way.
The initial value of a curr (or other number fields) is 0 and not blank - so there is no difference ... unless you switch to character: here initial value is blank -> you can determine a 0, which was entered.
Regards,
Christian
‎2005 Jun 24 8:59 AM
Hi,
TO make <b>field blank</b> during the display the type should be of <b>NUMC (N</b>), other than this it will shouw Zero during the display.
Try this one.
‎2005 Jun 24 9:04 AM
Hi,
As I know,What are you using is correct.We need to make it as character,then we have to use,since you are talking about selection screen.
But in dialog programming,we can handle this type of situation by
ON INPUT Process only on input
(where field contents are not initial)
ON CHAIN-INPUT Process only on input in a chain
ON REQUEST Process only on request (when
user enters a value on the screen)
ON CHAIN-REQUEST Process only on request in a chain
ON -INPUT Process only on '' input
- You can only use ON ... with field assignments.
‎2005 Jun 24 9:08 AM
instead of changing your parameter filed to type c, try the following.
data: ctest(20) .
parameters : test type p decimals 2 .
write:/ test .
move: test to ctest.
if ctest is initial .
you can do your processing here as initial value for char is blank .
write: ctest .
endif .
Regards
Raja
‎2005 Jun 24 9:46 AM
well thanx guys...
so i see that what i am doing is the only way out...(or as far as we know)....
Raja....what u r saying is exactly i am doing right now...thanx buddy!!
regards,
PJ