Are you talking about a residential type loadcenter or a panelboard? Even though you said a commercial building a loadcenter could possibly be used and most loadcenters are 4" deep whereas a panelboard is generally 5.75" deep.
Roger
How high is the wall and what gauge studs are used?
Is it stable now with no panel? Non-loadbearing walls are only required to withstand 5 lb lateral force but if it's wobbly now it's going to be worse if you put a panel in it.
New construction or existing wall?
If code allows one trick is to cut some lumber to install on the far side of each stud. That way you get something to bite into without reducing the width of your framing bay. Run them floor to ceiling if you can.
You will need a minimum 6" deep wall.It's a panelboard 20"W x 5.75" D
A standard "2x6" is 5-1/2 inches wide. You get an additional 1/2 or 5/8 from the thickness of drywall applied to it and can flush mount anything under 6 or 6-1/8 inches deep.It's a new construction and we are in design phase and we can make the wall depth as needed. Normally I ask for 6" stud and never had any issue with it but I'm looking for the minimum stud depth that will work.
Thanks,