Patrick Lennon, 49, and Michael Gilmour, 42, both from Lockerbie, appeared separately in private before Sheriff George Jamieson.
They were on a petition alleging the charges and no plea or declaration was made.
Both were remanded in custody and the case was continued for further examination.