Reg: Classes and memory IDs
Hi All,
I have a class which has 5 methods and around 15 attributes.
DATA: lr_document TYPE REF TO zcl_ps_pricing_document,
" Retrieve the Document Object
lr_document = gr_runtime_context->get_document( ).
in this example, lr_document is refferencing to class zcl_ps_pricing_document.
Now Can I export and Import lr_document to memory IDs?
Regards,
Selva M
Hello friend,
please refer to statement in ABAP on line help if you want to export a reference object to ABAP memory.
To export objects, which are referenced by reference variables, use the statement CALL TRANSFORMATION to serialize and export these objects if the class of these objects implements the interface IF_SERIALIZABLE_OBJECT.
Best Regards,
Jerry
Similar Messages
-
Reg : Classes And Methods In ABAP HR
Hii...
Can anyone tell me what are the standard OOPS classes and Interfaces related to ABAP HR Technical. I want to know the detailed view of all the classes and interfaces which can be used in HR technically.
Or is there any way I can find.
Your suggestions will be helpful for me. So, Kindly help me with this.
Thanks,
Regards,
Rahul GuptaVenkat,
Try look for any SAP Note or create Customer Message to SAP. It's clearly Program Error. We can't collect "lcl_transform" class into Transport Request Independently as it was local Class not Global Class.
Try transporting Transformations again, if it still gives problem. Contact SAP.
Let us know if you implement any SAP Notes.
all the best.
Regards,
Nagesh Ganisetti.
Assign Points if it helps. -
hi all
how to find the use or purpose of CL_RECA_DDIC_DOMA and the methods declared in it.Hi,
actualy constructor is a special method in OOABAP which is used for initialisation and it is always named as constructor.
Constructors are of 2 type 1. CLASS or Static Constructor
and 2 . Method Constructor.
Check the following code for the use and effect of both types of constructors
REPORT demo_constructor_ANIRBAN.
CLASS cl1 DEFINITION
CLASS cl1 DEFINITION.
PUBLIC SECTION.
METHODS:
add,
constructor IMPORTING v1 TYPE i
v2 TYPE i,
display.
CLASS-METHODS:
class_constructor.
PRIVATE SECTION.
DATA:
w_var1 TYPE i,
w_var2 TYPE i,
w_var3 TYPE i,
w_result TYPE i.
ENDCLASS. "cl1 DEFINITION
CLASS cl1 IMPLEMENTATION
CLASS cl1 IMPLEMENTATION.
METHOD constructor.
w_var1 = v1.
w_var2 = v2.
ENDMETHOD. "constructor
METHOD class_constructor.
WRITE:
/ 'Tihs is a class or static constructor.'.
ENDMETHOD. "class_constructor
METHOD add.
w_result = w_var1 + w_var2.
ENDMETHOD. "add
METHOD display.
WRITE:
/'The result is = ',w_result.
ENDMETHOD. "display
endclass.
" Main program----
data:
ref1 type ref to cl1.
parameters:
w_var1 type i,
w_var2 type i.
start-of-selection.
create object ref1 exporting v1 = w_var1
v2 = w_var2.
ref1->add( ).
ref1->d isplay( ). -
Sysresv returns multiple shared memory IDs for one database
Shared Memory:
ID KEY
8 0x00000000
9 0x00000000
10 0x00000000
13 0x00000000
14 0xae2ae9d0
Please see this 'sysresv' output. It returns multiple shared memory IDs for one database (althouth all are 0s except one). Why is this? Does it matter? It seems not eating up memory. Stop and start database didn't help.* System Configuration
swap files
swapfile dev swaplo blocks free
/dev/md/dsk/d101 85,101 16 201342320 201342320
* Tunable Parameters
2055864320 maximum memory allowed in buffer cache (bufhwm)
30000 maximum number of processes (v.v_proc)
99 maximum global priority in sys class (MAXCLSYSPRI)
29995 maximum processes per user id (v.v_maxup)
30 auto update time limit in seconds (NAUTOUP)
25 page stealing low water mark (GPGSLO)
1 fsflush run rate (FSFLUSHR)
25 minimum resident memory for avoiding deadlock (MINARMEM)
25 minimum swapable memory for avoiding deadlock (MINASMEM)
CO4P:/opt/oracle:>ipcs -ma
IPC status from <running system> as of Monday, April 21, 2008 2:50:10 PM PDT
T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
Shared Memory:
m 14 0xae2ae9d0 rw-r--- oracle dba oracle dba 481 24576 20322 25104 14:50:10 14:50:10 11:24:46
m 13 0 rw-r--- oracle dba oracle dba 481 2030043136 20322 25104 14:50:10 14:50:08 11:24:43
m 10 0 rw-r--- oracle dba oracle dba 481 2030043136 20322 25104 14:50:10 14:50:08 11:24:40
m 9 0 rw-r--- oracle dba oracle dba 481 2013265920 20322 25104 14:50:10 14:50:08 11:24:37
m 8 0 rw-r--- oracle dba oracle dba 481 2063597568 20322 25104 14:50:10 14:50:08 11:24:34
m 0 0xcace --rw-rw-rw- root root root root 0 2 2344 2344 14:49:57 14:49:57 9:35:43 -
Threaded inner classes & heap memory exhaustion
(_) how can i maximize my threading without running out of
heap memory?
push it to the limit, but throttle back before an
java.lang.OutOfMemoryError.
(_) within 1 threaded class ThreadClass, i have two threaded inner classes. for each instance of ThreadClass i only
start one instance of each inner class.
and, i start hundreds of ThreadClass, but not until the previously running ThreadClass object exits, so only one should be running at any given time.
so, what about threaded inner classes?
are they good? bad? cause "OutOfMemoryErrors"?
are those inner threads not dying?
what are common causes of:
java.lang.OutOfMemoryError: java heap space?
my program runs for about 5-minutes, then
bails with the memory error.
how can i drill down and see what
is eating-up all my memory?
thanks.A Thread class is not the same as a thread of
execution. Those inner class based threads of
execution are not dying.maybe. but this is the way i test a thread's life:
public void run() {
System.out.println("thread start");
System.out.println("thread dies and release memory");
}for each inner thread, and the outer thread, this approach for
testing thread life reveals that they die.
Why don't you use a thread pool?ok. i will think about how to do this.
>
If not, you need to ensure those inner threads have
exited and completed.what is a 100% sure check to guarantee a thread exits other than
the one i use above?
note:
the outer thread is running on a remote host, and the inner threads
are running locally. here are the details:
public class BB implements Runnable, FinInterface {
public void run() {
// do some work on the remote machine
private void startResultsHandler(OisXoos oisX) {
ResultHandler rh = new ResultHandler(oisX);
rh.start();
public void startDataProxy(OisXoos oisX, String query) {
DataProxy dp = new DataProxy(oisX, query);
dp.start();
public class ResultsHandler extends Thread {
// runs locally; waits for results from servers
public void run() {
ObjectInputStream ois = new ObjectInputStream(oisX.input);
Set result = (Set) ois.readObject();
} // ____ class :: _ ResultsHandler _ :: class ____
public class DataProxy extends Thread {
// runs locally; performs db queries on behalf of servers
public void run() {
ObjectOutputStream oos = new ObjectOutputStream(oisX.output);
while(moreData) {
.... // sql queries
oos.writeObject(data);
StartResultsHandler(oisX);
} // _____ class :: _ DataProxy _ :: class _____
}now, the BB class is not started locally.
the inner threads are started locally to both service data requests
by the BB thread as well as wait for its results.
(_) so, maybe the inner threads cannot exit (but they sure look
like they exit) until their parent BB thread exits.
(_) yet, those inner threads have no knowledge that the BB
thread is running.
externalizing those inner thread classes will put 2-weeks of work
in the dust bin. i want to keep them internal.
thanks.
here this piece of code that controls everything:
while(moreData) {
FinObjects finObj = new BB();
String symb = (String) data_ois.readObject();
OisXoos oisX = RSAdmin.getServer();
oisX.xoos.writeObject(finObj);
finObj.startDataProxy(finObj, oisX, symb);
} -
ABAP Objects with Workflows / Classes and Instances
Hello,
I am currently designing a workflow using an ABAP-Objects. So far I have been been able to get my Workflow to run with my class, but I have a couple of problems:
- I am using the Function 'SAP_WAPI_START_WORKFLOW' to start other subflows, which enables me to decide which subflow to start at runtime. All of the subflows have standart importing-parameters in their containers, such as the key of my class. In each workflow I instantiate my class using a self-written method, which checks the table T_INSTANCES in my object, and then either returns the object reference to an existing instance or creates a new one. Obviously all of the subflows that I call from my main workflow should be able to find the instance. As far as I can see in their protocolls, this happens without any problems. The problem starts when I make changes to the instance. For example the changing of attributes (with setter methods) seems not to work. After the subflows are finished, in my main workflow, I do not see (with getter methods) any changes that has been made to the object. Is local persistence really limited to one workflow ?
- My second problem is basically about the workflow container in workflow protocoll. In the same workflow, I can change the attributes of my object. Nevertheless, the protocoll always show the initial attribute, even though, my task with the getter-method returns the new value of the attribute.
I appreciate any help and thanks a lot in advance.Hello Pauls,
Thank you for your answer. I think we are misunderstanding each other. The problem occurs (I think) because my class is not a singleton class. Or am I mistaken ?
When I directly start a subflow from my main workflow, then the instance that I have created in my main workflow is also visible to the subflow. As well as the static table which actually keeps track of the instances. So, in this case the subflows finds the instance and then can use the object as is.
When I start a subflow from my main workflow using the function I mentioned above, then even though the same object key is used, there is a new instance. And the static table (I assume that you mean a static variable from type table, when you say "class table") is completely empty. In this case, my "new" instance is created which overwrites every attribute that I have set in the main workflow, before I started the subflow. More interestingly, my main workflow instantiates another new object, as soon as the subflow has finished. (I am using an event to wait for the subflow to finish.)
On the other hand, I am not quite sure that I understood your approach with refresh and how it could help me. This method is not well documented anywhere, and all of the examples that I have found are about "leave it empty"
As far as I understood, this method is called by the workflow between the steps, when an object is used. I slowly start to think that I need advanced information about Workflows and Memory Management.
Thanks a lot again. Apparently, I am the only person who came across such a problem
Greetz
G.Fendoglu -
Jdev11g CPU profile and Memory Profile doesn't work for Mac
I'm running Jdev11g on Mac OSX 10.5.5,
CPU Profile and Memory Profile doesn't work. I got following message:
Error occurred during initialization of VM
Could not find agent library in absolute path: /Shared/jdevjavabase11110/jdeveloper/jdev/lib/profiler16.so
The file actually is there. I don't understand why they looking for .so file, it supposed to be mapped as .jnilib on Mac.
This is broken on TP4 as well.I'm still seeing this issue. Here is what I get:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -client "-agentpath:/Users/kamleshnanda/Downloads/jdeveloper/jdev/lib/profiler16.so=port=60950,jarpath=/Users/kamleshnanda/Downloads/jdeveloper/jdev/lib/profiler-agent.jar,enable=t,depth=1000,startup=connect,time" -classpath /Users/kamleshnanda/jdeveloper/mywork/MyJavaApplication/Project1/classes project1.Class1 Hello
Error occurred during initialization of VM
Could not find agent library in absolute path: /Users/kamleshnanda/Downloads/jdeveloper/jdev/lib/profiler16.so
Process exited with exit code 1.
I'm using the following build:
About
Oracle JDeveloper 11g Release 1 11.1.1.2.0
Java Edition Version 11.1.1.2.0
Build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536
Copyright © 1997, 2009 Oracle and/or its affiliates. All rights reserved.
IDE Version: 11.1.1.2.36.55.36
Product ID: oracle.jdeveloper
Product Version: 11.1.1.2.36.55.36
Version
Component Version
========= =======
CVS Version (External) (CVS) 1.12.13 (client/server)
Java(TM) Platform 1.6.0_17
Oracle IDE 11.1.1.2.36.55.36
PMD JDeveloper Extension 4.2.5.3.0
Team Productivity Center 11.1.1.2.36.55.36
Versioning Support 11.1.1.2.36.55.36
Here are the JVM properties:
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.6.0_17-b04-248-10M3025
java.specification.name Java Platform API Specification
java.specification.vendor Sun Microsystems Inc.
java.specification.version 1.6
java.vendor Apple Inc.
java.vendor.url http://www.apple.com/
java.vendor.url.bug http://bugreport.apple.com/
java.version 1.6.0_17
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Sun Microsystems Inc.
java.vm.specification.version 1.0
java.vm.vendor Apple Inc.
java.vm.version 14.3-b01-101
Here is the OS information:
os.arch x86_64
os.name Mac OS X
os.version 10.6.2 -
Implementing a Vector3f class and Vectoroperations
Hello,
I implemented a class that represents a vector in 3d space. It has the three float members x,y,z
Now I am courious wether I should implement some of the Mathematic operations as Methods of this class like:
Vec3f getInverse()
float getlength ()
and others
Or should I rather make a new class with some (static) methods for these operations.
I am concerned of performance and memroy. Because I will have to create thousands of these objects.
This brings me to a general question about understanding memory allocation of classes and objects:
How much memory will be allocated for a single instance of a class? Does each instance of a class store the complete methods and their functionality? Or ist it more like this: There is one space in memory (lets call it <A>) for the class and each new instance of that class only stores the rerence adresses to each method that is stored in <A> ? So the instances only have to store the concrete values of its membervariablesand the adresses.
I hope you understand , what I mean.Don't worry about memory footprint (in this case, that is), the individual instances of your class doesn't have separate copies of the method implementations.
The getLength() method should certainly be imlemented in your vector class, as it describes the state of a particular vector.
What on earth is the inverse of vector??. A three-dimensional vector space is not a ring.
Regards -
Class file/memory mismatch
I ma trying to compile a source code in 64 bit Solaris. The same code works fine with 32 bit but on 64bit it shows the following error -
ld: elf error: file /usr/users/PLAT/cltxm25/atm/generic_archive-smdxp83/generic_archive/tlvcreation.a(keyfields_populate.o): elf_getshdr: Request error: class file/memory mismatch
ld: elf error: file /usr/users/PLAT/cltxm25/atm/generic_archive-smdxp83/generic_archive/tlvcreation.a(tlvcreation_populate.o): elf_getshdr: Request error: class file/memory mismatch
I check $file keyfield_populate and it is ELF 64-bit MSB relocatable SPARCV9 Version 1. Same is the case with tlvcreation_populate.o
Please advice something on this.i got the same error when compiling hypre (http://www.llnl.gov/CASC/hypre/) on amd64. It works fine in 32 bits, but in 64, you have to verify LDFLAGS, in case of hypre, i have to modify Makefile to take "-m64" into account, and now, everything works fine (32 and 64)
hth,
gerard -
Passing several fields to various classes and methods?
Passing several fields to various classes and methods?
Hi there.
I have an application that allows a user to define a configuration and save it.
The user can edit an existing configuration, add a new one, or delete an existing one.
Once a configuration is selected the user then starts an application that relies on the selected configuration data. Each configuration holds around 60 fields.
The configuration information is mixed between integers and strings. Around 25 are hidden from the user, and 35 can be modified by the user. The number of fields is not a fixed amount. For example the configuration contains an email-to list and the list for one configuration can have 1 address, and for another could have 10 addresses.
I have decided to redesign using the Model View Controller concept. I am creating the model to hold the configuration information. I am trying to decide if I should have single get and set methods for each field or if I should create some kind of Object that holds all of one configuration and pass this back.
The configuration that is selected does not really require the fields to be sorted in any particular order.
What would you suggest is a good structure to use to pass the configuration information around?
I have been using the Properties class with an .ini file that can be read and updated.
Is this efficient? Doesn�t this impact the speed of processing if I have to read a file every time I want to determine what a particular configuration field is?
Could I just create a class that reads the profile, stores the configuration information for one specific selected config, and then passes the class back to the calling procedure. This would consolidate all the file reading into one class and after that it is held in memory.
Would it be better to read the configuration information into a collection of some sort , or a vector and pass this back to calling routine?
public class MyModel {
//read information to load the field of
Private MyConfig selectedConfiguration = new MyConfig;
Private int selectedField1 = 0;
/** Constructor */
MyModel() {
// open profile, read profile fields the
selectedConfiguration.field1 = profileField1; //assume this is 5
selectedConfiguration.field2 = profileField2; //assume this is 10
selectedConfiguration.field3 = �Test�;
field4ArrayOfStrings = new String[selectedConfiguration.field1 ]
[selectedConfiguration.field2];
selectedConfiguration.field3ArrayOfStrings [0][0] = �First String�
public class MyConfig(){
int field1;
int field2;
String field3;
String[][] field4ArrayOfStrings;
// more stuff here �.
// selectedConfiguration
public void setConfiguration(MyConfig p_config) {
String selectedConfiguration = p_config;
public String getConfiguration() {
return selectedConfiguration;
//The other option is to have get and set for each field
public void setField1(int field1) {
String selectedField1 = field1;
public String getField1() {
return selectedField1;
}Slight correction: reference to field3ArrayOfStrings changed to field4ArrayOfStrings.
Message was edited by:
tkmanjohndjr wrote:
I think the term you want is "cross reference".
Back in the olden days of green bar paper listings and linker maps they used to be quite common. At least they were where I worked.
I have not seen any cross references in some time.
java.lang.Object grr_argh_why_I_oughta_you_dirty_rat; // a pretty cross reference -
Driver class and Subversion details- Engine DB
Is there any way to find complete driver class and sub version details for Engine Database?
Hi Brian,
I was able to retrieve the id for a DataSourceObject using the following code:
public String getDataSourceObjectsAsString(DataSourceObject boDataSourceObject, int level) {
String padding = "";
for (int i=0; i<level; i++) {
padding += " ";
//String output = padding + boDataSourceObject.getName() + "<BR>";
String output = padding + boDataSourceObject.getName() + " (" + boDataSourceObject.getQualification() + ") - " + boDataSourceObject.getID() + "<BR>";
DataSourceObject boDataSourceObject_child = null;
for (int i=0; i<boDataSourceObject.getChildCount(); i++) {
boDataSourceObject_child = (DataSourceObject) boDataSourceObject.getChildAt(i);
output += getDataSourceObjectsAsString(boDataSourceObject_child, level+1);
return output;
However, the ids will only be applicable for objects and measures and not classes.
Also, the ids that are retrieved through the Report Engine SDK is not the same ids that are retrieved from the Designer SDK.
Hope this helps.
Regards,
Dan -
How to get cpu and memory information by Java?
I'm trying to write a java program to get the CPU and memory information and statistic of a desktop computer. Is it possible to capture this kind of information by Java, if yes, which classes are used?
Thanks a lot.You can get memory info about the VM and not about the OS.
These things are inherently OS-dependent. Chances are bad there is a (pure) Java solution for this. -
Assignment of Class and charecterstic to serial number
Hi Masters,
is it possible to assign Class and charecter to serial number, like batch charecterstic serial number class should populate
at the generation of serial number, then user will enter the serial number details,
please guide ,
MadhuHi keerthi
Thank you v much for ur's replay, we tried the above option earlier it self , but it will not work like a batch charecterstic,
we want to create this req for material , client dont want to create equipment, and also while crating serial no, it iwll not popup like
batch to enter details,
we need to enter the data while creating serial number,
Reg
Madhu -
Difference between Abstarct Class and Interface
HI,
Here is a simple one for the gurus but quite important for me.
What is the difference b/w an Interface and an abstract class?
Why do we need each one of them?
I would appreciate if you people can give examples of each so that I amy understand fully
Thanks in advance...A normal class (not abstract) has a special behaviour, like java.awt.Frame. A Frame is a frame no matter how you subclass it. If you create a subclass it will still be able to be displayed by calling it's show method. So by using a normal class you can create a type of class.
An abstract class does the same, but it leaves some of the code unwritten. For instance java.lang.Number. This class is abstract becuase it has no knowledge of how to store the number in memory. But it knows that it is a number, and any subclass will still be a number. You could create a subclass of Number that can hold the time in milliseconds and checks your system clock to see what the time is, it could also have methods that return the time in another country, but it would still be just a Number.
An interface is a way to describe what an object can do, not what it is. So with java.lang.Comparable as an example you can make any class comparable. This means that no matter what type of object you have, it can be compared with other objects. So you can have a subclass of Frame that can be compared with other windows. Or a subclass of Number that can be compared with other Numbers. You can even compare those two different types if you like. So you could compare a window with a number.
That is the difference between abstract classes and interfaces.
I hope you could follow my arguments, it isn't an easy subject,
Daniel -
Hello,
I have a class to pool db connections.
When I first connect to the site there is a delay loading the page which I think may be caused by this class being instantiated.
Is it possible to keep this class in memory after it goes out of scope, avoiding garbage collection.
If this can be done, is it a good idea??
ThanksPut the object into Application scope as an attribute.
As long as your server is running, It will never go out of scope, and always be available, to all web applications.
Or if you have a singleton object, you have a static reference to the resource. That should never go out of scope.
As a matter of interest how much of a "re-connect" delay are we talking about? A few seconds? 30 seconds?
If its such a bad idea, why were the pooling API's written??They are not saying that pooling is a bad idea, but rather writing your own code to perform a function that the container already provides very efficiently.
You counter that argument by saying you want your code to be completely server independant. Fair enough.
When I first connect to the site there is a delay loading the page which
I think may be caused by this class being instantiated.The operative word here: think.
Put some timing/profiling code into your class to see how much time it is taking. Record System.currentTimeMillis() when the class is initialized, when you start running your "getConnection()" and when it returns control to the calling object.
That should help you determine exactly where the process is being slow - whether it is the running of that class, or something else.
Good luck,
evnafets
Maybe you are looking for
-
Body of email displayed is not from the sender in the header
I could not find anything about this in a search, and a visual scan of the discussions. After two weeks of being shut down (vacation), and occasionally during that time accessing email through dotMac, I encountered the following when I restarted my h
-
I can't seem to connect my iphone to comcast to get my Outlook email. I've enter the Server several times and it say's it can't verify the exchange server. Is this because Comcast is not an Exchange server. Thanks
-
Help please! Video too dark to review and make clips!
Bought a new imac G5 for video editing as this was recommended by the mac store. Just captured my first short film, filmed on panasonic dvx 100B in 24pA. Not only are the day scenes fuzzy, but the night scenes are black and I can't see them to even m
-
"Exit" in director is ? in Flash
Another in my series of "switching from Director to Flash" questions. Here's what I'm trying to do. 1. Allow the user to type a new in an Input Text box. 2. If the number is from 1 to 12, go to the "input" frame 3. If the number is not from 1 to 12,
-
ITunes has stopped working; should I reinstall?
I'm running the latest iTunes software on a 24-inch iMac G5 from early 2008 running OSX 10.9.4 with 6 GB memory. Recently, iTunes gets hung up and totally non responsive and quits or I have to force it to quit. This problem had already started when I