Try your success callback
like,
success: function (data) {
$("#ajaxload").hide();
$.each(data, function (i, item) {
// creates table and its header
var table='<table class="boxtablestructure">';
table += '<tr><th>No : '+data[i]+'</th></tr>';
table += '<tr><th style=""> Rollno</th></tr>';
table += '</table></br>';
// append table in box_content
$("#box_content").append(table);
// creates tbody and append to last inserted table
var $tbody = $('<tbody>').appendTo('#box_content table:last');
$.ajax({
type: 'POST',
url: '@routes.Application.getU()',
data: {
docid: data[i]
},
beforeSend: function () {
},
success: function (items) {
// append the rows in last created table body
$.each(items, function (j, item) {
$tbody.append('<tr><td>' + item + '</td></tr>');
});
}
});
});
} // end success callback