Question:
Is there a way to check if billing doc is cancelled, faster than something along the lines of:
select vbeln up to 1 rows
from vbrk where sfakn eq l_sfakn.
endselect.
this looks to see if there's a document that cancels the one we're checking for if it's cancelled. Takes forever, as this field SFAKN (cancelled billing doc #) is not a key field and the table VBRK will get huge over time. Is there a faster and equally acurate way to check this (w/o putting an index on VBRK, of course)?
Thanks!
Answer:
You should be using the field FKSTO on VBRK. This field tells you if the billing doc is canceled. You'll be using the primary key!
Brad