Problem in querying the records

what is the thing changing the values on my master/detail form n giving me a message that "do u want to save the record" on fetching of each record? even if there is not pre or post-query trigger. is there any problem in the default Master-Detail trigger created while creating a relation? plzzz tell me this

Sometimes it happens when some plsql program modifies the value of a database field in one of the database blocks. So try checking all your plsql. As there is no other reason for it. Becoz master-detail relation never does it.

Similar Messages

  • Problem in Modifying the records

    Hi all,
    I have a button "Find", when the button is Pressed, I've to query the records and modify the records. I have to modify only the "Reading" Column in only one row.
    It is querying all the records successfully (here retrieves 10 records) but when I modify the Reading value in one Row, all the 10 records are inserting as new row. Am not able to update.
    Please suggest me with the solution.
    Regards,
    Mini

    Hi Mini
    Sounds Strange and i think the problem resides in ur design of code in Find Button So i suggest to Share us the Code pls.
    Well ,for now u can try to use ...
    IF :system.current_record THEN
    END IF;Hope this helps...
    Regards,
    Abdetu...

  • Problem in filtering the records in Query

    Dear Gurus,
    I am struck with a problem of filtering data and am not able to visualize the solution so need a solution.
    so here is the requirement:
    I have a multiprovider with 3 infocubes.
    All these infocubes have a dimension names product family and in it there is a infoobject named FAMILY & it is having a attribute named DATE and DATE attribute is not a navigational attribute of FAMILY.
    Example:
    family : A
    attribute date: #
    for period: 011.2010
    family : A
    attribute date: #
    for period: 012.2010
    family : A
    attribute date:01.01.2011
    for period: 001.2011
    family : A
    attribute date: #
    for period: 002.2011
    if user run the query in 012.2010 i mean december 2010 then the above two record should be displayed & if he run the query in jan 2011 then only jan record should be shown because there a date in it & old record should not come. again if he run the query in feb 2011 then only the records for jan and feb should come old record before the date should not come.
    I mean once the value show up in the attribute date it should not pick old values but only pick new values.
    Thanks to all!

    Hi Mario,
                  When I format date as DSTR(@date_from & : &@date_to, 'dd.mm.yyyy') it shows blank values in the output for date field. rest of the values are displayed.
                  Mario can you tell anything about second part of my question. I am getting 'Result' at output.

  • Problem in querying the form?

    hi everybody ,this group have helped me alot to understand the things better. i have created a form with template .fmb . and i have modified standard apps functionality of saving the form with the standard save button on the toolbar.
    now if i have two previous record with the name sunny and employee no 105 and 106 respectively and if i will press f11 and edit one of the records and make sunny and 107 and press save : it will insert a new row.
    now after that if i will press f11 and then query the form using ctrl-f11. then i am getting first two records:sunny 105 and sunny 106. i am not getting sunny 107 but this record has been inserted into the database.
    kindly let me know what can be the cause?what i can see this is beacuse of some property of the block because i have created a test form and its working fine there.
    so please help me fast as i dont have the time for RnD.
    thanks.

    Hi,
    This isn't R&D but the humble task of fixing your own code.
    Have you checked wether record no 107 is in the database (by means of SQL*Plus/Toad)
    If NO (insert is the problem)
    Check wether there is an on-insert trigger redefining de insert action. Or maybe there's you're inserting a view with an in-stead-of-trigger
    if YES (retrieval is the problem)
    Make all item except one 'non database items' and check wether you can retrieve the record. If you can, make the 'non database items' one by one 'database enabled'. In this way you see which item causes the problem.
    Matthieu

  • Problem while creating the record in IT0080 from background

    Dear All,
    I have a requirement to Create the record for Maternity Leave in IT0080 from background, whenever applied from ESS.
    Once the leave gets aaproved, while posting the documents from tcode PTARQ ( Program - RPTARQPOST), in the BADI PT_ABS_REQ, in method IF_EX_PT_ABS_REQ~POST_VIA_BLOP for the implementation, I am trying to submit the program in which the actual record is created in IT0080.
    In this program through BDC i have created the BDC data and have used CALL transaction, as internally IT 2001 also needs to be updated, which gets calculated  indirectly...
    But when executed, it gives error of Employee cannot be locked... as the Document which is posted through PTARQ, have several locks... I tried to dequeue the same...
    but cannot resolve the problem...
    Secondly i tried to create the Job also... which would be executed after some time... but still its not getting updated...
    Any help... will be highly appreciated...
    Regards,
    Heena

    Hello s.s
    I'm not understand exacly what is your problem?
    Field can have both values at the same time(Time Stamp and User stamp)  only if that field calculated
    Maybe you told about two different fields?
    User stamp field return username only it's standart functionality
    Create stamp - return date/time combination
    Remote key is avialable when you repository configured to work with some remote systems
    All records from repository (LUT, taxonomy attributes ets.) you can map to corresponding Destination items
    Regards
    Kanstantsin

  • Problem in Committing the records

    Hello ,
    in my one use case i have to upload bulk data into data base.row may be more than 100000 .i need to read data from file then upload to table .i am able to created 100000 row of that particular VO .but when i am commit the records this throwing following error.i am not able to save the records.please guide me how to solved this issue .
    <Sep 28, 2011 10:24:23 AM IST> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "617" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@5a00d0[
    POST /SahajBsnlBillPaymentApp-BsnlBillPaymentUi-context-root/faces/BsnlHomeLogin.jspx?_adf.ctrl-state=x7ahvxylv_4 HTTP/1.1
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 (.NET CLR 3.5.30729)
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Connection: keep-alive
    Content-Length: 328
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    Referer: http://127.0.0.1:7101/SahajBsnlBillPaymentApp-BsnlBillPaymentUi-context-root/faces/BsnlHomeLogin.jspx?_afrLoop=918552278095&_afrWindowMode=0&_adf.ctrl-state=x7ahvxylv_4
    Cookie: JSESSIONID=L3rHTClShzwgByTvZkXz6t95CJhDdnxvzkx8X1QYhgn5VM2yfbzm!-1779058935
    Pragma: no-cache
    Cache-Control: no-cache
    ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
         java.net.SocketInputStream.socketRead0(Native Method)
         java.net.SocketInputStream.read(SocketInputStream.java:129)
         oracle.net.ns.Packet.receive(Packet.java:293)
         oracle.net.ns.DataPacket.receive(DataPacket.java:92)
         oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:174)
         oracle.net.ns.NetInputStream.read(NetInputStream.java:119)
         oracle.net.ns.NetInputStream.read(NetInputStream.java:94)
         oracle.net.ns.NetInputStream.read(NetInputStream.java:79)
         oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:122)
         oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:78)
         oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1040)
         oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1016)
         oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:589)
         oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
         oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1224)
         oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
         oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3467)
         oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
         weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:172)
         oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:429)
         oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8044)
         sahaj.apps.bsnlbillpayment.entity.ShjBsnlCdrBillingDetailsEOImpl.doDML(ShjBsnlCdrBillingDetailsEOImpl.java:644)
         oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6373)
         oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3172)
         oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2980)
         oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2018)
         oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2277)
         sahaj.apps.bsnlbillpayment.am.BsnlBillPaymentAMImpl.processFile(BsnlBillPaymentAMImpl.java:652)
         sahaj.apps.bsnlbillpayment.am.BsnlBillPaymentAMImpl.processFileReportByUI(BsnlBillPaymentAMImpl.java:517)
         sahaj.apps.bsnlbillpayment.ui.bean.UploadBillDetailsBean.uploadRecords(UploadBillDetailsBean.java:126)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:597)
         com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
         org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91)
         oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         java.security.AccessController.doPrivileged(Native Method)
         oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         java.security.AccessController.doPrivileged(Native Method)
         oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    <Sep 28, 2011 10:24:23 AM IST> <Notice> <Diagnostics> <BEA-320068> <Watch 'StuckThread' with severity 'Notice' on server 'DefaultServer' has triggered at Sep 28, 2011 10:24:23 AM IST. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND (MSGID = 'BEA-000337')
    WatchData: DATE = Sep 28, 2011 10:24:23 AM IST SERVER = DefaultServer MESSAGE = [STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "617" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@5a00d0[
    POST /SahajBsnlBillPaymentApp-BsnlBillPaymentUi-context-root/faces/BsnlHomeLogin.jspx?_adf.ctrl-state=x7ahvxylv_4 HTTP/1.1
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 (.NET CLR 3.5.30729)
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Connection: keep-alive
    Content-Length: 328
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    Referer: http://127.0.0.1:7101/SahajBsnlBillPaymentApp-BsnlBillPaymentUi-context-root/faces/BsnlHomeLogin.jspx?_afrLoop=918552278095&_afrWindowMode=0&_adf.ctrl-state=x7ahvxylv_4
    Cookie: JSESSIONID=L3rHTClShzwgByTvZkXz6t95CJhDdnxvzkx8X1QYhgn5VM2yfbzm!-1779058935
    Pragma: no-cache
    Cache-Control: no-cache
    ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
         java.net.SocketInputStream.socketRead0(Native Method)
         java.net.SocketInputStream.read(SocketInputStream.java:129)
         oracle.net.ns.Packet.receive(Packet.java:293)
         oracle.net.ns.DataPacket.receive(DataPacket.java:92)
         oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:174)
         oracle.net.ns.NetInputStream.read(NetInputStream.java:119)
         oracle.net.ns.NetInputStream.read(NetInputStream.java:94)
         oracle.net.ns.NetInputStream.read(NetInputStream.java:79)
         oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:122)
         oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:78)
         oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1040)
         oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1016)
         oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:589)
         oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
         oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1224)
         oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
         oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3467)
         oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
         weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:172)
         oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:429)
         oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8044)
         sahaj.apps.bsnlbillpayment.entity.ShjBsnlCdrBillingDetailsEOImpl.doDML(ShjBsnlCdrBillingDetailsEOImpl.java:644)
         oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6373)
         oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3172)
         oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2980)
         oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2018)
         oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2277)
         sahaj.apps.bsnlbillpayment.am.BsnlBillPaymentAMImpl.processFile(BsnlBillPaymentAMImpl.java:652)
         sahaj.apps.bsnlbillpayment.am.BsnlBillPaymentAMImpl.processFileReportByUI(BsnlBillPaymentAMImpl.java:517)
         sahaj.apps.bsnlbillpayment.ui.bean.UploadBillDetailsBean.uploadRecords(UploadBillDetailsBean.java:126)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:597)
         com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
         org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91)
         oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         java.security.AccessController.doPrivileged(Native Method)
         oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         java.security.AccessController.doPrivileged(Native Method)
         oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    SUBSYSTEM = WebLogicServer USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-000337 MACHINE = ihcpc053 TXID = CONTEXTID = 545d50a55c708e9f:-372ee5c8:132ae563fe9:-8000-0000000000000025 TIMESTAMP = 1317185663864
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 600000
    >
    <Sep 28, 2011 10:24:25 AM IST> <Alert> <Diagnostics> <BEA-320016> <Creating diagnostic image in c:\documents and settings\pshaw\application data\jdeveloper\system11.1.1.3.37.56.60\defaultdomain\servers\defaultserver\adr\diag\ofm\defaultdomain\defaultserver\incident\incdir_26 with a lockout minute period of 1.>
    <Sep 28, 2011 10:25:23 AM IST> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "677" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@5a00d0[
    POST /SahajBsnlBillPaymentApp-BsnlBillPaymentUi-context-root/faces/BsnlHomeLogin.jspx?_adf.ctrl-state=x7ahvxylv_4 HTTP/1.1
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 (.NET CLR 3.5.30729)
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Connection: keep-alive
    Content-Length: 328
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    Referer: http://127.0.0.1:7101/SahajBsnlBillPaymentApp-BsnlBillPaymentUi-context-root/faces/BsnlHomeLogin.jspx?_afrLoop=918552278095&_afrWindowMode=0&_adf.ctrl-state=x7ahvxylv_4
    Cookie: JSESSIONID=L3rHTClShzwgByTvZkXz6t95CJhDdnxvzkx8X1QYhgn5VM2yfbzm!-1779058935
    Pragma: no-cache
    Cache-Control: no-cache
    ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
         java.net.SocketInputStream.socketRead0(Native Method)
         java.net.SocketInputStream.read(SocketInputStream.java:129)
         oracle.net.ns.Packet.receive(Packet.java:293)
         oracle.net.ns.DataPacket.receive(DataPacket.java:92)
         oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:174)
         oracle.net.ns.NetInputStream.read(NetInputStream.java:119)
         oracle.net.ns.NetInputStream.read(NetInputStream.java:94)
         oracle.net.ns.NetInputStream.read(NetInputStream.java:79)
         oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:122)
         oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:78)
         oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1040)
         oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1016)
         oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:589)
         oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
         oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1224)
         oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
         oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3467)
         oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
         weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:172)
         oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:429)
         oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8044)
         sahaj.apps.bsnlbillpayment.entity.ShjBsnlCdrBillingDetailsEOImpl.doDML(ShjBsnlCdrBillingDetailsEOImpl.java:644)
         oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6373)
         oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3172)
         oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2980)
         oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2018)
         oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2277)
         sahaj.apps.bsnlbillpayment.am.BsnlBillPaymentAMImpl.processFile(BsnlBillPaymentAMImpl.java:652)
         sahaj.apps.bsnlbillpayment.am.BsnlBillPaymentAMImpl.processFileReportByUI(BsnlBillPaymentAMImpl.java:517)
         sahaj.apps.bsnlbillpayment.ui.bean.UploadBillDetailsBean.uploadRecords(UploadBillDetailsBean.java:126)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:597)
         com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
         org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
         oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91)
         oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         java.security.AccessController.doPrivileged(Native Method)
         oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         java.security.AccessController.doPrivileged(Native Method)
         oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >

    I have faced similar problems.
    Try commiting data in batches (may be 5000) if it is possible in your case, this will remove the heavy load to the ADF middle tire.
    see:
    Re: Maximum create call for the VO-Prasad

  • Problem in sorting the records

    Hi All,
    I have to sort some records based on a key. If the key field is optional then how to sort the records. For example consider the follwing records.
    <row>
          <name>jaya</name>
          <address>hyd</address>
          <material>d</material>
          <units>4</units>
          <price>6</price>
    </row>
      <row>
          <address>ss</address>
          <material>wd</material>
          <units>7</units>
          <price>9</price>
       </row>
    <row>
          <name>radha</name>
          <address>pune</address>
          <material>g</material>
          <units>9</units>
          <price>3</price>
    </row>
    Here name field is used as a key in sorting the records. in the second record name field does'nt exists. All the records that doesnt have the name field shud come on the top and the rest with name field shud come sorted.
    Can anyone please helpout how to solve this problem??

    Jhansi,
    Did u solved the issue? The scenario is lil bit complicated, please consider my below suggestion, if you haven't achieved your results.
    I must really thankful to Michal and all my SDN friends,who guided me to use the logic-using multiple Mapping program in one Interface mapping.
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Ok, let us come to the logic.
    For your problem we need to use two mapping programs.
    <b>Mapping Program 1</b>
    http://www.flickr.com/photo_zoom.gne?id=897495319&size=o
    <b>Mapping Program 2</b>
    http://www.flickr.com/photo_zoom.gne?id=897495327&size=o
    http://www.flickr.com/photo_zoom.gne?id=897495341&size=o
    <b>UDF1 - Testing</b>
    http://www.flickr.com/photo_zoom.gne?id=897495429&size=o
    String temp;
    for(int i=0;i<Name.length;i++)
    for(int j=i1;j<Name.length;j+)
    if(Name<b>[</b>i<b>]</b>.compareToIgnoreCase(Name[j])>0)
               temp = Name<b>[</b>i<b>]</b>;
                Name<b>[</b>i<b>]</b>= Name[j];
                Name[j]=temp;
    for(int i=0;i<Name.length;i++)
    if(Name<b>[</b>i<b>]</b>.equals("0"))
    result.addSuppress();
    result.addContextChange();
    else
    result.addValue(""Name<b>[</b>i<b>]</b>"");
    result.addContextChange();
    <b>UDF 2 - Testin1</b>
    http://www.flickr.com/photo_zoom.gne?id=897495437&size=o
    String temp,temp1;
    for(int i=0;i<Name.length;i++)
    for(int j=i1;j<Name.length;j+)
    if(Name<b>[</b>i<b>]</b>.compareToIgnoreCase(Name[j])>0)
               temp = Name<b>[</b>i<b>]</b>;
                Name<b>[</b>i<b>]</b>= Name[j];
                Name[j]=temp;
          temp = Values<b>[</b>i<b>]</b>;
                Values<b>[</b>i<b>]</b>= Values[j];
                Values[j]=temp;
    for(int i=0;i<Values.length;i++)
    result.addValue(""Values<b>[</b>i<b>]</b>"");
    result.addContextChange();
    <b>Interface Mapping</b>
    http://www.flickr.com/photo_zoom.gne?id=897495361&size=o
    <b>Finally -Results:</b>
    http://www.flickr.com/photo_zoom.gne?id=897498639&size=o (My Data)
    http://www.flickr.com/photo_zoom.gne?id=897498659&size=o (Your Data)
    I hope it helps you!!!!
    I don't know whether this is the correct way or any other simplest way to do so. Also I request our friends to feedback their inpute regarding this logic.
    Jhansi,if you have any doubts in achieving the same, kindly reply back.
    Best regards,
    raj.

  • Checkbox problem with wieving the records on datapage

    Hi guys!
    I generate in my MultirowEditForm 4 columns (Id, Name, Deletion, Reason). I can change just Deletion(it's checkbox Y/N) and Reason(it's Textfield) column.
    I want to do following and don't know how :-)
    On the top of the page I want to have another checkbox that will works as follows.
    If it's checked I want to view just the records, where Deletion is checked.
    If it's unchecked I want to see all the records from database.
    Can anybody help me to solve it?
    Thanks a lot
    regards

    Does anybody have any idea how to solve it, please?
    Thank you

  • Problem after deleting the records........

    Hi Folks,
    Kindly help me with this report.
    At one point I am deleting the itfinal internal table w.r.t
    to HKONT.Before deleting I am having all the values for
    LIFNR and AWKey,but once deleting(as mentioned earlier) I
    am not getting these two values.The same Awkey is getting repeated
    again and again.
    Where I am going wrong.
    REPORT  zf14 no standard page heading line-size 134.                                    .
    TABLES: bkpf,bseg,lfa1,t001.
    type-pools:slis.
    TYPES : BEGIN OF x_bkpf,
             bukrs TYPE bkpf-bukrs,           " Company Code
             belnr TYPE bkpf-belnr,           " Document Number
             gjahr TYPE bkpf-gjahr,           " Fiscal year
             awkey TYPE bkpf-awkey,           " Object Key
             bldat TYPE bkpf-bldat,
             budat TYPE bkpf-budat,
             END OF x_bkpf.
    TYPES : BEGIN OF x_bseg,
             bukrs TYPE bseg-bukrs,           " Company Code
             belnr TYPE bseg-belnr,           " Document Number
             gjahr TYPE bseg-gjahr,           " Fiscal Year
             koart TYPE bseg-koart,
             hkont TYPE bseg-hkont,           " G/L Account
             ebeln TYPE bseg-ebeln,           " Purchasing Document
             lifnr TYPE bseg-lifnr,           " Vendor Code
             name1 type lfa1-name1,
             ort01 type lfa1-ort01,
            END OF x_bseg.
    TYPES : BEGIN OF x_bseg1,
             bukrs TYPE bseg-bukrs,           " Company Code
             belnr TYPE bsak-belnr,           " Document Number
             gjahr TYPE bsak-gjahr,           " Fiscal Year
             hkont TYPE bseg-hkont,           " G/L Account
             ebeln TYPE bseg-ebeln,           " Purchasing Document
             lifnr TYPE bseg-lifnr,           " Vendor Code
             wrbtr TYPE bseg-wrbtr,           " Amt.in Doc.Curr
            END OF x_bseg1.
    types:begin of x_ven,
          name1 type lfa1-name1,
          ort01 type lfa1-ort01,
          end of x_ven.
    TYPES : BEGIN OF x_final,
             bukrs TYPE bkpf-bukrs,           " Company Code
             belnr TYPE bkpf-belnr,           " Document Number
             gjahr TYPE bkpf-gjahr,           " Fiscal year
             blart TYPE bkpf-blart,           " Document Type
             awkey TYPE bkpf-awkey,           " Object Key
             bldat TYPE bkpf-bldat,
             budat TYPE bkpf-budat,
             mwskz TYPE bseg-mwskz,
             qsskz TYPE bseg-qsskz,
             wrbtr TYPE bseg-wrbtr,           " Amount in Doc Curr
             werks TYPE bseg-werks,           " Recv Facility Code
             hkont TYPE bseg-hkont,           " G/L Account
             ebeln TYPE bseg-ebeln,           " Purchasing Document
             ebeln1 type bseg-ebeln,
             lifnr TYPE bseg-lifnr,           " Vendor Code
             lifnr1 type bseg-lifnr,
             dmbtr TYPE bseg-dmbtr,
             wrtbr type bseg-wrbtr,
             vbill type bseg-wrbtr,
             tdsamt type c,
             tdsrate(4),
             shkzg TYPE bseg-shkzg,
             name1 TYPE lfa1-name1,           "vendor Name
             ort01 TYPE lfa1-ort01,           "City
             j_1icstno TYPE  j_1imovend-j_1icstno, "CST
             j_1ilstno  TYPE  j_1imovend-j_1ilstno ,"LST
          END OF x_final.
    DATA : it_bkpf   TYPE TABLE OF x_bkpf WITH HEADER LINE .
    DATA : it_bseg   TYPE TABLE OF x_bseg WITH HEADER LINE .
    DATA : it_bseg1   TYPE TABLE OF x_bseg1 WITH HEADER LINE .
    DATA : itfinal TYPE TABLE OF x_final WITH HEADER LINE.
    DATA : month_names LIKE t247 OCCURS 0 WITH HEADER LINE.
    DATA :i(2),             "month
          y TYPE int4,      "year
          c(4),
          v_bill LIKE bseg-dmbtr. " bill value
    DATA :  pos TYPE sy-tabix,
            month(99),
            month1(99).
    data:sl_no(3) value 0.
    *Alv
    DATA:itfieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA:itrepid TYPE sy-repid.
    itrepid = sy-repid.
    DATA:itevent TYPE slis_t_event.
    DATA:itlistheader TYPE slis_t_listheader.
    DATA:walistheader LIKE LINE OF itlistheader.
    DATA:itlayout TYPE slis_layout_alv.
    DATA:top TYPE slis_formname.
    DATA:itsort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    DATA:itprintparams TYPE slis_print_alv.
    DATA:itvariant TYPE disvariant.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS     : p_bukrs LIKE t001-bukrs OBLIGATORY. "Company code
    SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr, "Vendor name
                     s_budat for sy-datum  obligatory,            "bkpf-budat OBLIGATORY,     "Date
                     s_gjahr FOR bseg-gjahr NO-DISPLAY.
    SELECTION-SCREEN END  OF BLOCK b1.
    AT SELECTION-SCREEN.
      SELECT SINGLE bukrs
                   INTO t001-bukrs
                   FROM t001
                   WHERE bukrs = p_bukrs.
      IF sy-subrc <> 0.
        MESSAGE e000(z_ma) WITH 'Invalid Company Code'.
      ENDIF.
      IF NOT s_lifnr[] IS INITIAL.
        SELECT SINGLE lifnr
                      INTO lfa1-lifnr
                      FROM lfa1
                      WHERE lifnr IN s_lifnr.
        IF  sy-subrc <> 0.
          MESSAGE e000(z_ma) WITH 'Invalid Vendor'.
        ENDIF.
      ENDIF.
    START-OF-SELECTION.
    *13
    if s_budat is not initial.
      if s_budat-high is not initial.
          while s_budat-low le s_budat-high.
                i = s_budat+7(2).
                if i > 3.
                    s_gjahr = s_budat+3(4).
                    append s_gjahr.
                else.
                    c = s_budat+3(4).
                    S_GJAHR = C - 1.
                    append  s_gjahr.
                endif.
                s_budat-low = s_budat-low + 1.
          endwhile.
       else.
          i = s_budat+7(2).
          if i > 3.
            s_gjahr = s_budat+3(4).
            append s_gjahr.
          else.
            c = s_budat+3(4).
            S_GJAHR = C - 1.
            append  s_gjahr.
         endif.
       endif.
    endif.
    *13
    SELECT bukrs belnr gjahr awkey bldat budat
               INTO TABLE it_bkpf
               FROM bkpf
               WHERE bukrs = p_bukrs
               AND   budat IN s_budat
               and   gjahr = s_gjahr. "13
      IF NOT it_bkpf[] IS INITIAL.
      SELECT bukrs belnr dmbtr wrbtr hkont ebeln lifnr
                   FROM  bseg
                   INTO CORRESPONDING FIELDS OF TABLE it_bseg
                   FOR   ALL ENTRIES IN it_bkpf
                   WHERE bukrs = it_bkpf-bukrs
                   and   belnr = it_bkpf-belnr
                   AND   gjahr = s_gjahr                            "13-it_bkpf-gjahr
                   AND   koart = 'K'.
      ENDIF.
    IF NOT it_bseg[] IS INITIAL.
    SELECT belnr gjahr dmbtr wrbtr hkont ebeln lifnr
                      FROM  bseg
                      INTO CORRESPONDING FIELDS OF TABLE it_bseg1
                      FOR   ALL ENTRIES IN it_bkpf
                      WHERE bukrs = it_bkpf-bukrs                    "13it_bkpf-bukrs
                      AND   belnr = it_bkpf-belnr                    "13it_bkpf-belnr
                      AND   gjahr = s_gjahr.                         "13-it_bkpf-gjahr.
      ENDIF.
    LOOP AT it_bkpf.
    MOVE-CORRESPONDING it_bkpf TO itfinal.
    APPEND itfinal.
    ENDLOOP.
    LOOP AT it_bseg.
    MOVE-CORRESPONDING it_bseg TO itfinal.
    append itfinal.
    select single name1 ort01 from lfa1 into (itfinal-name1 , itfinal-ort01) where lifnr = it_bseg-lifnr.
    select single  j_1icstno  j_1ilstno into (itfinal-j_1icstno , itfinal-j_1ilstno) from j_1imovend
        where lifnr = it_bseg-lifnr.
    ENDLOOP.
    LOOP AT it_bseg1.
    MOVE-CORRESPONDING it_bseg1 TO itfinal.
    APPEND itfinal.
    ENDLOOP.
    loop at it_bseg1.
    itfinal-ebeln1 = it_bseg1-ebeln.
    append itfinal.
    endloop.
    *Deleting the records from ITFINAL w.r.t HKONT.
    <b>LOOP AT itfinal.
    IF itfinal-hkont  NE   '0020106230' AND
       itfinal-hkont  NE    '0020106330'.
    DELETE itfinal.
    endif.
    clear itfinal.
    ENDLOOP.</b>
    *Caluculating Bill Value
    loop at itfinal.
    if itfinal-hkont =     '0020106230'.
    itfinal-tdsrate = '2%'.
    itfinal-vbill = itfinal-wrbtr * 100 / 2.
    modify itfinal.
    elseif itfinal-hkont = '0020106330'.
    itfinal-tdsrate = '4%'.
    itfinal-vbill = itfinal-wrbtr * 100 / 4.
    modify itfinal.
    endif.
    endloop.
    sort itfinal by belnr.
    delete adjacent duplicates from itfinal comparing belnr.
    format reset.
    format color col_normal.
    LOOP AT itfinal.
    sl_no = sl_no + 1.
    write:/ sy-vline,
             2  sl_no,
             7  sy-vline,
             10 itfinal-ebeln1,
             21 sy-vline,
             23 itfinal-awkey,
             44 sy-vline,
             45 itfinal-bldat,
             57 sy-vline,
             60 itfinal-vbill,
             75 sy-vline,
             76 itfinal-tdsrate,
             85 sy-vline,
             89 itfinal-wrbtr,
             106 sy-vline,
             109 itfinal-belnr,
             121 sy-vline,
             124 itfinal-budat,
             134 sy-vline.
    ENDLOOP.
    write:/ sy-uline.
    top-of-page.
    data : name1(60).
    data : month_text(127),
            string(99).
      call function 'MONTH_NAMES_GET'
       exporting
         language                    = sy-langu
    IMPORTING
      RETURN_CODE                 =
        tables
          month_names                 = month_names[]
       exceptions
         month_names_not_found       = 1
         others                      = 2
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      format reset.
      format color col_positive.
      if not s_budat-low is initial .
        read table month_names with key mnr =  s_budat-low+4(2).
        if sy-subrc = 0.
          month = month_names-ltx.
          string = 'Details of TDS (2% / 4%) On Works Contract Deducted'.
          concatenate string  'for the  Month of'  month into month_text
          separated by space.
          write :/ month_text.
          skip 1.
        endif.
      endif.
      concatenate itfinal-name1 ',' itfinal-ort01
                       into name1 separated by space.
      write :/ 'Vendor Code           :', itfinal-lifnr.
      write :/ 'Vendor Name and City  :', name1.
      skip 1.
      write :/ 'TNGST Registration No :', itfinal-j_1ilstno,
             / 'CST Registration No   :', itfinal-j_1icstno.
      skip 1.
    Display the coloumn headings
      format reset.
      format color col_heading.
      write :/ sy-uline.
      write:/ sy-vline,
             2  'Sl_no',
             7 sy-vline,
             10 'P.O. No',
             21 sy-vline,
             22 'Invoice No',
             44 sy-vline,
             45 'Inv Date',
             57 sy-vline,
             60 'Bill value',
             75 sy-vline,
             76 'TDS Rate',
             85 sy-vline,
             89 'TDS Amount' ,
             106 sy-vline,
             108 'Doc.No.',
             121 sy-vline,
             125 'Pos Date',
             134 sy-vline,
      sy-uline.
    K.Kiran.

    Kiran,
    I am pasting code here and i am sure that the code should work now
    REPORT zf14 no standard page heading line-size 134. .
    TABLES: bkpf,bseg,lfa1,t001.
    type-pools:slis.
    TYPES : BEGIN OF x_bkpf,
    bukrs TYPE bkpf-bukrs, " Company Code
    belnr TYPE bkpf-belnr, " Document Number
    gjahr TYPE bkpf-gjahr, " Fiscal year
    awkey TYPE bkpf-awkey, " Object Key
    bldat TYPE bkpf-bldat,
    budat TYPE bkpf-budat,
    END OF x_bkpf.
    TYPES : BEGIN OF x_bseg,
    bukrs TYPE bseg-bukrs, " Company Code
    belnr TYPE bseg-belnr, " Document Number
    gjahr TYPE bseg-gjahr, " Fiscal Year
    koart TYPE bseg-koart,
    hkont TYPE bseg-hkont, " G/L Account
    ebeln TYPE bseg-ebeln, " Purchasing Document
    lifnr TYPE bseg-lifnr, " Vendor Code
    name1 type lfa1-name1,
    ort01 type lfa1-ort01,
    END OF x_bseg.
    TYPES : BEGIN OF x_bseg1,
    bukrs TYPE bseg-bukrs, " Company Code
    belnr TYPE bsak-belnr, " Document Number
    gjahr TYPE bsak-gjahr, " Fiscal Year
    hkont TYPE bseg-hkont, " G/L Account
    ebeln TYPE bseg-ebeln, " Purchasing Document
    lifnr TYPE bseg-lifnr, " Vendor Code
    wrbtr TYPE bseg-wrbtr, " Amt.in Doc.Curr
    END OF x_bseg1.
    types:begin of x_ven,
    name1 type lfa1-name1,
    ort01 type lfa1-ort01,
    end of x_ven.
    TYPES : BEGIN OF x_final,
    bukrs TYPE bkpf-bukrs, " Company Code
    belnr TYPE bkpf-belnr, " Document Number
    gjahr TYPE bkpf-gjahr, " Fiscal year
    blart TYPE bkpf-blart, " Document Type
    awkey TYPE bkpf-awkey, " Object Key
    bldat TYPE bkpf-bldat,
    budat TYPE bkpf-budat,
    mwskz TYPE bseg-mwskz,
    qsskz TYPE bseg-qsskz,
    wrbtr TYPE bseg-wrbtr, " Amount in Doc Curr
    werks TYPE bseg-werks, " Recv Facility Code
    hkont TYPE bseg-hkont, " G/L Account
    ebeln TYPE bseg-ebeln, " Purchasing Document
    ebeln1 type bseg-ebeln,
    lifnr TYPE bseg-lifnr, " Vendor Code
    lifnr1 type bseg-lifnr,
    dmbtr TYPE bseg-dmbtr,
    wrtbr type bseg-wrbtr,
    vbill type bseg-wrbtr,
    tdsamt type c,
    tdsrate(4),
    shkzg TYPE bseg-shkzg,
    name1 TYPE lfa1-name1, "vendor Name
    ort01 TYPE lfa1-ort01, "City
    j_1icstno TYPE j_1imovend-j_1icstno, "CST
    j_1ilstno TYPE j_1imovend-j_1ilstno ,"LST
    END OF x_final.
    DATA : it_bkpf TYPE TABLE OF x_bkpf WITH HEADER LINE .
    DATA : it_bseg TYPE TABLE OF x_bseg WITH HEADER LINE .
    DATA : it_bseg1 TYPE TABLE OF x_bseg1 WITH HEADER LINE .
    DATA : itfinal TYPE TABLE OF x_final WITH HEADER LINE.
    DATA : month_names LIKE t247 OCCURS 0 WITH HEADER LINE.
    DATA :i(2), "month
    y TYPE int4, "year
    c(4),
    v_bill LIKE bseg-dmbtr. " bill value
    DATA : pos TYPE sy-tabix,
    month(99),
    month1(99).
    data:sl_no(3) value 0.
    *Alv
    DATA:itfieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA:itrepid TYPE sy-repid.
    itrepid = sy-repid.
    DATA:itevent TYPE slis_t_event.
    DATA:itlistheader TYPE slis_t_listheader.
    DATA:walistheader LIKE LINE OF itlistheader.
    DATA:itlayout TYPE slis_layout_alv.
    DATA:top TYPE slis_formname.
    DATA:itsort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    DATA:itprintparams TYPE slis_print_alv.
    DATA:itvariant TYPE disvariant.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_bukrs LIKE t001-bukrs OBLIGATORY. "Company code
    SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr, "Vendor name
    s_budat for sy-datum obligatory, "bkpf-budat OBLIGATORY, "Date
    s_gjahr FOR bseg-gjahr NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN.
    SELECT SINGLE bukrs
    INTO t001-bukrs
    FROM t001
    WHERE bukrs = p_bukrs.
    IF sy-subrc <> 0.
    MESSAGE e000(z_ma) WITH 'Invalid Company Code'.
    ENDIF.
    IF NOT s_lifnr[] IS INITIAL.
    SELECT SINGLE lifnr
    INTO lfa1-lifnr
    FROM lfa1
    WHERE lifnr IN s_lifnr.
    IF sy-subrc <> 0.
    MESSAGE e000(z_ma) WITH 'Invalid Vendor'.
    ENDIF.
    ENDIF.
    START-OF-SELECTION.
    *13
    if s_budat is not initial.
    if s_budat-high is not initial.
    while s_budat-low le s_budat-high.
    i = s_budat+7(2).
    if i > 3.
    s_gjahr = s_budat+3(4).
    append s_gjahr.
    else.
    c = s_budat+3(4).
    S_GJAHR = C - 1.
    append s_gjahr.
    endif.
    s_budat-low = s_budat-low + 1.
    endwhile.
    else.
    i = s_budat+7(2).
    if i > 3.
    s_gjahr = s_budat+3(4).
    append s_gjahr.
    else.
    c = s_budat+3(4).
    S_GJAHR = C - 1.
    append s_gjahr.
    endif.
    endif.
    endif.
    *13
    SELECT bukrs belnr gjahr awkey bldat budat
    INTO TABLE it_bkpf
    FROM bkpf
    WHERE bukrs = p_bukrs
    AND budat IN s_budat
    and gjahr = s_gjahr. "13
    IF NOT it_bkpf[] IS INITIAL.
    SELECT bukrs belnr dmbtr wrbtr hkont ebeln lifnr
    FROM bseg
    INTO CORRESPONDING FIELDS OF TABLE it_bseg
    FOR ALL ENTRIES IN it_bkpf
    WHERE bukrs = it_bkpf-bukrs
    and belnr = it_bkpf-belnr
    AND gjahr = s_gjahr "13-it_bkpf-gjahr
    AND koart = 'K'.
    ENDIF.
    IF NOT it_bseg[] IS INITIAL.
    SELECT belnr gjahr dmbtr wrbtr hkont ebeln lifnr
    FROM bseg
    INTO CORRESPONDING FIELDS OF TABLE it_bseg1
    FOR ALL ENTRIES IN it_bkpf
    WHERE bukrs = it_bkpf-bukrs "13it_bkpf-bukrs
    AND belnr = it_bkpf-belnr "13it_bkpf-belnr
    AND gjahr = s_gjahr. "13-it_bkpf-gjahr.
    ENDIF.
    LOOP AT it_bkpf.
    MOVE-CORRESPONDING it_bkpf TO itfinal.
    APPEND itfinal.
    ENDLOOP.
    LOOP AT it_bseg.
    MOVE-CORRESPONDING it_bseg TO itfinal.
    append itfinal.
    select single name1 ort01 from lfa1 into (itfinal-name1 , itfinal-ort01) where lifnr = it_bseg-lifnr.
    select single j_1icstno j_1ilstno into (itfinal-j_1icstno , itfinal-j_1ilstno) from j_1imovend
    where lifnr = it_bseg-lifnr.
    ENDLOOP.
    LOOP AT it_bseg1.
    MOVE-CORRESPONDING it_bseg1 TO itfinal.
    APPEND itfinal.
    ENDLOOP.
    loop at it_bseg1.
    itfinal-ebeln1 = it_bseg1-ebeln.
    append itfinal.
    endloop.
    *Deleting the records from ITFINAL w.r.t HKONT.
    LOOP AT itfinal.
    IF itfinal-hkont NE '0020106230' AND
    itfinal-hkont NE '0020106330'.
    DELETE itfinal.
    clear itfinal.
    continue.
    else.
    clear itfinal.
    endif.
    ENDLOOP.
    *Caluculating Bill Value
    loop at itfinal.
    if itfinal-hkont = '0020106230'.
    itfinal-tdsrate = '2%'.
    itfinal-vbill = itfinal-wrbtr * 100 / 2.
    modify itfinal.
    elseif itfinal-hkont = '0020106330'.
    itfinal-tdsrate = '4%'.
    itfinal-vbill = itfinal-wrbtr * 100 / 4.
    modify itfinal.
    endif.
    endloop.
    sort itfinal by belnr.
    delete adjacent duplicates from itfinal comparing belnr.
    format reset.
    format color col_normal.
    LOOP AT itfinal.
    sl_no = sl_no + 1.
    write:/ sy-vline,
    2 sl_no,
    7 sy-vline,
    10 itfinal-ebeln1,
    21 sy-vline,
    23 itfinal-awkey,
    44 sy-vline,
    45 itfinal-bldat,
    57 sy-vline,
    60 itfinal-vbill,
    75 sy-vline,
    76 itfinal-tdsrate,
    85 sy-vline,
    89 itfinal-wrbtr,
    106 sy-vline,
    109 itfinal-belnr,
    121 sy-vline,
    124 itfinal-budat,
    134 sy-vline.
    ENDLOOP.
    write:/ sy-uline.
    top-of-page.
    data : name1(60).
    data : month_text(127),
    string(99).
    call function 'MONTH_NAMES_GET'
    exporting
    language = sy-langu
    IMPORTING
    RETURN_CODE =
    tables
    month_names = month_names[]
    exceptions
    month_names_not_found = 1
    others = 2
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    format reset.
    format color col_positive.
    if not s_budat-low is initial .
    read table month_names with key mnr = s_budat-low+4(2).
    if sy-subrc = 0.
    month = month_names-ltx.
    string = 'Details of TDS (2% / 4%) On Works Contract Deducted'.
    concatenate string 'for the Month of' month into month_text
    separated by space.
    write :/ month_text.
    skip 1.
    endif.
    endif.
    concatenate itfinal-name1 ',' itfinal-ort01
    into name1 separated by space.
    write :/ 'Vendor Code :', itfinal-lifnr.
    write :/ 'Vendor Name and City :', name1.
    skip 1.
    write :/ 'TNGST Registration No :', itfinal-j_1ilstno,
    / 'CST Registration No :', itfinal-j_1icstno.
    skip 1.
    Display the coloumn headings
    format reset.
    format color col_heading.
    write :/ sy-uline.
    write:/ sy-vline,
    2 'Sl_no',
    7 sy-vline,
    10 'P.O. No',
    21 sy-vline,
    22 'Invoice No',
    44 sy-vline,
    45 'Inv Date',
    57 sy-vline,
    60 'Bill value',
    75 sy-vline,
    76 'TDS Rate',
    85 sy-vline,
    89 'TDS Amount' ,
    106 sy-vline,
    108 'Doc.No.',
    121 sy-vline,
    125 'Pos Date',
    134 sy-vline,
    sy-uline.
    Thanks
    seshu

  • Problem when printing the records of database

    Hi all,
    Although I can use the PrinterJob class to print the records of certain table in database directly to printer, it is difficult to deal with the different length of fields between different records so that, say, the first field of some records overlap with the second field when printing.
    I find any layout/table method in java cannot be used in the PrinterJob class, only Graphics can be used. Does anyone know how to print the database in a good way?
    thanks!

    Perhaps java.text.MessageFormat is what you're looking for.
    Note that in v1.4 there's also the new Java Print Service API (javax.print). (I haven't used it yet).
    Greets
    Puce

  • Problem in uploading the records ?

    Hello,
    I want to uplaod the material master records. I was given EXCEL sheet, where my cells are Material Number, Industry sector, Material group, Material description and Unit.
    Please copy paste the code it is sytactically correct but only my first record from the excel sheet is coming to material number field even then it is asking to enter material number.
    This is my code please helpme with my mistake...
    TYPES: BEGIN OF TY_TABDATA,
    MANDT LIKE SY-MANDT, " Client
    MATNR LIKE RMMG1-MATNR,
    MBRSH LIKE RMMG1-MBRSH,
    MTART LIKE RMMG1-MTART, "
    MAKTX LIKE MAKT-MAKTX,
    MEINS LIKE MARA-MEINS,
    END OF TY_TABDATA.
    DATA: IT_TABDATA TYPE STANDARD TABLE OF TY_TABDATA INITIAL SIZE 0,
          WA_TABDATA TYPE TY_TABDATA,
          IT_BDCDATA TYPE STANDARD TABLE OF BDCDATA INITIAL SIZE 0,
          IT_BDCMSGCOLL TYPE STANDARD TABLE OF BDCMSGCOLL INITIAL SIZE 0.
    DATA: G_MESSAGE(70) TYPE C,
          BDCDATA TYPE BDCDATA,
          W_BDCMSG TYPE BDCMSGCOLL.
    *Declaration of the Internal Table with Header Line comprising of the
    *uploaded data.
    DATA: BEGIN OF IT_FILE_UPLOAD OCCURS 0.
    INCLUDE STRUCTURE ALSMEX_TABLINE. " Rows for Table with Excel Data
    DATA: END OF IT_FILE_UPLOAD.
    *S E L E C T I O N - S C R E E N *
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME,
    BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: P_FNAME LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK B2,
    END OF BLOCK B1.
    *E V E N T : AT S E L E C T I O N - S C R E E N *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    PROGRAM_NAME = SYST-REPID
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = ' '
    STATIC = 'X'
    MASK = '.'
    CHANGING
    FILE_NAME = P_FNAME
    EXCEPTIONS
    MASK_TOO_LONG = 1
    OTHERS = 2
    IF SY-SUBRC = 0.
    ENDIF.
    *S T A R T - O F - S E L E C T I O N
    START-OF-SELECTION.
    *Upload Excel file into Internal Table.
    PERFORM UPLOAD_EXCEL_FILE.
    *Organize the uploaded data into another Internal Table.
    PERFORM ORGANIZE_UPLOADED_DATA.
    POPULATE THE RECORDS IN WRITE STATEMENT
    *PERFORM WRITE_RECORDS.
    *E N D - O F - S E L E C T I O N
    END-OF-SELECTION.
    *& Form UPLOAD_EXCEL_FILE
    *FORM UPLOAD_EXCEL_FILE .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    FILENAME = P_FNAME
    I_BEGIN_COL = 1
    I_BEGIN_ROW = 2
    I_END_COL = 5
    I_END_ROW = 32000
    TABLES
    INTERN = IT_FILE_UPLOAD
    EXCEPTIONS
    INCONSISTENT_PARAMETERS = 1
    UPLOAD_OLE = 2
    OTHERS = 3
    IF SY-SUBRC = 0.
    *MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *ENDFORM. " UPLOAD_EXCEL_FILE
    *& Form ORGANIZE_UPLOADED_DATA
    *FORM ORGANIZE_UPLOADED_DATA .
    SORT IT_FILE_UPLOAD BY ROW COL.
    LOOP AT IT_FILE_UPLOAD.
    CASE IT_FILE_UPLOAD-COL.
    WHEN 1.
    WA_TABDATA-MATNR = IT_FILE_UPLOAD-VALUE.
    WHEN 2.
    WA_TABDATA-MBRSH = IT_FILE_UPLOAD-VALUE.
    WHEN 3.
    WA_TABDATA-MTART = IT_FILE_UPLOAD-VALUE.
    WHEN 4.
    WA_TABDATA-MAKTX = IT_FILE_UPLOAD-VALUE.
    WHEN 5.
    WA_TABDATA-MEINS = IT_FILE_UPLOAD-VALUE.
    ENDCASE.
    APPEND WA_TABDATA TO IT_TABDATA.
    CLEAR: WA_TABDATA.
    ENDLOOP.
    *ENDFORM.
    *perform open_group.
    LOOP AT IT_TABDATA INTO WA_TABDATA.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MTART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                   WA_TABDATA-MATNR.                 "'S1'.
    perform bdc_field       using 'RMMG1-MBRSH'
                                   WA_TABDATA-MBRSH.                 "'M'.
    perform bdc_field       using 'RMMG1-MTART'
                                   WA_TABDATA-MTART.          "'VKHM'
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                   WA_TABDATA-MAKTX.      " material
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                   WA_TABDATA-MEINS.                  "'KG'
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  'NORM'.
    *perform bdc_transaction using 'MM01'.
    *ENDLOOP.
    *perform close_group.
    CALL TRANSACTION 'MM01' USING IT_BDCDATA MODE 'A' UPDATE 'S' MESSAGES
    INTO IT_BDCMSGCOLL.
    CLEAR W_BDCMSG.
    READ TABLE IT_BDCMSGCOLL INTO W_BDCMSG INDEX 1.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = SY-MSGID
       LANG            = '-D'(001)
       NO              = SY-MSGNO
       V1              = SY-MSGV1
       V2              = SY-MSGV2
       V3              = SY-MSGV3
       V4              = SY-MSGV4
    IMPORTING
       MSG             = G_MESSAGE
    EXCEPTIONS
       NOT_FOUND       = 1
       OTHERS          = 2
    IF SY-SUBRC = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *WRITE : / W_UPLOAD-NEWBS ,'-----' , G_MESSAGE.
    *REFRESH IT_BDCMSGCOLL.
    ENDIF.
    ENDLOOP.
           Start new screen
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA TO IT_BDCDATA.
      CLEAR BDCDATA.
    ENDFORM.
           Insert field
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL <> NODATA.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA TO IT_BDCDATA.
        CLEAR BDCDATA.
    ENDIF.
    ENDFORM.
    Waiting for your answers.....

    Hi,
    For every records in your Legacy File you should clear the internal table BDCDATA.
    If it has headerline, REFRESH it.
    While executing CALL TRANSACTION or BDC_INSERT, the internal table BDCDATA should contain details of only one record in Legacy File.
    LOOP AT IT_TABDATA INTO WA_TABDATA.
    ************* Add this line
    REFRESH BDCDATA.
    ************* Add this line
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MTART'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RMMG1-MATNR'
    WA_TABDATA-MATNR. "'S1'.
    perform bdc_field using 'RMMG1-MBRSH'
    WA_TABDATA-MBRSH. "'M'.
    perform bdc_field using 'RMMG1-MTART'
    WA_TABDATA-MTART. "'VKHM'
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
    'X'.
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    perform bdc_field using 'MAKT-MAKTX'
    WA_TABDATA-MAKTX. " material
    perform bdc_field using 'BDC_CURSOR'
    'MARA-MEINS'.
    perform bdc_field using 'MARA-MEINS'
    WA_TABDATA-MEINS. "'KG'
    perform bdc_field using 'MARA-MTPOS_MARA'
    'NORM'.
    *perform bdc_transaction using 'MM01'.
    *ENDLOOP.

  • Problem in downloading the records

    Hi All,
    I am facing one weired problem. I have 2594 records in my Z table but when i am taking the dump of the table, it is giving only 2375 records. Can anyone tell me why this is happening?
    Thanks
    Puneet

    Hi,
    Please check with the below Code...
    Hoep this is helpful.
    DATA:
      t_ZTABLE LIKE STANDARD TABLE OF ZTABLE WITH HEADER LINE.
    SELECT * FROM
            ZTABLE
       INTO TABLE t_ztable.
    loop at t_ztable.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
       BIN_FILESIZE                    =
        filename                        = 'D:\exc.xls'
      FILETYPE                        = 'ASC'
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
      SHOW_TRANSFER_STATUS            = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
      tables
        data_tab                        = t_ztable
      FIELDNAMES                      =
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endloop.
    Thanks
    kalyan b

  • Urgent: Problem in Fetching the records from ITAB3

    hi,
    here's d code,and the bold is dere where i am facing the problem i.e. whne i append lines of ITAB2 to ITAB3 it takes 32,234 records but in reality in ITAB2 there are 39 records,ITFINAL contains 45 records which is displaying the coreect data.
    But why ITAB3 conatins 32,234 records in it.
    it might hit th eperformance of the report.
    TABLES: RSEG.
    ***********DECLARATION OF TABLES*************
    ************TABLE BKPF - ACCOUNTING HEADER ***********
    DATA: BEGIN OF ITBKPF OCCURS 0,
    BUKRS LIKE BKPF-BUKRS,
    BELNR LIKE BKPF-BELNR,
    GJAHR LIKE BKPF-GJAHR,
    AWKEY LIKE BKPF-AWKEY,
    BUDAT LIKE BKPF-BUDAT,
    XBLNR LIKE BKPF-XBLNR,
    AWTYP LIKE BKPF-AWTYP,
    END OF ITBKPF.
    *********TABLE BSIK - ACCOUNTING OPEN ITEMS********
    DATA: BEGIN OF ITAB2 OCCURS 0,
    LFBNR LIKE RSEG-LFBNR,
    BUKRS LIKE BSIK-BUKRS,
    GJAHR LIKE BSIK-GJAHR,
    BELNR LIKE BSIK-BELNR,
    AWKEY LIKE BKPF-AWKEY,
    WRBTR LIKE BSIK-WRBTR,
    LIFNR LIKE BSIK-LIFNR,
    AUGBL LIKE BSAK-AUGBL,
    AUGDT LIKE BSAK-AUGDT,
    END OF ITAB2.
    **********TABLE BSAK - ACCOUNTING CLEAR ITEMS*******
    DATA: BEGIN OF ITAB3 OCCURS 0,
    LFBNR LIKE RSEG-LFBNR,
    BUKRS LIKE BSAK-BUKRS,
    GJAHR LIKE BSAK-GJAHR,
    BELNR LIKE BSAK-BELNR,
    AWKEY LIKE BKPF-AWKEY,
    WRBTR LIKE BSIK-WRBTR,
    LIFNR LIKE BSIK-LIFNR,
    AUGBL LIKE BSAK-AUGBL,
    AUGDT LIKE BSAK-AUGDT,
    END OF ITAB3.
    DATA: BEGIN OF ITDEMO OCCURS 0,
    BELNR LIKE RSEG-BELNR,
    GJAHR LIKE RSEG-GJAHR,
    LFBNR LIKE RSEG-LFBNR,
    XBLNR LIKE RSEG-XBLNR,
    END OF ITDEMO.
    *****FINAL TABLE TO GATHER N DISPLAY OUTPUT*****
    DATA: BEGIN OF ITFINAL OCCURS 0,
    LFBNR LIKE RSEG-LFBNR,
    BUKRS LIKE BKPF-BUKRS,
    GJAHR LIKE BKPF-GJAHR,
    BELNR LIKE BKPF-BELNR,
    AWKEY LIKE BKPF-AWKEY,
    WRBTR LIKE BSIK-WRBTR,
    LIFNR LIKE BSIK-LIFNR,
    AUGBL LIKE BSAK-AUGBL,
    AUGDT LIKE BSAK-AUGDT,
    END OF ITFINAL.
    **********END OF DECLARATIONS*************
    SELECT-OPTIONS: P_LFBNR FOR RSEG-LFBNR.
    *************FETCHING OF THE DATA*************
    START-OF-SELECTION.
    BKPF
    SELECT BUKRS BELNR GJAHR AWKEY BUDAT XBLNR AWTYP
    FROM BKPF
    INTO (ITBKPF-BUKRS,ITBKPF-BELNR,ITBKPF-GJAHR,
    ITBKPF-AWKEY,ITBKPF-BUDAT,ITBKPF-XBLNR,ITBKPF-AWTYP)
    WHERE AWTYP EQ 'MKPF' OR AWTYP EQ 'RMRP'.
              o
                    + MKPF*
    ************BEGIN OF TRY CODE FOR A MATERIAL DOCUMENT************
    ITDEMO-BELNR = ITBKPF-AWKEY(10).
    ITDEMO-GJAHR = ITBKPF-AWKEY+10(4).
    ITDEMO-XBLNR = ITBKPF-XBLNR.
    SELECT LFBNR FROM RSEG INTO
    (ITDEMO-LFBNR) WHERE
    BELNR EQ ITBKPF-AWKEY(10) AND
    GJAHR EQ ITBKPF-AWKEY+10(4) AND
    XBLNR EQ ITBKPF-XBLNR AND LFBNR > 0.
    CHECK SY-SUBRC EQ 0 AND ITDEMO-LFBNR IN P_LFBNR.
    ************END OF TRY CODE FOR A MATERIAL DOCUMENT***************
    ITAB2-BUKRS = ITBKPF-BUKRS.
    ITAB2-GJAHR = ITBKPF-GJAHR.
    ITAB2-BELNR = ITBKPF-BELNR.
    ITAB3-BUKRS = ITBKPF-BUKRS.
    ITAB3-GJAHR = ITBKPF-GJAHR.
    ITAB3-BELNR = ITBKPF-BELNR.
              o
                    + BSIK*
    SELECT WRBTR LIFNR FROM BSIK
    INTO (ITAB2-WRBTR, ITAB2-LIFNR)
    WHERE BUKRS EQ ITBKPF-BUKRS
    AND GJAHR EQ ITBKPF-GJAHR
    AND BELNR EQ ITBKPF-BELNR.
    APPEND ITAB2.
    EXIT.
    ENDSELECT.
              o
                    +
    BSAK*
    SELECT WRBTR LIFNR AUGBL AUGDT
    FROM BSAK
    INTO (ITAB3-WRBTR,ITAB3-LIFNR,ITAB3-AUGBL,ITAB3-AUGDT)
    WHERE BUKRS EQ ITBKPF-BUKRS
    AND GJAHR EQ ITBKPF-GJAHR
    AND BELNR EQ ITBKPF-BELNR.
    APPEND ITAB3.
    EXIT.
    ENDSELECT.
    APPEND ITDEMO.
    EXIT.
    ENDSELECT.
    APPEND ITBKPF.
    ENDSELECT.
    Fields Found?
    READ TABLE ITBKPF TRANSPORTING NO FIELDS INDEX 1.
    IF sy-subrc NE 0.
    MESSAGE i000(zmm1) WITH 'No documents found!'.
    ENDIF.
    Prepare Output
    LOOP AT ITBKPF.
    CLEAR ITAB2.
    READ TABLE ITAB2
    WITH KEY BUKRS = ITBKPF-BUKRS
    BELNR = ITBKPF-BELNR
    GJAHR = ITBKPF-GJAHR.
    CHECK sy-subrc EQ 0?
    CLEAR ITAB3.
    READ TABLE ITAB3
    WITH KEY BUKRS = ITBKPF-BUKRS
    BELNR = ITBKPF-BELNR
    GJAHR = ITBKPF-GJAHR. .
    CHECK sy-subrc EQ 0?
    READ TABLE ITDEMO
    WITH KEY BELNR = ITBKPF-AWKEY(10).
    CHECK sy-subrc EQ 0?
    APPEND LINES OF ITAB2 TO ITAB3.
    CHECK sy-subrc EQ 0?
    ITFINAL-LFBNR = ITDEMO-LFBNR.
    ITFINAL-BUKRS = ITBKPF-BUKRS.
    ITFINAL-BELNR = ITBKPF-BELNR.
    ITFINAL-GJAHR = ITBKPF-GJAHR.
    ITFINAL-AWKEY = ITBKPF-AWKEY.
    ITFINAL-WRBTR = ITAB3-WRBTR.
    ITFINAL-LIFNR = ITAB3-LIFNR.
    ITFINAL-AUGBL = ITAB3-AUGBL.
    ITFINAL-AUGDT = ITAB3-AUGDT.
    DELETE ITFINAL WHERE WRBTR = 0.
    APPEND ITFINAL.
    CLEAR ITFINAL.
    ENDLOOP.
    SORT ITFINAL BY AUGBL AUGDT .
    END-OF-SELECTION
    END-OF-SELECTION.
    Output
    LOOP AT ITFINAL.
    WRITE: / ITFINAL-LFBNR,ITFINAL-BELNR, ITFINAL-GJAHR,ITFINAL-AWKEY, ITFINAL-WRBTR, ITFINAL-LIFNR,ITFINAL-AUGBL,ITFINAL-AUGDT.
    ENDLOOP.

    hi,
    actually i have to display the open n clear items with respect to the MATERIAL DOCUMENT.
    try to execute the code which i am displaying below:-
    TABLES: RSEG.
    **********DECLARATION OF TABLES************
    ***********TABLE BKPF  - ACCOUNTING HEADER **********
    DATA: BEGIN OF ITBKPF OCCURS 0,
          BUKRS LIKE BKPF-BUKRS,
          BELNR LIKE BKPF-BELNR,
          GJAHR LIKE BKPF-GJAHR,
          AWKEY LIKE BKPF-AWKEY,
          BUDAT LIKE BKPF-BUDAT,
          XBLNR LIKE BKPF-XBLNR,
          AWTYP LIKE BKPF-AWTYP,
          END OF ITBKPF.
    ********TABLE BSIK - ACCOUNTING OPEN ITEMS*******
    DATA: BEGIN OF ITAB2 OCCURS 0,
          LFBNR LIKE RSEG-LFBNR,
          BUKRS LIKE BSIK-BUKRS,
          GJAHR LIKE BSIK-GJAHR,
          BELNR LIKE BSIK-BELNR,
          AWKEY LIKE BKPF-AWKEY,
          WRBTR LIKE BSIK-WRBTR,
          LIFNR LIKE BSIK-LIFNR,
          AUGBL LIKE BSAK-AUGBL,
          AUGDT LIKE BSAK-AUGDT,
          END OF ITAB2.
    *********TABLE  BSAK - ACCOUNTING CLEAR ITEMS******
    DATA: BEGIN OF ITAB3 OCCURS 0,
          LFBNR LIKE RSEG-LFBNR,
          BUKRS LIKE BSAK-BUKRS,
          GJAHR LIKE BSAK-GJAHR,
          BELNR LIKE BSAK-BELNR,
          AWKEY LIKE BKPF-AWKEY,
          WRBTR LIKE BSIK-WRBTR,
          LIFNR LIKE BSIK-LIFNR,
          AUGBL LIKE BSAK-AUGBL,
          AUGDT LIKE BSAK-AUGDT,
          END OF ITAB3.
    *********TABLE BSIS - MIRO NOT PERFORMED*******
    DATA: BEGIN OF ITAB4 OCCURS 0,
          LFBNR LIKE RSEG-LFBNR,
          BUKRS LIKE BSIS-BUKRS,
          GJAHR LIKE BSIS-GJAHR,
          BELNR LIKE BSIS-BELNR,
          AWKEY LIKE BKPF-AWKEY,
          WRBTR LIKE BSIK-WRBTR,
          LIFNR LIKE BSIK-LIFNR,
          AUGBL LIKE BSAK-AUGBL,
          AUGDT LIKE BSAK-AUGDT,
          END OF ITAB4.
    **********TABLE RSEG - FOR MATERIAL DOCUMENT********
    DATA: BEGIN OF ITDEMO OCCURS 0,
          BELNR LIKE RSEG-BELNR,
          GJAHR LIKE RSEG-GJAHR,
          LFBNR LIKE RSEG-LFBNR,
          XBLNR LIKE RSEG-XBLNR,
          END OF ITDEMO.
    ****FINAL TABLE TO GATHER N DISPLAY OUTPUT****
    DATA: BEGIN OF ITFINAL OCCURS 0,
          LFBNR LIKE RSEG-LFBNR,
          BUKRS LIKE BKPF-BUKRS,
          GJAHR LIKE BKPF-GJAHR,
          BELNR LIKE BKPF-BELNR,
          AWKEY LIKE BKPF-AWKEY,
          WRBTR LIKE BSIK-WRBTR,
          LIFNR LIKE BSIK-LIFNR,
          AUGBL LIKE BSAK-AUGBL,
          AUGDT LIKE BSAK-AUGDT,
          END OF ITFINAL.
    *********END OF DECLARATIONS************
    SELECT-OPTIONS: P_LFBNR FOR RSEG-LFBNR.
    ************FETCHING OF THE DATA************
    START-OF-SELECTION.
    BKPF
        SELECT BUKRS BELNR GJAHR AWKEY BUDAT XBLNR AWTYP
        FROM BKPF
        INTO (ITBKPF-BUKRS,ITBKPF-BELNR,ITBKPF-GJAHR,
             ITBKPF-AWKEY,ITBKPF-BUDAT,ITBKPF-XBLNR,ITBKPF-AWTYP)
        WHERE AWTYP EQ 'MKPF' OR AWTYP EQ 'RMRP'.
    MKPF
    ***********BEGIN OF TRY CODE FOR A MATERIAL DOCUMENT***********
        ITDEMO-BELNR = ITBKPF-AWKEY(10).
        ITDEMO-GJAHR = ITBKPF-AWKEY+10(4).
        ITDEMO-XBLNR = ITBKPF-XBLNR.
        SELECT LFBNR FROM RSEG INTO
        (ITDEMO-LFBNR) WHERE
        BELNR EQ ITBKPF-AWKEY(10) AND
        GJAHR EQ ITBKPF-AWKEY+10(4) AND
        XBLNR EQ ITBKPF-XBLNR AND LFBNR  > 0.
    CHECK SY-SUBRC EQ 0 AND ITDEMO-LFBNR IN P_LFBNR.
    ***********END OF TRY CODE FOR A MATERIAL DOCUMENT**************
        ITAB2-BUKRS = ITBKPF-BUKRS.
        ITAB2-GJAHR = ITBKPF-GJAHR.
        ITAB2-BELNR = ITBKPF-BELNR.
        ITAB3-BUKRS = ITBKPF-BUKRS.
        ITAB3-GJAHR = ITBKPF-GJAHR.
        ITAB3-BELNR = ITBKPF-BELNR.
    BSIK
        SELECT WRBTR LIFNR FROM BSIK
        INTO (ITAB2-WRBTR, ITAB2-LIFNR)
        WHERE BUKRS EQ ITBKPF-BUKRS
          AND GJAHR EQ ITBKPF-GJAHR
          AND BELNR EQ ITBKPF-BELNR.
        APPEND ITAB2.
        EXIT.
        ENDSELECT.
    BSAK
        SELECT WRBTR LIFNR AUGBL AUGDT
        FROM BSAK
        INTO (ITAB3-WRBTR,ITAB3-LIFNR,ITAB3-AUGBL,ITAB3-AUGDT)
        WHERE BUKRS EQ ITBKPF-BUKRS
          AND GJAHR EQ ITBKPF-GJAHR
          AND BELNR EQ ITBKPF-BELNR.
        APPEND ITAB3.
        EXIT.
        ENDSELECT.
    BSIS
       SELECT WRBTR XREF3 FROM BSIS
       INTO (ITAB1-WRBTR, ITAB1-XREF3)
       WHERE BUKRS EQ ITBKPF-BUKRS
         AND GJAHR EQ ITBKPF-GJAHR
         AND BELNR EQ ITBKPF-BELNR.
       APPEND ITAB1.
       EXIT.
       ENDSELECT.
      CHECK sy-subrc EQ 0?
        APPEND ITDEMO.
        EXIT.
        ENDSELECT.
        APPEND ITBKPF.
        ENDSELECT.
    Fields Found?
      READ TABLE ITBKPF TRANSPORTING NO FIELDS INDEX 1.
      IF sy-subrc NE 0.
        MESSAGE i000(zmm1) WITH 'No documents found!'.
      ENDIF.
    Prepare Output
      LOOP AT ITBKPF.
        CLEAR ITAB2.
        READ TABLE ITAB2
        WITH KEY   BUKRS = ITBKPF-BUKRS
                   BELNR = ITBKPF-BELNR
                   GJAHR = ITBKPF-GJAHR." BINARY SEARCH..
      CHECK sy-subrc EQ 0?
        CLEAR ITAB3.
        READ TABLE ITAB3
        WITH KEY   BUKRS = ITBKPF-BUKRS
                   BELNR = ITBKPF-BELNR
                   GJAHR = ITBKPF-GJAHR." BINARY SEARCH.              .
      CHECK sy-subrc EQ 0?
        READ TABLE ITDEMO
        WITH KEY BELNR = ITBKPF-AWKEY(10).
      CHECK sy-subrc EQ 0?
        APPEND LINES OF ITAB2 TO ITAB3.
      CHECK sy-subrc EQ 0?
        ITFINAL-LFBNR = ITDEMO-LFBNR.
        ITFINAL-BUKRS = ITBKPF-BUKRS.
        ITFINAL-BELNR = ITBKPF-BELNR.
        ITFINAL-GJAHR = ITBKPF-GJAHR.
        ITFINAL-AWKEY = ITBKPF-AWKEY.
        ITFINAL-WRBTR = ITAB3-WRBTR.
        ITFINAL-LIFNR = ITAB3-LIFNR.
        ITFINAL-AUGBL = ITAB3-AUGBL.
        ITFINAL-AUGDT = ITAB3-AUGDT.
        DELETE ITFINAL WHERE WRBTR = 0.
        APPEND ITFINAL.
        CLEAR  ITFINAL.
        ENDLOOP.
        SORT ITFINAL BY  AUGBL AUGDT .
    END-OF-SELECTION
    END-OF-SELECTION.
    Output
    WRITE: /'                     OPEN ITEMS ->  PAYMENTS ARE NOT DONE'.
      ULINE.
      WRITE: / 'MAT.DOC.   A/C DOC.   YEAR    REF.KEY                  AMOUNT    VENDOR     CLR.DOC.    CLR.DATE' .
      ULINE.
      LOOP AT ITFINAL.
        WRITE: / ITFINAL-LFBNR,ITFINAL-BELNR, ITFINAL-GJAHR,ITFINAL-AWKEY, ITFINAL-WRBTR, ITFINAL-LIFNR,ITFINAL-AUGBL,ITFINAL-AUGDT.
      ENDLOOP.

  • Problem while updating the records. IN clause no. of items

    We have an issue in updating a table when the inside IN more than 1000 numbers are passed ,
    it throws error message - ORA-01795 : maximum nunbers of experssions in a list is 1000. Is there any workarround (wihtout using ARRAYs).
    experssions list is passed from java.
    update <table> c
    set c.data='test'
    where c.id in (123,345,.... 25,0000 records);We tried this way , it throws error.
    DECLARE
    txt  varchar2(32000):= <Text size 30000>
    BEGIN
    update <table> c
        set c.data='test'
      where c.id in (select To_number(REGEXP_SUBSTR (txt, '[^,]+', 1, level))  from dual
                         connect by level <= regexp_count(txt,',')+1
    );thanks in advance..

    Hi,
    you can use WITH refactoring clause and UNION like shown below:
    with gen1 as (select level x from dual connect by level <= 1000),
    gen2 as (select level+1000 x from dual connect by level <= 1000),
    gen3 as
    (select * from gen1
      union
    select * from gen2)
    select * from dual where 1 not in (select x from gen3);Best regards,
    Nikolay

  • Getting error Unable to perform transaction on the record.

    Hi,
    My requirement is to implement the custom attachment, and to store the data into custom lob table.
    my custom table structure is similer to that of standard fnd_lobs table and have inserted the data through EO based VO.
    Structure of custom table
    CREATE TABLE XXAPL.XXAPL_LOBS
    ATTACHMENT_ID NUMBER NOT NULL,
    FILE_NAME VARCHAR2(256 BYTE),
    FILE_CONTENT_TYPE VARCHAR2(256 BYTE) NOT NULL,
    FILE_DATA BLOB,
    UPLOAD_DATE DATE,
    EXPIRATION_DATE DATE,
    PROGRAM_NAME VARCHAR2(32 BYTE),
    PROGRAM_TAG VARCHAR2(32 BYTE),
    LANGUAGE VARCHAR2(4 BYTE) DEFAULT ( userenv ( 'LANG') ),
    ORACLE_CHARSET VARCHAR2(30 BYTE) DEFAULT ( substr ( userenv ( 'LANGUAGE') , instr ( userenv ( 'LANGUAGE') , '.') +1 ) ),
    FILE_FORMAT VARCHAR2(10 BYTE) NOT NULL
    i have created a simple messegefileupload and submit button on my custom page and written below code on CO:
    Process Request Code:
    if(!pageContext.isBackNavigationFired(false))
    TransactionUnitHelper.startTransactionUnit(pageContext, "AttachmentCreateTxn");
    if(!pageContext.isFormSubmission()){
    System.out.println("In ProcessRequest of AplAttachmentCO");
    am.invokeMethod("initAplAttachment");
    else
    if(!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "AttachmentCreateTxn", true))
    OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
    pageContext.redirectToDialogPage(dialogPage);
    ProcessFormRequest Code:
    if (pageContext.getParameter("Upload") != null)
    DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject("FileItem");
    String strFileName = null;
    strFileName = pageContext.getParameter("FileItem");
    if(strFileName == null || "".equals(strFileName))
    throw new OAException("Please select a File for upload");
    fileName = strFileName;
    contentType = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
    BlobDomain uploadedByteStream = (BlobDomain)fileUploadData.selectValue(null, fileName);
    String strItemDescr = pageContext.getParameter("ItemDesc");
    OAFormValueBean bean = (OAFormValueBean)webBean.findIndexedChildRecursive("AttachmentId");
    String strAttachId = (String)bean.getValue(pageContext);
    System.out.println("Attachment Id:" +strAttachId);
    int aInt = Integer.parseInt(strAttachId);
    Number numAttachId = new Number(aInt);
    Serializable[] methodParams = {fileName, contentType , uploadedByteStream , strItemDescr , numAttachId};
    Class[] methodParamTypes = {fileName.getClass(), contentType.getClass() , uploadedByteStream.getClass() , strItemDescr.getClass() , numAttachId.getClass()};
    am.invokeMethod("setUploadFileRowData", methodParams, methodParamTypes);
    am.invokeMethod("apply");
    System.out.println("Records committed in lobs table");
    if (pageContext.getParameter("AddAnother") != null)
    pageContext.forwardImmediatelyToCurrentPage(null,
    true, // retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES);
    if (pageContext.getParameter("cancel") != null)
    am.invokeMethod("rollbackShipment");
    TransactionUnitHelper.endTransactionUnit(pageContext, "AttachmentCreateTxn");
    Code in AM:
    public void apply(){
    getTransaction().commit();
    public void initAplAttachment() {
    OAViewObject lobsvo = (OAViewObject)getAplLobsAttachVO1();
    if (!lobsvo.isPreparedForExecution())
    lobsvo.executeQuery();
    Row row = lobsvo.createRow();
    lobsvo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    public void setUploadFileRowData(String fName, String fContentType, BlobDomain fileData , String fItemDescr , Number fAttachId)
    AplLobsAttachVOImpl VOImpl = (AplLobsAttachVOImpl)getAplLobsAttachVO1();
    System.out.println("In setUploadFileRowData method");
    System.out.println("In setUploadFileRowData method fAttachId: "+fAttachId);
    System.out.println("In setUploadFileRowData method fName: "+fName);
    System.out.println("In setUploadFileRowData method fContentType: "+fContentType);
    RowSetIterator rowIter = VOImpl.createRowSetIterator("rowIter");
    while (rowIter.hasNext())
    AplLobsAttachVORowImpl viewRow = (AplLobsAttachVORowImpl)rowIter.next();
    viewRow.setFileContentType(fContentType);
    viewRow.setFileData(fileData);
    viewRow.setFileFormat("IGNORE");
    viewRow.setFileName(fName);
    rowIter.closeRowSetIterator();
    System.out.println("setting on fndlobs done");
    The attchemnt id is the sequence generated number, and its defaulting logic is written in EO
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    OADBTransaction transaction = getOADBTransaction();
    Number attachmentId = transaction.getSequenceValue("xxapl_po_ship_attch_s");
    setAttachmentId(attachmentId);
    public void setAttachmentId(Number value) {
    System.out.println("In ShipmentsEOImpl value::"+value);
    if (getAttachmentId() != null)
    System.out.println("In AplLobsAttachEOImpl AttachmentId::"+(Number)getAttachmentId());
    throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
    getEntityDef().getFullName(), // EO name
    getPrimaryKey(), // EO PK
    "AttachmentId", // Attribute Name
    value, // Attribute value
    "AK", // Message product short name
    "FWK_TBX_T_EMP_ID_NO_UPDATE"); // Message name
    if (value != null)
    // Attachment ID must be unique. To verify this, you must check both the
    // entity cache and the database. In this case, it's appropriate
    // to use findByPrimaryKey() because you're unlikely to get a match, and
    // and are therefore unlikely to pull a bunch of large objects into memory.
    // Note that findByPrimaryKey() is guaranteed to check all AplLobsAttachment.
    // First it checks the entity cache, then it checks the database.
    OADBTransaction transaction = getOADBTransaction();
    Object[] attachmentKey = {value};
    EntityDefImpl attachDefinition = AplLobsAttachEOImpl.getDefinitionObject();
    AplLobsAttachEOImpl attachment =
    (AplLobsAttachEOImpl)attachDefinition.findByPrimaryKey(transaction, new Key(attachmentKey));
    if (attachment != null)
    throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
    getEntityDef().getFullName(), // EO name
    getPrimaryKey(), // EO PK
    "AttachmentId", // Attribute Name
    value, // Attribute value
    "AK", // Message product short name
    "FWK_TBX_T_EMP_ID_UNIQUE"); // Message name
    setAttributeInternal(ATTACHMENTID, value);
    Issue faced:
    When i run the page for the first time data gets inserted into custom table perfectly on clicking upload button,
    but when clicked on add another button on the same page (which basically redirects to the same upload page and increments the attachment id by 1)
    i am getting the below error:
    Error
    Unable to perform transaction on the record.
    Cause: The record contains stale data. The record has been modified by another user.
    Action: Cancel the transaction and re-query the record to get the new data.
    Have spent entire day to resolve this issue but no luck.
    Any help on this will be appreciated, let me know if i am going wrong anywhere.
    Thanks nd Regards
    Avinash

    Hi,
    After, inserting the values please re-execute the VO query.
    Also, try to redirect the page with no AM retension
    Thanks,
    Gaurav

Maybe you are looking for

  • Sum a UNION query

    URGENT PLS!! hi, pls im trying to query my database but i dont know how to write the query. here is what i was told to do. there are 3 tables, 1. HCP table that hold all the name of hospitals (primary key is HCP_ID) 2. EMPLOYEE table, which hold the

  • AIR SDK 3.7.0.1410: non-debuggable SWFs can't be packaged to IPA in AOT mode

    If I compile mobile-targeted SWF without debug information (-debug=false) then trying to package to IPA in AOT mode (e.g. ipa-test, ipa-ad-hoc or ipa-app-store) gives the error: error 304: Initial window content is invalid This seems to be a critical

  • I can not get the oil paint filter to work in photoshop CC

    Can anyone help me with getting the oil paint filter to work in photoshop CC. I have a high end gaming card for video but it still does not seem to be available. Help. please!

  • Export & View Original Media

    If I duplicate the browser (permission) set how do you add the ability to export for users in that group? I'm looking at the Trait Permissions and nothing obvious jumps out. In short - Where do we control the ability to permit/deny Export? Also is it

  • Purchasing Organization

    hye Can you tel me what is the difference between Centralized Purch org, reference Purch org and Standard Puch org. how do we assign to company code and plants what are the advantages of using the same