Hi Edgar,
I'm not an expert in Logistic, hence I am not sure if this is a user exit, so correct me if I am wrong, KUNNR is a customer number that contains 8 characters. Her constant is a 2 character field, hence I sort of thinking she is trying to group up all customer that have a prefix code of AG. Hence where the loop kicks in.
If she just want 1 record, then ya...read will be a better option.
Another thing I picked up from her reply as well, the error is with XVBPA, but when you look how she code the read statement:
READ TABLE int_xvbpa INTO ws_int_xvbpa WITH TABLE KEY kunnr = lc_ag.
So there is definately something wrong with the code that don't match the print screen. Can't really help much without seeing the whole code though.
Best regards,
Brian