on 12-15-2008 10:40 AM
Hi Experts,
I am working on a file to file Scenario.
Lets say I have a Field called SEQ_NO at target.
I want to populate it this with Message ID (MONI one) at runtime.
Is it possible? If Yes, How can we do this?
Use UDF.
java.util.Map map;
String header;
map = container.getTransformationParameters();
header = (String) map.get(StreamTransformationConstants.MESSAGE_ID);
return header;
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
yes this is possible
have a look at this question
http://mypigenie.com/mapping/4-mapping/49-How-can-access-technical-context-object
you can do in the same way as with INTERFACE_NAMESPACE
for message id
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michel,
I have tried the Code given by you.
I just copied that code inside a UDF. UDF did not have any input parameter and without any Imports as well.
String constant;
java.util.Map map;
map = container.getTransformationParameters();
constant = (String) map.get(StreamTransformationConstants.MESSAGE_ID);
return constant;
Still at the target, I am getting a "null" at SEQ_ID.
hi,
but you're not doing it inside a BPM right?
Regards,
Michal Krawczyk
http://mypigenie.com - XI/PI FAQ
Yes, Ur right, I am not using BPM.
I am doing it inside the Message Mapping only.
I am just Mapping the Target Field called SEQ_NO with the code given by you.
Below is the Output I am getting.
HEADER IN14INELAH INICHNFI01 null 20081215110305
010205000033,VAISHNAVI SALES CORPN,0.00,0.00,350000.00
010205000034,CHAKKA ENTERPRISES,0.00,-641350.47,8649.53
010205000035,SEHGAL TRADING COMPANY,338665.00,-220.00,461115.00
I nstead of "null", I need Message ID on Runtime.
Am I doing it Right, Please reply.
Thanks
hi,
inside your mapping (test tab) there is a tab - parameters
put message id there and check if the code is working in the test mode ok?
Regards,
Michal Krawczyk
http://mypigenie.com - XI/PI FAQ
Hi,
No It is not working fine.
Inside TEST----
> Parameter Tab< I had input MESSAGE_ID Against MessageId.
After that I run It, Got the error as Below:
17:48:17 Start of test
Runtime exception during processing target field mapping /ns0:MT_BANK_CUST_DET/File_Out/Header/SEQNO. The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@6ec66ec6] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MT_BANK_CUST_DET/File_Out/Header/SEQNO. The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@6ec66ec6].
It is possible to get MESSAGE ID which we get in MONI for every message pass throught XI in message mapping itself?
Regards
Pradeep
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.