Looping to generate 2 columnar table

Hi all,
First greetings to all. I am a new member of this forum and also relatively new to XSLT.
I am trying to generate an xsl:fo file using xml document and xslt.
now, I requre 2 columnar table looping through node in xml.
To be precise it looks like following..
xml file:
<some-node>
<node-of-interest>
<sub-node1> val1 </sub-node1>
</node-of-interest>
<node-of-interest>
<sub-node1> val2 </sub-node1>
</node-of-interest>
<node-of-interest>
<sub-node1> val3 </sub-node1>
</node-of-interest> ........
</some-nodes>
output required:
|-------|----------|
|_col1_|__col2_|
|val1 | val2 |
|val3 | val4 |
|valN | |
_______ ____|
and i wanted to select row according to the fn:position() is even or the final node ....
xsl logic (not written in std syntax to save time and space )
<table>
<xsl:for-each select="some-nodes/node-of-interest" >
<if test="position() odd">
<row>
</if>
<cell>
<xsl:value-of select="sub-node1" />
</cel>
<if test="position() even or last()">
</row>
</if>
</xsl:for-each>
</table>
this implementation fails because of incomplte <row> element !!!
is there any other way to loop through ... may be with the step of 2 nodes ??
....................... any help ???
thanks,
Hardik

Hi Chris,
you need to compare your model against database - import from database into same relational model and use "swap target" option - in this case "alter statements" against database will be generated.
You can look at demonstrations here http://www.oracle.com/technetwork/developer-tools/datamodeler/demonstrations-224554.html
Probably this particular one will be most helpful http://download.oracle.com/otn_hosted_doc/sqldev/importddl/importddl.html
Soon or later your changes will require table to be recreated and you'll need to backup your data - you can consider usage of "Advanced DDL" option - script will be generated that will unload the content of your table (including LOBs) to file system accessible from database and restore it after changes. Well don't try it directly on production system :).
Philip

