Application Development 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: 

Error handling in session method

Former Member
0 Kudos

Hi Experts,

I'm doing Asset Mass deletion using BDC session method, program executes successfully when the asset doesn't contain any values or else error message( ' Deleting is not possible. The asset already has values.' ) is thrown while uploading by foreground process. How to handle this errors & upload the rest of the assets without values for deletion?

Thanks,

Kavitha

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

In this case I suggest you to go for call transaction method and you can check the return code sy-subrc after calling the call transaction. If it is not equal zero then capture the error messages. Open the error session to insert the all error records.

Regards,

Jyothi CH.

5 REPLIES 5

abdul_hakim
Active Contributor
0 Kudos

Hi

Better U proceed with CALL TRANSACTION method and check the return code(SY-SUBRC) after the statement call and if it is NE zero then open a error session to insert the error records. By this way you can move the error records to session and proceed with the rest of the data records.

Cheers,

Hakim

Former Member
0 Kudos

Hi,

In this case I suggest you to go for call transaction method and you can check the return code sy-subrc after calling the call transaction. If it is not equal zero then capture the error messages. Open the error session to insert the all error records.

Regards,

Jyothi CH.

Former Member
0 Kudos

Hi,

as per your question as in session method once you run the program and then in SM35 we can check the error log,for the particular session if check analysis we can find the errors for paticular transaction,in session method it can't give return value like sy-subrc.

in call transaction method it can return the sy-subrc ,if sy-subrc is not equal to 0 ,call to formate_message then error records r stored in internal table like bdcmsgcall,and in call transaction method can run in foregroung and back ground and once u get the error records then upload the records.

Regards,

Madhu

Former Member
0 Kudos

Problem solved after using CAll transaction method

Former Member
0 Kudos

Problem solved after using CAll transaction method