Nesting Data table Components

Hi ,
I am having a problem using the new data table component in SJSC 2 EA2. I need to have data table nested inside the colum of a outer datatable. I assign the sourcedata propertiy of the first table to a ObjectArrayData Provider. Then i set one of the columns in the table to group panel and add another data table(Nested ) into it. It shows up fine inthe designer. The Object in the parent tables row has a getter for an array of another classes objects. The problem is if i set the source data property of the nested table using #{currentRow.value['']} to the name of the array object return by the parent object we get a property not found exception when running. Is there any referances as to how to nest data table compoenents in Java Studio Creator 2 EA2
Thanks
kusan

Hi,
Please post queries related to SJSC 2 EA2 at:
https://feedbackprograms.sun.com/login.html
Cheers
Giri

Similar Messages

  • Delete a Row from a Nested Data Table

    Hi... Good day...
    I have a dataTable nested within another DataTable.
    I want to delete a Row from the nested DataTable on clicking a remove Button at the Last column of the Nested DataTable, Jus in the browser.
    How to accomplish this using JavaScript?
    Here is my Code Snippet..
    <h:dataTable value="#{myListBean.rpts}" binding="#{myListBean.parent}" var="item" headerClass ="header" rowClasses = "whiteRow,grayRow" cellspacing="0" cellpadding="4" border = "0"  id = "dataTable">
    <h:column>
         <h:graphicImage id="expand" value="static/images/plus.gif" onclick="showNested(this);" rendered="#{item.schedImgurl=='static/images/scheduled.gif'}"/>
          <div id="#{item.rptId}">
          <h:dataTable id="orderLines" binding="#{myListBean.child}"  value="#{item.scheduleList}" var="schedItem" style="display: none;">
          <h:column>
           <h:outputText value="#{schedItem.scheduleID}" style="display:none;" />
             <f:facet name="header" >
                   <h:outputText value="Scheduled Criteria"/>
              </f:facet>
             <h:outputText value="#{schedItem.scheduleCriteriaName}" />
             <span onMouseOver="JavaScript:showScheduleTooltip(event,'#{schedItem.toolTipCriteraia}')" onMouseOut="JavaScript:hideTooltip()">...</span>
          </h:column>
            <h:column>
           <f:facet name="header" >
          <h:outputText value="Frequency"/>
          </f:facet>
           <h:outputText value="#{schedItem.scheduleFrequency}" />
          </h:column>
          <h:column>
           <f:facet name="header" >
           <h:outputText value="On"/>
           </f:facet>
           <h:outputText value="#{schedItem.scheduleStartDate}" />
          </h:column>
          <h:column>
            <input type="button" value="Remove"onclick=" Remove();"/>
          </h:column>
    </h:dataTable>
    </div>
    </h:column>
    </h:dataTable>Whatz that I need to do inside the Remove() JavaScript Function ?

    Ram_J2EE_JSF wrote:
    How to accomplish this using JavaScript?Using Javascript? Well, you know, Javascript runs at the client side and intercepts on the HTML DOM tree only. The JSF code is completely irrelevant. Open your JSF page in your favourite webbrowser and view the generated HTML source. Finally just base your Javascript function on it.

  • Adding custom column to a Data Table (bound to database table)

    Hello,
    I've added an additional "Output Text" column to an existing "Data Table" component, which is pulling a database table and rendering it. It's actually called "OutputText5". What I want to do, is set the value of the "OutputText5" dynamically, depending on a Date comparison between the system date, and one of the currentRow field values, which is actually an Oracle Date data type. basically I'm trying to use the Date.after() comparison and put different content in there depending on true or false evaluation.
    Seems simple enough .. but.. I'm trying to do this without using vim and JSP Beans (how I'd usually do this). I'm not experienced with JSF components and how this would be done using JSC - can I iterate over currentRow or something inside the "Page1.java" source? Is there an easy way to create dynamic value bindings like this in Data Table components in general? Maybe using expressions in "OutputText5" properties or something? I figure I should ask about doing this the easy way, before I spend lots of time and start teaching myself bad habbits.
    I apologise in advance if this is a repeat post. I spent some time searching ,but came up empty handed.
    Thanks in advance.
    David Basham

    Hi David,
    Here's some ideas to try on:
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=49459
    hth,
    v

  • Problem reading data from nested internal table.

    Hi,
    Below is my code;
    *********SAP Code********
    TYPES: BEGIN OF v54a0_scdd,
             fknum  LIKE vfkk-fknum,
             change LIKE vfkkd-updkz,
             x      TYPE v54a0_scd,
             y      TYPE v54a0_scd,
             tvtf   LIKE tvtf,
           END OF v54a0_scdd.
    SCD table for dialog
    TYPES: v54a0_scdd_tab TYPE v54a0_scdd OCCURS 1.
    *********SAP Code********
    *Custom declaration*****
    data: wa_freight_costs type v54a0_scdd_tab.
    data: it_freight_costs type v54a0_scdd_tab occurs 0.
    *****Here data is getting appended to it_freight_costs. P_frieght_costs is coming from standard program.
         move p_freight_costs TO wa_FREIGHT_COSTS.
         append wa_freight_costs to it_freight_costs.
         clear wa_freight_costs.
    ***Now the problem is here. I am not able to read the data from the nested internal table x-item.
    if i use <fs_f_costs> to move data from it_freight_costs in the outer loop, i get a syntax error; <i> "the line type of the table it_freight_costs is not compatible with field symbol type <fs_f_costs>" </i>
         FIELD-SYMBOLS: <fs_f_costs> type line of v54a0_scdd_tab.
          LOOP AT it_freight_costs assigning <fs_f_costs>.
              LOOP AT <fs_f_costs>-x-item ASSIGNING <fs_freight_item>.        
                  <b> I want to read <fs_freight_item>-vfkp-netwr.</b> 
             ENDLOOP.
    Can anyone guide me?

    A quick look at how I would do this. Note I haven't checked if this compiles just done a quick brain-dump.
      DATA: lr_f_costs TYPE REF TO v54a0_scdd_tab,
            lr_f_cost TYPE REF TO v54a0_scdd.
      LOOP AT it_freight_costs REFERENCE INTO lr_f_costs.
        LOOP AT lr_f_costs->* REFERENCE INTO lr_f_cost.
        ENDLOOP.
      ENDLOOP.
    As you can see I personally prefer pointers to field symbols - I don't believe there is any performance differences and because of my background in other languages pointers make more sense to me.
    Cheers
    Graham Robbo

  • Data table header facet with multiple components?

    Hi,
    I have a data table to which I wish to add buttons to change the sort order of the items displayed. However when I add the 'buttons' to the 'header' facet I get strange results - some components are shown, some are not, and the order they appear seems almost random.
    Is the header / footer facet designed only for one component - or can I combine them somehow?
    Code snippet is
    <h:dataTable id="table" rowClasses="oddRow,evenRow" width="80%"
    value="#{ControllerBean.orderedResults}" var="meet">
    <h:column>
    <f:facet name="header">
    <h:commandLink action="#{ControllerBean.setOrder}">
    <h:graphicImage value="/img/up.gif" style="border: 0px" />
    <f:param name="order" value="up-title" />
    </h:commandLink>
    <h:outputText value="#{msgs.title}" />
    <h:commandLink action="#{ControllerBean.setOrder}">
    <h:graphicImage value="/img/down.gif" style="border: 0px" />
    <f:param name="order" value="down-title" />
    </h:commandLink>
    </f:facet>
    <h:outputText id="meetTitle"
    value="#{meet.title}" />
    </h:column>
    etc..
    So to be clear - I want a header that contains two graphic buttons separated by the text. When I run this code as is here, I get just the 'down' button, but by changing the order I can sometimes get the down button and the text......
    Cheers
    Reeling

    Yes, you can place it in a panelGrid or panelGroup component.
    The following is an excerpt from a book:
    TIP: To place multiple components in a table header or footer, you must
    group them in an h:panelGroup tag, or place them in a container component
    with h:panelGrid or h:dataTable. If you place multiple components in a facet, only the
    first component will be displayed.
    Thus you could have something like:
                   <f:facet name="header">
                        <h:panelGrid columns="1">
                             <h:outputText value="#{fields.recordings}" style="font-weight: bolder" />
                             <h:panelGroup>
                                  <h:outputText value="#{fields.type}" style="font-weight: bolder"/>
                                  <h:outputText value="#{fields.date}" style="font-weight: bolder"/>
                                  <h:outputText value="#{fields.time}" style="font-weight: bolder"/>
                             </h:panelGroup>
                        </h:panelGrid>
                   </f:facet>

  • A data table in one column of a dynamic data table

    Hi , I have to design a dynamic data table(with dynamic columns and data) which looks as the following
    DETAILS      NAME      ROLE NUMBER     CLASS     SECTION
    15     MATHS     SURESH     15     10     A
    20     SCIENCE                    
    25     ENGLISH     
    15     MATHS     SURESH     15     10     A
    20     SCIENCE                    
    25     ENGLISH          
    The data in the column 'DETAILS' should have inner table. The data in this inner table should have hyper links. If there is no inner table infor mation there shold be an image with hyperlink. This data table should also have pagination and sorting features. Please send me some example code for this. Please help me out as i have client demo on monday

    You may find this example useful: [http://balusc.blogspot.com/2006/06/using-datatables.html#NestingDatatables].
    To toggle between a nested datatable and a hyperlink with image just use the rendered attribute. E.g.
        <h:column>
            <h:dataTable rendered="#{!empty dataItem.innerList}">
            </h:dataTable>
            <h:commandLink rendered="#{empty dataItem.innerList}">
            </h:commandLink>
        </h:column>
    ...

  • Create xml file with nested internla table or with header & item tables

    Hi I have a requirement like, I need to create an xml file for header and item details. For 1 header there may be multiple line items.
    I did search in forums some where I came to know that we can use XSL:IF to achieve this. but I could not able to do this.
    I tried with using nested internal tables also but now luck.
    can anybody please suggest how can we create xml for header and item detials.
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
      xmlns:asx="http://www.sap.com/abapxml"
      exclude-result-prefixes="asx"
    >
    <xsl:template match="/">
      <OrbisomRequest>
        <xsl:attribute name="Version">
          <xsl:value-of select="11.1"/>
        </xsl:attribute>
        <xsl:attribute name="IssuerID">
          <xsl:value-of select="1"/>
        </xsl:attribute>
        <xsl:for-each select="asx:abap[1]/asx:values[1]/T_FINAL[1]/*">
    <CreateApprovedPurchaseRequest
           RerquestID="{VBLNR}"
           CommonName="User1"
           Amount="{WRBTR}"
           Comment="TestComment"
           CurrencyCode="978"
           PurchaseType="All"
           SupplierName="All"
           VCardAlias="PurchaseCard"
           ValidFrom="1M"
           CurrencyType="B">
                    <CDFs>
                      <Invoice> <xsl:value-of select="BELNR"/> </Invoice>
                      <Amount> <xsl:value-of select="WRBTR"/> </Amount>
                    </CDFs>
          </CreateApprovedPurchaseRequest>
        </xsl:for-each>
      </OrbisomRequest>
    </xsl:template>
    </xsl:transform>
    here belnr and wrbtr will be my item details. for each payment document I can have multiple invoices. in CDF I need to display the invoices for that particular payment document.
    what conditions can I put there before CDFs to make the item internal table to loop based on header internal table.
    Regards,
    Ranganadh.

    Looks like you have already created the transformation "Z_ID"
    Take a look at the following thread, it answers many of the questions you have asked:
    [ABAP data to XML conv with UTF-8 encoding and custom namespace|Re: ABAP data to XML conv with UTF-8 encoding and custom namespace;
    Che

  • Dynamic Creation of Data Tables and Fields

    Hello all. I am currently working with a system that contains a bunch of windows. These windows are divided into two groups that represent their presentation style: Columns (such as a table) and Free (such as in a form). I created two tables in database to describe each and every window. These tables describe the type of presentation style, the fields of each window (title of the field, size of the field, position in window, and many more...)
    I did this to make the creation of the windows more effective. In this way that I have, I only have to make one window to display all the thousands of windows that I have in my database because the values of presentation are taken from the description in the tables.
    I was able to do this through TextFields and JTables in Swing. But now I run into JSC. Is this possible with JSC? Say in case the presentation style of the window is Column, can I tell the data table to go read the description of the window that needs to be opened to obtain the amount of columns, the column names, the size of each column... then create the tables and present the values?
    Or say the presentation style is Free... I need to go find how many fields need to be created and their positions in the form, and then the titles of each field. Any ideas how this can be performed?
    Thank you.
    Franklin Angulo

    >
    I was able to do this through TextFields and JTables
    in Swing. But now I run into JSC. Is this possible
    with JSC? Say in case the presentation style of the
    window is Column, can I tell the data table to go
    read the description of the window that needs to be
    opened to obtain the amount of columns, the column
    names, the size of each column... then create the
    tables and present the values?
    Or say the presentation style is Free... I need to go
    find how many fields need to be created and their
    positions in the form, and then the titles of each
    field. Any ideas how this can be performed?
    Creator won't help you with the graphical design, but it's definitely possible to dynamically compose the set of components that are children of a particular component. Doing so leverages the basic component APIs of JSF (javax.faces.component.UIComponent), so you'll want to grab yourself a copy of the JSF Javadocs (or use Creator's lookup facilities as you type your code) to understand what's possible.
    The most important detail is that all components have a getChildren() method that returns a java.util.List of the child components for that component (as well as a getParent() to get the parent component). Any manipulation you do on this returned list is reflected in the structure of the overal component tree.
    As a simple example, assume you want to add an input text component as a child of the form. You'd do something like this:
    HtmlInputText input = new HtmlInputText();
    input.setXxx(..); // Set properties as needed
    form1.getChildren().add(input); // add new childCraig McClanahan

  • Spry select list code to wire it to html data table SET column?

    I am making a page based on Figure 15-14, Pg 878, in David Power's book, "Dw CS4 with CSS, Ajax and PHP. I have two separate html data tables hidden in the page, one for the specialties drop down select list and the other for the teachers master/detail regions. These are populated with php and working well. The spry select list and master/detail regions are working great except for one issue. The column in my html data table that is being filtered ("Specialty" in my code = 'Category' in the book's example code) is a SET column (with possible value of 1, 2, 3, 4, and/or 5). Clicking on the drop down menu brings up the records with a single value beautifully. The result for records with multiple values is a spry error "Invalid row number: 0". After four different versionings and methods of messing with this, I still haven't a clue. Please help me with how to rewire the Spry select list code so that it will read the records that have multiple items in that column. I have included the code below.
    var data_set_teachers = new Spry.Data.HTMLDataSet(null, "teacher_data");
    data_set_teachers.gallery = '1';
    function chooseSet(dataSet, row, rowNumber)
    if (row["Specialty"] == data_set_teachers.gallery) {
       return row;
    return null;
    data_set_teachers.filter(chooseSet);
    function changeSet(set)
    data_set_teachers.gallery = set;
    data_set_teachers.filter(chooseSet);
    data_set_teachers.setCurrentRowNumber(0);
    var rows = data_set_teachers.getData();
    for (var i = 0; i < rows.length; i++) {
       if (rows[i]["Specialty"] == set) {
         data_set_teachers.setCurrentRowNumber(i);
         break;
    var data_set_specialties = new Spry.Data.HTMLDataSet(null, "specialty_data");

    Well I'll be damned!
    What's done in the sample app is, of course, the intuitively obvious choice and is exactly what I started out trying to do the first time round.
    But as I mentioned before, when I first tried it (yes: I'm pretty sure I set the "for" attribute on the inlineMessage components), I got the non-unique component id exception for the inlineMessage component(s) after adding the second (but not the first) row to the page.
    Anyway, after dragging my inlineMessages to the exact same position as those in the AppModel example, now things work fine (except I think I'd like a line break before the message and to change the row/column styles so the values and messages line up properly...the look is rather ugly in the AppModel example when there are validation messages displayed).
    Not sure, but I'm thinking maybe there was an issue with where the inline message markup was placed, my first time through, relative to the data table value bound component and the column header facet?
    I was using the application view drag 'n drop feature the first time round and dragged the inlineMessage component to the spot just below the data table value bound component and hence just above the column header facet. In the AppModel example, OTOH, the inline messages are placed just after the column header facet.
    Of course, I will now try to duplicate the original exception.
    If I can (and it is an issue with placement), I will post back some sort of bug report or RFE. Otherwise, I'll post back declaring what a bone head I've been...;-)
    Anyway, thanks for the quick response, v.
    Campbell

  • How to get row index of data table in the while ValueChangeListener fired?

    Hi,
    i have a data table in my page, which contains various components like inputText, selectOneChoice in each row.
    i am invoking a method ValueChangeListener attribute of the selectOneChoice component. I have given the autoSubmit=true for this component.
    <tr:selectOneChoice id="ratingModelType"
    value="#{childRatio.ratingModelType}" binding="#{pageManager.form.bindRatioType}"
    valueChangeListener="#{pageManager.form.onRatingModelTypeChange}" autoSubmit="true"
    contentStyle="width:150px" required="#{!childRatio.disableChildRatioRatingModelType}"
    requiredMessageDetail="#{appBundle['error.ratingModelTypeShouldNotBeEmpty']}">
    <f:selectItems value="#{pageManager.catalog['Rating Model Type']}" />
    <tr:selectOneChoice>In that method i want to fetch the map(with all updated values) relevant to the currently modified row of the table.
    Since i am not using the selectionListener or any radio buttons in the page i am not able to get the row index of the table.
    somebody please tell me how to get the row index of the table, while ValueChangeListener fired?
    Thanks in advance.
    Subbu

    Hi niki,
    Thank you so much. With your suggestion i got the result exactly what i want.
    thanks again.
    --subbu                                                                                                                                                                                                                               

  • How can I Add and save new row in data table?

    Hello All,
    I want to add new row in the jsf page with data and save it.
    I have data table with rows from database..
      <h:form id="test">
            <h:dataTable id="hh" value="#{MyBean.dataList}" var="list">
              <h:column>
              <h:outputText value="#{list.name}"/>          
              </h:column>         
              <h:column>
              <h:outputText value="#{list.lastName}"/>          
              </h:column>         
              <h:column>
              <h:outputText value="#{list.phone}"/>          
              </h:column>         
            </h:dataTable>
            <h:commandButton id="sd" action="#{MyBean.addNewRow" value="Add Row" />
            <h:commandButton id="save" action="#{MyBean.updateList" value="Save Data />
          </h:form>
    {code}
    i understand action with save to database, but still I could not find right way to add new row from jsf page.....
    I want add new row, add new name, lastname, and save it....
    Edited by: armen on Feb 20, 2009 12:39 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Thanks, but your example consist from too many parts and I could not join all components for understatnding all proccess.

  • Nested Internal Table Tables and REUSE_ALV_GRID_DISPLAY

    Can you display entries from a nested internal table in the using the call function 'REUSE_ALV_GRID_DISPLAY'?
    Types and internal tables are below.  I have skimmed the code for the function module below, assume field category built, etc.. The table is in the tables portion of the function module, the nested internal table is inside of int_output defined as data: int_tlines type t_tline occurs 0.
    TYPES:
    BEGIN OF t_tline,
    tdformat type tline-tdformat,
    tdline type tline-tdline,
    END OF t_tline.
    DATA:
    BEGIN OF int_output occurs 0,
      qmnum       TYPE qmnum,
      sys_stat    TYPE j_stext,
      kunum       TYPE qkunum,
      sting       TYPE string,
      numr        TYPE vbeln,
      bstnk       TYPE bstkd,
      vbeln       TYPE kdauf,
      erdat(10)   TYPE c,
      aufnr       TYPE aufnr,
      werks       TYPE werks_d,
      idat2(10)   TYPE c,
      otgrp       TYPE otgrp,
      oteil       TYPE oteil,
      fd_text     TYPE qtxt_code,
      fegrp       TYPE fegrp,
      fecod       TYPE fecod,
      pb_text     TYPE qtxt_code,
      fetxt       TYPE fetxt.
      data: int_tlines type t_tline occurs 0.
      data: QMTXT TYPE QMEL-QMTXT,
      NOTIF_TXT   TYPE STRING,
      bautl       TYPE bautl,
      bautx       TYPE bautx,
    END OF int_output.
    DATA: i_output      LIKE STANDARD TABLE OF int_output,
    w_output      LIKE LINE OF int_output.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
        TABLES
          t_outtab                 = int_output
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.

    Hi
    I dont think this requirement is possible. Even if we pass the data through the nested internal table the FM may not give a dump. The main problem will be with field catalog. How can we build field catalog for the fields inside the nested internal table.
    Field catalog for this FM REUSE_ALV_GRID_DISPLAY should be of type SLIS_FIELDCAT_ALV and this is a standard one.

  • Expand All and Collapse All with Data table

    Hi Guys,
         I have a data table as shown in code pasted . where the first and second column have row category which gives a categorization with a twisty.
         When i click on the twisty or item name the level beneath it expands. Eerything works fine.. but i need to have to links     Expand All and Collapse All which when clicked open the entire hierarchy or collapse it. Can anyone suggest a way of doing. Can it be done using javascript, I am not comfortable with java script .If someone has done this before please share the piece of code.Also please suggest the different ways of doing it. I am using RAD 7 and IBM JSF components.
         <hx:dataTableEx border="0" cellpadding="2" cellspacing="0"
         columnClasses="columnClass1" headerClass="headerClass"
         footerClass="footerClass" rowClasses="rowClass1, rowClass2" binding="#{masterPublList.tablebindData}"
         id="tableEx1" styleClass="dataTableEx" value="#{masterPublList.lst_publication}" var="varlst_publication">
              <hx:columnEx id="columnEx3">
                   <hx:panelRowCategory id="rowCategory2"
                        styleClass="panelRowCategory"
                        value="#{varlst_publication.publCategory}" collapsed="true">
                   </hx:panelRowCategory>
              </hx:columnEx>
              <hx:columnEx id="columnEx2">
                   <hx:panelRowCategory id="rowCategory1"
                        styleClass="panelRowCategory" value="#{varlst_publication.publSubCategory1}">
                        <h:outputText id="text5" styleClass="outputText"></h:outputText>
                   </hx:panelRowCategory>
              </hx:columnEx>
              <hx:columnEx id="column1">
                   <hx:outputLinkEx id="linkEx1" styleClass="outputLinkEx" value="#{varlst_publication.publUrl}" target="_blank">
                        <h:outputText id="text3" styleClass="outputText" value="#{varlst_publication.publName}"></h:outputText>
                   </hx:outputLinkEx>
              </hx:columnEx>
              <hx:columnEx id="columnEx1">
                   <h:selectManyCheckbox disabledClass="selectManyCheckbox_Disabled"
                        id="checkbox1" styleClass="selectManyCheckbox" value= "#{varlst_publication.publLang}">
                        <f:selectItems value= "#{masterPublList.lst_lang}"/>
                   </h:selectManyCheckbox>
              </hx:columnEx>
         </hx:dataTableEx>
                   Thanks in anticipation

    Hi Naamkeek,
    Per my understanding that you have added the Expand All and Collapse All button in an drill down report by adding the "Go to report" action, now you got the report always refresh and return to the first page, right?
    I have tested on my local environment and can reproduce the issue, no matter whether to add two buttons or using the parameter to do the Expand All and Collapse All, it is always return to the first page.
    Gernerally, SQL Server Reporting Services does a postback while clicking a expand/collapse icon. SSRS re-renders reports because it need to regenerate the pages to fit the defined width & Height. That is why SQL Server Reporting Services reloads
    the whole report.
    This is by design. And, currently, we are not able to turned it off.
    I would suggest you submitting a wish at
    http://connect.microsoft.com
    If the service requests frequently, we may include it in the next release.
    Appreciate your understanding, and if you have any more questions, please feel free to ask.
    Regards
    Vicky Liu

  • Nested data help

    Hello all,
      I have two internal tables for PO line items: 1) POitems that contains data like POdoc number, POline number, MATNR, MATDESC, QTTY, AMOUNT Etc. 2) POTexts that contains PO Texts.
    I want to print the data in the form in this format:
    Matnr | Description | QTTY| Amount|   on the first line and then the PO texts for that line item from the next line onwards.
    The PO Texts can be any number of lines depending on what user put in the PO for that line item.
    I tried to nest the tables but I get all the line items printed first and then the PO texts. For example, if I have 5 line items in the PO. The data Matnr | Description | QTTY| Amount|  for all five items is first printed and then the PO texts for all these five line items are printed. I just can't get this to work. Any help is appreciated.
    Thanks.

    The issue is resolved. In the context tab, for the PO text tableI had not put the where conditions for EBELN = IT_EKPO-EBELN and EBELP = IT_EKPO-EBELP. Works perfect now.

  • What are nested Internal tables

    Hi Guru's,
    I am new to ABAP ...just trying to learn things.Can you please explain me what are nested internal tables and what is the purpose of nested internal table?where can it be used and why a header line is not written in a Nested Internal table...
    Kindly explain it (scenario where nested internal tables are used) with an example it will be helpful.
    Cheers,
    Priyanka

    Hi,
    When storing data in internal tables, you often use one internal table for each database you read.
    Each one contains some or all columns of the relevant database table. It is up to you whether
    you create an internal table with a flat structure for each database table or if you create, for
    example, internal tables with nested structures. If you have several tables, each one with a flat
    structure, you have to work with redundant key fields to link the tables. If, on the other hand, you
    use nested internal tables, you can store the data from the database tables hierarchically.
    Saving and processing very large amounts of data in internal tables has disadvantages. If you
    divide up the data into different internal tables, processing it can be very runtime-intensive, since
    the tables have to be processed individually. Furthermore, it requires a lot of storage space,
    since internal tables are not stored in compressed form. The system may even need to store the
    dataset outside of its working memory. This means that processing it takes even longer.
    An example of nested internal table:
    Assume the following program is linked to the logical database [Page 1163] F1S.
    REPORT DEMO.
    DATA: SUM TYPE I, CNT TYPE I.
    NODES: SPFLI, SFLIGHT, SBOOK.
    DATA: BEGIN OF WA_SBOOK,
    BOOKID TYPE SBOOK-BOOKID,
    SMOKER TYPE SBOOK-SMOKER,
    CLASS TYPE SBOOK-CLASS,
    LUGGWEIGHT TYPE SBOOK-LUGGWEIGHT,
    WUNIT TYPE SBOOK-WUNIT,
    END OF WA_SBOOK.
    DATA: BEGIN OF WA_SFLIGHT,
    FLDATE TYPE SFLIGHT-FLDATE,
    SBOOK LIKE TABLE OF WA_SBOOK,
    END OF WA_SFLIGHT.
    DATA: BEGIN OF WA_SPFLI,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    CITYFROM TYPE SPFLI-CITYFROM,
    CITYTO TYPE SPFLI-CITYTO,
    SFLIGHT LIKE TABLE OF WA_SFLIGHT,
    END OF WA_SPFLI.
    DATA TAB_SPFLI LIKE TABLE OF WA_SPFLI.
    START-OF-SELECTION.
    GET SPFLI.
    REFRESH WA_SPFLI-SFLIGHT.
    GET SFLIGHT.
    REFRESH WA_SFLIGHT-SBOOK.
    GET SBOOK.
    MOVE-CORRESPONDING SBOOK TO WA_SBOOK.
    APPEND WA_SBOOK TO WA_SFLIGHT-SBOOK.
    GET SFLIGHT LATE.
    MOVE-CORRESPONDING SFLIGHT TO WA_SFLIGHT.
    APPEND WA_SFLIGHT TO WA_SPFLI-SFLIGHT.
    GET SPFLI LATE.
    MOVE-CORRESPONDING SPFLI TO WA_SPFLI.
    APPEND WA_SPFLI TO TAB_SPFLI.
    END-OF-SELECTION.
    SORT TAB_SPFLI BY CITYFROM CITYTO CONNID.
    LOOP AT TAB_SPFLI INTO WA_SPFLI.
    SKIP.
    WRITE: / WA_SPFLI-CARRID,
    WA_SPFLI-CONNID,
    'from', (15) WA_SPFLI-CITYFROM,
    'to', (15) WA_SPFLI-CITYTO.
    ULINE.
    SORT WA_SPFLI-SFLIGHT BY FLDATE.
    LOOP AT WA_SPFLI-SFLIGHT INTO WA_SFLIGHT.
    SKIP.
    WRITE: / 'Date:', WA_SFLIGHT-FLDATE.
    WRITE: 20 'Book-ID', 40 'Smoker', 50 'Class'.
    ULINE.
    SORT WA_SFLIGHT-SBOOK BY CLASS SMOKER BOOKID.
    SUM = 0.
    CNT = 0.
    LOOP AT WA_SFLIGHT-SBOOK INTO WA_SBOOK.
    WRITE: / WA_SBOOK-BOOKID UNDER 'Book-ID',
    WA_SBOOK-SMOKER UNDER 'Smoker',
    WA_SBOOK-CLASS UNDER 'Class'.
    SUM = SUM + WA_SBOOK-LUGGWEIGHT.
    CNT = CNT + 1.
    ENDLOOP.
    ULINE.
    WRITE: 'Number of bookings: ', (3) CNT,
    / 'Total luggage weight:',
    (3) SUM, WA_SBOOK-WUNIT.
    ENDLOOP.
    ENDLOOP.
    Thanks.

Maybe you are looking for