BUG: ADF BC read-only VO with no Key attrs + af:table

Hello all,
I've got a bug to report - quite easily reproducable with the HR demo schema. To see it:
1). Create a new application from the ADF BC + Faces template
2). Create a read-only VO, use "SELECT employee_id, first_name from employees" and order by "employee_id" - take the defaults for everything - do not set any key attributes.
3). Create an AM, add the VO to it's data model. Turn off AM pooling in the configuration.
4). Create a JSPX page. Drag-drop the VO from the data control palette as an ADF read-only table - with selection
5). Bind the actionlistener of the "submit" button to a backing bean method that just system.out.println's something.
Now, run the app. Try selecting an employee from the first page (records 1-10) and clicking submit - it works. Now, scroll to the second set of records, select one and click submit - no message appears - the action listener is never called. No errors are thrown.
Workaround: ensure the VO has employee_id selected as a key attribute.
My code is at the bottom for reference.
Cheers,
John
untitled1.jspx:
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:af="http://xmlns.oracle.com/adf/faces"
          xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
  <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
  <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  <f:view>
    <afh:html>
      <afh:head title="untitled1">
        <meta http-equiv="Content-Type"
              content="text/html; charset=windows-1252"/>
      </afh:head>
      <afh:body>
        <af:messages/>
        <h:form>
          <af:table value="#{bindings.emp1.collectionModel}" var="row"
                    rows="#{bindings.emp1.rangeSize}"
                    first="#{bindings.emp1.rangeStart}"
                    emptyText="#{bindings.emp1.viewable ? 'No rows yet.' : 'Access Denied.'}"
                    selectionState="#{bindings.emp1.collectionModel.selectedRow}"
                    selectionListener="#{bindings.emp1.collectionModel.makeCurrent}">
            <af:column sortProperty="EmployeeId" sortable="false"
                       headerText="#{bindings.emp1.labels.EmployeeId}">
              <af:outputText value="#{row.EmployeeId}">
                <f:convertNumber groupingUsed="false"
                                 pattern="#{bindings.emp1.formats.EmployeeId}"/>
              </af:outputText>
            </af:column>
            <af:column sortProperty="FirstName" sortable="false"
                       headerText="#{bindings.emp1.labels.FirstName}">
              <af:outputText value="#{row.FirstName}"/>
            </af:column>
            <f:facet name="selection">
              <af:tableSelectOne text="Select and">
                <af:commandButton text="Submit" actionListener="#{abc.click}"/>
              </af:tableSelectOne>
            </f:facet>
          </af:table>
        </h:form>
      </afh:body>
    </afh:html>
  </f:view>
</jsp:root>abc.java:
import javax.faces.event.ActionEvent;
public class abc
  public abc()
  public void click(ActionEvent actionEvent)
    System.out.println("click");
}emp.xml (View Object):
<?xml version='1.0' encoding='windows-1252' ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<ViewObject
   Name="emp"
   OrderBy="employee_id"
   BindingStyle="OracleName"
   CustomQuery="true"
   ComponentClass="model.empImpl"
   UseGlueCode="false" >
   <SQLQuery><![CDATA[
select employee_id, first_name
from employees
   ]]></SQLQuery>
   <DesignTime>
      <Attr Name="_isExpertMode" Value="true" />
      <Attr Name="_version" Value="10.1.3.39.84" />
      <Attr Name="_codeGenFlag2" Value="Access|Coll|VarAccess" />
   </DesignTime>
   <ViewAttribute
      Name="EmployeeId"
      IsUpdateable="false"
      IsPersistent="false"
      IsNotNull="true"
      Precision="6"
      Scale="0"
      Type="oracle.jbo.domain.Number"
      ColumnType="NUMBER"
      AliasName="EMPLOYEE_ID"
      Expression="EMPLOYEE_ID"
      SQLType="NUMERIC" >
      <DesignTime>
         <Attr Name="_DisplaySize" Value="22" />
      </DesignTime>
   </ViewAttribute>
   <ViewAttribute
      Name="FirstName"
      IsUpdateable="false"
      IsPersistent="false"
      Precision="20"
      Type="java.lang.String"
      ColumnType="VARCHAR2"
      AliasName="FIRST_NAME"
      Expression="FIRST_NAME"
      SQLType="VARCHAR" >
      <DesignTime>
         <Attr Name="_DisplaySize" Value="20" />
      </DesignTime>
   </ViewAttribute>
