Problem in Selecting elements in XSLT

Hi,
I have the following XML.
<asx:values>
<Seg1 A="a" B="b>
<Seg1 A="c" B="d">
<Seg2 X="a" Y="b>
<Seg2 X="c" Y="d">
</asx:values>
Now i have the following XSLT.
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sapxsl="http://www.sap.com/sapxsl" xmlns:asx="http://www.sap.com/abapxml" version="1.0" >
  <xsl:strip-space elements="*"/>
  <xsl:template match="/|*">
       <xsl:element name="asx:values">
           <xsl:for-each select="//asx:values/*">
                <xsl:variable name="segment1"select="name()"/>
                   <xsl:element name="{$segment1}">
                  <xsl:for-each select="//asx:values/$segmennt1">
         </xsl:for-each>
   </xsl:element>
  </xsl:for-each>
</xsl:element>
  </xsl:template>
</xsl:transform>
Now in the Second for Loop i dont want to select all the elements but the elements whose name is in $segment1.
for example in first loop $segment get value 'Seg1'then in the second loop i need to select only Seg1 elements. But some how the above code is not working. Can you please help.

Hi, I think maybe the following code can achieve your requirement:
[code]
<?xml version='1.0'?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sapxsl="http://www.sap.com/sapxsl" xmlns:asx="http://www.sap.com/abapxml" version="1.0" >
<xsl:strip-space elements="*"/>
<xsl:template match="/|*">
<xsl:element name="values">
<xsl:for-each select="//values/*">
<xsl:variable name="segment1" select="name()"/>
<xsl:for-each select="//values/*">
<xsl:variable name="segment2" select="name()"/>
<xsl:if test="$segment2 = $segment1">
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:transform>
[/code]
thanks

