Using Container Object in Java Mapping

Hi All,
I need to use a Container object inside a Java Mapping, just like the one wich is used in the Graphical Mapping.
Here is the scenario:
I have an Interface Mapping with three steps on it.
The first step is a Java Mapping just to put some info in the Container. The second step is a XSLT transformation that uses an XSLT file to transforms from IDOC to xCBL. The third step is another Java Mapping that get the info from the Container and insert in the xCBL.
Does any one knows how to do it inside the Java Mapping Code? We cannot make modifications in the XSLT file because of some internal restrictions.
Thanks,

Hi,
If you make the container variable is a part of your message (input of Java Mapping) then you can access as normal fields.
Just have a look at these discussions-
How to use Container Variable across Maps
xi 3.0 - Using BPM variables in messages
Hope this helps,
Regards,
Moorthy

Similar Messages

  • Fill Container Object in Java Mapping

    Hi Everyone,
    I use BPM and defined a container object of type integer. Now I want to fill this container object in Java Mapping. After I fill it in the next step there is a switch using the value of the container.
    How can I fill the container in Java Mapping?
    Thanks for the input.

    How can I fill the container in Java Mapping?
    Mandatory to fill the container in JAVA Mapping? If not then you can try the below:
    1) Define a Container Object...already done
    2) Let the JAVA Mapping create the required message....transformation step.
    3) include a Container Operation before the Switch step (and after the Transformation)
    4) Mode as Assign...Target will  be your Container Object (integer)....Expression will be the node from the output message of JAVA mapping.
    Regards,
    Abhishek.

  • Creating the container Object In Java Mapping

    Hi,
    i I have a scenarion where i have to set some parameter in the COntainer from the Java Mapping.
    How can i get a reference to the current Container object from my Java Mapping . While using user defined function this object is already avaliable as a parameter and we do not have to create it .But in java mapping how do i get the current container object.
    regards
    Nilesh Taunk.

    Nilesh,
    sorry.. I think this is actually possible.
    In the setParameter()
    public static AbstractTrace trace;
    public void setParameter(Map param) {
              map = param;
              trace =
                   (AbstractTrace) param.get(
                        StreamTransformationConstants.MAPPING_TRACE);
    Likewise, in this method setParameter, you can get and set Container objects.
    I have shown how to use the TRACE .
    Sorry for the confusion
    Regards,
    Bhavesh

  • Container Object in Java Class

    Hello ,
    I have a Mapping program using java class type (Java SAX in this case).  I need to access some Runtime constants and the mapping trace object.
    In message mapping is simple. We can use the container object that is pass to a UDF and the GlobalContainer Object.
    But how can I access the  Runtime constants  and mapping trace without a container object ?.
    Any ideas...?
    Thanks in advance.
    Yuvan D.

    in Your java mapping class
    you should import import com.sap.aii.mapping.api.*;
    public void execute(InputStream input, OutputStream output)
            throws StreamTransformationException {
            AbstractTrace trace = null;
            String RESULT = new String();
            trace =
                (AbstractTrace) param.get(
                    StreamTransformationConstants.MAPPING_TRACE);
    trace.addInfo(doc.toString());
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

  • Container object in Message Mapping

    Hello
    I am having a scenario where I want to reuse the previous value of a map to calculate another value.For the same I tried container parameters in Message Mappings by using a simple Java function calling
    container.getGlobalContainer().setParameter("test","value");
    in another simple user defined java method I used container.getGlobalContainer().getParameter("test").
    But my target value is coming as null.
    Anybody knows how to use container methods to reuse values in Message Mappings??
    Thanks in advance.
    Regards
    Rajeev

    Hi,
    There is also another method by which you can use values across different functions.
    IN your Integration Builder, while you are in your Message Mapping, under the Design tab there is a small menubar.
    Choose the rightmost option which is called Edit Java Sections. Using this you can use global variables which have a scope of the entire mapping. That means you can use them anywhere in the mapping.
    Only remember to populate the variables with valid data before using them in other functions.
    Let me explain with an example.
    Once you click on Java sections, a smaller box opens up which has 3 fields.
    Under the first field called Global Variables we can give something like:
    String a;
    Under second field called Initialization Section we can give:
    a = " ";
    Now we can use this variable a in any UDF to store some value and this same variable can be used again to retrieve the value.
    This eliminates the need of using containers within the same mapping.
    Glad to be able to help.
    Regards,
    Kshitij

  • [Urgent] using javafx object in java project

    Suppose I here created a very simple java project and the main file is like below,
    public class test {
        public static void main(String[] args){
                System.out.println("Hello World!");
    }and in this particular java project, I need to use another javafx object which is defined as (the javafx and java file are in the same package),
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    var stage: Stage = Stage {
        title: "Declaring Is Easy!"
        scene: Scene {
            width: 300
            height: 250
            content: [
                Circle {
                    centerX: 150  centerY: 120 radius: 80
                    fill: Color.MAROON
                    stroke: Color.INDIANRED
                    strokeWidth: 10.0
                }, //Circle
                Rectangle {
                    x: 25, y: 80 width: 250, height: 80
                    arcWidth: 20 arcHeight: 20
                    fill: Color.web("#6699ff")
                    stroke: Color.web("#003399")
              strokeWidth: 5.0
                } //Rectangle
            ] //Content
        } //Scene
    } //StageSo how could I achieve this?
    Regards.

    Thanks for your reply.
    But would you please elaborate on this sentence: create the fx class using Class.forName("....").newInstance()?
    Indeed I implemented an interface which was extended by the javafx class, and in the main java file I need to write following codes to use this object,
    Context context = FXLocal.getContext();
            FXClassType instance = context.findClass("packageName.JavaFXClass");
            ObjectValue obj = (ObjectValue)instance.newInstance();
            JavaInterface ji = (JavaInterface)obj.asObject();The problem that I encountered right now is, the exception was thrown at context.findClass("javatest.MyChart");, since it's not able for the compiler to find the JavaFXClass.class.
    I checked the folder build\classes\packageName and noticed that both my main JavaClass and JavaInterface have been compiled with .class file, while the JavaFXClass was not, which means the file JavaFXClass.class doesn't exist.
    What's the solution?

  • How to use Oracle objects in java code

    Hi all!
    I'm reading an xls and i need to fill me oracle objects with java code:
    OBJECT_NAME OBJECT_TYPE
    LETTURA_OBJ TYPE
    LETTURA_OBJ TYPE BODY
    In the past weeks i've been using both java code into oracle and oracle objects, but new i need to write those objects with data i read with java, anybody can help me?
    I know that the easiest work around would be to put the data i read from the excel file into a table and then fill the oracle objects, but now i want to learn how to write directly those objects with a command like the following one:
    a sample of the code i'm tryng to write:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED REPORT."Manage_Excel_ASMBS" AS
    import java.io.*;
    import java.io.IOException;
    import jxl.*;
    public cass ....
    #sql{  variabili_globali.var_ER_F3.Tipo_Lettura := 5}
    thanks,
    Massimo
    Edited by: LinoPisto on 16-mag-2011 16.38

    mmmh i'm not understanding so much....
    well... as i told before i'm working in oracle database environment and i'm developing a java procedure.
    now, i have this object
    CREATE OR REPLACE
    TYPE REPORT.FATTURA_OBJ AS OBJECT (
    POD VARCHAR2(1000),
    ID_FATTURA NUMBER,
    ID_FILE NUMBER,
    COERENZA_EA_F VARCHAR2(1000),
    COERENZA_ER_F VARCHAR2(1000),
    COERENZA_EA_M VARCHAR2(1000),
    COERENZA_EF_M VARCHAR2(1000),
    ANOMALIA VARCHAR2(1000),
    MOTIVO_INVALIDAZIONE VARCHAR2(1000),
    MATRICOLA_CONTATORE VARCHAR2(1000),
    POTENZA_DISPONIBILE VARCHAR2(1000),
    MEMBER PROCEDURE pulisci
    /and i need to work with it inside this procedure:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED REPORT."Manage_Excel_ASMBS" AS
    import java.io.*;
    import java.io.IOException;
    import java.io.StringWriter;
    public class Manage_Excel_ASMBS
    public static void read_Excel(String inputFile,int var_Id_Caricamento, int var_Id_Distributore, String var_Distributore) throws SQLException, IOException
              **here i need to put what i'm reading inside the excel file into oracle objects**
    /can you please give me a sample ?
    thanks

  • How to use bean objects in java script

    function insertRow()
              var row=1;
              var tbl = document.all("TAU");
         var tr = tbl.rows(row);
         var td = tr.cells(0);
         var td2 = tr.cells(1);
         var td3 = tr.cells(2);
         row++;
         tr = tbl.insertRow();
         tr.setAttribute(false);
         td = tr.insertCell();
         td2 = tr.insertCell();
         td3 = tr.insertCell();
         td.innerHTML = "<html:text property='unit' value ='02' />";
         td2.innerHTML = "<html:text property='unit Id' />" ;
         td3.innerHTML = "<html:text property='unit Type' />" ;
    this is my code, it is basicaly add row at run time thru java scripts. i want to set property of beans with this script , in this code i foun error ie. "can not found bean in nay scope" so plz anybody can tell me how can i pass bean object to java script !!!!!!

    mmmh i'm not understanding so much....
    well... as i told before i'm working in oracle database environment and i'm developing a java procedure.
    now, i have this object
    CREATE OR REPLACE
    TYPE REPORT.FATTURA_OBJ AS OBJECT (
    POD VARCHAR2(1000),
    ID_FATTURA NUMBER,
    ID_FILE NUMBER,
    COERENZA_EA_F VARCHAR2(1000),
    COERENZA_ER_F VARCHAR2(1000),
    COERENZA_EA_M VARCHAR2(1000),
    COERENZA_EF_M VARCHAR2(1000),
    ANOMALIA VARCHAR2(1000),
    MOTIVO_INVALIDAZIONE VARCHAR2(1000),
    MATRICOLA_CONTATORE VARCHAR2(1000),
    POTENZA_DISPONIBILE VARCHAR2(1000),
    MEMBER PROCEDURE pulisci
    /and i need to work with it inside this procedure:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED REPORT."Manage_Excel_ASMBS" AS
    import java.io.*;
    import java.io.IOException;
    import java.io.StringWriter;
    public class Manage_Excel_ASMBS
    public static void read_Excel(String inputFile,int var_Id_Caricamento, int var_Id_Distributore, String var_Distributore) throws SQLException, IOException
              **here i need to put what i'm reading inside the excel file into oracle objects**
    /can you please give me a sample ?
    thanks

  • Using request object in java web service code

    Hi,
    I am working on a java web service and require the request object in my code.
    This is because i want to get the name of the user who is using this web service.
    I am getting error in the line
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    Please guide me how to use the request object.
    Please also suggest if there is any other way to get the name of the user who is using the web service.

    Simple answer: This is not possible due a web service doesn't has such request objects.
    If you want to use the user information you have to pass it from the programm logic you are calling the web service. When you have e.g. a JSPDynPage you can read out the user information and supply this information for your web service.

  • Problem using View Object in Java

    I am creating a simple Java class to use a view object (companiesView)that I created and tested in JSP with the following code:
    String where="EID = " + eid;
    companyAppModuleImpl cam=new companyAppModuleImpl();
    CompaniesViewImpl cv=cam.getCompaniesView1();
    cv.setWhereClause(where);
    cv.executeQuery();
    RowSet rs= cv.getRowSet();
    return rs.first().getAttribute("Name").toString();
    I got
    java.lang.NullPointerException
    at setWhereClause
    What step(s) did I miss?
    If you know where I can find such samples, please let me know.
    Thank you.

    Hi,
    You cannot instantiate an application module using the new operator. You have to use the Configuration class. I quote this from the JDeveloper help.
    <quote>
    Use the method oracle.jbo.client.Configuration.createRootApplicationModule().
    Pass this method the package-qualified name of your application module and the name of the configuration you want to use. For example, to instantiate OnlineOrders.OnlineOrdersModule in local mode, you would use: ApplicationModule myAM = Configuration.createRootApplicationModule("OnlineOrders.OnlineOrdersModule", "OnlineOrdersModuleLocal");
    </quote>
    Hope that helps.

  • Get the value of Container element in message mapping

    Hi,
    Is it possible to read the value of container elements(bpm) in a UDF defined in message mapping. If yes, please tell me how?
    Thanks and regards,
    Siji

    Siji,
    Refer thread - Creating the container Object In Java Mapping
    Regards,
    Geetha

  • Container Element in the Mapping UDF

    Is there any way that to access the BPM container Element in the Mapping UDF. Can some one share the UDF code for this

    Hi,
    Refer BPM Container Element and Container in UDF Relation
    BPM Container Element and Container in UDF Relation
    Creating the container Object In Java Mapping
    Thanks
    swarup

  • Is there a way to use bpm object in jsp (java)

    hello
    i could see that the bpm object can be used in jsp with javascript and fuego tag. but is there a way to use bpm object with java code?
    thank you!

    Suppose a Servlet/JSP calls java classes. In the java
    functions of those classes, is there a way to get and
    set attributes with application/session scope
    directly? Thanks.Only by passing a reference to those classes (or by tying in to the framework/container).

  • Java mapping how to use com.sap.tc.logging

    Hi I would like to know how to use logging within a java mapping.
    I know i have to use theese classes : Location, Category, ConsoleLog but i dont know how.
    1) How to load the P1, P2, P3 and P4 tags in the Error tag of the SOAP header watched in SXMB_MONI
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">STREAM_TRANSFORMATION_EX</SAP:Code>
      <SAP:P1>SwissMedical/Interfaces/IFI002/LiquidacionMapping~</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Java mapping of application triggered an exception</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    2) How to load and activate log in the DIAGNOSTIC tag of the SOAP Header.
    - <SAP:Diagnostic xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:TraceLevel>Information</SAP:TraceLevel>
      <SAP:Logging>Off</SAP:Logging>
      </SAP:Diagnostic>
    Thanks!!

    As already suggested, you can display custom messages using AbstractTrace.
    trace = (AbstractTrace)param.get( StreamTransformationConstants.MAPPING_TRACE );
                        trace.addInfo("G1-CYCLE is missing");
    For more on coding front refer:
    http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/StreamTransformation.html
    To get this trace seen in MONI, set parameter TRACE_LEVEL in SXMB_ADM to 2.

  • Call ABAP FM from XI Java mapping

    Can you please provide me some documentation on how to make a call to ABAP function module from Java mapping.
    Basically this would be a RFC lookup from Java mapping.
    Any recomendations on which one is a standard approach among ABAP Mapping vs JAVA mapping within XI.
    Your responses are appreciated.
    TNV

    Hi TNV,
    <i>I am more looking into using RFC call from java mapping.</i>
    The article by Michal can be used to make the RFC lookup not only from an User Defined Function but also from a java mapping.
    You can write any piece of java code inside the EXECUTE() method of your Java Mapping including the RFC Lookup API code in michal's article.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf
    Regards.
    Bhavesh

Maybe you are looking for

  • Security Key

    3 years ago, I purchased Microsoft Office Home and Student 2010 with the backup disc. The purchase was on-line from Microsoft. I recently had to restore my PC, and when I went to reload Office, I realized I did not have the key. How do I get the key?

  • Arrow and space keys not working on websites

    I can't seem to get my arrow keys or space keys to work playing flash games on websites. An example would be this game: http://progressivefastandfurious.com When this game starts the car does not move anywhere because the keyboard keys won't work. Wh

  • How does OBIEE render international character sets?

    Hi. Our OBIEE Oracle Business Intelligence 11.1.1.5 application running on Linux x86 (64-bit) and a 11.2.0.2.0 database is using the AL32UTF8 Unicode character. So our database will support languages such as Japanese, Spanish etc. But how does OBIEE

  • Business scenarion in PM Module

    hello, Can anybody plz tell me the business scenarion in detail (including domain & SAP) for pm module. Thanks in advance.

  • LSO- to print course participation document from learner portal

    Hello , My client wants to print "course participation document" from the learner portal when the participant completes  web based training. Also the name of participant and WBT should be in it. Do you have any idea how can we do? Best Regards,