</ViewObject>appModule.xml:
<?xml version='1.0' encoding='windows-1252' ?>
<!DOCTYPE AppModule SYSTEM "jbo_03_01.dtd">
<AppModule
   Name="AppModule"
   ComponentClass="model.AppModuleImpl" >
   <DesignTime>
      <Attr Name="_isCodegen" Value="true" />
      <Attr Name="_version" Value="10.1.3.39.84" />
      <Attr Name="_deployType" Value="0" />
   </DesignTime>
   <ViewUsage
      Name="emp1"
      ViewObjectName="model.emp" >
   </ViewUsage>
</AppModule>bc4j.xcfg:
<?xml version = '1.0' encoding = 'UTF-8'?>
<BC4JConfig>
   <AppModuleConfigBag>
      <AppModuleConfig name="AppModuleLocal">
         <DeployPlatform>LOCAL</DeployPlatform>
         <JDBCName>local_hr</JDBCName>
         <jbo.ampool.doampooling>false</jbo.ampool.doampooling>
         <jbo.project>Model</jbo.project>
         <jbo.ampool.dynamicjdbccredentials>false</jbo.ampool.dynamicjdbccredentials>
         <AppModuleJndiName>model.AppModule</AppModuleJndiName>
         <ApplicationName>model.AppModule</ApplicationName>
      </AppModuleConfig>
   </AppModuleConfigBag>
   <ConnectionDefinition name="local_hr">
      <ENTRY name="JDBC_PORT" value="1521"/>
      <ENTRY name="ConnectionType" value="JDBC"/>
      <ENTRY name="HOSTNAME" value="localhost"/>
      <ENTRY name="DeployPassword" value="true"/>
      <ENTRY name="user" value="hr"/>
      <ENTRY name="ConnectionName" value="local_hr"/>
      <ENTRY name="SID" value="STGY"/>
      <ENTRY name="password">
         <![CDATA[{904}05DB46A9C39F51D1A4814423FFD9297C71]]>
      </ENTRY>
      <ENTRY name="JdbcDriver" value="oracle.jdbc.OracleDriver"/>
      <ENTRY name="ORACLE_JDBC_TYPE" value="thin"/>
      <ENTRY name="DeployPassword" value="true"/>
   </ConnectionDefinition>
</BC4JConfig>

Hi,
reproduces for me. It appears that the parameter is not applied properly when executing the query.
Frank

