‎2008 Jul 28 6:16 PM
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
‎2008 Jul 28 6:22 PM
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
‎2008 Jul 28 6:22 PM
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
‎2008 Jul 28 6:25 PM
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 .
‎2008 Jul 28 8:38 PM
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.