Class - logic

I am trying to create a class which which will read a ztable (holds pricing tables) cosidering it a list or off list price. this table has the follwoing fields mandt,kappl,kschl,kotabnr and a custom field zprice_type which is numeric and of lenght 2. This custom field is for the price type flag which will be either 0, 1 or 2 (not applicable, list, off list).
This class will determine if condition is active or inactive. Only goes forward with active conditions.
For each item , reads KONV with the condition type , doccond and item number. determine if condition is active (konv-kinak). If active , get the access # (konv-kolnr) .
read table T685 with application = V, condition type from KONV(eg. ZPRL) to get the access sequence name(T685-kozgf). This can ve the same or different from the condition type.
Then Read Table T682I with Application = V, Access Sequence = T685_KOZGF and Access # (KONV-KOLNR) to return the Table # (T682I-KOTABNR).  For example, 901.
Read the Z* table with Condition Type from KONV and Table # from T682I to determine if the table is 1 (List) or 2 (Off List).  Set flag accordingly.
Loop through the same logic for all conditions for the same item to determine the List or Off List setting of each.
At end of loop, if any of the active records = 2 (Off List), the item is considered Off List.  Else List.
I need to build  a class out of it if someone can please help me out with this . This class I will be using in my report to cerate a pricing compare list.
Thanks
Aarav

Following is the code:
method CHECK_LIST_PRICING.
data:  zkotabnr type c length 15,
         zkonv type  konv,
         zkozgf type T685-kozgf,
         zt685 type standard table of t685.
  select * from konv
           into zkonv where kinak = ' ' and knumv eq iv_knumv and kposn eq iv_kposn.
      select single kozgf into zkozgf from T685 where kappl = 'V' and kschl = zkonv-kschl.
      if sy-subrc eq 0.
        select single kotabnr into zkotabnr
                              from T682I
                              where kappl = 'V' and kolnr eq zkonv-kolnr
                                    and kozgf eq ( select kozgf
                                                          from T685
                                                          where kappl = 'V' and kschl = zkonv-kschl ).
        if sy-subrc eq 0.
          select single ZPRICE_TYPE into RV_IS_LIST from (zkotabnr) where kschl eq zkonv-kschl.
        endif.
      endif.
  endselect.
endmethod.
Thanks

