Ben Affleck Can't Get Enough of Jennifer Lopez ... Visits Her On Set!!!

Ben Affleck's doing one helluva job getting all up in Jennifer Lopez's business ... he spent HOURS on the set of her new film and got really involved.

Ben showed up at an L.A. studio Wednesday ahead of J Lo and spent around 4 1/2 hours on the set... where he mingled with the crew. He was wearing an earpiece commonly used on film sets. It's unclear if he was giving anyone notes or if he was just an observer.

J Lo's longtime manager, Benny Medina, was also at the studio ... makes sense, because Benny is almost always by J Lo's side when she's working.

Ben and Jen clearly worked up an appetite after a long day on the set 'cause, as we reported, they later hit up Craig's in WeHo with Jen's 13-year-old daughter, Emme.

You can maybe call the dinner an early birthday celebration. Ben turns 49 on Sunday. We're told he'll first do something with his kids and then celebrate with J Lo. We've heard rumblings ... it could involve an out-of-town trip.

Maybe she'll gift him a necklace emblazoned with "J Lo." Then they become a matching set!

Click here for info about our online advertising practices.