Strange Behavior in modifying the values in VO

I have a VO based on EO from a custom table. The query is something like:
select EO.x, EO.y, (EO.x*EO.y) xy from EO
I have displayed the values from this VO on to a table in OAF page. All the columns are messageTextInput but the third column (xy) is read-only. I have written a fireAction to execute when x or y values are changed to update the xy value accordingly.
Code in CO:
if ("ValueChange".equals(pageContext.getParameter(EVENT_PARAM)))
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("UpdateXY");
pageContext.forwardImmediately(<Same Page>, null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null, null, true,
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
Code in AM:
public void UpdateXY()
xxVOImpl vo = getxxVO1();
Row r = vo.first();
while (vo.hasNext())
r = vo.next();
Object X = r.getAttribute("X");
String X_string = X.toString();
float X_value = Float.parseFloat(X_string);
Object Y = r.getAttribute("Y");
String Y_string = Y.toString();
float Y_value = Float.parseFloat(Y_string);
Float XY = new Float(X_value*Y_value);
r.setAttribute("XY",(Object)XY);
The problem is as follows. During the first time I try to update a value, the control goes through the logic and returns to the page but the XY value is not updated. But if i change a second value and tab out, the codes works and displays both the updated values of XY. From then on, the code is working fine.
I'm also not updating the first row and so I didnt perform any logic in AM for the first row.
Please help me out in finding out the reason for this strange behavior.

This nature is fine, basically initially your EO x and y columns are null and unless you do a commit, these values don't go in db. The third column will take x and Y coumns values from db and multiply and will get null.
To solve this issue, you get the values from VO columns x and y in PPR and and put x*y in the third column of Vo, IN THAT ROW.or you can directly get hold of the bean which hold the value of x*y and use setValue after getting x*y.
---Mukul

Similar Messages

  • Can I modify the value of an enviroment entry for an EJB without having to re-deploy.

    I wish to modify the value of an envrioment entry for an EJB. The entry already exists and has been created using
    <env-entry>
    <env-entry-name>myFlag</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>true</env-entry-value>
    </env-entry>
    I can access the value using code similar to the following:-
    InitialContext initialContext = new InitialContext();
    String value = (String) initialContext.lookup("myFlag");
    However if I try the following:-
    InitialContext initialContext = new InitialContext();
    initialContext.rebind("myFlag", "false");
    I get an OperationNotSupportedException thrown.
    Do I need to use LDAP directly (rather than through JNDI) to modify this value or is there another / better way? If I do need to use LDAP directly what would the code look like ?

    Hi,
    As per J2EE specification:
    Naming environment entries allow customization of a component during deployment or assembly without the need to access or change the component?s source code. The container implements the naming environment, and provides it to the component instance through a JNDI naming context.
    The Deployer can modify values of environment entries that have been previously set by the Application Component Provider and/or Application Assembler.
    Generally only those variables/properties are set in environment entries which are likely to be different on various Application server configurations/installations, so it is not required/advisable to change these entries programmatically. Any way iAS-6.0/6.5 doesn't support changing environment entries programmatically, it binds all the JNDI names during Server startup after reading it from the registry.
    For your purpose you can use a boolean variable in your code to set your flag, and may be put it into session.
    Please feel free to ask further questions.
    Sanjeev,
    Developer Support, Sun ONE Application Server-India.

  • T.code F110 Created a proposal, could I modify the value date?

    Hi All,
    I need to create a proposal with tha value date successive to posting date....
    In particular, i wonder if, before running the payment i can modify the "value date" of the scheduled proposal  by hand.
    Thanks...
    Gandalf

    Hi Umberto,
    My understanding of your requirement is like this: When you make a payment to a vendor, it will be credited in his bank account say 2 days after the payment is generated in your system. Say if you have generated a payment document on 24th March, it will be credited to the vendor account on 26 th march. and you want to maintain the value date as 26th march in your payment document.
    If this is the requirement, maintain value date in FBZP settings, under bank determination, for the payment method/hosue bank and HB ID combination. You have to mention number of days to value date.
    Please let me know if this is your requirement

  • FB70: How t o modify the value of BSEG-XREF before posting?

    Hi ABAP Gurus,
    Good day!
    I would like to know the correct way to modify the value of BSEG-XREF1 in FB70 (Prior to posting of document).
    Currently, I have tried using substitution. First, I copied RGGBS000 into ZRGGBS000 AND added form u300, which will modify BSEG-XREF1.  Second, I have added a step to an already existing substitution (COGS), which was set-up in transaction OBBH.  I have assigned u300 to BSEG-XREF1 (Refernce Key 1).
    The said step didn;t seem to work.  I was able to post a document and then I displayed the document.  Unfortuantely, BSEG-XREF1 hasn't been modified. So,  I tried debugging the form U300.  It doesn't stop inside that form, which means the logic that i put there was useless. By the way, the the formname that Im using can be found in two internal tables: (1) exits, and (2) etab.
    Kindly advise on what to do.   Thank you very much!
    <b>Best Regards.
    Brando</b>

    Check this sample code which i've used to substitute the field BSEG-ZUONR
    Also ensure that the callup point in <b>OBBH</b> is 2
    Don't forget to attach ur <b>ZRGGBS000</b> to the application area <b>GBLS</b> in the tcode <b>GCX2</b>
    FORM get_exit_titles TABLES etab.
      DATA: BEGIN OF exits OCCURS 50,
              name(5)   TYPE c,
              param     LIKE c_exit_param_none,
              title(60) TYPE c,
            END OF exits.
      exits-name  = 'U102'.
      exits-param = c_exit_param_field.
      exits-title = text-101.           " Ship-to-Party to Assignment field
      APPEND exits.
      REFRESH etab.
      LOOP AT exits.
        etab = exits.
        APPEND etab.
      ENDLOOP.
    ENDFORM.                    "GET_EXIT_TITLES
    FORM u102 USING zuonr TYPE bseg-zuonr.
      bseg-zuonr = <value>.
    ENDFORM.

  • Modify the value of a cell in an ALV. Rewarding points.

    Hello Gurus, i am modifying the value of a certain cell in the internal table that is displayed in the ALV using the data_changed event, but when i refresh the ALV the values shown are the old ones.
    Help.

    Hello Ioan
    Unfortunately you do not explain you scenario clearly enough. Therefore I must do some speculations.
    You have an editable ALV list. The user can change data but not field USNAMECH which might be the user who changed the data.
    A big question is how the CHECK_DATA_CHANGED event is raised. Perhaps you have registered the EDIT event (method REGISTER_EDIT_EVENT). Then the scenario would look like this:
    1. User changes data and pushes the ENTER button.
    2. Since the EDIT event is registered this triggers event CHECK_DATA_CHANGED.
    3. In event handler method ON_DATA_CHANGED you enrich the changed data with the name of the current user.
    4. And now you need to push this data back to your ABAP.
    If this is your scenario then just trigger PAI from within your event handler method ON_DATA_CHANGED:
    METHOD on_data_changed. "xxx
           modify itab index mod_cells-row_id from wa_itab transporting USNAMECH disponibilrag.
              "CALL METHOD grid->refresh_table_display.
      CALL METHOD cl_gui_cfw=>set_new_ok_code
        EXPORTING
          new_code = 'DUMMY'
    *    IMPORTING
    *       rc =
    ENDMETHOD.
    MODULE USER_COMMAND_nnnn PAI.
      CASE gd_okcode.
        WHEN 'BACK'  OR
                   'EXIT'     OR
                   'CANC'.
          set screen 0. leave screen.
        WHEN 'DUMMY'.
    "  Do nothing here or perhaps call method:
    " CALL METHOD grid->refresh_table_display
    " Yet should not be necessary.
        WHEN others.
        ENDCASE.
    ENDMODULE.
    Regards
      Uwe

  • Modify the value of the primary key...

    Hi all,
    I have made a mistake in the design of the table......
    and it is too late to get it changed....
    I have set the wrong field as primary key...
    These fields (keys) need to be modify , since i ve set it as a key, when ever modify those fields using
    "MODIFY ZTABLE VALUE INT_TABLE . ", it create a new row into the table because i change the primary key value. Using "UPDATE ZTABLE ....." it doesnt works because the key's value has changed.
    Thank you very much friends...

    Hi Wong,
    If the primary key value does not exist then MODIFY statement creates a new record and if exists it modifies(updates)...
    So better change the Table Primary key and try to reapeat u r code...
    For changing the primary key just goto SE11 and just check the primary key which  u want to assign and uncheck the preivous one ( make sure the primary key on to first line) then save it and before activating goto<b> Utilities --> Database Utility --> activate and adjust database</b>
    Now u r table is activated without deleting previous data also...
    Regards,
    Sridhar

  • Modifying the value of the line selected

    Hi Experts,
    Iam writing a ALV report , In which the basic list displays the values some thing like this
    MateriaNumber   Quantity
    10                      50
    Now my requirement is when when i click on this line i need to change the quantity , and the changed quantity needs to reflected in the secondary list
    I know how to use modify current line ,but i guess it is used only for simple list and not for ALV
    Can any one help me out with this
    Thanks a Lot in Advance...

    Hi,
    1) use event HOTSPOT_CLICK of cl_gui_alv_grid
    2) when user clicks, in your handle_htospot_click method change the value in the list and refresh it with REFRESH_TABLE_DISPLAY
    3) then when ALV has already new value, in the same handling method implement your logic with detailed list and display it
    or
    3) write another method which will use DATA_CHANGED_FINISHED event and after refreshing the list use this method (will be called after data in alv has changed) and provide your detailed list.
    That's it
    M.

  • Modify the value date

    Hi
    can anyone help me out... after document posting in f-02... when i try to change the value date ie in fb02.. its not allowing me to change the value date...
    thanx in adv

    Hi,
         May be if you change the Field Status put a value date is a required to optional thru transaction code OBC4 and same way you will do posting key field status also optional thru transaction code ob41.
    REgards,
    Satya

  • Can't be modify the value of window.event.keyCode in IE 11(Windows 7 Premium) where as in IE 8 (Windows XP) its working fine

    The following is the sample code whcih I have used to check.<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Sample Form</title>
    <script type="text/javascript">
    function keyDownEvent() {
    alert("KD:"+window.event.keyCode);
    window.event.keyCode=0;
    alert("KD:"+window.event.keyCode);
    function keyPressEvent() {
    alert("KP:"+window.event.keyCode);
    window.event.keyCode=0;
    alert("KP:"+window.event.keyCode);
    </script>
    </head>
    <body>
    <form>
    <input type="text" onkeydown="keyDownEvent()" onkeypress="keyPressEvent()" />
    </form>
    </body>
    </html>
    Kindly post your answers, am waiting for answers...

    This is the TechNet Forum for questions regarding
    Internet Explorer 8, 9, 10, 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions.
    For better assistance please ask for help in the MSDN
    IE Development Forums.
    Thanks & Regards,
    Vincenzo Di Russo
    Microsoft® MVP Windows Internet Explorer, Windows & Security Expert - since 2003.
    Moderator in the Microsoft Community and TechNet Forums
    My MVP Profile

  • How to avoid to modify the input value in a query

    Hi expert,
    in a Bex query (vers. 7.1), I created an auth variable on 0sales_off object to limit the display of data on a specific agency and it works right!
    But the user can anyway modify the enter value and insert manually another agency into a filter or into the start selection, and even if in this case the query result is not displayed (cause to auth variable), I'd like that the user cannot modify the value authorized agency.
    The auth. variable is set as single value, optional and ready for input and I cannot make the variable as invisible for the start input, because there are users authorized to enter any values without restrictions​​.
    is there a solution for my issue?
    Thanks for your support.
    Claudia

    Hi Claudia,
    I think you will not have any other option as you need to show the variable for specific users and still you need it to accept input.
    As I know you can not hide the variable display for specific users.
    Regards,
    Durgesh.

  • Modify or restrict the  Value Set attached  to DFF in OAF

    How to add where condition programatically to a valueset attached to a DFF
    For eg: query in the value set is "(select LINE_NUM,po_header_id,po_line_id from po_lines_all )"
    Framework adds a select clause with the column mentioned in the DFF segment on top of this query ,Is there any other way to modify the Value set query?

    Thanks for the Reply Saneep,
    I have a value set attached to DFF and the dff will appear in PO headers page , Query on value set is
    select ood.organization_id,ood.organization_name,ood.operating_unit from org_organization_definitions ood,mtl_parameters mp where ood.organization_id=mp.organization_id) a
    I need to add where condition of the query attached to value set,
    but framework is provides the below query at run time
    select fnd_number.number_to_canonical(a.organization_id) FLEX_ID , a.organization_name FLEX_VALUE , a.organization_name FLEX_DISPLAY from (select ood.organization_id,ood.organization_name,ood.operating_unit from org_organization_definitions ood,mtl_parameters mp where ood.organization_id=mp.organization_id) a where (1 = 1) and 'Y' = 'Y'
    Is there any other way to add condition to valueset at run time?

  • Having problem to get the value from radio button

    i am doing my double module project for my degree course and i am also a newbie in JSP. Hope there is someone can help me to solve this problem. Now, i set the value of a radio button to "don't smoke", "smoke lightly", and "smoke heavily". Then i use request.getParameter ("smoking behavior") to get the value selected by the user, but the result is only "don't" or "smoke", which the character after spacing will be not be retrieved. I dun know how to solve it, so can any expert here help me to solve this problem? Thanks for helping.

    Why do you have to use whitespace. If your radio button group is name smokingBehavior - no whitespace, wouldn't it just make sence to have values of don't, lightly and heavily. This would solve the problem easily. If your teacher is being a pain in the a&!, and requires you to use whitespace for your naming variables I guess you could insert %20 between the two words and unescape the value on the server side. This seems like a lot of unnecessary work and a silly solution - good luck!

  • Cannot get the value after space

    i am doing my double module project for my degree course and i am also a newbie in JSP. Hope there is someone can help me to solve this problem. Now, i set the value of a radio button to "don't smoke", "smoke lightly", and "smoke heavily". Then i use request.getParameter ("smoking behavior") to get the value selected by the user, but the result is only "don't" or "smoke", which the character after spacing will be not be retrieved. I dun know how to solve it, so can any expert here help me to solve this problem? Thanks for helping.

    You can't use spaces in passed parameters; either give your options numerical values that you can translate on the receiving end, or do an URLEncoder.encode() on the values before submitting them. If you encode them, you'll do an URLDecoder.decode() on them on the receiving end.
    URLEncoder.encode("don't smoke") = "don%27+smoke"
    URLDecoder.decode("don%27+smoke") = "don't smoke"

  • To modify field value in a transparent table

    how would i modify the value of a field in a transparent table? my data is from internal table. while im looping in the internal table the data goes to the first record of the table not on the right record.
    what wrong with  my code?
    loop at i_tble.
      wa_tble = i_tble.
      select single angnr
      into i_angnr
      from ekko
      where ebeln eq wa_tble-ebeln.
      ekko-angnr = wa_tble-angnr.
      modify ekko.
    endloop.

    Hi,
    I am sorry but I didn't understand the purpose of this code. You are reading in a field value of ANGNR from EKKO and you want to update the same record again with the same value? Why?
    <b>Secondly, you should never update any SAP table directly like that</b>.
    Now for the reason why your update is updating the first record always.
    Your 'modify ekko' should be modified as
    MODIFY ekko TRANSPORTING angnr WHERE ebeln = wa_tble-ebeln.
    Please reward and close the post if answered.
    Regards,
    Srinivas

  • How to get the value entered in input enabled field of a list output?

    Hi all,
    I am developing a program to display  list with two input enabled fields . After users enetered the values into these fields I need to do some calculations based on these values and modify the value of another field in the list.
    But i couldn't have an idea how to read the values after users enter into these fields.
    Please help me on solving this problem?  If possible please provide the sample code.
    Thanks,
    Aravind.

    You can enable disable screen fields in at selection screen output event.
    And by using loop at screen.
    And for changing the values you can do in initialization event.
    I Hope you are doing these in Reports.

Maybe you are looking for

  • Error creating a Web Service. Help!

    Hi, I'm triying to create a web service but when I try to test it or execute, it gives me this error: ORA-20001: The webservice was unreachable because either the URL you supplied was invalid, your environment requires a valid proxy server address fo

  • X240 hangs on windows 7 boot @ desktop

    So brand new x240, got it monday.   i dont think this is isolated to this particular x240 but i seem to have these issues on all my lenovo x/t-series.   Saw it on x200/201/220/230 and now x240 Basically I get these machine, build a reference image wh

  • Hard Drive writing Issue.

    Hi, I'm not sure if I'm in the correct forum, but I'm hoping someone can help. I think I've pinpointed the reason why my IMac is slowing. When i download large files, or record a movie through my iSight camera, i noticed in both situations, that the

  • Report on Deleted Parked AR Documents with 'Z' status

    Hello Experts, Any suggestion to obtain the list of deleted parked AR documents which did not get posted in the past.  We created AR documents and were not sure about VAT treatment and were parked but later managed to invoice the customer separately.

  • Will Wireless Printing Upgrade Kit support All-in-one Printer F4235?

    I have not found this information in the forum, I hope someone will be able to help me. I purchased a Wireless Printing Upgrade Kit and I'm not sure if it is compatible with my printer. I have an all-in-one F4235. The list on the box does not list th