cancel
Showing results for 
Search instead for 
Did you mean: 

file to multiple idoc, Raising alerts , not using ccBPM

rohit_goel
Participant
0 Kudos

Hi experts,

I have file to multiple idoc scenario.sturcture of the incoming file like given below..

Header

line item

line item

..

header

line item

line item

....

.....

there is a field Company COde in Header.If that company code is not Equal to "L" then dont map that header and line items with target

now we have to raise an alert notification mail saying that "company code is wrong." we have to send a single mail for this scenario if this condition is true even many times.

i am not using ccBPM in the scenario.

how can we achieve this functionality??

Thanks in advance.

Thanks,

Rohit

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

In your mapping, you need to do a RFC Lookup in your XI system to RFC "SALERT_CREATE".

This RFC will generate an alert in your XI system based on the ALERT Category you specify while calling.

For the second case where you want a single call to be made for multiple errors, create a alert rule for the alert category and select the option "suppress multiple alerts".

Let me know in case you need any further information.

Regards,

Anurag Mahendru.

Former Member
0 Kudos

If company code equals L generate the header and item nodes else call the below UDF to generate the alert.

function myalert(String a, Container container)

{

if (!(a.equals("L")))

throw new RuntimeException("company code is wrong");

else

return a;

}

Check this link too..

Thanks,

Vijaya.

former_member181962
Active Contributor
0 Kudos

Refer this blog to bundle multiple idocs.

/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change

After you create the custom idoc interface using the above blog,

map the root node of the idoc interface based on your condition.

put a if condition to pass a constant to the root node for the idoc.

as an else condition, raise an exception using a udf.

Create a generic alert for runtime errors in mapping, which send mails whenever there is a failure in the mapping.

http://help.sap.com/saphelp_erp2004/helpdata/en/80/942f3ffed33d67e10000000a114084/content.htm

Regards,

Ravi

rohit_goel
Participant
0 Kudos

Hi Ravi,

when the condition is not true for the first time mapping will throw an exception so whether the whole scenario will be stopped or it will continue further ?

one more thing how we will send alert notification by email.I want to send only one email for all mapping errors .

regards,

rohit

former_member181962
Active Contributor
0 Kudos

Yes, the mapping will not go further if the exception gets triggered.

i did not understand your second requirement.

say your file1 has three records.

out of which there is an invalid Company code in one record.

you have another file say file2 which has some 4 records.

one record has an error.

then how many emails should be going?

as per my approach, the email will go two times.

Regards,

Ravi

Former Member
0 Kudos

Hi Rohit,

Please go through this Forum.

and also go through this Blog

/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping

Please reward points

Thanks

Vikranth

Edited by: Khimavath Vikranth on Jun 2, 2008 3:54 PM