Hi,
one needs to figure out what ABAP sens to the DB.
In the short dump there is something like
Work process number.. 10
Note this number, here it is 10.
Then in transaction SM50 select this work process and in the menu select "Administration -> trace -> Display File -> Current"
In the trace there should be some info about this SQL error and probably the SQL statement.
E.g. the division-by-zero error of the ABAP statement
select DIV( 1, 0 ) as a from svers into table @data(lt_result).
is traced as follows (in a HANA system)
C *** ERROR => readFda() of C_0984, rc=1, rcSQL=304
...
C SELECT /* FDA READ */ CAST( CAST( 1 AS INTEGER ) / CAST( ? AS INTEGER ) AS INTEGER ) "A" FROM "SVERS\
For further analysis the trace info around ORA-01791 would be helpful.
Regards, Christian