Usually, in ABAP you use OpenSql statements to retrieve the data. OpenSql statements are similar to normal SQL statements. In case you need to use the function module on a remote system, then you need to use remote function calls like RFC_READ_TABLE.