Similar Messages

  • Error when opening XLSX file with Excel 2003 SP3, file does open but in read only mode with temporary name

    I am using Excel 2003 SP3 and have the Office 2007 compatibility pack installed.  When I open Office 2007 formatted Excel files (XSLX) directly in Windows Explorer, I receive the following error if I do not have Excel already opened:
    "Windows cannot find '<path to file>'.  Make sure you typed the name correctly, and then try again.  To search for a file, click the Start button, and then click Search."
    Even though I receive the error, the file does open; however, it opens in Read Only mode with a name such as "Xl0000024.xls".  The number seems to increment up each time it happens.
    Now here is the strange part.  If I have Excel already open and try to open the file in Windows Explorer, the file opens fine in Modify mode with no error and with the correct file name.
    I Googled the error I was getting and found KB211494.  It says I should uncheck the box in Options on the General tab that says "Ignore other applications", but this box is already unchecked in my case.  Any other ideas?  This is
    really frustrating as a small percentage of our company has upgraded to Office 2007 with the rest still on Office 2003.

    This may be a file association problem.  To solve that:
    In Windows 7:
    1. Right-click the file,
    2. Select "Open With" 
    select [Your Program Here]
    3. Check always use this program. 
    In Windows XP:
    1. Locate the file as you have described above
    2. Right click the file
    3. Select Open with from the pop-up menu
    4. Click Choose default program…
    5. Select Excel in the Recommended Programs box
    6. Check Always use the selected program to open this kind of file
    7. Click on OK.
    1.  Make Excel not available from Office 2007 listed under Programs and Features in Control Panel.
    2. Take a registry backup using the steps given here
    3. In the registry editor window expand HKEY_CLASSES_ROOT and navigate to .xls right and delete it.
    4. Exit Registry Editor
    5. Undo Step 1 to make Excel available.
    6.  Restart the computer and verify it the issue is fixed.
    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers, Shane Devenshire

  • SP2013 and Project 2013 - project files open in read-only mode with no options to edit only Save As

    Hi all,
    Environment:
    SharePoint 2013 (15.0.4420.1017)  RTM
    Windows 8 - Project 2013 (15.0.4433.1506) 32Bit
    Issue details:
    When opening .mpp files stored within SharePoint they are opened successfully within Project 2013 however they are opened in Read-Only mode with no options to edit/check out only Save As.  The
    same outcome is experienced if you click the document link within SharePoint or you chose to edit from the document menu. 
    Opening the file through windows explorer also opens only in read-only mode.
    To date we’ve tested the following
    Windows 7 – Office 2010 = working as expected
    Windows 8 – Office 2010 = working as expected
    Windows 7 – Office 2013 = opening as read only, no prompt to edit
    Windows 8 – Office 2013 – opening as read only, no prompt to edit
    Current thinking is that it is an issue with either the SharePoint Office Documents Class ActiveX control or Project 2013 itself interacting with SharePoint 2013.
    We have tested this in multiple SP2013 environments with the same outcomes.
    The workaround therefore is to save locally and then upload again which is not ideal.
    Unable to find an exact issue match to this.
    Any help with this appreciated.

    Hi Dan,
    For us after investigating this further it was found that using the document menu to edit or checkout and then edit results in the project file being opened in read-only mode. 
    The same issue was present for Visio files.
    Using the FILES ribbon menu results in the document being opened in edit mode successfully in both Project and Visio.
    Please note that we found that this issue only exists within document libraries where checkout is required to edit which was our case.  If checkout is not required the document
    menu can also be used as expected.
    Cheers,
    Dan

  • Read-only radiogroup with default doesn't save state in 2.0

    Hi,
    I upgraded to HTMLDB 2.0 and noticed a change in behavior. Namely, when I have a read-only radio group with a default value and a not-null validation, the validation claims fails although a radio button is selected from the disabled radio group.
    Here's a small app I generated to demonstrate the issue:
    http://htmldb.oracle.com/pls/otn/f?p=34464
    Go there and try to create a new EMP.
    The only things added after the generation are:
    1. Not-null validations on several of the fields
    2. Changed MGR to a "Select List"
    3. Changed DEPTNO to a radio group with these properties:
    a) default value type: static; default value: 20
    b) read-only when: P2_EMPNO is Null
    This used to work fine in 1.6 - namely, the default value got it to the session state and consequently the validation succeeded and the new record was created with the default value.
    It also works fine if the Radio Group is not read-only.
    I was able to fix the problem by adding a calculation to the P2_DEPTNO item to set the default value there. This of course does not show the default on the form for the new record, so I had to keep the default on the item level as well - which is a potential source of bugs when those two defaults somehow get different values (e.g., when I change only one of them and forget about the other) - the user will see one thing displayed while another will be saved. So any solutions involving keeping the default value on only one place AND visible to the end user when creating new records are welcome.
    I haven't had time yet to test with other item types - maybe next week...
    Have a nice weekend!
    Flado

    Scott,
    Yes, in 1.6 this used to work fine - the radiogroup was displayed as disabled, and the default value was selected, and the not-null validation succeeded, and all I did was set the default value of the radiogroup. I have no 1.6 environment anymore to test it, but I'm sure it was working, because after I upgraded to 2.0, it stopped working and I got a bug report from a user very, very quickly :-(.
    By "adding a calculation to the P2_DEPTNO item" I mean "adding a computation of the P2_DEPTNO item to the page". Sorry about me being lazy here. It was (still is, in my production application) a conditional after-submit computation (if <primary key item> is null, set <radiogroup item> to <default value>)
    Thank you for the suggestion. I implemented it in the demo app. What I did was:
    1. remove the default value from P2_DEPTNO
    2. Add an unconditional after-header computation that assigns P2_DEPTNO with the static value 20
    I am able to create new EMPs now, but nothing is selected in the disabled radiogroup on the create page, although the value 20 is saved in the session state before the items are rendered, according to the debug info (you can try it out and see).
    To recap, I still need to keep the default value in two places: default of the radiogroup (to get it displayed on the create form), and in a computation (to set the session state).
    Cheers,
    Flado

  • Read-only problem with sun one

    hello
    i have mounted yestarday a file in which i have created an ejb call Client. Today i have unmounted the file with the ejb Client and i have mounted an other file in which i have created an ejb called Client. Now i can't no more manipulate the first ejb and the second ejb (adding method for example). The error message is: the ejb is read-only !
    I don't know if this is a bug or a protection but how i can desctivate that please ?

    ok i find it. There was hidden mounted jar in the
    option of filesystem ... why, i don't know exaclty at
    this moment but now it's ok. If somebody knows
    something about that.
    thank'a lotWere you working with an application client module, specifically executing them? This can cause files to be mounted.

  • Can no longer select text in email template or read only field with mouse using IE or Firefox?

    Hi Guys,
    I can no longer select text in email template or read only field using my mouse in IE or Firefox anymore. We are using CRM 2011 rollup 18 applied with IE 11 and the latest version of Firefox. We only applied roll up 18 in Feb when this issue began.
    Thanks
    Dave
    David Kelly

    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    (You also can clear Firefox's cache completely using:
    orange Firefox button ''or'' Tools menu > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now")
    (2) Remove the site's cookies (save any pending work first) using either of these. While viewing a page on the site:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    Then try reloading the page. Does that help?
    These features rely on JavaScript, and it sounds as though you have scripting enabled if you get (the wrong) color changes. Some add-ons might alter the way scripts operate, so a standard diagnostic to bypass interference by extensions (and some custom settings) is to try Firefox's Safe Mode.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [[Backing up your information]]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, restart Firefox in Firefox's Safe Mode ([[Safe Mode]]) using
    Help > Restart with Add-ons Disabled
    In the dialog, click "Start in Safe Mode."
    If those features work correctly, this points to one of your extensions or custom settings as the problem.
    To also disable plugins, you can use this page:
    orange Firefox button ''or'' classic Tools menu > Add-ons > Plugins category
    Any change?

  • Read Only TextAreas with Carriage Return, Line Breaks and Word Wrapping

    Hi all,
    I know there are a few posts around this subject but I cannot find the answer to the exact problem I have.
    I have a page that has a 'TextArea with Character Counter' (4000 Chars) that is conditionally read only based on the users credentials (using the 'Read Only' attributes of the TextArea item).
    When the field is editable (not Read Only) everything works fine but when I make the field Read Only I start to have problems:
    The first problem is that the Carriage Return and Line Breaks are ignored and the text becomes one continuos block. I have managed to fix this by adding pre and post element text of pre and /pre tags. This has made the Carriage Return and Line Breaks word nicely and dispaly correctly.
    However, it has introduced a second problem. Long lines, with no Carriage Returns or Line Breaks, now extend to the far right of the page with no word wrapping, making my page potentially 4000+ characters wide.
    How can I get the field to be display only, with recognised Carriage Returns and Line Breaks, and Word Wrapping inside a fixed width of, say, 150 characters?
    Many thanks,
    Martin

    Hi,
    Just a cut and paste of yours with the field name changed:
    htp.p('<script>');
    htp.p('$x("P3_COMMENTS").readonly=true;');
    htp.p('</script>');I also have the following in the page HTML Header, could they be conflicting?
    <script type="text/javascript" language="JavaScript">
    function setReleaseToProd(wpTypeCode){
       //setReleaseToProd($v(this))
      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=set_release_to_prod',0);
      get.addParam('x01',wpTypeCode);
      gReturn = get.get();
      if(gReturn) {
         $s('P3_RELEASE_TO_PROD',gReturn);
      get = null;
    </script>I am a long way from knowing much about Javascript (this page code was written by someone else) so all help is much appreciated.
    Martin

  • XML FORM  -  How to save read-only controls with a default value

    Hello everybody,
    I have a 3 xml forms, each one to create one type of news. I need to use 3 because each of this forms has their own controls. But the control which indicates the type of news (asociated with a KM Predefined Property) must be common in the 3 forms, in order to use it on searches.
    The question is, how can I include in this forms a control:
      - Visible for the user
      - With a default value defined in the control properties (each form has a different value, corresponding with the type of news)
      - Read-only mode
      - The value showed in the control must be saved in the associated KM Predefined Property when the user clicks the Save button. 
    Anyone knows how to do this?
    What control can I use?
    I was thinking of trying with text boxes, but I don't find the way to make them unwritable (Read only mode).
    It is posible using labels?
    Thanks.
    Kind regards

    Hello Jose,
    I know you responded with a question... I see it in the email, but I don't see it here!  Very odd... but in response:
    The first thing I do when I open the Edit.xsl file is do a 'find' for the name of the text field that I want to be read-only (in my test case, it's 'location').  Repeat the find until you see something like:
    [code]<!--
    field location
    -->[/code]
    Below there is where I put the new code.  Mine looks like this:
    [code]- <xsl:choose>
    - <xsl:when test="location='' and ($editmode='create')">
    - <xsl:choose>
    - <xsl:when test="./xf:ValidationError/@tagname='location'">
    - <input name="location" size="30" type="text" class="urEdfiTxtEnbl" id="field_1157467268006">
    - <xsl:attribute name="tabindex">
    - <xsl:choose>
      <xsl:when test="$accessibilitymode='true'">21</xsl:when>
      <xsl:otherwise>3792</xsl:otherwise>
      </xsl:choose>
      </xsl:attribute>
    - <xsl:attribute name="value">
      <xsl:value-of select="''" />
      </xsl:attribute>
    - <xsl:attribute name="readonly">true</xsl:attribute>
      </input>
      </xsl:when>
    - <xsl:otherwise>
    - <input name="location" size="30" type="text" tabindex="3792" class="urEdfTxtEnbl" id="field_1157467268006">
    - <xsl:attribute name="value">
      <xsl:value-of select="''" />
      </xsl:attribute>
    - <xsl:attribute name="readonly">true</xsl:attribute>
      </input>
      </xsl:otherwise>
      </xsl:choose>[/code]
    I put the <xsl:attribute name="readonly"> in both places (when test, and when not test).  I'm not entirely sure if that's necessary, but that worked for me.
    Hope this helps,
    Fallon

  • DFSR Read-Only - Problems with Disaster Recovery?

    Hi guys,
    I have (2) 2008 R2 file servers.  One is production and one is for DR.  First, I have to make sure that the DR server never writes back to production in any situation.  The means that if the (2) servers stop communicating with each other
    and data is deleted off the production server, the read-only DR server does not put deleted files back onto the production server when connection is restored, etc.  It sounds like I am covered there.
    The question is what happens if production server crashes and I now want to change the DR server to production?  Does the data on the D/R member still have the same NTFS permissions?  It sounds like it does, but would I then just go into dfsmgmt.msc
    and mark the replicated folder as read-write, force AD replication, run a dfsrdiag pollad, and then redirect the users to the DR server?  I know the content may not be 100%, but the back-up plan has always been to disablestrictnamechecking, change
    the host record for the production server to the IP address of the DR server, and redirect users there for 99% of the data.  I think that files that were open on the production server that crashed would not have had their updates replicated across. 
    Let me know if that would work from the DFS side of things
    Dan Heim

    Hi Dan,
    I think this article provided an answer to your question:
    Read-Only Replication in R2
    http://blogs.technet.com/b/askds/archive/2010/03/08/read-only-replication-in-r2.aspx
    An RW replicated folder can be converted to an RO replicated folder (and back) “on the fly”.
    Converting will cause a non-authoritative sync to occur on the replicated folder for the server being altered. 
    If you have any feedback on our support, please send to [email protected]

  • Bug in applying read only security status to a PDF portfolio?

      Hi,
    A quick question about setting up a pdf portfolio as 'read only', so users cannot save amended versions of the document within the portfolio, they can only go to 'save as'.
    I have set this up, using Adobe Professional 9, using the following process = File > Portfolio Properties > Security tab and then selecting 'Password Security' (setting a password) and then setting the permission from 'Allow Changes' to 'None'.
    My colleague, who has Adobe X, can go into the portfolio, without knowing/entering any password and change documents. If she exits individual documents whilst still in the portfolio, and goes back into them, she can still see her changes (although when she exits her Adobe software completely and goes back into it, opening the portfolio, these changes have not been saved).
    Can anyone tell me why this happens, and how to stop it, so she can't even get to saving it within the portfolio in the first place? Or is it something that has to be set up on Adobe X, rather than Adobe 9?
    Thanks all!

    PDF files in the Portfoloio are treated as simple attachments. To Acrobat, a PDF attachment is basically the same as a Word or image file. When you open the attachment, the Portfolio just opens the corresponding application. If the file gets modified by that application and the Portfolio security is set to not allow changes, anything done in the external application is ignored.
    The best way to prevent this is to set security on the files prior to adding them to the Portfolio, this will prevent users from getting the idea that they can modify the contents. Then secure the Portfolio itself.
    J-

  • Macbook pro only boot with R key

    I have a problem with a macbook pro .
    I have snow leopard and after running onyx my computer only boot with the R key pressed , I have tried option-command-PR , reset SMC , repair permissions without success .
    I have an external apple led cinema but with or without the error continues .
    Any help would be appreciated.
    Thanks

    Why did you try booting with the R key pressed? From what I recall that key simply resets the screen settings, and shouldn't have anything to do with your system starting or not. I would remove it from the external display until we can get this resolved.
    I'm wondering if it has something to do with your NVRAM. Try booting with this key sequence cmd-opt-n-v.

  • Reading only a subset of keys from a map

    Hello all, I would appreciate a pointer with regard to maps. Here is my (simplified) requirement:
    I have a list of key and value parings that currently reside in a hashmap. The map looks something like this;
    Key ---------- Value
    Monday ---------- Doctor appointment
    Monday ---------- Grocery shopping
    Tuesday ---------- Hair appointment
    Tuesday ---------- Visit grandma
    Tuesday ---------- Make car payment
    Wednesday ---------- Paint garage
    Wednesday ---------- Dinner with George
    My actual requirement has different terminology, but the principle is the same.
    The key value is not unique, and the map will eventually have many thousands of entries. I need to read through my list very often in my application, and I want to be able to read only those entries for a given day and no others as this will significantly hurt the performance if I do.
    Could someone kindly give me a thought or two on the best (and fastest) way to achieve what I need. I have searched various sites looking for a clue, but I can't see anything, which is odd as I would have thought this was a common need.
    Many thanks in advance,
    Steve

    Maybe, you should have a look at the two links below,
    which will lead you to in-memory/embedded RDBMSes
    that easily can be integrated into your application.
    As they hold data in-memory, queries will be really
    quick. I did not check for persisting to a foreign
    DBMS, though. And neither of them is an OODBMS.
    http://www.h2database.com
    http://hsqldb.sourceforge.net/
    Thanks - I will take a look at the links.
    While I am here, I wonder if anyone could validate the approach I have taken for IO (from any source):
    For each object that needs to be persisted, I have create a second class called (ClassObjectName)List. This List class handles all IO, and provides methods to get and put objects and object lists. Whenever my app needs to do some IO, it does this through the List methods. This seems to be working very well for me, and completely hides the database implementation from the rest of the app, which is nice as the database may change in the future.
    As much as I like the way this approach works, this is my first real Java project, so I would be very interested to ear any views or alternatives from the experienced developers.
    Thanks to all and best regards,
    Steve

  • Generate 2 line items with posting keys in same table while using  FM .

    Dear Expert ,
    For T-code f-65 ,I have to park a FI Document  .i tried with PRELIMINARY_POSTING_FB01 for parked Document . But  i am not  successfully park the document .
    with the help of F-65 the data Segregate between Tables VBSEGS and VBSEGD with respecting Posting key . but with this Fm entire entry is displaying in table VBSEGS .For example it generated two line items with posting keys '15' and '40' and these both are displayed in VBSEGS whereas posting key '15' has to be displayed in VBSEGD.
    when i check this Document in FBV0 Error reflect " G/L Account 0012000 1001 Does not Exist ".
    Here my code -
    DATA:   XT_BKPF LIKE  BKPF OCCURS 0 WITH HEADER LINE ,
            XT_BSEG LIKE  BSEG OCCURS 0 WITH HEADER LINE ,
            XT_BSEG1 LIKE  BSEG OCCURS 0 WITH HEADER LINE ,
            XT_BSEC LIKE  BSEC OCCURS 0 WITH HEADER LINE ,
            XT_BSET LIKE  BSET OCCURS 0 WITH HEADER LINE ,
            XT_BSEZ LIKE  BSEZ  OCCURS 0 WITH HEADER LINE ,
            XT_BKORM  LIKE  BKORM OCCURS 0 WITH HEADER LINE ,
            XT_THEAD  LIKE  THEAD OCCURS 0 WITH HEADER LINE ,
            XT_SPLTTAB  LIKE  ACSPLT  OCCURS 0 WITH HEADER LINE ,
            XT_SPLTWT LIKE  WITH_ITEMX  OCCURS 0 WITH HEADER LINE .
    DATA :    XTEXT_UPDATE  LIKE  BOOLE-BOOLE VALUE SPACE,
              XTEXT_ITEM_UPDATE LIKE  BOOLE-BOOLE VALUE SPACE,
              XI_UF05A  LIKE  UF05A,
              XI_XCMPL  TYPE  XFELD VALUE 'X',
              XFS006_FB01 LIKE  FS006 ,
              XI_TCODE  LIKE  T020-TCODE  VALUE 'F-65',
              XI_PARGB  LIKE  RF05A-PARGB        ,
              XI_TCODE_INT  TYPE  TCODE           .
    DATA P_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    XT_BKPF-BUKRS     =     'CP01'.
    XT_BKPF-GJAHR     =     2011.
    XT_BKPF-BLART     =     'DZ'.
    XT_BKPF-BLDAT     =     SY-DATUM.
    XT_BKPF-BUDAT     =     SY-DATUM.
    XT_BKPF-MONAT     =     '06'.
    XT_BKPF-CPUDT     =     SY-DATUM.
    XT_BKPF-WWERT     = SY-DATUM.
    XT_BKPF-USNAM     =     'ABAPER'.
    XT_BKPF-TCODE     =     'F-65'.
    APPEND XT_BKPF.
    XT_BSEG-BUKRS     =     'CP01'.
    XT_BSEG-GJAHR     =     '2011'.
    XT_BSEG-BUZEI = '001'.
    XT_BSEG-BSCHL = '40'.
    XT_BSEG-KOART = 'S'.
    XT_BSEG-SHKZG = 'S' .
    XT_BSEG-GSBER     =     'CPLN'.
    XT_BSEG-BUPLA = 'CP01'.
    XT_BSEG-WRBTR     =     10000.
    XT_BSEG-PSWSL = 'INR'.
    XT_BSEG-ZUONR = 'CH. 123456'.
    XT_BSEG-HKONT = '241000'.
    APPEND XT_BSEG .
    CLEAR  XT_BSEG.
    Vendor line item - required even for header only - BSEG table
    XT_BSEG-BUKRS     =     'CP01'.
    XT_BSEG-GJAHR     =     '2011'.
    XT_BSEG-BUZEI = '002'.
    XT_BSEG-BSCHL = '15'.
    XT_BSEG-KOART = 'S'.
    XT_BSEG-SHKZG = 'H' .
    XT_BSEG-GSBER     =     'CPLN'.
    XT_BSEG-BUPLA = 'CP01'.
    XT_BSEG-WRBTR     =     10000.
    XT_BSEG-PSWSL = 'INR'.
    XT_BSEG-ZUONR = 'CH. 123456'.
    XT_BSEG-HKONT = 'PC04000001'.
    APPEND XT_BSEG .
    CLEAR  XT_BSEG.
      CALL FUNCTION 'PRELIMINARY_POSTING_FB01'
       EXPORTING
         TEXT_UPDATE            = XTEXT_UPDATE
         TEXT_ITEM_UPDATE       = XTEXT_ITEM_UPDATE
      I_UF05A                =
         I_XCMPL                = XI_XCMPL
      FS006_FB01             =
          I_TCODE                = XI_TCODE
      I_PARGB                =
      I_TCODE_INT            =
      IMPORTING
        XEPBBP                 = CHECK_A
        TABLES
          T_BKPF                 = XT_BKPF
          T_BSEG                 = XT_BSEG
          T_BSEC                 = XT_BSEC
          T_BSET                 = XT_BSET
          T_BSEZ                 = XT_BSEZ
      T_BKORM                =
      T_THEAD                =
      T_SPLTTAB              =
      T_SPLTWT               =
              EXCEPTIONS
                ERROR_MESSAGE = 1.
      P_RETURN-ID         = SY-MSGID.
      P_RETURN-TYPE       = SY-MSGTY.
      P_RETURN-NUMBER     = SY-MSGNO.
      APPEND P_RETURN.
         p_return-MESSAGE_V1 = XSYMSGV.
      IF SY-SUBRC = 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            WAIT = 'X'.
      ENDIF.
      WRITE :/ sy-subrc , sy-MSGV1 .
    Thanks ,
    Ashish Gupta

    Hi Raghuram,
    I found a very important SAP Note 103051, details are below.
    An IDoc processed by function module IDOC_INPUT_INVOIC_MM (of category INVOIC01) must not refer to the same purchase order item in several invoice items. This is also valid if for a goods receipt-related invoice verification several delivery notes belong to the same purchase order item.
    Depending on the system settings and the situation, various error messages can occur (for example, FD240 'Order item ... selected more than once' or M8050 'Balance not zero: & debits: & credits: &').
    In this situation module IDOC_INPUT_INVOIC_MRM generates error message M8321 'Document contains same order item more than once'.
    For example, this situation occurs if you work with individual batch valuation and the SD billing document executes a batch split for different batches which belong to the same purchase order item and delivery.
    Other terms
    INVOIC, SAPLIEDI,  M8047, M8, 321
    Reason and Prerequisites
    This is because of the program design.
    Solution
    There is no solution for IDOC_INPUT_INVOIC_MM.
    Module IDOC_INPUT_INVOIC_MRM (only as of Release 4.0) for the logistics invoice verification can distinguish different goods receipts by means of the delivery note number. For this purpose, GR-related invoice verification must be active.
    Owing to this symptom, billing documents for single batch valuation with batch split cannot be settled in MM-EDI inbound processing. The settlement generates exactly the situation described (several invoice items for the same purchase order item). In this case, the only solution is to deactivate the billing of the batch sub-items in SD Customizing and to calculate the main item only.
    Hope this helps.
    Reward if helpful.
    Thanks

  • How to read only files with a certain format from folder with java

    I have this folder on the server and I only want to read files from this folder on the server... I only want to read files with the files format starting with error_ and ending with xml... an example of a file would be..
    error_123.xml
    I want something like this
    if(fileName.startsWith("error_") && fileName.endsWith(".xml")){
    but which java package will I have to use to read the file from the directory...

    Create an implementation of the java.io.FilenameFilter interface to match the pattern you need.
    Create a java.io.File object for the folder.
    Use the File.listFiles(FilenameFilter) method to get an array of File objects for the files in the folder that match the pattern.
    For each file in the array, create a FileInputStream, wrap it in an InputStreamReader, and wrap that in a BufferedReader (assuming you want to read the XML files as character streams).

  • Master table detail table with SQL based read only VO with bind variables

    i have a page where i am displaying data as master table and detail table. both table VOs are based on SQL queries which use bind variables.
    i have a view link between vos of type 1:M
    i created master table detail table page by dropping detail iterator from data control panel under master and selecting master table detail table
    on my page i see detail table records getting populated only for first record of parent table.
    on changing parent record, child table shows same records and does not refresh
    i am using partial triggers on both tables to be populated on a button click as i need to pass some bind variables to VOs which are taken as input from users
    how can i show corresponding rows in detail table when parent record in table changes
    is it possible declaratively to have master detail table view when both VOs have bind variables
    jdev 11 1 1 5
    these are the SQLs used
    Parent SQL Based VO Query
    SELECT to_char(d.status_date,'yyyymmddhh24') TIME123, count(DISTINCT d.c4)
    FROM t1 d,
    t2 w
    WHERE w.c1 = nvl(:ou, w.c1)
    AND UPPER(w.c2) = UPPER(nvl(:tt, w.c2))
    AND d.c3 >= :startTime AND :startTime IS NOT NULL
    AND d.c3 <= :endTime AND :endTime IS NOT NULL
    AND d.c4 = w.c4
    AND UPPER(d.status) = 'CLOSED'
    GROUP BY to_char(status_date,'yyyymmddhh24') ORDER BY to_char(status_date,'yyyymmddhh24') DESC
    Child SQL Based VO Query
    SELECT w.c1,
    w.c5 - w.c6 processing_time,
    w.c3,
    w.c6,
    w.c7,
    w.c8,
    to_char(d.status_date,'yyyymmddhh24') TIME123 FROM t1 d,
    t2 w
    WHERE w.c2 = nvl(:ou, w.c2)
    AND UPPER(w.c3) = UPPER(nvl(:tt, w.c3))
    AND d.c4 >= :startTime AND :startTime IS NOT NULL
    AND d.c4 <= :endTime AND :endTime IS NOT NULL
    AND d.c1 = w.c1
    AND UPPER(d.status) = 'CLOSED' ORDER BY to_char(status_date,'yyyymmddhh24') DESC
    view link is based on column TIME123

    Instead of doing the master-detail layout by dragging the details over, can you try a new page where you first drag the master VO over and then drag the detail VO over, and then set partialTrigger from the detail to point to the master?

Maybe you are looking for

  • Report for track the assets history only for transfer assets through ABUMN

    Hi experts, I am transferring the some value from one asset to another asset through ABUMN, is there any report to see the this kind of transfer assets useful answers duly rewarded

  • Lack of BT Sport Support - passed around for three...

    Hi All I have been activated as a BT Sport customer, so why won't it work on my system?  I registered a call to BT on Wednesday of this week, having made sure my card had been acivated, apparently though as an Infinity user I don't need a card for th

  • Thunderbolt display changes colour temperature when in full screen mode

    27" Thunderbolt Display connected to MacBook Air (2011) changes colour temperature when in full screen mode. Switching any setting in System Preferences/Displays changes it back to the correct colour. I have also seen this on a 24" LED Display (Displ

  • 'Plant' field now requires input - why is that?

    Hello all, Here is my issue: when inputing Vendor Invoice (transaction FB60), the system now requires an entry in the 'Plant' field. I am using a regular P&L account which is also a regular cost element the context is that some changes are brought in

  • Search logic absent in RFAVIS40??

    Hi, We use the normal lockbox program RFEBLB30 to post the lockbox transmission from customers who send us EDI 820. However, we have some customers on ACH for which we only receive an excel file and using this information , we create the payment advi