Warning: assignment from distinct Objective-C type

Hi,
I'm getting the waring in the title of my post, and I can't figure out why. If I change the name of one variable everywhere in my code, then the warning goes away. Here is the code that produces the warning (warning marked in code with comment):
#import "RandomController.h"
#import "RandomSeeder.h"
#import "MyRandomGenerator.h"
@implementation RandomController
- (IBAction)seed:(id)sender
seeder = [[RandomSeeder alloc] myInit];
[seeder seed];
NSLog(@"seeded random number generator");
[textField setStringValue:@"seeded"];
[seeder release];
- (IBAction)generate:(id)sender
generator = [[MyRandomGenerator alloc] myInit]; //<**WARNING**
int randNum = [generator generate];
NSLog(@"generated random number: %d", randNum);
[textField setIntValue:randNum];
[generator release];
So both the RandomSeed class and the MyRandomGenerator class have a method named myInit. If I change the line with the warning to:
generator = [[MyRandomGenerator alloc] aInit];
and also change the name of the method to aInit in the MyRandomGenerator.h/.m files, then the warning goes away. xcode seems to be telling me that two classes can't have a method with the same name--which can't be correct.
//RandomSeeder.h
#import <Cocoa/Cocoa.h>
@interface RandomSeeder: NSObject {
- (RandomSeeder*)myInit;
- (void)seed;
@end
//RandomSeeder.m
#import "RandomSeeder.h"
@implementation RandomSeeder
- (RandomSeeder*)myInit
self = [super init];
NSLog(@"constructed RandomSeeder");
return self;
- (void)seed
srandom(time(NULL));
@end
//MyRandomGenerator.h
#import <Cocoa/Cocoa.h>
@interface MyRandomGenerator: NSObject {
- (MyRandomGenerator*)myInit;
- (int)generate;
@end
//MyRandomGenerator.m
#import "MyRandomGenerator.h"
@implementation MyRandomGenerator
- (MyRandomGenerator*)myInit
self = [super init];
NSLog(@"constructed RandomGenerator");
return self;
- (int)generate
return (random() %100) + 1;
@end
//RandomController.h
#import <Cocoa/Cocoa.h>
#import "RandomSeeder.h"
#import "MyRandomGenerator.h"
@interface RandomController : NSObject {
IBOutlet NSTextField* textField;
RandomSeeder* seeder;
MyRandomGenerator* generator;
- (IBAction)seed:(id)sender;
- (IBAction)generate:(id)sender;
@end
//RandomController.m
#import "RandomController.h"
#import "RandomSeeder.h"
#import "MyRandomGenerator.h"
@implementation RandomController
- (IBAction)seed:(id)sender
seeder = [[RandomSeeder alloc] myInit];
[seeder seed];
NSLog(@"seeded random number generator");
[textField setStringValue:@"seeded"];
[seeder release];
- (IBAction)generate:(id)sender
generator = [[MyRandomGenerator alloc] myInit];
int randNum = [generator generate];
NSLog(@"generated random number: %d", randNum);
[textField setIntValue:randNum];
[generator release];
@end
Also, I couldn't figure out a way to create only one RandomSeed object and only one MyRandomGenerator object to be used for the life of the application--because I couldn't figure out how to code a destructor. How would you avoid creating a new RandomSeed object every time the seed action was called? Or, is that just the way things are done in obj-c?
Message was edited by: 7stud

7stud wrote:
generator = [[MyRandomGenerator alloc] myInit]; //<**WARNING**
I can tell you why I might expect the subject warning, but doubt I'll be able to handle the likely follow-up questions, ok?
Firstly note that +(id)alloc, which is inherited from NSObject, always returns an id type, meaning an object of unspecified class. Thus the compiler can't determine the type returned by [MyRandomGenerator alloc], so doesn't know which of the myInit methods might run. This is the case whenever init is sent to the object returned by alloc, but your example is a little more complicated because the code has broken at least two rules for init methods: 1) By convention the identifier of an init method must begin with 'init'; 2) An init method must return an object of id type.
Each of the myInit methods returns a different "distinct" type, and neither of the methods is known to be an init, so the compiler isn't willing to guarantee that the object returned will match the type of the left hand variable. Do we think the compiler would be more trusting if the init methods followed the naming convention? Dunno, but that might be an interesting experiment. In any case, I wouldn't expect the compiler to complain if the myInit methods both returned an id type object.
For more details about why and how init methods are a special case you might want to look over Constraints and Conventions under "Implementing an Initializer" in +The Objective-C Programming Language+. The doc on init in the +NSObject Class Reference+ also includes a relevant discussion.
Hope some of the above is useful!
- Ray

Similar Messages

