Using == with String object references

Hi,
I understand that using the == operator to compare two String object references in Java will yield false for two different object references even when the contents are the same, and that you are supposed to use the method .equals() instead. However, in my program the == operator actually works for two different object references that point to the same object since it yields true! I don't understand why it works in my program when it shouldn't. Does someone know why?
Thanks!

overrule. wrote:
warnerja wrote:
... unless some sneaky thread jumps in and changes the a or b reference right before the expression (a == b) were evaluated. This would also assume a or b had greater scope than simply local method variables that only one thread could access.
Just being a nitpickCould you provide an example of how that "greater scope" may look like in this case.
* Greater scope.
* @author Cynthia G.
* @see http://forums.sun.com/thread.jspa?messageID=10520796
public class ObjectAssignmentTest {
  static Object a; // outer scope: class variable
  static Object b; // outer scope: class variable
  public static void main(String[] args) throws InterruptedException {
    a = new Object();
    b = a;
    new Thread(new Runnable() {
      public void run() { ObjectAssignmentTest.b = new Object(); }
    }).start();
    System.out.println(a == b ? "equal" : "not equal");
}For the record, this code is not even guaranteed to make the objects unequal with == before their equality is tested; both threads may go in parallel, the main thread first or the modifying thread first!
s

Similar Messages

  • Using intern() with String objects

    Hi, I was wondering if anybody could explain to me more about using the method intern() with String objects.
    Suppose I have a String, say testString1.
    I want to make it uppercase and I would like to refer to it/use it in many places in the code.
    Does using the statement
    testString1.toUppercase().intern()
    put the uppercase testString1 in some kind of a pool? so that everytime I call testString1.toUppercase(), a new testString1 in uppercase is not created each time? Instead it is taken from the pool? Is that how this works?
    I would appreciate a response from anybody who knows about this stuff.
    Thanks.

    No !!!... It doesn't work that way.
    I would recommand you (and anyone alse) not to use String.intern() unless you have a COMPLETE understanding of how it works.

  • HFM EPMA application deployment aborted with error Object reference not set

