on 06-29-2009 10:07 AM
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!
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.