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 during database call

Former Member
0 Likes
938

Hello Experts,

I have custom program and in which i am using standard function module - which has SQL query as follows:

UPDATE <SAP std table> FROM TABLE <internal table>. As soon as this statement executes, i am getting error like :

"Error During database call".

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

Thank you in advance.

4 REPLIES 4
Read only

former_member188724
Contributor
0 Likes
879

Hi,

Please let us know what is the FM that you get this message.

Also maybe the internal table structure passed is not correct....

Unless how the FM is called with what Parameters it is difficult to analyse.

Regards,

K.S

Read only

RaymondGiuseppi
Active Contributor
0 Likes
879

There are many possible reasons (too many to guess with so few information)

Could you analyze log of the system (SM21) , dump (ST22) or log in database manager and/or give more information ?

Regards,

Raymond

Read only

Former Member
0 Likes
879

Hi Sridhar,

UPDATE assumes that you already have the entries in the table which you are making changes too and that the structure of both match.

So please check whether the structure of the SAP std table matches with that of the internal table. and whether the entries you are trying to update already exist in the SAP std table or not.

If they do not exist, a better option would be to use MODIFY, provided your requirements do not get impacted.

Regards,

Shashi Thakur

Read only

0 Likes
879

Hi,

Fm name: /SAPAPO/DM_PRODUCT_POST_ONE .. This is in SCM EWM module.

Table that i am updating is: /SAPAPO/MATLWH

It is not giving dump.. throwing error message exactly after the UPDATE query in above standard function module.

The FM is using matching internal table structure only to update the above table.

For example if i run for 40 records to update above table , it is throwing above error.

If i take subset of data, then it is working fine.

Some other cases, it is working fine without above error.

Earlier, to my program, they already used a custom program in which they directly

updated the records. I mean they update standard tables using UPDATE and INSERT statements

on table: /SAPAPO/MATLWH.

Is that some thing database inconsistency causing this issue?