Assigning & Reading Context variable

All,
Im setting the context variable "POS_NUM" in Component controller:
wdThis.wdGetFormController().wdGetContext().getCurrentElement().setAttributeValue( "c_pos_num", pos_num);
* In View controller im reading the component controller value & passing into BAPI..
Here im getting error :Can not be converted".
  String val = wdThis.toString( wdContext.getCurrentElement().getAttributeValue( "c_pos_num") );
bapiInput.setI_Pos_Num( val );
can anyone tell me how to read the value of context variable..
BM

Nothing helpfu...
I'm setting the value in InterfaceView as follows:
     wdThis.wdGetRequisitionFormController().wdGetContext().currentContextElement().set_pos_num("125");
When I debugged the pos_num is initial here.
In Componenet controller I'm reading the value as follows:
     String value = wdContext.currentContextElement().getTemp_pos_num();
Here value is initial.
Could anyone suggest me pls.
BM

Similar Messages

  • Reading context variable

    Hi All,
    In WebDynpro for ABAP can we access the value of context node of component controller
    from view controller which marks that component controller as required controller.
    I want to achieve this without doing context mapping.
    Any sample would be a lot helpful for me.
    Thank You,
    Nagaraju Donikena.

    Hi Nagaraju,
    You will not be able to access it directly. But you can do the following.
    Create a method in the component controller which will access the context node of component controller and call it from the view controller.

  • How to use one Assign action to create multiple context variables

    Hello, everyone.
    I read some tips from Oracle documentation that said:
    Avoid creating many OSB context variables that are used just once within another XQuery
    Context variables created using an Assign action are converted to XmlBeans and then reverted to the native XQuery format for the next XQuery. Multiple "Assign" actions can be collapsed into a single Assign action using a FLWOR expression. Intermediate values can be created using "let" statements. Avoiding redundant context variable creation eliminates overheads associated with internal data format conversions. This benefit has to be balanced against visibility of the code and reuse of the variables.
    Oracle® Fusion Middleware Performance and Tuning Guide
    +11g Release 1 (11.1.1)+
    Part Number E10108-03
    But I don't know how to do that. Can you show me ?
    Thank in advance
    Edited by: Doubt_Man on Aug 17, 2011 3:30 PM

    if you return sequences, you can declare the return type of your xquery as xs:double*
    (notice the asterix at the end)
    but I have the impression that in the assign action only the first element will be assigned to the context variable
    (correct me if I am wrong)
    So in fact you might indeed have to transform the sequence into a element()*, or concatenate it into a CVS string - for instance using string-join
    http://www.xqueryfunctions.com/xq/fn_string-join.html

  • Package variable versus application context variables

    Any difference in using package level variables versus setting attribute value pairs in a session based context ?
    Thanks

    Packaged variable - can be used only by user having execute privilege on the package. Same user can modify the values of the packaged variable when logged on to the session.
    Context variable - It cannot be set by only mere value assignment, It needs to the call to a procedure(trusted program) to set the value, hence it is more secure.
    Both are global variables & can be accessed throughout the session.
    Regards,

  • How can i assign a Javascript variable to JSP variable

    Hi guys
    how i can assign a javascript variable to jsp expression.,
    e.g.,
    <input type = "button" value = "Add more" onclick = "return submitform1('<%=s%>')">
    function submitform1(String s)
          var s1 = s
    document.form1.action = "../intimation.do";    /* Here i want to pass the value s1 to jsp or servlets without using hidden fields and Query string*/
           document.form1.submit();
          return false;
    /*  i want to pass the values thru session whether it is possible */
    pls give sample code
    Reply
    Marimuthu

    You don't have the session.
    All you have is HTTP.
    The only way to communicate from the client to the server is via an HTTP request. The only way to send a value like that is with a parameter.
    Using a form with method="submit" as mentioned will pass the parameters without displaying them in the url bar (is that what you wanted?)

  • Assign a Javascript variable value to a ABAP variable

    Hi,
       I wish to assign a javascript variable value to  a ABAP variable. Any ideas how to do that?
        Many thanks.
    Rgds,
    Bernice

    Here's another suggestion for you.
    BSP Application: SBSPEXT_HTMLB
    Check out the radionbuttongroup.bsp
    So then instead of using a standard HTML radio buttons you can use the HTMLB element with the parameter for onClick set then in your DO_HANDLE_EVENT you can read the value.
    VIEW
    <htmlb:radioButtonGroup id="radio">
      <htmlb:radioButton id="id_link"
                       text="Link"
                    onClick="myClickHandler"/>
      <htmlb:radioButton id="id_unlink"
                       text="Unlink"
                    onClick="myClickHandler"/>
    </htmlb:radioButtonGroup>
    DO_HANDLE_EVENT
      DATA:   lt_event        TYPE REF TO if_htmlb_data.
      lt_event = cl_htmlb_manager=>get_event_ex( request ).
      if lt_event IS NOT INITIAL.
        if  lt_event->event_name = htmlb_events=>radiobutton.
           case lt_event->event_id.
            when 'control_id_link'.
              schalter = ' '..
            when 'control_id_unlink'.
              schalter = '1'.
           endcase.
        endif.
      endif.
    There is an example of how to use it and read it in the DO_HANDLE_EVENT you then just have to pass the variable around (in this example the variable name is schalter and is defined as char1 in the class)

  • How to assign a JSP variabl's value to a JavaScript variable?

    Hello,
    I want to assign a JSP variable's value to JAVASCRIPT variable.
    or how to assign JavaScript variable's value to JSP varialbe
    HOw do i do it ?
    can anyone please help?
    Regards and thanks for your time.
    Ashvini

    I want to assign a JSP variable's value to
    JAVASCRIPT variable.
    var jsVariable = <%=someVariable%>;
    or how to assign JavaScript variable's value to JSP
    varialbeYou can't. JSP is server-side and JavaScript is client-side. The JSP variables are never available on the client side for any sort of assignment.

  • How to Parse XML data directly from context variables in webdynpro

    Hello,
       I have two requirements:
    1) I have a context variable which has string value.
       I want to write the this value into a flat file.
       How do I do this in WebDynpro.
       Any sample code for this.
    2) In Webdynpro, I want to parse and process the XML data directly from a string context variable which
       has the value in XML format.
       How do I achieve this. Any pointers or sample codes for this.
    Thanks and Regards,
    Anupama.

    Anupama,
    Here is some link which talks about unpacking xml and converting to HTML.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/eb/3dfb402eb5f76fe10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/eb/3dfb402eb5f76fe10000000a1550b0/content.htm</a>
    I have done something like this in portal development and not in webdynpro.But in principle it should work very where.

  • How to assign a Substitution variable dynamically?

    Hi All,
    I was trying to assign a substitution variable which should get data from the time period and should directly load into the substitution variable automatically.
    The process should be automated. so as to refrsh the substitution variable daily.
    Any comments are highly appreciated
    With Regrads
    Prads

    Sorry for the double-post, I didn't quite get that you wanted to read the Time Period dimension.
    Is that what you are trying to do? Get a list of the periods (usually these are pretty well known) and then find the latest one for a given member combination that has data and then set a substitution variable off of that?
    You can run reports (or DATAEXPORT calc command) to get data from MaxL.
    Or are you trying to do something else?
    Regards,
    Cameron Lackpour

  • Context variable in report configuration

    Hello,
    I try to create a context variable for a select-option  as indicated in the documentation of the customizing.
    I go in img structure Service Consumption Layer Reporting Administration
       then Report settings
       then Manage context variables
    I define a context group
       then a go to the sub screen Manage context variable
    I define a new variable but in field Contr type, I can only select P for parameter and not S for select option.
    I check the data element /IWCNT/CON_VAR_TYPE which is define  with a value range containing only P.
    Did I do something wrong ?
    I suppose that is why when I define the report, in screen parameters and values,  the fields context group and context variable in display and not in input mode .
    Thasnk ina dvance for your help
    jfj

    Hi,
    Easier option is to create a profit center group excluding the dummy profit center and assign it in the report painter instead of the variable.
    Other option is at the time of executing the report, exclude the dummy profit center with out making any changes in the report.
    Regards
    Sudhakar Reddy

  • Accessing user-defined context variables when chaining Proxies

    We have a Proxy Service, A, which routes to a ProxyService B, which does some routing and XML transformation.
    When an error is raised, the error text is assigned to a variable and the Error Handler for Proxy Servce B assigns soap fault XML to the body using this variable then does a Reply with Failure.
    However, Proxy Service A returns a generic BEA fault as below:
         <con:fault      xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-380000</con:errorCode>
         <con:location>
         <con:node>ESB-DefaultRoute</con:node>
         <con:path>response-pipeline</con:path>
         </con:location>
         </con:fault>
    We don't appear to be able to access the context variable which we defined in Proxy Service B when we are in the Error Handler of Proxy Service A. How are we able to return a soap fault from Proxy Service A with all of the details set in B.
    Thanks in advance

    Hi,
    Yes we;re using Raise Error. I don't think my post was as clear as it could have been :-)
    In Proxy B when an error is found, then the text we want to appear in the soap fault's faultstring is assigned to a varaible, errorDetail and then Raise Error is invoked.
    We're able to access errorDetail iin the error handlers of Proxy B but not in Proxy A and it's this which is causing us the issue.
    Thanks

  • Workflow context variable / function

    Is there any Database variable or function, which would return, whether a specific code is being called from a Workflow process or not ?
    For Ex: if the function fnd_global.user_id return a value other than -1, then the code is being executed from Oracle eBusiness suite. Similarly FND_GLOBAL.CONC_REQUEST_ID gives info about concurrent program.
    regards
    Yj

    Hi Maya,
    I dont think you need to use Context variable as a replacement for AT NEW....There would be something else out of box...
    Because Context Variable represents - Variables declared in context to the report other than declaraing globally....
    Could you please send us the part of code where you get this error?
    Best Regards,
    Ram.

  • Read HttpSession Variables in Multiples Projects...

    I'm using JDeveloper 9.0.3 with BC4J+UIXML, and I have the problem:
    One session varible using HttpSession created in the Project "A", don't be used in Classes of Project "B", after deploy processes.
    Example:
    Project "A"
    file1.uix - invoking Java Class FunSessionVar (create session variables and call file2.uix in Project "B"):
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.data.jbo.servlet.bind.*;
    import oracle.cabo.ui.data.BoundValue;
    import oracle.cabo.ui.data.DataBoundValue;
    import oracle.cabo.servlet.util.RedirectUtils;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletRequest;
    public class FunSessionVar
    public static EventResult FunPrepSessionVar(BajaContext context
    ,Page page
    ,PageEvent event) throws Throwable
         HttpServletRequest req = context.getServletRequest();
         HttpSession sess = req.getSession(true);
         sess.setAttribute("CodPessoaEscola", event.getParameter("CodPessoaEscola"));
         sess.setAttribute("DspNomEscola", event.getParameter("DspNomEscola"));
         Page browsePage = new Page(page, "../ProjectB/file2.uix");
         return new EventResult(RedirectUtils.getRedirectPage(context, browsePage));
    Project "B"
    file2.uix - have a "null" event invoking Java Class FunReadSessionVar (read session variables and set View Object Query):
    import oracle.jbo.ViewObject;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.data.jbo.servlet.bind.*;
    import oracle.cabo.ui.data.BoundValue;
    import oracle.cabo.ui.data.DataBoundValue;
    import oracle.cabo.servlet.util.RedirectUtils;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletRequest;
    public class FunReadSessionVar
    public static EventResult FunPrepReadSessionVar(BajaContext context
    ,Page page
    ,PageEvent event) throws Throwable
         HttpServletRequest req = context.getServletRequest();
         HttpSession sess = req.getSession(true);
         String valor1 = sess.getAttribute("CodPessoaEscola");
         String valor2 = sess.getAttribute("DspNomEscola");
         ViewObject view = ServletBindingUtils.getViewObject(context);
         view.setWhereClauseParam(0,valor1);
         view.setWhereClauseParam(1,valor2);
         view.executeQuery();
         return new EventResult(page);
    Well, the method [b]sess.getAttribute("CodPessoaEscola"); return null value, but the correct value passed in
    FunSessionVar (Project "A") is equal "180".
    Any body have a solution for this problem ?
    Thans,
    Danilo

    John, thanks for your help...
    The event parameters does not have null values, because if I write this command in the Pages of Project "A", the show values are correct:
    <flowLayout>
    <contents>
    CodPessoaEscola:
    <styledText data:text="text@getCodPessoaEscola" />
    </contents>
    </flowLayout>
    (The Data Provider return HttpSession variable of CodPessoaEscola).
    May be HttpSession variables have restrict scope inside Project ? Does the web.xml file have properties to configurations of this feature, before make deploy ?
    Thanks,
    Danilo

  • Using context variable in formcalc scripting language.

    Hi all,
             I wanted to know if it is possible to use context variables in formcalc. I wanted to use those variables in "if else" condition in formcalc scripting language. Please post the sample code also as i am new to adobe forms.
    Regards,
    Vinod

    Hi ,
    Each variable define in the context can be used on the layout of the form and/or in script linked to fields.
    This can be done in formcalc or in javascript language , without any problem . You have only to acess the correct variable in the script.
    For getting variable in a script you must define the complete name of the variable, example "Myform.Header.Data.Myvariable" get access to variable MyVariable define in the context under nodes Header/Data .
    Hope it's help you
    regards.

  • I need in Formula Node to assign to the variable value 4000000000!!! What kind of variable it should be???

    i've just tryed to write unsigned in32, but it does not understand 'unsogned'... But i need variable to be unsigned, because the max value = 4000000000... So, how can i solve this probleme???

    Hi,
    I don't see exactly what you're trying to do here.
    Where do you want to assign the variable 4000000000 to? If you want it as an
    input, just use a dbl, with only zeros behind the coma.
    Note that an integer is a number without any decimals. An integer in LabVIEW
    is this, but with an extra limitation that it can only be 32 bits... So a
    dbl can be an integer.
    If the input dbl is not an integer, use round, round to -inf or round to
    +inf to make it one. This can also be done if the output needs to be an
    integer.Inside the formula node floor(x), int(x), intrz(x) or ceil(x) can be
    used to make integers.
    I hope this is what you mean... I can't see any problems doing this.
    Regards,
    Wiebe.
    "DrON" wrote in message
    news:506500000008000000E
    [email protected]..
    > I need in Formula Node to assign to the variable value 4000000000!!!
    > What kind of variable it should be???
    >
    > i've just tryed to write unsigned in32, but it does not understand
    > 'unsogned'... But i need variable to be unsigned, because the max
    > value = 4000000000... So, how can i solve this probleme???

