How can I write a tree report?

How can I write a tree report? If you have any document/ link can you please send that.
Regards,
Subhasish

REPORT  zdemo_alv_tree.
Demo program prepared for ****************
CLASS cl_gui_column_tree DEFINITION LOAD.
CLASS cl_gui_cfw DEFINITION LOAD.
DATA tree1  TYPE REF TO cl_gui_alv_tree_simple.
INCLUDE <icon>.
INCLUDE bcalv_simple_event_receiver.
DATA: gt_sflight      TYPE sflight OCCURS 0,   " Output-Table
      gt_fieldcatalog TYPE lvc_t_fcat,         " Field Catalog
      gt_sort         TYPE lvc_t_sort,         " Sorting Table
      ok_code         LIKE sy-ucomm.           " OK-Code
END-OF-SELECTION.
  CALL SCREEN 100.
*&      Form  BUILD_FIELDCATALOG
This subroutine is used to build the field catalog for the ALV list
FORM build_fieldcatalog.
get fieldcatalog
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name = 'SFLIGHT'
    CHANGING
      ct_fieldcat      = gt_fieldcatalog.
change fieldcatalog
  DATA: ls_fieldcatalog TYPE lvc_s_fcat.
  LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.
    CASE ls_fieldcatalog-fieldname.
      WHEN 'CARRID' OR 'CONNID' OR 'FLDATE'.
        ls_fieldcatalog-no_out = 'X'.
        ls_fieldcatalog-key    = ''.
      WHEN 'PRICE' OR 'SEATSOCC' OR 'SEATSMAX' OR 'PAYMENTSUM'.
        ls_fieldcatalog-do_sum = 'X'.
    ENDCASE.
    MODIFY gt_fieldcatalog FROM ls_fieldcatalog.
  ENDLOOP.
ENDFORM.                               " BUILD_FIELDCATALOG
*&      Form  BUILD_OUTTAB
Retrieving the data from the table and filling it in the output table
of the ALV list
FORM build_outtab.
  SELECT * FROM sflight INTO TABLE gt_sflight.
ENDFORM.                               " BUILD_OUTTAB
*&      Form  BUILD_SORT_TABLE
This subroutine is used to build the sort table or the sort criteria
FORM build_sort_table.
  DATA ls_sort_wa TYPE lvc_s_sort.
create sort-table
  ls_sort_wa-spos = 1.
  ls_sort_wa-fieldname = 'CARRID'.
  ls_sort_wa-up = 'X'.
  ls_sort_wa-subtot = 'X'.
  APPEND ls_sort_wa TO gt_sort.
  ls_sort_wa-spos = 2.
  ls_sort_wa-fieldname = 'CONNID'.
  ls_sort_wa-up = 'X'.
  ls_sort_wa-subtot = 'X'.
  APPEND ls_sort_wa TO gt_sort.
  ls_sort_wa-spos = 3.
  ls_sort_wa-fieldname = 'FLDATE'.
  ls_sort_wa-up = 'X'.
  APPEND ls_sort_wa TO gt_sort.
ENDFORM.                               " BUILD_SORT_TABLE
*&      Module  PBO  OUTPUT
This subroutine is used to build the ALV Tree
MODULE pbo OUTPUT.
  IF tree1 IS INITIAL.
    PERFORM init_tree.
  ENDIF.
  SET PF-STATUS 'ZSTATUS'.
ENDMODULE.                             " PBO  OUTPUT
*&      Module  PAI  INPUT
This subroutine is used to handle the navigation on the screen
MODULE pai INPUT.
  CASE ok_code.
    WHEN 'EXIT' OR 'BACK' OR 'CANC'.
      PERFORM exit_program.
    WHEN OTHERS.
      CALL METHOD cl_gui_cfw=>dispatch.
  ENDCASE.
  CLEAR ok_code.
ENDMODULE.                             " PAI  INPUT
*&      Form  exit_program
      free object and leave program
FORM exit_program.
  CALL METHOD tree1->free.
  LEAVE PROGRAM.
ENDFORM.                               " exit_program
*&      Form  register_events
Handling the events in the ALV Tree control in backend
FORM register_events.
define the events which will be passed to the backend
  DATA: lt_events TYPE cntl_simple_events,
        l_event TYPE cntl_simple_event.
