Strange Behaviour

Question:
Dear all,
I’m struggling with a very strange issue and I need some advise/guidance on this…
I’m browsing on table VBFA (SD doc flows).
Now if I use document 80000013 (an invoice) as an input in field VBELV (preceding doc.) the system returns 6 records as the result. Two of them are related to follow-on document (field VBELN) 20020902 (a WMS transfer order). So far so good.
Now if I return to the table browser selection screen of table VBFA and this time I use 20020902 as the input in filed VBELN (follow-on document !!!) the system returns a message that no records could be selected. This is quite strange as in the previous situation it showed this document as a valid follow-on document (VBELN). Even when I use 80000013 as an input for VBELV together with 20020902 for VBELN it still respond with no records could be selected.
The issue is that I need also to report on documents that are related to this WMS transfer order. Now my ABAP report is using the following select statement:
SELECT * FROM vbfa
WHERE vbeln EQ it_docs-vbeln.
MOVE vbfa-vbelv TO it_reldocs-vbeln.
MOVE vbfa-vbtyp_v TO it_reldocs-vbtyp.
APPEND it_reldocs.
CLEAR it_reldocs.
ENDSELECT.
In this statement it_docs and it_reldocs are internal tables storing the document number VBELN and documents type VBTYP. While looping over it_docs I search for related preceding (VBELV) documents in VBFA where VBELN equals to it_docs-vbeln. The result is stored in it_reldocs.
The strange thing is that this statement actually results in a good read and it actually recognises 20020902 as a valid follow-on document. However due to this inconsistent behaviour of the system I’m not sure whether or not the select is picking up all the correct documents…
Does anybody know the cause of this strange behaviour and why I can’t browse but can select?
Cheers
Answer:
Maybe something to do with field-exits??? Have you tried including the zeroes to your selection screen???

More Articles:

How suppres left zeros in the matnr?
SAP Mail functionality.?
in internal tables,?
Report Painter & Report Writer?
To create unix file at application server?
Download data to Excel?