how to get first five records in X++

dont know the record values

any one reply me

There is no construct for getting exactly five records, but you can fetch first ten and take just first five ones:

int i = 1;

while select firstOnly10 t1 // Fetch first ten records
    order by SomeFile // "first" doesn't make sense without sort
{
    i++;
    if (i > 5)
    {
        break; // break after fifth record
    }
}

Nevertheless please describe your problem with much more details next time, okay?