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

Runtime error:SQL error "SQL code: 340" occurred while accessing table "QALS".

ramesh_mahankali
Active Participant
0 Likes
1,727

Hi Experts,

Recently we have upgraded to to HANA DB version 1.0 SP11 revision 110. Now I am getting runtime error on one of our custom code for QALS table.

Below are the details:

The same query used work fine in old DB.

Can you please help me understand what could be the reason for this error?

Thanks in advance,

Ramesh

1 REPLY 1
Read only

ramesh_mahankali
Active Participant
0 Likes
945

Hi Experts,

On further analysis we found that following SQL statement is failing when LR_OWN internal table is empty.


SELECT   charg

              matnr

              werk

              prueflos

              stat35

              objnr

              enstehdat

              entstezeit

         APPENDING TABLE fp_i_batch_ud

         FROM qals

          FOR ALL ENTRIES IN li_shadow

        WHERE charg = li_shadow-charg

          AND matnr = li_shadow-matnr

          AND ( werk  = li_shadow-werks

OR werk IN lr_own ).

But the same query does not fail in old DB even LR_OWN is empty. If anyone has faced similar issue or know any limitations of HANA DB in cases like these, please share.

Thanks,

Ramesh