on 04-13-2007 10:07 PM
Hi Guys,
Please see the below message. I done mapping like if multiple rows in the source then it mapped to the correctly. But I faced another problem like there are multiple<Statement_response> which contain mulitple rows, how to achieve this.
<b><u>Source</u></b>
<Statement_response>(1to unb)
<row>(1 to unb)
<name>j</name>
<place>M<place>
</row>
</Statement_response>
<u><b>Target</b></u>
<Message>
<row>(1 to unb)
</row>
</Message>
Example:
<i><u><b>Source</b></u></i>
<Statement_response>
<row>
<name>j</name>
<place>M<place>
</row>
<row>
<name>l</name>
<place>n<place>
<row>
</Statement_response>
<Statement_response>
<row>
<name>o</name>
</row>
</Statement_response>
<b><i><u>Target</u></i></b>
<Message>
<row>
<name>j</name>
<place>M<place>
</row>
<row>
<name>l</name>
<place>n<place>
</row>
<row>
<name>o</name>
</row>
</Mesage>
Best Regards,
J
hi,
the mapping is quite similar
at first go to messages tab and change the occurance
of the source message from 1 to unbounded
then just map
<row> <name><place> tags and check the mapping
in test tab
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Michal,
I need one more solution,my scenario is AS400 to XI, I used sender JDBC adapter to pick some fields from the database, after that I have to create an SQL statement using UDF and get the response back from AS400. The problem is consider i'm having record item. If I get multiple items when selecting from the database then while creating query(using UDF) i'm getting the same query repeated for all the items. How to avoid this? If I have multiple items with different values then no issues ,as per my scenario I need to create multiple queries but if all the item values are same then still its creating the same query for all the items.
Plz help me in this regard.
Regards,
J.
hi,
you can use global variables
/people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
and inside your UDF check the variable:
if it's = X for instance then fire the query
and at the end set the variable to X
this way it will only be executed once
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
In your JDBC request message, create a queue UDF with a logic like this:
...
result.addValue(a[0]);
for (int i = 1; i < a.length; i++) {
if (!a<i>.equals(a[i-1])) {
result.addValue(a<i>);
}
}
...
The input of UDF should be field containing the Query string with removeContext function.
Regards,
Henrique.
HI,
See the below link
GlobalContainer - in graphical mapping (XI) - /people/michal.krawczyk2/blog/2005/03/04/globalcontainer--in-graphical-mapping-xi
if your SP is more or equal 14 then
XI: New features in SP14 - Global variable in mapping - /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
or you need to use the Dynamic SQL Option
Regards
Chilla
Hello Guys,
Plz look my below scenario and tell me ur suggestion.
My input file will be like the below format:
Case 1:
<Test_Message>
<row>
<Emp_id>10003</Emp_id>
<Emp_name>J</Emp_name>
</row>
<row>
<Emp_id>10004</Emp_id>
<Emp_name>K</Emp_name>
</row>
</Test_Message>
Case 2:
<Test_Message>
<row>
<Emp_id>10003</Emp_id>
<Emp_name>J</Emp_name>
</row>
<row>
<Emp_id>10003</Emp_id>
<Emp_name>J</Emp_name>
</row>
</Test_Message>
So based on the Emp_Id I'll use create Sql query using UDF and will fetch data from the database. The mapping is done such a way tht for each row based on <Emp_ID> I'll create sql query(using UDF) and will fetch the data. My scenario works fine with the case 1 input. But if u look into case 2, I don't want to create two sql queries since the emp_id's are same,instead I've to create single sql query. How to achieve this.
Best Rgds,
Raj
HI,
This may solve your problem try..
http://help.sap.com/saphelp_nw2004s/helpdata/en/42/ed364cf8593eebe10000000a1553f7/content.htm
Regards
Chilla
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
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.