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: 

E-mail notification for error idoc's

Former Member
0 Kudos

Hi,

We have extended the standard Idoc COND_A and when ever Idoc is generatedwith error I need to send an email notification to an user.

How can I do this.

i think i cannot use the standard task as the Idoc is extended.

Please let me know as this is urgent.

Regards

Kumar

3 REPLIES 3

Former Member
0 Kudos

Hi Kumar,

Assuming that you need to send a mail to the SAP inbox of the user, a corresponding mail object needs to be created.

First you need to obtain the folder details. These can be obtained by calling the 'SO_FOLDER_HIERARCHY_READ' FM where you need to pass the username (sy-uname)

Next, the mail object is created using 'SO_OBJECT_INSERT' FM. You need to pass the mail folder details to this function module.

CALL FUNCTION 'SO_OBJECT_INSERT'

EXPORTING

folder_id = Object Folder Details obtained above

object_fl_change = SOFM1 Structure (Can be blank)

object_hd_change = SOOD1 Structure (Mail description)

object_type = 'RAW'

owner = sy-uname

IMPORTING

object_fl_display = SOFM2 Structure

object_hd_display = SOOD2 Structure

object_id = Object Details

TABLES

objcont = Mail Contents

objhead = Mail Contents

objpara = SELC Table

objparb = SOOP1 Table

ferry_lianto
Active Contributor
0 Kudos

Hi Kumar,

You can use transaction code <b>WE06</b> - Active IDoc Monitoring to monitor any IDoc errors and send notification to user via SAP Office inbox. You can schedule this program periodically.

Or you can write custom program to chcek any IDoc error and notify user with email.

Hope this will help.

Regards,

Ferry Lianto

0 Kudos

Hi,

Where should I write the code.

There is a object IDOCCOND_A and the event INPUTERROROCCURRED is there.

Where should i write the code.

Regards

Kumar