define the events which will be passed to the backend
  l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
  APPEND l_event TO lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
  APPEND l_event TO lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
  APPEND l_event TO lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
  APPEND l_event TO lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_header_click.
  APPEND l_event TO lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
  APPEND l_event TO lt_events.
  CALL METHOD tree1->set_registered_events
    EXPORTING
      events                    = lt_events
    EXCEPTIONS
      cntl_error                = 1
      cntl_system_error         = 2
      illegal_event_combination = 3.
set Handler
  DATA: l_event_receiver TYPE REF TO lcl_tree_event_receiver.
  CREATE OBJECT l_event_receiver.
  SET HANDLER l_event_receiver->on_add_hierarchy_node
                                                        FOR tree1.
ENDFORM.                               " register_events
*&      Form  build_header
      build table for header
FORM build_comment USING
      pt_list_commentary TYPE slis_t_listheader
      p_logo             TYPE sdydo_value.
  DATA: ls_line TYPE slis_listheader.
LIST HEADING LINE: TYPE H
  CLEAR ls_line.
  ls_line-typ  = 'H'.
LS_LINE-KEY:  NOT USED FOR THIS TYPE
  ls_line-info = 'ALV TREE DEMO for ****************'.
  APPEND ls_line TO pt_list_commentary.
  p_logo = 'ENJOYSAP_LOGO'.
ENDFORM.                    "build_comment
*&      Form  init_tree
Building the ALV-Tree for the first time display
FORM init_tree.
  PERFORM build_fieldcatalog.
  PERFORM build_outtab.
  PERFORM build_sort_table.
create container for alv-tree
  DATA: l_tree_container_name(30) TYPE c,
        l_custom_container TYPE REF TO cl_gui_custom_container.
  l_tree_container_name = 'TREE1'.
  CREATE OBJECT l_custom_container
      EXPORTING
            container_name = l_tree_container_name
      EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5.
create tree control
  CREATE OBJECT tree1
    EXPORTING
        i_parent              = l_custom_container
        i_node_selection_mode =
                              cl_gui_column_tree=>node_sel_mode_multiple
        i_item_selection      = 'X'
        i_no_html_header      = ''
        i_no_toolbar          = ''
    EXCEPTIONS
        cntl_error                   = 1
        cntl_system_error            = 2
        create_error                 = 3
        lifetime_error               = 4
        illegal_node_selection_mode  = 5
        failed                       = 6
        illegal_column_name          = 7.
create info-table for html-header
  DATA: lt_list_commentary TYPE slis_t_listheader,
        l_logo             TYPE sdydo_value.
  PERFORM build_comment USING
                 lt_list_commentary
                 l_logo.
repid for saving variants
  DATA: ls_variant TYPE disvariant.
  ls_variant-report = sy-repid.
register events
  PERFORM register_events.
create hierarchy
  CALL METHOD tree1->set_table_for_first_display
    EXPORTING
      it_list_commentary = lt_list_commentary
      i_logo             = l_logo
      i_background_id    = 'ALV_BACKGROUND'
      i_save             = 'A'
      is_variant         = ls_variant
    CHANGING
      it_sort            = gt_sort
      it_outtab          = gt_sflight
      it_fieldcatalog    = gt_fieldcatalog.
expand first level
  CALL METHOD tree1->expand_tree
    EXPORTING
      i_level = 1.
optimize column-width
  CALL METHOD tree1->column_optimize
    EXPORTING
      i_start_column = tree1->c_hierarchy_column_name
      i_end_column   = tree1->c_hierarchy_column_name.
ENDFORM.                    " init_tree

