Hi Suhas,
When I took out the 'if sy-subrc' statement from the code and moved the RAISE no_more_data to the end before s_counter_datapakid = s_counter_datapakid + 1, the job got finished in erp but No records came through to BW.
I had this issue when I didn't specify if sy-subrc before, thats why I added it.
Thanks
Anima