Accessing Global Container

Dear Experts,
I have an RFC  to FILE Scenario and used BPM to meet the requirements.
There are 2 graphical mappings - mapping1 before the BPM and mapping2 (transformation) within the BPM.
I have saved a parameter in the global container in mapping1 but unable to extract the same in mapping2. Any idea?
UDF in mapping1:
GlobalContainer gc1 = container.getGlobalContainer();
String gdata1 = va2 + "_" + var3;
gc1.setParameter("gdata",gdata1);
UDF in mapping2:
GlobalContainer gc2 = container.getGlobalContainer();
String gdata2 = (String) gc2.getParameter("gdata");
Thanks and Regards,
Rana Brata De

Hi Rana
Refer the following statement from SAP Help stating that the values only available in same message mapping.
This object enables you to cache the values that you want to read again when you next call any user-defined function in the same message mapping.
GlobalContainer Object - Enterprise Services Repository - SAP Library
If you want to pass the value, you can either add additional fields in your structures or use DynamicConfiguration (has limit of 200 characters). Since you are using BPM (is it ccBPM or NW BPM?), I'm not sure if DC attributes can be passed into a BPM an accessible.
Any particular reason to do the 2nd mapping within the BPM? You can also do it out of the BPM after all the necessary BPM processing.
Rgds
Eng Swee

