cancel
Showing results for 
Search instead for 
Did you mean: 

Validate date in Message Payload in SAP PI

Former Member
0 Kudos

Hello Experts,

We have a requirement were we need to validate the content/data  of the message payload like we need to update material details of only few specific material using SAP PI. will this be possible using XML validation if yes could any one guide me how to go about it.

we have file to RFC scenario and the RFC called is the standard one to update the data in SAP. using this setup as of now we only need to update only specific set of material and  we need to put the validation at PI end. we have not finalized were will we maintain the material detail yet. Request your inputs

Regards

HJ

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi HJ,

I don't really think Schema Validation covers your requirement. The purpose of Schema Validation is to verify whether the input data is consistent with some schema, in terms of the data structure, not content. So it defines structural, not "application logic" checks.

In your scenario, if you want to filter the input data, and only send to target system some of the data that match specific condition, you should rather use some conditions in mapping for that purpose, if you asked me.

Regards,

Greg

Answers (4)

Answers (4)

iaki_vila
Active Contributor
0 Kudos

Hi Heath,

My point of view is a quite different,

we have file to RFC scenario and the RFC called is the standard one to update the data in SAP. using this setup as of now we only need to update only specific set of material and  we need to put the validation at PI end.

I think considering that you have an asynchrounous scenario and may be you (or the endpoint users) would want to have easly accesible the files that are rejected. I would try to change the PI validation requeriment. I wrap the standard RFC with a Z RFC that does the validation and will call the standard RFC. Finally i save all the incoming information and the validation in a Z table in order to strudy the more frencuentlly errors or to do a user report.

Regards.

Former Member
0 Kudos

Hi, different solutions should be evaluated here:

- If your validation is simple and the condition variables are rather constant, go for conditions in receiver determination.

- If validation is complex and condition variables are rather constant, enhanced receiver determination can be used to code complex validation.

- If validation is complex and condition variables need to be changed frequently, use enhanced receiver determination combined with a maintanence table in ERP to store condition values. Have a look at Udo's blog how to easily replicate an ERP table to value mapping cache. In receiver mapping, use value mapping groups to check condition values and determine the receiver of the message, in your case either the ERP system or no receiver at all.

Regards, Martin

sunil_singh13
Active Contributor
0 Kudos

Hi Heath,

You can use Adavanced Receiver Determination (you have to develope the mapping and use it ) for routing the message based on specific value of a field.

refer the link :

http://wiki.sdn.sap.com/wiki/display/SI/Step+by+Step+guide+to+Explain++Enhanced+Receiver+Determinati...

Thanks,

Sunil Singh

baskar_gopalakrishnan2
Active Contributor
0 Kudos

XML Schema validation is possible from 7.1 version onwards. If you provide schema against payload structure it will validate for all the fields. This can be configured at adapter engine level or integration engine level. Seach SCN for this.  You might also want to see this link for how to configure and using it.