DB lookup in mapping.
Hi,
I am new to the XI world.
Am trying for DB lookup in mapping.Can anyone tell me that is ABAP mapping more convenient for DB lookup.
Can the cross reference tables reside in the XI server and can we refer them in the ABAP mapping.
Thnx,
Pravesh.
hi,
to access db via db api in the message mapping:
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
>>>Can the cross reference tables reside in the XI server and can we refer them in the ABAP mapping.
yes but you can also refere tables it other systems
Regards,
michal
Similar Messages
-
Using a lookup for mapping program to retrieve the specific value
Hi All,
I have a scenario like I need to use a lookup for mapping program to retrieve the specific value based on the input parameters.
Here I have got some rough idea like
1. Creation of java program to connect the DB table and access the values, Import this java program as archive into XI.
2. Creation of user defined function to use the above java program
3. Include the user defined function in the interface mapping.
Here I feel it needs some more info to complete this scenario, so can anyone provide the step by step procedure for the above scenario.
Thanks in advance.
Vijay.Hi Vijay,
Basically you have embed Database lookup code in the UDF. For all kind of Lookups refer to below links..
Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0
Lookups in XI made simpler - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
/people/sravya.talanki2/blog
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
How we have to create the lookups?
Check this weblogs with some screenshots on how to achieve this:
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
Ranjeet Singh. -
How to add new key lookup in Mapping ?
Hi,
I am learning OWB 10g from oracle.com site. I am following the Oracle-By-Example.
[http://www.oracle.com/technology/obe/obe_bi/Lesson6_Designing_ETL_Data_Flow_Mappings/designing_etl_data_flow_mappings.htm]
My OWB version is:
OWB Client : 10.2.0.1.31
OWB Repository : 10.2.0.1.0
But the screenshots are different than what I am getting on my OWB. Am I using the correct version of Oracle-By-Example?
I have created Mapping Dimension and Mapping Table. Now i want to add a Mapping Key Lookup. But as the screenshots shown in Oracle-By-Example are different, I cannot go further.
Please help me.
Thanks!
YoginiHi Yogini
Here are some steps, it should be fairly straightforward, you can view the online help for more information.
1. Drag and drop the Key Lookup operator on to the Mapping Editor.
2. The Lookup wizard opens on the Welcome page. Select Next to move to page 2.
3. Provide a name and description for the operator, default is KEY_LOOKUP. Hit Next to move to page 3.
4. On the Groups page, hit Next.
5. Select attributes to use in key lookup. For example those from the WAREHOUSES table in the OBE you are using that you will lookup in the COUNTRIES table. Shuttle those attrbutes to the right hand side. Hit Next to move to page 4.
6. Select the COUNTRIES table from the combo box nder 'Select the object which has the lookup result. In the lookup conditions table ensure the matching criteria is set ie . LOCATION_ID from WAREHOUSE matches with LOCATION_ID from COUNTRIES. Hit Next to move to page 5.
7. Here you can define the strategy for matches, just hit Next, then Finish. You have walked through all pages and are complete.
Cheers
David -
Lookup value mapping table through message mapping.
Hello All,
I am working on a graphical mapping (message mapping). When trying to map the source message to the target message, I need to find out it a particular <b>key</b> exists in the <b>value mapping table</b>. Depending on the result, I need to map different source fields to the target field.
Is there any inbuilt function which will allow me to do a lookup on a value mapping table, or is it possible to lookup a value mapping table from a UDF?
Please help!
Warm Regards,
KeertiHi,
Please see the below links for Value mapping ..
Value mapping /people/sukumar.natarajan/blog/2006/10/23/accessing-value-mapping-defined-in-directory-using-java-functions
Value mapping in XSLT /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
Value Mapping replication - /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
Also see
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
/people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
Regards
Pradeep N -
My question is actually really simply,
Suppose I have a UDF and I want to make a
SELECT name, last_name FROM employee WHERE id = id1
the input is id1 but how do I deal with two outputs when the result can only be 1 string?
I could save it to a global container, but the question is at the end how to map it to the response, or what am I not understanding here?
(without using Graphical JDBC lookups)
request response
msg msg
id1---> UDF --->name -
> name
->last name--> last name
Thanks a lot!JDBC Graphical lookup is user friendly. You can avoid these problems.
In your case, YOu return single string. suggestion. Concatanete first name and last name using separtor and return as one string. After return use some standard java function to split the string in to first and last name.
Snippet code
// in your jdbc udf
String concat=firstName+":" +lastName;
return concat;
When you map the string to target fields ...
Create UDF or use text functions to achieve this
int pointer = concat.indexOf(":");
firstName = concat.substring(0, pointer);
lastName = concat.substring(pointer+1); -
Problem with RFC LookUp Parametrised Mapping
Dear All,
I am using RFC Look function in message mapping and have defied import parameter as xyz of category adapter and type RFC to get a sinle value response from RFC.
After this, I created operation mapping. Now going for Parameter binding, it is not showing me any value i.e. parameter defined in message mapping is not displaying due to which i am not able to activate operation mapping, it is showing error as "Binding for Message Mapping MM_FILE is not correct. Parameter xyz of Message Mapping MM_FILE is missing"
I have checked various blogs on SDN but I am not able to figure out the mistake.
Kindly guide me out.
Reg,
NJHi nishu,
in operation you need type a name againasi the parameter XYZ.
XYZ----
ABC
and in configuration when you will use this operation mapping in interface determination then it will ask for the value of ABC.
so
suppose channel name---CC_TEST
So in Interface mapping you will assign
ABC=CC_TEST
So in Operation mapping you have assigned
XYZ=ABC
means XYZ=CC_TEST(beacuse ABC=CC_TEST)
Simple Math -
Can not save JDBC lookup in mapping (PI 7.1 SP07)
Hi All,
When I try to save my JDBC lookup, I get error while executing save - 'Binding rec0 is not found in the brick. Check update method'
I made Re-initialization in Java Web Start Administration, but problem did not resolve.
Regards,
Andrey.Hi
We have the same error. Did you find a solution?
Cheers
Philippe -
Mapping Lookup and performance?
Hi all,
I'm thinking about using mapping lookup (JDBC)
Does anyone have experience with the performance of this metod?
would it be better to use the BPM?
Thanks
Thomas Nørmarkhi,
DB lookup in mapping will always be more efficient
then the BPM but the questions are :
- how will you see handle the errors in this?
- you will not be able to see this query (in message monitoring - as you do in case of BPM
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> -
Performance of jdbc mapping lookup vs BPM Process
Hello fellow consultants,
I have project on AEX upcoming and now I`m deciding the strategy.
I have to implement few processes for which I will use BPM. But inside these processes I have few jdbc calls for logging to the oracle db.
Regarding the performance - what is better approach?
make these jdbc calls as a jdbc lookup in mapping
perform it as a regular part of bpm process
Thank you for suggestions
VBHi VB,
I have a different opinion than Fouad although I can understand his point, but for me, lookUps are rarely good and well implemented and it should be used in a very specific, required and critical scenarios. This is because this lookUp connection is not manageable, out of monitoring stuff and I don't think in the mapping step is the correct moment to open a JDBC connection with partner all of sudden.
My Idea is more for the point number 2, where you have everything well explicit step by step, opening the connection being manageable, with monitoring even though it may bring one or two steps more to your BPM but I'm more concerned at this moment to follow the best practice of integration and thinking in Performance I don't think there will be a gain that would justify the JDBC Lookup.
Regards,
Diego -
Is is possibel to do an RFC Lookup from The Graphical Mapping?
Greetings,
While doing a message mapping I need to get the value from R3 system using an RFC, is it is possible ?Hi
we can do by using rfc look ups
Lookup in mapping is the feature provided by SAP to lookup the data in the target R/3 or DB systems with the API provided.
You need to write UDF in order to implement the API's provided by SAP.Consider the below example
VendorNumber-UDF--CURR
The scenario is legacy to SAP. The legacy system doesn't provide the currency details. But the target field need's to be populated with currency value.
"The business rules says there are values maintained in SAP Table where if you pass VendorNumber it will return thr currency to you"
So what you can do? You can write UDF implementing SAP Provided API's and do a lookup in the SAP System and get back the currency value and populate them in CURR field.
I hope it clears a bit.
Please find the below blogs
DB Lookup: /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
RFC Lookup:https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
There are three types of look ups u can do
RFC look up
SOAP look up
JDBC look up
What is Lookup and why we need:
Within an XI mapping it is a common requirement to be able to perform data lookups on-the-fly. In particular, there may be a need to look up some data that is maintained in an R/3 application.
In the error handling topic we have seen the different validations which need to be performed on file. This can be done through Lookup.
Some use cases:
Look up material number from table MARA.
Look up cost center budget.
Look up employee information.
Look up unit-of-measure (UOM) information from table t006a.
Lookup for raising an alert.
The purpose of the lookup may be:
To perform application-level validation of the data, before sending it to the backend.
To populate fields of the XML document with some additional data found in the backend application.
This is a form of value transformation.
The "value mappings" offered by XI are not adequate in this case, since the data would have to be manually entered in the Integration Directory.
There are two ways in which we can do lookup:
Call lookup method from GUI mapping.
Call lookup method from XSLT mapping.
Lookup method from GUI mapping can be called using any of the following ways.
RFC lookup using JCO (without communication channel)
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
RFC lookup with communication channel.
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
Lookup using JDBC adapter.
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
CSV file lookup.
/people/sundararamaprasad.subbaraman/blog/2005/12/09/making-csv-file-lookup-possible-in-sap-xi
Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
/people/sravya.talanki2/blog
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
You can refer to these links.
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer Absolute stealer.
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
For Java APIs and also here you can map that how many types of lookups are possible in XI.
http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/lookup/package-summary.html -
Using of SALERT_CREATE in PI mapping (RFC LOOKUPs)
I have a stupid question on using SALERT_CREATE rfc in SAP PI mapping, I am using RFC lookups in the mapping, how can I use this SALERT_CREATE RFC, Do I need to Import from PI server? do I need Communication Channel for this? How can I use to send Alerts to PI alert inbox from PI Mapping using SALERT_CREATE
Thanks for reply Praveen, this is file to PI to File scenario, I am calling 3 RFC Lookups from Mapping, after every RFC Lookup call there are some validation checks to send alerts with out breaking the Mapping/business flow, so how can I use SALERT_CREATE rfc from mapping to send alerts
-
Hi All,
I have wriiten a RFC lookup for mapping the company code. But I am not getting the result while parsing the XML. I have tested the code and without parsing I am getting the correct value in XML. Can anybody send the code for parsing the XML data using DOM.
Below is the code which I am using .
try {
docResponse = builder.parse(in);
if (docResponse == null) {
importanttrace.addWarning("docResponse is null");
res = docResponse.getElementsByTagName("COMPANYID").item(0).getFirstChild().getNodeValue();
if (res == null) {
importanttrace.addWarning("res is null");
catch (Exception e) {
importanttrace.addWarning("Error when parsing RFC Response - " + e.getMessage());
try {
// Free resources, close the accessor..
if (accessor != null) {
try {
accessor.close();
} catch (LookupException e) {
importanttrace.addWarning( "Error while closing accessor " + e.getMessage());
} catch (Exception e) {
importanttrace.addWarning("Result value not found in DOM - " + e);
// return the result obtained above
return res;
Thanks,
AparnaMaybe it's really just the typo in your element name and everything works fine when you use:
res = docResponse.getElementsByTagName("COMPANY_CODE").item(0).getFirstChild().getNodeValue();
And I think method <em>getTextContent()</em> should also do the trick of the two calls you're using:
res = docResponse.getElementsByTagName("COMPANY_CODE").item(0).getTextContent(); -
Dear experts,
The scenario is file to file with a soap lookup. certain records are inserted using lookup in mapping.
The records which can not be inserted, along with the error code from the webservice response has to be sent to a database table. Please suggest the options .
Thanks ,
Ajuhi,
generelly lookup is used to find the value which was not present in the sender structure ,and u need to find that, based on some field value in sender side from another system/server.
in youe case make sych soap message interface.
generate the soap request which used to fatch the value from other system .
if system not get any value for that it will return the error message.
map the responce message with the requird target field value.
please find the link for jdbc lookup
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
regards,
navneet -
How to use payload from standard RFC MessageType in a RFC Lookup function
Hello
We have a DB sender to call an BAPI. The DB receiver gets the BAPI response.
It is an easy scenario with one mapping.
But the RFC Mapping Lookup is very awful. You have to rebuild all open and close tags to get the RFC payload. A lot of concat functions are a must. The error search in such a mapping is not easy and seems like EAI developing 1990 (Hand am Arm).
Ok, it is better as a BPM, but it is not well for first level support person and release changes and trouble shooting.
How can I use a XML payload from first mapping in my RFC Mapping lookup (second mapping)? There must be a way with two mappings and an easy RFC lookup.
Currently (one mapping):
DB sender format -> ( RFC lookup self-made RFC XML structure) DB receiver format
My dream (two mappings):
DB sender format -> RFC SAP XI standard Format ->(RFC lookup by using Payload from first mapping) DB receiver format
I hope someone can help me with an example.
DanielHi Daniel,
If i understood correctly, urs is a 'Asynch' scenario JDBC to JDBC with a RFC lookup in Mapping.
If its so, then i think wat u r expecting can be done. In Interface Mapping, u can add more than one message mappings.
So first do a Mapping for DB sender format - RFC input standard format,
then another one for RFC sender Format - RFC receiver format, (look up code goes in this mapping).
Then third one from RFC receiver format to DB receiver format.
The order n which u add in Interface Mapping is also important. This is a suggestion, i havent tried this, but still i think u can give it a try.
Regards,
P.Venkat -
RFC Lookup Table Parameters Reusability
Dear All
My Requirement is to Map fields in IDoc from the File data ,there are some fields in idoc for which i need to fetch data from SAP.
For this i am using RFC Look up. i am retrieving values from table parameters for RFC.
and this Table parameters are being used muliple times in Mapping.
Right now i have to execute the same RFC for set of input data atleast 5 r 6 times.
This is effective Performance of the Interface
Is there any concept of Reusuability in RFC Lookup while Mapping in PI.?
Can we use Java Initialization section in mapping for executing the RFC once and using the output data in table parameters while mapping various target fields.
Hoping for a Positive Reply
Regards
BhaskerHi,
1) If it is PI 7.1 there are mapping enhancements, such as
a) Variables for storing intermediate mapping value,
b) for RFC lookup etc.
you can find the 7.1 pdfs from SDN
2) you can have a two stage mapping, putting them sequentially in Interface mapping object.
First step : Source to Target (orignal target structure)
here you can do all the mapping and also One time RFC lookup, but leaving the other fields where you need the lookup values again
Second step : Target to Target
here already mapped target becomes your input & you know the fields which have the value & the fields that you need to map again and all other fields are one to one mapping.
Regards
Vishnu
Maybe you are looking for
-
Unit of Measure is not correct
Hi SAPMASTER, Here I am with a new issue. I have tried to fix but it is not possible. So, I need your help. I have a FM : *"*"Local Interface: *" IMPORTING *" VALUE(I_MATERIAL) TYPE BAPIMATVP-MATNR *" VALUE(I_CENTRO) TYPE BAPIMATVP-WERKS *
-
Font problem (font doesn't work in preview?)
I've been working on a book with the arial narrow fonts (regular, italic, bold , bold italic). I've tried using the open type and the true type version of the font but always end up with one of the fonts not working when I preview the book on my ipad
-
Boot Camp: Mac Pro won't start after Windows install
After installing Boot Camp on a Mac Pro dual 2.66 (firmware updated), XP installer went through installation & copying files, then restarted. Went to a black screen with white Windows-style text that said something along the lines of "XP cannot start
-
How do you get rid of a block object in my bookmarks bar?
On my bookmarks bar at the top, there is a smaller box that goes along the screen with a block/LEGO object in the middle. This is in between my bookmarks and where it says the name of the website.
-
International Address versions updation in SAP Bank master using BAPI
Is there a function module/BAPI to update the adrc and related tables when the bank master creation is done?The bank master creation is done via BSP pages. Regards,