Hi Norman,
Don't sort the internal table inside the loop.
Don't use the loop for sorting an itab.
Please check the code below.
select * from sbook into CORRESPONDING FIELDS OF TABLE it_sbook where customID ='00000238'.
loop at it_sbook into wa_sbook.
select * from stravelag into corresponding fields of table it_strave where agencynum = wa_sbook-agencynum.
endloop.
SORT it_starve ASCENDING BY NAME.
loop at it_strave into wa_strave.
READ TABLE IT_SBOOK into wa_sbook with key agencyNum = wa_starve-agencyNum.
write: / wa_strave-Name, wa_sbook-bookID, wa_sbook-agencyNum.
endloop.