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

Problems with Sumbit a report to update database

Former Member
0 Likes
1,157

There is report which can output a list and update database table at same time, I use 'export listing to memory' to avoid listing display, but there is a error occured for updateing database. That mean when calling program continue to execute, a logic to check database value will occur a error cause that report doesn't commit the update to database.

Any help will be appreciated.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,129

Just put an explicit commit work just afer the submit

SUBMIT REPORT .... EXPORTING LIST to MEMORY.

COMMIT WORK.

Cheers

There is report which can output a list and update database table at same time, I use 'export listing to memory' to avoid listing display, but there is a error occured for updateing database. That mean when calling program continue to execute, a logic to check database value will occur a error cause that report doesn't commit the update to database.

Any help will be appreciated.

8 REPLIES 8
Read only

Former Member
0 Likes
1,130

Just put an explicit commit work just afer the submit

SUBMIT REPORT .... EXPORTING LIST to MEMORY.

COMMIT WORK.

Cheers

Read only

Former Member
0 Likes
1,129

Paul - could you please be a bit more specific in the sequence of events? Is it:

Program a submits program b exporting list to memory.

Program b updates database.

program a reads list and processes it.

Rob

Read only

Former Member
0 Likes
1,129

Anothe rissue may be that Report A calls Report B.

Report B updates the database.

In report A when you select from databse you donot find the entries.

One reason may be that Report B updates in update task.

In this case you can use -

SUBMIT B exporting list to ....

COMMIT WORK AND WAIT .

( System will wait for update task to update teh databse ).

Cheers.

Read only

Former Member
0 Likes
1,129

Hi all, thanks for you help. I had already use 'commit work and wait', but it dones't work, update still not be put into database.

Read only

0 Likes
1,129

check in debugger the value of sy-subrc after u update the database and before doing a commit work...ur update(or insert) statement may not be actually inserting the values....or ur internal table used to update database table may be empty...

u can also check with sy-dbcnt to know how many rows were updated...this will give u a fair idea on whether ur statement actually updated the database or not

rgds,

PJ

Read only

Former Member
0 Likes
1,129

Hi

It seems the report which you calling is a SAP standard report . Can you give the report name which you are calling from your custom program.

Cheers

Read only

Former Member
0 Likes
1,129

The caller program is also a customer program.

Read only

Former Member
0 Likes
1,129

Be more specific and paste code of databse operation and submit statement .

Cheers