Hello Allwyn,
Reason why you are not getting the total is found.
in the below block you should clear c_lv_atend not c_lv_atnew .
WRITE: / 'AT ENDOF'.
CLEAR:c_lv_atnew. <------ here change it to CLEAR:c_lv_atend
LOOP AT ITEKPO INTO WAEKPO.
TEMP = WAEKPO.
AT END OF EBELN.
WRITE: / SY-TABIX, WAEKPO-EBELN, TEMP-NETWR.
c_lv_atEND = c_lv_atend + TEMP-netwr.
ENDAT.
ENDLOOP.
See below Screen shot, it worked for me.
Regards,
Thanga