Skip to Content
0
Former Member
Feb 09, 2007 at 05:24 AM

Problem with Select statement.

51 Views

DATA: wa_usr05 TYPE usr05.

The select statement always gives sy-subrc = 0

even if there is no entry with parid = 'ZRD'.

On successful it fills the structure wa_usr05 as

MANDT C 3 ACC

BNAME C 12 SCL

PARID C 20 X

PARVA C 18

but mandt is 310.

USR05 is a pool table and has mandt field.

SELECT SINGLE bname

parid

parva

FROM usr05

INTO wa_usr05

WHERE bname = sy-uname AND

parid = 'ZRD' AND

parva = 'x' OR parva = 'X'.

Let me know the reason and solution to the problem.