Similar Messages

  • How Can I Write ‰ in Oracle Reports

    I want to write ‰ symbol in oracle reports. Not the % sysmbol. Is it possible ? Thanks for any help
    Edited by: barisist on Apr 11, 2013 5:06 AM

    That depends on your NLS parameter settings. E.g. the per mille sign cannot be displayed in WE8ISO8859P1.
    I don't know much about NLS parameters, but I do know that I can't display it either in my Oracle client programs (including Reports).
    Added:
    It doesn't work in Reports 6i, but it works in Reports 10g (WE8MSWIN1252 by default). Try this:
    select chr(137) per_mille from dual;
    Edited by: InoL on Apr 11, 2013 10:03 AM

  • How can I activate drill down report for planned line items please urgent?

    Hi Everyone,
    Please suggest me how can i activate drill down report for planned line items in internal orders. S_ALR_87012993. Please suggest me, I'll award full points. I am unable to do it in client system, which has already line items. I tried in my sys with new config it is working.
    Kind regards
    Arvey.

    Hi
    It is based on the reports attached in the Report Group - TCODE: GR53
    In the Report Group screen
    Press CONFIGURE – This is to attach any Drill Down reports.
    Press the “Insert Line” icon
    As is the screen may be used to insert a Report Writer report group. To add an ABAP, press “other report type”
    Double click on “ABAP Reports”
    Enter the name of the ABAP and ENTER
    <b>RCOPCA08                       Profit Center: Plan Line Items</b>
    VVR

  • What is the use of control breaks in reoprts?how can we use them in report?

    hello all
    what is the use of control breaks in reoprts? and how can we use them in reports?

    hi,
    check this sample program using control break statements.
    *& Report  Y777_CBSTABLE
    REPORT  Y777_CBSTABLE1.
    TYPES:
    BEGIN OF S_MARKS,
         ROLLNO    TYPE I,
         SCODE(3)  TYPE C,
        ROLLNO    TYPE I,
         SNAME(10) TYPE C,
         MARKS     TYPE I,
    END OF S_MARKS.
    DATA : C TYPE I,
           D(3) TYPE C,
           TOT TYPE I,
           STU TYPE I,
           MARKS TYPE STANDARD TABLE OF S_MARKS,
           WA_MARKS TYPE S_MARKS.
    WA_MARKS-ROLLNO = 1.
    WA_MARKS-SCODE  = 'MAT'.
    WA_MARKS-SNAME  = 'MATHS'.
    WA_MARKS-MARKS  = 65.
    APPEND WA_MARKS TO MARKS.
    CLEAR WA_MARKS.
    WA_MARKS-ROLLNO = 1.
    WA_MARKS-SCODE  = 'SCI'.
    WA_MARKS-SNAME  = 'SCIENCE'.
    WA_MARKS-MARKS  = 85.
    APPEND WA_MARKS TO MARKS.
    CLEAR WA_MARKS.
    WA_MARKS-ROLLNO = 1.
    WA_MARKS-SCODE  = 'COM'.
    WA_MARKS-SNAME  = 'COMPUTER'.
    WA_MARKS-MARKS  = 90.
    APPEND WA_MARKS TO MARKS.
    CLEAR WA_MARKS.
    WA_MARKS-ROLLNO = 2.
    WA_MARKS-SCODE  = 'MAT'.
    WA_MARKS-SNAME  = 'MATHS'.
    WA_MARKS-MARKS  = 55.
    APPEND WA_MARKS TO MARKS.
    CLEAR WA_MARKS.
    WA_MARKS-ROLLNO = 2.
    WA_MARKS-SCODE  = 'SCI'.
    WA_MARKS-SNAME  = 'SCIENCE'.
    WA_MARKS-MARKS  = 75.
    APPEND WA_MARKS TO MARKS.
    CLEAR WA_MARKS.
    WA_MARKS-ROLLNO = 2.
    WA_MARKS-SCODE  = 'COM'.
    WA_MARKS-SNAME  = 'COMPUTER'.
    WA_MARKS-MARKS  = 80.
    APPEND WA_MARKS TO MARKS.
    CLEAR WA_MARKS.
    RETRIVAL ************************************
    SORT MARKS BY SCODE .
    LOOP AT MARKS INTO WA_MARKS.
        AT FIRST .
           ULINE.
           FORMAT COLOR 6 ON.
           WRITE:/ 'SUBJECT CODE', 65 ' ' .
           FORMAT RESET.
           FORMAT COLOR 6 ON INTENSIFIED OFF.
           WRITE:/20 'ROLL NO',
                  40 'SUBJECT NAME',
                  55 'MARKS',
                  65 ' '.
           FORMAT RESET.
           ULINE.
        ENDAT.
        ON CHANGE OF WA_MARKS-SCODE.
           IF SY-TABIX NE 1.
               NEW-LINE.
               ULINE 40(25).
               FORMAT COLOR 5 ON INVERSE ON INTENSIFIED ON.
               TOT = TOT / STU.
               WRITE:/40 'AVERAGE MARKS =', TOT.
               FORMAT RESET.
               CLEAR TOT.
               CLEAR STU.
           ENDIF.
          FORMAT COLOR 6 ON INTENSIFIED ON.
          WRITE:/ WA_MARKS-SCODE.
          FORMAT RESET.
        ENDON.
        FORMAT COLOR 6 ON INTENSIFIED OFF.
        WRITE:/20 WA_MARKS-ROLLNO,
               40 WA_MARKS-SNAME,
               55 WA_MARKS-MARKS,
               65 ' '.
        FORMAT RESET.
        STU = STU + 1.
        TOT = TOT + WA_MARKS-MARKS.
        C = STU.
        AT LAST.
               NEW-LINE.
               ULINE 40(25).
               FORMAT COLOR 5 ON INVERSE ON INTENSIFIED ON.
               TOT = TOT / STU.
               WRITE:/40 'AVERAGE MARKS =', TOT.
               FORMAT RESET.
               CLEAR TOT.
               CLEAR STU.
             ULINE.
             FORMAT COLOR 6 ON INVERSE ON INTENSIFIED ON.
             WRITE:/ ' TOTAL STUDENTS : ', C.
             FORMAT RESET.
        ENDAT.
    ENDLOOP.
    reward points if hlpful.

  • How can we make  H-Tree?

    can anyone guide me how can we make H-Tree and how can we call module by using H-Tree?
    waiting for prompt answer.
    thanks in advance
    sarah
    Edited by: user652484 on Aug 2, 2009 3:43 AM
    Edited by: user652484 on Aug 2, 2009 3:45 AM

    Dear,
    Creating a Hierarchical Tree based on database table required a table with self-joined column like scott's emp table where column empno refered by mgr, a Data Query with PRIOR clause and a procedure call from the Form Level When-New-Form-Instance trigger.
    There are many ways to make Hierarchical Tree. I am describing one of them bellow. Please follow the steps:
    01. Create the following table
    CREATE TABLE EMPLOYEE(
    EMPLOYEE_ID NUMBER(4),
    EMPLOYEE_NAME VARCHAR2(50),
    MANAGER_ID NUMBER(4),
    CONSTRAINT EMPLOYEE_PK PRIMARY KEY(EMPLOYEE_ID),
    CONSTRAINT EMPLOYEE_FK FOREIGN KEY(MANAGER_ID)
    REFERENCES EMPLOYEE(EMPLOYEE_ID)
    02. Insert some data on it
    03. Create a form module and name it HTREE_DEMO
    04. Create a Data Block on this form and name it CONTROL.
    05. Create a Hierarchical Tree Item on it and name it EMP_TREE. Hierarchical Tree must be single item on single block.
    05. Write the following query on Data Query of the EMP_TREE Item
    SELECT 1, LEVEL, EMPLOYEE_NAME, NULL, EMPLOYEE_ID
    FROM EMPLOYEE
    CONNECT BY PRIOR EMPLOYEE_ID = MANAGER_ID
    START WITH MANAGER_ID IS NULL
    06. Add the following line of code on the Form Level When-New-Form-Instance Trigger
    FTREE.POPULATE_TREE('CONTROL.EMP_TREE);
    07. Run the form
    08. Enjoy!

  • How can I write from an Include?

    Hi to everybody!!
    I've a problem with my include...inside of this I've to write '2'. for make this I put...
    write: '2'.
    But when I execute the program... the number 2 doesn't appears, somebody told me that I need to put the End-OF-SELECTION, but when I can't see it.
    Does anybody know how can I write something from an include?
    Thanks a lot.
    Regards,
    Rebeca

    Try this way...
    I don't where you placed the include , you place under the event and see.
    REPORT ZTEST.
    END-OF-SELECTION.
    INCLUDE ZINCLUDE.

  • How can I want run the reports on AD, if I have no access to AD server?

    I am not an AD administrator and I do not have permissions to AD server. But I have admin permissions to a site in AD and using RSAT, can administer the site. How can I want run the reports listed below? AD is on Windows 2008R2 server.
    All Administrator logons
    Logon statistics
    Logons during non-business hours
    Multiple logon failures
    Password resets (other than Security Administrator)
    Successful logon after several failures
    User behavior anomalies
    Logons of already logged-on users
    All Logons Over Weekend
    Audit Policy Changed
    Computer Accounts Changed

    Hello,
    Some of your reports can be done using RSAT with Active Directory Powershell module. Some of them including
    Computer Accounts Changed needs auditing to be enabled for directory object changes. These are not predefined reports which you can simply run my friend. Can you please be more specific?
    Mahdi Tehrani   |  
      |  
    www.mahditehrani.ir
    Please click on Propose As Answer or to mark this post as
    and helpful for other people.
    This posting is provided AS-IS with no warranties, and confers no rights.
    How to query members of 'Local Administrators' group in all computers?

  • How can I write a program that compiles without warnings?

    I tried the following with the 1.5 beta-compiler (build 28; I think):
    class Y {
         public static final class Pair<X,Y> {
           private X fst;
           private Y snd;
           public Pair(X fst, Y snd) {this.fst=fst; this.snd=snd;}
           public X getFirst() { return fst; }
           public Y getSecond() { return snd; }
           public String toString() { return "("+fst+","+snd+")"; }
      public static void main(String... args) {
         Pair[] pairArr = new Pair[10];              // supposed to be an array of Pair<Integer,Integer>
         for (int i=0; i<pairArr.length; i++)
             pairArr[i] = new Pair<Integer,Integer>(i,i);
         for (int i=0; i<pairArr.length; i++) {
             Pair<Integer,Integer> p = pairArr; // unchecked warning
         System.out.println(p);
         Integer first = p.getFirst();
         Integer second = p.getSecond();
    // ... more stuff ...
    It turns out that I get an unchecked warning when I extract an element from the array of pairs. Okay, that's fine. How can I avoid the warning? I had expected that an explicit cast would help.
      Pair<Integer,Integer> p = (Pair<Integer,Integer> )pairArr;
    With a cast I'm telling the compiler: "I _know_ what I'm doing; please trust me." But the compiler still issues a warning.
    How can I write a warning-free program in this case? The only thing I can think of, is not using the parameterized type Pair in its parameterized form. But it's not the idea of Java Generics that I refrain from using parameterized types. What am I missing?

    It turns out that I get an unchecked warning when I
    extract an element from the array of pairs. Okay,
    that's fine. How can I avoid the warning? I had
    expected that an explicit cast would help.
    Pair<Integer,Integer> p = (Pair<Integer,Integer>
    )pairArr;
    With a cast I'm telling the compiler: "I _know_ what
    I'm doing; please trust me."  But the compiler still
    issues a warning.  Yes, but at least you were able to change the warning from "unchecked assignment" to "unchecked cast" which is a little shorter ;-)
    Seriously , since arrays of generic types are disallowed, there is probably no way to get rid of these warnings - which makes a strong point for eliminating "unchecked" warnings altogether (see the other thread "selectively suppressing compiler warnings")
    Cheerio,
    Gernot

  • How can i call a tree from a subvi?

    I have a subvi which build a tree and give as an output a reference to it.
    how can i display that tree on the front panel of a main vi. for instance press a button on the main front panel esecutes the subvi and display the tree on the main front panel.
    thank you
    diego

    Hi
    Put tree control on front pane of main.vil, create his (of control) reference and send it to your subVI
    Eugene 

  • How can I Write a sine wave in an Access-fil​e?

    I measure a sine wave in LabView 6i. How can I write the datas automatically to an Acces-file, at the same time?
    In my program, I managed it with Execute SQL.vi, I change a number in a SQL statement(String) -> after this I push start and then it writes the statement in the Access-file.
    The problem is, it writes only one data per measurement in the file. How can I write all datas in the Access-file and measure the wave at the same time?
    Thanks for help!
    Attachments:
    getwave.vi ‏49 KB

    On the waveform palette, you will find a "to components" vi that you can break out the array of the waveform. You can then, using a for loop write all of the values from the waveform.
    Better yet, there are examples in the database toolkit manual on pages 3-13 to 3-15 that deal with reading arrays (and even has a waveform example).
    Good luck!

  • How can i write the below code using "For all entries"

    Hi
    How can we write the below code using "for all entries" and need to avoid joins...
    Please help
    SELECT aaufnr aobjnr aauart atxjcd a~pspel
    agstrp awerks carbpl cwerks
    INTO TABLE t_caufv
    FROM caufv AS a
    INNER JOIN afih AS b
    ON aaufnr = baufnr
    INNER JOIN crhd AS c
    ON bgewrk = cobjid
    AND c~objty = 'D'
    WHERE ( a~pspel = space
    OR a~txjcd = space
    OR NOT a~objnr IN
    ( select OBJNR from COBRB AS e
    WHERE objnr = a~objnr ) )
    AND a~werks IN s_plant
    AND a~auart IN s_wtype
    AND NOT a~objnr IN
    ( select OBJNR from JEST AS d
    WHERE objnr = a~objnr
    AND ( dstat = 'A0081'OR dstat = 'A0018' )
    AND d~inact 'X' ).
    Reward points for all helpfull answers
    Thanks
    Ammi.

    Hi,
    SELECT objnr objid aufnr
            from afih
            into table t_afih.
    SELECT objnr
            from JEST
            into table t_JEST
            where stat = 'A0045'
               OR stat = 'A0046'
               AND inact 'X'.
    SELECT objnr
            from COBRB
            into table t_cobrb.
    SELECT arbpl werks objid objty
          from crhd
          INTO table it_crhd
          FOR ALL ENTRIES IN it_afih
          WHERE objty eq 'D'
          AND gewrk = it_afih-objid.
    SELECT aufnr objnr auart txjcd pspel gstrp werks aufnr
            FROM caufv
            INTO table t_caufv
            FOR ALL ENTRIES IN it_afih
            WHERE aufnr = it_afih-aufnr
              And pspel = ' '
              AND txjcd = ' '
             ANd objnr ne it_crhd-objnr
              AND auart in s_wtype
              AND werks in s_plant.
             AND objnr ne it_jest-objnr.
    dont use NE in the select statements, it may effect performance also. Instead use if statements inside
    loops.
    loop at t_caufv.
    read table it_chrd............
      if t_caufv-objnr ne it_chrd-objnr.
      read table it_jest..........
       if   if t_caufv-objnr ne it_jest-objnr.
        (proceed further).
       endif.
      endif.
    endloop.
    hope this helps.
    Reward if useful.
    Regards,
    Anu

  • How can I write into a table cell (row, column are given) in a databae?

    How can I write into a table cell (row, column are given) in a database using LabVIEW Database Toolkit? I am using Ms Access. Suppose I have three columns in a table, I write 1st row of 1st column, then 1st row of 3rd column. The problem I am having is after writing the 1st row 1st column, the reference goes to second row and if I write into 3rd column, it goes to 2nd row 3rd column. Any suggestion? 
    Solved!
    Go to Solution.

    When you do a SQL INSERT command, you create a new row. If you want to change an existing row, you have to use the UPDATE command (i.e. UPDATE tablename SET column = value WHERE some_column=some_value). The some_column could be the unique ID of each row, a date/time, etc.
    I have no idea what function to use in the toolkit to execute a SQL command since I don't use the toolkit. I also don't understand why you just don't do a single INSERT. It would be much faster.

  • I write digital port by 'DAQmx Configure Logging.vi​' and receive TDMS file with 8 boolean channels. How can I write to 1 integer channel?

    Hello!
    I want to write 1 digital port from PXI-6536 with streaming to TDMS file.
    I'm writing by 'DAQmx Configure Logging.vi' and become TDMS file with 8 boolean channels.
    How can I write to 1integer channel?
    Attachments:
    1.JPG ‏27 KB

    Hey Atrina,
    The actual data stored on disk is just the raw data (that is, a byte per sample in your case).  It's really just a matter of how that data is being represented in LabVIEW whenever you read back the TDMS file.
    I'm not sure if there is a better way to do this, but here is a way to accomplish what you're wanting:
    Read back the TDMS file as a digital waveform.  Then there's a conversion function in LabVIEW called DWDT Digital to Binary.  This function will convert that set of digital channels into the "port format" that you're wanting.  I've attached an example of what I mean.
    Note: When looking at this VI, there are a few things that the downgrade process did to the VI that I would not recommend for these TDMS files.  It added a 1.0 constant on the TDMS Open function, and it set "disable buffering" on the TDMS Open function to false; you can get rid of both of those constants.
    Message Edited by AndrewMc on 01-27-2010 11:21 AM
    Thanks,
    Andy McRorie
    NI R&D
    Attachments:
    digitalconvert.vi ‏13 KB

  • I am connecting an external USB HDD and I can see it on my Apple Macbook Air. BUT this drive is READ only. How can I write to it?

    I am connecting an external USB HDD and I can see it on my Apple Macbook Air. BUT this drive is READ only. How can I write to it?

    Drive Partition and Format
    1.Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Steps 4-6 are optional but should be used on a drive that has never been formatted before, if the format type is not Mac OS Extended, if the partition scheme has been changed, or if a different operating system (not OS X) has been installed on the drive.

  • How can I write to an OPC Server?

    Hello!
    I was busy a few days with LabVIEW 8 to finish a special task, but now I've got problems to solve the following problem:
    I have an OPC connection between a frequency converter and LabVIEW 8. With the example vi's I get the data out of the OPC Server (revolutions per minute).
    So I can read data out of the OPC Server, but how can I write? I want to write several voltage values to the OPC Server that the frequency converter gets the required revolutions per minute.
    Have you got any ideas? Are there existing example vi's to write data to an OPC Server?
    Best regards and Thanks in advance!

    So here it is - a little bit modified, but you should get the idea out of it.
    If you have questions, I'll try to answer them .
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    IOControl.llb ‏168 KB

Maybe you are looking for