Skip to Content
avatar image
Former Member

problem on logical condition ( urgent)

hi all

please find out the problem as given below and give the solution as soon as possible.

<b><u> PROBLEM –1</u></b>

IF

WA_REGUH-RZAWE = 'R'

AND

WA_BNKA-SWIFT <> 'HSBC01INDIA' or <> 'HSBC02INDIA' or <> 'HSBCINBB' .

For the above condition, below code is correct or not? If not then give correct code for the same

IF ( ( WA_REGUH-RZAWE EQ 'R' )

AND ( ( WA_BNKA-SWIFT NE 'HSBC01INDIA' )

OR ( WA_BNKA-SWIFT NE 'HSBC02INDIA' )

OR ( WA_BNKA-SWIFT NE 'HSBCINBB' ) ) ).

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

<b><u>PROBLEM –2</u></b>

IF

( WA_REGUH-RZAWE = 'R'

AND

WA_BNKA-SWIFT = 'HSBC01INDIA' or = 'HSBC02INDIA' or = 'HSBCINBB' )

OR

( WA_REGUH-RZAWE = 'N'

AND

WA_BNKA-SWIFT = 'HSBC01INDIA' or = 'HSBC02INDIA' or = 'HSBCINBB' ).

For the above condition, below code is correct or not? If not then give correct code for the same

IF ( ( ( WA_REGUH-RZAWE EQ 'R' )

AND ( ( WA_BNKA-SWIFT EQ 'HSBC01INDIA' )

OR ( WA_BNKA-SWIFT EQ 'HSBC02INDIA' )

OR ( WA_BNKA-SWIFT EQ 'HSBCINBB' ) ) )

OR ( ( WA_REGUH-RZAWE EQ 'N' )

AND ( ( WA_BNKA-BNKLZ EQ 'HSBC01INDIA' )

OR ( WA_BNKA-BNKLZ EQ 'HSBC02INDIA' )

OR ( WA_BNKA-BNKLZ EQ 'HSBCINBB' ) ) ) ).

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 17, 2007 at 01:00 PM

    IF ( ( WA_REGUH-RZAWE EQ 'R' )

    AND ( ( WA_BNKA-SWIFT NE 'HSBC01INDIA' )

    AND ( WA_BNKA-SWIFT NE 'HSBC02INDIA' )

    AND ( WA_BNKA-SWIFT NE 'HSBCINBB' ) ) ).

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 17, 2007 at 01:09 PM

    I don't think you need so many brackets, try this

    -1

    IF WA_REGUH-RZAWE EQ 'R'

    AND ( WA_BNKA-SWIFT NE 'HSBC01INDIA'

    OR WA_BNKA-SWIFT NE 'HSBC02INDIA'

    OR WA_BNKA-SWIFT NE 'HSBCINBB' ).

    -2

    IF ( WA_REGUH-RZAWE EQ 'R'

    AND ( WA_BNKA-SWIFT EQ 'HSBC01INDIA'

    OR WA_BNKA-SWIFT EQ 'HSBC02INDIA'

    OR WA_BNKA-SWIFT EQ 'HSBCINBB' ) )

    OR ( WA_REGUH-RZAWE EQ 'N'

    AND ( WA_BNKA-BNKLZ EQ 'HSBC01INDIA'

    OR WA_BNKA-BNKLZ EQ 'HSBC02INDIA'

    OR WA_BNKA-BNKLZ EQ 'HSBCINBB' ) ).

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 01:13 PM

    hi ajit,

    try like this

    1.IF ( ( WA_REGUH-RZAWE EQ 'R' )

    AND ( ( WA_BNKA-SWIFT NE 'HSBC01INDIA' )

    OR ( WA_BNKA-SWIFT NE 'HSBC02INDIA' )

    OR ( WA_BNKA-SWIFT NE 'HSBCINBB' ) ) )

    or

    IF WA_REGUH-RZAWE EQ 'R'

    AND WA_BNKA-SWIFT NE 'HSBC01INDIA'

    OR WA_BNKA-SWIFT NE 'HSBC02INDIA'

    OR WA_BNKA-SWIFT NE 'HSBCINBB' .

    2.WA_REGUH-RZAWE = 'N'

    AND

    WA_BNKA-SWIFT = 'HSBC01INDIA' or = 'HSBC02INDIA' or = 'HSBCINBB'

    or

    (WA_REGUH-RZAWE = 'N'

    AND

    WA_BNKA-SWIFT = 'HSBC01INDIA' or = 'HSBC02INDIA' or = 'HSBCINBB' )

    if helpful reward some points.

    with regards,

    Suresh Aluri.

    Add comment
    10|10000 characters needed characters exceeded