EJB - select a range of objects
People, I have a problem:
I want to display list of EJBs by pages.
something like topics list in this forum.
And I don't know how to make select.
I need something like: findAll( int pageNr, int elementsPerPage)
I know that I could select all objects and then
select objects I need, but this is wastes memory.
Do you have any ideas?
Here's the final solution, I tested it and it works :
I think that the solution is to use
Use EJB QL operators : OFFSET and LIMIT
(for more informations : http://www.caucho.com/resin-ee/ejb-ref/ejbql.xtp#OFFSET)
This solution don't use on my project because i use MVCSoft...
If you use MVCSoft to, you must declare a wrapper in your bean class to put pagination on your EJB QL query :
* @mvcsoft:wrap query-name="ejbSelectMyQuery"
public abstract Collection wrapEjbSelectMyQuery(your query parameters, int start, int length) throws FinderException;
A EJB QL wrapper must return a collection, must contains the same parameters that the ejb query (with the same order) PLUS 2 integers, one for the startOffset and on for the number of records to retrieve...
Similar Messages
-
Devloped an ALV report for daily cash receipts for selected date range
hi,
how to devlop an ALV report for daily cash receipts for selected date range.for this report what are the tables and fields we have to use.what is the selectionscreen&what is logic.give me sample report.Hi,
You can develop simple reports using Report Painter.
You may be also interested in:
Check report SAPMF05A for credit memo
See the following Std reports on Payment Advices execute the Tcodes:
S_ALR_87009888
S_ALR_87009889
S_ALR_87009890
S_ALR_87009891
S_ALR_87009892
S_ALR_87009893
S_ALR_87009978
S_ALR_87009979
S_ALR_87009980
S_ALR_87009981
S_ALR_87009982
S_ALR_87009983
S_ALR_87010056
S_ALR_87010057
S_ALR_87010058
S_ALR_87010059
S_ALR_87010060
S_ALR_87010061
S_ALR_87010066
S_ALR_87010067
S_ALR_87012106
S_ALR_87012107
S_ALR_87012108
S_ALR_87012109
S_ALR_87012110
S_ALR_87012111
S_ALR_87012116
S_ALR_87012117
S_ALR_87012200
S_ALR_87012201
S_ALR_87012202
S_ALR_870122
S_ALR_87012204
S_ALR_87012205
S_ALR_87012350
S_ALR_87012351
S_ALR_87012352
S_ALR_87012353
S_ALR_87012354
S_ALR_87012355
sample ALV report:
tables:
marav. "Table MARA and table MAKT
Data to be displayed in ALV
Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-
matically determine the fieldstructure from this source program
Data:
begin of imat occurs 100,
matnr like marav-matnr, "Material number
maktx like marav-maktx, "Material short text
matkl like marav-matkl, "Material group (so you can test to make
" intermediate sums)
ntgew like marav-ntgew, "Net weight, numeric field (so you can test to
"make sums)
gewei like marav-gewei, "weight unit (just to be complete)
end of imat.
Other data needed
field to store report name
data i_repid like sy-repid.
field to check table length
data i_lines like sy-tabix.
Data for ALV display
TYPE-POOLS: SLIS.
data int_fcat type SLIS_T_FIELDCAT_ALV.
select-options:
s_matnr for marav-matnr matchcode object MAT1.
start-of-selection.
read data into table imat
select * from marav
into corresponding fields of table imat
where
matnr in s_matnr.
end-of-selection.
Now, we start with ALV
To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.
The fieldcatalouge can be generated by FUNCTION
'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any
report source, including this report.
The only problem one might have is that the report and table names
need to be in capital letters. (I had it )
Store report name
i_repid = sy-repid.
Create Fieldcatalogue from internal table
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'IMAT' "capital letters!
I_INCLNAME = sy-repid
CHANGING
CT_FIELDCAT = int_fcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = i_repid
I_STRUCTURE_NAME = 'marav'
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = imat.
IF SY-SUBRC <> 0.
WRITE: 'SY-SUBRC: ', SY-SUBRC .
ENDIF.
Hope this will help.
Regards,
Naveen. -
XML/XPath question--how to select a range of elements with XPath?
Hi there,
I have an XML DOM in memory. I need to do hold it and issue only parts of it to my client app in "pages". Each page would be a self-contained XML doc, but would be a subset of the original doc. So for instance the first page is top-level elements 1-5. 2nd page would be 6-10 etc. Is this solution best solved with XPath? If not, what's the best way? If so, I have the following question:
Is there a way to use XPath to select a range of nodes based on position within the document? I know I can do an XPath query that will return a single Node based on position. So for example if I wanted the first node in some XML Book Catalog I could do XPathAPI.selectSingleNode(doc, "/Catalog/Book[position()=1]"); I could wrap the previous call in a loop, replacing the numeric literal each time, but that seems horribly inefficient.
Any ideas? Thanks much in advance!
Toby BuckleyYour question is about marking a range of cells. 99% of the code posted has nothing to do with this. If you want to create a simple table for test purposes then just do:
JTable table = new JTable(10, 5);
JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane );
In three line of code you have a simple demo program.
When I leave the mouse button again, these bunch/range of cells shall stay "marked". table.setCellSelectionEnabled( true );
and I'd like to obtain, say, a vector of a vector containing just those data marked beforeUse the getSelectedRows() and getSelectedColumns() methods for this information. I would suggest you create a Point object to reflect the row/column position and then add the point to an ArrayList. -
Trouble printing selected page range as handout
I am trying to print for a keynote but only want a selected page range and just cannot seem to get it to work. When I go into print and select under the pages tab the "from" button and type the range ( eg 184-189 ) I only get the option of slides with notes or outline. I want to pront as a handout with 2 or 3 sldes per page. The preview shows no pages selectde and it is unable to print.
I've tried highlighting the slides I wish to print and trying that but to no avail. The silly thing is I did manage to get it to work this way once but now it doesn't seem to work that way. I'm frustrated as I don't want to print the whole presentation off and throw away the sheets I don't need as it seems to defeat the object of page selection. I also don't want to watse ink by having one slide per page.
Any help will be gratefully received.I have this issue with my printer also
my work around is to delete the pages I dont want printed, save this version as a separate file and the pages I want print out correctly. -
Hi Sap Gurus,
What are the objects need to be maintained frm an SD Perspective for the year end...?
Can anyone please advice what no ranges have to be maintained for the SD Related Objects? i need to give the information to the client on a priority basis.....
Regards
Atul KeshavDear Atul Keshav
From SD perspective, the number ranges to be maintained in VN01 for Sale Orders, Delivery and Billing and it is not necessary to change this number range every year. Only we need to maintain new number ranges for excise invoice. The relevant objects are as follows:-
Go to SNRO (or) SNUM and select any of the below objects required by you and select NUMBER RANGE on top. It will ask for "Series Group". Give the respective plant's series group and click "Change intervals".
Now give some value in the field "No" followed by year and number range and save.
J_1IARE1 ARE1 Doc No object based on Series Group
J_1IARE3 ARE3 Doc No object based on Series Group
J_1IBOND Excise Bonding: Bond number object
J_1ICERT Withholding Tax Certificates (India)
J_1ICHLNNO Internal number range for challans
J_1ICONPLA Consolidated PLA serial no. generation
J_1IDEPINV Excise Invoice Number for Depot Invoices
J_1IEXCEXP Export excise invoice number range
J_1IEXCINV Excise invoice number
J_1IEXCLOC Local excise invoice number range
J_1IEXCTST Excise invoice with intervals
J_1IEXINEX Excise invoice number for export
J_1IINTNUM Internally document number to be generated
J_1IINTPR2 Despatch serial number
J_1ILIC Excise Bonding: License number object
J_1IPLA2 PLA part II number range object
J_1IRG1 RG1 Number range object
J_1IRG1_T No. Range for RG1 - Excise group / Material
J_1IRG23A1 RG23A part 1 no. range object
J_1IRG23A2 RG23A part II number range object
J_1IRG23C1 RG23C part I number range object
J_1IRG23C2 RG23C part II number range object
J_1IRG23D Folio Numbers for RG 23D
thanks
G. Lakshmipathi -
Selecting particular range of style using script
HI All,
Can anyone suggest me that how we can select the range of text using script.
I am having some different para styles say for eg., PS1, PS2, PS3, PS4...........
I may applyed these styles in some jumping order but except PS1, now I want to select paragraphs with applied style PS1 to stop before the next appearence of PS1 style.
Like: In a document Para 1, 10, 14, 25 were applied with PS1, so the selection should go in the way like 1-9, 10-13, 14-24 and so on
Regards,
love_all"The" index of a paragraph is nothing special, it's the index of the first character of that paragraph inside its parent story. In particular, it does NOT tell you "this is the 5th paragraph" or something like that.
This is because "Paragraph" is an artificial construct inside "Text", not a truly existing first class object. Same as "Line", "Word", "Character", and indeed, any text selection at all.
Since you already have a "found text" array, "the index" of the nth entry's paragraph -- with the constraint described above -- can be simply found by using foundText[n].paragraphs[0].index (the index of the first character of your foundText is foundText[n].index).
If you DO need to know the nth number of the paragraph, search this forum. I think Peter Kahrel answered to a post to answer that exact question. -
Re : select-options in abap-objects program
Dear friends,
I want to give select-options in abap-objects program. How to give that.
Thanking You
with regards,
ManiIn the transaction SE24, enter your class name, click modify.
in the tab named "Types" you have to declare two types. By example, if you want to receive one select-options that in your program that uses this class is declared like:
" P_SAKNR FOR SKAT-SAKNR".
you've got to declare two types in the class:
a- TYPES: begin of E_S_SAKNR,
sign(1),
option(2),
low(10),
high(10),
end of E_S_SAKNR.
b - TYPES E_T_SAKNR type standard table of E_S_SAKNR.
so, in the class method that you want to receive P_SAKNR as importing parameter. You got to do this:
method TEST importing ET_SAKNR type E_T_SAKNR.
now, in the implementation of this method you should be able to use ET_SAKNR as the same way as you usually use a parameter or a select-option. You could use it in a select with the operator IN by example.. -
Re : select-options in abap objects
Dear friends,
I want to give select-options in abap-objects program. How to give that.
Thanking You
with regards,
ManiHI Mani,
It's common mix ABAP Procedural with ABAP Objects in the same program.
You should use the same way used in ABAP procedural program as Marco Cerdelli sad.
But inside ABAP OBJECTS classes you can't use is these statement type.
Don't forget to close this thread and all yours previous when your question be answered ! In case of doubt read the [rules of engagement|https://forums.sdn.sap.com/].
Best Regards.
Marcelo Ramos -
Hi Guys,
I need a small help from you. I want to know how to populate the value from select-option to abap object. Please help me, it is very importantcheck this code
REPORT ZSELOPT_TO_CLASS .
TABLES: VBRK.
SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
DATA: IT_VBELN TYPE RSELOPTION.
DATA: X_VBELN TYPE RSDSSELOPT.
CLASS C1 DEFINITION.
PUBLIC SECTION.
DATA: IT_VBRP TYPE VBRP_TAB,
X_VBRP LIKE LINE OF IT_VBRP.
METHODS: GET_DATA IMPORTING S_VBELN TYPE RSELOPTION.
METHODS: DISP_DATA.
ENDCLASS.
CLASS C1 IMPLEMENTATION.
METHOD GET_DATA.
*SELECT * FROM VBRP*
INTO TABLE IT_VBRP
WHERE VBELN IN S_VBELN.
ENDMETHOD.
METHOD DISP_DATA.
LOOP AT IT_VBRP INTO X_VBRP.
WRITE:/ X_VBRP-VBELN,
X_VBRP-POSNR.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
DATA OBJ TYPE REF TO ZCL_SELOPT.
CREATE OBJECT OBJ.
LOOP AT S_VBELN.
MOVE S_VBELN-LOW TO X_VBELN-LOW.
MOVE S_VBELN-HIGH TO X_VBELN-HIGH.
MOVE S_VBELN-SIGN TO X_VBELN-SIGN.
MOVE S_VBELN-OPTION TO X_VBELN-OPTION.
APPEND X_VBELN TO IT_VBELN.
ENDLOOP.
CALL METHOD OBJ->GET_DATA
EXPORTING
S_VBELN = IT_VBELN.
CALL METHOD OBJ->DISP_DATA.
Edited by: moazam hai on May 17, 2008 6:17 AM
Edited by: moazam hai on May 17, 2008 6:19 AM -
Select- Color Range- Results in Blue Screen (PC) (driver out of date)
I've been using the CS6 beta about two days. While experimenting with color range I experienced two consecutive blue screen crashes. The first time it happened,I was working with the color range selector and was replacing the selected areas with another color using the paint bucket. About the third time I attempted this, my PC blue screened. The second time, I opened a photo, went to Select>Color Range and got an immediate blue screen crash.
I then went back to CS5 and I've been playing with the same scenario with no apparent problems.
My PC is a store built computer. It consists of an MSI 990-FXA GD80 motherboard, an AMD Phenom 1100t CPU, Asus GTX550 Ti graphics card and 8 gig of RAM. It boots from a 60 gig SSD and my programs reside on a 500 gig hard drive. The OS is Windows 7 Professional 64 bit. CS6 is using the hard drive for its scratch disk and Photoshop is using 4339 mb of the 7232 mb of available RAM - I haven't changed that. I'm running CS6 as administrator because the way it installed, it would only run in that fashion.
One disappointment during the installation was CS6 made no attempt to read my preferences from the CS5 install. That may be covered in another post, I've not yet looked.
Please keep us informed as new betas are released, because I would like some time to work with this puppy before plunking down big bux for the upgrade. As it is now, I'm going back to CS5. I get mighty nervous when my super computer blue screens!
Gerry
gswetsky AT bellsouth DOT netThe GPU is often at root of issues like yours. I've had so many problems with Nvidia drivers for their gaming-oriented adapters (like yours) that I finally went with one of their workstation cards. I have a Quadro card with just enough RAM to make Photoshop happy. The workstation drivers are optimized for reliability, the consumer card drivers are optimized for gaming and that often means they're less stable and reliable with Photoshop.
-
Devolped an ALV report for daily cash receipts for selected date range
hi,
how to devlop an ALV report for daily cash receipts for selected date range.for this report what are the tables and fields we have to use.what is the selectionscreen&what is logic.give me sample report.hi,
how to devlop an ALV report for daily cash receipts for selected date range.for this report what are the tables and fields we have to use.what is the selectionscreen&what is logic.give me sample report. -
Excise Number Range for Object J_1IEXCLOC
Dear All ,
I am having one issue regarding excise number range for object J_1IEXCLOC and sales group : 41 Domestic. i have already maintained number range for 2009 is 0000000001 to 0000000300. Now the range is exceed and the new excise invoice is created with number 0000000001. Now i am confused if i will maintain range upto 0000000500 for 2009 then what will be the new invoice number, whether it will be 0000000002 or 0000000301.
Pls. Give me some suggestion, What should i do now for the number range to be in continuation.
Regards,
Swapnil Vaidya>
swapnil vaidya wrote:
> Dear All ,
>
> I am having one issue regarding excise number range for object J_1IEXCLOC and sales group : 41 Domestic. i have already maintained number range for 2009 is 0000000001 to 0000000300. Now the range is exceed and the new excise invoice is created with number 0000000001. Now i am confused if i will maintain range upto 0000000500 for 2009 then what will be the new invoice number, whether it will be 0000000002 or 0000000301.
>
> Pls. Give me some suggestion, What should i do now for the number range to be in continuation.
>
> Regards,
>
> Swapnil Vaidya
It will be 2 and not 301. This is a flaw with CIN. All transactions take place by means of internal numbers and are stored in CIN transaction tables. Hence when the range gets exhausted, the number gets reset to the beginning, yet there is no error because internal number, which is the primary key, is different.
To solve your problem. Go to SNRO and provide the object J_1IEXCLOC and click on status. Change the status to 300 and continue with your transaction.
Regards,
Aroop
PS: Your question is more relevant for SD than MM. -
How do I select a range of values in MySQL using a drop down menu
Hi,
I have a database of picture frames that have a value of
frame width. I want to be able to select a range of values (i.e.
.50" to 1") instead of each and every value (i.e. .50", .56", .76",
etc.). I have a drop down menu (mnuWidth) with 5 ranges (see
attached code).
Each selection has a value from 1 to 5 indicating the range I
want to search. In my results page I have let DW set up a recordset
(see attached code)
Can anyone tell me how to get this to choose a range instead
of just the value entered by my menu?
Thanks in advance.
TomI have been growing fond of lookup tables. Your lookup table would have your numbers in one column and the values you want returned in the next.
Lookup table
item
Name
1
a
2
b
3
c
4
d
5
e
6
f
7
g
8
h
9
i
Input table
input
Name
1
a
B2 and copied down:
LOOKUP(A2,lookup::$A$2:$A$11,lookup::$B$2:$B$11)
Caution: Lookup will return the closest value so it it looks for "10" in this example it will return "i"
If you don't want to see the error messages from blank inputs, wrap Lookup in IFERROR.
hope this helps
q -
Selecting more than one object at a time
Hi guys and girls
I am trying to select more than one object on my artboard and Shift+clicking on the next one isn't working...
I am creating an interactive form in Indesign and realised that I have everything on one layer... I have radio buttons for yes/no questions and I wanted to move them to a new layer for ease of selection and editing...
I have tried selecting one and then Shift+Click on the next but it just moves which one is selected...?
I even tried creating a new layer and dragging them up to the new layer...no Dice?
Has anyone any ideas....Please!
bookie56
P.S. Just realised that the radio buttons are part of the text? Could this be the reason why I can't move them. Doesn't solve the question about selection thoughHi AnshulJain19
OK! sort of guessed that....thanks for coming by.
I am still on this form and have created multiline text boxes for two of my text boxes.... have checked the positioning of the boxes - but when I write in the box in Adobe Acrobat the text is quite a long way above the line...this is only happening with the multiline boxes.
Is there a way to export a font colour for the boxes or does this need to be done in Acrobat Reader...?
I have a standard dark background for my page and that needs a White font...when I fill the form in it is black...
bookie56 -
Error: Number range for object RESB does not exist
Hi
I'm trying to convert a planned order (to purch requisition) partially via trxn code MD04. Upon saving I get the above error msg. The complete text of msg is as follows. I've maitained the number ranges of all the objects specified in this error msg. Can somebody explain on how to overcome this problem?
Many thanks
BE
Error Msg Text:
Number range for object RESB does not exist
Message no. 61501
Diagnosis
The system cannot create a document for an MRP element if no number
range or interval has been maintained in Customizing of MRP or if t
number range you have maintained is not allowed.
Below is a list of MRP elements that are affected:
Number range object MRP element
PLAF planned order (operative oder simulative)
EBAN purchase requisition
RESB dependent requirements
MDSM simulative dependent reqmts (long-term plannin
MDTB MRP list
Procedure
Check the number ranges in Customizing. If you do not have the necessa
authorization, please get in touch with your systems administration.Hi
Thanks for the reply. But I have maintained the number ranges for matl. reservations/dependant requirements at OMI2. Here is the screen shot..Do find anything wrong with it? Pl advice.
NR Object MRES/DREQ
No. From Number To Number Curr Number Ext
01 0000000001 8999999999 380 blank
02 9000000000 9500000000 blank checked
RB 9500000001 9999999999 blank checked
Number ranges for the plants are assigned to 01 (0000000001 to 8999999999).
thanks
BE
Edited by: Brian Elfie on Jan 10, 2008 11:27 AM
Maybe you are looking for
-
How do I use the VIs for the Fluke Hydra Series 2620a multimeter?
This message refers to the VIs found at this link: http://sine.ni.com/apps/we/niid_web_display.download_page?p_id_guid=E3B19B3E9468659CE034080020E74861 How do I use the VIs for the Fluke Hydra Series 2620a multimeter? I am conducting a Senior Design
-
Windows Vista w/ QT: Plays M4V But Not MOV
Any ideas where I can get a new codec driver for Vista?
-
After doing the os8 update, the closing of apps is looking stiff and jumpy, I don't have the patience to wait for pages to load or they just won't load. My iPad feels like has become a dinosaur and it isn't that old. wth.
-
Success writing .wav files in GSM format with tritonus
Hello, I have to tell the people that after some weeks fighting against .wav files and tritonus GSM converter, I have success!!!. I just record a PCM .wav file, then compress it in GSM in another .wav file(being this ten times smaller than PCM) and a
-
Someone help please, major issues 10.5.2 power
Alright, this all started with 10.5.2, and I've already been to the apple store once. 10.5.1 was running pretty good.. had a few problems but nothing major.. upgraded to 10.5.2, and issues have slowly escalated. Issues. 1. wouldn't boot with my cinem