on 07-31-2006 11:32 AM
Hi,
Is it possible to get the Mapping Trace Object in the JAVA SECTION of the Message Mapping?
To access the<a href="http://help.sap.com/saphelp_nw04/helpdata/en/c8/98e7d5c1620642973565ea3dd319d1/content.htm">Mapping Trace Object</a>, we need the instance of the <a href="http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/content.htm">Container Object</a>. SAP help says, Container Object is made available to every User Defined Function .
What we need is how can we get the current instance of the Container Object in the JAVA Section of Message Mapping. Any ideas?
Regards,
Bhavesh
Hi Bhavesh,
It seems you can access global container from any part of Graphical mapping.
<b>The mapping program is a class derived from the interface GlobalContainer. So you can use the methods of GlobalContainer all the time during the mapping program.</b>
Plz refer the link to the related thread.
Regards,
Ananth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Bhavesh,
>>>>What we need is how can we get the current instance of the Container Object in the JAVA Section of Message Mapping.
why do you want to do anything like that in java section?
you can create a global variable and fill it once
(in UDF) and resue it in many other UDF
but can you tell why you need it in java section ?
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michal,
Am writing a few lines of Java code in my Initialization and Clean Up Section of the JAVA section. I need to trace / debug my code and was looking if it is possible to use the TRACE statement in the JAVA section to write to the TRACE log.
Also, I wanted to know the flow of my message when I have the JAVA section and thought using a TRACE log will help clarify lot of doubts that I ve got
Any ideas?
Regards,
bhavesh
Ananth / Michal,
<b>AbstractTrace trace=(AbstractTrace)getParameters().get(StreamTransformationConstants.MAPPING_TRACE);</b>
Using this piece of code in the Initialization Section , I could get the Trace object in the JAVA section of the mapping and am now able to add Trace Statements successfuly.
Thanks to Ananth for that thread by Stefan.. I had somehow forgotten about it
Regards,
Bhavesh
Hi Bhavesh,
Yes we have a option.We can achieve through simple UDF.
sample code:
MappingTrace t=container.getTrace();
t.addInfo("Info:"+a);
return a;
Thanks,
Sekhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.