Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Ranges

Former Member
0 Likes
278

Hi evryone,

The below code am using ranges.It is executing well when there is LOW and HIGH values for p1.But if i give only P1-LOW in the input then am not getting the output.Please Help.

Vijay

SELECT-OPTIONS: p1 FOR v_p1 OBLIGATORY.

RANGES:r1 for v_p1.

START-OF-SELECTION.

read table p1 index 1.

r1-sign = 'I'.

r1-option = 'EQ'.

while p1-low LE p1-high.

r1-low = p1-low.

append r1.

p1-low = p1-low + 1.

endwhile.

WHEN 1.

t_power_cost_p1-power_cost_p1_apr

= t_power_cost_p1-power_cost_p1_apr + it_faglflext-hsl01.

WHEN 2.

t_power_cost_p1-power_cost_p1_may

= t_power_cost_p1-power_cost_p1_may + it_faglflext-hsl02.

WHEN 3.

t_power_cost_p1-power_cost_p1_jun

= t_power_cost_p1-power_cost_p1_jun + it_faglflext-hsl03.

WHEN 4.

t_power_cost_p1-power_cost_p1_jul

= t_power_cost_p1-power_cost_p1_jul + it_faglflext-hsl04.

2 REPLIES 2
Read only

Former Member
0 Likes
265

g

Read only

Former Member
0 Likes
265

Hey vijay,

You are using p1-high to compare with some other value, there by in a way making p1-high mandatory. Hence whenever p1-high is null you are facing the problem.

Hope this helps,

Rgds,

Harikrishna.

Edited by: harikrishna indugu on Feb 15, 2008 11:53 AM