Using ABAP Function module RSAQ_REMOTE_QUERY_CALL, NO_DATA_SELECTED exception using selection parameters

SAP provides flexible options that allow selection parameters to be used easily with the RSAQ_REMOTE_QUERY_CALL function module. When using multiple parameters, please note the following important considerations ?

Key Parameter Settings

KIND Field Configuration: Set KIND to "S" only when using select-options. If you are using simple parameters, it should be "P".

Language Setting: Instead of using EN, try using the internal language code "E" for better compatibility.

Finding Field Types with RSAQ_REMOTE_QUERY_FIELDLIST

The function module RSAQ_REMOTE_QUERY_FIELDLIST can be used to determine the correct field types and structures for your query parameters. This is essential for proper parameter configuration.

How to Access Function Module Details

To examine the function module structure, follow these steps ?

  1. Use T-code SE37
  2. Enter the function module name
  3. Click Display to view the interface parameters

SE37 Function Module Display

Handling NO_DATA_SELECTED Exception

The NO_DATA_SELECTED exception is commonly raised when the query returns no results based on the selection criteria. Always implement proper exception handling in your calling program to manage this scenario gracefully.

CALL FUNCTION 'RSAQ_REMOTE_QUERY_CALL'
  EXCEPTIONS
    NO_DATA_SELECTED = 1
    OTHERS           = 2.

IF SY-SUBRC = 1.
  MESSAGE 'No data found for the given selection criteria' TYPE 'I'.
ENDIF.

Conclusion

Proper configuration of the KIND field, language settings, and exception handling ensures smooth execution of remote queries using RSAQ_REMOTE_QUERY_CALL. Use RSAQ_REMOTE_QUERY_FIELDLIST to understand the required field types for accurate parameter passing.

Updated on: 2026-03-13T19:11:20+05:30

633 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements