Submit Statment inside Loop - Problem in display O/P
Hi All,
Iam Using Submit statment inside the Loop with Return , when the first line in the loop completes the O/P gets display and the Second line is not processed and get in O/P.Can any one let me know why this problem occurs?...
Regards,
Veera
when You submit for a report it starts a parallel process and it is O/P then if you are doign it in loop it may be over writing the existing O/P that may be the reason you are not seeing the out put properly as it is written across different internalk sessions
Similar Messages
-
Problem in displaying text inside the item label - JFREECHART
Hi All,
I dont know whether this is the right place or not to post the queries related to jfreechart here .
I am facing a problem in displaying the text inside the item label in jfreeChart. I am trying to print the text in 2 lines one below the other at the top of each bar in waterfall chart.
Please find the code below in next post. The problem i am facing is it is neglecting the new line character . If any one knows how to display the text one below the other please help me out .
Thanks in advance .
Regards,
Diwi am facing the problem in pasting the complete code as its exceeds the message text limitiation, please find the link below for the code .
http://www.java-forums.org/java-2d/12087-problem-displaying-text-inside-item-label-jfreechart.html#post36648
Early response will be appreciated . Thanks in advance
Regards,
Diw
Edited by: Diw on Sep 30, 2008 11:15 AM
Edited by: Diw on Sep 30, 2008 11:16 AM -
Problem with display of Buttons in ADF
Hi All,
I had a strange problem in display of the ADF Page in one of the server.I had two buttons inside ToolBars, The UI was coming fine in the two WLS, But when I deployed the application in third WLS, I was seeing that Buttons are coming in the top of screen,
Kindly let me know as to why Iam not to replicate the issue in my earlier WLS.Please find my code
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:f="http://java.sun.com/jsf/core">
<af:panelStretchLayout id="psl1">
<f:facet name="center">
<af:panelGroupLayout id="pgl1">
<af:panelBox text="Service Request#: #{bindings.srNumber.inputValue}" id="pb1">
<af:spacer width="10" height="10" id="s1"/>
<af:outputText value="Service Request#: #{bindings.srNumber.inputValue}"
id="ot18" inlineStyle="font-weight:bold;"
rendered="false"/>
<af:spacer width="15" height="10" id="s2"/>
<af:separator id="s3" rendered="false"/>
<af:panelFormLayout id="pfl1">
<af:inputText value="#{bindings.subject.inputValue}" label="Summary"
required="true" columns="100" maximumLength="100" id="it3" showRequired="true">
<f:validator binding="#{bindings.subject.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.description.inputValue}"
label="Description" required="true" columns="100"
maximumLength="1999" id="it2"
rows="7" showRequired="true">
<f:validator binding="#{bindings.description.validator}"/>
</af:inputText>
</af:panelFormLayout>
<af:separator id="s4" rendered="false"/>
</af:panelBox>
<af:toolbar id="tb1">
<af:group id="g1">
<af:commandButton text="#{pageFlowScope.MySRBean.reopenSrBackButtonLabel}" id="cb2"
action="backtodetails" accessKey="G"
immediate="true" inlineStyle="border-style:outset; border-width:medium; outline-color:Gray;"/>
<af:commandButton text="#{pageFlowScope.MySRBean.reopenSrConfirmReopenButtonLabel}" id="cb3"
action="success"
actionListener="#{pageFlowScope.MySRBean.reOpenSR}"
accessKey="C" inlineStyle="border-style:outset; border-width:medium; outline-color:Gray;"/>
</af:group>
</af:toolbar>
</af:panelGroupLayout>
</f:facet>
</af:panelStretchLayout>
</jsp:root>
thanks
KrishnaveniUser, please always tell us your jdev version.
The interesting part is what you did not tell us.
Kindly let me know as to why Iam not to replicate the issue in my earlier WLS.Please find my code means hte code has once run OK and now after you did some changes doesn't any longer. Querstion: what did you change, not oly to the code but to the environment.
Timo -
XSL-How to get value of a variable from inside loop-- to the outside loop?
Pls help
hi im currently working on this xsl file..
This works on generating a txt file,my problem right now is
' how can i get the value of a variable generated from the inside forloop,
i have to get the total,sum value of this variables after performing the loop
***this is the for loop
<xsl:for-each select="OutboundPayment">
<xsl:variable name='id' select='generate-id(OutboundPayment)'/>
<xsl:sort select="PaymentNumber/CheckNumber" data-type="text" />
<xsl:variable name='PValue' select='format-number(100*PaymentAmount/Value,"0000000000000")'/>
<xsl:value-of select='$id'/>
<xsl:text>D</xsl:text>
<xsl:value-of select='$DDate'/>
<xsl:value-of select='$Batch'/>
<xsl:text>3</xsl:text>
<xsl:value-of select='format-number(PaymentNumber/PaymentReferenceNumber,"0000000000")'/>
<xsl:value-of select='format-number(PayeeBankAccount/BankAccountNumber,"0000000000")'/>
<xsl:value-of select='substring(Payee/Name,1,20)'/>
<xsl:value-of select='$PValue'/>
<xsl:variable name='Addend' select='concat($DDate,substring($DAcct,5,5),$Batch)'/>
<xsl:variable name="LHash">
<xsl:call-template name="GetHash">
<xsl:with-param name="A1" select="$PValue" />
<xsl:with-param name="A2" select="$Addend" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="concat('[',$LHash,']')" />
<!--LHash*i have to get the total amount of this one from the outside loop /---->
<xsl:call-template name='NewLine'/>
</xsl:for-each>
<!--I have to put in here the total value of that LHash/---->
<!--This is the template on how to get the value of that variable in the inside loop/---->
<xsl:template name="GetHash">
<xsl:param name='A1'/>
<xsl:param name='A2'/>
<xsl:variable name='TwoSum' select='format-number($A1+$A2,"000000000000000")'/>
<xsl:variable name='Weight' select='317191314191112'/>
<xsl:call-template name="WDigit">
<xsl:with-param name="Cnt" select="15"/>
<xsl:with-param name="Sum" select="$TwoSum"/>
<xsl:with-param name="Wgt" select="$Weight"/>
<xsl:with-param name="Tot" select="0"/>
</xsl:call-template>
</xsl:template>
<xsl:template name='WDigit'>
<xsl:param name='Cnt'/>
<xsl:param name='Sum'/>
<xsl:param name='Wgt'/>
<xsl:param name='Tot'/>
<xsl:choose>
<xsl:when test="$Cnt > 0">
<xsl:variable name='Multip' select='substring($Wgt,$Cnt,1)'/>
<xsl:variable name='Factor' select='substring($Sum,$Cnt,1)'/>
<xsl:variable name='Prduct' select='$Multip$Factor'/>
<!--xsl:value-of select="concat($Tot,'[',$Cnt,']')"/-->
<!--xsl:value-of select="concat($Multip,'x',$Factor,'=',$Prduct)"/-->
<!--xsl:call-template name='NewLine'/-->
<xsl:call-template name="WDigit">
<xsl:with-param name="Cnt" select="$Cnt - 1"/>
<xsl:with-param name="Sum" select="$Sum"/>
<xsl:with-param name="Wgt" select="$Wgt"/>
<xsl:with-param name="Tot" select="$Tot+$Prduct"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="Rem" select="$Tot mod 11"/>
<xsl:variable name="Chk" select="11 - $Rem"/>
<xsl:value-of select="format-number(concat($Tot,$Chk),'00000')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:template name='GetTotal'>
</xsl:template>
Thanks in advance for those who are willing to help.
-LeighyaIt would have helped if you had posted your code as CODE but as it is, I could hardly read it. My guess about what you are asking is, if you want a template to return a value, just write that value to the result stream inside the template.
If that wasn't what you were asking, then please post your code in a readable format. -
hi,
i have two problems in displaying ALV grid output Using Oops.
1) How to modify the fieldcatalog after we getting a field catalog using general FM.
2) initialy it is displaying 13 fields but there are 63 fields .
eventhough we chage the layout to 63 fields it is displaying only 13 fields , these 13 fields may be different based on our selection but count of displayed fileds are same . how can display 63 fields at a time .Hi,
You can chnage using below code:
loop at gt_fieldcat.
if <gt_fieldcat-field_name> = 'FIELDNAME'.
endif.
modify gt_fieldcat.
clear gt_fieldcat.
endloop.
Make sure that all the field should not have no_out = 'X' and tech = 'X'.
Thanks,
Sriram Ponna. -
Problem in displaying records in multi record block
Hi all,
I have a problem in displaying records in a multi record block in a form.
I have 1 control block and 1 data block(multi-record block).
Control block has one item CUSTOMER-ID. Data block has many other items related to customer.
when a value is entered in customer-id text item, all the relavant details should be displayed in the data block.
but, the records are overlapping in the same line in the data block, actually they have to be displayed one record per one line.
The code is,
IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
FOR C1 IN C
LOOP
:XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
:XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
:XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
:XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
:XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
:XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
END LOOP;
Please help me out..
Thanks in advance!
SumanHi Suman
IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
first_record;
FOR C1 IN C
LOOP
:XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
:XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
:XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
:XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
:XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
:XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
next_record;
END LOOP;
Try this. you are trying to show all the records in same line. so its overlapping.
Thankyou
[email protected] -
Problem in displaying totals based on the Unit of measurement.
Hi,
I have Problem in displaying totals based on the Unit of measurement.
I want to display the total in the output of the alv based on the unit of measurement. for example i have three fields in the output namely
Matnr Quantity UOM
51 10 EA
61 10 KG
71 10 KG
In the total i should get
10 EA
20 KG
Can anyone tell me how to do this?
The basic req is the exclude the qty with unit EA(each) in the totals.
Thanks,
AmitH i,
you can use the collect statement
to get the proper result
loop at itab. ( all the records)
move all the fields from itab to another
collect itab1.
write: itab1-fields, itab1-fields.
endloop.
this will solve your problem
reward points if helpful,
thanks & regards,
venkatesh -
Problems in displaying chinese characters with utf-8 encoding
Hi,
I got problem in displaying chinese characters in my web application.
I am creating a web application supporting both English and Chinese charaters. What I am trying to do is:
1. storing some chinese characters via a web page (page1) into database.
2. retrieve the chinese characters via another web page (page2) from the database.
Once I put the Chinese characters on the webpage (page1 in step #1), it displayes well (the readable chinese characters) before I submit this page (after submit, the data will be stored into the database).
But when I tried to display the chiese characters via page2 in step#2, I got un-readable characters displayed.
The running configuration is: Sun Application Server (coming and with the JSC2) and MySQL server 5.0. And I setup the database server with utf8 as character-set.
It seems like the chinese characters got messed up throught the round-trip (from page1<----via jdbc---->database<----via jdbc------>page2).
From the database, I found the chinese characters are there. Any helps are appreciated.Hi,
I am trying to insert new record.The record may contain chineese or English data.
I did same what u specified.
first I converted to the byte UTF8.again,I converted byte to string using 8859_1.
the values are not storing chinese characters.
pls suggest me.
below is my code.
ascCode = req.getParameter("asccode");
countryCode = req.getParameter("countrycode");
ascName = req.getParameter("ascname");
address1 = req.getParameter("ascaddress1");
address2 = req.getParameter("ascaddress2");
System.out.println("ASC NAME:"+ascName);
System.out.println("ADDRESS1:"+address1);
System.out.println("ADDRESS2:"+address2);
ascC = ascCode.getBytes("UTF8");
coun = countryCode.getBytes("UTF8");
ascN = ascName.getBytes("UTF8");
add1 = address1.getBytes("UTF8");
add2 = address2.getBytes("UTF8");
System.out.println("ASC NAME:"+ascN);
System.out.println("ADDRESS1:"+add1);
System.out.println("ADDRESS2:"+add2);
ascCode = new String(ascC,"8859_1");
countryCode= new String(coun,"8859_1");
ascName = new String(ascN,"8859_1");
address1 = new String(add1,"8859_1");
address2 = new String(add2,"8859_1");
System.out.println("ASC NAME:"+ascName);
System.out.println("ADDRESS1:"+address1);
System.out.println("ADDRESS2:"+address2);
thanks. -
Problem with displaying any picture at all.
Hi there, one of my iMacs has a problem with displaying video.
When I turn the computer on the screen shows a yellow-orange hue in the centre, and it's getting wider across the screen and bright, eventually it turns to a white screen. Now I know for a fact it's nothing to do with the logic board! I can control the computer with remote desktop and dim the screen or make it brighter. My question is, is it the cabling that is faulty or something else?
If it's the cabling, how can I open the chrome neck and change it?
Thanks youDid your testing include utilizing a second display and adapter to see
how a mirrored output of the video would appear; to be sure this item
is isolated to the wiring from the circuit boards to the attached LCD?
There are components within the border of the iMac G4's display which
may affect the image as they wear out and/or fail. The inverter, is one
item that is in the panel along with the backlight and liquid crystal layer.
Removing or replacing the wire harness between these components,
the computer base and LCD panel, is a bit of work. This topic has been
addressed in these forums at one time or another; and a few owners
who contribute here have experience taking these apart. In the past,
getting a known-good display with chrome arm and harness, from an-
other iMac (perhaps one with logic board failure) and combine two,
was an answer when the complete display & arm were known good;
as this saved a fair amount of work on the upper end. Still, taking the
lower orb shape apart is a significant task; to have it work right again.
The cabling could be faulty; the inverter could be. And there may be
yet another associated component failing which produces symptoms.
Taking apart the chrome arm may not be such a good idea; I've seen
the expanded view of one taken apart by a metal cutting saw, and it
has a big spring inside, and a bit of tension. There also are friction pad
parts inside that loose their ability to hold up the panel, so some owners
sought to replace those to varying degrees of trouble.
There should be a few step-by-step instructions. One of the contributors
to the iMac G4 forums here was Mr Totes; one of his web pages had a
few images of take-aparts he'd done. Other sites had basic stuff, such
as replacing optical drive and hard disk drives, thermal paste, RAM, etc.
If you were able to see the correct system images from a second display
via the VGA adapter cable, in mirror mode, the attached unit certainly is
suspect; and the computer is probably repairable. Otherwise, there is a
video component on the logic board not considered a separate part; and
if that fails, the usual fix is to get a reman logic board or another iMac.
Have fun, whichever way it goes.
Good luck & happy computing! -
hi guys,
I am calling a report program from another report program using
SUBMIT statment
the calling program(1st program) returns 3 statment like
1st table updated
2nd table updated
3rd table updated
the three statements which returns from the 1st program is simply a write statement in the 1st program
when i am using the submit statment like this in the 2nr program
submit '1stprogram' with sel_screen in int_table and return.
it return correctly(3 statements) and stops after the satament.
i also need to do some process aftet the statment and then only i need to print the (3)statement in the 2nd program
i want that 3 statment to be printed in the 2ndprogram..
How can i do this using submit statement?
Regards
senthilhi,
try this addition of Submit statement
... EXPORTING LIST TO MEMORY
Effect
This addition stores the basic list for the program accessed in the ABAP Memory. It can only be used together with the addition AND RETURN.
The list is stored in the ABAP Memory as an internal table of the row type ABAPLIST, ABAPLIST being a structured data type in the ABAP Dictionary.
The calling program can access the list stored once program access is completed, using function modules belonging to the function group SLST.
The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST.
The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list.
The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list screen. -
Possible solution to "Looping" problem
Hello all, I've read several threads here dealing with a "looping" problem, I'm not sure what the ins-and-outs of this issue is but it seems to affect many different config and different manufacturers are blaming each other... check out the link below (mind the wrapping) for what might be a real solution at the Via forums. I happened upon this because I could not get a stable system out of my MSI via-km266 mobo with dual display.
http://forums.viaarena.com/messageview.cfm?catid=25&threadid=9263&highlight_key=y&keyword1=dual%20display
Alpay EnoWhat is the problem? Let the filters return a List instead of an array. Am I missing something?
Kaj -
Can I put Read inside loop?
Hi Folks
Can I put Read inside loop?
Performance wise is it acceptable?
Regards,
SreeramHi
there is no problem to put READ statement inside the LOOP
its a better way to put
to avoid SELECT in a LOOP
see this example
i had used that in my program
in the performance point of view it is a good method
LOOP AT IT_SOBID INTO WA_SOBID." where otype eq s_otype and objid eq s_objid.
READ TABLE IT_HRP1026 WITH KEY OBJID = WA_SOBID-SOBID OTYPE = WA_SOBID-SCLAS INTO WA_HRP1026.
IF SY-SUBRC EQ 0.
READ TABLE IT_HRP1000 WITH KEY OBJID = WA_SOBID-SOBID INTO WA_HRP1000.
WA_OUTPUT-OBJID = WA_HRP1026-OBJID.
WA_OUTPUT-BEGDA = WA_SOBID-BEGDA.
WA_OUTPUT-ENDDA = WA_SOBID-ENDDA.
WA_OUTPUT-AEDTM = WA_HRP1026-AEDTM.
WA_OUTPUT-UNAME = WA_HRP1026-UNAME.
WA_OUTPUT-STEXT = WA_HRP1000-STEXT.
READ TABLE IT_REASON WITH KEY CANCR = WA_HRP1026-CANCR INTO WA_REASON.
WA_OUTPUT-CANCRT = WA_REASON-CANCRT.
CLEAR WA_REASON-CANCRT.
READ TABLE IT_LOCATION1 WITH KEY OBJID = WA_HRP1026-OBJID INTO WA_LOCATION1..
READ TABLE IT_LSTEXT WITH KEY OBJID = WA_LOCATION1-SOBID OTYPE = 'F' INTO WA_LSTEXT.
WA_OUTPUT-LSTEXT = WA_LSTEXT-LSTEXT.
CLEAR WA_LSTEXT-LSTEXT.
APPEND WA_OUTPUT TO IT_OUTPUT.
CLEAR WA_OUTPUT.
CLEAR WA_OUTPUT-CANCRT.
ENDIF.
ENDLOOP.
<b>Reward if usefull</b> -
Problem in displaying the TaxRate columns .
Hi Experts,
I am having a problem in displaying the 'TaxRate', in this Query there are some different Taxrate's columns like- ' 'Basic Excise Duty BED@10 %', ' Education ces@2% ' , 'Secondary Education Cess @1%', etc. only 4 -5 tax's value should display at a time and rest of the TaxRate's columns whose value is NULL should not display.
So, I want to display only those TaxRate's columns whose value is not NULL and If there is no value for any taxrate's column in the data, then it should Display only 'Excempt' column.
This is my query...
SELECT DISTINCT OSTA.Code , ORPC.DocNum AS 'Debit Note No.', ORPC.CardName AS 'Name', ORPC.CardCode AS 'code', ORPC.NumAtCard AS 'Supplier Ref.' ,
RPC1.Dscription AS 'Description of Goods', ORPC.Address, RPC1.Quantity, RPC1.Price AS 'Rate', RPC1.LineTotal AS 'Amount', ORPC.DocDate,
(SELECT DISTINCT TaxRate
FROM RPC4
WHERE (staType = - 90) AND (StaCode = 'BED@10') AND (DocEntry = RPC1.DocEntry)) AS 'Basic Excise Duty BED@10 %',
(SELECT DISTINCT TaxRate
FROM RPC4 AS RPC4_8
WHERE (staType = - 60) AND (DocEntry = RPC1.DocEntry)) AS 'Education Cess @2%',
(SELECT DISTINCT TaxRate
FROM RPC4 AS RPC4_7
WHERE (staType = - 55) AND (DocEntry = RPC1.DocEntry)) AS 'Secondary Education Cess @1%',
(SELECT DISTINCT TaxRate
FROM RPC4 AS RPC4_6
WHERE (staType = 4) AND (StaCode = 'CST2') AND (DocEntry = RPC1.DocEntry)) AS 'Central Sales Tax(CST)',
(SELECT DISTINCT TaxRate
FROM RPC4 AS RPC4_5
WHERE (staType = 1) AND (StaCode = 'VAT4') AND (DocEntry = RPC1.DocEntry)) AS 'Input VAT@5%',
(SELECT DISTINCT TaxRate
FROM RPC4 AS RPC4_4
WHERE (staType = 1) AND (TaxRate = 12.500000) AND (StaCode = 'VAT12.5') AND (DocEntry = RPC1.DocEntry)) AS 'VAT12.5%',
(SELECT DISTINCT TaxRate
FROM RPC4 AS RPC4_3
WHERE (staType = 18) AND (StaCode = 'Add2') AND (DocEntry = RPC1.DocEntry)) AS 'ADD Tax 1%',
(SELECT DISTINCT TaxRate
FROM RPC4 AS RPC4_2
WHERE (staType = 7) AND (DocEntry = RPC1.DocEntry)) AS 'Excempt'
FROM OSTA INNER JOIN
RPC4 AS RPC4_1 ON OSTA.Code = RPC4_1.StaCode CROSS JOIN
ORPC INNER JOIN
RPC1 ON ORPC.DocEntry = RPC1.DocEntry
WHERE (OSTA.Code IN ('BED@10','eCess 2%','HeCess 1%','CST')) AND (ORPC.CardCode = 'V00308') AND (ORPC.DocNum = '9220004')
Kindly help me to solve this problem
Regards
RahulHi rahul,
Try this:
SELECT DISTINCT T0.DocNum AS 'Debit Note No.', T0.CardName AS 'Name', T0.CardCode AS 'code', T0.NumAtCard AS 'Supplier Ref.'
,T1.Dscription AS 'Description of Goods', T0.Address, T1.Quantity, T1.Price AS 'Rate', T1.LineTotal AS 'Amount', T0.DocDate,
(SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0)FROM RPC4 WHERE RPC4.StaType = -90 AND RPC4.DocEntry = T0.DocEntry) AS 'Basic Excise Duty BED@10 %',
(SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = -60 AND RPC4.DocEntry = T0.DocEntry) AS 'Education Cess @2%',
(SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = -55 AND RPC4.DocEntry = T0.DocEntry) AS 'Secondary Education Cess @1%',
(SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 4 AND RPC4.StaCode = 'CST2' AND RPC4.DocEntry = T0.DocEntry) AS 'Central Sales Tax(CST)',
(SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 1 AND RPC4.StaCode = 'VAT4'AND RPC4.DocEntry = T0.DocEntry) AS 'Input VAT@5%',
(SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 1 AND RPC4.StaCode = 'VAT12.5'AND RPC4.DocEntry = T0.DocEntry) AS 'VAT12.5%',
(SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 18 AND RPC4.StaCode = 'Add2'AND RPC4.DocEntry = T0.DocEntry) AS 'ADD Tax 1%',
(SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 7 AND RPC4.DocEntry = T0.DocEntry) AS 'Excempt'
FROM ORPC T0
INNER JOIN RPC1 T1 ON T0.DocEntry = T1.DocEntry
WHERE (T0.CardCode = 'V00308') AND (T0.DocNum = '9220004')
FOR BROWSE
Thanks,
Neetu -
Problem with displaying BLOB images on JSP page using a servlet
hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
here is one of my image servlet's working versions (the essential part of it) :
BLOB blob=null;
rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
while (rset.next())
blob=((OracleResultSet)rset).getBLOB(2);
response.reset();
response.setContentType("image/jpeg");
response.addHeader("Content-Disposition","filename=42.jpeg");
ServletOutputStream ostr=response.getOutputStream();
InputStream istr=blob.getBinaryStream(1L);
int size=blob.getBufferSize();
int len=-1;
byte[] buff = new byte[size];
while ((len=istr.read( buff ))!=-1 ) {
ostr.write(buff,0,len);
response.flushBuffer();
ostr.close(); and my JSP page code :
<img src="/ImageServlet" border="0" > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
here's the magic tag : <img src="ImageJSP.jsp" border="0" > enjoy : ) -
Problem with display of JScrollPane
I have made a small GUI.
It has a JFrame and four JPanels are added to the frame.
The placement is done by program and hence layout manager is set to null.
Two of the panels contain JScrollPane.
One scroll pane is associated with a JList.
Another scroll pane is associated with a JTextArea.
I am creating panel components in their respective paintComponent() method.
Now my problem is whenever I run the code, the behaviour of the display of the GUI is erratic. Sometimes it appears perfectly fine other times the JList contents and JTextArea along with their scroll bars don't appear. I have tried running the code on different platforms and different systems. On some systems it works perfectly fine, on some it behaves erratically.
Moreover my experience is that it is giving problem on somewhat lower configuration systems (low RAM and CPU) and running fine on higher configuration systems.
I ran it on my laptop with 512MB RAM and centrino duo processor. (Both on windows and ubuntu it gave the same problem, random display behavior)
I ran it on a desktop with 1GB RAM and higher processor (Both on windows and ubuntu it displayed fine)
Does this problem relate to insufficient painting time or something of this sort? Why is this problem is coming and what's the solution?
Thanks in advance.
Also if anybody has encountered similar problem please do share so that I could at least say this is not a unique one.The placement is done by program and hence layout manager is set to null.That is (probably) your first problem. Learn to use use LayoutMangers, they save time in the long run.
Sometimes it appears perfectly fine other times the JList contents and JTextArea along with their scroll bars don't appearProbably because preferred sizes are not set correctly. Since you are not using a layout manager that is your responsibility. Easy solution is to use a proper combination of layout managers.
I am creating panel components in their respective paintComponent() method.That is (probably) your second problem. paintComponent() is for doing custom painting, not creating new components dynamically.
I suggest you start by reading the Swing tutorial for example programs.
Maybe you are looking for
-
Bex Percentage Indicator in the WebI report (# Multivalue)
Hi All! I'm having a difficulty to produce a Bex percentage indicator to a WEB I report. This is the result of my query: Cycles Qty1 Qty2 (Qty1%AQty2) 1 100 200 50% 2 200 200 100% 3 300 300
-
Why does my iPhone 4s lag so much on iOS 8.1.1
i understand that the iPhone 4s is getting old now but come on remember the iPhone 3gs flawless running iOS 6 then comes the iPhone 4 it was ruined on iOS 7 and now Apple is killing the iPhone 4s already iphone 4s and iPad 2 users we promised perform
-
I can't view my photos on my TV using AppleTV. This is because when I get to the iCloud Photo Settings page and turn on My Photo Stream,there seems nowhere else to go to look at my photos. I guess there is a simple answer! Can anyone help.....please
-
Question about photo icons on songs.
Hey guys, I got a simple question to ask. Well, I just got a new 30GB Ipod Video today, and it works fine. However, after I added all of my songs to my ipod, I also wanted to upload the little photo icons next to them as well when you play a song. So
-
RE: calculate no of months for the calmonth variable range enetered
Dear All, Please can anyone tell me for a given calmonth range entered in the selection screen how do i get the no of months for the range entered. I need to use this figure in calculating the no of stock turn overdays. for ex: 01.2009 to 03.2009---