on 02-22-2008 5:59 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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/wiki?path=/display/xi/file%2bto%2bjdbc
Thanks,
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.