Execute and CanExecute with Delegate

Hi,
I'm trying to create a reactive UI and i have to use Execute and CanExecute to enable/disable buttons.
In my app i have 3 button, validate, refuse and delete.
My problem appear when i use the button delete; i get an error from function CanExecute of button valid. This is a null error.
The button delete is define like this : (he call a setter)
private ICommand _MatinSupprimeCommand = null;
public ICommand MatinSupprimeCommand
get
if (_MatinSupprimeCommand == null)
_MatinSupprimeCommand = new Framework.Windows.DelegateCommand(
() => { // Execute function
TypeCongesMatin = TypeCongesDefaut; //that call a setter of TypeCongesMatin
() => //CanExecute
if (Matin != null)
return true;
return false;
return _MatinSupprimeCommand;
The setter called is defined as following: (Matin variable is delete)
private TypeConges _TypeCongesMatin = null;
public TypeConges TypeCongesMatin
get
return _TypeCongesMatin;
set {
_TypeCongesMatin = value;
if (_TypeCongesMatin.Libcourt.In("P", "WE", "FE"))
if (Matin != null)
DataAccess.EntitiesContext.Context.DeleteObject(Matin);
Matin = null;
RaisePropertyChanged("TypeCongesMatin");
RaisePropertyChanged("TypeCongesMatinSelection");
RaisePropertyChanged("Matin");
RaisePropertyChanged("MatinCouleur");
RaisePropertyChanged("MatinCouleurForeGround");
To finnish my button valid :
private ICommand _MatinValideCommand = null;
public ICommand MatinValideCommand
get
if (_MatinValideCommand == null)
_MatinValideCommand = new Framework.Windows.DelegateCommand(
() => //function to execute
if (Matin != null)
Matin.Status = Presence.StatusDemandeConges.Accepter;
RaisePropertyChanged("MatinCouleur");
RaisePropertyChanged("MatinCouleurForeGround");
() => //Can execute function
if ((Matin != null) && (Matin.Status != Presence.StatusDemandeConges.Accepter)) //When i use my command delete the var Matin is set to null but he conser as non null value and call EstValidant.
return Matin.EstValidant(MainContainerViewModel.Courant.Utilisateur);
return false;
return _MatinValideCommand;
The problem is (Matin != null), in the setter of TypeConges i set matin
to null but in this case he's not consider as null in CanExcute.
If you have any idea.
Edit : I have to give information about the error.
The error is throw by EstValidant.
public bool EstValidant(Personne Validant)
int IDValidant = Validant.ID;
if (this.Personne.MesResponsables.FirstOrDefault(P => P.ID == IDValidant) != null)
return true;
return false;
The error is on Personne.MesResponsables because Personne is null.
Normally the function Validant
should not be
called.
Thanks a lot for all futur answer.
Ps : Sorry for my  terrible english

I set matin to null when i do : MatinSupprimeCommand
i call setter with TypeCongesMatin = TypeCongesDefaut;
I'm doing Matin=null; in the setter of TypeCongeMatin
Matin is defined as following.
private Presence _Matin = null;
public Presence Matin
get { return _Matin; }
set {
if( _Matin != null )
_Matin.PropertyChanged -= MatinDemandeConge_PropertyChangedEventHandler;
_Matin = value;
if (_Matin != null)
_Matin.PropertyChanged += MatinDemandeConge_PropertyChangedEventHandler;
RaisePropertyChanged(this.GetPropertyName(() => Matin));
PropertyChangedEventHandler _MatinDemandeConge_PropertyChangedEventHandler = null;
public PropertyChangedEventHandler MatinDemandeConge_PropertyChangedEventHandler
get
if (_MatinDemandeConge_PropertyChangedEventHandler == null)
_MatinDemandeConge_PropertyChangedEventHandler = new PropertyChangedEventHandler(MatinDemandeConge_PropertyChanged);
return _MatinDemandeConge_PropertyChangedEventHandler;
void MatinDemandeConge_PropertyChanged(object sender, PropertyChangedEventArgs e)
if (e.PropertyName == "CodeStatus")
RaisePropertyChanged(this.GetPropertyName(() => MatinCouleur));
It's little more complicated because i choice a day in calendar via the right click (mouse) and i select a day.
This is a calendar compose by ObservableCollection<Jour>
I load all jours, for each jour set the value of Matin if the personne have something register.
For exemple i
have morning
off on the 01/01/2015, so i set value of matin with this value, else he's set to null.
Depends of the holliday of the guy. By default Matin value is null
I'll try to give more information.
I access to same variable Matin in each CanExecute but one of this command set  him to null and other didn't detect the null value. (it's delegate).
I tried to add copy with Presence matin = Matin; but matin is not null... same problem appear

Similar Messages

  • Granting an admin rights to view and execute a task with user actions

    I am trying to grant an admin the rights to view and execute a new task that i have created from the search results and user actions applet.
    I have added an auth type to the authorization types configuration object with the following:
    <AuthType name="terminateUser" extends="TaskDefinition,TaskInstance,TaskTemplate"/>
    I created a new task and assigned it this auth type. I then created the new admin group and assigned the following permissions:
    <Permission type='terminateUser' rights='View'/>
    I then added this capability to the admin role to which the user has been assigned. This admin role also has the view user capability and has been assigned to the top level of this organization as a controlled organization.
    I also added the task to the user actions configuration so that the menu item appears in the context menu and on the find users page.
    The user can see all users but cannot see the new task. The only thing that is visible is the "view" menu item.
    I have other users that have lots more capabilites that can execute this task with no problems. I am wondering if the view user capability is the problem or is there some other capability that anyone knows of that I must add in order to allow this admin role to view and execute this task.
    Thanks,
    Ruth

    BTW, the answer is to restart the app server. Duh!
    Ruth

  • Execute one cursor with and without different filter condition

    I want to execute one cursor with and without different filter condition
    example :-
    if the account no is null;
         cursor cur is select * from account_master;
    if account no is not null
         cursor cur is select * from account_master where account_no = p_acc_no;

    Braam wrote:
    I want to execute one cursor with and without different filter condition
    example :-
    if the account no is null;
         cursor cur is select * from account_master;
    if account no is not null
         cursor cur is select * from account_master where account_no = p_acc_no;Use Refcursor:
    DECLARE
      refCur     SYS_REFCURSOR;
    BEGIN
      open refCur for 'select col1, col2 from your_table';
      loop
      --Your process logic here
      end loop;
      close refCur;
      open refCur for 'select col1, col2 from your_table where some_condition = is_satisfied';
      loop
      --Your Process logic here.
      end loop;
    END;

  • Execute Broadcaster direct with URL and variables

    Hi,
    is it possible to execute an broaadcaster with an existing setting as an URL command like <SAP_BW_URL CMD='START_BROADCASTER >.
    But i want execute the broadcaster direct in the same like the button below without any user action. It would be very nice to change the variable settings in the same way.
    Brg,
    Frank

    Hi,
    is it possible to execute an broaadcaster with an existing setting as an URL command like <SAP_BW_URL CMD='START_BROADCASTER >.
    But i want execute the broadcaster direct in the same like the button below without any user action. It would be very nice to change the variable settings in the same way.
    Brg,
    Frank

  • Checking Account and help with code ?

    Hi all..my computer hung up on me, so I'm not sure if my last post went through. First of all thank you all for helping me out the other day with my question on the Bank Account. It continues :)
    I'm trying to work on each class one by one..when I test my Checking Account, it isn't printing out the correct balance. The string method to print this is coming from the Withdrawal class...so I know it has to be somewhere in there but I can't seem to figure out why it isn't totalling the balance...or how to get it too.
    Then when I test my MyBank class, it hangs up on line 63..which I could swear I have written correctly. Again I am getting a NullPointerException and I honestly think I have the line of code written right, but I'm guessing I dont.
    Any help would be appreciated.
    public abstract class BankAccount {
        public static final String bankName = "BrianBank";
        protected String custName;
        protected String pin;
        protected Transaction[] history;
        private double balance;
        private double amt, amount;
        private double bal, initBal;
        private int transactions;
        private final int MAX_HISTORY = 100;
        private int acct;
        protected BankAccount(String cname, String cpin, double initBal) {
         custName = cname;
         pin = cpin;
         balance = initBal;
         history = new Transaction[MAX_HISTORY];
         transactions =0;
        public double getBalance() {
         return balance;
        public void withdraw(double amt) {
         history [transactions] = new Withdrawal (bal, amt);
       balance = bal;
         amount = amt;
         balance -= amt;
       transactions = transactions + 1;     
        public void deposit(double amt) {     
         history [transactions] = new Deposit (bal, amt);
         balance = bal;
         amount = amt;
         balance += amt;
         transactions = transactions +1;
        // abstract method to return account number
        public abstract int getAcctNum();
        // abstract method to return a summary of transactions as a string
        public abstract String getStatement();
    public class CheckingAccount extends BankAccount implements IncursFee
          private int transactions;
          private double balance, initBal, amt;
          private static final int NOFEE_WITHDRAWALS = 10;
          private static final double TRANSACTION_FEE = 5.00;
          public static final String bankName = "iBank";
          public static final int STARTING_ACCOUNT_NUMBER = 10000;
          private int checkingAccountNumber = STARTING_ACCOUNT_NUMBER;
          private static int accountNumberCounter = STARTING_ACCOUNT_NUMBER;
          private String custName;
          private String pin;
          public CheckingAccount (String cname, String cpin, double initBal)
             super (cname, cpin, initBal);
              custName = cname;
              pin = cpin;
             balance = initBal;
             accountNumberCounter++; 
             checkingAccountNumber = accountNumberCounter;
          //initialize a count of transactions
             transactions = 0;          
           public double getBalance()
             return balance;
           public void withdraw(double amt)
            super.withdraw (amt);
             transactions ++;
           public void deposit(double amt)
           super.deposit (amt);
             transactions ++;
           public int getAcctNum ()
             return checkingAccountNumber;     
           public String getStatement ()
             int i = 0;
             String output = "";
             while ( i < history.length && history[i] != null )
                output += history.toString () + "\n";
    i++;
    return output;     
    public void deductFee(double fee)
    if (transactions > NOFEE_WITHDRAWALS)
    {  fee = TRANSACTION_FEE *(transactions - NOFEE_WITHDRAWALS);
    super.withdraw(fee);
    balance -=fee;
    transactions = 0;
    public interface IncursFee {
    public abstract void deductFee(double fee);
    public abstract class Transaction {
    protected double initBal;
    protected double tranAmt;
    // constructor
    protected Transaction(double bal, double amt) {
         initBal = bal;
         tranAmt = amt;
    abstract public String toString();
    public class Withdrawal extends Transaction
         private double initBal;
         private double amount;
         private static NumberFormat fmt = NumberFormat.getCurrencyInstance();
         public Withdrawal (double bal, double amt)
              super (bal, amt);
              initBal = bal;
              amount = amt;
         public String toString ()
         return "Balance : " + fmt.format(initBal) + "\n" + "Withdrawal : " + fmt.format(amount);
    import java.text.NumberFormat;
    public class Deposit extends Transaction
         private double initbal, balance;
         private double amount;
         private static NumberFormat fmt = NumberFormat.getCurrencyInstance();
         public Deposit (double bal, double amt)
         super (bal, amt);
         initbal = bal;
         amount = amt;
         public String toString ()
         return "Balance : " + fmt.format(initbal) + "\n" + "Deposit : " + fmt.format(amount);
    public class TestCheckingAcct {
    public static void main(String[] args) {
         BankAccount b1 = new CheckingAccount("Harry", "1234", 500.0);
         System.out.println (b1.getBalance ());
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.deposit(50);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.deposit(10);
         b1.withdraw(1);
         System.out.println(b1.getStatement());
    // This interface specifies the functionality requirements of a bank
    public interface Bank {
    public abstract int openNewAccount(String customerName, String customerPIN, String accType, double initDepAmount);
    public abstract void processWithdrawal(int accNum, String pin, double amount);
    // executes a deposit on the specified acct by the amount
    public abstract void processDeposit(int accNum, String pin, double amount);
    // returns the balance of acct
    public abstract double processBalanceInquiry(int accNum, String pin);
    // returns summary of transactions
    public abstract String processStatementInquiry(int accNum, String pin);
    import java.util.ArrayList;
    public class MyBank implements Bank
    private ArrayList<BankAccount> savAccounts = new ArrayList<BankAccount>(); //dynamically grows
    private ArrayList<BankAccount> chkAccounts = new ArrayList<BankAccount>(); //dynamically grows
    private SavingsAccount sav;
    private CheckingAccount chk;
    private int accNum;
    private String customerName, customerPIN, accType, pin;
    private double initDepAmount, amount, balance;
    public int openNewAccount(String customerName, String customerPIN, String accType, double initDepAmount)
    this.customerName = customerName;
    this.customerPIN = customerPIN;
    this.accType = accType;
    this.initDepAmount = initDepAmount;
    if ( accType.equals("Savings"))
    BankAccount savAcct = new SavingsAccount(customerName, customerPIN, initDepAmount);
    try
    savAccounts.add(savAcct);
    catch (ArrayIndexOutOfBoundsException savAccounts)
    return savAcct.getAcctNum();
    else
    CheckingAccount chkAcct = new CheckingAccount(customerName, customerPIN, initDepAmount);
         try
    chkAccounts.add(chkAcct);
    catch (ArrayIndexOutOfBoundsException chkAccounts)
    return chkAcct.getAcctNum();
    public void processWithdrawal (int accNum, String pin, double amount)
         this.accNum = accNum;
         this.pin = pin;
         this.amount = amount;
    if (accNum >10000 && accNum < 20000)
         chk.withdraw (amount);
    if (accNum >50000 && accNum <60000)
         sav.withdraw (amount);
    public void processDeposit (int accNum, String pin, double amount)
         this.accNum = accNum;
         this.pin = pin;
         this.amount = amount;
    if (accNum >10000 && accNum < 20000)
         chk.deposit (amount);
    if (accNum >50000 && accNum <60000)
         sav.deposit (amount);
    public double processBalanceInquiry (int accNum, String pin)
         this.accNum = accNum;
         this.pin = pin;
         this.balance = 0;
    if (accNum >10000 && accNum <20000)
         balance = chk.getBalance ();
    if (accNum >50000 && accNum <60000)
         balance = sav.getBalance ();
    return balance;
    public String processStatementInquiry(int accNum, String pin)
         this.accNum = accNum;
         this.pin = pin;
         this.statement = "";
    if (accNum >10000 && accNum <20000)
    statement = chk.getStatement ();
    if (accNum >50000 && accNum <60000)
    statement= sav.getStatement ();
         return statement;

    Here's some quick code review:
    public abstract class BankAccount {
    public static final String bankName =
    me = "BrianBank";
    protected String custName;
    protected String pin;
    protected Transaction[] history;
    private double balance;
    private double amt, amount;
    private double bal, initBal;
    private int transactions;// make MAX_HISTORY private static final, too.
    private final int MAX_HISTORY = 100;
    private int acct;
    protected BankAccount(String cname, String cpin,
    pin, double initBal) {
         custName = cname;
         pin = cpin;
         balance = initBal;
         history = new Transaction[MAX_HISTORY];
         transactions =0;
    public double getBalance() {
         return balance;
    public void withdraw(double amt) {
         history [transactions] = new Withdrawal (bal, amt);
    balance = bal;
         amount = amt;
         balance -= amt;// ++transactions above would be elegant.
    transactions = transactions + 1;     
    public void deposit(double amt) {     
         history [transactions] = new Deposit (bal, amt);
         balance = bal;
         amount = amt;
         balance += amt;
         transactions = transactions +1;
    // abstract method to return account number// why abstract?
    public abstract int getAcctNum();
    // abstract method to return a summary of
    y of transactions as a string// why abstract?
    public abstract String getStatement();
    public class CheckingAccount extends BankAccount
    implements IncursFee
    private int transactions;
    private double balance, initBal, amt;
    private static final int NOFEE_WITHDRAWALS =
    WALS = 10;
    private static final double TRANSACTION_FEE =
    _FEE = 5.00;
    public static final String bankName = "iBank";
    public static final int STARTING_ACCOUNT_NUMBER
    NUMBER = 10000;
    private int checkingAccountNumber =
    mber = STARTING_ACCOUNT_NUMBER;
    private static int accountNumberCounter =
    nter = STARTING_ACCOUNT_NUMBER;// BankAccount has a custName attribute; why does CheckingAccount need
    // one if it extends BankAccount?
    private String custName;
    private String pin;
    public CheckingAccount (String cname, String
    String cpin, double initBal)
    super (cname, cpin, initBal);
    custName = cname;
    pin = cpin;
    balance = initBal;
    accountNumberCounter++;
    checkingAccountNumber =
    tNumber = accountNumberCounter;
    //initialize a count of transactions
    transactions = 0;          
    // same as BankAccount - why rewrite it?
    public double getBalance()
    return balance;
    // same as BankAccount - why rewrite it?
    public void withdraw(double amt)
    super.withdraw (amt);
    transactions ++;
    // same as BankAccount - why rewrite it?
    public void deposit(double amt)
    super.deposit (amt);
    transactions ++;
              // same as BankAccount - why rewrite it?
    public int getAcctNum ()
    return checkingAccountNumber;     
    public String getStatement ()
    int i = 0;
    String output = "";
    while ( i < history.length && history[i] !=
    ory[i] != null )
    output += history.toString () + "\n";
    i++;
    return output;     
    public void deductFee(double fee)
    if (transactions > NOFEE_WITHDRAWALS)
    {  fee = TRANSACTION_FEE *(transactions -
    ansactions - NOFEE_WITHDRAWALS);
    super.withdraw(fee);
    balance -=fee;
    transactions = 0;
    public interface IncursFee {
    public abstract void deductFee(double fee);
    public abstract class Transaction {
    protected double initBal;
    protected double tranAmt;
    // constructor
    // why protected? make it public.
    protected Transaction(double bal, double amt) {
         initBal = bal;
         tranAmt = amt;
    abstract public String toString();
    public class Withdrawal extends Transaction
         private double initBal;
         private double amount;
    private static NumberFormat fmt =
    = NumberFormat.getCurrencyInstance();
         public Withdrawal (double bal, double amt)
              super (bal, amt);
              initBal = bal;
              amount = amt;
         public String toString ()
    return "Balance : " + fmt.format(initBal) + "\n" +
    + "Withdrawal : " + fmt.format(amount);
    import java.text.NumberFormat;
    public class Deposit extends Transaction
         private double initbal, balance;
         private double amount;
    private static NumberFormat fmt =
    = NumberFormat.getCurrencyInstance();
         public Deposit (double bal, double amt)
         super (bal, amt);
         initbal = bal;
         amount = amt;
         public String toString ()
    return "Balance : " + fmt.format(initbal) + "\n" +
    + "Deposit : " + fmt.format(amount);
    public class TestCheckingAcct {
    public static void main(String[] args) {
    BankAccount b1 = new CheckingAccount("Harry",
    , "1234", 500.0);
         System.out.println (b1.getBalance ());
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.deposit(50);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.withdraw(1);
         b1.deposit(10);
         b1.withdraw(1);
         System.out.println(b1.getStatement());
    // This interface specifies the functionality
    requirements of a bank
    public interface Bank {
    public abstract int openNewAccount(String
    String customerName, String customerPIN, String
    accType, double initDepAmount);
    public abstract void processWithdrawal(int
    (int accNum, String pin, double amount);
    // executes a deposit on the specified acct by
    t by the amount
    public abstract void processDeposit(int accNum,
    Num, String pin, double amount);
    // returns the balance of acct
    public abstract double processBalanceInquiry(int
    (int accNum, String pin);
    // returns summary of transactions
    public abstract String
    ring processStatementInquiry(int accNum, String
    pin);
    import java.util.ArrayList;
    public class MyBank implements Bank
    private ArrayList<BankAccount> savAccounts =
    unts = new ArrayList<BankAccount>(); //dynamically
    grows
    private ArrayList<BankAccount> chkAccounts =
    unts = new ArrayList<BankAccount>(); //dynamically
    grows
    private SavingsAccount sav;
    private CheckingAccount chk;
    private int accNum;
    private String customerName, customerPIN,
    erPIN, accType, pin;
    private double initDepAmount, amount, balance;
    public int openNewAccount(String customerName,
    erName, String customerPIN, String accType, double
    initDepAmount)
    this.customerName = customerName;
    this.customerPIN = customerPIN;
    this.accType = accType;
    this.initDepAmount = initDepAmount;
    if ( accType.equals("Savings"))
    BankAccount savAcct = new
    vAcct = new SavingsAccount(customerName, customerPIN,
    initDepAmount);
    try
    savAccounts.add(savAcct);
    catch (ArrayIndexOutOfBoundsException
    Exception savAccounts)
    return savAcct.getAcctNum();
    else
    CheckingAccount chkAcct = new
    hkAcct = new CheckingAccount(customerName,
    customerPIN, initDepAmount);
         try
    chkAccounts.add(chkAcct);
    catch (ArrayIndexOutOfBoundsException
    Exception chkAccounts)
    return chkAcct.getAcctNum();
    public void processWithdrawal (int accNum,
    accNum, String pin, double amount)
         this.accNum = accNum;
         this.pin = pin;
         this.amount = amount;
    if (accNum >10000 && accNum < 20000)
         chk.withdraw (amount);
    if (accNum >50000 && accNum <60000)
         sav.withdraw (amount);
    public void processDeposit (int accNum, String
    String pin, double amount)
         this.accNum = accNum;
         this.pin = pin;
         this.amount = amount;
    if (accNum >10000 && accNum < 20000)
         chk.deposit (amount);
    if (accNum >50000 && accNum <60000)
         sav.deposit (amount);
    public double processBalanceInquiry (int accNum,
    String pin)
         this.accNum = accNum;
         this.pin = pin;
         this.balance = 0;
    if (accNum >10000 && accNum <20000)
         balance = chk.getBalance ();
    if (accNum >50000 && accNum <60000)
         balance = sav.getBalance ();
    return balance;
    public String processStatementInquiry(int accNum,
    m, String pin)
         this.accNum = accNum;
         this.pin = pin;
         this.statement = "";
    if (accNum >10000 && accNum <20000)
    statement = chk.getStatement ();
    if (accNum >50000 && accNum <60000)
    statement= sav.getStatement ();
         return statement;
    Very bad style with those brace placements. Pick a style and stick with it. Consistency is the key.
    Your code isn't very readable.
    You don't have a SavingsAccount here anywhere, even though your MyBank uses one.
    You use JDK 1.5 generics yet you've got ArrayList as the static type on those declarations. Better to use the interface type List as the compile time type on the LHS.
    You have a lot of compile time problems, and some incomprehensible stuff, but I was able to change it enough to my TestCheckingAcct run to completion. No NPE exceptions.
    I'm not sure I agree with your design.
    No SavingsAccount. The accounts I have ALL incur fees - no need for a special interface there. Savings accounts are usually interest bearing. That's the way they behave differently from checking accounts. Where do you have that?
    You rewrite too much code. If you put behavior in the abstract BankingAccount class (a good idea), the whole idea is that concrete classes that extend BankingAccount don't need to overload any methods whose default behavior is correct for them.
    I don't know that I'd have separate Deposit and Withdrawal to implement Transaction. I'd make Transaction concrete and have starting balance, ending balance, and a transaction type String (e.g., "DEPOSIT", "WITHDRAWAL")
    It'd be good to see some thought put into exception handling. I don't see an OverdrawnException anywhere. Seems appropriate.
    No transfer methods from one account to another. I often do that with my bank.
    That's enough to get started.

  • Cannot clear document posted with FBS1 and Reversed with F.81 in F-03

    We have recently turned on OIM for a Balance Sheet account and are in the process of clearing it.  The postings in this account were generated with FBS1 (Accrual/Deferral Document) and reversed with F.81.
    Majority of the documents displayed with FBL3N cleared no problem after open item management was turned on, however, there are a handful that are not displayed in F-03 (or F.13).
    Please consider the following when answering:
    OIM was turned on for the account using ZRFSEPA02 (Copy of the standard/not-delivered program for turning on OIM).
    All of the entries were reversed with F.81 and the header of the documents does not contain a "Reversal Date".
    I have already tried turning off OIM with ZRFSEPA03 and then turning it back on again with ZRFSEPA02.
    My settings in FS00 are correct for the GL Account.
    Hundreds of items were cleared.  There are 7 documents that don't appear in F-03 or F.13
    Also, please do not give me "Beginner level" information such as "Tick the OIM box for the GL Account in FS00" (You cannot turn on OIM in that manner for an account that has line items posted to it - I have been doing R/3 Configuration for 23 years, so I am an advanced Analyst in the FI/CO Area).
    Thanks - Back to searching OSS!

    Hi,
    Actually when report is executed we get following message
    Do not use the report program to set up open item management for the
    account.
    Create a new account with the correct account assignment. Post your
    items to the new account. If you want to use the original account
    number, you must bring the account balance to zero, change the account
    assignment, and repost the items. You can remove the old items by
    archiving the documents.
    Hence, it is risky to execute this report.
    Are you getting these documents in FB03 ?
    Regards,
    Tejas

  • Issue on How to mimic Deski document from CMS to local machine, pass parameter, execute and save in a mutiple report format then store in a network drive.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Would you know if there's a way to mimic Deski
    document from BOXI server(CMS) to local machine, pass parameter, execute and
    save in a mutiple report format then store in a local drive or network
    drive? Most examples and tutorials in BO XI R2 I've seen are scheduling while drilling report is for web intelligence only and not desktop intelligence.  Please let me know your ideas. I would really appreciate your help. Thanks.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Hi Ted,
    Thanks for the reply.The file is not available in the server. Though, I checked CMS and I found an instance in history tab and the status is failed with error below. 
                Error Message:
                A variable prevented the data provider Query 1 with BANRRD30 from being refreshed. (DMA0008).When I checked my codes, I found out that the object Im using is for web intelligence data provider. However, I cannot find any documentation and example for passing parameter values in desktop intelligence data provider. Any idea on this? You think this is not suported by Report Engine SDK?Thanks.    

  • Sql query slowness due to rank and columns with null values:

        
    Sql query slowness due to rank and columns with null values:
    I have the following table in database with around 10 millions records:
    Declaration:
    create table PropertyOwners (
    [Key] int not null primary key,
    PropertyKey int not null,    
    BoughtDate DateTime,    
    OwnerKey int null,    
    GroupKey int null   
    go
    [Key] is primary key and combination of PropertyKey, BoughtDate, OwnerKey and GroupKey is unique.
    With the following index:
    CREATE NONCLUSTERED INDEX [IX_PropertyOwners] ON [dbo].[PropertyOwners]    
    [PropertyKey] ASC,   
    [BoughtDate] DESC,   
    [OwnerKey] DESC,   
    [GroupKey] DESC   
    go
    Description of the case:
    For single BoughtDate one property can belong to multiple owners or single group, for single record there can either be OwnerKey or GroupKey but not both so one of them will be null for each record. I am trying to retrieve the data from the table using
    following query for the OwnerKey. If there are same property rows for owners and group at the same time than the rows having OwnerKey with be preferred, that is why I am using "OwnerKey desc" in Rank function.
    declare @ownerKey int = 40000   
    select PropertyKey, BoughtDate, OwnerKey, GroupKey   
    from (    
    select PropertyKey, BoughtDate, OwnerKey, GroupKey,       
    RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]   
    from PropertyOwners   
    ) as result   
    where result.[Rank]=1 and result.[OwnerKey]=@ownerKey
    It is taking 2-3 seconds to get the records which is too slow, similar time it is taking as I try to get the records using the GroupKey. But when I tried to get the records for the PropertyKey with the same query, it is executing in 10 milliseconds.
    May be the slowness is due to as OwnerKey/GroupKey in the table  can be null and sql server in unable to index it. I have also tried to use the Indexed view to pre ranked them but I can't use it in my query as Rank function is not supported in indexed
    view.
    Please note this table is updated once a day and using Sql Server 2008 R2. Any help will be greatly appreciated.

    create table #result (PropertyKey int not null, BoughtDate datetime, OwnerKey int null, GroupKey int null, [Rank] int not null)Create index idx ON #result(OwnerKey ,rnk)
    insert into #result(PropertyKey, BoughtDate, OwnerKey, GroupKey, [Rank])
    select PropertyKey, BoughtDate, OwnerKey, GroupKey,
    RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]
    from PropertyOwners
    go
    declare @ownerKey int = 1
    select PropertyKey, BoughtDate, OwnerKey, GroupKey
    from #result as result
    where result.[Rank]=1
    and result.[OwnerKey]=@ownerKey
    go
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Execute SQL Task with Parameter - from DB2 to SQL Server

    I am pulling data from DB2 to SQL Server.
    1st Execute SQL task runs the following against DB2:
    SELECT TIMESTAMP(CHAR(CURRENT_DATE - (DAY(CURRENT_DATE)-1) DAYS - 1 MONTH)) as START_MONTH
    FROM SYSIBM.SYSDUMMY1;
    I'm storing it as a Result Set.
    Next I have a Data Flow Task.  This pulls data from DB2 where the date matches the parameter.
    FROM SCHEMA.TABLE t
    WHERE DATE_TIME_COLUMN= ?
    This works fine. Guessing, because the parameter source is DB2 and the Data Flow source is DB2.
    The problem is, I want to remove existing data for the same date in the SQL table.  IE, if I'm pulling March 2014 data from DB2, I want to be sure there is no March 2014 data in the SQL table.  The main use is for re-runs.
    So, I added another Execute SQL task after the first one that assigns the variable, and before the Data Flow Task. This runs the following statement against SQL Server:
    DELETE FROM
    database.dbo.table
    WHERE DATE_TIME_FIELD >= ?
    The package fails at the new Execute SQL Task with the following error message:
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "DELETE FROM
    SBO.dbo.tblHE_MSP_FEE_BUCKETS
    WHERE T..." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
    Task failed: Execute SQL Task
    SSIS package "Load_MSP_Fee_Buckets_SQL.dtsx" finished: Success.
    The program '[14240] Load_MSP_Fee_Buckets_SQL.dtsx: DTS' has exited with code 0 (0x0).
    I am assuming this is something to do with the Parameter source being DB2, and trying to use against SQL?
    Any suggestions on how to make this work??
    Thanks,
    -Al H

    Parameter name is unrecognized
    is the key, how come DB2 is related if it runs against SQL Server
    What I think is happening you do not use the OLEDB connection to SQL Server.
    Likewise, if it is ADO then the query needs to be
    DELETE FROM
    database.dbo.table
    WHERE DATE_TIME_FIELD >= @MyDate
    Arthur My Blog

  • How to execute a transaction with a different user from the logged user?

    Hello Experts!
    I'm trying to find out a solution about this scenario: our users need to release a Purchase Order (ME28) and/or a Service Entry Sheet (ML85) in SAP from a WEB based application through TIBCO, but the requirement is to execute this operation with the same SAP User name of the user (with his authorization) and not with the TIBCO user that is logged to SAP.
    Is there someone that could suggest me a real time solution and how to develop it? I really appreciate your contribute and I'm at your disposal for any further information.
    Thank you very much!
    Alessandro

    Hi Rob!
    Thank you for your help, but I can't apply this solution, because we need to execute the transaction with a specific user name and not a generic user, besides our user have different authorization, for example the user Mr. Rossi can release only his Purchase Order but not the PO of another user Mr. Bianchi. Moreover we need to see the PO released/modified from a specif user name. So this is our constraint.
    Bye Ale.

  • ADF how can i execute a query with parameters when the page renders

    hi
    i am using ADF web 11g
    i need to execute a query with parameters when the page renders
    thanks

    hello,
    I'm a fan of Java code, I really am.
    But when you use ADF, you decided to move to a more declarative environment.
    So why not do it declarative, the adf way?
    In your pagedef insert a action binding.
    This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
    Create an invokeAction in your pagedef and set the condition.
    This example refreshes(Action 2 is execute query) the data.
    First the method binding:
        <action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
                DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
        <invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
    -Anton
    PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming.

  • Xhtmlb: tabStrip - how to execut a page with flow logic

    Hello all, how do I execute a "page with flow logic" from a "tabStrip".  Currently I am using a "page fragment".  But I need to change to a "page with flow logic" becuase of a technical issue. 
    Is it possible to tell which tab was selected using event processing?  When I try, I am getting "illegal reference". 
    Here is a sample of my current code.
    <xhtmlb:tabStrip id            = "TABSTRIP"
                     viewState     = "EXPANDED"
                     viewStateMode = "COLLAPSED_EXPANDED"
                     tooltip       = "Choose tab" >
      <xhtmlb:tabStripItem name  = "Home"
                           title = "Home" >
        <%@include file="home.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "Medical"
                           title = "Medical" >
        <%@include file="medical.htm" %> 
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "Dental"
                           title = "Dental" >
        <%@include file="dental.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "Vision"
                           title = "Vision" >
        <%@include file="vision.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "FlxSpnd"
                           title = "Flexible Spending" >
        <%@include file="home.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "Other"
                           title = "Other" >
        <%@include file="home.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "RevSub"
                           title = "Review and Submit" >
        <%@include file="home.htm" %>
      </xhtmlb:tabStripItem>
    </xhtmlb:tabStrip>
    What would I replace the "page frament" with?
    Thanks in advance for your help, Troy

    Hi Troy,
      If i understood your requirement i think you need to move to other pages or views when the tabstrip items or clicked. If your requirement is the above one below is the explanation....
    In the layout you include a attribute  onSelect        = "mySelect" in the tag  xhtmlb:tabStrip.
    For event handling in the oninputprocessing you write the below code,
       CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    DATA: TABSTRIP TYPE REF TO CL_XHTMLB_TABSTRIP.
    Reading Data from Toolbar
    TABSTRIP ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
                                            NAME    = 'xhtmlb:tabstrip'
                                            ID      = 'tb3' ).
    Optional: test that this is an event from HTMLB library.
    IF EVENT_ID = CL_HTMLB_MANAGER=>EVENT_ID.
    Scenario 1: Read event from manager.
      DATA: EVENT TYPE REF TO IF_HTMLB_DATA.
      EVENT = CL_HTMLB_MANAGER=>GET_EVENT_EX( RUNTIME->SERVER->REQUEST ).
    DATA: request_event TYPE REF TO cl_xhtmlb_event.
    request_event ?= event.
    IF EVENT IS NOT INITIAL AND EVENT->EVENT_NAME =
    CL_XHTMLB_TABSTRIP=>CO_EVENT_NAME.
    *---here you can handle the event... 
    ENDIF.
    ENDIF.
    Regards,
    Azaz Ali.

  • How to print a pdf file of compounds A3 and A4 with adobe mac

    how to print a pdf file of compounds A3 and A4 with adobe mac, windows with the option I choose paper source by PDF page size mac but I can not find it. how to get it thank you

    I think if you use the start-command, the execution is asynchronously and you won't get the correct process-id. Try to execute Acorbat directly without the cmd /c start in front of it.

  • How can I compile all functions, procedures and packages with a script?

    I need to compile all functions, procedures and packages of 5 schemas (users) with a script.
    How can I do it?
    Thanks!

    you can create a script to select all invalid objects in those schemas Since Oracle 8 introduced NDS this approach has struck me as a trifle old fashioned. It's much simpler to loop round the query in PL/SQL and use EXECUTE IMMEDIATE to fire off the DDL statements. No scripts, no muss, no fuss.
    Having said that, the problem with this approach and also with using DBMS_UTILITY.COMPILE_SCHEMA is that they do not compile all the invalid objects in dependency order. This may result in programs being invalidated by the subsequent compilation of dependencies. This is due to the introduction of Java into the database.
    The UTLRP script is much better, because it (usually) avoids cyclic references. But you still may need to run it more than once.
    In general it is better to avoid sledgehammer recompilations (like DBMS_UTILITY.COMPILE_SCHEMA, which starts by invalidating all the objects). If we have twenty invalid objects, nineteen of which are dependencies of the twentieth, we actually only need to recompile the master object, as recompiling it will trigger the recompilation of all the others.
    Cheers, APC

  • HELP: SSIS 2012 - Execute SQL Task with resultset to populate user variables produces DBNull error

    I am experiencing an unexplainable behavior with the Execute SQL Task control in SSIS 2012. The following is a description of how to simulate
    the issue I will attempt to describe:
    1. Create a package and add two variables User::varTest1 and User::varTest2 both of String type with default value of "Select GetDate()"
    for each, have shown this to not matter as the same behavior occurs when using a fixed string value or empty string value.
    2. Add a new Execute SQL Task to the control flow.
    3. Configure an OLE DB connection.
    4. Set SQLSourceType = "Direct Input"
    5. Set the ResultSet property of the task to "Single Row"
    6. In the ResultSet tab add two results as follows: 
    Result Name: returnvalue1, Variable Name: User::varTest1
    Result Name: returnvalue2, Variable Name: User::varTest2
    7. Set an expression for the SqlStatementSource property with a string value of "Select 'Test' returnvalue1, 'Testing' returnvalue2'"
    The idea is that the source would be dynamically set in order to run a t-sql statement which would have dynamic values for database name
    or object that would be created at runtime and then executed to set the user variable values from its resultset. Instead what occurs is that a DBNull error occurs.
    I am not sure if anyone else has experienced this behavior performing similiar actions with the Execute SQL Task or not. Any help would be
    appreciated. The exact message is as follows:
    [Execute SQL Task] Error: An error occurred while assigning a value to variable "varRestoreScript": "The type of the value
    (DBNull) being assigned to variable "User::varRestoreScript" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.
    User::varRestoreScript is the first return value. And even with the a dummy select the same result occurs. I have narrowed the issue down
    to the T-SQL Statement structure itself. 
    The following works just fine within the execute sql task control as long as no resultset is configured for return:
    "Declare @dynamicSQL nvarchar(max)
    Select @dynamicSQL = name 
    From sys.databases 
    Where name = 'master'
    Select atest_var1=@dynamicSQL, atest_var2='static'"
    I have tried various iterations of the script above with no success. However, if I use the following derivative of it the task completes
    successfully and variables are set as expected.  This will not work for my scenario however as I need to dynamically build a string spanning multiple resultsets to build one of the variable values.
    "Select atest_var1=name, atest_var2='static'
    From sys.databases
    Where name = 'master'
    I have a sample package which can reproduce this issue using the above code.  You can get to that through the post on www.sqlservercentral.com/Forums/Topic1582670-364-1.aspx
    Scott

    Arthur,  the query when executed doesn't return a null value for the @dynamicSQL variable.  It returns "master" as a string value.  Even the following fails which implements that suggestion:
    Declare @dynamicSQL as nvarchar(max)
    Select @dynamicSQL = name
    From master.sys.databases 
    Where name = 'master' -- (or any other DB name)
    I believe I have found the cause of the issue.  It is datatype and size related.  The above script will properly set the variables in the resultset as long as you don't use nvarchar(max) or varchar(max).  This makes the maximum data size for
    a String variable 4000 characters whether unicode or non-unicode typed.

Maybe you are looking for

  • ITunes 10.5 just will not Sync correctly/at all

    Over hours and hours and hours I have been failing with this. First my iPhone with iOS 5 would not sync anything - it says it has, gives no error, but just gives me Ghost images on the iPhone with nothing in them. Finally got my music synced by disco

  • I have a 2cd Generation iPod touch and it will not read on finder or iTunes.

    My friend comes to me anything and everything I.T, especially when it comes to his iPod. He came to me the other day, Tuesday to be exact and told me his iPod wasn't showing up on his computer. We both have MacBook Airs as given to us by our school.

  • 2009 MacBook Pro Hard Drive Issues

    My MBP has been unusable now for well over 5 months. The problem was that the internal hard drive was simply not being recognized most of the time. Occasionally it would show up but erasing, partitions, and installations all failed. I searched for a

  • Watching on my tv

    How do I hook my macbook up to my tv in order to see my editing on a bigger screen? The Apple guy at the shop told me to get a svideo/dv cable, but the Bestbuy guy said there's no such thing.???? Ideas?

  • Is there any iSCSI Initiator for Lion OS?

    Hi everyone. I had being using a QNAP nass for a while now. I had frew iSCSI disk for all my files. The software I used was globalSAN iSCSI Initiator for OS X. After installing the new Apple Lion OS my iSCSI desapear. The initiator does not work any