Skip to Content
0
Former Member
Jan 16, 2006 at 10:05 PM

probelm with case statement...

14 Views

Hi Friends,

I have written code as the following:

there is no syntax errors in that, but it is not showing up anything when i run it...

could you please tell me how to correct that...

code:

REPORT ZA4 .

tables: stpo.

data: i_val(18),

c_pct VALUE '%',

i_rec(2).

CONCATENATE c_pct i_rec into i_val.

INITIALIZATION.

START-OF-SELECTION.

case i_rec.

when 'O'.

SELECT * FROM stpo WHERE idnrk LIKE i_val.

write:/ stpo-idnrk.

endselect.

when 'OP'.

SELECT * FROM stpo WHERE idnrk LIKE i_val.

write:/ stpo-idnrk.

endselect.

when 'M'.

SELECT * FROM stpo WHERE idnrk LIKE i_val.

write:/ stpo-idnrk.

endselect.

when 'MP'.

SELECT * FROM stpo WHERE idnrk LIKE i_val.

write:/ stpo-idnrk.

endselect.

endcase.

END-OF-SELECTION.

thnks,