the BAL_* function modules are to be used to read the log (APPL_* function modules are valid but deprecated when SAP released the BAL_* ones).
BAL_DB_LOAD to read the whole log, but it's just stored in memory, and you need to use BAL_GLB_SEARCH_MSG to filter the messages you want (based on the message class and ID for instance) and get the message IDs, then you read each message using BAL_LOG_MSG_READ to get the number after the message.
PS: I didn't understand why you need to extract the long text from the message, what is the interest as it will never change, could you explain? (only the message variables do change, they are not part of the long text itself as it only contains the placeholders)