Hi:
In this example, you have EVERYTHING (all the variables) in the COLUMN dimension -- you don't have any of your CLASS variables going down the rows. In my opinion, that's going to be a very unacceptable table.
I'd expect something more like this (again -- just using your PROC REPORT variables in a reasonably equivalent table statement {CODE NOT TESTED}):
[pre]
class year yr_mon productgroup terr_id bsm Physician_name;
var total_scripts;
table terr_id*bsm*(Physician_name all='BSM Tot') all='Grand Total'*{style={font_weight=bold background=red}},
year=' '*(yr_mon=' ' all='Year Total')*productgroup=' '*total_scripts=' '*sum
all='Grand Total'*productgroup=' '*total_scripts=' '*sum /
format_precedence=row;
keylabel sum=' ';
format yr_mon monyy5.;
[/pre]
In this code, terr_id, bsm, physician_name, BSM total and a grand total all move to the ROW dimension. Then total_scripts for year, yr_mon, year total, productgroup, and Grand Total of total_scripts are in the COLUMN dimension. In addition, the total rows are going to be RED because of the STYLE=override and format_precedence=ROW setting.
It looks like you added some variables, I don't recall seeing MD_zip or region in your previous posts.
I like to think of PROC TABULATE as being the premier "slicer and dicer" of data, based on your class variables. I'm not sure what you mean when you say "Hoping it would sum 2007, 2008 and 2009 years for all total_scripts" since TABULATE will do just about any sum in any dimension you can think of.
Look at some of these TABULATE examples for more ideas.
http://www2.sas.com/proceedings/sugi25/25/iv/25p159.pdf
http://www.nesug.org/proceedings/nesug07/cc/cc07.pdf
http://www2.sas.com/proceedings/sugi30/258-30.pdf
http://www2.sas.com/proceedings/sugi24/Handson/p153-24.pdf
http://www.lexjansen.com/pnwsug/2004/ANYONECANLEARN.pdf
Generally, I find a table that I like and then in my mind do the substitution routine (where they have country, I want zip code; where they have region, I want division; where they have sales, I want total_scripts). I also find it helpful to sketch out a picture of the table I hope to produce because this helps me figure out how to build the table statement.
cynthia