Maybe you are looking for

  • Multiple Vulnerabilities in Apple Mac OS X

    Every few months, somebody (with a PC) emails me one of notices. I assume Apple does their security updates othen enough to take care of this. Or am I wrong? Who makes these notices? What should I do when I get one of these notices? Here's THe whole

  • Using EyeTV 2 EZ to connect my PS2 to my iMac

    Hello, all... Is there anyone that could tell me what cable I need to buy to connect my PS2 to the EyeTV box I have on my iMac? I've seen several posts stating it does well with this EyeTV model. Unfortunately, I can't seem to find a working website

  • X wont start unless root

    So I got everything installed the way I want it but I did it as the root user. Now when I try to start X with the new user account I created, it will not work. I even copied all of the files from /root/ to /home/userid/ including the hidden files. It

  • Bitmap/picture/whatever size limitation in Adobe Air on iPhone.

    Hi I'm gonna start on a new app and was wondering what the max width and height of a picture can be? I will import a big picture into my Flash CS5.5 (pro) and place it in a movieclip. I found this info on an old site from 2008: Note: The maximum dime

  • Extraction of PDF files into Excel

    I'm working with X Pro and have created a 'report.csv' file.  On a weekly basis, new PDF's will be created that will need to be added to this report.  Is it possible to add new files (which would add rows) to the existing report without having to re-