I am using ENQUEUE_EPPRELE to lock all infotype records in 2001 and it returds a foreign lock message.
CALL FUNCTION 'ENQUEUE_EPPRELE'
EXPORTING
PERNR = p2006-pernr
INFTY = '2001'
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.