Hi Harshit
There should be issue with cursor which doesn't stop counting. Though there is no data packages to extract, the code keeps searching for the data.
We had the same issue with one of DS based on FM and we solved it by changing the counter datapackid from 0 to 5 (for my DS, it should be 5)
May be someone else will also give you some suggestions.
Remove the below code
*IF S_COUNTER_DATAPAKID = 0.
Add the below code
*Newly added code starts to check
IF S_COUNTER_DATAPAKID = 2 " try 1 first based on the number of data packages you have
RAISE NO_MORE_DATA.
ENDIF.
*Newly added code ends
*Below is existing step in middle of your code.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
This should work fine. Let us know if there is any challenges.
If this works, then consult with your ABAPer and correct the code as you wish foreseeing the future data loads.
Regards
Karthik