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

Problem in Error Message

Former Member
0 Likes
570

Hi Abappers,

When the errorr message is displayed in an execution of the report, it get out of the program.

How to continue the execution of the report from that point where the error message was came?

It partly updates the Database table.

Suppose i have 100 records to upload.

On 51st error msg was handled as Duplicate entry.

then it comes out of the program leaving rest of the record.

How to continue with the uploading of the next all records.

Please reply.

Regards,

Rahul

4 REPLIES 4
Read only

Former Member
0 Likes
548

Hi,

Try to use the Call transaction and Session in combintaion.

We can pass the error records to session method and are handled by session itself. Error-free records are processed in call transaction and when ever the error arises the Session is called.

CALL TRANSACTION............................

if sy-subrc NE 0.

appennd these error records into other internal table and then send this to the session methods as below.

BDC_OPEN_GROUP

BDC_INSERT....

BDC_CLOSE_GROUP.

Also refer to this for more understanding-

Please refer to this link for detailed uage of both -

Regards

Chandralekha

Read only

Former Member
0 Likes
548

Hi,

You update the dbtable on a bulk from an itab instead of updating each record from the workarea. It would update the valid rows and doesnt update the invalid ones. In your example, it updates the rest of 99 rows ignoring the 51st one.

hope this may help you.

thx

pavan

Read only

Former Member
0 Likes
548

when you ever you feel that there may be a chance that error will occur that place you have to handle.

if suppose function

call function 'TEST'

....

..

if sy-subrc <> 0.

continue.

endif.

using sy-subrc check you can control that. instead of raising the message.

If there exceptions you can handle using TRY ,CATCH .

Read only

Former Member
0 Likes
548

One way to handle duplicate issue is , before trying to load

the data , execute this statement in your report -

delete adjacent duplicates from <itab> comparing <field1> <field2> <field3>.......

This way you won't have duplicate data to run into this error.