cancel
Showing results for 
Search instead for 
Did you mean: 

Help on Error Handling

Former Member
0 Kudos

Hi

I have requirement, where the customer send us the Xml file. Our process should pick the file and check the following

1. Check if the xml is well formed.

2. Check if all the mandatory fields are sent.

I know, if the xml is not formed an error would ge logged into SXMB_MONI but I want to catch them into a file and sent them to the customer,.

Any help on this would be appreciated.

Thanks

Rakesh

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member
0 Kudos

Hi Rakesh,

If you want to correct the errors before reading into XI, we can do it by adapter module development which calls before standard adapter call.

If you want to do after reading file.we can do it,

1) stops the message flow by raising exception.

2) we can write OS level file with the error records,

and XI can be configured to process the logged file.

Thanks,

venu

Former Member
0 Kudos

Hi Rakesh,

please go throug these documentation-

http://help.sap.com/saphelp_nw04/helpdata/en/56/b46c3c8bb3d73ee10000000a114084/frameset.htm

File Validations-

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/99593f86-0601-0010-059d-d2d...

In Mapping-

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

Former Member
0 Kudos

Thanks Ganesh

The link was helpful

Former Member
0 Kudos

For addition to Ganesh's post

You could also throw an alert in order to send detailed error message to your admin

/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function

Former Member
0 Kudos

Hi Rakesh,

Refer to this URL where you might the solution for the same.

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

Thanks,

Ganesh Karicharla

Former Member
0 Kudos

HI

See the below links

http://help.sap.com/saphelp_nw04s/helpdata/en/41/b715045ffc11d5b3ea0050da403d6a/frameset.htm

message monitor and troubleshoot -

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2f2a9fa2-0a01-0010-32ac-d281db72...

There are many Inbuilt adapters are provided by XI. XI will understand only XML. So here it goes

http://help.sap.com/saphelp_nw2004s/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7ccd3e4e-0501-0010-95ae-afa58cb4...

SXMB_MONI

SXMB_MONI -

Monitoring for Processed XML messages in ABAP Proxy - /people/krishna.moorthyp/blog/2005/12/23/monitoring-for-processed-xml-messages-in-abap-proxy

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e7bc3a5a-0501-0010-1095-eb4...

Regards

Chilla

Former Member
0 Kudos

Thanks a lot for all your responses.

But all your answers are very generic and on a very high level.

Any detailed explaination or any link or if any one had implemented the same in your respective projects, please share your knowledge on this.

Thanks

Rakesh

Former Member
0 Kudos

rakesh,

in file adapter you use content conversion which is validate the incoing is accoding to speicifted structure. if this is not in spoeicifed structure then you will get adapter error. then you configure alters and tell our customer that it is not wellformed.

Former Member
0 Kudos

Hi

1.. Check if the xml is well formed.

2. Check if all the mandatory fields are sent

To check the XML is welformed or not in two ways we can do

- in Altova XMLSpy import press f10 then that can check or after import itself we can check

-- In IR , Message mapping test tab, click on src / insert xml file then you can check it all the fields are formed well and all mandatory fields are having the values or not..

Also you can see in the SXMB_MONI and goto request / response .. mapping , right side view source and get the XML data and put it in xml file to send it to client.

Regards

Chilla

Former Member
0 Kudos

My solution would be to write a custom module processor to validate the incoming XML document.

If the validation fails write the error input file to a file system.(say some Error folder)

Create another scenario which polls the error folder and sends the error files back to the sending application.

Hope this helps

Thanks

Satish