Attempt to clear a buffer thats already been flushed???

hi i can't understand why this code is giving me error..
HttpSession aSession = request.getSession(true);
String destination = "/login.jsp?returnPage=/practice/reviewcontent.jsp";
try{
if(aSession.getValue("userId") == null) {
%>
<jsp:forward page="<%= destination %>" />
<%
%>
thank you

entire code... again..
<jsp:include page="/shared/withoutN_header.html" flush="true"/>
<%@ page import="java.util.*, practice.*, javax.servlet.*, javax.servlet.http.*, java.io.*"%>
<%
String title=null;
String contentId = request.getParameter("contentId");
String content = request.getParameter("content");
String contentTitle = request.getParameter("contentTitle");
HttpSession aSession = request.getSession(true);
String destination = "/login.jsp?returnPage=/practice/reviewcontent.jsp";
if(aSession.getValue("userId") == null) {
%>
<jsp:forward page="<%= destination %>" />
<%
title = "Review " + "<br>" + contentTitle + "<br>" + content;
String errorMsg=null;
if(request.getParameter("errorMsg") != null){
errorMsg = request.getParameter("errorMsg");
else
errorMsg = "";
%>
<h3>Review</h3>
     <h4><%= contentTitle%></h4>
     <%= content%>
<form method=post action=/servlet/practice.ReviewContent?contentId=<%= contentId %> >
<table>
<tr>
     <td align=center><font color=red>
     <%= errorMsg %>
     </font>
     </td>
</tr>
<tr>
     <td>Items marked with a * are required
     </td>
</tr>
<tr><td>Rate: * </td><td><select name=rating >
     <option value=> -
     <option value=5>5 stars
          <option value=4>4 stars
          <option value=3>3 stars
          <option value=2>2 stars
          <option value=1>1 star
     </select>
     </td></tr>
<tr><td>Comments: </td><td><textarea rows=5 cols=30 name=description> </textarea></td></tr>
<hr>
</td></tr>
     <tr><td colspan=2 align=center><input TYPE=submit value="Add"></td></tr>
</table>
</form>
<jsp:include page="/shared/withoutN_footer.html" flush="true"/>
error msg...
Error: 500
Location: /practice/reviewcontent.jsp
Internal Servlet Error:
java.io.IOException: Error: Attempt to clear a buffer thats already been flushed
     at org.apache.jasper.runtime.JspWriterImpl.clear(JspWriterImpl.java:180)
     at practice.reviewcontent_6._jspService(reviewcontent_6.java:93)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java)
     at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
     at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
     at org.apache.tomcat.core.Handler.service(Handler.java:235)
     at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
     at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
     at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
     at org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Interceptor.java:341)
     at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
     at java.lang.Thread.run(Thread.java:536)

Similar Messages

  • Attempt to clear a buffer that's already been flushed

    hi,
    I got the following error while forwarding the JSP to a servlet using pagecontext.forward();
    ERROR:Attempt to clear a buffer that's already been flushed
    any help is appreciated
    flyingtaurus

    hi
    Thanks for your reply but setting buffer size and flushing buffer also didnt work also i didnt use pagecontext.forward() method but i think im printing some values in the jsp before commiting response .whether it may cause problem because in another page without this print tag i can able to forward the response.pls help me in this regard.
    flyingtaurus

  • Org.apache.jasper.JasperException: Error: Attempt to clear a buffer that's

    Hi,
    All I am trying to do is execute a <jsp:forward page=""/> commend. The page I am refering to does exists and three other pages that have the same commend are able to forward to the said page with little issue. All the pages are in the same directory and the path indicator to them is correct. Any help in this matter will be highly appreciated.
    org.apache.jasper.JasperException: Error: Attempt to clear a buffer that's already been flushed
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:534)

    jsp:forward always flushes the buffer before proceeding.
    Do you have a statement in your jsp like out.flush() before your use jsp:forward? If you do, try removing it

  • Search Server Error - Illegal operation attempted on a registry key that has been marked for deletion

    Hello,
    I have a 5 server farm (DC, 2 WFEs, 1 SQL,1 CA w/ search) and am experiencing an issue when returning search results.  This issue just started occurring recently, and basically the search page throws a correlation id whenever used.  The error returned
    is:
    SearchServiceApplication::Execute--Exception: System.Runtime.InteropServices.COMException (0x800703FA): Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA)
    SearchServiceApplicationProxy::Execute--Error occured: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA) (Fault Detail
    is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.Runtime.InteropServices.COMException: Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA)
    I even attempted to create an out of the box enterprise search site with OOB masterpages and I still am receiving this error.  
    I have also tried the  ‘Do not forcefully unload the registry at user logoff’ registry edit, but it did not work.
    Has anyone ran into this issue and has another solution other than the ‘Do not forcefully unload the registry at user logoff’ registry edit?
    Thanks!

    IISReset works for me (but after some time it fails again)
    Check this posts: http://pacsharepoint.com/2011/11/sharepoint-search-illegal-operation.html
    http://blogs.msdn.com/b/distributedservices/archive/2009/11/06/a-com-server-application-may-stop-working-on-windows-server-2008.aspx
    hope it helps,

  • How do u uninstall the apps that already been purchased?

    How do u unitalled the apps that already been purchased?

    Press and hold any of the apps and after a couple of seconds or so they should start to shake. Then press the 'x' in the left corner to delete the ones that you don't want, and when you've finished deleting press the home button so as to stop the shaking. You cannot delete any of the Apple built-in apps e.g. Music/iPod, App Store, Game Centre etc. If you don't get the 'x' on any of the apps that you've downloaded then check that Settings > General > Restrictions > Deleting Apps isn't set 'off'

  • Java.io.IOException:Data has already been flushed to the client

    hi,
    will u please anyone tell about this exception? its very urgent to me?
    i am getting exception when i ma forwarding a page in jsp.
    exception is :
    java.io.IOException : Data has already been flushed to the client.
    my code where i am getting this exception is:
    if(filled_var .equalsIgnoreCase("y"))
    %>
    <jsp:forward page="/editForm.jsp">
    <jsp:param name="formNum" value="<%= formNum%>"/>
    </jsp:forward>
    <%      
    here i am getting that error. please help me to find a solution in this.

    A forward can only be performed if the "response is not committed". The response is committed when:
    1) you do a forward
    2) enough data is outputted for the buffer to be flushed
    3) you flush the buffer manually (or you do an include with a flush="true" for example)
    It must be either 2 or 3 in the case of a JSP. So if you output a lot of data before the forward, make sure you try to do the forward BEFORE you output all that data.

  • OC4J Error== java.io.IOException: Data has already been flushed to the cli

    Hi All,
    I deployed a J2EE Application in Oracle Application Server OC4J Instance.
    while testing the application i got the error
    java.io.IOException: Data has already been flushed to the client
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.EvermindJSPWriter.clear(EvermindJSPWriter.java:308)
    at PricingCriteria.jspService(_PricingCriteria.java:135)
    [SRC:/PricingCriteria.jsp:401]
    at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:356)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle Application Server Containers for J2EE 10g(10.1.2.2.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:834)
    at com.evermind[Oracle Application Server Containers for J2EE 10g(10.1.2.2.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:228)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    Please help me in this issue.
    Thanks in Advance,
    Salih KM
    null

    Your error is because you have already flushed or closed your output stream. Your response is done but you are trying to forward after the fact.

  • When I am attempting to reset my password that has been forgotten through a computer restore, iTunes gives me a prompt to turn off Find my iPad in iCloud settings. This is not possible, as my iPad mini is locked and settings are unaccessible.

    When attempting to reset my iPad mini password that has been forgotten, I am unable to restore my device due to an error message stating that I "Need to turn off Find My iPad in iCloud settings on my iPad mini". This is not possible, as I have forgotten the password and can not open the device.

    Hi there dsbrooks911,
    You may find the information in the article below helpful.
    iCloud: Remove your device from Find My iPhone
    http://support.apple.com/kb/PH2702
    -Griff W.

  • HT201272 how do I re download music thats already been downloaded

    How do I download music that Ive already downloaded but had to delete off my phone has the album kept pausing??

    Make sure the Music has been Deleted from your Device...
    Then...
    Close All Open Apps...  Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • JSP clear a buffer -- FLUSH ERROR

    Hai everybody!
    I've 3 jsp files. The First and the Second jsp file's will be forwarded to the Third jsp file when it completed certain process in each of the page.
    The problem that I faced is that, the First page can be forwarded to Third jsp file, but the Second page cant and this exception is cought.
    "org.apache.jasper.JasperException: Error: Attempt to clear a buffer that's already been flushed"
    So how should I solved this problem?
    I tried to put <%@ page autoFlush="true" %> at the begining of the Third jsp file but still doesnt work.
    in First.jsp
    ....< do some process here >
    ..<jsp:forward page="Third.jsp"/>
    in Second.jsp
    .....< do some process here >
    ..<jsp:forward page="Third.jsp"/>
    in Third.jsp
    <%@ page autoFlush="true" %>
    ....< other code goes here >
    ........Any help...Thanks
    ....Any help.

    there can be some errors on your 2nd jsp

  • How do I get a refund on Export PDF that has ALREADY been agreed

    On 1/21-1/22 I tried to 'renew' a subscription for Export PDF. By some error (maybe mine - I just dont understand the whole thing) my Bank was immediately charged for two subscriptions, each at a different price. I immediately "chat"ted with several  reps (it was difficult to get onto the chat and find out how to cancel) and was assured that both would be cancelled and refunded. They weren't!
    I waited a week. Was again frustrated by the chat hookup, and tried the 'cloud' retail product tel #, assuming it was wrong but that I could be switched to the correct one. Had a very pleasant chat, was assured that both would be cancelled and refunded, received 2 e-mails confirming the cancellations, each with a seperate "Case #". Felt pretty good! It had only taken me a week of reasonably diligent effort to get a very simple thing done! IT WASN"T DONE! (Yes, I apologize - I know I'm loud - but by now I've got steam coming out of my ears!)
    Today I got an e-mail, telling me that the refund had been processed and the case # would be closed. I looked at my bank, and only one had been refunded! I reviewed all the other e-mails and the notes from the telephone calls and chats to be sure I hadn't misunderstood something. But, no I hadn't. I went to my Adobe on-line and looked up 'my orders' history. Sure enough one had been invoiced and refunded ( the lesser charge of the two) but the other had ONLY BEEN INVOICED - NOT CANCELLED. And it seems that every piece of this transaction generates a new "order" , "case" or some other "reference #" - none of which are tied together, except by the invoice amount, when it is mentioned - which it typically IS NOT.
    My question, then, is : How can I get past this absolute frustration over every aspect of my interaction with Adobe and GET THIS TAKEN CARE OF?????????

    Hi Stacy,
        What frustration? (Just kidding !)
        As I mentioned, one of the two charges has been  refunded. Credited by
    Adobe on Jan 28, I believe I received it in my bank on Jan  30.
        The other charge, $25.37 of order # AD011017507,  has not been received
    by my bank yet. But this can't be that much of a surprise,  and has nothing
    to do with "10 business days" for refunds to post.
        To this minute, "My Orders" on Adobe website shows  that the order #
    AD011017507  was invoiced on January 22, but that no  credit invoice has been
    posted against this order to this moment!
        Can you begin to understand the frustration of  being unable, through
    all attempts to untangle this mess, starting within  one hour of the original
    order, with I believe nine different "Chats",  telephone calls and, finally
    a "problem" posting,  stretching over more  than thirteen days. Of course
    it doesn't make much sense to devote this much  attention to less than $50
    worth of stuff, but I do not let things like this  dangle.
        And can you imagine how loathe I am to deal with  Adobe for fear of
    some real problem?
        At any rate, I would certainly be pleased if you  can suggest a way for
    me to extricate myself from this. Any help would be  GREATLY appreciated!
        Thanks for your time and any trouble,
        Stephen Ellis
        <removed by admin>
    In a message dated 2/3/2014 4:08:59 P.M. Eastern Standard Time, 
    [email protected] writes:
    Re:  How do I get a refund on Export PDF that has ALREADY been agreed 
    created by StacySison (http://forums.adobe.com/people/StacySison)  in 
    Adobe ExportPDF - View the full  discussion
    (http://forums.adobe.com/message/6082008#6082008)

  • Send a request to a conversation that has already been finished

    This error continually occurs. Any idea why?
              An attempt was made to send a request to conversation id []:169.254.17.244-b61346.100533c48f4.-7fea-gend.
              This is not a valid conversation id. The most common cause of this exception is an attempt to send a request to a conversation that has already been finished.
              Work around is to restart WLS and maybe this time it will not happen. WLS 8.1SP3.
              From: [email protected] ([email protected])
              Subject: Weblogic Tutorial Question - Need help
              This is the only article in this thread
              View: Original Format
              Newsgroups: weblogic.developer.interest.jms
              Date: 2004-09-17 09:12:33 PST
              Hi guys,
              I'm a Weblogic newbie. I have started working with Weblogic Workshop's
              Tutorial. I find them interesting and easy to follow. All was going
              well until I reached the Step 4 (Add a JMS Control). The url to this
              page is:
              http://edocs.bea.com/workshop/docs81/doc/en/workshop/reference/navResources.html
              After completing this tutorial to the end I get all the results
              mentioned, but I get additional error messages like these in my
              InvestigateTest.jws Web Service client:
              1095373714829
              investigate:creditScoreJMS:listener.onMessage
              External Service Callback investigate:creditScoreJMS:listener.onMessage
              Submitted at Friday, September 17, 2004 10:25:52 AM EDT
              Executable Request:Callback.onMessage
              ConversationNotFound Exception
              Submitted at Friday, September 17, 2004 10:25:52 AM EDT
              An attempt was made to send a request to conversation id 1095373714829.
              This is not a valid conversation id. The most common cause of this
              exception is an attempt to send a request to a conversation that has
              already been finished.
              Request Cancelled
              Submitted at Friday, September 17, 2004 10:25:52 AM EDT
              Processing Request
              Submitted at Friday, September 17, 2004 10:25:53 AM EDT
              Request Complete
              Submitted at Friday, September 17, 2004 10:25:53 AM EDT
              I cannot figure out why I'm getting these. I'm doing everything as
              described in the Tutorial. Can somebody tell me what I'm doing wrong.
              I would greatly appreciate.
              Thanks.
              Adnan

    hi
              We just encountered this problem while load testing using JMeter. While it may not be the same scenario, we have found that we can consistently trigger this error if:
              a) multiple threads from the same client are invoking the service (i.e. a JMeter using JavaSamplerClient can do this)
              b) the web service is conversational according to the polling design pattern recommended in the WLW doco: i.e.
              startQuery()(one-way) conversation phase = start
              checkQueryStatus() conversation phase = continue
              fetchQueryResponse()conversation phase = finish
              c) buffering is enabled for the startQuery() operation.
              d) the number of threads > 3 (might occur very infrequently <= 3 - cant remember)
              This is reproducable in our WLS/WLW 8.1 SP2/SP3 environment.
              With buffering enabled - errors occur
              With buffering not enabled - no errors
              On reflection, buffering isn't really needed for our usage so we removed it, however the errors might indicate a bug or unsupported use case
              Regards
              Jim Nicolson

  • How to apply a Character Style that's already been made in a template document?

    First of all I'd like to thank everyone that helps. I'm a complete beginner at scripting and appreciate all your help.
    I'm basically using GREP expressions to find patterns in a document and apply a Character Style which has already been made. This Character style was not made using script, but just in InDesign when making and setting up the template.
    var myDoc = app.activeDocument;
    //Clear the find/change grep preferences.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    //GREP Expression for finding all HEADERS
    app.findGrepPreferences.findWhat = ".+\n";
    //Applying formatting changes to put into All Caps, Bold and changing the font size to 12 pt.
    app.changeGrepPreferences.capitalization = Capitalization.allCaps;
    app.changeGrepPreferences.fontStyle = "Bold";
    app.changeGrepPreferences.pointSize = "12";
    myDoc.changeGrep();
    //Clear the find/change preferences after the search.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    This is how I currently have it. I will manually define the changes to the text. The problem is, each template uses a different set of fonts and not all of them use Bold e.g. Sabon can use CE Bold.
    I would like to learn how to apply a Character Style and have tried looking around but nothing seems to work.
    Any help would be much appreciated.
    Thanks.

    select the text where u went  and run below  script after change group as per ur template.
    var myDoc = app.activeDocument;
    var mySel = app.selection[0];
    //Clear the find/change grep preferences.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    //GREP Expression for finding all HEADERS
    app.findGrepPreferences.findWhat = "role";
    //Applying formatting changes to put into All Caps, Bold and changing the font size to 12 pt.
    //app.changeGrepPreferences.capitalization = Capitalization.allCaps;
    //~ app.changeGrepPreferences.fontStyle = "Bold";
    //~ app.changeGrepPreferences.pointSize = "12";
    app.changeGrepPreferences.appliedCharacterStyle=myDoc.characterStyleGroups.item("Style Group 1").characterStyleGroups.item("Style Group 2").characterStyles.item("Header")// Header is name of character name
    mySel.changeGrep();
    //Clear the find/change preferences after the search.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    If it's help then click yes
    Mi_D

  • Batch apply colors to text that's already been laid out in sequence

    Anyone know of a way to batch apply colour changes to text that's already been laid out in a sequence? .

    select the text where u went  and run below  script after change group as per ur template.
    var myDoc = app.activeDocument;
    var mySel = app.selection[0];
    //Clear the find/change grep preferences.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    //GREP Expression for finding all HEADERS
    app.findGrepPreferences.findWhat = "role";
    //Applying formatting changes to put into All Caps, Bold and changing the font size to 12 pt.
    //app.changeGrepPreferences.capitalization = Capitalization.allCaps;
    //~ app.changeGrepPreferences.fontStyle = "Bold";
    //~ app.changeGrepPreferences.pointSize = "12";
    app.changeGrepPreferences.appliedCharacterStyle=myDoc.characterStyleGroups.item("Style Group 1").characterStyleGroups.item("Style Group 2").characterStyles.item("Header")// Header is name of character name
    mySel.changeGrep();
    //Clear the find/change preferences after the search.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    If it's help then click yes
    Mi_D

  • Error that Table  is already been declared in code

    Hi Guys I am getting the error that Table KNVP is already been declared. please correct what is the problem since it work other companies with same code
    Tables: KNVP.
    data: l_tabix like sy-tabix,
    l_s_BIW_KNA1_S like BIW_KNA1_S.
    case i_datasource.
    WHEN '0CUSTOMER_ATTR'.
    loop at i_t_data into l_s_BIW_KNA1_S.
    l_tabix = sy-tabix.
    select single * from KNVP where KUNNR = l_s_BIW_KNA1_S-KUNNR.
    if sy-subrc = 0.
    l_s_BIW_KNA1_S-ZZPARFN = KNVP-PARVW.
    modify i_t_data from l_s_BIW_KNA1_S index l_tabix.
    endif.
    endloop.
    endcase.
    thanks
    soniya

    Try to modify ur code as below..
    Tables: KNVP.
    data: l_tabix like sy-tabix,
    l_s_BIW_KNA1_S like BIW_KNA1_S.
    data: i_knvp like knvp occurs 0 with header line.
    case i_datasource.
    WHEN '0CUSTOMER_ATTR'.
    loop at i_t_data into l_s_BIW_KNA1_S.
    l_tabix = sy-tabix.
    clear i_knvp.
    select single * from KNVP into i_knvp where KUNNR = l_s_BIW_KNA1_S-KUNNR.
    if sy-subrc = 0.
    l_s_BIW_KNA1_S-ZZPARFN = i_knvp-PARVW.
    modify i_t_data from l_s_BIW_KNA1_S index l_tabix.
    endif.
    endloop.
    endcase.

Maybe you are looking for