Inititating a variable with properties self vs. non self

I have properties for my variables (all on retain) - the problem is, that if i am initiating it without self, my app is crashing. As mentioned in the docs, I should not init my variables with self.variable = but with variable =
so, where is the difference and why is my app crashing?
not crashing:
- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)nibBundle {
self = [super initWithNibName:nibName bundle:nibBundle ];
if (self)
groupDict = [NSDictionary dictionaryWithObjectsAndKeys:
@"true", HAS_AGE,
@"true", HAS_GENDER,
@"true", HAS_EMOTION,
@"true", HAS_RELATIONSHIP,
@"true", HAS_WEALTH,
@"true", @"hasLanguages",
nil];
groupKeyArray = [groupDict allKeys];
setableAttributeKeyArray = [NSArray arrayWithObjects: HAS_RELATIONSHIP,
HAS_AGE, HAS_GENDER, HAS_EMOTION, HAS_WEALTH, HAS_LANGUAGE, nil];
[self getAttributeKeys];
prefs = [NSUserDefaults standardUserDefaults];
isTextUsed = TRUE;
[self loadUserProfile];
return self;
crashing:
- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)nibBundle {
self = [super initWithNibName:nibName bundle:nibBundle ];
if (self)
groupDict = [NSDictionary dictionaryWithObjectsAndKeys:
@"true", HAS_AGE,
@"true", HAS_GENDER,
@"true", HAS_EMOTION,
@"true", HAS_RELATIONSHIP,
@"true", HAS_WEALTH,
@"true", @"hasLanguages",
nil];
groupKeyArray = [groupDict allKeys];
setableAttributeKeyArray = [NSArray arrayWithObjects: HAS_RELATIONSHIP,
HAS_AGE, HAS_GENDER, HAS_EMOTION, HAS_WEALTH, HAS_LANGUAGE, nil];
[self getAttributeKeys];
prefs = [NSUserDefaults standardUserDefaults];
isTextUsed = TRUE;
[self loadUserProfile];
return self;
interestingly, I have found out that the crash only depends on my groupDict variable.
crash:
groupDict = [NSDictionary dictionaryWithObjectsAndKeys: blabla
no crash:
self.groupDict = [NSDictionary dictionaryWithObjectsAndKeys: blabla

Hi Alex -
sommeralex wrote:
so, where is the difference and why is my app crashing?
@interface MyClass : NSObject {
NSString *foo;
@property (nonatomic, retain) NSString *foo;
- (IBAction)doSomething:(id)sender;
@end
@implementation MyClass
@synthesize foo;
- dealloc {
[foo release];
[super dealloc];
- (IBAction)doSomething:(id)sender {
UIButton *button = sender;
NSString *string = [NSString stringWithFormat:@"Button %d was pressed", button.tag];
// Line 1 simply stores the address of the NSString instance in the ivar named foo:
foo = string; // Line 1
// Line 2 also stores the string address in the foo ivar, but does something else as well:
self.foo = string; // Line 2
// Line 2 is exactly equivalent to Line 3:
[self setFoo:string]; // Line 3
setFoo is the "setter" for the ivar foo which was declared by the @property directive and automatically implemented because of the @synthesize directive. Since the @property directive included the "retain" attribute, setFoo will retain the string object. Note that 'string' was created by a NSString convenience method which means it has been autoreleased. So if we use Line 1 to store the pointer to that NSString instance, the object will soon be deallocated, and if we try to use foo after that, we will crash. But either Line2 or Line3 will retain the NSString object, so it won't be released until another object's pointer is stored in foo, or the parent object is deallocated.
Everything in the foo example applies to your groupDict ivar (assuming you declared a retaining property named groupDict). The object pointed to by groupDict was created by dictionaryWithObjectsAndKeys, which is a convenience method. So unless the setter (setGroupDict) is used, the address stored in groupDict will become invalid at the end of the current event cycle, and any attempt to use groupDict after that will crash.
As mentioned in the docs, I should not init my variables with self.variable = but with variable =
Can you point us to the doc that says that? I might've missed that Obj-C lesson, but up till now I've never heard of a reason not to call setter methods from an init method, provided you've executed [super init] first, and provided you aren't calling a custom setter method which requires the existence of another object. In any case, you could always take the code you posted out of init and put it in awakeFromNib or viewDidLoad.
- Ray

Similar Messages

  • How to convert the Variable with soap header to non soap variable.

    I am working on a customized flow simialr to ProcessSalesorderFulfillmentJMSCOnsumer and Requestor ABCS. I dont have the PIP codes for the Requestor adn JMS Consumer. i built my own Requester ABCS and JMS Consumer. When i am trying to send message from JMS Consumer to Requestor ABCS in a variable with a SOAP:Env and SOAP:body inside.
    Becoz of this i was not able to put a condition in my bpel flows. If i put a condtion on this variable like switch inputvariable:part:OrderType='NEW' and it was failing with selection failure. I tried copying the variable to a new variable and then to check the condition still it does not work for me. How do i convert the SOAP Message Variable to Non SOAP Message Variable.
    Can i know the message put by SIebel in JMS Queue was it SOAP converted adn then how they are going to handle in Process Sales order Requestor ABCS.

    HI,
    In JMS Consumer of order to cash pip, Instead of using a schema reference they use a Envolpe.zxsd file which will take care of conversion adn then other artibutes are mapped in a transformation file.
    Please take an export of jms consumer in jdeveloper and reverse engineer the code of JMS COnsumer Service.
    Envelope_To_ListOfSWIOrderIO is the xsl whcih converts the message in AIA Queue to a message in a SOAP. Please look into the transformation.
    Thanks,
    Venugopal sss Raja

  • Error while creating a Characteristic Variable with Replacement Path

    Hi all,
        I am trying to create the Characteristic Variable ZVLOWDT (Low Date') with Replacement Path on characteristic ZSTARTDT (Start Date) and it gives the error 'Source to replace 'Low Date' is not defined.
       I have created a User Entry Variable VAR_DATE (Start Date) with interval like '01/01/2009 - 01/15/2009'  and  Customer Exit variable ZVCPDAY (does some calculation based on the input of VAR_DATE) on the same ZSTARTDT characteristic. I want to get the 01/01/2009 (lower range date of the selection) into this Characteristic Variable ZVLOWDT. We are in BI 7.0 and the following are it's properties:
    General Tab:
    Description: Low Date
    Technical Name: ZVLOWDT
    Type of Variable: Characteristic Value
    Processing by: Replacement Path
    Reference Characteristic: ZSTARTDT Start Date
    Details Tab:
    Variable Represents : Single value
    Variable is: Mandatory
    Variable is Ready for Input : unchecked
    Replacement Path Tab: Replacement Rule
    Replace Variable with : Variable
    Variable : VAR_DATE
    Replace with : KEY
    Why I am getting this error, PLEASE ?
    Thanks,
    Venkat.

    Hi Khaja,
       We could derive a Variable value from another Variable with out Customer Exit. There is a white paper.
    First have the User Entry Variable (ZV_X) and it accepts the date range like '01/01/2009 - 01/31/2009'. Next create the Characteristic variable (ZV_Y) of Replacement Path for which source variable will be ZV_X and we could get the 'FROM Date' (01/01/2009) from the selection (ZV_X) into it (ZV_Y).
    While creating the Characteristic variable (ZV_Y) of Replacement Path, I didn't find my newly created ZV_X variable in the list of available variables under 'Variable' header in 'Replacement Path' tab and it is causing the error  'Source to replace variable ZV_Y is not defined'. How could I create the Characteristic variable of Replacement Path, PLEASE ?
    Thanks,
    Venkat.

  • Variable with Replacement Path

    Hi, I have two queries. The results of the first one should be the input for the second one. E.g. the first query shows a list of personnel numbers and additional information. These personnel numbers shall be overtaken by the second query. The personnel numbers belong to "Dimensions" in the Query Designer. I alread tried to create a variable with replacement path to the dimension personnel number. I implementet this variable in both the first and the second query (under: "rows"). It`s no "Formular variable" and no "Calculated Key Figure" but a "Characteristic Value Variable" of a Dimension. The problem is now that I cannot execute any of the two queries. The error "Abort the query cannot be released for OLE DB for OLAP. System error in programm CL_RSR_REQUEST and form PREPARE_VQUERIES:INVALID_
    What is my mistake? Thank you in advance! Eve

    Hi Eve,
    It is possible to connect the 2 queries using a Replacement Path characteristic variable. You would need to create the variable on the char whose values you want to pass from Q1 to Q2. The variable will be of type replacement path and you will need to enter the name of Q1 from which it will get the values. Make sure that you include this char in the query definition of Q1 and Q2. In Q2 you will restrict the characteristic using this variable. DO not use this variable (replacement path) in Q1.
    In your query properties check if you have turned on the checkmark for Release for OLE DB for OLAP (3rd tab). If the check mark is there, then remove it.
    We are using the scenario in a couple of places, and it works very well.
    Hope this helps...

  • Creating Variable with Replacement Path to get value from ANOTHER Variable

    Hi all,
        Is anyone has created the Variable with Replacement Path to get the value from another User Entry Variable, PLEASE ? 
    First created the User Entry Variable (ZV_X) and it accepts the date range like '01/01/2009 - 01/31/2009'. Next created the Characteristic variable (ZV_Y) of Replacement Path for which source variable will be ZV_X and we should get the 'FROM Date' (01/01/2009) from the selection (ZV_X) into it (ZV_Y).
    While creating the Characteristic variable (ZV_Y) of Replacement Path, I didn't find my newly created ZV_X variable in the list of available variables under 'Variable' header in 'Replacement Path' tab and it is causing the error 'Source to replace variable ZV_Y is not defined'. How could I create the Characteristic variable of Replacement Path for my requirement, PLEASE ?
    The following is from help.sap..com:
    Replace with Characteristic Value
    Text and formula variables with the processing type Replacement Path can be replaced with a corresponding characteristic value. In the variable editor, on the General tab page, you specify under Reference Characteristic the characteristic that is to be referenced by the replacement. On the Replacement Path tab page, you can choose whether the variable is replaced with the From or the To Value and with the Key or the Name of the characteristic value. You can also specify the Offset Start and Offset Length for the output.
    Replace with Variable
    Characteristic value variables, hierarchy variables, text variables, and formula variables with the Replacement Path processing type can take their values from a different variable.
    The following prerequisites need to be fulfilled:
    Variable
    ●      The variable must not be input-ready
    ●      The variable must represent a single value
    Source Variable
    ●      The source variable must not be a hierarchy node variable
    ●      The source variable must be input-ready
    ●      The source variable must be available in the query
    ●      The source variable must represent a single value or an interval
    In the variable editor, on the Replacement Path tab page, you specify the source variable from which the value is to be determined. The value is either determined from the key, the external attribute of the key, the description, or the attribute value. You can specify an Offset Start and an Offset Length for the output here. The variable is replaced on the variable screen upon each data release.
    Thanks,
    Venkat.

    Hi Eve,
    It is possible to connect the 2 queries using a Replacement Path characteristic variable. You would need to create the variable on the char whose values you want to pass from Q1 to Q2. The variable will be of type replacement path and you will need to enter the name of Q1 from which it will get the values. Make sure that you include this char in the query definition of Q1 and Q2. In Q2 you will restrict the characteristic using this variable. DO not use this variable (replacement path) in Q1.
    In your query properties check if you have turned on the checkmark for Release for OLE DB for OLAP (3rd tab). If the check mark is there, then remove it.
    We are using the scenario in a couple of places, and it works very well.
    Hope this helps...

  • Time Format using text variable with replacement path

    Hi Friends,
                                 I've used "Text variable with replacement path" to make the column heading dynamic by replacing the values referring from "0calday"...
    everything is working fine, but here it is displaying the time format like
    YYYYMMDD (20030101), i want it to be displayed DDMMYYYY (01012003) in the column heading... how to make it possible?
    pls waiting for ur inputs, it's an urgent...
    Regards,
    Pattnaik

    Hi Satyakam,
    In the text variable properties make sure that in the replacment path you have chosen "Text" to appear date as per user setting . Other wise as in your case it must be set to "Key" which always shows in the format YYYYMMDD.
    Hope that helps.
    Regards
    Mr Kapadia

  • Using a variable with "tell application"

    I'd like to use a variable (app_name) with "tell application" in the following function:
    on getAdobeDoc(app_name)
    tell application app_name
    tell current document
    return (name as Unicode text)
    end tell
    end tell
    end getAdobeDoc
    but I'm getting the following error in Script Editor
    "Expected end of line but found class name." with the word "document" highlighted.
    Are you allowed to use variables in "tell application"? All Adobe CS apps seem to use the same format to get the document name so I'd like to use one function to get them.

    If the application might have a different name on the target machine (for example, if it has a version number added), you can use an application's bundle identifier (or creator code) to set the variable, in which case the using terms from statement tells AppleScript the application (on your machine) to get the dictionary terms from. If the application you are using terms from has a dictionary identical to your variable, everything should work the same. The following example uses a variable (called, appropriately enough, TexttEdit) for the TextEdit application:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    tell application "Finder" to set TextEdit to the name of application file id "com.apple.TextEdit"
    tell application TextEdit
    using terms from application "TextEdit"
    launch
    make new document with properties {text:"This is a test"}
    end using terms from
    end tell
    </pre>

  • Include variables with minor difference in a loop

    How can I include variables with minor change inside a loop instead of hard code each one?
    For example
    aList = ""A", "B", "C", "D"]
    repeat with i = 1 to 4
      temp = aList[i]
      Variable[temp] = 1 (some calculation)
    end repeat
    The variables would be VariableA, VariableB, VariableC, VariableD...
    It's similar to Actionscript's
       this["q" + i + "_mc"]._x = this["dragTxt" + i]._x - 20;
       this["q" + i + "_mc"]._y = this["dragTxt" + i]._y + 14;
    then the instance is q1_mc, q2_mc etc..
    I remember that I could do similar things in Director but forgot how!
    Thanks for the help,

    Wow. Talk about not seeing the forest through the trees. There's never any good reason to create variables at runtime like that, regardless if there are ways to do it in the scripting language (which there invariably are). Your "on test" handler above uses a whole slew of lists to set up and create a bunch of "dynamic" variables when you should be stopping at lists and property lists (arrays and associative arrays) to do what you want, which is to store your data. The method you currently have conjured up is excessive at best, and bad programming practice at worst (See this link for some good discussion on why it should be avoided: http://programmers.stackexchange.com/questions/103083/how-can-variables-be-created-at-runt ime)
    So, I would do what you want like this:
    -- initialize the property list (associative array, in other scripting languages)
    gUserStatus = [:]
    -- add an entry
    gUserStatus["Bob"] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    -- print the property array to the message window
    put gUserStatus
    -- ["Bob": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
    add a few more users:
    gUserStatus["Mary"] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    gUserStatus["Sue"] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    gUserStatus["Paul"] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    -- get value from property list, based off name
    put gUserStatus["Bob"]
    -- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    -- set value in value list, based off name, then put to message window
    gUserStatus["Bob"][3] = 1
    put gUserStatus["Bob"]
    -- [0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
    so, I can add as many users as I want... as long as they're identified with unique properties (or keys, in other languages). I can even get the count or number of users:
    put gUserStatus.count
    -- 4
    I can easily iterate through them and get/set information:
    cnt = gUserStatus.count
    repeat with i = 1 to cnt
      put "Name: " & gUserStatus.getPropAt(i) & ", Status: " & gUserStatus[i]
    end repeat
    In your example you don't know how many users you have because your variables are being dynamically created at runtime. You could create yet another variable to keep track of that, but why when you have lists and property lists that are perfect structures for this type of associative data?
    There's a huge gap in your understanding how to structure, keep track of, and manipulate data, and it's important to fill it now by learning about lists and property lists (arrays and associative arrays). Doing it now will truly open up a whole new way of programming to you.

  • Variable with RSCUR transaction code - To Be translated

    Hi All,
    I have created a variable with RSCUR transacton code to get user input date.
    This variable prompts in the sap query.
    Upon my SAP super query we have built an universe, to build bo reports.
    As this variable is created with RSCUR transaction code, it is not reflecting with universe designer to get translated.
    Can you please provide me any approach, on taging this variable with other dimension at sap query level or any other approach to solve this issue.
    My requirement is to include it with sap query, to get reflected with universe.
    Please let me know the approach on passing values from one varaible to other variable, which i guess would solve this issue.
    Thanks.

    Hi ,
    U said the t-code RSCUR  its for currecy transation but i dont no y ur talking about date that and all ..
    the variables in bex query are reflected to universe as a filters .
    i think 1st u need to check the check box in bex query properties i.e "Query allow to external access " then only the query will comes in universe level .
    if u want to any changes in the universe go to file and import the universe and then save finally u have to export then only its stored in the CMS ...
    i think its needful to u ................

  • Problems with libraries and plugins - non admin account

    I''ve got a couple of problems with a fresh install of photoshop on my windows Windows 7 64 bits system.
    1. Libraries panel does not work. It displays the following error and interaction is not possible:
    2. 3rd party plugins would load their content.
    3. In the Creative Cloud Application the apps tab would load and displays the "download error" message:
    The funny thing is that all the above errors don't occur on the loacl admin account. So I think this might be a permission problem. I think the most easy sollution would be to work under the admin account, but sadly that's no option (company policy). I am able to extent the rights of the useraccount I work on, but I don't know in wich folders the software needs write permissions. The both Adobe folders in program files and program files (x86) I already changed to full acces for all users. Can someone please help me?

    Problems with libraries and plugins - non admin account https://forums.adobe.com/people/pippyn%20stortelder
    This is a permissions Error.  The other accounts on the computer do have permissions to use / change the administrator settings of these particular items.
    There are two ways you can fix this. 1.) contact the admin of the system and let him know your accounts need read access to these items
    My Preferred method is:
    If you are on a Windows Account, then you can choose those items to run in Administrator mode for all people.  ( win7,64bit )
    Right click the infinity system for creative cloud (creative cloud icon - you would normally click to start the program. (not the one in your service tray, but the one in your menu area with the square red on it.
    choose/click on properties
    choose/click compatibility (tab at the top of the window)
    Last boxed option on this screen is: Run Program As Administrator,  Click that check box.
    Click on  Change Settings for All Users
    in the window that comes up again choose, put an X in the box-  the last option, Run Program As Administrator - Click Apply
    Click OK
    Click OK and the opened preferences window should now be closed.
    You should be able to simply invoke the Cloud app now. But you might want to reboot to safe.
    Depending on the installation methods used for your add-ons, you may have to perform this same process for all add-ins.  I believe that would depend on which account, first installed the add-on and what level of permissions they have.
    Good Luck
    ~elaine.

  • XStream - Deserializing with Properties

    Hi All,
    my problem is about the deserialization of XML-files with XStream. The standard XML-structure looks like that:
    <Inhouse>
    <Date>"12.12.2004"</Date>
    <MadeBy>"SELF"</MadeBy>
    </Inhouse>
    Deserializing such files is no problem, but my converter only works with that format:
    <Inhouse>
    <Date value="12.12.2004"/>
    <MadeBy value="SELF"/>
    </Inhouse>
    So I tried to register the PropertyConverter, but the equal is the same.
    What have i done wrong? I think XStream CAN work with Properties in an XML-Tag, but I don't know how to tell it...
    Please help me
    thx, Holger

    Hi jpsoul,
    Thanks for your response! What I'm trying to do is
    instantiate Child_Instance inside Main so that if I wanted to, I
    could type:
    b.test.visible = true;
    inside of the Main.as file and that would make the test
    movieClip visible upon compiling it. I'm just trying to access
    properties and methods of classes I instantiate whose properties
    reside on a different stage per say.
    Hope that makes sense. =)
    ~e

  • BW 3.5 - Issue with formula variable with replacement path

    Dear experts,
    I'm facing an issue with formula variable with replacement path.
    Just to clarify, I know replacement paths is raising a lot of questions but I've been using this functionnality extensively in the past, both in 7.0 and 3.5, so I'm not looking for basic information about how to use it.
    I'm trying to setup a simple report that would show total values per plant of Purchase Order < 100 €
    To do so I've setup a calculated key figure as follow:
    VAR1 * ("PO value" < 100 ) * "PO value"
    VAR1 is a formula variable with replacement path on 'purchase order' and value attribute 'constant =1'.
    (The report has to show values summarized by plant but should not show the detail PO by PO, so I'm not looking at a solution based on condition)
    The report as characteristic "plant" in rows and my CKF in columns.
    Now let's take an example. I have 3 POs in Plant 1:
    PO1 -> 150€
    PO2 -> 90€
    PO3 -> 80€
    Because of the variable with replacement path, the result in my query should be:
    plant1 = 170 (even though characteristic "purchase order" is not in my rows, system should evaluate PO one by one and return values only for those two that are below 100).
    But the result coming is 320, which is wrong.
    I've done the same report on many other 3.5 systems and it worked perfectly, and I am not able to get proper support from SAP OSS who keep saying that this functionnality is not ready in 3.5 (although I've provided screenshot of this working on another 3.5 system!!! how frustrating...)
    They have also pointed to problems of Before and After aggregation but that has absolutely no impact. Once again, the scenario is working perfectly on other 3.5 systems with the same query design, so i'm sure it has nothing to do with Query Designer options.
    Would anyone have ever come to an equivalenet problem? I'm wondering whether the DB itself could not play a role in the variable with ref  characteristic 'constant =1' ...
    Any though is welcome!
    thanks

    Hi,
    The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
    To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
    Regards,
    Patricia

  • Formula variable with replacement path

    HI ,
    1. Is it possible to use "Customer exist- without user entry variable in the formula variable with the replacement ?
    2. if I use two variable for a same time char in one report (one is User entry variable and the other is customer exit variable for calculating current system date), then how it will work ? (User entry variable is there in the "Char restrictions" section and the customer exit variable is customer exit used in formula variable)
    Thanks in Advance.
    Thanks
    Rajesh

    1. Is it possible to use "Customer exist- without user entry variable in the formula variable with the replacement ?
    Yes. use I_step=1
    I_STEP = 1
    Call takes place directly before variable entry. Can be used to pre populate selection variables
    I_STEP = 2
    Call takes place directly after variable entry. This step is only started up when the same variable is not input ready and could not be filled at I_STEP=1.
    I_STEP = 3 In this call, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called again.
    2. if I use two variable for a same time char in one report (one is User entry variable and the other is customer exit variable for calculating current system date), then how it will work ? (User entry variable is there in the "Char restrictions" section and the customer exit variable is customer exit used in formula variable)
    Yes you can use both the variable of time char to restrict a characteristic but that should not be used on single characteristic.
    You can use the sys defined  0date on one field and the customised one Zsydatum on other char.
    Regards
    KP

  • Formula Variable with replacement path on 0CALDAY

    Hi,
    I am trying to enhance an existing query.
    I am creating a new formula variable processing by replacement path.
    In Reference Characterisitic I have choosen 0CALDAY.
    In the tab options , I selected replacement path.
    In the replacement path tab, in Replacement Rule /replace variable with I am trying to select the variable. But in the variable list I am not able to find 0CALDAY variable, which we have already created and restricting in some other key figures.
    Please help me in this regard.
    Thanks & Regards,
    Madhav

    Hey in the replacement path tab you need to choose either its infoobject or variable from which the value needs to be taken.
    If you choose infoobject you get the options of choosing its attributes etc.
    If you choose variable you get option to choose variable associated.
    But under "General Tab" under reference characteristic you need to choose your CALDAY.
    Hope this helps.
    Edited by: Praveen G on Sep 26, 2008 5:53 AM

  • Formula variable with replacement path on system date

    Hi Experts,
    I got a requirement to calculate "Days without payment" in report level.
    Days without payment = System Date - Payment Date.
    (Payment date field is available in CUBE, but system date field is not available in the CUBE)
    As we know, the difference b/w 2 dates is not possible directly.It can be possible by creating 2 formula variables with replacement paths on the dates and by writing aformula on these 2 formula variables.
    But the thing is I dont have system date readily available, and I tried by using SAP Exit. But we cant create formula variable replacement path on another variable (SAP EXIT).
    Do we have any SAP variable  for formula with replacement path readily avaliable to get system date (or) any other suggession.
    Please suggest me.
    Thanks,
    Sai Chand.S

    Hi Arminder,
    Thanks for your valuable answer.
    I tried doing the same previously.As u said we can get system date by creating customer exit variable.
    But the thing is to find difference b/w 2 dates, we cant do it directly, we need to create 2 formula variables with replacement path.
    1) Var1 = Formula variable with replacement path on system date(custoer exit variable).
    2) Var2 = Formula variable with replacement path on paymanet date.
    Number of days = var1 - var2.
    But as in 1st point, we cant create formula variable with replacement path on another variable, as system date is already a variable of type customer exit.
    We can create replacement paths only on characteristics.
    Please suggest me .
    Thanks,
    Sai Chand.S

Maybe you are looking for