Similar Messages

  • Mapping in XI - cannot access Global Container parameters

    Hi all,
    we have the following problem in graphical XI mapping.
    Trying to retrieve the run-time value of a global parameter, we cannot access the value itself (e.g. test using "display queue" menu).
    We use 2 simple user-defined functions (getIdoc and corresponding setIdoc).
    The source code for our custom get/set methods is:
    public String getIdoc(Container container){
    // This is a CUSTOM global parameter set <- cannot get the value itself
    //String codMsgExport = (String) container.getGlobalContainer().getParameter("idoc");
    //return codMsgExport.toString();
    GlobalContainer globalContainer;
    java.util.Map map;
    globalContainer = container.getGlobalContainer();
    map = globalContainer.getParameters();
    // This is a STANDARD global parameter set <- cannot get the value itself, as well
    String headerField = (String) map.get(StreamTransformationConstants.INTERFACE_NAMESPACE);
    return headerField;
    public String setIdoc(String codMsgExport,Container container){
    container.setParameter("idoc", codMsgExport.toString());
    String retValue = (String) container.getGlobalContainer().getParameter("idoc");
    return retValue.toString();
    => anyway, get method returns only blank values (testing by "display queue" with some custom values...)
    It seems as if the parameter is seen, as pointing to a not existing variable - e.g. getParameter("idoczz") - XI runtime returns a NullPointerException.
    Some XI server details:
    Runtime Environment
    Java version: 1.4.2_06
    Java vendor: Sun Microsystems Inc.
    Version
    Service pack: 14
    Release: 30_REL
    Thanks all!
    Gianluca Tacchella

    Hi Sudharshan and Bhavesh,
    I forgot to put a value under the tab PARAMETERS (this is the reason for the blank value, thanks:)).
    Anyway, modifying (run-time by the set function) the standard runtime constant => leads to a get function with a single value returned (out) for "display queue", despite of test valorization: the initial value set under tab PARAMETERS.
    Instead of using the runtime (standard) constant, using my (custom) global variable => leads to NullPointerException ("display queue" for get function) EVEN IF I initialize the variable (e.g. initIdoc() function called once at top-level target message).
    under JAVA_SECTIONS_TOOLTIP button:
    Global Variables
    String idoc;
    Initialization Section
    idoc = "";
    Clean-Up Section
    idoc = "";
    public String initIdoc(Container container){
    GlobalContainer globalContainer;
    globalContainer = container.getGlobalContainer();
    // this is the only way NOT to get a NullPointerException
    if ( globalContainer.getParameter("idoc") == null )
    globalContainer.setParameter("idoc", "a");
    return globalContainer.getParameter("idoc").toString();
    initIdoc:
    out (*)
    [a]
    (*) despite of initialization under JAVA_SECTIONS_TOOLTIP button
    public void getIdoc(ResultList result,Container container){
    //String codMsgExport = (String) container.getGlobalContainer().getParameter("idoc");
    //return codMsgExport.toString();
    GlobalContainer globalContainer;
    java.util.Map map;
    globalContainer = container.getGlobalContainer();
    map = globalContainer.getParameters();
    //String headerField = (String) map.get(StreamTransformationConstants.INTERFACE_NAMESPACE);
    // this returns null (out stream)
    //String headerField = (String) map.get("idoc");
    //if ( globalContainer.getParameter("idoc") == null )
    //globalContainer.setParameter("idoc", "");
    // this returns NullPointerException
    String headerField = globalContainer.getParameter("idoc").toString();
    //result.addValue(headerField);
    // this returns NullPointerException
    //return headerField.toString();
    //return globalContainer.getParameter("idoc").toString();
    result.addValue(globalContainer.getParameter("idoc").toString());
    => leads to NullPointerException
    public String setIdoc(String codMsgExport,Container container){
    GlobalContainer globalContainer;
    globalContainer = container.getGlobalContainer();
    java.util.Map map;
    map = globalContainer.getParameters();
    //globalContainer.setParameter(StreamTransformationConstants.INTERFACE_NAMESPACE, codMsgExport.toString());
    //container.setParameter("idoc", codMsgExport.toString());
    //String retValue = (String) map.put(StreamTransformationConstants.INTERFACE_NAMESPACE, codMsgExport.toString());
    // this returns a NullpointerException
    //String retValue = (String) map.put("idoc", codMsgExport.toString());
    globalContainer.setParameter("idoc", codMsgExport.toString());
    //return "True";  // pointer for debug
    //return retValue.toString();  // pointer for debug
    return globalContainer.getParameter("idoc").toString();
    setidoc:     
    in0     out (*)
    [1]     [1]
    [2]     [2]
    (*) as if this "idoc" parameter is not the globally managed (JAVA_SECTIONS_TOOLTIP button), but one which lives inside the function and not outside for the get function..
    Regards,
    Gianluca

  • Trace not showing Global container variable at mapping test time.

    Hi Folks ,
    I have a scenario file to Proxy scenario. At mapping time I am doing a lookup inside a UDF using JCO connections.
    Lookup is taking 2 fields(ex X an dY) as input and coming up with couple of fields in output.
    Output fileds I am storing in global container and want to access in further mapping .
    I am using trace to see variable values at mapping tijme
    Surprisingly :
    1. For a particular "X" field in Input, No output fields are coming at trace . On testing it end to end I can see fields getting populated at run time at lookup table . but not getting reflected at mapping trace . what could be the possible cause ?
    2.  For few input fields like "Z" . It is showing all the output values at Trace. But when I go and place a value in lookup table for the same Input field "Z" . this new value is not coming up at trace Level while rest of teh values are coming up. Can anyone hint where I am going wrong  ?
    End to end Debugging sahows values populating and being sent across . Where I need to look at ?
    Regards ,
    Santosh

    Hi Horia ,
    By trace do you mean display queue or running the mapping completely in the ESR ?
    --->I am talking about running the mapping at IR and getting the values of trace by using messagetype.traceinfo() in UDF functionality. I am working on Pi 7.0
    Regards ,
    Santosh

  • Global Container in Java Class of Interface Mapping

    I have written a Java Class that implements the StreamTransformation interface for use in an Interface Mapping. I would like to cache information read from a file between message processing calls of this mapping.
    It appears that maybe the GlobalContainer object can be used to perform this caching. How do I access the GlobalContainer object from a class that implements StreamTransformation?
    The examples all show container.getGlobalContainer() method call to get access to this object. However container is not a variable in this interface. Any ideas on how to do this?
    Thanks,
    Jay

    Hi Jay,
    if you want to link data from different messages you must use BPM, you cannot do this with GlobalContainer because it is instantiated at the begin of the mapping and is flushed at the end of the mapping (e.g. graphical mapping).
    2 files for the same scenario will use 2 different instances of the same message mapping program and they will not share the container.
    The container is shared inside the same instance of the mapping program.
    So it is shared for example between two UDF in the same mapping
    So if you are using Java mapping you do not need to use the global container, you can use an Object to store data, but keep in mind that all this data will be lost at the end of the mapping.
    Hope it helps,
    Kind Regards,
    Sergio

  • Guidance required: How to access global panel/file handles from within a dll?

    Hi again,
    I have been tasked with trying to separate an application into a modular form, basically I will have a main application which will be a generic GUI which must be associated with a DLL that contains test sequences. Currently these test sequences make calls to the various panel controls to display the test information, this currently works great. The problem that I am having is trying to understand code that is compiled to create a DLL is made aware of, what is essentially, global constants that are defined in my main application. 
    The purpose of this structure is that we will have a generic GUI for multiple products tests, with each DLL representing a different products test sequence, each DLL will be built using the same framework with the generic GUI in mind. 
    I guess essentially what I am looking for is to call RunUserInterface() from main.exe and control the GUI from tests.dll. Is this at all possible, or should I be using a different approach?
    It would be much appreciated if someone could give me some pointers.
    Thanks very much 

    Well, in my opinion for such a software design, DLL modules should not directly modify the main GUI.
    The main.exe should be responsible from its GUI, so that in case of a GUI modification you should not be have to modify all DLLs.
    Also, in this case, there is no problem of accessing global handles, etc.
    Instead, you should send "messages" to the main.exe from the test DLLs and the GUI should know what to do with each message.
    For messaging between such applications I personally use the DDE library. I find it simple to use.
    Your main.exe can setup a DDE server and the test DLLs can attach to it as a client.
    Each DLL can send its "steps" to the GUI and the GUI can display them and command the DLL to run each step upon user's selection. 
    I have seen menchar's posts regarding "shared memory" usage for such purposes.
    There might be other options, too. 
    It is your decision to make.
    Hope this helps, 
    S. Eren BALCI
    www.aselsan.com.tr

  • How can I access global variables in a loaded Applescript?

    How can I access global variables in a loaded script, in Xcode, ApplescriptObjC? Basically, I have a global variable defined in my parent script using "property", and I need to modify objects connected to those variables inside of a loaded script.
    Example:
    Parent script:
    script AppDelegate
    property myTextField : missing value
    //linked to a text field object
    tell myScript to myAwesomeHandler_()
    end script
    Loaded script:
    on myAwesomeHandler_()
    myTextField's setStringValue_("The new Xcode is so glitchy ugh")
    //changes value of linked text field of parent script
    end myAwesomeHandler_
    The problem is, the variable is undefined in the Loaded script, and I need it to have the same value as the parent script, and I don't want to pass the variable through the Handler. Any ideas?

    I think want you are looking to do will need to be done in two steps. Because myTextField needs to be a property for the ObjectiveC part of the code you cannot turn it into a global.
    However if you make a temporary variable global assign the string to it in the handler then set myTextField off of it.
    global myTextFieldGlobal
    script AppDelegate 
    property myTextField : missing value 
    //linked to a text field object 
    tell myScript to myAwesomeHandler_() 
    myTextField's setStringValue_(myTextFieldGlobal)
    end script 
    on myAwesomeHandler_() 
    set myTextFieldGlobal to "The new Xcode is so glitchy ugh"
    //changes value of linked text field of parent script 
    end myAwesomeHandler_ 
    I know you stated you did not want the handler to return a value but I have to ask why? Global's, imo, are not a good idea and really should be used as a last resort.
    One other possibility is to pass a reference to the property to the handler. Not sure if that works in AS of if that would satisfy our requirement of not passing the variable through the handler
    <edit>
    Another though have you tried to define the property outside the script?  That is
    property myTextField : missing value
    script AppDelegate
    Not sure if that will work.
    You might also want to have a look at Scope of Properties and Variables Declared in a Script Object

  • Global Container

    Hi all,
    I am trying to understand the concept of Global Container.
    i have referred to the following blog by Michal
    <a href="/people/michal.krawczyk2/blog/2005/03/04/globalcontainer--in-graphical-mapping-xi:///people/michal.krawczyk2/blog/2005/03/04/globalcontainer--in-graphical-mapping-xi
    I have created the Second UDF 'getContainer'.
    But, while testing I am getting the following error:
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_TEST_IN_ method getContainer$[]
    Code that i am writing in getContainer is as follows:
    <b>GlobalContainer globalContainer = container.getGlobalContainer();
    String[] b = (String[]) globalContainer.getParameter("our_number");
    for (int i=0; i<b.length; i++)
    result.addValue(b<i>);
    }</b>
    getContainer function does not have any input parameters.
    Kindly, provide me some guidance about where am I getting wrong.
    Thanks & Regards,
    Nilima Rodrigues

    Hi Nilima,
    Hi Nilima,
       //write your code here
    GlobalContainer globalContainer1 = container.getGlobalContainer();
    String[] b = (String[]) globalContainer1.getParameter("our_number");
    String str_result = "";
    if( (b != null)  ) {
      int a1 = Integer.parseInt(b[0]);
      int cnt = Integer.parseInt(counter);
      int ans = a1;
      str_result = String.valueOf(ans);
    return  str_result;
    Note counter is a arguement for value based...
    Map Now like this
    use COUNTER standard function --> UDF getContainer --> then target field..
    this will work..
    regards,
    sridhar
    Message was edited by:
            sridhar reddy kondam

  • How to access Workfow Container data in a program.

    Hello I need to a access Workflow COntainer data for a particular workitem in a program. How to access these using Tables or standard function modules.
    Thanks in advance.

    swc_container it_event_container.                       
    swc_create_container it_event_container.                 
    CALL FUNCTION 'SWW_WI_CONTAINER_READ'
                EXPORTING
                  wi_id                    = wd_id
                TABLES
                  wi_container             = it_event_container
                EXCEPTIONS
                  container_does_not_exist = 1
                  read_failed              = 2
                  OTHERS                   = 3.
    if sy-subrc = 0.
    READ TABLE it_event_container WITH KEY element = 'name of your workflow container element'.
                IF sy-subrc = 0.
                  w_variable= it_event_container-value.
                ENDIF.
    endif.
    Regards
    Kedar

  • Access global variable in fpga from rt-target

    Hi All,
    I have a realtime PC with NI-FPGA 7852R.
    Generally I used programmatic front panel communication to access variables from FPGA to rt-system since I need the data for control and not for data logging.
    The thing is, I bumped into a tutorial and suggested me to use global variables to save resources of your FPGA. My question is, is it possible to access global variable that belongs to FPGA from rt-system? As far as I tried, this does not seem possible.
    Thanks,
    Auralius

    Could you point us towards this tutorial?
    Chris
    Certified LabVIEW Architect
    Certified TestStand Architect

  • Sequence Number Generation with Global Container

    Hi ALL,
    Can any plz send me the steps of using global container for generation seqence number's
    And also if possible send me the code.
    Thanks & Regards
    Rupash

    Hi Rupesh,
    chack this code:
    public String seqNumber(Container container)
          int i;
          GlobalContainer global=container.getGlobalContainer();
          String getnum=(String)global.getParameter("a");
          if(getnum==null){
                     global.setParameter("a","1");  i=1;
          else{
                i=Integer.parseInt(getnum); i++;
                global.setParameter("a",String.valueOf(i));
          return String.valueOf(i);
    **Reward points if helpful
    --Sankar Choudhury

  • Java doc for container ,global container.

    Hi ,
    Can somebody tell where I can get the javadoc for container and global container.
    THnks

    Hi,
    You can view the the source code also provided if you have proper Decompiler tools.
    I have used a tool to open <b>aii_mt_rt.jar</b> and found the following for <b>Global Container</b>.
    Global container:
    package com.sap.aii.mappingtool.tf3.rt;
    import java.util.Map;
    public interface GlobalContainer
        public void setParameter(String string, Object object);
        public Object getParameter(String string);
        public Map getParameters();
    For Container:
    package com.sap.aii.mappingtool.tf.rt;
    import com.sap.aii.mapping.api.AbstractTrace;
    public interface Container
        public Object getParameter(String string);
        public void setParameter(String string, Object object);
        public AbstractTrace getTrace();
        public GlobalContainer getGlobalContainer();
    Hope this helps.
    Regards,
    Ananth

  • Concept of Global Container or Global Variable

    Hi friends,
    My Scenario is from JMS to SOAP.
    I need to store some data when it comes to XI from JMS.
    When the response comes back from SOAP I need to add these fields and send back to JMS.
    Can I do this Scenario without using BPM ?
    Is there any concept like Global Container which I can use it in different Message mappings?
    Thanks and regards,
    Jose

    Hi,
    This object enables you to cache the values that you want to read again when you next call any user-defined function in the same message mapping. Note that the sequence in which user-defined functions are called is predefined. It depends on the position of the target fields that the function was assigned to
    On details of global container refer these.
    /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
    http://help.sap.com/saphelp_nw2004s/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/frameset.htm
    /people/michal.krawczyk2/blog/2005/03/04/globalcontainer--in-graphical-mapping-xi

  • Mapping and global container?

    I have to map single different field IN_F1 to three output fields..
    1) map the input field value IN_F1 to output field value OUT_F1
    2)
    a) based on the INPUT field value , conditionally map incremental numbers to OUT_F2. For example, if IN_F1 is 'X', OUT_F2 will be '01' and second time around I will increment it to '02'.
    b) Same condition as 2a, but move the incremented value from OUT_F2 to OUT_F3 in different node.
    I am planning to set global container in step 2a. And then use  that global container in step 2b to  fill OUT_F3. My question is will steps 2a and 2b always follow the order? Since my field OUT_F3 occurs in node after OUT_F2, 2a should always get executed first. Is this assumption right?
    I am actually invoking standard BAPI.. Would it be better to do all this steps in XI to fill std. BAPI structure or create a custom RFC to do this?

    Hi,
    >>>>Since my field OUT_F3 occurs in node after OUT_F2, 2a should always get executed first. Is this assumption right?
    yes
    you can also get all OUT_F2 in an advanced function
    and put then in a global array which you'll just
    use in a new andanved function to fill OUT_F3
    Regards,
    michal

  • Rebooting Global Container

    Is there a way to reboot the global container and all non-globals with one command?

    Rebooting the global zone will force all local (aka non-global) zones to reboot.
    The clean ways is to look through the zonelisting on the global zone and halt each local zone prior to rebooting the global. This gives you a clean shutdown.
    Here's a zone table from one of my machines I'm working on:
    essgzdu31z0|global$ sudo zoneadm list -cv
    ID NAME STATUS PATH BRAND IP
    0 global running / native shared
    5 essapdu31z1 running /zones/apps_zones/essapdu31z1 native shared
    12 essapdu31z4 running /zones/apps_zones/essapdu31z4 native shared
    17 essapdu31z3 running /zones/apps_zones/essapdu31z3 native shared
    - essapdu31z2 installed /zones/apps_zones/essapdu31z2 native shared
    essgzdu31z0|global$
    This command prints the running zones on the machines:
    essgzdu31z0|global$ sudo zoneadm list -cv | grep running | grep -v "global " | awk '{ print $2 }' <
    essapdu31z1
    essapdu31z4
    essapdu31z3
    essgzdu31z0|global$
    You could use this as a front end to zoneadm -z "zone name" halt
    Then it's safe to reboot the GZ.
    The rest I leave as an exercise to the reader :-)

  • Global Container Variable

    Hi
    Give me idea on Global Container variable in Graphical mapping.
    Thanx in Advance

    Hi
    Ref this
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    http://help.sap.com/saphelp_nw04/helpdata/en/95/bb623c6369f454e10000000a114084/content.htm
    Design and Configuration [original link is broken]
    Thanks
    Sridhar

Maybe you are looking for

  • Tax error in MIRO

    Hi, I am getting tax error in MIRO while posting transaction.  "tax amount must not be greater than the tax base" msg FF747. Invoice amount is 168.91(MIRO) PO amount is 55.17 Tax amount is 113.74 This error is coming due to Tax amount(113.74) is grea

  • Secondary Color Correction layer not working in .look file

    I needed to edit an image for continuity reasons so I exported a .dpx frame from that section of my premiere pro project and worked on it in speedgrade.  In the workflow I have set for myself, it is best to apply the look in after effects using the "

  • Adding F1 help.

    I have added one check box in selection screen which is not related to any table field. I want to add F1 help on it. For that I need to write a subroutine which is called when F1 help is asked by user. To open a new window and display the disired tex

  • [SOLVED] Chromium won't redirect public wifi signup page, Firefox does

    Not sure if this belongs in the Apps forum or this one, let me know if this doesn't belong here. On my laptop, I connect to various Wifi networks at hotels, client networks, etc. Most of those Wifi networks have an "accept" or "enter your room #" typ

  • Another crash report

    hi all, i keep having these error logs since my workspace is getting hotter in these summer days. im guessing that it's the CPU. I'll be so appreciated if you can say something about it. my macpro config is here,   Model Name:    Mac Pro   Model Iden