Similar Messages

  • Override and replacing Tie class, logic never firing

    I'm on Windows2000 Pro, running Oracle 9i and 9ifs (1.1.9).
    I am trying to get an example from the Developer's Guide to work. It is the Chapter 17 (Customizing Content Type Behavior), Replacing a Server-side Tie Class, Complete Example (Example 17-31).
    I have correctly compiled the java class into the custom_classes directory structure (with subfolders for the package), and I have changed the CLASSPATH to reference the class before repos.jar . I also bounced 9iFS. However, iFS just isn't calling that code (I guess it's still looking in repos.jar for some reason...?), based on my own tests and the java command-line program included in the Developer's Guide.
    I have also tried various other things to get the code called and/or to determine whether or not the code is really being called. One thing I tried is to rename and repackage the example code, then update the classobject with the newly named/packaged server bean. Alas, this did not help.
    Any suggestions or thoughts?
    Thanks in Advance,
    David Frankel

    I'm on Windows2000 Pro, running Oracle 9i and 9ifs (1.1.9).
    I am trying to get an example from the Developer's Guide to work. It is the Chapter 17 (Customizing Content Type Behavior), Replacing a Server-side Tie Class, Complete Example (Example 17-31).
    I have correctly compiled the java class into the custom_classes directory structure (with subfolders for the package), and I have changed the CLASSPATH to reference the class before repos.jar . I also bounced 9iFS. However, iFS just isn't calling that code (I guess it's still looking in repos.jar for some reason...?), based on my own tests and the java command-line program included in the Developer's Guide.
    I have also tried various other things to get the code called and/or to determine whether or not the code is really being called. One thing I tried is to rename and repackage the example code, then update the classobject with the newly named/packaged server bean. Alas, this did not help.
    Any suggestions or thoughts?
    Thanks in Advance,
    David Frankel

  • How can I access another class in a MembershipRule's Expression

    Hello,
    I want to create an InstanceGroup using Module Microsoft.SystemCenter.GroupPopulator.
    I need to collect all Logical Disks which contain an MS SQL DB Log File.
    I would start as follows:
    <DataSource ID="DS" TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
      <RuleId>$MPElement$</RuleId>
      <GroupInstanceId>$Target/Id$</GroupInstanceId>
      <MembershipRules>
        <MembershipRule>
          <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.LogicalDisk"]$</MonitoringClass>
          <RelationshipClass>$MPElement[Name="MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>     
    <Expression>
            <And>
      <!--
       First Expression
      -->
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <Property>$MPElement[Name="Windows!Microsoft.Windows.LogicalDevice"]/Name$</Property>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
      <!--
        How can I access another class's properties ? 
      -->
                    <GenericProperty>$MPElement[Name="SQL!Microsoft.SQLServer.2008.DBLogFile"]/Drive$</GenericProperty>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <HostProperty>
                      <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]</MonitoringClass>
                      <Property>PrincipalName</Property>
                    </HostProperty>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
                    <GenericProperty>$MPElement[Name="SQL!Microsoft.SQLServer.2008.DBLogFile"]/Drive$</GenericProperty>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
            </And>
          </Expression>
        </MembershipRule>
      </MembershipRules>
    </DataSource>
    In the first expression you "see" my question:
    I want to compare the LogicalDisk's Name Property with the DB Log File's Drive property.
    But how can I access the DB Log File's Drive property in this MembershipRule ?
    Furthermore LogicalDisk and DB Log File must be hosted on the same Windows Computer.
    Would be great if somebody could help.
    Thanks
    Sebastian

    Hi Niki,
    thanks for the idea, but that will not work. $Target/Id$ refers always to the group to be discovered.
    On last week end I was given following idea, hope it will work:
    Step 1
    Collect all the DB SQL Logfile Objects and write computername (PrincipalName?) and Driveletter into a textfile, line by line. Shouldn't be a problem, PowerShell is your friend.
    Step 2
    Read the file from Step 1, build discovery data for each disk drive as object of class "Logical Disk (Server)",
    and then discover the containment-relationships from those Logical Drive(Server) Objects to the InstanceGroup.
    Perhaps I must do it for the OS-Version related Disks, because I need the target classes  of the Logical Disk Freespace monitors. Some more work. "Risks": I donot know the discovery algorithm for the Logical Disk(Server) Objects, but a "deep
    dive" into the MPs should help.
    Thanks to all, who have read.
    I will inform you about progress and success
    sebastian

  • Need to separate drive alerts with Logical Disk Free Space monitoring in SCOM 2012

    I have an interesting need here to separate our SCOM alerts for Logical Disk Free space so that one alert is for OSSystem drives ONLY (C:/D:) and the other monitor alerts on all APP drives only (E:, etc). So far we have had great success using Kevin Holman's
    blog post.
    http://blogs.technet.com/b/kevinholman/archive/2009/11/24/writing-monitors-to-target-logical-or-physical-disks.aspx
    We have overrides set so that the monitors report ONLY the percentage of free space left and ignores any MB threshold. So far so good, the alert comes in that host A reports low disk space on D: at 2.345...% free or host B reports low disk space on F: at
    4.567...% free space etc. Now that we have our monitors working within the Windows Server classes Logical Disk, we need to set these monitors so that one is just for C or D drives with the alert named system Logical Disk Free Space OS Disk Warn and the other
    monitor just reports on E - Z drives (excluding C or D) with the alert named Logical Disk Free Space APP Disk Warn.
    We are very new to SCOM so I made the rookie mistake of creating a dynamic group for all Windows Server 2003 Logical Disk class that only includes Device Name = C or D. But found out too late you cant point a monitor to a group, it has to target a class.
    And using the current monitors we set up with the above blog uses the correct logical disk class, but it doesnt care what instance (device Id = value), it will report low disk space on ANY logical drive. How in the world can we separate and exclude these monitors
    so that one alerts only on OS disks (C and D) and the other only alerts on app disks (E through Z)?

    Hi Kevsharp,
    Quite confusing after reading your question.
    So based on your requirement, What i understand is you need separate alerts for all the drives of the disk is running at low or out of space right ?
    For the above just create a simple performance counter monitor and use the same counters as kevin has used in his blog.
    Now Target: Use Windows server operating system (This will target all the Windows operating system agents in your SCOM. If the specified discovery MP's are installed).
    Set a threshold Below 10% is critical or what ever. You will get the alerts in your console.
    Gautam.75801

  • Read logical port for the proxy

    HI ,
    There is method  or FM that can bring all the logical port that available for proxy class,
    logical port that defined on SOAMANAGER or LPCONFIG .
    Regards
    Joy

    Try this way
        call function 'RFC_READ_TABLE'
             destination                rfc_sys
             exporting
                  query_table          = 'SRT_LP' " Table for Logical Ports
             tables
                  options              = options1
                  fields               = nametab1
                  data                 = i_srt_lp[].  " Output table contains call values for proxy class after fm call

  • Executing a child class from parent.

    Hi, well, I have this parent class which I need to execute a method from a child class to get a significant part of the thing get started. Is there anyway for me to accomplish this or a workabout? Thanks..

    Sure.. I have this method in the class logic:
         public void createLocation() {
              try {
              classCoord coordSet = appinterface.decodeFile();
              int areaNum = coordSet.areaNum, cellNum = coordSet.cellNum, signalStrength = coordSet.signalStrength, receiverId = coordSet.receiverId;
              String dateTime = coordSet.dateTime, userName = coordSet.userName, location = calLocation(areaNum, cellNum);
              boolean validity=calValidity(signalStrength);
              classLocation locationObj = new classLocation(this.type, userName, receiverId, validity, location, dateTime);
              appinterface storeLocationObj = new appinterface();
              storeLocationObj.storeLocation(locationObj);
              catch (IOException ioException) {
                   appinterface.displayMessage("Logic Error: " + ioException);
              catch (ClassNotFoundException classNotFoundException) {
                   appinterface.displayMessage("Logic Error: " + classNotFoundException);
         }I need to execute this method halfway in the class appinterface, the logic class inherits from appinterface cuz I need to make use several methods from it. Is there any way to solve this somehow?

  • Instantiation of similar object over a super class deciding the sub class

    Hello all
    First, sorry if I'm duplicating an already answered question. I didn't searched very deep.
    Initial position:
    I have 2 Object (A1 and A2) which share the most (about 90%) of their instance variables an the associated methods. The values of the instance variables are retrieved in the real implementation from a stream. Depending of the data of the stream, I have to instantiate either a A1 or A2 object.
    A test implementation (using an int in case of the stream):
    The super class A:
    package aaa;
    public class A
      protected int version = -1;
      protected String name = null;
      protected AE ae = null;
      protected A()
      protected A(int v)
        // Pseudo code
        if (v > 7)
          return;
        if (v % 2 == 1)
          this.version = 1;
        else
          this.version = 2;
      public final int getVersion()
        return this.version;
      public final String getName()
        return this.name;
      public final AE getAE()
        return this.ae;
    }The first sub class A1:
    package aaa;
    public final class A1 extends A
      protected A1(int v)
        this.version = v;
        this.name = "A" + v;
        this.ae = new AE(v);
    }The second subclass A2:
    package aaa;
    import java.util.Date;
    public final class A2 extends A
      private long time = -1;
      protected A2(int v)
        this.version = v;
        this.name = "A" + v;
        this.time = new Date().getTime();
        this.ae = new AE(v);
      public final long getTime()
        return this.time;
    }Another class AE:
    package aaa;
    public class AE
      protected int type = -1;
      protected AE(int v)
        // Pseudo code
        if (v % 2 == 1)
          this.type = 0;
        else
          this.type = 3;
      public final int getType()
        return this.type;
    }To get a specific object, I use this class:
    package aaa;
    public final class AFactory
      public AFactory()
      public final Object createA(int p)
        A a = new A(p);
        int v = a.getVersion();
        switch (v)
        case 1:
          return new A1(v);
        case 2:
          return new A2(v);
        default:
          return null;
    }And at least, a class using this objects:
    import aaa.*;
    public final class R
      public static void main(String[] args)
        AFactory f = new AFactory();
        Object o = null;
        for (int i = 0; i < 10; i++)
          System.out.println("===== Current Number is " + i + " =====");
          o = f.createA(i);
          if (o instanceof aaa.A)
            A a = (A) o;
            System.out.println("Class   : " + a.getClass().getName());
            System.out.println("Version : " + a.getVersion());
            System.out.println("Name    : " + a.getName());
            System.out.println("AE-Type : " + a.getAE().getType());
          if (o instanceof aaa.A2)
            A2 a = (A2) o;
            System.out.println("Time    : " + a.getTime());
          System.out.println();
    Questions:
    What would be a better way to encapsulate the logic into their respective objects ? Is there a way to let the super class A itself identify the type of the object and then extend from A to either A1 or A2 ?
    Thanks in advance
    Andreas

    Hello jduprez
    First, I would thank you very much for taking the time reviewing my problem.
    Just for the record: have you considered regular serialization? If you control the software at both ends of the stream, you could rely on standard serialization mechanism to marshall the objects and unmarshall them automatically.In my case, I can't control the other site of the stream. At the end, the data comes from a FileInputStream and there aren't objects on the other site, only pur binary data.
    - It seems you have one such factory class. Then you already have encapsulated the "determine class" logic, you don't need to add such logic in superclass A.I thought from an OO view, that the super class A is responsible of doing that, but that's where the problem starts. So at the end, it's better doing it in the factory class.
    - A itself encapsulates the logic to load its own values from the stream.
    - A1 and A2 can encapsulate the logic to load their own specific value from a stream (after the superclass' code has loaded the superclass' attributes values).
    My advise would be along the lines of:
    public class A {
    .... // member variables
    public void load(InputStream is) {
    ... // assign values to A's member variables
    // from what is read from the stream.
    public class A1 extends A {
    ... // A1-specific member variables
    public void load(InputStream is) {
    super.load(is);
    // now read A1-specific values
    public class AFactory {
    public A createA(InputStream is) {
    A instance;
    switch (is.readFirstByte()) {
    case A1_ID:
    a = new A1();
    break;
    case A2_ID:
    a = new A2();
    break;
    a.load(is);
    }The example above assumes you have control over the layout of the data in the stream (here for a given A instance, the attributes defined in A are read first, then come the subclass-specific attributes.
    The outcome is: you don't have to create a new A( ) to later create another instance, of a subclass.I like the idea. In the AFactory, is the "A instance;" read as "A a;" ?
    Is there a way to let the super class A itself identify the type of the object and then extend from A to either A1 or A2 ?Note I initially read this question as "can an instance of a class mutate into another class", to which the answer is no (an object has one single, immutable class; it is an instance of this class, and of any superclass and superinterface, but won't change its class at runtime).Yes, I have been thinking about a way for mutating into a subclass to keep the already initialized values from the A class without copying or parsing again. But preventing an instance of an A class will be my way. So, in this aspect, Java didn't changed in the last 10 years... It's a long time ago I've used Java for some real projects.
    You can, however, create an instance of another class, that copies the values off a priori A instance. Your example code was one way, another way could be to have a "copy constructor":
    public class A {
    public A(A model) {
    this.att1 = model.att1;
    this.att2 = model.att2;
    public class A1 {
    public A1(A model) {
    super(model);
    ... // do whatever A1-specific business
    )Still, I prefer my former solution less disturbing: I find the temporary A instance redundant and awkward.Nice to know. I prefer the first solution too.
    Thank you again for the help and advices. My mind is searching sometimes for strange solutions, where the real is so close ;-)
    Andreas

  • Add Contact's Email and Phone to the Lead result list on WEB UI

    Hello All,
    My requirement is to add Contact's Phone number and Email on Lead result list.
    Technical details:
    BT108S_LEA(Comp)
    BT108S_LEA/Result (View)
    RESULT (CN)
    I have enhanced context node ' Result ' and added new field through wizard (Ex: ContactPhone) using following details.
    add model attribute:
    BOL entity: BuilContactPerson
    BOL Attribute: TEL1_NUMBR
    After the successful creation, i added ContactPhone field from available fields to display fields.now i could able to see the newly added field on Lead result list.i see message 'BTPARTNER not bound' under telephone colomn for each record.
    Can we add these two fields from standard BOL structure and use it , so that no coding required, system will take care of data retrieval?
    or should i go with adding custom fields and write logic to get the data for each lead's contact?
    please help me with  approach and on above error.
    Thanks
    Gangareddy

    Hi Ganga,
    Since these fields are in a table view, its not possible to bind them with the standard BuilHeader BOL Object. Hence, we need to write the custom logic for these methods.
    You have two options here.
    Option 1:
    Add the fields in the result structure and modify the Genil Search class logic and replace the standard GENIL class with custom class.
    Option 2:
    Create the custom attribute directly in the BOL structure and write the custom logic in getter method.
    Hope this helps.
    Thanks
    Vishal

  • Problem in displaying Icon on JButton

    Hi,
    I have a problem ..
    In my program I have to set Icon for a Jbutton and wait for 2 secs and then remove the Icon..
    I used jb.setIcon(Imageicon) (jb is button reference) to set the icon and jb.setIcon(null) to remove Icon
    Now no Icon is displayed on the button at all....
    My code looks like below mentioned
    jb.setIcon(Imageicon)
    Thread.sleep(2000);
    jb.setIcon(null)
    plz reply mee at the earliest...

    the code snipped is like this..
    the below mentioned code is in actionPerformed method
    pres.setIcon(iial.get(Integer.parseInt(pres.getName())));  //icon for prev is already set
              System.out.println("Icon for pres is set now");
    // need to wait for 2 seconds before both the icons are set to null
              prev.setIcon(null);
              pres.setIcon(null);Here prev and pres are references to JButtons.
    I tried the swing timers but couldnt succeed (i might be implemented them in an incorrect way coz im not familiar with them)
    plz cud you provide me with am example program or a solution to above scenario in a program.....
    Here is the actual program if you want you can run it with keeping atleast 9 images in tn folder and changing maxpics value to 9
    Game.java
    package com;
    //Concentration Game
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.lang.reflect.InvocationTargetException;
    import java.util.ArrayList;
    import java.util.Collections;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class Game extends JFrame implements ActionListener {
         private static final long serialVersionUID = 1L;
         public static void main(String args[]) throws InterruptedException,
                   InvocationTargetException {
    System.out.println();
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
             Game cg = new Game();
              cg.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         Logic logic;
         private int[][] arr;
         private Container contents;
         private JLabel controlLabel;
         private JPanel controlPanel;
         private JButton[][] gameBoardLabel;
         private JPanel gamePanel;
         private ArrayList<ImageIcon> iial;
         private boolean isNewAction = true, isFirstAction = true;
         private JButton prev, pres;
         private long s_time, e_time, t_time;
         private int SIZE, arrvalue, maxpics = 51, pairscount, no_of_pairs;
         public Game() {
              super("Concentration Game");
              logic = new Logic();
              logic.populateArray();
              logic.shuffle();
              logic.printArray();
              arr = logic.getArray();
              SIZE = logic.getSize();
              no_of_pairs = (SIZE * SIZE) / 2;
              iial = new ArrayList<ImageIcon>();
              for (int i = 1; i <= maxpics; i++) {
                   iial.add(new ImageIcon(this.getClass().getClassLoader()
                             .getResource("tn/image" + i + ".jpg")));
              Collections.shuffle(iial);
              System.out.println("Completed loading images");
              contents = getContentPane();
              contents.setLayout(new BorderLayout());
              gameBoardLabel = new JButton[SIZE][SIZE];
              new JPanel();
              gamePanel = new JPanel();
              controlPanel = new JPanel();
              gamePanel.setLayout(new GridLayout(SIZE, SIZE, 5, 5));
              controlLabel = new JLabel("Game not started");
              for (int r = 0; r < gameBoardLabel.length; r++) {
                   for (int c = 0; c < gameBoardLabel[r].length; c++) {
                        arrvalue = arr[r][c];
                        System.out.println(arrvalue);
                        if (arr[r][c] == 0) {
                             gameBoardLabel[r][c] = new JButton();
                             gameBoardLabel[r][c].setEnabled(false);
                        else
                             gameBoardLabel[r][c] = new JButton();
                        gameBoardLabel[r][c].addActionListener(this);
                        gameBoardLabel[r][c].setName("" + arrvalue);
                        gameBoardLabel[r][c].setPressedIcon(iial.get(arrvalue));
                        gamePanel.add(gameBoardLabel[r][c]);
              controlPanel.add(controlLabel);
              contents.add(gamePanel, BorderLayout.CENTER);
              contents.add(controlPanel, BorderLayout.SOUTH);
              setSize(400, 500);
              setVisible(true);
              System.out.println(this);
         @Override
         public void actionPerformed(ActionEvent e) {
              JButton jb = (JButton) e.getSource();
              // System.out.println(jb.getName());
              System.out.println(e.getSource());
              if (isFirstAction) {
                   controlLabel.setText("Game Started");
                   s_time = System.currentTimeMillis();
                   isFirstAction = false;
                   System.out.println(this);
              if (isNewAction) {
                   prev = pres = jb;
                   jb.setIcon(iial.get(Integer.parseInt(jb.getName())));
                   isNewAction = false;
                   return;
              prev = pres;
              pres = jb;
              if (pres == prev)
                   return;
              if (pres.getName().equals(prev.getName())) {
                   pres.setIcon(iial.get(Integer.parseInt(pres.getName())));
                   pres.removeActionListener(this);
                   prev.removeActionListener(this);
                   controlLabel.setText("pair matched");
                   resetAttributes();
                   System.out.println("haha----last count==" + ++pairscount);
                   if (pairscount == no_of_pairs) {
                        e_time = System.currentTimeMillis();
                        t_time = (e_time - s_time) / 1000;
                        controlLabel.setText("Game Over in " + t_time + " secs");
                        System.out.println("done");
              System.out.println(pres);
              pres.setIcon(iial.get(Integer.parseInt(pres.getName())));
              controlLabel.setText("pair didn't match");
              System.out.println("pres is set now");
              prev.setIcon(null);
              pres.setIcon(null);
              resetAttributes();
         private void resetAttributes() {
              prev = pres = null;
              isNewAction = true;
    Logic.java
    package com;
    import java.util.ArrayList;
    import java.util.Collections;
    import javax.swing.JOptionPane;
    public class Logic{
          ArrayList<Integer> al;
          int arr[][],arrlist[][],elements=1;
          int SIZE;
    int[][] getArray()
              return arrlist;
    int getSize(){
         return SIZE;
    public static void main(String args[]){
         Logic logic =new Logic();
                logic.populateArray();
               logic.shuffle();
               logic.printArray();
               //System.out.println(logic.elements);
    void populateArray(){
         String input=JOptionPane.showInputDialog(null,"Enter Size of the array (less than 11)" );
         SIZE=Integer.parseInt(input);
         int cnt = 0;
         arrlist=new int[SIZE][SIZE];
         al=new ArrayList<Integer>();
         for (int r = 0; r < SIZE; r++)
              for (int c = 0; c < SIZE; c++)
                   al.add(elements);
                   cnt++;
                   if (cnt == 2)
                        cnt = 0;
                        elements++;
    public  void printArray() {
         for (int i = 0; i < SIZE; i++)
          for (int j = 0; j < SIZE; j++)
            arrlist[i][j] = al.get(j + i * SIZE);
            System.out.print(" "+arrlist[i][j]);
          System.out.println();
    public  void shuffle() {
              Collections.shuffle(al);
         if(SIZE%2!=0)
              int cindex=(SIZE*SIZE)/2; //center index
              int celement=al.get(cindex); //center element
              int lindex=al.indexOf(elements); //index of large element
              //al.remove(cindex);
              //al.add(cindex, 0);
              al.remove(lindex);
              al.add(lindex, celement);
              al.remove(cindex);
              al.add(cindex, 0);
    }

  • How can I see the rest of the disk space with SCCM 2012 R2?

    I can see most the elements of PCS in the report of assets intelligence function in SCCM 2012 R2 ,except for the free disk space.
    Thus, I cannot be noticed when some servers  need more space.
    What should I do?

    Hi,
    Please check the following steps.
    SCCM Console -> Administration -> Client Settings -> Hardware Inventory -> Set classes -> Logical Disk(SMS_LogicalDisk) -> Free Space(MB)
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to recognize operator from dbase

    Hi All,
    I have a small query regarding the rule retrieving from dbase.Let me clear that.
    I have a dbase which have some java expressions like,
         >
         <
         >=
         <=
         +
         ||
         !=
         and so on...............
    The dbase columns something like this...
    field1     field2     field3
    x     <     y
    l     + z
    u != m
    now when i am trying to execute the rule in my class(logic)file.....it would look some thing like this,
    rs.getInt(field1)
    rs.getString(field2)
    rs.getString(field3)
    when i am trying to execute the condition like (l+z)....its not able to recognize the '+' operator as it is in the string format retrieved from dbase.....
    Hope I am clear about my query...plz do lemme know how to go about this issue...
    Thanks and Regards
    Kishore

    sounds like you need to build an expression analyser (and probably executor).
    Good luck. They're fun exercises.

  • OOP ABAP Daily life Scenario

    Hi,
    I need to know about oops abap ,for that i need daily life scenarios.atleast one example i hav to know.
    colud any one help me with clear example.....
    Thanks
    Balu.
    Edited by: subrahmanyam24 on Dec 2, 2010 7:08 AM
    Moderator message: a lot of information is available if you'd just search for it.
    Edited by: Thomas Zloch on Dec 2, 2010 11:43 AM

    Hi Balu,
    I am not really very sure what is your Question daily life  means.
    Generally OOPs Concepts they try to interrelate to Real life examples some thing like concept of Inheritance we map to Group of Cars of let say of Brand 'X' all cars will have common attributes (engine ....)which fall in main parent class and its speciall features are defined in its differnt child class .And all child class inherts the parenst class its basic attributes.
    where as in programing prospect I my self didnt code much in OOPS But in programing prospect i know that its playing around calling instances of class.Logic wise its same But here you write in Methods of class some at se24 level some at porgam level with more limitaion using Public,Private and protected words.
    coding in oopps  adds in reusability and optimisation of code .
    Also i feel its more of now connecting one applications to another is what all clients are looking at some thing like java ..(very vague ly talking about OOps)
    Above all if i didnt understadn your question correctly excuse me .
    Regards,
    Poornima

  • Problem consuming WS

    Hi Gurus,
    I´m new on Web Services.
    I have a WSDL created with the Integration Directory Wizard´s.
    I´m trying to consume the WS associated to this WSDL, I have created the proxy class, logical port, interfaces, etc...
    When I execute the class (WS), I get the following message:
    PARSE_APPLICATION_DATA
    Fehler bei der Konvertierung XML => ABAP  (Response Message; FehlerId:
    Do you know what is the cause???
    Thanks and regards,
    Manuel.

    Hi Manuel,
    The possible cause of this could be any field in the service interface which is not mandatory but still requires an input to be there.
    Right way to test the service is to provide all the fields in interface with a SPACE  " "  value which are to be left empty. This will solve the problem.
    SPACE* here is just press space bar but not to type it
    Thanks and best regards,
    Kulwant Singh

  • Simple form validation problem

    hello,
    i would like to validate the user input and in the case of an invalid input show an error message and return form containing the values previously entered.
    this works fine using the code below.......but
    if i fill the email or any field with an eroneous value eg ERROR
    then delete the value and submit a blank value
    the previous value ERROR is submitted ????
    problem: how to ensure that the blank value is submitted instead of the value retained in the bean
    <jsp:useBean id="customer_data" scope="session" class="Logic.CustomerData" />
    <jsp:setProperty name="customer_data" property="*" />
    <input type=Text name="email" size=22
    value= <%= (customer_data.getEmail() != null) ? customer_data.getEmail() : "" %>
    >

    If a parameter is not present in the request (because the FORM parm is blank), then no coorresponding bean method will be called and the existing value will be retained. Either use request scope for your validation bean or call a reset method to clear the fields before invoking <jsp:setProperty.../>

  • Accessing Sun App Server JNDI context from j2se client

    The following client's code snippet is raising javax.naming.NameNotFoundException.
    public static void main(String[] args)
         try
              Context jndiContex = getInitialContext();
              Object ref = jndiContex.lookup("java:comp/env/ejb/ru.srpu.jtest.service.UserRemote");
              UserRemote user = (UserRemote)PortableRemoteObject.narrow(ref,UserRemote.class);
              //logic goes here...
         catch (NamingException e)
              e.printStackTrace();
    public static Context getInitialContext( ) throws javax.naming.NamingException
         Properties p = new Properties( );
         p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
         p.put(Context.PROVIDER_URL, "iiop://localhost:3700/");
         return new javax.naming.InitialContext(p);
    }Beans are packed into the ejb-jar module of the EAR and deployed successfully. EJB's jndi-name is correct as well.
    Help to find a bug, please!

    We have a number of FAQ entries that cover client JNDI access here :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    -ken

Maybe you are looking for