2007 Feb 08 5:17 AM
Hi All.
1)i have one paramenter field like p_branch,it will allow the value only 100 to 500 so
2)i need ranges like 100 to 500 ,
3)i was created ranges like
RANGES:r_bran for zdbt-field1.
4)and i was maintain those value in table TVARVC.now i want check IF condition like IF p_branch in r_ban.
5)r_ban fetch all parameter perfectly(low ,high ,sign ,option) but i cant check if codition.
i have done following code....
IF p_branch in r_ban.
message 'ranges between 100 to 500' type 's'.
else.
message ' No ranges between 100 to 500' type 's'.
endif.
if i entred 200 in input field p_branch ,i would need message like ' No ranges between 100 to 500' but i got as 'ranges between 100 to 500' type 's'.
please help me.
regards.
jay
2007 Feb 08 5:26 AM
HI,
Cant understand your problem?
Since 200 is in the range 100 to 500, it gives you the message 'ranges between 100 to 500'.
Correct only, is it not?
Regards
Subramanian
Hi All.
1)i have one paramenter field like p_branch,it will allow the value only 100 to 500 so
2)i need ranges like 100 to 500 ,
3)i was created ranges like
RANGES:r_bran for zdbt-field1.
4)and i was maintain those value in table TVARVC.now i want check IF condition like IF p_branch in r_ban.
5)r_ban fetch all parameter perfectly(low ,high ,sign ,option) but i cant check if codition.
i have done following code....
IF p_branch in r_ban.
message 'ranges between 100 to 500' type 's'.
else.
message ' No ranges between 100 to 500' type 's'.
endif.
if i entred 200 in input field p_branch ,i would need message like ' No ranges between 100 to 500' but i got as 'ranges between 100 to 500' type 's'.
please help me.
regards.
jay
2007 Feb 08 5:23 AM
Hi,
200 is in between the range of 100 and 500..
Then what is the issue??
Thanks,
Naren
2007 Feb 08 6:33 AM
sorry narendar.....
i got message like "No ranges between 100 to 500." i dont know where i have problem.
please help me. review code ,is it correct?
regards.
jay
2007 Feb 08 6:38 AM
See the following ex: it is working
tables: vbap.
parameters:p_posnr like vbap-posnr.
select-options: s_posnr for vbap-posnr.
initialization.
s_posnr-sign = 'I'.
s_posnr-option = 'EQ'.
s_posnr-low = 1.
s_posnr-high = 10.
append s_posnr.
start-of-selection.
loop at s_posnr.
if ( p_posnr >= s_posnr-low and
p_posnr <= s_posnr-high ).
write:/ 'yes'.
exit.
endif.
endloop.
2007 Feb 08 6:40 AM
Check whether u have specified like
RANGES: r_bran for zdbt-field1.
r_bran-sign = 'I'. "Exclude
r_bran-option = 'BT'. "Pattern
r_bran-low = 100. "Low Value
r_bran-high = 500. "High Value
append r_bran.
IF p_branch IN r_ban.
message s000 WITH 'ranges between 100 to 500'.
else.
message s000 WITH ' No ranges between 100 to 500'.
endif.
Hope this is clear.
2007 Feb 08 5:26 AM
HI,
Cant understand your problem?
Since 200 is in the range 100 to 500, it gives you the message 'ranges between 100 to 500'.
Correct only, is it not?
Regards
Subramanian
2007 Feb 08 6:30 AM
sorry subramani......
i got message like "No ranges between 100 to 500." i dont know where i have problem.
please help me. review code ,is it correct?
regards.
jay
2007 Feb 08 5:40 AM
loop at r_ban.
if ( p_branch >= r_ban-low and
p_branch <= r_ban-high ).
write:/ 'yes'.
exit.
endif.
endloop.
2007 Feb 08 6:35 AM
Hi,
In the ranges..What did you populate..
Check if you have the following values in the range..
SIGN = 'I'.
OPTION = 'BT'.
LOW = '100'.
HIGH = '500'.
If you populate the range like the above..It will work..
Thanks,
Naren
2007 Feb 08 7:03 AM
2007 Feb 08 6:36 AM
Hi Jay ,
Is the length to be specific data type of zdbt-field1 and p_branch the same.
Just debug and see how are the values stored in p_branch and the range.
Regards
Arun
2007 Feb 08 7:04 AM
2007 Feb 08 7:04 AM
Hi,
Please make sure to reward points for helpful answers...And close the thread if the problem is solved..
Thanks,
Naren
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |