Data member comman for number of classes
I want to use a coman variable that I may change from Number of classes how I can do that
You need to be bit more specific.
Hope the following is your requirement,
You have a variable (lets say X) is a class (lets call this class MainClass).
Now from other classes you want to change the value of MainClass.X��.Right?
Solution
1. while declaring X make it as �public static� so you can refer it from any class by �MainClass.X�. Any way this should be done only if you want X to have static value
2. Add a method in MainClass �setXvalue(value) { X=value; }� for this you will have need the instance of MainClass
Regards,
Byju
Similar Messages
-
Class Data Sharing for User Defined Classes
i am using jdk 5.0 . JDK 5.0 supports class data sharing for system level classes. Is there any way a class data sharing be done for a user defined class?
Samantha10 wrote:
Is this class data sharing possible for user defined classes also? i have a singleton class which i am invoking through a script. The script has been scheduled to run every 1 sec . Since it is being invoked every 1 sec hence the singleton pattern is failing . Hence if the this class data sharing is possible then the singleton pattern can be made applicable.If you have a single process and you have a single class loaded by two different ClassLoader instances
in some respects they will be two different classes
if (class1 instanceof class2.getClass())returns false.
This is not the case for Java core classes because they are always loaded by the SystemClassLoader.
You write you
have a singleton class which i am invoking through a script. What approach to you use to invoke the singleton?
I am trying to figure out if you launch a new JVM every second...
Maybe you can use Nailgun. -
Status and messaging for systems with a large number of classes
Very common dilemma we coders face when creating
systems involving a large number of classes:
Any standard framework to take care of the global status of the whole application and of gui subsystems
for both status handling and report messages to users?
Something light if possible...and not too much threads.Ah, I see,
I found JPanel with CardLayout or a JTabbedPane very good for control of several GUI in an application - as alternative organization tool I use a JTree, which is used for both, selecting and organizing certain tasks or data in the application - tasks are normally done with data associated with them (that is, what an object is for), so basically a click onto a node in this JTree invokes an interface method of that object (the userObject), which is associated with this node.
Event handling should be done by the event-handling-thread only as far as possible - it is responsible for it so leave this job to it. This will give you control over the order in which the events are handled. Sometimes it needs a bit more work to obey this rule - for example communication coming from the outside (think of a chat channel for example) must be converted to an event source driven by a thread normally. As soon as it is an event source, you can leave it's event handling to the event handling thread again and problems with concurrent programming are minimized again.
It is the same with manipulating components or models of components - leave it to the event handling thread using a Runnable and SwingUtilities.invokeLater(Runnable). This way you can be sure that each manipulation is done after the other in the order you have transferred it to the event handling thread.
When you do this consequently most of your threads will idle most of the time - so give them a break using Thread.sleep(...) - not all platforms provide preemptive multitasking and this way it is garanteed, that the event handling thread will get a chance to run most of the time - which results in fast GUI update and fast event handling.
Another thing is, that you should use "divide and conquer" also within a single GUI panel - place components in subpanels and transfer the responsibility for the components in this panel to exactly these subpanels - think of a team manager which makes his employees work together. He reports up to his super manager and transfers global order from his boss into specific tasks by delegation to the components, he is managing. If you have this in mind, when you design classes, you will have less problem - each class is responsible for a certain task - define it clearly and define to whom it is reporting (its listeners) and what these listeners may be interested in.
When you design the communication structure within your hierarchy of classes (directors, managers, team managers and workers) have in mind, that the communication structure should not break the management hierarchy. A director gives global orders to a manager, which delegates several tasks to the team managers, which make their workers do what is needed. This structure makes a big company controlable by directors - the same principles can also keep control within an application.
greetings Marsian -
How do I access a data member in the class that called me?
I have a Swing Application that calls a class FileChooser that sets up a JFileChooser. When the called classes ActionListener is invoked it gets the path from by calling a File class. The calling class calls the JFileChooser from multiple places for different reasons. When the ActionListener is invoked I need to get this path String back to the original calling class. I can't figure out how to do it. I've tried getter routines, setting up return strings. But the problem is that there isn't anyway of getting the data back to the calling class because I don't know how to access the calling class from inside an ActionListener? this must be a common thing to do. Can someone clue me in? I'm new to java and finding that it is not as easy as I had hoped to do simple things. Actually, better stated it is hard to find basic patterns to get simple tasks done, but once I figure it out it is usually a simple implementation. Any help will be greatly appreciated. Thanks.
This is frontending a C++ utility with a java GUI. The GUI collects the users requirements and then shells out the utility. The first class is in one file and the second class is in a different file. The first class calls the second class to get the location of the utilities input file and it also call it to get the path of an output directory. Maybe I should have used an inner class for the second class? I'm new to Java.
-
Are there any advantages to using a Data Value Reference for LabVIEW Classes?
Hi
I recently came across an example where the developer had used a data value reference for the class cluster in LabVIEW.
What are the advantages of doing this?
Doesn't the use of LV objects already avoid the creation of multiple copies of data thereby reducting memory usage?
Thanks
ADLabVIEW's OOP is implemented as a By Value. This means, as Tst stated, branches in wires could mean copies in the object. The DVR is a way to make it By Reference.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Hi All,
is there any table which are having the fields : CLASS(Class Number), KLART(Class Type) and MATNR(Material) in QM.
the above three fields should be in single fields.
thanks,Hi Gupta,
Go through the AUSP table: Characterstic Values,
IFLOT table : Functional location.
and
KSSKAUSP view for required fields.
by
Prasad gvk. -
i have account member ACC15015.for intersection of N0_version,No_Scenario I,No_Entity I have some data for this intersectionNOW I WANT TO CYOP THIS aCC15015 DATA TO EACH SCENARIO,EACH VERSION AND LEV 0 MEMBER OF ENTITY.
WHAT IS THE SSCRIPT FOR THIS
PLZ HELP MEI guess my first question is why? One of the beauties of Essbase is the efficient way it stores the data. If you are using this for a calculation, you can just reference the intersection where the data exists. Bloating your database by creating blocks for all of these intersections is counter-productive.
-
Create item class for Number values
Hi,
I want to create a item class for year like (current year+3).
So i created the Item class in Dis.Admin But it wont reflect in Dis.plus parameter . So please tell me how to create a item class for Number values.
Regards
ManikandanHi Rod
I rarely use Desktop and neither do my customers, unless they are on versions of Discoverer prior to 10.1.2. Time and time again I have taught 10.1.2 Plus / Viewer to dyed in the wool Desktopees to finish the course for them to say that they are never going to use Desktop again.
One of the many issues with Desktop is the caching and even though it can do some things that Plus cannot, the many features in Plus that don't exist in Desktop far outweight them.
What do you think? Do you still see a use for Desktop?
How about everyone else? I would love to hear from you.
Best wishes
Michael -
Is there an alarm data member for when an alarm reseets?
I created a spreadsheet to track alarms, but I can only show when the alarm activates. I need the ability to show when an alarm becomes active, when the alarm is acknowledged, and when the alarm resets. I have tried the alarm unacked data member, but that only shows how many alarms have not been acknowledged, it is not per alarm message.
MWarnerTry WorkTime. https://itunes.apple.com/us/app/worktime-work-schedule-shift/id594764457?mt=8 You'll need to get the premium paid version for the alarms/reminders.
-
Oracle.jbo.domain.Number; local class incompatible
Hi Forum,
Development Tool : Jdeveloper 9.0.4 (part of Oracle 10g Suite)
Target Application Summary:
A simple application which displays the content of a database table and allows it to be modified both through a web interface as well as a Swing standalone client.
A Workspace having three projects:
1) A Business layer defined by using BC4J(Business Components For Java) provided with Jdeveloper 10g.
2) A Swing/JClient application for BC4J which accesses the BCJ4 layer using a Business component client data model.
3)A JSP application using JSP for business components which accesses the BC4j layer
Target Deployment:
1) Light-weight swing interface at machine 1
2) Business components and JSP part in an application server on Machine 2
3) Oracle DB on Machine3
Problem Statement
We deployed the BC4J Middle tier on OC4J standalone as a session bean. Then the client jar was deployed as a remote application(using Swing/JClient for business componments), the following error comes:
(oracle.jbo.PiggybackException) JBO-28300: Piggyback read error
----- LEVEL 1: DETAIL 0 -----
(java.io.InvalidClassException) oracle.jbo.domain.Number; local class incompatible: stream classdesc serialVersionUID = -6507359405709672486, local class serialVersionUID = -592084144037230518
Can the forum help me with the problem (i am using the library BC4JOracleDomains which has oracle.jbo.domain.Number class)
Thanking you in advance.Firstly, good job on describing your problem/situation. Some people just don't bother to be verbose.
Secondly, I have to note that I don't do any development in this way so I have no 1st hand experience with this excpetion. But, it appears as though you are using different versions of the jar files (which in turn contain different versions of the classes). Maybe you should take a look at that? -
Getting a value of a data member that is in a subclass only
Hi
i have one superclass called membership and it has the data members name, password, readingPoints.
i have two subclasses of the membership class called silver and gold.
the gold subclass has an extra data member called statusPoints.
i have no idea how to retrieve the statusPoints in my main program.
in my main program, i created a few gold and silver members and put them into an array.
this is how i have been trying to retrieve just the statusPoints.
System.out.println (members[0].statusPoints);
System.out.println (members[0].GoldMembership.statusPoints);
System.out.println (members[0].(GoldMembership).statusPoints);
none of them work =(. i have no idea how to specifically call that subclass from my main program to get that statusPoint value.
i hope some one knows the answer to my problem
thanks in advance! =)xiarcel: i've heard of the term casting before but i
don't think i've ever used it, or i have used it but
not know that i have :p(GoldMembership)members[0]
That is casting (well, onversion of it. Another would have been
Membership[] members ...
members[0] = new GoldMembership()...)
warnerja: ohh! ill make a note of that, in my gold
subclass case, is it even possible to even get that
value without casting it into a string using a getter
method?Well, the idea is probably you are doing something outside of the class that might be best handled inside the class. For instance, if you are calculating a price of something that depends on readingPoints, then creating an abstract Membership method:
public abstract double calculateMemberPrice(double origPrice);
In which most Memberships will calculate the price based solely on readingPoints
// example in SilverMembership
public double calculateMemberPrice(double origPrice)
double price = origPrice - (origprice * (readingPoints/1000));
return price;
}but for which GoldMembership would calculate using both statusPoints and readingPoints:
public double calculateMemberPrice(double origPrice)
double price = origPrice - (origprice * ((readingPoints+statusPoint)/1000));
return price;
}Then the you don't need to cast, you can just do
members[0].getMemberPrice(double originalPrice);
I hope that makes half a sense.
>
my main program has a members array where it stores
gold and silver members, but yeah i just made position
0 gold to try to get the statusPoint out of it =).
stevejluke: indeed i was =)
im so happy its working now, and its all thanks to you
guys!! its so great to have a place like this where i
can get help so fast! me and my gf were trying to
figure it out for hours and hours with no luck!
thanks again guys/girls =) you're the best!! :p -
Source Data file format for FDM
Hi,
I am new in FDM and have couple of question on data loading.. We are using FDM to load the data in Essbase. Please help me on these-
Question 1:
In source data file, suppose, we have around 300 account members and around 100 PO numbers. There are multiple 'PO numbers' records for each 'account member'.
As per our requirement, we need to sum up the all values for 'PO number' column for each account.
For example, suppose, we will get data file as below. Here, Important point is, I don't have dimension for 'PO number ' in Essbase. I will get the accounts data corresponding to 'PO number' but there is no dimension in Essbase to store data at 'PO number' level.
Account column PO number Actual Estimated
A001 P0123_10 10.00 15.00
A001 P0123_20 20.00 25.00
A002 P0123_30 30.00 35.00
A002 P0123_40 40.00 45.00
A002 P0123_50 50.00 55.00
A003 P0123_60 60.00 65.00
A003 P0123_70 70.00 75.00
A003 P0123_80 80.00 85.00
and so on
Now we want to sum up the data for each Account member i.e
Account column Actual Estimated
A001 30.00 40.00
A002 120.00 135.00
and so on ---
As per my understanding, While defining the *'Import format'* for this source data file , we will not consider the column for 'PO number' and will define the mapping with merge option. Hence, multiple record for each account will be accumulated.
Please suggest me on this.. Is my understanding correct or how will handle this type of scenario?
Question2:
Suppose, we have data for multiple scenarios ( i.e. Actual, Estimated etc) in one excel sheet, which will be used in FDM as a source file? As per admin guide, we have POV for Category and data will be loaded for that selected POV only. In this case, will FDM consider the data for each selected POV scenario or how FDM will function in this case... do we need to have separate files for each scenario...
Please help me to solve these problems...
Thanks & Regards,
Mohit JainQUESTION1: If you ignore the PO field in the import you will get the accumulating behaviour you describe. Not sure what you mean by using merge in the mapping. The default behaviour of FDM is to accumalate all non-unique lines following the mapping process you don't have to set anything
QUESTION2: Data will only be loaded to the selected Category in the POV if you have data in the file that needs to be targetted at a different scenario you will need a seperate load file containing that data and choose the alternate category in a seperate manual workflow process -
Z data source issue for creating packets
Hi I have created a Z data source (function module) .
My issue is I am not able to create data record packets all the data is coming in one packet only.
The is code is as show below is some one can please assist me how can I change the code so that is can create multiple packets for the option given in Tcode RSA3.
FUNCTION ZBW_MATERIAL_GROUP_HIE.
""Local Interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZBW_MAT_GRP_HIER OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
TABLES : /BI0/HMATL_GROUP.
DATA : BEGIN OF t_hmat OCCURS 0,
hieid LIKE /BI0/HMATL_GROUP-hieid,
objvers LIKE /BI0/HMATL_GROUP-objvers,
iobjnm LIKE /BI0/HMATL_GROUP-iobjnm,
nodeid LIKE /BI0/HMATL_GROUP-nodeid,
nodename LIKE /BI0/HMATL_GROUP-nodename,
tlevel LIKE /BI0/HMATL_GROUP-tlevel,
parentid LIKE /BI0/HMATL_GROUP-parentid,
END OF t_hmat.
DATA : BEGIN OF t_flathier,
hieid LIKE /BI0/HMATL_GROUP-hieid,
lv2_id LIKE /BI0/HMATL_GROUP-nodeid,
lv2_name LIKE /BI0/HMATL_GROUP-nodename,
lv3_id LIKE /BI0/HMATL_GROUP-nodeid,
lv3_name LIKE /BI0/HMATL_GROUP-nodename,
lv4_id LIKE /BI0/HMATL_GROUP-nodeid,
lv4_name LIKE /BI0/HMATL_GROUP-nodename,
lv5_id LIKE /BI0/HMATL_GROUP-nodeid,
lv5_name LIKE /BI0/HMATL_GROUP-nodename,
lv6_id LIKE /BI0/HMATL_GROUP-nodeid,
lv6_name LIKE /BI0/HMATL_GROUP-nodename,
lv7_id LIKE /BI0/HMATL_GROUP-nodeid,
lv7_name LIKE /BI0/HMATL_GROUP-nodename,
lv8_id LIKE /BI0/HMATL_GROUP-nodeid,
lv8_name LIKE /BI0/HMATL_GROUP-nodename,
lv9_id LIKE /BI0/HMATL_GROUP-nodeid,
lv9_name LIKE /BI0/HMATL_GROUP-nodename,
lv10_id LIKE /BI0/HMATL_GROUP-nodeid,
lv10_name LIKE /BI0/HMATL_GROUP-nodename,
lv11_id LIKE /BI0/HMATL_GROUP-nodeid,
lv11_name LIKE /BI0/HMATL_GROUP-nodename,
material LIKE /BI0/HMATL_GROUP-nodename,
END OF t_flathier.
FIELD-SYMBOLS: <f> LIKE LINE OF t_hmat,
<Level> TYPE ANY.
data : count(2) type c,
lv_level(20) type c.
DATA : lv_count TYPE n.
DATA : lv_id LIKE /BI0/HMATL_GROUP-nodeid,
lv_hieid LIKE /BI0/HMATL_GROUP-hieid.
Auxiliary Selection criteria structure
DATA: l_s_select TYPE srsc_s_select.
Maximum number of lines for DB table
STATICS: s_s_if TYPE srsc_s_if_simple,
counter
s_counter_datapakid LIKE sy-tabix,
cursor
s_cursor TYPE cursor.
Select ranges
RANGES: l_r_nodename FOR /BI0/HMATL_GROUP-nodename,
l_r_hieid FOR /BI0/HMATL_GROUP-hieid.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
IF i_initflag = sbiwa_c_flag_on.
Initialization: check input parameters
buffer input parameters
prepare data selection
Check DataSource validity
CASE i_dsource.
WHEN 'ZMATERIAL_GROUP_HIE'.
WHEN OTHERS.
IF 1 = 2. MESSAGE e009(r3). ENDIF.
this is a typical log call. Please write every error message like this
log_write 'E' "message type
'R3' "message class
'009' "message number
i_dsource "message variable 1
' '. "message variable 2
RAISE error_passed_to_mess_handler.
ENDCASE.
APPEND LINES OF i_t_select TO s_s_if-t_select.
Fill parameter buffer for data extraction calls
s_s_if-requnr = i_requnr.
s_s_if-dsource = i_dsource.
s_s_if-maxsize = i_maxsize.
Fill field list table for an optimized select statement
(in case that there is no 1:1 relation between InfoSource fields
and database table fields this may be far from beeing trivial)
APPEND LINES OF i_t_fields TO s_s_if-t_fields.
ELSE. "Initialization mode or data extraction ?
Data transfer: First Call OPEN CURSOR + FETCH
Following Calls FETCH only
First data package -> OPEN CURSOR
IF s_counter_datapakid = 0.
Fill range tables BW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = '0MATERIAL'.
MOVE-CORRESPONDING l_s_select TO l_r_nodename.
APPEND l_r_nodename.
ENDLOOP.
LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'HIEID'.
MOVE-CORRESPONDING l_s_select TO l_r_hieid.
APPEND l_r_hieid.
ENDLOOP.
Get the data from Hierarchy table
SELECT * FROM /BI0/HMATL_GROUP INTO CORRESPONDING FIELDS OF
TABLE t_hmat
WHERE hieid IN l_r_hieid
AND objvers = 'A' .
ENDIF.
loop through all the 0MATERIAL entries to get all the hirarchy levels.
Start of change.
LOOP AT t_hmat ASSIGNING <f>
WHERE iobjnm = '0MATL_GROUP'
AND nodename IN l_r_nodename.
LOOP AT t_hmat ASSIGNING <f>
WHERE nodename IN l_r_nodename.
End of change
lv_count = <f>-tlevel.
"refresh t_flathier.
CLEAR: t_flathier. ", lv_level, count.
MOVE :
<f>-hieid TO lv_hieid ,
<f>-nodename TO t_flathier-material,
<f>-parentid TO lv_id.
if <f>-iobjnm <> '0MATL_GROUP' .
move <f>-nodename+3 to t_flathier-material .
else.
move <f>-nodename to t_flathier-material .
endif.
Added for Last level.
if lv_count = '1' .
*t_flathier-lv1_name = t_flathier-material .
elseif lv_count = '2' .
t_flathier-lv2_name = t_flathier-material .
elseif lv_count = '3' .
t_flathier-lv3_name = t_flathier-material .
elseif lv_count = '4' .
t_flathier-lv4_name = t_flathier-material .
elseif lv_count = '5' .
t_flathier-lv5_name = t_flathier-material .
elseif lv_count = '6' .
t_flathier-lv6_name = t_flathier-material .
elseif lv_count = '7' .
t_flathier-lv7_name = t_flathier-material .
elseif lv_count = '8' .
t_flathier-lv8_name = t_flathier-material .
elseif lv_count = '9' .
t_flathier-lv9_name = t_flathier-material .
elseif lv_count = '10' .
t_flathier-lv10_name = t_flathier-material .
endif.
DO lv_count TIMES .
lv_count = lv_count - 1.
IF lv_count = 1.
EXIT.
ENDIF.
READ TABLE t_hmat WITH KEY
hieid = lv_hieid
nodeid = lv_id.
IF sy-subrc = 0.
CLEAR lv_id.
CASE lv_count.
WHEN '11' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv11_name,
t_hmat-parentid TO lv_id.
WHEN '10' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv10_name,
t_hmat-parentid TO lv_id.
WHEN '9' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv9_name,
t_hmat-parentid TO lv_id.
WHEN '8' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv8_name,
t_hmat-parentid TO lv_id.
WHEN '7' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv7_name,
t_hmat-parentid TO lv_id.
WHEN '6' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv6_name,
t_hmat-parentid TO lv_id.
WHEN '5' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv5_name,
t_hmat-parentid TO lv_id.
WHEN '4' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv4_name,
t_hmat-parentid TO lv_id.
WHEN '3' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv3_name,
t_hmat-parentid TO lv_id.
WHEN '2' .
MOVE : t_hmat-nodename+3 TO t_flathier-lv2_name.
ENDCASE.
ENDIF.
ENDDO.
Populate data for level 1 (Class Type)
READ TABLE t_hmat WITH KEY
hieid = lv_hieid
tlevel = 1.
IF sy-subrc = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = t_hmat-nodename
IMPORTING
output = e_t_data-0class_type.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = e_t_data-0class_type
IMPORTING
output = e_t_data-0class_type.
ENDIF.
populate data to extraction structure ( removing prefixe 'class type')
MOVE : lv_hieid TO e_t_data-hieid,
t_flathier-lv2_name TO e_t_data-xhier_lv1,
t_flathier-lv3_name TO e_t_data-xhier_lv2,
t_flathier-lv4_name TO e_t_data-xhier_lv3,
t_flathier-lv5_name TO e_t_data-xhier_lv4,
t_flathier-lv6_name TO e_t_data-xhier_lv5,
t_flathier-lv7_name TO e_t_data-xhier_lv6,
t_flathier-lv8_name TO e_t_data-xhier_lv7,
t_flathier-lv9_name TO e_t_data-xhier_lv8,
t_flathier-lv10_name TO e_t_data-xhier_lv9,
t_flathier-lv11_name TO e_t_data-xhie_lv10,
t_flathier-material TO e_t_data-0MATL_GROUP.
APPEND e_t_data.
CLEAR e_t_data.
ENDLOOP.
s_counter_datapakid = s_counter_datapakid + 1.
IF s_counter_datapakid > 1 .
RAISE no_more_data.
ENDIF.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.
As now when I run it in Tcode RSA3 it give only one data packet of some 5k to 6k records.
Thanks in advance for your help.
Pawan.Hi PS,
Instead of
SELECT * FROM /BI0/HMATL_GROUP INTO CORRESPONDING FIELDS OF
TABLE t_hmat
WHERE hieid IN l_r_hieid
AND objvers = 'A' .
code should look like this .
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM /BI0/HMATL_GROUP
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
For more information refer to sample code of fm "RSAX_BIW_GET_DATA_SIMPLE"
Hope that helps.
Regards
Mr Kapadia
***Assigning points is the way to say thanks in SDN.*** -
SecondaryKey on a Object data member.
Hallo developer.
Using je 3.1 with DPL
Linux box with JDK 1.5_06
We got a problem.
We are indexing our data model beans and we got this problem.
We have a SecondaryKey decorated as folows:
<pre>
@SecondaryKey(relate=Relationship.MANY_TO_ONE)
private Object snTP;
</pre>
Where the SnTP Object ha a PrimaryKey that is a String, as needed by je to handle the reference between the objects.
We had to declare the data member snTP as Object and not as String since we got this requirement.
We encounter this exception
<pre>
java.lang.IllegalArgumentException: Key class is not a simple type or a composite key class (composite keys must include @KeyField annotations): java.lang.Object
at com.sleepycat.persist.impl.PersistKeyBinding.<init>(PersistKeyBinding.java:42)
at com.sleepycat.persist.impl.Store.getKeyBinding(Store.java:863)
at com.sleepycat.persist.impl.Store.openSecondaryIndex(Store.java:483)
at com.sleepycat.persist.impl.Store.getPrimaryIndex(Store.java:320)
at com.sleepycat.persist.EntityStore.getPrimaryIndex(EntityStore.java:246)
at com.tilab.wants.dataModelManager.berkeley.IndexManager.<init>(IndexManager.java:31)
at com.tilab.wants.dataModelManager.berkeley.BerkeleyDataModelManager.init(BerkeleyDataModelManager.java:62)
at com.tilab.wants.dataModelManager.DataModelManagerFactory.create(DataModelManagerFactory.java:71)
at com.tilab.wants.dataModelManager.berkeley.BerkeleyDataModelManagerTest.setUp(BerkeleyDataModelManagerTest.java:35)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
</pre>
Any idea to resolve the problem?
Kind regards
MassimoHi Massimo,
The type and format of keys is fixed in DPL, and DPL creates a binding for each key in advance. For example, if the key type is String, a String binding is created. DPL must therefore know in advance what the type of a key field is. So you will need to declare this key field as String, not Object. The types allowed for key field declarations are described here:
http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/persist/model/PrimaryKey.html
Mark -
Pls clarify me about threadsafe and servlet data member
is this threadsafe if my servlet has data member but only initiated by init() and rest of the methods do read only on this data member.
e.g.
public class myServlet extends HttpServlet {
private String someString;
public void init() throws ServletException {
// codes inti someString;
// rest of methods
// bleh ...
}one more question: is that someString is so called servlet instance variable?Hi,
you r going through a wrong way. Try this way
TABLES: PA9180.
git_pa9180 TYPE STANDARD TABLE OF pa9180.
start-of-selection.
SELECT * FROM PA9180 INTO TABLE GIT_PA9180
WHERE ENDDA BETWEEN G_PRE_DATE AND SY-DATUM
AND ZZCASE_NO LIKE 'E%'.
END-OF-SELECTION.
NOW LOOP AT THIS INTERNAL TABLE(GIT_PA9180) AND PROCESS IT FOR FURTHER RESULTS
Hope this solves ur problem.
Regards,
Ibrar
Maybe you are looking for
-
I recently chenged my email address on Itunes. When I plugged in my Ipod 4th generation Itouch, it still shows my old email address. It syncs everytime, but the old email address is keeping me from making other purchases. How do I fix this?
-
Non OBIEE Publisher reports and dashboards
I have developed several Publisher reports that source data from direct SQL queries against an Oracle DB (They're not star schema reports that are appropriate for OBIEE). The reports are parameterized and direct SQL requests are used to populate the
-
No Sound Played Through Ear Phone in Windows
Hi, I installed Mac & Windows on my iMac. I recently found out that In Windwos, I cannot here sound from my earphone when it's pluged in. The sound still comes out from the speakers. I do not know if it's the Windows setting. or if I should "download
-
App library into external drive?
I'm trying to save space in my PC's cramped HD. From iTunes, under Edit>Preferences>Advanced, I can define a folder in an external hard drive where the music library can be maintained, but there doesn't seem a way to do so for applications in my iPod
-
Unable to add rows in Excel 2007 after 'Format as table'
Hi The problem for me was that I had used the 'format as table' option in my spreadsheet, to alternate row colors. Apparently doing so creates a different kind of table where you cannot insert rows. Took me a while to figure out, surfed a lot of site