Values getting changed as if by reference

I have a situation where the values in the object is changed when its not supposed to
Here is the sample of my code
WOWSurvey newPrevSur = new WOWSurvey(); // i have defined newPrevSur
newPrevSur.setDocumentTypeCode("xxxxxxx"); // I am setting an attribute
WOWSurvey survey = (WOWSurvey) result.getReturnedObj();
newPrevSur = (WOWSurvey) result.getReturnedObj();
if ((survey instanceof WOWSurvey) && (newPrevSur instanceof WOWSurvey))
System.out.println("survey is instance of WOWSurvey"); //this is true
wowSurveyUpdateBean.setWowSurvey( survey );
wowSurveyUpdateBean.setPrevSurvey( newPrevSur );
newPrevSur.setDocumentTypeCode("yyyyyy");
The moment the final statment is executed, the value "yyyyy" is changed in both newPrevSur, survey and wowSurveyUpdateBean survey( set by setWowSurvey method ), prevSurvey(set by setPrevSurvey method )
Is there anything I am missing in this ?
If you find some of this statments redundant or meaningless, I have added them to show its behaviour.
I am using VAJ3.5 and WTE
Please help. Thanks in advance
lareds

public String rotatel(s,n){
if(n=0) return s;
s=subString(1)+s.charAt(0);
rotatel(s,n-1)
I think this program is wrong for what my professor says it does. It needs to be recursive and that it is, but I cant see where it takes a word like hello and prints elloh
llohe
lohel
ohell
Get the point. I dont think my teacher did this problem correctly or either im not gettin it.I feel stupid.
I also need to print the multiples of m up to (m*n) using recursion.
I can do all this but someone give me some confidence that im doin it right.

Similar Messages

  • Condition value getting changed when open the Sales order in VA02

    Hi Experts,
    i have creating Sales order manually in VA01, and for first line item of sale order, i have assigned value in custom field of additional tab B, to populate Condition value for condition type ZK01 and checked in VA02, VA03 same Condition value is there for condition type ZK01.
    And created delivery document and billing document for newly created Salesorder.
    When i have open the Sales order in VA02, then i am getting changed Condition value for conidition type ZK01 in bothe header and first line item and in VA03 there is no change in value.
    Kindly let me know the user exit or any related programs to this issue.Thanks in Advance.

    Hi Rajani,
    this sound like VOFM -> conditions. Do you know which conditions are active during the determination?
    Cheers,
    Stefan.

  • Condition Type - Values getting changed at billing

    Hii All
    I have a header condition which is set up as group condition at header level. When an amount is entered at the header level it gets proportionately distributed among the line items. This is fine.
    Problem comes when a line item is completely shorted (i.e. delivery quantity becomes 0) then in the billing the header condition value also get reduced.
    What setting needs to be done so that the header condition value does not get affected.
    Current setting of condition type is as follows:
    Condition Class: A
    Calculation Type: B
    Condition Category: Blank
    Copy Control from delivery to billing is marked as 'G'
    Pls do let me know if there is a feasible solution for the same.
    Many Thanks
    Gaurav Manocha

    Dear customer,
    What you are experiencing with Fixed Amount Header conditions is stand-    
    ard behaviour. Please see below Notes:                                     
    876617 FAQ: Header conditions / Header condition screen                    
    317112 Behavior of conditions w/ calculation rule B changed                
    485740 Conditions with fixed amount in copy activities                                                                               
    To achieve what you wish (absolute amount), solution is in the below       
    Notes:                                                                     
    84605 Transfer absolute amount condition to billing doc.                  
    25020 Value changes during over/underdelivery                             
    25144 Freight conditions during milestone billing                         
    But I guess that there are many threads with the same problem.
    At first please search for old threads and solutions.
    I hope that the information are helpful.
    regards
    Claudia

  • Value getting changed after data loading.

    Hi experts,
    Two Issues:
    1.We have a dso2 populating from another dso1.
    In dso2 we have a char X which is populating from two key figures Y and Z through a formula in
    transformation such that X = Y/Z.
    After loading data when checked in the cube for X for the value 10190 it is showing as 1.019E+04.
    What should i do if I want the value to be displayed as 10190 in the cube or query level ?
    2.Suppose I am creating a query on a cube.
    For a keyfigure i am creating a New selection.I dragged the keyfigure and i am restricting it with a char
    say Doc_num.Suppose this doc_num has values 1001,1002,1009 etc.
    But I want to restrict with values which are not there in the cube say 1000 to 1010.
    1000 and 1010 are not there in the cube. But I want to use them for restrictions in the future purpose.
    How can we get these values ?
    Regards,
    Nishuv.

    Hi.....
    1.U hav to use Alpha conversions for this.......(Alpha conversion routine in the general tab page of the infoobject X)
    Check this......
    Re: Alpha conversion
    2. It does'nt matter whether the value exists in the cube or not..........bcoz characteristic means master data.......and master data will never contain in the cube........it will be in the infoobject........Extended Star schema concept...........but to give the selection...........u hav to maintain these value in the Master data table.............
    Regards,
    Debjani.....

  • Batch Classification Values not getting changed

    Hi Gurus,
    I am using the following bapi ( BAPI_OBJCL_CHANGE ) to change Batch classification values Eg: Cut clarity etc.
    when i pass these values thru the function module in the program it is not getting changed while when i change it through msc2n it gets changed successfully...
    I have passed the following values in the parameters of the bapi :
    OBJECTKEY            = v_objectkey          
    OBJECTTABLE        = 'MCH1'          
    CLASSNUM             = V_CLASSNUM 
    CLASSTYPE           = '023'
    KEYDATE                = 30.04.2010
    ALLOCVALUESCHARNEW
    CHARACT = CLARITY
    VALUE_CHAR =  P040
    VALUE_NEW   = P040.
    Can some one help me solve this....
    Needed urgently..
    Edited by: NAVIN FERNANDES on Apr 30, 2010 12:31 PM
    Edited by: NAVIN FERNANDES on Apr 30, 2010 12:32 PM

    Hi Jacky,
    I am posting the code here.. Do let me know if u have ne queries:
    REPORT  ZNAVBATCH.
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    PARAMETERS: P_MATNR TYPE MATNR,
                P_CHARG TYPE CHARG_D,
                P_WERKS TYPE WERKS_D,
                P_LGORT TYPE LGORT_D.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
      DATA: WA_BATCH TYPE BAPI1003_OBJECT_KEYS,
            WA_ALLOCCHAR TYPE BAPI1003_ALLOC_VALUES_CHAR,
            WA_ALLOCVAL TYPE BAPI1003_ALLOC_VALUES_NUM,
            INT_BATCH TYPE STANDARD TABLE OF BAPI1003_OBJECT_KEYS,
            INT_RET1 TYPE STANDARD TABLE OF BAPIRET2,
            INT_RET2 TYPE STANDARD TABLE OF BAPIRET2,
            INT_RET3 TYPE STANDARD TABLE OF BAPIRET2,
            LV_KEY TYPE BAPI1003_KEY-OBJECT,
            INT_ALLOCVAL TYPE STANDARD TABLE OF BAPI1003_ALLOC_VALUES_NUM,
            INT_ALLOCCHAR TYPE STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CHAR,
            INT_ALLOCCURR TYPE STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CURR.
      WA_BATCH-KEY_FIELD = 'MATNR'.
      WA_BATCH-VALUE_INT = P_MATNR.
      APPEND WA_BATCH TO INT_BATCH.
      WA_BATCH-KEY_FIELD = 'CHARG'.
      WA_BATCH-VALUE_INT = P_CHARG.
      APPEND WA_BATCH TO INT_BATCH.
      CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
        EXPORTING
          OBJECTTABLE    = 'MCH1'
        IMPORTING
          OBJECTKEY_CONC = LV_KEY
        TABLES
          OBJECTKEYTABLE = INT_BATCH
          RETURN         = INT_RET1.
      IF SY-SUBRC = 0.
       WRITE: 'SUCCESSFUL'.
        CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
          EXPORTING
            OBJECTKEY              = LV_KEY
            OBJECTTABLE            = 'MCH1'
            CLASSNUM               = 'ZTBATCHCHR'
            CLASSTYPE              = '023'
            KEYDATE                = SY-DATUM
          UNVALUATED_CHARS       = ' '
          LANGUAGE               = SY-LANGU
        IMPORTING
          STATUS                 =
          STANDARDCLASS          =
          TABLES
            ALLOCVALUESNUM         = INT_ALLOCVAL
            ALLOCVALUESCHAR        = INT_ALLOCCHAR
            ALLOCVALUESCURR        = INT_ALLOCCURR
            RETURN                 = INT_RET2
        IF SY-SUBRC = 0.
          WRITE : 'SUCCESSFUL'.
          READ TABLE INT_ALLOCCHAR INTO WA_ALLOCCHAR WITH KEY CHARACT = 'CLARITY'.
          IF SY-SUBRC = 0.
            WA_ALLOCCHAR-VALUE_CHAR = 'C02'.
            WA_ALLOCCHAR-VALUE_NEUTRAL = 'C02'.
            MODIFY INT_ALLOCCHAR FROM WA_ALLOCCHAR INDEX SY-TABIX TRANSPORTING VALUE_CHAR VALUE_NEUTRAL.
          ENDIF.
          CALL FUNCTION 'BAPI_OBJCL_CHANGE'
            EXPORTING
              OBJECTKEY                = LV_KEY
              OBJECTTABLE              = 'MCH1'
              CLASSNUM                 = 'ZTBATCHCHR'
              CLASSTYPE                = '023'
             STATUS                   = '1'
             STANDARDCLASS            =
             CHANGENUMBER             =
             KEYDATE                  = SY-DATUM
             NO_DEFAULT_VALUES        = ' '
           IMPORTING
             CLASSIF_STATUS           =
            TABLES
              ALLOCVALUESNUMNEW        = INT_ALLOCVAL
              ALLOCVALUESCHARNEW       = INT_ALLOCCHAR
              ALLOCVALUESCURRNEW       = INT_ALLOCCURR
              RETURN                   = INT_RET3
          IF SY-SUBRC = 0.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
               WAIT          = 'X'
            IMPORTING
              RETURN        =
            IF SY-SUBRC = 0.
              WRITE: 'SUCCESSFUL'.
            ENDIF.
          ENDIF.
        ENDIF.
    ENDIF.

  • Value of specifications gets changed in UD

    Dear gurus,
    While doing the result recording  against characteristics , speciafications are maintained for example  Outer diamter is a  characteristics  OD  for which  specifications is maintained between   say 100 mm to 200 mm,  and the result is 150 mm
    While doing the Usage decision,  The value of specifications get changed to some other values other  what is maintained
    please help.
    Thanks in advance
    regards

    Dear in standard SAP it's not possible there might be someone have changed the results.Please check the history of inspection lot results.
    Cheers
    KK

  • Editable ALV- Quantity field value is getting changed while double clicking

    Hi all,
         I have created Editable ALV grid using Class concepts. Quantity field is editable in dat. but after changing value and if im double clicking on that field, value is getting changed. eg: 45 is changing to .045. How can i resolve this problem.
    Could u plz help.

    Hi Anu,
    One question from my side.
    U have displayed the ALV.In that grid u have quantity field.U have changed the value of that field to 45.
    When u press enter the value has been changed to .045.Is this u r problem.
    U can do onething anu.
    Declare one varaible with the local field.
    Pass u r quantity field value into that variable.
    While displaying thriugh SET_TABLE_FIRST_DISPLAY in your internal table pass this variable.
    It will solve u r problem.I think.
    Let me if yu have any problem
    IF u want u can refer to the program BCALV_EDIT* in se38.
    There also u have needful info
    Thanks,

  • Drop down field in ALV values not getting changed

    Hi All.
    I have created an  drop down by key in ALV and I am initialising and filling the values in drop down in Modify view.
    When I am executing the application for the first time the values fill in fine in the drop down. However based on user selection the value in drop should changed. Keep in mind all the rows added in ALV should show the same values in drop down.
    Now the issue is when ever user changes the value but the drop values which were set initially does not changes.
    In other words if user selects supplier A the values for all rows in drop down shows as
    A
    B
    C
    But if user selects supplier B the values for all rows in drop down should changed to 
    X
    Y
    Z
    unfortunatley it still shows values as A,B,C .
    I have checked while debugging and values are changed based on condition but when I set them back in ALV using set_attribute_value_set it does not shows the new values.

    Hello Shakthi,
    The easier option would be to convert the DropDownByKey to DropDownByIndex. If you still want to proceed with DropDownByKey then you need to initialise the ALV data again.  do the following
    1. after changing the attribute-value_set, call the ALV interface controller method SET_DATA and pass the instance of the context node.
    2. reintiliase all the ALV settings like edit mode, converting the column editor to DropDownByKey etc....
    This will ensure the new attribute value set is reflected in the ALV component.
    BR, Saravanan

  • SD : Ship to party and bill to party address getting changed in sales order

    Dear All ,
    We are facing a problem in production client regarding Ship to party and bill to party address getting changed at the sales order level. First of all , i would like to discuss the sales business process in which the problem is getting faced.
    Step 1 : The sales order is created for machine with all relevant details and the ship to party and bill to party address is changed as per the business requirement.
    Step 2 : The outbound delivery is created with reference to sales order.
    Step 3 : The commercial invoice, intercompany invoice and excise invoice is created.
    Step 4 : The Credit memo request is created with reference to commercial invoice no.
    Step 5 : The Credit memo is created.
    Step 6 : The FOC value contract is created with reference to credit memo.
    Step 7 : The FOC release order is created with reference to value contract, where ship to party and bill to party address is changed as per requirement.
    Step 8 : Outbound delivery is created for realse order.
    Step 9 : The FOC invoice is created.
    The problem is the moment we change the address in step 1 , the system gets in manual mode. Hence, whenever Bill to party and ship to party address is changed at Step 7, the same gets replicated at the machine invoice level which is incorrect.
    Please comment / reply ASAP.
    Regards.

    During the manual change if you  want to assign a new address number (which
    prevents the changing of the address in the preceding document),
    you can use Note 97832 (modification).

  • How to get changed data in ALV in Web Dynpro for ABAP

    METHOD on_data_check .
    DATA:
        node_spfli                          TYPE REF TO if_wd_context_node,
        node_sflight                        TYPE REF TO if_wd_context_node,
        itab_sflight2                        TYPE if_display_view=>elements_sflight.
      node_spfli = wd_context->get_child_node( name = if_display_view=>wdctx_spfli ).
      node_sflight = node_spfli->get_child_node( name = if_display_view=>wdctx_sflight ).
      CALL METHOD node_sflight->get_static_attributes_table
        IMPORTING
          table = itab_sflight2.
    this code is ..get all data(changed and not changed)
    but i want get changed data only, not all data.
    how to get changed data?
    Edited by: Ki-Joon Seo on Dec 27, 2007 6:04 AM

    Hi,
    To get only the changed data in the ALV grid of a WD, you need to capture the "ON_DATA_CHECK" of the ALV grid.
    To this please do the following in the ALV initialization of the ALV table settings :
        lr_table_settings->set_data_check(
                IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CELL_EVENT ).
    You may also do this:
        lr_table_settings->set_data_check(            IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CHECK_EVENT)
    The above two ways would depend on when do you need to check for the changed data. If you want to check the data as soon as it is entered, then use the first method. Else, use the second method.
    You need to register an EVENT HANDLER for this event.(You may do this in your VIEW or Component Controller).
    In this Event handler, you would find an importing parameter R_PARAM which is a ref type of      IF_SALV_WD_TABLE_DATA_CHECK.
    The attribute T_MODIFIED_CELLS of this interface IF_SALV_WD_TABLE_DATA_CHECK will contain the modified cells of the ALV with the old & new values.

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How does an NSTextField know that it's value has changed?

    I have a textfield that can either be edited by hand, or set through another control. (It's a page number, so you can jump to page 16 by typing in 16, or you can page up and down with the next/prev buttons) I have the value of the text field bound to an int page variable.
    It seems to work correctly, when you type a page number in, it jumps, when you page up and down, the page number in the text box changes appropriately.
    However, at some level, when I page up and down, the text box doesn't seem to know that it's value has changed, because if I type 1 it doesn't do anything. It doesn't call the bound set-method or anything. It looks like the textfield is thinking "I'm already 1, so I don't need to do anything." Even though it was 5 because I hit next 4 times. If I type an number other than 1, it goes there. If I THEN type 1, it goes to page 1, because now it thinks it's on that other page.
    The problem seems to be that I'm changing the value of the textfield programatically, but some part isn't getting the message.
    Does this seem like a reasonable explanation? And either way, any ideas on what's causing it?
    thanks

    Solution: in order for the textfield to behave properly, I need to do everything through the bound instance variable.
    The problem was that the "page" instance variable doesn't actually exist, there's a page method and a setPage method, but the actual page is kept elsewhere. When I make sure to call the setPage method from the next/prev code, it seems to work.

  • How to tell if column value has changed for use in workflow actions

    Hello,
    I am using Sharepoint 2010 and for one of my Lists, I am using a general list workflow.  What I need to be able to do is determine if a column value has change (say an "Assigned To" field) because I only want to take some action if that particular
    value has changed.  I want to be able to have a workflow action that would be something like:
    If Current Item: Assigned To not equals [OLD VALUE]
    I have found some web searches that talk about creating a duplicate list or duplicate (but hidden) column but that doesn't seem to be the way to go.  I have document versioning set but don't if that can be used to help with this.  One possible
    thought (although I haven't tried it to see if it works) is to create local variables and have the values in the variables be the "old value".  Just not sure if there is a best practices for doing this.
    Thanks for any thoughts - Peter

    Helen,
    Not sure I fully understand your goal.  We don't use "tasks" at all but if you are looking to have your workflow check certain valus and be able to send email messages to people based on whatever, then you can certainly do that (as long as your Sharepoint
    has the email setup.  We do this for alot of workflow tasks.
    So, in the workflow you can have a blanket statement like what I previously listed:
    if Current Item:hiddenStatus  not equals Current Item:Status
        .... do something
    or you can do something like:
    if Current Item:hiddenStatus equals "In-Progress"
        .... do something
    Else if Current Item:hiddenStatus  equals "Completed"
        .... do something
    or combine the two and do nested "if" statements.  Then you add an email statement wherever you need it like:
    if Current Item:hiddenStatus  equals "Completed"
       then email "these users"
    To add the email part, just type in "email" on the line where you want to add a statment.  There is only one option to choose from.  That will display the line "then email these users".   The "these users" will be a link.  When you
    click it you will get a popup to add the email info.  We typically will send the email to a user (or users) that are already listed in one of the PeoplePicker fields.  On the email form, you can type in your own text, designate that a value is based
    on a column value (like our PeoplePicker), designate that a value is based on a workflow variable, add a link to the current item, etc.  To get to these options you will click the button to the right of the fields or use the "Add or Change Lookup" button
    in the bottom-left for the text area.  There is alot you can set in the mail.
    Does this help answer your question?
    - Peter

  • Cant able to see new value and old value for change in purchase order text

    Hi all ,
    I am not able to see changes done in material's purchase order text in material master. When i use tcode MM04 to see changes done material master it does not report new and old value for change if it is done in purchase order text of that material .
    Thanks in advance  ,
    Shikha

    Hi Shikha,
    I'm not sure it works or not. But you can try SCU3 t.code and table DBTABLOG. May it can help you out.
    I also faced this type of issue in Plant data and it get resolved.
    Try and let me know...
    Regards
    Sunil Sisodia

  • How to get changed by ID in sales order?

    Hi all,
    In table VBAK, I can only find the created by field. How can I get changed by person? Why the last changed by didn't stored in VBAK?
    I can find changed by in change history of S/O. I only want the last changed by, how can I get?
    Best Regards
    Jean

    Hi Jean,
    You can use the following FM's to get the required information.
    CHANGEDOCUMENT_READ_HEADERS
    CHANGEDOCUMENT_READ_POSITIONS
    In FM CHANGEDOCUMENT_READ_HEADERS for the parameter OBJECTCLAS pass the value 'VERKBELEG' and for the parameter 'OBJECTID' pass the value <order number>.
    If you do a where you list you will get more info of the same.
    Hope this helps
    Cheers
    VJ

Maybe you are looking for