‎2007 Apr 02 10:15 AM
i need to check the condition in case can i do it, but the statement below is failing
IF v_quantity NE '0'.
CASE l_sy_ucomm.
WHEN l_sy_ucomm.
PERFORM f_pop_up.
ENDCASE.
ELSE.
PERFORM f_delete_hu.
ENDIF.
any alterntive to this.
‎2007 Apr 02 10:16 AM
yes because of if statement it is not going inside to execute case statement. so if you dont want that just comment if endif.
regards
shiba dutta
‎2007 Apr 02 10:17 AM
Try this..
IF v_quantity NE '0'. " check in debug mode whether v_quantity is 0 or not
<b>CASE sy-ucomm.</b>
WHEN l_sy_ucomm.
PERFORM f_pop_up.
ENDCASE.
ELSE.
PERFORM f_delete_hu.
ENDIF.
‎2007 Apr 02 10:18 AM
another thing u can try is write the if endiff statements inside the case according to ur requirement
hopen it helps
navjot
reward accordingly
‎2007 Apr 02 10:19 AM
Hi
try like this.
IF v_quantity NE '0' and l_sy_ucomm = l_sy_ucomm.
PERFORM f_pop_up.
elseif v_quantity eq '0' .
PERFORM f_delete_hu.
endif.
regards,
bharat.
‎2007 Apr 02 10:23 AM
Gupta,
What is "l_sy_ucomm". Is it sy-ucomm value? if so have you moved the value to l_sy_ucomm.
l_sy_ucomm = sy-ucomm.
Put the break point here and check the l_sy_ucomm.
-
This is wrong.Every time case statement will get true.
CASE l_sy_ucomm.
WHEN l_sy_ucomm.
-
Pls. reward if useful
‎2007 Apr 02 10:29 AM
Hi..,
Generally we use the case statement as ..
<b>CASE w_field
when 1. ** gets executed when w_field = 1.
do
when 2. ** gets executed when w_field = 2.
do
when 3. ** gets executed when w_field = 3.
do
endcase.</b>
but u are checking here as..
<b>CASE l_sy_ucomm.
WHEN l_sy_ucomm. <u>** here it should contain the value of the l_sy_ucomm. for ex : 'DISP' - the function code..</u>
PERFORM f_pop_up.
ENDCASE.</b>
reward if it helps u..
sai ramesh
‎2007 Apr 02 10:44 AM
Hi,
What you can do is to put a breakpoint in your IF statement to see the value of v_quantity if its 0 or not. If its not, then now check your l_sy_ucomm to see if it will perform your routine or not. Hope this helps...
P.S. Please award points if found useful...