  • Warning: passing argument 2 of 'setValue:forKey:' from distinct Objective-C

    I want to keep my projects warning free. In the following line
    [tempValues setValue:@"Some Text" forKey:[NSNumber numberWithInt:0]];
    the compiler complains with an
    "warning: passing argument 2 of 'setValue:forKey:' from distinct Objective-C type" warning.
    tempValues is an NSMutableDictionary.
    Any idea how to resolve this warning?

    Essentially, the typical rationale behind this particular warning is: The compiler must not let you write code that seeks to modify a non-modifiable object without giving some warning.
    Are you in effect trying to modify a non-modifiable object?
    Remember...(and I quote because I'm too lazy otherwise) "When you have a variable of type NSMutableArray*, then anyone would think that the array it points to can be modified. So if this variable contains a pointer to an actual non-mutable array, that would be a recipe for disaster, because any attempt to actually modify the array would fail in some way. For that reason, Objective-C must not just allow an assignment assigning an NSArray* to an NSMutableArray* variable.
    The other way round is harmless: Anyone looking at a variable of type NSArray* would think the array cannot be modified and therefore won't try to modify it. If the actual object is an NSMutableArray, no harm is done."

  • Unable to assign from std::make_pair if type is not movable

    I'm attempting to compile the following code with the -std=c++11 flag:
    #include <utility>
    struct Y
        Y();
        Y(const Y&);
    int main(void) {
        Y y;
        std::pair<int, Y> p = std::make_pair(0, y);
        return 0;
    This works fine when compiled with:
    CC -std=c++03 -m64 -c
    or on Linux (GCC 4.7.3/GCC 4.9) with:
    g++ -std=c++11 -m64 -c
    However when compiled with:
    CC -std=c++11 -m64 -c
    It produces the following error:
    "pair.cpp", line 11: Error: Using deleted function 'std::pair<int, Y>::pair(std::pair<int, Y>&&)'.
    1 Error(s) detected.
    I suspect this is a compiler bug, but wanted to confirm there wasn't a clause in the standard that would explain this.

    Another sample program that triggers this bug is:
    #include <map>
    #include <string>
    class CUserCopyAssign
        public:
            CUserCopyAssign(int a);
            CUserCopyAssign(const CUserCopyAssign &other);
            CUserCopyAssign &operator=(const CUserCopyAssign &other);
            int getA(void) const;
        private:
            int m_A;
    CUserCopyAssign::CUserCopyAssign(int a) : m_A(a)
    CUserCopyAssign::CUserCopyAssign(const CUserCopyAssign &other) : m_A(other.m_A)
    CUserCopyAssign &CUserCopyAssign::operator=(const CUserCopyAssign &other)
        m_A = other.m_A;
        return *this;
    int CUserCopyAssign::getA(void) const
        return m_A;
    int main(int, char **)
        typedef std::map<std::string, CUserCopyAssign> TStrObjMap;
        TStrObjMap aMap;
        CUserCopyAssign obj(7);
        aMap.insert(TStrObjMap::value_type("a", obj));
        return 0;
    When built with:
    CC -std=c++11 -m64 main.cpp
    you get the same error:
    "/opt/SolarisStudio12.4-beta_mar14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.7.2/bits/stl_tree.h", line 139: Error: Using deleted function 'std::pair<const std::string, CUserCopyAssign>::pair(std::pair<const std::string, CUserCopyAssign>&&)'.
    Please can you make sure this case is covered in your regression tests as well as the make_pair example as it will be critical to people trying to compile a mix of old-style C++03 and new-style C++11 code in the same project.

  • Cost assignment-Multiple cost objects being selected by default from the EP

    Hi,
    I have created an expense report from the Portal and entered the cost object - a WBS element and saved the report. Now, when I check in table: PTRV_SCOS, it shows me the cost object assigned are - both - the WBS Element as well as the Cost center. This is incorrect as there should be only one cost object - either the cost center or the WBS element. However, when I book the expenses from the backend, it works fine. Only the WBS or cost center is displayed in the table mentioned above. Anyone has any idea as to why this is happening?
    Many thanks in advance for your efforts.
    Cheers guys.
    Hope to hear from you soon
    Best regards,
    Tanmay Dhingra
    Edited by: Tanmay Dhingra on May 17, 2011 10:05 AM

    Hi All,
    First of all, thanks for your responses..
    Right, about the issue, what I explained here was that I am indeed assigning only one cost object: the WBS element. The issue was that even though I am assigning only the WBS element, it was also assigning the cost to the cost center by default. I did some R&D and found the solution to the issue (I was also asked to look for OSS notes but was not satisfied that this issue needs an OSS note to be applied so tried my solution). The issue was in table: T788M (allocate costs to variable account assignment). Here, I created an entry and called it USERGROUP_2 (just a random name) and assigned the variable cost objects (only the WBS and the Cost center) to be displayed. In the next step, I assigned this usergroup to the country in quesion feature (TRVCO). By doing this, I tell the system that only these cost objects are to be considered when an employee wants to assign the cost object. If the system sees that there is no value from the drop down to choose from, it picks up the default cost object (cost center). This was a simple issue that I had to rattle my brains on... but the solution I mention above worked like a hot knife going through butter...
    If you guys face this issue, please try this else feel free to get in touch with me on my number below.
    Once again, thanks for your responses.
    Best regards,
    Tanmay Dhingra
    +91 880 6666 606

  • "In initializer for 'mxmlContent', type Object is not assignable to target Array element type..."

    Hi all,
    So I've have built an application on flash builder 4.5 using Christophe Coenraets' tutorial "Building an EmployeeDirectory" (http://www.adobe.com/devnet/flex/articles/employee-directory-android-flex.html#articlecont entAdobe_numberedheader).
    I'm getting this error message "In initializer for 'mxmlContent', type Object is not assignable to target Array element type mx.core.IVisualElement." and then the debugger highlights my code this line of my code "</s:List>" in my EmployeeDetails.mxml file. This started after I coded Part 5, Step 2 "Integrating with the Device Capabilities: Triggering the Actions".   The rest of the code debugged fine.
    I think it relates to Christophe's note "Note: Make sure you import spark.events.IndexChangeEvent (and not mx.events.IndexChangedEvent) for this code to compile.".  I don't know where to place this
    " import spark.events.IndexChangeEvent;" line of code. 
    Any help?  Tks in advance..
    Any help would be greatly appreciated.  Thanks

    You have a DataGrid directly inside a State element. Perhaps wrap it in an AddChild element?
    More information on using states can be found here:
    http://livedocs.adobe.com/flex/3/html/help.html?content=using_states_1.html

  • The type of the value being assigned to variable ... differs from the current variable type

    I am trying to load a variable on SSIS Execute SQL Task with a string value. I keep on getting an error message :-
    “The type of the value being assigned to variable “User::LegacyColumns” differs from the current variable type”.
    Below are the settings on my package:
    Execute SQL Task Result Set –
    Single Row
    Variable Data Type –
    String
    The data to be loaded on the variable is a single row shown below:
    FirstName,LastName,MiddleName,PatientType,Title
    Can someone kindly help me to solve this as I’m lost for ideas.
    Thanks,
    Mpumelelo

    Thank you Sorna. I think I have managed to solve it. After a long search I have found a solution which advises that I should use a Foreach Loop Container. The help is on this link:
    https://social.msdn.microsoft.com/Forums/en-US/f46dea91-c26b-4ffe-ab1c-ebeef57c90b6/error-0xc001f009-at-mypackage-the-type-of-the-value-being-assigned-to-variable?forum=sqlintegrationservices
    Mpumelelo

  • The type of the value (DBNull) being assigned to variable "User::AlereCoachingEnrolledID" differs from the current variable type (Int32)

    This occurred within an Execute SQL Task
    I am trying to get my entire result set with the following SQL...
    IF EXISTS
    SELECT [Alere_Coaching_Enrolled].[AlereCoachingEnrolledID]
    FROM [dbo].[Alere_Coaching_Enrolled]
    WHERE ([Alere_Coaching_Enrolled].[MatchMember] IS NULL
    OR [Alere_Coaching_Enrolled].[MatchMember] = 0)
    AND ([Alere_Coaching_Enrolled].[Processed] IS NULL
    OR [Alere_Coaching_Enrolled].[Processed] = 0)
    BEGIN
    SELECT [Alere_Coaching_Enrolled].[AlereCoachingEnrolledID]
    FROM [dbo].[Alere_Coaching_Enrolled]
    WHERE ([Alere_Coaching_Enrolled].[MatchMember] IS NULL
    OR [Alere_Coaching_Enrolled].[MatchMember] = 0)
    AND ([Alere_Coaching_Enrolled].[Processed] IS NULL
    OR [Alere_Coaching_Enrolled].[Processed] = 0)
    END
    ELSE
    BEGIN
    SELECT 0 AS [AlereCoachingEnrolledID]
    END
    I want to handle using a Sequence Container and an Expression and Constraint if I have rows to process and if I do not...thus the 0 portion of the SQL...
    Thanks for your review and am hopeful for a reply.

    Hi ITBobbyP,
    As per my understanding, you created Execute SQL Task with the query and created a variable of int32, then set ResultSet to Full result set. When you run the package, you got the error message.
    I reproduced the issue in my local machine, since the query can return a result set, you set type of variable to int32, so the error occurred. A Full result set must map to a variable of the Object data type. The return result is a rowset object. We can
    use a Foreach Loop container to extract the table row values that are stored in the Object variable into package variables, and then use a Script Task to write the data stored in packages variables to a file.
    For more information, please refer to Populating a variable with a result set section in the document:
    https://msdn.microsoft.com/en-us/library/cc280492.aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Can a "object reference" type from TestStand be used for Labview VIs

    I am creating a test sequence in Test Stand and I am looking to use a "object referrence" type stored in the globals of TestStand as an input to VIs that I will use later in TestStand.  The object can be from .NET or ActiveX.  I need to know if I can use a input that will support either type.

    Hi Mcfrenzy36,
    Object references can be used for LabVIEW. I have found an article that teaches how TestStand handles Activex object references. Here is the linkt o it:
    http://zone.ni.com/devzone/cda/tut/p/id/2984
    I hope that this helps.
    Regards,
    Perry S.
    Applications Engineer
    National Instruments

  • Windows server 2008 R2 File& Folder Permissions; Ghost Permissions From "Parent Object" Assigned to Folder Owner

    Windows 2008 R2 file server: Subfolders of a particular folder have an account that has Full Control permission that are listed as inherited. That account has no permissions in the parent folder. It was, however the account that was used to copy the folders
    and their contents in there from another source and was the owner of the folder.
    In Advanced Permissions, it shows them as inherited from "Parent Object" as opposed to the folder name of the parent folder (there are some of these.) (The parent folder of the place where the problem occurs does not inherit from _its_ parent)
    I removed it as owner and yet the permissions remained. (as displayed either through the GUI or with ICACLS.)
    If I make _any_ edit in Advanced Permissions, the 'ghost' permissions then go away (e.g. add my account with full control - I'm domain admin, so have that anyway) This step seems like it should be unnecessary, but it is required in this situation.
    I've done this to 5 of about 20 subfolders and it is consistent. Folders which did not have the 'problem account' as their owner did not exhibit this characteristic.
    This affects the files within the subfolders as well.
    Oddly, adding an owner to a folder has the same effect and required the same edit before the permissions are seen. This was tested on a different drive on the same server.
    Is this an anomaly, a bug, or expected performance?

    Hi,
    Do you mean that there is an account that has Full Control permission that are listed as inherited but it doesn’t appear in the parent NFS permissions? If so, please try to uncheck the "Include inheritable permissions from this object's parent" checkbox,
    clicking Apply.
    There is a similar thread, please go through it to help troubleshoot this issue:
    NTFS: I have a user’s that's inherited from parent folder but it doesn’t appear in the Parent ACL
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/6061af36-4d44-4de8-8139-d71f06d59a2c/ntfs-i-have-a-users-thats-inherited-from-parent-folder-but-it-doesnt-appear-in-the-parent-acl?forum=winserversecurity
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • OpenSQLException - object of type java.sql.Date is not normalized

    Hi,
    I am attempting to code an SQL query in an EJB and get the following exception:
    com.sap.sql.log.OpenSQLException: The object of type java.sql.Date with the value '2010-06-04 13:21:09.424' assigned to host variable 1 is not normalized. It must not contain time components in the time zone running the virtual machine. at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85) at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124) at com.sap.sql.jdbc.common.CommonPreparedStatement.setDate(CommonPreparedStatement.java:650) at......
    Below is the code snippet I am using:
                        private static String selWQ  = "Select * from ZZZZ_TABLE " +
                                                                       "where DATEFROM >= ? " +
                                                                  "and DATETO <= ? ";
         public UsageRecord[] getRecords(Date fromDate,Date toDate)
              UsageRecord[] ura = null;
              String q          = null;
              ArrayList al      = new ArrayList();
              try
                   q = selWQ;
                   conn.open();
                   PreparedStatement p = conn.prepareStatement(q);               
                   p.setDate(1, fromDate);
                   p.setDate(2,toDate);                    
                   ResultSet rs = p.executeQuery();
    I have a PreparedStatement and am using setDate to set the values. The fromDate and toDate parameters are of type java.sql.Date
    Can someone please tell me what I am doing wrong and how to fix it?
    thanks
    Brian

    As requested, here is an example of what I used to resolve this:
                   PreparedStatement p = conn.prepareStatement(q);
                   SimpleDateFormat ddf = new SimpleDateFormat("yyyy-MM-dd");
                                               String sFrom = ddf.format(new java.util.Date(fromDate));
                   String sTo   = ddf.format(new java.util.Date(toDate));
                   p.setDate(1, java.sql.Date.valueOf(sFrom));
                   p.setDate(2, java.sql.Date.valueOf(sTo));
                   ResultSet rs = p.executeQuery();
    fromDate and toDate are parameters of type long...
    regards
    Brian

  • Create DMS document from direct object transaction instead of CV01N

    Dear Experts,
    I have raised an issue for the same thing in past and got helpful reply also. However it is not working here. I have searched enough but did not get satisfactorily answer.
    My requirement here is to create and store DMS document directly from the object attached to DMS document type instead of CV01N e.g. create PR ME51N, create project CJ20N etc.
    So far I have done the required configuration to get create option in transaction while entering DMS document number. I kept document description field as an optional for respective document type and created and assigned role in Define profile step. Number range is internal. So I think all necessary configuration in place. Now problem here is when I am clicking on create easy document icon, it ask me to select document type and file from local machine also. But nothing is happening afterwards and document is not getting created and stored. Transaction return on screen without any number and so. Please help me out. Did I miss anything?
    Looking forward for your reply. Points will be allocated for answer.
    Best Regards,
    Bhagat

    Hi Bhagat,
    Select the document type in question,navigate to "Define object links".Please verify if the following values have been maintained:
    Screen no-233
    When new version-1
    Create document-1
    Document version-1
    Additional functions-checked
    Post this,re-test the scenario and share the results.Also,do confirm if you are able to create documents of the above document type using CV01n transaction successfully.
    Regards,
    Pradeepkumar Haragoldavar

  • Copy activity fails while copying/reading sql object return type

    Hi,
    Please help me by providing some information for the following issue
    i am executing a db adapter in BPEL service ,i am calling a stored procedure it returns a object type . i can see the outputparameters retrun values in the audit(BPEL console) but i am unable to copy the object return type using assign copy operation.
    it shows parser error.Please find below mentioned error information.
    fault message:
    ULNAPP_JW_100_02_OutputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    -<db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/DEVJ2EE/ULNAPP_JW_100_02/EDIT/">
    -<IV_EDI_REC_T>
    <EDI_EDIT>CNLNCE_APP_EDIT_00
    </EDI_EDIT>
    <EDI_SUPER_PRODUCT_TYPE_CD>CN
    </EDI_SUPER_PRODUCT_TYPE_CD>
    <EDI_PRODUCT_TYPE_CD>LN
    </EDI_PRODUCT_TYPE_CD>
    <EDI_FUNDING_TYPE_CD>CE
    </EDI_FUNDING_TYPE_CD>
    <EDI_PTC_COMPANY>ALL
    </EDI_PTC_COMPANY>
    <EDI_PCB_BRANCH>ALL
    </EDI_PCB_BRANCH>
    <EDI_STATE_CD>ALL
    </EDI_STATE_CD>
    <EDI_PRD_PRODUCT>ALL
    </EDI_PRD_PRODUCT>
    <EDI_EDIT_TYPE_CD>ORG-ENTRY
    </EDI_EDIT_TYPE_CD>
    <EDI_ENABLED_IND>Y
    </EDI_ENABLED_IND>
    <CREATED_BY>SETUP
    </CREATED_BY>
    <CREATION_DATE>2008-01-30T17:02:35.000+05:30
    </CREATION_DATE>
    <LAST_UPDATED_BY>SETUP
    </LAST_UPDATED_BY>
    <LAST_UPDATE_DATE>2008-01-30T17:02:35.000+05:30
    </LAST_UPDATE_DATE>
    <EDI_RESULT_CD>ERROR
    </EDI_RESULT_CD>
    <EDI_OVR_RESPONSIBILITY_CD>UNDEFINED
    </EDI_OVR_RESPONSIBILITY_CD>
    <EDI_ERE_ID>102688
    </EDI_ERE_ID>
    </IV_EDI_REC_T>
    <IV_RESULT>0
    </IV_RESULT>
    <IV_ERR_DESC xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
    </db:OutputParameters>
    </part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]
    </part>
    </ULNAPP_JW_100_02_OutputVariable>
    </messages>
    Assign_1
    [2008/04/10 20:01:50] Updated variable "TMP_Output"More...
    -<TMP_Output>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    -<OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/DEVJ2EE/ULNAPP_JW_100_02/EDIT/">
    -<IV_EDI_REC_T xmlns="">
    <EDI_EDIT>CNLNCE_APP_EDIT_00
    </EDI_EDIT>
    <EDI_SUPER_PRODUCT_TYPE_CD>CN
    </EDI_SUPER_PRODUCT_TYPE_CD>
    <EDI_PRODUCT_TYPE_CD>LN
    </EDI_PRODUCT_TYPE_CD>
    <EDI_FUNDING_TYPE_CD>CE
    </EDI_FUNDING_TYPE_CD>
    <EDI_PTC_COMPANY>ALL
    </EDI_PTC_COMPANY>
    <EDI_PCB_BRANCH>ALL
    </EDI_PCB_BRANCH>
    <EDI_STATE_CD>ALL
    </EDI_STATE_CD>
    <EDI_PRD_PRODUCT>ALL
    </EDI_PRD_PRODUCT>
    <EDI_EDIT_TYPE_CD>ORG-ENTRY
    </EDI_EDIT_TYPE_CD>
    <EDI_ENABLED_IND>Y
    </EDI_ENABLED_IND>
    <CREATED_BY>SETUP
    </CREATED_BY>
    <CREATION_DATE>2008-01-30T17:02:35.000+05:30
    </CREATION_DATE>
    <LAST_UPDATED_BY>SETUP
    </LAST_UPDATED_BY>
    <LAST_UPDATE_DATE>2008-01-30T17:02:35.000+05:30
    </LAST_UPDATE_DATE>
    <EDI_RESULT_CD>ERROR
    </EDI_RESULT_CD>
    <EDI_OVR_RESPONSIBILITY_CD>UNDEFINED
    </EDI_OVR_RESPONSIBILITY_CD>
    <EDI_ERE_ID>102688
    </EDI_ERE_ID>
    </IV_EDI_REC_T>
    <IV_RESULT xmlns="">0
    </IV_RESULT>
    <IV_ERR_DESC xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns=""/>
    </OutputParameters>
    </part>
    </TMP_Output>
    </sequence>
    </flow>
    <switch>
    Assign_Output (faulted)
    [2008/04/10 20:01:50] Error in evaluate <from> expression at line "399". The result is empty for the XPath expression : "/ns9:OutputParameters/ns9:IV_RESULT". More...
    oracle.xml.parser.v2.XMLElement@d2838
    [2008/04/10 20:01:50] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
    -<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/ns9:OutputParameters/ns9:IV_RESULT" is empty at line 399, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns9:OutputParameters/ns9:IV_RESULT" is not empty.
    </summary>
    </part>
    </selectionFailure
    Thanks in advance,

    I'm having a similar problem where I'm unable to copy data from a single element from a response from a stored procedure (through an ESB service). If I copy the entire response xml to another variable it works fine however.
    Working code:
    <variable name="VariableOut" messageType="ns10:OutputParameters_reply"/>
    <assign name="assignStatusCode">
    <copy>
    <from variable="VariableOut" part="OutputParameters" query="/ns11:OutputParameters/ns11:EnclosureOutput/ns11:P_STATUS_CODE"/>
    <to variable="statusCodeFromEnclosures"/>
    </copy>
    </assign>
    results in:
    Updated variable "VariableOut"
    <invokeAPPS_DB_Enclosures_Out_execute_OutputVariable>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    <OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/DOC_INT/DOC_INV_ENCLOSURE_PKG/SEND_ENCLOSURES/">
    <P_ENCLOSURES xsi:nil="true"/>
    <P_STATUS_CODE>1</P_STATUS_CODE>
    <P_STATUS_TEXT>My text</P_STATUS_TEXT>
    </OutputParameters>
    </part>
    </invokeAPPS_DB_Enclosures_Out_execute_OutputVariable>
    Not working code:
    <variable name="statusCodeFromEnclosures" type="xsd:unsignedInt"/>
    <assign name="assignStatusCode">
    <copy>
    <from variable="VariableOut" part="OutputParameters" query="/ns11:OutputParameters/ns11:EnclosureOutput/ns11:P_STATUS_CODE"/>
    <to variable="statusCodeFromEnclosures"/>
    </copy>
    </assign>
    results in:
    Error in evaluate <from> expression at line "195". The result is empty for the XPath expression : "/ns11:OutputParameters/ns11:EnclosureOutput/ns11:P_STATUS_CODE".
    oracle.xml.parser.v2.XMLElement@14d4901

  • WCM: Operational Class assignment to Technical Objects

    Greetings Experts, Gurus and SAP Sages!
    In WCM, we are able to create an Operational Class to restrict the particular Operational Conditions & Operational Groups that are relevant for the Technical Objects.
    But I am having difficulty uderstanding the practicality of this assignment:
    Is the assignment only made directly, by assiging an existing Technical Object (FL or EQ) to the Operational Class via transaction WCC8 ? If so, then how can we handle new master data? If a new FL or EQ is created, do we always need to run WCC8 again?
    As far as I know, an Operational Class is different from a Class in the sense of the Classification functionality, so we can't assign the Operational Conditions & Operational Groups to any existing Class of type 002 or 003, nor can we assign the Operational Class when creating a Technical Object in IL01 or IE01.
    So what is the purpose? Is there any automatic or indirect assignment possible? Or perhaps an enhancement is needed, to automatically assign a new FL or EQ to the OC based on some attributes?

    Thanks, Srinivas!
    The root of this requirement is actually the rather sketchy quality of the TO master data. Therefore, it's not possible to assign all the necessary Technical Objects to the Operational Class now, as more Technical Objects will be created as the solution matures. And going into WCC8 each time when the FL or EQ is created will be very cumbersome and prone to error.
    I'm actually thinking of utilizing User Exits to assign the Technical Object to Operational Class via a custom logic (based on Class or Object Type, as you rightly suggest).
    IEQM0003 Additional checks before equipment update
    ILOM0001 Additional checks before saving a functional location
    It's a bit disappointing there is not a standard way to do this...

  • Where can I find information on migrating from Business Objects 5 to XI R2?

    We want to migrate several Business Objects implementations - some of which are Business Objects 5 and some Business Objects 6 to consolidate them into a XI R2 environment.
    I have the document that describes migration from 6.x to XI R2 but what is the process for migrating from Business Objects 5. Do I need to migrate from 5 to 6 and then follow the 6.x to XI R2 migration?
    Any pointers to additional hints and tips on migration or how to estimate how much effort is involved would also be welcome.
    Thanks in advance for your help.

    Hi,
    Following are the detailed steps for migration via Import Wizard:
    1] Go to Start > Programs > Business Objects XI Release 2 > BusinessObjects Enterprise > Import Wizard.
    2] The Welcome dialog box appears. Click Next.
    Setting source and destination environments:
    3] In the Specify source environment dialog box, set the following:
    u2022 Source: Business Objects Enterprise BO 6.5.x.
    u2022User Name:
    u2022 Password: visor
    BOMain key
    Note: Do not check the Import Application Foundation contents option since you are not performing Performance Management migration at this time.
    Click Next.
    4] The Warning page appears. Click Next.
    Note: The source repository can store any file, not just supported agnostic documents. Since the BusinessObjects XI Release 2 architecture requires a plug-in for each file extension, it does not import unsupported files (for example, .zip files and as .svg documents used in corporate dashboards).
    5] The Specify destination environment page appears. Set the:
    u2022 Destination: Business Objects Enterprise BOXI R2
    u2022 User Name:
    u2022 Password:
    u2022 Domain key file to: Default drive: \Business Objects\BusinessObjects Enterprise XI R2
    Click Next.
    6] Select the types of objects you want to import in this stage of the importing process. At a later stage, you select the objects themselves.
    u2022 Select the option u2018Import universes u2018.
    Click Next.
    7] Import options for universes and connections dialog box appears.
    Select the third option: Import all the universes and connections that the selected Web Intelligence and Desktop Intelligence documents use directly.
    8] The Please choose a merge scenario dialog box appears. Select I want to merge the source system to destination system and check the automatically rename top-level folders that match top-level folder on the destination system option.
    Click Next.
    9] The Incremental Import dialog box appears.
    You may need to import some objects more than once from the source repository to the destination repository.
    In this situation, you have the following update options:
    u2022 Overwrite object contents
    You select the types of objects for which the content overwrite applies:
    u2022 Documents (including dashboards and analytics)
    u2022 Universes
    u2022 Connections
    When you re-import an object, it will completely overwrite and replace the matching object (and its associated files) that you imported earlier.
    u2022 Overwrite object rights
    When you re-import an object, its associated security rights will overwrite the rights of the matching object you imported earlier.
    If you decided not to import security in the Security Migration Options dialog box, then the Overwrite object rights option is not relevant, and is therefore not available.
    If you don't select any overwrite options, the matching object in the destination repository will not change when you try to import it again.
    Note: This dialog box appears only if you select update as the import scenario.
    Click Next.
    10] Select the specific universe
    Click Next
    11] Information Collection complete dialog box appears.
    Click Finish
    12] Import Progress dialog box appears.
    Click Done
    Hope this helps !!
    Please revert in case of any queries.
    Regards,
    Deepti bajpai

  • Unable to create DIR from the objects

    Hi,
    I want to create the DIR from the object  transaction, eg., Purchase Order, I have set "1" - Create Simple Document under Define Object Links for that particular Document type, But despite this config, I am not getting the "create" button. whereas I have assigned the same document type to another Object link Appropriation Request, and I am able to create DIR from the object transaction itself. Upon, exploring the system, I found that the Purchase order uses the Program "SAPLCVOB" screen"0200" whereas Appropriation request has Program "SAPLCV140" screen"0204" So, I presume that the configuration affects only SAPLCV140 and it has no affect to SAPLCVOB. Or is there any other way to create the DIR directly from the objects which uses SAPLCVOB program? My user wants to create DIR directly from PO.

    Dear Mohamed,
    To grant that allways the currenct screens and authorizations were
    called please maintain also the value "1" into the "Authorization"
    column. For further informations on this maintainance please see the
    SAP note 1066915. It's important that you not enter the mentioned
    screen number wihtout the leading "1" as this number is added
    automatically by the system (e.g. object MARA 1201 maintain like MARA
    201). You can do this in customizing under:
    Transaction SPRO
    > Cross-Application-Component
        > Document Management
             > Control Data
                 > Define screen for object links
    If you need the dynpro number or object you will find all standard SAP
    objects and their screen number in function module CV130 (Screens) by
    transaction SE80. Please maintain all necessary SAP objects.
    Best regards,
    Christoph

Maybe you are looking for