on 10-21-2014 11:47 AM
Hi there experts!
just a silly doubt:
I've got a mapping that first maps some message to another one, and then a java function maps the resultant message to a string with some <tags>.
This string, it going to be mapped by another MM to a message with some fields and a fat xml string field that actually holds the information.
My question is:
at the las mapping, now I'm being asked if I could not 'hardcode' as constant some header fields, but grab them from the first message BEFORE the java wrapping.
May I add at the las MM the MT of that message and simply map the fields I need from that message to the header? It would be really complicated to search for that new field at the string resultant from the java wrap.
Am I clear?
thanks a lot in advance!
cheers,
Edu
Thing is that if I place two source messages, the message that results is built with some
message
|
|
V
message 1
|
|
V
My_root
that doesn't fit the requisitions of the message needed outside SAP
Cheers,
Edu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Diptee,
I'm going to attach some pictures to see if I can explain myself.
This is the first mapping:
the a java section that wraps the BP message into a string:
and then the last mapping that places the string into the final and outbound message:
the thing is that I need the TIPO field from the first message to be populated at the BPNAME field of the last outgoing message.
How can I achieve this? is there a solution??
cheers,
Edu
Hi Nabendu,
I had another issue and now I'm going to implement this. I assume, as I searched at the SCN and folloed your link, that I have to create a UDF called DynamicConfigPopulate to somehow store my value and other called DynamicConfigRetrieve in order to read my value,
am I right??
cheers,
Edu
Hi there Nabendu,
Java is not one of my strengths, I'm trying to develope the java code and I have some problems. First I've declared a global variable at the Edit Java Section tab. Then, my code is
but when I try to use the UDF at the mapping I'm forced to map it to some field, and I wanted it to store the value to use it at other step!
Any hint?
cheers,
Edu
hi Nabendu,
but in my first mapping I populate info to some structure that afterwards is going to be wrapped to a string by a java function, would it populate something in there? I need that structure to be clean of rubbish and be filled ONLY by the info the 3rd Party needs... Am I clear??
Thanks for your help, Nabendu!
cheers,
Edu
UDF1 in Mapping 1:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey keyA = DynamicConfigurationKey.create("http:/"+"/DCUsage.com", "keyValue" );
conf.put(keyA,TIPO);
UDF2 in Mapping 2:
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey keyA = DynamicConfigurationKey.create("http:/"+"/DCUsage.com","keyValue" );
String TIPO = conf.get(keyA);
Regards,
Nabendu.
Hi Nabendu,
I'm trying to prove this, not by loading data at the mapping since I know this must be test on runtime. The thing is that I've declare TIPO, and at the second UDF says that TIPO has been already declare and I've declare TIPO2, but the field is not getting populated (BUT the mapping does not fail at runtime and I've got the squared flag at the moni, although the field is empty.
any hint?
cheers,
Edu
Hi again Nabendu,
Now I have working this they've asked me to do the same thing with other field. I'm trying to recreate the UDF, changing the GLOBAL VARIABLE to the field I need now (BUKRS instead of TIPO) and changing the code to work with BUKRS instead of TIPO. The problem is that, although is working and populating some info, the value that it is populating is again the TIPO value instead of the BUKRS. Any hint? should I change anything more??
cheers,
Edu
hi,
could you please elaborate bit more....
if i understood correctly you can use multimapping and achieve this.
Regards,
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.