clear
input country year gdp
1 2000 70
1 2001 90
1 2002 150
2 2000 20
2 2001 30
2 2002 60
3 2000 120
3 2001 95
3 2002 135
end
bysort year (country): gen _percent=sum(gdp)
by year: replace _percent=100*_percent/_percent[_N]
reshape wide _percent gdp, i(year) j(country)
quietly sum year