Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error in the module RSQL accessing the database interface.

Former Member
0 Likes
580

Hi All,


  IF it_vbak IS NOT INITIAL.
    SELECT matnr meinh umrez umren FROM marm            
      INTO TABLE it_marm                                
      FOR ALL ENTRIES IN it_vbak                        
      WHERE matnr = it_vbak-matnr                       
        and meinh = it_vbak-zieme.                      

    SORT it_marm BY matnr meinh.                        
    DELETE ADJACENT DUPLICATES FROM it_marm.            
  ENDIF.

This simple select statement gives me an dump saying

<b>Error in the module RSQL accessing the database interface. </b>

What is wrong with this statement.

Thanks In Advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
551

Hi Jr Abaper.

Check the definition of it_marm, the fields should be in the same order as the select field list.

Hope it Helps.

Jesus

4 REPLIES 4
Read only

Former Member
0 Likes
552

Hi Jr Abaper.

Check the definition of it_marm, the fields should be in the same order as the select field list.

Hope it Helps.

Jesus

Read only

0 Likes
551

Make sure you are checking it_vbak[] not initial instead of it_vbak. The way it is written now will attempt the select if there is anything in the header of your internal table even if the table is emtpy.

Message was edited by: Michael Malvey

Read only

0 Likes
551

If your structure of IT_MARM is not the same MARM, then you will get an error. A quick fix is to use INTO CORRESPONDING FIELDS OF TABLE


              
INTO CORRESPONDING FIELDS OF TABLE it_marm                                      

Regards,

Rich Heilman

Read only

Former Member
0 Likes
551

Hi,

Please try this.

IF NOT IT_VBAK[] IS INITIAL.
  ...
ENDIF.

Regards,

Ferry Lianto