Sheldon Imaoka
Ansys Employee

If you only need to do this once, go to the "Solution Information" branch and review the "Solver Output". Use Ctrl+F to search for "MASS SUMMARY", and look for "*** MASS SUMMARY BY ELEMENT TYPE ***". There, will you will a list of mass per element type ID.
Below that should be a listing of element types per element type ID (such as under "*** ELEMENT MATRIX FORMULATION TIMES"). Beam Connections are represented with BEAM188, so find the BEAM188 element type IDs that come after contact/target element type listings, and sum the masses for these element type IDs.
(It's possible to do this via APDL scripting if you need to store the mass as a parameter, but the above process is quite simple to do instead of needing to learn APDL.)
Regards Sheldon