Similar Messages

  • Sy-tabix in relation to LOOP AT and READ TABLE

    Hi All,
    As per SAP documentation,
    1) While looping through an internal table (LOOP AT), sy-tabix contains the index number of current row(for standard and sorted tables)
    2)When successfully reading from an internal table(READ TABLE), sy-tabix is set to the index of the result row.
    But what happens when READ TABLE is used while looping through another internal table?
    i.e. Loop at TAB1...
    write sy-tabix.
    READ TABLE TAB2...
    write sy-tabix.
    endloop.
    If we are looping through 1st row of TAB1 and the result of read statement is found in 3rd row of TAB2, I expected that sy-tabix before READ would be 1 and after the READ be 3.
    But, I found that sy-tabix remains unchanged at 1. Can someone expalin why?
    Thanks,
    Jagan

    Hi
    If after reading the table TAB2 the system variable SY-TABIX has still the previous value, that menas the READ TABLE fails or it was read the first record of TAB2.
    After READ TABLE TAB2 try to check the SY-SUBRC:
    LOOP AT TAB1.
       WRITE: / 'TAB1 index:', SY-TABIX.
       READ TABLE TAB2 .........
       IF SY-SUBRC = 0.
         WRITE: 'TAB2 index:', SY-TABIX.
    Try this:
    DATA: BEGIN OF ITAB OCCURS 0,
            FIELD1,
          END   OF ITAB.
    DATA: BEGIN OF ITAB2 OCCURS 0,
            FIELD1,
          END   OF ITAB2.
    DATA: INDEX TYPE I.
    DO 10 TIMES.
      APPEND ITAB.
    ENDDO.
    DO 10 TIMES.
      APPEND ITAB2.
    ENDDO.
    LOOP AT ITAB.
      WRITE: / 'ITAB:', SY-TABIX.
      INDEX = SY-TABIX + 2.
      READ TABLE ITAB2 INDEX INDEX.
      IF SY-SUBRC = 0.
        WRITE:  'ITAB2:', SY-TABIX.
      ENDIF.
    ENDLOOP.
    Max

  • While defining a columnar table, what is the purpose of column store type

    Hi folks
    I have two questions related to columnar table definition.
    1. What is the purpose of column store type.
    While defining a columnar table, what is the purpose of column store type (STRING ,CS_FIXEDSTRING,CS_INT etc) , when I define a table using the UI I see that the column is showing STRING but when I goto EXPORT SQL it does not show.  Is this mandatory or optional ?
    2.VARCHAR Vs. CHAR - In the UI when I create the table I do not see the CHAR option , but I do see lot of discussion where people are using CHAR for defining the columnar table. Not sure why UI dropdown does not show it. I also read that we should avoid using VARCHAR as those columns are not compressed, is that true, I thought the column store gives compression for all the columns. Are there certain columns which cannot be compressed .
    Please let me know where I can find more information about these two questions.
    Poonam

    Hi Poonam
    the CS_-data types are the data types that are used internally in the column store. They can be supplied but it is not at all required or recommended to do so.
    SAP HANA will automatically use the correct CS_-data type for every SQL data type in your table definitions.
    To be very clear about this: don't use the CS_-data types directly. Just stick to the SQL data types.
    Concerning VARCHAR vs CHAR: fixed character data types are not supported anymore and don't show up anymore in the documentation.
    I have no idea why you believe that VARCHAR columns are not compressed but this is just a myth.
    create column table charcompr (fchar char(20), vchar varchar(20));
    insert into charcompr (
        select lpad ('x', to_int (rand()*20), 'y'), null from objects cross join objects);
    -- same data into both columns
    update charcompr set vchar = fchar;
    -- perform the delta merge and force a compression optimization
    merge delta of charcompr;
    update charcompr with parameters ('OPTIMIZE_COMPRESSION' ='FORCE');
    -- check the memory requirements
    select COLUMN_NAME, MEMORY_SIZE_IN_TOTAL, UNCOMPRESSED_SIZE, COUNT, DISTINCT_COUNT, COMPRESSION_TYPE
    from m_cs_columns where table_name ='CHARCOMPR'
    COLUMN_NAME    MEMORY_SIZE_IN_TOTAL    UNCOMPRESSED_SIZE   COUNT   DISTINCT_COUNT  COMPRESSION_TYPE
    FCHAR       3661                    70285738            6692569 20              RLE
    VCHAR       3661                    70285738            6692569 20              RLE
    We see: compression and memory requirements are the same for both fixed and variable character sizes.
    - Lars

  • Which system variable is reset at the exit of a loop of an internal table

    which system variable is reset at the exit of a loop of an internal table
    a)sy-loop b)sy-index c)sy-dbcnt d)sy-tabix

    You might want to revist your threads from Friday, and award points and mark as "Answered" or "Solved".
    Regards,
    Rich Heilman

  • HELP! FOR LOOP TO SCROLL THROUGH TABLE AND CREATE DATABASE LINK

    Hi,
    Here's the scenario, not much of a PL programmer, just basic SQL so really need some help people!
    I have 2 tables. 1 contains list of DB's and the other contains rules to follow.
    I need to create a loop that goes through the table containing the DB's and on each row a DB link is created (Only 1 link allowed!)
    Once created, the schema currently logged in with also has an account on the linked DB in order to run scripts- The scripts are stored centrally hence the requirement for the link to the target DB.
    There are numerous scripts that need to be executed and can all be called from 1 script, once executed the loop exists and the database link needs to be dropped.
    Once dropped, the first loop continues, creating a DB link for the next DB listed in the table (and all the scripts are fired again)
    This continues against all the DB's listed in the table.

    Hi BlueShadow,
    Thanks again for the response, you've hit the nail on the head. SQL scripts on a unix server, a loop goes through a table 1 at a time. Each row gets a link created and then all the scripts stored on the server are executed against the db linked to. So I'm assuming this is a loop within a loop.
    1 loop to go through the table to create the link and then another loop within once connected to execute all the scripts against the connected DB. Once the scripts are run, the loop exits and moves onto the next server and so on until all the servers have the scripts are run.
    It's PL/SQL scripts we're after and not shell scripts as this would free us from the OS constraints.
    We have to drop the links due to security. Any idea on o

  • VLD-1119: Unable to generate Multi-table Insert statement for some or all t

    Hi All -
    I have a map in OWB 10.2.0.4 which is ending with following error: -
    VLD-1119: Unable to generate Multi-table Insert statement for some or all targets.*
    Multi-table insert statement cannot be generated for some or all of the targets due to upstream graphs of those targets are not identical on "active operators" such as "join".*
    The map is created with following logic in mind. Let me know if you need more info. Any directions are highly appreciated and many thanks for your inputs in advance: -
    I have two source tables say T1 and T2. There are full outer joined in a joiner and output of this joined is passed to an expression to evaluate values of columns based on
    business logic i.e. If T1 is available than take T1.C1 else take T2.C1 so on.
    A flag is also evaluated in the expression because these intermediate results needs to be joined to third source table say T3 with different condition.
    Based on value taken a flag is being set in the expression which is used in a splitter to get results in three intermediate tables based on flag value evaluated earlier.
    These three intermediate tables are all truncate insert and these are unioned to fill a final target table.
    Visually it is something like this: -
    T1 -- T3 -- JOINER1
    | -->Join1 (FULL OUTER) --> Expression -->SPLITTER -- JOINER2 UNION --> Target Table
    | JOINER3
    T2 --
    Please suggest.

    I verified that their is a limitation with the splitter operator which will not let you generate a multi split having more than 999 columns in all.
    I had to use two separate splitters to achieve what I was trying to do.
    So the situation is now: -
    Siource -> Split -> Split 1 -> Insert into table -> Union1---------Final tableA
    Siource -> Split -> Split 2 -> Insert into table -> Union1

  • Dynamic query in where clause while looping in an internal table.

    Hi,
    Had a small question : How can i make a dynamic query for the WHERE clause while looping at an internal table.
    i want to implement a dynamic where clause query for the below example.
    it_cfx_col is an internal table and wa_cfx_col is a work area for it_cfx_col
      DATA :
      i_cfx_col TYPE TABLE OF cfx_col,
      wa_cfx_col LIKE LINE OF i_cfx_col.
    DATA : count TYPE i VALUE 0.
    DATA : l_where_clause TYPE string,
             l_where_clause2 TYPE string,
             l_name type string.
    l_name = 'NANDANOM'.
    l_scenario = 'collaboration'.
    LOOP AT it_cfx_col INTO wa_cfx_col
    WHERE CREATED_BY = l_name
    AND SCENARIO = l_scenario.
    count = count + 1.
    some business logic implemented using the work area wa_cfx_col
    endloop.
    Now i want to write a dynamic query for the where clause.
    DATA : count TYPE i VALUE 0.
      DATA : l_where_clause TYPE string,
             l_where_clause2 TYPE string,
             l_name type string.
    l_name = 'NANDANOM'.
    l_scenario = 'collaboration'.
      l_where_clause = 'CREATED_BY = l_name'.
      l_where_clause2 = 'AND SCENARIO = l_scenario'.
    if l_scenario is not initial.
      CONCATENATE  l_where_clause l_where_clause2
      INTO l_where_clause SEPARATED BY space.
    endif.
    LOOP AT i_cfx_col INTO wa_cfx_col
    WHERE (l_where_clause).
    count = count + 1.
    some business logic implemented using the work area wa_cfx_col
    endloop.
    when i compile this i get an error message as { Statement concluding with "...(l_where_clause)" ended unexpectedly}
    Even i changed the initilization of the variable  l_where_clause2 to [ l_where_clause2 = 'AND SCENARIO = l_scenario.'. ]
    added the end of line demarkation ".", but still i got the same error message.
    Is it a limtation in ABAP that i cannot write a dynamic query for the where clause while looping at an internal table?
    Regards,
    om

    Hi savita,
    there in no such 1 limitaion in abap for dynamic query .. i think the  error meassge is only beacuse of your synatx delcartaion.
    >> LOOP AT i_cfx_col INTO wa_cfx_col
       WHERE (l_where_clause).
       count = count + 1.
    some business logic implemented using the work     area    wa_cfx_col
       endloop.
    afted delclarataion also , in the where statement you should specify both the field name and value bname
       LOOP AT i_cfx_col INTO wa_cfx_col
       WHERE l_where_clause = 'CREATED_BY = l_name' .
       count = count + 1.
    hope it helps.
    regads
    priya.

  • Performace Which is better ?  : Bapi inside a loop OR Select from Tables

    Hi Gurus,
    I have a report which displays purchase info records.
    If I am selecting from tables i need to use EINA, EINE, EORD and some other tables.
    There is a BAPI which gets all purchase info records specific to a vendor , material , purchasing organisation.
    QUESTION: Performace wise which is the better Approach, either selecting from tables or BAPI for Purchase info records
    Regards
    Avi.

    Whether it using BAPI or select. you need to check the performance. If you have full key for these tables EINA, EINE, EORD  then mak a select outside of the loop and within loop use READ TABLE statement with binary search. of if you want multiple records within loop then use loop insdie loop.
    Your final objective is to minimise the database hits . If you use bapi inside loop then your database hits will be more
    select from EINA
    select from EINE
    select from EORD
    loop at itab,
      read table EINA
      read table EINE
      read table EORD
    endloop

  • How can I generate a table of contents from bookmarks

    How can I generate a Table of Contents from bookmarks in Adobe Acrobat XI?

    Something to try.
    Rick Bostein  provided a "Create Bookmark Report" Acrobat Action.
    With this report as a PDF you could insert it at the start of your PDF document to serve as a "TOC". 
    Go here:
    https://acrobatusers.com/actions-exchange 
    Scroll down some.
    Be well...

  • I cannot generate a table of contents in INDesign3

    Hi There:
    I'm fairly new to Indesign CS3 and I need to generate a table of contents. I created a book file which consists of 20 chapters. I also created a Frontmatter file, which is also part of the book file. According to the help menu, I should open up the FM file and choose, LAYOUT>TABLE OF CONTENTS to begin. However this option under layout doesn't exist. Is there a plug-in I am missing. HELP! I need to generate this TOC at some point today.
    thanks much to whomever can help.
    -Lisa

    As far as I know, it should be there always unless the menus themselves have been turned off by someone. Might as well check though.
    1) GO to Edit > Menus (opens Menu Customization)
    2) Select Application Menus from the Category field
    3) Expand "Layout" under Application Menu Command and make sure the Visibility icon is active for the TOC items (at bottom)
    edit: Of course you could also go to Window > Workspace and select reset menus

  • Can you generate a Table of Contents using bookmarks?

    Hi,
    I am a newbie to InDesign and am probably missing the obvious but...
    I am creating a document in InDesign and want to generate a Table of Contents. I have just created a de facto ToC with Bookmarks for the exported PDF version of the file, but there seems to be no way to take this information and use it to creat an actual ToC in the ID file itself. My bookmark list contains the information for all the chapter and sub headings along with the page locations, all the data I need to create my ToC, but I can't find a way to do this. I don't understand why I have to use paragraph styles to set this up? It is overly complicated for my needs, added to that it is duplicating my work. If I have to set up paragraph styles for the print version and bookmarks for the PDF version, why can't one set of information be used to generate both version of a Toc?

    You don't consider 100 pages a long doc? Ouch. If it needs a TOC, I'd say that's pretty definitive for it being long.
    I know users who set up styles for even one-page projects. I figure it's worth setting up a style for any formatting that will repeat more than twice, regardless of document length. It's pretty fast using the format/select/define style method  of formatting text the way you want, then selecting it and choosing "New Style" from the appropriate panel.

  • Generating a table

    hello all
    I have this app that gets connected to a database, and then when i pass a parameter, it should return a result set. now what i have to do is present that table in a jsp page. How can i generate that table in a dinamic way?

    don't pass the result set to the jsp. load it into a data structure or object of some kind and close it in the scope of the method in which it was created.
    add that data structure or object at request or session scope as an attribute and have the jsp display it using jstl. if it's a collection, use <c:forEach> to iterate over the collection and create a <tr> for each row.
    maybe something like this:
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jsps/JstlSql.jsp.html
    %

  • Populating values in dynamically generated internal table

    Hi,
    We can generate internal tables dynamically and also populate them with values from database.But is there any way to populate the dynamically generated internal table(has 2-3 selected fields) with values from another internal table(has all fields required by the program) being populated within the same program?
    Thanks & Regards,
    Savitha

    Hi
    Dynamic internal table is internal table that we create on the fly with flexible column numbers.
    For sample code, please look at this code tutorial. Hopefully it can help you
    Check this link:
    http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
    Reward points if useful
    Regards
    Anji

  • Strange name of generated XML table

    Hi,
    I have registered schema and I got XMLType table with name like:
    "mainElem514_TAB".
    I know that I can use annotation to change the name.
    Is it possible to generate the table(without annotation) with name mainElem514_TAB ?
    I mean without "".
    regards,
    Cezary

    Annotation is the preferred way of doing this, particularly if you want to work with the XML repository feature. You can create tables manually. Look at the XDB Documentation for more info...
    http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10790/xdb05sto.htm#sthref510

  • Error when generating create table script

    Hi,
    I am trying to generate create table script from an existing table. But I get the following error when doing so,
    ORA-20001: Rem Unable to generate DDL for ORA-06502: PL/SQL: numeric or value error ORA-31605: the following was returned from LpxXSLResetAllVars in routine kuxslResetParams: LPX-1: NULL pointer ORA-22921: length of input buffer is smaller than amount requested .
    Any suggestions on what could be wrong?
    Thanks.
    -B

    this is my bad, i should have updated this thread when we originally troubleshot this issue...
    that error you're getting on htmldb.oracle.com when you try to generate ddl for tables and such is a manifestation of a database bug (#3372908) that's recently been filed. checking the worklog for that bug suggests that those guys are still working out the issue. unfortunately, there's no current work-around on htmldb.oracle.com at the moment. if you want to generate ddl for your objects, you'd have to query the appropriate data dictionary views to get the info you need.
    ...i'll update the htmldb.oracle.com interface in a bit to prevent other users from hitting this issue. so you know, this is only an issue on db versions 9.2.0.3 and 9.2.0.4 running on some platforms and only (as far as i know) those using the AL32UTF8 characterset ...which does include our hosted site for now.
    hope this helps,
    raj

