Skip to Content
0
Former Member
Jul 21, 2008 at 04:53 AM

Why this simple IF - ENDIF is NOT working??

166 Views

Hi Experts,

Am wrting a simple IF condition with WILD CARD value , in the user exit, as below,

if xlikp-lgbzo = 'AB'. (pls. notice that, there is WILD CARD in the 'AB' value)

sy-subrc = 0.

else.

sy-subrc = 4.

endif.

1) Say, the XLIKP-LGBZO value = AB-01-02 (pls. notice that, there ' - ' in the value of AB-01-02)

then, sy-subrc is becoming 4 ?????????????

2 )Say, the XLIKP-LGBZO value = ZB-01-02

then, sy-subrc is becoming 4

the 2nd case is OK, but, Why the 1st case is becoming FALSE?? actuallym it shuld b TRUE, right??

Is it bcoz of hiphans - " - "?? but, i tried with WITH OUT hiphans , then also NOT working CORRECTLY??

thanq