cancel
Showing results for 
Search instead for 
Did you mean: 

Approach

former_member10771
Active Participant
0 Kudos

Hi,

We have a requirement where in the incoming file has say some 50 fields. We need to do a validation check in mapping. Suppose say there is a empty value for any one of the fields then we need to raise a alert message and not processs the file further. The generated error message should be sent back to the same location from where the file is picked. I know that we can raise alerts but the requirement is such that they dont need alerts and just need a message to be sent back. Can someone please help on the same. Will a UDF work . Inputs would be appreciated.


Accepted Solutions (0)

Answers (4)

Answers (4)

former_member10771
Active Participant
0 Kudos

Hi All,


Thanks for the inputs. The problem here is its a File to RFC synchronous scenario. So for the first case it works fine when you have all the values in the incoming file. My problem is with the second case , suppose there is a empty value in one of the fields then it must raise a flag/alert at the mapping. I have written a UDF to determine the same. But I was planning to use enhanced receiver determination and send the file back . But the problem is when I am using the standard receiver message type I cannot use it in the Operation mapping because my source Service interface is synchronous and the target in this case ( Std Receiver Msg) is asynchronous. Please suggest. I hope my point is clear.

File to RFC - Sync - 1st case - All values available - Send Data get response

File to RFC - 2nd Case - Values Not present - Raise a exception - Send the file back from PI.

Another problem is in first case the RFC communication channel shows successful and message is delivered but I cannot see any message in ECC. It has passed the mapping and no errors in adapter engine. In ECC dont see anything either in SM58 nor in SMQ2 nor anything in SXMB_MONI ( we are on dual stack ).

Please guide on the feasibility . Thanks

iaki_vila
Active Contributor
0 Kudos

Hi Amit,

Personally, I prefer the Harish option. You said you have a sender file then you will need to send back a file with error or to call a wsdl. In the two cases you have another option, to use a File lookup (File Lookup in UDF - Process Integration - SCN Wiki) or SOAP lookup to send back the response. But in my opinion the most useful option is the option that Harish said or the alternative way proposed by Amit, the standard way of validation is too annoying for me.

Regards.

Former Member
0 Kudos

Hello Iñaki,

SAP has immensely improved the XML validation feature in the later versions of PI and i believe it's certainly worth to use xml validation along with alert mechanism to validate input file message instead of replicating the same req. using custom ways.

Thanks

Amit Srivastava

former_member10771
Active Participant
0 Kudos

Hi Amit/Harish/Inaki,

Thanks for the update.

Hi All,


The problem here is its a File to RFC synchronous scenario. So for the first case it works fine when you have all the values in the incoming file. My problem is with the second case , suppose there is a empty value in one of the fields then it must raise a flag/alert at the mapping. I have written a UDF to determine the same. But I was planning to use enhanced receiver determination and send the file back . But the problem is when I am using the standard receiver message type I cannot use it in the Operation mapping because my source Service interface is synchronous and the target in this case ( Std Receiver Msg) is asynchronous. Please suggest. I hope my point is clear.

File to RFC - Sync - 1st case - All values available - Send Data get response

File to RFC - 2nd Case - Values Not present - Raise a exception - Send the file back from PI.

Another problem is in first case the RFC communication channel shows successful and message is delivered but I cannot see any message in ECC. It has passed the mapping and no errors in adapter engine. In ECC dont see anything either in SM58 nor in SMQ2 nor anything in SXMB_MONI ( we are on dual stack ).

Please guide on the feasibility . Thanks

Harish
Active Contributor
0 Kudos

Hi Amit,

In case of sync scenario i would suggest to perform the validation either at sender side or target side. so you should perform the validation in RFC. when there is problem with data send back the error response from RFC to file system.

regards,

Harish

Former Member
0 Kudos

Hello,

First of all, you cannot route messages to different receiver systems in case of sync communcation.

Secondly, which version of PI you are using and did u tried testing xml validation?

In case , you want to do a custom validation then i would suggest you to write a logic in ur code (java mapping would serve u better) to send a file back in case ur validation gets failed. Search SDN there are quite a few threads on the same with java code.

For RFC errors, check ST22.

Thanks

Amit Srivastava

Harish
Active Contributor
0 Kudos

Hi Amit,

If you only need to raise the alert then schema validation will work. But in your case you need to send back the error information.

you can achieve this with multimapping, have two target structure first is your actual target and second is for error handling.

populate the second structure when any validation is failed in first node (actual target) and route it to sender.

regards,

Harish

Former Member
0 Kudos

Hello,

I would suggest you to go with XML validation and in case XML validation fails then send the file to some erroneous folder.

In case u still want to do validation at mapping level then u can use JAXB framework

Thanks

Amit Srivastava

Message was edited by: Amit Srivastava