Maybe you are looking for

  • From the Web application does not display the report...

    Hello, I have a Web application in VS 2010 (NET 4.0) running reports in VS 2003 (NET 1.1) and CR XI. What should I consider for the reports to run well? When setting up the basics of the folder where the reports are in IIS 7.5, item I keep in the App

  • Re: Equium - S-Video connection to TV doesn't work anymore

    I used to be able to clone or extend my desktop onto external tv's using the s-video connection. This has all of a sudden stopped, the cable is fine as are the tv's as I've tried them with other laptops, and the s-video port in the laptop looks and f

  • Odd battery life issues after improvement w/ 5.1

    I have an iPhone 4 GSM (AT&T) that was experiencing significant battery life issues with the previous version of iOS (5.0.1?). After updating to iOS 5.1, the battery life improved signifcantly - I could now get comfortably through a day with 50% rema

  • Hi guys please give me sample code for call transaction that handles error

    hi guys, please give me sample code for call transaction that handles error, please send me the sample code in which there should be all decleration part and everything, based on the sample code i will develop my code. please do help me as it is urge

  • Best Practice for Apex Implementation

    Hello, I'm looking for some guidance in best practices on implementing Apex across our enterprise. Do we install it on many databases based on whether an application gets most of its data from that database? And if so, could we use one 10gAS web serv