Vbrk and Vbrp tables performance problem
Hi all,
The below query is taking lot of time in QAS i need to decrease the time without affecting the logic.....
SELECT vbrk~kunag
vbkd~bstkd
vbkd~bstdk
INTO TABLE c_tab_po FROM vbrp
INNER JOIN vbrk ON vbrkmandt = vbrpmandt AND vbrk~vbeln =
vbrp~vbeln
INNER JOIN vbkd ON vbkdmandt = vbrpmandt AND vbkd~vbeln =
vbrp~aubel
AND vbkd~posnr = con_zposnr
WHERE vbrp~vbeln EQ nast-objky.
DELETE ADJACENT DUPLICATES FROM c_tab_po COMPARING ALL FIELDS.
*Getting the other Invoices based on the customer PO number
IF c_tab_po[] IS NOT INITIAL.
SELECT
vbrk~kunag
vbkd~bstkd
vbkd~bstdk
vbkdposex_e vbrkvkorg
vbrpvbeln vbrpposnr vbrp~erdat
vbpakunnr vbrpaubel vbrpaupos vbakerdat
vbrpmatnr vbrkmwsbk vbrp~netwr
vbrkvaldt vbrkzterm vbrk~vbtyp
INTO TABLE g_tab_invoice FROM vbrp
INNER JOIN vbrk ON vbrkmandt = vbrpmandt AND vbrk~vbeln =
vbrp~vbeln
INNER JOIN vbkd ON vbkdmandt = vbrpmandt AND vbkd~vbeln =
vbrp~aubel
AND vbkd~posnr = con_zposnr
INNER JOIN vbpa ON vbpamandt = vbrpmandt AND vbpa~vbeln =
vbrp~aubel
AND vbpaposnr = con_zposnr AND vbpaparvw =
con_parvw
INNER JOIN vbak ON vbakmandt = vbakmandt AND vbak~vbeln =
vbrp~aubel
FOR ALL entries IN c_tab_po
WHERE vbrk~kunag EQ c_tab_po-kunag AND
vbkd~bstkd EQ c_tab_po-bstkd AND
vbkd~bstdk EQ c_tab_po-bstdk.
ENDIF.
Hi Younus,
First join seems to be oku2026
But you are querying Db tables multiple times to avoid this.
Fetch the fields
vbkdposex_e vbrkvkorg
vbrpvbeln vbrpposnr vbrp~erdat
vbrpaubel vbrpaupos
vbrpmatnr vbrkmwsbk vbrp~netwr
vbrkvaldt vbrkzterm vbrk~vbtyp
in the first join itself.
SELECT vbrk~kunag
vbkd~bstkd
vbkd~bstdk
vbkd~posex_e vbrk~vkorg
vbrp~vbeln vbrp~posnr vbrp~erdat
vbrp~aubel vbrp~aupos
vbrp~matnr vbrk~mwsbk vbrp~netwr
vbrk~valdt vbrk~zterm vbrk~vbtyp
INTO TABLE c_tab_po FROM vbrp
INNER JOIN vbrk ON vbrk~mandt = vbrp~mandt AND vbrk~vbeln =
vbrp~vbeln
INNER JOIN vbkd ON vbkd~mandt = vbrp~mandt AND vbkd~vbeln =
vbrp~aubel
AND vbkd~posnr = con_zposnr
WHERE vbrp~vbeln EQ nast-objky.
then Just join VBPA & VBAK and get required data.
Thanks,
Sudha
Similar Messages
-
How to update the VBFA table without entries in VBRK and VBRP tables
Hello,
I have a requirement , where the sales order , delivery happens in one SAP system say X system and billing document wil happens in other sap system say Y.
Now in this particular case , if the user want to know the billing document number in X system. what would be the solution.
Is there any possibility to update the VBFA table with invoice number of Y system (without updating the VBRK and VBRP tables).
User want to see the billing doc number from sales order in the form of document flow in X system
Thanks in advance
PradeepHii
Without updating VBRK/VBRP table and updating VBFA is not possible, So you have to play with work arround to create one Z TABLE, so whenever system Y will create billing document with the reference of System X data you have to update Ztable with Invoice number created in System Y, The primary key will be in Z TABLE is Delivery document number to track one to one with billing doc.
Thanks and Regards
Shambhu Sarkar -
"How to sum FKIMG in VBRK and VBRP Table with sample output
Sir\Mam\Gurus ;
I hardly found it difficult in resolving my program in getting the sum of FKIMG inside the VBRP and VBRK tables
The scenario is that i have one Sales Order with multiple invoices . What i need to do is to sum up the fkimg or the quanitity of specific material regardless of how many invoices the material have in a particular SO
Example I have Sales Order number 35678952 with
3 invoices
Invoice # 123 with material number mat1=12, mat2=5 , mat3=7
345 with material number mat1=7, mat2=7
678 with material number mat1=5, mat3=10
Output shoud be
salesorder# 35678952
mat1 = 24
mat2 = 12
mat3 = 17
Below is my Sample Codes:
DATA : it_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
ls_vbrp_details TYPE wa_vbrp_details,
ls_vbrp_details1 TYPE wa_vbrp_details,
lsfinal_vbrp_details TYPE wa_vbrp_details,
it2_vbrp_details TYPE STANDARD TABLE OF wa2_vbrp_details,
ls2_vbrp_details TYPE wa2_vbrp_details,
it3_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
itfinal1_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
itfinal2_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
itfinal3_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
ls3_vbrp_details TYPE wa_vbrp_details,
rtime1 TYPE i,
rtime2 TYPE i,
rtime3 TYPE i,
s_erdate type d,
scr_erdat type d,
s_erdate = scr_erdat.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = 1 " Negative to subtract from old date, positive to add
olddate = s_erdate
IMPORTING
newdate = new_date.
""" This is another way manual adding by days
CALL FUNCTION 'CALCULATE_DATE'
EXPORTING
days = +30
start_date = s_erdate
IMPORTING
result_date = new_date.
result_date = ddate.
REFRESH: it_vbrp_details.
SELECT
vbrp~matnr
vbrp~aubel
vbrp~aupos
vbrp~vbeln
vbrp~kzwi1
vbrp~kzwi2
vbrp~kzwi3
vbrp~kzwi4
vbrp~kzwi5
vbrp~kzwi6
vbrp~mvgr1
vbrp~mvgr2
vbrp~mvgr3
vbrp~mvgr4
vbrp~mvgr5
vbrp~knuma_pi
vbrp~knuma_ag
vbrp~mwsbp
vbrp~vkaus
vbrp~fkimg
vbrk~vbeln
vbrk~fkart
vbrk~belnr
vbrk~xblnr
vbrk~vbtyp
vbrk~kunag
vbrk~fksto
vbap~posnr
INTO TABLE it_vbrp_details
FROM vbrp INNER JOIN vbrk ON vbrkvbeln EQ vbrpvbeln
where vbeln eq gt_data-vbeln
where vbrpaubel eq vbapvbeln
WHERE vbrp~posnr GE ''
AND vbrk~vbtyp EQ 'M'
AND vbrk~fksto NE 'X'
AND ( vbrperdat GE s_erdate OR vbrperdat LE new_date OR vbrp~erdat IN s_erdat ) " + JP 09 19 2011 Additional Optimization
ORDER BY aubel aupos .
ORDER BY aubel aupos matnr.
"""" This where i need your help Sir\Mam\Gurus
it3_vbrp_details = it_vbrp_details.
SORT it3_vbrp_details BY aubel matnr fkimg kzwi1 kzwi2 kzwi3 kzwi4 kzwi5 kzwi6 aupos vbeln
mvgr1 mvgr2 mvgr3 mvgr4 mvgr5 knuma_pi knuma_ag mwsbp vkaus fkart belnr vbtyp kunag fksto.
LOOP AT it3_vbrp_details INTO ls_vbrp_details.
COLLECT ls_vbrp_details INTO itfinal1_vbrp_details.
APPEND ls_vbrp_details TO it_vbrp_details.
ENDLOOP.
kzwi1,kzwi2,kzwi3 is also been sum up
Sir the output is something like this
Sales Ord# Material Qty KWIZ1 KWIZ2 KWIZ3 MGVR1 VBELN
1234 Mat1 24 23.2 22 12 LastInvoice#
1234 Mat2 12 20.0 21 15 LastInvoice#
1234 Mat3 37 22.0 22 16 LastInvoice#
5432 Mat1 30 25.0 23 15 LastInvoice#
5432 Mat2 24 22.0 24 23 LastInvoice#
5432 Mat3 20 18.0 20 12 LastInvoice#
Hope you can help me as i cant hardy sleep thinking of this ...
I will really appreciate your great help..
Thanks !
I will really appreciate your great help..
Thanks !
Moderator message: duplicate post locked.
Edited by: Thomas Zloch on Sep 20, 2011 3:05 PMHi,
How you want to display the output?..
If you want to display the output as mentioned below, then you have to use nested loop & dynamic field assignments to get result.
Output column
sales order Mat1 Mat2 Mat3 ......
1234 24 12 37
Kindly let me know, if you have any questions
Regards,
S.Senthilkumar -
Select from vbak, vbrk and vbrp
Hi experts,
In one of my programs i hve to select the data from tables <b>VBAK, VBRK</b> and <b>VBRP.</b>
The requirement is:
<b>parameters: p_matnr like vbrp-matnr,
p_charg like vbrp-charg.
select-options: audat for vbak-audat.</b>
upon entering the values on selection-screen,
i need to select <b>FKDAT, FKIMG</b> from tables VBRK and VBRP respectively.
Please help me in writing the selection.
Any help is appreciated.
Thanks a lot.Hi,
Hope this will give u some idea..
select avbeln bfkdat into table itab from vbak as a inner join
vbrk as b on
avbeln = bvbeln where
a~audat in s_audat.
if not itab[] is initial.
select fkimg into corresponding fields of table itab_final
from vbrp for all entries in itab
where vbeln = itab-vbeln and
matnr = p_matnr and
charg = p_charg.
endif.
Cheer,
Vikram
Pls reward fopr helpful replies!! -
VBRK and KONA tables data (Agreements)
hi experts,
i have created view based on VBRK and KONA tables, but why some of the agreements are missing in VBRK??
i not able to find the solutions, as i am ABAP developer.
please tell me the reason why some of the agreements missed in VBRK?
regards
venuscmHi
Normally the rebate agreement is updated in KONA table. The rebate is created for a specific combination of customer and material or customer and rebate group etc. The rebate agreement appears in VBRK only if the combination in the invoice is same as that maintained in the rebate. This means that for the invoice the rebate is accrued or provision is kept aside if the conditions of the invoice are similar to that of the rebate. To describe it through an example. Lets say customer has a rebate agreement for material Cadbury Dairy Milk and the rebate agreement is based on that. So if customer buys Cadbury 5-star and the rebate is not on that the acrrual would not be possible and hence VBRK would have no entry as it did not satisfy the condition of the rebate. If VBRK had customer and the material as Cadbury Dairy milk.
Hope this explains.
Thanks
Indranil Ain -
Find total quantity from vbrk and vbrp
Hi frinds doing a report to display sales in 3 month 6 month snd past 12 months but didnt get logic to find out
here is my code
SELECT vbrk~vbeln
vbrk~fkdat
vbrp~fkimg
vbrp~matnr
vbrp~werks
INTO CORRESPONDING FIELDS OF TABLE iquan
FROM vbrk INNER JOIN
vbrp ON vbrkvbeln = vbrpvbeln
WHERE vbrk~fkdat >= w_date " w_date =past 12month
AND vbrp~matnr IN s_matnr " = imatr-matnr
AND vbrp~werks IN s_werks. " = imatr-werks
**now how to find the total sales quantity
i tried in this way its not working "iquan is same as iquan1 with added added sales field.
LOOP AT iquan.
READ TABLE iquan1 WITH KEY matnr = iquan-matnr
werks = iquan-werks.
IF sy-subrc = 0.
IF w_date3 LE iquan-fkdat.
w_tot3 = w_tot3 + iquan-fkimg.
ELSEIF
w_date2 LE iquan-fkdat.
w_tot2 = w_tot2 + iquan-fkimg.
ELSEIF
w_date1 LE iquan-fkdat.
w_tot1 = w_tot1 + iquan-fkimg.
ENDIF.
iquan-sale12 = w_tot1.
iquan-sale6 = w_tot2.
iquan-sale3 = w_tot3.
ENDIF.
MODIFY iquan.
ENDLOOP.
*PLs pls pls pls help me with code or suggestion
0ut put shpuld be
material plant sales 3months 6months 12 months
01 0040 130 00.00 120
regardsHi Farukh,
Try this code. This will definitely help you.
<b>REPORT ZTEST .</b>
<b>TABLES:</b> VBRK,
VBRP.
<b>SELECT-OPTIONS :</b>
s_matnr FOR VBRP-MATNR,
S_WERKS FOR VBRP-WERKS.
<b>DATA:</b> BEGIN OF STRUCT,
matnr LIKE vbrp-matnr,
werks LIKE vbrp-werks,
vbeln LIKE vbrk-vbeln,
fkdat LIKE vbrk-fkdat,
fkimg LIKE vbrp-fkimg,
sale6 LIKE vbrp-fkimg,
sale12 LIKE vbrp-fkimg,
sale3 LIKE vbrp-fkimg,
END OF STRUCT,
IQUAN LIKE TABLE OF STRUCT WITH HEADER LINE,
IQUAN1 LIKE TABLE OF IQUAN WITH HEADER LINE.
<b>DATA:</b> w_tot1 LIKE iquan-fkimg,
w_tot2 LIKE iquan-fkimg,
w_tot3 LIKE iquan-fkimg.
<b>DATA:</b> W_DATE1 LIKE SY-DATUM,
W_DATE2 LIKE SY-DATUM,
W_DATE3 LIKE SY-DATUM.
**assign dates
W_DATE1 = '20051107' .
W_DATE2 = '20060507' .
W_DATE3 = '20060807'.
<b>SELECT</b> vbrk~vbeln
vbrk~fkdat
vbrp~fkimg
vbrp~matnr
vbrp~werks
INTO CORRESPONDING FIELDS OF TABLE iquan
FROM vbrk INNER JOIN
vbrp ON vbrkvbeln = vbrpvbeln
WHERE vbrk~fkdat >= w_date1 " w_date1 =past 12month
AND vbrp~matnr IN s_matnr " = imatr-matnr
AND vbrp~werks IN s_werks. " = imatr-werks
<b>SORT</b> IQUAN BY MATNR WERKS.
IQUAN1[] = IQUAN[].
<b>LOOP AT iquan.</b>
READ TABLE iquan1 WITH KEY matnr = iquan-matnr
werks = iquan-werks.
IF sy-subrc = 0.
"w_date3 : PAST 3 MONTHS
IF w_date3 LE iquan-fkdat.
w_tot3 = w_tot3 + iquan-fkimg.
ELSEIF
"w_date2 : PAST 6 MONTHS
w_date2 LE iquan-fkdat.
w_tot2 = w_tot2 + iquan-fkimg.
ELSEIF
"w_date1 : PAST 12 MONTHS
w_date1 LE iquan-fkdat.
w_tot1 = w_tot1 + iquan-fkimg.
ENDIF.
iquan-SALE12 = w_tot1.
iquan-sale6 = w_tot2.
iquan-Sale3 = w_tot3.
ENDIF.
<b> MODIFY iquan.</b>
ENDLOOP.
<b>LOOP AT IQUAN.</b>
STRUCT = IQUAN.
<b>AT END OF WERKS.</b>
<b>WRITE:/</b>
STRUCT-matnr, ' ',
STRUCT-werks, ' ',
STRUCT-sale6, ' ',
STRUCT-sale12, ' ',
STRUCT-sale3.
ENDAT.
<b>ENDLOOP.</b>
<b>The output is:</b>
9767A002AA 3201 10,255.000 0.000 0.000
C9138-60001 3201 10,255.000 2,000.000 0.000
C9361-30001 3201 10,255.000 2,004.000 0.000
Hope this will solve your purpose.
Regards,
Pragya -
HELP: LAST_RECORD and POST_QUERY serious performance PROBLEM
Hi:
I've got and ORDERS table with 5000 records (nothing special). the ORDERS form have detail records for ORDERS_ITEMS. The form has POST_QUERY trigger that select TRANSPORT_TYPE from TRANSPORT table, and other kind of triggers like this one.
When I execute LAST_RECORD in this form it takes HUUUUGE time to go to the last record, and database CPU goes 100% for lots of seconds (30-40). I've analysed my TOP SQL, and I see that all my POST_CHANGE and block_POST_QUERY sql statements are executed thousands of times. THIS IS UGLY! LAST_RECORD should only go to the last record, and in that record show the data. What happens here is that FORMS execute the POST_CHANGE and POST_QUERY for every record in my table, and this is an multiply effect on queries.
I'm using forms9i patched with the latest IDS patch and 9ias with latest NonCore Patch.
I need help URGENT!
Joao Oliveirapost-change better not to use as it's for backward compatible purpose. post-query can be replace by when-new-record-instance(add a line go_item(non-db-item)) and the non-db-item's pre-text-item trigger.
But as of original issue, you seems to want to use post_query with last_record to go to last record, I don't know the detailed situation, but I feel that you may try
1) put it pre-query to query the last record by sql:
select f.* from
(--your sql used in form
select * from your tables
where ...
ORDER BY KEY-COLUMN DESC
) f
where rownum =1
2) another way:
get rid of the post-change, post-query trigger.
for post-query trigger, use the when-new-record-instance and pre-text-item trigger; for post-change, it depends on the code inside, you might be able to do it in the those two trigger too. -
Join Problem LIKP,LIPS,VBRK and VBRP
Hi,
i am working on the SAP Query report. But having problem in creating joins between the following tables
LIKP
LIPS
VBRK
VBRP
please guide me
regard
khurramLIKP
LIPS
VBRK
VBRP
select a~ b~ c~ d~ into corresponding fields of table itab from likp as a inner join
LIPS as b on a~VBELN = b~VBELN
VBRK as c~VBELN = a~VBELN
VBRP as d~VBELN = a~~VBELN.
also check the first condition a~VBELN = b~(KDAUF,VBELV,VGBEL,WKTNR)
second condition a~VBELN = c~SFAKN
third condition a~VBELN = d~(AUBEL,VBELV,VGBEL,VGBEL_EX)
hope it solves... -
Amount is different in VBRK and VBRP
For currency USD, why the amount posted to NETWR in VBRK is correct and amount posted to NETWR in VBRP is with 2 decimal places. Example, total of 226.472,0000 USD but posted as 22.647.200,00.
Hi,
1> Please check the decimal notation settings under default tab for the user under transaction SU3.
2> If your condition rate currency is different than document currency, exchange rate will be applied during the condition value calculation. Exch rate * TCURF-FFACT = VBRK-KURRF (In case of billing doc). So plz check the TCURF table FFACT value whether is 1 or 100. It should be 100 for no decimal currencies (Such as JPY, TWD)
Regards,
P Gomatheeswaran -
How to link vbak and vbrp tables
hi friends,
i want to display lips table values based on lips-vbeln = it_vbrp-vgbel
here i want a filed thru which i can link vbrp-<fieldname> to vbak/vbap-vbeln
so that i can get values into it_vbrp.
here is equation.
it_vbrp => vbak-vbeln = vbrp-< ? >
it_lips => vbrp-vgbel = lips-vbeln.
thanks in advance for your co operation
regards,
Anil kumar pu can reach vbrp vbeln from vbrk vbeln
and to get vbrk vbeln from vbak vbeln
goto table VBFA
1.
GIVE VBFA-VBELV = VBAK-VBELN
and
VBFA-VBTYP_N = 'M'. "INVOICE IN CAPS
AND F8
THIS WILL GIVE U VBRK-VBELN .
NOW U CAN USE VBRK-VBELN TO FETCH VBRP
SIMILARLY
2.
IF U WANT TO PICK DELIVERY NUMBER FROM LIKP USING VBAK-VBELN.
SAME PPROCEDURE
PUT VBFA -VBELV = VBAK-VBELN
VBFA-VBTYP_N = ' J'. "IN CAPS
WILL FETCH U LIKP-VBELN "DELIVERY
USE THIS TO GET LIPS ENTRIES
hope this helps
regards,
vijay -
Tomcat 4.0.x and JSP / JSTL performance problems.
Hello everyone,
I've got a web application where some of my JSP pages are rendering quite slowly. As an example I'll use a JSP page that I wrote for browsing through a user database. It uses two beans...
1. jobBean - Ensures that all of the required (and correct) beans that will be used for processing the request have been loaded.
2. browserBean - A basic JavaBean that holds a set of UserBean(s) and other information pertinent to database queries (start, limit, order).
I'm using Apache Struts to map requests to the appropriate processing modules. Now the problem I'm having is that each request is taking between 1 and 2 seconds to execute. As you can imagine that's not going to allow for very many simaltaneous users. I've tracked the problem down to something JSP related. All of my code executes fairly quickly (I think). It takes about 20-30ms for my code to identify the request, load the requested data from the database, and convert it into a usable format (the browserBean). Here's my code...
<%@ page contentType="text/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<META http-equiv="Cache-Control" content="no-cache">
<title>
Browse Users
</title>
</head>
<body>
<!-- Set up the OrganizationBeans for use -->
<jsp:useBean id="jobBean" class="com.vacode.jobs.generic.JobBean" scope="session" />
<jsp:useBean id="browserBean" class="com.vacode.mqdb.beansets.user.UserBrowserBean" scope="session" />
<!---------------------------->
<!-- Start Time Logged Here -->
<!---------------------------->
<c:if test="${jobBean.currentJob.name != 'BrowseUserJob'}">
<!-- This page was accessed before everything was properly initialized -->
<c:url var="browseUser" value="manageUsers.do">
<c:param name="action" value="browse" />
</c:url>
<c:redirect url="${browseUser}" />
</c:if>
<form action="manageUsers.do" method="get">
<input type="hidden" name="action" value="browse">
<input type="hidden" name="start" value="<c:out value="${browserBean.dummyStart}" />">
<input type="hidden" name="order" value="<c:out value="${browserBean.order}" />">
I would like to view
<select name="limit">
<c:forEach begin="1" end="5" var="current">
<option value="<c:out value="${current*5}" />"
<c:if test="${browserBean.dummyLimit == current*5}">
selected
</c:if>
>
<c:out value="${current*5}" />
</option>
</c:forEach>
</select>
results per page.
<input type="submit" action="submit">
</form>
<c:url var="id" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="0" />
<c:param name="order" value="USER_ID" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
</c:url>
<c:url var="name" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="0" />
<c:param name="order" value="USER_NAME" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
</c:url>
<c:url var="firstName" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="0" />
<c:param name="order" value="USER_FIRST_NAME" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
</c:url>
<c:url var="lastName" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="0" />
<c:param name="order" value="USER_LAST_NAME" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
</c:url>
<c:url var="email" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="0" />
<c:param name="order" value="USER_EMAIL_ADDRESS" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
</c:url>
<c:url var="organization" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="0" />
<c:param name="order" value="USER_ORGANIZATION_NAME" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
</c:url>
<c:url var="status" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="0" />
<c:param name="order" value="USER_STATUS_NAME" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
</c:url>
<c:url var="role" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="0" />
<c:param name="order" value="ROLE_NAME" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
</c:url>
<table>
<tr>
<td><a href="<c:out value="${id}" />">Id</a></td>
<td><a href="<c:out value="${name}" />">User Name</a></td>
<td><a href="<c:out value="${firstName}" />">First Name</a></td>
<td><a href="<c:out value="${lastName}" />">Last Name</a></td>
<td><a href="<c:out value="${email}" />">E-Mail</a></td>
<td><a href="<c:out value="${organization}" />">Organization</a></td>
<td><a href="<c:out value="${status}" />">Status</a></td>
<td><a href="<c:out value="${role}" />">User Type</a></td>
</tr>
<c:forEach items="${browserBean.beans}" var="bean">
<tr>
<c:url var="manage" value="manageUsers.do">
<c:param name="action" value="modify" />
<c:param name="beanId" value="${bean.userId}" />
</c:url>
<td><a href="<c:out value="${manage}" />"><c:out value="${bean.userId}" /></a></td>
<td><c:out value="${bean.userName}" /></td>
<td><c:out value="${bean.firstName}" /></td>
<td><c:out value="${bean.firstName}" /></td>
<td><c:out value="${bean.email}" /></td>
<td><c:out value="${bean.organizationName}" /></td>
<td><c:out value="${bean.statusName}" /></td>
<td><c:out value="${bean.roleName}" /></td>
</tr>
</c:forEach>
<!-------------------------->
<!-- End Time Logged Here -->
<!-------------------------->
</table>
<c:url var="next" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="${browserBean.nextPageStart}" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
<c:param name="order" value="${browserBean.order}" />
</c:url>
<c:url var="previous" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="${browserBean.previousPageStart}" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
<c:param name="order" value="${browserBean.order}" />
</c:url>
<c:if test="${browserBean.previousPageStart>-1}">
<a href="<c:out value="${previous}" escapeXml="false" />">previous</a>
</c:if>
<c:if test="${browserBean.nextPageStart>-1}">
<a href="<c:out value="${next}" escapeXml="false" />">next</a>
</c:if>
<br>
<br>
Quick Jump To Page:
<c:forEach varStatus="loopTag" items="${browserBean.pageStartValues}" var="current">
<c:choose>
<c:when test="${loopTag.index+1==browserBean.currentPageNumber}">
<c:out value="${loopTag.index+1}" />
</c:when>
<c:otherwise>
<c:url var="thisPage" value="manageUsers.do">
<c:param name="action" value="browse" />
<c:param name="start" value="${current}" />
<c:param name="limit" value="${browserBean.dummyLimit}" />
<c:param name="order" value="${browserBean.order}" />
</c:url>
<a href="<c:out value="${thisPage}" />"><c:out value="${loopTag.index+1}" /></a>
</c:otherwise>
</c:choose>
</c:forEach>
<br>
<br>
Max Possible Pages: <c:out value="${browserBean.maxNumberOfPages}" />
<br>
Current Page: <c:out value="${browserBean.currentPageNumber}" />
</body>
</html>I've added comments where I timed my code from (by writing new Date().getTime() to the console). It usually takes between 1 and 2 seconds for that block of JSP to execute. I wrote a test class that should be very similar to the process (iterating over the forEach loop mainly) and it usually executed in 10ms to 20ms.
I had a look at the servlets that were generated by Tomcat and I noticed that for each <c:url> I used there's about 300 lines of code (with several syncronized() methods). Could this have anything to do with it? If so, what could I do to improve the performance?
Worth mentioning... The machine I am using is an AMD Athlon 1GHZ with 768MB RAM, 7200 RPM UDMA100 IDE HDD.
I'm also using Tomcat integrated with a development environment (IntelliJ IDEA).
Any help that anyone could offer is much appreciated.
Thanks,
RyanCan you get acceptable performance if you hack out everything except the browserBean forEach loop? Maybe you are trying to do too much runtime EL evaluation on the page.
If performance improves, you may want to push the URL construction and startValue computations to a Struts Action and put a bunch of objects on the requestScope (like "id_url", "name_url", "pageStartValue").
Putting these computations in the Action would avoid having JSTL parse each of the ${} arguments, evaluating the expressions, and using costly reflection to turn ${browserBean.order} into browserBean.getOrder(). -
Full-text search containstable AND logical operator performance problem
I have the following clause in my SQL statement:
CONTAINSTABLE(subject_ifts, SearchText, '"smith*" AND "n*"', LANGUAGE 1033)
It takes approximately 60 seconds to return 840 rows from a total of 4 millions rows in the searched table. If the search condition is changed to '"smith*"' it returns 840 rows in less than 1 second (ie. all rows containing the text "smith"
also contain the text "n"). It seems that the search for "n*" takes a long time to return rows as almost all 4 million rows contain this text. (Note: The search criteria is passed as a parameter into a stored procedure at runtime based
on the search criteria input by the user in the UI).
Is there any way to make SQL Server perform its search for the text "n*" just on the resultset of the 840 rows returns from the "smith*" search? Theoretically this should return rows a lot quicker basing the search on 840 rows
rather than 4 million. However, I cannot seem to implement this effectively. I have tried using CTEs and JOIN to no avail. Any help greatly appreciated.
Graham Goodwin Email: [email protected]Hello,
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Regards,
Fanny Liu
If you have any feedback on our support, please click
here.
Fanny Liu
TechNet Community Support -
HP 8510W and SSD low performance problem :(
Hello,
i have HP 8510W with actual bios. Two days ago ive bougth SSD from SAMSUNG - pretty fast toy.
But - my HP doesnt work with it well - all transfers are very low Furthermore and havent found any option about AHPI/SATA/IDE option in my BIOS (there not much options).
WIN7 64bit ULTIMATE see my new HD (and give me 6.2 to 7.7 HD benchmark).
I did not found any clues on FORUM or hp.com what could cause this problem.
Do you have any idea?
This is my BENCHMARK from SSD
Do you have any ideas?
I have all actual drivers from manufacturers (more actual than all what i can find on hp.com).
Thanks in advanceMaybe its just because maximum transfers you can achieve only with SATA 6Gbit port in your laptop.
From that reason i knew that my SSD will work not that fast - but my poor transfers shows me that there is something wrong with SSD...
I dont have any more ideas -
How to get invoice data(VBRK and VBRP)
Hi, guru:
Would like to ask one thing:
customer system will pass ECC invoice id, and base on that do we have any SAP standard BAPI or function module which can get all the details for that invoice(header and items both).
I tried BAPI_billingdoc_getdetail, however I can only get data for header(VARK)
Thanks heaps!
Ericis ECC a legal number maintained in the J*** transaction. then you can fetch if from there.
-
Performance problems with SAP GUI 7.10 and BEx 3.5 Patch 400?
Hi everybody,
we installed SAP GUI 7.10 and BEx 3.5 Patch 400 and detected hugh performance problems with this version in comparison to the SAP GUI 6.40 and BEx 3.5 or BEx 7.0 Patch 800.
Does anybody detect the same problems?
Best regards,
UlliMost important question when you are talking about performance-issues:
which OC are you working on and which excel version?
ciao
Joke
Maybe you are looking for
-
Evolution doesn't show inboxes after update
Hello, my Evolution hides the inboxes for 3 of my 5 configured imap accounts after upgrading. These are the related lines from /var/log/pacman.log: [2014-06-04 17:36] [PACMAN] upgraded evolution-data-server (3.12.1-2 -> 3.12.2-1) [2014-06-04 17:37] [
-
Difficulty in iTunes version 7downloading.
I have a G5 60GB video ipod. Never had any problems with it before. I was downloading it and screen thanked me for downloading. It asked me if I wanted to run or save. I chose run. I then get an error message: Temp Internet Files\Content.IE5\I90JUTQ5
-
Denmark Payment methods - Payment medium program
Hi Gurus If anybody has worked on the Denmark Payment methods and payment medium programs please help me in finding the Right payment medium programs as per the requirement. Two payment methods: Payment method 3 ( Transfer - Domestic - Post Giro ) -
-
How to connect mysql database using xml
welcome to all, here my doubt is how to connect mysql database using xml file, how to integrate xml file and jsp file and how to access data from dabase using jsp file. can any one help me regards
-
ICloud taps doesn't show iphone taps
Started using Mountain Lion, the new safari has the funtion iCloud taps, after I play around with it, it only shows my other Mac's safari taps but not my iPhone safari taps at all, anyone know how to fix this?