How to show the content of a table (long text) in a scrollable textbox?

Hi,
I have to say first, many thanks to the ones who answers to threads in this forum, it's very helpfull when we're learning web dynpro!
I have a RFC function that return a table containing a long text (node "it_text", with elements "Tdformat" and "Tdline").
1) I want first to copy all the Tdlines in a new node "text_box" (that I made specially for the screen, it contains only the element "Tdline" [the text itself]);
2) Then I want to show the content of the node "text_box" in a scrollable textbox on the screen (to show 8 lines of text, for example).
How to do that easily?  What is the UI Element needed to show that?
Thanks!

If you want to display as it is then you can use Table UI element. You can change the design property to 'transparent' and set column header visibility property to none. Then you need not to write any code simple you can map the node to table field.
Even with TextEdit you can achieve what you want. Try this code...
     StringBuffer tmpBuffer = new StringBuffer();
     for(int index=0;index<wdContext.nodeLines().size();index++)
          wdContext.nodeLines().setLeadSelection(index);
          tmpBuffer.append(wdContext.currentLinesElement().getLine()+"n");
     wdContext.currentContextElement().setData(tmpBuffer.toString());
Regards
Abhilash

Similar Messages

  • How to show the content of a data object in listbox

    Hello together,
    i have created a service employee_srv for my data object "Employee". How can I show the content of this data object in a listbox in my view, for example DropDownByKey.
    Regards
    Waldemar Schakiel

    Hi,
    An example to create a dynamic context in Webdynpro ABAP:
    data:
    rootnode_info TYPE REF TO if_wd_context_node_info,
    dyn_node TYPE REF TO if_wd_context_node,
    tabname_node TYPE REF TO if_wd_context_node,
    tablename TYPE string.
    rootnode_info = wd_context->get_node_info( ).
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
    parent_info = rootnode_info
    node_name = tablename " Data object Table name
    structure_name = tablename
    is_multiple = abap_true ).
    ***Bind data to Dynamic table:
    DATA: stru_tab TYPE REF TO data.
    FIELD-SYMBOLS:
    <tab> TYPE table.
    create internal table
    CREATE DATA stru_tab TYPE TABLE OF (tablename).
    ASSIGN stru_tab->* TO <tab>.
    dyn_node = wd_context->get_child_node( name = tablename ).
    Bind internal table to context node.
    dyn_node->bind_table( <tab> ).
    Shruthi

  • How to clear the contents of a table

    I was using a 'build table' to collect some datas and pass it to an 'Express  table'.
    what are the possible options to clear the contents of that table?
    How can i clear the contents using a 'button'?

    Build table function has an additional input called 'Reset'
    Attach a boolean to it.
    On front panel, set the boolean's mechanical action as 'latch when released'
    Look at attached vi
    Regards,
    Dev
    Message Edited by devchander on 08-06-2007 08:02 AM
    Attachments:
    reset table.vi ‏57 KB

  • How to Delete the Content of a Table?

    Hi,
    Please, i need to modify the content of a table, but before i want to delete this content. See follow the code that is used actually:
    DELETE (pr_name_table).
    MODIFY (pr_name_table) FROM TABLE prt_table.
    MESSAGE s000(zbrx) WITH text-i02 pr_name_table.
    The ABAP Editor don't accept the expression "DELETE (pr_name_table).".
    How to delete this content???
    Best Regards,
    Daniel Sanchez

    Hi,
    Thanks for helps! The problem been resolved with this solution:
    >> Call of Call:
    IF sy-subrc IS INITIAL.
          PERFORM z_upload_table TABLES t_zpf0012 t_bkp_zpf0012
                                    USING  c_zpf0012.
    ENDIF.
    >> In the Form: (after processing of Form)
    FORM z_upload_table TABLES prt_table prt_table2
                           USING  pr_nome_table.
      IF sy-subrc <> 0.
        MESSAGE i000(zbrx) WITH text-i03 l_file.
      ELSE.
        DELETE (pr_name_table) FROM TABLE prt_table2.
        MODIFY (pr_name_table) FROM TABLE prt_table.
      ENDIF.
    Best Regards,
    Daniel Sanchez

  • WD ABAP: How to get the contents of selected table lines?

    Hi,
    I'm trying to figure out how to get the contents of table lines back from the UI. I display a table with several lines of data. The user selects some rows. I want to move the contents of the selected rows to another table. I have a context attribute, say DATA, with attributes FIELD1... FIELDn, using a DDIC structure. These are bound to the table UI element and the corresponding table columns. To get the selected rows, I use wd_context->get_selected_elements(). This works, but what I get from this method is references to if_wd_context_element. How do I know which row (row number = ?) this corresponds to? And how do I get the actual data? I want a structure with FIELD1 = value1 FIELD2 = value2 etc. My context attributes FIELD refer to table columns, but I'm looking for the table line...
    Can somebody help me?
    Thanks,
    Ira

    Hi Ira,
    wd_context->get_selected_elements() returns WDR_CONTEXT_ELEMENT_SET which is a table type of IF_WD_CONTEXT_ELEMENT. You can loop through the WDR_CONTEXT_ELEMENT_SET, get into variable say node_elelement which is of type ref to If_Wd_Context_Element. Then you could use the method GET_STATIC_ATTRIBUTES of If_Wd_Context_Element which returns a structure with values of all the attributes in the selected row.
    If you need the row number, while populating the node you could have an additional attribute called rowno and populate it correctly. When you select the data using method GET_STATIC_ATTRIBUTES, you would get the appropriate row number.
    Regards,
    Srini.

  • How to search the content in a Table

    Hi all,
        How can i search the content in a table. is there any UI Element is there to do this? Can any body give me any sample code for this
    regards,
    VJR

    Hi,
    you gotta do that programmatically,
    here is a sample code:
    int sizeOfstudent = wdContext.nodeCtx_vn_student().size();
    //Ctx_vn_student is the node associated with the table ie its dataSource property
    String filtername = wdcontext.currentContextElement.getSName();
    //sName is the name to be searched , it is a context attribute
              for(int i = sizeOfstudent-1;i>=0;i--)
                   String matchValue = recNode.getElementAt(i).getAttributeAsText("Name");
    //get the name of 1st record(in table) or 1st elememnt in node, "Name" here is value attribute of that node
    //so we are fetching its value and comparing it like..
                   if(matchValue.equalsIgnoreCase(filtername))
                        //here you can add the action to be taken on mathing name                }
    hope it helps
    regards

  • How to check the contents of MCVBAK table?

    Hi all of you,
    I am using MCVBAK table for extraction using LIS.  The problem I am facing is when I am running the init load in BW for my IS S511, it is successfully running but in the monitor screens it says only 1 from 1 record. I thought that there are no records in the table MCVBAK so I wanted to make sure if there are really no records in MCVBAK table.  
    So I went to R/3 gave the T.C SE11 and entered the table MCVBAK to check its contents.  But in the MCVBAK table what I find is the graphics button and contents button are invisible.  My question is
         How to find the contents of the table MCVBAK?
    Please help. 
    Thank you,
    Tristan.

    Hi TR,
    Yah, you need to check VBAK Table at SE11, Things that start with "MC...." are usually structures. Anther point, I want to mention is, When you schedule as Init load at the BW side, the system will get the data from S511 table(which is Information Structure table). So, you have do statistical setup first (at eg for sales Tcode is oli7) which will copy the records from VBAK table to your Information Structure (i.e S511).Only then, you can perform Init Load. Hope this Info help!
    Regards,
    Vj

  • How to check the content of cluster table smw3_bdoc1(00)

    Hi!
    I want to check the business partner changes sending via bdoc from crm to sap.
    For this i want to look into the bdocs.
    I think it's the cluster-table smw3_bdoc1.
    'Cause i don't know which is the name of the structure in the clustd-field i use:
    data: dirtab type table of cdir,
          wa_dirtab like line of dirtab.
    import directory into dirtab from database
                                      smw3_bdoc1(00)
                                      id '49600667F6980046E1008002AC18C6E5'.
    if sy-subrc = 0.
      write  / 'Directory:'.
      loop at dirtab into wa_dirtab.
        write: / wa_dirtab-name,  wa_dirtab-otype, wa_dirtab-ftype,
                 wa_dirtab-tfill, wa_dirtab-fleng.
      endloop.
    else.
      write 'Not found'.
    endif.
    So i've found the directory object "BDOC_BODY".
    Now i want to read the content with:
    data:   iclust type string.
    loop at itbdocid.
         IMPORT BDOC_BODY = iclust FROM DATABASE smw3_bdoc1(00)
                                        ID itbdocid-bdoc_id.
    endloop.
    An error message raises with...
    "error importing the object BDOC_BODY"
    The dump tells me that object types of BDOC_BODY and iclust doesn't match.
    I've changed the field iclust to type xstring... but it's the same error.
    If somebody here can help... Thanks a lot!
    Cheers, Ingo

    Hi,
    Thanks, I can see the data now.I am expecting that data should display in the 2LIS_VDKON extractor.There are two records for particular condition type.Item 10 and Item 20, but in RSA3, it is showing only one record for Item 20 and not showing for Item 10.
    I have cleaned and filled the setup tables, but still no luck.
    Can you please guide me, where else to look?
    Thanks
    Priya

  • How to read the content of HTML table

    Hi All,
    I would like to retrieve the content of the following HTML table and is wondering whether there are any libraries/jars that could do the job easily without having to write a parser possibly in XSLT:
    <td class="propType"><b>Address</b></td>
                            <td class="propType"><b>Company</b></td>
                            <td class="propType"><b>Department</b></td>
                            <td class="propType" align="right"><b>Employee</b></td>
                                    <td colspan="6"><strong class="propType">
                                    <td><strong>Firstname</strong></td>
                                    <td><strong>Surname</strong></td>
                                    <td><strong>DOB</strong></td>
                                    <td><strong>Sex</strong></td>
                                    <td class="even">John</td>
                                    <td class="even">Smith</td>
                                    <td class="even">01/02/2001</td>
                                    <td class="even">Male</td>One awkard method is by using the stringbuffer as follows:
    String greaterthanSignedList[] = greaterthanSigned.split(">")
    to pickup all the text that comes after the greater than (ie ">" sign)...
    String lessthanSignedList[] = lessthanSigned.split("</"</" sign) ...
    However, I am sure that there must be an easier way to do this such as using existing SAX/DOM/XSLT.. jars to retrieve these values quickly.
    Many thanks,
    Jack                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    I am wondering if you could be a little patient with your guidance in this area. Perhaps a few points on what are some of the classes that should be used. Even an example would be terrific, if possible.
    I have slowly weighing through 2 books - Learning XML by Erik T. Ray (http://www.oreilly.com/catalog/learnxml2/toc.html) and Java & XML by Brett D. McLaughlin & Justin Edelson (http://www.oreilly.com/catalog/9780596101497/toc.html) but would like to dwell into the relevant chapter and by pass anything else that is not relevant to my current in the XML area in order to fast track development.
    I am new to XML and would very much appreciate if you could point to the area of specific to focus on getting this job done only.
    Many thanks again,
    Jack

  • How to show the contents of a dropdown list with different colors

    Hi,
    I have a drop downlist on my dialog. I want to show each of its text attribute and its back ground with different color.
    Suppose I am showing 4 strings in the dropdown like Name1, Name2, Name3 and Name4, then how to change the color of each name and its background.
    Please let me know if it is possible.

    If the above asked is not possibe can we have an alternative as mentioned below :-
    A dropdown similar to the one shown in "Edit->Preferences->Grids->Colors" having our own text names instead of the default color names.
    So that I can show some color symbol and a text name along with it in my dropdown.
    One more query, is it possible to show the images/giff/png files in dropdown ?

  • How to find the exact word in a long text?

    Hi,
    Scenario:
    I have long text containing the system status of the equipment.
    Issue:
    I need to find the exact word from the list of the statuses. I have tried to use the FIND keyword but it does not work for all the cases.
    Example:
              FIND 'REL' IN <status_list> IGNORING CASE.
              if sy-subrc = 0.
              " do something
              endif.
    If the status list contains the word 'RELR', the sy-subrc is set to 0 (which may be because it searches the list based on a pattern) but I want to get the exact match.
    Can anybody suggest me on this.
    Regards
    s@k

    >
    siemens.a.k wrote:
    > Dear Kiran, Vasuki,
    >
    > The data type of status list is char with length 40.
    > The status list:
    >
    > Case 1: list -  REL  MANC NMAT PRC  SETC
    > FIND 'REL ' IN <status_list> IGNORING CASE
    > the sy-subrc is set to 0
    >
    > Case2: list - CRTD MSCP NMAT PRC  RELR SETC
    > FIND 'REL ' IN <status_list> IGNORING CASE
    > the sy-subrc is still set to 0 even though the list does not contain the word 'REL'
    >
    > I have also tried using
    > if <status_list> CS 'REL'
    > and
    > if <status_list> CS 'REL '
    >
    >
    > Please do let me know if I am anyway unclear about issue...:)
    >
    > Regards
    > s@k
    This is becacuse when you check
    > Case2: list - CRTD MSCP NMAT PRC  RELR SETC
    It is having RELR so that is the reason you are getting subrc = 0.
    >Ok try CS it should work perfectly.
    It seems... CS also not the correct answer
    (It will count RELR)  below thread sachin is correct ...Do that way ....
    Regards
    sas
    Regards
    Sas
    Edited by: saslove sap on Jan 25, 2010 6:58 AM

  • How to show the content for a perticular time period(consider 30 days)

    Hi,
    There is a requirement that content should reside the portal only for 30 days and then it should be archived. Archiving means that it should be searchable from portal but it should not be visible on the portal. How would that happen?. Kindly tell me if there is an OOTB from jdeveloper or we need to do coding for that..
    Thanks,
    Arun

    Archiving means that it should be searchable from portal but it should not be visible on the portal.Before I got to this point I thought: a peanut - just define the Expiry Date parameter as entry date + 30 (this can even be automated) and you are done.
    The issue is that expired items are not searchable (except, perhaps, some admin searches). Having said that, the original idea is still valid, it only needs few more precisions:
    a) "should not be visible on the portal" - what does that exactly mean for you? Content items can be visible in Document section (e.g. in Spaces), they can be placed directly to pages, or displayed via Document Service Task Flows such as Content Presenter, Document Explorer, etc. Either way, there is one method which will work for all: in WebCenter Content it's called Archiver. Originally, it was designed to dump content items to the disk, and then, you could easily upload them to another system (with different metadata, if you will). Since Archiver works also if you work with just one system, you can use it to "mass update" metadata of desired items (older than 30 days). Note, however, that this method might be quite slow if you work with a lot of data.
    b) "should be searchable" - the idea of the Archiver (or another method alike) is that you take the item from its place ("searchable"/"visible") and put it to a new one (just "seachable"). Again, the question is what "searchable" exactly means for you. Some methods might work with portal-only data (from where you wanted to have it removed), whilst others might be more "federated" (e.g. WebCenter Content has a search portlet where you can search any content in the repository).
    There are definitely ways to implement what you intend, but you should provide more details.

  • How to show the contents of one dropdown in another dropdown

    hi all
    i have 2 dropdownlists
    i created a dropdownkey ui and inserted values into dropdown dynamically.  let us say i have months in the dropdown , and when i select a month name in the first dropdown i want to display the festival names of that particular month in the second dropdownlist.
    please guide me
    Thanks and Regards
    narayna Adhurthi.

    Hi Narayan,
    You can achieve this functionality by following Bhavik's suggestion. If you do not want to create the second drop down's data dynamically, I can give you a suggestion.
    Create simple types for each month's festival list. Create twelve attributes each's type being one of the created festival type. Let's call these attributes attr1,attr2....attr12. On selecting a value from the first dropdown, change the binding of the 'selectedKey' of the second dropdown to a corresponding attribute.
    For this in the doModify(), write the following lines of code :
    String selected_key_for_drop1 = wdContext....get<attribute bound to the first drop down>;
    IWDViewElement elmt = view.getElement("<your second dropdown's ID>");
    IWDDropDownByKey drop = (IWDDropDownByKey)elmt; 
    if(selected_key_for_drop1.equals("Jan"))
       drop.bindSelectedKey("attr1");
    else if(selected_key_for_drop1.equals("Feb"))
       drop.bindSelectedKey("attr2");
    Hope this helps,
    Best Regards,
    Nibu.

  • How to clear the contents of table control

    Hi All,
              How to clear the contents that are present in a Table control. If there is any code Please Let me know.
    I will assign full marks to the correct code.
    Pradeep Kumar Kota.

    Hi
    U need to clear the contenents of internal table used to store the record displayed by table control.
    Every time the PBO is triggered the table control is automatically cleared, so you need only not to transfer any data from internal table to table control.
    So you should show how your PBO if you want a right answer.
    Max

  • How to Display the content of Excel file into Webdynpro Table

    Hi Experts
    I am following the Blog to upload a file in to the webdynpro context,but my problem is after uploading a excel file i need to extract the content from that Excel file and that content should be displayed in the webdynpro table.Can any body please guide me how to read the content from excel and to Display in the Table.
    Thanks and Regards
    Kalyan

    HI,
    Take for example, if Excel file contains 4 fields,
    Add jxl.jar to JavaBuild path and Use this snippet
    File f=new File("sample.xls");
    Workbook w=Workbook.getWorkbook(f);
    Sheet sh=w.getSheet(0);
    int cols=sh.getColumns();
    int rows=sh.getRows();
    Cell c=null;
    String s1=null;
    String s2=null;
    String s3=null;
    String s4=null;
    ArrayList al=new ArrayList();
    int j=0;
    for(int i=1;i<rows;i++)
    ITableElement table=wdContext.createTableElementz
         s1=sh.getCell(0,i).getContents();
         s2=sh.getCell(1,i).getContents();
         s3=sh.getCell(2,i).getContents();
         s4=sh.getCell(3,i).getContents();
                             table.setName(s1);
         table.setAddress(s2);
         table.setDesignation(s3);
         table.setDummy(s4);
         al.add(j,table);
         j++;                    
    wdContext.nodeTable().bind(al);
    Regards
    LakshmiNarayana

Maybe you are looking for