cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime Error - DBIF_RSQL_INVALID_RSQL - Too many OPEN CURSOR

claudio_ciardelli2
Participant
0 Kudos

When I try to train a Decision Tree Model via an APD process in RSANWB, I get a runtime error when my model is configured with too many parameter fields or too many leaves (with 2 leaves it works, with more it fails).

By searching SAP Notes I see that there are many references to this kind of runtime errors. But no note on occurences of it in RSANWB / RSDMWB .

Any information on this anyone?

Claudio Ciardelli

Runtime Errors         DBIF_RSQL_INVALID_RSQL
Date and Time          29.07.2005 16:19:21
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|ShrtText                                                                                |
|    Error in RSQL module of database interface.                                                   |
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|What happened?                                                                                |
|    Error in ABAP application program.                                                            |
|                                                                                |
|    The current ABAP program "SAPLRS_DME_DECISION_TREE_PRED" had to be terminated                 |
|     because one of the                                                                           |
|    statements could not be executed.                                                             |
|                                                                                |
|    This is probably due to an error in the ABAP program.                                         |
|                                                                                |
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|Error analysis                                                                                |
|    The system attempted to open a cursor for a SELECT or OPEN CURSOR                             |
|    statement but all 16 cursors were already in use.                                             |
|    The statement that failed accesses table "/BIC/0CDT000030 ".                                  |
|    The erroneous statement accesses table "/BIC/0CDT000030 ".                                    |
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|Trigger Location of Runtime Error                                                                 |
|    Program                                 SAPLRS_DME_DECISION_TREE_PRED                         |
|    Include                                 LRS_DME_DECISION_TREE_PREDU06                         |
|    Row                                     103                                                   |
|    Module type                             (FUNCTION)                                            |
|    Module Name                             RS_DME_DTP_EVALUATE                                   |
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|Source Code Extract                                                                               |
----------------------------------------------------------------------------------------------------
|Line |SourceCde                                                                                |
----------------------------------------------------------------------------------------------------
|   73|* Prepare for Data evaluation                                                               |
|   74|  CATCH SYSTEM-EXCEPTIONS OTHERS = 15.                                                      |
|   75|    CREATE DATA ref TYPE (i_enum_dbtab).                                                    |
|   76|    ASSIGN ref->* TO <fs_wkarea>.                                                           |
|   77|    ASSIGN COMPONENT gv_class_dbposit OF STRUCTURE                                          |
|   78|                      <fs_wkarea> TO <fs_class>.                                            |
|   79|    CREATE DATA ref TYPE TABLE OF (i_enum_dbtab).                                           |
|   80|    ASSIGN ref->* TO <ft_data>.                                                             |
|   81|                                                                                |
|   82|  ENDCATCH.                                                                                |
|   83|  IF sy-subrc = 15.                                                                         |
|   84|*   Error on Assignment.                                                                    |
|   85|    CALL FUNCTION 'RS_DME_COM_ADDMSG_NOLOG'                                                 |
|   86|      EXPORTING                                                                             |
|   87|        i_type    = 'E'                                                                     |
|   88|        i_msgno   = 301                                                                     |
|   89|        i_msgv1   = 'EVALUATION_PHASE'                                                      |
|   90|      IMPORTING                                                                             |
|   91|        es_return = ls_return.                                                              |
|   92|    APPEND ls_return TO e_t_return.                                                         |
|   93|    EXIT.                                                                                |
|   94|  ENDIF.                                                                                |
|   95|                                                                                |
|   96|* For the un-trained Rec-Ids, evaluate.....                                                 |
|   97|  REFRESH lt_recinp.                                                                        |
|   98|  APPEND LINES OF i_t_records TO lt_recinp.                                                 |
|   99|  SORT lt_recinp .                                                                          |
|  100|* Open Cursor..                                                                             |
|  101|  DATA: l_curs TYPE cursor.                                                                 |
|  102|  DATA: l_psize TYPE i VALUE 10000.                                                         |
|>>>>>|  OPEN CURSOR WITH HOLD l_curs FOR                                                          |
|  104|   SELECT * FROM (i_enum_dbtab)                                                             |
|  105|     WHERE rsdmdt_recid NOT IN                                                              |
|  106|        ( SELECT rsdmdt_recid FROM                                                          |
|  107|             (i_learn_tab) ).                                                               |
|  108|                                                                                |
|  109|*  Start Fetch...                                                                           |
|  110|  DO.                                                                                |
|  111|    FETCH NEXT CURSOR l_curs                                                                |
|  112|      INTO CORRESPONDING FIELDS OF TABLE <ft_data>                                          |
|  113|      PACKAGE SIZE l_psize.                                                                 |
|  114|    IF sy-subrc NE space.                                                                   |
|  115|      EXIT.                                                                                |
|  116|    ENDIF.                                                                                |
|  117|                                                                                |
|  118|*     Process records...                                                                    |
|  119|    LOOP AT <ft_data> ASSIGNING <fs_wkarea>.                                                |
|  120|                                                                                |
|  121|*     Call Prediction Function.                                                             |
|  122|      CALL FUNCTION 'RS_DME_DTP_PREDICT_STRUCTURE'                                          |
----------------------------------------------------------------------------------------------------

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Claudio,

well the message is very clear and I think in your case you need to split your model into a few somehow equal models, each not having more than 2 leaves.

Another option might be to do more things serially instead of parallel.

Hope it helps

regards

Siggi