SELECT eket~wemng FROM eket INNER JOIN ekko
ON eket~ebeln EQ ekko~ebeln
INTO TABLE i_eket FOR ALL ENTRIES IN i_aufk
WHERE ekko~ebeln EQ i_aufk-zzebeln
AND ebelp EQ i_aufk-zzebelp.
SORT i_eket BY ebeln ebelp.
With EBELP, give the table name either EKET or EKKO. Just like you have given with other WHERE condition EKKO~EBELN.
SORT i_eket BY ebeln ebelp.
You are trying to sort I_EKET on the basis of EBELN and EBELP while there is only one field in I_EKET which is not equal to either of them.
Regards,
Richa