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

error handling with LSMW

Former Member
0 Likes
703

I am uploading Business partner master data with LSMW using IDOC approch.Using this how can we maintain an error log-like how many records have been uploaded,how many have failed,what are the errors etc.Do we have to do any sort of coding or is there any other method?

I am uploading Business partner master data with LSMW using IDOC approch.Using this how can we maintain an error log-like how many records have been uploaded,how many have failed,what are the errors etc.Do we have to do any sort of coding or is there any other method?

1 REPLY 1
Read only

Former Member
0 Likes
353

Hi,

SAP generated messages can't be handled in LSMW. We can check/Analyze the logs by T.Code: SLG1.

2.In the field mappings and conversion rules,

in the global section,define an internal table.

data : begin of it_errors occurs 0,

desc type string,

end of it_errors.

and where ever you have wrong or empty values for the fields,populate error there to the internal table.

for example, if Material no is blank,i have to give err msg

IF NOT MATMAS_MRPVIEW-MATNR IS INITIAL.

BMM00-MATNR = MATMAS_MRPVIEW-MATNR.

else.

IT_ERROR-DESC = 'Material no is empty'.

append it_error.

SKIP_RECORD. "to skip further processing of this error record.

ENDIF.

like this you populate all the error records to that IT_ERRORS internal table.