The Fetch retrieves the data. You do not want to use the data until within the While loop in case there is no data returned. Also, you need a FETCH NEXT at the bottom of the While loop.
DECLARE trancur cursor FAST_FORWARD For
SELECT
t.ExpCom*t2.SplitPerc,
t.TrNo
FROM #TmpAgtTot2 t2 (NOLOCK)
Inner Join #TmpTran t (NOLOCK) ON t.RepCode=t2.TranRepCode
Where t.ASL in (''A'', ''S'', ''L'')
Fetch FIRST trancur INTO @NextGrossComm, @TrNo
While @@fetch_status = 0 AND @CurrGrossComm < @MaxGrossComm
BEGIN
Set @myflag = 1
Set @CurrGrossComm = @CurrGrossComm + IsNull(@NextGrossComm,0)
Fetch NEXT trancur INTO @NextGrossComm, @TrNo
END