Class instantiation - and is this a pattern?
Firstly, my apologies if my goal here is unclear. I am still learning the concepts and may perhaps have a lack of words for the appropriate terms or processes. Hopefully I can convey my meaning enough to get some feedback.
I have a group of classes, all inheriting from a base class. My task is to add the functionality in these classes to another set of derived classes by simply creating instances of them in these classes constructor methods. To my knowledge this means the instance must take the class it's written in or (this) as it's parameter. My question is then really how should my external helper classes be written so they can be instanced in this way and is there a pattern that this idea conforms to and if so could someone explain this to me. My thanks in advance for any help, tips or directions to a good reference on this topic.
It sounds a bit like the Strategy pattern.
Your "helper" classes are providing various ways of performing a task on behalf of another class.
AWT LayoutManagers implement strategies for laying out the Components in a Container. Have a look through that to see how it's done there.
Whether your strategy classes need to take the "container" class in their constructor will depend on the functionality they provide. If their behaviour does not need to be cached then they could take a reference to the wrapper in each method call like LayoutManagers do.
Hope this helps.
Similar Messages
-
how can i view and apply new custom patterns without going to preset manager? i had this facility but have now lost it. i design patterns but am fairly new to photoshop. i used to be able to click on the drop down menu in patterns in the 'fill' box but cannot now do this. have i inadvertently clicked on something to turn this facility off? i now have to go to 'preset manager' and manually move my new design to the first box and click 'done' so that i can use it.
Which version of photoshop are you using?
After you define a custom pattern it should be added to the bottom of whatever patterns are already loaded.
For example, if you define a custom pattern and then go to Edit>Fill>Pattern, the newly defined pattern should have been added to the existing loaded patterns. -
What kind of classes can be instantiated and how it can be done?
Dear All,
What kind of classes can be instantiated and how it can be done?
Can you please explain me in brief and provide sample code for it?
Thanks,
Anup GargHi Anup,
You can create instances of a Final class...its just that you cannot override its behaviour...
btw...If you are coding the whole class, you can define a class as Final as below
CLASS CLASS_NAME DEFINITION FINAL
ENDCLASS
Else, if you use the class builder (SE24), you just need to check the Final checkbox available in the Properties section of the class.
~ Piyush Patil -
Instantiation and Encapsulation
Hi
Can any one explain me about instantiation and Encasulation with example, i am new to ABAP Objects.
Please dont send any links.
Arun JosephHi,
First let me give small introduction to OO ABAP programing.
Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which represents an instance of some class...?
A class is a set of objects that share a common
structure and a common behavior
A class will have attributes ( i.e data definition) and methods ( nothing but functions )
We can also call object as Instance of the class.
Lets see a simple demo class to calcualte SUM of 2 numbers.
define 2 variables a and b of type i. (Attributes)
SUM is the method name. this will have the logic to do the sum.
2 importing paramers and an exporting parameter res for the method.
Note: you can either create a class either globally or locally..
Goto SE24 to create Global class, this class will be avaialable for use in all the programs, this is like class library with all global classes.
Local class is the one which you create in SE38 i.e; your own program,
by this it is understood that it's scope is only upto that program
SO let us discuss the example with SE24(global class)
give a class name, description,
In the attributes tab, define a and b of type i, level as instance attribute and
visibility as public That means these attributes are available outside this class also. we will come to this later.
in the methods tab give name, level as instance, visibilty as pubilc again.
now double click on the method name, it will take to you to write the code.
(method implementation)
just wirte between the method ---endmethod,
res = num1 + num2.
come back to methods tab, click on parameters button, to define exporting, importing etc.. paramters for your method,
define 'res' as an exporting parameter, 2 variables num1 and num2 as importing parameters.Activate the class.
now you have defined a class.
whenever you want the logic to sum 2 variables, in all those cases you can make use of the SUM method in this class. This is what Reusability is.A very imp. feature of OO ABAP.
So now comes Instantiation.
you can't directly access a class.
You have to create a reference variable of the type of the class, then create an object with the reference variable. (memory allocation).
This step is called Instantiation or Instantiating the class
For this go to se38, in which ever program you want to instatantiate the above class.
do as below.
data: obj type ref to zsow_cl1.
start-of-selection.
create object obj.
Now object of the above class is ready for you.
Now all the contents i.e either attributes or methods etc of the class can be accessed with this object
now you have to call the method 'sum' of the above class using the above object in your program for the sum functionalty.
for that click on Pattern button select 'Abap Object Patterns' press enter
select 'Call method' radio button, give your object name ('OBJ')
class name ( ZSOW_CL1)
give the method name (SUM)
class and method names can be selected from the F4
press enter.
you will get the below line in your program
CALL METHOD OBJ->SUM
EXPORTING
NUM1 =
NUM2 =
* IMPORTING
* RES =
now define 2 variables of type i to pass the inputs to the method and one more vairable to hold the output coming from the FM
on the whole code in your se38 is as follows.
DATA: OBJ TYPE REF TO ZSOW_CL1,
X TYPE I,
Y TYPE I,
Z TYPE I.
START-OF-SELECTION.
CREATE OBJECT OBJ.
X = 10.
Y = 10.
CALL METHOD OBJ->SUM
EXPORTING
NUM1 = X
NUM2 = Y
IMPORTING
RES = Z.
WRITE: Z.
so Z will give the output.
Next is Encapsulation
while defining the method i asked you to give the visibility as Public.
Visibility can be of 3 types:
Public
Protected
Private
public means as i said above the method or varaibles can be used outside the class also.as you did above outside the class you have created an object to the class and
accessed the method.
private means the attributes/methods that you define in the class can only be accessed in/by the method of the same class, they cannot be accessed anywhere else and outside.
change your 'a' parameter visibilty to private and try the below code in se38.
obj->b = 10.
obj->a = 10.
1st line doesn't give error, since 'b' is public attribte,
2nd line will give error since 'a' is now private.
you can use 'a' in the 'SUM' method if you want.
Protected means it can't be accessed outside of the class like with the help of object, but can be accessed in the child class if defined to the above class.
just post if you have any other doubts after trying this example.
Do reward points if it helps you.
Regards,
Sowjanya -
How to get the class name and field name dynamically
Hi
I have a class (ex: Contract) the fields (ex : a,b,c) .i need to get the class name and field name dynamically
ex
if( validation file for the field Contract.a){
return contract.a;
}else if(validation file for the field Contract.b){
return contract.b;
how to pass the field name and object dynamically
Please help me .............
Thanks in Advance..
Edited by: 849614 on Aug 11, 2011 6:49 AMYoungWinston wrote:
maheshguruswamy wrote:
Agreed, but IMO, i still feel its best if there is no tie in between consumer class level details and the database it talks to. A service layer is needed in between them.Sounds like you've done a bit of this before. Me, I've either been a modeller/DBA, doling out data, or a nuts and bolts programmer (and actually more toolmaker than apps, but did a bit of that too).
Do you know of a good book about the "middle ground" (ie, these service layers)? I understand it empirically, but haven't had a lot of exposure to it.
Winston
Edited by: YoungWinston on Aug 11, 2011 10:34 PM
PS: Apologies. Edited my previous post, presumably while you were composing your reply, when I finally realized what '.filed' meant.Most of my work is in web development, never been a DBA :) . The biggest 'concern' in my shop is 'separation of concerns'. The UI group reports up to a different IT head, the DB group reports up to a different IT head and so on. The looser the coupling between these systems, the lesser the project costs (Integration, QA etc) are. Martin Fowler's books contain good information about separation of concerns in an enterprise environment. The two books which i recommend are
[url http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420]Enterprise Application Architecture and
[url http://www.amazon.com/Enterprise-Integration-Patterns-Designing-Deploying/dp/0321200683/ref=pd_sim_b_1]Enterprise Integration Patterns -
Abstract class instantiation.?
I have an Abstract class which is extended
My question is:
How can the Abstract class be instantiated:
Animal[] ref = new Animal[3];
In Java,we cannot instantiate Abstract class,so how does this
work
abstract class Animal // class is abstract
private String name;
public String getName(){
return name;
public abstract void speak();
class Dog extends Animal{
private String dogName;
public Dog(String nm){
this.dogName=nm;
public void speak(){ // Implement the abstract method.
System.out.println("Woof");
public String getName(){ // Override default functionality.
return dogName;
class Cow extends Animal{
private String cowName;
public Cow(String nm){
this.cowName = nm;
public void speak(){ // Implement the abstract method.
System.out.println("Moo");
public String getName(){
return cowName;
public class AnimalArray{
public static void main(String[] args) {
Animal[] ref = new Animal[3]; // assign space for array
Dog aDog = new Dog("Rover"); // makes specific objects
Cow aCow = new Cow("Bossy");
// now put them in an array
ref[0] = aDog;
ref[1] = aCow;
// now dynamic method binding
for (int x=0;x<2;++x){
ref[x].speak();
System.out.println(ref[x].getName());
}You mean to say that now we have a handle or a reference to the
abstract class. Right ?
But in the
public static Test instance () {
return new Test () {
public void test () {}
}How can you say 'return new Test()' as Test is an abtract class
and what will public void test() return as this has no body ? -
Class instantiation only if allowed (ClassLoader?)
I am implementing some runtime security checks for a project whereby I validate classes before they are allowed to be instantiated.
Right now I use properties files and reflection to instantiate the classes, so a simple String comparison can tell me whether the class name is "allowed" to be instantiated. This can be checked just before calling Class.forName().
Obviously, this does not keep someone from writing their own program that would instantiate my classes.
I am trying to keep from having to go back and add a bunch of code in the constructor(s) of each class. I was thinking of subclassing ClassLoader, but have heard horror stories about them.
Does anyone have any other ideas of how to handle this? Or perhaps some insight into ClassLoaders and whether they are easier to sub-class these days.
thanks
kleinkClassLoaders are easy to sub-class.
The main problems people who post here seem to have with them are centered around a lack of understanding of loading classes in general.
But I think that given your description of what you want to do, that creating a custom ClassLoader would be a good approach. Try subclassing URLClassLoader and you should not have to override too many methods (maybe just findClass()). -
Instantiation and communication
Hi there
I'm having problems with communication between classes within an application. I am instantiating objects of one class from within a main class, but these objects need to use methods located in the main class so the objects need to know where the main class is and the main class needs to know which of the objects is using the method so it can communicate back. I think I understand the theory, but I can't make it work. Here are the relevent bits of the code (the rest of the programme is long and boring) - can anyone help?
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import java.util.*;
import java.lang.*;
public class Machine
private JFrame cbFr = new JFrame();
private JLabel labCb = new JLabel();
public Machine()
Kam k1 = new Kam();
public static void main(String [] args)
Machine m1 = new Machine();
class Kam implements ActionListener, ItemListener //this the main class
public Kam()
Cb a = new Cb(this);
cbFr.setLocation(20,230);
labcb = new JLabel("CbA ");
cbFr = new JFrame("CbA");
Cb b = new Cb(this);
cbFr.setLocation(20,230);
labcb = new JLabel("CbB ");
cbFr = new JFrame("CbB"); Cb c = new Cb(this);
cbFr.setLocation(20,230);
labcb = new JLabel("CbC ");
cbFr = new JFrame("CbC");
class Cb implements ActionListener //class that builds the cb obj above
private String location;
private Object empty, name, k1;
public Cb(Kam k1) //trying to hold the location of
the main class
k1 = (String)kMachine;
drawCbDisplay( );
public Object getName() //trying to hold the identity
of the objects
name = (Object)location;
return name;
public void actionPerformed(ActionEvent ae) {
if (ae.getSource() == butE)
k1.validation(); //a main
class method
}If you want Kam to call methods from Machine, construct it like this:
Kam k1 = new Kam(this);And change the constructor to this:
public Kam(Machine m)Is that what you meant?
Cheers,
Radish21 -
Whats the difference between a class method and a instance method.
I have a quiz pretty soon and one of the questions will be: "How does an instance method differ from a class method." I've tried looking this up but they gave me really complicated explanations. I know what a instance method is but not really sure what a class one is. Can someone post an example of a class method and try to explain what makes it so special?
Edited by: tetris on Jan 30, 2008 10:45 PMJust have a look:
http://forum.java.sun.com/thread.jspa?threadID=603042&messageID=3246191 -
How to find colums in CLOB variable and get this colums value to update col
Question
How to find colums in CLOB variable and get this colums value to update colum of oracle database table
How my work will go
Step-1 - I am creating XML FIle which is based on code that we discused before-
Its developing xml file with data in <...inputelement> as u can see in my xml but in <..output> Element of xml its just have all column for exampe <itemoutput>
<FLD NM = "ABC"> 0 </FLD>
<FLD NM = "XYZ:> </FLD> --- for varchar2
</itemoutput>
In 1st stage i am just generating <..INPUT> with its colums and real value from database and <..output> elements will go zero value but with colums name.
Note. I create temp table will all COLUMN which u can see in both in <..ITEMINPUT> and <..ITEMOUTPUT>
Step2.. After Generaing my xml i want to convert my xml data into CLOB not in a file. so clob will go to the VENDOR
STEP3.
I will Recieved again xml data in CLOB from the vendo in <.OUTPUT> ELEMents
for example
I send this format
<itemoutput>
<FLD NM = "ABC"> 0 </FLD>
<FLD NM = "XYZ:> </FLD> --- for varchar2
</itemoutput>
And i will receive it
<itemoutput>
<FLD NM = "ABC VALUE"> 2 </FLD>
<FLD NM = "XYZ TYPE:> SUV</FLD> --- for varchar2
</itemoutput>
So will take this output valu from xml clob and will update my staging table .
Which have the same colum name as its look in xml clob.
Step- 4. I will take this value from staging table and update my original oracle database table. which i send you before.
But u leave this step becaue you dont know the staging table colum maping with original table.
I think now you understand
Please feed back
monrizhere is my xml..
I want to extract <..output> elements which enclosed with " " and its values from this xml file. please any body have any idea. please tell me
Thanks
<?xml version="1.0" ?>
- <RATABASECALC COPYRIGHT="COPYRIGHT 2001>
- <RATEREQUEST USEREFID="YES">
- <ANCHOR>
<DATABASENAME />
<DATABASEPW />
<DATABASESOURCE />
<DATABASEPRVDR />
<USERNAME />
<SEVERITYDES />
<CALLDES />
<INITACCDES />
<INITACCV />
<ITEMSEQDES />
<ITEMMATCHDES />
<CENTURYDES />
<DATEDES />
<FORMULADES />
<STRINGDES />
<VALIDATIONDES />
<STEPSDES />
<RETINFONUM />
<ADDLRETINFONUM />
<ANCHORNOMATCH />
<NOMATCHMSG />
<TRANUUID />
<LOGOPTION />
<MSGOPTION />
<USERLOGFN />
<NOITEMERROR />
<LOGFORMAT />
<LOGFN />
<STEPSFN />
<NUMNOMATCH>0</NUMNOMATCH>
<NUMERRORS>0</NUMERRORS>
</ANCHOR>
- <POLICIES>
- <POLICY>
<BUSINESSDES>N</BUSINESSDES>
<LEGALENTITYOWNER>CGI TRAINING AND DEMONSTRATION</LEGALENTITYOWNER>
<LEGALENTITYNAME>CGI TRAINING AND DEMONSTRATION</LEGALENTITYNAME>
<COMPEFFDATE>02/01/2000</COMPEFFDATE>
<RETRIEVALDATE>02/01/2000</RETRIEVALDATE>
<POLINPUTS />
- <POLOUTPUTS>
<FLD NM="POLICY CALCS DONE IND">Y</FLD>
<FLD NM="TOTAL DISCOUNTED POLICY PREM">2167.52</FLD>
<FLD NM="TOTAL POLICY PREMIUM">3180.0</FLD>
</POLOUTPUTS>
- <LOBS>
- <LOB>
<LEGALENTITYPRODGROUP>PERSONAL AUTOMOBILE</LEGALENTITYPRODGROUP>
- <LOBINPUTS>
<FLD NM="MULTI-CAR FACTOR">0</FLD>
<FLD NM="MULTI-CAR IND">Y</FLD>
</LOBINPUTS>
<LOBOUTPUTS />
- <REGIONS>
- <REGION>
<LEGALENTITYREGION>MAINE</LEGALENTITYREGION>
- <REGIONINPUTS>
<FLD NM="STATE PREMIUM AMOUNT">0</FLD>
</REGIONINPUTS>
- <REGIONOUTPUTS>
<FLD NM="TOTAL STATE PREMIUM">2356.0</FLD>
<FLD NM="TOTAL DISCOUNTED STATE PREM">2167.52</FLD>
<FLD NM="TOTAL STATE DISCOUNT AMOUNT">188.48</FLD>
</REGIONOUTPUTS>
- <REGIONERRORS>
<NUMLOGENTRIES>3</NUMLOGENTRIES>
<NUMRETURNLOGENTRIES>0</NUMRETURNLOGENTRIES>
</REGIONERRORS>
- <COVERAGES>
- <COVERAGE RBID="COVP1L1R1C1">
<COVFORMULAINDEX FORMREF="FMLAP1L1R1F1" />
<COVINPUTS />
- <COVOUTPUTS>
<FLD NM="DEDUCTIBLE BUYBACK">145.0</FLD>
</COVOUTPUTS>
<COVCONTROL />
</COVERAGE>
- <COVERAGE RBID="COVP1L1R1C2">
<COVFORMULAINDEX FORMREF="FMLAP1L1R1F2" />
<COVINPUTS />
- <COVOUTPUTS>
<FLD NM="DEDUCTIBLE BUYBACK">209.0</FLD>
</COVOUTPUTS>
<COVCONTROL />
</COVERAGE>
- <COVERAGE RBID="COVP1L1R1C3">
<COVFORMULAINDEX FORMREF="FMLAP1L1R1F3" />
<COVINPUTS />
<COVOUTPUTS />
<COVCONTROL />
</COVERAGE>
</COVERAGES>
- <ITEMS>
- <ITEM>
- <ITEMINPUTS>
<FLD NM="COLLISION DEDUCTIBLE">100</FLD>
<FLD NM="COMP DEDUCTIBLE">FULL</FLD>
<FLD NM="INEXPERIENCED OPERATOR IND">N</FLD>
<FLD NM="LIABILITY LIMIT">100</FLD>
<FLD NM="SYMBOL">15</FLD>
<FLD NM="TOWING INDICATOR">Y</FLD>
<FLD NM="INEXPERIENCED OPER FACTOR">0</FLD>
<FLD NM="VEHICLE SYMBOL">0</FLD>
<FLD NM="MODEL YEAR">1997</FLD>
<FLD NM="COST NEW">0</FLD>
<FLD NM="DRIVER TRAINING INDICATOR">N</FLD>
<FLD NM="GOOD STUDENT IND">N</FLD>
<FLD NM="CLASS CODE">11</FLD>
<FLD NM="COLL RATE">0</FLD>
<FLD NM="TERRITORY">001</FLD>
<FLD NM="COMP RATE">0</FLD>
<FLD NM="PROTECTIVE DEVICE CODE">B</FLD>
<FLD NM="ANTI LOCK BRAKE IND">Y</FLD>
<FLD NM="MED RATE">0</FLD>
<FLD NM="MEDICAL PAYMENTS LIMIT">1000</FLD>
<FLD NM="PASSIVE RESTRAINT CODE">A</FLD>
<FLD NM="UNINSURED MOTORISTS LIMIT">100</FLD>
</ITEMINPUTS>
- <ITEMOUTPUTS>
<FLD NM="CLASS FACTOR">0.84</FLD>
<FLD NM="TOTAL VEHICLE PREMIUM">1166.0</FLD>
<FLD NM="TOTAL COLLISION PREMIUM">438</FLD>
<FLD NM="TOTAL COMP PREMIUM">218</FLD>
<FLD NM="TOTAL LIABILITY PREMIUM">475</FLD>
<FLD NM="TOTAL MEDICAL PREMIUM">4</FLD>
<FLD NM="TOTAL TOWING PREMIUM">4</FLD>
<FLD NM="TOTAL UM PREMIUM">27</FLD>
</ITEMOUTPUTS>
- <ITEMNOMATCHES>
<ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
<ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
</ITEMNOMATCHES>
- <ITEMCOVINDEXES>
<ITEMCOVINDEX COVREF="COVP1L1R1C1" />
</ITEMCOVINDEXES>
<ITEMCONTROL />
</ITEM>
- <ITEM>
- <ITEMINPUTS>
<FLD NM="COLLISION DEDUCTIBLE">50</FLD>
<FLD NM="COMP DEDUCTIBLE">FULL</FLD>
<FLD NM="INEXPERIENCED OPERATOR IND">N</FLD>
<FLD NM="LIABILITY LIMIT">100</FLD>
<FLD NM="SYMBOL">12</FLD>
<FLD NM="TOWING INDICATOR">N</FLD>
<FLD NM="INEXPERIENCED OPER FACTOR">0</FLD>
<FLD NM="VEHICLE SYMBOL">0</FLD>
<FLD NM="MODEL YEAR">1997</FLD>
<FLD NM="COST NEW">0</FLD>
<FLD NM="DRIVER TRAINING INDICATOR">N</FLD>
<FLD NM="GOOD STUDENT IND">N</FLD>
<FLD NM="CLASS CODE">12</FLD>
<FLD NM="COLL RATE">0</FLD>
<FLD NM="TERRITORY">001</FLD>
<FLD NM="COMP RATE">0</FLD>
<FLD NM="PROTECTIVE DEVICE CODE">0</FLD>
<FLD NM="ANTI LOCK BRAKE IND">Y</FLD>
<FLD NM="MED RATE">0</FLD>
<FLD NM="MEDICAL PAYMENTS LIMIT">1000</FLD>
<FLD NM="PASSIVE RESTRAINT CODE">0</FLD>
<FLD NM="UNINSURED MOTORISTS LIMIT">100</FLD>
</ITEMINPUTS>
- <ITEMOUTPUTS>
<FLD NM="CLASS FACTOR">0.88</FLD>
<FLD NM="TOTAL VEHICLE PREMIUM">1190.0</FLD>
<FLD NM="TOTAL COLLISION PREMIUM">468</FLD>
<FLD NM="TOTAL COMP PREMIUM">194</FLD>
<FLD NM="TOTAL LIABILITY PREMIUM">497</FLD>
<FLD NM="TOTAL MEDICAL PREMIUM">4</FLD>
<FLD NM="TOTAL TOWING PREMIUM">0</FLD>
<FLD NM="TOTAL UM PREMIUM">27</FLD>
</ITEMOUTPUTS>
- <ITEMNOMATCHES>
<ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
<ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
</ITEMNOMATCHES>
- <ITEMCOVINDEXES>
<ITEMCOVINDEX COVREF="COVP1L1R1C2" />
</ITEMCOVINDEXES>
<ITEMCONTROL />
</ITEM>
- <ITEM>
<ITEMINPUTS />
<ITEMOUTPUTS />
- <ITEMNOMATCHES>
<ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
<ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
</ITEMNOMATCHES>
- <ITEMCOVINDEXES>
<ITEMCOVINDEX COVREF="COVP1L1R1C3" />
</ITEMCOVINDEXES>
<ITEMCONTROL />
</ITEM>
</ITEMS>
- <FORMULAS>
- <FORMULA RBID="FMLAP1L1R1F1">
<FORMULANAME>RATING MASTER</FORMULANAME>
<FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
<FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
<FORMULANEWRENDES>N</FORMULANEWRENDES>
<FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
<FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
<FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
</FORMULA>
- <FORMULA RBID="FMLAP1L1R1F2">
<FORMULANAME>RATING MASTER</FORMULANAME>
<FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
<FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
<FORMULANEWRENDES>N</FORMULANEWRENDES>
<FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
<FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
<FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
</FORMULA>
- <FORMULA RBID="FMLAP1L1R1F3">
<FORMULANAME>PREMIUM DISCOUNT</FORMULANAME>
<FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
<FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
<FORMULANEWRENDES>N</FORMULANEWRENDES>
<FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
<FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
<FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
</FORMULA>
</FORMULAS>
<REGIONCONTROL />
</REGION>
- <REGION>
<LEGALENTITYREGION>NEW HAMPSHIRE</LEGALENTITYREGION>
- <REGIONINPUTS>
<FLD NM="STATE PREMIUM AMOUNT">0</FLD>
</REGIONINPUTS>
- <REGIONOUTPUTS>
<FLD NM="TOTAL STATE PREMIUM">824.0</FLD>
<FLD NM="TOTAL DISCOUNTED STATE PREM">0</FLD>
<FLD NM="TOTAL STATE DISCOUNT AMOUNT">0</FLD>
</REGIONOUTPUTS>
- <REGIONERRORS>
<NUMLOGENTRIES>2</NUMLOGENTRIES>
<NUMRETURNLOGENTRIES>0</NUMRETURNLOGENTRIES>
</REGIONERRORS>
- <COVERAGES>
- <COVERAGE RBID="COVP1L1R2C1">
<COVFORMULAINDEX FORMREF="FMLAP1L1R1F4" />
<COVINPUTS />
- <COVOUTPUTS>
<FLD NM="DEDUCTIBLE BUYBACK">0.0</FLD>
</COVOUTPUTS>
<COVCONTROL />
</COVERAGE>
</COVERAGES>
- <ITEMS>
- <ITEM>
- <ITEMINPUTS>
<FLD NM="COLLISION DEDUCTIBLE">500</FLD>
<FLD NM="COMP DEDUCTIBLE">250</FLD>
<FLD NM="INEXPERIENCED OPERATOR IND">Y</FLD>
<FLD NM="LIABILITY LIMIT">100</FLD>
<FLD NM="SYMBOL">11</FLD>
<FLD NM="INEXPERIENCED OPER FACTOR">0</FLD>
<FLD NM="VEHICLE SYMBOL">0</FLD>
<FLD NM="MODEL YEAR">1996</FLD>
<FLD NM="COST NEW">0</FLD>
<FLD NM="DRIVER TRAINING INDICATOR">Y</FLD>
<FLD NM="GOOD STUDENT IND">Y</FLD>
<FLD NM="CLASS CODE">36</FLD>
<FLD NM="COLL RATE">0</FLD>
<FLD NM="TERRITORY">001</FLD>
<FLD NM="COMP RATE">0</FLD>
<FLD NM="PROTECTIVE DEVICE CODE">0</FLD>
<FLD NM="ANTI LOCK BRAKE IND">0</FLD>
<FLD NM="MED RATE">0</FLD>
<FLD NM="MEDICAL PAYMENTS LIMIT">1000</FLD>
<FLD NM="PASSIVE RESTRAINT CODE">0</FLD>
<FLD NM="UNINSURED MOTORISTS LIMIT">100</FLD>
</ITEMINPUTS>
- <ITEMOUTPUTS>
<FLD NM="CLASS FACTOR">1.11</FLD>
<FLD NM="TOTAL VEHICLE PREMIUM">824.0</FLD>
<FLD NM="TOTAL COLLISION PREMIUM">332</FLD>
<FLD NM="TOTAL COMP PREMIUM">123</FLD>
<FLD NM="TOTAL LIABILITY PREMIUM">334</FLD>
<FLD NM="TOTAL MEDICAL PREMIUM">8</FLD>
<FLD NM="TOTAL UM PREMIUM">27</FLD>
</ITEMOUTPUTS>
- <ITEMNOMATCHES>
<ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
<ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
</ITEMNOMATCHES>
- <ITEMCOVINDEXES>
<ITEMCOVINDEX COVREF="COVP1L1R2C1" />
</ITEMCOVINDEXES>
<ITEMCONTROL />
</ITEM>
</ITEMS>
- <FORMULAS>
- <FORMULA RBID="FMLAP1L1R1F4">
<FORMULANAME>RATING MASTER</FORMULANAME>
<FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
<FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
<FORMULANEWRENDES>N</FORMULANEWRENDES>
<FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
<FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
<FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
</FORMULA>
</FORMULAS>
<REGIONCONTROL />
</REGION>
</REGIONS>
</LOB>
</LOBS>
- <RETINFOS>
<TOTALRI>0</TOTALRI>
</RETINFOS>
</POLICY>
</POLICIES>
</RATEREQUEST>
</RATABASECALC>
Above xml data - some <...OUTPUT> elements has some FLD elements. and i want to take those outputelemt's FLD Elements data and update my oracle tables.
Note: FLD = "Attribie" are the colums name of the tables
back to top -
Object Custom Program Name of class RE and language EN does not exist
Hi All,
We are getting this bbelow error while running a custome program ,
Object <Custom Program Name> of class RE and language EN does not exist
Do any one has faced this similar issue earlier.
Regards,
SenHi,
How did you resolve this problem ?
Re: Object <Custom Program Name> of class RE and language EN does not exist.
I am also encountering the same issue when I am executing the report.
Regards,
SSR. -
Creation of developement class,package and access key
COULD ANYBODY EXPLAIN about
creation of developement class,package and access key
and who will create them?Working With Development Objects
Any component of an application program that is stored as a separate unit in the R/3 Repository is called a development object or a Repository Object. In the SAP System, all development objects that logically belong together are assigned to the same development class.
Object Lists
In the Object Navigator, development objects are displayed in object lists, which contain all of the elements in a development class, a program, global class, or function group.
Object lists show not only a hierarchical overview of the development objects in a category, but also tell you how the objects are related to each other. The Object Navigator displays object lists as a tree.
The topmost node of an object list is the development class. From here, you can navigate right down to the lowest hierarchical level of objects. If you select an object from the tree structure that itself describes an object list, the system displays just the new object list.
For example:
Selecting an Object List in the Object Navigator
To select development objects, you use a selection list in the Object Navigator. This contains the following categories:
Category
Meaning
Application hierarchy
A list of all of the development classes in the SAP System. This list is arranged hierarchically by application components, component codes, and the development classes belonging to them
Development class
A list of all of the objects in the development class
Program
A list of all of the components in an ABAP program
Function group
A list of all of the function modules and their components that are defined within a function group
Class
A list of all of the components of a global class. It also lists the superclasses of the class, and all of the inherited and redefined methods of the current class.
Internet service
A list of all of the componentse of an Internet service:
Service description, themes, language resources, HTML templates and MIME objects.
When you choose an Internet service from the tree display, the Web Application Builder is started.
See also Integrating Internet Services.
Local objects
A list of all of the local private objects of a user.
Objects in this list belong to development class $TMP and are not transported. You can display both your own local private objects and those of other users. Local objects are used mostly for testing. If you want to transport a local object, you must assign it to another development class. For further information, refer to Changing Development Classes
http://help.sap.com/saphelp_46c/helpdata/en/d1/80194b454211d189710000e8322d00/content.htm
Creating the Main Package
Use
The main package is primarily a container for development objects that belong together, in that they share the same system, transport layer, and customer delivery status. However, you must store development objects in sub-packages, not in the main package itself.
Several main packages can be grouped together to form a structure package.
Prerequisites
You have the authorization for the activity L0 (All Functions) using the S_DEVELOP authorization object.
Procedure
You create each normal package in a similar procedure to the one described below. It can then be included as a sub-package in a main package.
To create a main package:
1. Open the Package Builder initial screen (SE21 or SPACKAGE).
2. In the Package field, enter a name for the package that complies with the tools Naming Conventions
Within SAP itself, the name must begin with a letter from A to S, or from U to X.
3. Choose Create.
The system displays the Create Package dialog box.
4. Enter the following package attributes:
Short Text
Application Component
From the component hierarchy of the SAP system, choose the abbreviation for the application component to which you want to assign the new package.
Software component
Select an entry. The software component describes a set of development objects that can only be delivered in a single unit. You should assign all the sub-packages of the main package to this software component.
Exception: Sub-packages that will not be delivered to customers must be assigned to the HOMEsoftware component.
Main Package
This checkbox appears only if you have the appropriate authorization (see Prerequisites).
To indicate that the package is a main package, check this box.
5. Choose Save.
6. In the dialog box that appears, assign a transport request.
Result
The Change package screen displays the attributes of the new package. To display the object list for the package in the Object Navigator as well, choose from the button bar.
You have created your main package and can now define a structure within it. Generally, you will continue by adding sub-packages to the main package. They themselves will contain the package elements you have assigned.
See also
Adding Sub-Packages to the Main Package
http://help.sap.com/saphelp_nw04/helpdata/en/ea/c05d8cf01011d3964000a0c94260a5/content.htm
access key used for change standard program.
www.sap.service.com -
AIR Intrinsic Classes-Tried and Proven Approach to building AIR applications in the Flash CS3 IDE
Hi everyone,
For all of you out there who would like to develop AIR
applications
from the Flash CS3 IDE but aren't sure how to get those pesky
intrinsic
classes working, I have a technique that you can work with to
create
your classes and make fully functional AIR applications.
First of all, those solutions out there that list
"intrinsic" functions
in their class definitions won't work. That keyword has been
taken out
and simply won't work. The "native" keyword also doesn't work
because
Flash will reject it. The solution is to do dynamic name
resolution at
runtime to get all the classes you need.
Here's a sample class that returns references to the "File",
"FileStream", and "FileMode" classes:
package com.adobe{
import flash.utils.*;
import flash.display.*;
public class AIR extends MovieClip {
public static function get File():Class {
try {
var classRef:*=getDefinitionByName('flash.filesystem.File');
} catch (err:ReferenceError) {
return (null);
}//catch
return (classRef);
}//get File
public static function get FileMode():Class {
try {
var
classRef:*=getDefinitionByName('flash.filesystem.FileMode');
} catch (err:ReferenceError) {
return (null);
}//catch
return (classRef);
}//get FileMode
public static function get FileStream():Class {
try {
var
classRef:*=getDefinitionByName('flash.filesystem.FileStream');
} catch (err:ReferenceError) {
return (null);
}//catch
return (classRef);
}//get FileStream
}//AIR class
}//com.adobe package
I've defined the package as com.adobe but you can call it
whatever you
like. You do, however, need to import "flash.utils.*" because
this
package contains the "getDefinitionByName" method. Here I'm
also
extending the MovieClip class so that I can use the extending
class
(shown next) as the main Document class in the Flash IDE.
Again, this is
entirely up to you. If you have another type of class that
will extend
this one, you can have this one extend Sprite, Math, or
whatever else
you need (or nothing if it's all the same to you).
Now, in the extending class, the Document class of the FLA,
here's the
class that extends and uses it:
package {
import com.adobe.AIR;
public class airtest extends AIR{
public function airtest() {
var field:TextField=new TextField();
field.autoSize='left';
this.addChild(field);
field.text="Fileobject="+File;
}//constructor
}//airtest class
}//package
Here I'm just showing that the class actually exists but not
doing much
with it.
If you run this in the Flash IDE, the text field will show
"File
object=null". This is because in the IDE, there really is no
File
object, it only exists when the SWF is running within the
Integrated
Runtime. However, when you run the SWF as an AIR application
(using the
adl.exe utility that comes with the SDK, for example), the
text field
will now show: "File object=[object File]". Using this
reference, you
can use all of the File methods directly (have a look here
for all of
them:
http://livedocs.adobe.com/labs/flex/3/langref/flash/filesystem/File.html).
For example, you can call:
var appResource:File=File.applicationResourceDirectory;
This particular method is static so you don't need an
instance. If you
do (such as when Flash tells you the property isn't static),
simply
create an instance like this:
var fileInstace:File=new File();
fileInstance.someMethod('abc'); //just an example...read the
reference
for actual function calls
Because the getter function in the AIR class returns a Class
reference,
it allows you to perform all of these actions directly as
though the
File class is part of the built in class structure (which in
the
runtime, it is!).
Using this technique, you can create references to literally
*ALL* of
the AIR classes and use them to build your AIR application.
The beauty
of this technique is its brevity. When you define the class
reference,
all of the methods and properties are automatically
associated with it
so you don't need reams of code to define each and every
item.
There's a bit more that can be done with this AIR class to
make it
friendlier and I'll be extending mine until all the AIR
classes are
available. If anyone's interested, feel free to drop me a
line or drop
by my site at
http://www.baynewmedia.com
where I'll be posting the
completed class. I may also make it into a component if
there's enough
interest. To all of you who knew all this already, I hope I
didn't waste
your time.
Happy coding,
PatrickWow, you're right. The content simply doesn't show up at all.
No
JavaScript or HTML parsing errors, apparently. But no IE7
content.
I'll definitely have to look into that. In the meantime, try
FireFox :)
I'm trying to develop a panel to output AIR applications from
within the
Flash IDE. GSkinner has one but I haven't been able to get it
to work
successfully. Mine has exported an AIR app already so that's
a step in
the right direction but JSFL is a tricky beast, especially
when trying
to integrate it using MMExecute strings.
But, if you can, create AIR applications by hand. I haven't
yet seen an
application that allows you to change every single option
like you can
when you update the application.xml file yourself. Also, it's
a great
fallback skill to have.
Let me know if you need some assistance with AIR exports.
Once you've
done it a couple of times, it becomes pretty straightforward.
Patrick
GWD wrote:
> P.S. I've clicked on your link a few times over the last
couple of days to
> check it out but all I get is a black page with a BNM
flash header and no way
> to navigate to any content. Using IE7 if that's any
help.
>
>
>
http://www.baynewmedia.com
Faster, easier, better...ActionScript development taken to
new heights.
Download the BNMAPI today. You'll wonder how you ever did
without it!
Available for ActionScript 2.0/3.0. -
Changing name of class file and it still working
I am simply trying to change the name of this class file i have named G3webcam.class
and i want to change it to webcam.class when i do this the applet does not work any more. If someone knows of a simple fix please help me.Look at previous post...you cannot do this with a class file. The class loader will try to find G3webcam.class and cannot find it...so it will throws an exception.
In order to change, you need to the source code to all the classes of your application, including G3webcam. Then, you can rename the G3webcam.java to webcam.java. Change all the name of G3webcam in the source code to Webcam (including all source file tha use this class). The compile the application. Java compiler will then create the webcam.class file for you.
Unless you're an expert in reading the Java byte code, i don't see anyother way. (Reflection maybe?, but then, you will have to have the code inside your application to do that, which i doubt at this moment)
DJ Decompiler or any decompiler only decompiler the Java byte code to text...so you can read it in text. You can save it as webcam.class, but it will do nothing except make the application not running again. -
Dynamic class loading and Casting
Hi guys,
spent lots of time trying to figure out how to do one thing with no luck, hope anybody can help me here. Here is what I have:
I need to create a new object, I have dynamic variable of what kind of an object I need:
sObjectType = "Article";
ItemObject oItem = Item.init(1000, 1);
oItem.ArticleObjectCall(); // ERROR is here, method does not exist, ArticleObjectCall is method of the Article classItem is a static Class that inits objects
public class Item {
public static ItemObject init(String sObjectType) {
ItemObject oClass = Class.forName("com.type." + sObjectType).newInstance();
return oClass;
}Below are the 2 classes Article and ItemObject
Article
package com.type;
public class Article extends ItemObject {
public void ArticleObjectCall() {
System.out.println("Article Hello");
ItemObject
public class ItemObject {
public ItemObject() {
}Ajaxian wrote:
This is a method INIT, I am dynamically including class com.type.Article , Article extends ItemObject, I am casting new instance of Article to (ItemObject) to return a proper type but later when I try to call oClass object which is I believe my Article class, I get an error. None of which answers my question, yet it does show that you are thoroughly confused...
String x = "blub";
Object y = x;
System.out.println(y.length); // We both know y is a string, but the compiler does not. => ErrorThe compiler enforces the rules of a static type system, your question is quite explicitly about dynamism, which is not without reason the antonym to statics. If you load classes dynamically, you need to use reflection to invoke their methods.
With kind regards
Ben
Maybe you are looking for
-
Adobe Premiere Elements 11 memory
Adobe Premiere Elements 11 keeps saying my momory is ful when it isn't. What can I do?
-
IPad 2 Notifications not Working!! Please Help :(
Hello Everyone, This is going to be my very first post and I have a pretty big problem with my iPad 2. It seems that my push notifications don't work with apps such as IM+ and IMO. Skype seems to work perfectly but I prefer to use IMO for msn. The pr
-
Hi All; For payment Terms, when the system starts calculating the number of days: from GR date, IR date, or baseline date? Also can we make the GR date as the base date for payment?
-
Export to PDF and Excel. Image
Hi gurus! How do you do!, well, I have a question and issue... the user wants to export the report to PDF, for this, I have created a WAD report with Broadcasting command for export to PDF, all works fine, however the company logo is not added to PDF
-
Flash Game Submit Score Problem
I need to modify the flash game Replay button as Submit button and to redirect to other page(gamescore.html) after clicking the Submit button. I am new to flash. I don't know how to modify the script. Please help me. Here is the total score display p