cancel
Showing results for 
Search instead for 
Did you mean: 

File Processing using Validations

ravi_sirigiri
Participant
0 Kudos

Hi,

I have a scenarion in file to DB, in which i have to process the records based on condition. for example my File structure:

Indicator ID Name

1 123 xyz

2 456 abc

1 789 fdg

i would like to process the records which has the Indicator = 1 only. Only these records should be updated in my database. all others which has indicator not equal to 1 should not send to the database .

How can i do this scenario...?

Please suggest me with an example if possible.

Regards,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

U can keep condition in Receiver detemination.

Only the indication which have 1 will be proccess.

check these links.

XPATH

/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm

http://www.w3schools.com/xpath/default.asp

http://www.w3schools.com/xpath/xpath_operators.asp

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

/people/suraj.sr/blog/2006/01/05/multiple-inbound-interfaces-within-a-service

Regards,

Phani

Reward points if Helpful

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Its one file with multiple records so you can't do the XPATH expression for receiver determination for this scenario.

While doing the mapping with header node, you need to verify that which record has indicator as 1. for e.g.

as per your below structure

Mesg_TYPE

L--->Header (O to Unbounded)

-


> Indicator

-


> ID

-


> Name

Now while mapping with Target structure you need to verify the indicator with if condition and for all the fields you need to take the corresponding row.

Header -


>if (Indicator Equals to "1") --->target header

Thanks

swarup

deepak_shah
Contributor
0 Kudos

hi

u can use File to JDBC adapter scenario

chek this blog if use ful

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

In sender chanel u can mention SQL querty like

Select * FROM <table> where indicator = "1"

and then use UPDATE command to update the database as per ur requirement..

hope this is useful

thanks

Former Member
0 Kudos

Hi Ravi,

you can use a 'if-then-else' block in message mapping and check the condition for the 'indicator' field.

In case you want to know, how to design a File to JDBC scenario, please go through these links:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a04cd6f9-9eb0-2a10-07b8-a0fc6e88...

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/file%2bto%2bjdbc

Thanks,

Varun

Former Member
0 Kudos

Hi,

Follow below steps

Input Indicator and constant value 1-> equals function-> result is true or false -> create if -> tag it to root node.

Thnx

Chirag