    HFM EPMA application deployment aborted with error Object reference not set to an instance of an object when trying to validate/deploy any HFM application in EPMA. This has started happending after we have deleted a Dimension in one of HFM applications. The deleted dimension is a shared dimension.
    We are facing this issue in a distributed environment with version 11.1.2.1. This applications are built here newly.
    Following is the error log entry
    16] ERROR Object reference not set to an instance of an object.
    at Hyperion.DimensionServer.CompareCriteria.<>c__DisplayClass5.<GetMemberClassProperties>b__4(Dimension dim)
    at Hyperion.DimensionServer.Library.IterateDimensions(Action`1 action)
    at Hyperion.DimensionServer.CompareCriteria.GetMemberClassProperties(ApplicationClass appClass, DimensionClass dimClass, MemberClass mbrClass)
    at Hyperion.DimensionServer.CompareCriteria.GetCommonMemberClassProperties(RelationshipMember fromMember, RelationshipMember toMember, ApplicationClass fromAppClass, ApplicationClass toAppClass)
    at Hyperion.DimensionServer.CompareMemberEvaluator.CompareProperties(RelationshipMember fromMember, RelationshipMember toMember, ApplicationClass fromAppClass, ApplicationClass toAppClass, List`1 propertyDifferences)
    at Hyperion.DimensionServer.CompareMemberEvaluator.Compare(RelationshipMember sourceMember, Application sourceApp, Application targetApp, Boolean firstPass, Int32 level, Boolean continueCheckingAfterDifferences)
    at Hyperion.DimensionServer.CompareMemberEvaluator.Compare(List`1 sourceTopMembers, List`1 targetTopMembers, Application sourceApp, Application targetApp, Boolean firstPass, Boolean continueCheckingAfterDifferences)
    at Hyperion.DimensionServer.CompareMemberEvaluator.Execute(List`1 fromTopMembers, List`1 toTopMembers, Dimension fromDimension, Dimension toDimension, Boolean continueCheckingAfterDifferences)
    at Hyperion.DimensionServer.CompareDimensionEvaluator.Execute(Dimension fromDimension, Dimension toDimension, ApplicationClass fromAppClass, ApplicationClass toAppClass)
    at Hyperion.DimensionServer.CompareEngine.CompareDimensions(Dimension fromDimension, Dimension toDimension)
    at Hyperion.DimensionServer.CompareEngine.StartCompare()
    at Hyperion.DimensionServer.Validations.HFMApplicationValidation.CheckStaticDimension(Library snapShot, Dimension dim, Application oldApp, String[] skipProperties)
    at Hyperion.DimensionServer.Validations.HFMApplicationValidation.CheckStaticDimensions(Application baselineApp)
    at Hyperion.DimensionServer.Validations.ApplicationValidation.ValidateAgainstBaseline()
    at Hyperion.DimensionServer.Validations.HFMApplicationValidation.InternalValidate()
    at Hyperion.DimensionServer.Validations.ApplicationValidation.Validate()
    at Hyperion.DimensionServer.Validations.ApplicationValidation.<ValidateAsync>b__0()System.NullReferenceException: Object reference not set to an instance of an object.
    at Hyperion.DimensionServer.CompareCriteria.<>c__DisplayClass5.<GetMemberClassProperties>b__4(Dimension dim)
    at Hyperion.DimensionServer.Library.IterateDimensions(Action`1 action)
    at Hyperion.DimensionServer.CompareCriteria.GetMemberClassProperties(ApplicationClass appClass, DimensionClass dimClass, MemberClass mbrClass)
    at Hyperion.DimensionServer.CompareCriteria.GetCommonMemberClassProperties(RelationshipMember fromMember, RelationshipMember toMember, ApplicationClass fromAppClass, ApplicationClass toAppClass)
    at Hyperion.DimensionServer.CompareMemberEvaluator.CompareProperties(RelationshipMember fromMember, RelationshipMember toMember, ApplicationClass fromAppClass, ApplicationClass toAppClass, List`1 propertyDifferences)
    at Hyperion.DimensionServer.CompareMemberEvaluator.Compare(RelationshipMember sourceMember, Application sourceApp, Application targetApp, Boolean firstPass, Int32 level, Boolean continueCheckingAfterDifferences)
    at Hyperion.DimensionServer.CompareMemberEvaluator.Compare(List`1 sourceTopMembers, List`1 targetTopMembers, Application sourceApp, Application targetApp, Boolean firstPass, Boolean continueCheckingAfterDifferences)
    at Hyperion.DimensionServer.CompareMemberEvaluator.Execute(List`1 fromTopMembers, List`1 toTopMembers, Dimension fromDimension, Dimension toDimension, Boolean continueCheckingAfterDifferences)
    at Hyperion.DimensionServer.CompareDimensionEvalua
    There was a bug in earlier releases for deleting dimensions with children, making the children orphans.
    Heard from release notes that it has been fixed, but we are seeing this issue in 11.1.2.1 again.
    Please help us out in resolving this error.

    Hi,
    I always ask this first, have you installed all the planning and epma patches as there have been many issues addressed in 9.3.1
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • BPM SMQ2 in sysfail Access using a 'ZERO' object reference is not possible

    Hi ,
    I am working on a IDOC to SOAP synchronous scenario
    So I am using a BPM....
    I have written a operation mapping outside BPM
    1) Request MM creates the SOAP rquest
    2) Response is a ABAP mapping where i am checking the response from webserice and then generating an email using ABAP code.
    now when i am running this scneario works fine and the mail gets generated...
    however i get a green flag in moni  and in SMQ2 in sysfail Access using a 'ZERO' object reference is not possible
    PS : Also  the response coming from the webserice has a custom header which does not match with the response ABAP mapping source MT
    however if I work on the same thing using Proxy to SOAP sync there is no sysfail message and it works fine
    Is this a bug in the system ...i am using PI 7.1

    Hi,
    Try to implement SAP note 1164228 or apply package SAPKB71007 to resolve your issue.

  • What is the use of passing object reference to itself ?

    What is the use of passing object reference to itself ?
    regards,
    namanc

    There is an use for returning an object reference from itself, for instance:
    class C {
    public:
         C append(C c) {
             // do something interesting here, and then:
             return this;
    }You can "chain" calls, like this:
    C c = new C();
    C d = new C();
    C e = new C();
    c.append (d).append (e);Maybe the OP has "inverted" the common usage, or thought about a static method of a class C that requires a parameter of type C (effectively being a sort of "non-static method").
    class C {
        static void doAnotherThing (C c) {
            c.doSomething(); //-- effectively C.doAnotherThing(c) is an "alternative syntax" for c.doSomething()

  • Error accesing/using a String object.......

    Hi again folks!
    Well now I have other problem, I don?t know what's happening, but I have simple C++ program as shared object which retrieves information from a Database, with the query results it makes a single string with all the data retrieved.
    This C++ program is called by a Java program using JNI, but when my Java program receives the string and tries to parse it with the StringTokenizer object I get an error like this:
    SIGSEGV 11* segmentation violation
    si_signo [11]: SIGSEGV 11* segmentation violation
    si_errno [0]: Error 0
    si_code [1]: SEGV_ACCERR [addr: 0x45cb2448]
    stackbase=DFFFF0A0, stackpointer=DFFFD0CC
    Full thread dump:
    "SIGQUIT handler" (TID:0xdd300190, sys_thread_t:0x42020, state:R, thread_t:
    t@5, sp:0x0 threadID:0xdeaf0dd8, stack_base:0xdeaf0d6c, stack_size:0x20000) prio
    =0
    "Finalizer thread" (TID:0xdd3000d0, sys_thread_t:0x41fb8, state:CW, thread_t
    : t@4, sp:0x0 threadID:0xdebb0dd8, stack_base:0xdebb0d6c, stack_size:0x20000) pr
    io=1
    "main" (TID:0xdd3000a8, sys_thread_t:0x42908, state:R, thread_t: t@1, sp:0x0
    threadID:0x20a18, stack_base:0xdffff0a0, stack_size:0x800000) prio=5 *current t
    hread*
    ObjectFactory.createObject(Compiled Code)
    Test.main(Compiled Code)
    Registered Monitor Dump:
    PCMap lock: <unowned>
    Thread queue lock: <unowned>
    Name and type hash table lock: <unowned>
    String intern lock: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class loading lock: owner "main" (0x42908, 1 entry)
    Java stack lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Has finalization queue lock: <unowned>
    Finalize me queue lock: <unowned>
    Waiting to be notified:
    "Finalizer thread"
    Monitor cache expansion lock: <unowned>
    Monitor registry: owner "main" (0x42908, 1 entry)
    Abort (core dumped)
    I dont know if I have to do something special before use the String, what's happening?
    Any comment will be welcome.
    Thanks in advance.

    I hope this could help to clarify the scenario
    In a previous query I get the number of rows returned by the next query
    this number is stored at SQL_NUM_SEGS.arr variable. When I have the number of rows I reserve memory for the char array that I'm going to return with all the information.
    AC01_TRAMA=(char *)malloc(atol(SQL_NUM_SEGS.arr) * INT02_TAM_SEG);
    /*embedded PL/SQL code*/
    EXEC SQL DECLARE CUR_EMISORA CURSOR FOR
    SELECT rtrim(to_char(NUM_EMISORA)) || '|' || rtrim(SERIE) || '|' || EMISORA || '|' || STATUS FROM NUCL_EMISORA WHERE STATUS NOT LIKE 'BAJA';
    EXEC SQL OPEN CUR_EMISORA;
    The next lines of code generate a string like this:
    "UTIL0000|366|239|93-1|FINASA |VIGE|243|3-90|BONSER |VIGE|248|2-94|BONSER |VIGE|287|970403|GOBFED |VIGE|362|93-4|BANOBRA |VIGE|404|2-90|BONSER |VIGE|407|2-95|FINASA |VIGE|633|95|BANMEXI |VIGE|641|2-94|PROMEX |VIGE|645|1-95|FINASA |VIGE|647|1-96|FINASA |VIGE|660|92|BANORTE |VIGE|677|93-3|BANOBRA |VIGE|678|1-90|BIATLAN |VIGE|736|2-95|BONSER |VIGE|786|1-94|BNCI |VIGE|1007|021024|GOBFED |VIGE|1008|021121|GOBFED |VIGE|"
    this string is assigned to AC01_TRAMA(char pointer)and then I return this string in the next way:
    return ( (env)->NewStringUTF(AC01_TRAMA) );
    My java program is this:
    public class Monitor
    public native String consultaGeneral();
    static
    System.load("/afs/invermexico.com.mx/usr2/salponce/gustavo/jni/src_db/Monitor.so");
    public String getTrama()
         String strTrama=consultaGeneral();
    return strTrama;
    public static void main(String []args)
    String strEmisora, strNumEmisora, strStatus,strSerie;
    Monitor m=new Monitor();
    System.out.println(m.getTrama());
    /*java.util.StringTokenizer STk = new java.util.StringTokenizer(m.getTrama(),"|");
    while(objSTk.hasMoreTokens())     
    strEmisora = objSTk.nextToken();
    strNumEmisora = objSTk.nextToken();
    strStatus = objSTk.nextToken();
    strSerie = objSTk.nextToken();
    System.out.println("\n<------>\n"+ strEmisora+"\n"+strNumEmisora+"\n"+strStatus+"\n"+strSerie);
    }//while
    Well, this java program works fine but if I try to create an String tokenizer with it the program crashes, even if I assign the result into a new String object.
    I'm going to put all the code rigth here
    C++ program
    #include "ast_bd.h"
    #include "Monitor.h"
    #include <stdlib.h>
    #include <stdio.h>
    #include <strings.h>
    #include <jni.h>
    #define CHA01_NOMBRE_APP "UTIL0000"
    #define CHA02_FIN_DE_SEG "|"
    #define INT01_TAM_LONG 20
    #define INT02_TAM_SEG 52 /*52 BYTES; Tama�o de los 4 datos en conjunto*/
    Prop�sito :-Determinar cuales son las emisoras con estado de vigente
    o bloqueado.
    -Obtener los datos de una emisora espec�fica.
    -Actualizar los datos de una emisora espec�fica.
    JNIEXPORT jstring JNICALL Java_Monitor_consultaGeneral
    (JNIEnv *env, jobject obj)
    long LO01_STATUS=1;
    char CH01_NUM_SEGS[INT01_TAM_LONG];
    char AC01_TRAMA, AC02_SEG;
    EXEC SQL BEGIN DECLARE SECTION;
    VARCHAR SQL_NUM_SEGS[INT01_TAM_LONG],
    SQL_RESULT[INT02_TAM_SEG];
    EXEC SQL END DECLARE SECTION;
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    open_db();
    EXEC SQL SELECT to_char(COUNT(1)) INTO:SQL_NUM_SEGS FROM NUCL_EMISORA WHERE STATUS NOT LIKE 'BAJA';
    LO01_STATUS = sqlca.sqlcode;
    if( !LO01_STATUS ) /*si todo sali� bien*/
    strcpy(CH01_NUM_SEGS,SQL_NUM_SEGS.arr);
    CH01_NUM_SEGS[SQL_NUM_SEGS.len]='\0';
    AC01_TRAMA=(char *)malloc(atol(SQL_NUM_SEGS.arr) * INT02_TAM_SEG);
    sprintf(AC01_TRAMA,"%s|%s|\0", CHA01_NOMBRE_APP, CH01_NUM_SEGS);
    EXEC SQL DECLARE CUR_EMISORA CURSOR FOR
    SELECT rtrim(to_char(NUM_EMISORA)) || '|' || rtrim(SERIE) || '|' || EMISORA || '|' || STATUS FROM NUCL_EMISORA WHERE STATUS NOT LIKE 'BAJA';
    EXEC SQL OPEN CUR_EMISORA;
    LO01_STATUS = sqlca.sqlcode;
    if( !LO01_STATUS ) /*si todo sali� bien*/
    do
    EXEC SQL FETCH CUR_EMISORA INTO :SQL_RESULT;
    LO01_STATUS = sqlca.sqlcode;/*Recuperamos el estado de la operacion fetch*/
    if( !LO01_STATUS )
    AC02_SEG=(char *)malloc(SQL_RESULT.len);
    strcpy(AC02_SEG,SQL_RESULT.arr);
    AC02_SEG[SQL_RESULT.len]='\0';
    strcat(AC01_TRAMA,AC02_SEG);
    strcat(AC01_TRAMA,CHA02_FIN_DE_SEG);
    }/*if fetch correcto*/
    else
    LO01_STATUS=1;
    }while(!LO01_STATUS);
    EXEC SQL CLOSE CUR_EMISORA;/*Cerramos el cursor*/
    Si no se recuperaron registros, se indicara en el numero de segmentos
    al inicio de la trama.
    }/*if open cursor*/
    }/*if conteo*/
    puts(AC01_TRAMA);
    return ( (env)->NewStringUTF(AC01_TRAMA) );
    }/*consulta_general*/
    Java programs
    public class Monitor
    public native String consultaGeneral();
    static
    System.load("/afs/invermexico.com.mx/usr2/salponce/gustavo/jni/src_db/Monitor.so");
    public String getTrama()
         String strTrama=consultaGeneral();
    return strTrama;
    public static void main(String []args)
    String strEmisora, strNumEmisora, strStatus,strSerie;
    Monitor m=new Monitor();
    System.out.println(m.getTrama());
    /*java.util.StringTokenizer STk = new java.util.StringTokenizer(m.getTrama(),"|");
    while(objSTk.hasMoreTokens())     
    strEmisora = objSTk.nextToken();
    strNumEmisora = objSTk.nextToken();
    strStatus = objSTk.nextToken();
    strSerie = objSTk.nextToken();
    System.out.println("\n<------>\n"+ strEmisora+"\n"+strNumEmisora+"\n"+strStatus+"\n"+strSerie);
    }//while
    Thank's

  • Help with string object code

    Hello,
    First off thanks in advance to anyone who helps. I am trying to write a program that using a class string object to convert this kind of "text speech" to english. For example if the user inputs "HowAreYou?", I want the program to output "How are you?" I am having too much trouble with strings for some reason. This is what I have so far and I am not sure where to go from here. Should I use a do loop to check through the input string until it is done seperating the words? And how should I go about doing that?
    import java.util.Scanner;
    public class P8
    public static void main( String args[] )
    char choice;
    String line = null;
    String answer = null;
    Scanner scan = new Scanner(System.in);
    do
    System.out.println();
    System.out.print("ENTER TextSpeak sentence(s): ");
    line = scan.nextLine();
    System.out.print( "Converted to English: \t ");
    System.out.print( textSpeaktoEng( line ) );
    System.out.println();
    System.out.print("Want more TextSpeak?\t\t ");
    answer = scan.next();
    choice = answer.charAt(0);
    if( scan.hasNextLine() )
    answer = scan.nextLine();
    }while(choice != 'N' && choice != 'n');
    public static String textSpeakToEng(String s)
    String engStr = null;
    if( Character.isUpperCase( s.charAt(j) ) )
    engStr += ? ?;
    engStr += Character.toLowerCase( s.charAt(j) );
    scan.close();
    }

    I got my program to compile and run but I have a problem. If I input something like "ThisForumIsGreat" it will output just "t f i g" in lower case letters. Any suggestions?
    import java.util.Scanner;
    public class P8
    public static void main( String args[] )
       char     choice;                          // Repeat until n or N                                             
       String line   = null;                     // Sentences to toTextSpeak
       String answer = null;                     // Repeat program scan
       Scanner scan = new Scanner(System.in);    // Read from keyboard
       do
          System.out.println();
          System.out.print("ENTER TextSpeak sentence(s): ");
          line = scan.nextLine();                // Read input line
          System.out.print( "Converted to English: \t    ");
          System.out.print( textSpeakToEng( line ) );
          System.out.println();
          System.out.print("Want more TextSpeak?\t\t ");
          answer = scan.next();                  // Read line, assign to string
          choice = answer.charAt(0);             // Assign 1st character
          if( scan.hasNextLine() )               // <ENTER> character
            answer = scan.nextLine();            // Read line, discard
      }while(choice != 'N' && choice != 'n');    // Repeat until input start n or N
    public static String textSpeakToEng(String s)
       String engStr = null;  
       int i;  
       for ( i = 0; i < s.length(); ++i )
       if( Character.isUpperCase( s.charAt(i) ) )
         engStr += " ";                                  // Append 1 blank space
         engStr += Character.toLowerCase( s.charAt(i) ); // Append lowercase
       return( engStr );
    }

  • Using a string to reference a variable

    hi all,
    i've encountered an interesting scenario where i need to use a string to reeference the value of a variable...the following would show the scenario in a simpler way...
    let's say we have such function called foo:
    void foo(String aString)
    int a = 20;
    int b = 20;
    system.out.println(?????);
    now let's say i run the function as:
    foo("a")
    and i want it to return:
    20
    what should be put to replace those "?????" in my function above?
    please note that variables "a" and "b" are arbitary and so having a conditional statement like the following would NOT be useful:
    void foo(String aString)
    int a = 20;
    int b = 20;
    if (aString.equals("a"))
    system.out.println(a);
    if (aString.equals("b"))
    system.out.println(b);
    thank you very much!

    There are two possibilities here.
    The preferable one, if you have control over the names and nature of the variables, then don't use individual variables - use a Hashtable (or any implementation of Map). Your code would then look something like:void foo(String aString)
        Map table = new Hashtable();
        table.put("a", new Integer(20));
        table.put("b", new Integer(30));
        system.out.println(table.get(aString));
    }The down side to this is that you have to use Integers - Maps can't take primitives.
    If, on the other hand, you have to have variables, then take a look at using reflection. It's more complicated than using Maps, and less efficient, so I would recommend the first technique if possible.
    RObin

  • Casting with a Object reference

    Object tObject;
    tObject = new Date(2000,12,25); //tObject is pointing to a new Date object
    Date tDate = (Date)tObject; // tObject is being cast to a date object, so does it mean that tObject and tDate are pointing at the same Date object
    int tYear = tDate.getYear();
    any help would be great

    Exactly. This won't work:Object anObject = new Object();
    (JPanel) anObject.setLayout(new BorderLayout()); // Wrong!!!!!because casting doesn't create inheritance; it simply informs the compiler of an inheritance (through definition) that should already be there. If it isn't, the compiler won't know about it, but you will get an exception when you try to run it.
    This, however, will work:Object anObject = new JPanel();
    (JPanel) anObject.setLayout(new BorderLayout()); // Right!!!!!because the inheritance you are specifying is really there.
    When you cast, you are in effect telling the compiler something like "this animal is an elephant". The compiler will say "OK, I believe you", but if what you have is really a tiger, prepare to be mauled instead of being given a ride.

  • How to convert from Finder Object reference to POSIX path

    I'm new to AppleScript. I'm super close to getting what I need done, but I've ran across a snag in the middle.
    The error I'm getting is Can’t make quoted form of POSIX path of item 1 of {«class docf» \"filename\" of «class cfol» \"foldername\" of «class cfol» \"Desktop\" of «class cfol» \"Username\" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\"} into type Unicode text. the problem area is highlighted and notated below. I've looked all around online but can't find what I need.
    Thanks in advance for any and all help!
    set text item delimiters to "."
    tell application "Finder"
      set theFilestoChoose to every item of (choose file with prompt "Please select the file(s) you would like to move and rename" with multiple selections allowed) as list
      display dialog "Would you like to move these files to an existing folder and then rename them, or create a new folder and then rename them?" buttons {"Move to an existing folder and rename", "Create a new folder and rename"}
      if result = {button returned:"Move to an existing folder and rename"} then
      set firstnewname to "Aauuttoommaattoorr"
      repeat with index from 1 to the count of theFilestoChoose
      set theFilesChosenbeingrenamedfirsttime to item index of theFilestoChoose
      set filenamecount to text items of (get name of theFilesChosenbeingrenamedfirsttime)
      if number of filenamecount is 1 then
      set fileextension to ""
      else
      set fileextension to "." & item -1 of filenamecount
      end if
      set the name of theFilesChosenbeingrenamedfirsttime to firstnewname & index & fileextension as string
      end repeat
      log theFilesChosenbeingrenamedfirsttime
      set choosingtheplacetomove to choose folder with prompt "Select the folder to move to"
      set thechosenfoldersname to name of folder choosingtheplacetomove -- sets the folder name as text
      set AppleScript's text item delimiters to {"-"}
      set Numberofthemonthatthebeginningofthefoldername to text item 1 of thechosenfoldersname as string -- for later to append the number back on without having to ask again!
      set shortenedname to text item 2 of thechosenfoldersname as string
      set the name of choosingtheplacetomove to shortenedname as string
      set thefolderstemporarynameaslocation to choosingtheplacetomove as string
      move theFilestoChoose to folder thefolderstemporarynameaslocation
      log theFilestoChoose
      set allfilesindestinationfolder to every file in choosingtheplacetomove as alias list --
      set aInitials to the text returned of (display dialog "Whose camera were this/these pictures taken on?" default answer "")
      set filteredList to my filterList(allfilesindestinationfolder, aInitials) as list
      log filteredList
      -- everything above this is correct so far and works perfect
      --TROUBLE SECTION BELOW
      set theSortedfilterList to (sort filteredList by creation date) -- something happens here with the theSortedfilterList that makes it unintelligible to convert to POSIX later. but I need the files in the order that this line puts them.
      log theSortedfilterList
      set timetorenamelasttime to theSortedfilterList
      set newbasename to shortenedname
      repeat with index from 1 to the count of timetorenamelasttime
      set theonefile to item index of timetorenamelasttime
      set theonefilenamecount to text items of (get name of theonetwothreefile)
      if number of theonefilenamecount is 1 then
      set fileextensionone to ""
      else
      set fileextensionone to "." & item -1 of theonefilenamecount
      end if
      tell application "System Events" to set CreaDate to creation date of file theonefile
      set CreaDate2 to CreaDate as text -- need to trim down to the first 10 characters and eliminate the "-"
      set AppleScript's text item delimiters to {""}
      set shorteneddatename to text items 1 thru 10 of CreaDate2 as string
      set the name of theonefile to shorteneddatename & {"-"} & newbasename & {"-"} & aInitials & {"-"} & index & fileextensionone as string
      end repeat
      --Trouble section above
      set the name of choosingtheplacetomove to Numberofthemonthatthebeginningofthefoldername & "-" & shortenedname as string -- returns the month prefix to the foldername
      else if result = {button returned:"Create a new folder and rename"} then
      set repeatConfirmation to true --Boolean to decided if script should be repeated; default is to repeat
      repeat while (repeatConfirmation = true) --Repeat if Any Tests Are Failed
      set thefirstquestion to choose from list {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} with title "Event Month Selection" with prompt "Select the month in which the event started. Select only one month:"
      set theMonthAnswer to result
      if theMonthAnswer = false then --"For historical reasons, choose from list is the only dialog command that returns a result (false) instead of signaling an error when the user presses the “Cancel” button."
      set repeatConfirmation to false
      set exitingeventmonth to display dialog ("You are exiting selecting the event month phase of the program. You will need to manually fix this decision") buttons {"OK"} with title "Exiting Event Month Selection"
      if button returned of exitingeventmonth = "OK" then
      set theMonthAnswer to ""
      end if
      else
      set confirmationanswer to display dialog "You selected " & theMonthAnswer & ", is this correct? " buttons {"Yes, that's correct.", "No, the picture(s) are from a different month."} with title "Confirm Event Month Selection"
      if button returned of confirmationanswer = "Yes, that's correct." then
      set repeatConfirmation to false
      else
      display dialog ("That's okay, you can select another again!") buttons {"OK"} with title "Return to Event Month Selection"
      end if
      end if
      end repeat
      log theMonthAnswer
      if theMonthAnswer = "" then
      set monthtonumber to "You have cancelled this action."
      log monthtonumber
      else if theMonthAnswer = {"January"} then
      set monthtonumber to "01"
      log monthtonumber
      else if theMonthAnswer = {"February"} then
      set monthtonumber to "02"
      log monthtonumber
      else if theMonthAnswer = {"March"} then
      set monthtonumber to "03"
      log monthtonumber
      else if theMonthAnswer = {"April"} then
      set monthtonumber to "04"
      log monthtonumber
      else if theMonthAnswer = {"May"} then
      set monthtonumber to "05"
      log monthtonumber
      else if theMonthAnswer = {"June"} then
      set monthtonumber to "06"
      log monthtonumber
      else if theMonthAnswer = {"July"} then
      set monthtonumber to "07"
      log monthtonumber
      else if theMonthAnswer = {"August"} then
      set monthtonumber to "08"
      log monthtonumber
      else if theMonthAnswer = {"September"} then
      set monthtonumber to "09"
      log monthtonumber
      else if theMonthAnswer = {"October"} then
      set monthtonumber to "10"
      log monthtonumber
      else if theMonthAnswer = {"November"} then
      set monthtonumber to "11"
      log monthtonumber
      else if theMonthAnswer = {"December"} then
      set monthtonumber to "12"
      log monthtonumber
      end if
      set theNameofFoldertoMake to text returned of (display dialog "Please enter the name of the new folder you are creating:" default answer "" with title "New Folder Name")
      set LocationOfNewFolder to choose folder with prompt "Choose the location of the new folder you are creating:"
      set theNewNameofFoldertoMake to monthtonumber & "-" & theNameofFoldertoMake
      set newfolderaction to make new folder at LocationOfNewFolder with properties {name:theNewNameofFoldertoMake}
      move theFilestoChoose to newfolderaction
      end if
    end tell
    --function
    on filterList(allfilesindestinationfolder, aInitials)
      set patterns to {aInitials as string, "Aauuttoommaattoorr"}
      set output to {}
      repeat with aFile in the allfilesindestinationfolder
      repeat with aPattern in patterns
      set filepath to aFile as string
      if filepath contains aPattern then
      set end of the output to aFile
      exit repeat
      end if
      end repeat
      end repeat
      return output
    end filterList

    Okay, so you wanted the debugging and error messages. Thank you for the coaching. Here is what I get from the following line:
    set theSortedfilterList to (sort filteredList by creation date)
    log theSortedfilterList
    Log returns:
    (*document file Aauuttoommaattoorr3.AVI of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk, document file Aauuttoommaattoorr2.MOV of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk, document file Aauuttoommaattoorr1.mov of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk*)
    set pxFile to POSIX path of ((theSortedfilterList) as alias)
    Error: "Can’t make {«class docf» \"Aauuttoommaattoorr3.AVI\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \"Username\" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\", «class docf» \"Aauuttoommaattoorr2.MOV\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \" Username \" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\", «class docf» \"Aauuttoommaattoorr1.mov\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \" Username \" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\"} into type alias." number -1700 from {«class docf» "Aauuttoommaattoorr3.AVI" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk», «class docf» "Aauuttoommaattoorr2.MOV" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk», «class docf» "Aauuttoommaattoorr1.mov" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk»} to alias
    That is why I labeled it with Finder Object reference won’t return POSIX path, because I tried what was suggested about using the POSIX path of line. I thought seeing the lines above and around it would help set the context.
    So I need those files, but I need them sorted by creation date so that they’re in that order for the next renaming step.

  • Access via 'NULL' object reference not possible.

    hi all,
                       i am getting the following error in my application(getting data from 2 data base table and kept in internal table and binding that 2 internal table to two context)
    in st22 i have this.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
         caught in
        procedure "PARSE_XML_DATA" "(METHOD)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        You attempted to use a 'NULL' object reference (points to 'nothing')
        access a component.
        An object reference must point to an object (an instance of a class)
        before it can be used to access components.
        Either the reference was never set or it was set to 'NULL' using the
        CLEAR statement.
    gettong error at line 52.
      24       data: parseerror type ref to if_ixml_parse_error,
      25             str        type string,                         "#EC NEEDED
      26             i          type i,                              "#EC NEEDED
      27             count      type i,
      28             index      type i.
      29       count = parser->num_errors( ).
      30 *      write: count, ' parse errors have occured:'.
      31       index = 0.
      32       while index < count.
      33         parseerror = parser->get_error( index = index ).
      34         i = parseerror->get_line( ).
      35 *        write: 'line: ', i.
      36         i = parseerror->get_column( ).
      37 *        write: 'column: ', i.
      38         str = parseerror->get_reason( ).
      39 *        write: str.
      40         index = index + 1.
      41       endwhile.
      42     endif.
      43   endif.
      44
      45   data l_ref_ixml_elem type ref to if_ixml_element.
      46   l_ref_ixml_elem = l_ref_doc->get_root_element( ).
      47
      48   data l_ref_node_list type ref to if_ixml_node_list.
      49   data l_ref_child type ref to if_ixml_node.
      50   data nodes_index type i value 0.
      51   data l_count type i.
    >>>>   l_ref_node_list = l_ref_ixml_elem->get_children( ).
      53   while nodes_index < l_ref_node_list->get_length( ).
      54     l_ref_child = l_ref_node_list->get_item( nodes_index ).
      55     nodes_index = nodes_index + 1.
      56     l_count = l_ref_child->num_children( ).
      57     if l_count > 0.
      58       me->parse_xml_subnode( subnode                 = l_ref_child index = 0
      59                              with_initial_attributes = with_initial_attributes ).
      60     elseif with_initial_attributes = abap_true.
      61       me->parse_xml_subnode( subnode                 = l_ref_child index = 0
      62                              with_initial_attributes = with_initial_attributes ).
    pls help me
    regards,
    vinoth.

    hi thomas,
                        thanks for ur reply.
    this is my scenario:
    my context:
                        >contract(root node with cardinality 1:1)
                              >mandt_ekko( 1:1)
                                    ebeln
                              >disp_ekko(o:n)
                                   bstyp
                                   lifnr
                             >disp_ekpo(o:n)
                                  ebelp
                                  txz01
    based on ebeln fetched at run time. i have to display ekko and ekpo table details in form.i have fetched values based on that ebeln and put it in 2 internal table from ekko and ekpo table and binded that to context.but  getting error.
    my code:
    method ONACTIONSUBMIT .
      DATA lo_nd_contract TYPE REF TO if_wd_context_node.
      DATA lo_nd_mandt_ekko TYPE REF TO if_wd_context_node.
      DATA lo_el_mandt_ekko TYPE REF TO if_wd_context_element.
      DATA ls_mandt_ekko TYPE wd_this->element_mandt_ekko.
    * navigate from <CONTEXT> to <CONTRACT> via lead selection
      lo_nd_contract = wd_context->get_child_node( name = wd_this->wdctx_contract ).
    * navigate from <CONTRACT> to <MANDT_EKKO> via lead selection
      lo_nd_mandt_ekko = lo_nd_contract->get_child_node( name = wd_this->wdctx_mandt_ekko ).
    * get element via lead selection
      lo_el_mandt_ekko = lo_nd_mandt_ekko->get_element(  ).
    * get all declared attributes
      lo_el_mandt_ekko->get_static_attributes(
        IMPORTING
          static_attributes = ls_mandt_ekko ).
      DATA lo_nd_disp_ekko TYPE REF TO if_wd_context_node.
      DATA lo_el_disp_ekko TYPE REF TO if_wd_context_element.
      DATA ls_disp_ekko TYPE wd_this->element_disp_ekko.
    * navigate from <CONTEXT> to <CONTRACT> via lead selection
      lo_nd_contract = wd_context->get_child_node( name = wd_this->wdctx_contract ).
    * navigate from <CONTRACT> to <DISP_EKKO> via lead selection
      lo_nd_disp_ekko = lo_nd_contract->get_child_node( name = wd_this->wdctx_disp_ekko ).
    * @TODO handle not set lead selection
      IF lo_nd_disp_ekko IS INITIAL.
      ENDIF.
    * get element via lead selection
      lo_el_disp_ekko = lo_nd_disp_ekko->get_element(  ).
    * @TODO handle not set lead selection
      IF lo_el_disp_ekko IS INITIAL.
       lo_el_disp_ekko = lo_nd_disp_ekko->create_element( ).
      ENDIF.
    data: IT_EKKO TYPE standard table of  EKKO,
          lo_nd_snode_1 TYPE REF TO if_wd_context_node.
    select * from EKKO into table it_EKKO WHERE EBELN = ls_mandt_ekko-EBELN.
       if sy-subrc eq 0.
        lo_nd_snode_1 = wd_context->path_get_node( 'CONTRACT.DISP_EKKO' ).
        lo_nd_snode_1->bind_table( it_EKKO ).
    endif.
      DATA lo_nd_disp_ekpo TYPE REF TO if_wd_context_node.
      DATA lo_el_disp_ekpo TYPE REF TO if_wd_context_element.
      DATA ls_disp_ekpo TYPE wd_this->element_disp_ekpo.
    * navigate from <CONTEXT> to <CONTRACT> via lead selection
      lo_nd_contract = wd_context->get_child_node( name = wd_this->wdctx_contract ).
    * navigate from <CONTRACT> to <DISP_EKPO> via lead selection
      lo_nd_disp_ekpo = lo_nd_contract->get_child_node( name = wd_this->wdctx_disp_ekpo ).
    * @TODO handle not set lead selection
      IF lo_nd_disp_ekpo IS INITIAL.
      ENDIF.
    * get element via lead selection
      lo_el_disp_ekpo = lo_nd_disp_ekpo->get_element(  ).
    * @TODO handle not set lead selection
      IF lo_el_disp_ekpo IS INITIAL.
        lo_el_disp_ekpo = lo_nd_disp_ekpo->create_element( ).
      ENDIF.
    data: lo_nd_snode_2 TYPE REF TO if_wd_context_node,
          IT_EKPO TYPE standard table of  EKPO.
    select * from EKPO into table it_EKPO WHERE EBELN = ls_mandt_ekko-EBELN.
       if sy-subrc eq 0.
        lo_nd_snode_2 = wd_context->path_get_node( 'CONTRACT.DISP_EKPO' ).
        lo_nd_snode_2->bind_table( it_EKPO ).
      ENDIF.
    endmethod.
    when i execute got that error.any help highly appreciated.
    regards,
    vinoth.
    Edited by: Thomas Jung on Aug 10, 2009 8:10 AM

  • Help needed to understand String object

    Hi all,
    I want to understand the difference in statements
    new String("") and string declared as "".
    Is this only a shortcut or is there any other difference like re-using the string objects created in the pool?
    what is the value in the String instantiated as new String()
    Thanx

    Hi all,
    I want to understand the difference in statements
    new String("") and string declared as "".
    Is this only a shortcut or is there any other
    difference like re-using the string objects created in
    the pool?
    what is the value in the String instantiated as new
    String()
    ThanxLiteral strings are internalized and reused, whereas new String always creates a new object.
    Thus
    String s = "";
    is better than
    String s = new String("");
    The purpose of the String copy constructor is not made explicit in the API docs, but if you look at Sun's code, you will see that it can serve a purpose:
    Substrings reference the same underlying char array as the String they are a substring of - they just have a different offset into that array, and a different length. The copy constructor however, creates a String with a new underlying char array, that contains only the relevant 'subarray' of the original String' sunderlying char array. So, if your code receives a large String, and then discards that String and passes around a substring of it, you might find you save a great deal of memory by using new String(s.substring(x, y));
    Note however that these comments are based solely on Sun's core API code, and it might not be the case that other vendors implement String the same way, or that Sun will continue to do so into the future.

  • "Object reference not set to an instance of an object." in Visual Studio 2012 Entity Framework Model-First

    Hello
    We're trying to use a Model-First with Entity Framework in Visual Studio, targeting an Oracle XE 11g installation.
    No matter from what angle we're approaching the issue, we always end up with an "Object reference not set to an instance of an object" in Visual Studio:
    First way:
    - Add new ADO.NET Entity Framework Model to a .NET Framework 4.5 project
    - Empty model
    - Add some entities and associations
    - Set Database Generation Workflow to "Generate Oracle Via T4 (TPT).xaml"
    - Set DDL Generation Template to "SSDLToOracle.tt"
    - Generate Database From Model
    - VS asks for DB connection ==> Click "New Connection"
    - Enter the connection properties to the Oracle XE database. "Test Connection" tells me the connection is okay.
    - Click OK. Visual Studio shows the following error message:
    (here's the image if it's not visible: https://dl.dropboxusercontent.com/u/35614983/vs2012_oracle_ef_error.png)
    We also tried to generate the model in VS2010 and then manually transform it to an EF5 / VS2012 model. At the "Generate Database from Model" step, the same error appeared.
    We also tried to generate the model from database (Database-First approach). Same error.
    My configuration:
    - Windows 7 Ultimate 64-bit
    - Installed Oracle client: ODTwithODAC1120320_32bit.zip, so the version is 11.2.0.3.20
    - Visual Studio 2012 Update 3 (11.0.60610.01)
    Thanks for any hints!
    EDIT: I just read that ODP.NET doesn't seem to support Entity Framework 5, so I tried a new project with Entity Framework 4.1, but I get the same errors.
    EDIT 2: On a 32-bit Windows 7 virtual machine, everything works fine. Seems the problem is only there on my 64-bit Windows 7 machine.

    Sorry for the delay on this one. Let me know if you are still seeing this and I will see if we can get more diagnostic info somehow.
    That error is basically an exception fault. It means a bug or a misconfiguration of Oracle Developer Tools. Can you try to reinstall ODT and see if you notice any unusual errors during install.. and see if a reinstall fixes the problem?

  • Access vis NULL object reference.

    Hi experts,
    I have a component having context->node1->usernr
    usernr is one of the attributes in node1.
    node1 has cardinality 0..n
    I have two views, view1 and view2 in the window.
    both the view contexts have mapping with node1 of component controller context.
    View1 has a table that shows usernr as a column and view2 has an inputfield, the value of which is bound to usernr.
    On clicking a button in view1, I am creating an element of node1 and binding it to the node. this os working fine. Also I am firing the outplug of view1 which is connected to inplug of view2.
    I debugged the view2 and it is going upto the HANDLEIN_view2_inputplug
    Then I just get this dump "Access via 'NULL' object reference not possible."
    Error in the ABAP Application Program
    The current ABAP program "CL_WDR_VIEW_ELEMENT_ADAPTER===CP" had to be terminated because it has come across a statement that unfortunately cannot be executed.
    Error analysis
    You attempted to use a 'NULL' object reference (points to 'nothing') access a component (variable: " ").
    An object reference must point to an object (an instance of a class) before it can be used to access components.
    Either the reference was never set or it was set to 'NULL' using the CLEAR statement.
    Information on where terminated
    Termination occurred in the ABAP program "CL_WDR_VIEW_ELEMENT_ADAPTER===CP" -     in "GET_ATTRIBUTE_EXTERNAL".
    The main program was "SAPMHTTP ".
    In the source code you have the termination point in line 10 of the (Include) program "CL_WDR_VIEW_ELEMENT_ADAPTER===CM00Q".
    Source Code Extract
    Line  SourceCde
        1 method get_attribute_external.
        2
        3   data data_container type ref to cl_wdr_data_container.
        4   data attribute type wdr_attribute_pointer.
        5   data client_component type ref to cl_wdr_client_component.
        6
        7   attribute-attribute_name = i_binding->attribute_name.
        8   attribute-element ?= get_bound_element( i_binding ).
        9   client_component ?= attribute-element->node->controller->component->data_container_superio
       11   data_container = client_component->data_container.
       12
       13   e_value = data_container->get_and_format( attribute = attribute ).
       14
       15 endmethod.
    Error is at line 9
    Chosen variables
    Name
        Val.
    No.      21 Ty.          METHOD
    Name  CL_WDR_VIEW_ELEMENT_ADAPTER=>GET_ATTRIBUTE_EXTERNAL
    I_BINDING
        0000000C
        D0000002
    E_VALUE
    SY-REPID
        CL_WDR_VIEW_ELEMENT_ADAPTER===CP
        0000000000000000000000000000000000000000
        0000000000000000000000000000000000000000
        4455455544554444445544455453334522222222
        3CF742F6957F5C5D5E4F1410452DDD3000000000
    %_DUMMY$$
        0000
        0000
        2222
        0000
    ATTRIBUTE-ATTRIBUTE_NAME
        USERNR
        000000
        000000
        554545
        5352E2
    I_BINDING->ATTRIBUTE_NAME
        USERNR
        000000
    =======================================================================
    The thing that is worrying me is that nothing like this was happening at all earlier. I tested the application quite a few number of times and then suddenly this started. Since then it has not stopped.
    I am unable to understand the reason for this. Pl help.
    Regards,
    Reema.
    Edited by: Reema Shahbazkar on Jun 12, 2008 3:28 AM

    Hey Reema,
    Were you able to resolve this error. I am facing exactly the same issue currently . My primary data container nodes belong to the component controller. I did verify the same for any change in the cardinality and dont see anythign thats changed which could be impacting my views. In any case, I had kept the cardinality as 0...n initially to be safe since there cud be scenarios where no values can exist for the same at runtime.
    Please do let me know how you happened to resolve this.
    Thanks,
    Puja.

  • Access via 'NULL' object reference not possible Error in WD application execution

    Experts,
    I am getting following error for web dynpro application intermittently, please find following error log:
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_SALV_WD_C_TABLE_V_TABLE====CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
         caught in
        procedure "IF_SALV_WD_COMP_TABLE_DATA_MAP~MAP_TO_RESULT_CHANGES" "(METHOD)",
         nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        You attempted to use a 'NULL' object reference (points to 'nothing')
        access a component.
        An object reference must point to an object (an instance of a class)
        before it can be used to access components.
        Either the reference was never set or it was set to 'NULL' using the
        CLEAR statement.
    Information on where terminated
        Termination occurred in the ABAP program "CL_SALV_WD_C_TABLE_V_TABLE====CP" -
         in "IF_SALV_WD_COMP_TABLE_DATA_MAP~MAP_TO_RESULT_CHANGES".
        The main program was "SAPMHTTP ".
        In the source code you have the termination point in line 168
        of the (Include) program "CL_SALV_WD_C_TABLE_V_TABLE====CM080".
        The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
        procedure "IF_SALV_WD_COMP_TABLE_DATA_MAP~MAP_TO_RESULT_CHANGES" "(METHOD)",
         but it was neither handled locally nor declared
        in the RAISING clause of its signature.
        The procedure is in program "CL_SALV_WD_C_TABLE_V_TABLE====CP "; its source
         code begins in line
        1 of the (Include program "CL_SALV_WD_C_TABLE_V_TABLE====CM080 ".
    Line  SourceCde
      138
      139         "Set new value to result data
      140         if ls_changelist-r_old_value is not bound.
      141           "insert new table line
      142           lr_component->r_result_data->if_salv_bs_r_data_table_edit~insert_table_line(
      143             index = l_result_data_index ).
      144         else.
      145           "Modify existing table line
      146           lr_component->r_result_data->if_salv_bs_r_data_table_edit~set_table_line(
      147             index     = l_result_data_index
      148             data_line = <ls_table> ).
      149         endif.
      150       else.
      151         "A single attribute value has to be updated
      152
      153         "Get context element from output data node
      154         data lr_element type ref to if_wd_context_element.
      155
      156         "Retrieve the element to update from the data output node
      157         if l_mass_edit_row_inserted = abap_true.
      158           "The Element only exists virtually due to the mass edit mode.
      159           lr_element = lr_node->get_element( l_mass_edit_virtual_index ).
      160           l_mass_edit_row_inserted = abap_false.
      161         else.
      162           "The element already exists in the data output node.
      163           lr_element = lr_node->get_element( ls_changelist-index ).
      164         endif.
      165
      166         "Determine if the cell to be updated is set to null (Nullable)
      167         data l_is_null type abap_bool.
    >>>>>         l_is_null = lr_element->is_attribute_null( ls_changelist-attribute ).
      169
      170         "Update result data with change
      171         if <l_value> is assigned.
      172           "update ResultData with cell value
      173           lr_component->r_result_data->if_salv_bs_r_data_table_edit~set_table_cell(
      174             index     = l_result_data_index
      175             attribute = ls_changelist-attribute
      176             data_cell = <l_value>
      177             is_null   = l_is_null ).
      178         else.
      179           "Update result data without any updated cell value
      180           lr_component->r_result_data->if_salv_bs_r_data_table_edit~set_table_cell(
      181             index     = l_result_data_index
      182             attribute = ls_changelist-attribute
      183             is_null   = l_is_null ).
      184         endif.
    Please help us on what could be the reason behind this?
    Thanks,
    Madan

    Hi Madan,
    It seems that, there are user settings saved and the attribute in the layout settings is not available with current changes.
    try to delete the user settings if any.
    Please find my answer in the below link
    Reset user settings in WDA
    Hope this helps you.
    Regards,
    Rama

Maybe you are looking for

  • IPod is connected to an other logical DB after reinstalling iTunes

    After a PC crash I had to set it up again. As a result all my iTunes songs are gone. I reinstalled iTunes but when connecting the iPod I get the message that my iPod is connected to another logical DB and if I would like to change that. How can I cop

  • Can we see Customer # in line item of accoutning doc for Rebate Correction

    Hi SD gurus, Now we have a requirement about rebate correction. In correction step, business want to see the customer number in line item of accounting document since it will be easy for them to do the reconciliation. I know there are allocation # an

  • Mac OS 10.7

    Yes i am looking for a way to set power consumption on Mac OS 10.7, Mac os 10.5 had this options to set to performance mode and am wondering is there a way i can do this on 10.7?

  • HT5085 Itunes Radio (in music)

    Hi, I am living in Georgia (not the U.S.) but, as I changed my old Apple ID and Password and registered in Bahamas, the Itunes radio disappeared form my phone is it normal? Please help!

  • Configure SOA (full) , but OWSM not configured

    Configure SOA (full) work find but OWSM is not configured echo] ** Configure OWSM = false When going to URL: http://127.0.0.1:8988/SOAConsole it also does'nt show up. Is there any way to get OWSM configured?