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: 

How to throw error message to log (userexit)

Former Member
0 Kudos

Hi All,

I am working on User Exits for Delivery creation and change.

ie for VL01 and VL02.

Actually i am using USEREXIT_SAVE_DOCUMENT, subroutine.

At this stage i need to insert values into one Z-table.

So while inserting in need to check whether data inserted or not.If data not inserted ,then i need to throw error message to error log.

I dont know how to throw error message to error log in background.Can one suggest for this.

For Ex:

Insert into Z1009.

if sy-subrc <> 0.

Throw error message to log.(my Prob)

Endif.

Thank u,

Kalidas Thhirumoorthy

1 ACCEPTED SOLUTION

martin_voros
Active Contributor
0 Kudos

Hi,

check this link Section Subsequent Analysis of Lock Table Overflows

http://help.sap.com/saphelp_erp2005vp/helpdata/en/d3/43d2416d9c1c7be10000000a1550b0/frameset.htm

basically you can increase the maximum number of lock to prevent this situation. You should check and carefully analyse why the current limit was not enough.

5 REPLIES 5

martin_voros
Active Contributor
0 Kudos

Hi,

check this link Section Subsequent Analysis of Lock Table Overflows

http://help.sap.com/saphelp_erp2005vp/helpdata/en/d3/43d2416d9c1c7be10000000a1550b0/frameset.htm

basically you can increase the maximum number of lock to prevent this situation. You should check and carefully analyse why the current limit was not enough.

0 Kudos

Hi ,

Thank u for ur reply.

Actually my req is not lock object.

I need to throw error message to error log ,just like session in BDC.

It can be possible thru some function module.

i dont know which function module will suit for sending error message to error log.

Thank u

Kalidas.T

0 Kudos

Sorry mate. Shame on me. I hit the wrong thread. Now I have to find correct one.

0 Kudos

Hi,

maybe you can try to use this BADI LE_SHP_DELIVERY_PROC. It contains method

SAVE_AND_PUBLISH_DOCUMENT Save Own Data/Publish Delivery

Unfortunately sample code for this method does not contain any code. But I am not sure what will happen when you display message in this method. Or maybe you can user different method DELIVERY_FINAL_CHECK. You will store your values in your table here and definitely you can display your message here in case of error using table CT_FINCHDEL. But maybe you will have another problem, that in some bad scenario you will store record in your table but later on saving will fail.

Generally I prefer BADI so maybe you can try this way.

0 Kudos

Hi,

Thank u for ur interest.

Regards,

Kalidas.T