Similar Messages

  • I recently upgraded our iMac to Yosemite OS and now have a problem with Photoshop Elements 11:  the move tool selects an image or text layer, but then I try to drag the selection somewhere else on the page and it snaps back to the original location, howev

    I recently upgraded our iMac to Yosemite OS and now have a problem with Photoshop Elements 11:  the move tool selects an image or text layer, but then I try to drag the selection somewhere else on the page and it snaps back to the original location, however the arrows will move it OK.  Also I cannot drag the selection to another photo in the photo bin as before.

    Hi,
    Please refer: http://helpx.adobe.com/photoshop-elements/kb/pse-stops-responding-yosemite.html
    Thanks,
    Anwesha

  • Problem in Selection Screen.

    Dear Experts,
    I am facing a problem in Selection Screen.
    <b>I have 2 radio buttons ,</b>
    <b>Radio Button 1</b> - Choosing the file from desktop and
    <b>Radio Button 2</b> - Executing from Database
    Under Option1 - i have a <b>FILE</b> parameter which is <b><u>Mandatory.</u></b>
    Problem Case -
    <b>when I choose option 2, Option 1 should be disabled. in the sense the file name which is mandatory here should not be mandatory . Currently, when i choose option 2 - i have to provide some dummy characters in the file parameter because the file parameter is mandatory, and <u><b>I want to avoid this.</b></u>
    Please see the entire code .</b>
    REPORT ZTEST.
    DATA: LV_FILE_PATH(20) TYPE  C.
    DATA: LV_MASK(20)      TYPE  C VALUE   ',*.XLS ,*.XLS.     '.
    *-- Macro to put radiobutton on selection screen
    *-- &1 - radiobutton parameter name
    *-- &2 - text element (description)
    *-- &3 - radiobutton group
    DEFINE MAKE_RADIOBUTTON.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    * From Config File
    MAKE_RADIOBUTTON RB_1  ALL_DATA SRC.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    * Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME  OBLIGATORY. "
    SELECTION-SCREEN END OF BLOCK A1.
    * From database table
    MAKE_RADIOBUTTON RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE1.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                QUERY  = 'CD'  "// Current Directory
           IMPORTING
                RETURN = LV_FILE_PATH.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                DEF_FILENAME     = 'TA_DOWNLOAD.MDB'
                DEF_PATH         = LV_FILE_PATH
                MASK             = LV_MASK
                MODE             = 'O'
           IMPORTING
                FILENAME         = P_FILE1
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
    INITIALIZATION.
      ALL_DATA = 'From Desktop     : ? '.
      INC_DOWN = 'From Database    : ?'.
      T000     = 'Configuration Upload'.
    Please help
    Thanks

    Hi
    You should do some modifications like these:
    DEFINE MAKE_RADIOBUTTON_1.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3 USER-COMMAND &4.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    DEFINE MAKE_RADIOBUTTON_2.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    From Config File
    MAKE_RADIOBUTTON_1 RB_1  ALL_DATA SRC AAA.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME MODIF ID FIL. "
    SELECTION-SCREEN END OF BLOCK A1.
    From database table
    MAKE_RADIOBUTTON_2 RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN OUTPUT.
      IF RB_2 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FIL'.
            SCREEN-ACTIVE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Max

  • Has anyone had a problem installing PSE Elements 8.

    I have installed PSE Elements 8 from a new boxed CD onto a new Dell running Windows 7 Professional (64 Bit).
    PSE has loaded without any warnings and I get to the welcome screen OK. Organiser works fine but if I try and start Edit it just circles around back to the Edit prompt. I have tried getting in via Fix in Organiser which then advises Loading Elements workspace but then drops me back to menu.
    I have tried all the Tech Note suggestions but after hours of trying am still no further forward.
    I even downloaded and installed the trial version but I this performs in the same way.
    All suggestions welcome.  Thanks

    No luck.
    PE Editor does not open with Ctrl/Alt/Shift nothing...zilch
    Running PE Editor from this point using Open produces error message. PE Elements has stopped working - Close Program.
    Thanks anyway.
    Problem has now been escalated to senior tech team within Adobe.
    Date: Mon, 1 Mar 2010 02:47:01 -0700
    From: [email protected]
    To: [email protected]
    Subject: Has anyone had a problem installing PSE Elements 8.
    The only other suggestion is try re-setting the Editor preferences as this often fixes conflicts. You will also be able to check that this part of the application installed correctly.
    Hold down the windows key to the left of Alt and press the letter E to launch Explorer
    In the left side pane click on Computer
    In the right pane double click on Program Files, then double click Adobe, then double click Photoshop Elements 8.0
    Use the right hand  scroll bar to move down the list of files and locate Photoshop Elements Editor With one hand holding down all three keys CtrlShiftAlt right click on the Editor file in the list and select open.
    You should see a pop up box with the words Delete Adobe Photoshop Elements Settings File?
    Click on Yes
    Close down Elements and re-open it in the normal way.
    Please let us know if that works.
    >

  • Firefox 33 HTML select elements do not display correctly

    HTML form <select> elements do not display options correctly in Firefox 33.
    For example:
    <select id="field_4" class="mainForm" name="field_4">
    <option value=""></option>
    <option value="submitted"></option>
    <option value="pending"></option>
    <option value="discarded"></option>
    <option value="all"></option>
    </select>
    should display a drop down with 5 elements (first one blank) but no elements at all are displayed.
    The bounding box does not seem to be computed correctly so no options display.
    I have observed this issue on multiple pages. These pages displayed correctly in older version of Firefox and they display correctly under IE. The problem occurs with no addons or additional themes installed. The problem does not occur in SafeMode so I suspect that it is theme related but the Default 33.0 theme is the only installed theme and it cannot be disabled outside of SafeMode. I tried installing and changing multiple themes without success. The problem persists after restarting Firefox and after rebooting the computer and even after uninstalling and re-installing Firefox.
    I can supply a screen shot if needed.

    You can try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    You need to close and restart Firefox after toggling this setting.
    *https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration
    If it works in Safe Mode and in normal mode with all extensions (Firefox/Tools > Add-ons > Extensions) disabled then try to find which extension is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "Firefox > Exit" (Windows: Firefox/File > Exit; Mac: Firefox > Quit Firefox; Linux: Firefox/File > Quit)
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • When using the google translate js api to dynamically translate a webpage the chosen option in a select element does not show up. This happens to me only in FF (using v4)

    I am asking you this because I did not find this problem in any of the other browsers I have (chrome, opera, ie, safari).
    I uploaded a simple html file to show this problem here: http://rvyu.com/mKLG
    Notice that if you don’t change the language you have no problem changing the value in the select element (the original one with 3 options, not the one generated by google translate) but if you do when you switch values the selected one does not show up.

    Ok thank you so much, for your timely response.
    RESPONSES:
    1)   When I set up my iMac, I did not transfer any data directly from my windows PC.  I simply used the same iTunes login and account.  I have access to all of the files via the "Purchased" section of the iTunes store.  If I click "Download Previous Purchases"  text, I can download ALL of the purchases I have ever made.
    2)   I have the Apple TV 2, so good news, question answered.  I thought maybe it was the Apple TV 1, but it is the Black model, so bam.  Good response for you.  Well the whole damned reply is an awesome response, just pointing out that one piece of awesome.  I stated that it was an Apple TV 2, and yet you were still good enough to figure I could be mistaken, and provide me with knowleedge just incase.
    QUESTIONS:
    3)   So can my iMac not stream the data directly from itunes, without download?  Apple TV can, but perhaps that is something among many things that maker it unique, and awesome.
    SERIOUSLY.... THANK YOU... 
    I work in the computer support section for the Military.  The only problem is we use Windows , lol.  Well that and i've been gone for nearly 6 months on recover.  I go back next month though I hope.  But working in that field gives me the abilty to judge responses that run inside the same vein.  Your response was so awesome that I half thought I might have written it myself. 

  • Problem in selecting records

    Hi, everyone.
    I have a problem in selecting records.  In this case, I want to select records from database
    LFA1,and the components of this table are LIFNR,ERDAT,LOEVM ,and so on.The type of LIFNR is char(10).There is a internal table:tab_cdhdr , the elements of tab_cdhdr are: objectid,udate and change_ind.The type of objectid is char(50).
    And the select-rule is that: LIFNR = objectid. So I write like this:
    select   lifnr
                 erdat
                 loevm
    form     lfa1
    into       tab_lfa1
    for all entries in tab_cdhdr
    where   lfa1 = tab_cdhdr-objectid+0(10).
    But there is a warning: When using FOR ALL ENTRIES IN the specifyed length for "OBJECTID" is ignored in this condition.
    Can you help me to solve this problem?
    Thanks.

    Hi Feng..
    If you dont want to change the Internal table TAB_CDHDR, Then declare another internal table (TEMPTAB_CDHDR.) with the same structure but Objectid with only 10 chars.
    IF TAB_CDHDR[] IS NOT INITIAL.
    LOOP AT TAB_CDHDR.
    MOVE-CORRESPONDING TAB_CDHDR TO TEMPTAB_CDHDR.
    APPEND TEMPTAB_CDHDR.
    ENDLOOP.
    select lifnr
    erdat
    loevm
    form lfa1
    into tab_lfa1
    for all entries in tab_cdhdr
    where lfa1 = TEMPtab_cdhdr-objectid.
    ENDIF.
    Sure ... this will work for u.....
    REWARD IF HELPFUL.

  • Current selected element of table ( using tree  )

    Hi experts ,
                         I am using a tree by table UI in which master. I want to know text of current selected element of table (which is one of the column of table ) . as table is dynamically expanding or collapsing upon expanding or closing master column.
    so i used follwing code in do modify view to get it
    IWDTable tab =  (IWDTable) view.getElement("Table1");
                        tab.mappingOfOnLeadSelect().addSourceMapping("row", "element");     
    public void onActionOnrowSelect
    (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, int element )
        //@@begin onActionOnrowSelect(ServerEvent)
        //@@end
    but above code also give me current row (an integer value) .
    but its not solving my problem . as current row elemt is always not going to be same row in which table (data source for table).
    can any body have solution ?
    Regards
    abhay

    Hi Abay,
    IWDTable tab = (IWDTable) view.getElement("Table1");
    tab.mappingOfOnLeadSelect().addSourceMapping(IWDTreeNodeType.IWDOnLoadChildren.NODE_ELEMENT,"element");
    datatype of the <b>element</b> should be <b>IWDNodeElement</b>
    Or
    You can use
    IWDNodeElement IWDNode.getTreeSelection()
    Ex: wdContext.nodeA().getTreeSelection()
    Regards
    Ayyapparaj

  • Problem when removing elements from table after apply sort

    Hi,
    I have big problem with <af:table> and sorting.
    When I removed objects from a table without sorting, there is no problem but when I removed
    items from the table after sorting, the remain items are not correct.
    For example, i have in my table these items :
    Item AA
    Item CC
    Item ZZ
    Item BB
    Item AA
    Item BB
    Item CC
    Item ZZ
    I sort the table and i select the following Items : Item BB a Item CC
    The remains item is only Item AA, Item ZZ disappear.
    If i resort the table, the missing Item zz appear again in the table.
    Here is my jspx :
    <af:table var="row" rowBandingInterval="1" width="1050" rows="5"
    rowSelection="multiple"
    value="#{pageFlowScope.editNotificationBackingBean.ingredients}"
    binding="#{pageFlowScope.editNotificationBackingBean.ingredientsTable}"
    autoHeightRows="10" id="t2">
    <af:clientListener method="goEditRow" type="dblClick"/>
    <af:serverListener type="doubleClickOnRow" method="#{pageFlowScope.editNotificationBackingBean.handleRequestIngredientsSelectBtn_action}"/>
    <af:column headerText="#{bundle.col_fr_name}" width="240"
    sortable="true" sortProperty="name.FR_Description" id="c1">
    <af:outputText value="#{row.name.texts['fr'].value}" id="ot1"/>
    </af:column>
    In my backing bean i call this method to remove selected elements :
    public void unselectBtn_action(ActionEvent actionEvent) {
    RowKeySet rowKeySet = selectIngredientsTable.getSelectedRowKeys();
    int i = 0;
    Iterator it = rowKeySet.iterator();
    while (it.hasNext()) {
         Integer index = (Integer)it.next() - i;
    selectIngredientsTable.setRowKey(index);
    CompositionIngredient compositionIngredient =
    (CompositionIngredient)selectIngredientsTable.getRowData();
    notification.getProductDetail().getCompositionIngredients().remove(compositionIngredient);
    i++;
    selectIngredientsTable.getSelectedRowKeys().clear();
    AdfFacesContext.getCurrentInstance().addPartialTarget(selectIngredientsTable);
    Thanks in advance.

    I have made a mistake, i don't paste the right <af:table> from my jspx.
    Here is the correct one :
    <af:table var="row" rowBandingInterval="1" width="1050"
    rowSelection="multiple" id="tableSelectedIngredients"
    value="#{pageFlowScope.editNotificationBackingBean.notification.productDetail.compositionIngredients}"
    binding="#{pageFlowScope.editNotificationBackingBean.selectIngredientsTable}"
    partialTriggers="::tab_ingredients_list_expressed_per">
    <af:column sortable="true" headerText="#{bundle.col_name}" id="c5" width="180"
    sortProperty="ingredient.name.FR_Description">
    <af:outputText value="#{row.ingredient.name.texts['fr'].value}"
    id="ot18"/>
    </af:column>
    ...

  • Row selection event in xslt

    Hi,
    I have an XSLT table and I want to read the selected table row number  in java script function.
    Simply the row selection event on xslt table and also please provide how to give the unique id to the xslt table.
    Please guide me in this.
    Regards,
    Bikshu
    Edited by: rajkumar12345 on Feb 19, 2012 10:05 AM

    Hi Bikshu,
    The content generated by xslt is plain html. So to make it interactive - you need to use javascript method. Javascipt method called on Click of the cell can give the row selection look and fell by changing the background color. To give the unique id for each element - you have to write xslt accordingly. You can generate the ID in this way - Column name+ Row index.
    Thanks,
    Soumen

  • Select element not found

    Hi,
     i am using vugen 11.00 for recording an application.. It is recording correctly but while replaying the script it is showing error as " SELECT element not found in the list"... The version of IE is 8.. is it application bug or vugen recording problem?
    please tell me how to resolve the bug... we are using Web( CLICK & SCRIPT) protocol..
     The error is occring in the below code line which is made bold ( web_list ).
        web_list("wddlOccurBeat",
            "Snapshot=t18.inf",
            DESCRIPTION,
            "Name=wddlOccurBeat",
            ACTION,
            "Select=BEAT 3",
            LAST);
        web_list("wddlOccurVillage",
            "Snapshot=t19.inf",
            DESCRIPTION,
            "class=sSfocus"
            "Name=wddlOccurVillage",
            ACTION,
            "Select=GOWDAKARANAGANAHATTI",
            LAST);
    Thanks,
    shrinivas

    I'm using another keyboard model (not vim-like). I often prefer to navigate with [shift]+[arrows] with [tab] in case of form. So this browsers are not suitable for me because it is not acting in a way that I like.

  • SelectManyListBox - unselect selected elements

    Hi.
    I'm not be able to unselect select items in a selectmanylistbox
    I have defined two selectmanylistbox, so when I select items in one of them I want the elements selected in other selectmanylistbox (in case of there are elements selected) were unselected (Dissapear the blue band).
    this is my code:
    private SelectItem[] selectManyListBoxItems_02;
    private SelectItem[] selectManyListBoxAllItems_02;
    private String[] selectedManyListBox_02;
    private SelectItem[] selectManyListBoxItems_03;
    private SelectItem[] selectManyListBoxAllItems_03;
    private String[] selectedManyListBox_03;
    I populate correctly the list in my bean.
    and later in my page:
    <h:selectManyListbox id="manyListBox_02"
    value="#{myBean.*selectedManyListBox_02*}"
    valueChangeListener="#{myBean.selectManyListBox_02Changed}">
    <f:selectItems id="SlctManyListBox_02Itms"
    value="#{myBean.selectManyListBoxItems_02}" />
    <h:selectManyListbox>
    <h:selectManyListbox id="manyListBox_03"
    value="#{myBean.*selectedManyListBox_03*}"
    valueChangeListener="#{myBean.selectManyListBox_03Changed}">
    <f:selectItems id="SlctManyListBox_03Itms"
    value="#{myBean.selectManyListBoxItems_03}" />
    </h:selectManyListbox>
    Now in the change events I do something like this:
    public void selectManyListBox_02Changed(ValueChangeEvent event) {
    //Here I want to catch the selected Items and at the same time unselect
    //the selected items in selectManyListBox_03 (eliminate the blue band )
    //I get the elements selected
    s = (String[]) event.getNewValue();
    //Here is my problem
    //Clean the list of elements selected in selectedManyListBox_03, but no works on my page
    selectedManyListBox_03 = new String[] {};
    //I debug and the selected elements is set correctly to 0.
    Any idea, suggestion, tutorial or something to fix this problem
    thanks

    This is a Java forum. Is your question related to Java?
    db

  • Get selected elements from a table

    Hi all,
    I have a requirement like i m enhancing standard component in that i have added one button on click of that i want fetch the selected line item from the table ( which is a normal table). selection mode is auto.
    i tried with  the following code.
    DATA:lr_element                   TYPE REF TO if_wd_context_element,
           lv_index                     TYPE i.
    *--Get selected element
      lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
    ****Here itself its throughing dump because lr_element is initial***************
    *--get selected element index.
      lv_index = lr_element->get_index( ).
    can any one help me what is the wrong.. else suggest me how to get the selected elements from a table....
    Thanks in advance.

    *--Get selected element
    lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
    if  lr_element is bound.
    lv_index = lr_element->get_index( ).
    endif.
    Instead you can directly read the node if that row is a lead selected one.
    lo_node = wd_context->get_child_node( name = 'EMP' ).  "Emp is node name
    lo_ele = lo_node->get_lead_selection( ).
    or
    lv_index = lo_node->get_lead_selection_index( ).
    where is the above code written..is it written in OnLeadSelect event of the TABLE..
    can any one help me what is the wrong.. else suggest me how to get the selected elements from a table....
    As the selection mode is Auto there is no multiple selection..hence try to use the lead selection only.
    Edited by: Lekha on Jan 3, 2012 6:47 PM

  • Problem with installing Elements - from noob

    I have problems with installing Elements, it gives my an unknown mistake - I already have CS4 up and running, could this be the case?

    Chances are not very good that pse 4 will run on os x 10 6.8 unless you were upgrading from an earlier mac version that already had pse 4 installed.
    as per this:
    http://forums.adobe.com/message/4474236#4474236

  • Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination

    Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
    Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
    Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
    Statements in called form (Form name: FORM_CHILD):
    go_block('display_block') ;
    do_key('execute_query') ;
    -- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
    -- from TABLE_A.
    -- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
    -- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
    if user_choice = 'YES' then
    commit ;
    else
    rollback ;
    end if ;
    Statements in calling forms:
    There are two calling forms having following statements and it is going to call the above said called form.
    CALLING FORM 1
    Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...; Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    CALLING FORM 2:
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...;
    insert into table_b ...;
    Our understanding:
    Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
    So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
    After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
    Actual happenings or Mis-behavior:
    Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
    The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
    Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
    Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
    Our mail ID: [email protected]
    Thanks a lot in advance.

    You have several problems:
    1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
    2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
    All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
    Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.

Maybe you are looking for

  • Last 12 Rolls Not Displaying Correctly

    For some reason when I click the "The Last 12 Rolls" option in the Source Pane iPhoto displays my last 6 rolls properly 12/22/08, 12/20, 12/18, 12/18, 12/13, 12/13 and then skips several month's worth of rolls and displays 9/6, 9/1, 8/28, 8/26, 8/15,

  • Email id list

    hi all, Can any body suggest me the report through which I can get the customer master data WITH EMAIL ID FIELD. regards, satish.

  • Config inbound Idoc

    Good morning. Please help me. I must set up multiple inbound IDOCS, one of them is: Type base : orders05. message type : orders. The process is : data is received xi / pi, and IDOCs must be created to fill the data transaction VA01 and VA02. I have r

  • Program SAP_INFOCUBE_INDEXES_REPAIR running longer

    Hi Expert, The program SAP_INFOCUBE_INDEXES_REPAIR to repair the indexs is taking more time of 4-5 hour which was earliar running for 5-10 mins. Please help me to find out the possible cause and the performance improvement. Thanks, Ranjan

  • Availability check for Sales order

    Hi Experts, I have material say 100199 in which I maintain In house production time as 10 days. Now I have to create Sales Offer for this material and system check availabity and give delivery date for Offer from Inhouse production time maintained. P