Quick java udf question

Hi sorry for this completely stupid question but the below piece of code I am trying to dissect and understand.
I understand the first line I am creating a new global container but the second line I am not so sure what the (integer) would be for. Is this meant to be a variable or a return type? What could that possibly be for I mean a type in parenthesis after the equals sign.
GlobalContainer gc = container.getContainer();
Integer counter = (Integer) gc.getParameter("counter");
Thank you for your help.

GlobalContainer is a container object stores values and can be retrieved by UDF during runtime. This GlobalContainer stores values and can be accessed by any UDF in the same namespace. This is similar to class variable or static variable of java class.
In your case, It has a parameter which is set as ("counter", Integer) . Basically it is a key value pair and very similar to Hashtable in java.
Example
setParameter(String  str , Object  Integer);
>What could that possibly be for I mean a type in parenthesis after the equals sign.
typecast to integer in paranthesis, because we store the value here as Integer object.
Integer counter = (Integer) gc.getParameter("counter");
expecting  return type is Integer.
Also refer this [link |global container;for further refereence

Similar Messages

  • Quick Java version question...

    I'm unable to use VNC while connected through a semi-restricted VPN tunnel into work (I have to visit a certain website at work and when I click a button an Aventail application springs into life and I get a VPN tunnel). My work doesn't support Macs, so I spoke to tech support for the VNC vendor and he assured me they support Macs. He said to make sure I'm running version 1.5 or 1.6 of JRE (Java Runtime Environment) and Safari. I don't know how to determine that - anybody out there able to help?

    Thanks for the reply - I'll give this a try when I get home later on. It does seem a bit odd that I was asked to inquire about JRE, but this Java Preferences application talks about JSE. I don't suppose they're the same thing?...

  • Flash/java remoting question

    Hi,
    i'm new to flash remoting and am finding using it with java
    quite troublesome. I've also found using the FileReference class
    troublesome if you use java. my question is can you somehow tie the
    remoting functionality to the FileReference.upload method
    fucntionality??
    thanks in advance

    I will use the program with photo detector to test
    the response time of the LCD screenWhy Java?I second that. With a test like that, you want to reduce the experiment down to a single variable, in this case the lcd response time. Using a java program to feed the monitor input introduces a second variable, the response time of the program. The java program's timer may not be exact, the components may not be repainted completely quickly enough, etc. If this is just for your own amusement, maybe that doesn't matter, but if you want your results to have any reliability, you'll need a more accurate and controllable input source.

  • In PI 7.1 - Java UDF's Compiled Class files - Jar File location

    Hi All,
    In PI 7.1 Does anybody know where the compiled Java UDF's (which are used in Graphical mapping) class files stored in jar are located in integration server? I want to use this jar file in my XSLT mapping.

    Hi,
    I guess it would be under
    \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\temp\classpath_resolver
    or
    \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\.\temp\classpath_resolver
    Where SID is your XI instance name.
    Thanks,
    Gujjeti
    Edited by: Praveen Gujjeti on Jun 23, 2008 5:12 PM

  • Web Service call from java UDF in message mapping

    Hi,
           Is it possible to call a web service from inside a java UDF in message mapping? The webservice can be any standard one. If this is possible please let me know how this can be done.
    Regards,
    Shiladitya

    Hi Shila,
                 Hope u remember me
    Here is the standard code used to call webservice from Java UDF
    public String setSoapAction(String SOAPAction,Container container){
    try{
    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey soapurl = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/SOAP" , "THeaderSOAPACTION");
    conf.put(soapurl, SOAPAction);
    return "";
    }catch(Exception e){
    e.getMessage();
    return "";
    Regards,
    Arijit

  • Quick SAP Script question New Page Print

    Quick SAP Script question
    I have added a new page to an existing SAP Script BUT only want it to print if a condition is true.
    I need to do this from within the form as the print program is SAP Std.
    Any idea how I can prevent the new page from printing?
    i.e. I need the form NOT to call the new page if the condition is false. Is there a way of forcing an exit or stop from with in the form?

    Hi,
    To trigger a new page, there is script ediotr command NEW-PAGE.
    so find where is that command is triggered and use the below code for trigger it on any specific condition....
    if &condition& = 'True'
    /*  NEW-PAGE
    elseif
    /: NEW-PAGE   
    endif
    so it means if condition is satisfied your new page will not work.. else it will...
    Hope you got it...
    Try this..
    Best luck..
    Regs,
    Lokesh.

  • Quick SQL-related question

    With MSAccess, my understanding is that if you have a string with length under 255 it's type is TEXT, and over 255 it's MEMO... is this right?
    My real question is about the CREATE TABLE string, which might look something like this for a shorter bit of text:
    CREATE TABLE MyTable ([MyColumn] TEXT(30) NOT NULL, etc.)
    But what does this string look like if the column will hold strings of text longer than 255? Do I only specify the size like TEXT(400), or do I list the type like MEMO(400) or what?
    I realize that this isn't really a Java focused question, but I'm hoping it's close enough. After all, the app that I'm working on is in Java. I haven't had much luck finding the clarification I need by just googleing this. Thanks for the help.

    Okay, Ceci, I don't know as much about this stuff as
    you obviously do, so I'm really sorry I offended you
    with my newbie faux pas. Do you realize that in the
    time it took you to rip on me you could have already
    answered the question? Thanks for the sentiment.I answered it the best I could: write a small program and try it.
    With MSAccess, my understanding is that if you have a string with length under
    255 it's type is TEXT, and over 255 it's MEMO... is this right?String: max. 255 chars
    Memo: max 64000 chars.
    Sez the Access help.
    But what does this string look like if the column will hold strings of text longer
    than 255? Try it. Might puke, might truncate the String, might autoconvert. I don't know. You'll see.
    Do I only specify the size like TEXT(400), or do I list the type like MEMO(400) or what?If you expect it to be > 255 chars, why not simply define the field as Memo right away? I doubt you can write a Memo to a textfield.

  • Tricky Java UDF

    Hello Sdn
    I have bit tricky problem to achieve through java udf in XI. We have to parse a tricky text in java.
    Source has a text field : ST - 102RP34;RP - 234ST89;VT - 90789ST;
    So the souce text field has a qualifier - value;
    In target , I have 3 repeating segments
    1) First segment to be created if qualifier is ST ,second segment for qualifier RP,third segment for qualifier VT.
    2) There exists 1 field in each segment.
    Target Field value for first segment : 10234RP34
    Target Field for second sement :  234ST89
    Target field for third segment :90789ST
    So the problem and trick ,as i understand is  : we have 3 qualifiers but in values for these qualifier also we have qualifier values ST,RP etc. So we cant just directly take index of qualifiers as values also have qualifier values.Eg : we have a value : 10234RP34 and RP is also the qualifier.
    There will be 2 udfs : one for segment creation and other for the Target field value.
    Basically with help of some do while or some loop we need to extract value after "-" and before " ;" and this shld be in some loop to get all the values.
    Please help. I am not a  java person.
    Thanks

    Hi
    Assuming that your target is having nodes like
    qualifier
    value
    qualifier
    value
    qualifier
    value
    You need 2 UDF's one to generate qualifier and another to generate value from the input String of parameter cache context
    For generating qualifier
    public void qualifier(String[] input,ResultList result,Container container)
                               String element, qualifier ="";
    StringTokenizer token1 = new StringTokenizer( input, ";");
                     while (token1.hasMoreTokens())
                         element = token1.nextToken();
                         StringTokenizer token2 = new StringTokenizer( element, "-" );
                         qualifier = token2.nextToken();
                         result.addValue(qualifier);                    
    output returned will be
    ST
    RP
    VT
    Another UDF just and extension of the above can give values(type context)
    public void values(String[] input,ResultList result,Container container)
    String element, qualifier,value ="";
    StringTokenizer token1 = new StringTokenizer( input, ";");
                     while (token1.hasMoreTokens())
                         element = token1.nextToken();
                         StringTokenizer token2 = new StringTokenizer( element, "-" );
                         qualifier = token2.nextToken();
                                     value = token2.nextToken();
                         result.addValue(value);                    
    output returned will be
    102RP34
    234ST89
    90789ST
    Thanks
    Gaurav

  • How to make Quick java Doc to works for j2ee APIs (CTRL+D)

    Hi
    Thank you for reading my post
    i find that jdeveloper can show a quick java doc for java API , but i do not know why it does not show any document for j2ee stuff.
    can some one tell me the solution ?
    Thanks

    Hi
    Thank you for reply ,
    where i can find source codes for java ee stuff ?
    I want all of APIs to have quick java doc as it is very usefull.
    thanks

  • I have what is hopefully a quick and easy question. I kno...

    I have what is hopefully a quick and easy question. I know almost nothing about this stuff so go easy on me . All I need to do is find out if my DHCP is enabled. I'm having problems with my Xbox 360 and one of the possible problems is this DHCP thing. However I have no idea how to find the settings for my router on my computer. If it helps I have a Wirless model BEFW11S4. Thanks in advance for any help.

    You need to access your router to check if the DHCP is on.  To access the router open your browser and type in http://192.168.1.1 into the address field and hit enter.  That should open the routers log on screen and by default the user is left blank (some routers it is admin) and the password is abmin.  If you changed your routers password as you should for security reasons then use that password.  That will bring you to your routers user interface and on the main set up page should be your DHCP.
    Richard Aichner (Ikester)

  • Resources for developing java UDFs used in XI

    I am with some Java background working in XI
    for developing Java UDFs used in XI are there any online resources or books other than from the SAP help and SAP certification material.

    Hi Kalyan
    You can get a lot of UDF already discussed in Forum and Blogs, Wiki
    As you said you are familiar with Java then you wont find any difficulty
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_weblog&query=xi+udf&adv=false&sortby=cm_rnd_rankvalue
    Thanks
    Gaurav

  • Can I post here(Acrobat Windows) Java Script questions here?

    Hello
    Can I post here(Acrobat Windows) Java Script questions here? If not, wht is the correct forum?
    THank you

    Back up and down to Acrobat Scripting. Bot Windows and MacIntosh Acrobat versions use the same JavaScript.
    If you are using LIVECYCLE DESIGNER use their forums. The JavaScript syntax and objects are different in LIVECYCLE DESIGNER!

  • 2 quick java questions

    hi, im working on a large grpahics project with some people, and i had a couple of simple questions.
    1) is it possible to detect the colour of a spefic pixel on an image?
    Maybe some sort of method that returns the color or something? This woudl be for collision detection, since we're going to have a character walking around a building and this is pretty much the only thing i can think of for collision.
    2) Is it possible to load a large image, and then make the screen only show a small portion of it? and then when you move, it kind of resets the focus on the larger image to your new location? This would be used to help the character move around the large map.
    Thanks for all the help!

    Youre going to want to get VERY acquainted with Image and BufferedImage, lol.
    Note the getRGB method.
    As for resizing, there are many ways to do this ranging from very simple
    to a bit complicated.
    int getRGB(int x, int y)
    Returns an integer pixel in the default RGB color model (TYPE_INT_ARGB) and default sRGB colorspace.
    http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/BufferedImage.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Image.html

  • Quick time zone question

    I am using Java to do some date/time formating and have a quick question.
    Is Indiana's timezone "IET"? I know most of Indiana doesn't observe daylight savings time, but they are eastern when things are normal... IET seems to produce the correct time, but I just wanted to double check before I make any assumptions. Thanks for the info.

    Actually it is "America/Indianapolis". Those three-character abbreviations have been deprecated because they are ambiguous (both North America and Australia have "eastern" times, for example).
    If you have a Java 1.4 SDK, then have a look in this directory:
    C:\j2sdk1.4.1\jre\lib\zi
    (modify according to where you actually installed the SDK); each file in that directory tree represents a timezone.

  • Sending a table to remote RFC in Java UDF

    Hello,
    <br><br>
    We use the API "com.sap.aii.mapping.lookup" often to make RFC calls from a UDF and return data. We typically create an import parameter in the Function Module and pass the value into the RFC. We now need to send in an unlimited number of values so we understand that instead of the import paramter we need to use a table. The problem is we get an error when we build the XML in our UDF and try to call the RFC. We tried wrapping the values in item nodes and several other approaches but we are not sure if we can populate a table via XML and make the RFC call.
    <br><br>
    Example of what we tried:
    <br><br>
    String sRfcxml = "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;&lt;ns0:ZCAE_MX_CONTRACT_ROUTING xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"&gt;&lt;E_ZCAE_COCODE&gt;&lt;item&gt;0445&lt;/item&gt;&lt;/E_ZCAE_COCODE&gt;&lt;/ns0:ZCAE_MX_CONTRACT_ROUTING&gt;";
    <br><br>
    Regardless of what we try we get the following error during the call:
    <br><br>
    error of "RuntimeException in Message-Mapping transformation: Exception:[java.lang.RuntimeException: com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel RFC_RCV_ORGDATA (Party: , Service: ValidateXIData_BusiServ, Object ID: d5401e52ad1039df96f02bde53b23c06) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0965</item"'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0965</item"'. com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel RFC_RCV_ORGDATA (Party: , Service: ValidateXIData_BusiServ, Object ID: d5401e52ad1039df96f02bde53b23c06) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0444</item"'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0444</item"'."
    <br><br>
    Now if we do not pass any data or use an import versus table parameter in the function module it works just fine.
    <br><br>
    We know we can work around this by using an import parameter and stringing the values together with a delimiter and then breaking this apart in ABAP but we are looking for a cleaner solution.
    <br><br>
    Any thoughts?
    <br><br>
    Joe
    Edited by: Joe Wright on Nov 16, 2009 10:45 PM

    Not sure what's wrong, but are you sure your "stringed" XML document matches the expected RFC structure ? Btw, I'd replace (though it could be considered as a cosmetic change) to replace "ns0" with "rfc" in your namespaces declaration, it's what you'll see in all imported RFC objects in XI/PI
    Rgds
    Chris

Maybe you are looking for

  • "E_PACK_ERROR: illegal filename for a PUT" Error in Packaging a PDF file

    Hi Jim, As per ContentServer_Technical_Reference.pdf (page no 9) I passed <filename>, <location> and <src> parameter in our packaging request xml. File is packaging successfully and service is also placing the encrypted file to new location listed in

  • How to parse all the data of the particular tag in the xml file

    Hi All, I have a xml file, which have tags like, code,rev_num,type...volunteer.I want to parse the xml and save the all data(code,rev_num...) of the tag <type>unknown </type>in a text file. I tried to use a Match node vi but I not geting the output i

  • Images when my computer starts up

    Hello everyone, I have an Apple iBook G4, which I recently joined to a network in the student building where I live. Now, every time the computer starts it, it does two weird things: first, it shows a blinking icon of the world, and then it shows a b

  • Loading class from an external .swf file

    Hi, My flash application has lots of resources which will change all the time. In order to keep the the user from having to download my main .swf file over and over again, and in order to keep the main file's size low, I would like to put the resourc

  • E-Recruiting Search functionality for Candidate in Talent Pool

    For search functionality of candidates in the talent pool, does anyone have any idea how the ranking percentage is calculated??  There is no clear documentation out there about what factors are used and how they are weighted.  I am aware that additio