How to check first value occurance

Hi,
I have a requirement as below---
I have a member 'status' which displays the status of various projects across the budget years and alongwith their relevant projection years. Now I have to check that when a project was first started by checking that when the status for a specific project is not missing for the first time. I could not be able to write any script which can track the first occurance as aforesaid.
Can anybody help me showing how it can be handled in calc-script in hyperion essbase ver 9.3.1?
Regards.

create a member called Project Month (or anything you want)
Fix(level zero members of dimensions)
"Project Start"(
IF(Status/Status <> #Missing and @prior(Status)/@prior(Status) == #Missing)
"Project Month" = 1;
ENDIF
EndFIX
If you wanted to get fancy, you could increment the Project Month by 1 for every month that has a status
putting and Else statement in
"Project Start"(
IF(Status/Status <> #Missing and @prior(Status)/@prior(Status) == #Missing)
"Project Month" = 1;
ELSEIF Status/Status <> #Missing and @prior(Status)/@prior(Status) <> #Missing
"Project Month" = @Prior(Project Month") + 1;
ELSE
#MISSING
ENDIF
)

Similar Messages

  • How to check a value for paramter query

    I am passing a paramter value from my text box to my sql statement and I would like to check if the value is entered into a text box. If you have any idea please share it with me, i have been struggling with this for many days.Code below is how i try to check if the value is entered but I do not know how to check the value in the :VendorName
    thanks
    If Not txtVendorName.Text = "" Then
    Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
    End If

    Sorry guys english is not my first language and i will try to be clear and specific.
    I have a search page where customeres can do searching either using a text box or two dropdowns i have on my page. they have the option of doing search either using a text box or dropdowns or both.Everything seems to work fine but if users does not leave the text box blank. but they leave the text box blank and do searching using the two dropdowns then the page comes up empty and i checked my query and i should get a value. Attacehed my code for you to look at it.
    <pre>
    Sub VendorSearch()
    gvSearch.Visible = True
    Dim MinPDate As String = drPur.SelectedItem.ToString
    Dim MaxMDate As String = drPurM.SelectedItem.ToString
    Dim liThisOne As ListItem
    Dim strState As String = ""
    For Each liThisOne In lstState.Items
    If liThisOne.Selected Then
    strState = strState & "'" & liThisOne.Value & "'" & ","
    End If
    Next
    Dim Sql As String = " SELECT distinct V.VENDOR ""Vendor Id"",R.ADDRNUM,V.VNAMEL ""Vendor Name"",R.AADDR1,R.ACITY,R.VASST1, "
    Sql = Sql & "R.ASTATE State,R.AZIPCODE, to_char(Max(P.DATEPUR),'YYYY/DD/MM') ""Plan Purchased Date"" , "
    Sql = Sql & "TRIM (r.aaddr1 || decode(trim(r.aaddr2),null,'',' - ') || r.aaddr2) Address,"
    Sql = Sql & " substr(decode(trim(r.vasst1),null, 'N/A','000/000-0000?','N/A','000/000-0000','N/A', r.vasst1),1,12) Fax, "
    Sql = Sql & " substr(decode(trim(r.aphone),null, 'N/A','000/000-0000?','N/A', r.aphone),1,12)Phone "
    Sql = Sql & "FROM VENDOR V,VENDADDR R, PLANHOLD P "
    Sql = Sql & "WHERE V.VENDOR = R.VENDOR AND P.VENDOR = R.VENDOR "
    Sql = Sql & " AND (P.DATEPUR >= TO_DATE('1999-01-01','YYYY-MM-DD')) "
    Sql = Sql & "AND P.DATEPUR In ( select Max(P.DATEPUR) from PLANHOLD P where P.vendor = R.VENDOR) "
    'If txtVendorName.Text <> "" Then
    ' Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
    'End If
    If (strState.Length > 0 And lstState.SelectedIndex <> 0) Then
    strState = Left(strState, strState.Length - 1)
    strState = "(" & strState & ")"
    Sql = Sql & "AND R.ASTATE IN " & strState
    End If
    If (drPur.SelectedIndex <> 0 And drPurM.SelectedIndex <> 0) Then
    Sql = Sql & " AND to_number(to_char(p.datepur, 'YYYY')) between " & "'" & MinPDate & "'" & " AND " & "'" & MaxMDate & "'"
    End If
    ' Dim Para As String
    ' SqlDataSource1.SelectParameters.
    If Not txtVendorName.Text = "" Then
    Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
    End If
    'If Not IsDBNull(SqlDataSource1.SelectParameters(":VendorName")).val Then
    ' Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
    'End If
    Sql = Sql & " AND V.VOBSOLET = 'N' "
    Sql = Sql & "GROUP BY V.VENDOR, R.ADDRNUM,V.VNAMEL,R.AADDR1,R.AADDR2,R.ACITY,R.ASTATE, R.AZIPCODE, R.APHONE, R.VASST1, P.DATEPUR "
    Sql = Sql & "ORDER BY V.VENDOR "
    Response.Write("Sql " & "<br/>" & Sql & "<hr/>")
    SqlDataSource1.SelectCommand = Sql
    End Sub
    </pre>

  • How to check the value in Table CDPOS

    Mostly I can't see the following fields value in the table CDPOS,
      (1) CDPOS-VALUE_NEW
      (2) CDPOS-VALUE_OLD
    In fact, it should have values, so how to check the values, is there any special method needed?
    Thanks and best regards.

    Ferry Lianto,
    Thank you very much for your expertise.
    It's helpful to get some contents via FM:CHANGEDOCUMENT_READ_POSITIONS, the problem is, to some kind of DELETION operation, the log in table CDPOS is very simple, I still don't know which contents were deleted even though I found records in table CDPOS.
    Is there any other suggestions?
    Thanks and best regards.

  • How to check the value from user input in database or not?

    Hello;
    I want to check the value of user input from JtextFiled in my database or not.
    If it is in database, then i will pop up a window to tell us, otherwise, it will tell us it is not in database.
    My problem is my code do not work properly, sometimes, it tell me correct information, sometime it tell wrong information.
    Could anyone help,please.Thanks
    The following code is for check whether the value in database or not, and pop up a window to tell us.
    while( rs.next()) {
                    System.out.println("i am testing");
                    bInt=new Integer(rs.getInt("id"));
                    if(aInt.equals(bInt)){ // If i find the value in data base, set flag to 1.
                  flag=1;  //I set a flag to check whether the id in database or not
                        break;
             System.out.println("falg" + flag);
                if(flag==1){ //?????????????????????
              String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
              String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
              String remove3 = "DELETE FROM Customer WHERE id=" +a;
              s.executeUpdate(remove1);
              s.executeUpdate(remove2);
              s.executeUpdate(remove3);
                    JOptionPane.showMessageDialog(null,"you have success delete the value");
              s.close();
             else//???????????????????????????????
                  JOptionPane.showMessageDialog(null,"I could not found the value"); -------------------------------------------------------------------
    My whole program
    import java.sql.*;
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JOptionPane;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class DeleteC extends JFrame
        public static int index=0;   
        public static ResultSet rs;
        public static Statement s;
        public static Connection c;
        public static  Object cols[][];
        private static JTable table;
        private static JScrollPane scroller;
        private static int flag=0;
        public DeleteC()
            //information of our connection
            //the url of the database: protocol:subprotocol:subname:computer_name:port:database_name
            String strUrl      = "jdbc:oracle:thin:@augur.scms.waikato.ac.nz:1521:teaching";
            //user name and password
            String strUser      = "xbl1";
            String strPass      = "19681978";
            //try to load the driver
            try {
                Class.forName("oracle.jdbc.driver.OracleDriver");
            catch (ClassNotFoundException e) {
                System.out.println( "Cannot load the Oracle driver. Include it in your classpath.");
                System.exit( -1);
            //a null reference to a Connection object
            c = null;
            try {
                //open a connection to the database
                c = DriverManager.getConnection( strUrl, strUser, strPass);
            catch (SQLException e) {
                System.out.println("Cannot connect to the database. Here is the error:");
                e.printStackTrace();
                System.exit( -1);
           //create a statement object to execute sql statements
        public void getData(String a){
            try {
             //create a statement object to execute sql statements
             s = c.createStatement();
                int index=0;
                Integer aInt= Integer.valueOf(a);
                Integer bInt;
                  //our example query
                String strQuery = "select id from customer";
                //execute the query
                ResultSet rs = s.executeQuery( strQuery);
                //while there are rows in the result set
                while( rs.next()) {
                    System.out.println("i am testing");
                    bInt=new Integer(rs.getInt("id"));
                    if(aInt.equals(bInt)){
                  //JOptionPane.showMessageDialog(null,"I found the value"); 
                  flag=1;
                        break;
             System.out.println("falg" + flag);
                if(flag==1){
              String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
              String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
              String remove3 = "DELETE FROM Customer WHERE id=" +a;
              s.executeUpdate(remove1);
              s.executeUpdate(remove2);
              s.executeUpdate(remove3);
                    JOptionPane.showMessageDialog(null,"you have success delete the value");
              s.close();
             else
                  JOptionPane.showMessageDialog(null,"I could not found the value");
            catch (SQLException e) {
                 JOptionPane.showMessageDialog(null,"You may enter wrong id");
    My main program for user input from JTextField.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.util.*;
    public class EnterID extends JFrame{
        public JTextField tF1;
        public EnterID enID;
        public String tF1Value;
        private JLabel label1, label2, label3;
        private static JButton button;
        private static ButtonHandler handler;
        private static String aString;
        private static Integer aInteger;
        private static Integer checkV=0;
        public static void main(String args[]){
           EnterID eId= new EnterID();
       public EnterID(){
          handler=new ButtonHandler();
          Container c= getContentPane();
          c.setLayout(new GridLayout(3,1));
          button= new JButton("ok");
          button.addActionListener(handler);
          label1 = new JLabel(" CustomerID, Please");
          label2 = new JLabel("Label2");
          label3 = new JLabel();
          label3.setLayout(new GridLayout(1,1));
          label3.add(button);
          label2.setLayout(new GridLayout(1,1));
          aString = "Enter Id Here";
          tF1 = new JTextField(aString);
          label2.add(tF1);
          c.add(label1);
          c.add(label2);         
          c.add(label3);            
          setSize(150,100);
          setVisible(true);     
       private class ButtonHandler implements ActionListener{
         public void actionPerformed(ActionEvent event){
             tF1Value=tF1.getText();
            //   CheckData cData = new CheckData();
             //  aInteger = Integer.valueOf(tF1Value);      
             if(tF1Value.equals(aString)){
              JOptionPane.showMessageDialog(null,"You didn't type value into box");
              setVisible(false); 
            else {
                DeleteC dC= new DeleteC();
                dC.getData(tF1Value);
                setVisible(false); 
    }

    You may have working code now, but the code you posted is horrible and I'm going to tell you a much much much better approach for the JDBC part. (You should probably isolate your database code from your user interface code as well, but I'm skipping over that structural problem...)
    Do this instead:
        public void getData(String a){
            PreparedStatement p;
            String strQuery = "select count(*) the_count from customer where id = ?";
            try {   
             //create a prepared statement object to execute sql statements, it's better, faster, safer
             p = c.prepareStatement(strQuery);
                // bind the parameter value to the "?"
                p.setInt(1, Integer.parseInt(a) );
                //execute the query
                ResultSet rs = p.executeQuery( );
                // if the query doesn't throw an exception, it will have exactly one row
                rs.next();
                System.out.println("i am testing");
                if (rs.getInt("the_count") > 0 ) {
                // it's there, do what you need to...
             else
                  JOptionPane.showMessageDialog(null,"I could not find the value");
            catch (SQLException e) {
                 // JOptionPane.showMessageDialog(null,"You may enter wrong id");
                 // if you get an exception, something is really wrong, and it's NOT user error
            // always, always, ALWAYS close JDBC resources in a finally block
            finally
                p.close();
        }First, this is simpler and easier to read.
    Second, this retrieves just the needed information, whether or not the id is in the database. Your way will get much much slower as more data goes into the database. My way, if there is an index on the id column, more data doesn;t slow it down very much.
    I've also left some important points in comments.
    No guarantees that there isn't a dumb typo in there; I didn't actually compile it, much less test it. It's at least close though...

  • How to check 1000+ values comming as In parameter in plsql code.

    Hi,
    For a PLSQL procedure
    I am geting in all 5 parameters from front end. One of which is a comma separated list of 1000+ values. Now I need to check these values to retrieve from the database.
    eg. create procedure sp1(param1 date, param2 varchar2,param3.....,param5 varchar2)
    as
    begin
    select col1,col2,col3 from tab1
    where param1 = to_date(date)
    and param2 = 'abcd'
    and param5 = (list coming from front end)
    How should I pass this list to param5 for selection criteria so that each time single value is retrieved and row is returned to the front end
    Also How should I return this resultset to front end. Should I use OUT parameter as sysrefcursor?
    it will really help me if I get any example on above problem.
    Thanks in advance.
    Edited by: 954825 on Aug 24, 2012 7:39 AM

    Solomon Yakobson wrote:
    Bad design. Fifth parameter should be collection. Anyway:
    and ',' || list-coming-from-front-end || ',' like '%,' || param5 || ',%'SY.Unfortunatly there is a high chance that this fails because of the 4000 characters limitation in sql.
    If there are truely 1000+ values. Lets assume 1100.
    This means: 1100 characters just for the comma + at least 1100 characters for single char values.
    Single chars of cause do not make sense. Most languages don't have so much different characters, this means the list would have repeating values.
    If we assume that all values are different, this means we are speaking about a minimum of 3 chars.
    Therefore 1100 + 3* 1100 = 4400 chars. SQL limit broken.
    I think the only solid solution would be to build a collection/array/temp table structure and then work with that.

  • How to check old value in form personalization.

    Hi All,
    Could anybody please tell me how to check the old value in oracle forms using form personalization if someone is updating to someother value.
    For example.
    My Vendor Site Alternate name is XYZ
    and someone has changed it to ABC, How could i check the old values before or after doing updates.
    I don't want to write trigger for this.
    Thanks & Regards,
    Vishwas

    Pl see if the solution in this thread can help - Re: Capture who changed data using Forms Personalization & changed to what
    If not, pl see old threads that discuss forms personalization
    http://forums.oracle.com/forums/search.jspa?threadID=&q=forms+AND+personalization&objID=c3&dateRange=last90days&userID=&numResults=15
    HTH
    Srini

  • How to Check if Timeout occured

    Hi all,
    I have a small Doubt in Query timeout. I am using setQueryTimeout() of statement object to set the query time out.I am setting query time out to 15 seconds. My requirement is if the query time out occurs, Then I have to again give the same query. But what's my problem is I don't know how to check when query timeout occurs.Its given that a SQLException will be thrown when timeout occurs, but how can I know if the SQLException is due to timeout or due to some other reason. Please give me some sugessions.
    Thanks & Regards,
    Vignesh

    Try and retrieve a service from it. 
    Sincerely,
    Ted Ueda

  • How to check the value of "The Interrupt Status Flag"?

    Hi, thank you for reading this post!
    Invoking Thread.interrupt() sets the value of the Interrupt Status Flag.
    Just wondering if there is a Java method to check the value of this flag? Or is using isInterrupted() or interrupted() the only way to check?
    http://download.oracle.com/javase/tutorial/essential/concurrency/interrupt.html
    Thank you in advance for your help!
    Eric

    Below is the full code. As soon as the Thread.sleep() is taken out in main(), the interrupt is detected in the child thread. But if the sleep() stays, then the child thread goes into an infinite loop. It's not detected the interrupt.
    //ParentInterruptChildThreadCatchedDemo.java
    //Program function: This program demonstrates the parent thread (main()) interrupting a child thread (thread1).
    //Threaded class
    class TryThread extends Thread {
         //fields
         private String threadname;
         private long aWhile;
         //Constructor
         public TryThread(String tname, long delay) {
              threadname = tname;
              aWhile = delay;
         //run() method
         public void run() {
              while(!Thread.interrupted()) {
                   //Do work
              try {
                   System.out.println(Thread.currentThread().getName() + " was just interrupted!");
                   throw new InterruptedException();
              } catch(InterruptedException e) {
                   //System.exit(1);
                   return;
    public class ParentInterruptChildThreadCatchedDemo {
         public static void main(String[] args) {
              Thread thread1 = new TryThread("thread1", 2000L);
              thread1.start();
              try {
                   System.out.println("main() goes to sleep for 10 second.");
                   Thread.sleep(10000);
                   System.out.println("Statement after main() sleep().");
              } catch(InterruptedException e) {
                    e.printStackTrace();
                 //Interrupt thread1
                  int interruptFlag = 5;
                  for(int i=0; i<11; i++) {
                       if(i == interruptFlag) {
                            System.out.println("Condition met, going to interrupt thread1 ...");
                            thread1.interrupt();
                            System.out.println("Thread1 interrupted!");
                  System.out.println("Ending main()");
    /*Output:
    main() goes to sleep for 10 second.
    Statement after main() sleep().
    Condition met, going to interrupt thread1 ...
    Thread1 interrupted!
    Ending main()
    INFINITION LOOP
    */

  • How i check what value written by Debug.write statement

    Dear All
    In java class file "Debug.write" statement is use to write intermidate result
    e.g
    Debug.write(oadbtransaction, this, "-------- submitForBaselineFlag from VO: " + s13 + " -------------", 3);
    how i check the vaue on server for these statements
    thanks & regards

    The messages should be available in the apache log.
    --Shiv                                                                                                                                                                                                   

  • How to check the values of view object?

    Hi all,
    I created a new view object by right clicking my application module. Now when I try to retrieve values
    of the attributes of the view object I am getting null pointer exception. How do I check whether the view has
    some values in it or not manually using select statement ? I try to find the view in my database at database navigator
    but it was not there. Kindly help me out in this.
    Thanks,
    Phanindra.
    Edited by: 887737 on Oct 19, 2011 12:53 AM

    Hi,
    Right click on application module(yourAM in model project) and press Run,Then you can confirm whether your ViewObject is working or not.
    Note:
    Generally create viewObject using EO based or Query based how did you create viewObject
    See:
    http://download.oracle.com/otn_hosted_doc/jdeveloper/1012/bc4j/intro/bc_avo.html
    http://www.adftips.com/2010/09/adf-model-creating-view-object-vo.html

  • How to check the value of a string is numeric, alphanumeric or characters?

    Hi All,
    I have a task to validate an employee Id. Suppose the employee Id is E121212. Now as per the validation rule I need to check "the first letter of the employee Id is a character and rest are numbers." How can I do this? Please reply.
    Thanks & Regards
    Bibhuprasad Soumyaranjan

    >
    Hi Bibhuprasad,
    I have a task to validate an employee Id. Suppose the employee Id is
    E121212. Now as per the validation rule I need to check "the first letter
    of the employee Id is a character and rest are numbers." How can I do this? Please reply.Everyone else has proposed REGEXP_LIKE, and while it's very powerful, it is
    also very CPU intensive. You should always use Oracle's string functions
    instead of Regular Expressions if possible.
    I played around with
    WITH data
         AS (SELECT 'E11212' s FROM DUAL
             UNION ALL
             SELECT '121212' FROM DUAL
             UNION ALL
             SELECT 'EE121212' FROM DUAL
             UNION ALL
             SELECT 'É121212' FROM DUAL
             UNION ALL
             SELECT 'E1EEEEEEEE' FROM DUAL
             UNION ALL
             SELECT 'E134343444' FROM DUAL)
    SELECT s,
      CASE
        WHEN (SUBSTR(s, 1, 1) BETWEEN 'A' AND 'Z') -- AND (TO_NUMBER(SUBSTR(s, 2, LENGTH(s)), 999999) > 111111)
          THEN 'Correct Format'
        ELSE
          'Incorrect Format'
        END mySSN,
        SUBSTR(s, 2, LENGTH(s)) AS theNumber
    FROM data;I think that this can be worked so that it willl go what you require without using
    REGEXP_LIKE.
    HTH,
    Paul...
    Bibhuprasad Soumyaranjan

  • How to check wrong values in isChangedByClient

    Hi,
    I had two issues with a validation code.
    First let me describe the scenario.
    We need to update the Vendor Master.
    There should one primary contact against one Vendor Number.
    There are multiple Secondary contact against one primary contact.
    There are 4 fields for both primary and secondary contact.
    Primary Contact:
    First Name (Read Only, Mandatory).
    Last Name (Read Only, Mandatrory).
    Mobile Number (Mandatory).
    Telephone (Optional).
    Secondary Contact:
    First Name (Mandatory).
    Last Name (Mandatory).
    Mobile Number (Mandatory).
    Telephone (Optional).
    So, I need to check two validations by Java Regular Expressions,
    Name should be alphabets with ,. and space.
    Telephone Number and Mobile Number would be Numbers only.
    Now, the issue client wants the Sceondary Contacts table rows
    can be modified without selecting them.
    So, I used isChangedByClient.
    That's working fine.
    But the user gives First Name as Kaushik45 in first row of the secondary contact table
    and also types First Name as Subho67 in third row.
    The first wrong value get printed (by wdComponentAPI.getMessageManager) but
    the control goes to the last wrong value.
    This might be solved by using setLeadSelectionAt(i).
    Now, when the user types values wrongly in First Name field for Row 1 and Row 3;
    the user gets stuck in First Row.
    He modifies and then click the update again.
    This time update runs and update the wrong value at row 3.
    So, solution might be storing all wrong values of the isChangedByClient in an array and then comparing one by one.
    Please suggest.
    Regards
    Kaushik Banerjee

    Hi Ilan,
    I am pasting the code below.
    public void onActionconf(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionconf(ServerEvent)
         MessageManager msgmanager=(MessageManager)wdThis.wdGetAPI().getComponent().getMessageManager();
         IPrivateMainView.IP_personNode testNodeP = wdContext.nodeP_person();
              //IPrivateMainView.IS_personNode testNodeS = wdContext.nodeS_person();
              IPrivateMainView.IS_personNode S_personNode = wdContext.nodeS_person();
             IPrivateMainView.IS_personNode spersonNode = wdContext.nodeVendorDetails().nodeS_person();
              IPrivateMainView.IP_personElement testElementP = testNodeP.currentP_personElement();
         if(testNodeP.size()!=0){
              /*If else for tesElementP Namev null value check */          
                        if(testElementP.getNamev()!=null)
                   /*Start of if-else for testElementP Mob Number */          
                                  if(testElementP.getMob_Number()!=null){
                                       String Mob_num = testElementP.getMob_Number();
                                      String regStrforPriMob=  "[0-9]*";
                                       CharSequence chSeqForMob = Mob_num;
                                       Pattern patternForPriMob = Pattern.compile(regStrforPriMob);
                                      Matcher matcherForPriMob = null;
                                       matcherForPriMob = patternForPriMob.matcher(chSeqForMob);
                                       /* Start of matcher if-else*/
                                       if(matcherForPriMob.matches()==true){
                                            if(testElementP.getTel_Number()!=null) {
                                             String tel_num = testElementP.getTel_Number();
                                             String regStrforPriTel = "[0-9]*";
                                             CharSequence chSeqForTel = tel_num;
                                             Pattern patternForPriTel = Pattern.compile(regStrforPriTel);
                                             Matcher matcherForPriTel = null;
                                             matcherForPriTel = patternForPriTel.matcher(chSeqForTel);
                                  wdComponentAPI.getMessageManager().reportSuccess("The Telephone Number of Primary Number is matching");            
                        if(matcherForPriTel.matches()==true){
                        if(S_personNode.size()!=0){
                        //IPrivateMainView.IS_personElement S_personElement = S_personNode.currentS_personElement();
                                          //  for(int i=0;i<wdContext.nodeS_person().size();i++) {
                                                      /*Start of Secondary Contact Mob Number and Tel Number if-else */     
                                                      for(int i=0;i<wdContext.nodeS_person().size();i++){
                                                        if(wdContext.nodeS_person().getS_personElementAt(i).isChangedByClient()==true){
                                                           IPrivateMainView.IS_personElement S_personElement = (IPrivateMainView.IS_personElement)S_personNode.getElementAt(i);
                                                           String fName = wdContext.nodeS_person().getElementAt(i).getAttributeAsText("Namev");
                                                           wdComponentAPI.getMessageManager().reportSuccess("The First Name for the Secondary Contact is :"+fName);                                                                                                                        
                                                           String regStrforSecfName = "[a-zA-Z-øØæÆåÅ,. ]*";
                                                           CharSequence chSeqforSecFname = fName;
                                                           Pattern patternForSecfName = Pattern.compile(regStrforSecfName);
                                                           Matcher matcherForSecfName = null;
                                                           matcherForSecfName =  patternForSecfName.matcher(chSeqforSecFname);
                                                                                                                  //String lName = S_personElement.getName1();
                                                           String lName = wdContext.nodeS_person().getElementAt(i).getAttributeAsText("Name1");
                                                           String regStrforSeclName = "[a-zA-Z-øØæÆåÅ,. ]*";
                                                           CharSequence chSeqForSecLname = lName;
                                                           Pattern patternForSeclName = Pattern.compile(regStrforSeclName);
                                                           Matcher matcherForSeclName = null;
                                                           matcherForSeclName = patternForSeclName.matcher(chSeqForSecLname);
                                                                                                                  //String Mob_NumSec = S_personElement.getMob_Number();
                                                          String Mob_NumSec = wdContext.nodeS_person().getElementAt(i).getAttributeAsText("Mob_Number");
                                                           String regStrforSecMob ="[0-9]*";
                                                           CharSequence chSeqForMobSec = Mob_NumSec;
                                                           Pattern patternForSecMob = Pattern.compile(regStrforSecMob);
                                                           Matcher matcherForSecMob = null;
                                                           matcherForSecMob = patternForSecMob.matcher(chSeqForMobSec);
                                                        if(S_personElement.getMob_Number()!=null&&S_personElement.getNamev()!=null&&S_personElement.getName1()!=null){
                                                           //String fName = S_personElement.getNamev();
                                                                                    /* Start of matcher if-else*/
                                                           if(matcherForSecfName.matches()==true&&matcherForSeclName.matches()==true&&matcherForSecMob.matches()==true){
                                                           /* Start of City if-else */
                                                           if(S_personElement.getTel_Number()!=null){
                                                             String Tel_NumSec = wdContext.nodeS_person().getElementAt(i).getAttributeAsText("Tel_Number");
                                                             String regStrforSecTel = "[0-9]*";
                                                             CharSequence chSeqForTelSec = Tel_NumSec;
                                                             Pattern patternForSecTel = Pattern.compile(regStrforSecTel);
                                                             Matcher matcherForSecTel = null;
                                                             matcherForSecTel = patternForSecTel.matcher(chSeqForTelSec);
                                                           /* Start of matcher if-else */
                                                           if(matcherForSecTel.matches()==true&&matcherForSecfName.matches()==true&&matcherForSeclName.matches()==true&&matcherForSecMob.matches()==true){
                                                 wdComponentAPI.getMessageManager().reportSuccess("The First Name matches the pattern: "+matcherForSecfName.matches());               
                                                                                               if(wdContext.currentCheckboxckElement().getCorrespondence()==true){
             wdComponentAPI.getMessageManager().reportSuccess("Entering the if statement for executing the RFC");
                                                                                              wdThis.wdGetVdapplicationController().updVendorDetails();
                                                                                              wdThis.wdFirePlugToFinal();
                                                                                              //break;
                                                                                              else
                                                                                              {   IWDAttributeInfo atinfo = wdContext.nodeCheckboxck().getNodeInfo().getAttribute("Correspondence");
                                                                                              msgmanager.reportContextAttributeMessage(wdContext.nodeCheckboxck().getCurrentElement(),atinfo,IMessageVdapplication.KEY4,new Object[]{},true);
                                                                                              //wdComponentAPI.getMessageManager().reportException("Kryss av for korrekt informasjon før lagring",true);
                                                                                              } /* End of check box if else*/
                                                           } /* End of Secondary Contact Telephone Number matching */
                                                           else {
                                                                wdComponentAPI.getMessageManager().raiseException("The Secondary Contact Telephone Number is not matching",true);
                                                                } /* End of Secondary Telephone Number if */     
                                                             /* End of matcher if-else*/
                                                             else {
                                                                //wdComponentAPI.getMessageManager.re("The Mobile Number is not in the correct format for Secondary contact",true);
                                                    wdComponentAPI.getMessageManager().reportSuccess("The First Name was : "+wdContext.nodeS_person().getElementAt(i).getAttributeValue("Namev"));
                                                    //Object[] firName = new Object<i>;
                                                   // firName<i> = wdContext.nodeS_person().getElementAt(i).getAttributeValue("Namev");
                                                    wdContext.nodeS_person().setLeadSelection(i);      
    //                                                for(int j=0;j<firName.length;j++)
                                                      /*  try {
                                                                          String fuName = wdContext.nodeS_person().getElementAt(i).getAttributeValue("Namev").toString();
                                                                          wdComponentAPI.getMessageManager().reportSuccess("The Value of fuName: "+fuName);
                                                                                                                                           //String fName = S_personElement.getNamev();
                                                                          String regStrforFuName = "[a-zA-Z-øØæÆåÅ,. ]*";
                                                                          CharSequence chSeqforFuName = fuName;
                                                                          wdComponentAPI.getMessageManager().reportSuccess("The Value of CharSequence "+chSeqforFuName);
                                                                          Pattern patternForSecFuName = Pattern.compile(regStrforFuName);
                                                                          Matcher matcherForSecFuName = null;
                                                                          matcherForSecFuName =  patternForSecFuName.matcher(chSeqforFuName);
                                                                          wdComponentAPI.getMessageManager().reportSuccess("The matcherForSecFuName is "+matcherForSecFuName);
                                                                          if(matcherForSecFuName.matches()==false){
                                                                          wdComponentAPI.getMessageManager().reportException("Error in the First Name",true);
                                                         catch(ArrayIndexOutOfBoundsException ae){
                                                              ae.printStackTrace();
                                                         catch(Exception e){
                                                              e.printStackTrace();
                                                   //String fuName = wdContext.nodeS_person().getElementAt(i).getAttributeValue("Namev");
                                                                wdComponentAPI.getMessageManager().reportException("The First Name, Last Name or Mobile Number is not in the correct format for Secondary contact",true);
                          //     break;
                                                        else {
                                                                                                               wdComponentAPI.getMessageManager().raiseException("First Name, Last Name, Mobile Number is blank",true);
                                               else {
                                                    wdComponentAPI.getMessageManager().raiseException("The Telephone Number of the Primary Contact is in the Correct format",true);
                                            } /* Telephone Number element null*/
                                            //else{}
                        /*Start of Secondary Contact Size if-else */                    
                                  /* End of if-else for Secondary Contact Size */
    //                 else {
    //                      wdComponentAPI.getMessageManager().reportException("The Mobile No of the Primary Contact is not in the correct format",true);                            
                        /* End of matcher if-else for Primary Contact*/
                        else{
                             wdComponentAPI.getMessageManager().reportException("Primary Contact Mobile Nunber is not in the correct format",true);
                   /* if for testElementP Mob Number */
                   else {
                        wdComponentAPI.getMessageManager().reportException("No Primary Contact Mobile Number",true);
              } /* End of If else for tesElementP Namev null value check */     
                        else {
                             wdComponentAPI.getMessageManager().reportException("There is no First Name for Primary Contact",true);          
        }// else if for testNodeP size closed
        else{
             wdComponentAPI.getMessageManager().reportException("There is no element in Primary Contact",true);
        //@@end
    Regards
    Kaushik Banerjee

  • How to Check Characterstic Values  assigned  for a material

    Hi ,
    My requirement is , to  check  each and every material entered in the selection screen  and characterstic values assigned to this,
    I dont need characterstic values  for a material, i have to check whether characterstic values assigned or not , if not i have to give a message..
    I used  CLAF_CLASSIFICATION_OF_OBJECTS FM  for  getting charactersic values
    it is giving NO classification found , but for tghat material classification is existing subsequently characterstic values are also there, i passed material no with leading zeros also.
    i used WMCL_MAT_READ_CHAR_VALUES FM also  , but it is giving  No charcterstic values found for that Material  but characterstic values are assigned for that Material..
    Could u please find out ,where  i am missing

    THIS MATERIAL HAS CLASSIFICATION VIEW  AND CHARACTERSTIC VALUES ALSO MAINTAINED
    DATA : MATNO TYPE AUSP-OBJEK,
          L TYPE I,
    T_CLASS TYPE STANDARD TABLE OF  SCLASS ,
    T_OBJECTDATA TYPE STANDARD TABLE OF  CLOBJDAT.
    MATNO ='631165'.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = MATNO
    IMPORTING
       OUTPUT        = MATNO
    "use this function moduel...
    *Retrieve Batch class , characteristic name and values for Material
      CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
        EXPORTING
         class              = 'ZCA2535'
          classtype          =  '023'
         features           = 'X'
          language           = 'E'
          object             =  MATNO      "pass material number with leading zeros..
          objecttable        = 'MARA'  
        TABLES
          t_class            = t_class
          t_objectdata       = t_objectdata
        EXCEPTIONS
          no_classification  = 1
          no_classtypes      = 2
          invalid_class_type = 3
          OTHERS             = 4.
      IF sy-subrc = 0.
    ENDIF.
    BUT IT IS GIVING   NO CLASSIFICATION FOUND

  • How to check the value of the structure component at run time

    Dear Friends,
    Kindly, through some idea for the below query:
    Step 1: I have a structure name as STRUCT with components COMP1, COMP2, COMP3,......, COMP99. At run time in this structure few components may have values and few may not have.
    Step 2: Now I have a variable of type char name as LV_CHAR, at run time this variable may have value as any of the structure components given in the above step such as COMP1 or COMP2 or .....or COMP99.
    Step 3: Let us assume the variable LV_CHAR have value COMP11 and now I need to check whether the strucutre componet STRUCT-COMP11 is initial or not using this variable.
    Could you please give me the steps what needs to be done to handle it.
    Thanks & regards,
    Mallikarjuna M.

    PatanGova wrote:
    Hi,
    Can someone help me out to divide a Hexadecimal number say"ABCD" and display 
    1) each value of hexadecimal number like 'A','B','C','D' in separate indicators and
    2)each value of hexadecimal number like 'A','B','C','D' into their respective decimal number and to show in separate indicators.
    Thanks.
    That has absolutely nothing to do this thread.  Start a new thread.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to Check a Value from a Lookup table??

    Hi Experts,
    I have 2 lookup tables.
    If a Value in Lk1 is selected, i need to check if that selected value is present in Lk2 table.
    Ex:
    MF table (Look up 1)
    0001
    0002
    0003
    0004
    Ecc Table (Look up 2).
    0001
    0003
    0004
    0005
    Note: User will not have access to Look up table 2.
    So, When user selects any value in MF table (Look up 1) then the validation should check if that value is present in Look uptable 2 (Ecc table).
    If present then true Else False.
    Did someboday face a similar situation!!!
    Can anyone help??
    Kind Reagrds
    Eva

    Hi Eva,
    I see your requirement this way...
    1) I will add two fields to your current Lookup table and link to one field in the main table, say the field name is LK
    2) Create a Lookup Flat Multi Valued field in the main table which will be linked to a lookup table name systems which has different remote system names used in the landscape.By this field i will be identifying whether the record is for remote system MF or Remote System ECC or both
    Say the your current Lookup table structure is
    Code
    Name
    What i do is add two fields to the current structure
    Code
    Name
    ECC
    MF
    And the sample data will be like this
    Code    Name           ECC       MF
    0001      xx              Yes      Yes
    0002      xx              No        Yes
    0003      xx              Yes      Yes
    0004      xx              Yes      Yes
    0005      xx              Yes       No
    By this way i can easily validate the record which is selected in the main table exists in ECC and MF Systems based on the systems field in the main table.
    Validaiton Code for checking the record exists in ECC
    If( HAS_ANY_VALUES(systems,ECC)=TRUE,LK1.ECC=Yes)
    Validaiton Code for checking the record exists in MF
    If( HAS_ANY_VALUES(systems,MF)=TRUE,LK1.MF=Yes)
    Regards
    Sowseel

Maybe you are looking for

  • I have bought some albums in the past but they are all not in purchased section no more

    hi all, I have bought some albums in the past from itunes store but now it is stating i only have about 27 songs instead of about 250. Can someone please tell me why this is and where the rest of the albums will be. Thank you for your time.

  • Bug in JUSVUpdateableFocusAdapter.java???

    In my ADF/JClient MDI application I'm getting an NPE when closing most of my internal frames that contain many master/detail relationships across multiple tabs. The stack says the NPS is caused at oracle.jbo.uicli.jui.JUSVUpdateableFocusAdapter.focus

  • Undeletion of line item through ME22N

    Hi all, In PO i have a line item for which GR and invoice reciept is done. Deletion indicator is set for this line item. Now when I am trying to undelete the line item it is giving error as " Order unit cannot be changed" But when I am Undeleting it

  • Rebuild a tm archive moved by cp

    Hello, I moved the whole Backups.backupdb directory from an external HDD to another (internal) HDD. The reason was that I had to re-initialize the backup HDD, which could not be repaired otherwise by the Disk Utility. The scheme was to re-initialize

  • TS2755 unable to recieve texts from iphones

    I switched from apple to android and now I cant recieve texts from iphones. I have unregistered number from apple and have turned off imessage. How do I fix this problem?