Item Number in Dynamic Table Quirk

I'm a new LC user, ramping up to speed on this package, thanks to everyone for the useful information here and other places.
Using the great advice and info here,
http://www.assuredynamics.com/wp-content/uploads/2010/11/Assure-Dynamics-Building-dynamic- tables.pdf
I added a dynamic table to a form I've been working on.  Most everything works, except the caption on the Row/Item number.  So, I yanked out the subform with the table on it to create a simpler copy of the form to post here.  Get this...  it works on the simple form.  So, there's something going on on my not so simple form that is preventing my Row/Item number from working. 
I'm hoping that if I post both forms here, someone can help me fix this thing.
this is the form that works:
http://inthequeue.com/adobeLC/Template_excerpt.pdf
this is the form that does not work:
http://inthequeue.com/adobeLC/Template_std.pdf
Thanks in advance
John Q.

Hi John,
Try changing the code in the layout:ready event from;
this.caption.value.text = (this.parent.index + 1).toString();
To;
this.caption.value.text.value = (this.parent.index + 1).toString();
That is add another ".value".
Your form that works targets Reader 8.0 or later and the one that doesn't Targets Reader 9.0 or later, I'm guessing that is the difference.
Regards
Bruce

Similar Messages

  • Dynamic binding of items in sap.m.Table using XML views

    Dear SAPUI5 guru's,
    Let's start by saying I'm an ABAP developer who's exploring SAPUI5, so I'm still a rookie at the time of writing. I challenged myself by developing a simple UI5 app that shows information about my colleagues like name, a pic, address data and their skills. The app uses the sap.m library and most of the views are XML based which I prefer.
    The data is stored on an ABAP system and exposed via a gateway service. This service has 2 entities: Employee and Skill. Each employee can have 0..n skills and association/navigation between these 2 entities is set up correctly in the service. The data of this service is fetched from within the app using a sap.ui.model.odata.ODataModel model.
    The app uses the splitApp control which shows the list of employees on the left side (master view). If a user taps an employee, the corresponding details of the employee entity are shown on the right (detail view).
    Up till here everything is fine but I've been struggling with my latest requirement which is: show the skills of the selected employee in a separate XML view when the user performs an action (for the time being, I just created a button on the detail view to perform the action). After some hours I actually got it working but I doubt if my solution is the right way to go. And that's why I'm asking for your opinion here.
    Let's explain how I got things working. First of all I created a new XML view called 'Skills'. The content on this view is currently just a Table with 2 columns:
    <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
      controllerName="com.pyramid.Skills" xmlns:html="http://www.w3.org/1999/xhtml">
      <Page title="Skills"
           showNavButton="true"
           navButtonPress="handleNavButtonPress">
      <content>
      <Table
       id="skillsTable">
      <columns>
      <Column>
      <Label text="Name"/>
      </Column>
      <Column>
      <Label text="Rating"/>
      </Column>
      </columns>
      </Table>
      </content>
      </Page>
    </core:View>
    The button on the Detail view calls function showSkills:
    showSkills: function(evt) {
      var context = evt.getSource().getBindingContext();
      this.nav.to("Skills", context);
      var skillsController = this.nav.getView().app.getPage("Skills").getController();
      skillsController.updateTableBinding();
    Within 'this.nav.to("Skills", context);' I add the Skills view to the splitApp and set its bindingContext to the current binding context (e.g. "EmployeeSet('000001')"). Then I call function updateTableBinding in the controller of the Skills view which dynamically binds the items in the table based on the selected employee. So, when the ID of the selected employee is '000001', the path of the table's item binding should be "/EmployeeSet('000001')/Skills"
    updateTableBinding: function(){
      var oTemplate = new sap.m.ColumnListItem(
      {cells: [
              new sap.m.Text({text : "{Name}"}),
              new sap.m.Text({text : "{Rating}"})
      var oView = this.getView();
      var oTable = oView.byId("skillsTable");
      var oContext = oView.getBindingContext();
      var path = oContext.sPath + "/Skills";
      oTable.bindItems(path, oTemplate);
    Allthough it works fine, this is where I have my first doubt. Is this the correct way to bind the items? I tried to change the context that is passed to this.nav.to and wanted it to 'drill-down' one level, from Employee to Skills, but I couldn't manage to do that.
    I also tried to bind using the items aggregation of the table within the XML declaration (<Table id="skillsTable" items="{/EmployeeSet('000001')/Skills}">). This works fine if I hard-code the employee ID but off course this ID needs to be dynamic.
    Any better suggestions?
    The second doubt is about the template parameter passed to the bindItems method. This template is declared in the controller via javascript. But I'm using XML views! So why should I declare any content in javascript?? I tried to declare the template in the XML view itself by adding an items tag with a ColumnListItem that has an ID:
                    <items>
                        <ColumnListItem
                        id="defaultItem">
                        <cells>
                            <Text text="{Name}"/>
                            </cells>
                            <cells>
                            <Text text="{Rating}"/>
                            </cells>
                        </ColumnListItem>
                    </items>
    Then, in the updateTableBinding function, I fetched this control (by ID), and passed it as the template parameter to the bindItems method. In this case the table shows a few lines but they don't contain any data and their height is only like 1 mm! Does anyone know where this strange behaviour comes from or what I'm doing wrong?
    I hope I explained my doubts clearly enough. If not, let me know which additional info is required.
    Looking forward to your opinions/suggestions,
    Rudy Clement.

    Hi everybody,
    I found this post by searching for a dynamic binding for well acutally not the same situation but it's similar to it. I'm trying to do the following. I'm having a list where you can create an order. On the bottom of the page you'll find a button with which you're able to create another order. All the fields are set to the same data binding ... so the problem is if you've filled in the values for the first order and you'll press the button you'll get the same values in the second order. Is it possible to generate a dynamic binding?
    I'm going to post you a short code of what I'm meaning:
    <Input type="Text" value="{path: 'MyModel>/Order/0/Field1'}" id="field1">
         <layoutData>
                    <l:GridData span="L11 M7 S3"></l:GridData>
               </layoutData>
    </Input>
    As you can see I need to set the point of "0" to a dynamic number. Is there any possibility to reach this???
    Hope you can help
    Greetings
    Stef

  • Field and table  for PO item number in Invoice(MIR4)

    I have 6lines in PO and when I looked at MIR4 (the invoice) ….It has only 3 lines which are invoiced.
    In mir4, we have a column which says which lines got invoiced …for me 2, 3 and 5. Is there any table which will hold this fields data for invoiced lines.
    That field is called " Item Number of Purchasing Document".
    Please help

    Hi,
    For MIR4, table and field is RSEG-EBELP.
    Cheers !

  • Populating item number in table control

    I have created a custom table control. It is very similar to the VA01 or Vl01N table controls to add items. When the user enters the material name, the item number column needs to be populated.
    Currently I have something like this
    LOOP at i_items.
    MODULE tblcntrl_modify INPUT.
    ENDLOOP
    MODULE tblcntrl_modify INPUT. "PAI
       posnr = sy-stepl * 10.
       more logic for input validation.
    ENDMODULE
    The issue I have is that when I scroll in the table control, the posnr for each item gets recalculated and they get whacked .. so I get a scenario like this
    10 mat1
    20 mat2
    30 mat3
    10 mat4
    40 mat5
    what is the best way to populate the item number. Thank you

    hi,
    u have to make one module in PAI brtn  <b>LOOP-ENDLOOP, CHAIN-ENDCHAIN</b>
    LOOP AT itab_det.
        CHAIN.
         FIELD itab_det-comp_code.
          FIELD itab_det-bill_no.
          FIELD itab_det-bill_date.
          FIELD itab_det-vend_cust_code.
          FIELD itab_det-bill_amt.
          MODULE <b>tab1_modify</b> ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD itab_det-mark
          MODULE tab1_mark ON REQUEST.
      ENDLOOP.
    <b>MODULE tab1_modify INPUT.</b>
      IF itab_det-bill_no <> ' ' .
        CLEAR:net_pr,tax,bil_amt,bil_dt.
        SELECT SINGLE fkdat netwr mwsbk FROM vbrk INTO (bil_dt,net_pr,tax)
        WHERE vbeln = itab_det-bill_no .
        bil_amt = net_pr + tax.
        itab_det-bill_date = bil_dt.
        itab_det-bill_amt = bil_amt.
      ENDIF.
      MODIFY itab_det
        FROM itab_det
        INDEX tab1-current_line.
      APPEND itab_det.
    <b>ENDMODULE.                    "TAB1_MODIFY INPUT</b>
    here i am fetching Bill Amount and Bill Date according to Entered Bill Number in Table control.
    So i am checking bill number here in If condition and when i press enter that two value automatically populated...
    reward if useful.....

  • Dynamic Table Two lines per data item

    Hi experts!!
    In my form i have a table with two lines per data item for example the table i want the table to be:
    boldheader rowbold
    bold1,1 1,2bold
    bold1,3 1,4bold
    I have also wrapped the table in a subform, and marked the checkbox "Repeat Row for each data item".
    Instead i get :
    1,1 1,2
    2,1 2,2
    1,3 1,4
    2,3 2,4
    How can i display two rows per item ???
    Thank you in advance!!!

    If there are two lines in a single row for a table (I.e if there are 14 columns, How to be adjusted).
    There are two possible ways of doing.
    1) a) Create a SubForm
        b) Create a Table (If you create a table there will be Header Row and Body Row)
        c) Delete the Body Row and instead of it create a SubForm with name Body Row
        d) Now you have one Header Row and SubForm as BodyRow.
        e) SubForm BodyRow again create two SubForms with names Row1, Row2.
        f) Now make the SubFormBodyRow as Flow layout and repeat the SubForm(Since if you make this then the child nodes (Row1 & Row2) will inherit the properties of the parent node (SubForm-BodyRow).
       g) Now you can have two rows in one lineitem.
    2) The second possible way is showing it in a Dynamic ToolTip.
        Lets say you have a table inside a table then you can show it in a Dynamic ToolTip when you place the cursor in a Student Id you will get Student Data.
    Hope it solves.

  • Use the value of a field as column-name of a dynamic table

    Hi All
    I have the following situation:
    a) Internal table TB_ORDER_CONDITION ==>  data: tb_order_condition type standard table of bapicond.
         sample of the internal table TB_ORDER_CONDITION:
    CONT_TYPE # CONDVALUE# CONDBASEVAL  
        ZR00         #    38.800000#  1.000000
        ZR30         #    2.800000  #  0.000000
        SKTO        #    0.000000  #  57.8500000
    b) dynamic-table  <L_TABLE_II> has the following columns:
    ZR00#ZR30#ICM3#IPS2  SKTO  
    c) I would like to move as below:
    ZR00#ZR30# ICM3#IPS2# SKTO 
    38.800000#2.800000#57.8500000
    Observation:
    I used this symbol just to show the separationfrom one column from another.
    Items a) and b) are OK. The problem is that I don't know how to make this move as showed in item c).
    Could you please advise?
    Thanks in advance.
    Gaia

    Hello,
    Check the code snippet below:
    FIELD-SYMBOLS: <wa_order_creation>  TYPE bapicond,
                   <l_table_ii>         TYPE STANDARD TABLE,
                   <l_wa_ii>            TYPE ANY,
                   <l_fieldval>         TYPE ANY.
    SORT tb_order_condition BY itm_number. "Sort by Item Number
    LOOP AT tb_order_condition ASSIGNING <wa_order_creation>.
    * Add a record to the dynamic table for each item
      AT NEW itm_number.
        APPEND INITIAL LINE TO <l_table_ii> ASSIGNING <l_wa_ii>.
      ENDAT.
      ASSIGN COMPONENT <wa_order_creation>-cond_type
      OF STRUCTURE <l_wa_ii> TO <l_fieldval>.
      IF sy-subrc = 0.
        <l_fieldval> = <wa_order_creation>-cond_value.
      ENDIF.
    ENDLOOP.
    BR,
    Suhas

  • How to create bindings at runtime for Dynamic Tables ?

    We have lot of Dynamic tables, In ADF, we need to try out the Dynamic EO, Dynamic VO, Dynamic DataControl and Dynamic binding for UI
    Ex:
    We need to load the data to the ADF table where database table name is dynamic, the columns in the tables are also dynamic. At runtime , we need to create VO, Dynamic binding and display to UI? We also should be able to add, delete,update records in the dynamic tables.
    Does anyone done this before? Please shared your thoughts on this

    Hi,
    for a table you can declaratively build a tree binding. Then you remove all the attribute items in the tree definition so that the number of attributes is dynamic. See: https://blogs.oracle.com/groundside/entry/towards_ultra_reusability_for_adf
    Frank

  • Dynamic table in interactive form...

    Hi Friends,
    I am a beginner in adobe forms development.
    I want to create an adobe form with dynamic internal table. I.e. addition of rows and deletion of rows dynamically. I have gone through some of the threads in SDN. But still I am not able to make it.
    I used following approach for the same. Kindly correct me if i am wrong.
    Step1: I have created a context with the required fields in webdynpro abap with cardinality 1..1.
    Step2: In the adobe form I created a table using table assistant.
    Step3: a.  Wrapped the table into a subform and set the content as "Flowed"
                b. Selected "Repeat Table item for Each Data Item" at table level and body level with min count as '1'.
                c. Selected "Repeat Table item for Each Data Item" at header row with min count and max as '1'.
    Step 4: Added two Webdynpro native submit buttons by name "Add" and "Delete" and coded as follows:
               For add button:
              var nTableLength = Table.nodes.length;
              var nNumRow = 0;
              for (var nCount = 0; nCount < nTableLength; nCount ++) {
              if ((Table.nodes.item(nCount).className == "subform") & (Table.nodes.item(nCount).name !== "HeaderRow")) {
             nNumRow = nNumRow + 1;
            if (nNumRow == 7) {
            xfa.host.messageBox("The maximum allowable number of rows is 7. You cannot add any more rows.", "Warning", 3);
           else {
            Items.Table.Row1.instanceManager.addInstance(1);
    Still dynamically rows are not getting created. But when i click on add/delete some process is happening.
    Do I need to write any logic in Webdynpro abap??.
    Please clarify.
    Thanks in advance.
    Regards,
    Phani.

    Hi Runal,
    I'm following your document, but I'm not getting the adobe forms buttons working. I try to put the code that you mention, but I got an error message in the WebDynpro View saying: "field get_element is unknown", this is the code that I'm adding in the
    method WDDOMODIFYVIEW.
    data: LR_INTERACTIVE_FORM type ref to CL_WD_INTERACTIVE_FORM,
          LR_METHOD_HANDLER type ref to IF_WD_IACTIVE_FORM_METHOD_HNDL.
    check first_time = abap_true.
      LR_INTERACTIVE_FORM ?= VIEW->GET_ELEMENT(u2018ZDYN_TBL_FORMu2019).
      LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER.
      LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( abap_true ).
    If I double click in the class CL_WD_INTERACTIVE_FORM, I can't see any method GET_ELEMENT.
    I don't know where the problem is, could you help me?
    thanks,
    Luis Lara

  • Dynamic table height for Printed PO Report

    I have created a RTF template for Printed Purchase Order report using Microsoft Word. The template has Header and Line information. I have two questions.
    1) Lines are printed in Table format. I also print header level notes in Line Section.
    If the header notes are blank, I want the line information (line #, Item Number, Description, quantity etc) to be moved to line1. How do I acheive this?
    I want to dynamically adjust the Table height based on the information printing in the line section. The table has two rows. One for Header notes and one for Line information.
    2) Header notes field is placed in Description column of Line Table (MS word). Currently Header notes are printing within the Description column as wrapped text. I want to print Header notes in one line. How do I expand this field to print in one line?
    Thanks,

    Hi,
    Even I faced the same problem, however I have found a workaround to come out of this problem.
    My PO design template has 16 lines, I am counting the number of lines with data and subtracting the same from 16 and inserting that many empty rows to increase the table height.
    I am pasting the code so that it will be useful for others.
    Paste this code before LINES_ROW for-each loop. This will give the number of lines present.
    <xsl:variable name="_XDOFOTOTAL" select="count(.//LINES_ROW)"/>
    Paste this code at the end of the for-each loop.
    <!-- 16 is the maximum number of rows which fits in my page.-->
    <xsl:variable name="_cnt" select="16-$_XDOFOTOTAL"/>
    <xsl:call-template name="countdown">
    <xsl:with-param name="countdown" select="16-$_XDOFOTOTAL"/>
    </xsl:call-template>
    This function you can put it at the end.
    <xsl:template name="countdown">
    <!-- Instead of for loop. -->
    <xsl:param name="countdown"/>
         <xsl:if test="$countdown">
              <fo:table-row keep-together="always">
              <fo:table-cell/>
              <fo:table-cell>
              <fo:block height="13.2pt"/>
              </fo:table-cell>
              <fo:table-cell>
              <fo:block height="13.2pt"/>
              </fo:table-cell>
              <fo:table-cell xdofo:use-attribute-sets="c_33 c_35">
              <fo:block height="13.2pt"/>
              </fo:table-cell>
              <fo:table-cell xdofo:use-attribute-sets="c_33 c_35">
              <fo:block height="13.2pt"/>
              </fo:table-cell>
              <fo:table-cell>
              <fo:block height="13.2pt"/>
              </fo:table-cell>
              <fo:table-cell>
              <fo:block height="13.2pt"/>
              </fo:table-cell>
              <fo:table-cell>
              <fo:block height="13.2pt"/>
              </fo:table-cell>
              <fo:table-cell/>
              </fo:table-row>
              <!-- Call the template again -->
              <!-- The below code is like x=x-1 -->
              <xsl:call-template name="countdown">
                   <xsl:with-param name="countdown" select="$countdown - 1"/>
              </xsl:call-template>
         </xsl:if>
    </xsl:template>
    If some one is having a better solution, please share.
    Regards,
    SURESH KUMAR M R

  • Dynamic table in Offline interactive form

    Hi Experts,
              I want to add dynamic table (for Purchase Order line items). Number of rows in table will depend on item in purchase order. So, table rows should be added and data can be entered in table rows.
             Can anyone give me the steps to solve this issue...
    Thanks in advance.
    Regards,
    Nilesh

    Hi,
    You can use Following JavaScript for adding row in the Table:
    xfa.resolveNode("Table.item").instanceManager.addInstance(1);
    Make sure you have made BP as Flowed Content and the Item and Table subform is also flowed content.
    Check the Min Row count checkbox of Item subform also
    Hope this helps.
    Amit

  • Dynamic Table in adobe inter-active forms

    Hi Gurus,
    I have dragged and dropped Dynamic table in body page and Header data placed in Master page. Now my problem is the data is not going to the next pages. Kindly pls tell me the way so that my data will appear in next pages.
    Regards,
    Srini

    Hi,
    What do you mean by Header data in master page...? is it header Row...with labels, why do you need it in master page have it along with your table in body page.
    What do you mean my data is not displayed on the body page ...?
    What I could understand is as below. you have a dynamic table where the number of rows may be n such that it can spread across multiple pages, if it spreads in multiple pages you need the header row in all the page occurances. is it so ...?
    if so just do it as below.
    Have the table in your body page with one header row and one body row.
    Set table allowed page break with in content
    Put this table in a subform and say it flowed top to bottom and set allow page break with in content.
    Select header row>object>pagination set include row in initial page and subsequent pages to checked.
    Select body row-->object->binding set repeat row for each data item to checked.
    This should work, else let me know your requirement more briefly..
    if You need a sample file for this send me a test mail to my id from the business card address.
    Cheers,
    Sai

  • Dynamic tables

    Hi All,
    I have a form where i have four dynamic tables one after
    other, i want the header and body to show up atleast one even
    when there is no data flowing in to the table fields, is it possible,..?
    i have tried doing a dynamic table and a text field wrapped in a subform(S1)  and that subform in turn  wrapped in other subform(S2) to make S1 flowable.
    for Table1 i have checked Repeat Table for each data item, Min count = 1, Initial count =1 ;
    i did the same for all the 4 subforms,
    but only the first and last subfor sshow up the tables in them the rest only show text field i have included in each subform,
    does anyone have an idea on this as to how to get this done..
    Thank u all in advance.
    de1209

    Subramanian
    you can achieve that with the feature in oracle called DYNAMIC SQL
    for example see the following code
    declare
    sql_stmt     varchar2(200) := '&enter_stmt';
    cur_num     number;
    temp_num     number;
    begin
    cur_num := dbms_sql.open_cursor;
    dbms_sql.parse(cur_num,sql_stmt,dbms_sql.native);
    temp_num := dbms_sql.execute(cur_num);
    dbms_sql.close_cursor(cur_num);
    end;
    19:01:11 11 /
    Enter value for enter_stmt: create table aug(n number)
    old 2: sql_stmt varchar2(200) := '&enter_stmt';
    new 2: sql_stmt varchar2(200) := 'create table aug(n number)';
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.22
    19:01:33 SQL> desc aug
    Name Null? Type
    N NUMBER
    with this you should get some idea .
    Only thing is just you need to design your application carefully and then there you are .
    hope this helps
    cheers
    prakash
    [email protected]

  • Retreival of Dynamic Table Datas from Adobe to WebDynpro- ABAP

    Dear Friends,
    I have Developed an application in Webdynpro-ABAP, where i have integrated Adobe form in the webdynpro.
    In the adobe form, dynamic table is there where we can add and delete the rows at runtime.
    I am trying to retreive the table datas at runtime from the adobe.
    I can able to retreive only the first record from the table, even if the table contain more than one rows.
    As per the below code i have retreived the count, where it is showing the count as 1.
    using the method get_static_attributes_table i am trying to fetch all the records, but i can able to retreive only the first record.
    lo_nd_zsm_fm_transport_tra = wd_context->get_child_node( name = wd_this->wdctx_zsm_fm_transport_tra ).
      lo_nd_tr_details_i = lo_nd_zsm_fm_transport_tra->get_child_node( name = wd_this->wdctx_tr_details_i ).
    count = lo_nd_tr_details_i->GET_ELEMENT_COUNT( ).
    elems_bank_table = lo_nd_tr_details_i->get_elements( ).
    lo_nd_tr_details_i->get_static_attributes_table(
      importing
        table = ls_tr_details_i ).
    Even Cardinality i have maintained as 1.N for the node.
    Kindly provide me the solution.
    Thanks and Regards,
    Sathish,,

    Hi, I have solution for read data from dynamic table and add these added row to WD4A context (and then save them to DB) (in ONACTIONPROCESS_SUBMIT event):
    DATA: l_fp TYPE REF TO if_fp.
    l_fp = cl_fp=>get_reference( ).
    DATA: l_pdfobj TYPE REF TO if_fp_pdf_object.
    l_pdfobj = l_fp->create_pdf_object( ).
    l_pdfobj->set_document( pdfdata = lv_pdfsource ).
    l_pdfobj->set_extractdata( ).
    l_pdfobj->execute( ).
    DATA: pdf_form_data TYPE xstring.
    l_pdfobj->get_data( IMPORTING formdata = pdf_form_data ).
    DATA: converter TYPE REF TO cl_abap_conv_in_ce, formxml TYPE string.
    Converter = cl_abap_conv_in_ce=>create( input = pdf_form_data ).
    Converter->read( IMPORTING data = formxml ).
    TYPE-POOLS: ixml.
    DATA: l_ixml TYPE REF TO if_ixml.
    l_ixml = cl_ixml=>create( ).
    DATA: streamfactory TYPE REF TO if_ixml_stream_factory,
    istream TYPE REF TO if_ixml_istream.
    streamfactory = l_ixml->create_stream_factory( ).
    istream = streamfactory->create_istream_string( formxml ).
    DATA: document TYPE REF TO if_ixml_document.
    Document = l_ixml->create_document( ).
    DATA: parser TYPE REF TO if_ixml_parser.
    parser = l_ixml->create_parser( stream_factory = streamfactory
                                               istream = istream
                                               document = document ).
    Parser->parse( ).
    the code above allows you to read xml data from pdf file, then you need only to read xml and adding rows to your context:
    data : item type string.  DATA: nodechild TYPE REF TO if_ixml_node,
            Childschild TYPE REF TO if_ixml_node.
        data: num_of_children type i,
              x type i,
              y type i,
              num_of_attribute.
    node = document->find_from_name('ZAM_PROTSTROJF').
    num_of_children = node->num_children( ).
    nodechild = node->get_first_child( ).
    data: wa_strojdetail type ZAM_PROTSTROJF,
          wa_strojdetail_tab TYPE TABLE OF ZAM_PROTSTROJF.
    wa_strojdetail-docnum = ls_zam_protstroj-docnum.
    wa_strojdetail-bukrs = 'VVS'.
    wa_strojdetail-mandt = sy-mandt.
    y = 1.
    do Num_of_children times.
           num_of_attribute = nodechild->num_children( ).  " Childschild->num_children( )." Getting the number of attributes
           Childschild = nodechild->get_first_child( ).
           wa_strojdetail-itemnum  = y.
           x = 1.
           do num_of_attribute times.
              item = Childschild->GET_value( ).
              CASE x.
                WHEN 4.
                  wa_strojdetail-anln1 = item.
                WHEN 5.
                  wa_strojdetail-anln2 = item.
                WHEN 6.
                  wa_strojdetail-bubtr = item.
                WHEN 7.
                  wa_strojdetail-belnr = item.
              ENDCASE.
              Childschild = Childschild->get_next( ).
              x = x + 1.
          enddo.
          y = y + 1.
          APPEND wa_strojdetail to wa_strojdetail_tab.
          nodechild = nodechild->get_next( ).
    enddo.
    This is complete solution for adding rows in interactive forms and working with them in WD4A!
    Regards Jiri
    Edited by: Jiri Neuzil on Jun 10, 2009 8:13 AM
    Sorry for formatting, but I don't know, how to format text correctly on this site in plain text I have all text correctly formatted, but in preview....

  • Dynamic table layout in Smartform

    Hi,
    Is there a way to have a dynamic table layout in smartform?
    The idea is to be able to print any kind of table with fieldsymbols without having to define the table layout/cell layout at design time, or if it's not possible choose one of the predefined line types at runtime. Please don't post how to print out a table using fieldsymbols, this is not the topic of this question.
    So I guess you'd need to choose the table line type at runtime or even better, create a table line type at runtime. Is this even possible?
    Thanks
    Edited by: Stanley Marsh on Oct 16, 2008 12:43 PM

    hi
    good
    Tables
    You can include static and dynamic tables into a Smart Form. Dynamic tables enable you to display tables whose size is determined only at the moment of their output by the number of the table items to be displayed. Table functions are:
    ·        Line feeds in individual table cells
    ·        Event-controlled output of table headings and footers
    ·        Integrated calculation of grand totals and subtotals
    ·        Colored boxes and shadings in tables
    thanks
    mrutyun^

  • Using a reset button for a dynamic table

    I have a 6 page form that includes several dynamic tables. There is a reset button that clears only specific parts of the form because it is something that will be filled out weekly and a lot of the information will stay the same. My problem is that I want the reset button to clear specific rows of the table, but reset whatever is typed in the row for every instance in the table. The reset button only clears the row I want in the first column, not all the other columns/instances. Has anyone done this before or have any suggestions?
    I don't want to include the whole script for the reset button because it has about 100 fields to clear but essentially this is what I have for the dynamic table and it works but only for the first column/instance, the rest stay the same:
    xfa.host.resetData("form1.Page1.Subform1.Table1.Row5.Textbox1.somExpression");

    Hi,
    I’m not sure I understand your exact scenario but I use a function in a script object that I pass in a subform (possibly the top subform to reset the whole form) and the function resets all fields within it. 
    function resetData(node)
        if (node.className === "field")
            var enableResetData = node.desc.nodes.namedItem("enableResetData");
            if (enableResetData === null || enableResetData.value === true)
                // reset all fields except those with enableResetData set to false
                node.rawValue = null;
        else
            for (var i = 0; i < node.nodes.length; i++)
                var currentNode = node.nodes.item(i);
                if (currentNode.isContainer)
                    // ignore some form objects
                    if (currentNode.className !== "draw" &&
                        currentNode.className !== "variables")
                        resetData(currentNode);
    If there are any fields that I don’t want reset I put the following code in the initialise event of those fields.  Depending on the number of fields involved you might what to reverse this logic.  (you could also add the desc.enableResetData element in the XML Source view)
    var enableResetData = this.desc.nodes.namedItem("enableResetData");
    if (enableResetData == null)
        enableResetData = xfa.form.createNode("boolean", "enableResetData");
        this.desc.nodes.append(enableResetData);
    enableResetData.value = true;
    This works by storing a value “enableResetData” in the desc element of the field, allowing a generic function to have specific behaviour for particular fields.
    Hope this helps.
    Bruce

Maybe you are looking for

  • DHCP question on VPN to ASA 5520

    Our VPN uses the Microsoft VPN client to connect to an ASA 5520 running 8.0(3). Clients get address from our internal DHCP server. How do I get the ASA to send the client computer name in the DHCP request, rather the the group name and some number it

  • CC 2014.2 settings migration

    Hooray! I've finally updated CC.. However, following through on these procedures..migrating settings and plug-ins for After Effects CC 2014 (13.0) | After Effects region of interest And have come across another issue. "At the bottom of the General pa

  • XPath max function

    Hi all, I'm a beginner working with XPath expressions. I have a xml document 'test.xml' with the following contents. <?xml version="1.0" encoding="UTF-8"?> <ICRI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ors

  • TabbedPanelsContent Display Problem

    The tab panel is working fine other than the "description" tab is outputing the last few words or lines twice. It is random where it starts. I provide a clip of the code and output below. At the very bottom of the message I provide a link to the onli

  • PO validating while creating...

    Hi All, I need to validate some item level data with the header data, So i wrote the code in User Exit. Its validating well, but if i press save button its simple asking a dialog and the PO is getting saved when i have errro also. i have tried  EXIT_