cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP to RFC Sync with Validation

Former Member
0 Kudos

Hello,

I have created a simple HTTP to RFC Sync interface where I post 1 field using HTTP and then map that request to an RFC and it is working just fine. However, whenever I want to enhance it by checking the input field first before calling the RFC, example if the input field's length is not equal to 6 , respond back with a message. Else, call the RFC.

Since my interface is Sync, validation is not working for me inside the mapping.

Anyone can help??

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member200962
Active Contributor
0 Kudos
However, whenever I want to enhance it by checking the input field first before calling the RFC, example if the input 
field's length is not equal to 6 , respond back with a message. Else, call the RFC.
Since my interface is Sync, validation is not working for me inside the mapping.

I dont think it will work like this.....

If you want to check if the length of value in a particular field is 6 or not and then send message to RFC then proceed as follows:

Suppose your Sender structure is:

<MT_SRC>

<Field1>SDNSAP</Field1>

</MT_SRC>

And you want to send msg to RFC based on length of value in Field1 then you need to spcify the Condition in the Receiver Determination as:

Left Operand ---> Select XPATH ---> In the XPATH Expression space ---> /p1:MT_SRC[string-length(Field1)=6]

Middle Operand as EX....this will call the RFC when the length of the input field value is 6.....

Check this blog for more info: /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

Regards,

ABhishek.

Edited by: abhishek salvi on Jul 5, 2009 2:28 PM

Former Member
0 Kudos

abhishek

thank you for your great help.

Is there a way to display a custom response in case the field didn't meet the condition ?

former_member200962
Active Contributor
0 Kudos

You can try it in the Receiver Determination itself.....in the bottom part you have the option to select how the processing should be done if Receiver is not found.....in there you can select the receiver Component to whom you want to send the message incase the condition is not satisfied...you will need the corresponding Receiver Agreement, Interface Determnination, Receiver CC.....

If you tend to use a BPM then all the condition check and custom message send can be done there......if the first option is not feasible to implement for you then you need to opt for BPM.....AFAIK....

Regards,

Abhishek.