‎2007 Jun 07 12:23 PM
Hi Friends,
KOMK-FKWRT is amount field.
i am using
IF &KOMK-FKWRT& > 10000. in script window.
do ...
But it is not comparing that one . I mean it is always getting failed.
Could you please help me.
Thanks in advance.
‎2007 Jun 07 12:27 PM
IF &KOMK-FKWRT& > '10000' . -> Should be single quotation
But better to write the code in print program..
‎2007 Jun 07 12:27 PM
Hi
Activate the debugger for the script and check whether the value
is coming into the field &KOMK-FKWRT& or not
If some value is coming then it is fine. more than 10000 may not be coming.
then something wrong with the declaration.
check complete code or paste it then it is clear to check.
Reward points for useful Answers
Regards
Anji
‎2007 Jun 07 12:27 PM
IF &KOMK-FKWRT& > '10000' . -> Should be single quotation
But better to write the code in print program..
‎2007 Jun 07 12:42 PM
‎2007 Jun 07 12:49 PM
Hi Murali
Then the best solution is just activate ur debugger and check what value is coming over there
Reward all helpfull answers
Regards
Pavan
‎2007 Jun 07 12:52 PM
Hi pavan,
i am printing the value in previous line only.
It is coming. Currency is in Euros..is it will be the problem.
‎2007 Jun 07 12:53 PM
‎2007 Jun 07 12:56 PM
Hello Murali,
It should work
If ur field = '10000.<b>000'</b> -> how many decimals do you have ,check with debugging.
endif
‎2007 Jun 07 1:00 PM
Hi Murali ,
Try this
<b>IF &KOMK-FKWRT& GE '____________1,000.00'
ENDIF.</b>
Here _ is space , as when i posted the space got deleted.
I tried it and it worked for me.
Please check that in your system also 1000 is represeneted as 1,000.00.
The reason for this is given in the help for IF statements used in SAP Scripts.
i am pasting some portion of it here for more info please read the complete help on this.
<i>The comparison is always performed on literal values, that is, the symbols are formatted as character strings before they are compared. This is particularly significant in the case of program symbols, because the formatting of these may depend on various parameters. For example, the formatted form of a currency field employs a variable number of decimal places and a variable decimal point symbol (a period or a comma) depending on the applicable currency key</i>
Assign points if reply is helpful.
Regards
Arun
Message was edited by:
Arun R
‎2007 Jun 07 1:15 PM
Hi murali
come out of ur script by activating it then on the menu bar goto Utilities--> Activate Debugger
then execute it through spool requests then it will direct u to the script coding part
In this there is no need to keep a breakpoint it will go step by step so watch keenly from which statement the data is coming and form which statement data is not coming
Reward all helpfull answers
Regards
Pavan
‎2007 Jun 07 1:20 PM
just goto SE71 -> give ur form name -> utilities ->activate debugger
‎2007 Jun 07 12:27 PM
Hi
Activate the debugger for the script and check whether the value
is coming into the field &KOMK-FKWRT& or not
If some value is coming then it is fine. more than 10000 may not be coming.
then something wrong with the declaration.
check complete code or paste it then it is clear to check.
Reward points for useful Answers
Regards
Anji
‎2007 Jun 07 12:28 PM
Hi Murali
Just give it as
<b>
IF &KOMK-FKWRT& > '10000'</b>
and check now.
Regards,
Sree
‎2007 Jun 07 12:32 PM
Hi Murali
How do u want to compare it whether
if &KOMK-FKWRT& = 1000
or
if &KOMK-FKWRT& > 1000
or
if &KOMK-FKWRT& < 1000
or
IF &KOMK-FKWRT& <>10000
Reward all helpfull answers
Regards
Pavan