on 05-07-2008 8:32 AM
Hello Experts,
I have an issue in the message mapping step. In my source record, there are some values as per each field but my problem is that I want to pass only those field values which are getting change.
for ex:
I have one record as:
EMP Id:100
Name: XXX
City:YYY
Sal:20000
first time when I mapped these values in the message mapping then all the values will be passed in the target structure but in the next time If i change the sal from 20000 to 30000 then my record will be as:
EMP Id:100
Name: XXX
City:YYY
Sal:30000
But this time, I want to pass the change values only (sal:30000) along with one unique field (say for ex EMP ID this time) in the target structure.
Now this time, the target structure should be:
EMP Id:100
Sal:30000
and the unchanged value should be ignored.
Is it possible by UDF or any other solution in message mapping?
Any solution will be highly appreciated?
TNR,
Saurabh...
Hi Saurabh Kumar Sahu,
I think you try this with Value mapping.where can assign the value for the unquie field .so that it will lookup........
If you follow the below mentioned link which is very well explained about the Value mapping with screenshots....
Thanks
Sai
PS: kindly 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 Saurabh
i think Its difficult (not feasible as it effects performance) to store data in XI to check the repetition of data. either u can check it on sender side or at receiver.
you can store data in XI also but its of no use to maintain another record at middleware just to check repetition. and it will effect performance.
Rather you check at sender / receiver side.
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saurabh,
1) Yes it is possible by UDF only.
2) U have to use Global database in message mapping --> Edit java section.
3) Define parameters here Write one UDF to check whether data is changed or not. According to it u can display or block the data.
Regards,
Rohit.
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 Saurabh,
you have to use the GlobalContainerElement and use it in UDF.
Here are code samples:
1) Initialize
String globalParameterObject = new String("");
container.getGlobalContainer ().setParameter ("myObject",globalParameterObject);
2) Concatenate String to GlobalContainerElement; Importparameter of UDF is the field myfield
String global = (String) container.getGlobalContainer().getParameter ("myObject");
if(myfield.length()!=0)
global = global + myfield.substring(0, 1) ;
container.getGlobalContainer ().setParameter ("myObject",global);
return feld;
--> This is what you can use. Cast the String to Integer an add the values
3) How to return the GCO
return (String) container.getGlobalContainer().getParameter ("myObject");
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
this should be helpful:
http://help.sap.com/saphelp_nw04/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/frameset.htm
Regards
Patrick
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.