cancel
Showing results for 
Search instead for 
Did you mean: 

Error in module RSQL of the database interface.

Former Member
0 Kudos

Hi All,

I am trying to learn web dynp by self trainning.

I am trying to work with "Item listBox". My requirement is... I want to display data in a table based on the selection in itemlistbox.

For this i have used one button named "Display".

In that action i written below code.

 * Data Declaration 
  DATA lo_nd_airline TYPE REF TO if_wd_context_node.
  DATA lo_el_airline TYPE REF TO if_wd_context_element.  DATA lt_elements TYPE wdr_context_element_set.
  DATA ls_airline TYPE wd_this->element_airline.
  DATA it_type TYPE wd_this->elements_airline.  DATA lv_id LIKE ls_airline-id.
    DATA lo_nd_sflight TYPE REF TO if_wd_context_node.
  DATA lo_el_sflight TYPE REF TO if_wd_context_element.  DATA lt_sflight TYPE wd_this->elements_sflight.
  DATA lt_sflight2 TYPE wd_this->elements_sflight.
  DATA ls_sflight TYPE wd_this->element_sflight.* navigate from <CONTEXT> to <AIRLINE> via lead selection
  lo_nd_airline = wd_context->get_child_node( name = wd_this->wdctx_airline ).
  lt_elements = lo_nd_airline->get_selected_elements( ).
  LOOP AT lt_elements INTO lo_el_airline.    lo_el_airline->get_static_attributes( IMPORTING static_attributes = ls_airline ).
    APPEND ls_airline TO it_type.  ENDLOOP.                             " LOOP AT lt_elements    lo_nd_sflight = wd_context->get_child_node( name = wd_this->wdctx_sflight ).     SELECT  carrid
             connid
             fldate
             currency
             planetype 
       FROM  sflight
  INTO TABLE lt_sflight.  LOOP AT it_type INTO ls_airline.
    LOOP AT lt_sflight INTO ls_sflight WHERE carrid = ls_airline-id.
      APPEND ls_sflight TO lt_sflight2.
    ENDLOOP.                           " LOOP AT lt_sflight
  ENDLOOP.                             " LOOP AT it_type* Bind Internal table with Table Element
  lo_nd_sflight->bind_table( lt_sflight2 ).  ENDMETHOD. 

But i got this error while deploying...

" Error in module RSQL of the database interface."

Can anyone provide me solution to solve this error.

Thanks in Advance!

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks!

Former Member
0 Kudos

Hi

Check the structure related to lt_sflight whether you are using the same data types as in sflight table

CARRID S_CARR_ID

CONNID S_CONN_ID

FLDATE S_DATE

PRICE S_PRICE

CURRENCY S_CURRCODE

PLANETYPE S_PLANETYE

and one more suggestion never use a SELECT statement inside a loop,this will lead to a performance issue.

Regards

Chaitanya.A

Former Member
0 Kudos

Hi,

By looking at the code u have pasted, I think you have by mistake commented the "SELECT CARRID" keyword in the SQL statement in the line no. 13

Please check that.

Regards

Shruti

Former Member
0 Kudos

Hi Sruthi,

By mistake it was pasted in comments, but in my code i written correctly. I am not able to solve that error.

To learn about "ItemListBox" i followed some tutorial...

Can U Please Help me!

Thanks!

Edited by: sreelakshmi.B on Jun 30, 2009 10:59 AM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

This error would not seem to be Web Dynpro related at all. It should really be posted in the ABAP general form. RSQL error has to do with your SQL statement. Probably something to do with the selection fields not matching up with the structure of lt_sflight. Check the definition against the fields you are Selecting or use the INTO CORRESPONDING FIELDS OF TABLE syntax on your SQL statement.